@clickview/library-editor 1.2.2 → 1.3.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +3 -3
- package/dist/css/{library-editor-app-73ef35d93e.css → library-editor-app-30cd08bfae.css} +2 -2
- package/dist/en.json +1 -1
- package/dist/scripts/0-d20750cdec.chunk.js +1 -0
- package/dist/scripts/1-28a327acf3.chunk.js +1 -0
- package/dist/scripts/10-b830a40f72.chunk.js +1 -0
- package/dist/scripts/{11-efbe8b672b.chunk.js → 11-02eba260f6.chunk.js} +1 -1
- package/dist/scripts/12-8791a92594.chunk.js +1 -0
- package/dist/scripts/13-665738fbb1.chunk.js +1 -0
- package/dist/scripts/14-1e2cd6ac41.chunk.js +1 -0
- package/dist/scripts/15-0dc89981e2.chunk.js +1 -0
- package/dist/scripts/16-4a1c634dda.chunk.js +1 -0
- package/dist/scripts/17-3c94d08d78.chunk.js +1 -0
- package/dist/scripts/{18-4c5983938e.chunk.js → 18-3fadb1f394.chunk.js} +1 -1
- package/dist/scripts/19-8e572002ab.chunk.js +1 -0
- package/dist/scripts/{2-d90f461b10.chunk.js → 2-7a78d29f44.chunk.js} +1 -1
- package/dist/scripts/22-d2e056e746.chunk.js +1 -0
- package/dist/scripts/23-f8a294ec40.chunk.js +1 -0
- package/dist/scripts/24-2bcd00effe.chunk.js +1 -0
- package/dist/scripts/25-c4aaeab127.chunk.js +1 -0
- package/dist/scripts/26-9a7dd55620.chunk.js +1 -0
- package/dist/scripts/27-7e018cd6b5.chunk.js +1 -0
- package/dist/scripts/28-b1c31de615.chunk.js +1 -0
- package/dist/scripts/29-2beecb7b1b.chunk.js +1 -0
- package/dist/scripts/3-eb941619ce.chunk.js +1 -0
- package/dist/scripts/30-e056eceff1.chunk.js +1 -0
- package/dist/scripts/31-f5fb9024bf.chunk.js +1 -0
- package/dist/scripts/32-3a253b3136.chunk.js +1 -0
- package/dist/scripts/33-48b0479da2.chunk.js +1 -0
- package/dist/scripts/34-3d5a50c31b.chunk.js +1 -0
- package/dist/scripts/35-0d7358dba8.chunk.js +1 -0
- package/dist/scripts/36-d6d7b848e2.chunk.js +1 -0
- package/dist/scripts/37-d39100a6e1.chunk.js +1 -0
- package/dist/scripts/38-35d9648dc7.chunk.js +1 -0
- package/dist/scripts/39-06dd548dc5.chunk.js +1 -0
- package/dist/scripts/4-2a82a84056.chunk.js +1 -0
- package/dist/scripts/40-792c2cdf70.chunk.js +1 -0
- package/dist/scripts/41-b943713472.chunk.js +1 -0
- package/dist/scripts/42-f49212bb91.chunk.js +1 -0
- package/dist/scripts/43-fb162a1122.chunk.js +1 -0
- package/dist/scripts/44-b3b4565828.chunk.js +1 -0
- package/dist/scripts/45-fed967dc8d.chunk.js +1 -0
- package/dist/scripts/46-372fa93c13.chunk.js +1 -0
- package/dist/scripts/47-3af23cc886.chunk.js +1 -0
- package/dist/scripts/48-f0403bcb83.chunk.js +1 -0
- package/dist/scripts/49-13b2893542.chunk.js +1 -0
- package/dist/scripts/5-0fa94bdf69.chunk.js +1 -0
- package/dist/scripts/50-f2d6010fd8.chunk.js +1 -0
- package/dist/scripts/51-ec94176992.chunk.js +1 -0
- package/dist/scripts/52-f541d887ed.chunk.js +1 -0
- package/dist/scripts/53-5de0b434bf.chunk.js +1 -0
- package/dist/scripts/54-e397b03055.chunk.js +1 -0
- package/dist/scripts/55-a5aa7796a9.chunk.js +1 -0
- package/dist/scripts/56-de18389621.chunk.js +1 -0
- package/dist/scripts/57-ea4f07ceff.chunk.js +1 -0
- package/dist/scripts/58-be172a6ca4.chunk.js +1 -0
- package/dist/scripts/59-4bf5baafed.chunk.js +1 -0
- package/dist/scripts/6-c0744fc9f6.chunk.js +1 -0
- package/dist/scripts/{60-02ac1d0885.chunk.js → 60-03e44d916c.chunk.js} +1 -1
- package/dist/scripts/{61-11806e7f0f.chunk.js → 61-f5f8c3a7f9.chunk.js} +1 -1
- package/dist/scripts/62-78089903fa.chunk.js +1 -0
- package/dist/scripts/63-ea5265b3ba.chunk.js +1 -0
- package/dist/scripts/64-1460024bea.chunk.js +1 -0
- package/dist/scripts/65-81c6f0a1d0.chunk.js +1 -0
- package/dist/scripts/66-469cc41ce6.chunk.js +1 -0
- package/dist/scripts/67-d83860b6f9.chunk.js +1 -0
- package/dist/scripts/68-bf1905261e.chunk.js +1 -0
- package/dist/scripts/69-01456dee21.chunk.js +1 -0
- package/dist/scripts/7-8ae226ffea.chunk.js +1 -0
- package/dist/scripts/70-e79d42e859.chunk.js +1 -0
- package/dist/scripts/71-8bee00418c.chunk.js +1 -0
- package/dist/scripts/72-c9c79df587.chunk.js +1 -0
- package/dist/scripts/73-172b46004e.chunk.js +1 -0
- package/dist/scripts/74-3a572e4113.chunk.js +1 -0
- package/dist/scripts/8-320ab9271f.chunk.js +1 -0
- package/dist/scripts/9-eb320e3ae9.chunk.js +1 -0
- package/dist/scripts/bundle-d80b4b3ce7.min.js +10 -0
- package/dist/scripts/polyfills-afb66ec8cc.min.js +1 -0
- package/package.json +2 -2
- package/dist/scripts/0-3146283f04.chunk.js +0 -1
- package/dist/scripts/1-8f308c9df2.chunk.js +0 -1
- package/dist/scripts/10-1f8e4712fb.chunk.js +0 -1
- package/dist/scripts/12-9a649bd1e8.chunk.js +0 -1
- package/dist/scripts/13-d003ff9e41.chunk.js +0 -1
- package/dist/scripts/14-79273eff4c.chunk.js +0 -1
- package/dist/scripts/15-1a0756e067.chunk.js +0 -1
- package/dist/scripts/16-bbf0f01fe8.chunk.js +0 -1
- package/dist/scripts/17-3056f1e460.chunk.js +0 -1
- package/dist/scripts/19-f6bd3a3d49.chunk.js +0 -1
- package/dist/scripts/22-f0e56683c3.chunk.js +0 -1
- package/dist/scripts/23-cdce4174d1.chunk.js +0 -1
- package/dist/scripts/24-afd2aa2bfc.chunk.js +0 -1
- package/dist/scripts/25-b8aeb90fea.chunk.js +0 -1
- package/dist/scripts/26-08a7f60500.chunk.js +0 -1
- package/dist/scripts/27-4fdfe99ba0.chunk.js +0 -1
- package/dist/scripts/28-bb3ced1465.chunk.js +0 -1
- package/dist/scripts/29-ef11dca9b5.chunk.js +0 -1
- package/dist/scripts/3-f02b82314e.chunk.js +0 -1
- package/dist/scripts/30-41819d54db.chunk.js +0 -1
- package/dist/scripts/31-adedea4916.chunk.js +0 -1
- package/dist/scripts/32-92b6dc1186.chunk.js +0 -1
- package/dist/scripts/33-dda4dfbdee.chunk.js +0 -1
- package/dist/scripts/34-0f61f7fc7d.chunk.js +0 -1
- package/dist/scripts/35-df3c6c90f7.chunk.js +0 -1
- package/dist/scripts/36-97a61b13fd.chunk.js +0 -1
- package/dist/scripts/37-5f0b4c4b24.chunk.js +0 -1
- package/dist/scripts/38-1806441e62.chunk.js +0 -1
- package/dist/scripts/39-cb06876d63.chunk.js +0 -1
- package/dist/scripts/4-3556f5cd86.chunk.js +0 -1
- package/dist/scripts/40-dedc900f03.chunk.js +0 -1
- package/dist/scripts/41-2a772649ef.chunk.js +0 -1
- package/dist/scripts/42-edd884c6e1.chunk.js +0 -1
- package/dist/scripts/43-7cb12bb043.chunk.js +0 -1
- package/dist/scripts/44-6e38e6c3da.chunk.js +0 -1
- package/dist/scripts/45-7696788c78.chunk.js +0 -1
- package/dist/scripts/46-6fae0cec47.chunk.js +0 -1
- package/dist/scripts/47-c5e053926b.chunk.js +0 -1
- package/dist/scripts/48-c62f428014.chunk.js +0 -1
- package/dist/scripts/49-0221ac925c.chunk.js +0 -1
- package/dist/scripts/5-f2fad668b9.chunk.js +0 -1
- package/dist/scripts/50-6c9cd76347.chunk.js +0 -1
- package/dist/scripts/51-4c4cb2a786.chunk.js +0 -1
- package/dist/scripts/52-1a2a4d664f.chunk.js +0 -1
- package/dist/scripts/53-4420fdb2ff.chunk.js +0 -1
- package/dist/scripts/54-7ad2a43bae.chunk.js +0 -1
- package/dist/scripts/55-6bdc1394e8.chunk.js +0 -1
- package/dist/scripts/56-0e7f151d8f.chunk.js +0 -1
- package/dist/scripts/57-e02ec7e3aa.chunk.js +0 -1
- package/dist/scripts/58-23f2f08ffa.chunk.js +0 -1
- package/dist/scripts/59-73f62422ee.chunk.js +0 -1
- package/dist/scripts/6-41fbd1d098.chunk.js +0 -1
- package/dist/scripts/62-36cd4edbe1.chunk.js +0 -1
- package/dist/scripts/63-221a784003.chunk.js +0 -1
- package/dist/scripts/64-de212ef1ff.chunk.js +0 -1
- package/dist/scripts/65-2a3fe2cf9f.chunk.js +0 -1
- package/dist/scripts/66-3d86df4f03.chunk.js +0 -1
- package/dist/scripts/67-4044e5776b.chunk.js +0 -1
- package/dist/scripts/68-d9ac81db0f.chunk.js +0 -1
- package/dist/scripts/69-4523125605.chunk.js +0 -1
- package/dist/scripts/7-7d08599cb1.chunk.js +0 -1
- package/dist/scripts/70-cac4a9fb87.chunk.js +0 -1
- package/dist/scripts/71-59ded4dd7b.chunk.js +0 -1
- package/dist/scripts/72-8329bfea82.chunk.js +0 -1
- package/dist/scripts/73-dfe0e3c96a.chunk.js +0 -1
- package/dist/scripts/74-1aee6ab328.chunk.js +0 -1
- package/dist/scripts/8-b20f6d3c66.chunk.js +0 -1
- package/dist/scripts/9-4baf495c07.chunk.js +0 -1
- package/dist/scripts/bundle-aba0b4f36c.min.js +0 -10
- package/dist/scripts/polyfills-c68217e80d.min.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[35],{1043:function(e,t,r){"use strict";r.d(t,"a",(function(){return d}));var n=r(2),a=r(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=f(e);if(t){var a=f(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return l(this,r)}}function l(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(l,e);var t,r,n,i=c(l);function l(){return o(this,l),i.apply(this,arguments)}return t=l,(r=[{key:"defaults",value:function(){return e={},t=a.c.Disabled,r=!0,t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e;var e,t,r}}])&&u(t.prototype,r),n&&u(t,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(n.a.Model)},1049:function(e,t,r){"use strict";var n=r(1053),a=r(1050),i=(r(1051),r(3),r(1054)),o=(r(1056),r(1052));r.d(t,"a",(function(){return n.a})),r.d(t,"d",(function(){return a.g})),r.d(t,"g",(function(){return a.j})),r.d(t,"f",(function(){return a.i})),r.d(t,"c",(function(){return a.f})),r.d(t,"e",(function(){return a.h})),r.d(t,"b",(function(){return i.a})),r.d(t,"h",(function(){return o.a}))},1050:function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"k",(function(){return p})),r.d(t,"g",(function(){return g})),r.d(t,"e",(function(){return b})),r.d(t,"j",(function(){return h})),r.d(t,"i",(function(){return v})),r.d(t,"c",(function(){return w})),r.d(t,"b",(function(){return E})),r.d(t,"d",(function(){return x})),r.d(t,"f",(function(){return P})),r.d(t,"h",(function(){return y}));var n=r(2),a=r(1),i=r(19),o=r(29),u=r(3),s="libraryEditor.utils",c=["tags","thumbnail","chapters","resources","subtitles","disabled","links","restrictions","categories"];function l(e,t){if(e){var r=a.reduce(e,(function(e,r,n){var i=t[n];return r||i?a.isObject(r)&&a.isObject(i)&&!a.isUndefined(r.id)&&r.id===i.id?e:a.isArray(r)?f(r,i).length?e.concat(n):e:a.isEqual(r,i)?e:e.concat(n):e}),[]);if(r.length)return a.object(a.map(r,(function(r){return a.isArray(t[r])?[r,f(e[r],t[r])]:[r,t[r]]})))}}function f(e,t){var r=[];return a.each(t,(function(t){var n=a.findWhere(e,{id:t.id});if(!a.isUndefined(n)||0!==Object.keys(t).length){var i=a.isUndefined(n)?t:l(n,t);i&&(t.id<0&&!t.value||(!n||t.id<0?r.push(t):(i.id=t.id,r.push(i))))}})),r}var d={getChanges:function(e,t){var r=l(a.omit(e.toJSON(),c),a.omit(t.toJSON(),c));if(r)return a.object(a.map(a.keys(r),(function(e){return[e,d.formatChanges(e,r[e])]})))},formatChanges:function(e,t){if(!t)return null;if(a.isObject(t)&&a.isEmpty(t))return null;switch(e){case"name":case"description":case"productionYear":case"dateBroadcast":case"fields":case"episodeNumber":return t;case"channel":case"series":case"rating":case"season":return{id:t.id};case"distributors":case"producers":case"directors":case"productionCompanies":return a.map(t,(function(e){return e.id}));case"dateModified":case"hasBroadcast":case"seriesSort":return;default:n.a.ErrorHelper.throw(new i.a("There are no formatting settings for ".concat(e)))}},updateModelState:function(e,t,r){var i=["distributors","producers","directors","productionCompanies"];for(var o in a.each(a.keys(r),(function(e){i.includes(e)&&(r[e]=t.get(e).toJSON())})),t.set(a.clone(r),{silent:!0}),e.set(t.toJSON(),{silent:!0}),r){if(!r[o]&&e.associations[o]){var u=e.get(o);(u instanceof n.a.Model||u instanceof n.a.NestedModel)&&u.clear()}}},getRemovedObjectIds:function(e,t){var r=["distributors","productionCompanies","producers","directors"],n={};return a.each(a.keys(e.toJSON()),(function(i){if(a.contains(r,i)){var o=e.get(i).map((function(e){return e.id})),u=t.get(i).map((function(e){return e.id})),s=a.filter(o,(function(e){return e&&!a.contains(u,e)}));s.length&&(n[i]=s)}})),n}},p={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"videoTitleRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"videoTitleExceeds")}}],description:[{required:!1},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"videoDescriptionExceeds")}}],episodeNumber:function(e,t,r){return e&&e<1?u.a.getPhrase(s,"episodeNumberLessThanOne"):e&&e>2147483647?u.a.getPhrase(s,"episodeNumberExceeds"):e%1!=0?u.a.getPhrase(s,"episodeNumberNotWhole"):r.season&&r.season.get("number")>=0&&null===e?u.a.getPhrase(s,"episodeNumberNoSeason"):""},season:function(e,t,r){return r.season&&r.season.get("number")||e&&e.number||!r.episodeNumber?"":u.a.getPhrase(s,"seasonNoEpisodeNumber")}},m=o().year(),b={productionYear:function(e){return e||0===e?(e=+e,isNaN(e)?"Production year must be a number.":e<1900||e>m?u.a.getPhrase(s,"validProductionYears",{currentYear:m}):void 0):""}},g={name:[{required:!0,msg:function(){return u.a.getPhrase(s,"resourceNameRequired")}}]},h={suggestion:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditRequired")}},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"suggestEditExceeds")}}],reason:[{required:!0,msg:function(){return u.a.getPhrase(s,"suggestEditReasonRequired")}},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"suggestEditReasonExceeds")}}]},y={number:function(e){return e?+e<1?u.a.getPhrase(s,"seasonLessThanOne"):+e>3e3?u.a.getPhrase(s,"seasonExceeds"):+e%1!=0?u.a.getPhrase(s,"seasonNotWhole"):"":u.a.getPhrase(s,"seasonRequired")}},v={empty:function(){return u.a.getPhrase(s,"suggestEditRatingRequired")},original:function(){return u.a.getPhrase(s,"suggestEditRatingInvalid")}},P={url:[{required:!0,pattern:"url",msg:function(){return u.a.getPhrase(s,"linkUrlRequired")}},{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"linkUrlExceeds")}}],name:[{required:!0,msg:function(){return u.a.getPhrase(s,"linkNameRequired")}},{maxLength:255,msg:function(){return u.a.getPhrase(s,"linkNameExceeds")}}]},w={name:[{maxLength:128,msg:function(){return u.a.getPhrase(s,"fieldNameExceeds")}}],value:[{maxLength:16e3,msg:function(){return u.a.getPhrase(s,"fieldValueExceeds")}}]},E={fields:function(e){return e&&e.length?e.all((function(e){return!1!==e.isValid()}))?"":u.a.getPhrase(s,"fieldsInvalid"):""}};function x(){return[{id:-1,name:"Admin Notes",value:"",placeholder:"Notes that only admins will see"}]}},1051:function(e,t,r){"use strict";r.d(t,"a",(function(){return l}));var n=r(1),a=r(48),i=r(169),o=r(3),u="libraryEditor.utils",s={name:[{required:!0,msg:function(){return o.a.getPhrase(u,"folderNameRequired")}},{maxLength:255,msg:function(){return o.a.getPhrase(u,"folderNameExceeds")}}]},c=function(e,t){return{parentId:function(r){return r?a.a.calculateDestinationFolderDepth(e,r,t)>i.a.MAX_FOLDER_DEPTH?o.a.getPhrase(u,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":o.a.getPhrase(u,"selectParentFolder")}}},l=function(e){var t=e.validateName,r=e.validateParent,a=e.folder,i=e.collection;return t&&r?n.extend({},s,c(a,i)):t?s:r?c(a,i):void 0}},1052:function(e,t,r){"use strict";r.d(t,"a",(function(){return f}));var n=r(16),a=r(3),i=r(200),o=r(1069),u=r(62);function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var c,l="libraryEditor.utils";!function(e){e.Pdf="pdf",e.Image="image",e.PowerPoint="powerpoint",e.Document="document",e.Excel="excel",e.Zip="archive",e.File="text"}(c||(c={}));var f={mapRatingToClass:function(e){if(!e)return"";return function(e){switch(!0){case e<32:return"bg-purple";case e<48:return"bg-green";case e<80:return"bg-info";case e<96:return"bg-red";case e<128:return"bg-pink";case e>=128:return"bg-yellow";default:return""}}(e)},mapSourceToDisplayName:function(e){switch(e.get("type")){case u.a.HostedLibrary:case u.a.CustomLibrary:return e.get("name");case u.a.Exchange:return a.a.getPhrase(l,"exchange");case u.a.Workspace:return a.a.getPhrase(l,"workspace");default:return""}},mapSourceToClass:function(e){switch(e){case u.a.HostedLibrary:case u.a.CustomLibrary:return"bg-info";case u.a.Exchange:return"bg-green";case u.a.Workspace:default:return"bg-red"}},isInteractive:function(e){return!(!e||!e.interactives)&&!!e.interactives.length},mapTypeToSvg:function(e){var t,r=(s(t={},c.Pdf,n.b.FilePDF),s(t,c.Image,n.b.FileImg),s(t,c.PowerPoint,n.b.FilePowerpoint),s(t,c.Document,n.b.FileWord),s(t,c.Excel,n.b.FileExcel),s(t,c.Zip,n.b.FileZip),s(t,c.File,n.b.File),t)[e];return r||(r=n.b.Folder),n.a.getSvg(r)},mapTypeToClass:function(e){switch(e){case c.Pdf:return"icon-red";case c.Image:return"icon-purple";case c.Document:return"icon-blue";case c.Excel:return"icon-green";case c.PowerPoint:return"icon-orange";case c.Zip:return"icon-teal";case c.File:return"icon-gray";default:return""}},mapTypeToExtension:function(e){if(!e)return"";return{pdf:"pdf",image:"png",powerpoint:"pptx"}[e.toLowerCase()]},mapTypeToName:function(e){if(!e)return"";switch(e){case c.Pdf:return a.a.getPhrase(l,"pdf");case c.Image:return a.a.getPhrase(l,"image");case c.Document:return a.a.getPhrase(l,"document");case c.Excel:return a.a.getPhrase(l,"spreadsheet");case c.PowerPoint:return a.a.getPhrase(l,"presentation");case c.Zip:return a.a.getPhrase(l,"zipArchive");case c.File:return a.a.getPhrase(l,"file");default:return""}},translateMetadataCollectionNames:function(e){return new o.a(e.map((function(e){return Object.assign(Object.assign({},e.toJSON()),{name:f.translateMetadataName(e.get("name"))})})))},translateMetadataName:function(e){var t="suggestEdit";switch(e){case i.MetadataType.VideoTitle:t+="VideoTitle";break;case i.MetadataType.Description:t+="Description";break;case i.MetadataType.Rating:t+="Rating";break;case i.MetadataType.SeriesTitle:t+="SeriesTitle";break;case i.MetadataType.Season:t+="SeasonNumber";break;case i.MetadataType.EpisodeNumber:t+="EpisodeNumber";break;case i.MetadataType.BroadcastDate:t+="BroadcastDate";break;case i.MetadataType.Channel:t+="Channel";break;case i.MetadataType.ProductionYear:t+="ProductionYear";break;case i.MetadataType.Distributors:t+="Distributors";break;case i.MetadataType.ProductionCompanies:t+="ProductionCompanies";break;case i.MetadataType.Directors:t+="Directors";break;case i.MetadataType.Producers:t+="Producers";break;case i.MetadataType.Other:t+="Other"}return a.a.getPhrase(l,t)}}},1053:function(e,t,r){"use strict";r.d(t,"a",(function(){return u}));var n=r(1),a=r(12),i=r(3),o="libraryEditor.utils",u={isValidChapterTime:function(e,t,r,i){if(i){if(!n.isNumber(t))return s.StartTime.Invalid();if(t<0)return s.StartTime.Invalid();if(t>a.x.millisecondsToSeconds(r))return s.StartTime.Exceeds();if(i.some((function(r){return!(r.id&&r.id===e.id||r.cid===e.cid)&&r.get("startTime")===t})))return s.StartTime.Exists()}},isValidChapterName:function(e,t,r){return t?t.length>255?s.Name.MaxLength():r.some((function(r){return!(r.id&&r.id===e.id||r.cid===e.cid)&&r.get("name").trim()===t.trim()}))?s.Name.Exists():n.isEmpty(t.trim())?s.Name.Invalid():void 0:s.Name.Invalid()},mapPhysicalChapters:function(e){var t=0;return n.map(e,(function(e,r){var n={name:e.title,startTime:t,index:r,isPhysicalChapter:!0};return t+=e.duration,n}))}},s={Name:{Invalid:function(){return i.a.getPhrase(o,"chapterNameInvalid")},Exists:function(){return i.a.getPhrase(o,"chapterNameExists")},MaxLength:function(){return i.a.getPhrase(o,"chapterNameExceeds")}},StartTime:{Invalid:function(){return i.a.getPhrase(o,"chapterStartTimeInvalid")},Exists:function(){return i.a.getPhrase(o,"chapterStartTimeExists")},Exceeds:function(){return i.a.getPhrase(o,"chapterStartTimeExceeds")}}}},1054:function(e,t,r){"use strict";r.d(t,"a",(function(){return i}));var n=r(3),a="libraryEditor.utils",i={name:[{required:!0,msg:function(){return n.a.getPhrase(a,"libraryNameRequired")}},{maxLength:255,msg:function(){return n.a.getPhrase(a,"libraryNameExceeds")}}]}},1056:function(e,t,r){"use strict";r.d(t,"a",(function(){return o}));var n=r(3),a=r(1050),i=n.a.encloseNamespace("libraryEditor.utils"),o={name:[{required:!0,msg:function(){return i("videoTitleRequired")}}],folderId:[{required:!0,msg:function(){return i("uploadFolderRequired")}}],libraryId:[{required:!0,msg:function(){return i("uploadLibraryRequired")}}],episodeNumber:function(e,t,r){return e&&e<1?i("episodeNumberLessThanOne"):e&&e>255?i("episodeNumberExceeds"):e&&e%1!=0?i("episodeNumberNotWhole"):r.season&&r.season.get("number")>=0&&null===e?i("episodeNumberNoSeason"):""},season:function(e,t,r){return r.season&&r.season.get("number")||e&&e.number||!r.episodeNumber?"":i("seasonNoEpisodeNumber")},productionYear:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return a.e.productionYear.apply(null,t)}}},1069:function(e,t,r){"use strict";function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){return(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=c(e);if(t){var a=c(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return s(this,r)}}function s(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}r.d(t,"a",(function(){return l}));var l=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(c,e);var t,r,n,s=u(c);function c(){return i(this,c),s.apply(this,arguments)}return t=c,r&&a(t.prototype,r),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}(r(2).a.Collection)},1304:function(e,t,r){var n=r(10);e.exports=(n.default||n).template({1:function(e,t,r,n,a){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,r,n,a){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},o=e.hooks.helperMissing,u=e.escapeExpression;return'<form>\r\n <div class="form-group">\r\n <label for="name" class="control-label">'+u((r.lang||t&&t.lang||o).call(i,"libraryName",{name:"lang",hash:{},data:a}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+u((r.lang||t&&t.lang||o).call(i,"secondaryLibrary",{name:"lang",hash:{},data:a}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n</form>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,r,n,a){var i;e.propertyIsEnumerable;return null!=(i=r.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a}))?i:""},useData:!0})},1438:function(e,t,r){"use strict";r.r(t),r.d(t,"NewLibraryView",(function(){return k}));var n=r(6),a=r(2),i=r(5),o=r(30),u=r(3),s=r(68),c=r(305),l=r(144),f=r(0),d=r(265),p=r(137),m=r(1043),b=r(12),g=r(1049),h=r(146),y=r(206),v=r(1304),P=r.n(v);function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function E(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function x(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function N(e,t){return(N=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=S(e);if(t){var a=S(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return T(this,r)}}function T(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&N(e,t)}(T,e);var t,r,v,w=O(T);function T(){return E(this,T),w.apply(this,arguments)}return t=T,(r=[{key:"initialize",value:function(){this.model=o.a.get("new:library",null,{ctor:p.a}),this.bindListeners(),this.settingsDataService=i.a.getInstance(f.g.Settings,this),this.libraryDataService=i.a.getInstance(f.g.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(f.e.SEARCH,"".concat(f.f.SETTINGS,":sync"),this.render)}},{key:"name",get:function(){return"NewLibraryView"}},{key:"title",get:function(){return u.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.newLibrary"}},{key:"template",get:function(){return P.a}},{key:"channelName",get:function(){return b.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.a,modelValidation:g.b},{behaviorClass:c.f},{behaviorClass:c.e,title:u.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new m.a,channelName:this.channelName,buttonText:u.a.getPhrase(this.lang,"save"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.model.validate(),this.model.isValid()&&(n.Radio.channel(this.channelName).trigger(d.b.ShowSpinner),this.createLibrary())}},{key:"createLibrary",value:function(){this.libraryDataService.createLibrary(this.currentUser.get("customerId"),this.model,(function(e){o.a.clear("new:library"),a.a.AppLinkHelper.trigger({application:f.b.LIBRARY_EDITOR,action:f.a.LibraryEditor.LIBRARY,args:[e.id]})}))}},{key:"requiredResources",get:function(){return{currentUser:l.b.currentUser,libraries:h.b.libraries}}},{key:"onBeforeRender",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),s.a.MaxCustomLibraries),this.libraries.length>=this.maxCustomLibraries.get("value")?a.a.ErrorHelper.throw(new y.j(this.libraries.length,this.maxCustomLibraries.get("value"))):this.maxCustomLibraries&&this.spinnerModel.set(d.c.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.maxCustomLibraries,spinnerEl:b.r.getSpinner({size:b.s.Large,extraClasses:"mx-auto"})}}}])&&x(t.prototype,r),v&&x(t,v),Object.defineProperty(t,"prototype",{writable:!1}),T}(a.a.View)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[36],{1043:function(e,t,n){"use strict";n.d(t,"a",(function(){return f}));var r=n(2),o=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var f=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(c,e);var t,n,r,i=s(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&l(t.prototype,n),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Model)},1119:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return y}));var r,o=n(6),i=n(2),a=n(1163),l=n.n(a),u=n(1120),s=n.n(u);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(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,r.key,r)}}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d(e);if(t){var o=d(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}!function(e){e.ClickCrop="click:crop",e.CropImage="crop:image",e.ImageCropped="image:cropped"}(r||(r={}));var y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&f(e,t)}(u,e);var t,n,i,a=h(u);function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,e)}return t=u,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,r.CropImage,this.crop)}},{key:"name",get:function(){return"ImageCropperComponent"}},{key:"template",get:function(){return s.a}},{key:"className",get:function(){return"text-center"}},{key:"elements",get:function(){return{image:".img"}}},{key:"getMinCropBoxWidth",value:function(){return this.options.minWidth*this.getViewportToImageRatio()}},{key:"getMinCropBoxHeight",value:function(){return this.options.minHeight*this.getViewportToImageRatio()}},{key:"getViewportToImageRatio",value:function(){return this.options.getCropRegionWidth()/this.model.get("width")}},{key:"crop",value:function(){var e=this.cropper.getCroppedCanvas().toDataURL(this.getImageMimeType());o.Radio.channel(this.options.channelName).trigger(r.ImageCropped,e)}},{key:"getImageMimeType",value:function(){var e=this.model.get("dataUrl").match(/data:([a-zA-Z0-9]+\/[a-zA-Z0-9-.+]+).*,.*/);if(e)return e[1]}},{key:"renderCropper",value:function(){this.getMinCropBoxWidth();var e=this.getUI("image").get(0);this.cropper=new l.a(e,{viewMode:1,aspectRatio:this.options.minWidth/this.options.minHeight,minCropBoxWidth:this.getMinCropBoxWidth(),minCropBoxHeight:this.getMinCropBoxHeight(),autoCropArea:1})}},{key:"onRender",value:function(){this.renderCropper()}},{key:"onBeforeDestroy",value:function(){this.cropper.destroy()}}])&&p(t.prototype,n),i&&p(t,i),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.a.Component)},1120:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<img src="'+e.escapeExpression("function"==typeof(i=null!=(i=n.dataUrl||(null!=t?t.dataUrl:t))?i:e.hooks.helperMissing)?i.call(null!=t?t:e.nullContext||{},{name:"dataUrl",hash:{},data:o}):i)+'" class="img img-fluid" />'},useData:!0})},1315:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return" "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"minimumRecommended",{name:"lang",hash:{height:null!=(i=null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i)?i.height:i,width:null!=(i=null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i)?i.width:i},data:o}))+"\r\n"},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return" "+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"minimumActual",{name:"lang",hash:{height:null!=(i=null!=(i=null!=t?t.options:t)?i.dimensions:i)?i.height:i,width:null!=(i=null!=(i=null!=t?t.options:t)?i.dimensions:i)?i.width:i},data:o}))+"\r\n"},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.lambda,l=e.escapeExpression;return'<button class="'+l(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.removeImage:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"remove",{name:"lang",hash:{},data:o}))+" "+l(a(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,u=e.escapeExpression,s=e.lambda;return'<h6 class="mb-0">'+u((n.lang||t&&t.lang||l).call(a,"edit",{name:"lang",hash:{},data:o}))+" "+u(s(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+'</h6>\r\n<div class="text-muted mb-1">\r\n <em>\r\n'+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.recommendedDimensions:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:"")+' </em>\r\n</div>\r\n<div class="my-1 '+u(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageContainer:i,t))+'">\r\n <div class="'+u(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.imageElement:i,t))+'" style="background-image: url(\''+u(s(null!=(i=null!=t?t.options:t)?i.imageUrl:i,t))+'\')"></div>\r\n</div>\r\n<button class="btn btn-light my-1">'+u((n.lang||t&&t.lang||l).call(a,"upload",{name:"lang",hash:{},data:o}))+" "+u(s(null!=(i=null!=t?t.options:t)?i.imageTypeText:i,t))+"</button>\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasImage:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1316:function(e,t,n){e.exports={removeImage:"_3OmsX",imageElement:"_3kJ8m",banner:"uFWnL",thumbnail:"_3_b6l",imageContainer:"_1mYjS"}},1317:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){return'<div class="thumbnail-region"></div>\r\n<div class="dropdown-divider"></div>\r\n<div class="banner-region"></div>'},useData:!0})},1318:function(e,t,n){e.exports={hide:"_5hYaK"}},1319:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){return'<div class="content-region"></div>\r\n'},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1481:function(e,t,n){"use strict";n.r(t);var r=n(1),o=n(6),i=n(2),a=n(5),l=n(30),u=n(4),s=n(42),c=n(305),p=n(319),f=n(1043),h=n(12),m=n(0),d=n(9),y=n(1119),g=n(265),b=n(201),v=n(3),w=n(1315),I=n.n(w),k=n(1316),C=n.n(k);function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(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,r.key,r)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return B(this,n)}}function B(e,t){if(t&&("object"===T(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(u,e);var t,n,r,a=R(u);function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,e)}return t=u,(n=[{key:"initialize",value:function(){this.viewModel=l.a.get("edit:folder:images")}},{key:"name",get:function(){return"EditImageComponent"}},{key:"template",get:function(){return I.a}},{key:"lang",get:function(){return"libraryEditor.editImage"}},{key:"className",get:function(){return this.options.imageType===d.f.Thumbnails?"".concat(C.a.thumbnail," mb-2"):"".concat(C.a.banner," mt-2")}},{key:"events",value:function(){return e={},t="click .".concat(C.a.removeImage),n="onClickRemoveImage",t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.b,channelName:this.options.channelName,buttonSelector:".btn-light",imageType:this.options.imageType,saveImage:function(t,n){n?(e.viewModel.set({dataUrl:t,type:e.options.imageType}),i.a.AppLinkHelper.trigger({application:m.b.LIBRARY_EDITOR,action:m.a.LibraryEditor.EDIT_FOLDER_IMAGES,args:[e.options.folderId]})):o.Radio.channel(e.options.channelName).trigger("select:image",t,e.options.imageType)}}]}},{key:"onClickRemoveImage",value:function(){o.Radio.channel(this.options.channelName).trigger("show:dialog",this.options.imageType)}},{key:"getImageUrl",value:function(){var e=this.options.imageType===d.f.Banners?"createBannerUrl":"createFolderThumbnailUrl";return h.g[e](this.options.originalImage,{fallbackBaseUrl:this.options.imageCdnUrl,fallbackCategoryName:this.options.folderName,type:this.options.imageType})}},{key:"getImageTypeText",value:function(){switch(this.options.imageType){case d.f.Banners:return v.a.getPhrase(this.lang,"banner");case d.f.Thumbnails:return v.a.getPhrase(this.lang,"thumbnail")}}},{key:"viewOptions",value:function(){return{styles:C.a,imageUrl:this.getImageUrl(),hasImage:this.options.originalImage&&this.options.originalImage.get("id"),imageTypeText:this.getImageTypeText(),dimensions:m.k[this.options.imageType],recommendedDimensions:m.m[this.options.imageType]}}}])&&O(t.prototype,n),r&&O(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.a.Component),P=n(1317),j=n.n(P);function x(e){return(x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function U(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function D(e,t){return(D=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function M(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=L(e);if(t){var o=L(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return N(this,n)}}function N(e,t){if(t&&("object"===x(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function L(e){return(L=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var A,W=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}(i,e);var t,n,r,o=M(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"EditImagesWrapperComponent"}},{key:"template",get:function(){return j.a}},{key:"regions",value:function(){return{banner:{el:".banner-region",replaceElement:!0},thumbnail:{el:".thumbnail-region",replaceElement:!0}}}},{key:"renderBanner",value:function(){this.showChildView("banner",new _({channelName:this.options.bannerChannel,imageCdnUrl:this.options.imageCdnUrl,imageType:d.f.Banners,folderName:this.options.folderName,originalImage:this.options.bannerImage,folderId:this.options.folderId}))}},{key:"renderThumbnail",value:function(){this.showChildView("thumbnail",new _({channelName:this.options.thumbnailChannel,imageCdnUrl:this.options.imageCdnUrl,imageType:d.f.Thumbnails,folderName:this.options.folderName,originalImage:this.options.thumbnailImage,folderId:this.options.folderId}))}},{key:"onRender",value:function(){this.renderBanner(),this.renderThumbnail()}}])&&U(t.prototype,n),r&&U(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(i.a.Component),F=n(1318),V=n.n(F),H=n(1319),z=n.n(H);function Y(e){return(Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function J(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,r.key,r)}}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function G(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=K(e);if(t){var o=K(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Z(this,n)}}function Z(e,t){if(t&&("object"===Y(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"EditFolderImagesView",(function(){return X})),function(e){e[e.Upload=0]="Upload",e[e.Crop=1]="Crop"}(A||(A={}));var X=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q(e,t)}(I,e);var t,n,v,w=G(I);function I(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,I),w.call(this,e)}return t=I,(n=[{key:"initialize",value:function(){this.popupContentState=A.Upload,this.viewModel=l.a.get("edit:folder:images"),this.viewModel.get("dataUrl")&&(this.selectedImageType=this.viewModel.get("type"),this.newImageEl=new Image,this.newImageEl.src=this.viewModel.get("dataUrl"),this.spinnerModel.set(g.c.Disabled,!1),this.popupContentState=A.Crop),this.libraryDataService=a.a.getInstance(m.g.Library,this),this.imageUploadDataService=a.a.getInstance(m.g.ImageUpload,this),this.bindListeners()}},{key:"name",get:function(){return"EditFolderImagesView"}},{key:"title",get:function(){return"Edit Folder Images"}},{key:"template",get:function(){return z.a}},{key:"channelName",get:function(){return h.k.generateUniqueChannelName(this)}},{key:"regions",value:function(){return{content:{el:".content-region",replaceElement:!0}}}},{key:"events",value:function(){return{"click .back-btn":"onClickBackButton","shown.bs.modal":"renderCropper"}}},{key:"elements",get:function(){return{backBtn:".back-btn"}}},{key:"behaviors",get:function(){return[{title:"Edit folder images",behaviorClass:c.e,size:"modal-lg",buttons:[{text:"Back",className:"btn btn-light back-btn ".concat(V.a.hide)}],spinnerButtonOptions:{model:this.spinnerModel=new f.a,channelName:this.channelName,buttonText:"Continue",onClick:this.onClickCrop}}]}},{key:"requiredResources",get:function(){return{config:b.b.config}}},{key:"bindListeners",value:function(){var e=this;this.listenTo(m.e.LIBRARY,"".concat(m.f.FOLDER,":").concat(this.options.folderId,":sync"),this.render);var t="".concat(this.channelName,":").concat(d.f.Banners),n="".concat(this.channelName,":").concat(d.f.Thumbnails);this.listenTo(t,"select:image",(function(t){return e.onSelectImage(t,d.f.Banners)})),this.listenTo(n,"select:image",(function(t){return e.onSelectImage(t,d.f.Thumbnails)})),this.listenTo(t,"show:dialog",(function(){return e.onShowDialog(d.f.Banners)})),this.listenTo(n,"show:dialog",(function(){return e.onShowDialog(d.f.Thumbnails)})),this.listenTo(t,"image:error",(function(){return e.triggerMethod("hide")})),this.listenTo(n,"image:error",(function(){return e.triggerMethod("hide")})),this.listenTo(this.channelName,y.a.ImageCropped,this.onImageCropped)}},{key:"onClickBackButton",value:function(){this.popupContentState!==A.Upload&&(this.popupContentState=A.Upload,this.selectedImageType=null,this.newImageEl=null,this.spinnerModel.set(g.c.Disabled,!0),this.renderContent())}},{key:"onClickCrop",value:function(){o.Radio.channel(this.channelName).trigger(y.a.CropImage).trigger(g.b.ShowSpinner)}},{key:"onSelectImage",value:function(e,t){this.selectedImageType=t,this.newImageEl=new Image,this.newImageEl.src=e,this.popupContentState=A.Crop,this.spinnerModel.set(g.c.Disabled,!1),this.renderCropper()}},{key:"onImageCropped",value:function(e){var t=this;this.imageUploadDataService.uploadBase64Image(e,this.selectedImageType,(function(e){return t.onImageUploaded(e)}))}},{key:"onImageUploaded",value:function(e){var t=this;this.triggerMethod("hide");var n={libraryId:this.libraryId,folderId:this.options.folderId,currentImageId:this.getCurrentImageId(),imageModel:e},r=this.selectedImageType===d.f.Banners?u.EntityType.Banner:u.EntityType.Thumbnail,o=this.selectedImageType===d.f.Banners?"addOrUpdateBanner":"addOrUpdateThumbnail";this.libraryDataService[o](n,(function(e){s.a.logUserAction({libraryId:t.libraryId,folderId:t.options.folderId,id:e.get("id")},{actionType:u.UserAction.Upload,entity:r,workflowPhase:u.WorkflowPhase.Complete,location:u.LocationContext.Popup}),t.reloadPage()}))}},{key:"onShowDialog",value:function(e){var t=this,n=new h.d({title:"Remove image?",text:"Are you sure you want to remove this image?",buttons:[{text:"Remove",className:"btn btn-danger",success:!0},{text:"Cancel",className:"btn btn-secondary",close:!0}],channelName:this.options.channelName});setTimeout((function(){return n.render().done((function(){return t.removeImage(e)}))}),200),this.triggerMethod("hide")}},{key:"removeImage",value:function(e){var t=this,n=e===d.f.Banners?"deleteBanner":"deleteThumbnail",r=e===d.f.Banners?this.currentBanner:this.currentThumbnail,o={libraryId:this.libraryId,folderId:this.model.get("id"),imageId:r.get("id")},i=e===d.f.Banners?u.EntityType.Banner:u.EntityType.Thumbnail;this.libraryDataService[n](o,(function(){s.a.logUserAction({libraryId:t.libraryId,folderId:t.model.get("id"),id:r.get("id")},{actionType:u.UserAction.Delete,entity:i,workflowPhase:u.WorkflowPhase.Complete,location:u.LocationContext.Popup}),t.reloadPage()}))}},{key:"reloadPage",value:function(){var e=this,t=i.a.LocationUtils.GetCurrentPath().includes("folders");setTimeout((function(){return i.a.AppLinkHelper.trigger({application:m.b.LIBRARY_EDITOR,action:t?m.a.LibraryEditor.FOLDER:m.a.LibraryEditor.HOME,args:t?[e.options.folderId]:void 0})}),0)}},{key:"getCurrentImageId",value:function(){return this.selectedImageType===d.f.Banners&&this.currentBanner?this.currentBanner.get("id"):this.selectedImageType===d.f.Thumbnails&&this.currentThumbnail?this.currentThumbnail.get("id"):void 0}},{key:"getCropRegionWidth",value:function(){return this.$el.find(".modal-body").width()}},{key:"getImageModel",value:function(){return new p.a({dataUrl:this.newImageEl.src,width:this.newImageEl.width,height:this.newImageEl.height})}},{key:"renderContent",value:function(){this.popupContentState===A.Upload&&(this.getUI("backBtn").addClass(V.a.hide),this.showChildView("content",new W({imageCdnUrl:this.config.get("imageCdnUrl"),folderName:this.model.get("name"),bannerImage:this.currentBanner,thumbnailImage:this.currentThumbnail,bannerChannel:"".concat(this.channelName,":").concat(d.f.Banners),thumbnailChannel:"".concat(this.channelName,":").concat(d.f.Thumbnails),folderId:this.options.folderId})))}},{key:"renderCropper",value:function(){this.popupContentState===A.Crop&&(this.getUI("backBtn").removeClass(V.a.hide),this.showChildView("content",new y.b({model:this.getImageModel(),channelName:this.channelName,imageType:this.selectedImageType,minWidth:m.k[this.selectedImageType].width,minHeight:m.k[this.selectedImageType].height,getCropRegionWidth:r.bind(this.getCropRegionWidth,this)})))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.libraryId,spinnerEl:h.r.getSpinner({size:h.s.Large,extraClasses:"mx-auto"})}}},{key:"onBeforeRender",value:function(){var e=this;this.model&&this.libraryId||(this.model=this.libraryDataService.getFolder(this.options.folderId),this.libraryDataService.getLibraries((function(t){return e.libraryId=t.first().id})))}},{key:"onRender",value:function(){this.model&&this.libraryId&&(this.currentBanner=this.model.get("banner"),this.currentThumbnail=this.model.get("thumbnail"),this.renderContent())}},{key:"onBeforeDestroy",value:function(){this.viewModel.clear()}}])&&J(t.prototype,n),v&&J(t,v),Object.defineProperty(t,"prototype",{writable:!1}),I}(i.a.View)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[37],{1043:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var o=n(2),r=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=d(e);if(t){var r=d(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return u(this,n)}}function u(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(u,e);var t,n,o,i=c(u);function u(){return a(this,u),i.apply(this,arguments)}return t=u,(n=[{key:"defaults",value:function(){return e={},t=r.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&s(t.prototype,n),o&&s(t,o),Object.defineProperty(t,"prototype",{writable:!1}),u}(o.a.Model)},1057:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var o=n(1),r=n(2),i=n(312);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function s(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function l(e,t){return(l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=d(e);if(t){var r=d(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return u(this,n)}}function u(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&l(e,t)}(u,e);var t,n,r,a=c(u);function u(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),a.call(this,e)}return t=u,(n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.a}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return o.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,o=e.extraClasses,r="dropdown-menu-".concat(n);return o&&(r="".concat(r," ").concat(o)),r}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),u}(r.a.ComponentCollection)},1103:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var o=n(1),r=n(6),i=n(2),a=n(1057),s=n(12),l=n(1104),c=n.n(l),u=n(1105),d=n.n(u);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})(e)}function f(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return g(this,n)}}function g(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)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(u,e);var t,n,i,l=y(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=l.call(this,e)).selectSearch="",t.sameCharIndex=1,t.optionStep=1,t}return t=u,(n=[{key:"initialize",value:function(){this.setModel(),this.bindListeners()}},{key:"name",get:function(){return"SelectComponent"}},{key:"template",get:function(){return c.a}},{key:"regions",value:function(){return{dropdown:{el:".dropdown-region",replaceElement:!0}}}},{key:"events",value:function(){return{keydown:"onKeydown","shown.bs.dropdown":"onShowDropdown"}}},{key:"defaults",get:function(){return{displayProperty:"name"}}},{key:"elements",get:function(){return{dropdownToggle:".dropdown-toggle"}}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,this.options.childOptions.eventName,this.onSelect)}},{key:"onShowDropdown",value:function(){r.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onKeydown",value:function(e){38===e.keyCode||40===e.keyCode?this.onArrowKeyDown(e):13===e.keyCode?this.render():this.onType(e),r.Radio.channel(this.options.channelName).trigger("center:dropdown")}},{key:"onArrowKeyDown",value:function(e){s.c.getSelected(this.collection)?this.optionStep=1:this.optionStep=0;var t=this.getNextModel(e.keyCode);for(t||(s.c.deselectAll(this.collection),t=this.getNextModel(e.keyCode));this.isDisabled(t);)this.optionStep++,t=this.getNextModel(e.keyCode);this.onSelect(t)}},{key:"onType",value:function(e){if(1===e.key.toString().length){var t=this.getModelMatch(e);t&&this.onSelect(t),this.runTimer()}}},{key:"onSelect",value:function(e){this.isDisabled(e)||(s.c.setSelected(e.get("id"),this.collection),this.setModel(),this.getUI("dropdownToggle").text(this.getButtonText()),r.Radio.channel(this.options.channelName).trigger("select:option:selected",e))}},{key:"setModel",value:function(){this.model=s.c.getSelected(this.collection)}},{key:"getNextModel",value:function(e){var t,n=s.c.getSelected(this.collection)||this.collection.first(),o=this.collection.indexOf(n);return(t=38===e?this.collection.at(o-this.optionStep):this.collection.at(o+this.optionStep))||(s.c.deselectAll(this.collection),t=this.collection.first(),this.optionStep=0),t}},{key:"getModelMatch",value:function(e){var t,n=this;return 1===this.selectSearch.length&&this.selectSearch===e.key?t=this.handleSameCharIndex(e.key):(this.selectSearch+=e.key,this.sameCharIndex=1),t||(t=o.find(this.collection.models,(function(e){return e.get(n.options.displayProperty).toLowerCase().slice(0,n.selectSearch.length).includes(n.selectSearch.toLowerCase())}))),t}},{key:"handleSameCharIndex",value:function(e){var t=this,n=o.filter(this.collection.models,(function(n){return n.get(t.options.displayProperty).toLowerCase().slice(0,1)===e}));if(n.length>1){var r=n[this.sameCharIndex];return r||(r=o.first(n),this.sameCharIndex=0),this.sameCharIndex++,r}return o.first(n)}},{key:"runTimer",value:function(){var e=this;this.scopedTimerIndex&&clearTimeout(this.scopedTimerIndex),this.scopedTimerIndex=window.setTimeout((function(){e.selectSearch=""}),500)}},{key:"isDisabled",value:function(e){var t;if(e.get("divider"))return!0;if(!o.isFunction(this.options.childOptions.isDisabled))return!1;for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return(t=this.options.childOptions.isDisabled).call.apply(t,[this,e].concat(r))}},{key:"getButtonText",value:function(){if(this.options.disabled)return this.options.noOptionsText;var e=s.c.getSelected(this.collection);return e&&e.get(this.options.displayProperty)||this.options.placeholderText}},{key:"viewOptions",value:function(){return{styles:d.a,inputName:this.options.inputName,disabled:this.options.disabled,placeholderText:this.getButtonText()}}},{key:"onRender",value:function(){this.showChildView("dropdown",new a.a({collection:this.collection,channelName:this.options.channelName,childOptions:o.extend(this.options.childOptions),displayOptions:{extraClasses:"w-100 ".concat(d.a.dropdownMenu)},analyticsHelper:this.options.analyticsHelper}))}}])&&f(t.prototype,n),i&&f(t,i),Object.defineProperty(t,"prototype",{writable:!1}),u}(i.a.Component)},1104:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,o,r){return" disabled"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<button \r\n class="dropdown-toggle form-control btn-block text-left position-relative '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectButton:i,t))+" "+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'" \r\n type="button" \r\n id="dropdownMenuButton" \r\n data-toggle="dropdown" \r\n aria-haspopup="true" \r\n aria-expanded="false"\r\n '+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+' \r\n name="'+s(a(null!=(i=null!=t?t.options:t)?i.inputName:i,t))+'"\r\n >\r\n '+s(a(null!=(i=null!=t?t.options:t)?i.placeholderText:i,t))+'\r\n</button>\r\n<div class="dropdown-region"></div>\r\n<div class="form-feedback"></div>'},useData:!0})},1105:function(e,t,n){e.exports={dropdownMenu:"_2RaQu",selectButton:"_2xGqi",disabled:"_15kWr"}},1325:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=e.escapeExpression,s=e.lambda;return'<p class="font-weight-bold mb-0">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"currentType",{name:"lang",hash:{metadataType:null!=(i=null!=t?t.options:t)?i.metadataType:i},data:r}))+'</p>\r\n<p class="mb-3 '+a(s(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.metadataValue:i,t))+'">'+(null!=(i=s(null!=(i=null!=t?t.options:t)?i.metadataValue:i,t))?i:"")+"</p>\r\n"},3:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return' <textarea\r\n id="suggest-edit"\r\n placeholder="'+e.escapeExpression(e.lambda(null!=(i=null!=t?t.options:t)?i.suggestionPlaceholder:i,t))+'"\r\n class="form-control"\r\n name="suggestion"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return(null!=(i=n.unless.call(a,null!=(i=null!=t?t.options:t)?i.isOtherType:i,{name:"unless",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?i:"")+'\r\n<div class="dropdown-divider"></div>\r\n\r\n<div class="form-group">\r\n <label for="suggest-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"suggestionSubheading",{name:"lang",hash:{},data:r}))+'</label>\r\n <div class="rating-select-region"></div>\r\n <div class="rating-form-feedback invalid-feedback"></div>\r\n'+(null!=(i=n.unless.call(a,null!=(i=null!=t?t.options:t)?i.useRatingSelect:i,{name:"unless",hash:{},fn:e.program(3,r,0),inverse:e.noop,data:r}))?i:"")+'</div>\r\n\r\n<div class="form-group">\r\n <label for="reason-for-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(a,"reasoningSubheading",{name:"lang",hash:{},data:r}))+'</label>\r\n <textarea\r\n id="reason-for-edit"\r\n placeholder="'+l((n.lang||t&&t.lang||s).call(a,"reasoningPlaceholder",{name:"lang",hash:{},data:r}))+'"\r\n class="form-control"\r\n name="reason"\r\n ></textarea>\r\n <div class="form-feedback"></div>\r\n</div>'},useData:!0})},1326:function(e,t,n){e.exports={metadataValue:"_3nkrW"}},1327:function(e,t,n){var o=n(10);e.exports=(o.default||o).template({1:function(e,t,n,o,r){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},a=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||a).call(i,"guidelines",{name:"lang",hash:{},data:r}))+'</p>\r\n<p class="font-weight-bold mb-1">'+s((n.lang||t&&t.lang||a).call(i,"dropdownHeading",{name:"lang",hash:{},data:r}))+'</p>\r\n<div class="metadata-dropdown-region position-relative"></div>\r\n<div class="suggest-edit-region"></div>\r\n'},3:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,r){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.program(3,r,0),data:r}))?i:""},useData:!0})},1476:function(e,t,n){"use strict";n.r(t);var o=n(1),r=n(3),i=n(2),a=n(5),s=n(30),l=n(4),c=n(42),u=n(12);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=m(e);if(t){var r=m(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return g(this,n)}}function g(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(i,e);var t,n,o,r=y(i);function i(){return f(this,i),r.apply(this,arguments)}return t=i,n&&p(t.prototype,n),o&&p(t,o),Object.defineProperty(t,"prototype",{writable:!1}),t}(i.a.Model),b=n(369),w=n(1043),S=n(144),k=n(201),O=n(0),M=n(1069),T=n(1103),E=n(265),P=n(305),x=n(62),C=n(6),R=n(29),j=n(9),_=n(1207),V=n(200),N=n(1049),I=n(1325),D=n.n(I),B=n(1326),A=n.n(B);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})(e)}function U(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function F(e,t){return(F=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function H(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=q(e);if(t){var r=q(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return J(this,n)}}function J(e,t){if(t&&("object"===L(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function q(e){return(q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var z,G=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&F(e,t)}(s,e);var t,n,o,a=H(s);function s(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,e)}return t=s,(n=[{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return D.a}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"mt-3"}},{key:"lang",get:function(){return"libraryEditor.suggestEdit"}},{key:"regions",value:function(){return{ratingSelect:{el:".rating-select-region",replaceElement:!0}}}},{key:"bindings",get:function(){return{"[name=suggestion]":{observe:"suggestion",setOptions:{validate:!0}},"[name=reason]":{observe:"reason",setOptions:{validate:!0}}}}},{key:"elements",get:function(){return{ratingValidation:".rating-form-feedback"}}},{key:"getMetadataValue",value:function(){return this.options.metadataType===V.MetadataType.BroadcastDate?this.options.metadataValue?R(this.options.metadataValue).format(j.l.FULL_YEAR):r.a.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue instanceof i.a.Collection?this.options.metadataValue.length?this.options.metadataValue.map((function(e){return e.get("name")})).join(", "):r.a.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue||r.a.getPhrase(this.lang,"noMetadataValue")}},{key:"getSuggestionPlaceholder",value:function(){return this.options.metadataType===V.MetadataType.Other?r.a.getPhrase(this.lang,"otherSuggestionPlaceholder"):r.a.getPhrase(this.lang,"suggestionPlaceholder",{metadataType:N.h.translateMetadataName(this.options.metadataType).toLowerCase()})}},{key:"renderRatingSelect",value:function(){this.options.ratingValidationMessage?this.getUI("ratingValidation").text(this.options.ratingValidationMessage).attr("style","display: block;"):this.getUI("ratingValidation").hide(),this.options.metadataType===V.MetadataType.Rating&&this.showChildView("ratingSelect",new _.a({model:this.options.currentRating,collection:this.options.ratings,parentChannelName:this.options.channelName,hideHeaderText:!0,hideRemove:!0}))}},{key:"viewOptions",value:function(){return{styles:A.a,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===V.MetadataType.Rating,isOtherType:this.options.metadataType===V.MetadataType.Other,metadataType:N.h.translateMetadataName(this.options.metadataType).toLowerCase(),suggestionPlaceholder:this.getSuggestionPlaceholder()}}},{key:"onRender",value:function(){this.renderRatingSelect(),this.stickit(),C.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),C.Validation.unbind(this)}}])&&U(t.prototype,n),o&&U(t,o),Object.defineProperty(t,"prototype",{writable:!1}),s}(i.a.Component);!function(e){e[e.Email=0]="Email"}(z||(z={}));var K=n(165),W=n(59),$=Object.assign(Object.assign({},K.a),{createSuggestEditNotification:function(e){return{_type:W.a.SuggestEdit,groupId:e.groupId,receiverId:0,instanceRegion:e.instanceRegion,countryCode:e.countryCode,channels:[z.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),Q=n(1327),Y=n.n(Q);function X(e){return(X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}function ee(e,t){return(ee=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function te(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=oe(e);if(t){var r=oe(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return ne(this,n)}}function ne(e,t){if(t&&("object"===X(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function oe(e){return(oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"SuggestAnEditView",(function(){return re}));var re=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ee(e,t)}(p,e);var t,n,i,d=te(p);function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),d.call(this,e)}return t=p,(n=[{key:"initialize",value:function(){this.getViewModel(),this.videoDataService=a.a.getInstance(O.g.Video,this),this.ratingsDataService=a.a.getInstance(O.g.Ratings,this),this.notificationDataService=a.a.getInstance(O.g.Notifications,this),this.selectedMetadata=new v,this.metadataCollection=this.getMetadataCollection(),this.bindListeners()}},{key:"name",get:function(){return"SuggestAnEditView"}},{key:"template",get:function(){return Y.a}},{key:"tagName",get:function(){return"form"}},{key:"className",get:function(){return"form-group"}},{key:"lang",get:function(){return"libraryEditor.suggestAnEdit"}},{key:"title",get:function(){return r.a.getPhrase(this.lang,"title")}},{key:"channelName",get:function(){return u.k.generateUniqueChannelName(this)}},{key:"viewModelName",get:function(){return"".concat(this.name,":").concat(this.options.videoId)}},{key:"regions",value:function(){return{dropdown:{el:".metadata-dropdown-region",replaceElement:!1},suggestEdit:{el:".suggest-edit-region",replaceElement:!0}}}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:P.e,title:r.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new w.a,channelName:this.channelName,buttonText:r.a.getPhrase(this.lang,"submit"),onClick:function(){return e.onSubmit()}}}]}},{key:"requiredResources",get:function(){return{config:k.b.config,currentUser:S.b.currentUser}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:option:selected",this.onMetadataSelect),this.listenTo(this.channelName,"select:rating",this.onSelectRating),this.listenTo(O.e.VIDEO,"".concat(O.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(O.e.NOTIFICATIONS,"".concat(O.f.SUGGEST_EDIT,":error"),this.onError)}},{key:"onSubmit",value:function(){var e=this;if(this.validateForm()){this.spinnerModel.set(E.c.ShowSpinner,!0);var t=this.selectedMetadata.get("metadataType")===V.MetadataType.Rating?this.viewModel.get("ratingSuggestion"):this.viewModel.get("suggestion"),n=this.config.get("suggestEditMetadataGroupId"),o=$.createSuggestEditNotification({groupId:n,instanceRegion:this.currentUser.get("instanceRegion"),countryCode:this.currentUser.get("countryCode"),video:this.model.toJSON(),user:this.currentUser.toJSON(),property:this.selectedMetadata.get("metadataType").toLowerCase(),suggestion:t,reason:this.viewModel.get("reason"),currentValue:this.selectedMetadata.get("metadataValue")});this.notificationDataService.suggestEdit(o,(function(){e.triggerMethod("hide"),e.spinnerModel.set(E.c.ShowSpinner,!1),e.spinnerModel.set(E.c.Disabled,!0)})),this.logAction(),this.viewModel.clear()}}},{key:"onError",value:function(){this.spinnerModel.set(E.c.ShowSpinner,!1)}},{key:"onMetadataSelect",value:function(e){this.selectMetadata(e),this.renderSuggestEdit()}},{key:"onSelectRating",value:function(e){this.viewModel.set("ratingSuggestion",e.get("name")),this.renderSuggestEdit()}},{key:"selectMetadata",value:function(e){this.spinnerModel.set(E.c.Disabled,!1),u.c.setSelected(e.get("id"),this.metadataCollection),this.selectedMetadata.set({metadataType:e.get("name"),metadataValue:e.get("name")!==V.MetadataType.Other?this.model.get(e.get("property")):null}),e.get("name")!==V.MetadataType.Rating&&this.viewModel.set("ratingSuggestion","")}},{key:"getMetadataCollection",value:function(){return new M.a(Object.keys(V.MetadataTypes).map((function(e){return V.MetadataTypes[e]})))}},{key:"getMetadataByType",value:function(e){return this.metadataCollection.findWhere({name:e})}},{key:"getViewModel",value:function(){this.viewModel=s.a.get(this.viewModelName),this.viewModel.addValidation(N.g)}},{key:"validateForm",value:function(){this.renderSuggestEdit(),this.viewModel.validate();var e=this.viewModel.toJSON(),t=e.reason,n=e.suggestion;return!(this.getRatingValidationMessage()||this.selectedMetadata.get("metadataType")!==V.MetadataType.Rating&&!n||!t)}},{key:"getRatingValidationMessage",value:function(){if(this.selectedMetadata.get("metadataType")!==V.MetadataType.Rating)return"";var e=this.selectedMetadata.get("metadataValue"),t=this.viewModel.get("ratingSuggestion");return t?e===t?N.f.original():"":N.f.empty()}},{key:"checkPreselection",value:function(){if(!this.selectedMetadata.get("metadataType")&&this.options.metadata&&this.dataFetched()){var e=this.getMetadataByType(this.options.metadata);this.selectMetadata(e)}}},{key:"logAction",value:function(){var e=u.y.getSourceTypes(this.model);e=o.filter(e,(function(e){return e!==x.a.CustomLibrary}));var t={videoSourceTypes:o.sortBy(o.unique(e),(function(e){return e})).join(","),videoId:this.model.get("id"),metadataProperty:this.selectedMetadata.get("metadataType"),metadataPropertyValue:this.selectedMetadata.get("metadataValue"),suggestion:this.viewModel.get("suggestion"),reason:this.viewModel.get("reason")};c.a.logUserAction(t,{descriptor:l.SuggestionDescriptor.Edit,location:l.LocationContext.Popup,actionType:l.UserAction.Suggest,entity:l.EntityType.Video})}},{key:"dataFetched",value:function(){return!!this.model&&!!this.ratingCollection}},{key:"renderMetadataDropdown",value:function(){this.showChildView("dropdown",new T.a({collection:N.h.translateMetadataCollectionNames(this.metadataCollection),channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click"},placeholderText:this.selectedMetadata.get("metadataType")||r.a.getPhrase(this.lang,"dropdownPlaceholder"),analyticsHelper:c.a}))}},{key:"renderSuggestEdit",value:function(){this.selectedMetadata.get("metadataType")&&this.showChildView("suggestEdit",new G({model:this.viewModel,channelName:this.channelName,ratings:this.ratingCollection,currentRating:this.viewModel.get("ratingSuggestion")?new b.a(this.ratingCollection.findWhere({name:this.viewModel.get("ratingSuggestion")})):null,metadataType:this.selectedMetadata.get("metadataType"),metadataValue:this.selectedMetadata.get("metadataValue"),ratingValidationMessage:this.getRatingValidationMessage()}))}},{key:"onBeforeRender",value:function(){this.dataFetched()||(this.model=this.videoDataService.getVideo(this.options.videoId),this.ratingCollection=this.ratingsDataService.getAllRatings()),this.checkPreselection()}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:u.r.getSpinner({size:u.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}}])&&Z(t.prototype,n),i&&Z(t,i),Object.defineProperty(t,"prototype",{writable:!1}),p}(i.a.View)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[38],{1043:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),o=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(c,e);var t,n,r,i=u(c);function c(){return l(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&a(t.prototype,n),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Model)},1051:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(48),i=n(169),l=n(3),a="libraryEditor.utils",s={name:[{required:!0,msg:function(){return l.a.getPhrase(a,"folderNameRequired")}},{maxLength:255,msg:function(){return l.a.getPhrase(a,"folderNameExceeds")}}]},u=function(e,t){return{parentId:function(n){return n?o.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?l.a.getPhrase(a,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":l.a.getPhrase(a,"selectParentFolder")}}},c=function(e){var t=e.validateName,n=e.validateParent,o=e.folder,i=e.collection;return t&&n?r.extend({},s,u(o,i)):t?s:n?u(o,i):void 0}},1062:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(6),o=n(2),i=n(3),l=n(1101),a=n(12),s=n(1064),u=n.n(s),c=n(1065),f=n.n(c);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function p(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,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){if(t&&("object"===d(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(c,e);var t,n,o,s=y(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,!0))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return u.a}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".custom-select"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=a.f.getSelected(this.options.folderTreeKey,this.collection),o=r?r.get("name"):i.a.getPhrase(this.lang,"button");this.getUI("button").text(o)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.a({styles:f.a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:f.a.list,extraClasses:f.a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:f.a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&p(t.prototype,n),o&&p(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a.Component)},1064:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<button\r\n class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+a(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n>"+a(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'</button>\r\n<div class="dropdown-menu '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})},1065:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1114:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(2),o=n(305),i=n(12),l=n(1062),a=n(1051),s=n(1115),u=n.n(s);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(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,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(c,e);var t,n,r,s=p(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),s.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"FolderDetailsComponent"}},{key:"template",get:function(){return u.a}},{key:"lang",get:function(){return"libraryEditor.folderDetails"}},{key:"folderTreeKey",get:function(){return this.options.folderTreeKey||"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{parentFolder:".parent-folder-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:o.a,modelValidation:Object(a.a)({validateName:this.options.editName,validateParent:this.options.editParent,folder:this.options.model,collection:this.options.collection})},{behaviorClass:o.f}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"onFolderSelected",value:function(e,t){e&&(i.f.setSelected(this.folderTreeKey,e,this.collection,t),t||this.model.set("parentId",e.get("id"),{validate:!0}))}},{key:"renderSubFolders",value:function(){this.options.editParent&&this.showChildView("parentFolder",new l.a({collection:this.collection,channelName:this.options.channelName,folderTreeKey:this.folderTreeKey,disabledIds:this.options.disabledParentFolderIds}))}},{key:"viewOptions",value:function(){return{editName:this.options.editName,editParent:this.options.editParent}}},{key:"onRender",value:function(){this.renderSubFolders()}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Component)},1115:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return' <div class="form-group">\r\n <label for="name" class="control-label">'+a((n.lang||t&&t.lang||l).call(i,"name",{name:"lang",hash:{},data:o}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+a((n.lang||t&&t.lang||l).call(i,"namePlaceholder",{name:"lang",hash:{},data:o}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;return' <div class="form-group pt-2">\r\n <label for="parentId" class="control-label">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"parent",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="parent-folder-region"></div>\r\n </div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return"<form>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editName:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editParent:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"</form>"},useData:!0})},1241:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){return'<div class="folder-details-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1431:function(e,t,n){"use strict";n.r(t),n.d(t,"MoveFolderView",(function(){return E}));var r=n(1),o=n(6),i=n(2),l=n(30),a=n(5),s=n(42),u=n(0),c=n(305),f=n(84),d=n(1043),p=n(87),h=n(12),y=n(265),b=n(3),m=n(1114),v=n(1241),g=n.n(v);function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function P(e){return function(e){if(Array.isArray(e))return k(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function O(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,r.key,r)}}function I(e,t){return(I=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}function j(e,t){if(t&&("object"===w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var E=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&I(e,t)}(k,e);var t,n,v,w=S(k);function k(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,k),w.call(this,e)}return t=k,(n=[{key:"initialize",value:function(){this.bindListeners(),this.libraryDataService=a.a.getInstance(u.g.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(u.e.LIBRARY,"libraries:sync",this.render),this.listenTo(u.e.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render)}},{key:"name",get:function(){return"MoveFolderView"}},{key:"title",get:function(){return b.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.moveFolder"}},{key:"template",get:function(){return g.a}},{key:"channelName",get:function(){return h.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.e,title:b.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new d.a,channelName:this.channelName,buttonText:b.a.getPhrase(this.lang,"move"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{folderDetails:".folder-details-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(o.Radio.channel(this.channelName).trigger(y.b.ShowSpinner),this.saveFolder(),this.logAction())}},{key:"logAction",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId,r={id:this.options.folderId,isSubfolder:n.toString()!==this.library.get("id").toString(),oldParentId:t,newParentId:n};s.a.logUserAction(r,this.options.analyticsOptions)}},{key:"saveFolder",value:function(){var e=this,t=this.getParentIds(),n=t.oldParentId,r=t.newParentId;n!==r?this.libraryDataService.moveFolder(this.viewModel.get("id"),r,n,(function(){i.a.AppLinkHelper.trigger({application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.FOLDER,args:[e.viewModel.get("id")]}),e.triggerMethod("hide")})):i.a.AppLinkHelper.trigger({application:u.b.LIBRARY_EDITOR,action:u.a.LibraryEditor.FOLDER,args:[this.viewModel.get("id")]})}},{key:"getParentIds",value:function(){return{oldParentId:h.f.getParent(this.options.folderId,this.collection).get("id"),newParentId:this.viewModel.get("parentId")}}},{key:"setUpCollection",value:function(e){this.collection||(this.library=h.f.getLibrary(this.options.folderId,e),this.collection=new f.a([this.library]))}},{key:"setUpModel",value:function(e){this.model||(this.model=e,this.setUpViewModel())}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e="folder:details:".concat(this.options.folderId);this.viewModel=l.a.get(e,this.model.toJSON(),{ctor:p.a});var t=h.f.getParent(this.options.folderId,this.collection);this.viewModel.set("parentId",t?t.get("id"):null),this.listenTo(this.viewModel,"change:parentId",this.onParentChange)}}},{key:"onParentChange",value:function(){var e=this.getParentIds(),t=e.oldParentId,n=e.newParentId;this.spinnerModel.set(y.c.Disabled,t===n)}},{key:"getDisabledParentFolderIds",value:function(){var e=[this.model.get("id").toString()];return this.viewModel.get("parentId")&&e.push(this.viewModel.get("parentId").toString()),this.model.children?[].concat(e,P(h.f.flatten(this.model.children).map((function(e){return e.id.toString()})))):e}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new m.a({model:this.viewModel,collection:this.collection,library:this.library,channelName:this.channelName,editName:!1,editParent:!0,disabledParentFolderIds:this.getDisabledParentFolderIds()});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){this.libraryDataService.getLibraries(r.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,r.bind(this.setUpModel,this))}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:h.r.getSpinner({size:h.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}])&&O(t.prototype,n),v&&O(t,v),Object.defineProperty(t,"prototype",{writable:!1}),k}(i.a.View)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[39],{1043:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(2),o=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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,r.key,r)}}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var p=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(c,e);var t,n,r,i=s(c);function c(){return l(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&a(t.prototype,n),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Model)},1051:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(1),o=n(48),i=n(169),l=n(3),a="libraryEditor.utils",u={name:[{required:!0,msg:function(){return l.a.getPhrase(a,"folderNameRequired")}},{maxLength:255,msg:function(){return l.a.getPhrase(a,"folderNameExceeds")}}]},s=function(e,t){return{parentId:function(n){return n?o.a.calculateDestinationFolderDepth(e,n,t)>i.a.MAX_FOLDER_DEPTH?l.a.getPhrase(a,"maxFolderDepth",{maxDepth:i.a.MAX_FOLDER_DEPTH}):"":l.a.getPhrase(a,"selectParentFolder")}}},c=function(e){var t=e.validateName,n=e.validateParent,o=e.folder,i=e.collection;return t&&n?r.extend({},u,s(o,i)):t?u:n?s(o,i):void 0}},1062:function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(6),o=n(2),i=n(3),l=n(1101),a=n(12),u=n(1064),s=n.n(u),c=n(1065),f=n.n(c);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})(e)}function d(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(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)}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&h(e,t)}(c,e);var t,n,o,u=y(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),u.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.listenTo(this.options.channelName,"folder:selected new:folder:selected",this.setButtonText),this.listenTo(this.options.channelName,"re:render:selector",this.renderSelector),this.disabledIds=this.options.disabledIds&&this.options.disabledIds.reduce((function(e,t){return Object.assign(Object.assign({},e),function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},t,!0))}),{})}},{key:"name",get:function(){return"TreeDropdownComponent"}},{key:"template",get:function(){return s.a}},{key:"className",get:function(){return"position-relative"}},{key:"lang",get:function(){return"libraryEditor.treeDropdown"}},{key:"regions",value:function(){return{selector:{el:".selector-region",replaceElement:!1}}}},{key:"events",value:function(){return{"click .create-new":"onClickCreateNew"}}},{key:"defaults",get:function(){return{disabledIds:[]}}},{key:"elements",get:function(){return{button:".custom-select"}}},{key:"onClickCreateNew",value:function(e){e.preventDefault(),r.Radio.channel(this.options.channelName).trigger("create:folder:clicked")}},{key:"setButtonText",value:function(e,t){if(e&&!t){var n=e.get("name");this.getUI("button").text(n)}else{var r=a.f.getSelected(this.options.folderTreeKey,this.collection),o=r?r.get("name"):i.a.getPhrase(this.lang,"button");this.getUI("button").text(o)}}},{key:"renderSelector",value:function(){this.showChildView("selector",new l.a({styles:f.a,collection:this.collection,channelName:this.options.channelName,childrenProperty:"children",folderTreeId:this.options.folderTreeKey,extraClass:f.a.list,extraClasses:f.a.list,isSelector:!0,disabledIds:this.disabledIds||{}}))}},{key:"viewOptions",value:function(){return{styles:f.a,name:this.options.name||this.options.channelName,buttonText:this.buttonText,canCreateNew:this.options.canCreateNew}}},{key:"onRender",value:function(){this.setButtonText(),this.renderSelector()}}])&&d(t.prototype,n),o&&d(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a.Component)},1064:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.escapeExpression;return' <button class="create-new btn font-weight-bold rounded-0 w-100 text-left '+l(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.customItem:i,t))+'">'+l((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"createNew",{name:"lang",hash:{},data:o}))+"</button>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<button\r\n class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selectBtn:i,t))+' custom-select form-control"\r\n data-toggle="dropdown"\r\n aria-haspopup="true"\r\n aria-expanded="false"\r\n name='+a(l(null!=(i=null!=t?t.options:t)?i.name:i,t))+"\r\n>"+a(l(null!=(i=null!=t?t.options:t)?i.buttonText:i,t))+'</button>\r\n<div class="dropdown-menu '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selector:i,t))+'">\r\n <div class="selector-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateNew:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'</div>\r\n<div class="form-feedback"></div>'},useData:!0})},1065:function(e,t,n){e.exports={selectBtn:"_2TTgs",list:"_3wN7o",selector:"_3Xf1P",customItem:"_199PI"}},1114:function(e,t,n){"use strict";n.d(t,"a",(function(){return b}));var r=n(2),o=n(305),i=n(12),l=n(1062),a=n(1051),u=n(1115),s=n.n(u);function c(e){return(c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(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,r.key,r)}}function p(e,t){return(p=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=y(e);if(t){var o=y(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return h(this,n)}}function h(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function y(e){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&p(e,t)}(c,e);var t,n,r,u=d(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),u.call(this,e)}return t=c,(n=[{key:"initialize",value:function(){this.bindListeners()}},{key:"bindListeners",value:function(){this.listenTo(this.options.channelName,"folder:selected",this.onFolderSelected)}},{key:"name",get:function(){return"FolderDetailsComponent"}},{key:"template",get:function(){return s.a}},{key:"lang",get:function(){return"libraryEditor.folderDetails"}},{key:"folderTreeKey",get:function(){return this.options.folderTreeKey||"folderselect:".concat(this.cid)}},{key:"regions",value:function(){return{parentFolder:".parent-folder-region"}}},{key:"behaviors",get:function(){return[{behaviorClass:o.a,modelValidation:Object(a.a)({validateName:this.options.editName,validateParent:this.options.editParent,folder:this.options.model,collection:this.options.collection})},{behaviorClass:o.f}]}},{key:"bindings",get:function(){return{"[name=name]":{observe:"name",setOptions:{validate:!0}}}}},{key:"onFolderSelected",value:function(e,t){e&&(i.f.setSelected(this.folderTreeKey,e,this.collection,t),t||this.model.set("parentId",e.get("id"),{validate:!0}))}},{key:"renderSubFolders",value:function(){this.options.editParent&&this.showChildView("parentFolder",new l.a({collection:this.collection,channelName:this.options.channelName,folderTreeKey:this.folderTreeKey,disabledIds:this.options.disabledParentFolderIds}))}},{key:"viewOptions",value:function(){return{editName:this.options.editName,editParent:this.options.editParent}}},{key:"onRender",value:function(){this.renderSubFolders()}}])&&f(t.prototype,n),r&&f(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Component)},1115:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,a=e.escapeExpression;return' <div class="form-group">\r\n <label for="name" class="control-label">'+a((n.lang||t&&t.lang||l).call(i,"name",{name:"lang",hash:{},data:o}))+'</label>\r\n <input name="name" id="name" type="text" class="form-control" placeholder="'+a((n.lang||t&&t.lang||l).call(i,"namePlaceholder",{name:"lang",hash:{},data:o}))+'" autocomplete="off" autofocus/>\r\n <div class="form-feedback"></div>\r\n </div>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;return' <div class="form-group pt-2">\r\n <label for="parentId" class="control-label">'+e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"parent",{name:"lang",hash:{},data:o}))+'</label>\r\n <div class="parent-folder-region"></div>\r\n </div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=null!=t?t:e.nullContext||{};return"<form>\r\n"+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editName:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+(null!=(i=n.if.call(l,null!=(i=null!=t?t.options:t)?i.editParent:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+"</form>"},useData:!0})},1240:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},3:function(e,t,n,r,o){return'<div class="folder-details-region"></div>\r\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.unless.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"unless",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1430:function(e,t,n){"use strict";n.r(t),n.d(t,"RenameFolderView",(function(){return j}));var r=n(1),o=n(6),i=n(30),l=n(5),a=n(2),u=n(42),s=n(0),c=n(305),f=n(1043),p=n(87),d=n(265),h=n(12),y=n(3),b=n(1114),m=n(1240),v=n.n(m);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})(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,r.key,r)}}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return P(this,n)}}function P(e,t){if(t&&("object"===g(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&k(e,t)}(g,e);var t,n,a,m=O(g);function g(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,g),m.call(this,e)}return t=g,(n=[{key:"initialize",value:function(){this.bindListeners(),this.libraryDataService=l.a.getInstance(s.g.Library,this)}},{key:"bindListeners",value:function(){this.listenTo(s.e.LIBRARY,"folder:".concat(this.options.folderId,":sync"),this.render),this.listenTo(s.e.LIBRARY,"libraries:sync",this.render)}},{key:"name",get:function(){return"RenameFolderView"}},{key:"title",get:function(){return y.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.renameFolder"}},{key:"template",get:function(){return v.a}},{key:"channelName",get:function(){return h.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:c.e,title:y.a.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new f.a,channelName:this.channelName,buttonText:y.a.getPhrase(this.lang,"save"),onClick:function(t){return e.onSubmit(t)}}}]}},{key:"regions",value:function(){return{folderDetails:".folder-details-region"}}},{key:"events",value:function(){return{submit:"onSubmit"}}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.viewModel.validate(),!1!==this.viewModel.isValid()&&(o.Radio.channel(this.channelName).trigger(d.b.ShowSpinner),this.saveFolder(),this.logAction())}},{key:"logAction",value:function(){var e={id:this.options.folderId,name:this.viewModel.get("name")};u.a.logUserAction(e,this.options.analyticsOptions)}},{key:"saveFolder",value:function(){var e=this;this.libraryDataService.updateFolder(this.viewModel,(function(){e.triggerMethod("hide")}))}},{key:"setUpCollection",value:function(e){this.collection||(this.library=h.f.getLibrary(this.options.folderId,e),this.collection=this.library.children)}},{key:"setUpModel",value:function(e){this.model||(this.model=e,this.setUpViewModel())}},{key:"setUpViewModel",value:function(){if(!this.viewModel){var e="folder:details:".concat(this.options.folderId);this.viewModel=i.a.get(e,this.model.toJSON(),{ctor:p.a})}}},{key:"renderFolderDetails",value:function(){if(this.model&&this.collection){var e=new b.a({model:this.viewModel,channelName:this.channelName,editName:!0,editParent:!1});this.showChildView("folderDetails",e)}}},{key:"onBeforeRender",value:function(){this.libraryDataService.getLibraries(r.bind(this.setUpCollection,this)),this.libraryDataService.getFolderFromLibraries(this.options.folderId,r.bind(this.setUpModel,this)),this.model&&this.collection&&this.spinnerModel.set(d.c.Disabled,!1)}},{key:"viewOptions",value:function(){return{dataFetched:!!this.model&&!!this.collection,spinnerEl:h.r.getSpinner({size:h.s.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.renderFolderDetails()}}])&&w(t.prototype,n),a&&w(t,a),Object.defineProperty(t,"prototype",{writable:!1}),g}(a.a.View)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[4],{1311:function(e,n,t){var r=t(10);e.exports=(r.default||r).template({1:function(e,n,t,r,a){e.propertyIsEnumerable;var i=null!=n?n:e.nullContext||{},o=e.hooks.helperMissing,l=e.escapeExpression;return"<p>"+l((t.lang||n&&n.lang||o).call(i,"infoHeading",{name:"lang",hash:{},data:a}))+"</p>\r\n<p>"+l((t.lang||n&&n.lang||o).call(i,"meaningSubheading",{name:"lang",hash:{},data:a}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning1",{name:"lang",hash:{},data:a}))+"</li>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning2",{name:"lang",hash:{},data:a}))+"</li>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"meaning3",{name:"lang",hash:{},data:a}))+"</li>\r\n</ul>\r\n"},3:function(e,n,t,r,a){e.propertyIsEnumerable;var i=null!=n?n:e.nullContext||{},o=e.hooks.helperMissing,l=e.escapeExpression;return"<p>"+l((t.lang||n&&n.lang||o).call(i,"disclaimer",{name:"lang",hash:{},data:a}))+"</p>\r\n<p>"+l((t.lang||n&&n.lang||o).call(i,"featureSubheading",{name:"lang",hash:{},data:a}))+"</p>\r\n<ul>\r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"feature1",{name:"lang",hash:{},data:a}))+"</li> \r\n <li>"+l((t.lang||n&&n.lang||o).call(i,"feature2",{name:"lang",hash:{},data:a}))+"</li>\r\n</ul>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,a){var i;e.propertyIsEnumerable;return null!=(i=t.if.call(null!=n?n:e.nullContext||{},null!=(i=null!=n?n.options:n)?i.noPublisher:i,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a}))?i:""},useData:!0})},1444:function(e,n,t){"use strict";t.r(n),t.d(n,"PublishLibraryView",(function(){return _}));var r=t(6),a=t(5),i=t(2),o=t(305),l=t(0),u=t(265),c=t(12),s=t(3),f=t(146),h=t(324),p=t(326),g=t(58),b=t(1311),y=t.n(b);function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function m(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function v(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function w(e,n){return(w=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function k(e){var n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,r=P(e);if(n){var a=P(this).constructor;t=Reflect.construct(r,arguments,a)}else t=r.apply(this,arguments);return S(this,t)}}function S(e,n){if(n&&("object"===d(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function P(e){return(P=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){!function(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(n&&n.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),n&&w(e,n)}(S,e);var n,t,b,d=k(S);function S(){return m(this,S),d.apply(this,arguments)}return n=S,(t=[{key:"initialize",value:function(){this.libraryDataService=a.a.getInstance(l.g.Library,this),this.migrationVideoDataService=a.a.getInstance(l.g.MigrationVideo,this),this.videoDataService=a.a.getInstance(l.g.Video,this)}},{key:"name",get:function(){return"PublishLibraryView"}},{key:"title",get:function(){return s.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.publishLibrary"}},{key:"template",get:function(){return y.a}},{key:"channelName",get:function(){return c.k.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{title:s.a.getPhrase(this.lang,"heading"),behaviorClass:o.e,spinnerButtonOptions:{channelName:this.channelName,buttonText:s.a.getPhrase(this.lang,"continue"),onClick:function(){return e.onClickContinue()}}}]}},{key:"onClickContinue",value:function(){var e=this;r.Radio.channel(this.channelName).trigger(u.b.ShowSpinner);var n=0,t=function(){++n===e.libraries.length&&(e.triggerMethod("hide"),e.videoDataService.clearVideoCache(),r.Radio.channel(h.a.LIBRARY_STATUS).trigger("status:changed"))};g.a.noPublisher(this.customerMetadata)?this.libraries.each((function(n){e.libraryDataService.publishLibrary(n.get("id"),t)})):this.migrationVideoDataService.publishLibraries((function(){i.a.AppLinkHelper.trigger({application:l.b.MIGRATION_WIZARD,action:l.a.MigrationWizard.PUBLISH_LIBRARY_PROGRESS})}))}},{key:"requiredResources",get:function(){return{libraries:f.b.libraries,customerMetadata:p.b.customerMetaData}}},{key:"viewOptions",value:function(){return{noPublisher:g.a.noPublisher(this.customerMetadata)}}}])&&v(n.prototype,t),b&&v(n,b),Object.defineProperty(n,"prototype",{writable:!1}),S}(i.a.View)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[40],{1070:function(t,e,r){"use strict";r.d(e,"a",(function(){return y}));var n=r(2),o=r(37),i=r(3);function a(t){return(a="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})(t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p="migrationWizard.smartMigrationApiCall",y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(s,t);var e,r,o,a=l(s);function s(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),(e=a.call(this,i.a.getPhrase(p,"title"))).supportUrl=t,e}return e=s,(r=[{key:"name",get:function(){return"SmartMigrationApiCallError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase(p,"heading"),text:"<p>".concat(i.a.getPhrase(p,"errorNotice")," \n <strong>").concat(i.a.getPhrase(p,"reloadPage"),"</strong></p>\n <p>").concat(i.a.getPhrase(p,"helpGuide",{supportUrl:this.supportUrl,linkClasses:"text-info"}),"</p>"),buttons:[{text:i.a.getPhrase(p,"reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&c(e.prototype,r),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.a)},1107:function(t,e,r){"use strict";r(311);var n=r(2),o=r(37),i=r(3);function a(t){return(a="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})(t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function u(t,e){return(u=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=f(t);if(e){var o=f(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return s(this,r)}}function s(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var p="migrationWizard.backupProgress",y=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&u(t,e)}(s,t);var e,r,o,a=l(s);function s(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,s),a.call(this,i.a.getPhrase(p,"title"))}return e=s,(r=[{key:"name",get:function(){return"BackupProgressError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase(p,"heading"),text:i.a.getPhrase(p,"body"),buttons:[{text:i.a.getPhrase(p,"reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&c(e.prototype,r),o&&c(e,o),Object.defineProperty(e,"prototype",{writable:!1}),s}(o.a);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})(t)}function g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function h(t,e){return(h=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function d(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=v(t);if(e){var o=v(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return m(this,r)}}function m(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)}function v(t){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var w=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(c,t);var e,r,o,a=d(c);function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationProgressError","title"))}return e=c,(r=[{key:"name",get:function(){return"MigrationProgressError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase("migrationWizard.migrationProgressError","heading"),text:i.a.getPhrase("migrationWizard.migrationProgressError","body"),buttons:[{text:i.a.getPhrase("migrationWizard.migrationProgressError","reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&g(e.prototype,r),o&&g(e,o),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.a);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})(t)}function O(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function _(t,e){return(_=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function k(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=R(t);if(e){var o=R(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return j(this,r)}}function j(t,e){if(e&&("object"===P(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function R(t){return(R=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var E=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(c,t);var e,r,o,a=k(c);function c(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,i.a.getPhrase("migrationWizard.migrationFinalisation","title"))}return e=c,(r=[{key:"name",get:function(){return"MigrationFinalisationError"}},{key:"dialogOptions",get:function(){return{title:i.a.getPhrase("migrationWizard.migrationFinalisation","heading"),text:i.a.getPhrase("migrationWizard.migrationFinalisation","body"),buttons:[{text:i.a.getPhrase("migrationWizard.migrationFinalisation","reload"),className:"btn btn-primary",success:!0}]}}},{key:"onDone",value:function(){n.a.LocationUtils.Reload()}}])&&O(e.prototype,r),o&&O(e,o),Object.defineProperty(e,"prototype",{writable:!1}),c}(o.a);r(1070);r.d(e,"a",(function(){return y})),r.d(e,"c",(function(){return w})),r.d(e,"b",(function(){return E})),r.d(e,"a",(function(){return y}))},1129:function(t,e,r){"use strict";r.d(e,"a",(function(){return b}));var n=r(2),o=r(1190),i=r.n(o),a=r(1191),c=r.n(a);function u(t){return(u="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})(t)}function l(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=y(t);if(e){var o=y(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return p(this,r)}}function p(t,e){if(e&&("object"===u(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function y(t){return(y=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var b=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(a,t);var e,r,n,o=f(a);function a(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,a),o.call(this,t)}return e=a,(r=[{key:"initialize",value:function(){this.listenTo(this.model,"change:percentage",this.update)}},{key:"name",get:function(){return"ProgressCircleComponent"}},{key:"template",get:function(){return c.a}},{key:"lang",get:function(){return"migrationWizard.progressCircle"}},{key:"elements",get:function(){return{circle:".progress-circle",text:".progress-circle-text"}}},{key:"viewOptions",value:function(){return{styles:i.a,text:this.options.text,class:this.options.class,percentage:this.options.percentage}}},{key:"onRender",value:function(){this.update()}},{key:"update",value:function(){var t=this.model.get("percentage")||0,e=this.getUI("circle").get(0),r=2*e.r.baseVal.value*Math.PI;e.style.strokeDasharray="".concat(r," ").concat(r),e.style.strokeDashoffset=r;var n=r-t/100*r;e.style.strokeDashoffset=n;var o=this.getUI("text");o&&o.text("".concat(t,"%"))}}])&&l(e.prototype,r),n&&l(e,n),Object.defineProperty(e,"prototype",{writable:!1}),a}(n.a.Component)},1190:function(t,e,r){t.exports={circle:"_3iX0l",extraText:"_1nYnx",progressCircleContainer:"_2l1Al",progressCircle:"_1RbA5"}},1191:function(t,e,r){var n=r(10);t.exports=(n.default||n).template({1:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression;return' <span class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.extraText:i,e))+'">'+c(a(null!=(i=null!=e?e.options:e)?i.text:i,e))+"</span>\r\n"},compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=t.lambda,c=t.escapeExpression,u=null!=e?e:t.nullContext||{};return'<div class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.circle:i,e))+" "+c(a(null!=(i=null!=e?e.options:e)?i.class:i,e))+'">\r\n <span>\r\n <span class="progress-circle-text">'+c((r.lang||e&&e.lang||t.hooks.helperMissing).call(u,"progress",{name:"lang",hash:{percentage:null!=(i=null!=e?e.options:e)?i.percentage:i},data:o}))+"</span>\r\n"+(null!=(i=r.if.call(u,null!=(i=null!=e?e.options:e)?i.text:i,{name:"if",hash:{},fn:t.program(1,o,0),inverse:t.noop,data:o}))?i:"")+' </span>\r\n\r\n <svg class="'+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.progressCircleContainer:i,e))+'">\r\n <circle class="progress-circle '+c(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.progressCircle:i,e))+'" transform=\'rotate(270 160 0)\' stroke-width="28" fill="transparent" r="150">\r\n </svg>\r\n</div>'},useData:!0})},1374:function(t,e,r){t.exports={backupProgress:"_15jUh",info:"_1NjZL",progress:"fp9FZ",migrationBackupContainer:"_28z_5"}},1375:function(t,e,r){var n=r(10);t.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=null!=e?e:t.nullContext||{},c=t.hooks.helperMissing,u=t.escapeExpression;return'<h4 class="pb-4">'+u((r.lang||e&&e.lang||c).call(a,"heading",{name:"lang",hash:{},data:o}))+'</h4>\r\n<div class="progress-circle-region"></div>\r\n<p class="'+u(t.lambda(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.info:i,e))+' pt-4">\r\n '+(null!=(i=(r.lang||e&&e.lang||c).call(a,"info",{name:"lang",hash:{},data:o}))?i:"")+"\r\n</p>"},useData:!0})},1461:function(t,e,r){"use strict";r.r(e),r.d(e,"PublisherBackupProgressView",(function(){return P}));var n=r(2),o=r(5),i=r(30),a=r(1374),c=r.n(a),u=r(1375),l=r.n(u),s=r(1107),f=r(0),p=r(3),y=r(1129);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})(t)}function g(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e){return(d=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function m(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=w(t);if(e){var o=w(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return v(this,r)}}function v(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)}function w(t){return(w=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var P=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(b,t);var e,r,a,u=m(b);function b(){return g(this,b),u.apply(this,arguments)}return e=b,(r=[{key:"initialize",value:function(){this.viewModel=i.a.get("backup:progress",{percentage:0}),this.migrationVideoDataService=o.a.getInstance(f.g.MigrationVideo,this),this.bindMigrationDataListeners()}},{key:"name",get:function(){return"PublisherBackupProgressView"}},{key:"title",get:function(){return p.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.publisherBackupProgress"}},{key:"className",get:function(){return"container text-center p-5 bg-white ".concat(c.a.migrationBackupContainer," ").concat(c.a.backupProgress)}},{key:"template",get:function(){return l.a}},{key:"regions",value:function(){return{progressCircle:{replaceElement:!0,el:".progress-circle-region"}}}},{key:"bindMigrationDataListeners",value:function(){this.listenTo(f.e.MIGRATION,"".concat(f.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(f.e.MIGRATION,"".concat(f.f.CUSTOMER_VIDEO,":count:error"),this.onError)}},{key:"onError",value:function(){n.a.ErrorHelper.throw(new s.a)}},{key:"poll",value:function(){var t=this;this.migrationVideoDataService.getCustomerVideoCount((function(e){t.isDestroyed()||(t.videoCount=e,t.setPercentage(),t.viewModel.get("percentage")>=100?t.migrationVideoDataService.clearCacheAndGetCustomerMetadata((function(){n.a.AppLinkHelper.trigger({application:f.b.MIGRATION_WIZARD,action:f.a.MigrationWizard.BACKUP_COMPLETE})})):(setTimeout((function(){return t.poll()}),5e3),t.render()))}))}},{key:"setPercentage",value:function(){if(this.videoCount){var t=100*this.videoCount.get("progressPercentage");t>100&&(t=100),this.viewModel.set({percentage:Math.round(t)})}}},{key:"renderProgressCircle",value:function(){this.showChildView("progressCircle",new y.a({model:this.viewModel,text:p.a.getPhrase(this.lang,"hasBeenBackedUp"),class:c.a.progress}))}},{key:"onBeforeRender",value:function(){return this.customerMetadata=this.migrationVideoDataService.getCustomerMetadata(),!!this.customerMetadata}},{key:"viewOptions",value:function(){return{styles:c.a,timeRemaining:"30 minutes"}}},{key:"onRender",value:function(){this.pollingStarted||(this.poll(),this.pollingStarted=!0),this.renderProgressCircle()}}])&&h(e.prototype,r),a&&h(e,a),Object.defineProperty(e,"prototype",{writable:!1}),b}(n.a.View)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[41],{1320:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<div class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibraryContainer:i,t))+'">\r\n <button class="applink-new-library btn btn-outline-secondary '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addLibrary:i,t))+'">\r\n <span class="'+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.plus:i,t))+' d-inline-block position-absolute">\r\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.plusSvg:i,t))?i:"")+"\r\n </span>\r\n "+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"newLibrary",{name:"lang",hash:{},data:o}))+"\r\n </button>\r\n</div>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return'<div class="logo-region"></div>\r\n<div class="folder-tree-region"></div>\r\n'+(null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.canCreateLibraries:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")},useData:!0})},1321:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.disabled:i,t))},3:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return e.escapeExpression(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.selected:i,t))},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda;return' <span class="'+e.escapeExpression(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.caret:i,t))+' d-inline-block position-absolute">\r\n '+(null!=(i=l(null!=(i=null!=t?t.options:t)?i.caretSvg:i,t))?i:"")+"\r\n </span>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l,a=e.lambda,s=e.escapeExpression,u=null!=t?t:e.nullContext||{};return'<div class="position-relative border-bottom '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.library:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.disabled:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.noop,data:o}))?i:"")+'">\r\n <a class="position-relative library-event '+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.libraryAnchor:i,t))+" "+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.open:i,{name:"if",hash:{},fn:e.program(3,o,0),inverse:e.noop,data:o}))?i:"")+' ui-anchor no-hover-text-underline">\r\n'+(null!=(i=n.if.call(u,null!=(i=null!=t?t.options:t)?i.hasFolders:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+' <span class="'+s(a(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.text:i,t))+' ui-text">'+s("function"==typeof(l=null!=(l=n.name||(null!=t?t.name:t))?l:e.hooks.helperMissing)?l.call(u,{name:"name",hash:{},data:o}):l)+'</span>\r\n </a>\r\n <div class="actions-region"></div>\r\n</div>\r\n<div class="folders-region"></div>'},useData:!0})},1322:function(e,t,n){e.exports={addLibrary:"_1O42p",addLibraryContainer:"_1HX0v",plus:"_3aHT2"}},1323:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l,a=e.escapeExpression;return'<img src="'+a("function"==typeof(l=null!=(l=n.url||(null!=t?t.url:t))?l:e.hooks.helperMissing)?l.call(null!=t?t:e.nullContext||{},{name:"url",hash:{},data:o}):l)+'" class="'+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.image:i,t))+'"/>\r\n'},3:function(e,t,n,r,o){e.propertyIsEnumerable;var i,l=e.lambda,a=e.escapeExpression;return'<a class="d-inline-flex align-items-center no-decoration '+a(l(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.addCrest:i,t))+'" href="'+a(l(null!=(i=null!=t?t.options:t)?i.uploadLogoUrl:i,t))+'" target="_blank">\r\n '+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"crest",{name:"lang",hash:{},data:o}))+"\r\n</a>\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=t?t.url:t,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(3,o,0),data:o}))?i:""},useData:!0})},1324:function(e,t,n){e.exports={image:"Cz1y1",addCrest:"_2PAV_"}},1482:function(e,t,n){"use strict";n.r(t);var r=n(2),o=n(16),i=n(68),l=n(0),a=n(146),s=n(1320),u=n.n(s),c=n(5),f=n(1101),p=n(1122),y=n(1321),d=n.n(y),h=n(1199),b=n(1201),v=n.n(b),m=n(12),g=n(30),w=n(1102),k=n(4);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})(e)}function L(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function E(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,r.key,r)}}function R(e,t,n){return t&&E(e.prototype,t),n&&E(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function C(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}function _(e,t){return(_=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=S(e);if(t){var o=S(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return I(this,n)}}function I(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)}function S(e){return(S=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var D=function(e){C(n,e);var t=x(n);function n(e){return L(this,n),t.call(this,e)}return R(n,[{key:"initialize",value:function(){var e=this.options.forceOpen||this.options.libraryId&&this.model.get("id").toString()===this.options.libraryId.toString();this.viewModel=g.a.get("".concat("library:left:nav",":").concat(this.model.get("id"))),this.viewModel.set("open",e),this.viewModel.set("disabled",!1),this.listenTo(this.model,"change:name",this.render),this.options.hasMultipleLibraries&&this.listenTo(this,"open:sub:folders",this.onOpenSubFolders),this.videoDragDropService=c.a.getInstance(l.x.VideoDragDrop,this)}},{key:"name",get:function(){return"LeftNavLibraryComponent"}},{key:"template",get:function(){return d.a}},{key:"className",get:function(){return v.a.libraryContainer}},{key:"behaviors",get:function(){var e=[l.w.FOLDER_DRAG_DROP];return this.options.hasMultipleLibraries&&e.push(l.w.VIDEO_DRAG_DROP),[{behaviorClass:w.a,ui:"anchor",channelNames:e,analyticsOptions:{location:k.LocationContext.LeftNav}}]}},{key:"regions",value:function(){return{folders:{el:".folders-region",replaceElement:!0},actions:{el:".actions-region",replaceElement:!0}}}},{key:"appLinks",get:function(){return{".ui-anchor":{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.LIBRARY,args:[this.model.get("id")]}}}},{key:"events",value:function(){return{"click .library-event":"onClick"}}},{key:"elements",get:function(){return{anchor:".ui-anchor",text:".ui-text"}}},{key:"onClick",value:function(e){this.viewModel.get("open")&&(e.stopImmediatePropagation(),e.preventDefault(),this.viewModel.set("open",!this.viewModel.get("open")),this.render())}},{key:"onOpenSubFolders",value:function(){if(this.videoDragDropService.getDisabledLibraryIds().includes(this.model.get("id")))return this.viewModel.set("disabled",!0),void this.render();this.viewModel.set("open",!0),this.render()}},{key:"hasFolders",value:function(){return!!m.f.getFirstType(this.model.children,"category")}},{key:"analyticsOptions",get:function(){return{location:k.LocationContext.LeftNav}}},{key:"viewOptions",value:function(){return{styles:v.a,caretSvg:o.a.getSvg(o.b.Caret),open:this.viewModel.get("open"),hasFolders:this.hasFolders(),disabled:this.viewModel.get("disabled")}}},{key:"onRender",value:function(){this.showChildView("actions",new h.a({model:this.model,extraClasses:"rounded-circle mr-1 ".concat(v.a.actions),buttonClass:"text-muted",analyticsOptions:this.analyticsOptions})),this.model.children&&this.model.children.length&&this.viewModel.get("open")&&this.showChildView("folders",new f.a({appLink:{action:l.a.LibraryEditor.FOLDER,application:l.b.LIBRARY_EDITOR},linkArgs:function(e){return[e.get("id")]},collection:this.model.children,channelName:"".concat(this.cid),childrenProperty:"children",actions:p.a,folderTreeId:this.options.folderTreeId,analyticsOptions:this.analyticsOptions}))}}]),n}(r.a.Component),P=function(e){C(n,e);var t=x(n);function n(e){return L(this,n),t.call(this,e)}return R(n,[{key:"name",get:function(){return"LeftNavLibrariesComponent"}},{key:"childView",get:function(){return D}},{key:"childViewOptions",get:function(){return{channelName:this.options.channelName,libraryId:this.options.libraryId,folderTreeId:this.options.folderTreeId,forceOpen:this.options.forceOpen,hasMultipleLibraries:this.collection.length>1}}}]),n}(r.a.ComponentCollection),T=n(1322),j=n.n(T),N=n(14),M=n(144),A=n(201),B=n(9),U=n(95),V=n(57),F=n(42),Y=n(1323),G=n.n(Y),z=n(1324),H=n.n(z);function J(e){return(J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function q(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,r.key,r)}}function W(e,t){return(W=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function X(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q(e);if(t){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return K(this,n)}}function K(e,t){if(t&&("object"===J(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var Z=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&W(e,t)}(i,e);var t,n,r,o=X(i);function i(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,e)}return t=i,(n=[{key:"name",get:function(){return"CustomerLogoComponent"}},{key:"template",get:function(){return G.a}},{key:"lang",get:function(){return"libraryEditor.customerLogo"}},{key:"className",get:function(){return"text-center p-3 position-relative"}},{key:"events",value:function(){return e={},t="click .".concat(H.a.addCrest),n="onClickAddLogo",t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}},{key:"onClickAddLogo",value:function(){var e={location:k.LocationContext.LeftNav,actionType:k.UserAction.Create,entity:k.EntityType.Logo};F.a.logUserAction({},e)}},{key:"viewOptions",value:function(){return{styles:H.a,uploadLogoUrl:V.a.urlBuilder(V.a.safeUrlConcat(this.options.onlineUrl,l.t.UPLOAD_LOGO),{loginPrompt:!1})}}}])&&q(t.prototype,n),r&&q(t,r),Object.defineProperty(t,"prototype",{writable:!1}),i}(r.a.Component);function $(e){return($="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ee(e,t){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,r.key,r)}}function te(e,t){return(te=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=oe(e);if(t){var o=oe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return re(this,n)}}function re(e,t){if(t&&("object"===$(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function oe(e){return(oe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"LeftNavigationView",(function(){return ie}));var ie=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&te(e,t)}(f,e);var t,n,r,s=ne(f);function f(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),s.call(this,e)}return t=f,(n=[{key:"initialize",value:function(){this.bindListeners(),this.settingsDataService=c.a.getInstance(N.a.Settings,this)}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:library",this.onSelectLibrary),this.listenTo(l.e.LIBRARY,"cache:cleared",this.fetchData),this.listenTo(l.w.FOLDER_DRAG_DROP,"re:render:left:nav",this.render),this.listenTo(l.e.SETTINGS,"".concat(l.f.SETTINGS,":sync"),this.render)}},{key:"name",get:function(){return"LeftNavigationView"}},{key:"title",get:function(){return!1}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"lang",get:function(){return"libraryEditor.leftNavigation"}},{key:"className",get:function(){return"bg-white pb-3"}},{key:"template",get:function(){return u.a}},{key:"regions",value:function(){return{logo:{el:".logo-region",replaceElement:!1},folderTree:{el:".folder-tree-region",replaceElement:!1,partialLoading:B.h.LeftNav}}}},{key:"events",value:function(){return{"click .new-folder":"newFolder"}}},{key:"appLinks",get:function(){return{".applink-new-library":{application:l.b.LIBRARY_EDITOR,action:l.a.LibraryEditor.NEW_LIBRARY}}}},{key:"fetchData",value:function(){this.maxCustomLibraries=this.settingsDataService.getSetting(this.currentUser.get("customerId"),i.a.MaxCustomLibraries)}},{key:"onSelectLibrary",value:function(e){this.collection.each((function(t){g.a.get("".concat("library:left:nav",":").concat(t.id)).set("open",t.id.toString()===e)})),this.render()}},{key:"renderLogo",value:function(){this.showChildView("logo",new Z({model:this.currentUser.get("customerLogo"),customerId:this.currentUser.get("customerId"),onlineUrl:this.config.get("onlineUrl")}))}},{key:"renderLeftNav",value:function(){var e=new P({collection:this.collection,channelName:this.channelName,libraryId:this.options.libraryId,folderTreeId:U.a.LIBRARY_EDITOR,forceOpen:1===this.collection.length});this.showChildView("folderTree",e)}},{key:"requiredResources",get:function(){return{currentUser:M.b.currentUser,config:A.b.config,collection:a.b.libraries}}},{key:"onBeforeRender",value:function(){return this.fetchData(),!!this.maxCustomLibraries}},{key:"viewOptions",value:function(){if(this.collection)return{styles:j.a,plusSvg:o.a.getSvg(o.b.Plus),canCreateLibraries:!!this.maxCustomLibraries&&this.maxCustomLibraries.get("value")>this.collection.length}}},{key:"onRender",value:function(){this.renderLogo(),this.renderLeftNav()}}])&&ee(t.prototype,n),r&&ee(t,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(r.a.View)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[42],{1422:function(e,t,n){e.exports={smart:"_1dRs0",leftNav:"_3dpUO"}},1423:function(e,t,n){e.exports={item:"_13Gu_",text:"_2mbEb",folderTree:"_2NhVk",node:"_1dMK1",selected:"_1AACi"}},1424:function(e,t,n){var i=n(10);e.exports=(i.default||i).template({compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return'<div class="selected-banner-region"></div>\r\n<div class="search-region"></div>\r\n<div class="banner-region"></div>\r\n<div class="col-4 '+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.leftNav:o,t))+'">\r\n <div class="left-nav-region"></div>\r\n</div>\r\n<div class="col">\r\n <div class="header-region"></div>\r\n <div class="video-list-region"></div>\r\n</div>\r\n<div class="footer-region"></div>'},useData:!0})},1425:function(e,t,n){var i=n(10);e.exports=(i.default||i).template({1:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression;return' <a class="applink-goback '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.back:o,t))+'">\r\n <span class="align-middle d-inline-block '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.backSvgContainer:o,t))+'">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.backSvg:o,t))?o:"")+"</span>\r\n </a>\r\n"},3:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return" "+(null!=(o=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"resultsFor",{name:"lang",hash:{searchTerm:null!=(o=null!=t?t.options:t)?o.searchTerm:o,smartCount:null!=(o=null!=t?t.options:t)?o.results:o},data:r}))?o:"")+"\r\n"},5:function(e,t,n,i,r){var o;e.propertyIsEnumerable;return" "+e.escapeExpression(e.lambda(null!=(o=null!=t?t.options:t)?o.name:o,t))+"\r\n"},7:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=e.lambda,s=e.escapeExpression,l=null!=t?t:e.nullContext||{};return'<div class="col-4 text-right py-2 '+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.subheader:o,t))+'">\r\n <div class="cursor-pointer toggle-migrated h-100 d-flex align-items-center justify-content-end">\r\n <span class="'+s(a(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.svg:o,t))+' mr-1">'+(null!=(o=a(null!=(o=null!=t?t.options:t)?o.svg:o,t))?o:"")+"</span>\r\n <span>"+(null!=(o=n.if.call(l,null!=(o=null!=t?t.options:t)?o.hidden:o,{name:"if",hash:{},fn:e.program(8,r,0),inverse:e.program(10,r,0),data:r}))?o:"")+" "+s((n.lang||t&&t.lang||e.hooks.helperMissing).call(l,"migrated",{name:"lang",hash:{},data:r}))+"</span>\r\n </div>\r\n</div>\r\n"},8:function(e,t,n,i,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"show",{name:"lang",hash:{},data:r}))},10:function(e,t,n,i,r){e.propertyIsEnumerable;return e.escapeExpression((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"hide",{name:"lang",hash:{},data:r}))},compiler:[8,">= 4.3.0"],main:function(e,t,n,i,r){e.propertyIsEnumerable;var o,a=null!=t?t:e.nullContext||{};return'<div class="col-8">\r\n'+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.goBack:o,{name:"if",hash:{},fn:e.program(1,r,0),inverse:e.noop,data:r}))?o:"")+' <h4 class="'+e.escapeExpression(e.lambda(null!=(o=null!=(o=null!=t?t.options:t)?o.styles:o)?o.header:o,t))+' py-2">\r\n'+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.searchTerm:o,{name:"if",hash:{},fn:e.program(3,r,0),inverse:e.program(5,r,0),data:r}))?o:"")+" </h4>\r\n</div>\r\n\r\n"+(null!=(o=n.if.call(a,null!=(o=null!=t?t.options:t)?o.showMigrationToggle:o,{name:"if",hash:{},fn:e.program(7,r,0),inverse:e.noop,data:r}))?o:"")},useData:!0})},1484:function(e,t,n){"use strict";n.r(t);var i=n(2),r=n(3),o=n(51),a=n(93),s=n(1422),l=n.n(s),c=n(1423),u=n.n(c),d=n(1424),h=n.n(d),f=n(9),g=n(1101),p=n(1131),v=n(1),y=n(6),m=n(5),b=n(16),S=n(338),w=n(1425),k=n.n(w),M=n(53),I=n(120),T=n(0);function C(e){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function O(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function E(e,t){return(E=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=V(e);if(t){var r=V(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return A(this,n)}}function A(e,t){if(t&&("object"===C(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function V(e){return(V=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var _=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&E(e,t)}(o,e);var t,n,i,r=R(o);function o(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),r.call(this,e)}return t=o,(n=[{key:"initialize",value:function(){this.localOptionsService=m.a.getInstance(T.x.LocalOptions,this),this.migrationVideoDataService=m.a.getInstance(T.g.MigrationVideo,this);var e=this.localOptionsService.getOption(M.b.MigratedHidden);v.isUndefined(e)?(this.setMigrationHiddenOption(!1),this.migratedHidden=!1):this.migratedHidden=e}},{key:"name",get:function(){return"CurrentSectionHeaderView"}},{key:"title",get:function(){return!1}},{key:"lang",get:function(){return"migrationWizard.currentSectionHeader"}},{key:"className",get:function(){return"row px-2 ".concat(S.currentHeader)}},{key:"template",get:function(){return k.a}},{key:"elements",get:function(){return{toggleMigrated:".toggle-migrated"}}},{key:"events",value:function(){return{"click @ui.toggleMigrated":"toggleMigrated"}}},{key:"viewOptions",value:function(){return{styles:S,name:this.options.searchTerm||this.model&&this.model.get("name"),hidden:this.migratedHidden,svg:b.a.getSvg(this.migratedHidden?b.b.VisibleOn:b.b.VisibleOff),goBack:this.options.searchTerm,showMigrationToggle:!this.options.initialMigration,backSvg:b.a.getSvg("arrow-left",{prefix:"fas"}),searchTerm:this.options.searchTerm,results:10}}},{key:"appLinks",get:function(){return{".applink-goback":{application:I.a.MIGRATION_WIZARD,action:this.options.initialMigration?T.a.MigrationWizard.SMART:T.a.MigrationWizard.HOME}}}},{key:"onBeforeRender",value:function(){var e=this;return!(!this.model&&!this.options.searchTerm&&(this.migrationVideoDataService.getSelected((function(t){t&&(e.model=t,e.triggerToggle(),e.render())})),!this.model))}},{key:"toggleMigrated",value:function(){this.migratedHidden=!this.migratedHidden,this.setMigrationHiddenOption(this.migratedHidden),this.triggerToggle(),this.render()}},{key:"triggerToggle",value:function(){y.Radio.channel(I.b.MIGRATION).trigger(T.i.MigrationWizard.TOGGLE_MIGRATED,this.migratedHidden)}},{key:"setMigrationHiddenOption",value:function(e){this.localOptionsService.setOption(M.b.MigratedHidden,e)}}])&&O(t.prototype,n),i&&O(t,i),Object.defineProperty(t,"prototype",{writable:!1}),o}(i.a.View);function x(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return N(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}var P={getSelectedInFolder:function(e,t){var n,i=x(p.a.getSelectedVideosCollection(e).toArray());try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r.get("category")===t)return r.get("count")}}catch(e){i.e(e)}finally{i.f()}return 0},findFolder:function(e,t){var n;if(e)return e.forEach((function(e){if(e.get("categoryGuid")===t)n=e;else{var i=P.findFolder(e.get("children"),t);i&&(n=i)}})),n}},L=n(58),B=n(91),D=n(30),j=n(201),H=n(1121),G=n(12),W=n(95),F=n(200),z=n(144);function U(e){return(U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Z(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function q(e,t){return(q=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function J(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=K(e);if(t){var r=K(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return $(this,n)}}function $(e,t){if(t&&("object"===U(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function K(e){return(K=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"SmartMigrationView",(function(){return Y}));var Y=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&q(e,t)}(d,e);var t,n,s,c=J(d);function d(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),c.call(this,e)}return t=d,(n=[{key:"initialize",value:function(){this.viewModel=D.a.get(this.viewModelName,{bannerShown:!0},{ctor:B.e,storage:{type:a.c.LocalStorage,persistProps:["bannerShown"]}}),this.bindListeners(),this.initializeServices()}},{key:"name",get:function(){return"SmartMigrationView"}},{key:"title",get:function(){return r.a.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"migrationWizard.smartMigration"}},{key:"viewModelName",get:function(){return"".concat(this.name,":viewmodel")}},{key:"channelName",get:function(){return"".concat(this.name,":").concat(this.cid)}},{key:"template",get:function(){return h.a}},{key:"className",get:function(){return"row no-gutters w-100 ".concat(l.a.smart)}},{key:"regions",value:function(){return{selectedBanner:{replaceElement:!0,el:".selected-banner-region"},search:{replaceElement:!0,el:".search-region",partialLoading:f.h.PublisherArchiveSearchBar},banner:{replaceElement:!0,el:".banner-region"},leftNav:{replaceElement:!0,el:".left-nav-region",partialLoading:f.h.PublisherArchiveLeftNav},header:{replaceElement:!0,el:".header-region",partialLoading:f.h.PublisherArchiveSectionHeader},videoList:{replaceElement:!0,el:".video-list-region",partialLoading:f.h.PublisherArchiveVideoList},footer:{replaceElement:!0,el:".footer-region",partialLoading:f.h.PublisherArchiveStatusBar}}}},{key:"initializeServices",value:function(){this.folderCacheService=m.a.getInstance(T.x.FolderCache,this),this.selectedVideoService=m.a.getInstance(T.x.SelectedVideo,this),this.migrationVideoDataService=m.a.getInstance(T.g.MigrationVideo,this),this.alertService=m.a.getInstance(T.x.Alerts)}},{key:"bindListeners",value:function(){this.listenTo(T.e.MIGRATION,T.i.MigrationWizard.SELECTED_CHANGED,this.setSelectedVideos),this.listenTo(T.e.MIGRATION,"manual:review:video:count:sync",this.render),this.listenTo(T.e.MIGRATION,"".concat(T.f.CUSTOMER_VIDEO,":count:sync"),this.render),this.listenTo(T.e.MIGRATION,"".concat(T.f.CUSTOMER_METADATA,":sync"),this.render),this.listenTo(T.b.MIGRATION_WIZARD,T.i.MigrationWizard.CLOSE_BANNER,this.closeSelectionBanner),this.listenTo(this.channelName,"add:selected",this.addSelected),this.listenTo(this.channelName,"remove:selected",this.removeSelected),this.listenTo(this.viewModel,"change:selectedVideoCount",this.renderStatusBar)}},{key:"fetchVideos",value:function(){var e=this;!this.videos&&this.options.folderChord&&this.migrationVideoDataService.getCustomerVideos(this.options.folderChord,(function(t){e.videos||(e.videos=p.a.toggleMigrated(t,!0),e.setSelectedVideos(),e.isRendering||e.render())}))}},{key:"fetchFolders",value:function(){var e=this;this.folders||this.migrationVideoDataService.getCustomerFolders((function(t){if(!e.folders){if(e.folders=t,e.options.folderChord){var n=e.folderCacheService.getFolderByChord(e.options.folderChord,t);G.f.setSelected(W.a.MIGRATION_WIZARD,n,e.folders),e.selectedFolder=G.f.getSelected(W.a.MIGRATION_WIZARD,t)}else{var r=e.folders.first();if(r)return void i.a.AppLinkHelper.trigger({application:T.b.MIGRATION_WIZARD,action:T.a.MigrationWizard.HOME,params:{folder:r.get("chord")}},{replace:!0})}e.isRendering||e.render()}}))}},{key:"setFolderText",value:function(e,t){var n=this,i=e.get("chord"),r=e.get("name"),o=this.folderCacheService.getFolderCache(),a=this.options.folderChord;if(a){var s,l=P.getSelectedInFolder(t,r);if(i===a){var c=this.migrationVideoDataService.getCustomerVideos(i);if(!this.selectedFolder)return;c&&(o[a]=c.length),s=o[a]}o[i]&&(s=o[i]),l&&s?e.set("text","".concat(r," (").concat(l,"/").concat(s,")")):e.set("text",r),e.children.forEach((function(e){return n.setFolderText(e,t)}))}else e.set("text",r)}},{key:"closeSelectionBanner",value:function(){var e=this.getRegion("selectedBanner");e&&(this.viewModel.set("bannerShown",!1),e.destroy())}},{key:"setSelectedVideos",value:function(){var e=this,t=this.selectedVideoService.getSelectedVideoIds();this.videos&&this.videos.forEach((function(n){return p.a.setChecked(n,t,e.isInitialMigration())})),t&&this.viewModel.set("selectedVideoCount",t.length)}},{key:"addSelected",value:function(e,t){this.selectedVideoService.addSelectedVideos(e,t)}},{key:"removeSelected",value:function(e,t){this.selectedVideoService.removeSelectedVideos(e,t)}},{key:"isInitialMigration",value:function(){return L.a.isInitialMigration(this.customerMetadata)}},{key:"onClickBack",value:function(){var e=this;new G.d({title:r.a.getPhrase(this.lang,"backHeading"),text:r.a.getPhrase(this.lang,"backBody"),buttons:[{text:r.a.getPhrase(this.lang,"discard"),className:"btn btn-danger",success:!0},{text:r.a.getPhrase(this.lang,"cancel"),className:"btn btn-secondary",close:!0}]}).render().done((function(){e.selectedVideoService.removeAllSelectedVideos(),e.viewModel.set("alertShown",!1),i.a.AppLinkHelper.trigger({application:T.b.MIGRATION_WIZARD,action:T.a.MigrationWizard.START_MIGRATION})}))}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".".concat(l.a.leftNav)),t=e.find(".".concat(u.a.selected));if(t.length&&!(t.offset().top-e.offset().top+t.height()<e.height())){var n=e.scrollTop()+(t.offset().top-e.offset().top),i=.5*e.height()+.5*t.height();e.scrollTop(n-i)}}},{key:"renderEmptyMessage",value:function(){this.showChildView("videoList",new H.b({text:"No folder selected"}))}},{key:"renderSelectedBanner",value:function(){if(this.isInitialMigration()&&!this.viewModel.get("alertShown")){this.viewModel.set("alertShown",!0);var e={heading:r.a.getPhrase(this.lang,"smartSelected"),message:r.a.getPhrase(this.lang,"last3Years"),type:o.a.Success};this.alertService.createAlert(e)}}},{key:"renderLeftNav",value:function(){var e=this,t=new g.a({styles:u.a,appLink:{action:T.a.MigrationWizard.HOME,application:T.b.MIGRATION_WIZARD},linkParams:function(e){return{folder:e.get("chord")}},collection:this.folders,channelName:"".concat(this.cid),childrenProperty:"children",textProperty:"name",extraClass:"p-0",folderTreeId:W.a.MIGRATION_WIZARD});this.showChildView("leftNav",t),window.requestAnimationFrame((function(){window.requestAnimationFrame((function(){e.centerSelectedItem()}))}))}},{key:"renderSearchBar",value:function(){this.showChildView("search",new H.h({selected:this.errorCount.get("count")?"publisher-archive":"none"}))}},{key:"renderStatusBar",value:function(){var e=this;if(this.videoCount){var t={application:T.b.MIGRATION_WIZARD,action:T.a.MigrationWizard.SELECTED,args:[this.options.folderChord]},n=this.videoCount.get("successCount"),i=this.selectedVideoService.getNumberSelected(),o=new H.k({nextAppLink:t,showSelected:!0,nextDisabled:0===i,showBackButton:this.isInitialMigration(),text:this.isInitialMigration()?r.a.getPhrase(this.lang,"next"):r.a.getPhrase(this.lang,"addToLibrary"),numberSelected:i,numberAvailable:n,onClickBack:function(){return e.onClickBack()}});this.showChildView("footer",o)}}},{key:"renderVideoList",value:function(){var e=this.options,t=e.folderChord,n=e.searchTerm;if(this.videos||!t&&!n)if(this.selectedFolder){this.showChildView("videoList",new H.l({model:this.selectedFolder,initialMigration:this.isInitialMigration(),folderChord:t,searchTerm:n,collection:this.videos,channelName:this.channelName,supportSiteUrl:this.config.get("supportSiteUrl")}));var i=n||t;G.a.GetViewModel(i,F.CheckboxTypes.MIGRATION_VIDEO_LIST).trigger("change")}else this.renderEmptyMessage();else this.renderPartialLoading("videoList")}},{key:"renderCurrentSection",value:function(){this.showChildView("header",new _({searchTerm:this.options.searchTerm,initialMigration:this.isInitialMigration()}))}},{key:"renderBanner",value:function(){this.isInitialMigration()&&this.showChildView("banner",new H.a({config:this.config,currentUser:this.currentUser}))}},{key:"requiredResources",get:function(){return{config:j.b.config,currentUser:z.b.currentUser}}},{key:"onBeforeRender",value:function(){this.isRendering=!0,this.fetchVideos(),this.fetchFolders(),this.customerMetadata=this.migrationVideoDataService.getCustomerMetadata(),this.errorCount=this.migrationVideoDataService.getManualReviewVideoCount(),this.videoCount=this.migrationVideoDataService.getCustomerVideoCountCached();var e=!!(this.customerMetadata&&this.folders&&this.videoCount&&this.errorCount);return e||(this.isRendering=!1),e}},{key:"viewOptions",value:function(){return{styles:l.a}}},{key:"onRender",value:function(){if(this.renderSelectedBanner(),this.renderLeftNav(),this.renderSearchBar(),this.renderStatusBar(),this.renderBanner(),!this.videos)return this.renderPartialLoading("header"),this.renderPartialLoading("videoList"),void(this.isRendering=!1);this.options.folderChord||this.options.searchTerm?(this.renderVideoList(),this.renderCurrentSection()):this.renderEmptyMessage(),this.isRendering=!1}}])&&Z(t.prototype,n),s&&Z(t,s),Object.defineProperty(t,"prototype",{writable:!1}),d}(i.a.View)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(window.webpackJsonp_clickview_library_editor=window.webpackJsonp_clickview_library_editor||[]).push([[43],{1043:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(2),o=n(265);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}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,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===i(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(c,e);var t,n,r,i=u(c);function c(){return a(this,c),i.apply(this,arguments)}return t=c,(n=[{key:"defaults",value:function(){return e={},t=o.c.Disabled,n=!0,t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e;var e,t,n}}])&&l(t.prototype,n),r&&l(t,r),Object.defineProperty(t,"prototype",{writable:!1}),c}(r.a.Model)},1057:function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=n(1),o=n(2),i=n(312);function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function 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,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=f(e);if(t){var o=f(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return c(this,n)}}function c(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function f(e){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var d=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(c,e);var t,n,o,a=u(c);function c(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),a.call(this,e)}return t=c,(n=[{key:"name",get:function(){return"DropdownCollectionComponent"}},{key:"className",get:function(){return"dropdown-menu items-viewpart ".concat(this.getExtraClasses(this.options.displayOptions))}},{key:"attributes",get:function(){return{"aria-labelledby":"dropdownSelector"}}},{key:"initialize",value:function(){this.listenTo(this.options.channelName,"center:dropdown",this.centerSelectedItem)}},{key:"childView",get:function(){return i.a}},{key:"childViewOptions",get:function(){var e={channelName:this.options.channelName,analyticsHelper:this.options.analyticsHelper};return r.extend(e,this.options.childOptions)}},{key:"getExtraClasses",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?"left":t,r=e.extraClasses,o="dropdown-menu-".concat(n);return r&&(o="".concat(o," ").concat(r)),o}},{key:"centerSelectedItem",value:function(){var e=this.$el.find(".active");if(e.length){var t=this.$el.scrollTop()+e.position().top,n=.5*this.$el.height()+.5*e.height();this.$el.scrollTop(t-n)}}}])&&l(t.prototype,n),o&&l(t,o),Object.defineProperty(t,"prototype",{writable:!1}),c}(o.a.ComponentCollection)},1352:function(e,t,n){var r=n(10);e.exports=(r.default||r).template({1:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{};return(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.foundLibraries:i,{name:"if",hash:{},fn:e.program(2,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasAvailableLibraries:i,{name:"if",hash:{},fn:e.program(4,o,0),inverse:e.noop,data:o}))?i:"")+"\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.showNoFolderText:i,{name:"if",hash:{},fn:e.program(7,o,0),inverse:e.noop,data:o}))?i:"")},2:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return' <div class="alert alert-info" role="alert">\r\n <p class="m-0">'+(null!=(i=(n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"foundLibraries",{name:"lang",hash:{libraries:null!=(i=null!=t?t.options:t)?i.foundLibraries:i},data:o}))?i:"")+"</p>\r\n </div>\r\n"},4:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing,s=e.escapeExpression,u=e.lambda;return' <span class="d-block pb-2">'+s((n.lang||t&&t.lang||l).call(a,"selectFolder",{name:"lang",hash:{},data:o}))+"</span>\r\n"+(null!=(i=n.if.call(a,null!=(i=null!=t?t.options:t)?i.hasMultipleLibraries:i,{name:"if",hash:{},fn:e.program(5,o,0),inverse:e.noop,data:o}))?i:"")+' <div class="mt-1 mb-2 library-dropdown-region"></div>\r\n\r\n <span class="'+s(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.header:i,t))+' folder-name">'+s((n.lang||t&&t.lang||l).call(a,"folder",{name:"lang",hash:{},data:o}))+'</span>\r\n <div class="'+s(u(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.folderSelector:i,t))+' mt-1 folder-selector-region"></div>\r\n'},5:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=e.escapeExpression;return' <span class="'+a(e.lambda(null!=(i=null!=(i=null!=t?t.options:t)?i.styles:i)?i.header:i,t))+'">'+a((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"library",{name:"lang",hash:{},data:o}))+"</span>\r\n"},7:function(e,t,n,r,o){e.propertyIsEnumerable;var i,a=null!=t?t:e.nullContext||{},l=e.hooks.helperMissing;return" <p>"+e.escapeExpression((n.lang||t&&t.lang||l).call(a,"noFolders1",{name:"lang",hash:{},data:o}))+"</p>\r\n <p>"+(null!=(i=(n.lang||t&&t.lang||l).call(a,"noFolders2",{name:"lang",hash:{},data:o}))?i:"")+"</p>\r\n"},9:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return(null!=(i=e.lambda(null!=(i=null!=t?t.options:t)?i.spinnerEl:i,t))?i:"")+"\r\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,r,o){var i;e.propertyIsEnumerable;return null!=(i=n.if.call(null!=t?t:e.nullContext||{},null!=(i=null!=t?t.options:t)?i.dataFetched:i,{name:"if",hash:{},fn:e.program(1,o,0),inverse:e.program(9,o,0),data:o}))?i:""},useData:!0})},1353:function(e,t,n){e.exports={header:"_1tdTv"}},1455:function(e,t,n){"use strict";n.r(t),n.d(t,"AddToLibraryView",(function(){return j}));var r=n(1),o=n(2),i=n(5),a=n(265),l=n(1062),s=n(305),u=n(9),c=n(62),f=n(1043),d=n(12),p=n(0),h=n(3),y=n(146),b=n(1123),m=n(1352),g=n.n(m),v=n(1353),w=n.n(v);function k(e){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(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,r.key,r)}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C(e);if(t){var o=C(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return T(this,n)}}function T(e,t){if(t&&("object"===k(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function C(e){return(C=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var j=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&O(e,t)}(v,e);var t,n,o,m=S(v);function v(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,v),m.call(this,e)}return t=v,(n=[{key:"initialize",value:function(){this.videoDataService=i.a.getInstance(p.g.Video,this),this.bindListeners()}},{key:"name",get:function(){return"AddToLibraryView"}},{key:"title",get:function(){return h.a.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:p.b.LIBRARY_EDITOR,action:p.a.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 d.k.generateUniqueChannelName(this)}},{key:"template",get:function(){return g.a}},{key:"behaviors",get:function(){var e=this;return[{behaviorClass:s.e,title:h.a.getPhrase(this.lang,"submitTooltip"),size:"modal-md",spinnerButtonOptions:{channelName:this.channelName,model:this.spinnerModel=new f.a,buttonText:h.a.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(p.e.VIDEO,"".concat(p.f.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(p.e.VIDEO,"get:video:categories:libraries:".concat(this.options.videoId,":sync"),this.render)}},{key:"onSubmit",value:function(e){e&&e.preventDefault(),this.spinnerModel.set(a.c.ShowSpinner,!0),this.addToLibrary()}},{key:"onLibrarySelected",value:function(e){this.spinnerModel.set(a.c.Disabled,!0),d.f.setSelected(this.libraryTreeKey,e.get("id"),this.customLibraries),this.renderFolderSelector()}},{key:"onFolderSelected",value:function(e){this.spinnerModel.set(a.c.Disabled,!1),d.f.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=r.map(e,(function(e){return"<strong>".concat(d.w.escapeExpression(e),"</strong>")}));if(1===t.length)return t[0];var n=h.a.getPhrase(this.lang,"and");return"".concat(t.slice(0,-1).join(", ")," ").concat(n," ").concat(t.slice(-1))}},{key:"addToLibrary",value:function(){var e,t,n=this,o=d.f.getSelected(this.folderTreeKey,this.customLibraries),i=o.get("id"),a=d.f.getSelected(this.libraryTreeKey,this.customLibraries).get("id"),l=this.model.libraries.filter((function(e){return e.get("type")===c.a.HostedLibrary})),s=this.model.categories;s&&s.last()&&(e=s.last().get("id")),l&&l.length&&(t=r.last(l).get("id"));var f={masterObjectId:this.options.videoId,masterObjectType:u.g.Video,metadata:{sourceLibraryId:t,sourceCategoryId:e,destinationLibraryId:a,destinationCategoryId:i}};this.videoDataService.addVideoToCustomLibrary(f,this.model,o,(function(){n.triggerMethod("hide")}))}},{key:"getSubmitBtnTooltipOptions",value:function(){if(this.spinnerModel.get(a.c.Disabled)&&this.hasAvailableLibraries())return{title:h.a.getPhrase(this.lang,"heading")}}},{key:"getAvailableCustomLibraries",value:function(){if(!this.dataFetched())return null;var e=this.customLibraries.clone();e.remove(this.model.libraries.filter((function(e){return e.get("type")===c.a.CustomLibrary})));var t=e.filter((function(e){return 0===e.children.length}));return e.remove(t),e}},{key:"hasAvailableLibraries",value:function(){if(!this.customLibraries)return!1;var e=this.getAvailableCustomLibraries();return e&&e.length>0}},{key:"hasFolders",value:function(){return!!this.customLibraries&&!!this.customLibraries.find((function(e){return!!e.get("children").length}))}},{key:"getVideoCustomLibraries",value:function(){if(!this.model||!this.model.libraries||!this.model.libraries.length)return null;var e=this.model.libraries.filter((function(e){return e.get("type")===c.a.CustomLibrary}));return r.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=d.f.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&&d.f.setSelected(this.libraryTreeKey,e.first().get("id"),e);var t=d.f.getSelected(this.libraryTreeKey,e),n=t.get("children")&&!!t.get("children").length,r=this.getUI("folderName");t&&n&&this.$(r).show(),this.showChildView("folderSelector",new l.a({collection:t.children,channelName:"".concat(this.channelName,":folder"),folderTreeKey:this.folderTreeKey}))}},{key:"requiredResources",get:function(){return{customLibraries:y.b.libraries}}},{key:"onBeforeRender",value:function(){this.model=this.videoDataService.getVideo(this.options.videoId)}},{key:"viewOptions",value:function(){var e;return{styles:w.a,foundLibraries:this.getVideosCustomLibraryNames(),hasAvailableLibraries:this.hasAvailableLibraries(),hasMultipleLibraries:(null===(e=this.customLibraries)||void 0===e?void 0:e.length)>1,dataFetched:this.dataFetched(),spinnerEl:d.r.getSpinner({size:d.s.Large,extraClasses:"mx-auto"}),showNoFolderText:!this.hasFolders()}}},{key:"onRender",value:function(){this.dataFetched()&&this.hasAvailableLibraries()&&this.renderLibraryDropdown()}}])&&L(t.prototype,n),o&&L(t,o),Object.defineProperty(t,"prototype",{writable:!1}),v}(o.a.View)}}]);
|