@clickview/lite 0.51.4-rc.4 → 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundles.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "appBundle": "bundle-c26ba15832.min.js",
2
+ "appBundle": "bundle-1e1730f25e.min.js",
3
3
  "cssBundle": "lite-app-e013955dce.css",
4
4
  "polyfillBundle": "polyfills-365f92d668.min.js"
5
5
  }
@@ -0,0 +1,2 @@
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[193],{54644:(e,t,n)=>{n.d(t,{v:()=>r});var a=n(97395),r={getContentUpdates:function(e,t,n,r){return{url:a._.urlBuilder("".concat(r||"{gateway}","/v1/discover/content-updates"),{from:t,to:n,limit:6,query:"(videoCollection)"}),publicUrl:a._.urlBuilder("/api/discover/presentations/".concat(e,"/content-updates"),{from:t,to:n,limit:6,query:"(videoCollection)"}),key:"content:updates",normalizeOptions:{namespace:"contentupdates"},formatData:function(e){return e.map((function(e){return{id:e.classificationId,videos:e.videos}}))}}},getClassifications:function(e){return{url:a._.urlBuilder("/api/domain/v1/subjects",{id:e,query:"banner"}),publicUrl:a._.urlBuilder("/api/subjects/classifications",{id:e,query:"banner"}),key:"classifications:".concat(e.join(","))}},getClassification:function(e){return{url:"/api/domain/v1/subjects/".concat(e,"?query=banner"),publicUrl:"/api/subjects/classifications/".concat(e,"?query=banner"),key:"classification:".concat(e)}},getClassificationUpdates:function(e,t,n){return{url:a._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/content-updates"),{from:t,to:n,query:"(videoCollection)"}),publicUrl:a._.urlBuilder("/api/subjects/classifications/".concat(e,"/content-updates"),{from:t,to:n,query:"(videoCollection)"}),key:"classification:update:".concat(e,":").concat(t,":").concat(n)}},getContentUpdateVideos:function(e,t){return{url:a._.urlBuilder("/api/domain/v1/subjects/content-updates/videos",{from:e,to:t,query:"(videoCollection)"}),publicUrl:a._.urlBuilder("/api/subjects/content-updates/videos",{from:e,to:t,query:"(videoCollection)"}),key:"content:update:videos:".concat(e,":").concat(t)}},videos:function(e,t){return{url:"/api/domain/v1/videos?ids=".concat(e.join(","),"&with=(videoCollection)"),key:"videos:by:id:".concat(e.join(",")),success:t}}}},3278:(e,t,n)=>{n.d(t,{z:()=>f});var a=n(32735),r=n(39202),i=n(23481),o=n(65858),l=n(38502),c=n(83345),s=n(40424);const u={pillTab:"bMJM0"};var d="discover.header";function f(e){var t,n,f,p,m,v;if(!e.type)return a.createElement(a.Fragment,null);if(e.type===s.Yv.Learner||e.hasStudentExperience)return a.createElement("div",{className:"py-3"},a.createElement("h1",{className:"h2 mb-0"},a.createElement(c.x,{namespace:d,phrase:"heading"})));var b=[{name:i.T.getPhrase(d,"forYou"),appLink:null===(t=e.appLinks)||void 0===t?void 0:t.forYou,active:"forYou"===e.active,analyticsData:{name:i.T.getPhrase(d,"forYou"),url:r.C$.getHref(null===(n=e.appLinks)||void 0===n?void 0:n.forYou)},analyticsOptions:{actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs}},{name:i.T.getPhrase(d,"whatsNew"),appLink:null===(f=e.appLinks)||void 0===f?void 0:f.whatsNew,active:"whatsNew"===e.active,analyticsData:{name:i.T.getPhrase(d,"whatsNew"),url:r.C$.getHref(null===(p=e.appLinks)||void 0===p?void 0:p.whatsNew)},analyticsOptions:{actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs}}];return e.showCalendar&&b.push({name:i.T.getPhrase(d,"calendar"),appLink:null===(m=e.appLinks)||void 0===m?void 0:m.calendar,active:"calendar"===e.active,analyticsData:{name:i.T.getPhrase(d,"calendar"),url:r.C$.getHref(null===(v=e.appLinks)||void 0===v?void 0:v.calendar)},analyticsOptions:{actionType:o.Vw.Click,entity:o.py.Url,location:o.LZ.MagicTabs}}),a.createElement("div",{className:"py-3 text-center"},a.createElement(l.r,{tabs:b,className:u.pillTab}))}},38502:(e,t,n)=>{n.d(t,{r:()=>d});var a=n(32735),r=n(49985),i=n(36848),o=n(18559),l=n(11607),c=n(83914),s=n(87432);function u(e){return a.createElement(a.Fragment,null,!!e.tab.svgName&&a.createElement("div",{className:e.tab.name?"pe-1":""},a.createElement(c.x,{svgName:e.tab.svgName})),e.tab.name,"number"==typeof e.tab.count&&a.createElement("div",{className:"ps-2"},a.createElement(o.C,{type:o.g.Count,data:e.tab.count})))}function d(e){var t;return a.createElement("nav",{className:null!==(t=e.className)&&void 0!==t?t:"",ref:e.containerRef},a.createElement("ul",{className:"\n list-unstyled d-inline-block m-0 ".concat(s.Z.pillTabSelector,"\n ").concat(e.borderRadius?s.Z.radiusSmall:"","\n ").concat(e.listClassName,"\n ")},e.tabs.map((function(e,t){return a.createElement("li",{className:"\n p-0 ".concat(s.Z.tab," ").concat(e.active?"btn btn-dark":"btn btn-outline-dark","\n ").concat(e.name?s.Z.minWidth:""," ").concat(e.className,"\n "),key:t},e.appLink?a.createElement(i.F,{appLink:e.appLink,analyticsData:e.analyticsData,analyticsOptions:e.analyticsOptions,className:"\n cursor-pointer d-flex align-items-center justify-content-center\n text-decoration-none text-reset px-2 text-nowrap ".concat(s.Z.tabLink,"\n ")},a.createElement(u,{tab:e})):a.createElement(l.L,{className:"\n cursor-pointer d-flex align-items-center justify-content-center\n text-decoration-none text-reset p-2 text-nowrap ".concat(s.Z.tabLink,"\n "),onClick:function(){return function(e){!e.active&&e.onSelect&&(e.onSelect(),e.analyticsData&&e.analyticsOptions&&r.k.logUserAction(e.analyticsData,e.analyticsOptions))}(e)}},a.createElement(u,{tab:e})))}))))}d.defaultProps={borderRadius:"lg"}},74696:(e,t,n)=>{n.d(t,{S:()=>s});var a=n(32735),r=n(68050),i=n(69111),o=n(9977),l=n(79967);const c={partialOptions:"Gufgq",partialName:"SicQQ",partialDescription:"dPGMq",partialThumbnail:"vZrnb",partialDragHandle:"iq73R"};function s(e){return a.createElement("div",{className:"mx-2"},Array(e.numVideos).fill(null).map((function(t,n){return a.createElement("div",{className:"d-flex",key:n},e.allowBulkActions&&a.createElement("div",{className:"form-check pe-3 pe-sm-2 mx-0 mx-md-2"}),a.createElement(u,Object.assign({},e)))})))}function u(e){var t=(0,l.k)(),n="sm"===o.O.getSize(t,"md"),s=e.withReordering&&!t.xs;return a.createElement(r.Z,{className:"".concat(n?"":"py-2"," flex-grow-1")},a.createElement(i.Z,Object.assign({},o.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(n?"pb-2 pe-1":"mb-1 pe-3 pe-md-2")}),a.createElement(r.Z,null,!!s&&a.createElement("div",{className:"d-flex align-items-center justify-content-center col-2"},a.createElement("div",{className:"partial-loading-background ".concat(c.partialDragHandle)})),a.createElement(i.Z,{xs:o.O.getThumbnailColSize(s)},a.createElement("div",{className:"partial-loading-background ".concat(n?"rounded":"rounded-3"," ").concat(c.partialThumbnail)})))),a.createElement(i.Z,Object.assign({},o.O.getDetailsColumns(),{className:n?"pb-2":"px-2"}),a.createElement("div",{className:"partial-loading-background mb-1 ".concat(c.partialName)}),a.createElement("div",{className:"partial-loading-background ".concat(c.partialDescription)})))}s.defaultProps={numVideos:15}},39902:(e,t,n)=>{n.d(t,{f:()=>c});var a=n(32735),r=n(70680),i=n(20354);function o(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function c(e,t){var n,c,s=(n=a.useState([]),c=2,function(e){if(Array.isArray(e))return e}(n)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(n,c)||o(n,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=s[0],d=s[1];a.useEffect((function(){if(null==e?void 0:e.length){var t=function(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||o(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(u);t.push([]),e.forEach((function(e){t.find((function(t){return t.find((function(t){return t===e}))}))||t[t.length-1].push(e)})),d(t.filter((function(e){return e.length})))}}),[e?e.join(","):null]);var f=(0,r.I0)(),p=(0,r.v9)((function(e){return e}));if(a.useEffect((function(){u.forEach((function(e){var n=t(e);i.a.getResponse(p,n.key).shouldFetch&&i.a.fetch(f,n)}))}),[null==u?void 0:u.length]),!(null==u?void 0:u.length))return{items:null,isFetching:!1};var m={},v={};return u.forEach((function(e,n){var a=t(e),r=i.a.getResponse(p,a.key);v[n]=r,r.data&&r.data.forEach((function(e){return m[e.id]=e}))})),{items:Object.keys(v).some((function(e){return!!v[e].data}))?m:null,isFetching:!!Object.keys(v).some((function(e){return v[e].isFetching}))}}},37808:(e,t,n)=>{n.d(t,{aq:()=>v,YW:()=>y});var a=n(32735),r=n(36848),i=n(83345),o=n(80247),l=n(57900),c=n(2948),s=n(10874),u=n(38143),d=n(35223);const f={banner:"B7jhq"};function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}var m="contentUpdates.classificationBanner";function v(e){var t,n,v=e.classification,b=e.backgroundUrl,y=e.followed,h=e.follow,g=e.showFollowSpinner,E=(t=(0,c.D)(u.g.AUDIENCE_FILTER,void 0,{storage:l.Z1.SessionStorage}),n=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];return a.createElement("div",{className:"banner mb-2 d-flex justify-content-between align-items-center rounded ".concat(f.banner),style:{backgroundImage:"url('".concat(b,"')")}},a.createElement(r.F,{className:"text-white text-shadow",appLink:e.getClassificationAppLink(v,E)},a.createElement("h2",{className:"h3 mb-0"},v.name)),e.canFollow&&a.createElement(s.h,{className:"btn follow-btn ".concat(y?"btn-outline-dark":"btn-dark"),svgName:y?d.vn.BellFilled:d.vn.Bell,onClick:function(){return h(v.id,v.name,!y)}},g?a.createElement(o.Z,{as:"span",animation:"border",role:"status",size:"sm"}):a.createElement(i.x,{namespace:m,phrase:y?"following":"follow"})))}var b="playlists.liteClassificationUpdateBreadcrumbs";function y(e){var t=e.classification;return a.createElement(a.Fragment,null,a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb p-0 mb-0"},a.createElement("li",{className:"breadcrumb-item"},a.createElement(r.F,{appLink:e.dashboardAppLink},a.createElement(i.x,{namespace:b,phrase:"dashboard"}))),a.createElement("li",{className:"breadcrumb-item"},a.createElement(r.F,{appLink:e.contentUpdatesAppLink},a.createElement(i.x,{namespace:b,phrase:"whatsNew"}))),a.createElement("li",{className:"breadcrumb-item active","aria-current":"page"},t.name))))}},80004:(e,t,n)=>{n.r(t),n.d(t,{ContentUpdatesView:()=>ee});var a=n(32735),r=n(70680),i=n(23481),o=n(20354),l=n(110),c=n(49985),s=n(65858),u=n(54644),d=n(3278),f=n(36848),p=n(83345),m=n(51365),v=n(16714),b=n(39151),y=n(1666),h=n(61699),g=n(31949),E=n(69883),w=n(39902),k=n(22902),S=n(79612),N=n(40424),C=n(76753),L=n(14070),A=n(97291),j=n(51855),O=n(10671),T=n(27638),x=n(86698),F=n(44110),U=n(85369),P=n(97816),I=n(33192),M=n(13231),B=n(54610),D=n(67453),_=n(10741),Z=n(22490),R=n(37808),V=n(82431),G="contentUpdates.contentUpdatesView";function q(e){var t=e.classification,n=e.videos,r=e.imageCdnUrl,i=e.showMore,o=e.followed,l=(0,k.T)().hasPermissions;if(!t)return a.createElement(a.Fragment,null);var c=D.j.createBannerUrl(t.banner,{fallbackBaseUrl:r,fallbackCategoryName:t.name,type:B.__.Banners},{size:B.h2.Medium,resizeType:B.Nq.Cover});return a.createElement("div",{className:"mb-3"},a.createElement(R.aq,{classification:t,backgroundUrl:c,getClassificationAppLink:e.appLinks.getClassificationAppLink,followed:o,follow:e.follow,canFollow:e.canFollow,showFollowSpinner:e.showFollowSpinner}),a.createElement(M.E4,{videos:n,yearGroups:e.yearGroups,getVideoAppLink:e.appLinks.getVideoAppLink,getSubTextAppLink:function(e){return V.j.getSeriesAppLink(e.series)},setFavourite:e.setFavourite,canFavourite:e.canFavourite,presentationAudiences:e.audiences,hasPermissions:l,getPreviewQuestionsAppLink:function(e){return _.j.getPreviewQuestionsAppLink(e)},isPlugin:e.isPlugin,getClassroomGuideAppLink:Z.W.getClassroomGuideAppLink,getInteractiveGuidanceAppLink:Z.W.getInteractiveGuidanceAppLink,getResourceGuidanceAppLink:Z.W.getResourceGuidanceAppLink}),i&&a.createElement("div",{className:"show-more"},a.createElement(f.F,{className:"info-link",appLink:e.appLinks.getClassificationUpdateAppLink(t)},a.createElement(p.x,{namespace:G,phrase:"showMore",options:{classificationName:t.name}}))))}var Y=n(74696);const $={partialBanner:"bxaA6"};function z(){return a.createElement(a.Fragment,null,Array(4).fill(null).map((function(e,t){return a.createElement("div",{key:t,className:"mb-3"},a.createElement("div",{className:"partial-loading-background mb-2 ".concat($.partialBanner)}),a.createElement(Y.S,null),";")})))}function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}function W(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=H(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!=H(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==H(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}var J=5,K="contentUpdates.contentUpdatesView",X=i.T.encloseNamespace(K);function ee(e){var t,n,i,M,B,D,_,Z=(D=a.useState({}),_=2,function(e){if(Array.isArray(e))return e}(D)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(D,_)||function(e,t){if(e){if("string"==typeof e)return Q(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Q(e,t):void 0}}(D,_)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),R=Z[0],V=Z[1],G=(0,r.I0)(),Y=(0,E.Z)(),$=(0,j.G)().isPlugin,H=(0,k.T)().hasPermissions,ee=H(v.C.FollowSubjects),te=new Date,ne=l.O.format(l.O.endOf(l.O.subtract(te,1,"year"),"day"),"YYYY-MM-DD"),ae=l.O.format(l.O.endOf(te,"day"),"YYYY-MM-DD"),re=o.a.useBasicFetch(b.L.config()),ie=o.a.useBasicFetch(g.N.currentUser()),oe=o.a.useBasicFetch((null===(t=ie.data)||void 0===t?void 0:t.isAuthenticated)&&y.h.yearGroups(ie.data.customerId)),le=(0,x.y)({redirectOnError:!0}).activePresentation;(0,S.M)(C.CG.getDefaultMetadata({title:null==le?void 0:le.name,phraseContext:{phraseHandler:X,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:I.f.getCanonicalLink(),allowIndexing:I.f.allowIndexing(),hrefLang:I.f.getStaticRouteHrefLang(null==le?void 0:le.learningLevel,(function(){return{application:A.O.CONTENT_UPDATES,action:L.e.ContentUpdates.CONTENT_UPDATES}}))}));var ce=u.v.getContentUpdates(null==le?void 0:le.id,ne,ae),se=o.a.useBasicFetch(le&&ce),ue=o.a.useBasicFetch(ee&&h.o.mySubjectPreferences()),de=(0,F.i)(),fe=[],pe=[];se.data&&se.data.forEach((function(e){fe.push(e.id),pe=pe.concat(e.videos)}));var me=(0,w.f)(fe,(function(e){return u.v.getClassifications(e)})).items,ve=(0,O._)({location:O.i.VideoItem});(0,P.V)(pe,{flightNamespace:null===(n=ce.normalizeOptions)||void 0===n?void 0:n.namespace});var be=(0,T.u)(s.LZ.VideoThumbnail,null===(i=ce.normalizeOptions)||void 0===i?void 0:i.namespace),ye=be.setFavourite,he=be.canFavourite;function ge(e,t,n){V((function(t){return Object.assign(Object.assign({},t),W({},e,!0))}));var a=function(){var a;V((function(t){return Object.assign(Object.assign({},t),W({},e,!1))})),c.k.logUserAction({id:e,name:t},{location:s.LZ.ContentUpdatesClassificationBanner,workflowPhase:s.eu.Complete,descriptor:n?s.DL.On:s.DL.Off,actionType:s.Vw.Follow,entity:s.py.Classification}),Y.success(X(n?"followed":"unfollowed",{classification:null===(a=me[e])||void 0===a?void 0:a.name,escapeText:!0}))},r=function(){V((function(t){return Object.assign(Object.assign({},t),W({},e,!1))})),Y.error(X("error"))},i=n?h.o.followSubjects([e],a,r):h.o.unfollowSubjects([e],a,r);o.a.fetch(G,i)}var Ee=(0,U.N)(),we=Ee.showCalendar,ke=Ee.isLoading,Se=!(!(se.hasCompleted&&re.hasCompleted&&de.hasCompleted)||ee&&!ue.hasCompleted||!me||ke),Ne=function(e,t){return e&&t?e.map((function(e){return{showMore:e.videos.length>J,classification:t[e.id],videos:e.videos.slice(0,J).map((function(e){return e.classification=t[e.id],e})).filter((function(e){return e}))}})).filter((function(e){return e.classification})):null}(se.data,me),Ce=null!==(B=null===(M=ue.data)||void 0===M?void 0:M.map((function(e){return e.id})))&&void 0!==B?B:[],Le=H(v.C.ManageSubjectPreferences),Ae=H(v.C.ManageVideoAccess);return a.createElement(m.M.Provider,{value:ve},a.createElement("div",{className:"bg-white px-3"},!ke&&a.createElement(d.z,{type:N.Yv.Staff,appLinks:{forYou:e.appLinks.dashboardAppLink,whatsNew:e.appLinks.whatsNewAppLink,calendar:e.appLinks.calendarAppLink},showCalendar:we,active:"whatsNew"}),a.createElement("h1",null,a.createElement(p.x,{namespace:K,phrase:"heading"})),(Le||Ae)&&a.createElement("p",null,Le&&a.createElement(a.Fragment,null,a.createElement(p.x,{namespace:K,phrase:"onlyRelevant"})," ",a.createElement(f.F,{className:"info-link",appLink:{application:A.O.SETTINGS,action:L.e.Settings.TOPIC_PREFERENCES}},a.createElement(p.x,{namespace:K,phrase:"updatePreferences"}))),Ae&&a.createElement("span",{className:"d-block"},a.createElement(f.F,{className:"info-link",appLink:{application:A.O.SETTINGS,action:L.e.Settings.CONTENT_REVIEW}},a.createElement(p.x,{namespace:K,phrase:"contentReview"})))),Se?a.createElement(a.Fragment,null,Ne.map((function(t,n){var r,i;return a.createElement(q,{key:n,classification:t.classification,videos:t.videos,yearGroups:oe.data,imageCdnUrl:re.data.imageCdnUrl,showMore:t.showMore,appLinks:e.appLinks,followed:Ce.includes(null===(r=t.classification)||void 0===r?void 0:r.id),follow:ge,showFollowSpinner:R[null===(i=t.classification)||void 0===i?void 0:i.id],canFollow:ee,setFavourite:ye,canFavourite:he,audiences:de.data,isPlugin:$})}))):a.createElement(z,null)))}},44110:(e,t,n)=>{n.d(t,{i:()=>o});var a=n(20354),r=n(89454),i=n(86698),o=function(){var e=(0,i.y)({redirectOnError:!0}),t=e.activePresentation,n=e.getFallbackPresentation,o=t||n();return a.a.useBasicFetch(!!o&&r.O.presentationAudiences(o.id))}},85369:(e,t,n)=>{n.d(t,{N:()=>y});var a=n(32735),r=n(35242),i=n(20354),o=n(27022),l=n(72639),c=n(31949),s=n(37802),u=n(87114),d=n(86698);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(e,t)||function(e,t){if(e){if("string"==typeof e)return m(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?m(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function v(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=f(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,"string");if("object"!=f(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==f(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var b=v(v(v(v(v(v({},o.t.AU,[l.p.Level_1]),o.t.US,[l.p.Level_1]),o.t.UK,[l.p.Level_1]),o.t.SCOT,[l.p.Level_1]),o.t.NZ,[]),o.t.GLOBAL,[]);function y(){var e,t=(0,s.r)(null),n=t.hasSpecialEventCalendar,o=t.isLoadingSettings,l=(0,d.y)({redirectOnError:!0}).activePresentation,f=i.a.useBasicFetch(c.N.currentUser()),m=b[null===(e=f.data)||void 0===e?void 0:e.contentRegion],v=u.i.getMappedPresentationLevel(null==l?void 0:l.learningLevel),y=!(null==m?void 0:m.find((function(e){return e.toString()===(null==v?void 0:v.toString())}))),h=!o&&!n,g=p(a.useState(!h&&!y),2),E=g[0],w=g[1],k=p(a.useState(o||!(null==l?void 0:l.id)),2),S=k[0],N=k[1];return a.useEffect((function(){h||y?w(!1):S||w(!0),N(o||!(null==l?void 0:l.id))}),[n,null==l?void 0:l.id,S]),r.h.isDevelopment?{showCalendar:!0,isLoading:!1}:{showCalendar:E,isLoading:S}}},97816:(e,t,n)=>{n.d(t,{V:()=>d});var a=n(32735),r=n(20354),i=n(21750),o=n(31949),l=n(1575),c=n(31908);function s(e,t){if(e){if("string"==typeof e)return u(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function d(e){var t,n,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},f=r.a.useBasicFetch(o.N.currentUser()),p=a.useRef(new Set),m=function(e){return e?Array.isArray(e)?e.filter((function(e){return!!e&&(c.M.isVideo(e)||c.M.isClip(e))})):"data"in e?e.data.filter((function(e){return!!e&&(c.M.isVideo(e)||c.M.isClip(e))})):[]:[]}(e),v=m.map((function(e){return e.id})),b=(t=a.useState([]),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(t,n)||s(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),y=b[0],h=b[1];a.useEffect((function(){if((null==v?void 0:v.length)&&f.hasCompleted){var e=[];v.forEach((function(t){p.current.has(t)||(e.push(t),p.current.add(t))})),e.length&&h((function(t){var n,a=[].concat(function(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t),[l.R.videoMixinAssocs(e,d.flightNamespace)]);return(null===(n=f.data)||void 0===n?void 0:n.isAuthenticated)&&a.push(i.x.hasCurriculumLinks(e,null,d.flightNamespace)),a}))}}),[null==v?void 0:v.length,f.hasCompleted]),r.a.useBasicFetchAll(y)}},87432:(e,t,n)=>{n.d(t,{Z:()=>a});const a={pillTabSelector:"Hdi6o",tab:"RvNxr",minWidth:"GHSz9",radiusSmall:"VhJJa",tabLink:"WFyvo"}},68050:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(95685),r=n.n(a),i=n(32735),o=n(46304),l=n(74512);const c=i.forwardRef((({bsPrefix:e,className:t,as:n="div",...a},i)=>{const c=(0,o.vE)(e,"row"),s=(0,o.pi)(),u=(0,o.zG)(),d=`${c}-cols`,f=[];return s.forEach((e=>{const t=a[e];let n;delete a[e],null!=t&&"object"==typeof t?({cols:n}=t):n=t;const r=e!==u?`-${e}`:"";null!=n&&f.push(`${d}${r}-${n}`)})),(0,l.jsx)(n,{ref:i,...a,className:r()(t,c,...f)})}));c.displayName="Row";const s=c}}]);
2
+ //# sourceMappingURL=193-f08b054631-lite.chunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scripts/193-f08b054631-lite.chunk.js","mappings":"kJAUaA,EAAwB,CACnCC,kBAAiB,SAACC,EAAwBC,EAAcC,EAAYC,GAelE,MAAO,CACLC,IAfU,eAAqB,GAAD,OAAID,GAAiB,YAAW,gCAAgC,CAC9FF,KAAAA,EACAC,GAAAA,EACAG,MAP8B,EAQ9BC,MAAO,sBAYPC,UATgB,eAAqB,+BAAD,OAAgCP,EAAc,oBAAoB,CACtGC,KAAAA,EACAC,GAAAA,EACAG,MAd8B,EAe9BC,MAAO,sBAMPE,IAAK,kBAQLC,iBAAkB,CACh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app/packages/libs/shared/src/apps/discover/components/header/discover-header.scss","file:///app/packages/libs/shared/src/apps/discover/components/header/DiscoverHeader.tsx","file:///app/packages/libs/shared/src/components/pill-tab-selector/PillTabSelector.tsx","file:///app/packages/libs/shared/src/components/video-list/partial-loading/partial-video-list.scss","file:///app/packages/libs/shared/src/components/video-list/partial-loading/PartialVideoList.tsx","file:///app/packages/libs/shared/src/hooks/UseBatchFetch.ts","file:///app/packages/projects/lite/src/apps/content-updates/components/classification-banner/classification-banner.scss","file:///app/packages/projects/lite/src/apps/content-updates/components/classification-banner/ClassificationBanner.tsx","file:///app/packages/projects/lite/src/apps/content-updates/components/classification-update-breadcrumbs/ClassificationUpdateBreadcrumbs.tsx","file:///app/packages/projects/lite/src/apps/content-updates/views/content-updates/components/ContentUpdateClassification.tsx","file:///app/packages/projects/lite/src/apps/content-updates/views/content-updates/partial-loading/partial-content-updates.scss","file:///app/packages/projects/lite/src/apps/content-updates/views/content-updates/partial-loading/PartialContentUpdatesView.tsx","file:///app/packages/projects/lite/src/apps/content-updates/views/content-updates/ContentUpdatesView.tsx","file:///app/packages/projects/lite/src/shared/hooks/usePresentationAudiences.ts","file:///app/packages/projects/lite/src/shared/hooks/useShowCalendar.ts","file:///app/packages/projects/lite/src/shared/hooks/useVideoMixin.ts","file:///app/packages/libs/shared/src/components/pill-tab-selector/pill-tab-selector.scss","file:///app/node_modules/react-bootstrap/esm/Row.js"],"sourcesContent":["import { UrlHelper } from 'libs/common/backbone/utils/UrlHelper';\nimport { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { Video } from 'libs/shared/interfaces';\n\n// Why 6 you ask? Well, we display 5, then we also display a link to \"see all updates for classification\"\n// if there are more than 5. By fetching 6, we can tell if there are more than 5 (api doesn't tell us).\nconst CONTENT_UPDATES_VIDEO_LIMIT = 6;\n\nexport const ContentUpdateRequests = {\n getContentUpdates(presentationId: string, from: string, to: string, gatewayApiUrl?: string): Flight.PublicRequest {\n const url = UrlHelper.urlBuilder(`${gatewayApiUrl || '{gateway}'}/v1/discover/content-updates`, {\n from,\n to,\n limit: CONTENT_UPDATES_VIDEO_LIMIT,\n query: '(videoCollection)'\n });\n\n const publicUrl = UrlHelper.urlBuilder(`/api/discover/presentations/${presentationId}/content-updates`, {\n from,\n to,\n limit: CONTENT_UPDATES_VIDEO_LIMIT,\n query: '(videoCollection)'\n });\n\n return {\n url,\n publicUrl,\n key: 'content:updates',\n /**\n * The namespace here is required so that flight's normaliser doesn't override\n * fully fetched classification objects matching the IDs here.\n * \n * Without this, navigating from content updates to one of the topics in the content updates\n * list, then back to content updates will cause the page to break.\n */\n normalizeOptions: {\n namespace: 'contentupdates'\n },\n formatData: (contentUpdates: HashObject[]) => {\n return contentUpdates.map(contentUpdate => {\n // Change id field here to make normalization in Flight easier\n return {\n id: contentUpdate.classificationId,\n videos: contentUpdate.videos\n };\n });\n }\n };\n },\n\n getClassifications(ids: string[]): Flight.PublicRequest {\n const url = UrlHelper.urlBuilder('/api/domain/v1/subjects', {\n id: ids,\n query: 'banner'\n });\n\n const publicUrl = UrlHelper.urlBuilder('/api/subjects/classifications', {\n id: ids,\n query: 'banner'\n });\n\n return {\n url,\n publicUrl,\n key: `classifications:${ids.join(',')}`\n };\n },\n\n getClassification(id: string): Flight.PublicRequest {\n return {\n url: `/api/domain/v1/subjects/${id}?query=banner`,\n publicUrl: `/api/subjects/classifications/${id}?query=banner`,\n key: `classification:${id}`\n };\n },\n\n getClassificationUpdates(id: string, from: string, to: string): Flight.PublicRequest {\n const url = UrlHelper.urlBuilder(`/api/domain/v1/subjects/${id}/content-updates`, {\n from,\n to,\n query: '(videoCollection)'\n });\n\n const publicUrl = UrlHelper.urlBuilder(`/api/subjects/classifications/${id}/content-updates`, {\n from,\n to,\n query: '(videoCollection)'\n });\n\n return {\n url,\n publicUrl,\n key: `classification:update:${id}:${from}:${to}`\n };\n },\n\n getContentUpdateVideos(from: string, to: string): Flight.PublicRequest {\n return {\n url: UrlHelper.urlBuilder(`/api/domain/v1/subjects/content-updates/videos`, {\n from,\n to,\n query: '(videoCollection)'\n }),\n publicUrl: UrlHelper.urlBuilder(`/api/subjects/content-updates/videos`, {\n from,\n to,\n query: '(videoCollection)'\n }),\n key: `content:update:videos:${from}:${to}`\n };\n },\n\n /**\n * TODO: Delete thise and use the shared video requests\n */\n videos(ids: string[], success?: (data: Video[]) => void): Flight.Request {\n const url = `/api/domain/v1/videos?ids=${ids.join(',')}&with=(videoCollection)`;\n\n return {\n url,\n key: `videos:by:id:${ids.join(',')}`,\n success\n };\n }\n};","// extracted by mini-css-extract-plugin\nexport default {\"pillTab\":\"bMJM0\"};","import React from 'react';\n\nimport { AppLinkHelper } from 'libs/common/backbone/core';\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 { PillTabSelector } from 'libs/shared/components/pill-tab-selector/PillTabSelector';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { DashboardUserType } from 'libs/shared/interfaces';\n\nimport styles from './discover-header.scss';\n\nconst namespace = 'discover.header';\n\nexport interface DiscoverHeaderAppLinks {\n forYou: Core.AppLink;\n whatsNew: Core.AppLink;\n calendar: Core.AppLink;\n}\n\ninterface DiscoverHeaderProps {\n type: DashboardUserType;\n hasStudentExperience?: boolean;\n appLinks?: DiscoverHeaderAppLinks;\n showCalendar: boolean;\n active: keyof DiscoverHeaderAppLinks;\n}\n\nexport function DiscoverHeader(props: DiscoverHeaderProps): JSX.Element {\n if (!props.type)\n return <></>;\n\n if (props.type === DashboardUserType.Learner || props.hasStudentExperience) {\n return (\n <div className='py-3'>\n <h1 className='h2 mb-0'>\n <Text namespace={namespace} phrase='heading' />\n </h1>\n </div>\n );\n }\n\n const tabs = [{\n name: LanguageService.getPhrase(namespace, 'forYou'),\n appLink: props.appLinks?.forYou,\n active: props.active === 'forYou',\n analyticsData: {\n name: LanguageService.getPhrase(namespace, 'forYou'),\n url: AppLinkHelper.getHref(props.appLinks?.forYou)\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n }\n }, {\n name: LanguageService.getPhrase(namespace, 'whatsNew'),\n appLink: props.appLinks?.whatsNew,\n active: props.active === 'whatsNew',\n analyticsData: {\n name: LanguageService.getPhrase(namespace, 'whatsNew'),\n url: AppLinkHelper.getHref(props.appLinks?.whatsNew)\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n }\n }];\n\n if (props.showCalendar) {\n tabs.push({\n name: LanguageService.getPhrase(namespace, 'calendar'),\n appLink: props.appLinks?.calendar,\n active: props.active === 'calendar',\n analyticsData: {\n name: LanguageService.getPhrase(namespace, 'calendar'),\n url: AppLinkHelper.getHref(props.appLinks?.calendar)\n },\n analyticsOptions: {\n actionType: UserAction.Click,\n entity: EntityType.Url,\n location: LocationContext.MagicTabs\n }\n });\n }\n\n return (\n <div className='py-3 text-center'>\n <PillTabSelector\n tabs={tabs}\n className={styles.pillTab}\n />\n </div>\n );\n}","import React from 'react';\n\nimport { Core } from 'libs/common/core';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { 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 p-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 {\"partialOptions\":\"Gufgq\",\"partialName\":\"SicQQ\",\"partialDescription\":\"dPGMq\",\"partialThumbnail\":\"vZrnb\",\"partialDragHandle\":\"iq73R\"};","import React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { VideoListHelper } from 'libs/shared/components/video-list/VideoListHelper';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\n\nimport styles from './partial-video-list.scss';\n\ninterface PartialVideoListProps {\n withReordering?: boolean;\n numVideos?: number;\n allowBulkActions?: boolean;\n}\n\nPartialVideoList.defaultProps = {\n numVideos: 15\n};\n\nexport function PartialVideoList(props: PartialVideoListProps): JSX.Element {\n return (\n <div className='mx-2'>\n {Array(props.numVideos).fill(null).map((_, i) => (\n <div className='d-flex' key={i}>\n {props.allowBulkActions && <div className='form-check pe-3 pe-sm-2 mx-0 mx-md-2' />}\n <PartialVideoItem {...props} />\n </div>\n ))}\n </div>\n );\n}\n\nexport function PartialVideoItem(props: PartialVideoListProps): JSX.Element {\n const breakpoints = useBreakpoints();\n\n const size = VideoListHelper.getSize(breakpoints, 'md');\n const isSmall = size === 'sm';\n\n const withDragHandle = props.withReordering && !breakpoints.xs;\n\n return (\n <Row className={`${isSmall ? '' : 'py-2'} flex-grow-1`}>\n <Col {...VideoListHelper.getThumbnailColumns()} className={`flex-column align-items-flex-start ${isSmall ? `pb-2 pe-1` : 'mb-1 pe-3 pe-md-2'}`}>\n <Row>\n {!!withDragHandle && (\n <div className='d-flex align-items-center justify-content-center col-2'>\n <div className={`partial-loading-background ${styles.partialDragHandle}`} />\n </div>\n )}\n <Col xs={VideoListHelper.getThumbnailColSize(withDragHandle)}>\n <div className={`partial-loading-background ${isSmall ? 'rounded' : 'rounded-3'} ${styles.partialThumbnail}`} />\n </Col>\n </Row>\n </Col>\n <Col {...VideoListHelper.getDetailsColumns()} className={isSmall ? 'pb-2' : 'px-2'}>\n <div className={`partial-loading-background mb-1 ${styles.partialName}`} />\n <div className={`partial-loading-background ${styles.partialDescription}`} />\n </Col>\n </Row>\n );\n}\n\n","import React from 'react';\nimport { useDispatch, useSelector } from 'react-redux';\n\nimport { Flight } from 'libs/common/flight';\nimport { ApplicationState, HashObject } from 'libs/common/react/interfaces';\n\nimport { BaseObject } from 'libs/shared/interfaces';\n\nexport interface UseBatchFetchResult<T extends BaseObject> {\n items: { [key: string]: T} | null;\n isFetching: boolean;\n}\n\n/**\n * Used to fetch multiple items by id with Flight. Will fetch 25 items at a time firing off multiple\n * requests if there are more than 25 items.\n * This will return items as null until we have all our items. Items will be returned as an object with\n * their ids as they key for easy mapping\n * \n * @param itemIds \n * @param getRequest \n */\nexport function useBatchFetch<T extends BaseObject>(\n itemIds: string[],\n getRequest: (ids: string[]) => Flight.Request\n): UseBatchFetchResult<T> {\n const [ idBatches, setIdBatches ] = React.useState<string[][]>([]);\n\n React.useEffect(() => {\n if (!itemIds?.length)\n return;\n\n const newBatches = [...idBatches];\n newBatches.push([]);\n\n itemIds.forEach(id => {\n if (newBatches.find(batch => batch.find(_id => _id === id)))\n return;\n\n newBatches[newBatches.length - 1].push(id);\n });\n\n setIdBatches(newBatches.filter(batch => batch.length));\n }, [itemIds ? itemIds.join(',') : null]);\n\n const dispatch = useDispatch();\n\n const state = useSelector((state: ApplicationState) => state);\n\n React.useEffect(() => {\n idBatches.forEach(idBatch => {\n const request = getRequest(idBatch);\n const response = Flight.getResponse<T[]>(state, request.key);\n\n if (response.shouldFetch)\n Flight.fetch(dispatch, request);\n });\n }, [idBatches?.length]);\n\n if (!idBatches?.length)\n return { items: null, isFetching: false };\n \n const items: { [key: string]: T} = {};\n\n /* Used locally to only return our items if we've fetched all of them */\n const responses: HashObject<Flight.Response<T[]>> = {};\n \n idBatches.forEach((idBatch, i) => {\n const request = getRequest(idBatch);\n const response = Flight.getResponse<T[]>(state, request.key);\n responses[i] = response;\n\n if (response.data)\n response.data.forEach(v => items[v.id] = v);\n });\n\n return {\n items: Object.keys(responses).some(k => !!responses[k].data) ? items : null,\n isFetching: !!Object.keys(responses).some(k => responses[k].isFetching)\n };\n}","// extracted by mini-css-extract-plugin\nexport default {\"banner\":\"B7jhq\"};","import * as React from 'react';\nimport { Spinner } from 'react-bootstrap';\n\nimport { StorageType } from 'libs/common/backbone/utils/LocalStorageHelper';\nimport { Core } from 'libs/common/core';\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { IconButton } from 'libs/shared/components/icon-button/IconButton';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { SharedViewModelKeys } from 'libs/shared/constants/SharedViewModelKeys';\nimport { Classification, PresentationAudience } from 'libs/shared/interfaces';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport styles from './classification-banner.scss';\n\nconst namespace = 'contentUpdates.classificationBanner';\n\ninterface ClassificationBannerProps {\n classification: Classification;\n backgroundUrl: string;\n getClassificationAppLink: (classification: Classification, activeAudiences: PresentationAudience[]) => Core.AppLink;\n followed: boolean;\n follow: (classificationId: string, classificationName: string, follow: boolean) => void;\n showFollowSpinner: boolean;\n canFollow: boolean;\n}\n\nexport function ClassificationBanner(props: ClassificationBannerProps): JSX.Element {\n const { classification, backgroundUrl, followed, follow, showFollowSpinner } = props;\n\n const [activeAudiences] = useViewModel<PresentationAudience[]>(\n SharedViewModelKeys.AUDIENCE_FILTER,\n undefined,\n { storage: StorageType.SessionStorage }\n );\n\n return (\n <div\n className={`banner mb-2 d-flex justify-content-between align-items-center rounded ${styles.banner}`}\n style={{ backgroundImage: `url('${backgroundUrl}')` }}\n >\n <AppLink className='text-white text-shadow' appLink={props.getClassificationAppLink(classification, activeAudiences)}>\n <h2 className='h3 mb-0'>{classification.name}</h2>\n </AppLink>\n\n {props.canFollow && (\n <IconButton\n className={`btn follow-btn ${followed ? 'btn-outline-dark' : 'btn-dark'}`}\n svgName={followed ? cvSvgLibrary.BellFilled : cvSvgLibrary.Bell}\n onClick={() => follow(classification.id, classification.name, !followed)}\n >\n {showFollowSpinner\n ? <Spinner as='span' animation='border' role='status' size='sm' />\n : <Text namespace={namespace} phrase={followed ? 'following' : 'follow'} />\n }\n </IconButton>\n )}\n </div>\n );\n}\n","import * as React from 'react';\n\nimport { Core } from 'libs/common/core';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { Classification } from 'libs/shared/interfaces';\n\nconst namespace = 'playlists.liteClassificationUpdateBreadcrumbs';\n\ninterface ClassificationUpdateBreadcrumbsProps {\n classification: Classification;\n contentUpdatesAppLink: Core.AppLink;\n dashboardAppLink: Core.AppLink;\n}\n\nexport function ClassificationUpdateBreadcrumbs(\n props: ClassificationUpdateBreadcrumbsProps\n): JSX.Element {\n const { classification } = props;\n\n return (\n <>\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb p-0 mb-0'>\n <li className='breadcrumb-item'>\n <AppLink appLink={props.dashboardAppLink}><Text namespace={namespace} phrase='dashboard' /></AppLink>\n </li>\n <li className='breadcrumb-item'>\n <AppLink appLink={props.contentUpdatesAppLink}><Text namespace={namespace} phrase='whatsNew' /></AppLink>\n </li>\n <li className='breadcrumb-item active' aria-current='page'>{classification.name}</li>\n </ol>\n </nav>\n </>\n );\n}","import * as React from 'react';\n\nimport { ContentUpdateAppLinks, VideoWithClassification } from 'libs/shared/apps/content-updates/interfaces';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { ImageSize, ImageType, ResizeType } from 'libs/shared/enums/Images';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { CanFavouriteFunc, Classification, FavouriteFunc, PresentationAudience, YearGroup } from 'libs/shared/interfaces';\nimport { ImageHelper } from 'libs/shared/utils/ImageHelper';\n\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nimport { ClassificationBanner } from 'apps/content-updates/components';\nimport { SeriesAppLinkHelper } from 'apps/series/SeriesAppLinkHelper';\n\nconst namespace = 'contentUpdates.contentUpdatesView';\n\ninterface ClassificationProps {\n classification: Classification;\n videos: VideoWithClassification[];\n yearGroups: YearGroup[];\n imageCdnUrl: string;\n showMore: boolean;\n appLinks: ContentUpdateAppLinks;\n followed: boolean;\n follow: (classificationId: string, classificationName: string, follow: boolean) => void;\n showFollowSpinner: boolean;\n canFollow: boolean;\n setFavourite: FavouriteFunc;\n canFavourite: CanFavouriteFunc;\n audiences: PresentationAudience[];\n isPlugin: boolean;\n}\n\nexport function ContentUpdateClassification(props: ClassificationProps): JSX.Element {\n const { classification, videos, imageCdnUrl, showMore, followed } = props;\n\n const { hasPermissions } = usePermissions();\n\n if (!classification)\n return <></>;\n \n const url = ImageHelper.createBannerUrl(classification.banner, {\n fallbackBaseUrl: imageCdnUrl,\n fallbackCategoryName: classification.name,\n type: ImageType.Banners\n }, { size: ImageSize.Medium, resizeType: ResizeType.Cover });\n\n return (\n <div className='mb-3'>\n <ClassificationBanner\n classification={classification}\n backgroundUrl={url}\n getClassificationAppLink={props.appLinks.getClassificationAppLink}\n followed={followed}\n follow={props.follow}\n canFollow={props.canFollow}\n showFollowSpinner={props.showFollowSpinner}\n />\n <VideoList\n videos={videos}\n yearGroups={props.yearGroups}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n getSubTextAppLink={video => SeriesAppLinkHelper.getSeriesAppLink(video.series)}\n setFavourite={props.setFavourite}\n canFavourite={props.canFavourite}\n presentationAudiences={props.audiences}\n hasPermissions={hasPermissions}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n isPlugin={props.isPlugin}\n getClassroomGuideAppLink={VideoAppLinkHelper.getClassroomGuideAppLink}\n getInteractiveGuidanceAppLink={VideoAppLinkHelper.getInteractiveGuidanceAppLink}\n getResourceGuidanceAppLink={VideoAppLinkHelper.getResourceGuidanceAppLink}\n />\n {showMore &&\n <div className={'show-more'}>\n <AppLink className='info-link' appLink={props.appLinks.getClassificationUpdateAppLink(classification)}>\n <Text namespace={namespace} phrase='showMore' options={{\n classificationName: classification.name\n }} />\n </AppLink>\n </div>\n }\n </div>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"partialBanner\":\"bxaA6\"};","import React from 'react';\n\nimport { PartialVideoList } from 'libs/shared/components/video-list/partial-loading/PartialVideoList';\n\nimport styles from './partial-content-updates.scss';\n\nexport function PartialContentUpdatesView(): JSX.Element {\n return (\n <>\n {Array(4).fill(null).map((s, i) => (\n <div key={i} className='mb-3'>\n <div className={`partial-loading-background mb-2 ${styles.partialBanner}`} />\n <PartialVideoList />;\n </div>\n ))}\n </>\n );\n}","import * as React from 'react';\nimport { useDispatch } from 'react-redux';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { AnalyticsHelper } from 'libs/analytics/AnalyticsHelper';\nimport { EntityType, LocationContext, ToggleDescriptor, UserAction, WorkflowPhase } from 'libs/analytics/interfaces';\n\nimport { ContentUpdateRequests } from 'libs/shared/apps/content-updates/flight-requests/ContentUpdateRequests';\nimport { ClassificationVideosGrouping, ContentUpdate, ContentUpdateAppLinks } from 'libs/shared/apps/content-updates/interfaces';\nimport { DiscoverHeader } from 'libs/shared/apps/discover/components/header/DiscoverHeader';\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { ConfigRequests } from 'libs/shared/flight-requests/ConfigRequests';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { PreferenceRequests } from 'libs/shared/flight-requests/PreferenceRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { useBatchFetch } from 'libs/shared/hooks/UseBatchFetch';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { Classification, Config, CurrentUser, DashboardUserType, Video, YearGroup } from 'libs/shared/interfaces';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { Actions } from 'shared/constants/LiteActions';\nimport { AppChannels } from 'shared/constants/LiteRadioChannels';\nimport { usePluginHelper } from 'shared/hooks/use-plugin-helper/usePluginHelper';\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { useLiteFavourites } from 'shared/hooks/useLiteFavourites';\nimport { usePresentation } from 'shared/hooks/usePresentation';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useShowCalendar } from 'shared/hooks/useShowCalendar';\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\nimport { SeoHelper } from 'shared/utils/SeoHelper';\n\nimport { ContentUpdateClassification } from './components/ContentUpdateClassification';\nimport { PartialContentUpdatesView } from './partial-loading/PartialContentUpdatesView';\n\nconst INITIAL_VIDEO_COUNT = 5;\nconst namespace = 'contentUpdates.contentUpdatesView';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\nfunction map(\n contentUpdates: ClassificationVideosGrouping[],\n classifications: {[key: string]: Classification}\n): ContentUpdate[] {\n if (!contentUpdates || !classifications)\n return null;\n\n return contentUpdates.map((c): ContentUpdate => {\n return {\n showMore: c.videos.length > INITIAL_VIDEO_COUNT,\n classification: classifications[c.id],\n videos: c.videos.slice(0, INITIAL_VIDEO_COUNT).map((m: any) => {\n m.classification = classifications[m.id];\n return m;\n }).filter(v => v)\n };\n }).filter(v => v.classification);\n}\n\ninterface FollowSpinnersMap {\n [classificationId: string]: boolean;\n}\n\ninterface ContentUpdatesViewProps {\n appLinks: ContentUpdateAppLinks;\n presentationSlug?: string;\n}\n\nexport function ContentUpdatesView(props: ContentUpdatesViewProps): JSX.Element {\n const [ followSpinners, setFollowSpinners ] = React.useState<FollowSpinnersMap>({});\n\n const dispatch = useDispatch();\n const alerts = useAlerts();\n\n const { isPlugin } = usePluginHelper();\n\n const { hasPermissions } = usePermissions();\n const canFollowSubjects = hasPermissions(PermissionName.FollowSubjects);\n\n const date = new Date();\n const from = DateHelper.format(DateHelper.endOf(DateHelper.subtract(date, 1, 'year'), 'day'), 'YYYY-MM-DD');\n const to = DateHelper.format(DateHelper.endOf(date, 'day'), 'YYYY-MM-DD');\n\n const config = Flight.useBasicFetch<Config>(ConfigRequests.config());\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const yearGroups = Flight.useBasicFetch<YearGroup[]>(\n currentUser.data?.isAuthenticated && CustomerRequests.yearGroups(currentUser.data.customerId)\n );\n\n const { activePresentation } = usePresentation({ redirectOnError: true });\n\n useSetPageMetadata(PageMetadataHelper.getDefaultMetadata({\n title: activePresentation?.name,\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n },\n canonicalLink: SeoHelper.getCanonicalLink(),\n allowIndexing: SeoHelper.allowIndexing(),\n hrefLang: SeoHelper.getStaticRouteHrefLang(\n activePresentation?.learningLevel,\n () => ({ application: AppChannels.CONTENT_UPDATES, action: Actions.ContentUpdates.CONTENT_UPDATES })\n )\n }));\n\n const contentUpdatesRequest = ContentUpdateRequests.getContentUpdates(activePresentation?.id, from, to);\n const contentUpdates = Flight.useBasicFetch<ClassificationVideosGrouping[]>(\n activePresentation && contentUpdatesRequest\n );\n const subjectPreferences = Flight.useBasicFetch<Classification[]>(canFollowSubjects &&\n PreferenceRequests.mySubjectPreferences());\n\n const audiences = usePresentationAudiences();\n\n /* Map content update response into list of video ids and classification ids*/\n const classificationIds: string[] = [];\n let videos: Video[] = [];\n contentUpdates.data && contentUpdates.data.forEach(c => {\n classificationIds.push(c.id);\n videos = videos.concat(c.videos);\n });\n\n /* Batch fetch the videos and classifications by id */\n const { items: classifications } = useBatchFetch<Classification>(\n classificationIds,\n (ids: string[]) => ContentUpdateRequests.getClassifications(ids)\n );\n\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem });\n \n useVideoMixin(videos, {\n flightNamespace: contentUpdatesRequest.normalizeOptions?.namespace\n });\n\n const { setFavourite, canFavourite } = useLiteFavourites(\n LocationContext.VideoThumbnail,\n contentUpdatesRequest.normalizeOptions?.namespace\n );\n\n /** Callbacks */\n function onFollow(classificationId: string, classificationName: string, follow: boolean): void {\n setFollowSpinners(currentState => ({\n ...currentState,\n [classificationId]: true\n }));\n\n const onSuccess = () => {\n setFollowSpinners(currentState => ({\n ...currentState,\n [classificationId]: false\n }));\n\n AnalyticsHelper.logUserAction({\n id: classificationId,\n name: classificationName\n }, {\n location: LocationContext.ContentUpdatesClassificationBanner,\n workflowPhase: WorkflowPhase.Complete,\n descriptor: follow ? ToggleDescriptor.On : ToggleDescriptor.Off,\n actionType: UserAction.Follow,\n entity: EntityType.Classification\n });\n\n alerts.success(getPhrase(\n follow ? 'followed' : 'unfollowed',\n { classification: classifications[classificationId]?.name, escapeText: true }\n ));\n };\n\n const onError = () => {\n setFollowSpinners(currentState => ({\n ...currentState,\n [classificationId]: false\n }));\n\n alerts.error(getPhrase('error'));\n };\n\n const request = follow ?\n PreferenceRequests.followSubjects([classificationId], onSuccess, onError) :\n PreferenceRequests.unfollowSubjects([classificationId], onSuccess, onError);\n\n Flight.fetch(dispatch, request);\n }\n\n const { showCalendar, isLoading } = useShowCalendar();\n\n const dataLoaded = !!(\n contentUpdates.hasCompleted &&\n config.hasCompleted &&\n audiences.hasCompleted &&\n (!canFollowSubjects || subjectPreferences.hasCompleted) &&\n classifications &&\n !isLoading\n );\n\n /* Build out array of content updates from our lists of videos and classifications */\n const mappedUpdates = map(contentUpdates.data, classifications);\n const preferredSubjectIds = subjectPreferences.data?.map(subject => subject.id) ?? [];\n\n const managePreferences = hasPermissions(PermissionName.ManageSubjectPreferences);\n const manageVideoAccess = hasPermissions(PermissionName.ManageVideoAccess);\n\n return (\n <VideoActionsContext.Provider value={videoActions}>\n <div className='bg-white px-3'>\n {!isLoading && <DiscoverHeader\n type={DashboardUserType.Staff} // Students never see this page\n appLinks={{\n forYou: props.appLinks.dashboardAppLink,\n whatsNew: props.appLinks.whatsNewAppLink,\n calendar: props.appLinks.calendarAppLink\n }}\n showCalendar={showCalendar}\n active='whatsNew'\n />}\n <h1><Text namespace={namespace} phrase='heading' /></h1>\n {(managePreferences || manageVideoAccess) && (\n <p>\n {managePreferences &&\n <>\n <Text namespace={namespace} phrase='onlyRelevant' />&nbsp;\n <AppLink\n className='info-link'\n appLink={{\n application: AppChannels.SETTINGS,\n action: Actions.Settings.TOPIC_PREFERENCES\n }}\n >\n <Text namespace={namespace} phrase='updatePreferences' />\n </AppLink>\n </>\n }\n {manageVideoAccess &&\n <span className='d-block'>\n <AppLink\n className='info-link'\n appLink={{\n application: AppChannels.SETTINGS,\n action: Actions.Settings.CONTENT_REVIEW\n }}\n >\n <Text namespace={namespace} phrase='contentReview' />\n </AppLink>\n </span>\n }\n </p>\n )}\n\n {dataLoaded ? (\n <>\n {mappedUpdates.map((c: ContentUpdate, key: number) => (\n <ContentUpdateClassification\n key={key}\n classification={c.classification}\n videos={c.videos}\n yearGroups={yearGroups.data}\n imageCdnUrl={config.data.imageCdnUrl}\n showMore={c.showMore}\n appLinks={props.appLinks}\n followed={preferredSubjectIds.includes(c.classification?.id)}\n follow={onFollow}\n showFollowSpinner={followSpinners[c.classification?.id]}\n canFollow={canFollowSubjects}\n setFavourite={setFavourite}\n canFavourite={canFavourite}\n audiences={audiences.data}\n isPlugin={isPlugin}\n />\n ))}\n </>\n ) : (\n <PartialContentUpdatesView />\n )}\n </div>\n </VideoActionsContext.Provider>\n );\n}\n","import { Flight } from 'libs/common/react/index';\n\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\nimport { usePresentation } from 'shared/hooks/usePresentation';\n\nexport const usePresentationAudiences = () => {\n const { activePresentation, getFallbackPresentation } = usePresentation({ redirectOnError: true });\n\n const presentation = activePresentation || getFallbackPresentation();\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n !!presentation &&\n AudienceRequests.presentationAudiences(presentation.id)\n );\n\n return audiences;\n};","import React from 'react';\n\nimport { EnvironmentVariables } from 'libs/common/backbone/services/EnvironmentVariables';\nimport { Flight } from 'libs/common/react/index';\n\nimport { ContentRegion } from 'libs/shared/enums/ContentRegion';\nimport { PresentationLearningLevel } from 'libs/shared/enums/PresentationLearningLevel';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { useSettings } from 'libs/shared/hooks/useSettings';\nimport { CurrentUser } from 'libs/shared/interfaces';\nimport { TopicsHelper } from 'libs/shared/utils/topics-helper/TopicsHelper';\n\nimport { usePresentation } from 'shared/hooks/usePresentation';\n\nconst ALLOWED_LEARNING_LEVELS_BY_REGION: Record<ContentRegion, PresentationLearningLevel[]> = {\n [ContentRegion.AU]: [\n // AU Primary Calendar\n PresentationLearningLevel.Level_1\n ],\n [ContentRegion.US]: [\n // US Elementary Calendar\n PresentationLearningLevel.Level_1\n ],\n [ContentRegion.UK]: [\n // UK Primary Calendar\n PresentationLearningLevel.Level_1\n ],\n [ContentRegion.SCOT]: [\n // Scotland Primary Calendar\n PresentationLearningLevel.Level_1\n ],\n [ContentRegion.NZ]: [],\n [ContentRegion.GLOBAL]: []\n};\n\nexport function useShowCalendar() {\n const { hasSpecialEventCalendar, isLoadingSettings } = useSettings(null);\n\n const {\n activePresentation\n } = usePresentation({ redirectOnError: true });\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n const allowedLearningLevels = ALLOWED_LEARNING_LEVELS_BY_REGION[currentUser.data?.contentRegion];\n const learningLevel = TopicsHelper.getMappedPresentationLevel(activePresentation?.learningLevel);\n const learningLevelCantAccess = !allowedLearningLevels?.find(l => {\n return l.toString() === (learningLevel as PresentationLearningLevel)?.toString();\n });\n\n const noSetting = !isLoadingSettings && !hasSpecialEventCalendar;\n\n const [ showCalendar, setShowCalendar ] = React.useState<boolean>(!noSetting && !learningLevelCantAccess);\n\n const [ isLoading, setIsLoading ] = React.useState(isLoadingSettings || !activePresentation?.id);\n\n React.useEffect(() => {\n if (noSetting || learningLevelCantAccess) {\n setShowCalendar(false);\n } else if (!isLoading) {\n setShowCalendar(true);\n }\n setIsLoading(isLoadingSettings || !activePresentation?.id);\n }, [ hasSpecialEventCalendar, activePresentation?.id, isLoading ]);\n\n if (EnvironmentVariables.isDevelopment)\n return { showCalendar: true, isLoading: false };\n\n return { showCalendar, isLoading };\n}","import React from 'react';\n\nimport { Flight } from 'libs/common/flight';\n\nimport { ClassificationRequests } from 'libs/shared/flight-requests/ClassificationRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { Clip, ClipCollection, CurrentUser, Video, VideoCollection } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\ntype Types = Video[] | VideoCollection | Clip[] | ClipCollection;\n\nfunction getValidObjects(objects: Types): (Video | Clip)[] {\n if (!objects)\n return [];\n\n if (Array.isArray(objects))\n return objects.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n if ('data' in objects)\n return objects.data.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n return [];\n}\n\ninterface VideoMixinOptions {\n /**\n * If the videos that are having new data mixed into are sitting on an explicit Flight namespace,\n * providing that namespace here is required\n */\n flightNamespace?: string;\n}\n\nexport function useVideoMixin(objects: Types, options: VideoMixinOptions = {}): void {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n const hydratedVideos = React.useRef<Set<string>>(new Set<string>());\n\n const videos = getValidObjects(objects);\n\n const videoIds = videos.map(v => v.id);\n\n const [ request, setRequest ] = React.useState<Flight.Request[]>([]);\n\n React.useEffect(() => {\n if (!videoIds?.length || !currentUser.hasCompleted)\n return;\n\n const unhydratedVideos: string[] = [];\n\n videoIds.forEach(id => {\n if (!hydratedVideos.current.has(id)) {\n unhydratedVideos.push(id);\n hydratedVideos.current.add(id);\n }\n });\n \n if (!unhydratedVideos.length)\n return;\n\n setRequest(r => {\n const newRequests = [\n ...r,\n VideoRequests.videoMixinAssocs(unhydratedVideos, options.flightNamespace)\n ];\n\n if (currentUser.data?.isAuthenticated)\n newRequests.push(ClassificationRequests.hasCurriculumLinks(unhydratedVideos, null, options.flightNamespace));\n\n return newRequests;\n });\n }, [ videoIds?.length, currentUser.hasCompleted ]);\n\n Flight.useBasicFetchAll(request);\n}","// extracted by mini-css-extract-plugin\nexport default {\"pillTabSelector\":\"Hdi6o\",\"tab\":\"RvNxr\",\"minWidth\":\"GHSz9\",\"radiusSmall\":\"VhJJa\",\"tabLink\":\"WFyvo\"};","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix, useBootstrapBreakpoints, useBootstrapMinBreakpoint } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Row = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n ...props\n}, ref) => {\n const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'row');\n const breakpoints = useBootstrapBreakpoints();\n const minBreakpoint = useBootstrapMinBreakpoint();\n const sizePrefix = `${decoratedBsPrefix}-cols`;\n const classes = [];\n breakpoints.forEach(brkPoint => {\n const propValue = props[brkPoint];\n delete props[brkPoint];\n let cols;\n if (propValue != null && typeof propValue === 'object') {\n ({\n cols\n } = propValue);\n } else {\n cols = propValue;\n }\n const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';\n if (cols != null) classes.push(`${sizePrefix}${infix}-${cols}`);\n });\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n ...props,\n className: classNames(className, decoratedBsPrefix, ...classes)\n });\n});\nRow.displayName = 'Row';\nexport default Row;"],"names":["ContentUpdateRequests","getContentUpdates","presentationId","from","to","gatewayApiUrl","url","limit","query","publicUrl","key","normalizeOptions","namespace","formatData","contentUpdates","map","contentUpdate","id","classificationId","videos","getClassifications","ids","join","getClassification","getClassificationUpdates","getContentUpdateVideos","success","DiscoverHeader","props","type","hasStudentExperience","className","Text","phrase","tabs","name","LanguageService","appLink","appLinks","forYou","active","analyticsData","analyticsOptions","actionType","entity","location","whatsNew","showCalendar","push","calendar","PillTabSelector","TabContents","tab","svgName","count","data","ref","containerRef","borderRadius","listClassName","index","onClick","onSelect","onSelectTab","defaultProps","PartialVideoList","Array","numVideos","fill","_","i","allowBulkActions","PartialVideoItem","breakpoints","useBreakpoints","isSmall","VideoListHelper","withDragHandle","withReordering","xs","Row","Col","useBatchFetch","itemIds","getRequest","idBatches","setIdBatches","length","newBatches","forEach","find","batch","_id","filter","dispatch","state","idBatch","request","shouldFetch","items","isFetching","responses","response","v","Object","keys","some","k","ClassificationBanner","classification","backgroundUrl","followed","follow","showFollowSpinner","activeAudiences","SharedViewModelKeys","undefined","storage","style","backgroundImage","getClassificationAppLink","canFollow","IconButton","Spinner","as","animation","role","size","ClassificationUpdateBreadcrumbs","dashboardAppLink","contentUpdatesAppLink","ContentUpdateClassification","imageCdnUrl","showMore","hasPermissions","usePermissions","ImageHelper","banner","fallbackBaseUrl","fallbackCategoryName","resizeType","VideoList","yearGroups","getVideoAppLink","getSubTextAppLink","video","SeriesAppLinkHelper","series","setFavourite","canFavourite","presentationAudiences","audiences","getPreviewQuestionsAppLink","interactive","InteractiveHelper","isPlugin","getClassroomGuideAppLink","VideoAppLinkHelper","getInteractiveGuidanceAppLink","getResourceGuidanceAppLink","AppLink","getClassificationUpdateAppLink","options","classificationName","PartialContentUpdatesView","s","INITIAL_VIDEO_COUNT","getPhrase","ContentUpdatesView","followSpinners","setFollowSpinners","alerts","usePluginHelper","canFollowSubjects","PermissionName","date","Date","DateHelper","config","ConfigRequests","currentUser","UserRequests","isAuthenticated","CustomerRequests","customerId","activePresentation","usePresentation","redirectOnError","useSetPageMetadata","PageMetadataHelper","title","phraseContext","phraseHandler","titlePhrase","descriptionPhrase","canonicalLink","SeoHelper","allowIndexing","hrefLang","learningLevel","application","action","contentUpdatesRequest","subjectPreferences","PreferenceRequests","usePresentationAudiences","classificationIds","c","concat","classifications","videoActions","useVideoActions","useVideoMixin","flightNamespace","useLiteFavourites","u","onFollow","currentState","onSuccess","AnalyticsHelper","workflowPhase","descriptor","escapeText","onError","error","useShowCalendar","isLoading","dataLoaded","hasCompleted","mappedUpdates","slice","m","preferredSubjectIds","subject","managePreferences","manageVideoAccess","VideoActionsContext","value","whatsNewAppLink","calendarAppLink","includes","getFallbackPresentation","presentation","ALLOWED_LEARNING_LEVELS_BY_REGION","hasSpecialEventCalendar","isLoadingSettings","allowedLearningLevels","contentRegion","learningLevelCantAccess","l","toString","noSetting","setShowCalendar","setIsLoading","objects","hydratedVideos","Set","isArray","o","getValidObjects","videoIds","setRequest","unhydratedVideos","current","has","add","r","newRequests","bsPrefix","Component","decoratedBsPrefix","minBreakpoint","sizePrefix","classes","brkPoint","propValue","cols","infix","displayName"],"sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[5573],{54644:(e,t,n)=>{n.d(t,{v:()=>r});var a=n(97395),r={getContentUpdates:function(e,t,n,r){return{url:a._.urlBuilder("".concat(r||"{gateway}","/v1/discover/content-updates"),{from:t,to:n,limit:6,query:"(videoCollection)"}),publicUrl:a._.urlBuilder("/api/discover/presentations/".concat(e,"/content-updates"),{from:t,to:n,limit:6,query:"(videoCollection)"}),key:"content:updates",normalizeOptions:{namespace:"contentupdates"},formatData:function(e){return e.map((function(e){return{id:e.classificationId,videos:e.videos}}))}}},getClassifications:function(e){return{url:a._.urlBuilder("/api/domain/v1/subjects",{id:e,query:"banner"}),publicUrl:a._.urlBuilder("/api/subjects/classifications",{id:e,query:"banner"}),key:"classifications:".concat(e.join(","))}},getClassification:function(e){return{url:"/api/domain/v1/subjects/".concat(e,"?query=banner"),publicUrl:"/api/subjects/classifications/".concat(e,"?query=banner"),key:"classification:".concat(e)}},getClassificationUpdates:function(e,t,n){return{url:a._.urlBuilder("/api/domain/v1/subjects/".concat(e,"/content-updates"),{from:t,to:n,query:"(videoCollection)"}),publicUrl:a._.urlBuilder("/api/subjects/classifications/".concat(e,"/content-updates"),{from:t,to:n,query:"(videoCollection)"}),key:"classification:update:".concat(e,":").concat(t,":").concat(n)}},getContentUpdateVideos:function(e,t){return{url:a._.urlBuilder("/api/domain/v1/subjects/content-updates/videos",{from:e,to:t,query:"(videoCollection)"}),publicUrl:a._.urlBuilder("/api/subjects/content-updates/videos",{from:e,to:t,query:"(videoCollection)"}),key:"content:update:videos:".concat(e,":").concat(t)}},videos:function(e,t){return{url:"/api/domain/v1/videos?ids=".concat(e.join(","),"&with=(videoCollection)"),key:"videos:by:id:".concat(e.join(",")),success:t}}}},49935:(e,t,n)=>{n.d(t,{Oo:()=>d,b2:()=>m});var a=n(32735),r=n(36848),i=n(86764),o=n(3747),l=n(5859),c=n(35223),s=n(83914),u=function(e){var t=e.breadcrumb,n=t.name,i=t.appLink,o=t.active,l=e.withBackIcon;return a.createElement("li",{className:"breadcrumb-item".concat(o?" active":"")},o?a.createElement("strong",null,n):a.createElement(r.F,{appLink:i},l&&a.createElement(s.x,{svgName:c.vn.ChevronLeft,size:s.S.Small}),a.createElement("span",{className:l?"ms-2":""},n)))},d=function(e){var t=e.breadcrumbs,n=(0,o.a)(i.r.XS),r=null==t?void 0:t.length;return!r||n&&r<2?a.createElement(a.Fragment,null):n?a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},a.createElement(u,{breadcrumb:t[r-2],withBackIcon:!0}))):a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},t.map((function(e,t){return a.createElement(u,{key:t,breadcrumb:e})}))))},m=a.memo((function(e){var t=e.numItems,n=void 0===t?3:t;return(0,o.a)(i.r.XS)?a.createElement("div",{className:"partial-loading-background",style:{height:"1.3125rem",width:"6rem"}}):a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb m-0 p-0"},l.u.getPartialLoadingItems({numItems:n}).map((function(e,t){var n=e.width;return a.createElement("li",{key:t,className:"breadcrumb-item"},a.createElement("span",{className:"d-inline-block partial-loading-background",style:{width:n},dangerouslySetInnerHTML:{__html:"&nbsp"}}))}))))}))},74696:(e,t,n)=>{n.d(t,{S:()=>s});var a=n(32735),r=n(68050),i=n(69111),o=n(9977),l=n(79967);const c={partialOptions:"Gufgq",partialName:"SicQQ",partialDescription:"dPGMq",partialThumbnail:"vZrnb",partialDragHandle:"iq73R"};function s(e){return a.createElement("div",{className:"mx-2"},Array(e.numVideos).fill(null).map((function(t,n){return a.createElement("div",{className:"d-flex",key:n},e.allowBulkActions&&a.createElement("div",{className:"form-check pe-3 pe-sm-2 mx-0 mx-md-2"}),a.createElement(u,Object.assign({},e)))})))}function u(e){var t=(0,l.k)(),n="sm"===o.O.getSize(t,"md"),s=e.withReordering&&!t.xs;return a.createElement(r.Z,{className:"".concat(n?"":"py-2"," flex-grow-1")},a.createElement(i.Z,Object.assign({},o.O.getThumbnailColumns(),{className:"flex-column align-items-flex-start ".concat(n?"pb-2 pe-1":"mb-1 pe-3 pe-md-2")}),a.createElement(r.Z,null,!!s&&a.createElement("div",{className:"d-flex align-items-center justify-content-center col-2"},a.createElement("div",{className:"partial-loading-background ".concat(c.partialDragHandle)})),a.createElement(i.Z,{xs:o.O.getThumbnailColSize(s)},a.createElement("div",{className:"partial-loading-background ".concat(n?"rounded":"rounded-3"," ").concat(c.partialThumbnail)})))),a.createElement(i.Z,Object.assign({},o.O.getDetailsColumns(),{className:n?"pb-2":"px-2"}),a.createElement("div",{className:"partial-loading-background mb-1 ".concat(c.partialName)}),a.createElement("div",{className:"partial-loading-background ".concat(c.partialDescription)})))}s.defaultProps={numVideos:15}},5859:(e,t,n)=>{function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}n.d(t,{u:()=>i});var r={numItems:5,minWidth:50,maxWidth:100},i={getPartialLoadingItems:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign(Object.assign({},r),t);return(e=Array(n.numItems),function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map((function(){return{width:"".concat(Math.max(Math.floor(Math.random()*n.maxWidth),n.minWidth),"px")}}))}}},37808:(e,t,n)=>{n.d(t,{aq:()=>b,YW:()=>h});var a=n(32735),r=n(36848),i=n(83345),o=n(80247),l=n(57900),c=n(2948),s=n(10874),u=n(38143),d=n(35223);const m={banner:"B7jhq"};function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}var f="contentUpdates.classificationBanner";function b(e){var t,n,b=e.classification,v=e.backgroundUrl,h=e.followed,g=e.follow,y=e.showFollowSpinner,w=(t=(0,c.D)(u.g.AUDIENCE_FILTER,void 0,{storage:l.Z1.SessionStorage}),n=1,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(t,n)||function(e,t){if(e){if("string"==typeof e)return p(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[0];return a.createElement("div",{className:"banner mb-2 d-flex justify-content-between align-items-center rounded ".concat(m.banner),style:{backgroundImage:"url('".concat(v,"')")}},a.createElement(r.F,{className:"text-white text-shadow",appLink:e.getClassificationAppLink(b,w)},a.createElement("h2",{className:"h3 mb-0"},b.name)),e.canFollow&&a.createElement(s.h,{className:"btn follow-btn ".concat(h?"btn-outline-dark":"btn-dark"),svgName:h?d.vn.BellFilled:d.vn.Bell,onClick:function(){return g(b.id,b.name,!h)}},y?a.createElement(o.Z,{as:"span",animation:"border",role:"status",size:"sm"}):a.createElement(i.x,{namespace:f,phrase:h?"following":"follow"})))}var v="playlists.liteClassificationUpdateBreadcrumbs";function h(e){var t=e.classification;return a.createElement(a.Fragment,null,a.createElement("nav",{"aria-label":"breadcrumb"},a.createElement("ol",{className:"breadcrumb p-0 mb-0"},a.createElement("li",{className:"breadcrumb-item"},a.createElement(r.F,{appLink:e.dashboardAppLink},a.createElement(i.x,{namespace:v,phrase:"dashboard"}))),a.createElement("li",{className:"breadcrumb-item"},a.createElement(r.F,{appLink:e.contentUpdatesAppLink},a.createElement(i.x,{namespace:v,phrase:"whatsNew"}))),a.createElement("li",{className:"breadcrumb-item active","aria-current":"page"},t.name))))}},19595:(e,t,n)=>{n.r(t),n.d(t,{ClassificationUpdateView:()=>D});var a=n(32735),r=n(70680),i=n(23481),o=n(20354),l=n(110),c=n(65858),s=n(54644),u=n(13231),d=n(51365),m=n(16714),p=n(1666),f=n(61699),b=n(31949),v=n(69883),h=n(22902),g=n(79612),y=n(76753),w=n(51855),k=n(10671),E=n(27638),A=n(44110),S=n(97816),C=n(10741),N=n(33192),L=n(22490),j=n(37808),x=n(49935),I=n(74696);const O={partialBanner:"DKukI"};function F(){return a.createElement("div",{className:"bg-white px-3"},a.createElement("div",{className:"partial-loading-background mb-2 ".concat(O.partialBanner," rounded")}),a.createElement("div",{className:"mb-1"},a.createElement(x.b2,null)),a.createElement(I.S,null))}var U=n(49985),B="contentUpdates.classificationUpdate",M=i.T.encloseNamespace(B);function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}var P=i.T.encloseNamespace("contentUpdates.classificationUpdate");function D(e){var t,n,x,I,O,D,q,_,G,V,Z=e.classificationId,Y=(0,w.G)().isPlugin,R=(0,r.I0)(),W=(0,v.Z)(),$=(0,E.u)(c.LZ.VideoThumbnail),z=$.setFavourite,H=$.canFavourite,Q=o.a.useBasicFetch(b.N.currentUser()),X=o.a.useBasicFetch((null===(t=Q.data)||void 0===t?void 0:t.isAuthenticated)&&p.h.yearGroups(Q.data.customerId)),K=(G=a.useState(!1),V=2,function(e){if(Array.isArray(e))return e}(G)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(G,V)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?T(e,t):void 0}}(G,V)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),J=K[0],ee=function(e){var t=e.dispatch,n=e.alerts,a=e.setShowFollowSpinner;return{onFollow:function(e,r,l){a(!0);var s=function(){a(!1),U.k.logUserAction({id:e,name:r},{location:c.LZ.ContentUpdatesClassificationBanner,workflowPhase:c.eu.Complete,descriptor:l?c.DL.On:c.DL.Off,actionType:c.Vw.Follow,entity:c.py.Classification}),n.success(M(l?"followed":"unfollowed",{name:r,escapeText:!0}))},u=function(){a(!1),n.error(i.T.getPhrase(B,"error"))},d=l?f.o.followSubjects([e],s,u):f.o.unfollowSubjects([e],s,u);o.a.fetch(t,d)}}}({dispatch:R,alerts:W,setShowFollowSpinner:K[1],currentUser:null==Q?void 0:Q.data}),te=new Date,ne=l.O.format(l.O.endOf(l.O.subtract(te,1,"year"),"day"),"YYYY-MM-DD"),ae=l.O.format(l.O.endOf(te,"day"),"YYYY-MM-DD"),re=(0,h.T)().hasPermissions,ie=re(m.C.FollowSubjects),oe=o.a.useBasicFetch(s.v.getClassification(Z)),le=o.a.useBasicFetch(Q.data&&s.v.getClassificationUpdates(Z,ne,ae)),ce=o.a.useBasicFetch(ie&&f.o.mySubjectPreferences()),se=(0,A.i)();(0,g.M)(y.CG.getDefaultMetadata({title:null===(n=oe.data)||void 0===n?void 0:n.name,phraseContext:{phraseHandler:P,titlePhrase:"pageTitle",descriptionPhrase:"pageDescription"},canonicalLink:N.f.getCanonicalLink(),allowIndexing:N.f.allowIndexing()}));var ue=(0,k._)({location:k.i.VideoItem});(0,S.V)(null!==(I=null===(x=le.data)||void 0===x?void 0:x.videos)&&void 0!==I?I:[]);var de=ce.hasCompleted||!ie;if(!(le.data&&oe.data&&de&&Q.data))return a.createElement(F,null);var me=null!==(D=null===(O=ce.data)||void 0===O?void 0:O.map((function(e){return e.id})))&&void 0!==D?D:[];return a.createElement(d.M.Provider,{value:ue},a.createElement("div",{className:"bg-white px-3"},a.createElement(j.aq,{classification:oe.data,backgroundUrl:null!==(_=null===(q=oe.data.banner)||void 0===q?void 0:q.url)&&void 0!==_?_:"",getClassificationAppLink:e.appLinks.getClassificationAppLink,followed:!!me.find((function(e){return e.toString()===oe.data.id.toString()})),follow:ee.onFollow,showFollowSpinner:J,canFollow:ie}),a.createElement(j.YW,{classification:oe.data,dashboardAppLink:e.appLinks.dashboardAppLink,contentUpdatesAppLink:e.appLinks.whatsNewAppLink}),a.createElement(u.E4,{videos:le.data.videos,yearGroups:X.data,getVideoAppLink:e.appLinks.getVideoAppLink,getSubTextAppLink:function(t){return e.appLinks.getSeriesAppLink(t.series)},setFavourite:z,canFavourite:H,hasPermissions:re,presentationAudiences:se.data,getPreviewQuestionsAppLink:function(e){return C.j.getPreviewQuestionsAppLink(e)},isPlugin:Y,getClassroomGuideAppLink:L.W.getClassroomGuideAppLink,getInteractiveGuidanceAppLink:L.W.getInteractiveGuidanceAppLink,getResourceGuidanceAppLink:L.W.getResourceGuidanceAppLink})))}},44110:(e,t,n)=>{n.d(t,{i:()=>o});var a=n(20354),r=n(89454),i=n(86698),o=function(){var e=(0,i.y)({redirectOnError:!0}),t=e.activePresentation,n=e.getFallbackPresentation,o=t||n();return a.a.useBasicFetch(!!o&&r.O.presentationAudiences(o.id))}},97816:(e,t,n)=>{n.d(t,{V:()=>d});var a=n(32735),r=n(20354),i=n(21750),o=n(31949),l=n(1575),c=n(31908);function s(e,t){if(e){if("string"==typeof e)return u(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function d(e){var t,n,d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},m=r.a.useBasicFetch(o.N.currentUser()),p=a.useRef(new Set),f=function(e){return e?Array.isArray(e)?e.filter((function(e){return!!e&&(c.M.isVideo(e)||c.M.isClip(e))})):"data"in e?e.data.filter((function(e){return!!e&&(c.M.isVideo(e)||c.M.isClip(e))})):[]:[]}(e),b=f.map((function(e){return e.id})),v=(t=a.useState([]),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,r,i,o,l=[],c=!0,s=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(a=i.call(n)).done)&&(l.push(a.value),l.length!==t);c=!0);}catch(e){s=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(s)throw r}}return l}}(t,n)||s(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),h=v[0],g=v[1];a.useEffect((function(){if((null==b?void 0:b.length)&&m.hasCompleted){var e=[];b.forEach((function(t){p.current.has(t)||(e.push(t),p.current.add(t))})),e.length&&g((function(t){var n,a=[].concat(function(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t),[l.R.videoMixinAssocs(e,d.flightNamespace)]);return(null===(n=m.data)||void 0===n?void 0:n.isAuthenticated)&&a.push(i.x.hasCurriculumLinks(e,null,d.flightNamespace)),a}))}}),[null==b?void 0:b.length,m.hasCompleted]),r.a.useBasicFetchAll(h)}},68050:(e,t,n)=>{n.d(t,{Z:()=>s});var a=n(95685),r=n.n(a),i=n(32735),o=n(46304),l=n(74512);const c=i.forwardRef((({bsPrefix:e,className:t,as:n="div",...a},i)=>{const c=(0,o.vE)(e,"row"),s=(0,o.pi)(),u=(0,o.zG)(),d=`${c}-cols`,m=[];return s.forEach((e=>{const t=a[e];let n;delete a[e],null!=t&&"object"==typeof t?({cols:n}=t):n=t;const r=e!==u?`-${e}`:"";null!=n&&m.push(`${d}${r}-${n}`)})),(0,l.jsx)(n,{ref:i,...a,className:r()(t,c,...m)})}));c.displayName="Row";const s=c}}]);
2
+ //# sourceMappingURL=5573-6cd98b69f2-lite.chunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scripts/5573-6cd98b69f2-lite.chunk.js","mappings":"mJAUaA,EAAwB,CACnCC,kBAAiB,SAACC,EAAwBC,EAAcC,EAAYC,GAelE,MAAO,CACLC,IAfU,eAAqB,GAAD,OAAID,GAAiB,YAAW,gCAAgC,CAC9FF,KAAAA,EACAC,GAAAA,EACAG,MAP8B,EAQ9BC,MAAO,sBAYPC,UATgB,eAAqB,+BAAD,OAAgCP,EAAc,oBAAoB,CACtGC,KAAAA,EACAC,GAAAA,EACAG,MAd8B,EAe9BC,MAAO,sBAMPE,IAAK,kBAQLC,iBAAkB,CAChBC,UAAW,kBAEbC,WAAY,SAACC,GACX,OAAOA,EAAeC,KAAI,SAAAC,GAExB,MAAO,CACLC,GAAID,EAAcE,iBAClBC,OAAQH,EAAcG,OAE1B,GACF,EAEJ,EAEAC,mBAAkB,SAACC,GAWjB,MAAO,CACLf,IAXU,eAAqB,0BAA2B,CAC1DW,GAAII,EACJb,MAAO,WAUPC,UAPgB,eAAqB,gCAAiC,CACtEQ,GAAII,EACJb,MAAO,WAMPE,IAAK,mBAAF,OAAqBW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AAgB,WACd,IAAKF,aAAQ,EAARA,EAAU9J,SAAW2E,EAAYgD,aAAtC,CAGA,IAAMsC,EAA6B,GAEnCH,EAASI,SAAQ,SAAAzL,GACV+K,EAAeW,QAAQC,IAAI3L,KAC9BwL,EAAiBI,KAAK5L,GACtB+K,EAAeW,QAAQG,IAAI7L,GAE/B,IAEKwL,EAAiBjK,QAGtBgK,GAAW,SAAAO,G,MACHC,EAAc,GAAH,O,yWAAA,CACZD,GAAC,CACJ,qBAA+BN,EAAkB/H,EAAQuI,mBAM3D,OAHoB,QAAhB,EAAA9F,EAAYG,YAAI,eAAEC,kBACpByF,EAAYH,KAAK,uBAA0CJ,EAAkB,KAAM/H,EAAQuI,kBAEtFD,CACT,GAxBQ,CAyBV,GAAG,CAAEV,aAAQ,EAARA,EAAU9J,OAAQ2E,EAAYgD,eAEnC,qBAAwB3B,EAC1B,C,4FCpEA,MAAMtE,EAAmB,cAAiB,EACxCgJ,WACAjL,YAEA+D,GAAImH,EAAY,SACbhK,GACFiK,KACD,MAAMC,GAAoB,QAAmBH,EAAU,OACjDvJ,GAAc,UACd2J,GAAgB,UAChBC,EAAa,GAAGF,SAChBG,EAAU,GAehB,OAdA7J,EAAY+I,SAAQe,IAClB,MAAMC,EAAYvK,EAAMsK,GAExB,IAAIE,SADGxK,EAAMsK,GAEI,MAAbC,GAA0C,iBAAdA,IAE5BC,QACED,GAEJC,EAAOD,EAET,MAAME,EAAQH,IAAaH,EAAgB,IAAIG,IAAa,GAChD,MAARE,GAAcH,EAAQX,KAAK,GAAGU,IAAaK,KAASD,IAAO,KAE7C,SAAKR,EAAW,CAClCC,IAAKA,KACFjK,EACHlB,UAAW,IAAWA,EAAWoL,KAAsBG,IACvD,IAEJtJ,EAAI2J,YAAc,MAClB,S","sources":["file:///app/packages/libs/shared/src/apps/content-updates/flight-requests/ContentUpdateRequests.ts","file:///app/packages/libs/shared/src/components/breadcrumbs/Breadcrumbs.tsx","file:///app/packages/libs/shared/src/components/video-list/partial-loading/partial-video-list.scss","file:///app/packages/libs/shared/src/components/video-list/partial-loading/PartialVideoList.tsx","file:///app/packages/libs/shared/src/utils/PartialLoadingHelper.ts","file:///app/packages/projects/lite/src/apps/content-updates/components/classification-banner/classification-banner.scss","file:///app/packages/projects/lite/src/apps/content-updates/components/classification-banner/ClassificationBanner.tsx","file:///app/packages/projects/lite/src/apps/content-updates/components/classification-update-breadcrumbs/ClassificationUpdateBreadcrumbs.tsx","file:///app/packages/projects/lite/src/apps/content-updates/views/classification-update/partial-loading/partial-classification-update.scss","file:///app/packages/projects/lite/src/apps/content-updates/views/classification-update/partial-loading/PartialClassificationUpdate.tsx","file:///app/packages/projects/lite/src/apps/content-updates/views/classification-update/ClassificationUpdateViewCallbacks.tsx","file:///app/packages/projects/lite/src/apps/content-updates/views/classification-update/ClassificationUpdateView.tsx","file:///app/packages/projects/lite/src/shared/hooks/usePresentationAudiences.ts","file:///app/packages/projects/lite/src/shared/hooks/useVideoMixin.ts","file:///app/node_modules/react-bootstrap/esm/Row.js"],"sourcesContent":["import { UrlHelper } from 'libs/common/backbone/utils/UrlHelper';\nimport { Flight } from 'libs/common/flight';\nimport { HashObject } from 'libs/common/react/interfaces';\n\nimport { Video } from 'libs/shared/interfaces';\n\n// Why 6 you ask? Well, we display 5, then we also display a link to \"see all updates for classification\"\n// if there are more than 5. By fetching 6, we can tell if there are more than 5 (api doesn't tell us).\nconst CONTENT_UPDATES_VIDEO_LIMIT = 6;\n\nexport const ContentUpdateRequests = {\n getContentUpdates(presentationId: string, from: string, to: string, gatewayApiUrl?: string): Flight.PublicRequest {\n const url = UrlHelper.urlBuilder(`${gatewayApiUrl || '{gateway}'}/v1/discover/content-updates`, {\n from,\n to,\n limit: CONTENT_UPDATES_VIDEO_LIMIT,\n query: '(videoCollection)'\n });\n\n const publicUrl = UrlHelper.urlBuilder(`/api/discover/presentations/${presentationId}/content-updates`, {\n from,\n to,\n limit: CONTENT_UPDATES_VIDEO_LIMIT,\n query: '(videoCollection)'\n });\n\n return {\n url,\n publicUrl,\n key: 'content:updates',\n /**\n * The namespace here is required so that flight's normaliser doesn't override\n * fully fetched classification objects matching the IDs here.\n * \n * Without this, navigating from content updates to one of the topics in the content updates\n * list, then back to content updates will cause the page to break.\n */\n normalizeOptions: {\n namespace: 'contentupdates'\n },\n formatData: (contentUpdates: HashObject[]) => {\n return contentUpdates.map(contentUpdate => {\n // Change id field here to make normalization in Flight easier\n return {\n id: contentUpdate.classificationId,\n videos: contentUpdate.videos\n };\n });\n }\n };\n },\n\n getClassifications(ids: string[]): Flight.PublicRequest {\n const url = UrlHelper.urlBuilder('/api/domain/v1/subjects', {\n id: ids,\n query: 'banner'\n });\n\n const publicUrl = UrlHelper.urlBuilder('/api/subjects/classifications', {\n id: ids,\n query: 'banner'\n });\n\n return {\n url,\n publicUrl,\n key: `classifications:${ids.join(',')}`\n };\n },\n\n getClassification(id: string): Flight.PublicRequest {\n return {\n url: `/api/domain/v1/subjects/${id}?query=banner`,\n publicUrl: `/api/subjects/classifications/${id}?query=banner`,\n key: `classification:${id}`\n };\n },\n\n getClassificationUpdates(id: string, from: string, to: string): Flight.PublicRequest {\n const url = UrlHelper.urlBuilder(`/api/domain/v1/subjects/${id}/content-updates`, {\n from,\n to,\n query: '(videoCollection)'\n });\n\n const publicUrl = UrlHelper.urlBuilder(`/api/subjects/classifications/${id}/content-updates`, {\n from,\n to,\n query: '(videoCollection)'\n });\n\n return {\n url,\n publicUrl,\n key: `classification:update:${id}:${from}:${to}`\n };\n },\n\n getContentUpdateVideos(from: string, to: string): Flight.PublicRequest {\n return {\n url: UrlHelper.urlBuilder(`/api/domain/v1/subjects/content-updates/videos`, {\n from,\n to,\n query: '(videoCollection)'\n }),\n publicUrl: UrlHelper.urlBuilder(`/api/subjects/content-updates/videos`, {\n from,\n to,\n query: '(videoCollection)'\n }),\n key: `content:update:videos:${from}:${to}`\n };\n },\n\n /**\n * TODO: Delete thise and use the shared video requests\n */\n videos(ids: string[], success?: (data: Video[]) => void): Flight.Request {\n const url = `/api/domain/v1/videos?ids=${ids.join(',')}&with=(videoCollection)`;\n\n return {\n url,\n key: `videos:by:id:${ids.join(',')}`,\n success\n };\n }\n};","import * as React from 'react';\n\nimport { Core } from 'libs/common/core';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { MediaQueryStrings } from 'libs/shared/enums/MediaQueries';\nimport { useMediaQuery } from 'libs/shared/hooks/UseMediaQuery';\nimport { PartialLoadingHelper } from 'libs/shared/utils/PartialLoadingHelper';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport { SvgContainer, SvgContainerSize } from '../svg-container/SvgContainer';\n\nexport interface Breadcrumb {\n name: string;\n appLink?: Core.AppLink;\n active?: boolean;\n}\n\ninterface BreadcrumbItemProps {\n breadcrumb: Breadcrumb;\n withBackIcon?: boolean;\n}\n\nexport const BreadcrumbItem = ({ breadcrumb: { name, appLink, active }, withBackIcon }: BreadcrumbItemProps) => (\n <li className={`breadcrumb-item${active ? ' active' : ''}`}>\n {active\n ? <strong>{name}</strong>\n : <AppLink appLink={appLink}>\n {withBackIcon && <SvgContainer svgName={cvSvgLibrary.ChevronLeft} size={SvgContainerSize.Small} />}\n <span className={withBackIcon ? 'ms-2' : ''}>{name}</span>\n </AppLink>\n }\n </li>\n);\n\ninterface BreadcrumbsProps {\n breadcrumbs: Breadcrumb[];\n}\n\nexport const Breadcrumbs = ({ breadcrumbs }: BreadcrumbsProps) => {\n const isMobile = useMediaQuery(MediaQueryStrings.XS);\n\n const length = breadcrumbs?.length;\n\n if (!length || (isMobile && length < 2))\n return <></>;\n\n if (isMobile)\n return (\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb m-0 p-0'>\n <BreadcrumbItem breadcrumb={breadcrumbs[length - 2]} withBackIcon />\n </ol>\n </nav>\n );\n\n return (\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb m-0 p-0'>\n {breadcrumbs.map((b, idx) => <BreadcrumbItem key={idx} breadcrumb={b} />)}\n </ol>\n </nav>\n );\n};\n\nexport const PartialBreadcrumbs = React.memo(function({ numItems = 3 }: { numItems?: number; }) {\n const isMobile = useMediaQuery(MediaQueryStrings.XS);\n\n if (isMobile) {\n return (\n <div className='partial-loading-background' style={{ height: '1.3125rem', width: '6rem' }} />\n );\n }\n\n return (\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb m-0 p-0'>\n {PartialLoadingHelper.getPartialLoadingItems({ numItems }).map(({ width }, idx) => (\n <li key={idx} className='breadcrumb-item'>\n <span className='d-inline-block partial-loading-background' style={{ width }} dangerouslySetInnerHTML={{ __html: '&nbsp' }} />\n </li>\n ))}\n </ol>\n </nav>\n );\n});","// extracted by mini-css-extract-plugin\nexport default {\"partialOptions\":\"Gufgq\",\"partialName\":\"SicQQ\",\"partialDescription\":\"dPGMq\",\"partialThumbnail\":\"vZrnb\",\"partialDragHandle\":\"iq73R\"};","import React from 'react';\nimport { Col, Row } from 'react-bootstrap';\n\nimport { VideoListHelper } from 'libs/shared/components/video-list/VideoListHelper';\nimport { useBreakpoints } from 'libs/shared/hooks/useBreakpoints';\n\nimport styles from './partial-video-list.scss';\n\ninterface PartialVideoListProps {\n withReordering?: boolean;\n numVideos?: number;\n allowBulkActions?: boolean;\n}\n\nPartialVideoList.defaultProps = {\n numVideos: 15\n};\n\nexport function PartialVideoList(props: PartialVideoListProps): JSX.Element {\n return (\n <div className='mx-2'>\n {Array(props.numVideos).fill(null).map((_, i) => (\n <div className='d-flex' key={i}>\n {props.allowBulkActions && <div className='form-check pe-3 pe-sm-2 mx-0 mx-md-2' />}\n <PartialVideoItem {...props} />\n </div>\n ))}\n </div>\n );\n}\n\nexport function PartialVideoItem(props: PartialVideoListProps): JSX.Element {\n const breakpoints = useBreakpoints();\n\n const size = VideoListHelper.getSize(breakpoints, 'md');\n const isSmall = size === 'sm';\n\n const withDragHandle = props.withReordering && !breakpoints.xs;\n\n return (\n <Row className={`${isSmall ? '' : 'py-2'} flex-grow-1`}>\n <Col {...VideoListHelper.getThumbnailColumns()} className={`flex-column align-items-flex-start ${isSmall ? `pb-2 pe-1` : 'mb-1 pe-3 pe-md-2'}`}>\n <Row>\n {!!withDragHandle && (\n <div className='d-flex align-items-center justify-content-center col-2'>\n <div className={`partial-loading-background ${styles.partialDragHandle}`} />\n </div>\n )}\n <Col xs={VideoListHelper.getThumbnailColSize(withDragHandle)}>\n <div className={`partial-loading-background ${isSmall ? 'rounded' : 'rounded-3'} ${styles.partialThumbnail}`} />\n </Col>\n </Row>\n </Col>\n <Col {...VideoListHelper.getDetailsColumns()} className={isSmall ? 'pb-2' : 'px-2'}>\n <div className={`partial-loading-background mb-1 ${styles.partialName}`} />\n <div className={`partial-loading-background ${styles.partialDescription}`} />\n </Col>\n </Row>\n );\n}\n\n","const DEFAULT_PARTIAL_LOADING_OPTIONS: PartialLoadingOptions = {\n numItems: 5,\n minWidth: 50, // px\n maxWidth: 100 // px\n};\n\nexport interface PartialLoadingOptions {\n numItems?: number;\n minWidth?: number;\n maxWidth?: number;\n}\n\ninterface PartialLoadingItem {\n width: string;\n}\n\nexport const PartialLoadingHelper = {\n getPartialLoadingItems(options: PartialLoadingOptions = {}): PartialLoadingItem[] {\n const opts = {\n ...DEFAULT_PARTIAL_LOADING_OPTIONS,\n ...options\n };\n\n const getRandomFilterWidth = () => Math.max(Math.floor(Math.random() * opts.maxWidth), opts.minWidth);\n\n return [...Array(opts.numItems)].map(() => ({ width: `${getRandomFilterWidth()}px` }));\n }\n};","// extracted by mini-css-extract-plugin\nexport default {\"banner\":\"B7jhq\"};","import * as React from 'react';\nimport { Spinner } from 'react-bootstrap';\n\nimport { StorageType } from 'libs/common/backbone/utils/LocalStorageHelper';\nimport { Core } from 'libs/common/core';\nimport { useViewModel } from 'libs/common/react/hooks/UseViewModel';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { IconButton } from 'libs/shared/components/icon-button/IconButton';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { SharedViewModelKeys } from 'libs/shared/constants/SharedViewModelKeys';\nimport { Classification, PresentationAudience } from 'libs/shared/interfaces';\nimport { cvSvgLibrary } from 'libs/shared/utils/SvgHelper';\n\nimport styles from './classification-banner.scss';\n\nconst namespace = 'contentUpdates.classificationBanner';\n\ninterface ClassificationBannerProps {\n classification: Classification;\n backgroundUrl: string;\n getClassificationAppLink: (classification: Classification, activeAudiences: PresentationAudience[]) => Core.AppLink;\n followed: boolean;\n follow: (classificationId: string, classificationName: string, follow: boolean) => void;\n showFollowSpinner: boolean;\n canFollow: boolean;\n}\n\nexport function ClassificationBanner(props: ClassificationBannerProps): JSX.Element {\n const { classification, backgroundUrl, followed, follow, showFollowSpinner } = props;\n\n const [activeAudiences] = useViewModel<PresentationAudience[]>(\n SharedViewModelKeys.AUDIENCE_FILTER,\n undefined,\n { storage: StorageType.SessionStorage }\n );\n\n return (\n <div\n className={`banner mb-2 d-flex justify-content-between align-items-center rounded ${styles.banner}`}\n style={{ backgroundImage: `url('${backgroundUrl}')` }}\n >\n <AppLink className='text-white text-shadow' appLink={props.getClassificationAppLink(classification, activeAudiences)}>\n <h2 className='h3 mb-0'>{classification.name}</h2>\n </AppLink>\n\n {props.canFollow && (\n <IconButton\n className={`btn follow-btn ${followed ? 'btn-outline-dark' : 'btn-dark'}`}\n svgName={followed ? cvSvgLibrary.BellFilled : cvSvgLibrary.Bell}\n onClick={() => follow(classification.id, classification.name, !followed)}\n >\n {showFollowSpinner\n ? <Spinner as='span' animation='border' role='status' size='sm' />\n : <Text namespace={namespace} phrase={followed ? 'following' : 'follow'} />\n }\n </IconButton>\n )}\n </div>\n );\n}\n","import * as React from 'react';\n\nimport { Core } from 'libs/common/core';\n\nimport { AppLink } from 'libs/shared/components/app-link/AppLink';\nimport { Text } from 'libs/shared/components/text/Text';\nimport { Classification } from 'libs/shared/interfaces';\n\nconst namespace = 'playlists.liteClassificationUpdateBreadcrumbs';\n\ninterface ClassificationUpdateBreadcrumbsProps {\n classification: Classification;\n contentUpdatesAppLink: Core.AppLink;\n dashboardAppLink: Core.AppLink;\n}\n\nexport function ClassificationUpdateBreadcrumbs(\n props: ClassificationUpdateBreadcrumbsProps\n): JSX.Element {\n const { classification } = props;\n\n return (\n <>\n <nav aria-label='breadcrumb'>\n <ol className='breadcrumb p-0 mb-0'>\n <li className='breadcrumb-item'>\n <AppLink appLink={props.dashboardAppLink}><Text namespace={namespace} phrase='dashboard' /></AppLink>\n </li>\n <li className='breadcrumb-item'>\n <AppLink appLink={props.contentUpdatesAppLink}><Text namespace={namespace} phrase='whatsNew' /></AppLink>\n </li>\n <li className='breadcrumb-item active' aria-current='page'>{classification.name}</li>\n </ol>\n </nav>\n </>\n );\n}","// extracted by mini-css-extract-plugin\nexport default {\"partialBanner\":\"DKukI\"};","import React from 'react';\n\nimport { PartialBreadcrumbs } from 'libs/shared/components/breadcrumbs/Breadcrumbs';\nimport { PartialVideoList } from 'libs/shared/components/video-list/partial-loading/PartialVideoList';\n\nimport styles from './partial-classification-update.scss';\n\nexport function PartialClassificationUpdate(): JSX.Element {\n return (\n <div className='bg-white px-3'>\n <div className={`partial-loading-background mb-2 ${styles.partialBanner} rounded`} />\n\n <div className='mb-1'>\n <PartialBreadcrumbs />\n </div>\n\n <PartialVideoList />\n </div>\n );\n}","\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 { PreferenceRequests } from 'libs/shared/flight-requests/PreferenceRequests';\nimport { Alerts } from 'libs/shared/hooks/UseAlerts';\nimport { CurrentUser } from 'libs/shared/interfaces';\n\nconst namespace = 'contentUpdates.classificationUpdate';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface ClassificationViewCallbackManager {\n dispatch: React.Dispatch<Flight.RequestAction>;\n alerts: Alerts;\n setShowFollowSpinner: React.Dispatch<React.SetStateAction<boolean>>;\n currentUser: CurrentUser;\n}\n\nexport function getClassificationCallbacks(\n options: ClassificationViewCallbackManager\n) {\n const { dispatch, alerts, setShowFollowSpinner } = options;\n\n function onFollow(classificationId: string, classificationName: string, follow: boolean): void {\n setShowFollowSpinner(true);\n\n const onSuccess = () => {\n setShowFollowSpinner(false);\n\n AnalyticsHelper.logUserAction({\n id: classificationId,\n name: classificationName\n }, {\n location: LocationContext.ContentUpdatesClassificationBanner,\n workflowPhase: WorkflowPhase.Complete,\n descriptor: follow ? ToggleDescriptor.On : ToggleDescriptor.Off,\n actionType: UserAction.Follow,\n entity: EntityType.Classification\n });\n\n alerts.success(getPhrase(follow ? 'followed' : 'unfollowed', { name: classificationName, escapeText: true }));\n };\n\n const onError = () => {\n setShowFollowSpinner(false);\n alerts.error(LanguageService.getPhrase(namespace, 'error'));\n };\n\n const request = follow ?\n PreferenceRequests.followSubjects([classificationId], onSuccess, onError) :\n PreferenceRequests.unfollowSubjects([classificationId], onSuccess, onError);\n\n Flight.fetch(dispatch, request);\n }\n\n return {\n onFollow\n };\n}\n","import * as React from 'react';\nimport { useDispatch } from 'react-redux';\n\nimport { LanguageService } from 'libs/common/backbone/services/LanguageService';\nimport { Flight } from 'libs/common/flight';\nimport { DateHelper } from 'libs/common/react/utils/DateHelper';\n\nimport { LocationContext } from 'libs/analytics/interfaces';\n\nimport { ContentUpdateRequests } from 'libs/shared/apps/content-updates/flight-requests/ContentUpdateRequests';\nimport { ClassificationVideosGrouping, ContentUpdateAppLinks } from 'libs/shared/apps/content-updates/interfaces';\nimport { VideoList } from 'libs/shared/components/video-list/VideoList';\nimport { VideoActionsContext } from 'libs/shared/context/VideoActionsContext';\nimport { PermissionName } from 'libs/shared/enums/PermissionName';\nimport { CustomerRequests } from 'libs/shared/flight-requests/CustomerRequests';\nimport { PreferenceRequests } from 'libs/shared/flight-requests/PreferenceRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { useAlerts } from 'libs/shared/hooks/UseAlerts';\nimport { usePermissions } from 'libs/shared/hooks/usePermissions';\nimport { useSetPageMetadata } from 'libs/shared/hooks/useSetPageMetadata';\nimport { Classification, CurrentUser, YearGroup } from 'libs/shared/interfaces';\nimport { PageMetadataHelper } from 'libs/shared/utils/PageMetadataHelper';\n\nimport { usePluginHelper } from 'shared/hooks/use-plugin-helper/usePluginHelper';\nimport { useVideoActions, VideoActionsLocation } from 'shared/hooks/use-video-actions/useVideoActions';\nimport { useLiteFavourites } from 'shared/hooks/useLiteFavourites';\nimport { usePresentationAudiences } from 'shared/hooks/usePresentationAudiences';\nimport { useVideoMixin } from 'shared/hooks/useVideoMixin';\nimport { InteractiveHelpers } from 'shared/utils/InteractiveHelper';\nimport { SeoHelper } from 'shared/utils/SeoHelper';\nimport { VideoAppLinkHelper } from 'shared/utils/VideoAppLinkHelper';\n\nimport { ClassificationBanner, ClassificationUpdateBreadcrumbs } from 'apps/content-updates/components';\n\nimport { PartialClassificationUpdate } from './partial-loading/PartialClassificationUpdate';\nimport { getClassificationCallbacks } from './ClassificationUpdateViewCallbacks';\n\nconst namespace = 'contentUpdates.classificationUpdate';\nconst getPhrase = LanguageService.encloseNamespace(namespace);\n\ninterface ClassificationUpdateViewProps {\n classificationId: string;\n appLinks: ContentUpdateAppLinks;\n presentationSlug?: string;\n}\n\nexport function ClassificationUpdateView(props: ClassificationUpdateViewProps): JSX.Element {\n const { classificationId } = props;\n\n const { isPlugin } = usePluginHelper();\n\n const dispatch = useDispatch();\n const alerts = useAlerts();\n const { setFavourite, canFavourite } = useLiteFavourites(LocationContext.VideoThumbnail);\n\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n const yearGroups = Flight.useBasicFetch<YearGroup[]>(\n currentUser.data?.isAuthenticated && CustomerRequests.yearGroups(currentUser.data.customerId)\n );\n\n const [ showFollowSpinner, setShowFollowSpinner ] = React.useState(false);\n\n const callbacks = getClassificationCallbacks({\n dispatch,\n alerts,\n setShowFollowSpinner,\n currentUser: currentUser?.data\n });\n\n const date = new Date();\n // Retrieve the past 1 year from today\n const from = DateHelper.format(DateHelper.endOf(DateHelper.subtract(date, 1, 'year'), 'day'), 'YYYY-MM-DD');\n const to = DateHelper.format(DateHelper.endOf(date, 'day'), 'YYYY-MM-DD');\n\n const { hasPermissions } = usePermissions();\n const canFollowSubjects = hasPermissions(PermissionName.FollowSubjects);\n\n const classification = Flight.useBasicFetch<Classification>(\n ContentUpdateRequests.getClassification(classificationId)\n );\n\n const contentUpdates = Flight.useBasicFetch<ClassificationVideosGrouping>(currentUser.data &&\n ContentUpdateRequests.getClassificationUpdates(classificationId, from, to));\n\n const subjectPreferences = Flight.useBasicFetch<Classification[]>(canFollowSubjects &&\n PreferenceRequests.mySubjectPreferences());\n\n const audiences = usePresentationAudiences();\n\n useSetPageMetadata(PageMetadataHelper.getDefaultMetadata({\n title: classification.data?.name,\n phraseContext: {\n phraseHandler: getPhrase,\n titlePhrase: 'pageTitle',\n descriptionPhrase: 'pageDescription'\n },\n canonicalLink: SeoHelper.getCanonicalLink(),\n allowIndexing: SeoHelper.allowIndexing()\n }));\n\n const videoActions = useVideoActions({ location: VideoActionsLocation.VideoItem });\n\n useVideoMixin(contentUpdates.data?.videos ?? []);\n\n const hasLoadedPreferences = subjectPreferences.hasCompleted || !canFollowSubjects;\n\n const dataLoaded = (\n contentUpdates.data && classification.data &&\n hasLoadedPreferences && currentUser.data\n );\n\n if (!dataLoaded)\n return <PartialClassificationUpdate />;\n\n const preferredSubjectIds = subjectPreferences.data?.map(subject => subject.id) ?? [];\n\n return (\n <VideoActionsContext.Provider value={videoActions}>\n <div className='bg-white px-3'>\n <ClassificationBanner\n classification={classification.data}\n backgroundUrl={classification.data.banner?.url ?? ''}\n getClassificationAppLink={props.appLinks.getClassificationAppLink}\n followed={!!preferredSubjectIds.find(id => id.toString() === classification.data.id.toString())}\n follow={callbacks.onFollow}\n showFollowSpinner={showFollowSpinner}\n canFollow={canFollowSubjects}\n />\n <ClassificationUpdateBreadcrumbs\n classification={classification.data}\n dashboardAppLink={props.appLinks.dashboardAppLink}\n contentUpdatesAppLink={props.appLinks.whatsNewAppLink}\n />\n\n <VideoList\n videos={contentUpdates.data.videos}\n yearGroups={yearGroups.data}\n getVideoAppLink={props.appLinks.getVideoAppLink}\n getSubTextAppLink={video => props.appLinks.getSeriesAppLink(video.series)}\n setFavourite={setFavourite}\n canFavourite={canFavourite}\n hasPermissions={hasPermissions}\n presentationAudiences={audiences.data}\n getPreviewQuestionsAppLink={interactive => InteractiveHelpers.getPreviewQuestionsAppLink(interactive)}\n isPlugin={isPlugin}\n getClassroomGuideAppLink={VideoAppLinkHelper.getClassroomGuideAppLink}\n getInteractiveGuidanceAppLink={VideoAppLinkHelper.getInteractiveGuidanceAppLink}\n getResourceGuidanceAppLink={VideoAppLinkHelper.getResourceGuidanceAppLink}\n />\n </div>\n </VideoActionsContext.Provider>\n );\n}","import { Flight } from 'libs/common/react/index';\n\nimport { AudienceRequests } from 'libs/shared/flight-requests/AudienceRequests';\nimport { PresentationAudience } from 'libs/shared/interfaces';\n\nimport { usePresentation } from 'shared/hooks/usePresentation';\n\nexport const usePresentationAudiences = () => {\n const { activePresentation, getFallbackPresentation } = usePresentation({ redirectOnError: true });\n\n const presentation = activePresentation || getFallbackPresentation();\n\n const audiences = Flight.useBasicFetch<PresentationAudience[]>(\n !!presentation &&\n AudienceRequests.presentationAudiences(presentation.id)\n );\n\n return audiences;\n};","import React from 'react';\n\nimport { Flight } from 'libs/common/flight';\n\nimport { ClassificationRequests } from 'libs/shared/flight-requests/ClassificationRequests';\nimport { UserRequests } from 'libs/shared/flight-requests/UserRequests';\nimport { VideoRequests } from 'libs/shared/flight-requests/VideoRequests';\nimport { Clip, ClipCollection, CurrentUser, Video, VideoCollection } from 'libs/shared/interfaces';\nimport { VideoHelper } from 'libs/shared/utils/VideoHelper';\n\ntype Types = Video[] | VideoCollection | Clip[] | ClipCollection;\n\nfunction getValidObjects(objects: Types): (Video | Clip)[] {\n if (!objects)\n return [];\n\n if (Array.isArray(objects))\n return objects.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n if ('data' in objects)\n return objects.data.filter(o => !!o && (VideoHelper.isVideo(o) || VideoHelper.isClip(o)));\n\n return [];\n}\n\ninterface VideoMixinOptions {\n /**\n * If the videos that are having new data mixed into are sitting on an explicit Flight namespace,\n * providing that namespace here is required\n */\n flightNamespace?: string;\n}\n\nexport function useVideoMixin(objects: Types, options: VideoMixinOptions = {}): void {\n const currentUser = Flight.useBasicFetch<CurrentUser>(UserRequests.currentUser());\n\n const hydratedVideos = React.useRef<Set<string>>(new Set<string>());\n\n const videos = getValidObjects(objects);\n\n const videoIds = videos.map(v => v.id);\n\n const [ request, setRequest ] = React.useState<Flight.Request[]>([]);\n\n React.useEffect(() => {\n if (!videoIds?.length || !currentUser.hasCompleted)\n return;\n\n const unhydratedVideos: string[] = [];\n\n videoIds.forEach(id => {\n if (!hydratedVideos.current.has(id)) {\n unhydratedVideos.push(id);\n hydratedVideos.current.add(id);\n }\n });\n \n if (!unhydratedVideos.length)\n return;\n\n setRequest(r => {\n const newRequests = [\n ...r,\n VideoRequests.videoMixinAssocs(unhydratedVideos, options.flightNamespace)\n ];\n\n if (currentUser.data?.isAuthenticated)\n newRequests.push(ClassificationRequests.hasCurriculumLinks(unhydratedVideos, null, options.flightNamespace));\n\n return newRequests;\n });\n }, [ videoIds?.length, currentUser.hasCompleted ]);\n\n Flight.useBasicFetchAll(request);\n}","\"use client\";\n\nimport classNames from 'classnames';\nimport * as React from 'react';\nimport { useBootstrapPrefix, useBootstrapBreakpoints, useBootstrapMinBreakpoint } from './ThemeProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst Row = /*#__PURE__*/React.forwardRef(({\n bsPrefix,\n className,\n // Need to define the default \"as\" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595\n as: Component = 'div',\n ...props\n}, ref) => {\n const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'row');\n const breakpoints = useBootstrapBreakpoints();\n const minBreakpoint = useBootstrapMinBreakpoint();\n const sizePrefix = `${decoratedBsPrefix}-cols`;\n const classes = [];\n breakpoints.forEach(brkPoint => {\n const propValue = props[brkPoint];\n delete props[brkPoint];\n let cols;\n if (propValue != null && typeof propValue === 'object') {\n ({\n cols\n } = propValue);\n } else {\n cols = propValue;\n }\n const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';\n if (cols != null) classes.push(`${sizePrefix}${infix}-${cols}`);\n });\n return /*#__PURE__*/_jsx(Component, {\n ref: ref,\n ...props,\n className: classNames(className, decoratedBsPrefix, ...classes)\n });\n});\nRow.displayName = 'Row';\nexport default Row;"],"names":["ContentUpdateRequests","getContentUpdates","presentationId","from","to","gatewayApiUrl","url","limit","query","publicUrl","key","normalizeOptions","namespace","formatData","contentUpdates","map","contentUpdate","id","classificationId","videos","getClassifications","ids","join","getClassification","getClassificationUpdates","getContentUpdateVideos","success","BreadcrumbItem","breadcrumb","name","appLink","active","withBackIcon","className","svgName","size","S","Breadcrumbs","breadcrumbs","isMobile","length","b","idx","PartialBreadcrumbs","numItems","style","height","width","dangerouslySetInnerHTML","__html","PartialVideoList","props","Array","numVideos","fill","_","i","allowBulkActions","PartialVideoItem","breakpoints","useBreakpoints","isSmall","VideoListHelper","withDragHandle","withReordering","xs","Row","Col","defaultProps","DEFAULT_PARTIAL_LOADING_OPTIONS","minWidth","maxWidth","PartialLoadingHelper","getPartialLoadingItems","options","opts","Math","max","floor","random","ClassificationBanner","classification","backgroundUrl","followed","follow","showFollowSpinner","activeAudiences","SharedViewModelKeys","undefined","storage","backgroundImage","getClassificationAppLink","canFollow","IconButton","onClick","Spinner","as","animation","role","phrase","ClassificationUpdateBreadcrumbs","dashboardAppLink","contentUpdatesAppLink","PartialClassificationUpdate","getPhrase","LanguageService","ClassificationUpdateView","isPlugin","usePluginHelper","dispatch","alerts","useLiteFavourites","u","setFavourite","canFavourite","currentUser","UserRequests","yearGroups","data","isAuthenticated","CustomerRequests","customerId","callbacks","setShowFollowSpinner","onFollow","classificationName","onSuccess","AnalyticsHelper","location","workflowPhase","descriptor","actionType","entity","escapeText","onError","error","request","PreferenceRequests","getClassificationCallbacks","date","Date","DateHelper","hasPermissions","usePermissions","canFollowSubjects","PermissionName","subjectPreferences","audiences","usePresentationAudiences","useSetPageMetadata","PageMetadataHelper","title","phraseContext","phraseHandler","titlePhrase","descriptionPhrase","canonicalLink","SeoHelper","allowIndexing","videoActions","useVideoActions","useVideoMixin","hasLoadedPreferences","hasCompleted","preferredSubjectIds","subject","VideoActionsContext","value","banner","appLinks","find","toString","whatsNewAppLink","VideoList","getVideoAppLink","getSubTextAppLink","video","getSeriesAppLink","series","presentationAudiences","getPreviewQuestionsAppLink","interactive","InteractiveHelper","getClassroomGuideAppLink","VideoAppLinkHelper","getInteractiveGuidanceAppLink","getResourceGuidanceAppLink","redirectOnError","activePresentation","getFallbackPresentation","presentation","objects","hydratedVideos","Set","isArray","filter","o","getValidObjects","videoIds","v","setRequest","unhydratedVideos","forEach","current","has","push","add","r","newRequests","flightNamespace","bsPrefix","Component","ref","decoratedBsPrefix","minBreakpoint","sizePrefix","classes","brkPoint","propValue","cols","infix","displayName"],"sourceRoot":""}