@clickview/library-editor 1.21.1-rc.3 → 1.22.1
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/.eslintrc.json +2 -2
- package/dist/bundles.json +2 -2
- package/dist/css/{library-editor-app-c3b8314c2a.css → library-editor-app-a25270bc2a.css} +1 -1
- package/dist/languages/en.json +1 -1
- package/dist/scripts/1010-75eddc83df.chunk.js +1 -0
- package/dist/scripts/{1086-753763725a.chunk.js → 1086-0d272fa94d.chunk.js} +1 -1
- package/dist/scripts/{1216-bf65bae6ca.chunk.js → 1216-7443ea7302.chunk.js} +1 -1
- package/dist/scripts/{1269-6c2e9b6e3c.chunk.js → 1269-971020275d.chunk.js} +1 -1
- package/dist/scripts/{1364-e7f93e86b7.chunk.js → 1364-12c4c2bf8c.chunk.js} +1 -1
- package/dist/scripts/{1409-09c643fb81.chunk.js → 1409-50dc6173b0.chunk.js} +1 -1
- package/dist/scripts/{1492-cd44171a52.chunk.js → 1492-7be750f218.chunk.js} +1 -1
- package/dist/scripts/{1601-973e50fc0a.chunk.js → 1601-43daf29a76.chunk.js} +2 -2
- package/dist/scripts/{1832-c5f981c3f1.chunk.js → 1832-adad7c94aa.chunk.js} +1 -1
- package/dist/scripts/{1887-af4ffa7492.chunk.js → 1887-2a0d9adae2.chunk.js} +1 -1
- package/dist/scripts/{1911-4e682465f2.chunk.js → 1911-29bc4ac93a.chunk.js} +1 -1
- package/dist/scripts/{2417-54c874fcea.chunk.js → 2417-760802f23b.chunk.js} +1 -1
- package/dist/scripts/{243-c1baf38614.chunk.js → 243-526ca9b38d.chunk.js} +1 -1
- package/dist/scripts/{259-c0e17226ce.chunk.js → 259-5d20b19b71.chunk.js} +1 -1
- package/dist/scripts/{2692-39c5596fae.chunk.js → 2692-fbfd44474a.chunk.js} +1 -1
- package/dist/scripts/{2774-cb4da268d8.chunk.js → 2774-53da2e7ca3.chunk.js} +1 -1
- package/dist/scripts/{2888-e89aa6d2ec.chunk.js → 2888-04e04c9f5f.chunk.js} +1 -1
- package/dist/scripts/{299-ff283cd302.chunk.js → 299-bbb7822314.chunk.js} +1 -1
- package/dist/scripts/{3096-d0d0562322.chunk.js → 3096-9239b37232.chunk.js} +1 -1
- package/dist/scripts/{3400-490d569d7b.chunk.js → 3400-8d975420e4.chunk.js} +1 -1
- package/dist/scripts/{3763-484e998697.chunk.js → 3763-63566d304b.chunk.js} +1 -1
- package/dist/scripts/{4177-876bddb70e.chunk.js → 4177-34f0df9c5f.chunk.js} +1 -1
- package/dist/scripts/{4201-32f6ecdb73.chunk.js → 4201-17bf1b7bc7.chunk.js} +1 -1
- package/dist/scripts/{4245-1b17d6cc40.chunk.js → 4245-203da19753.chunk.js} +1 -1
- package/dist/scripts/{4591-c45a73bb85.chunk.js → 4591-e353e6a27a.chunk.js} +1 -1
- package/dist/scripts/{4860-c11ea3fe12.chunk.js → 4860-f6797eaeba.chunk.js} +1 -1
- package/dist/scripts/{4885-4300082a41.chunk.js → 4885-c1015930a3.chunk.js} +1 -1
- package/dist/scripts/{514-6d760cc4ac.chunk.js → 514-c6838c7964.chunk.js} +1 -1
- package/dist/scripts/{5412-6a0a1510ab.chunk.js → 5412-5011ba4acc.chunk.js} +1 -1
- package/dist/scripts/{5418-ad39e605a0.chunk.js → 5418-05351c0fbf.chunk.js} +1 -1
- package/dist/scripts/{5424-8d9bd46dea.chunk.js → 5424-6c332bc29f.chunk.js} +1 -1
- package/dist/scripts/{5747-4ea0a28a50.chunk.js → 5747-cda79581ed.chunk.js} +1 -1
- package/dist/scripts/{6093-4f3bdb8793.chunk.js → 6093-ca4d7b4b6b.chunk.js} +1 -1
- package/dist/scripts/6220-b7f05d0711.chunk.js +1 -0
- package/dist/scripts/{6254-0dba6e471a.chunk.js → 6254-b06072a076.chunk.js} +1 -1
- package/dist/scripts/{6277-5a2cf1ba53.chunk.js → 6277-625693cf57.chunk.js} +2 -2
- package/dist/scripts/{6357-4eb8e929ee.chunk.js → 6357-7bdd5610a9.chunk.js} +1 -1
- package/dist/scripts/{6505-d1d26acaa7.chunk.js → 6505-219be2386f.chunk.js} +1 -1
- package/dist/scripts/{6732-051facb7f2.chunk.js → 6732-1e78593b37.chunk.js} +1 -1
- package/dist/scripts/{6756-420cdea12e.chunk.js → 6756-c6f24c2739.chunk.js} +1 -1
- package/dist/scripts/{6774-10008c90af.chunk.js → 6774-cd56290f70.chunk.js} +1 -1
- package/dist/scripts/{6995-79cb3a5899.chunk.js → 6995-df4c762809.chunk.js} +1 -1
- package/dist/scripts/6999-4914418ece.chunk.js +1 -0
- package/dist/scripts/{7002-504b356a5c.chunk.js → 7002-aac70e46a6.chunk.js} +1 -1
- package/dist/scripts/{7053-db29c86b42.chunk.js → 7053-afce329751.chunk.js} +1 -1
- package/dist/scripts/{708-043ccede57.chunk.js → 708-dee7822f44.chunk.js} +1 -1
- package/dist/scripts/{7376-94aa49d108.chunk.js → 7376-442dffad8f.chunk.js} +1 -1
- package/dist/scripts/{7634-cd9e9f5d3a.chunk.js → 7634-b052bb7963.chunk.js} +1 -1
- package/dist/scripts/{8362-b6fbc2d32c.chunk.js → 8362-2007a7d725.chunk.js} +1 -1
- package/dist/scripts/{8622-96f732d9cf.chunk.js → 8622-4d10d89a0d.chunk.js} +1 -1
- package/dist/scripts/{8727-9a923c4820.chunk.js → 8727-85b4c8d1e5.chunk.js} +1 -1
- package/dist/scripts/{8762-652f4cafd5.chunk.js → 8762-6ad20d8042.chunk.js} +1 -1
- package/dist/scripts/{8906-fd50c53320.chunk.js → 8906-613b8f3fa6.chunk.js} +1 -1
- package/dist/scripts/{8947-40a2c48b97.chunk.js → 8947-aef6bab624.chunk.js} +1 -1
- package/dist/scripts/{9357-3bf3ca6c51.chunk.js → 9357-f3fbd4ec1b.chunk.js} +1 -1
- package/dist/scripts/9382-274269118e.chunk.js +1 -0
- package/dist/scripts/{9695-d74a71dffd.chunk.js → 9695-b3e32d55e0.chunk.js} +1 -1
- package/dist/scripts/{1281-c46dc05565.chunk.js → 9828-4c9b5aae16.chunk.js} +1 -1
- package/dist/scripts/{9927-47808e1cea.chunk.js → 9927-6d852052c7.chunk.js} +1 -1
- package/dist/scripts/{9976-9743099e1c.chunk.js → 9976-e60bf244bc.chunk.js} +1 -1
- package/dist/scripts/bundle-54310ddab2.min.js +2 -0
- package/package.json +74 -74
- package/typings/libs/CVEvents.d.ts +12 -12
- package/typings/libs/CVLanguages.d.ts +24 -24
- package/typings/libs/Environment.d.ts +10 -10
- package/typings/libs/LazyLoad.d.ts +29 -29
- package/typings/libs/LazyLoad.ts +27 -27
- package/typings/libs/backbone.validation.d.ts +99 -99
- package/typings/libs/cloneDeep.d.ts +4 -4
- package/typings/libs/cookiesjs.d.ts +24 -24
- package/typings/libs/google-api.d.ts +4 -4
- package/typings/libs/microsoft-teams.d.ts +2 -2
- package/typings/libs/trackjs.d.ts +2 -2
- package/typings/libs/videojs-contrib-quality-levels.d.ts +30 -30
- package/typings/utils/imports.d.ts +9 -9
- package/dist/scripts/1010-7f03566c09.chunk.js +0 -1
- package/dist/scripts/6220-2ea178e5fb.chunk.js +0 -1
- package/dist/scripts/6999-e7e623c947.chunk.js +0 -1
- package/dist/scripts/9897-4affda82ec.chunk.js +0 -1
- package/dist/scripts/bundle-5688261e36.min.js +0 -2
- /package/dist/scripts/{101-1eeff47605.chunk.js → 101-e82c8481e6.chunk.js} +0 -0
- /package/dist/scripts/{1601-973e50fc0a.chunk.js.LICENSE.txt → 1601-43daf29a76.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2803-342b499819.chunk.js → 2803-e4af79b26a.chunk.js} +0 -0
- /package/dist/scripts/{3639-528131bdac.chunk.js → 3639-0c4394da2f.chunk.js} +0 -0
- /package/dist/scripts/{3746-9260f94a0f.chunk.js → 3746-855b2f8932.chunk.js} +0 -0
- /package/dist/scripts/{3969-d27d0571c4.chunk.js → 3969-be8bfb8b49.chunk.js} +0 -0
- /package/dist/scripts/{5235-a2c89ffb8c.chunk.js → 5235-5bd02c9862.chunk.js} +0 -0
- /package/dist/scripts/{5891-b2b28439b2.chunk.js → 5891-ac61e4df95.chunk.js} +0 -0
- /package/dist/scripts/{6277-5a2cf1ba53.chunk.js.LICENSE.txt → 6277-625693cf57.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6963-fa53496a45.chunk.js → 6963-455620057f.chunk.js} +0 -0
- /package/dist/scripts/{7190-84626d4165.chunk.js → 7190-5ed7ca013f.chunk.js} +0 -0
- /package/dist/scripts/{7433-b8397bc971.chunk.js → 7433-1372c3147d.chunk.js} +0 -0
- /package/dist/scripts/{8114-774b080bab.chunk.js → 8114-faf797626f.chunk.js} +0 -0
- /package/dist/scripts/{bundle-5688261e36.min.js.LICENSE.txt → bundle-54310ddab2.min.js.LICENSE.txt} +0 -0
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import videojs from 'video.js';
|
|
2
|
-
|
|
3
|
-
declare module 'video.js' {
|
|
4
|
-
export interface VideoJsPlayer {
|
|
5
|
-
qualityLevels(): QualityLevelList;
|
|
6
|
-
nextVideoPlugin(): any;
|
|
7
|
-
resourcesPlugin(options: ResourcesPluginOptions): void;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
declare module 'videojs-contrib-quality-levels' {
|
|
12
|
-
export interface QualityLevelList extends videojs.EventTarget {
|
|
13
|
-
[id: string]: QualityLevel;
|
|
14
|
-
selectedIndex: number;
|
|
15
|
-
length: number;
|
|
16
|
-
addQualityLevel(representation: Representation): QualityLevel;
|
|
17
|
-
removeQualityLevel(qualityLevel: QualityLevel): QualityLevel;
|
|
18
|
-
getQualityLevelById(id: string): QualityLevel;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
export interface QualityLevel {
|
|
22
|
-
id: string;
|
|
23
|
-
label: string;
|
|
24
|
-
enabled: boolean;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface Representation {
|
|
28
|
-
id: string;
|
|
29
|
-
enabled(enabled: boolean): boolean;
|
|
30
|
-
}
|
|
1
|
+
import videojs from 'video.js';
|
|
2
|
+
|
|
3
|
+
declare module 'video.js' {
|
|
4
|
+
export interface VideoJsPlayer {
|
|
5
|
+
qualityLevels(): QualityLevelList;
|
|
6
|
+
nextVideoPlugin(): any;
|
|
7
|
+
resourcesPlugin(options: ResourcesPluginOptions): void;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
declare module 'videojs-contrib-quality-levels' {
|
|
12
|
+
export interface QualityLevelList extends videojs.EventTarget {
|
|
13
|
+
[id: string]: QualityLevel;
|
|
14
|
+
selectedIndex: number;
|
|
15
|
+
length: number;
|
|
16
|
+
addQualityLevel(representation: Representation): QualityLevel;
|
|
17
|
+
removeQualityLevel(qualityLevel: QualityLevel): QualityLevel;
|
|
18
|
+
getQualityLevelById(id: string): QualityLevel;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface QualityLevel {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
enabled: boolean;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface Representation {
|
|
28
|
+
id: string;
|
|
29
|
+
enabled(enabled: boolean): boolean;
|
|
30
|
+
}
|
|
31
31
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Define our templates as a module so that we can use
|
|
3
|
-
* import statements just the same as we do for other
|
|
4
|
-
* ts/js code.
|
|
5
|
-
*/
|
|
6
|
-
declare module '*.handlebars';
|
|
7
|
-
declare module '*.hbs';
|
|
8
|
-
declare module '*.scss';
|
|
9
|
-
declare module '*.svg';
|
|
1
|
+
/**
|
|
2
|
+
* Define our templates as a module so that we can use
|
|
3
|
+
* import statements just the same as we do for other
|
|
4
|
+
* ts/js code.
|
|
5
|
+
*/
|
|
6
|
+
declare module '*.handlebars';
|
|
7
|
+
declare module '*.hbs';
|
|
8
|
+
declare module '*.scss';
|
|
9
|
+
declare module '*.svg';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[1010],{51010:function(e,t,n){"use strict";n.r(t),n.d(t,{DisableReviewView:function(){return w}});var r=n(21679),o=n(57857),i=n(31647),a=n(70065),u=n(52076),l=n(88172),c=n(10101),s=n(61843),f=n(19226),p=n(48090),y=n(67670),v=n(17654),b=n.n(v);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 d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(void 0,o=function(e,t){if("object"!==h(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===h(o)?o:String(o)),r)}var o}function g(e,t){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},g(e,t)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var w=function(e){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(k,e);var t,n,v,w,O=(v=k,w=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=m(v);if(w){var n=m(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===h(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function k(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),O.apply(this,arguments)}return t=k,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=r.u.getInstance(p.Or.Settings,this),this.contentUpdatesDataService=r.u.getInstance(p.Or.ContentUpdates,this)}},{key:"name",get:function(){return"DisableReviewView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"template",get:function(){return b()}},{key:"lang",get:function(){return"contentUpdates.disableReview"}},{key:"channelName",get:function(){return s.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{title:o.T.getPhrase(this.lang,"heading"),behaviorClass:c.Yw,spinnerButtonOptions:{model:this.spinnerModel=new y.v,channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"offBtn"),onClick:function(){return e.onClickDisable()}}}]}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.VIDEO,"".concat(p.M_.VIDEOS_TO_REVIEW,":sync"),this.render)}},{key:"videosToReview",value:function(){return!!this.videoCollection&&!!this.videoCollection.length}},{key:"onClickDisable",value:function(){this.videosToReview()?this.approveAllThenDisableReview():this.disableReview(),this.triggerMethod("hide")}},{key:"approveAllThenDisableReview",value:function(){var e=this;this.contentUpdatesDataService.approveAllVideos((function(){return e.disableReview()}))}},{key:"disableReview",value:function(){var e=s.xN.getLibraryReviewOptions(!1);this.settingsDataService.updateSetting(this.currentUser.get("customerId"),e,o.T.getPhrase(this.lang,"disableSuccess"),this.redirectToPastReleases),this.logAction()}},{key:"redirectToPastReleases",value:function(){i.Q.AppLinkHelper.trigger({application:p.OV.CONTENT_UPDATES,action:p.eX.ContentUpdates.PAST_RELEASES})}},{key:"logAction",value:function(){var e={location:a.LocationContext.Popup,actionType:a.UserAction.Disable,entity:a.EntityType.CustomerSetting,descriptor:a.CustomerSettingDescriptor.LibraryReview,workflowPhase:a.WorkflowPhase.Complete},t={approvedCount:this.videoCollection.length};u.k.logUserAction(t,e)}},{key:"requiredResources",get:function(){return{currentUser:f.K.currentUser}}},{key:"onBeforeRender",value:function(){this.videoCollection=this.contentUpdatesDataService.getVideosToReview(),this.videoCollection&&this.spinnerModel.set(l.ZV.Disabled,!1)}},{key:"viewOptions",value:function(){return{videosToReview:this.videosToReview(),dataFetched:!!this.videoCollection,spinnerEl:s.Kp.getSpinner({size:s.Ey.Large,extraClasses:"mx-auto"})}}}])&&d(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),k}(i.Q.View)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return f}});var r=n(31647),o=n(88172);function i(e){return i="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},i(e)}function a(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,l(r.key),r)}}function l(e){var t=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===i(t)?t:String(t)}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function s(e){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(e)}var f=function(e){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(p,e);var t,n,r,l,f=(r=p,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=s(r);if(l){var n=s(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function p(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),f.apply(this,arguments)}return t=p,(n=[{key:"defaults",value:function(){var e;return a(e={},o.ZV.Disabled,!0),a(e,o.ZV.Hidden,!1),e}}])&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.Q.Model)},17654:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\n"},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing,l=e.escapeExpression;return'<p class="m-0 pb-2">'+l((n.lang||t&&t.lang||u).call(a,"noReview",{name:"lang",hash:{},data:o}))+"</p>\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.videosToReview:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+'<p class="m-0">'+l((n.lang||t&&t.lang||u).call(a,"undoInstructions",{name:"lang",hash:{},data:o}))+"</p>\n"},4:function(e,t,n,r,o){return e.propertyIsEnumerable,'<p class="m-0 pb-2">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"automaticApproval",{name:"lang",hash:{},data:o}))+"</p>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;return e.propertyIsEnumerable,null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6220],{26328:function(e,t,i){"use strict";i.r(t),i.d(t,{AwaitingReviewView:function(){return _}});var n=i(39479),r=i(31647),o=i(21679),a=i(57857),s=i(36357),c=i(48090),l=i(70763),u=i(71192),d=i(29457),h=i(14129),f=i(39090),v=i(82405),p=i(13809),g=i(48404),y=i(19226),w=i(46415),b=i(7572),m=i(71010),S=i.n(m),V=i(29565),T=i(95061);function k(e){return k="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},k(e)}function C(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==k(e)||null===e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,"string");if("object"!==k(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(n.key),"symbol"===k(r)?r:String(r)),n)}var r}function E(e,t){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},E(e,t)}function O(e){return O=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},O(e)}var _=function(e){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(P,e);var t,i,m,_,R=(m=P,_=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=O(m);if(_){var i=O(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function P(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,P),R.apply(this,arguments)}return t=P,(i=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=o.u.getInstance(c.Or.Settings,this),this.contentUpdatesDataService=o.u.getInstance(c.Or.ContentUpdates,this),this.videoDataService=o.u.getInstance(c.Or.Video,this)}},{key:"name",get:function(){return"AwaitingReviewView"}},{key:"title",get:function(){return a.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.awaitingReview"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white rounded"}},{key:"template",get:function(){return S()}},{key:"regions",value:function(){return{header:{el:".header-region",replaceElement:!0},leftNav:{el:".left-nav-region",replaceElement:!0},listHeader:{el:".list-header-region",replaceElement:!0,partialLoading:d.LP.AwaitingReviewHeader},videos:{el:".video-list-region",replaceElement:!0,partialLoading:d.LP.VideoGroupList}}}},{key:"bindListeners",value:function(){this.listenTo(c.Vk.SETTINGS,"".concat(c.M_.CUSTOMER_SETTINGS,":sync ").concat(c.M_.USER_SETTINGS,":sync"),this.render),this.listenTo(c.Vk.CONTENT_UPDATES,"".concat(c.M_.VIDEOS_TO_REVIEW,":sync"),this.render),this.listenTo(c.Vk.RESTRICTED_VIDEO,"".concat(c.M_.VIDEOS_TO_REVIEW,":invalidate"),this.fetchVideos),this.listenTo(this.channelName,"approve:all",this.approveAllVideos),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata)}},{key:"approveAllVideos",value:function(){this.contentUpdatesDataService.approveAllVideos(n.bind(this.fetchVideos,this))}},{key:"redirectToPastReleases",value:function(){r.Q.AppLinkHelper.trigger({application:c.OV.CONTENT_UPDATES,action:c.eX.ContentUpdates.PAST_RELEASES},{replace:!0})}},{key:"getContentClassName",value:function(){var e="".concat(V.Z.content," border-left ").concat(V.Z.contentWithLeftNav);return this.videoCollection&&!this.videoCollection.length?e+=" d-inline-flex justify-content-center align-items-center":e+=" d-inline-block",e}},{key:"setVideosWithMetadata",value:function(){this.videoCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new l.t(this.videoCollection.map((function(e){return new u.n({id:e.get("id")})}))))}},{key:"renderHeader",value:function(){this.reviewSetting?this.showChildView("header",new b.u({activeTab:f.JI.AwaitingReview,reviewEnabled:this.reviewSetting.get("value")})):this.renderPartialLoading("header")}},{key:"renderLeftNav",value:function(){this.reviewSetting&&this.showChildView("leftNav",new w.m({supportSiteUrl:this.config.get("supportSiteUrl"),currentUser:this.currentUser}))}},{key:"renderListHeader",value:function(){this.videoCollection?this.videoCollection.length&&this.showChildView("listHeader",new h.U({collection:this.videoCollection,channelName:this.channelName})):this.renderPartialLoading("listHeader")}},{key:"renderVideos",value:function(){this.groupedVideoCollection?this.showChildView("videos",new v.D({collection:this.groupedVideoCollection,childOptions:{videoItemComponentType:p.UC.AwaitingReview,videosWithMetadata:this.videosWithMetadata,config:this.config,collectionViewChannel:this.channelName,currentUser:this.currentUser,libraries:this.libraries},emptyStateType:d.ub.AwaitingReview,emptyStateOptions:{heading:a.T.getPhrase(this.lang,"emptyStateHeading"),description:a.T.getPhrase(this.lang,"emptyStateDescription",{classNames:"disable-review info-link"})}})):this.renderPartialLoading("videos")}},{key:"fetchVideos",value:function(){this.videoCollection=this.contentUpdatesDataService.getVideosToReview(),this.videoCollection&&(this.setVideosWithMetadata(),this.groupedVideoCollection=f.hp.groupVideosByHostedLibrary(this.videoCollection))}},{key:"fetchVideoWithMetadata",value:function(e){var t=this;this.videoDataService.getVideo(e,(function(i){var n=t.videosWithMetadata.get(e);n&&(n.set(i.toJSON()),n.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:g.p.config,currentUser:y.K.currentUser,libraries:T.T.libraries}}},{key:"onBeforeRender",value:function(){this.reviewSetting=this.settingsDataService.getSetting(this.currentUser.get("customerId"),s.E.LibraryReview),this.fetchVideos(),this.reviewSetting&&!this.reviewSetting.get("value")&&this.redirectToPastReleases()}},{key:"viewOptions",value:function(){return{contentClass:this.getContentClassName()}}},{key:"onRender",value:function(){this.renderHeader(),this.renderLeftNav(),this.renderListHeader(),this.renderVideos()}}])&&C(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),P}(r.Q.View)},13809:function(e,t,i){"use strict";i.d(t,{UC:function(){return n.U}});var n=i(58688);i(86605),i(14898)},71010:function(e,t,i){var n=i(32227);e.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(e,t,i,n,r){var o;return e.propertyIsEnumerable,'<div class="header-region"></div>\n<div class="left-nav-region"></div><div class="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.contentClass:o,t))+'">\n<div class="list-header-region"></div>\n<div class="video-list-region"></div>\n</div>'},useData:!0})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6999],{46814:function(e,t,n){"use strict";n.r(t),n.d(t,{PastReleasesView:function(){return K}});var i=n(39479),r=n(31647),o=n(21679),a=n(57857),s=n(70065),l=n(52076),c=n(47022),u=n(36357),f=n(71192),h=n(70763),d=n(29457),p=n(48090),y=n(58688),v=n(48404),g=n(19226),b=n(3059),m=n(95061),w=n(39090),S=(n(14129),n(7572)),C=n(46415),P=n(56750),k=n.n(P),R=n(8614),O=n(7170),E=n(5344);function T(e){return T="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},T(e)}function j(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==T(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==T(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===T(r)?r:String(r)),i)}var r}function V(e,t){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},V(e,t)}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}var L=function(e){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&V(e,t)}(a,e);var t,n,i,r,o=(i=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=_(i);if(r){var n=_(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,e)}return t=a,(n=[{key:"name",get:function(){return"PastReleasesFiltersComponent"}},{key:"template",get:function(){return k()}},{key:"lang",get:function(){return"contentUpdates.pastReleasesFilters"}},{key:"regions",value:function(){return{filterList:{el:".filter-list-region",replaceRegion:!1,partialLoading:d.LP.PastReleasesSearchFilter}}}},{key:"getVisibleFilters",value:function(){return new O.y(this.collection.filter((function(e){return E.qr.showFilter(e)})))}},{key:"renderFilterList",value:function(){var e=new R.$V({collection:this.getVisibleFilters(),channelName:this.options.channelName});this.showChildView("filterList",e)}},{key:"onBeforeRender",value:function(){return!!this.collection}},{key:"onRender",value:function(){this.renderFilterList()}}])&&j(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),N=n(48088),I=n(68536),D=n.n(I);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 U(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==F(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==F(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===F(r)?r:String(r)),i)}var r}function x(e,t){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},x(e,t)}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}var A=function(e){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&x(e,t)}(a,e);var t,n,i,r,o=(i=a,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=M(i);if(r){var n=M(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===F(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function a(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,e)}return t=a,(n=[{key:"name",get:function(){return"PastReleasesHeaderComponent"}},{key:"props",get:function(){return["filterCollection"]}},{key:"lang",get:function(){return"contentUpdates.pastReleasesHeader"}},{key:"className",get:function(){return"d-flex justify-content-between align-items-center p-3 border-bottom"}},{key:"template",get:function(){return D()}},{key:"regions",value:function(){return{filters:{el:".filters-region"}}}},{key:"events",value:function(){return{"click .generate-pdf":"onClickGeneratePdf"}}},{key:"onClickGeneratePdf",value:function(){N.Radio.channel(this.options.channelName).trigger("generate:pdf")}},{key:"renderFilters",value:function(){var e=new L({collection:this.filterCollection,channelName:this.options.channelName});this.showChildView("filters",e)}},{key:"viewOptions",value:function(){return{showGeneratePdf:this.options.showGeneratePdf}}},{key:"onRender",value:function(){this.renderFilters()}}])&&U(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(r.Q.Component),G=n(82405),H=n(73616),Q=n(29565),W=n(69711),B=n.n(W);function q(e){return q="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},q(e)}function z(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,(void 0,r=function(e,t){if("object"!==q(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!==q(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(i.key),"symbol"===q(r)?r:String(r)),i)}var r}function J(e,t){return J=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},J(e,t)}function X(e){return X=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},X(e)}var K=function(e){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&J(e,t)}(O,e);var t,n,P,k,R=(P=O,k=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=X(P);if(k){var n=X(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===q(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function O(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,O),R.call(this,e)}return t=O,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=o.u.getInstance(p.Or.Settings,this),this.contentUpdatesDataService=o.u.getInstance(p.Or.ContentUpdates,this),this.videoDataService=o.u.getInstance(p.Or.Video,this),this.libraryDataService=o.u.getInstance(p.Or.Library,this),this.videoMixinService=o.u.getInstance(p.K9.VideoMixin,this)}},{key:"name",get:function(){return"PastReleasesView"}},{key:"title",get:function(){return a.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.pastReleases"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){return"bg-white rounded"}},{key:"template",get:function(){return B()}},{key:"regions",value:function(){return{header:{el:".header-region",replaceElement:!0},leftNav:{el:".left-nav-region",replaceElement:!0},listHeader:{el:".list-header-region",replaceElement:!0},videos:{el:".video-list-region",replaceElement:!0,partialLoading:d.LP.VideoGroupList},pagination:{el:".pagination-region",replaceElement:!0}}}},{key:"bindListeners",value:function(){this.listenTo(p.Vk.SETTINGS,"".concat(p.M_.CUSTOMER_SETTINGS,":sync ").concat(p.M_.USER_SETTINGS,":sync"),this.render),this.listenTo(this.channelName,"generate:pdf",this.onClickGeneratePdf),this.listenTo(p.Vk.RESTRICTED_VIDEO,"".concat(p.M_.UPDATE_VIDEO_RESTRICTION,":sync"),this.updateRestrictedVideos),this.listenTo(this.channelName,p.Vy.Filters.FILTER_CHANGED,i.debounce(this.onFilterChange,100)),this.listenTo(this.channelName,"fetch:video:with:metadata",this.fetchVideoWithMetadata)}},{key:"initializeFilterCollection",value:function(){var e=this;this.filterCollection||this.libraryDataService.getHostedLibraries((function(t){return e.onLibrariesSync(t)}))}},{key:"onLibrariesSync",value:function(e){var t=this;this.filterCollection||(this.libraryIds=w.RF.getLibraryIds(this.options.queryParams[H.g.Libraries],e),this.subjectCollectionIdentifier=new b.xw({dateQueryString:this.options.queryParams[H.g.ReleaseDate],libraryIds:this.libraryIds}),this.contentUpdatesDataService.getRecentVideoSubjects(this.subjectCollectionIdentifier,(function(n){return t.onSubjectsSync(e,n)})))}},{key:"onSubjectsSync",value:function(e,t){var n=w.RF.getSubjectOptions(t);this.filterCollection=w.RF.getFilterCollection(e,n,this.options.queryParams);var i=w.RF.getSelectedSubjects(this.filterCollection),r=n.length>1&&n.length===i.length;this.videoCollectionIdentifier=new b.IJ({dateQueryString:this.options.queryParams[H.g.ReleaseDate],libraryIds:this.libraryIds,subjects:!r&&i,cursor:this.options.queryParams.cursor}),this.listenTo(p.Vk.CONTENT_UPDATES,"".concat(this.videoCollectionIdentifier.toString(),":sync"),this.render),this.fetchVideos()}},{key:"setVideosWithMetadata",value:function(){this.videoCollection&&!this.videosWithMetadata&&(this.videosWithMetadata=new h.t(this.videoCollection.map((function(e){return new f.n({id:e.get("id")})}))))}},{key:"updateRestrictedVideos",value:function(){var e=this;this.videoMixinService.getAndMixinVideoCollectionRestrictions(this.videoCollection,null,(function(){return e.render()}))}},{key:"onFilterChange",value:function(){r.Q.AppLinkHelper.trigger({application:p.OV.CONTENT_UPDATES,action:p.eX.ContentUpdates.PAST_RELEASES,params:w.RF.getRouteQueryParams(this.filterCollection)})}},{key:"onClickGeneratePdf",value:function(){this.videoCollection.length&&(r.Q.AppLinkHelper.trigger({application:p.OV.CONTENT_UPDATES,action:p.eX.ContentUpdates.GENERATE_PDF,params:w.RF.getRouteQueryParams(this.filterCollection)}),this.logPdfAction())}},{key:"getContentClassName",value:function(){var e=Q.Z.content;return this.reviewSetting&&this.reviewSetting.get("value")?e+=" d-inline-block border-left ".concat(Q.Z.contentWithLeftNav):e+=" w-100",e}},{key:"logPdfAction",value:function(){var e={location:s.LocationContext.PastReleasesHeader,actionType:s.UserAction.Create,entity:s.EntityType.PDF,workflowPhase:s.WorkflowPhase.Start},t=w.RF.getSelectedSubjects(this.filterCollection),n=w.RF.getSelectedReleaseDate(this.filterCollection),i={libraries:this.libraryIds.join(","),subjects:t.map((function(e){return e.get("name")})).join(","),releaseDate:n.get("name")};l.k.logUserAction(i,e)}},{key:"renderHeader",value:function(){this.reviewSetting?this.showChildView("header",new S.u({activeTab:w.JI.PastReleases,reviewEnabled:this.reviewSetting.get("value")})):this.renderPartialLoading("header")}},{key:"renderLeftNav",value:function(){this.reviewSetting&&this.reviewSetting.get("value")&&this.showChildView("leftNav",new C.m({supportSiteUrl:this.config.get("supportSiteUrl"),currentUser:this.currentUser}))}},{key:"renderListHeader",value:function(){this.showChildView("listHeader",new A({filterCollection:this.filterCollection,channelName:this.channelName,showGeneratePdf:!!this.videoCollection&&!!this.videoCollection.length}))}},{key:"renderVideos",value:function(){this.config&&this.groupedVideoCollection?this.showChildView("videos",new G.D({collection:this.groupedVideoCollection,childOptions:{config:this.config,videoItemComponentType:y.U.PastReleases,videosWithMetadata:this.videosWithMetadata,customerHasCustomLibrary:this.customLibraries&&!!this.customLibraries.length,collectionViewChannel:this.channelName,currentUser:this.currentUser,libraries:this.customLibraries},emptyStateType:d.ub.PastReleases,emptyStateOptions:{heading:a.T.getPhrase(this.lang,"emptyState")}})):this.renderPartialLoading("videos")}},{key:"renderPagination",value:function(){if(this.videoCollection){var e=this.contentUpdatesDataService.getVideoCollectionCursors(this.videoCollectionIdentifier),t=new c.Q({cursors:e,appLink:{application:p.OV.CONTENT_UPDATES,action:p.eX.ContentUpdates.PAST_RELEASES,params:w.RF.getRouteQueryParams(this.filterCollection)}});this.showChildView("pagination",t)}}},{key:"fetchVideos",value:function(){this.filterCollection&&!this.videoCollection&&(this.videoCollection=this.contentUpdatesDataService.getRecentVideos(this.videoCollectionIdentifier),this.videoCollection&&(this.setVideosWithMetadata(),this.groupedVideoCollection=w.RF.groupVideosByReleaseMonth(this.videoCollection)))}},{key:"fetchVideoWithMetadata",value:function(e){var t=this;this.videoDataService.getVideo(e,(function(n){var i=t.videosWithMetadata.get(e);i&&(i.set(n.toJSON()),i.set({dataFetched:!0}))}))}},{key:"requiredResources",get:function(){return{config:v.p.config,currentUser:g.K.currentUser,customLibraries:m.T.libraries}}},{key:"onBeforeRender",value:function(){this.initializeFilterCollection(),this.fetchVideos(),this.videoCollection&&(this.groupedVideoCollection=w.RF.groupVideosByReleaseMonth(this.videoCollection)),this.reviewSetting=this.settingsDataService.getSetting(this.currentUser.get("customerId"),u.E.LibraryReview)}},{key:"viewOptions",value:function(){return{showLeftNav:this.reviewSetting&&this.reviewSetting.get("value"),contentClass:this.getContentClassName()}}},{key:"onRender",value:function(){this.renderHeader(),this.renderLeftNav(),this.renderListHeader(),this.renderVideos(),this.renderPagination()}}])&&z(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),O}(r.Q.View)},56750:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){return e.propertyIsEnumerable,'<div class="d-inline-block border-right py-1 pr-3"><strong>'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"filters",{name:"lang",hash:{},data:r}))+'</strong></div>\n<div class="filter-list-region d-inline-block pl-2"></div>'},useData:!0})},68536:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({1:function(e,t,n,i,r){return e.propertyIsEnumerable,'<button class="generate-pdf btn btn-outline-dark d-inline-block" type="button">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"generatePdf",{name:"lang",hash:{},data:r}))+"</button>\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){var o;return e.propertyIsEnumerable,'<div class="filters-region d-inline-block"></div>\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.showGeneratePdf:o,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?o:"")},useData:!0})},69711:function(e,t,n){var i=n(32227);e.exports=(i.default||i).template({1:function(e,t,n,i,r){return'<div class="left-nav-region"></div>'},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){var o;return e.propertyIsEnumerable,'<div class="header-region"></div>\n'+(null!=(o=n.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.showLeftNav:o,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?o:"")+'<div class="'+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.contentClass:o,t))+'">\n<div class="list-header-region"></div>\n<div class="video-list-region"></div>\n<div class="pagination-region"></div>\n</div>'},useData:!0})}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[9897],{54096:function(e,t,n){n.d(t,{G:function(){return a}});var r=n(1024),i=n(21679);function a(e){var t,n;return t=e,n=i.u.getInstance(t),r.useEffect((function(){return function(){i.u.releaseInstance(t)}})),n}},38182:function(e,t,n){n.d(t,{q:function(){return u}});var r=n(1024),i=n.n(r),a=n(68003),o=n(87013),c=n(88483),s={avatar:"Gvwzj",dot:"JJHBJ"};function u(e){var t,n,r=e.imageUrl||(t=e.imageCdnUrl,(n=e.initials)?o.j.createUrl(a._.safeUrlConcat(t,"/v1/profile-images?initials=".concat(n)),{size:c.h2.Small}):"");return i().createElement("div",{className:"position-relative h-100 w-100"},i().createElement("div",{className:"".concat(s.avatar," ").concat((null==e?void 0:e.extraClasses)||""),style:{backgroundImage:"url('".concat(r,"')")}}," "),e.showDot&&i().createElement("div",{className:"".concat(s.dot," rounded-circle bg-danger")}))}},45458:function(e,t,n){n.d(t,{C:function(){return m},g:function(){return r}});var r,i=n(1024),a=n(57857),o=n(21974),c=n(27866),s=n(63946),u=n(39396),l=n(63791),d=n(50028),v=n(45428),p=a.T.encloseNamespace("shared.badges");function m(e){var t=e.type,n=e.data;if(!function(e,t){var n,i,a;return"boolean"==typeof t?!!t:e===r.Rating?t&&!!t.value:e===r.Resources?!!(null==t?void 0:t.length)||!!(null===(n=null==t?void 0:t.data)||void 0===n?void 0:n.length):e===r.Interactive?!!(null==t?void 0:t.length)||!!(null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.length):e===r.Captions?!!(null==t?void 0:t.length)||!!(null===(a=null==t?void 0:t.data)||void 0===a?void 0:a.length):e===r.Status?"number"==typeof t:!!t}(t,n))return i.createElement(i.Fragment,null);var a=function(e,t){var n="";if(e===r.DurationApproximate&&(n="duration-badge-new px-2 rounded-pill text-nowrap d-flex align-items-center"),e===r.DurationExact&&(n="duration-badge"),e===r.Interactive&&(n="interactive-badge"),e===r.Rating&&(n="rating-badge ".concat(o.u.mapRatingToClass(t.value))),e===r.ProductionYear&&(n="production-year-badge"),e===r.Resources&&(n="resources-badge"),e===r.Captions)return"p-0";if(e===r.Status)return"badge ".concat(function(e){switch(e){case d.X.Published:return"badge-success";case d.X.Archive:case d.X.Rejected:return"badge-danger";case d.X.Draft:return"draft-badge px-2 rounded-pill text-nowrap d-flex align-items-center";case d.X.Pending:case d.X.Processing:return"badge-warning"}}(t));if(e===r.Trending)return"trending-badge px-2 d-flex align-items-center";if(e===r.Count&&(n="count-badge px-1 rounded"),e===r.Restriction){var i=v.l.mapRestrictionToClass(t.restrictions);return"restriction-badge badge-pill px-2 d-flex align-items-center ".concat(i)}return"".concat("badge"," ").concat(n)}(t,n);a="".concat(a," ").concat(e.inline?"d-inline-block":"d-flex justify-content-center");var m=function(e,t){return e===r.Interactive?p("interactive"):e===r.DurationApproximate?c.T.ToDisplayDurationNewStyle(t):e===r.DurationExact?c.T.ToDisplayDuration(t):e===r.Rating?t.code:e===r.ProductionYear?t:e===r.Resources?p("resources"):e===r.Captions?i.createElement(u.x,{svgName:l.vn.CloseCaptionBadge}):e===r.Status?d.X[t]:e===r.Trending?i.createElement(i.Fragment,null,i.createElement(u.x,{svgName:l.vn.Trending}),i.createElement("span",{className:"pl-1"},t)):e===r.Count?t:e===r.Restriction?i.createElement(i.Fragment,null,i.createElement(u.x,{svgName:v.l.mapRestrictionToSvg(t.restrictions)}),i.createElement("span",null,v.l.mapRestrictionToText(t.restrictions,t.yearGroups))):void 0}(t,n),f=function(e,t){return e===r.Rating?{title:t.name,placement:"top"}:null}(t,n),g=e.inline&&"";return f?i.createElement("span",{className:"badge-wrapper"},i.createElement(s.u,Object.assign({},f,{spanHack:!0,spanHackClassName:g}),i.createElement("span",{className:a},m))):i.createElement("span",{className:"".concat(a," badge-wrapper")},m)}!function(e){e.DurationExact="duration-exact",e.DurationApproximate="duration-approximate",e.Interactive="interactive",e.Rating="rating",e.ProductionYear="production-year",e.Resources="resources",e.Captions="captions",e.Status="status",e.Trending="trending",e.Count="count",e.Restriction="restriction"}(r||(r={}))},44550:function(e,t,n){n.d(t,{c:function(){return a}});var r=n(1024),i=n(7121);function a(e){var t="d-flex align-items-center badge-list ".concat(i.Z.minHeight);return e.className&&(t+=" ".concat(e.className)),r.createElement("div",{className:t},e.children)}},50531:function(e,t,n){n.d(t,{m:function(){return l}});var r=n(1024),i=n.n(r),a=n(63791),o=n(63946),c=n(39396),s=n(18830),u=n(45428);function l(e){if(!e.yearGroups)return i().createElement(i().Fragment,null);var t=u.l.mapRestrictionToText(e.video._restrictions,e.yearGroups);return s.M.getCanBeConsumed(e.video).canConsume&&t?i().createElement(o.u,{spanHack:!0,spanHackClassName:e.className||"pl-1",title:t,placement:e.tooltipPlacement||"top"},i().createElement(c.x,{svgName:a.vn.Lock,size:"sm"===e.size?c.S.Small:c.S.Standard})):i().createElement(i().Fragment,null)}},84657:function(e,t,n){n.d(t,{t:function(){return a},v:function(){return i}});var r=n(50028),i={BASE_VIDEO_COLLECTION:"thumbnail,tags,rating,series,season,owner",VIDEO_COLLECTION:"(videoCollection)",SERIES:"tallposter,rating,banner",FOLDER:"banner,thumbnail",CLASSIFICATION_COLLECTION:"banner,cover,tallPoster",CLASSIFICATION:function(e){return"banner,cover,tallPoster,thumbnail,followers{id:".concat(e,"},pinnedVideos[count()]{limit:0},playlists[count()]{limit:0},series[count()]{limit:0}")},VIDEO:"series,season,rating,producers,glance,distributors,owner,subjectPresentationAudiences,resources[thumbnail,pdf],tags,productionCompanies,directors,links,thumbnail,interactives[thumbnail,_canBeConsumed,_isClickViewContent,owner[avatar]],clips[_canBeConsumed,owner[avatar],_isClickViewContent],_canUpdate,_videoProgress,_canBeConsumed,categories,libraries,_canAddToLibrary,_restrictions",PLAYLIST:"cover,banner,owner,videos[count()]{limit:0,status:[".concat(r.X.Published,",").concat(r.X.Archive,"]},clips[count()]{limit:0},interactives[count()]{limit:0},followers[count()]{limit:0}"),PLAYLIST_COLLECTION:"videos[count()]{limit:0},interactives[count()]{limit:0},clips[count()]{limit:0},cover",CLIP:"(clip)",CLIP_COLLECTION:"(clipCollection)",INTERACTIVE:"(interactive)",LIBRARY_COLLECTION:"owner[logo]",LIBRARY:"owner[logo],categorytree"},a={CLASSIFICATION:"banner,cover,tallPoster,pinnedVideos[count()]{limit:0},playlists[count()]{limit:0},series[count()]{limit:0}",CLASSIFICATION_COLLECTION:"banner,cover,tallPoster",VIDEO:"series,season,rating,producers,glance,distributors,subjectPresentationAudiences,resources[thumbnail,pdf],tags,productionCompanies,directors,links,thumbnail,interactives[thumbnail,_canBeConsumed,_isClickViewContent],clips[_canBeConsumed,_isClickViewContent],_canBeConsumed,categories,libraries",VIDEO_COLLECTION:"thumbnail,rating,series,season,subjectPresentationAudiences,subtitles{limit:1},_canBeConsumed"}},74421:function(e,t,n){var r;n.d(t,{E:function(){return r}}),function(e){e[e.Audience=1]="Audience",e[e.Category=2]="Category",e[e.Channel=3]="Channel",e[e.Chapter=4]="Chapter",e[e.Comment=5]="Comment",e[e.OwnerComment=6]="OwnerComment",e[e.Image=7]="Image",e[e.Thumbnail=8]="Thumbnail",e[e.Avatar=9]="Avatar",e[e.Banner=10]="Banner",e[e.Video=11]="Video",e[e.Trailer=12]="Trailer",e[e.Rating=13]="Rating",e[e.Topic=14]="Topic",e[e.Series=15]="Series",e[e.Season=16]="Season",e[e.HostedMediaObjectCollection=17]="HostedMediaObjectCollection",e[e.ExchangeCollection=18]="ExchangeCollection",e[e.CustomMediaObjectCollection=19]="CustomMediaObjectCollection",e[e.Playlist=20]="Playlist",e[e.ClickViewTvCollection=21]="ClickViewTvCollection",e[e.ClickViewProductionsCollection=22]="ClickViewProductionsCollection",e[e.User=23]="User",e[e.SystemUser=24]="SystemUser",e[e.Customer=25]="Customer",e[e.Country=26]="Country",e[e.Organisation=28]="Organisation",e[e.SystemOrganisation=29]="SystemOrganisation",e[e.Group=30]="Group",e[e.SystemGroup=31]="SystemGroup",e[e.FlagReason=32]="FlagReason",e[e.Library=33]="Library",e[e.Interactive=34]="Interactive",e[e.WorkspaceCollection=35]="WorkspaceCollection",e[e.Conversation=36]="Conversation",e[e.Message=37]="Message",e[e.Notification=38]="Notification",e[e.Clip=39]="Clip",e[e.Link=40]="Link",e[e.UserChannel=41]="UserChannel",e[e.Resource=42]="Resource",e[e.VideoStream=43]="VideoStream",e[e.AudioStream=44]="AudioStream",e[e.Tag=45]="Tag",e[e.Subtitle=46]="Subtitle",e[e.LicencedContentCollection=47]="LicencedContentCollection",e[e.PublicCollection=48]="PublicCollection",e[e.CategoryTree=49]="CategoryTree",e[e.Logo=50]="Logo",e[e.Permission=51]="Permission",e[e.Subject=52]="Subject",e[e.Field=53]="Field",e[e.Company=54]="Company",e[e.Person=55]="Person",e[e.Cover=56]="Cover",e[e.Poster=57]="Poster",e[e.SubjectAudience=58]="SubjectAudience",e[e.TallPoster=60]="TallPoster",e[e.Classroom=67]="Classroom",e[e.ClassroomGroup=68]="ClassroomGroup"}(r||(r={}))},90547:function(e,t,n){var r;n.d(t,{r:function(){return r}}),function(e){e.XS="(max-width: 575px)",e.SM="(min-width: 576px) and (max-width: 767px)",e.MD="(min-width: 768px) and (max-width: 991px)",e.LG="(min-width: 992px)",e.XL="(min-width: 1200px)",e.XXL="(min-width: 1440px)",e.SMDown="(max-width: 576px)",e.MDDown="(max-width: 768px)",e.LGDown="(max-width: 992px)",e.XLDown="(max-width: 1200px)"}(r||(r={}))},34254:function(e,t,n){var r;n.d(t,{r:function(){return r}}),function(e){e[e.FilterOut=0]="FilterOut",e[e.StripMetadata=1]="StripMetadata"}(r||(r={}))},86257:function(e,t,n){var r;n.d(t,{L:function(){return r}}),function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(r||(r={}))},87648:function(e,t,n){var r;n.d(t,{c:function(){return r}}),function(e){e.Custom="custom",e.User="year_group"}(r||(r={}))},89603:function(e,t,n){var r,i;n.d(t,{Q:function(){return r}}),function(e){e.Normal="normal",e.Pedagogy="pedagogy",e.Hidden="hidden",e.Skill="skill"}(r||(r={})),function(e){e[e.Normal=0]="Normal",e[e.Pedagogy=1]="Pedagogy",e[e.Hidden=2]="Hidden"}(i||(i={}))},90335:function(e,t,n){var r;n.d(t,{D:function(){return r}}),function(e){e.Newest="newest",e.Oldest="oldest",e.RecentlyAdded="recently_added",e.AtoZ="atoz",e.ZtoA="ztoa",e.Series="series"}(r||(r={}))},332:function(e,t,n){n.d(t,{e:function(){return c}});var r=n(2248),i=n(68003),a=n(84657),o=n(34254),c={clip:function(e,t){return{key:"clip:".concat(e,":").concat(t),url:i._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:a.v.CLIP,permissionFilterOption:t})}},clipWithAllInteractives:function(e,t){return{key:"clip:".concat(e,":").concat(t,":interactives"),url:i._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"".concat(a.v.CLIP,",interactives{status:[0,1]}"),permissionFilterOption:t}),normalize:!1}},publicClip:function(e,t,n,r){return{key:"clip:".concat(e,":public:").concat(t),url:i._.urlBuilder("/api/objects/".concat(e),{query:"video[thumbnail],_canBeConsumed",permissionFilterOption:o.r.StripMetadata,shareId:t}),success:n,error:r}},sharedClip:function(e,t,n,r){return{key:"shared:clip:".concat(e),url:i._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:a.v.CLIP}),success:n,error:r}},createClip:function(e,t,n,i,a){return{key:"create:clip",url:"{gateway}/v1/objects/".concat(e,"/clips"),data:t,type:r.k.POST,invalidationKeys:["videos:".concat(e),"my:videos"],success:n,error:i,always:a}},updateClip:function(e,t,n,i,a){return{key:"update:clip",url:"{gateway}/v1/objects/".concat(e),data:t,type:r.k.PUT,success:n,error:i,always:a}},deleteClip:function(e,t,n,i,a){return{key:"delete:clip",url:"{gateway}/v1/objects/".concat(e),type:r.k.DELETE,invalidationKeys:["videos:".concat(t),"my:videos"],success:n,error:i,always:a}}}},91432:function(e,t,n){n.d(t,{b:function(){return c}});var r=n(2248),i=n(68003),a=n(84657),o=n(34254),c={interactiveMetadata:function(e,t){return{url:i._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:a.v.INTERACTIVE,permissionFilterOption:t}),key:"interactive:metadata:".concat(e,":").concat(t)}},sharedInteractiveMetadata:function(e,t,n,r){return{url:i._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:a.v.INTERACTIVE}),key:"shared:interactive:metadata:".concat(e),success:n,error:r}},publicInteractiveMetadata:function(e,t,n,r){return{url:i._.urlBuilder("/api/objects/".concat(e),{query:"_parentVideo[thumbnail,rating],_parentClip,_canBeConsumed",permissionFilterOption:o.r.StripMetadata,shareId:t}),key:"interactive:metadata:".concat(e,":public:").concat(t),success:n,error:r}},interactive:function(e){return{url:"/api/domain/v1/interactives/".concat(e),key:"interactive:".concat(e)}},createInteractive:function(e,t,n){return{url:"/api/domain/v1/interactives",key:"create:interactive",type:r.k.POST,invalidationKeys:["my:videos"],data:e,success:t,error:n}},createInteractiveMetadata:function(e,t,n,i){return{url:"{gateway}/v1/objects/".concat(e,"/interactives"),key:"create:interactive:metadata",type:r.k.POST,data:t,success:n,error:i}},updateInteractive:function(e,t,n,i){return{url:"/api/domain/v1/interactives/".concat(e),key:"update:interactive",type:r.k.PUT,data:t,success:n,error:i,formatData:function(){return t}}},updateInteractiveMetadata:function(e,t,n,i){return{url:"{gateway}/v1/objects/".concat(e),key:"update:interactive:metadata",type:r.k.PUT,data:t,success:n,error:i}},interactiveResultSet:function(e,t){return{url:"/api/domain/v1/analytics/interactives/".concat(e,"/metadata/").concat(t),key:"interactive:result:set:".concat(e,":").concat(t)}},copyInteractive:function(e,t,n){return{url:"/api/domain/v1/interactives/".concat(e,"/copy"),key:"copy:interactive",type:r.k.POST,invalidationKeys:["interactive:".concat(e),"my:videos"],success:t,error:n}},deleteInteractiveMetadata:function(e,t,n){return{url:"{gateway}/v1/objects/".concat(e),key:"delete:interactive",type:r.k.DELETE,invalidationKeys:["interactive:".concat(e),"my:videos"],success:t,error:n}}}},77131:function(e,t,n){n.d(t,{R:function(){return f}});var r,i=n(2248),a=n(68003),o=n(90335),c=n(74421),s=n(84657);!function(e){e.Topic="topic",e.Series="series",e.Playlist="playlist"}(r||(r={}));var u=n(50028),l=n(34254),d=function(e,t){return a._.urlBuilder("/api/objects/".concat(e),{shareId:t,query:s.v.VIDEO})},v=function(e,t){return a._.urlBuilder("/api/objects/".concat(e),{query:"thumbnail,_canBeConsumed,series,season,rating",permissionFilterOption:l.r.StripMetadata,shareId:t})},p=function(e){return a._.urlBuilder("{gateway}/v1/objects",{"query.video":s.v.VIDEO_COLLECTION,"query.clip":s.v.CLIP_COLLECTION,"query.interactive":s.v.INTERACTIVE,id:e})},m=function(e,t,n){var i={videoId:e,limit:25,query:s.v.VIDEO_COLLECTION};return t&&(t===r.Topic?i["context.classificationId"]=n:(i["context.collectionType"]=t,i["context.collectionId"]=n)),a._.urlBuilder("{gateway}/v1/suggestions/related-videos",i)},f={video:function(e,t){return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:s.v.VIDEO,permissionFilterOption:t}),publicUrl:a._.urlBuilder("/api/objects/".concat(e),{query:s.t.VIDEO,permissionFilterOption:t}),key:"videos:".concat(e,":").concat(t),formatData:function(e){var t,n;return(null===(t=e.interactives)||void 0===t?void 0:t.data)&&(e.interactives.data=e.interactives.data.map((function(t){return Object.assign(Object.assign({},t),{_parentVideo:{id:e.id}})}))),(null===(n=e.clips)||void 0===n?void 0:n.data)&&(e.clips.data=e.clips.data.map((function(t){return Object.assign(Object.assign({},t),{_parentVideo:{id:e.id}})}))),e}}},publicVideo:function(e,t,n,r){return{url:v(e,t),key:"videos:".concat(e,":public:").concat(t),success:n,error:r}},sharedVideo:function(e,t,n,r){return{url:d(e,t),key:"shared:video:".concat(e),formatData:function(e){var t,n;return(null===(t=e.interactives)||void 0===t?void 0:t.data)&&(e.interactives.data=e.interactives.data.map((function(t){return Object.assign(Object.assign({},t),{_parentVideo:{id:e.id}})}))),(null===(n=e.clips)||void 0===n?void 0:n.data)&&(e.clips.data=e.clips.data.map((function(t){return Object.assign(Object.assign({},t),{_parentVideo:{id:e.id}})}))),e},success:n,error:r}},myVideos:function(e,t){var n=s.v.VIDEO_COLLECTION,r=s.v.CLIP_COLLECTION,i=s.v.INTERACTIVE,o="videos[".concat(n,"]{libraries.typeid:").concat(c.E.WorkspaceCollection,"}"),d="clips[".concat(r,"]"),v="interactives[".concat(i,"]{status:[").concat(u.X.Published,",").concat(u.X.Draft,"]}"),p={query:"(".concat(o,"|").concat(d,"|").concat(v,"){orderbydesc:id}"),permissionFilterOption:l.r.StripMetadata};return t&&(p.cursor=t),{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/members"),p),key:"my:videos:".concat(t)}},videos:function(e,t){return{url:p(e),key:"videos:by:id:".concat(e.join(",")),success:t}},watchHistoryVideos:function(e,t){return{url:p(e),key:"watch:history:videos:by:id:".concat(e.join(",")),success:t}},updateVideo:function(e,t,n,r,a){return{key:"update:video:".concat(e),url:"{gateway}/v1/objects/".concat(e),type:i.k.PUT,data:t,success:n,error:r,always:a}},videoRatings:function(e,t){var n=e.map((function(e){return"id=".concat(e)}));if(n.length)return{url:"/api/domain/v2/objects?query=rating&".concat(n.join("&")),key:"video:ratings:by:id:".concat(e.join(",")),normalizeOptions:{namespace:t}}},getRestrictions:function(e){var t=e.slice().sort();return{url:"/api/domain/v1/restrictedobjects"+"?objectTypeId=".concat(c.E.Video).concat(t.map((function(e){return"&objectId=".concat(e)})).join("")),key:"restrictions:".concat(t.join(",")),normalizeOptions:{namespace:"domain",idAttribute:"objectId"}}},delete:function(e,t,n){return{url:"{gateway}/v1/objects/".concat(e),key:"delete:video",type:i.k.DELETE,success:t,error:n,invalidationKeys:["videos"]}},relatedVideos:function(e,t,n,r){return{url:m(e,n,r),key:"related:videos:".concat(e,":").concat(n,":").concat(r)}},collectionVideos:function(e,t,n,r,i,c){var u=function(e){switch(e){case o.D.AtoZ:return"orderby:name";case o.D.ZtoA:return"orderbydesc:name";case o.D.Newest:return"orderbydesc:datecreated";case o.D.Oldest:return"orderby:datecreated";case o.D.RecentlyAdded:return"orderbydesc:timestamp";case o.D.Series:return"orderby:seriessort";default:return}}(t),d=(u?"{".concat(u,"}"):"")+s.v.VIDEO_COLLECTION;return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/videos"),{cursor:n,query:d,permissionFilterOption:l.r.StripMetadata}),key:["folder","videos",e,n,t].filter((function(e){return!!e})).join(":"),success:r,error:i,always:c}},pointsOfInterest:function(e,t,n,r,i){var o={query:"{limit:100}",cursor:t};return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(e,"/pointsofinterest"),o),publicUrl:a._.urlBuilder("/api/objects/".concat(e,"/pointsofinterest"),o),key:"pointsofinterest:".concat(e).concat(t?":".concat(t):""),success:n,error:r,always:i}}}},2491:function(e,t,n){n.d(t,{Z:function(){return o}});var r=n(54096),i=n(21186),a=n(92159);function o(){var e=(0,r.G)(a.P.ALERT);return{success:function(t){e.success(t)()},error:function(t){e.error(t)()},warning:function(t){e.createAlert({type:i.NK.Warning,heading:i.R6.Warning,message:t})}}}},5256:function(e,t,n){n.d(t,{a:function(){return a}});var r=n(1024);function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a(e){var t,n,a=(t=(0,r.useState)(window.matchMedia(e).matches),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 r,i,a,o,c=[],s=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;s=!1}else for(;!(s=(r=a.call(n)).done)&&(c.push(r.value),c.length!==t);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(t,n)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.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)?i(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.")}()),o=a[0],c=a[1];return(0,r.useEffect)((function(){var t=window.matchMedia(e);t.matches!==o&&c(t.matches);var n=function(){return c(t.matches)};return t.addListener(n),function(){return t.removeListener(n)}}),[e]),o}},45428:function(e,t,n){n.d(t,{l:function(){return b}});var r,i,a,o,c=n(56285),s=n(57857),u=n(63791),l=n(87648),d=n(7121);function v(e){return v="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},v(e)}function p(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==v(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==v(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===v(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var m=s.T.encloseNamespace("shared.shared-utils"),f=(p(r={},l.c.Custom,d.Z.restrictionBadgeCustom),p(r,l.c.User,d.Z.restrictionBadgeUser),r),g=(p(i={},l.c.Custom,u.vn.Timer),p(i,l.c.User,u.vn.Lock),i),y=(p(a={},l.c.Custom,"restrictionCustom"),p(a,l.c.User,"restrictionYearGroup"),a),C=(p(o={},l.c.Custom,200),p(o,l.c.User,100),o),b={mapRestrictionToClass:function(e){var t;if(!(null===(t=null==e?void 0:e.value)||void 0===t?void 0:t.length))return"";var n=b.getWeightedRestriction(e.value);return f[n.type]},mapRestrictionToSvg:function(e){var t;if(!(null===(t=null==e?void 0:e.value)||void 0===t?void 0:t.length))return u.vn.Lock;var n=b.getWeightedRestriction(e.value);return g[n.type]},mapRestrictionToText:function(e,t){var n;if(!(null===(n=null==e?void 0:e.value)||void 0===n?void 0:n.length)||!(null==t?void 0:t.length))return"";var r=b.getWeightedRestriction(e.value),i=t.find((function(e){return e.value===r.yearGroup})),a=y[r.type];if(r.type===l.c.User)return i?m(a,{yearGroup:i.name}):m("restrictionStaff");if(r.type===l.c.Custom){var o=b.getRestrictionDuration(r);return o?m(a,{duration:o,smartCount:o}):m("restrictionCustomLessThanDay",{duration:o,smartCount:1})}return""},getWeightedRestriction:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"highest";if(e.length)return 1===e.length?e[0]:e.reduce((function(e,n){var r=C[e.type],i=C[n.type];return"highest"===t&&r>i||"lowest"===t&&r<i?e:n}))},getRestrictionByType:function(e,t){if(!b.hasRestrictions(e))return null;var n=Array.isArray(t)?t:[t],r=e._restrictions.value.filter((function(e){return n.includes(e.type)}));return b.getWeightedRestriction(r)},getRestrictionDuration:function(e){if(e.type===l.c.Custom&&e.expiresOn){var t=c.O.convertUTCToLocal(e.expiresOn);if(t)return c.O.diffBetween(t,new Date,"day")}},hasCustomRestriction:function(e){return!!b.getRestrictionByType(e,[l.c.Custom])},hasRestrictions:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e._restrictions)||void 0===t?void 0:t.value)||void 0===n?void 0:n.length)}}},21974:function(e,t,n){n.d(t,{u:function(){return l}});var r=n(57857),i=n(63791),a=n(75459),o=n(86257);function c(e){return c="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},c(e)}function s(e,t,n){return(t=function(e){var t=function(e,t){if("object"!==c(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!==c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===c(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var u="shared.shared-utils",l={mapRatingToClass:function(e){return e?function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e):""},mapSourceToDisplayName:function(e,t){switch(e.type){case a.r.HostedLibrary:case a.r.CustomLibrary:return e.name;case a.r.Exchange:return r.T.getPhrase(u,"exchange");case a.r.Workspace:return r.T.getPhrase(u,t?"myVideos":"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case a.r.HostedLibrary:case a.r.CustomLibrary:return"bg-info";case a.r.Exchange:return"bg-green";case a.r.Workspace:default:return"bg-red"}},isInteractive:function(e){var t,n;return!!(null===(n=null===(t=null==e?void 0:e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length)},mapTypeToSvg:function(e){var t,n=(s(t={},o.L.Pdf,i.vn.FilePDF),s(t,o.L.Image,i.vn.FileImg),s(t,o.L.PowerPoint,i.vn.FilePowerpoint),s(t,o.L.Document,i.vn.FileWord),s(t,o.L.Excel,i.vn.FileExcel),s(t,o.L.Zip,i.vn.FileZip),s(t,o.L.File,i.vn.File),t)[e];return n||(n=i.vn.Folder),n},mapTypeToClass:function(e){switch(e){case o.L.Pdf:return"icon-red";case o.L.Image:return"icon-purple";case o.L.Document:return"icon-blue";case o.L.Excel:return"icon-green";case o.L.PowerPoint:return"icon-orange";case o.L.Zip:return"icon-teal";case o.L.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){return e?{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]:""},mapTypeToName:function(e){if(!e)return"";switch(e){case o.L.Pdf:return r.T.getPhrase(u,"pdf");case o.L.Image:return r.T.getPhrase(u,"image");case o.L.Document:return r.T.getPhrase(u,"document");case o.L.Excel:return r.T.getPhrase(u,"spreadsheet");case o.L.PowerPoint:return r.T.getPhrase(u,"presentation");case o.L.Zip:return r.T.getPhrase(u,"zipArchive");case o.L.File:return r.T.getPhrase(u,"file");default:return""}}}},18830:function(e,t,n){n.d(t,{M:function(){return g}});var r=n(31647),i=n(57857),a=n(11306),o=n(74421),c=n(50028),s=n(89603),u=n(77131),l=n(332),d=n(91432),v=n(70065),p=n(45428),m=n(87648),f=i.T.encloseNamespace("shared.shared-utils"),g={isVideo:function(e){return(null==e?void 0:e.typeId)===o.E.Video},isClip:function(e){return(null==e?void 0:e.typeId)===o.E.Clip},isInteractive:function(e){return(null==e?void 0:e.typeId)===o.E.Interactive},isVideoType:function(e){return g.isVideo(e)||g.isInteractive(e)||g.isClip(e)},hasSeries:function(e){var t;return!!(null===(t=null==e?void 0:e.series)||void 0===t?void 0:t.id)},getVideoProgress:function(e){var t,n;return(null==e?void 0:e.lastProgressPoint)?null==e?void 0:e.lastProgressPoint:(null===(t=null==e?void 0:e._videoProgress)||void 0===t?void 0:t.progress)?null===(n=null==e?void 0:e._videoProgress)||void 0===n?void 0:n.progress:0},getThumbnail:function(e){var t;return g.isVideo(e)?e.thumbnail:g.isClip(e)||g.isInteractive(e)?null===(t=e._parentVideo)||void 0===t?void 0:t.thumbnail:void 0},getDuration:function(e){var t,n;if(g.isVideo(e))return e.duration;if(g.isInteractive(e)){if(null===(t=e._parentClip)||void 0===t?void 0:t.id)return 1e3*(e._parentClip.endTime-e._parentClip.startTime);if(null===(n=e._parentVideo)||void 0===n?void 0:n.duration)return e._parentVideo.duration}return g.isClip(e)?1e3*(e.endTime-e.startTime):void 0},getAnalyticsEntity:function(e){return g.isVideo(e)?v.EntityType.Video:g.isInteractive(e)?v.EntityType.Interactive:g.isClip(e)?v.EntityType.Clip:void 0},getCanBeConsumed:function(e){var t,n;return e&&g.isVideoType(e)?e._canBeConsumed?{canNavigate:"login-required"===(null===(t=e._canBeConsumed)||void 0===t?void 0:t.reason)&&g.isVideo(e)||!0===e._canBeConsumed.value,canConsume:e._canBeConsumed.value,reason:null===(n=e._canBeConsumed)||void 0===n?void 0:n.reason}:{canNavigate:!0,canConsume:!0}:{canNavigate:!1,canConsume:!1}},getPrivacyReasoning:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=g.getCanBeConsumed(e),i=r.canConsume,a=r.canNavigate,o=r.reason,s=function(){return g.isClip(e)?f("clipLoginRequired"):g.isInteractive(e)?f("interactiveLoginRequired"):f("videoLoginRequired")};if(!i&&!a){if(n)return s();switch(o){case"rating-not-allowed":return f("ratingNotAllowed");case"video-deleted":return g.isClip(e)?f("clipParentDeleted"):g.isInteractive(e)?f("interactiveParentDeleted"):f("videoDeleted");case"clickview-private":return f("clickViewPrivate");case"private":default:return f("genericCannotAccess");case"login-required":return s();case"restricted-access":var u=p.l.getWeightedRestriction(null===(t=e._restrictions)||void 0===t?void 0:t.value);return(null==u?void 0:u.type)===m.c.Custom?f("awaitingApproval"):f("restrictedAccess")}}return g.isInteractive(e)&&e.status===c.X.Draft?f("draftInteractive"):""},getTitle:function(e){if(e.name)return e.name;var t=g.getCanBeConsumed(e),n=t.canConsume,r=t.reason;return f(n||"private"!==r?n||"video-deleted"!==r?"privateVideo":"videoUnavailable":"privateVideo")},getParentVideo:function(e){return g.isVideo(e)?e:g.isClip(e)||g.isInteractive(e)?e._parentVideo:void 0},showWhyThisVideo:function(e){var t,n;return!!g.isVideo(e)&&(null===(n=null===(t=e.tags)||void 0===t?void 0:t.data)||void 0===n?void 0:n.some((function(e){return e.tagType===s.Q.Pedagogy||e.tagType===s.Q.Skill})))},showWhatsIncluded:function(e){var t,n,r,i,a,o;if(!g.isVideo(e))return!1;var c=!!(null===(n=null===(t=e.interactives)||void 0===t?void 0:t.data)||void 0===n?void 0:n.length),s=!!(null===(i=null===(r=e.resources)||void 0===r?void 0:r.data)||void 0===i?void 0:i.length),u=!!(null===(o=null===(a=e.subtitles)||void 0===a?void 0:a.data)||void 0===o?void 0:o.length);return c||s||u},getVideoAudiences:function(e){var t;return g.isVideo(e)?null===(t=null==e?void 0:e.subjectPresentationAudiences)||void 0===t?void 0:t.data:null},getRating:function(e){var t;return g.isVideo(e)?e.rating:null===(t=null==e?void 0:e._parentVideo)||void 0===t?void 0:t.rating},getVideoRequest:function(e,t,n){if(n){switch(t){case o.E.Video:return u.R.sharedVideo(e,n);case o.E.Clip:return l.e.sharedClip(e,n);case o.E.Interactive:return d.b.sharedInteractiveMetadata(e,n)}r.Q.ErrorHelper.throw(new a.H("Unsupported master type"))}switch(t){case o.E.Video:return u.R.video(e);case o.E.Clip:return l.e.clip(e);case o.E.Interactive:return d.b.interactiveMetadata(e)}r.Q.ErrorHelper.throw(new a.H("Unsupported master type"))}}},7121:function(e,t){t.Z={minHeight:"jEh7m",restrictionBadgeCustom:"WQ2eS",restrictionBadgeUser:"z4DeQ"}}}]);
|