@clickview/lite 0.0.2-alpha.3 → 0.0.2-alpha.4

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.
@@ -15,6 +15,7 @@ export declare class DefaultApplication extends Core.Application {
15
15
  index(): void;
16
16
  playVideo(id: string): void;
17
17
  myUploads(params: HashObject): void;
18
+ series(id: string, params: HashObject): void;
18
19
  catchAllRoutes(): void;
19
20
  notFound(): void;
20
21
  }
@@ -17,6 +17,7 @@ export declare class PlaylistsApplication extends Core.Application {
17
17
  newPlaylist(): void;
18
18
  editPlaylist(id: string): void;
19
19
  deletePlaylist(id: string): void;
20
+ removeVideoFromPlaylist(videoId: string, playlistId: string): void;
20
21
  protected onShowAlert(options?: ObjectHash): void;
21
22
  }
22
23
  export {};
@@ -0,0 +1,4 @@
1
+ import { BaseSearchAppVariables, SearchAppLinks } from '@clickview/shared';
2
+ export declare class SearchAppVariables extends BaseSearchAppVariables {
3
+ get appLinks(): SearchAppLinks;
4
+ }
package/dist/bundle.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("@clickview/shared"),require("@clickview/common"),require("@clickview/playlists"),require("ReactCustomScrollbars"),require("ReactRedux"),require("Backbone"),require("Handlebars")):"function"==typeof define&&define.amd?define(["React","@clickview/shared","@clickview/common","@clickview/playlists","ReactCustomScrollbars","ReactRedux","Backbone","Handlebars"],t):"object"==typeof exports?exports["@clickview/lite"]=t(require("React"),require("@clickview/shared"),require("@clickview/common"),require("@clickview/playlists"),require("ReactCustomScrollbars"),require("ReactRedux"),require("Backbone"),require("Handlebars")):e["@clickview/lite"]=t(e.React,e["@clickview/shared"],e["@clickview/common"],e["@clickview/playlists"],e.ReactCustomScrollbars,e.ReactRedux,e.Backbone,e.Handlebars)}(window,(function(e,t,n,a,r,o,i,l){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=17)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=a},function(e,t,n){e.exports={nav:"_3RLQ9",logoContainer:"UIlc9",searchBar:"_2E7RQ",actionButtons:"_2HygL",avatar:"_2OoYm",notifications:"_2b7ER",hamburger:"_2BRko"}},function(e,t,n){e.exports={content:"_1SX2l",collapsedNavContent:"_3LJFz",openNavContent:"_34Pt4",hiddenNavContent:"_1gZ0J",mask:"mE2Dq"}},function(e,t,n){e.exports={leftNav:"_3jVyN",iconPlaceholder:"_1ud9G",leftNavAnchor:"_3A_-8",leftNavText:"_3qbRh",leftNavCollapsed:"_2idO9"}},function(e,t){e.exports=r},function(e,t,n){e.exports={fixed:"_3C4_W",inline:"_2voRI"}},function(e,t){e.exports=o},function(e,t,n){var a=n(16);e.exports=(a.default||a).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,a,r){return'<div class="layout-region position-relative"></div>'},useData:!0})},function(e,t){e.exports=i},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e,t,n){},function(e,t){e.exports=l},function(e,t,n){"use strict";n.r(t);n(12),n(13),n(14),n(15);var a=n(3),r={Default:{MY_UPLOADS:"my:uploads"},Playlists:{HOME:a.Actions.Playlists.HOME,PLAYLIST:a.Actions.Playlists.PLAYLIST,NEW_PLAYLIST:a.Actions.Playlists.NEW_PLAYLIST,EDIT_PLAYLIST:a.Actions.Playlists.EDIT_PLAYLIST,DELETE_PLAYLIST:a.Actions.Playlists.DELETE_PLAYLIST}},o={DEFAULT:"default:application",PLAYLISTS:"lite:playlists:application"},i={CONTENT:"content",POPUP:"popup",ALERT:"alert"},l={TEACHER_LAYOUT:"TeacherLayout"},c="series,season,rating,producers,distributors,resources,tags,productionCompanies,directors,links,thumbnail",u={VIDEOS:c,WORKSPACE_VIDEOS:"".concat(c,"&filter={orderbydesc:timestamp,page:1,limit:25}")},s=n(0),p=n(2),m=n(9),f=n(1),d={url:"api/currentUser",key:"currentuser"},y={url:"/api/config",key:"config"},v=function(e){return"/api/domain/v2/objects/".concat(e,"?query=").concat(u.VIDEOS)},h=function(e){return"api/domain/v2/objects/8961024/videos?query=".concat(u.WORKSPACE_VIDEOS).concat(function(e){return e?"&cursor=".concat(e):""}(e))},b=function(e){return{url:v(e),key:"videos:".concat(e)}},g=function(e){return{url:h(e),key:"workspace:".concat(e)}};var E=n(4),N=n.n(E);function L(){return s.createElement("svg",{viewBox:"0 0 434 71"},s.createElement("g",null,s.createElement("path",{fill:"#000000",d:"M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z"}),s.createElement("path",{fill:"#F8981D",d:"M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z"})))}function w(e){var t=e.user&&e.user.avatar;return s.createElement("div",{className:"mx-2"},s.createElement("span",{className:N.a.avatar,style:{backgroundImage:"url('".concat(t,"')")}}," "))}function P(){return s.createElement("div",{className:"ml-2"},s.createElement("span",{className:N.a.notifications}," "))}function S(e){var t=p.Flight.useBasicFetch(d);return s.createElement("nav",{className:"navbar navbar-expanded sticky-top ".concat(N.a.nav," justify-content-start")},e.showLeftNavToggle&&s.createElement(f.SvgContainer,{svgName:f.cvSvgLibrary.Handle,className:N.a.hamburger,onClick:e.toggleLeftNav}),s.createElement("a",{className:"navbar-brand text-hide align-top ".concat(N.a.logoContainer," d-inline-block'"),href:"/"},s.createElement(L,null)),s.createElement("div",{className:"d-flex align-items-center pr-1 position-absolute ".concat(N.a.actionButtons)},s.createElement(f.IconButton,{svgName:f.cvSvgLibrary.Upload,className:"btn btn-secondary"},"Upload a video"),s.createElement(P,null),s.createElement(w,{user:t.data})))}var k,C=n(7),O=n.n(C),A=n(6),T=n.n(A);!function(e){e[e.Open=0]="Open",e[e.Collapsed=1]="Collapsed",e[e.Hidden=2]="Hidden"}(k||(k={}));var _=function(e){return s.createElement(f.AppLink,{className:"".concat(T.a.leftNavAnchor," d-block my-3"),appLink:e.appLink},s.createElement("span",{className:"".concat(T.a.iconPlaceholder)}),s.createElement("span",{className:"".concat(T.a.leftNavText)},e.name))};function x(e){if(e.navState===k.Hidden)return s.createElement(s.Fragment,null);var t=e.navState===k.Collapsed,n=p.LanguageService.encloseNamespace("shared.leftNav");return s.createElement("nav",{className:"".concat(T.a.leftNav," ").concat(t?T.a.leftNavCollapsed:"")},s.createElement(C.Scrollbars,{height:"100%"},s.createElement(_,{name:n("home"),appLink:{application:o.DEFAULT,action:"index"}}),s.createElement(_,{name:n("myPlaylists"),appLink:{application:o.PLAYLISTS,action:r.Playlists.HOME}}),s.createElement(_,{name:n("myUploads"),appLink:{application:o.DEFAULT,action:r.Default.MY_UPLOADS}}),s.createElement(_,{name:n("following")}),s.createElement(_,{name:n("favouritedVideos")}),!t&&s.createElement(s.Fragment,null,s.createElement("hr",null),s.createElement(_,{name:n("watchHistory")}),s.createElement(_,{name:n("myClassrooms")}))))}function R(e){var t="".concat(e.webPlayerHost,"home/ev?vid=").concat(e.id);return s.createElement("div",{className:"embed-responsive embed-responsive-16by9 ".concat(e.className)},s.createElement("iframe",{src:t,className:"embed-responsive-item",allowFullScreen:!0,allow:"autoplay; fullscreen"}))}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{a||null==l.return||l.return()}finally{if(r)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var F=s.createContext(void 0);function I(e){var t=e.children,n=p.Flight.useBasicFetch(y),a=j(s.useState(null),2),r=a[0],o=a[1],i=j(s.useState(null),2),l=i[0],c=i[1],u={webPlayerUrl:n.data?n.data.webPlayerUrl:"",id:r,setId:o,position:l,setPosition:c};return s.createElement(F.Provider,{value:u},t)}var U=n(8),V=n.n(U);function D(){var e=s.useContext(F),t=e.id,n=e.webPlayerUrl,a=e.position;if(!t)return s.createElement(s.Fragment,null);var r={},o=V.a.fixed;return a&&(o=V.a.inline,r=a),s.createElement("div",{style:r,className:o},s.createElement(R,{id:t,webPlayerHost:n}))}function M(e){var t=e.video;return t.resources&&t.resources.data&&t.resources.data.length?s.createElement("div",{className:e.className},s.createElement("h2",{className:"h4"},"Resources"),t.resources.data.map((function(e,t){return s.createElement("div",{key:t},e.name)}))):s.createElement(s.Fragment,null)}function Y(e){var t=e.tags,n=e.className;return t&&t.data&&t.data.length?s.createElement("div",{className:n},"Tags: ",t.data.map((function(e,t){return s.createElement("span",{className:"badge mr-1 p-1 badge-light",key:t},e.name)}))):s.createElement(s.Fragment,null)}function H(e){var t=e.label,n=e.items,a=e.className;if(!(n&&n.data&&n.data.length))return s.createElement(s.Fragment,null);var r=n.data.map((function(e){return e.name})).join(", ");return s.createElement("div",{className:a},t,": ",r)}function B(e){var t=e.video,n=t.tags,a=t.rating,r=t.productionYear,o=t.productionCompanies,i=t.distributors,l=a&&a.code;return s.createElement(s.Fragment,null,s.createElement("h2",{className:"h4"},"Details"),s.createElement("div",{className:"row no-gutters"},s.createElement("div",{className:"col-3"},l&&s.createElement("div",{className:"pb-2"},"Rating: ",l),r&&s.createElement("div",{className:"pb-2"},"Production Year: ",r)),s.createElement("div",{className:"col-9"},s.createElement(H,{label:"Production Companies",items:o,className:"pb-2"}),s.createElement(H,{label:"Distributors",items:i,className:"pb-2"}),s.createElement(Y,{tags:n,className:"pb-2"}))))}function q(e){var t=e.description;return t?s.createElement(s.Fragment,null,s.createElement("h2",{className:"h4"},"Description"),s.createElement("p",null,t)):s.createElement(s.Fragment,null)}function z(e){var t=e.video;return s.createElement("div",{className:"rounded border px-3"},s.createElement(O.a,{autoHeight:!0,autoHeightMax:250},s.createElement("div",{className:"py-3"},s.createElement(B,{video:t}),s.createElement(q,{description:t.description}))))}function Q(){var e={application:o.DEFAULT,action:"index"};return s.createElement(f.AppLink,{appLink:e,className:"h5 mb-0"},s.createElement(f.SvgContainer,{svgName:f.cvSvgLibrary.ChevronLeft,size:f.SvgContainerSize.Medium,className:"svg-container d-inline-block mr-1 align-middle"}),s.createElement("span",{className:"d-inline-block align-middle"},"Back to Home"))}function W(e){var t=e.video,n=t.rating,a=t.productionYear;return s.createElement("div",null,n&&s.createElement("span",{className:"badge badge-light p-1 mr-1"},n.code),a&&s.createElement("span",{className:"badge badge-light p-1 mr-1"},a))}function J(){return s.createElement("div",{className:"mt-3"},s.createElement(f.IconButton,{svgName:f.cvSvgLibrary.Plus,className:"btn btn-outline-secondary mr-2"},"Create interactive video"),s.createElement(f.IconButton,{svgName:f.cvSvgLibrary.Plus,className:"btn btn-outline-secondary mr-2"},"Create clip"),s.createElement(f.IconButton,{svgName:f.cvSvgLibrary.More,className:"btn btn-light float-right ml-2"},"More"),s.createElement(f.IconButton,{svgName:f.cvSvgLibrary.Share,className:"btn btn-light float-right ml-2"},"Share"),s.createElement(f.IconButton,{svgName:f.cvSvgLibrary.AddToPlaylists,className:"btn btn-light float-right ml-2"},"Add to Playlist"),s.createElement(f.IconButton,{svgName:f.cvSvgLibrary.Plus,className:"btn btn-light float-right ml-2"},"Favourite"))}function X(e){var t=e.video;return s.createElement("h1",{className:"h3"},s.createElement(f.SeriesLink,{video:t,appLink:{application:"series",action:"series"}}),t.name)}function K(e){return function(t){var n=s.useCallback(t,[]);s.useEffect((function(){return window.addEventListener(e,n),function(){return window.removeEventListener(e,n)}}),[])}}var G=K("scroll"),Z=K("resize");function $(e){var t=s.useContext(F),n=t.setPosition,a=t.setId,r=p.Flight.useBasicFetch(b(e.id)),o=s.useRef(null),i=s.useCallback((function(e){e&&(o.current=e,l())}),[]),l=s.useMemo((function(){return p.FunctionHelper.debounce(function(e,t){return function(){if(e.current){var n=e.current.getBoundingClientRect(),a=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;n.top<-n.height?t(null):t({top:r+n.top,left:a+n.left,width:n.width})}}}(o,n),100)}),[]);return G(l),Z(l),s.useEffect((function(){return function(){return n(null)}}),[]),r.data?(a(r.data.id),s.createElement(s.Fragment,null,s.createElement("div",{className:"d-flex justify-content-between"},s.createElement(Q,null),s.createElement("button",{className:"btn btn-light"},"Classroom mode")),s.createElement("div",{className:"embed-responsive embed-responsive-16by9 my-3",ref:i}),s.createElement(X,{video:r.data}),s.createElement(W,{video:r.data}),s.createElement(J,null),s.createElement("hr",null),s.createElement(z,{video:r.data}),s.createElement(M,{video:r.data,className:"mt-3"}))):s.createElement(s.Fragment,null)}var ee=function(e){return{application:null,action:null,args:[e.id]}},te=function(e){return{application:null,action:null,args:[e.id]}};function ne(e){var t=p.Flight.useBasicFetch(y),n=p.Flight.useBasicFetch(g(e.cursor));return t.data&&n.data?s.createElement(s.Fragment,null,s.createElement(f.BannerHeader,{heading:p.LanguageService.getPhrase("shared.myUploads","header"),banner:null,imageCdnUrl:t.data.imageCdnUrl,actions:[{label:p.LanguageService.getPhrase("shared.myUploads","share"),appLink:{application:o.DEFAULT,action:"index"},svgName:f.cvSvgLibrary.Share,className:"btn btn-light",button:!0},{label:p.LanguageService.getPhrase("shared.myUploads","edit"),appLink:{application:o.DEFAULT,action:"index"},svgName:f.cvSvgLibrary.Edit,className:"btn btn-light",button:!0}]}),s.createElement("div",null,s.createElement("p",{className:"pt-3"},s.createElement(f.Text,{namespace:"shared.myUploads",phrase:"description"})),s.createElement(f.VideoList,{videos:n.data.data,cursors:n.data.pagination.cursors,getVideoAppLink:ee,getSeriesAppLink:te}))):s.createElement(s.Fragment,null)}var ae=n(5),re=n.n(ae);function oe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],a=!0,r=!1,o=void 0;try{for(var i,l=e[Symbol.iterator]();!(a=(i=l.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{a||null==l.return||l.return()}finally{if(r)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var ie=function(e){var t=e.showNav,n=e.contentChild,a=e.popupChild,r=e.alertChild,o=oe(s.useState(!1),2),i=o[0],l=o[1],c=Object(f.useMediaQuery)(f.MediaQueryStrings.XS),u=Object(f.useMediaQuery)(f.MediaQueryStrings.SM),p=Object(f.useMediaQuery)(f.MediaQueryStrings.XLG);s.useEffect((function(){l(!p)}),[p]);var m=function(e,t,n){return t?{state:e?k.Hidden:k.Open,showMask:!e,contentClass:re.a.hiddenNavContent}:n?{state:e?k.Collapsed:k.Open,showMask:!e,contentClass:re.a.collapsedNavContent}:{state:e?k.Collapsed:k.Open,showMask:!1,contentClass:e?re.a.collapsedNavContent:re.a.openNavContent}}(i,c,u);return s.createElement(s.Fragment,null,s.createElement(S,{toggleLeftNav:function(){l(!i)},showLeftNavToggle:t}),t&&s.createElement(x,{navState:m.state}),s.createElement("div",{className:"".concat(re.a.content," ").concat(m.contentClass)},s.createElement("div",{className:"container"},n)),a,r,m.showMask&&s.createElement("div",{className:"modal-backdrop show ".concat(re.a.mask)}),s.createElement(D,null))};function le(e){return s.createElement(m.Provider,{store:e.store},s.createElement(I,null,s.createElement(ie,Object.assign({},e))))}var ce=n(10),ue=n.n(ce);function se(e){return(se="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})(e)}function pe(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function me(e,t){return!t||"object"!==se(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function fe(e,t,n){return(fe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var a=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=de(e)););return e}(e,t);if(a){var r=Object.getOwnPropertyDescriptor(a,t);return r.get?r.get.call(n):r.value}})(e,t,n||e)}function de(e){return(de=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ye(e,t){return(ye=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ve=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=me(this,de(t).call(this,e))).childComponents={},n}var n,a,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ye(e,t)}(t,e),n=t,r=[{key:"getCacheKey",value:function(e){return"".concat(l.TEACHER_LAYOUT,":").concat(e.showNav)}}],(a=[{key:"regions",value:function(){return{layout:{el:".layout-region",replaceEl:!0}}}},{key:"getChildComponents",value:function(){return{showNav:this.options.showNav,contentChild:this.childComponents[i.CONTENT],popupChild:this.childComponents[i.POPUP],alertChild:this.childComponents[i.ALERT],store:this.options.store}}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"closePopup",value:function(){this.unsetRegion(i.POPUP)}},{key:"showChildView",value:function(e,t){this.childComponents[e]=t,this.renderLayout()}},{key:"renderLayout",value:function(){fe(de(t.prototype),"showChildView",this).call(this,"layout",s.createElement(le,Object.assign({},this.getChildComponents())))}},{key:"title",get:function(){return!1}},{key:"name",get:function(){return"TeacherLayoutView"}},{key:"template",get:function(){return ue.a}}])&&pe(n.prototype,a),r&&pe(n,r),t}(p.ReactLayoutView);function he(){return s.createElement("div",{style:{height:"3000px"}},s.createElement("h1",null,"Hello World"),s.createElement(f.AppLink,{appLink:{application:o.DEFAULT,action:"play:video",args:["9122777"]}},"Play page 1"),s.createElement(f.AppLink,{appLink:{application:o.DEFAULT,action:"play:video",args:["3713435"]}},"Play page 2"))}function be(){return s.createElement(s.Fragment,null,s.createElement("h1",null,"Not Found"))}function ge(e){return(ge="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})(e)}function Ee(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ne(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Le(e,t,n){return t&&Ne(e.prototype,t),n&&Ne(e,n),e}function we(e,t){return!t||"object"!==ge(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pe(e){return(Pe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Se(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ke(e,t)}function ke(e,t){return(ke=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ce=function(e){function t(){return Ee(this,t),we(this,Pe(t).apply(this,arguments))}return Se(t,e),Le(t,[{key:"channelName",get:function(){return o.DEFAULT}},{key:"appRoutes",get:function(){return{"":"index","videos/:id":"playVideo","my-uploads":"myUploads","*path":"catchAllRoutes"}}},{key:"appLinks",get:function(){return["notFound"]}}]),t}(p.Core.AppRouter),Oe=function(e){function t(){return Ee(this,t),we(this,Pe(t).apply(this,arguments))}return Se(t,e),Le(t,[{key:"index",value:function(){this.layout.showChildView(i.CONTENT,s.createElement(he,null))}},{key:"playVideo",value:function(e){this.layout.showChildView(i.CONTENT,s.createElement($,{id:e}))}},{key:"myUploads",value:function(e){this.layout.showChildView(i.CONTENT,s.createElement(ne,{cursor:e.cursor}))}},{key:"catchAllRoutes",value:function(){this.layout.showChildView(i.CONTENT,s.createElement(be,null))}},{key:"notFound",value:function(){this.layout.showChildView(i.CONTENT,s.createElement(be,null))}},{key:"name",get:function(){return"Default Application"}},{key:"layoutOptions",get:function(){return{name:l.TEACHER_LAYOUT,options:{showNav:!0}}}},{key:"channelName",get:function(){return o.DEFAULT}}],[{key:"router",get:function(){return Ce}}]),t}(p.Core.Application),Ae=n(11);function Te(e){return(Te="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})(e)}function _e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xe(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Re(e,t,n){return t&&xe(e.prototype,t),n&&xe(e,n),e}function je(e,t){return!t||"object"!==Te(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Fe(e){return(Fe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ie(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ue(e,t)}function Ue(e,t){return(Ue=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Ve=function(e){function t(){return _e(this,t),je(this,Fe(t).apply(this,arguments))}return Ie(t,e),Re(t,[{key:"channelName",get:function(){return o.PLAYLISTS}},{key:"appRoutes",get:function(){return{"playlists(/)":"index","playlists/:id(/)":"playlist"}}},{key:"appLinks",get:function(){return["newPlaylist","editPlaylist","deletePlaylist"]}}]),t}(p.Core.AppRouter),De=function(e){function t(){return _e(this,t),je(this,Fe(t).apply(this,arguments))}return Ie(t,e),Re(t,[{key:"index",value:function(){this.layout.showChildView(i.CONTENT,s.createElement(a.PlaylistsContextProvider,null,s.createElement(a.PlaylistsView,{getPlaylistAppLink:function(e){return{application:o.PLAYLISTS,action:r.Playlists.PLAYLIST,args:[e.id]}}})))}},{key:"playlist",value:function(e){this.layout.showChildView(i.CONTENT,s.createElement(a.PlaylistView,{playlistId:e,application:o.PLAYLISTS,getVideoAppLink:function(e){return{application:o.DEFAULT,action:"play:video",args:[e.id]}},getSeriesAppLink:function(e){return{application:o.PLAYLISTS,action:r.Playlists.HOME}},allowEdit:!0}))}},{key:"newPlaylist",value:function(){var e=this;this.layout.showChildView(i.POPUP,s.createElement(a.NewPlaylistView,{application:o.PLAYLISTS,closePopup:function(){return e.layout.closePopup()}}))}},{key:"editPlaylist",value:function(e){var t=this;this.layout.showChildView(i.POPUP,s.createElement(a.EditPlaylistView,{playlistId:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"deletePlaylist",value:function(e){var t=this;this.layout.showChildView(i.POPUP,s.createElement(a.DeletePlaylistView,{playlistId:e,routeToOnDelete:{application:o.PLAYLISTS,action:r.Playlists.HOME},closePopup:function(){return t.layout.closePopup()}}))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],a=function(e){return Ae.Radio.channel(p.CommonChannels.ALERT).trigger("remove:alert",e)};this.layout.showChildView(i.ALERT,s.createElement(f.AlertList,{alerts:n,removeAlert:a}))}},{key:"name",get:function(){return"Playlists Application"}},{key:"layoutOptions",get:function(){return{name:l.TEACHER_LAYOUT,options:{showNav:!0}}}},{key:"channelName",get:function(){return o.PLAYLISTS}}],[{key:"router",get:function(){return Ve}}]),t}(p.Core.Application);n.d(t,"Actions",(function(){return r})),n.d(t,"AppChannels",(function(){return o})),n.d(t,"LayoutRegions",(function(){return i})),n.d(t,"Layouts",(function(){return l})),n.d(t,"WithStatements",(function(){return u})),n.d(t,"TeacherLayoutView",(function(){return ve})),n.d(t,"DefaultApplication",(function(){return Oe})),n.d(t,"PlaylistsApplication",(function(){return De}))}])}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("@clickview/shared"),require("@clickview/common"),require("@clickview/playlists"),require("ReactCustomScrollbars"),require("Backbone"),require("ReactRedux"),require("Handlebars")):"function"==typeof define&&define.amd?define(["React","@clickview/shared","@clickview/common","@clickview/playlists","ReactCustomScrollbars","Backbone","ReactRedux","Handlebars"],t):"object"==typeof exports?exports["@clickview/lite"]=t(require("React"),require("@clickview/shared"),require("@clickview/common"),require("@clickview/playlists"),require("ReactCustomScrollbars"),require("Backbone"),require("ReactRedux"),require("Handlebars")):e["@clickview/lite"]=t(e.React,e["@clickview/shared"],e["@clickview/common"],e["@clickview/playlists"],e.ReactCustomScrollbars,e.Backbone,e.ReactRedux,e.Handlebars)}(window,(function(e,t,n,a,r,o,i,c){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var r=t[a]={i:a,l:!1,exports:{}};return e[a].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(a,r,function(t){return e[t]}.bind(null,r));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=18)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports=n},function(e,t){e.exports=a},function(e,t,n){e.exports={nav:"_3RLQ9",logoContainer:"UIlc9",searchBar:"_2E7RQ",actionButtons:"_2HygL",avatar:"_2OoYm",notifications:"_2b7ER",hamburger:"_2BRko",searchBarContainer:"oX-Ph"}},function(e,t,n){e.exports={content:"_1SX2l",collapsedNavContent:"_3LJFz",openNavContent:"_34Pt4",hiddenNavContent:"_1gZ0J",mask:"mE2Dq"}},function(e,t,n){e.exports={leftNav:"_3jVyN",iconPlaceholder:"_1ud9G",leftNavAnchor:"_3A_-8",leftNavText:"_3qbRh",leftNavCollapsed:"_2idO9"}},function(e,t){e.exports=r},function(e,t){e.exports=o},function(e,t,n){e.exports={fixed:"_3C4_W",inline:"_2voRI"}},function(e,t){e.exports=i},function(e,t,n){var a=n(17);e.exports=(a.default||a).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,a,r){return'<div class="layout-region position-relative"></div>'},useData:!0})},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e){e.exports=JSON.parse("{}")},function(e,t,n){},function(e,t){e.exports=c},function(e,t,n){"use strict";n.r(t);n(12),n(13),n(14),n(15),n(16);var a=n(3),r={Default:{HOME:"index",MY_UPLOADS:"my:uploads",SERIES:"series"},Playlists:{HOME:a.Actions.Playlists.HOME,PLAYLIST:a.Actions.Playlists.PLAYLIST,NEW_PLAYLIST:a.Actions.Playlists.NEW_PLAYLIST,EDIT_PLAYLIST:a.Actions.Playlists.EDIT_PLAYLIST,DELETE_PLAYLIST:a.Actions.Playlists.DELETE_PLAYLIST,REMOVE_VIDEO_FROM_PLAYLIST:a.Actions.Playlists.REMOVE_VIDEO_FROM_PLAYLIST}},o={DEFAULT:"default:application",PLAYLISTS:"lite:playlists:application"},i={CONTENT:"content",POPUP:"popup",ALERT:"alert"},c={TEACHER_LAYOUT:"TeacherLayout"},l=Object.assign(Object.assign({},{VIDEO:"series,season,rating,producers,distributors,resources,tags,productionCompanies,directors,links,thumbnail"}),{VIDEO_COLLECTION:"{orderbydesc:timestamp,page:1,limit:25}thumbnail,tags,rating,series,season"}),u=n(0),s=n(2),p=n(1),f=n(10),m={url:"api/currentUser",key:"currentuser"},d={url:"/api/config",key:"config"},y=function(e){return"/api/domain/v2/objects/".concat(e,"?query=").concat(l.VIDEO)},h=function(e){return"api/domain/v2/objects/8961024/videos?query=".concat(l.VIDEO_COLLECTION).concat(function(e){return e?"&cursor=".concat(e):""}(e))},v=function(e){return{url:y(e),key:"videos:".concat(e)}},b=function(e){return{url:h(e),key:"workspace:".concat(e)}};var g=function(e){return"/api/domain/v2/objects/".concat(e)},E=function(e,t){return"/api/domain/v2/objects/".concat(e,"/videos?query=").concat(l.VIDEO_COLLECTION).concat(function(e){return e?"&cursor=".concat(e):""}(t))},L=function(e){return"/api/domain/v1/subjects/".concat(e,"/path")},S=function(e){return{url:g(e),key:"series:".concat(e)}},w=function(e,t){return{url:E(e,t),key:"series:".concat(e,":videos:").concat(t)}},P=function(e){if(e)return{url:L(e),key:"series:".concat(e,":breadcrumbs")}};var N=n(4),O=n.n(N);function k(){return u.createElement("svg",{viewBox:"0 0 434 71"},u.createElement("g",null,u.createElement("path",{fill:"#000000",d:"M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z"}),u.createElement("path",{fill:"#F8981D",d:"M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z"})))}function C(e){var t=e.user&&e.user.avatar;return u.createElement("div",{className:"mx-2"},u.createElement("span",{className:O.a.avatar,style:{backgroundImage:"url('".concat(t,"')")}}," "))}function A(){return u.createElement("div",{className:"ml-2"},u.createElement("span",{className:O.a.notifications}," "))}function T(e){var t=s.Flight.useBasicFetch(m);return u.createElement("nav",{className:"navbar navbar-expanded sticky-top ".concat(O.a.nav," justify-content-start")},e.showLeftNavToggle&&u.createElement(p.SvgContainer,{svgName:p.cvSvgLibrary.Handle,className:O.a.hamburger,onClick:e.toggleLeftNav}),u.createElement("a",{className:"navbar-brand text-hide align-top ".concat(O.a.logoContainer," d-inline-block'"),href:"/"},u.createElement(k,null)),u.createElement("div",{className:"container search-bar-region ".concat(O.a.searchBarContainer)}),u.createElement("div",{className:"d-flex align-items-center pr-1 position-absolute ".concat(O.a.actionButtons)},u.createElement(p.IconButton,{svgName:p.cvSvgLibrary.Upload,className:"btn btn-secondary"},"Upload a video"),u.createElement(A,null),u.createElement(C,{user:t.data})))}var F,_=n(7),D=n.n(_),R=n(6),j=n.n(R);!function(e){e[e.Open=0]="Open",e[e.Collapsed=1]="Collapsed",e[e.Hidden=2]="Hidden"}(F||(F={}));var x=function(e){return u.createElement(p.AppLink,{className:"".concat(j.a.leftNavAnchor," d-block my-3"),appLink:e.appLink},u.createElement("span",{className:"".concat(j.a.iconPlaceholder)}),u.createElement("span",{className:"".concat(j.a.leftNavText)},e.name))};function I(e){if(e.navState===F.Hidden)return u.createElement(u.Fragment,null);var t=e.navState===F.Collapsed,n=s.LanguageService.encloseNamespace("shared.leftNav");return u.createElement("nav",{className:"".concat(j.a.leftNav," ").concat(t?j.a.leftNavCollapsed:"")},u.createElement(_.Scrollbars,{height:"100%"},u.createElement(x,{name:n("home"),appLink:{application:o.DEFAULT,action:r.Default.HOME}}),u.createElement(x,{name:n("myPlaylists"),appLink:{application:o.PLAYLISTS,action:r.Playlists.HOME}}),u.createElement(x,{name:n("myUploads"),appLink:{application:o.DEFAULT,action:r.Default.MY_UPLOADS}}),u.createElement(x,{name:n("following")}),u.createElement(x,{name:n("favouritedVideos")}),!t&&u.createElement(u.Fragment,null,u.createElement("hr",null),u.createElement(x,{name:n("watchHistory")}),u.createElement(x,{name:n("myClassrooms")}))))}function U(e){var t="".concat(e.webPlayerHost,"home/ev?vid=").concat(e.id);return u.createElement("div",{className:"embed-responsive embed-responsive-16by9 ".concat(e.className)},u.createElement("iframe",{src:t,className:"embed-responsive-item",allowFullScreen:!0,allow:"autoplay; fullscreen"}))}function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],a=!0,r=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(a=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{a||null==c.return||c.return()}finally{if(r)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var M=u.createContext(void 0);function B(e){var t=e.children,n=s.Flight.useBasicFetch(d),a=V(u.useState(null),2),r=a[0],o=a[1],i=V(u.useState(null),2),c=i[0],l=i[1],p={webPlayerUrl:n.data?n.data.webPlayerUrl:"",id:r,setId:o,position:c,setPosition:l};return u.createElement(M.Provider,{value:p},t)}var Y=n(9),H=n.n(Y);function q(){var e=u.useContext(M),t=e.id,n=e.webPlayerUrl,a=e.position;if(!t)return u.createElement(u.Fragment,null);var r={},o=H.a.fixed;return a&&(o=H.a.inline,r=a),u.createElement("div",{style:r,className:o},u.createElement(U,{id:t,webPlayerHost:n}))}function z(e){var t=e.video;return t.resources&&t.resources.data&&t.resources.data.length?u.createElement("div",{className:e.className},u.createElement("h2",{className:"h4"},"Resources"),t.resources.data.map((function(e,t){return u.createElement("div",{key:t},e.name)}))):u.createElement(u.Fragment,null)}function Q(e){var t=e.tags,n=e.className;return t&&t.data&&t.data.length?u.createElement("div",{className:n},"Tags: ",t.data.map((function(e,t){return u.createElement("span",{className:"badge mr-1 p-1 badge-light",key:t},e.name)}))):u.createElement(u.Fragment,null)}function J(e){var t=e.label,n=e.items,a=e.className;if(!(n&&n.data&&n.data.length))return u.createElement(u.Fragment,null);var r=n.data.map((function(e){return e.name})).join(", ");return u.createElement("div",{className:a},t,": ",r)}function W(e){var t=e.video,n=t.tags,a=t.rating,r=t.productionYear,o=t.productionCompanies,i=t.distributors,c=a&&a.code;return u.createElement(u.Fragment,null,u.createElement("h2",{className:"h4"},"Details"),u.createElement("div",{className:"row no-gutters"},u.createElement("div",{className:"col-3"},c&&u.createElement("div",{className:"pb-2"},"Rating: ",c),r&&u.createElement("div",{className:"pb-2"},"Production Year: ",r)),u.createElement("div",{className:"col-9"},u.createElement(J,{label:"Production Companies",items:o,className:"pb-2"}),u.createElement(J,{label:"Distributors",items:i,className:"pb-2"}),u.createElement(Q,{tags:n,className:"pb-2"}))))}function X(e){var t=e.description;return t?u.createElement(u.Fragment,null,u.createElement("h2",{className:"h4"},"Description"),u.createElement("p",null,t)):u.createElement(u.Fragment,null)}function G(e){var t=e.video;return u.createElement("div",{className:"rounded border px-3"},u.createElement(D.a,{autoHeight:!0,autoHeightMax:250},u.createElement("div",{className:"py-3"},u.createElement(W,{video:t}),u.createElement(X,{description:t.description}))))}function K(e){return function(t){var n=u.useCallback(t,[]);u.useEffect((function(){return window.addEventListener(e,n),function(){return window.removeEventListener(e,n)}}),[])}}var Z=K("scroll"),$=K("resize");function ee(e){var t=e.video,n=t.rating,a=t.productionYear;return u.createElement("div",null,n&&u.createElement("span",{className:"badge badge-light p-1 mr-1"},n.code),a&&u.createElement("span",{className:"badge badge-light p-1 mr-1"},a))}function te(){return u.createElement("div",{className:"mt-3"},u.createElement(p.IconButton,{svgName:p.cvSvgLibrary.Plus,className:"btn btn-outline-secondary mr-2"},"Create interactive video"),u.createElement(p.IconButton,{svgName:p.cvSvgLibrary.Plus,className:"btn btn-outline-secondary mr-2"},"Create clip"),u.createElement(p.IconButton,{svgName:p.cvSvgLibrary.More,className:"btn btn-light float-right ml-2"},"More"),u.createElement(p.IconButton,{svgName:p.cvSvgLibrary.Share,className:"btn btn-light float-right ml-2"},"Share"),u.createElement(p.IconButton,{svgName:p.cvSvgLibrary.AddToPlaylists,className:"btn btn-light float-right ml-2"},"Add to Playlist"),u.createElement(p.IconButton,{svgName:p.cvSvgLibrary.Plus,className:"btn btn-light float-right ml-2"},"Favourite"))}function ne(e){var t=e.video,n={application:o.DEFAULT,action:r.Default.SERIES,args:[t.series.id]};return u.createElement("h1",{className:"h3"},u.createElement(p.SeriesLink,{video:t,appLink:n}),t.name)}function ae(e){var t=u.useContext(M),n=t.setPosition,a=t.setId,i=s.Flight.useBasicFetch(v(e.id)),c=u.useRef(null),l=u.useCallback((function(e){e&&(c.current=e,f())}),[]),f=u.useMemo((function(){return s.FunctionHelper.debounce(function(e,t){return function(){if(e.current){var n=e.current.getBoundingClientRect(),a=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;n.top<-n.height?t(null):t({top:r+n.top,left:a+n.left,width:n.width})}}}(c,n),100)}),[]);return Z(f),$(f),u.useEffect((function(){return function(){return n(null)}}),[]),i.data?(a(i.data.id),u.createElement(u.Fragment,null,u.createElement("div",{className:"d-flex justify-content-between"},u.createElement(p.BackButton,{appLink:{application:o.DEFAULT,action:r.Default.HOME},backToName:"Home"}),u.createElement("button",{className:"btn btn-light"},"Classroom mode")),u.createElement("div",{className:"embed-responsive embed-responsive-16by9 my-3",ref:l}),u.createElement(ne,{video:i.data}),u.createElement(ee,{video:i.data}),u.createElement(te,null),u.createElement("hr",null),u.createElement(G,{video:i.data}),u.createElement(z,{video:i.data,className:"mt-3"}))):u.createElement(u.Fragment,null)}function re(e,t){switch(t){case p.VideoAction.AddToPlaylist:case p.VideoAction.Share:return{application:o.DEFAULT,action:"index"}}}var oe=function(e){return{application:null,action:null,args:[e.id]}},ie=function(e){return{application:null,action:null,args:[e.id]}};function ce(e){var t=s.Flight.useBasicFetch(d),n=s.Flight.useBasicFetch(b(e.cursor));return t.data&&n.data?u.createElement(p.VideoActionsContext.Provider,{value:{getActionAppLink:re}},u.createElement(p.BannerHeader,{heading:s.LanguageService.getPhrase("shared.myUploads","header"),banner:null,imageCdnUrl:t.data.imageCdnUrl,actions:[{label:s.LanguageService.getPhrase("shared.myUploads","share"),appLink:{application:o.DEFAULT,action:"index"},svgName:p.cvSvgLibrary.Share,className:"btn btn-light",button:!0},{label:s.LanguageService.getPhrase("shared.myUploads","edit"),appLink:{application:o.DEFAULT,action:"index"},svgName:p.cvSvgLibrary.Edit,className:"btn btn-light",button:!0}]}),u.createElement("div",null,u.createElement("p",{className:"pt-3"},u.createElement(p.Text,{namespace:"shared.myUploads",phrase:"description"})),u.createElement(p.VideoList,{videos:n.data.data,cursors:n.data.pagination.cursors,getVideoAppLink:oe,getSeriesAppLink:ie}))):u.createElement(u.Fragment,null)}function le(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var ue=s.LanguageService.encloseNamespace("shared.series"),se=function(e){return{application:null,action:null,args:[e.id]}},pe=function(e){return{application:null,action:null,args:[e.id]}},fe=function(e){return{application:o.DEFAULT,action:r.Default.SERIES,args:[e.id]}};function me(e){var t=s.Flight.useBasicFetch(d),n=s.Flight.useBasicFetch(S(e.id)),a=s.Flight.useBasicFetch(w(e.id,e.cursor)),i=[n.data];if(e.classificationId){var c=s.Flight.useBasicFetch(P(e.classificationId));c.data&&i.unshift.apply(i,le(c.data))}if(!a.data||!t.data)return u.createElement(u.Fragment,null);var l=ue("series",{seriesName:n.data.name});return u.createElement(u.Fragment,null,u.createElement(p.BannerHeader,{heading:l,banner:null,imageCdnUrl:t.data.imageCdnUrl,backButtonAppLink:{application:o.DEFAULT,action:r.Default.HOME},backButtonText:"Home",actions:[{label:s.LanguageService.getPhrase("shared.series","share"),appLink:{application:o.DEFAULT,action:"index"},svgName:p.cvSvgLibrary.Share,className:"btn btn-light mr-2",button:!0},{label:s.LanguageService.getPhrase("shared.series","follow"),appLink:{application:o.DEFAULT,action:"index"},svgName:p.cvSvgLibrary.Edit,className:"btn btn-light",button:!0}]}),u.createElement("div",null,u.createElement("div",{className:"border-bottom py-3 mb-3"},e.classificationId&&i.length<2?u.createElement(p.PartialBreadcrumbs,null):u.createElement(p.Breadcrumbs,{currentItem:n.data,type:p.BreadcrumbType.Static,getItemAppLink:se,data:i,rootItem:{label:ue("dashboard"),appLink:{application:o.DEFAULT,action:r.Default.HOME}}}),n.data.description&&u.createElement("p",{className:"pt-3"},n.data.description)),a.data?a.isFetching?u.createElement(p.PartialVideoList,null):u.createElement(p.VideoList,{videos:a.data.data,cursors:a.data.pagination.cursors,getVideoAppLink:pe,getSeriesAppLink:fe}):u.createElement(u.Fragment,null,"Empty State")))}var de=n(5),ye=n.n(de);function he(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var n=[],a=!0,r=!1,o=void 0;try{for(var i,c=e[Symbol.iterator]();!(a=(i=c.next()).done)&&(n.push(i.value),!t||n.length!==t);a=!0);}catch(e){r=!0,o=e}finally{try{a||null==c.return||c.return()}finally{if(r)throw o}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var ve=function(e){var t=e.showNav,n=e.contentChild,a=e.popupChild,r=e.alertChild,o=he(u.useState(!1),2),i=o[0],c=o[1],l=Object(p.useMediaQuery)(p.MediaQueryStrings.XS),s=Object(p.useMediaQuery)(p.MediaQueryStrings.SM),f=Object(p.useMediaQuery)(p.MediaQueryStrings.XLG);u.useEffect((function(){c(!f)}),[f]);var m=function(e,t,n){return t?{state:e?F.Hidden:F.Open,showMask:!e,contentClass:ye.a.hiddenNavContent}:n?{state:e?F.Collapsed:F.Open,showMask:!e,contentClass:ye.a.collapsedNavContent}:{state:e?F.Collapsed:F.Open,showMask:!1,contentClass:e?ye.a.collapsedNavContent:ye.a.openNavContent}}(i,l,s);return u.createElement(u.Fragment,null,u.createElement(T,{toggleLeftNav:function(){c(!i)},showLeftNavToggle:t}),t&&u.createElement(I,{navState:m.state}),u.createElement("div",{className:"".concat(ye.a.content," ").concat(m.contentClass)},u.createElement("div",{className:"container"},n)),a,r,m.showMask&&u.createElement("div",{className:"modal-backdrop show ".concat(ye.a.mask)}),u.createElement(q,null))};function be(e){return u.createElement(f.Provider,{store:e.store},u.createElement(B,null,u.createElement(ve,Object.assign({},e))))}var ge=n(11),Ee=n.n(ge);function Le(e){return(Le="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})(e)}function Se(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function we(e,t){return!t||"object"!==Le(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Pe(e,t,n){return(Pe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var a=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Ne(e)););return e}(e,t);if(a){var r=Object.getOwnPropertyDescriptor(a,t);return r.get?r.get.call(n):r.value}})(e,t,n||e)}function Ne(e){return(Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Oe(e,t){return(Oe=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var ke=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=we(this,Ne(t).call(this,e))).childComponents={},n}var n,a,r;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Oe(e,t)}(t,e),n=t,r=[{key:"getCacheKey",value:function(e){return"".concat(c.TEACHER_LAYOUT,":").concat(e.showNav)}}],(a=[{key:"regions",value:function(){return{layout:{el:".layout-region",replaceEl:!0},"search-bar":{el:".search-bar-region",replaceEl:!0}}}},{key:"getChildComponents",value:function(){return{showNav:this.options.showNav,contentChild:this.childComponents[i.CONTENT],popupChild:this.childComponents[i.POPUP],alertChild:this.childComponents[i.ALERT],store:this.options.store}}},{key:"getSearchModel",value:function(){return s.ViewModelService.get("search",{ctor:p.Query})}},{key:"unsetRegion",value:function(e){delete this.childComponents[e],this.renderLayout()}},{key:"closePopup",value:function(){this.unsetRegion(i.POPUP)}},{key:"showChildView",value:function(e,t){this.childComponents[e]=t,this.renderLayout()}},{key:"renderLayout",value:function(){Pe(Ne(t.prototype),"showChildView",this).call(this,"layout",u.createElement(be,Object.assign({},this.getChildComponents()))),this.renderSearchBar()}},{key:"renderSearchBar",value:function(){Pe(Ne(t.prototype),"showChildView",this).call(this,"search-bar",new p.SearchBarView({model:this.getSearchModel()}))}},{key:"title",get:function(){return!1}},{key:"name",get:function(){return"TeacherLayoutView"}},{key:"template",get:function(){return Ee.a}}])&&Se(n.prototype,a),r&&Se(n,r),t}(s.ReactLayoutView);function Ce(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}var Ae=function(e,t){return{url:"/api/domain/v2/objects/".concat(e,"?query=").concat(p.SharedWithStatements.SERIES),key:"series:".concat(e),success:t}},Te=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t.store}var t,n,a;return t=e,(n=[{key:"getSeries",value:function(e,t){var n=Ae(e,(function(e){return t&&t(new s.Core.Model(e))})),a=s.Flight.getResponse(this.store.getState(),n.key);return a.shouldFetch&&s.Flight.fetch(this.store.dispatch,n),a.data&&new s.Core.Model(a.data)}},{key:"name",get:function(){return p.SharedDataServices.SERIES}},{key:"channelName",get:function(){return p.SharedDataChannels.SERIES}}])&&Ce(t.prototype,n),a&&Ce(t,a),e}(),Fe=n(8);function _e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}var De=function(e){return{url:"/api/domain/v2/me/libraries?type=customlibrary&type=unpublishedcustomlibrary",key:"libraries",success:e,normalize:!1}},Re=function(e,t){return{url:"/api/domain/v2/objects/".concat(e,"?query=").concat(p.SharedWithStatements.FOLDER),key:"folder:".concat(e),success:t}},je=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.store=t.store}var t,n,a;return t=e,(n=[{key:"getLibraries",value:function(e){var t=this,n=De((function(n){Fe.Radio.channel(t.channelName).trigger("libraries:sync",n),e&&e(new s.Core.Collection(n))})),a=s.Flight.getResponse(this.store.getState(),n.key);return a.shouldFetch&&s.Flight.fetch(this.store.dispatch,n),a.data&&new s.Core.Collection(a.data.map((function(e){return e.data})))}},{key:"getFolder",value:function(e,t){var n=Re(e,(function(e){return t&&t(new s.Core.Model(e))})),a=s.Flight.getResponse(this.store.getState(),n.key);return a.shouldFetch&&s.Flight.fetch(this.store.dispatch,n),a.data&&new s.Core.Model(a.data)}},{key:"name",get:function(){return p.SharedDataServices.LIBRARY}},{key:"channelName",get:function(){return"library:data:service"}}])&&_e(t.prototype,n),a&&_e(t,a),e}();function xe(){return u.createElement("div",{style:{height:"3000px"}},u.createElement("h1",null,"Hello World"),u.createElement(p.AppLink,{appLink:{application:o.DEFAULT,action:"play:video",args:["9122777"]}},"Play page 1"),u.createElement(p.AppLink,{appLink:{application:o.DEFAULT,action:"play:video",args:["3713435"]}},"Play page 2"))}function Ie(){return u.createElement(u.Fragment,null,u.createElement("h1",null,"Not Found"))}function Ue(e){return(Ue="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})(e)}function Ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Me(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Be(e,t,n){return t&&Me(e.prototype,t),n&&Me(e,n),e}function Ye(e,t){return!t||"object"!==Ue(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function He(e){return(He=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function qe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ze(e,t)}function ze(e,t){return(ze=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var Qe=function(e){function t(){return Ve(this,t),Ye(this,He(t).apply(this,arguments))}return qe(t,e),Be(t,[{key:"channelName",get:function(){return o.DEFAULT}},{key:"appRoutes",get:function(){return{"":"index","videos/:id":"playVideo","my-uploads":"myUploads","series/:id":"series","*path":"catchAllRoutes"}}},{key:"appLinks",get:function(){return["notFound"]}}]),t}(s.Core.AppRouter),Je=function(e){function t(){return Ve(this,t),Ye(this,He(t).apply(this,arguments))}return qe(t,e),Be(t,[{key:"index",value:function(){this.layout.showChildView(i.CONTENT,u.createElement(xe,null))}},{key:"playVideo",value:function(e){this.layout.showChildView(i.CONTENT,u.createElement(ae,{id:e}))}},{key:"myUploads",value:function(e){this.layout.showChildView(i.CONTENT,u.createElement(ce,{cursor:e.cursor}))}},{key:"series",value:function(e,t){this.layout.showChildView(i.CONTENT,u.createElement(me,{id:e,cursor:t.cursor}))}},{key:"catchAllRoutes",value:function(){this.layout.showChildView(i.CONTENT,u.createElement(Ie,null))}},{key:"notFound",value:function(){this.layout.showChildView(i.CONTENT,u.createElement(Ie,null))}},{key:"name",get:function(){return"Default Application"}},{key:"layoutOptions",get:function(){return{name:c.TEACHER_LAYOUT,options:{showNav:!0}}}},{key:"channelName",get:function(){return o.DEFAULT}}],[{key:"router",get:function(){return Qe}}]),t}(s.Core.Application);function We(e){return(We="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})(e)}function Xe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ge(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function Ke(e,t,n){return t&&Ge(e.prototype,t),n&&Ge(e,n),e}function Ze(e,t){return!t||"object"!==We(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function $e(e){return($e=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function et(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&tt(e,t)}function tt(e,t){return(tt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var nt=function(e){function t(){return Xe(this,t),Ze(this,$e(t).apply(this,arguments))}return et(t,e),Ke(t,[{key:"channelName",get:function(){return o.PLAYLISTS}},{key:"appRoutes",get:function(){return{"playlists(/)":"index","playlists/:id(/)":"playlist"}}},{key:"appLinks",get:function(){return["newPlaylist","editPlaylist","deletePlaylist","removeVideoFromPlaylist"]}}]),t}(s.Core.AppRouter),at=function(e){function t(){return Xe(this,t),Ze(this,$e(t).apply(this,arguments))}return et(t,e),Ke(t,[{key:"index",value:function(){this.layout.showChildView(i.CONTENT,u.createElement(a.PlaylistsContextProvider,null,u.createElement(a.PlaylistsView,{getPlaylistAppLink:function(e){return{application:o.PLAYLISTS,action:r.Playlists.PLAYLIST,args:[e.id]}}})))}},{key:"playlist",value:function(e){this.layout.showChildView(i.CONTENT,u.createElement(a.PlaylistView,{playlistId:e,application:o.PLAYLISTS,getVideoAppLink:function(e){return{application:o.DEFAULT,action:"play:video",args:[e.id]}},getSeriesAppLink:function(e){return{application:o.PLAYLISTS,action:r.Playlists.HOME}},allowEdit:!0}))}},{key:"newPlaylist",value:function(){var e=this;this.layout.showChildView(i.POPUP,u.createElement(a.NewPlaylistView,{application:o.PLAYLISTS,closePopup:function(){return e.layout.closePopup()}}))}},{key:"editPlaylist",value:function(e){var t=this;this.layout.showChildView(i.POPUP,u.createElement(a.EditPlaylistView,{playlistId:e,closePopup:function(){return t.layout.closePopup()}}))}},{key:"deletePlaylist",value:function(e){var t=this;this.layout.showChildView(i.POPUP,u.createElement(a.DeletePlaylistView,{playlistId:e,routeToOnDelete:{application:o.PLAYLISTS,action:r.Playlists.HOME},closePopup:function(){return t.layout.closePopup()}}))}},{key:"removeVideoFromPlaylist",value:function(e,t){var n=this;this.layout.showChildView(i.POPUP,u.createElement(a.RemoveVideoFromPlaylistView,{videoId:e,playlistId:t,closePopup:function(){return n.layout.closePopup()}}))}},{key:"onShowAlert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.collection,n=t?t.toJSON():[],a=function(e){return Fe.Radio.channel(s.CommonChannels.ALERT).trigger("remove:alert",e)};this.layout.showChildView(i.ALERT,u.createElement(p.AlertList,{alerts:n,removeAlert:a}))}},{key:"name",get:function(){return"Playlists Application"}},{key:"layoutOptions",get:function(){return{name:c.TEACHER_LAYOUT,options:{showNav:!0}}}},{key:"channelName",get:function(){return o.PLAYLISTS}}],[{key:"router",get:function(){return nt}}]),t}(s.Core.Application);function rt(e){return(rt="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})(e)}function ot(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function it(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function ct(e,t){return!t||"object"!==rt(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function lt(e){return(lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function ut(e,t){return(ut=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var st=function(e){function t(){return ot(this,t),ct(this,lt(t).apply(this,arguments))}var n,a,i;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ut(e,t)}(t,e),n=t,(a=[{key:"appLinks",get:function(){return{searchResults:{application:o.DEFAULT,action:r.Default.MY_UPLOADS,args:[1]},series:{application:o.DEFAULT,action:r.Default.MY_UPLOADS,args:[1]},videoDetails:{application:o.DEFAULT,action:r.Default.MY_UPLOADS,args:[1]},tagSearch:{application:o.DEFAULT,action:r.Default.MY_UPLOADS,args:[1]},topic:{application:o.DEFAULT,action:r.Default.MY_UPLOADS,args:[1]}}}}])&&it(n.prototype,a),i&&it(n,i),t}(p.BaseSearchAppVariables);n.d(t,"Actions",(function(){return r})),n.d(t,"AppChannels",(function(){return o})),n.d(t,"LayoutRegions",(function(){return i})),n.d(t,"Layouts",(function(){return c})),n.d(t,"WithStatements",(function(){return l})),n.d(t,"TeacherLayoutView",(function(){return ke})),n.d(t,"FlightSeriesDataService",(function(){return Te})),n.d(t,"FlightLibraryDataService",(function(){return je})),n.d(t,"DefaultApplication",(function(){return Je})),n.d(t,"PlaylistsApplication",(function(){return at})),n.d(t,"SearchAppVariables",(function(){return st}))}])}));
package/dist/en.json CHANGED
@@ -1 +1 @@
1
- {"shared":{"notFound":{"title":"Page not found"},"leftNav":{"home":"Home","myPlaylists":"My Playlists","myUploads":"My Uploads","following":"Following","favouritedVideos":"Favourited Videos","myClassrooms":"My Classrooms","watchHistory":"Watch History"},"myUploads":{"header":"My Uploads","description":"Here we store all the videos that you upload on to ClickView!","share":"Share","edit":"Edit"}}}
1
+ {"shared":{"notFound":{"title":"Page not found"},"leftNav":{"home":"Home","myPlaylists":"My Playlists","myUploads":"My Uploads","following":"Following","favouritedVideos":"Favourited Videos","myClassrooms":"My Classrooms","watchHistory":"Watch History"},"myUploads":{"header":"My Uploads","description":"Here we store all the videos that you upload on to ClickView!","share":"Share","edit":"Edit"},"series":{"dashboard":"Dashboard","series":"Series: %{seriesName}","share":"Share","follow":"Follow"}}}
package/dist/index.d.ts CHANGED
@@ -1,11 +1,14 @@
1
1
  import './shared/errors/not-found/not-found.lang.json';
2
2
  import './shared/views/left-nav/left-nav-view.lang.json';
3
3
  import './shared/views/my-uploads/my-uploads-view.lang.json';
4
+ import './shared/views/series/series-view.lang.json';
4
5
  import './styles';
5
6
  /**
6
7
  * Files that are needed by outside projects. E.g. applications, services.
7
8
  */
8
9
  export * from './shared/constants';
9
10
  export * from './shared/layouts';
11
+ export * from './shared/services';
10
12
  export * from './apps/default/LiteDefaultApplication';
11
13
  export * from './apps/playlists/LitePlaylistsApplication';
14
+ export * from './apps/search/constants/SearchAppVariables';
package/dist/lite-app.css CHANGED
@@ -1,6 +1,6 @@
1
1
  body{background-color:#fff}
2
2
 
3
- ._3RLQ9{background-color:#fff;border-bottom:1px solid #eaeaea;z-index:1002}.UIlc9{min-width:12rem;width:13.75rem;height:2.92062rem}._2E7RQ{padding-right:18.75rem}._2HygL{right:0}._2OoYm{border-radius:50%;background-color:#51ADA3;display:inline-block;width:2.1875rem;height:2.1875rem;text-align:center;line-height:2.1875rem;background-size:cover;background-position:top center}._2b7ER{border-radius:50%;display:inline-block;background-color:#eaeaea;width:2.1875rem;height:2.1875rem;text-align:center;line-height:2.1875rem;background-size:cover;background-position:top center}._2BRko{color:#eaeaea;height:1.25rem;width:1.25rem;margin-right:1.25rem;cursor:pointer;display:inline-block}._2BRko svg{width:100% !important;height:100% !important}
3
+ ._3RLQ9{background-color:#fff;border-bottom:1px solid #eaeaea;z-index:1002}.UIlc9{min-width:12rem;width:13.75rem;height:2.92062rem}._2E7RQ{padding-right:18.75rem}._2HygL{right:0}._2OoYm{border-radius:50%;background-color:#51ADA3;display:inline-block;width:2.1875rem;height:2.1875rem;text-align:center;line-height:2.1875rem;background-size:cover;background-position:top center}._2b7ER{border-radius:50%;display:inline-block;background-color:#eaeaea;width:2.1875rem;height:2.1875rem;text-align:center;line-height:2.1875rem;background-size:cover;background-position:top center}._2BRko{color:#eaeaea;height:1.25rem;width:1.25rem;margin-right:1.25rem;cursor:pointer;display:inline-block}._2BRko svg{width:100% !important;height:100% !important}.oX-Ph{border:2px solid #eaeaea;max-width:40rem;margin-right:40rem;border-radius:3px;padding:0}
4
4
 
5
5
  ._3jVyN{top:4.25rem;bottom:0;position:fixed;width:15rem;background-color:#fff;border-right:1px solid #eaeaea;z-index:1001}._1ud9G{border-radius:50%;background-color:#eaeaea;width:3rem;height:3rem;position:absolute;left:1.25rem;display:inline-block}._3A_-8{position:relative;min-height:3rem}._3qbRh{padding-left:5.5rem;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);display:inline-block}._2idO9{width:5.5rem}._2idO9 ._1ud9G{position:relative;left:auto;margin:0 1.25rem}._2idO9 ._3qbRh{position:relative;padding-left:0;text-align:center;top:auto;-webkit-transform:none;transform:none;display:block}
6
6
 
@@ -1,6 +1,8 @@
1
1
  export declare const Actions: {
2
2
  Default: {
3
+ HOME: string;
3
4
  MY_UPLOADS: string;
5
+ SERIES: string;
4
6
  };
5
7
  Playlists: {
6
8
  HOME: string;
@@ -8,5 +10,6 @@ export declare const Actions: {
8
10
  NEW_PLAYLIST: string;
9
11
  EDIT_PLAYLIST: string;
10
12
  DELETE_PLAYLIST: string;
13
+ REMOVE_VIDEO_FROM_PLAYLIST: string;
11
14
  };
12
15
  };
@@ -1,4 +1,4 @@
1
1
  export declare const WithStatements: {
2
- VIDEOS: string;
3
- WORKSPACE_VIDEOS: string;
2
+ VIDEO_COLLECTION: string;
3
+ VIDEO: string;
4
4
  };
@@ -0,0 +1,6 @@
1
+ import { Flight } from '@clickview/common';
2
+ export declare const SeriesRequests: {
3
+ series(id: string): Flight.Request;
4
+ seriesVideos(id: string, cursor: string): Flight.Request;
5
+ breadcrumbs(classificationId: string): Flight.Request;
6
+ };
@@ -1,3 +1,4 @@
1
1
  export * from './UserRequests';
2
2
  export * from './ConfigRequests';
3
3
  export * from './VideoRequests';
4
+ export * from './SeriesRequests';
@@ -16,8 +16,10 @@ export declare class TeacherLayoutView extends ReactLayoutView {
16
16
  static getCacheKey(options: TeacherLayoutViewOptions): string;
17
17
  regions(): ObjectHash;
18
18
  private getChildComponents;
19
+ private getSearchModel;
19
20
  protected unsetRegion(region: string): void;
20
21
  closePopup(): void;
21
22
  showChildView(region: string, component: React.ReactElement): void;
22
23
  renderLayout(): void;
24
+ private renderSearchBar;
23
25
  }
@@ -0,0 +1,15 @@
1
+ import { Store } from 'redux';
2
+ import { Core } from '@clickview/common';
3
+ import { BaseLibraryDataService } from '@clickview/shared';
4
+ interface FlightLibraryDataServiceOptions {
5
+ store: Store;
6
+ }
7
+ export declare class FlightLibraryDataService implements BaseLibraryDataService {
8
+ private store;
9
+ constructor(options: FlightLibraryDataServiceOptions);
10
+ get name(): string;
11
+ get channelName(): string;
12
+ getLibraries(callback?: (data: Core.Collection) => void): Core.Collection;
13
+ getFolder(id: string, callback?: (data: Core.Model) => void): Core.Model;
14
+ }
15
+ export {};
@@ -0,0 +1,14 @@
1
+ import { Store } from 'redux';
2
+ import { Core } from '@clickview/common';
3
+ import { BaseSeriesDataService } from '@clickview/shared';
4
+ interface FlightSeriesDataServiceOptions {
5
+ store: Store;
6
+ }
7
+ export declare class FlightSeriesDataService implements BaseSeriesDataService {
8
+ private store;
9
+ constructor(options: FlightSeriesDataServiceOptions);
10
+ get name(): string;
11
+ get channelName(): string;
12
+ getSeries(id: string, callback?: (data: Core.Model) => void): Core.Model;
13
+ }
14
+ export {};
@@ -0,0 +1,2 @@
1
+ export * from './FlightSeriesDataService';
2
+ export * from './FlightLibraryDataService';
@@ -0,0 +1,3 @@
1
+ import { Core } from '@clickview/common';
2
+ import { Video, VideoAction } from '@clickview/shared';
3
+ export declare function getVideoActionAppLink(video: Video, action: VideoAction): Core.AppLink;
@@ -0,0 +1 @@
1
+ export * from './LiteAppLinkUtils';
@@ -2,3 +2,4 @@ export * from './header/HeaderView';
2
2
  export * from './left-nav/LeftNavView';
3
3
  export * from './play/PlayView';
4
4
  export * from './my-uploads/MyUploadsView';
5
+ export * from './series/SeriesView';
@@ -1,4 +1,3 @@
1
- export * from './BackButton';
2
1
  export * from './Badges';
3
2
  export * from './Buttons';
4
3
  export * from './VideoTitle';
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ interface SeriesViewProps {
3
+ id: string;
4
+ classificationId?: string;
5
+ cursor?: string;
6
+ }
7
+ export declare function SeriesView(props: SeriesViewProps): JSX.Element;
8
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickview/lite",
3
- "version": "0.0.2-alpha.3",
3
+ "version": "0.0.2-alpha.4",
4
4
  "description": "ClickView Lite",
5
5
  "main": "dist/bundle.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,14 +20,14 @@
20
20
  "author": "Joshua Taylor, Shale Kuzmanovski, Matt Trengrove, Michael McDonnell",
21
21
  "license": "ISC",
22
22
  "devDependencies": {
23
- "@clickview/tooling": "0.0.11-alpha.3",
23
+ "@clickview/tooling": "0.0.11-alpha.4",
24
24
  "@types/react-custom-scrollbars": "4.0.6"
25
25
  },
26
26
  "dependencies": {
27
- "@clickview/common": "1.0.1-alpha.3",
28
- "@clickview/playlists": "1.0.1-alpha.3",
29
- "@clickview/shared": "1.0.1-alpha.3",
30
- "@clickview/styles": "1.0.1-alpha.3",
27
+ "@clickview/common": "1.0.1-alpha.4",
28
+ "@clickview/playlists": "1.0.1-alpha.4",
29
+ "@clickview/shared": "1.0.1-alpha.4",
30
+ "@clickview/styles": "1.0.1-alpha.4",
31
31
  "react-custom-scrollbars": "4.2.1"
32
32
  },
33
33
  "babel": {
@@ -1,2 +0,0 @@
1
- import * as React from 'react';
2
- export declare function BackButton(): React.ReactElement;