@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.
- package/dist/bundles.json +1 -1
- package/dist/scripts/1041-e67122b7dc-lite.chunk.js +2 -0
- package/dist/scripts/1041-e67122b7dc-lite.chunk.js.map +1 -0
- package/dist/scripts/{1080-aebdd2fd94-lite.chunk.js → 1080-db39a50a32-lite.chunk.js} +2 -2
- package/dist/scripts/1080-db39a50a32-lite.chunk.js.map +1 -0
- package/dist/scripts/{1169-b84be13a05-lite.chunk.js → 1169-394baed329-lite.chunk.js} +2 -2
- package/dist/scripts/1169-394baed329-lite.chunk.js.map +1 -0
- package/dist/scripts/{143-e8df681adb-lite.chunk.js → 143-851fefbbc8-lite.chunk.js} +2 -2
- package/dist/scripts/143-851fefbbc8-lite.chunk.js.map +1 -0
- package/dist/scripts/{170-edaa4055be-lite.chunk.js → 170-6dda8ec96e-lite.chunk.js} +3 -3
- package/dist/scripts/170-6dda8ec96e-lite.chunk.js.map +1 -0
- package/dist/scripts/2015-0cb7aead83-lite.chunk.js +2 -0
- package/dist/scripts/2015-0cb7aead83-lite.chunk.js.map +1 -0
- package/dist/scripts/204-67566b75e7-lite.chunk.js +2 -0
- package/dist/scripts/204-67566b75e7-lite.chunk.js.map +1 -0
- package/dist/scripts/2215-c47eb22183-lite.chunk.js +2 -0
- package/dist/scripts/2215-c47eb22183-lite.chunk.js.map +1 -0
- package/dist/scripts/{2340-16e28533f3-lite.chunk.js → 2340-6179f12db3-lite.chunk.js} +2 -2
- package/dist/scripts/2340-6179f12db3-lite.chunk.js.map +1 -0
- package/dist/scripts/2571-70477f279b-lite.chunk.js +2 -0
- package/dist/scripts/2571-70477f279b-lite.chunk.js.map +1 -0
- package/dist/scripts/{2581-bf3d282cb9-lite.chunk.js → 2581-f21f1ac71e-lite.chunk.js} +3 -3
- package/dist/scripts/2581-f21f1ac71e-lite.chunk.js.map +1 -0
- package/dist/scripts/3731-eeabea3393-lite.chunk.js +3 -0
- package/dist/scripts/3731-eeabea3393-lite.chunk.js.map +1 -0
- package/dist/scripts/{4013-3070636adb-lite.chunk.js → 4013-9e41670948-lite.chunk.js} +3 -3
- package/dist/scripts/4013-9e41670948-lite.chunk.js.map +1 -0
- package/dist/scripts/{4205-cf817cce7b-lite.chunk.js → 4205-2d3c5f264f-lite.chunk.js} +2 -2
- package/dist/scripts/4205-2d3c5f264f-lite.chunk.js.map +1 -0
- package/dist/scripts/{490-9b7a10c66a-lite.chunk.js → 490-f8e5bbb09c-lite.chunk.js} +2 -2
- package/dist/scripts/490-f8e5bbb09c-lite.chunk.js.map +1 -0
- package/dist/scripts/4944-c5ba3ff091-lite.chunk.js +2 -0
- package/dist/scripts/4944-c5ba3ff091-lite.chunk.js.map +1 -0
- package/dist/scripts/{5220-85356e2ed6-lite.chunk.js → 5220-0cca67a7e7-lite.chunk.js} +3 -3
- package/dist/scripts/5220-0cca67a7e7-lite.chunk.js.map +1 -0
- package/dist/scripts/{5224-6e7208837b-lite.chunk.js → 5224-ebdead7925-lite.chunk.js} +2 -2
- package/dist/scripts/5224-ebdead7925-lite.chunk.js.map +1 -0
- package/dist/scripts/{5836-27add12a78-lite.chunk.js → 5836-921d683eb5-lite.chunk.js} +2 -2
- package/dist/scripts/5836-921d683eb5-lite.chunk.js.map +1 -0
- package/dist/scripts/{5936-e61ae32ed3-lite.chunk.js → 5936-d1117ce842-lite.chunk.js} +2 -2
- package/dist/scripts/5936-d1117ce842-lite.chunk.js.map +1 -0
- package/dist/scripts/{6118-857c2f6b97-lite.chunk.js → 6118-3dbd569840-lite.chunk.js} +2 -2
- package/dist/scripts/6118-3dbd569840-lite.chunk.js.map +1 -0
- package/dist/scripts/{6263-dcc4cb4933-lite.chunk.js → 6263-d084bdb444-lite.chunk.js} +2 -2
- package/dist/scripts/6263-d084bdb444-lite.chunk.js.map +1 -0
- package/dist/scripts/{6368-d33570d16d-lite.chunk.js → 6368-c296821dd9-lite.chunk.js} +2 -2
- package/dist/scripts/6368-c296821dd9-lite.chunk.js.map +1 -0
- package/dist/scripts/{6741-5bf7ea5363-lite.chunk.js → 6741-9799a705b8-lite.chunk.js} +3 -3
- package/dist/scripts/6741-9799a705b8-lite.chunk.js.map +1 -0
- package/dist/scripts/{6934-11a3f3e147-lite.chunk.js → 6934-5647e18a41-lite.chunk.js} +2 -2
- package/dist/scripts/6934-5647e18a41-lite.chunk.js.map +1 -0
- package/dist/scripts/7234-fecb9339e5-lite.chunk.js +2 -0
- package/dist/scripts/7234-fecb9339e5-lite.chunk.js.map +1 -0
- package/dist/scripts/{7709-fb358991a1-lite.chunk.js → 7709-18e41d81b8-lite.chunk.js} +2 -2
- package/dist/scripts/7709-18e41d81b8-lite.chunk.js.map +1 -0
- package/dist/scripts/{9139-63b528ce93-lite.chunk.js → 9139-251b1d5a38-lite.chunk.js} +2 -2
- package/dist/scripts/9139-251b1d5a38-lite.chunk.js.map +1 -0
- package/dist/scripts/{9173-c164578a27-lite.chunk.js → 9173-1cb2d7c045-lite.chunk.js} +2 -2
- package/dist/scripts/9173-1cb2d7c045-lite.chunk.js.map +1 -0
- package/dist/scripts/9284-ca348ab523-lite.chunk.js +2 -0
- package/dist/scripts/9284-ca348ab523-lite.chunk.js.map +1 -0
- package/dist/scripts/{9395-7aa400f517-lite.chunk.js → 9395-10f1a8adfe-lite.chunk.js} +3 -3
- package/dist/scripts/{9395-7aa400f517-lite.chunk.js.map → 9395-10f1a8adfe-lite.chunk.js.map} +1 -1
- package/dist/scripts/{953-4e10bd618b-lite.chunk.js → 953-279b3b79cd-lite.chunk.js} +3 -3
- package/dist/scripts/{953-4e10bd618b-lite.chunk.js.map → 953-279b3b79cd-lite.chunk.js.map} +1 -1
- package/dist/scripts/bundle-55d31077c4.min.js +3 -0
- package/dist/scripts/bundle-55d31077c4.min.js.map +1 -0
- package/package.json +1 -1
- package/dist/scripts/1080-aebdd2fd94-lite.chunk.js.map +0 -1
- package/dist/scripts/1169-b84be13a05-lite.chunk.js.map +0 -1
- package/dist/scripts/143-e8df681adb-lite.chunk.js.map +0 -1
- package/dist/scripts/170-edaa4055be-lite.chunk.js.map +0 -1
- package/dist/scripts/204-abf7907929-lite.chunk.js +0 -2
- package/dist/scripts/204-abf7907929-lite.chunk.js.map +0 -1
- package/dist/scripts/2215-69d4d628e5-lite.chunk.js +0 -2
- package/dist/scripts/2215-69d4d628e5-lite.chunk.js.map +0 -1
- package/dist/scripts/2340-16e28533f3-lite.chunk.js.map +0 -1
- package/dist/scripts/2581-bf3d282cb9-lite.chunk.js.map +0 -1
- package/dist/scripts/3525-36cfbbfcf2-lite.chunk.js +0 -2
- package/dist/scripts/3525-36cfbbfcf2-lite.chunk.js.map +0 -1
- package/dist/scripts/4013-3070636adb-lite.chunk.js.map +0 -1
- package/dist/scripts/4205-cf817cce7b-lite.chunk.js.map +0 -1
- package/dist/scripts/490-9b7a10c66a-lite.chunk.js.map +0 -1
- package/dist/scripts/4944-44f59087ce-lite.chunk.js +0 -2
- package/dist/scripts/4944-44f59087ce-lite.chunk.js.map +0 -1
- package/dist/scripts/5220-85356e2ed6-lite.chunk.js.map +0 -1
- package/dist/scripts/5224-6e7208837b-lite.chunk.js.map +0 -1
- package/dist/scripts/5836-27add12a78-lite.chunk.js.map +0 -1
- package/dist/scripts/5886-13395190b8-lite.chunk.js +0 -3
- package/dist/scripts/5886-13395190b8-lite.chunk.js.map +0 -1
- package/dist/scripts/5936-e61ae32ed3-lite.chunk.js.map +0 -1
- package/dist/scripts/6118-857c2f6b97-lite.chunk.js.map +0 -1
- package/dist/scripts/6263-dcc4cb4933-lite.chunk.js.map +0 -1
- package/dist/scripts/6368-d33570d16d-lite.chunk.js.map +0 -1
- package/dist/scripts/6741-5bf7ea5363-lite.chunk.js.map +0 -1
- package/dist/scripts/6934-11a3f3e147-lite.chunk.js.map +0 -1
- package/dist/scripts/7234-ef069e6013-lite.chunk.js +0 -2
- package/dist/scripts/7234-ef069e6013-lite.chunk.js.map +0 -1
- package/dist/scripts/7709-fb358991a1-lite.chunk.js.map +0 -1
- package/dist/scripts/8813-887868f687-lite.chunk.js +0 -2
- package/dist/scripts/8813-887868f687-lite.chunk.js.map +0 -1
- package/dist/scripts/9139-63b528ce93-lite.chunk.js.map +0 -1
- package/dist/scripts/9173-c164578a27-lite.chunk.js.map +0 -1
- package/dist/scripts/9284-7f6bbe012f-lite.chunk.js +0 -2
- package/dist/scripts/9284-7f6bbe012f-lite.chunk.js.map +0 -1
- package/dist/scripts/bundle-403f576ace.min.js +0 -3
- package/dist/scripts/bundle-403f576ace.min.js.map +0 -1
- /package/dist/css/{3525-lite-52288b11e5.chunk.css → 1041-lite-52288b11e5.chunk.css} +0 -0
- /package/dist/css/{8813-lite-52288b11e5.chunk.css → 2015-lite-52288b11e5.chunk.css} +0 -0
- /package/dist/css/{5886-lite-3633cd9770.chunk.css → 3731-lite-3633cd9770.chunk.css} +0 -0
- /package/dist/scripts/{170-edaa4055be-lite.chunk.js.LICENSE.txt → 170-6dda8ec96e-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2581-bf3d282cb9-lite.chunk.js.LICENSE.txt → 2581-f21f1ac71e-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4013-3070636adb-lite.chunk.js.LICENSE.txt → 3731-eeabea3393-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5220-85356e2ed6-lite.chunk.js.LICENSE.txt → 4013-9e41670948-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5886-13395190b8-lite.chunk.js.LICENSE.txt → 5220-0cca67a7e7-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6741-5bf7ea5363-lite.chunk.js.LICENSE.txt → 6741-9799a705b8-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9395-7aa400f517-lite.chunk.js.LICENSE.txt → 9395-10f1a8adfe-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{953-4e10bd618b-lite.chunk.js.LICENSE.txt → 953-279b3b79cd-lite.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{bundle-403f576ace.min.js.LICENSE.txt → bundle-55d31077c4.min.js.LICENSE.txt} +0 -0
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3525],{94644:(e,a,i)=>{i.d(a,{r:()=>l});var t=i(50242),n=i(81886),r=i(67058),o=i(14553),s=i(49267),c=i(49075),d={notFound:r.d,forbidden:{rating:o.q,yearLevel:o.q,region:s.a,privacy:o.q},badRequest:c._};function l(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var r;r="number"==typeof e?e:e.status;var o=Object.assign(Object.assign({},d),a);r&&n.Q.Ry.isStatusCodeError(r)&&(r!==t.o.NotFound?r!==t.o.Forbidden?i.badRequest||n.Q.Ry.throw(new o.badRequest):i.forbidden||n.Q.Ry.throw(new o.forbidden.privacy):i.notFound||n.Q.Ry.throw(new o.notFound))}}},91286:(e,a,i)=>{i.d(a,{v:()=>o});var t=i(32735),n=i(94644);function r(e){return e.map((function(e){return e.statusCode})).join(":")}function o(e,a,i){var o=Array.isArray(e)?e:[e];(0,t.useEffect)((function(){o.forEach((function(e){(0,n.r)(e.statusCode,a,i)}))}),[r(o),a,i])}},5859:(e,a,i)=>{function t(e,a){(null==a||a>e.length)&&(a=e.length);for(var i=0,t=Array(a);i<a;i++)t[i]=e[i];return t}i.d(a,{u:()=>r});var n={numItems:5,minWidth:50,maxWidth:100},r={getPartialLoadingItems:function(){var e,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=Object.assign(Object.assign({},n),a);return(e=Array(i.numItems),function(e){if(Array.isArray(e))return t(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,a){if(e){if("string"==typeof e)return t(e,a);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?t(e,a):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()*i.maxWidth),i.minWidth),"px")}}))}}},44110:(e,a,i)=>{i.d(a,{i:()=>o});var t=i(20354),n=i(89454),r=i(86698),o=function(){var e=(0,r.y)({redirectOnError:!0}),a=e.activePresentation,i=e.getFallbackPresentation,o=a||i();return t.a.useBasicFetch(!!o&&n.O.presentationAudiences(o.id))}},36073:(e,a,i)=>{i.r(a),i.d(a,{PlayClipViewV2:()=>U});var t=i(32735),n=i(50242),r=i(23481),o=i(20354),s=i(65858),c=i(78417),d=i(16714),l=i(67058),u=i(33803),p=i(43012),v=i(39151),m=i(1666),g=i(20768),f=i(31949),y=i(1575),h=i(63719),I=i(26304),A=i(91286),P=i(22902),b=i(15311),C=i(79612),E=i(76753),V=i(51855),F=i(7179),O=i(49948),R=i(36873),S=i(27638),x=i(44110),L=i(35014),w=i(97816),G=i(81812),T=i(14085),k=r.T.encloseNamespace("shared.playClipV2"),q={notFound:l.d,forbidden:{privacy:u.G}};function U(e){var a,i,r,l,u,U,N,M,j=e.queryParams,_=j.context,B=j.contextId,W=j.mtv,D=(0,b.r)().hasProduct,H=(0,S.u)(s.LZ.PlayClip),Q=H.setFavourite,K=H.canFavourite,Y=(0,P.T)().hasPermissions,Z=(0,V.G)().isPlugin,J=o.a.useBasicFetch(f.N.currentUser()),$=o.a.useBasicFetch(v.L.config()),z=o.a.useBasicFetch(p.e.clip(e.id)),X=o.a.useBasicFetch(g.b.videoInteractives(e.id)),ee=o.a.useBasicFetch(!!(null===(a=z.data)||void 0===a?void 0:a._parentVideo)&&y.R.video(z.data._parentVideo.id));(0,w.V)([ee.data]);var ae=o.a.useBasicFetch(!!(null===(i=z.data)||void 0===i?void 0:i._parentVideo)&&p.e.videoClips(z.data._parentVideo.id)),ie=o.a.useBasicFetch(z.statusCode===n.o.Forbidden&&p.e.clip(e.id,c.r.StripMetadata)),te=(0,R.k)({video:ee.data,context:_,contextId:B,moviesAndTv:W,currentUser:J.data}),ne=(0,x.i)(),re=o.a.useBasicFetch((null===(r=J.data)||void 0===r?void 0:r.isAuthenticated)&&m.h.yearGroups(J.data.customerId)),oe=(0,G.a)(),se=(0,O.l)(e.id,!0),ce=(0,L.I)(),de=(0,h.h)({name:null===(l=z.data)||void 0===l?void 0:l.name});return(0,C.M)(E.CG.getClipMetadata({content:z.data,phraseContext:{phraseHandler:k,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"}})),(0,A.v)(z,q,{forbidden:!0}),(0,w.V)(null!==(u=te.videos)&&void 0!==u?u:[]),(0,I.b)(ie),(0,F.P)({id:e.id,app:"clips"}),z.data&&J.hasCompleted&&$.hasCompleted&&se.hasCompleted?t.createElement(T.S,{clip:z.data,clips:null===(U=ae.data)||void 0===U?void 0:U.data,interactives:null===(N=X.data)||void 0===N?void 0:N.data,originalVideo:ee.data,currentUser:J.data,yearGroups:re.data,relatedVideos:"playlist"===_?te:Object.assign(Object.assign({},te),{videos:[]}),canFavourite:K,setFavourite:Q,hasProduct:D,queryParams:e.queryParams,audiences:ne.data,imageCdnUrl:$.data.imageCdnUrl,canManageVideoAccess:Y(d.C.ManageVideoAccess),pointsOfInterest:se.items,featureAccess:ce,tableOfContentsId:null===(M=e.queryParams)||void 0===M?void 0:M.tocId,shouldShowSideTableOfContents:oe,isPlugin:Z,breadcrumbs:de}):t.createElement(t.Fragment,null)}U.defaultProps={queryParams:{}}},14085:(e,a,i)=>{i.d(a,{S:()=>H});var t=i(32735),n=i(28400),r=i(49935),o=i(5640),s=i(56940),c=i(51184),d=i(64921),l=i(95812),u=i(53709),p=i(71063),v=i(10439),m=i(35429),g=i(4594),f=i(16714),y=i(12754),h=i(22902),I=i(65332),A=i(76196),P=i(59598),b=i(31908),C=i(26492),E=i(9465),V=i(91479),F=i(47938),O=i(57605),R=i(78166),S=i(99742),x=i(14070),L=i(97291),w=i(22490),G=i(63010),T=i(14476),k=i(53256),q=i(83345),U=i(13231),N=i(51365),M=i(10671),j=i(10741),_="shared.playClipV2";function B(e){var a=(0,h.T)().hasPermissions,i=(0,M._)({location:M.i.VideoItem});return t.createElement("section",{className:"play-page-section",id:P.K.ClippedFrom,ref:function(a){var i;a&&(null===(i=e.headingRef)||void 0===i?void 0:i.current)&&e.headingRef.current.set(P.K.ClippedFrom,a)}},t.createElement("h2",{className:"h4 mb-0"},t.createElement(q.x,{namespace:_,phrase:"clippedFrom"})),t.createElement(N.M.Provider,{value:i},t.createElement(U.E4,{videos:[e.originalVideo],yearGroups:e.yearGroups,setFavourite:e.setFavourite,canFavourite:e.canFavourite,getVideoAppLink:function(a,i){return w.W.getAppLink(a,Object.assign(Object.assign({},i),{context:e.queryParams.context,contextId:e.queryParams.contextId,playNext:e.queryParams.playNext,shareId:e.shareId,moviesAndTv:e.queryParams.mtv}))},hasPermissions:a,presentationAudiences:e.audiences,getPreviewQuestionsAppLink:function(e){return j.j.getPreviewQuestionsAppLink(e)},isPlugin:e.isPlugin,getClassroomGuideAppLink:e.getClassroomGuideAppLink,getInteractiveGuidanceAppLink:e.getInteractiveGuidanceAppLink,getResourceGuidanceAppLink:e.getResourceGuidanceAppLink})))}const W={main:"iQ0Ie",expandedToc:"sIoV8"};var D=function(e,a,i){return function(t){return i?{application:L.O.VIDEOS,action:x.e.Videos.PREVIEW_PDF,args:[t.id],params:{videoId:e,shareId:a}}:{application:L.O.SIGN_UP,action:x.e.SignUp.SIGN_UP}}};function H(e){var a,i,q,U,N,M,j,_,H,Q,K=(0,m.g)(),Y=(0,h.T)().hasPermissions,Z=b.M.getCanBeConsumed(e.clip).canConsume,J=(0,G.Q)(e.tableOfContentsId),$=J.tableOfContentsActiveId,z=J.setTableOfContentsActiveId,X=J.controlledId,ee=J.setControlledId,ae=J.tableOfContentsExpanded,ie=J.onToggleTableOfContents,te=(0,c.Wp)(e.clip)&&e.featureAccess.canViewGlance,ne=(0,T.i)(te),re=ne.headingRef,oe=ne.headingElements,se=oe.map((function(a){var i;return{id:a.id,name:k.d.getSectionHeading(a.id,{clips:e.clips,interactives:e.interactives,resources:null===(i=e.clip.resources)||void 0===i?void 0:i.data,isPlayClipPage:!0})}}));(0,I.D)({setActiveId:z,headingElements:oe,controlledId:X,setControlledId:ee}),(0,A.P)(oe,X);var ce=b.M.isVideoTypeArchived(e.clip),de=Y(f.C.StudentExperience),le=t.useRef(!1);function ue(){var e,a,i,t;le.current=!(null===(a=null===(e=null==K?void 0:K.playerRef)||void 0===e?void 0:e.current)||void 0===a?void 0:a.isPaused()),null===(t=null===(i=null==K?void 0:K.playerRef)||void 0===i?void 0:i.current)||void 0===t||t.pause()}function pe(){var e,a;le.current&&(null===(a=null===(e=null==K?void 0:K.playerRef)||void 0===e?void 0:e.current)||void 0===a||a.play())}function ve(){var a,i;return!(!e.originalVideo||!(null===(a=e.clip._canBeConsumed)||void 0===a?void 0:a.value)||!(null===(i=e.currentUser)||void 0===i?void 0:i.isAuthenticated)||!e.hasProduct(y.x.Primary)||de)}var me="picture-in-picture"===K.mode||e.featureAccess.canViewPublicLayout,ge=null!==(i=null===(a=e.clips)||void 0===a?void 0:a.filter((function(a){return a.id.toString()!==e.clip.id.toString()})))&&void 0!==i?i:[];return t.createElement("div",{className:"px-4 play-page-sections-container ".concat(e.shouldShowSideTableOfContents?"row g-0":"")},t.createElement("main",{className:"".concat(W.main," ").concat(e.shouldShowSideTableOfContents&&ae?"".concat(W.expandedToc," col-9"):e.shouldShowSideTableOfContents&&!ae?"pe-4":void 0)},!!(null===(q=e.breadcrumbs)||void 0===q?void 0:q.length)&&t.createElement("div",{className:"mb-2"},t.createElement(r.Oo,{breadcrumbs:e.breadcrumbs})),t.createElement(F.W,{restrictions:e.clip._restrictions,yearGroups:e.yearGroups,objectId:e.clip.id,objectTypeId:g.E.Clip,canManageVideoAccess:e.canManageVideoAccess}),ce&&t.createElement(C.T,{typeId:e.clip.typeId,hasStudentExperience:de}),t.createElement("section",{id:P.K.Video,className:"mb-2 ".concat(p.M.GLOBAL_PLAYER_SELECTOR),ref:function(e){e&&(null==re?void 0:re.current)&&re.current.set(P.K.Video,e)}},Z&&t.createElement(v.r,{key:e.clip.id,objectId:e.clip.id,objectTypeId:e.clip.typeId,shareId:e.shareId,context:null===(U=e.queryParams)||void 0===U?void 0:U.context,contextId:null===(N=e.queryParams)||void 0===N?void 0:N.contextId,moviesAndTv:null===(M=e.queryParams)||void 0===M?void 0:M.mtv,playNext:null===(j=e.queryParams)||void 0===j?void 0:j.playNext,startTime:null!==(H=null===(_=e.queryParams)||void 0===_?void 0:_.t)&&void 0!==H?H:null===(Q=e.queryParams)||void 0===Q?void 0:Q.startTime,mode:"default",location:"play-page"}),t.createElement("div",{className:me?"":"d-none"},t.createElement(O.S,{video:e.clip,type:"pip"}))),t.createElement(V.v,{media:e.clip,yearGroups:e.yearGroups,audiences:e.audiences,originalVideoAppLink:ve()?{application:L.O.VIDEOS,action:x.e.Videos.PLAY_VIDEO,args:[e.originalVideo.id,n.m.slugify(e.originalVideo.name)]}:null,featureAccess:e.featureAccess,shareId:e.shareId}),te?t.createElement(d.j,{video:e.clip,pointsOfInterest:e.pointsOfInterest,setStartTime:function(e){var a;return null===(a=K.playerRef.current)||void 0===a?void 0:a.currentTime(e)},getTagAppLink:function(e){return{application:L.O.SEARCH,action:x.e.Search.HOME,params:{tagOrClassification:e.name}}},suppressInteractivity:e.featureAccess.canViewPublicLayout,canViewGlance:te}):t.createElement(s.a,{video:e.clip,currentUser:e.currentUser,onLaunchImmersiveReader:ue,onExitImmersiveReader:pe,getTagAppLink:function(e){return{application:L.O.SEARCH,action:x.e.Search.HOME,params:{tagOrClassification:e.name}}},headingRef:re,suppressInteractivity:e.featureAccess.canViewPublicLayout}),t.createElement(u.M,{video:e.clip,canViewResources:e.featureAccess.canViewResourceItems,imageCdnUrl:e.imageCdnUrl,getAppLink:D(e.clip.id,e.shareId,e.featureAccess.canViewResourceItems),analyticsData:{clipId:e.clip.id,clipName:e.clip.name},resourceThumbnailFallbackUrl:S.W.Fallbacks.RESOURCE_THUMBNAIL,headingRef:re}),t.createElement(l.J,{video:e.clip,interactives:e.interactives,imageCdnUrl:e.imageCdnUrl,analyticsData:{clipId:e.clip.id,clipName:e.clip.name},canViewInteractives:e.featureAccess.canViewInteractives,headingRef:re,yearGroups:e.yearGroups,setFavourite:e.setFavourite,canFavourite:e.canFavourite,isPlugin:e.isPlugin}),t.createElement(o.O,{clips:ge||[],video:e.clip,canViewClips:e.featureAccess.canViewClips,yearGroups:e.yearGroups,audiences:e.audiences,imageCdnUrl:e.imageCdnUrl,setFavourite:e.setFavourite,canFavourite:e.canFavourite,headingRef:re,analyticsData:{clipId:e.clip.id,clipName:e.clip.name},isPlugin:e.isPlugin}),te&&t.createElement(s.a,{video:e.clip,currentUser:e.currentUser,onLaunchImmersiveReader:ue,onExitImmersiveReader:pe,getTagAppLink:function(e){return{application:L.O.SEARCH,action:x.e.Search.HOME,params:{tagOrClassification:e.name}}},headingRef:re,suppressInteractivity:e.featureAccess.canViewPublicLayout,showHeading:!0}),!!ve()&&t.createElement(B,{originalVideo:e.originalVideo,setFavourite:e.setFavourite,canFavourite:e.canFavourite,yearGroups:e.yearGroups,shareId:e.shareId,queryParams:e.queryParams,audiences:e.audiences,headingRef:re,isPlugin:e.isPlugin,getClassroomGuideAppLink:w.W.getClassroomGuideAppLink,getInteractiveGuidanceAppLink:w.W.getInteractiveGuidanceAppLink,getResourceGuidanceAppLink:w.W.getResourceGuidanceAppLink}),t.createElement(R.Z,{currentVideo:e.clip,yearGroups:e.yearGroups,relatedVideos:e.relatedVideos,setFavourite:e.setFavourite,canFavourite:e.canFavourite,currentUser:e.currentUser,audiences:e.audiences,getVideoAppLink:function(a,i){return w.W.getAppLink(a,Object.assign(Object.assign({},i),{context:e.queryParams.context,contextId:e.queryParams.contextId,playNext:e.queryParams.playNext,shareId:e.shareId,moviesAndTv:e.queryParams.mtv}))},moviesAndTv:e.queryParams.mtv,isPlugin:e.isPlugin})),t.createElement(E.h,{isExpanded:ae,setIsExpanded:ie,items:se,activeId:$,setControlledId:ee,analyticsData:{clipId:e.clip.id,clipName:e.clip.name},showInSide:e.shouldShowSideTableOfContents}))}}}]);
|
|
2
|
-
//# sourceMappingURL=3525-36cfbbfcf2-lite.chunk.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scripts/3525-36cfbbfcf2-lite.chunk.js","mappings":"0MA0BMA,EAA8B,CAClCC,SAAU,IACVC,UAAW,CACTC,OAAQ,IACRC,UAAW,IACXC,OAAQ,IACRC,QAAS,KAEXC,WAAY,KAGR,SAAUC,EACdC,GAMkC,IALlCC,EAAA,uDAA+B,CAAC,EAKhCC,EAAA,uDAAgC,CAAC,EAEjC,GAAKF,EAAL,CAGA,IAAIG,EAGFA,EADmB,iBAAVH,EACIA,EAEAA,EAAKI,OAGpB,IAAMC,EAAW,OAAH,wBACTd,GACAU,GAGAE,GAGA,yBAAmCA,KAGpCA,IAAe,aAMfA,IAAe,cAUdD,EAAUJ,YACb,aAAuB,IAAIO,EAASP,YAN/BI,EAAUT,WACb,aAAuB,IAAIY,EAASZ,UAAUI,SAX3CK,EAAUV,UACb,aAAuB,IAAIa,EAASb,UAvBhC,CAuCV,C,6DChFA,SAASc,EAAiBC,GACxB,OAAOA,EAAWC,KAAI,SAAAC,GAAG,OAAIA,EAAIN,UAAU,IAAEO,KAAK,IACpD,CAGM,SAAUC,EACdC,EACAC,EACAC,GAEA,IAAMP,EAAaQ,MAAMC,QAAQJ,GAAeA,EAAc,CAACA,IAE/D,IAAAK,YAAU,WACRV,EAAWW,SAAQ,SAAAT,IACjB,OAAgBA,EAAIN,WAAYU,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mI,SAAUpF,EACVG,gBAAiBA,GACjBkE,cAAe,CAAEC,OAAQhK,EAAMa,KAAKjB,GAAIqK,SAAUjK,EAAMa,KAAKiB,MAC7DiJ,WAAY/K,EAAM0B,gCAK1B,C","sources":["file:///app/packages/libs/shared/src/errors/handlers/HttpErrorHandlers.ts","file:///app/packages/libs/shared/src/hooks/UseHandleObjectError.ts","file:///app/packages/libs/shared/src/utils/PartialLoadingHelper.ts","file:///app/packages/projects/lite/src/shared/hooks/usePresentationAudiences.ts","file:///app/packages/projects/lite/src/shared/views/play-clip/v2/PlayClipViewV2.tsx","file:///app/packages/projects/lite/src/shared/views/play-clip/v2/components/clipped-from/ClippedFrom.tsx","file:///app/packages/projects/lite/src/shared/views/play-clip/v2/components/play-clip/play-clip-v2.scss","file:///app/packages/projects/lite/src/shared/views/play-clip/v2/components/play-clip/PlayClipV2.tsx"],"sourcesContent":["import { BaseError } from 'libs/common/backbone/core/BaseError';\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { Xhr } from 'libs/common/backbone/interfaces';\nimport { Core } from 'libs/common/core';\n\nimport { NotFoundError } from 'libs/shared/errors/general/not-found/NotFoundError';\nimport { PrivateResourceError } from 'libs/shared/errors/general/private-resource/PrivateResourceError';\nimport { RegionLockedResourceError } from 'libs/shared/errors/general/region-locked-resource/RegionLockedResourceError';\nimport { UnspecifiedError } from 'libs/shared/errors/general/unspecified-error/UnspecifiedError';\nimport { VideoTypes } from 'libs/shared/interfaces';\n\nexport interface HttpErrorMap {\n notFound?: new () => BaseError;\n forbidden?: {\n rating?: new (description: string) => BaseError;\n yearLevel?: new (description: string) => BaseError;\n region?: new () => BaseError;\n privacy?: new (video?: VideoTypes) => BaseError;\n };\n badRequest?: new () => BaseError;\n}\n\nexport type IgnoreHttpErrorMap = {\n [key in keyof HttpErrorMap]: boolean;\n};\n\nconst defaultErrors: HttpErrorMap = {\n notFound: NotFoundError,\n forbidden: {\n rating: PrivateResourceError,\n yearLevel: PrivateResourceError,\n region: RegionLockedResourceError,\n privacy: PrivateResourceError\n },\n badRequest: UnspecifiedError\n};\n\nexport function handleHttpError(\n info: HttpStatus | Xhr,\n customErrorMap: HttpErrorMap = {},\n /**\n * Prevent certain errors in the errorMap from being thrown\n * so that you may implement your own handler\n */\n ignoreMap: IgnoreHttpErrorMap = {}\n): void {\n if (!info)\n return;\n\n let statusCode: HttpStatus;\n\n if (typeof(info) === 'number') {\n statusCode = info;\n } else {\n statusCode = info.status;\n }\n\n const errorMap = {\n ...defaultErrors,\n ...customErrorMap\n };\n\n if (!statusCode)\n return;\n\n if (!Core.ErrorHelper.isStatusCodeError(statusCode))\n return;\n\n if (statusCode === HttpStatus.NotFound) {\n if (!ignoreMap.notFound)\n Core.ErrorHelper.throw(new errorMap.notFound());\n return;\n }\n\n if (statusCode === HttpStatus.Forbidden) {\n /**\n * TODO: Work out how to go about handling all forbidden errors, such as region locking, year levels,\n * ratings, and privacy.\n */\n if (!ignoreMap.forbidden)\n Core.ErrorHelper.throw(new errorMap.forbidden.privacy());\n return;\n }\n\n if (!ignoreMap.badRequest)\n Core.ErrorHelper.throw(new errorMap.badRequest());\n}\n\nexport function handleXhrError(xhr: Xhr, customErrorMap?: HttpErrorMap): void {\n handleHttpError(xhr.status, customErrorMap);\n}","import { useEffect } from 'react';\n\nimport { Flight } from 'libs/common/flight';\n\nimport { handleHttpError, HttpErrorMap, IgnoreHttpErrorMap } from 'libs/shared/errors/handlers/HttpErrorHandlers';\n\nfunction generateCacheKey(flightObjs: Array<Flight.Response<any>>): string {\n return flightObjs.map(obj => obj.statusCode).join(':');\n}\n\n// TODO: Change this to just `useHandleHttpError` and only accept a status code.\nexport function useHandleObjectError(\n _flightObjs: Flight.Response<any> | Array<Flight.Response<any>>,\n customErrors?: HttpErrorMap,\n ignoreErrors?: IgnoreHttpErrorMap\n): void {\n const flightObjs = Array.isArray(_flightObjs) ? _flightObjs : [_flightObjs];\n\n useEffect(() => {\n flightObjs.forEach(obj => {\n handleHttpError(obj.statusCode, customErrors, ignoreErrors);\n });\n }, [ generateCacheKey(flightObjs), customErrors, ignoreErrors ]);\n}","const DEFAULT_PARTIAL_LOADING_OPTIONS: PartialLoadingOptions = {\n numItems: 5,\n minWidth: 50, // px\n maxWidth: 100 // px\n};\n\nexport interface PartialLoadingOptions {\n numItems?: number;\n minWidth?: number;\n maxWidth?: number;\n}\n\ninterface PartialLoadingItem {\n width: string;\n}\n\nexport const PartialLoadingHelper = {\n getPartialLoadingItems(options: PartialLoadingOptions = {}): PartialLoadingItem[] {\n const opts = {\n ...DEFAULT_PARTIAL_LOADING_OPTIONS,\n ...options\n };\n\n const getRandomFilterWidth = () => Math.max(Math.floor(Math.random() * opts.maxWidth), opts.minWidth);\n\n return [...Array(opts.numItems)].map(() => ({ width: `${getRandomFilterWidth()}px` }));\n }\n};","import { Flight } from 'libs/common/react/index';\n\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\nimport { usePresentation } from 'shared/hooks/usePresentation';\n\nexport const usePresentationAudiences = () => {\n const { activePresentation, getFallbackPresentation } = usePresentation({ redirectOnError: true });\n\n const presentation = activePresentation || getFallbackPresentation();\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n !!presentation &&\n AudienceRequests.presentationAudiences(presentation.id)\n );\n\n return audiences;\n};","import * as React from 'react';\n\nimport { HttpStatus } from 'libs/common/backbone/enums/HttpStatus';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { PermissionFilterOption } from 'libs/shared/enums/PermissionFilterOption';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { NotFoundError } from 'libs/shared/errors/general/not-found/NotFoundError';\nimport { VideoPrivateError } from 'libs/shared/errors/videos/video-private/VideoPrivateError';\nimport { ClipRequests } from 'libs/shared/flight-requests/ClipRequests';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { InteractiveRequests } from 'libs/shared/flight-requests/InteractiveRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { useBreadcrumbs } from 'libs/shared/hooks/useBreadcrumbs';\nimport { useCannotConsumeError } from 'libs/shared/hooks/useCannotConsumeError';\nimport { useHandleObjectError } from 'libs/shared/hooks/UseHandleObjectError';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useProducts } from 'libs/shared/hooks/UseProducts';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { Clip, ClipCollection, Config, CurrentUser, InteractiveCollection, Video, YearGroup } from 'libs/shared/interfaces';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { usePluginHelper } from 'shared/hooks/use-plugin-helper/usePluginHelper';\nimport { useDeepLinks } from 'shared/hooks/useDeepLinks';\nimport { useFetchPointsOfInterest } from 'shared/hooks/useFetchPointsOfInterest';\nimport { useGetRelatedVideos } from 'shared/hooks/useGetRelatedVideos';\nimport { useLiteFavourites } from 'shared/hooks/useLiteFavourites';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useVideoFeatureAccess } from 'shared/hooks/useVideoFeatureAccess';\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\nimport { useShouldShowSideTableOfContents } from 'shared/views/play/v2/hooks/useShouldShowTableOfContents';\n\nimport { PlayViewProps } from '../PlayClipViewContainer';\n\nimport { PlayClipV2 } from './components/play-clip/PlayClipV2';\n\nconst namespace = 'shared.playClipV2';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nconst clipErrors = {\n notFound: NotFoundError,\n forbidden: {\n privacy: VideoPrivateError\n }\n};\n\nPlayClipViewV2.defaultProps = {\n queryParams: {}\n};\n\nexport function PlayClipViewV2(props: PlayViewProps): JSX.Element {\n const { context, contextId, mtv } = props.queryParams;\n\n const { hasProduct } = useProducts();\n const { setFavourite, canFavourite } = useLiteFavourites(LocationContext.PlayClip);\n const { hasPermissions } = usePermissions();\n\n const { isPlugin } = usePluginHelper();\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const clip = Flight.useBasicFetch<Clip>(ClipRequests.clip(props.id));\n\n const interactives = Flight.useBasicFetch<InteractiveCollection>(InteractiveRequests.videoInteractives(props.id));\n const video = Flight.useBasicFetch<Video>(\n !!clip.data?._parentVideo && VideoRequests.video(clip.data._parentVideo.id)\n );\n useVideoMixin([video.data]);\n\n const childClips = Flight.useBasicFetch<ClipCollection>(\n !!clip.data?._parentVideo && ClipRequests.videoClips(clip.data._parentVideo.id)\n );\n\n const strippedClip = Flight.useBasicFetch<Clip>(clip.statusCode === HttpStatus.Forbidden &&\n ClipRequests.clip(props.id, PermissionFilterOption.StripMetadata));\n const relatedVideos = useGetRelatedVideos({\n video: video.data,\n context,\n contextId,\n moviesAndTv: mtv,\n currentUser: currentUser.data\n });\n const audiences = usePresentationAudiences();\n const yearGroups = Flight.useBasicFetch<YearGroup[]>(\n currentUser.data?.isAuthenticated && CustomerRequests.yearGroups(currentUser.data.customerId)\n );\n\n const shouldShowSideTableOfContents = useShouldShowSideTableOfContents();\n\n const pointsOfInterest = useFetchPointsOfInterest(props.id, true);\n \n const featureAccess = useVideoFeatureAccess();\n\n const breadcrumbs = useBreadcrumbs({ name: clip.data?.name });\n\n useSetPageMetadata(PageMetadataHelper.getClipMetadata({\n content: clip.data,\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n }\n }));\n\n useHandleObjectError(clip, clipErrors, { forbidden: true });\n useVideoMixin(relatedVideos.videos ?? []);\n useCannotConsumeError(strippedClip);\n useDeepLinks({ id: props.id, app: 'clips' });\n\n const hasLoaded = (\n clip.data &&\n currentUser.hasCompleted &&\n config.hasCompleted &&\n pointsOfInterest.hasCompleted\n );\n\n if (!hasLoaded)\n return <></>;\n\n return (\n <PlayClipV2\n clip={clip.data}\n clips={childClips.data?.data}\n interactives={interactives.data?.data}\n originalVideo={video.data}\n currentUser={currentUser.data}\n yearGroups={yearGroups.data}\n // we only show up next videos for clips in a playlist\n relatedVideos={context === 'playlist' ? relatedVideos : { ...relatedVideos, videos: []}}\n canFavourite={canFavourite}\n setFavourite={setFavourite}\n hasProduct={hasProduct}\n queryParams={props.queryParams}\n audiences={audiences.data}\n imageCdnUrl={config.data.imageCdnUrl}\n canManageVideoAccess={hasPermissions(PermissionName.ManageVideoAccess)}\n pointsOfInterest={pointsOfInterest.items}\n featureAccess={featureAccess}\n tableOfContentsId={props.queryParams?.tocId}\n shouldShowSideTableOfContents={shouldShowSideTableOfContents}\n isPlugin={isPlugin}\n breadcrumbs={breadcrumbs}\n />\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { CanFavouriteFunc, FavouriteFunc, PresentationAudience, VideoTypes, YearGroup } from 'libs/shared/interfaces';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\n\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nconst namespace = 'shared.playClipV2';\n\ninterface ClippedFromProps {\n originalVideo: VideoTypes;\n yearGroups: YearGroup[];\n setFavourite: FavouriteFunc;\n canFavourite: CanFavouriteFunc;\n queryParams: PlayViewQueryParams;\n audiences: PresentationAudience[];\n shareId?: string;\n headingRef: React.MutableRefObject<Map<PlayPageAnchor, HTMLElement>>;\n isPlugin: boolean;\n getInteractiveGuidanceAppLink: (id: string, type: MasterType) => Core.AppLink;\n getResourceGuidanceAppLink: (id: string, type: MasterType) => Core.AppLink;\n getClassroomGuideAppLink: (id: string, type: MasterType) => Core.AppLink;\n}\n\nexport function ClippedFrom(props: ClippedFromProps) {\n const { hasPermissions } = usePermissions();\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem });\n\n return (\n <section\n className='play-page-section'\n id={PlayPageAnchor.ClippedFrom}\n ref={el => {\n (el && props.headingRef?.current) && props.headingRef.current.set(PlayPageAnchor.ClippedFrom, el);\n }}\n >\n <h2 className='h4 mb-0'><Text namespace={namespace} phrase='clippedFrom' /></h2>\n <VideoActionsContext.Provider value={videoActions}>\n <VideoList\n videos={[props.originalVideo]}\n yearGroups={props.yearGroups}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv\n })}\n hasPermissions={hasPermissions}\n presentationAudiences={props.audiences}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n isPlugin={props.isPlugin}\n getClassroomGuideAppLink={props.getClassroomGuideAppLink}\n getInteractiveGuidanceAppLink={props.getInteractiveGuidanceAppLink}\n getResourceGuidanceAppLink={props.getResourceGuidanceAppLink}\n />\n </VideoActionsContext.Provider>\n </section>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"main\":\"iQ0Ie\",\"expandedToc\":\"sIoV8\"};","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { TextHelper } from 'libs/common/react/utils/TextHelper';\n\nimport { Breadcrumb, Breadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { PlayPageClips } from 'libs/shared/components/play-page-v2/clips-widget/PlayPageClips';\nimport { VideoDetailsWithScrollbarV2 } from 'libs/shared/components/play-page-v2/details/VideoDetailsV2';\nimport { hasGlanceData } from 'libs/shared/components/play-page-v2/glance/VideoAtAGlanceUtilsV2';\nimport { VideoAtAGlanceV2 } from 'libs/shared/components/play-page-v2/glance/VideoAtAGlanceV2';\nimport { PlayPageInteractives } from 'libs/shared/components/play-page-v2/interactives-widget/PlayPageInteractives';\nimport { PlayPageResources } from 'libs/shared/components/play-page-v2/resources-widget/PlayPageResources';\nimport { SeoConstants } from 'libs/shared/constants/SeoConstants';\nimport { GlobalPlayerConsumer } from 'libs/shared/context/player-context/components/GlobalPlayerConsumer';\nimport { usePlayerContext } from 'libs/shared/context/player-context/PlayerContext';\nimport { MasterType } from 'libs/shared/enums/MasterType';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ProductId } from 'libs/shared/enums/ProductId';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { HasProductFunc } from 'libs/shared/hooks/UseProducts';\nimport { useTableOfContentsActiveHeading } from 'libs/shared/hooks/useTableOfContentsActiveHeading';\nimport { useTableOfContentsScroll } from 'libs/shared/hooks/useTableOfContentsScroll';\nimport { CanFavouriteFunc, Clip, CurrentUser, FavouriteFunc, InteractiveMetadata, Link, PointOfInterest, PresentationAudience, Resource, Video, YearGroup } from 'libs/shared/interfaces';\nimport { PlayPageAnchor } from 'libs/shared/interfaces/PlayPageAnchor';\nimport { PlayViewQueryParams } from 'libs/shared/interfaces/query-params/PlayViewQueryParams';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\nimport { ArchivedBanner } from 'shared/components/play-page/ArchivedBanner';\nimport { TableOfContentsContainer } from 'shared/components/play-page/components/table-of-contents/TableOfContents';\nimport { PlayPageTitleAndActions } from 'shared/components/play-page/components/title-and-actions/PlayPageTitleAndActions';\nimport { RestrictionBanner } from 'shared/components/play-page/RestrictionBanner';\nimport { PlayerPlaceholder } from 'shared/components/player-placeholder/PlayerPlaceholder';\nimport { RelatedVideos } from 'shared/components/related-videos/RelatedVideos';\nimport { ImageUrls } from 'shared/constants/ImageUrls';\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { RelatedVideosHash } from 'shared/hooks/useGetRelatedVideos';\nimport { VideoFeaturesHash } from 'shared/hooks/useVideoFeatureAccess';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\nimport { usePlayPageTableOfContent } from 'shared/views/play/v2/hooks/usePlayPageTableOfContent';\nimport { useSectionHeadings } from 'shared/views/play/v2/hooks/useSectionHeadings';\nimport { PlayPageUtils } from 'shared/views/play/v2/PlayPageUtilV2';\nimport { ClippedFrom } from 'shared/views/play-clip/v2/components/clipped-from/ClippedFrom';\n\nimport styles from './play-clip-v2.scss';\n\nconst getResourceAppLink = (videoId: string, shareId: string, canViewResource: boolean) =>\n (resource: Resource | Link) => {\n if (!canViewResource) {\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: videoId,\n shareId: shareId\n }\n };\n };\n\n\ninterface PlayClipV2Props {\n clip: Clip;\n clips: Clip[];\n interactives: InteractiveMetadata[];\n originalVideo: Video;\n currentUser: CurrentUser;\n yearGroups: YearGroup[];\n relatedVideos: RelatedVideosHash;\n setFavourite: FavouriteFunc;\n canFavourite: CanFavouriteFunc;\n queryParams: PlayViewQueryParams;\n hasProduct: HasProductFunc;\n audiences: PresentationAudience[];\n imageCdnUrl: string;\n shareId?: string;\n canManageVideoAccess: boolean;\n pointsOfInterest?: PointOfInterest[];\n featureAccess: VideoFeaturesHash;\n tableOfContentsId: string;\n shouldShowSideTableOfContents: boolean;\n isPlugin: boolean;\n breadcrumbs?: Breadcrumb[];\n}\n\nexport function PlayClipV2(props: PlayClipV2Props): JSX.Element {\n const playerContext = usePlayerContext();\n\n const { hasPermissions } = usePermissions();\n const { canConsume } = VideoHelper.getCanBeConsumed(props.clip);\n \n const {\n tableOfContentsActiveId,\n setTableOfContentsActiveId,\n controlledId,\n setControlledId,\n tableOfContentsExpanded,\n onToggleTableOfContents\n } = usePlayPageTableOfContent(props.tableOfContentsId);\n\n const hasGlance = hasGlanceData(props.clip) && props.featureAccess.canViewGlance;\n\n const { headingRef, headingElements } = useSectionHeadings(hasGlance);\n const items = headingElements.map(ele => {\n return {\n id: ele.id as PlayPageAnchor,\n name: PlayPageUtils.getSectionHeading(\n ele.id as PlayPageAnchor,\n {\n clips: props.clips,\n interactives: props.interactives,\n resources: props.clip.resources?.data,\n isPlayClipPage: true\n }\n )\n };\n });\n\n useTableOfContentsActiveHeading({\n setActiveId: setTableOfContentsActiveId,\n headingElements,\n controlledId,\n setControlledId\n });\n\n useTableOfContentsScroll(headingElements, controlledId);\n\n const isArchived = VideoHelper.isVideoTypeArchived(props.clip);\n const hasStudentExperience = hasPermissions(PermissionName.StudentExperience);\n /**\n * Need to use a ref because if we use state, onExitImmersiveReader will have a stale\n * reference of the state. This is because the state is changed in onLaunchImmersiveReader\n * which is passed in at the same time as onExitImmersiveReader\n */\n const shouldPlayOnExitImmersiveReader = React.useRef(false);\n\n function onLaunchImmersiveReader(): void {\n shouldPlayOnExitImmersiveReader.current = !playerContext?.playerRef?.current?.isPaused();\n playerContext?.playerRef?.current?.pause();\n }\n\n function onExitImmersiveReader(): void {\n if (!shouldPlayOnExitImmersiveReader.current)\n return;\n\n playerContext?.playerRef?.current?.play();\n }\n\n function canAccessOriginal(): boolean {\n if (!props.originalVideo || !props.clip._canBeConsumed?.value)\n return false;\n\n if (!props.currentUser?.isAuthenticated)\n return false;\n\n if (!props.hasProduct(ProductId.Primary))\n return false;\n\n if (hasStudentExperience)\n return false;\n\n return true;\n }\n\n function getOriginalVideoAppLink(): Core.AppLink {\n if (!canAccessOriginal())\n return null;\n \n return {\n application: AppChannels.VIDEOS,\n action: Actions.Videos.PLAY_VIDEO,\n args: [ props.originalVideo.id, TextHelper.slugify(props.originalVideo.name) ]\n };\n }\n\n const showPlayerPlaceholder = playerContext.mode === 'picture-in-picture' || props.featureAccess.canViewPublicLayout;\n\n const otherClips = props.clips?.filter(c => c.id.toString() !== props.clip.id.toString()) ?? [];\n\n function getMainClassName() {\n if (props.shouldShowSideTableOfContents && tableOfContentsExpanded) {\n return `${styles.expandedToc} col-9`;\n }\n if (props.shouldShowSideTableOfContents && !tableOfContentsExpanded)\n return 'pe-4';\n }\n\n return (\n <div className={`px-4 play-page-sections-container ${props.shouldShowSideTableOfContents ? 'row g-0' : ''}`}>\n <main className={`${styles.main} ${getMainClassName()}`}>\n {!!props.breadcrumbs?.length &&\n <div className='mb-2'>\n <Breadcrumbs breadcrumbs={props.breadcrumbs} />\n </div>\n }\n\n <RestrictionBanner\n restrictions={props.clip._restrictions}\n yearGroups={props.yearGroups}\n objectId={props.clip.id}\n objectTypeId={MasterType.Clip}\n canManageVideoAccess={props.canManageVideoAccess}\n />\n\n {isArchived && (\n <ArchivedBanner\n typeId={props.clip.typeId}\n hasStudentExperience={hasStudentExperience}\n />\n )}\n\n <section\n id={PlayPageAnchor.Video}\n className={`mb-2 ${SeoConstants.GLOBAL_PLAYER_SELECTOR}`}\n ref={el => { (el && headingRef?.current) && headingRef.current.set(PlayPageAnchor.Video, el); }}\n >\n {canConsume && (\n <GlobalPlayerConsumer\n key={props.clip.id}\n objectId={props.clip.id}\n objectTypeId={props.clip.typeId}\n shareId={props.shareId}\n context={props.queryParams?.context}\n contextId={props.queryParams?.contextId}\n moviesAndTv={props.queryParams?.mtv}\n playNext={props.queryParams?.playNext}\n startTime={props.queryParams?.t ?? props.queryParams?.startTime}\n mode='default'\n location='play-page'\n />\n )}\n <div className={showPlayerPlaceholder ? '' : 'd-none'}>\n <PlayerPlaceholder\n video={props.clip}\n type='pip'\n />\n </div>\n </section>\n\n <PlayPageTitleAndActions\n media={props.clip}\n yearGroups={props.yearGroups}\n audiences={props.audiences}\n originalVideoAppLink={getOriginalVideoAppLink()}\n featureAccess={props.featureAccess}\n shareId={props.shareId}\n />\n\n {/* if no glance render video details here */}\n {hasGlance ? (\n <VideoAtAGlanceV2\n video={props.clip}\n pointsOfInterest={props.pointsOfInterest}\n setStartTime={(time: number) => playerContext.playerRef.current?.currentTime(time)}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n canViewGlance={hasGlance}\n />\n ) : (\n <VideoDetailsWithScrollbarV2\n video={props.clip}\n currentUser={props.currentUser}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n headingRef={headingRef}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n />\n )}\n\n <PlayPageResources\n video={props.clip}\n canViewResources={props.featureAccess.canViewResourceItems}\n imageCdnUrl={props.imageCdnUrl}\n getAppLink={\n getResourceAppLink(props.clip.id, props.shareId, props.featureAccess.canViewResourceItems)\n }\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n resourceThumbnailFallbackUrl={ImageUrls.Fallbacks.RESOURCE_THUMBNAIL}\n headingRef={headingRef}\n />\n\n <PlayPageInteractives\n video={props.clip}\n interactives={props.interactives}\n imageCdnUrl={props.imageCdnUrl}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n canViewInteractives={props.featureAccess.canViewInteractives}\n headingRef={headingRef}\n yearGroups={props.yearGroups}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n isPlugin={props.isPlugin}\n />\n\n <PlayPageClips\n clips={otherClips || []}\n video={props.clip}\n canViewClips={props.featureAccess.canViewClips}\n yearGroups={props.yearGroups}\n audiences={props.audiences}\n imageCdnUrl={props.imageCdnUrl}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n headingRef={headingRef}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n isPlugin={props.isPlugin}\n />\n\n {/* if has glance, render video details here */}\n {hasGlance && (\n <VideoDetailsWithScrollbarV2\n video={props.clip}\n currentUser={props.currentUser}\n onLaunchImmersiveReader={onLaunchImmersiveReader}\n onExitImmersiveReader={onExitImmersiveReader}\n getTagAppLink={tag => ({\n application: AppChannels.SEARCH,\n action: Actions.Search.HOME,\n params: { tagOrClassification: tag.name }\n })}\n headingRef={headingRef}\n suppressInteractivity={props.featureAccess.canViewPublicLayout}\n showHeading\n />\n )}\n \n {!!canAccessOriginal() && (\n <ClippedFrom\n originalVideo={props.originalVideo}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n yearGroups={props.yearGroups}\n shareId={props.shareId}\n queryParams={props.queryParams}\n audiences={props.audiences}\n headingRef={headingRef}\n isPlugin={props.isPlugin}\n getClassroomGuideAppLink={VideoAppLinkHelper.getClassroomGuideAppLink}\n getInteractiveGuidanceAppLink={VideoAppLinkHelper.getInteractiveGuidanceAppLink}\n getResourceGuidanceAppLink={VideoAppLinkHelper.getResourceGuidanceAppLink}\n />\n )}\n\n <RelatedVideos\n currentVideo={props.clip}\n yearGroups={props.yearGroups}\n relatedVideos={props.relatedVideos}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n currentUser={props.currentUser}\n audiences={props.audiences}\n getVideoAppLink={(v, opts) => VideoAppLinkHelper.getAppLink(v, {\n ...opts,\n context: props.queryParams.context,\n contextId: props.queryParams.contextId,\n playNext: props.queryParams.playNext,\n shareId: props.shareId,\n moviesAndTv: props.queryParams.mtv\n })}\n moviesAndTv={props.queryParams.mtv}\n isPlugin={props.isPlugin}\n />\n\n </main>\n\n <TableOfContentsContainer\n isExpanded={tableOfContentsExpanded}\n setIsExpanded={onToggleTableOfContents}\n items={items}\n activeId={tableOfContentsActiveId}\n setControlledId={setControlledId}\n analyticsData={{ clipId: props.clip.id, clipName: props.clip.name }}\n showInSide={props.shouldShowSideTableOfContents}\n />\n \n </div>\n );\n}"],"names":["defaultErrors","notFound","forbidden","rating","yearLevel","region","privacy","badRequest","handleHttpError","info","customErrorMap","ignoreMap","statusCode","status","errorMap","generateCacheKey","flightObjs","map","obj","join","useHandleObjectError","_flightObjs","customErrors","ignoreErrors","Array","isArray","useEffect","forEach","DEFAULT_PARTIAL_LOADING_OPTIONS","numItems","minWidth","maxWidth","PartialLoadingHelper","getPartialLoadingItems","options","opts","width","Math","max","floor","random","usePresentationAudiences","redirectOnError","activePresentation","getFallbackPresentation","presentation","id","getPhrase","clipErrors","PlayClipViewV2","props","queryParams","context","contextId","mtv","hasProduct","u","setFavourite","canFavourite","hasPermissions","isPlugin","currentUser","config","clip","interactives","video","data","_parentVideo","childClips","strippedClip","relatedVideos","moviesAndTv","audiences","yearGroups","isAuthenticated","customerId","shouldShowSideTableOfContents","pointsOfInterest","featureAccess","breadcrumbs","name","content","phraseContext","phraseHandler","titlePhrase","descriptionPhrase","videos","app","hasCompleted","clips","originalVideo","imageCdnUrl","canManageVideoAccess","items","tableOfContentsId","tocId","defaultProps","namespace","ClippedFrom","usePermissions","videoActions","useVideoActions","location","className","PlayPageAnchor","ref","el","headingRef","current","set","Text","phrase","VideoActionsContext","value","VideoList","getVideoAppLink","v","VideoAppLinkHelper","playNext","shareId","presentationAudiences","getPreviewQuestionsAppLink","interactive","InteractiveHelper","getClassroomGuideAppLink","getInteractiveGuidanceAppLink","getResourceGuidanceAppLink","getResourceAppLink","videoId","canViewResource","resource","application","action","args","params","PlayClipV2","playerContext","canConsume","VideoHelper","usePlayPageTableOfContent","tableOfContentsActiveId","setTableOfContentsActiveId","controlledId","setControlledId","tableOfContentsExpanded","onToggleTableOfContents","hasGlance","canViewGlance","useSectionHeadings","headingElements","ele","resources","isPlayClipPage","useTableOfContentsActiveHeading","setActiveId","useTableOfContentsScroll","isArchived","hasStudentExperience","PermissionName","shouldPlayOnExitImmersiveReader","onLaunchImmersiveReader","playerRef","isPaused","pause","onExitImmersiveReader","play","canAccessOriginal","_canBeConsumed","ProductId","showPlayerPlaceholder","mode","canViewPublicLayout","otherClips","filter","c","toString","length","Breadcrumbs","RestrictionBanner","restrictions","_restrictions","objectId","objectTypeId","MasterType","ArchivedBanner","typeId","SeoConstants","GlobalPlayerConsumer","key","startTime","t","PlayerPlaceholder","type","PlayPageTitleAndActions","media","originalVideoAppLink","TextHelper","VideoAtAGlanceV2","setStartTime","time","currentTime","getTagAppLink","tag","tagOrClassification","suppressInteractivity","PlayPageResources","canViewResources","canViewResourceItems","getAppLink","analyticsData","clipId","clipName","resourceThumbnailFallbackUrl","ImageUrls","PlayPageInteractives","canViewInteractives","PlayPageClips","canViewClips","showHeading","RelatedVideos","currentVideo","TableOfContents","isExpanded","setIsExpanded","activeId","showInSide"],"sourceRoot":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scripts/4013-3070636adb-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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ZggB,GAAA,UACA5J,EAAemE,EAAA,qBACf,CAAE,SAAU,yBAEb,CACD0F,SAAUH,EAAS/f,KACnB+f,SAAUA,EAASnO,QACnB1Q,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,EA0GOjO,kBAAmBnV,EAAMwc,YAAY/N,MACrCiK,WAAYA,GAAW3V,KACvBiW,UAAW+F,GAAA,UACX9H,YAAajX,EAAMwc,YAAYoE,IAC/BlL,cAAeA,GACf8B,aAAcA,EAAazU,KAC3B+V,MAAOiG,GAAA,UACP3L,2BAA4BA,GAC5BC,wBAAyBA,GACzB1Q,IAAKsJ,EAAA,oBAA+BC,EAAenJ,KAAM/C,EAAMge,YAE/DvE,SAAUA,EACV1C,SAAUA,MApDT,gBAACmE,GAA8B,KAyD1C,oCE7XA,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}>•</span>;\n\ninterface ClassificationHeaderDetailsProps {\n classification: Classification;\n}\n\nexport function ClassificationHeaderDetails(props: ClassificationHeaderDetailsProps): React.ReactElement {\n const {\n dashboardVideoCount,\n childDashboardVideoCount,\n dashboardResourceCount,\n childDashboardResourceCount,\n childClassificationCount\n } = TopicsHelper.getCounts(props.classification);\n\n const videoCount = dashboardVideoCount + childDashboardVideoCount;\n const resourceCount = dashboardResourceCount + childDashboardResourceCount;\n \n return (\n <p className='mb-n1 font-size-normal fw-normal mt-1'>\n {!!childClassificationCount && (\n <Text\n namespace={namespace}\n phrase='topics'\n options={{ count: childClassificationCount.toLocaleString(), smartCount: childClassificationCount }}\n />\n )}\n\n {!!videoCount && (\n <>\n {childClassificationCount > 0 && <Separator className='mx-2' />}\n <Text\n namespace={namespace}\n phrase='videos'\n options={{ count: videoCount.toLocaleString(), smartCount: videoCount }}\n />\n </>\n )}\n {!!resourceCount && (\n <>\n <Separator className='mx-2' />\n <Text\n namespace={namespace}\n phrase='resources'\n options={{ count: resourceCount.toLocaleString(), smartCount: resourceCount }}\n />\n </>\n )}\n </p>\n );\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { Tooltip } from 'libs/shared/components/tooltip/Tooltip';\nimport { CuratedDashboard, DashboardStatus } from 'libs/shared/interfaces';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nconst namespace = 'subjects.curatedClassificationEmptyState';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface CuratedClassificationEmptyStateProps {\n dashboard: CuratedDashboard;\n imageUrl: string;\n isReadonly: boolean;\n addWidgetApplink?: () => Core.AppLink;\n}\n\nexport function CuratedClassificationEmptyState(props: CuratedClassificationEmptyStateProps): JSX.Element {\n const isArchived = props.dashboard?.status === DashboardStatus.Archived;\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={props.imageUrl} altText={getPhrase('headingForNP')} />\n {!props.isReadonly ? (\n <EmptyState.Heading>\n <Text phrase='headingForNP' />\n </EmptyState.Heading>\n ) : (\n <>\n <EmptyState.Heading>\n <Text namespace={namespace} phrase='headingForCurator' />\n </EmptyState.Heading>\n <EmptyState.Info>\n <Text namespace={namespace} phrase='info' />\n </EmptyState.Info>\n <Tooltip title={isArchived ? LanguageService.getPhrase(namespace, 'archivedCtaTooltip') : ''} spanHack>\n <EmptyState.Cta\n text={LanguageService.getPhrase(namespace, 'add')}\n appLink={props.addWidgetApplink?.()}\n className='btn btn-dark'\n icon={cvSvgLibrary.Plus}\n disabled={isArchived}\n />\n </Tooltip>\n </>\n )}\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"container\":\"k1iOO\",\"mobile\":\"QwoBj\"};","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, HashObject, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { IconButton } from 'libs/shared/components/icon-button/IconButton';\nimport { TableOfContentsList } from 'libs/shared/components/table-of-contents-list/TableOfContentsList';\nimport { CuratedWidget } from 'libs/shared/interfaces';\nimport { ContextService } from 'libs/shared/services/ContextService';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport styles from './table-of-contents.scss';\n\ninterface TableOfContentsContainerProps {\n widgets: CuratedWidget[];\n title: string;\n activeId: string;\n appLink?: Core.AppLink;\n clickable?: boolean;\n analyticsData?: HashObject;\n setControlledId: (arg: string) => void;\n isSmallScreen?: boolean;\n}\ninterface TableOfContentsProps extends TableOfContentsContainerProps {\n getAppLink: (widget: CuratedWidget) => Core.AppLink\n}\n\nfunction TableOfContentsMobile(props: TableOfContentsProps) {\n const [ isExpanded, setIsExpanded ] = React.useState(false);\n\n function logUserAction() {\n const analyticsOptions = {\n actionType: !isExpanded ? UserAction.Open : UserAction.Hide,\n entity: EntityType.TableOfContents,\n location: LocationContext.Dashboard\n };\n\n AnalyticsHelper.logUserAction(props.analyticsData, analyticsOptions);\n }\n\n function onClickIcon() {\n setIsExpanded(!isExpanded);\n logUserAction();\n }\n\n return (\n <div className={`${styles.mobile} d-inline-flex gap-1`}>\n \n {isExpanded && (\n <div className='bg-white px-3 pt-3 pb-2 border border-dark rounded-1 ps-3'>\n <h2 className='h5'>{props.title}</h2>\n <TableOfContentsList\n items={props.widgets.map(widget => (\n { name: widget.name, id: widget.id, tocIndentation: widget.metadata.tocIndentation }\n ))}\n activeId={props.activeId}\n appLink={props.appLink}\n analyticsData={props.analyticsData}\n setControlledId={props.setControlledId}\n getAppLink={props.getAppLink}\n onItemClick={() => setIsExpanded(false)}\n />\n </div>\n )}\n <div className={styles.container}>\n <IconButton\n className='btn btn-outline-dark'\n svgName={cvSvgLibrary.TableOfContents}\n onClick={onClickIcon}\n />\n </div>\n </div>\n );\n}\n\nfunction TableOfContents(props: TableOfContentsProps): JSX.Element {\n return (\n <aside className='col-3 order-1'>\n <div className={`${styles.container} ps-3`}>\n <h2 className='h5'>{props.title}</h2>\n \n <TableOfContentsList\n items={props.widgets.map(widget => (\n { name: widget.name, id: widget.id, tocIndentation: widget.metadata.tocIndentation }\n ))}\n activeId={props.activeId}\n appLink={props.appLink}\n analyticsData={props.analyticsData}\n setControlledId={props.setControlledId}\n getAppLink={props.getAppLink}\n />\n </div>\n </aside>\n );\n}\n\nexport function TableOfContentsContainer(props: TableOfContentsContainerProps): JSX.Element {\n function getAppLink(widget: CuratedWidget): Core.AppLink {\n const currentAppLink = ContextService.getCurrentRoute().appLink;\n \n const params: HashObject = currentAppLink.params\n ? { ...(currentAppLink.params as HashObject) }\n : {};\n\n params.tocId = widget.id;\n\n return {\n ...currentAppLink,\n params\n };\n }\n\n return (\n <>\n {!props.isSmallScreen\n ? <TableOfContents {...props} getAppLink={getAppLink} />\n : <TableOfContentsMobile {...props} getAppLink={getAppLink} />\n }\n </>\n );\n}","import React from 'react';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Core } from 'libs/common/core';\n\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\n\nconst namespace = 'subjects.teacherOnlyEmptyState';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface TeacherOnlyEmptyStateProps {\n imageUrl: string;\n ctaAppLink?: () => Core.AppLink;\n}\n\nexport function TeacherOnlyEmptyState(props: TeacherOnlyEmptyStateProps): JSX.Element {\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState>\n <EmptyState.Image src={props.imageUrl} altText={getPhrase('heading')} />\n <EmptyState.Heading>\n <Text phrase='heading' />\n </EmptyState.Heading>\n <EmptyState.Info>\n <Text phrase='info' />\n </EmptyState.Info>\n\n <EmptyState.Cta\n text={getPhrase('cta')}\n appLink={props.ctaAppLink?.()}\n className='btn btn-dark'\n />\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { EntityType, LocationContext, SignUpDescriptors, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { ActionButton } from 'libs/shared/components/actions/ActionButton';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { EmptyState } from 'libs/shared/components/empty-states/EmptyState';\nimport { LanguageNamespaceContext, Text } from 'libs/shared/components/text/Text';\nimport { Classification } from 'libs/shared/interfaces';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nconst namespace = 'subjects.classificationComingSoon';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface ComingSoonProps {\n data: Classification;\n onToggleFollow?: () => void;\n canFollowSubjects: boolean;\n imageUrl: string;\n showFollowButtonSpinner: boolean;\n showSignUp: boolean;\n signUpAppLink: Core.AppLink;\n}\n\nexport function ClassificationComingSoon(props: ComingSoonProps): JSX.Element {\n const isFollowing = !!props.data.followers?.data?.length;\n function onClick(): void {\n props.onToggleFollow?.();\n }\n\n return (\n <LanguageNamespaceContext.Provider value={namespace}>\n <EmptyState className='pt-0'>\n <EmptyState.Image src={props.imageUrl} altText={getPhrase('comingSoon')} />\n\n <EmptyState.Heading>\n <Text phrase='comingSoon' />\n </EmptyState.Heading>\n\n <EmptyState.Info>\n <Text phrase={props.showSignUp ? 'infoAnon' : 'info'} />\n </EmptyState.Info>\n\n {props.canFollowSubjects && (\n <ActionButton\n svgName={isFollowing ? cvSvgLibrary.BellFilled : cvSvgLibrary.Bell}\n onClick={onClick}\n showSpinner={props.showFollowButtonSpinner}\n className={`btn follow-btn me-2 ${isFollowing ? 'btn-outline-dark' : 'btn-dark'}`}\n >\n <Text phrase={isFollowing ? 'following' : 'follow'} />\n </ActionButton>\n )}\n\n {props.showSignUp && !props.canFollowSubjects && (\n <AppLink\n appLink={props.signUpAppLink}\n className='btn btn-dark d-none d-lg-inline-block'\n analyticsOptions={{\n actionType: UserAction.Click,\n location: LocationContext.ClassificationComingSoon,\n entity: EntityType.AppLink,\n workflowPhase: WorkflowPhase.Start,\n descriptor: SignUpDescriptors.SignUp\n }}\n analyticsData={{}}\n tag='button'\n >\n {getPhrase('signUp')}\n </AppLink>\n )}\n </EmptyState>\n </LanguageNamespaceContext.Provider>\n );\n}\n","import * as React from 'react';\n\nimport { StorageType } from 'libs/common/backbone/utils/LocalStorageHelper';\nimport { Core } from 'libs/common/core';\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\nimport { ObjectHelper } from 'libs/common/react/utils/ObjectHelper';\n\nimport { AudienceItem } from 'libs/shared/apps/subjects/components/audience-item/AudienceItem';\nimport { DivButton } from 'libs/shared/components/div-button/DivButton';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { Tooltip } from 'libs/shared/components/tooltip/Tooltip';\nimport { SharedViewModelKeys } from 'libs/shared/constants/SharedViewModelKeys';\nimport { PresentationAudience } from 'libs/shared/interfaces';\nimport { PartialLoadingHelper } from 'libs/shared/utils/PartialLoadingHelper';\n\nconst namespace = 'subjects.audienceFilter';\n\ninterface AudienceFilterProps {\n audiences: PresentationAudience[];\n activeAudiences?: PresentationAudience[];\n disabled?: boolean;\n appLink: Core.AppLink;\n disablePersist?: boolean;\n tooltip?: string;\n}\n\nexport function AudienceFilter(props: AudienceFilterProps): React.ReactElement {\n const { audiences, activeAudiences, appLink } = props;\n\n const isDisabled = props.disabled || !appLink;\n\n const [ , setActiveAudiences ] = useViewModel<PresentationAudience[]>(\n SharedViewModelKeys.AUDIENCE_FILTER,\n undefined,\n { storage: StorageType.SessionStorage }\n );\n\n React.useEffect(() => {\n if (!props.disablePersist)\n setActiveAudiences(activeAudiences);\n }, [activeAudiences]);\n\n function onToggleAudience(audience: PresentationAudience, isSelected: boolean): void {\n if (isDisabled)\n return;\n\n const activeAudienceNames = isSelected\n ? [ ...(activeAudiences?.map(a => a.name) ?? []), audience.name ]\n : activeAudiences.map(a => a.name).filter(name => name !== audience.name);\n\n const getParams = () => {\n const otherParams = ObjectHelper.omit(appLink.params, ['a']);\n\n if (!activeAudienceNames.length)\n return otherParams;\n\n return Object.assign({}, otherParams, { a: activeAudienceNames });\n };\n\n Core.AppLinkHelper.trigger({\n ...appLink,\n params: getParams()\n }, { replace: true });\n }\n\n function onClickClearAudiences(): void {\n if (isDisabled)\n return;\n\n const params = ObjectHelper.omit(appLink.params, ['a']);\n\n Core.AppLinkHelper.trigger({\n ...appLink,\n params\n }, { replace: true });\n }\n\n if (!audiences || !audiences.length)\n return <></>;\n\n return (\n <Tooltip title={props.tooltip} spanHack>\n <div className='d-flex flex-wrap row-gap-2'>\n {audiences.map((a: PresentationAudience) => (\n <AudienceItem\n key={a.masterId}\n audience={a}\n highlight={!isDisabled && !!activeAudiences?.find(aa => aa.masterId === a.masterId)}\n setAudience={onToggleAudience}\n isDisabled={isDisabled}\n />\n ))}\n {(!isDisabled && !!activeAudiences && !!Object.keys(activeAudiences).length) && (\n <DivButton className='info-link d-inline-block ms-1' onClick={onClickClearAudiences}>\n <Text namespace={namespace} phrase='clear' />\n </DivButton>\n )}\n </div>\n </Tooltip>\n );\n}\n\nconst PARTIAL_AUDIENCES = PartialLoadingHelper.getPartialLoadingItems({ numItems: 6 });\n\nexport const PartialAudienceFilter = () => (\n <div className={'d-flex flex-wrap row-gap-2'}>\n {PARTIAL_AUDIENCES.map(({ width }, idx) => (\n <span\n key={idx}\n className='rounded-pill partial-loading-background me-1'\n dangerouslySetInnerHTML={{ __html: ' ' }}\n style={{ width }}\n />\n ))}\n </div>\n);","import React from 'react';\n\nimport { Core } from 'libs/common/core';\n\nimport { AudienceFilter } from 'libs/shared/apps/subjects/components/audience-filter/AudienceFilter';\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\ninterface ClassificationDashboardAudiencesProps {\n audiences: PresentationAudience[];\n activeAudiences: PresentationAudience[];\n appLink: Core.AppLink;\n disabled: boolean;\n disablePersist: boolean;\n tooltip: string;\n}\n\nexport function ClassificationDashboardAudiences(props: ClassificationDashboardAudiencesProps): JSX.Element {\n return (\n <AudienceFilter\n audiences={props.audiences}\n activeAudiences={props.activeAudiences}\n disabled={props.disabled}\n appLink={props.appLink}\n disablePersist={props.disablePersist}\n tooltip={props.tooltip}\n />\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"curatedTopicTab\":\"CmVlO\",\"tabTransition\":\"rX31t\"};","import React from 'react';\n\nimport { Core } from 'libs/common/backbone/index';\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\n\nimport { EntityType, LocationContext, UserAction } from 'libs/analytics/interfaces';\n\nimport { PillTab, PillTabSelector } from 'libs/shared/components/pill-tab-selector/PillTabSelector';\nimport { 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={(v, opts) => props.appLinks.videoType(v, { ...opts, contextId: videoListWidgetId })}\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, 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): 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 })\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 );\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","v","opts","videoType","contextId","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","video","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":""}
|