@clickview/library-editor 1.15.0-rc.4 → 1.16.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +2 -2
- package/dist/languages/en.json +1 -1
- package/dist/scripts/{1010-524dff3667.chunk.js → 1010-528057f185.chunk.js} +1 -1
- package/dist/scripts/{1086-54d21469e9.chunk.js → 1086-f1b0e59329.chunk.js} +1 -1
- package/dist/scripts/1203-a25c4655ce.chunk.js +1 -0
- package/dist/scripts/{1364-cd9f4d8564.chunk.js → 1364-6be41c82d2.chunk.js} +1 -1
- package/dist/scripts/{1409-37bca179d7.chunk.js → 1409-b4a956468d.chunk.js} +1 -1
- package/dist/scripts/{1601-505bc87094.chunk.js → 1601-8834b5f812.chunk.js} +2 -2
- package/dist/scripts/{1832-ed6f006ccd.chunk.js → 1832-02361e1269.chunk.js} +1 -1
- package/dist/scripts/{1887-559b570244.chunk.js → 1887-7f6adf4708.chunk.js} +1 -1
- package/dist/scripts/{1911-750209c2d0.chunk.js → 1911-66682811bb.chunk.js} +1 -1
- package/dist/scripts/{1934-2a68903c81.chunk.js → 1934-145060632c.chunk.js} +1 -1
- package/dist/scripts/2227-1d867f3bc2.chunk.js +2 -0
- package/dist/scripts/{243-7c5ae0cd9b.chunk.js → 243-7e0bdc4a31.chunk.js} +1 -1
- package/dist/scripts/{259-a84030f432.chunk.js → 259-b1126eeb88.chunk.js} +1 -1
- package/dist/scripts/{2692-4b42ad0186.chunk.js → 2692-5f481f698b.chunk.js} +1 -1
- package/dist/scripts/{2802-2218d4b4bb.chunk.js → 2802-92dc055d0b.chunk.js} +1 -1
- package/dist/scripts/{2803-89f9a2f7e2.chunk.js → 2803-6d65186411.chunk.js} +1 -1
- package/dist/scripts/{2888-5e79a2d835.chunk.js → 2888-97c459e7e0.chunk.js} +1 -1
- package/dist/scripts/{299-4f58ee4227.chunk.js → 299-1e545f0387.chunk.js} +1 -1
- package/dist/scripts/{3096-338f3af8d5.chunk.js → 3096-bb54a13a1d.chunk.js} +1 -1
- package/dist/scripts/{3639-81854e5c72.chunk.js → 3639-c791111194.chunk.js} +1 -1
- package/dist/scripts/{3746-53d2f48930.chunk.js → 3746-7e6cd20817.chunk.js} +1 -1
- package/dist/scripts/{3763-14bc634fd5.chunk.js → 3763-8cb3ef3f03.chunk.js} +1 -1
- package/dist/scripts/3969-61ffb9cb04.chunk.js +1 -0
- package/dist/scripts/{4000-3ea5bf15ce.chunk.js → 4000-212bbc3e95.chunk.js} +1 -1
- package/dist/scripts/{4177-e7ba02acb0.chunk.js → 4177-a105ca958b.chunk.js} +1 -1
- package/dist/scripts/{4201-ec420d0859.chunk.js → 4201-9b328c94db.chunk.js} +1 -1
- package/dist/scripts/4245-4569118ecb.chunk.js +1 -0
- package/dist/scripts/{4353-fffba2b0e8.chunk.js → 4353-39aeb557a1.chunk.js} +1 -1
- package/dist/scripts/{4591-defa823689.chunk.js → 4591-dbcdf3b087.chunk.js} +1 -1
- package/dist/scripts/{4860-9f5cac30f5.chunk.js → 4860-8bdac5b42f.chunk.js} +1 -1
- package/dist/scripts/{4885-c884415f34.chunk.js → 4885-56fc418bf4.chunk.js} +1 -1
- package/dist/scripts/{514-777b3e77b9.chunk.js → 514-e07aed3907.chunk.js} +1 -1
- package/dist/scripts/5173-e5b00f629a.chunk.js +1 -0
- package/dist/scripts/{5412-254fd0b8b4.chunk.js → 5412-5868f70a26.chunk.js} +1 -1
- package/dist/scripts/{5424-738d17c8f6.chunk.js → 5424-c8e7f5c8d4.chunk.js} +1 -1
- package/dist/scripts/{546-f3cbb33611.chunk.js → 546-926188d260.chunk.js} +1 -1
- package/dist/scripts/{5745-3212b59a8b.chunk.js → 5745-d7844be476.chunk.js} +1 -1
- package/dist/scripts/{5747-8e2e542691.chunk.js → 5747-eb5ee256b8.chunk.js} +1 -1
- package/dist/scripts/{6220-6d447ddefa.chunk.js → 6220-e24560d854.chunk.js} +1 -1
- package/dist/scripts/{6732-26dcc3ead9.chunk.js → 6732-944b44fb6b.chunk.js} +1 -1
- package/dist/scripts/{6774-3492c7b7e1.chunk.js → 6774-c1b9a70c16.chunk.js} +1 -1
- package/dist/scripts/{6788-8e09f3bd44.chunk.js → 6788-ac33c559ba.chunk.js} +1 -1
- package/dist/scripts/6963-bf73bd3cf2.chunk.js +1 -0
- package/dist/scripts/{6995-53b8291478.chunk.js → 6995-9602f4467d.chunk.js} +1 -1
- package/dist/scripts/{6999-0b95aa9bc7.chunk.js → 6999-f67f906365.chunk.js} +1 -1
- package/dist/scripts/{7002-fe8d55589f.chunk.js → 7002-9b0b7bd86a.chunk.js} +1 -1
- package/dist/scripts/{7053-71789a7f8e.chunk.js → 7053-8e626b3b23.chunk.js} +1 -1
- package/dist/scripts/{708-87afed82a0.chunk.js → 708-19b97884d1.chunk.js} +1 -1
- package/dist/scripts/7136-643eb02b9d.chunk.js +1 -0
- package/dist/scripts/{7295-020c912544.chunk.js → 7295-fe77a0f37c.chunk.js} +1 -1
- package/dist/scripts/{7376-50278f41b0.chunk.js → 7376-f71dda3a29.chunk.js} +1 -1
- package/dist/scripts/{7634-e9d03befaa.chunk.js → 7634-919fcc0f34.chunk.js} +1 -1
- package/dist/scripts/{8362-38f6f1e275.chunk.js → 8362-72b12bb14b.chunk.js} +1 -1
- package/dist/scripts/{8727-0704919382.chunk.js → 8727-910efccfe4.chunk.js} +1 -1
- package/dist/scripts/{8762-bf9e214b3e.chunk.js → 8762-36e33f2e1c.chunk.js} +1 -1
- package/dist/scripts/{8906-2bb0497443.chunk.js → 8906-2bb32f815c.chunk.js} +1 -1
- package/dist/scripts/8947-56edf971d3.chunk.js +1 -0
- package/dist/scripts/9040-3d27054bc3.chunk.js +1 -0
- package/dist/scripts/9268-b84660c55b.chunk.js +1 -0
- package/dist/scripts/{9357-3556f01499.chunk.js → 9357-575e22e956.chunk.js} +1 -1
- package/dist/scripts/{9383-757a7db213.chunk.js → 9383-63cd1c0db6.chunk.js} +1 -1
- package/dist/scripts/969-4f1eb9e178.chunk.js +1 -0
- package/dist/scripts/{9695-e339ad226a.chunk.js → 9695-e010e7baf1.chunk.js} +1 -1
- package/dist/scripts/{9927-ce43701341.chunk.js → 9927-7ca0458b0e.chunk.js} +1 -1
- package/dist/scripts/9976-86ed98a9a5.chunk.js +1 -0
- package/dist/scripts/bundle-1cc865d209.min.js +2 -0
- package/package.json +2 -2
- package/dist/scripts/1203-4113349cd2.chunk.js +0 -1
- package/dist/scripts/3969-b56c249015.chunk.js +0 -1
- package/dist/scripts/4164-5147aa742a.chunk.js +0 -1
- package/dist/scripts/4245-91847dbcc6.chunk.js +0 -1
- package/dist/scripts/5173-8a6910db27.chunk.js +0 -1
- package/dist/scripts/5970-e0becf6419.chunk.js +0 -2
- package/dist/scripts/6963-a9ded68b8f.chunk.js +0 -1
- package/dist/scripts/7136-04c865cb53.chunk.js +0 -1
- package/dist/scripts/8726-dc68659a97.chunk.js +0 -1
- package/dist/scripts/9040-784bb82801.chunk.js +0 -1
- package/dist/scripts/9268-d558d65224.chunk.js +0 -1
- package/dist/scripts/9976-61d05609c2.chunk.js +0 -1
- package/dist/scripts/bundle-1b6d2c6458.min.js +0 -2
- /package/dist/css/{5970-library-editor-0d09b13673.chunk.css → 2227-library-editor-0d09b13673.chunk.css} +0 -0
- /package/dist/css/{4164-library-editor-86456d4d2f.chunk.css → 969-library-editor-86456d4d2f.chunk.css} +0 -0
- /package/dist/scripts/{101-5b7f13ead9.chunk.js → 101-81da1d7fd0.chunk.js} +0 -0
- /package/dist/scripts/{1216-7a9f411abd.chunk.js → 1216-4fc40bc09f.chunk.js} +0 -0
- /package/dist/scripts/{1269-391b95a348.chunk.js → 1269-bc65d74dc2.chunk.js} +0 -0
- /package/dist/scripts/{1601-505bc87094.chunk.js.LICENSE.txt → 1601-8834b5f812.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{1934-2a68903c81.chunk.js.LICENSE.txt → 1934-145060632c.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5970-e0becf6419.chunk.js.LICENSE.txt → 2227-1d867f3bc2.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2802-2218d4b4bb.chunk.js.LICENSE.txt → 2802-92dc055d0b.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{3400-181a33c06f.chunk.js → 3400-c34d569244.chunk.js} +0 -0
- /package/dist/scripts/{4830-21f98cca40.chunk.js → 4830-fb97023c8a.chunk.js} +0 -0
- /package/dist/scripts/{5235-c7f0ecadfc.chunk.js → 5235-0e0c9d0416.chunk.js} +0 -0
- /package/dist/scripts/{5418-32716c915a.chunk.js → 5418-a54f79821f.chunk.js} +0 -0
- /package/dist/scripts/{5745-3212b59a8b.chunk.js.LICENSE.txt → 5745-d7844be476.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{58-6b57e9fb4e.chunk.js → 58-635d2774ab.chunk.js} +0 -0
- /package/dist/scripts/{5891-008fa6f486.chunk.js → 5891-0ce8d0ca23.chunk.js} +0 -0
- /package/dist/scripts/{6093-75a426e5f7.chunk.js → 6093-d33123f90f.chunk.js} +0 -0
- /package/dist/scripts/{7190-3632c1b97b.chunk.js → 7190-5697b00340.chunk.js} +0 -0
- /package/dist/scripts/{8495-c2a8d27ffa.chunk.js → 8495-8f7560fb40.chunk.js} +0 -0
- /package/dist/scripts/{9379-374f2c6f8d.chunk.js → 9379-bf088f70a0.chunk.js} +0 -0
- /package/dist/scripts/{9770-f16965ec13.chunk.js → 9770-191d095995.chunk.js} +0 -0
- /package/dist/scripts/{bundle-1b6d2c6458.min.js.LICENSE.txt → bundle-1cc865d209.min.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{polyfills-8a6a6be34b.min.js → polyfills-a2efdf572b.min.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[5747],{95747:function(e,n,t){"use strict";t.r(n),t.d(n,{FileSelectView:function(){return T}});var o=t(39479),l=t(31647),i=t(21679),r=t(57857),a=t(68003),c=t(48404),s=t(70065),u=t(52076),p=t(
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[5747],{95747:function(e,n,t){"use strict";t.r(n),t.d(n,{FileSelectView:function(){return T}});var o=t(39479),l=t(31647),i=t(21679),r=t(57857),a=t(68003),c=t(48404),s=t(70065),u=t(52076),p=t(48090),f=t(22103),d=t.n(f),h={uploadImage:"yRGoO"},y=t(57769),g=t(81937),m=t(98985),b=t(25692),v=t(75432);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 w(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function U(e,n){for(var t=0;t<n.length;t++){var o=n[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function S(e,n){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},S(e,n)}function O(e,n){if(n&&("object"===k(n)||"function"==typeof n))return n;if(void 0!==n)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)}function _(e){return _=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},_(e)}var T=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&S(e,n)}(T,e);var n,t,l,f,k=(l=T,f=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,n=_(l);if(f){var t=_(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return O(this,e)});function T(){return w(this,T),k.apply(this,arguments)}return n=T,(t=[{key:"initialize",value:function(){this.listenTo(this.channelName,g.S.FILES_SELECTED,this.onFilesSelected),this.videoUploadService=i.u.getInstance(p.K9.VideoUpload,this)}},{key:"name",get:function(){return"FileSelectView"}},{key:"title",get:function(){return r.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"upload.fileSelect"}},{key:"template",get:function(){return d()}},{key:"className",get:function(){return"container px-0"}},{key:"props",get:function(){return["videoUploadService"]}},{key:"channelName",get:function(){return this.customCid||(this.customCid=o.uniqueId("custom")),"".concat(this.name).concat(this.customCid)}},{key:"behaviors",get:function(){return[{behaviorClass:y.Z,buttonSelector:".choose-files",channelName:this.channelName,acceptMultiple:!0,mimeType:"video/*"}]}},{key:"onFilesSelected",value:function(e,n){this.videoUploadService.addFiles(e),this.logAction(e,n)}},{key:"logAction",value:function(e,n){var t={actionType:s.UserAction.Upload,entity:s.EntityType.Video,location:s.LocationContext.VideoUpload,workflowPhase:s.WorkflowPhase.Start,descriptor:u.k.mapInteractionType(n)};u.k.logUserAction(e,t)}},{key:"requiredResources",get:function(){return{config:c.p.config,currentUser:v.K.currentUser}}},{key:"viewOptions",value:function(){return{styles:h,uploadArticleUrl:m.o.getHybridArticle(b.s.UploadToLibraryEditor,b.b.UploadToLibraryEditor),uploadTermsUrl:this.config?a._.safeUrlConcat(this.config.get("marketingSiteUrl"),p.l.UploadingUserContent):"",classNames:"info-link",imageUrl:p.Wn.Upload.UPLOAD_VIDEO}}}])&&U(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),T}(l.Q.View)},22103:function(e,n,t){var o=t(32227);e.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(e,n,t,o,l){e.propertyIsEnumerable;var i,r=null!=n?n:e.nullContext||{},a=e.hooks.helperMissing,c=e.escapeExpression,s=e.lambda;return'<div class="p-3 my-3 bg-white text-center">\n <h1>'+c((t.lang||n&&n.lang||a).call(r,"uploadVideos",{name:"lang",hash:{},data:l}))+'</h1>\n <div class="my-3">\n <img src="'+c(s(null!=(i=null!=n?n.options:n)?i.imageUrl:i,n))+'" class="'+c(s(null!=(i=null!=(i=null!=n?n.options:n)?i.styles:i)?i.uploadImage:i,n))+' img-fluid mb-2" />\n </div>\n <div>\n <button class="btn btn-dark choose-files">'+c((t.lang||n&&n.lang||a).call(r,"chooseVideo",{name:"lang",hash:{},data:l}))+"</button>\n </div>\n <div>\n <span>"+c((t.lang||n&&n.lang||a).call(r,"dragDrop",{name:"lang",hash:{},data:l}))+'</span>\n </div>\n</div>\n<div class="p-3 bg-white container-fluid">\n <div class="row">\n <div class="col-4">\n <h4>'+c((t.lang||n&&n.lang||a).call(r,"help",{name:"lang",hash:{},data:l}))+'</h2>\n <div class="border-top pt-2">\n <ul>\n <li><a class="info-link" href="'+c(s(null!=(i=null!=n?n.options:n)?i.uploadArticleUrl:i,n))+'" target="_blank">'+c((t.lang||n&&n.lang||a).call(r,"instructionsHeading",{name:"lang",hash:{},data:l}))+'</a></li>\n </ul>\n </div>\n </div>\n <div class="col-8">\n <h4>'+c((t.lang||n&&n.lang||a).call(r,"termsHeading",{name:"lang",hash:{},data:l}))+'</h2>\n <div class="border-top pt-2">\n <ol>\n <li>'+c((t.lang||n&&n.lang||a).call(r,"term1",{name:"lang",hash:{},data:l}))+"</li>\n <li>"+c((t.lang||n&&n.lang||a).call(r,"term2",{name:"lang",hash:{},data:l}))+"</li>\n <li>"+(null!=(i=(t.lang||n&&n.lang||a).call(r,"term3",{name:"lang",hash:{classNames:null!=(i=null!=n?n.options:n)?i.classNames:i,uploadTermsUrl:null!=(i=null!=n?n.options:n)?i.uploadTermsUrl:i},data:l}))?i:"")+"</li>\n </ol>\n </div>\n </div>\n </div>\n</div>"},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
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 N}});var n=i(39479),r=i(31647),o=i(21679),a=i(57857),s=i(36357),c=i(
|
|
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 N}});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),k=i(95061);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 T(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(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,n.key,n)}}function O(e,t){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},O(e,t)}function _(e,t){if(t&&("object"===C(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)}function R(e){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},R(e)}var N=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&&O(e,t)}(U,e);var t,i,m,C,N=(m=U,C=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=R(m);if(C){var i=R(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return _(this,e)});function U(){return T(this,U),N.apply(this,arguments)}return t=U,(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:k.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()}}])&&E(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),U}(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 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6732],{57733:function(e,t,r){"use strict";r.r(t),r.d(t,{AddToLibraryView:function(){return C}});var n,i=r(39479),o=r(31647),l=r(21679),a=r(88172),s=r(20072),u=r(10101),c=r(75459),d=r(67670),h=r(61843),f=r(88181),p=r(57857),b=r(95061),y=r(79665),g=r(99765),m=r.n(g),v={header:"S7CRE"};function L(e){return L="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},L(e)}function k(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function T(e,t){if(t&&("object"===L(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)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}!function(e){e[e.MasterVideo=1]="MasterVideo"}(n||(n={}));var C=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&&w(e,t)}(C,e);var t,r,o,g,L=(o=C,g=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(o);if(g){var r=S(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return T(this,e)});function C(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,C),L.call(this,e)}return t=C,(r=[{key:"initialize",value:function(){this.videoDataService=l.u.getInstance(f.Or.Video,this),this.bindListeners()}},{key:"name",get:function(){return"AddToLibraryView"}},{key:"title",get:function(){return p.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.addToLibrary"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"appLinks",get:function(){return{".library-editor-applink":{application:f.OV.LIBRARY_EDITOR,action:f.eX.LibraryEditor.HOME}}}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"libraryTreeKey",get:function(){return"libraryselect:".concat(this.cid)}},{key:"channelName",get:function(){return h.N0.generateUniqueChannelName(this)}},{key:"template",get:function(){return m()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.Yw,title:p.T.getPhrase(this.lang,"title"),size:"modal-md",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new d.v,buttonText:p.T.getPhrase(this.lang,"addBtn"),tooltip:function(){return e.getSubmitBtnTooltipOptions()},onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{libraryDropdown:".library-dropdown-region",folderSelector:".folder-selector-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"elements",get:function(){return{folderName:".folder-name"}}},{key:"bindListeners",value:function(){this.listenTo("".concat(this.channelName,":library"),"library:selected",this.onLibrarySelected),this.listenTo("".concat(this.channelName,":folder"),"folder:selected",this.onFolderSelected),this.listenTo(f.Vk.VIDEO,"".concat(f.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(f.Vk.VIDEO,"get:video:categories:libraries:".concat(this.options.videoId,":sync"),this.render)}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.spinnerModel.set(a.ZV.ShowSpinner,!0),this.addToLibrary()}},{key:"onLibrarySelected",value:function(e){this.spinnerModel.set(a.ZV.Disabled,!0),h.PU.setSelected(this.libraryTreeKey,e.get("id"),this.customLibraries),this.renderFolderSelector()}},{key:"onFolderSelected",value:function(e){this.spinnerModel.set(a.ZV.Disabled,!1),h.PU.setSelected(this.folderTreeKey,e,this.customLibraries)}},{key:"getVideosCustomLibraryNames",value:function(){if(!this.dataFetched())return null;var e=this.getVideoCustomLibraries();if(!e.length)return null;var t=i.map(e,(function(e){return"<strong>".concat(h.m$.escapeExpression(e),"</strong>")}));if(1===t.length)return t[0];var r=p.T.getPhrase(this.lang,"and");return"".concat(t.slice(0,-1).join(", ")," ").concat(r," ").concat(t.slice(-1))}},{key:"addToLibrary",value:function(){var e,t,r=this,o=h.PU.getSelected(this.folderTreeKey,this.customLibraries),l=o.get("id"),a=h.PU.getSelected(this.libraryTreeKey,this.customLibraries).get("id"),s=this.model.libraries.filter((function(e){return e.get("type")===c.r.HostedLibrary})),u=this.model.categories;u&&u.last()&&(e=u.last().get("id")),s&&s.length&&(t=i.last(s).get("id"));var d={objectId:this.options.videoId,objectType:n.MasterVideo,sourceLibraryId:t,destinationLibraryId:a,metadata:{sourceCategoryId:e,destinationCategoryId:l}};this.videoDataService.addVideoToCustomLibrary(d,this.model,o,(function(){r.triggerMethod("hide")}))}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.spinnerModel.get(a.ZV.Disabled)&&this.hasAvailableLibraries())return{title:p.T.getPhrase(this.lang,"heading")}}},{key:"getAvailableCustomLibraries",value:function(){if(!this.dataFetched())return null;var e=this.customLibraries.clone();e.remove(this.model.libraries.filter((function(e){return e.get("type")===c.r.CustomLibrary})));var t=e.filter((function(e){return 0===e.children.length}));return e.remove(t),e}},{key:"hasAvailableLibraries",value:function(){if(!this.customLibraries)return!1;var e=this.getAvailableCustomLibraries();return e&&e.length>0}},{key:"hasFolders",value:function(){return!!this.customLibraries&&!!this.customLibraries.find((function(e){return!!e.get("children").length}))}},{key:"getVideoCustomLibraries",value:function(){if(!this.model||!this.model.libraries||!this.model.libraries.length)return null;var e=this.model.libraries.filter((function(e){return e.get("type")===c.r.CustomLibrary}));return i.map(e,(function(e){return e.get("name")}))}},{key:"dataFetched",value:function(){return!!this.model}},{key:"renderLibraryDropdown",value:function(){if(this.customLibraries.length<=1)this.renderFolderSelector();else{var e=h.PU.getSelected(this.libraryTreeKey,this.customLibraries),t=this.getUI("folderName");this.$(t).hide(),this.showChildView("libraryDropdown",new y.A({currentLibraryId:e?e.get("id"):null,collection:this.getAvailableCustomLibraries(),channelName:"".concat(this.channelName,":library")}))}}},{key:"renderFolderSelector",value:function(){var e=this.getAvailableCustomLibraries();1===e.length&&h.PU.setSelected(this.libraryTreeKey,e.first().get("id"),e);var t=h.PU.getSelected(this.libraryTreeKey,e),r=t.get("children")&&!!t.get("children").length,n=this.getUI("folderName");t&&r&&this.$(n).show(),this.showChildView("folderSelector",new s.Y({collection:t.children,channelName:"".concat(this.channelName,":folder"),folderTreeKey:this.folderTreeKey}))}},{key:"requiredResources",get:function(){return{customLibraries:b.T.libraries}}},{key:"onBeforeRender",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId)}},{key:"viewOptions",value:function(){var e;return{styles:v,foundLibraries:this.getVideosCustomLibraryNames(),hasAvailableLibraries:this.hasAvailableLibraries(),hasMultipleLibraries:(null===(e=this.customLibraries)||void 0===e?void 0:e.length)>1,dataFetched:this.dataFetched(),spinnerEl:h.Kp.getSpinner({size:h.Ey.Large,extraClasses:"mx-auto"}),showNoFolderText:!this.hasFolders()}}},{key:"onRender",value:function(){this.dataFetched()&&this.hasAvailableLibraries()&&this.renderLibraryDropdown()}}])&&k(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),C}(o.Q.View)},99765:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({1:function(e,t,r,n,i){e.propertyIsEnumerable;var o,l=null!=t?t:e.nullContext||{};return(null!=(o=r.if.call(l,null!=(o=null!=t?t.options:t)?o.foundLibraries:o,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=r.if.call(l,null!=(o=null!=t?t.options:t)?o.hasAvailableLibraries:o,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=r.if.call(l,null!=(o=null!=t?t.options:t)?o.showNoFolderText:o,{name:"if",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?o:"")},2:function(e,t,r,n,i){var o;return e.propertyIsEnumerable,' <div class="alert alert-info" role="alert">\n <p class="m-0">'+(null!=(o=(r.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"foundLibraries",{name:"lang",hash:{libraries:null!=(o=null!=t?t.options:t)?o.foundLibraries:o},data:i}))?o:"")+"</p>\n </div>\n"},4:function(e,t,r,n,i){e.propertyIsEnumerable;var o,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression,u=e.lambda;return' <span class="d-block pb-2">'+s((r.lang||t&&t.lang||a).call(l,"selectFolder",{name:"lang",hash:{},data:i}))+"</span>\n"+(null!=(o=r.if.call(l,null!=(o=null!=t?t.options:t)?o.hasMultipleLibraries:o,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?o:"")+' <div class="mt-1 mb-2 library-dropdown-region"></div>\n\n <span class="'+s(u(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.header:o,t))+' folder-name">'+s((r.lang||t&&t.lang||a).call(l,"folder",{name:"lang",hash:{},data:i}))+'</span>\n <div class="'+s(u(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.folderSelector:o,t))+' mt-1 folder-selector-region"></div>\n'},5:function(e,t,r,n,i){e.propertyIsEnumerable;var o,l=e.escapeExpression;return' <span class="'+l(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.header:o,t))+'">'+l((r.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"library",{name:"lang",hash:{},data:i}))+"</span>\n"},7:function(e,t,r,n,i){e.propertyIsEnumerable;var o,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing;return" <p>"+e.escapeExpression((r.lang||t&&t.lang||a).call(l,"noFolders1",{name:"lang",hash:{},data:i}))+"</p>\n <p>"+(null!=(o=(r.lang||t&&t.lang||a).call(l,"noFolders2",{name:"lang",hash:{},data:i}))?o:"")+"</p>\n"},9:function(e,t,r,n,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){var o;return e.propertyIsEnumerable,null!=(o=r.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(9,i,0),data:i}))?o:""},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6732],{57733:function(e,t,r){"use strict";r.r(t),r.d(t,{AddToLibraryView:function(){return C}});var n,i=r(39479),o=r(31647),l=r(21679),a=r(88172),s=r(20072),u=r(10101),c=r(75459),d=r(67670),h=r(61843),f=r(48090),p=r(57857),b=r(95061),y=r(79665),g=r(99765),m=r.n(g),v={header:"S7CRE"};function L(e){return L="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},L(e)}function k(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}function T(e,t){if(t&&("object"===L(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)}function S(e){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},S(e)}!function(e){e[e.MasterVideo=1]="MasterVideo"}(n||(n={}));var C=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&&w(e,t)}(C,e);var t,r,o,g,L=(o=C,g=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(o);if(g){var r=S(this).constructor;e=Reflect.construct(t,arguments,r)}else e=t.apply(this,arguments);return T(this,e)});function C(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,C),L.call(this,e)}return t=C,(r=[{key:"initialize",value:function(){this.videoDataService=l.u.getInstance(f.Or.Video,this),this.bindListeners()}},{key:"name",get:function(){return"AddToLibraryView"}},{key:"title",get:function(){return p.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.addToLibrary"}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"appLinks",get:function(){return{".library-editor-applink":{application:f.OV.LIBRARY_EDITOR,action:f.eX.LibraryEditor.HOME}}}},{key:"folderTreeKey",get:function(){return"folderselect:".concat(this.cid)}},{key:"libraryTreeKey",get:function(){return"libraryselect:".concat(this.cid)}},{key:"channelName",get:function(){return h.N0.generateUniqueChannelName(this)}},{key:"template",get:function(){return m()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.Yw,title:p.T.getPhrase(this.lang,"title"),size:"modal-md",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new d.v,buttonText:p.T.getPhrase(this.lang,"addBtn"),tooltip:function(){return e.getSubmitBtnTooltipOptions()},onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{libraryDropdown:".library-dropdown-region",folderSelector:".folder-selector-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"elements",get:function(){return{folderName:".folder-name"}}},{key:"bindListeners",value:function(){this.listenTo("".concat(this.channelName,":library"),"library:selected",this.onLibrarySelected),this.listenTo("".concat(this.channelName,":folder"),"folder:selected",this.onFolderSelected),this.listenTo(f.Vk.VIDEO,"".concat(f.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(f.Vk.VIDEO,"get:video:categories:libraries:".concat(this.options.videoId,":sync"),this.render)}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.spinnerModel.set(a.ZV.ShowSpinner,!0),this.addToLibrary()}},{key:"onLibrarySelected",value:function(e){this.spinnerModel.set(a.ZV.Disabled,!0),h.PU.setSelected(this.libraryTreeKey,e.get("id"),this.customLibraries),this.renderFolderSelector()}},{key:"onFolderSelected",value:function(e){this.spinnerModel.set(a.ZV.Disabled,!1),h.PU.setSelected(this.folderTreeKey,e,this.customLibraries)}},{key:"getVideosCustomLibraryNames",value:function(){if(!this.dataFetched())return null;var e=this.getVideoCustomLibraries();if(!e.length)return null;var t=i.map(e,(function(e){return"<strong>".concat(h.m$.escapeExpression(e),"</strong>")}));if(1===t.length)return t[0];var r=p.T.getPhrase(this.lang,"and");return"".concat(t.slice(0,-1).join(", ")," ").concat(r," ").concat(t.slice(-1))}},{key:"addToLibrary",value:function(){var e,t,r=this,o=h.PU.getSelected(this.folderTreeKey,this.customLibraries),l=o.get("id"),a=h.PU.getSelected(this.libraryTreeKey,this.customLibraries).get("id"),s=this.model.libraries.filter((function(e){return e.get("type")===c.r.HostedLibrary})),u=this.model.categories;u&&u.last()&&(e=u.last().get("id")),s&&s.length&&(t=i.last(s).get("id"));var d={objectId:this.options.videoId,objectType:n.MasterVideo,sourceLibraryId:t,destinationLibraryId:a,metadata:{sourceCategoryId:e,destinationCategoryId:l}};this.videoDataService.addVideoToCustomLibrary(d,this.model,o,(function(){r.triggerMethod("hide")}))}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.spinnerModel.get(a.ZV.Disabled)&&this.hasAvailableLibraries())return{title:p.T.getPhrase(this.lang,"heading")}}},{key:"getAvailableCustomLibraries",value:function(){if(!this.dataFetched())return null;var e=this.customLibraries.clone();e.remove(this.model.libraries.filter((function(e){return e.get("type")===c.r.CustomLibrary})));var t=e.filter((function(e){return 0===e.children.length}));return e.remove(t),e}},{key:"hasAvailableLibraries",value:function(){if(!this.customLibraries)return!1;var e=this.getAvailableCustomLibraries();return e&&e.length>0}},{key:"hasFolders",value:function(){return!!this.customLibraries&&!!this.customLibraries.find((function(e){return!!e.get("children").length}))}},{key:"getVideoCustomLibraries",value:function(){if(!this.model||!this.model.libraries||!this.model.libraries.length)return null;var e=this.model.libraries.filter((function(e){return e.get("type")===c.r.CustomLibrary}));return i.map(e,(function(e){return e.get("name")}))}},{key:"dataFetched",value:function(){return!!this.model}},{key:"renderLibraryDropdown",value:function(){if(this.customLibraries.length<=1)this.renderFolderSelector();else{var e=h.PU.getSelected(this.libraryTreeKey,this.customLibraries),t=this.getUI("folderName");this.$(t).hide(),this.showChildView("libraryDropdown",new y.A({currentLibraryId:e?e.get("id"):null,collection:this.getAvailableCustomLibraries(),channelName:"".concat(this.channelName,":library")}))}}},{key:"renderFolderSelector",value:function(){var e=this.getAvailableCustomLibraries();1===e.length&&h.PU.setSelected(this.libraryTreeKey,e.first().get("id"),e);var t=h.PU.getSelected(this.libraryTreeKey,e),r=t.get("children")&&!!t.get("children").length,n=this.getUI("folderName");t&&r&&this.$(n).show(),this.showChildView("folderSelector",new s.Y({collection:t.children,channelName:"".concat(this.channelName,":folder"),folderTreeKey:this.folderTreeKey}))}},{key:"requiredResources",get:function(){return{customLibraries:b.T.libraries}}},{key:"onBeforeRender",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId)}},{key:"viewOptions",value:function(){var e;return{styles:v,foundLibraries:this.getVideosCustomLibraryNames(),hasAvailableLibraries:this.hasAvailableLibraries(),hasMultipleLibraries:(null===(e=this.customLibraries)||void 0===e?void 0:e.length)>1,dataFetched:this.dataFetched(),spinnerEl:h.Kp.getSpinner({size:h.Ey.Large,extraClasses:"mx-auto"}),showNoFolderText:!this.hasFolders()}}},{key:"onRender",value:function(){this.dataFetched()&&this.hasAvailableLibraries()&&this.renderLibraryDropdown()}}])&&k(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),C}(o.Q.View)},99765:function(e,t,r){var n=r(32227);e.exports=(n.default||n).template({1:function(e,t,r,n,i){e.propertyIsEnumerable;var o,l=null!=t?t:e.nullContext||{};return(null!=(o=r.if.call(l,null!=(o=null!=t?t.options:t)?o.foundLibraries:o,{name:"if",hash:{},fn:e.program(2,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=r.if.call(l,null!=(o=null!=t?t.options:t)?o.hasAvailableLibraries:o,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?o:"")+"\n"+(null!=(o=r.if.call(l,null!=(o=null!=t?t.options:t)?o.showNoFolderText:o,{name:"if",hash:{},fn:e.program(7,i,0),inverse:e.noop,data:i}))?o:"")},2:function(e,t,r,n,i){var o;return e.propertyIsEnumerable,' <div class="alert alert-info" role="alert">\n <p class="m-0">'+(null!=(o=(r.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"foundLibraries",{name:"lang",hash:{libraries:null!=(o=null!=t?t.options:t)?o.foundLibraries:o},data:i}))?o:"")+"</p>\n </div>\n"},4:function(e,t,r,n,i){e.propertyIsEnumerable;var o,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression,u=e.lambda;return' <span class="d-block pb-2">'+s((r.lang||t&&t.lang||a).call(l,"selectFolder",{name:"lang",hash:{},data:i}))+"</span>\n"+(null!=(o=r.if.call(l,null!=(o=null!=t?t.options:t)?o.hasMultipleLibraries:o,{name:"if",hash:{},fn:e.program(5,i,0),inverse:e.noop,data:i}))?o:"")+' <div class="mt-1 mb-2 library-dropdown-region"></div>\n\n <span class="'+s(u(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.header:o,t))+' folder-name">'+s((r.lang||t&&t.lang||a).call(l,"folder",{name:"lang",hash:{},data:i}))+'</span>\n <div class="'+s(u(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.folderSelector:o,t))+' mt-1 folder-selector-region"></div>\n'},5:function(e,t,r,n,i){e.propertyIsEnumerable;var o,l=e.escapeExpression;return' <span class="'+l(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.header:o,t))+'">'+l((r.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"library",{name:"lang",hash:{},data:i}))+"</span>\n"},7:function(e,t,r,n,i){e.propertyIsEnumerable;var o,l=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing;return" <p>"+e.escapeExpression((r.lang||t&&t.lang||a).call(l,"noFolders1",{name:"lang",hash:{},data:i}))+"</p>\n <p>"+(null!=(o=(r.lang||t&&t.lang||a).call(l,"noFolders2",{name:"lang",hash:{},data:i}))?o:"")+"</p>\n"},9:function(e,t,r,n,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,r,n,i){var o;return e.propertyIsEnumerable,null!=(o=r.if.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"if",hash:{},fn:e.program(1,i,0),inverse:e.program(9,i,0),data:i}))?o:""},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6774],{86774:function(e,n,t){"use strict";t.r(n),t.d(n,{PublishLibraryView:function(){return O}});var r=t(48088),i=t(21679),a=t(31647),o=t(10101),l=t(
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6774],{86774:function(e,n,t){"use strict";t.r(n),t.d(n,{PublishLibraryView:function(){return O}});var r=t(48088),i=t(21679),a=t(31647),o=t(10101),l=t(48090),u=t(88172),c=t(61843),s=t(69184),f=t(57857),h=t(95061),p=t(48652),y=t.n(p),b=t(264);function g(e){return g="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},g(e)}function d(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function m(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function v(e,n){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},v(e,n)}function k(e,n){if(n&&("object"===g(n)||"function"==typeof n))return n;if(void 0!==n)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)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var O=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&v(e,n)}(O,e);var n,t,a,p,g=(a=O,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,n=w(a);if(p){var t=w(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return k(this,e)});function O(){return d(this,O),g.apply(this,arguments)}return n=O,(t=[{key:"initialize",value:function(){this.libraryDataService=i.u.getInstance(l.Or.Library,this),this.videoDataService=i.u.getInstance(l.Or.Video,this)}},{key:"name",get:function(){return"PublishLibraryView"}},{key:"title",get:function(){return f.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.publishLibrary"}},{key:"template",get:function(){return y()}},{key:"channelName",get:function(){return c.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{title:f.T.getPhrase(this.lang,"heading"),behaviorClass:o.Yw,spinnerButtonOptions:{channelName:this.channelName,buttonText:f.T.getPhrase(this.lang,"continue"),onClick:function(){return e.onClickContinue()}}}]}},{key:"viewOptions",value:function(){return{hasLite:b.g.hasLite}}},{key:"onClickContinue",value:function(){var e=this;r.Radio.channel(this.channelName).trigger(u.I3.ShowSpinner);var n=0,t=function(){++n===e.libraries.length&&(e.triggerMethod("hide"),e.videoDataService.clearVideoCache(),r.Radio.channel(s.GL.LIBRARY_STATUS).trigger("status:changed"))};this.libraries.each((function(n){e.libraryDataService.publishLibrary(n.get("id"),t)}))}},{key:"requiredResources",get:function(){return{libraries:h.T.libraries}}}])&&m(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),O}(a.Q.View)},48652:function(e,n,t){var r=t(32227);e.exports=(r.default||r).template({1:function(e,n,t,r,i){return e.propertyIsEnumerable," <li>"+e.escapeExpression((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"meaning2",{name:"lang",hash:{},data:i}))+"</li>\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,i){e.propertyIsEnumerable;var a,o=null!=n?n:e.nullContext||{},l=e.hooks.helperMissing,u=e.escapeExpression;return"<p>"+u((t.lang||n&&n.lang||l).call(o,"infoHeading",{name:"lang",hash:{},data:i}))+"</p>\n<p>"+u((t.lang||n&&n.lang||l).call(o,"meaningSubheading",{name:"lang",hash:{},data:i}))+"</p>\n<ul>\n <li>"+u((t.lang||n&&n.lang||l).call(o,"meaning1",{name:"lang",hash:{},data:i}))+"</li>\n"+(null!=(a=t.unless.call(o,null!=(a=null!=n?n.options:n)?a.hasLite:a,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?a:"")+" <li>"+u((t.lang||n&&n.lang||l).call(o,"meaning3",{name:"lang",hash:{},data:i}))+"</li>\n</ul>"},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6788],{36788:function(t,e,r){"use strict";r.r(e),r.d(e,{NoLibraryView:function(){return d}});var n=r(31647),o=r(57857),i=r(63791),u=r(80758),c=r(29457),a=r(
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6788],{36788:function(t,e,r){"use strict";r.r(e),r.d(e,{NoLibraryView:function(){return d}});var n=r(31647),o=r(57857),i=r(63791),u=r(80758),c=r(29457),a=r(48090),f=r(2),l=r.n(f);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function y(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}function h(t,e){if(e&&("object"===p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}var d=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(d,t);var e,r,n,f,p=(n=d,f=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(t){return!1}}(),function(){var t,e=g(n);if(f){var r=g(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return h(this,t)});function d(){return y(this,d),p.apply(this,arguments)}return e=d,(r=[{key:"name",get:function(){return"NoLibraryView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.noLibrary"}},{key:"template",get:function(){return l()}},{key:"regions",value:function(){return{emptyState:{el:".no-library-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:u.o,region:"emptyState",type:c.ub.LibraryEditor,shouldRender:function(){return!0},componentOptions:{plusSvg:i.Nj.getSvg(i.vn.Plus),heading:o.T.getPhrase(this.lang,"emptyStateHeading"),description:o.T.getPhrase(this.lang,"emptyStateDescription"),btnText:o.T.getPhrase(this.lang,"emptyStateCta")},emptyStateComponents:a.aW}]}}])&&s(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),d}(n.Q.View)},2:function(t,e,r){var n=r(32227);t.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){return'<div class="no-library-region"></div>'},useData:!0})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6963],{54096:function(r,e,t){t.d(e,{G:function(){return a}});var n=t(1024),o=t(21679);function a(r){var e,t;return e=r,t=o.u.getInstance(e),n.useEffect((function(){return function(){o.u.releaseInstance(e)}})),t}},84657:function(r,e,t){t.d(e,{v:function(){return n}});var n={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(r){return"banner,cover,tallPoster,thumbnail,followers{id:".concat(r,"},pinnedVideos[count()]{limit:0},playlists[count()]{limit:0},series[count()]{limit:0}")},VIDEO:"series,season,rating,producers,glance,distributors,owner,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",PLAYLIST:"cover,banner,owner,videos[count()]{limit:0},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"}},34107:function(r,e,t){t.d(e,{D:function(){return c}});var n=t(68003),o=t(2248),a=t(40221),i=t(84657),c={domainLibraries:function(r,e,t,o){return{url:n._.urlBuilder("/api/domain/v2/me/libraries",{type:r,maxCategoryDepth:0}),key:"libraries:".concat(r.sort().join(":")),formatData:function(r){return r.map((function(r){return r.data}))},success:e,error:t,always:o}},libraryRequestLibraries:function(){return{url:"{gateway}/v1/library-requests/libraries",key:"libraries"}},librariesWithCategories:function(){return{url:n._.urlBuilder("/api/domain/v2/me/libraries",{type:["sharedLibrary","customLibrary","unpublishedCustomLibrary"],maxCategoryDepth:5}),key:"libraries:with:categories",normalize:!1}},librariesWithOwnerLogos:function(r,e,t,o){return r.sort(),{url:n._.urlBuilder("/api/domain/v2/objects",{query:i.v.LIBRARY_COLLECTION,id:r}),key:"libraries:owner:logo:".concat(r.join(",")),success:e,error:t,always:o}},library:function(r,e,t,o){return{url:n._.urlBuilder("{gateway}/v1/objects/".concat(r),{query:i.v.LIBRARY}),key:"library:".concat(r),success:e,error:t,always:o}},librarySubscribers:function(r,e){var t={};return e&&(t.cursor=e),{url:n._.urlBuilder("{gateway}/v1/library-requests/libraries/".concat(r,"/subscribers"),t),key:"library:subscribers:".concat(r,":").concat(e)}},libraryOwner:function(r){return{url:"{gateway}/v1/library-requests/libraries/".concat(r,"/subscribers?ownerOnly=true"),key:"library:owner:".concat(r),formatData:function(r){return a.m.first(r.data)}}},updateSubscriberPermissions:function(r,e,t,n,a){return{url:"{gateway}/v1/libraries/".concat(r,"/library-request-permissions"),key:"update:subscriber:permissions:".concat(r,":").concat(e),type:o.k.PUT,data:{customerId:e,granted:t},invalidationKeys:["library:owner:".concat(r),"library:subscribers:".concat(r)],success:n,error:a}},removeSubscriber:function(r,e,t,n){return{url:"{gateway}/v1/objects/".concat(r,"/subscribedcustomers?memberId=").concat(e),key:"revoke:subscription:".concat(r,":").concat(e),type:o.k.DELETE,invalidationKeys:["library:subscribers:".concat(r)],success:t,error:n}},folder:function(r,e,t,n){return{url:"{gateway}/v1/objects/".concat(r,"?query=banner,libraries"),key:"library:folder:".concat(r),success:e,error:t,always:n}},folderParentTree:function(r,e,t,n){return{url:"/api/domain/v2/categories/".concat(r,"/parent-tree?includeAll=false"),key:"folder:parent:tree".concat(r),success:e,error:t,always:n}},childFolders:function(r,e,t,n,o){var a="{gateway}/v1/objects/".concat(r,"/categories?query={limit:100}thumbnail"),i="child:folders:".concat(r);return e&&(a+="&cursor=".concat(e),i+=":".concat(e)),{url:a,key:i,formatData:function(r){var e=r.data.sort((function(r,e){return r.name.toLowerCase().localeCompare(e.name.toLowerCase())}));return Object.assign(Object.assign({},r),{data:e})},success:t,error:n,always:o}},addToLibrary:function(r){return{url:"{gateway}/v1/library-requests",key:"add:".concat(r.objectId,":to:").concat(r.destinationLibraryId,":").concat(r.metadata.destinationCategoryId),type:o.k.POST,data:r}}}},2491:function(r,e,t){t.d(e,{Z:function(){return i}});var n=t(54096),o=t(21186),a=t(92159);function i(){var r=(0,n.G)(a.P.ALERT);return{success:function(e){r.success(e)()},error:function(e){r.error(e)()},warning:function(e){r.createAlert({type:o.NK.Warning,heading:o.R6.Warning,message:e})}}}},82378:function(r,e,t){t.d(e,{i:function(){return a}});var n=t(1024),o=t(94223);function a(r,e){var t=r,a=e,i=(0,o.P)(r&&function(r){return t(r).key});return(0,n.useEffect)((function(){i&&i.shouldInitialFetch&&e&&a()}),[null==i?void 0:i.shouldInitialFetch,e]),(0,n.useEffect)((function(){i&&i.nextCursor&&!i.isFetching&&e&&a(i.nextCursor)}),[null==i?void 0:i.nextCursor,null==i?void 0:i.isFetching,e]),i}},94223:function(r,e,t){t.d(e,{P:function(){return s}});var n=t(1024),o=t(58566),a=t(86120),i=t(53808);function c(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}function s(r,e,t){function s(r){if(r)return i.q.isFunction(e)?e(r):r.data}function u(r){var e,n;if(r)return t?t(r):null===(n=null===(e=r.pagination)||void 0===e?void 0:e.cursors)||void 0===n?void 0:n.next}return(0,o.useSelector)((0,n.useMemo)((function(){return function(e){if(i.q.isFunction(r)){for(var t=r,n=i.q.isFunction(r)&&t(),o=n&&a.a.getResponse(e,n),l=o&&o.isFetching,d=o&&o.statusCode,b=o&&o.hasCompleted,f=o&&o.shouldFetch,y=s(o&&o.data),m=u(o&&o.data),v=function(r){var e;if(r)return null===(e=r)||void 0===e?void 0:e.count}(o&&o.data);m&&(l=(o=a.a.getResponse(e,t(m))).isFetching,d=o.statusCode,b=o.hasCompleted,!o.shouldFetch);){var p=s(o.data);p&&y.push.apply(y,function(r){if(Array.isArray(r))return c(r)}(C=p)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(C)||function(r,e){if(r){if("string"==typeof r)return c(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?c(r,e):void 0}}(C)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());var h=u(o.data);m=h===m?null:h}var g={shouldInitialFetch:f,items:y,nextCursor:m,isFetching:l,statusCode:d,hasCompleted:b};return"number"==typeof v&&(g.totalItems=v),g}var C}}),[r]))}t(35656).o.Ok},91021:function(r,e,t){t.r(e),t.d(e,{RemoveLibrarySubscriberView:function(){return p}});var n=t(1024),o=t.n(n),a=t(52076),i=t(86120),c=t(57857),s=t(71575),u=t(2491),l=t(34107),d=t(82378),b=t(85610),f=t(66703),y=t(70065);function m(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=new Array(e);t<e;t++)n[t]=r[t];return n}var v="libraryRequests.removeLibrarySubscriber";function p(r){var e,t,n,p=i.a.useGetFetch(),h=(t=o().useState(!1),n=2,function(r){if(Array.isArray(r))return r}(t)||function(r,e){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var n,o,a=[],i=!0,c=!1;try{for(t=t.call(r);!(i=(n=t.next()).done)&&(a.push(n.value),!e||a.length!==e);i=!0);}catch(r){c=!0,o=r}finally{try{i||null==t.return||t.return()}finally{if(c)throw o}}return a}}(t,n)||function(r,e){if(r){if("string"==typeof r)return m(r,e);var t=Object.prototype.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?m(r,e):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.")}()),g=h[0],C=h[1],I=i.a.useBasicFetch(l.D.library(r.libraryId));function w(e){return l.D.librarySubscribers(r.libraryId,e)}var L=(0,d.i)(w,(function(r){p(w(r))})),E=(0,u.Z)(),S=null===(e=null==L?void 0:L.items)||void 0===e?void 0:e.find((function(e){return e.customerId===r.customerId})),k=I.hasCompleted&&!!S;return o().createElement(s.G,{title:c.T.getPhrase(v,"removeAccess"),closePopup:r.closePopup,showLoadingSpinner:!k},!!k&&o().createElement(o().Fragment,null,o().createElement("div",{className:"alert alert-info",role:"alert"},o().createElement(f.x,{namespace:v,phrase:"alert"})),o().createElement("p",null,o().createElement(f.x,{namespace:v,phrase:"removeSubscriberInfo",options:{school:S.customerName,library:I.data.name}})),o().createElement(b.u,null,o().createElement(b.u.Cancel,{onClick:r.closePopup}),o().createElement(b.u.Submit,{onClick:function(){C(!0),p(l.D.removeSubscriber(r.libraryId,r.customerId,(function(){E.success(c.T.getPhrase(v,"revokeSubscriptionSuccess",{school:S.customerName,library:I.data.name})),a.k.logUserAction({id:r.libraryId,customerId:r.customerId},{actionType:y.UserAction.Dissociate,entity:y.EntityType.Library,descriptor:y.AssocDescriptor.Customer,location:y.LocationContext.Popup,workflowPhase:y.WorkflowPhase.Complete}),r.closePopup()}),(function(){C(!1),E.error(c.T.getPhrase(v,"revokeSubscriptionError",{school:S.customerName,library:I.data.name}))})))},text:c.T.getPhrase(v,"removeAccess"),variant:"danger",showSpinner:g}))))}}}]);
|