@clickview/library-editor 1.54.1-dev.0 → 1.55.0-dev.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 +3 -3
- package/dist/css/{2601-library-editor-8922d361d6.chunk.css → 2601-library-editor-df40499c04.chunk.css} +2 -2
- package/dist/css/{4001-library-editor-da87291909.chunk.css → 4001-library-editor-f6d2f9fb58.chunk.css} +1 -1
- package/dist/css/{9383-library-editor-02381b537c.chunk.css → 9383-library-editor-41fc3cc85e.chunk.css} +2 -2
- package/dist/css/{library-editor-app-08d619de95.css → library-editor-app-bcca987662.css} +1 -1
- package/dist/languages/en.json +4321 -1
- package/dist/scripts/101-8f41923234.chunk.js +1 -0
- package/dist/scripts/{1010-2c4e71bac2.chunk.js → 1010-4a381a84d4.chunk.js} +1 -1
- package/dist/scripts/{1086-d0efa1a0ca.chunk.js → 1086-7632f7b45b.chunk.js} +1 -1
- package/dist/scripts/112-4f413f94c0.chunk.js +1 -0
- package/dist/scripts/1216-83f6fbc7be.chunk.js +1 -0
- package/dist/scripts/{1269-ec70091b19.chunk.js → 1269-02d8d91784.chunk.js} +1 -1
- package/dist/scripts/{1409-f3fea6c3c3.chunk.js → 1409-58db6bd9f7.chunk.js} +1 -1
- package/dist/scripts/152-808e046b1f.chunk.js +2 -0
- package/dist/scripts/{1703-0e6940a3c0.chunk.js → 1703-45ced13ccd.chunk.js} +1 -1
- package/dist/scripts/{1832-9fd96d5efe.chunk.js → 1832-6a54b38248.chunk.js} +1 -1
- package/dist/scripts/{1876-fc815ba31e.chunk.js → 1876-e0567188b8.chunk.js} +1 -1
- package/dist/scripts/1973-7a1768228d.chunk.js +1 -0
- package/dist/scripts/2417-7628573bf3.chunk.js +1 -0
- package/dist/scripts/{243-d27b3c7903.chunk.js → 243-25fcce188c.chunk.js} +1 -1
- package/dist/scripts/2482-ded3090c15.chunk.js +1 -0
- package/dist/scripts/{259-d6a4aa6694.chunk.js → 259-e24fcf8f12.chunk.js} +1 -1
- package/dist/scripts/{2601-d42245cb40.chunk.js → 2601-944902ba08.chunk.js} +1 -1
- package/dist/scripts/{2644-cadc6531d6.chunk.js → 2644-98304e9394.chunk.js} +1 -1
- package/dist/scripts/2648-0a58c0fc05.chunk.js +1 -0
- package/dist/scripts/{2692-b7dff9da8a.chunk.js → 2692-1ddd87476e.chunk.js} +1 -1
- package/dist/scripts/2802-d428814c29.chunk.js +2 -0
- package/dist/scripts/2802-d428814c29.chunk.js.LICENSE.txt +8 -0
- package/dist/scripts/{2803-026f3af7cb.chunk.js → 2803-fbb9d2439d.chunk.js} +1 -1
- package/dist/scripts/{2888-a406bcd564.chunk.js → 2888-c2c8b859cd.chunk.js} +1 -1
- package/dist/scripts/299-1a0d6a88dc.chunk.js +1 -0
- package/dist/scripts/{2998-a3c3a1e950.chunk.js → 2998-aae0ec14de.chunk.js} +1 -1
- package/dist/scripts/{3400-326dc33968.chunk.js → 3400-ebc91cde7a.chunk.js} +1 -1
- package/dist/scripts/343-41502b5d24.chunk.js +1 -0
- package/dist/scripts/{35-d04a61537f.chunk.js → 35-68aa98885c.chunk.js} +1 -1
- package/dist/scripts/{3551-97ac416527.chunk.js → 3551-ad62e3a403.chunk.js} +1 -1
- package/dist/scripts/{3639-171b53e474.chunk.js → 3639-c5cc04c72d.chunk.js} +1 -1
- package/dist/scripts/3746-9c62c31099.chunk.js +1 -0
- package/dist/scripts/376-83584040a3.chunk.js +1 -0
- package/dist/scripts/{3763-21a9bc8c81.chunk.js → 3763-47619f0e54.chunk.js} +1 -1
- package/dist/scripts/3969-c636ff3159.chunk.js +1 -0
- package/dist/scripts/4001-a84ada264e.chunk.js +2 -0
- package/dist/scripts/4024-5bc8aa8dcd.chunk.js +1 -0
- package/dist/scripts/{4201-9f363cadea.chunk.js → 4201-ffd35af9cb.chunk.js} +1 -1
- package/dist/scripts/{4245-3680566469.chunk.js → 4245-59b4242cad.chunk.js} +1 -1
- package/dist/scripts/4523-55c4df85c8.chunk.js +1 -0
- package/dist/scripts/{4591-84bc2f21f0.chunk.js → 4591-78600e384c.chunk.js} +1 -1
- package/dist/scripts/{4860-7e9c7b578f.chunk.js → 4860-6001ab4e2a.chunk.js} +1 -1
- package/dist/scripts/5046-cb525612c6.chunk.js +1 -0
- package/dist/scripts/514-eeb95eba47.chunk.js +1 -0
- package/dist/scripts/{5173-6fe93f90b8.chunk.js → 5173-d333602893.chunk.js} +1 -1
- package/dist/scripts/{5286-c55bd5882c.chunk.js → 5286-7aac82c4d1.chunk.js} +1 -1
- package/dist/scripts/535-27d0457532.chunk.js +1 -0
- package/dist/scripts/{5412-abf3c7ab24.chunk.js → 5412-e2505df3a4.chunk.js} +1 -1
- package/dist/scripts/{5418-4cf3592f6a.chunk.js → 5418-f84d0ff359.chunk.js} +1 -1
- package/dist/scripts/{5424-fb9af4cac5.chunk.js → 5424-65be3c657c.chunk.js} +1 -1
- package/dist/scripts/5524-04583b6e40.chunk.js +1 -0
- package/dist/scripts/{5707-2455798bbe.chunk.js → 5707-fcb653aa7a.chunk.js} +1 -1
- package/dist/scripts/{5747-dc100fe944.chunk.js → 5747-674f00efcd.chunk.js} +1 -1
- package/dist/scripts/5850-74b0b14549.chunk.js +1 -0
- package/dist/scripts/5891-0864c38750.chunk.js +1 -0
- package/dist/scripts/{6093-c4d7d99258.chunk.js → 6093-e19df1d1fa.chunk.js} +1 -1
- package/dist/scripts/61-ec794cf02d.chunk.js +2 -0
- package/dist/scripts/{6352-9f5498c43f.chunk.js → 6352-6452f77c89.chunk.js} +1 -1
- package/dist/scripts/6532-48f3f080f5.chunk.js +2 -0
- package/dist/scripts/{6732-0223b7e084.chunk.js → 6732-85afd02f41.chunk.js} +1 -1
- package/dist/scripts/{6774-7d16e3a1b2.chunk.js → 6774-a002ac7253.chunk.js} +1 -1
- package/dist/scripts/{6788-1baf5483df.chunk.js → 6788-dc6b522995.chunk.js} +1 -1
- package/dist/scripts/6963-0e2bf1bde7.chunk.js +1 -0
- package/dist/scripts/7002-eef9319d36.chunk.js +1 -0
- package/dist/scripts/{7053-5f6f2bf8ee.chunk.js → 7053-35b82818eb.chunk.js} +1 -1
- package/dist/scripts/7071-6f7e375aaa.chunk.js +1 -0
- package/dist/scripts/708-c74c75f82a.chunk.js +1 -0
- package/dist/scripts/7153-57796cd98e.chunk.js +1 -0
- package/dist/scripts/{7190-b143292308.chunk.js → 7190-2b40df1e89.chunk.js} +1 -1
- package/dist/scripts/7295-474c754cb6.chunk.js +1 -0
- package/dist/scripts/{7376-e476873e22.chunk.js → 7376-e3bf3a94f9.chunk.js} +1 -1
- package/dist/scripts/{7408-eb04403233.chunk.js → 7408-15b5cc4a39.chunk.js} +1 -1
- package/dist/scripts/7827-ce63697325.chunk.js +1 -0
- package/dist/scripts/8113-d678e76098.chunk.js +1 -0
- package/dist/scripts/8130-0a0a9c4cab.chunk.js +1 -0
- package/dist/scripts/8213-14b105169f.chunk.js +1 -0
- package/dist/scripts/{8362-2712404025.chunk.js → 8362-267efdac61.chunk.js} +1 -1
- package/dist/scripts/8542-64733a5c92.chunk.js +1 -0
- package/dist/scripts/8591-149f4a2b62.chunk.js +1 -0
- package/dist/scripts/{8726-10013d1e22.chunk.js → 8726-2d0bc64637.chunk.js} +1 -1
- package/dist/scripts/{4506-e3e16c1c39.chunk.js → 8727-9077c2b877.chunk.js} +1 -1
- package/dist/scripts/{8762-0c818e61d0.chunk.js → 8762-be126e413d.chunk.js} +1 -1
- package/dist/scripts/{8906-3052c24e98.chunk.js → 8906-2ae58fb990.chunk.js} +1 -1
- package/dist/scripts/{8952-5dfd08cdc7.chunk.js → 8952-a9a7742f72.chunk.js} +2 -2
- package/dist/scripts/{9357-04700677af.chunk.js → 9357-e71ea6a34d.chunk.js} +1 -1
- package/dist/scripts/9369-1e706eb521.chunk.js +2 -0
- package/dist/scripts/9383-405d522f62.chunk.js +1 -0
- package/dist/scripts/{9695-8b46921478.chunk.js → 9695-636ea0ef64.chunk.js} +1 -1
- package/dist/scripts/{9927-1a5a65a341.chunk.js → 9927-7a935c955d.chunk.js} +1 -1
- package/dist/scripts/bundle-1a963db722.min.js +2 -0
- package/dist/scripts/bundle-1a963db722.min.js.LICENSE.txt +10 -0
- package/dist/scripts/{polyfills-e4d8584da7.min.js → polyfills-5ce436cbbe.min.js} +1 -1
- package/package.json +4 -5
- package/typings/libs/CVEvents.d.ts +13 -0
- package/typings/libs/CVLanguages.d.ts +24 -0
- package/typings/libs/LazyLoad.d.ts +30 -0
- package/typings/libs/LazyLoad.ts +27 -0
- package/typings/libs/cookiesjs.d.ts +24 -0
- package/dist/scripts/101-1aa755b98b.chunk.js +0 -1
- package/dist/scripts/1216-9d2e314558.chunk.js +0 -1
- package/dist/scripts/1537-2945b91924.chunk.js +0 -1
- package/dist/scripts/1973-074d4e72c2.chunk.js +0 -1
- package/dist/scripts/209-f9e52775b1.chunk.js +0 -1
- package/dist/scripts/2516-0290fc7712.chunk.js +0 -1
- package/dist/scripts/2639-efe1222211.chunk.js +0 -2
- package/dist/scripts/2639-efe1222211.chunk.js.LICENSE.txt +0 -8
- package/dist/scripts/2648-61a84bc983.chunk.js +0 -1
- package/dist/scripts/2955-521e238d27.chunk.js +0 -1
- package/dist/scripts/299-32a1391000.chunk.js +0 -1
- package/dist/scripts/3746-9f89d2e526.chunk.js +0 -1
- package/dist/scripts/376-4d9e8d5305.chunk.js +0 -1
- package/dist/scripts/3969-14f58e46c8.chunk.js +0 -1
- package/dist/scripts/4001-5f16bcaff3.chunk.js +0 -2
- package/dist/scripts/4024-e76b07c207.chunk.js +0 -1
- package/dist/scripts/4523-e918636e67.chunk.js +0 -1
- package/dist/scripts/471-9ae0a7d088.chunk.js +0 -2
- package/dist/scripts/4984-e55e0bfa17.chunk.js +0 -1
- package/dist/scripts/514-9e42f33112.chunk.js +0 -2
- package/dist/scripts/514-9e42f33112.chunk.js.LICENSE.txt +0 -6
- package/dist/scripts/535-96be75b325.chunk.js +0 -1
- package/dist/scripts/5524-83e92242a1.chunk.js +0 -1
- package/dist/scripts/5698-74d4a95cab.chunk.js +0 -1
- package/dist/scripts/5850-21711256a9.chunk.js +0 -1
- package/dist/scripts/5891-1f548b9c62.chunk.js +0 -1
- package/dist/scripts/61-35a4e0dd3d.chunk.js +0 -2
- package/dist/scripts/6637-3078ed12bc.chunk.js +0 -1
- package/dist/scripts/6725-52d65e0d02.chunk.js +0 -2
- package/dist/scripts/6963-2e5edf04ac.chunk.js +0 -1
- package/dist/scripts/7071-9ae15d6979.chunk.js +0 -1
- package/dist/scripts/7153-11798dda90.chunk.js +0 -1
- package/dist/scripts/7295-c5ccbfe2be.chunk.js +0 -1
- package/dist/scripts/7416-bafece2a3d.chunk.js +0 -1
- package/dist/scripts/7827-53c10fe9d7.chunk.js +0 -1
- package/dist/scripts/8080-540165cb5c.chunk.js +0 -1
- package/dist/scripts/8113-eb9901344c.chunk.js +0 -1
- package/dist/scripts/8213-4d11becb33.chunk.js +0 -1
- package/dist/scripts/8542-7dbc2fa676.chunk.js +0 -1
- package/dist/scripts/8591-920b0560e4.chunk.js +0 -1
- package/dist/scripts/8757-8ba60a3c5f.chunk.js +0 -2
- package/dist/scripts/8757-8ba60a3c5f.chunk.js.LICENSE.txt +0 -44
- package/dist/scripts/9077-fd1d054d31.chunk.js +0 -1
- package/dist/scripts/9134-8845590ece.chunk.js +0 -1
- package/dist/scripts/9369-cacc5f30e5.chunk.js +0 -2
- package/dist/scripts/9383-26ce3e3847.chunk.js +0 -1
- package/dist/scripts/bundle-5d010f1f12.min.js +0 -2
- package/dist/scripts/bundle-5d010f1f12.min.js.LICENSE.txt +0 -133
- /package/dist/css/{6637-library-editor-6a2d152d7d.chunk.css → 112-library-editor-6a2d152d7d.chunk.css} +0 -0
- /package/dist/css/{6725-library-editor-01b4461ff1.chunk.css → 152-library-editor-01b4461ff1.chunk.css} +0 -0
- /package/dist/css/{1537-library-editor-46f8e6e95b.chunk.css → 2417-library-editor-46f8e6e95b.chunk.css} +0 -0
- /package/dist/css/{209-library-editor-1b6dc45d45.chunk.css → 2482-library-editor-1b6dc45d45.chunk.css} +0 -0
- /package/dist/css/{2955-library-editor-d2f704c6a5.chunk.css → 343-library-editor-d2f704c6a5.chunk.css} +0 -0
- /package/dist/css/{9077-library-editor-765ea88cb0.chunk.css → 5046-library-editor-765ea88cb0.chunk.css} +0 -0
- /package/dist/css/{8080-library-editor-7ffe353138.chunk.css → 708-library-editor-7ffe353138.chunk.css} +0 -0
- /package/dist/css/{9134-library-editor-5a1c6fc3b4.chunk.css → 8130-library-editor-5a1c6fc3b4.chunk.css} +0 -0
- /package/dist/scripts/{6725-52d65e0d02.chunk.js.LICENSE.txt → 152-808e046b1f.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4001-5f16bcaff3.chunk.js.LICENSE.txt → 4001-a84ada264e.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{546-2cf4378b0c.chunk.js → 546-f770211173.chunk.js} +0 -0
- /package/dist/scripts/{61-35a4e0dd3d.chunk.js.LICENSE.txt → 61-ec794cf02d.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{471-9ae0a7d088.chunk.js.LICENSE.txt → 6532-48f3f080f5.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{8952-5dfd08cdc7.chunk.js.LICENSE.txt → 8952-a9a7742f72.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9369-cacc5f30e5.chunk.js.LICENSE.txt → 9369-1e706eb521.chunk.js.LICENSE.txt} +0 -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 I}});var n,i=r(21161),o=r(21679),a=r(57857),l=r(31647);!function(e){e[e.MasterVideo=1]="MasterVideo",e[e.MasterClip=2]="MasterClip",e[e.MasterInteractive=3]="MasterInteractive"}(n||(n={}));var s=r(75459),u=r(10101),c=r(88172),d=r(20072),h=r(57098),f=r(67670),p=r(93569),b=r(79665),y=r(95061),m=r(99765),g=r.n(m),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,w(n.key),n)}}function w(e){var t=function(e){if("object"!=L(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=L(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==L(t)?t:t+""}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}var I=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=T(t),function(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)}(e,S()?Reflect.construct(t,r||[],T(e).constructor):t.apply(e,r))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(t,e),r=t,l=[{key:"initialize",value:function(){this.videoDataService=o.u.getInstance(h.Or.Video,this),this.bindListeners()}},{key:"name",get:function(){return"AddToLibraryView"}},{key:"title",get:function(){return a.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:h.OV.LIBRARY_EDITOR,action:h.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 p.N0.generateUniqueChannelName(this)}},{key:"template",get:function(){return g()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.Yw,title:a.T.getPhrase(this.lang,"title"),size:"modal-md",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new f.v,buttonText:a.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(h.Vk.VIDEO,"".concat(h.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(h.Vk.VIDEO,"get:video:categories:libraries:".concat(this.options.videoId,":sync"),this.render)}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.spinnerModel.set(c.ZV.ShowSpinner,!0),this.addToLibrary()}},{key:"onLibrarySelected",value:function(e){this.spinnerModel.set(c.ZV.Disabled,!0),p.PU.setSelected(this.libraryTreeKey,e.get("id"),this.customLibraries),this.renderFolderSelector()}},{key:"onFolderSelected",value:function(e){this.spinnerModel.set(c.ZV.Disabled,!1),p.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(p.m$.escapeExpression(e),"</strong>")}));if(1===t.length)return t[0];var r=a.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=p.PU.getSelected(this.folderTreeKey,this.customLibraries),a=o.get("id"),l=p.PU.getSelected(this.libraryTreeKey,this.customLibraries).get("id"),u=this.model.libraries.filter((function(e){return e.get("type")===s.r.HostedLibrary})),c=this.model.categories;c&&c.last()&&(e=c.last().get("id")),u&&u.length&&(t=i.last(u).get("id"));var d={objectId:this.options.videoId,objectType:n.MasterVideo,sourceLibraryId:t,destinationLibraryId:l,metadata:{sourceCategoryId:e,destinationCategoryId:a}};this.videoDataService.addVideoToCustomLibrary(d,this.model,o,(function(){r.triggerMethod("hide")}))}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.spinnerModel.get(c.ZV.Disabled)&&this.hasAvailableLibraries())return{title:a.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")===s.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")===s.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=p.PU.getSelected(this.libraryTreeKey,this.customLibraries),t=this.getUI("folderName");this.$(t).hide(),this.showChildView("libraryDropdown",new b.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&&p.PU.setSelected(this.libraryTreeKey,e.first().get("id"),e);var t=p.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 d.Y({collection:t.children,channelName:"".concat(this.channelName,":folder"),folderTreeKey:this.folderTreeKey}))}},{key:"requiredResources",get:function(){return{customLibraries:y.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:p.Kp.getSpinner({size:p.Ey.Large,extraClasses:"mx-auto"}),showNoFolderText:!this.hasFolders()}}},{key:"onRender",value:function(){this.dataFetched()&&this.hasAvailableLibraries()&&this.renderLibraryDropdown()}}],l&&k(r.prototype,l),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,l}(l.Q.G7)},99765:function(e,t,r){var n=r(31197);e.exports=(n.default||n).template({1:function(e,t,r,n,i){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{};return(null!=(o=r.if.call(a,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(a,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(a,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,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression,u=e.lambda;return' <span class="d-block pb-2">'+s((r.lang||t&&t.lang||l).call(a,"selectFolder",{name:"lang",hash:{},data:i}))+"</span>\n"+(null!=(o=r.if.call(a,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||l).call(a,"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,a=e.escapeExpression;return' <span class="'+a(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.header:o,t))+'">'+a((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,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing;return" <p>"+e.escapeExpression((r.lang||t&&t.lang||l).call(a,"noFolders1",{name:"lang",hash:{},data:i}))+"</p>\n <p>"+(null!=(o=(r.lang||t&&t.lang||l).call(a,"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 I}});var n,i=r(39479),o=r(21679),a=r(57857),l=r(31647);!function(e){e[e.MasterVideo=1]="MasterVideo",e[e.MasterClip=2]="MasterClip",e[e.MasterInteractive=3]="MasterInteractive"}(n||(n={}));var s=r(75459),u=r(10101),c=r(88172),d=r(20072),h=r(57098),f=r(67670),p=r(93569),b=r(79665),y=r(95061),m=r(99765),g=r.n(m),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,w(n.key),n)}}function w(e){var t=function(e){if("object"!=L(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=L(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==L(t)?t:t+""}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(S=function(){return!!e})()}function T(e){return T=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},T(e)}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}var I=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=T(t),function(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)}(e,S()?Reflect.construct(t,r||[],T(e).constructor):t.apply(e,r))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(t,e),r=t,l=[{key:"initialize",value:function(){this.videoDataService=o.u.getInstance(h.Or.Video,this),this.bindListeners()}},{key:"name",get:function(){return"AddToLibraryView"}},{key:"title",get:function(){return a.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:h.OV.LIBRARY_EDITOR,action:h.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 p.N0.generateUniqueChannelName(this)}},{key:"template",get:function(){return g()}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:u.Yw,title:a.T.getPhrase(this.lang,"title"),size:"modal-md",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new f.v,buttonText:a.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(h.Vk.VIDEO,"".concat(h.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(h.Vk.VIDEO,"get:video:categories:libraries:".concat(this.options.videoId,":sync"),this.render)}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.spinnerModel.set(c.ZV.ShowSpinner,!0),this.addToLibrary()}},{key:"onLibrarySelected",value:function(e){this.spinnerModel.set(c.ZV.Disabled,!0),p.PU.setSelected(this.libraryTreeKey,e.get("id"),this.customLibraries),this.renderFolderSelector()}},{key:"onFolderSelected",value:function(e){this.spinnerModel.set(c.ZV.Disabled,!1),p.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(p.m$.escapeExpression(e),"</strong>")}));if(1===t.length)return t[0];var r=a.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=p.PU.getSelected(this.folderTreeKey,this.customLibraries),a=o.get("id"),l=p.PU.getSelected(this.libraryTreeKey,this.customLibraries).get("id"),u=this.model.libraries.filter((function(e){return e.get("type")===s.r.HostedLibrary})),c=this.model.categories;c&&c.last()&&(e=c.last().get("id")),u&&u.length&&(t=i.last(u).get("id"));var d={objectId:this.options.videoId,objectType:n.MasterVideo,sourceLibraryId:t,destinationLibraryId:l,metadata:{sourceCategoryId:e,destinationCategoryId:a}};this.videoDataService.addVideoToCustomLibrary(d,this.model,o,(function(){r.triggerMethod("hide")}))}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.spinnerModel.get(c.ZV.Disabled)&&this.hasAvailableLibraries())return{title:a.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")===s.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")===s.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=p.PU.getSelected(this.libraryTreeKey,this.customLibraries),t=this.getUI("folderName");this.$(t).hide(),this.showChildView("libraryDropdown",new b.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&&p.PU.setSelected(this.libraryTreeKey,e.first().get("id"),e);var t=p.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 d.Y({collection:t.children,channelName:"".concat(this.channelName,":folder"),folderTreeKey:this.folderTreeKey}))}},{key:"requiredResources",get:function(){return{customLibraries:y.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:p.Kp.getSpinner({size:p.Ey.Large,extraClasses:"mx-auto"}),showNoFolderText:!this.hasFolders()}}},{key:"onRender",value:function(){this.dataFetched()&&this.hasAvailableLibraries()&&this.renderLibraryDropdown()}}],l&&k(r.prototype,l),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,l}(l.Q.G7)},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,a=null!=t?t:e.nullContext||{};return(null!=(o=r.if.call(a,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(a,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(a,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,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression,u=e.lambda;return' <span class="d-block pb-2">'+s((r.lang||t&&t.lang||l).call(a,"selectFolder",{name:"lang",hash:{},data:i}))+"</span>\n"+(null!=(o=r.if.call(a,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||l).call(a,"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,a=e.escapeExpression;return' <span class="'+a(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.header:o,t))+'">'+a((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,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing;return" <p>"+e.escapeExpression((r.lang||t&&t.lang||l).call(a,"noFolders1",{name:"lang",hash:{},data:i}))+"</p>\n <p>"+(null!=(o=(r.lang||t&&t.lang||l).call(a,"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(
|
|
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),o=t(57857),a=t(31647),l=t(69184),u=t(10101),c=t(88172),s=t(57098),f=t(93569),h=t(264),p=t(95061),y=t(48652),b=t.n(y);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 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,v(r.key),r)}}function v(e){var n=function(e){if("object"!=g(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=g(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==g(n)?n:n+""}function d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}function k(e,n){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},k(e,n)}var O=function(e){function n(){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,n),function(e,n,t){return n=w(n),function(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)}(e,d()?Reflect.construct(n,t||[],w(e).constructor):n.apply(e,t))}(this,n,arguments)}return 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&&k(e,n)}(n,e),t=n,(a=[{key:"initialize",value:function(){this.libraryDataService=i.u.getInstance(s.Or.Library,this),this.videoDataService=i.u.getInstance(s.Or.Video,this)}},{key:"name",get:function(){return"PublishLibraryView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.publishLibrary"}},{key:"template",get:function(){return b()}},{key:"channelName",get:function(){return f.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{title:o.T.getPhrase(this.lang,"heading"),behaviorClass:u.Yw,spinnerButtonOptions:{channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"continue"),onClick:function(){return e.onClickContinue()}}}]}},{key:"viewOptions",value:function(){return{hasLite:h.g.hasLite}}},{key:"onClickContinue",value:function(){var e=this;r.Radio.channel(this.channelName).trigger(c.I3.ShowSpinner);var n=0,t=function(){++n===e.libraries.length&&(e.triggerMethod("hide"),e.videoDataService.clearVideoCache(),r.Radio.channel(l.GL.LIBRARY_STATUS).trigger("status:changed"))};this.libraries.each((function(n){e.libraryDataService.publishLibrary(n.get("id"),t)}))}},{key:"requiredResources",get:function(){return{libraries:p.T.libraries}}}])&&m(t.prototype,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,a}(a.Q.G7)},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 o,a=null!=n?n:e.nullContext||{},l=e.hooks.helperMissing,u=e.escapeExpression;return"<p>"+u((t.lang||n&&n.lang||l).call(a,"infoHeading",{name:"lang",hash:{},data:i}))+"</p>\n<p>"+u((t.lang||n&&n.lang||l).call(a,"meaningSubheading",{name:"lang",hash:{},data:i}))+"</p>\n<ul>\n <li>"+u((t.lang||n&&n.lang||l).call(a,"meaning1",{name:"lang",hash:{},data:i}))+"</li>\n"+(null!=(o=t.unless.call(a,null!=(o=null!=n?n.options:n)?o.hasLite:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+" <li>"+u((t.lang||n&&n.lang||l).call(a,"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 g}});var n=r(57857),o=r(31647),i=r(80758),u=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 g}});var n=r(57857),o=r(31647),i=r(80758),u=r(63791),c=r(57098),a=r(29457),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){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,s(n.key),n)}}function s(t){var e=function(t){if("object"!=p(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==p(e)?e:e+""}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(b=function(){return!!t})()}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var g=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=m(e),function(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)}(t,b()?Reflect.construct(e,r||[],m(t).constructor):e.apply(t,r))}(this,e,arguments)}return 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&&v(t,e)}(e,t),r=e,(o=[{key:"name",get:function(){return"NoLibraryView"}},{key:"title",get:function(){return n.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:i.o,region:"emptyState",type:a.ub.LibraryEditor,shouldRender:function(){return!0},componentOptions:{plusSvg:u.Nj.getSvg(u.vn.Plus),heading:n.T.getPhrase(this.lang,"emptyStateHeading"),description:n.T.getPhrase(this.lang,"emptyStateDescription"),btnText:n.T.getPhrase(this.lang,"emptyStateCta")},emptyStateComponents:c.aW}]}}])&&y(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(o.Q.G7)},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 i}});var n=t(1024),a=t(21679);function i(r){var e,t;return e=r,t=a.u.getInstance(e),n.useEffect((function(){return function(){a.u.releaseInstance(e)}})),t}},34107:function(r,e,t){t.d(e,{D:function(){return c}});var n=t(2248),a=t(68003),i=t(40221),o=t(84657),c={domainLibraries:function(r,e,t,n){return{url:a._.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:n}},libraryRequestLibraries:function(){return{url:"{gateway}/v1/library-requests/libraries",key:"libraries"}},librariesWithCategories:function(){return{url:a._.urlBuilder("/api/domain/v2/me/libraries",{type:["sharedLibrary","customLibrary","unpublishedCustomLibrary"],maxCategoryDepth:5}),key:"libraries:with:categories",normalize:!1}},librariesWithOwnerLogos:function(r,e,t,n){return r.sort(),{url:a._.urlBuilder("/api/domain/v2/objects",{query:o.v.LIBRARY_COLLECTION,id:r}),key:"libraries:owner:logo:".concat(r.join(",")),success:e,error:t,always:n}},library:function(r,e,t,n){return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(r),{query:o.v.LIBRARY}),key:"library:".concat(r),success:e,error:t,always:n}},exchange:function(r){return{url:a._.urlBuilder("{gateway}/v1/objects/".concat(r),{query:"categorytree"}),key:"exchange"}},streamableLearning:function(){return{url:"{gateway}/v1/streamable-learning-library",key:"streamable:learning"}},librarySubscribers:function(r,e){var t={};return e&&(t.cursor=e),{url:a._.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 i.m.first(r.data)}}},updateSubscriberPermissions:function(r,e,t,a,i){return{url:"{gateway}/v1/libraries/".concat(r,"/library-request-permissions"),key:"update:subscriber:permissions:".concat(r,":").concat(e),type:n.k.PUT,data:{customerId:e,granted:t},invalidationKeys:["library:owner:".concat(r),"library:subscribers:".concat(r)],success:a,error:i}},removeSubscriber:function(r,e,t,a){return{url:"{gateway}/v1/objects/".concat(r,"/subscribedcustomers?memberId=").concat(e),key:"revoke:subscription:".concat(r,":").concat(e),type:n.k.DELETE,invalidationKeys:["library:subscribers:".concat(r)],success:t,error:a}},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}},videoFolders:function(r){return{url:"{gateway}/v1/objects/".concat(r,"/categories?query=libraries"),key:"video:folders:".concat(r)}},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,a){var i="{gateway}/v1/objects/".concat(r,"/categories?query={limit:100}thumbnail"),o="child:folders:".concat(r);return e&&(i+="&cursor=".concat(e),o+=":".concat(e)),{url:i,key:o,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:a}},addToLibrary:function(r,e){var t=["folder","videos",r.metadata.destinationCategoryId,e].filter((function(r){return!!r})).join(":");return{url:"{gateway}/v1/library-requests",key:"add:".concat(r.objectId,":to:").concat(r.destinationLibraryId,":").concat(r.metadata.destinationCategoryId),type:n.k.POST,data:r,invalidationKeys:t}},libraries:function(){return{url:"{gateway}/v1/users/me/libraries",key:"objects:libraries"}}}},2491:function(r,e,t){t.d(e,{Z:function(){return o}});var n=t(92159),a=t(21186),i=t(54096);function o(){var r=(0,i.G)(n.P.ALERT);return{success:function(e){r.success(e)()},error:function(e){r.error(e)()},warning:function(e){r.createAlert({type:a.NK.Warning,heading:a.R6.Warning,message:e})}}}},82378:function(r,e,t){t.d(e,{i:function(){return i}});var n=t(1024),a=t(94223);function i(r,e){var t=r,i=e,o=(0,a.P)(r&&function(r){return t(r).key});return(0,n.useEffect)((function(){o&&o.shouldInitialFetch&&e&&i()}),[null==o?void 0:o.shouldInitialFetch,e]),(0,n.useEffect)((function(){o&&o.nextCursor&&!o.isFetching&&e&&i(o.nextCursor)}),[null==o?void 0:o.nextCursor,null==o?void 0:o.isFetching,e]),o}},94223:function(r,e,t){t.d(e,{P:function(){return l}});var n=t(1024),a=t(58566),i=t(35656),o=t(53808),c=t(86120);function u(r){return function(r){if(Array.isArray(r))return s(r)}(r)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(r)||function(r,e){if(r){if("string"==typeof r)return s(r,e);var t={}.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)?s(r,e):void 0}}(r)||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.")}()}function s(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}function l(r,e,t){function i(r){if(r)return o.q.isFunction(e)?u(e(r)):u(r.data)}function s(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,a.useSelector)((0,n.useMemo)((function(){return function(e){if(o.q.isFunction(r)){for(var t=r,n=o.q.isFunction(r)&&t(),a=n&&c.a.getResponse(e,n),l=a&&a.isFetching,d=a&&a.statusCode,b=a&&a.hasCompleted,y=b,f=a&&a.shouldFetch,m=i(a&&a.data),v=s(a&&a.data),p=function(r){if(r)return null==r?void 0:r.count}(a&&a.data);v&&(a=c.a.getResponse(e,t(v)),l=l||a.isFetching,d=a.statusCode,b=a.hasCompleted,!a.shouldFetch);){var g=i(a.data);g&&m.push.apply(m,u(g));var h=s(a.data);v=h===v?null:h}var w={shouldInitialFetch:f,items:m,nextCursor:v,isFetching:l,statusCode:d,hasCompleted:b,hasFirstPageCompleted:y};return"number"==typeof p&&(w.totalItems=p),w}}}),[r]))}i.o.Ok},91021:function(r,e,t){t.r(e),t.d(e,{RemoveLibrarySubscriberView:function(){return p}});var n=t(1024),a=t.n(n),i=t(57857),o=t(86120),c=t(52076),u=t(70065),s=t(4231),l=t(83996),d=t(66703),b=t(34107),y=t(2491),f=t(82378);function m(r,e){(null==e||e>r.length)&&(e=r.length);for(var t=0,n=Array(e);t<e;t++)n[t]=r[t];return n}var v="libraryRequests.removeLibrarySubscriber";function p(r){var e,t,n,p=o.a.useGetFetch(),g=(t=a().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,a,i,o,c=[],u=!0,s=!1;try{if(i=(t=t.call(r)).next,0===e){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=i.call(t)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(r){s=!0,a=r}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(s)throw a}}return c}}(t,n)||function(r,e){if(r){if("string"==typeof r)return m(r,e);var t={}.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.")}()),h=g[0],w=g[1],k=o.a.useBasicFetch(b.D.library(r.libraryId));function C(e){return b.D.librarySubscribers(r.libraryId,e)}var I=(0,f.i)(C,(function(r){p(C(r))})),S=(0,y.Z)(),L=null===(e=null==I?void 0:I.items)||void 0===e?void 0:e.find((function(e){return e.customerId===r.customerId})),A=k.hasCompleted&&!!L;return a().createElement(s.G,{title:i.T.getPhrase(v,"removeAccess"),closePopup:r.closePopup,showLoadingSpinner:!A},!!A&&a().createElement(a().Fragment,null,a().createElement("div",{className:"alert alert-info",role:"alert"},a().createElement(d.x,{namespace:v,phrase:"alert"})),a().createElement("p",null,a().createElement(d.x,{namespace:v,phrase:"removeSubscriberInfo",options:{school:L.customerName,library:k.data.name}})),a().createElement(l.u,null,a().createElement(l.u.Cancel,{onClick:r.closePopup}),a().createElement(l.u.Submit,{onClick:function(){w(!0),p(b.D.removeSubscriber(r.libraryId,r.customerId,(function(){S.success(i.T.getPhrase(v,"revokeSubscriptionSuccess",{school:L.customerName,library:k.data.name})),c.k.logUserAction({id:r.libraryId,customerId:r.customerId},{actionType:u.Vw.Dissociate,entity:u.py.Library,descriptor:u.iF.Customer,location:u.LZ.Popup,workflowPhase:u.eu.Complete}),r.closePopup()}),(function(){w(!1),S.error(i.T.getPhrase(v,"revokeSubscriptionError",{school:L.customerName,library:k.data.name}))})))},text:i.T.getPhrase(v,"removeAccess"),variant:"danger",showSpinner:h}))))}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7002],{24828:function(t,e,n){"use strict";n.d(e,{o:function(){return o}});var o=["bg-pink","bg-orange"].concat(["bg-green","bg-cyan","bg-teal","bg-blue","bg-indigo","bg-purple"])},22231:function(t,e,n){"use strict";function o(t,e){return e[t.charCodeAt(0)%e.length]}n.d(e,{x:function(){return o}})},91439:function(t,e,n){"use strict";n.d(e,{u:function(){return h}});var o=n(48088),r=n(39479),i=n(31647),a=n(63791),c=n(57098),l=n(93421),u="C8gyn";function s(t){return s="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},s(t)}function p(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,f(o.key),o)}}function f(t){var e=function(t){if("object"!=s(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=s(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==s(e)?e:e+""}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(y=function(){return!!t})()}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}var h=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=d(e),function(t,e){if(e&&("object"==s(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)}(t,y()?Reflect.construct(e,n||[],d(t).constructor):e.apply(t,n))}(this,e,arguments)}return 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)}(e,t),n=e,(i=[{key:"getClassMappings",value:function(){return{"ui-draggable":l.W2.draggable,"ui-draggable-handle":l.W2.handle,"ui-draggable-disabled":l.W2.disabled,"ui-draggable-dragging":l.W2.dragging}}},{key:"helper",value:function(){return new l.ND({text:this.view.model.get("name"),svg:a.Nj.getSvg(a.vn.Folder)}).render().el}},{key:"start",value:function(){o.Radio.channel(c.jr.FOLDER_DRAG_DROP).trigger("drag:start",this.view.model),this.view.$el.addClass(u)}},{key:"stop",value:function(){o.Radio.channel(c.jr.FOLDER_DRAG_DROP).trigger("drag:stop"),this.view.$el.removeClass(u)}},{key:"onRender",value:function(){var t={helper:r.bind(this.helper,this),start:r.bind(this.start,this),stop:r.bind(this.stop,this)};t.classes=this.getClassMappings(),this.view.$el.draggable(r.extend({},l.wc,t))}},{key:"onBeforeDestroy",value:function(){this.view.$el.draggable("instance")&&this.view.$el.draggable("destroy")}}])&&p(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.cg)},6929:function(t,e,n){"use strict";n.d(e,{x:function(){return d}});var o=n(48088),r=n(39479),i=n(31647),a=n(50997),c=n(10454);function l(t){return l="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},l(t)}function u(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,s(o.key),o)}}function s(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=l(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}var d=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=f(e),function(t,e){if(e&&("object"==l(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)}(t,p()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}(this,e,arguments)}return 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&&y(t,e)}(e,t),n=e,(i=[{key:"initialize",value:function(){this.listenTo(a.jr.VIDEO_DRAG_DROP,"drag:stop",this.stop),this.listenTo(a.jr.FOLDER_DRAG_DROP,"drag:stop",this.stop)}},{key:"getDroppableElement",value:function(){return this.options.ui?this.view.getUI(this.options.ui):this.$el}},{key:"drop",value:function(){var t=this;r.each(this.options.channelNames,(function(e){o.Radio.channel(e).trigger("drag:drop",t.view.model,t.options.analyticsOptions)}))}},{key:"accept",value:function(){var t=this,e=!1;return r.each(this.options.channelNames,(function(n){!0===o.Radio.channel(n).request("accept",t.view.model)&&(e=!0)})),e||(this.disabledElement=this.getDroppableElement(),this.disabledElement.addClass(c.Z.disabled)),e}},{key:"stop",value:function(){var t;null===(t=this.disabledElement)||void 0===t||t.removeClass(c.Z.disabled)}},{key:"over",value:function(){var t=this;this.isHoveringOver=!0,window.setTimeout((function(){t.isHoveringOver&&t.view.trigger("open:sub:folders",c.Z.active)}),500)}},{key:"out",value:function(){this.isHoveringOver=!1}},{key:"onRender",value:function(){var t={tolerance:"pointer",drop:r.bind(this.drop,this),accept:r.bind(this.accept,this),over:r.bind(this.over,this),out:r.bind(this.out,this)};t.classes={"ui-droppable":c.Z.droppable,"ui-droppable-active":c.Z.active,"ui-droppable-hover":c.Z.hover},this.getDroppableElement().droppable(t)}},{key:"onBeforeDestroy",value:function(){this.getDroppableElement().droppable("instance")&&this.getDroppableElement().droppable("destroy")}}])&&u(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(i.Q.cg)},87002:function(t,e,n){"use strict";n.d(e,{Y:function(){return w}});var o=n(31647),r=n(70065),i=n(24828),a=n(22231),c=n(50997),l=n(93569),u=n(91439),s=(n(98001),n(6929)),p=n(51785),f=n(90743),y=n.n(f),d={folder:"cLuIF",actions:"vWWVi"};function b(t){return b="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},b(t)}function h(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,m(o.key),o)}}function m(t){var e=function(t){if("object"!=b(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==b(e)?e:e+""}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(v=function(){return!!t})()}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function O(t,e){return O=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},O(t,e)}var w=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=g(e),function(t,e){if(e&&("object"==b(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)}(t,v()?Reflect.construct(e,n||[],g(t).constructor):e.apply(t,n))}(this,e,[t])}return 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&&O(t,e)}(e,t),n=e,(o=[{key:"initialize",value:function(){this.listenTo(this.model,"change:name",this.render)}},{key:"name",get:function(){return"FolderItemComponent"}},{key:"template",get:function(){return y()}},{key:"className",get:function(){return"col-2 p-1 rounded position-relative"}},{key:"appLinks",get:function(){return{a:{application:c.OV.LIBRARY_EDITOR,action:c.eX.LibraryEditor.FOLDER,args:[this.model.get("id")]}}}},{key:"regions",value:function(){return{actions:{el:".actions-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:s.x,channelNames:[c.jr.VIDEO_DRAG_DROP,c.jr.FOLDER_DRAG_DROP],analyticsOptions:{location:"library"===this.options.location?r.LZ.LibraryTiles:r.LZ.SubFolderList}},{behaviorClass:u.u}]}},{key:"viewOptions",value:function(){var t=l.jw.createFolderThumbnailUrl(this.model.thumbnail);return{styles:d,imageUrl:t,backgroundColor:(0,a.x)(this.model.get("name"),i.o)}}},{key:"onRender",value:function(){this.showChildView("actions",new p.c({model:this.model,extraClasses:"".concat(d.actions," rounded-circle"),buttonClass:"text-light",analyticsOptions:{location:r.LZ.LibraryTiles},overrideClasses:!0}))}}])&&h(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.wA)},51785:function(t,e,n){"use strict";n.d(e,{c:function(){return D}});var o=n(31647),r=n(63791),i=n(60602),a=n(57857),c=n(52076),l=n(70065),u=n(71641),s=n(57098),p=n(58266),f=n.n(p);function y(t){return y="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},y(t)}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,b(o.key),o)}}function b(t){var e=function(t){if("object"!=y(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=y(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==y(e)?e:e+""}function h(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(h=function(){return!!t})()}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var g=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=m(e),function(t,e){if(e&&("object"==y(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)}(t,h()?Reflect.construct(e,n||[],m(t).constructor):e.apply(t,n))}(this,e,[t])}return 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&&v(t,e)}(e,t),n=e,(r=[{key:"name",get:function(){return"FolderActionsDropdownComponent"}},{key:"template",get:function(){return f()}},{key:"lang",get:function(){return"libraryEditor.folderActionsDropdown"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"regions",value:function(){return{items:{el:".items-region",replaceElement:!0}}}},{key:"getFolderActions",value:function(){return[{title:a.T.getPhrase(this.lang,"addSubfolder"),analyticsOptions:c.k.mergeOptions(this.options.analyticsOptions,{actionType:l.Vw.Create,entity:l.py.Folder,workflowPhase:l.eu.Start}),appLink:{application:s.OV.LIBRARY_EDITOR,action:s.eX.LibraryEditor.NEW_SUB_FOLDER,args:[this.model.get("id")]}},{title:a.T.getPhrase(this.lang,"rename"),analyticsOptions:c.k.mergeOptions(this.options.analyticsOptions,{actionType:l.Vw.Rename,entity:l.py.Folder,workflowPhase:l.eu.Start}),appLink:{application:s.OV.LIBRARY_EDITOR,action:s.eX.LibraryEditor.RENAME_FOLDER,args:[this.model.get("id")]}},{title:a.T.getPhrase(this.lang,"move"),analyticsOptions:c.k.mergeOptions(this.options.analyticsOptions,{actionType:l.Vw.Move,entity:l.py.Folder,workflowPhase:l.eu.Start}),appLink:{application:s.OV.LIBRARY_EDITOR,action:s.eX.LibraryEditor.MOVE_FOLDER,args:[this.model.get("id")]}},{title:a.T.getPhrase(this.lang,"editImages"),analyticsOptions:c.k.mergeOptions(this.options.analyticsOptions,{actionType:l.Vw.EditAssoc,entity:l.py.Folder,workflowPhase:l.eu.Start,descriptor:l.iF.Image}),appLink:{application:s.OV.LIBRARY_EDITOR,action:s.eX.LibraryEditor.EDIT_FOLDER_IMAGES,args:[this.model.get("id")]}},{title:a.T.getPhrase(this.lang,"generatePdf"),analyticsOptions:c.k.mergeOptions(this.options.analyticsOptions,{actionType:l.Vw.Create,entity:l.py.PDF,workflowPhase:l.eu.Start}),appLink:{application:s.OV.LIBRARY_EDITOR,action:s.eX.LibraryEditor.GENERATE_PDF,args:[this.model.get("id")]}},{title:a.T.getPhrase(this.lang,"remove"),analyticsOptions:c.k.mergeOptions(this.options.analyticsOptions,{actionType:l.Vw.Delete,entity:l.py.Folder,workflowPhase:l.eu.Start}),classes:"text-danger",appLink:{application:s.OV.LIBRARY_EDITOR,action:s.eX.LibraryEditor.DELETE_FOLDER,args:[this.model.get("id")]}}]}},{key:"onRender",value:function(){this.showChildView("items",new u.w({analyticsHelper:c.k,displayOptions:{alignment:"end"},channelName:this.channelName,collection:new o.Q.FE(this.getFolderActions()),childOptions:{isDisabled:function(){return this.model.get("disabled")}}}))}}])&&d(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(o.Q.wA),O=n(26704),w=n.n(O);function E(t){return E="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},E(t)}function k(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,j(o.key),o)}}function j(t){var e=function(t){if("object"!=E(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=E(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==E(e)?e:e+""}function _(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(_=function(){return!!t})()}function P(t){return P=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},P(t)}function R(t,e){return R=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},R(t,e)}var D=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,n){return e=P(e),function(t,e){if(e&&("object"==E(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)}(t,_()?Reflect.construct(e,n||[],P(t).constructor):e.apply(t,n))}(this,e,[t])}return 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&&R(t,e)}(e,t),n=e,(o=[{key:"name",get:function(){return"VideoCollectionActionsComponent"}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"className",get:function(){if(this.model instanceof i.g)return"position-absolute ".concat(this.options.overrideClasses?"":"zHCsb"," ").concat(this.options.extraClasses," ")}},{key:"template",get:function(){return w()}},{key:"regions",value:function(){return{items:{replaceElement:!0,el:".items-region"}}}},{key:"renderFolderActions",value:function(){this.model instanceof i.g&&this.showChildView("items",new g({model:this.model,analyticsOptions:this.options.analyticsOptions}))}},{key:"viewOptions",value:function(){return{hasActions:this.model instanceof i.g,dropdownClass:"".concat("He1m9"," ").concat(this.options.buttonClass),svg:r.Nj.getSvg(r.vn.More)}}},{key:"onRender",value:function(){this.renderFolderActions()}}])&&k(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}(o.Q.wA)},58266:function(t,e,n){var o=n(32227);t.exports=(o.default||o).template({compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){return'<div class="items-region"></div>'},useData:!0})},90743:function(t,e,n){var o=n(32227);t.exports=(o.default||o).template({1:function(t,e,n,o,r){var i;return t.propertyIsEnumerable,"style=\"background-image: url('"+t.escapeExpression(t.lambda(null!=(i=null!=e?e.options:e)?i.imageUrl:i,e))+"')\""},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a,c=null!=e?e:t.nullContext||{},l=t.hooks.helperMissing,u="function",s=t.escapeExpression,p=t.lambda;return'<a class="rounded d-block text-decoration-none" title="'+s(typeof(a=null!=(a=n.name||(null!=e?e.name:e))?a:l)===u?a.call(c,{name:"name",hash:{},data:r}):a)+'">\n <div \n class="'+s(p(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.folder:i,e))+" "+s(p(null!=(i=null!=e?e.options:e)?i.backgroundColor:i,e))+' rounded-top"\n '+(null!=(i=n.if.call(c,null!=(i=null!=e?e.options:e)?i.imageUrl:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:"")+'\n ></div>\n <h3 class="font-size-normal fw-semibold mb-0 p-2 bg-white border-start border-end border-bottom rounded-bottom ">\n <span class="text-truncate d-block">'+s(typeof(a=null!=(a=n.name||(null!=e?e.name:e))?a:l)===u?a.call(c,{name:"name",hash:{},data:r}):a)+'</span>\n </h3>\n</a>\n<div class="actions-region"></div>'},useData:!0})},26704:function(t,e,n){var o=n(32227);t.exports=(o.default||o).template({1:function(t,e,n,o,r){t.propertyIsEnumerable;var i,a=t.lambda;return'<span data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false" class="'+t.escapeExpression(a(null!=(i=null!=e?e.options:e)?i.dropdownClass:i,e))+' d-inline-block ui-dropdown-toggle">\n '+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.svg:i,e))?i:"")+'\n</span>\n<div class="items-region"></div>\n'},compiler:[8,">= 4.3.0"],main:function(t,e,n,o,r){var i;return t.propertyIsEnumerable,null!=(i=n.if.call(null!=e?e:t.nullContext||{},null!=(i=null!=e?e.options:e)?i.hasActions:i,{name:"if",hash:{},fn:t.program(1,r,0),inverse:t.noop,data:r}))?i:""},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7053],{87053:function(e,t,n){"use strict";n.r(t),n.d(t,{GeneratePastReleasesPdfView:function(){return T}});var r=n(21161),i=n(21679),o=n(57857),a=n(31647),l=n(10657),s=n(52076),u=n(70065),c=n(10101),f=n(88172),p=n(57098),d=n(3059),h=n(67670),b=n(19226),y=n(93569),g=n(39090),v=n(44937),m=n(29569),j=n.n(m),S={image:"go5qS"};function P(e){return P="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},P(e)}function w(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,O(r.key),r)}}function O(e){var t=function(e){if("object"!=P(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==P(t)?t:t+""}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}var T=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=k(t),function(e,t){if(t&&("object"==P(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)}(e,I()?Reflect.construct(t,n||[],k(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(t,e),n=t,(a=[{key:"initialize",value:function(){this.libraryDataService=i.u.getInstance(p.Or.Library,this),this.contentUpdatesDataService=i.u.getInstance(p.Or.ContentUpdates,this),this.exportDataService=i.u.getInstance(p.Or.Export,this)}},{key:"name",get:function(){return"GeneratePastReleasesPdfView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.generatePastReleasesPdf"}},{key:"template",get:function(){return j()}},{key:"channelName",get:function(){return y.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.Yw,title:o.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new h.v,channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"generateBtn"),onClick:function(){return e.onClickGeneratePdf()}}}]}},{key:"onLibrariesSync",value:function(e){var t=this;this.libraries=e,this.selectedLibraryIds=g.RF.getLibraryIds(this.options.librariesQueryString,e),this.subjectCollectionIdentifier=new d.xw({dateQueryString:this.options.dateQueryString,libraryIds:this.selectedLibraryIds}),this.contentUpdatesDataService.getRecentVideoSubjects(this.subjectCollectionIdentifier,(function(n){return t.onSubjectsSync(e,n)}))}},{key:"onSubjectsSync",value:function(e,t){var n=g.RF.getSubjectOptions(t).map((function(e){return new v.Wx(e)})),i={dateQueryString:this.options.dateQueryString,libraryIds:this.selectedLibraryIds};if(!this.options.subjectQueryString)return this.videoCollectionIdentifier=new d.IJ(i),void this.spinnerModel.set(f.ZV.Disabled,!1);var o=this.getSubjectIds();this.videoCollectionIdentifier=new d.IJ(r.extend(i,{subjects:n.filter((function(e){return!!r.intersection(o,e.get("subjectIds")).length}))})),this.spinnerModel.set(f.ZV.Disabled,!1)}},{key:"getSubjectIds",value:function(){if(this.options.subjectQueryString)return this.options.subjectQueryString.split("-")[1].split(",")}},{key:"getLibrariesText",value:function(){var e=this;if(this.libraries.length!==this.selectedLibraryIds.length){var t=this.libraries.filter((function(t){return r.contains(e.selectedLibraryIds,t.id.toString())})),n=t.map((function(e){return"<strong>".concat(y.m$.escapeExpression(e.get("name")),"</strong>")}));return t.length<=2?n.join(" ".concat(o.T.getPhrase(this.lang,"and")," ")):r.first(n,n.length-1).join(", ")+" ".concat(o.T.getPhrase(this.lang,"and")," ").concat(r.last(n))}}},{key:"getFormattedDate",value:function(e){if(e)return l.O.format(e,"DD MMMM YYYY")}},{key:"getFormattedSubjects",value:function(){if(this.videoCollectionIdentifier.subjects){var e=this.videoCollectionIdentifier.subjects.map((function(e){return e.get("name")}));return 1===e.length?e[0]:e.slice(0,-1).join(", ")+" ".concat(o.T.getPhrase(this.lang,"and")," ")+e.slice(-1)}}},{key:"onClickGeneratePdf",value:function(){this.spinnerModel.set(f.ZV.ShowSpinner,!0),this.fetchVideosAndGeneratePdf()}},{key:"fetchVideosAndGeneratePdf",value:function(){var e=this;this.contentUpdatesDataService.getRecentVideosAllPages(this.videoCollectionIdentifier,(function(t){t&&t.length?e.generatePdf(t.map((function(e){return e.id.toString()}))):e.triggerMethod("hide")}))}},{key:"generatePdf",value:function(e){var t=this,n=this.videoCollectionIdentifier.subjects?this.getFormattedSubjects():o.T.getPhrase(this.lang,"latestReleases"),r=l.O.format(this.videoCollectionIdentifier.dateOption.get("from"),"MMMM YYYY"),i=l.O.format(this.videoCollectionIdentifier.dateOption.get("to"),"MMMM YYYY"),a=r===i?o.T.getPhrase(this.lang,"fromContentUpdate",{from:r}):o.T.getPhrase(this.lang,"fromToContentUpdates",{from:r,to:i});this.exportDataService.generateCustomListPdf(n,a,e,this.currentUser,(function(){return t.triggerMethod("hide")})),this.logAction(e.length)}},{key:"logAction",value:function(e){var t={location:u.LZ.Popup,actionType:u.Vw.Create,entity:u.py.PDF,workflowPhase:u.eu.Complete},n={videoCount:e,libraries:this.selectedLibraryIds.join(","),releaseDate:this.videoCollectionIdentifier.dateOption.get("name"),subjects:this.options.subjectQueryString?this.videoCollectionIdentifier.subjects.map((function(e){return e.get("name")})).join(","):""};s.k.logUserAction(n,t)}},{key:"requiredResources",get:function(){return{currentUser:b.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this;this.libraries||this.libraryDataService.getHostedLibraries((function(t){return e.onLibrariesSync(t)}))}},{key:"viewOptions",value:function(){return{styles:S,dataFetched:!!this.libraries,spinnerEl:y.Kp.getSpinner({size:y.Ey.Large,extraClasses:"mx-auto"}),email:this.currentUser.get("email"),imageUrl:p.Wn.Shared.GENERATE_PDF,libraryText:this.getLibrariesText(),subject:this.getFormattedSubjects(),from:this.videoCollectionIdentifier&&this.getFormattedDate(this.videoCollectionIdentifier.dateOption.get("from")),to:this.videoCollectionIdentifier&&this.getFormattedDate(this.videoCollectionIdentifier.dateOption.get("to"))}}}])&&w(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a}(a.Q.G7)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),i=n(88172);function o(e){return o="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},o(e)}function a(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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,s(r.key),r)}}function s(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=c(t),function(e,t){if(t&&("object"==o(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)}(e,u()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(t,e),n=t,(r=[{key:"defaults",value:function(){return a(a({},i.ZV.Disabled,!0),i.ZV.Hidden,!1)}}])&&l(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},29569:function(e,t,n){var r=n(31197);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\n"},3:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<div class="pb-3 text-center">\n <img src="'+l(a(null!=(o=null!=t?t.options:t)?o.imageUrl:o,t))+'" class="'+l(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.image:o,t))+'" />\n</div>\n<p class="m-0">\n '+(null!=(o=(n.lang||t&&t.lang||u).call(s,"body1",{name:"lang",hash:{},data:i}))?o:"")+"\n "+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.libraryText:o,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?o:"")+"\n "+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.subject:o,{name:"if",hash:{},fn:e.program(6,i,0),inverse:e.noop,data:i}))?o:"")+"\n "+(null!=(o=(n.lang||t&&t.lang||u).call(s,"body4",{name:"lang",hash:{email:null!=(o=null!=t?t.options:t)?o.email:o,to:null!=(o=null!=t?t.options:t)?o.to:o,from:null!=(o=null!=t?t.options:t)?o.from:o},data:i}))?o:"")+"\n</p>\n"},4:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"body2",{name:"lang",hash:{libraryText:null!=(o=null!=t?t.options:t)?o.libraryText:o},data:i}))?o:""},6:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"body3",{name:"lang",hash:{subject:null!=(o=null!=t?t.options:t)?o.subject:o},data:i}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.unless.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?o:""},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[7053],{87053:function(e,t,n){"use strict";n.r(t),n.d(t,{GeneratePastReleasesPdfView:function(){return T}});var r=n(39479),i=n(21679),o=n(57857),a=n(31647),l=n(10657),s=n(52076),u=n(70065),c=n(10101),f=n(88172),p=n(57098),d=n(3059),h=n(67670),b=n(19226),y=n(93569),g=n(39090),v=n(44937),m=n(29569),j=n.n(m),S={image:"go5qS"};function P(e){return P="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},P(e)}function w(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,O(r.key),r)}}function O(e){var t=function(e){if("object"!=P(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=P(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==P(t)?t:t+""}function I(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(I=function(){return!!e})()}function k(e){return k=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},k(e)}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}var T=function(e){function t(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=k(t),function(e,t){if(t&&("object"==P(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)}(e,I()?Reflect.construct(t,n||[],k(e).constructor):t.apply(e,n))}(this,t,[e])}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(t,e),n=t,(a=[{key:"initialize",value:function(){this.libraryDataService=i.u.getInstance(p.Or.Library,this),this.contentUpdatesDataService=i.u.getInstance(p.Or.ContentUpdates,this),this.exportDataService=i.u.getInstance(p.Or.Export,this)}},{key:"name",get:function(){return"GeneratePastReleasesPdfView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"contentUpdates.generatePastReleasesPdf"}},{key:"template",get:function(){return j()}},{key:"channelName",get:function(){return y.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.Yw,title:o.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new h.v,channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"generateBtn"),onClick:function(){return e.onClickGeneratePdf()}}}]}},{key:"onLibrariesSync",value:function(e){var t=this;this.libraries=e,this.selectedLibraryIds=g.RF.getLibraryIds(this.options.librariesQueryString,e),this.subjectCollectionIdentifier=new d.xw({dateQueryString:this.options.dateQueryString,libraryIds:this.selectedLibraryIds}),this.contentUpdatesDataService.getRecentVideoSubjects(this.subjectCollectionIdentifier,(function(n){return t.onSubjectsSync(e,n)}))}},{key:"onSubjectsSync",value:function(e,t){var n=g.RF.getSubjectOptions(t).map((function(e){return new v.Wx(e)})),i={dateQueryString:this.options.dateQueryString,libraryIds:this.selectedLibraryIds};if(!this.options.subjectQueryString)return this.videoCollectionIdentifier=new d.IJ(i),void this.spinnerModel.set(f.ZV.Disabled,!1);var o=this.getSubjectIds();this.videoCollectionIdentifier=new d.IJ(r.extend(i,{subjects:n.filter((function(e){return!!r.intersection(o,e.get("subjectIds")).length}))})),this.spinnerModel.set(f.ZV.Disabled,!1)}},{key:"getSubjectIds",value:function(){if(this.options.subjectQueryString)return this.options.subjectQueryString.split("-")[1].split(",")}},{key:"getLibrariesText",value:function(){var e=this;if(this.libraries.length!==this.selectedLibraryIds.length){var t=this.libraries.filter((function(t){return r.contains(e.selectedLibraryIds,t.id.toString())})),n=t.map((function(e){return"<strong>".concat(y.m$.escapeExpression(e.get("name")),"</strong>")}));return t.length<=2?n.join(" ".concat(o.T.getPhrase(this.lang,"and")," ")):r.first(n,n.length-1).join(", ")+" ".concat(o.T.getPhrase(this.lang,"and")," ").concat(r.last(n))}}},{key:"getFormattedDate",value:function(e){if(e)return l.O.format(e,"DD MMMM YYYY")}},{key:"getFormattedSubjects",value:function(){if(this.videoCollectionIdentifier.subjects){var e=this.videoCollectionIdentifier.subjects.map((function(e){return e.get("name")}));return 1===e.length?e[0]:e.slice(0,-1).join(", ")+" ".concat(o.T.getPhrase(this.lang,"and")," ")+e.slice(-1)}}},{key:"onClickGeneratePdf",value:function(){this.spinnerModel.set(f.ZV.ShowSpinner,!0),this.fetchVideosAndGeneratePdf()}},{key:"fetchVideosAndGeneratePdf",value:function(){var e=this;this.contentUpdatesDataService.getRecentVideosAllPages(this.videoCollectionIdentifier,(function(t){t&&t.length?e.generatePdf(t.map((function(e){return e.id.toString()}))):e.triggerMethod("hide")}))}},{key:"generatePdf",value:function(e){var t=this,n=this.videoCollectionIdentifier.subjects?this.getFormattedSubjects():o.T.getPhrase(this.lang,"latestReleases"),r=l.O.format(this.videoCollectionIdentifier.dateOption.get("from"),"MMMM YYYY"),i=l.O.format(this.videoCollectionIdentifier.dateOption.get("to"),"MMMM YYYY"),a=r===i?o.T.getPhrase(this.lang,"fromContentUpdate",{from:r}):o.T.getPhrase(this.lang,"fromToContentUpdates",{from:r,to:i});this.exportDataService.generateCustomListPdf(n,a,e,this.currentUser,(function(){return t.triggerMethod("hide")})),this.logAction(e.length)}},{key:"logAction",value:function(e){var t={location:u.LZ.Popup,actionType:u.Vw.Create,entity:u.py.PDF,workflowPhase:u.eu.Complete},n={videoCount:e,libraries:this.selectedLibraryIds.join(","),releaseDate:this.videoCollectionIdentifier.dateOption.get("name"),subjects:this.options.subjectQueryString?this.videoCollectionIdentifier.subjects.map((function(e){return e.get("name")})).join(","):""};s.k.logUserAction(n,t)}},{key:"requiredResources",get:function(){return{currentUser:b.K.currentUser}}},{key:"onBeforeRender",value:function(){var e=this;this.libraries||this.libraryDataService.getHostedLibraries((function(t){return e.onLibrariesSync(t)}))}},{key:"viewOptions",value:function(){return{styles:S,dataFetched:!!this.libraries,spinnerEl:y.Kp.getSpinner({size:y.Ey.Large,extraClasses:"mx-auto"}),email:this.currentUser.get("email"),imageUrl:p.Wn.Shared.GENERATE_PDF,libraryText:this.getLibrariesText(),subject:this.getFormattedSubjects(),from:this.videoCollectionIdentifier&&this.getFormattedDate(this.videoCollectionIdentifier.dateOption.get("from")),to:this.videoCollectionIdentifier&&this.getFormattedDate(this.videoCollectionIdentifier.dateOption.get("to"))}}}])&&w(n.prototype,a),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,a}(a.Q.G7)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return p}});var r=n(31647),i=n(88172);function o(e){return o="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},o(e)}function a(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(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,s(r.key),r)}}function s(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var p=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,n){return t=c(t),function(e,t){if(t&&("object"==o(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)}(e,u()?Reflect.construct(t,n||[],c(e).constructor):t.apply(e,n))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(t,e),n=t,(r=[{key:"defaults",value:function(){return a(a({},i.ZV.Disabled,!0),i.ZV.Hidden,!1)}}])&&l(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,r}(r.Q.Hn)},29569:function(e,t,n){var r=n(32227);e.exports=(r.default||r).template({1:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,(null!=(o=e.lambda(null!=(o=null!=t?t.options:t)?o.spinnerEl:o,t))?o:"")+"\n"},3:function(e,t,n,r,i){e.propertyIsEnumerable;var o,a=e.lambda,l=e.escapeExpression,s=null!=t?t:e.nullContext||{},u=e.hooks.helperMissing;return'<div class="pb-3 text-center">\n <img src="'+l(a(null!=(o=null!=t?t.options:t)?o.imageUrl:o,t))+'" class="'+l(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.image:o,t))+'" />\n</div>\n<p class="m-0">\n '+(null!=(o=(n.lang||t&&t.lang||u).call(s,"body1",{name:"lang",hash:{},data:i}))?o:"")+"\n "+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.libraryText:o,{name:"if",hash:{},fn:e.program(4,i,0),inverse:e.noop,data:i}))?o:"")+"\n "+(null!=(o=n.if.call(s,null!=(o=null!=t?t.options:t)?o.subject:o,{name:"if",hash:{},fn:e.program(6,i,0),inverse:e.noop,data:i}))?o:"")+"\n "+(null!=(o=(n.lang||t&&t.lang||u).call(s,"body4",{name:"lang",hash:{email:null!=(o=null!=t?t.options:t)?o.email:o,to:null!=(o=null!=t?t.options:t)?o.to:o,from:null!=(o=null!=t?t.options:t)?o.from:o},data:i}))?o:"")+"\n</p>\n"},4:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"body2",{name:"lang",hash:{libraryText:null!=(o=null!=t?t.options:t)?o.libraryText:o},data:i}))?o:""},6:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"body3",{name:"lang",hash:{subject:null!=(o=null!=t?t.options:t)?o.subject:o},data:i}))?o:""},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,i){var o;return e.propertyIsEnumerable,null!=(o=n.unless.call(null!=t?t:e.nullContext||{},null!=(o=null!=t?t.options:t)?o.dataFetched:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.program(3,i,0),data:i}))?o:""},useData:!0})}}]);
|