@clickview/library-editor 1.30.0-rc.9 → 1.30.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +2 -2
- package/dist/css/{library-editor-app-e210e96985.css → library-editor-app-d373fad36b.css} +23 -23
- package/dist/languages/en.json +1 -1
- package/dist/scripts/101-a701f58f41.chunk.js +1 -0
- package/dist/scripts/{1010-eb374a9f8f.chunk.js → 1010-2ccd199a94.chunk.js} +1 -1
- package/dist/scripts/{1086-f5d06e0c5b.chunk.js → 1086-fceae67e5d.chunk.js} +1 -1
- package/dist/scripts/{1216-0952024fc9.chunk.js → 1216-7fc984a3b2.chunk.js} +1 -1
- package/dist/scripts/{1269-5db1f3e32b.chunk.js → 1269-6ccae7d739.chunk.js} +1 -1
- package/dist/scripts/{1364-f9039d1ee2.chunk.js → 1364-d7866d0c44.chunk.js} +1 -1
- package/dist/scripts/1409-3589e45de5.chunk.js +1 -0
- package/dist/scripts/1492-770d293d8f.chunk.js +1 -0
- package/dist/scripts/1601-65e2fe0e31.chunk.js +2 -0
- package/dist/scripts/{1832-fec109af6c.chunk.js → 1832-489ef98ee6.chunk.js} +1 -1
- package/dist/scripts/1887-c137ad629e.chunk.js +1 -0
- package/dist/scripts/1911-a201f2efcc.chunk.js +1 -0
- package/dist/scripts/{2417-c1b7a71c00.chunk.js → 2417-1ac23af9dd.chunk.js} +1 -1
- package/dist/scripts/{243-0e4a585f6b.chunk.js → 243-1bf49fbb52.chunk.js} +1 -1
- package/dist/scripts/{259-80b903e07b.chunk.js → 259-59db5b4b13.chunk.js} +1 -1
- package/dist/scripts/{2692-f32201422c.chunk.js → 2692-da872fb785.chunk.js} +1 -1
- package/dist/scripts/{2803-2b7194894b.chunk.js → 2803-37e08e02e8.chunk.js} +1 -1
- package/dist/scripts/{2888-3175201f04.chunk.js → 2888-4b587bbe31.chunk.js} +1 -1
- package/dist/scripts/2910-947ef1a7c7.chunk.js +2 -0
- package/dist/scripts/{299-eb697a2fe1.chunk.js → 299-9ac362dc77.chunk.js} +1 -1
- package/dist/scripts/3096-54d42a2cd1.chunk.js +1 -0
- package/dist/scripts/343-7697ed1120.chunk.js +1 -0
- package/dist/scripts/3511-e5e10f5858.chunk.js +1 -0
- package/dist/scripts/{3639-df89ef6c33.chunk.js → 3639-f85e46e79c.chunk.js} +1 -1
- package/dist/scripts/{3746-4ccea7acfa.chunk.js → 3746-3535cfdea2.chunk.js} +1 -1
- package/dist/scripts/{3763-4a058d4401.chunk.js → 3763-4ab7cf96ed.chunk.js} +1 -1
- package/dist/scripts/{3969-8aea96a0bb.chunk.js → 3969-b44d4eb03d.chunk.js} +1 -1
- package/dist/scripts/{4177-8542f33a9e.chunk.js → 4177-238bab6176.chunk.js} +1 -1
- package/dist/scripts/{4201-f94b39b95c.chunk.js → 4201-80276a1f86.chunk.js} +1 -1
- package/dist/scripts/{4245-24ff0831a9.chunk.js → 4245-4430c4834d.chunk.js} +1 -1
- package/dist/scripts/4523-2da04c8ef6.chunk.js +1 -0
- package/dist/scripts/{4591-e833ab486c.chunk.js → 4591-89ff9938d6.chunk.js} +1 -1
- package/dist/scripts/4784-f79bb0b3b3.chunk.js +1 -0
- package/dist/scripts/{4885-5fcb0b3d21.chunk.js → 4885-e298b284c1.chunk.js} +1 -1
- package/dist/scripts/{514-d673e4c14b.chunk.js → 514-bc1546c377.chunk.js} +1 -1
- package/dist/scripts/{5173-3ce30f3a17.chunk.js → 5173-0f92a7cb60.chunk.js} +1 -1
- package/dist/scripts/{5235-79c40407fb.chunk.js → 5235-21773a788e.chunk.js} +1 -1
- package/dist/scripts/{5412-1265924394.chunk.js → 5412-397327ca47.chunk.js} +1 -1
- package/dist/scripts/{5418-a7053d4a2c.chunk.js → 5418-fe4313f81b.chunk.js} +1 -1
- package/dist/scripts/{5424-1b544811d8.chunk.js → 5424-f974d2d4de.chunk.js} +1 -1
- package/dist/scripts/{546-59fc707522.chunk.js → 546-23712736b6.chunk.js} +1 -1
- package/dist/scripts/{5747-c05ef8604b.chunk.js → 5747-a4774d1260.chunk.js} +1 -1
- package/dist/scripts/5891-8e99ad0850.chunk.js +1 -0
- package/dist/scripts/{6093-56f14abebe.chunk.js → 6093-cca33f6f29.chunk.js} +1 -1
- package/dist/scripts/{6220-d6790a5103.chunk.js → 6220-9f130ceb48.chunk.js} +1 -1
- package/dist/scripts/{6357-d64273e6be.chunk.js → 6357-d93f4feefb.chunk.js} +1 -1
- package/dist/scripts/6505-599904bbfb.chunk.js +1 -0
- package/dist/scripts/6732-e1bdb320a5.chunk.js +1 -0
- package/dist/scripts/{6756-fc2569ee11.chunk.js → 6756-efed80cdf7.chunk.js} +1 -1
- package/dist/scripts/{6774-05ef6b24a0.chunk.js → 6774-fbe58a0610.chunk.js} +1 -1
- package/dist/scripts/{6788-5a391d38ed.chunk.js → 6788-9359dd2e96.chunk.js} +1 -1
- package/dist/scripts/6963-b11a16a04e.chunk.js +1 -0
- package/dist/scripts/{6995-643c2542a3.chunk.js → 6995-15b612db36.chunk.js} +1 -1
- package/dist/scripts/6999-e7b221a1ed.chunk.js +1 -0
- package/dist/scripts/{7002-5875ed0069.chunk.js → 7002-0af88665a1.chunk.js} +1 -1
- package/dist/scripts/{7053-269864a2d6.chunk.js → 7053-3e07361c8a.chunk.js} +1 -1
- package/dist/scripts/708-068ec58fa8.chunk.js +1 -0
- package/dist/scripts/{7190-a2e8d20ecf.chunk.js → 7190-79f4578794.chunk.js} +1 -1
- package/dist/scripts/{7376-27b6790926.chunk.js → 7376-1de7713065.chunk.js} +1 -1
- package/dist/scripts/{7433-abdbfcb6b7.chunk.js → 7433-6a196b3914.chunk.js} +1 -1
- package/dist/scripts/7634-c75060fb27.chunk.js +1 -0
- package/dist/scripts/8330-4c65e49cda.chunk.js +1 -0
- package/dist/scripts/{8362-148a50f032.chunk.js → 8362-ff838fddac.chunk.js} +1 -1
- package/dist/scripts/{8727-abd1ecc0fa.chunk.js → 8727-a5823203d8.chunk.js} +1 -1
- package/dist/scripts/{8762-4bce0c7009.chunk.js → 8762-34b8bdb6b5.chunk.js} +1 -1
- package/dist/scripts/{8906-17fef7d1d4.chunk.js → 8906-7ec2be0a04.chunk.js} +1 -1
- package/dist/scripts/8947-4e1ae8f547.chunk.js +1 -0
- package/dist/scripts/{9357-37ddba8d25.chunk.js → 9357-9a2958f6b5.chunk.js} +1 -1
- package/dist/scripts/9554-5920393265.chunk.js +1 -0
- package/dist/scripts/{9695-067d97c1ad.chunk.js → 9695-b9a3518ce9.chunk.js} +1 -1
- package/dist/scripts/{9927-ab6248ad0e.chunk.js → 9927-137d291d00.chunk.js} +1 -1
- package/dist/scripts/9929-4cbff0acbe.chunk.js +1 -0
- package/dist/scripts/9976-52f9e5baa6.chunk.js +1 -0
- package/dist/scripts/bundle-ca680a2fa7.min.js +2 -0
- package/package.json +2 -3
- package/typings/libs/LazyLoad.d.ts +1 -1
- package/.eslintrc.json +0 -3
- package/dist/scripts/101-c79ad403db.chunk.js +0 -1
- package/dist/scripts/1203-c277e037c3.chunk.js +0 -1
- package/dist/scripts/1409-cb53d3702a.chunk.js +0 -1
- package/dist/scripts/1492-347b4b5451.chunk.js +0 -1
- package/dist/scripts/1601-5195376e97.chunk.js +0 -2
- package/dist/scripts/1887-4c84bfbc2c.chunk.js +0 -1
- package/dist/scripts/1911-d0d31b94d3.chunk.js +0 -1
- package/dist/scripts/2910-bee321f1d5.chunk.js +0 -2
- package/dist/scripts/3096-30b780bfc3.chunk.js +0 -1
- package/dist/scripts/343-c8ab80b44d.chunk.js +0 -1
- package/dist/scripts/3511-075f2dd6cf.chunk.js +0 -1
- package/dist/scripts/4523-883e337fac.chunk.js +0 -1
- package/dist/scripts/4784-675e8ae84f.chunk.js +0 -1
- package/dist/scripts/5891-9dd6330101.chunk.js +0 -1
- package/dist/scripts/6505-c885c92dd7.chunk.js +0 -1
- package/dist/scripts/6732-f42320176e.chunk.js +0 -1
- package/dist/scripts/6963-886e8b40b6.chunk.js +0 -1
- package/dist/scripts/6999-a2d2c853c7.chunk.js +0 -1
- package/dist/scripts/708-c0692908d8.chunk.js +0 -1
- package/dist/scripts/7634-96a8c961da.chunk.js +0 -1
- package/dist/scripts/8330-e7b59de85d.chunk.js +0 -1
- package/dist/scripts/8947-ddae6c9c08.chunk.js +0 -1
- package/dist/scripts/9929-e70ff98095.chunk.js +0 -1
- package/dist/scripts/9976-72ce08e5c6.chunk.js +0 -1
- package/dist/scripts/bundle-5c9cc2148c.min.js +0 -2
- package/dist/css/{101-library-editor-a0be51a787.chunk.css → 101-library-editor-e853578438.chunk.css} +1 -1
- package/dist/css/{1492-library-editor-d960f77061.chunk.css → 1492-library-editor-8097515753.chunk.css} +4 -4
- package/dist/css/{1601-library-editor-de229ab88c.chunk.css → 1601-library-editor-6b7ab30a3e.chunk.css} +3 -3
- package/dist/css/{1887-library-editor-cca972c080.chunk.css → 1887-library-editor-0e3cbf0e7b.chunk.css} +10 -10
- package/dist/css/{1911-library-editor-689507eb58.chunk.css → 1911-library-editor-be52d762b9.chunk.css} +6 -6
- package/dist/css/{2417-library-editor-cafbdbc710.chunk.css → 2417-library-editor-8d36850bb6.chunk.css} +1 -1
- package/dist/css/{2910-library-editor-6532a85c36.chunk.css → 2910-library-editor-83f2f52493.chunk.css} +4 -4
- package/dist/css/{343-library-editor-b1a086bdd2.chunk.css → 343-library-editor-118e709b3a.chunk.css} +22 -22
- package/dist/css/{3511-library-editor-bff8f47976.chunk.css → 3511-library-editor-59c8b7dcc0.chunk.css} +8 -8
- package/dist/css/{4177-library-editor-4a82cc89e1.chunk.css → 4177-library-editor-7319f9d253.chunk.css} +6 -6
- package/dist/css/{4523-library-editor-a1247bffda.chunk.css → 4523-library-editor-c52f3ffbb0.chunk.css} +1 -1
- package/dist/css/{6220-library-editor-65c477d56a.chunk.css → 6220-library-editor-952912297c.chunk.css} +5 -5
- package/dist/css/{6505-library-editor-c6a9216107.chunk.css → 6505-library-editor-bff3cd4ffa.chunk.css} +5 -5
- package/dist/css/{6999-library-editor-44511049a7.chunk.css → 6999-library-editor-5680cea99b.chunk.css} +7 -7
- package/dist/css/{708-library-editor-54b890f687.chunk.css → 708-library-editor-c762b1fab5.chunk.css} +3 -3
- package/dist/css/{7634-library-editor-48de91de99.chunk.css → 7634-library-editor-4ba27209f0.chunk.css} +7 -7
- package/dist/css/{8330-library-editor-416f9a7109.chunk.css → 8330-library-editor-deb68b6fea.chunk.css} +17 -17
- package/dist/css/{1203-library-editor-36f0a42508.chunk.css → 9554-library-editor-36f0a42508.chunk.css} +0 -0
- package/dist/css/{9976-library-editor-36adaf7380.chunk.css → 9976-library-editor-94bb070288.chunk.css} +7 -7
- /package/dist/scripts/{1601-5195376e97.chunk.js.LICENSE.txt → 1601-65e2fe0e31.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{2910-bee321f1d5.chunk.js.LICENSE.txt → 2910-947ef1a7c7.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{3400-e1313032d6.chunk.js → 3400-c5f1284e96.chunk.js} +0 -0
- /package/dist/scripts/{4860-d7c8e49e0d.chunk.js → 4860-4c5f5a2f5e.chunk.js} +0 -0
- /package/dist/scripts/{bundle-5c9cc2148c.min.js.LICENSE.txt → bundle-ca680a2fa7.min.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6756],{18068:function(e,t,n){"use strict";n.r(t),n.d(t,{SuggestAnEditView:function(){return W}});var o=n(39479),a=n(57857),r=n(31647),i=n(21679),s=n(99249),l=n(70065),u=n(52076),c=n(61843);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},d(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}var 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)}(r,e);var t,n,o,a=(n=r,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=p(n);if(o){var a=p(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return function(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)}(this,e)});function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),a.apply(this,arguments)}return t=r,Object.defineProperty(t,"prototype",{writable:!1}),t}(r.Q.Model),h=n(13102),y=n(67670),m=n(19226),v=n(48404),b=n(48090),w=n(83665),S=n(26357),M=n(88172),O=n(10101),T=n(75459),k=n(8371),E=n(48088),P=n(33192),V=n(29457),j=n(48726),R=n(40622),C=n(7190),_=n(19098),N=n.n(_),x={metadataValue:"mvVSS"};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(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,(void 0,a=function(e,t){if("object"!==I(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==I(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===I(a)?a:String(a)),o)}var a}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}function U(e){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},U(e)}var F,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&&B(e,t)}(l,e);var t,n,o,i,s=(o=l,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=U(o);if(i){var n=U(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===I(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),s.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return N()}},{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===R.MetadataType.BroadcastDate?this.options.metadataValue?P(this.options.metadataValue).format(V.K4.FULL_YEAR):a.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue instanceof r.Q.Collection?this.options.metadataValue.length?this.options.metadataValue.map((function(e){return e.get("name")})).join(", "):a.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue||a.T.getPhrase(this.lang,"noMetadataValue")}},{key:"getSuggestionPlaceholder",value:function(){return this.options.metadataType===R.MetadataType.Other?a.T.getPhrase(this.lang,"otherSuggestionPlaceholder"):a.T.getPhrase(this.lang,"suggestionPlaceholder",{metadataType:C.uB.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===R.MetadataType.Rating&&this.showChildView("ratingSelect",new j.R({model:this.options.currentRating,collection:this.options.ratings,parentChannelName:this.options.channelName,hideHeaderText:!0,hideRemove:!0}))}},{key:"viewOptions",value:function(){return{styles:x,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===R.MetadataType.Rating,isOtherType:this.options.metadataType===R.MetadataType.Other,metadataType:C.uB.translateMetadataName(this.options.metadataType).toLowerCase(),suggestionPlaceholder:this.getSuggestionPlaceholder()}}},{key:"onRender",value:function(){this.renderRatingSelect(),this.stickit(),E.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),E.Validation.unbind(this)}}])&&D(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(r.Q.Component);!function(e){e[e.Email=0]="Email"}(F||(F={}));var A=n(60519),Z=n(68249),H=Object.assign(Object.assign({},A.c),{createSuggestEditNotification:function(e){return{_type:Z.k.SuggestEdit,groupId:e.groupId,receiverId:0,instanceRegion:e.instanceRegion,countryCode:e.countryCode,channels:[F.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),Q=n(34651),q=n.n(Q);function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function J(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,(void 0,a=function(e,t){if("object"!==G(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==G(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===G(a)?a:String(a)),o)}var a}function K(e,t){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},K(e,t)}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}var W=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&K(e,t)}(p,e);var t,n,r,d,f=(r=p,d=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=z(r);if(d){var n=z(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(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)}(this,e)});function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),f.call(this,e)}return t=p,(n=[{key:"initialize",value:function(){this.getViewModel(),this.videoDataService=i.u.getInstance(b.Or.Video,this),this.ratingsDataService=i.u.getInstance(b.Or.Ratings,this),this.notificationDataService=i.u.getInstance(b.Or.Notifications,this),this.selectedMetadata=new g,this.bindListeners()}},{key:"name",get:function(){return"SuggestAnEditView"}},{key:"template",get:function(){return q()}},{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 a.T.getPhrase(this.lang,"title")}},{key:"channelName",get:function(){return c.N0.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:O.Yw,title:a.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new y.v,channelName:this.channelName,buttonText:a.T.getPhrase(this.lang,"submit"),onClick:function(){return e.onSubmit()}}}]}},{key:"requiredResources",get:function(){return{config:v.p.config,currentUser:m.K.currentUser}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:option:selected",this.onMetadataSelect),this.listenTo(this.channelName,"select:rating",this.onSelectRating),this.listenTo(b.Vk.VIDEO,"".concat(b.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(b.Vk.NOTIFICATIONS,"".concat(b.M_.SUGGEST_EDIT,":error"),this.onError)}},{key:"onSubmit",value:function(){var e=this;if(this.validateForm()){this.spinnerModel.set(M.ZV.ShowSpinner,!0);var t=this.selectedMetadata.get("metadataType")===R.MetadataType.Rating?this.viewModel.get("ratingSuggestion"):this.viewModel.get("suggestion"),n=this.config.get("suggestEditMetadataGroupId"),o=H.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(M.ZV.ShowSpinner,!1),e.spinnerModel.set(M.ZV.Disabled,!0)})),this.logAction(),this.viewModel.clear()}}},{key:"onError",value:function(){this.spinnerModel.set(M.ZV.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(M.ZV.Disabled,!1),c.yV.setSelected(e.get("id"),this.metadataCollection),this.selectedMetadata.set({metadataType:e.get("name"),metadataValue:e.get("name")!==R.MetadataType.Other?this.model.get(e.get("property")):null}),e.get("name")!==R.MetadataType.Rating&&this.viewModel.set("ratingSuggestion","")}},{key:"getMetadataCollection",value:function(){var e=Object.keys(R.MetadataTypes).map((function(e){return R.MetadataTypes[e]}));return this.currentUser.get("instanceRegion")===k.b.US&&(e=e.filter((function(e){return e.name!==R.MetadataType.Channel&&e.name!==R.MetadataType.BroadcastDate}))),new w.L(e)}},{key:"getMetadataByType",value:function(e){return this.metadataCollection.findWhere({name:e})}},{key:"getViewModel",value:function(){this.viewModel=s.r.get(this.viewModelName),this.viewModel.addValidation(C.xs)}},{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")!==R.MetadataType.Rating&&!n||!t)}},{key:"getRatingValidationMessage",value:function(){if(this.selectedMetadata.get("metadataType")!==R.MetadataType.Rating)return"";var e=this.selectedMetadata.get("metadataValue"),t=this.viewModel.get("ratingSuggestion");return t?e===t?C.nf.original():"":C.nf.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=c.M2.getSourceTypes(this.model);e=o.filter(e,(function(e){return e!==T.r.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")};u.k.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 S.H({collection:C.uB.translateMetadataCollectionNames(this.metadataCollection),channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click"},placeholderText:this.selectedMetadata.get("metadataType")||a.T.getPhrase(this.lang,"dropdownPlaceholder"),analyticsHelper:u.k}))}},{key:"renderSuggestEdit",value:function(){this.selectedMetadata.get("metadataType")&&this.showChildView("suggestEdit",new L({model:this.viewModel,channelName:this.channelName,ratings:this.ratingCollection,currentRating:this.viewModel.get("ratingSuggestion")?new h.i(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.metadataCollection||(this.metadataCollection=this.getMetadataCollection()),this.checkPreselection()}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:c.Kp.getSpinner({size:c.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}}])&&J(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),p}(r.Q.View)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return d}});var o=n(31647),a=n(88172);function r(e){return r="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},r(e)}function i(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function 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,l(o.key),o)}}function l(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===r(t)?t:String(t)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(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&&u(e,t)}(f,e);var t,n,o,l,d=(o=f,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(o);if(l){var n=c(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function f(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),d.apply(this,arguments)}return t=f,(n=[{key:"defaults",value:function(){var e;return i(e={},a.ZV.Disabled,!0),i(e,a.ZV.Hidden,!1),e}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.Q.Model)},19098:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,a){e.propertyIsEnumerable;var r,i=e.escapeExpression,s=e.lambda;return'<p class="font-weight-bold mb-0">'+i((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"currentType",{name:"lang",hash:{metadataType:null!=(r=null!=t?t.options:t)?r.metadataType:r},data:a}))+'</p>\n<p class="mb-3 '+i(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.metadataValue:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.metadataValue:r,t))?r:"")+"</p>\n"},3:function(e,t,n,o,a){var r;return e.propertyIsEnumerable,' <textarea\n id="suggest-edit"\n placeholder="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.suggestionPlaceholder:r,t))+'"\n class="form-control"\n name="suggestion"\n ></textarea>\n <div class="form-feedback"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,a){e.propertyIsEnumerable;var r,i=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return(null!=(r=n.unless.call(i,null!=(r=null!=t?t.options:t)?r.isOtherType:r,{name:"unless",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+'\n<div class="dropdown-divider"></div>\n\n<div class="form-group">\n <label for="suggest-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(i,"suggestionSubheading",{name:"lang",hash:{},data:a}))+'</label>\n <div class="rating-select-region"></div>\n <div class="rating-form-feedback invalid-feedback"></div>\n'+(null!=(r=n.unless.call(i,null!=(r=null!=t?t.options:t)?r.useRatingSelect:r,{name:"unless",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+'</div>\n\n<div class="form-group">\n <label for="reason-for-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(i,"reasoningSubheading",{name:"lang",hash:{},data:a}))+'</label>\n <textarea\n id="reason-for-edit"\n placeholder="'+l((n.lang||t&&t.lang||s).call(i,"reasoningPlaceholder",{name:"lang",hash:{},data:a}))+'"\n class="form-control"\n name="reason"\n ></textarea>\n <div class="form-feedback"></div>\n</div>'},useData:!0})},34651:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,a){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},i=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||i).call(r,"guidelines",{name:"lang",hash:{},data:a}))+'</p>\n<p class="font-weight-bold mb-1">'+s((n.lang||t&&t.lang||i).call(r,"dropdownHeading",{name:"lang",hash:{},data:a}))+'</p>\n<div class="metadata-dropdown-region position-relative"></div>\n<div class="suggest-edit-region"></div>\n'},3:function(e,t,n,o,a){var r;return e.propertyIsEnumerable,(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.spinnerEl:r,t))?r:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,a){var r;return e.propertyIsEnumerable,null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.dataFetched:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a}))?r:""},useData:!0})}}]);
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6756],{18068:function(e,t,n){"use strict";n.r(t),n.d(t,{SuggestAnEditView:function(){return W}});var o=n(39479),a=n(21679),r=n(57857),i=n(99249),s=n(31647),l=n(52076),u=n(70065),c=n(8371),d=n(75459),f=n(10101),p=n(83665),g=n(26357),h=n(88172),y=n(48090),m=n(67670);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function b(e,t){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},b(e,t)}function w(e){return w=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},w(e)}var S=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&&b(e,t)}(r,e);var t,n,o,a=(n=r,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=w(n);if(o){var a=w(this).constructor;e=Reflect.construct(t,arguments,a)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),a.apply(this,arguments)}return t=r,Object.defineProperty(t,"prototype",{writable:!1}),t}(s.Q.Model),M=n(13102),O=n(48404),T=n(19226),k=n(61843),E=n(48088),P=n(33192),V=n(48726),j=n(29457),R=n(40622),C=n(7190),_=n(19098),N=n.n(_),x={metadataValue:"mvVSS"};function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function D(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,(void 0,a=function(e,t){if("object"!==I(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==I(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===I(a)?a:String(a)),o)}var a}function B(e,t){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},B(e,t)}function U(e){return U=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},U(e)}var F,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&&B(e,t)}(l,e);var t,n,o,a,i=(o=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=U(o);if(a){var n=U(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===I(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function l(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),i.call(this,e)}return t=l,(n=[{key:"name",get:function(){return"SuggestEditComponent"}},{key:"template",get:function(){return N()}},{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===R.MetadataType.BroadcastDate?this.options.metadataValue?P(this.options.metadataValue).format(j.K4.FULL_YEAR):r.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue instanceof s.Q.Collection?this.options.metadataValue.length?this.options.metadataValue.map((function(e){return e.get("name")})).join(", "):r.T.getPhrase(this.lang,"noMetadataValue"):this.options.metadataValue||r.T.getPhrase(this.lang,"noMetadataValue")}},{key:"getSuggestionPlaceholder",value:function(){return this.options.metadataType===R.MetadataType.Other?r.T.getPhrase(this.lang,"otherSuggestionPlaceholder"):r.T.getPhrase(this.lang,"suggestionPlaceholder",{metadataType:C.uB.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===R.MetadataType.Rating&&this.showChildView("ratingSelect",new V.R({model:this.options.currentRating,collection:this.options.ratings,parentChannelName:this.options.channelName,hideHeaderText:!0,hideRemove:!0}))}},{key:"viewOptions",value:function(){return{styles:x,metadataValue:this.getMetadataValue(),useRatingSelect:this.options.metadataType===R.MetadataType.Rating,isOtherType:this.options.metadataType===R.MetadataType.Other,metadataType:C.uB.translateMetadataName(this.options.metadataType).toLowerCase(),suggestionPlaceholder:this.getSuggestionPlaceholder()}}},{key:"onRender",value:function(){this.renderRatingSelect(),this.stickit(),E.Validation.bind(this)}},{key:"onDestroy",value:function(){this.unstickit(),E.Validation.unbind(this)}}])&&D(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(s.Q.Component);!function(e){e[e.Email=0]="Email"}(F||(F={}));var A=n(68249),Z=n(60519),H=Object.assign(Object.assign({},Z.c),{createSuggestEditNotification:function(e){return{_type:A.k.SuggestEdit,groupId:e.groupId,receiverId:0,instanceRegion:e.instanceRegion,countryCode:e.countryCode,channels:[F.Email],data:{video:e.video,user:e.user,property:e.property,suggestion:e.suggestion,reason:e.reason,currentValue:e.currentValue}}}}),Q=n(34651),q=n.n(Q);function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function J(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,(void 0,a=function(e,t){if("object"!==G(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==G(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===G(a)?a:String(a)),o)}var a}function K(e,t){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},K(e,t)}function z(e){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},z(e)}var W=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&K(e,t)}(w,e);var t,n,s,v,b=(s=w,v=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=z(s);if(v){var n=z(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(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)}(this,e)});function w(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,w),b.call(this,e)}return t=w,(n=[{key:"initialize",value:function(){this.getViewModel(),this.videoDataService=a.u.getInstance(y.Or.Video,this),this.ratingsDataService=a.u.getInstance(y.Or.Ratings,this),this.notificationDataService=a.u.getInstance(y.Or.Notifications,this),this.selectedMetadata=new S,this.bindListeners()}},{key:"name",get:function(){return"SuggestAnEditView"}},{key:"template",get:function(){return q()}},{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.T.getPhrase(this.lang,"title")}},{key:"channelName",get:function(){return k.N0.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:f.Yw,title:r.T.getPhrase(this.lang,"heading"),spinnerButtonOptions:{model:this.spinnerModel=new m.v,channelName:this.channelName,buttonText:r.T.getPhrase(this.lang,"submit"),onClick:function(){return e.onSubmit()}}}]}},{key:"requiredResources",get:function(){return{config:O.p.config,currentUser:T.K.currentUser}}},{key:"bindListeners",value:function(){this.listenTo(this.channelName,"select:option:selected",this.onMetadataSelect),this.listenTo(this.channelName,"select:rating",this.onSelectRating),this.listenTo(y.Vk.VIDEO,"".concat(y.M_.VIDEOS,":").concat(this.options.videoId,":sync"),this.render),this.listenTo(y.Vk.NOTIFICATIONS,"".concat(y.M_.SUGGEST_EDIT,":error"),this.onError)}},{key:"onSubmit",value:function(){var e=this;if(this.validateForm()){this.spinnerModel.set(h.ZV.ShowSpinner,!0);var t=this.selectedMetadata.get("metadataType")===R.MetadataType.Rating?this.viewModel.get("ratingSuggestion"):this.viewModel.get("suggestion"),n=this.config.get("suggestEditMetadataGroupId"),o=H.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(h.ZV.ShowSpinner,!1),e.spinnerModel.set(h.ZV.Disabled,!0)})),this.logAction(),this.viewModel.clear()}}},{key:"onError",value:function(){this.spinnerModel.set(h.ZV.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(h.ZV.Disabled,!1),k.yV.setSelected(e.get("id"),this.metadataCollection),this.selectedMetadata.set({metadataType:e.get("name"),metadataValue:e.get("name")!==R.MetadataType.Other?this.model.get(e.get("property")):null}),e.get("name")!==R.MetadataType.Rating&&this.viewModel.set("ratingSuggestion","")}},{key:"getMetadataCollection",value:function(){var e=Object.keys(R.MetadataTypes).map((function(e){return R.MetadataTypes[e]}));return this.currentUser.get("instanceRegion")===c.b.US&&(e=e.filter((function(e){return e.name!==R.MetadataType.Channel&&e.name!==R.MetadataType.BroadcastDate}))),new p.L(e)}},{key:"getMetadataByType",value:function(e){return this.metadataCollection.findWhere({name:e})}},{key:"getViewModel",value:function(){this.viewModel=i.r.get(this.viewModelName),this.viewModel.addValidation(C.xs)}},{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")!==R.MetadataType.Rating&&!n||!t)}},{key:"getRatingValidationMessage",value:function(){if(this.selectedMetadata.get("metadataType")!==R.MetadataType.Rating)return"";var e=this.selectedMetadata.get("metadataValue"),t=this.viewModel.get("ratingSuggestion");return t?e===t?C.nf.original():"":C.nf.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=k.M2.getSourceTypes(this.model);e=o.filter(e,(function(e){return e!==d.r.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")};l.k.logUserAction(t,{descriptor:u.SuggestionDescriptor.Edit,location:u.LocationContext.Popup,actionType:u.UserAction.Suggest,entity:u.EntityType.Video})}},{key:"dataFetched",value:function(){return!!this.model&&!!this.ratingCollection}},{key:"renderMetadataDropdown",value:function(){this.showChildView("dropdown",new g.H({collection:C.uB.translateMetadataCollectionNames(this.metadataCollection),channelName:this.channelName,childOptions:{titleProperty:"name",eventName:"select:option:click"},placeholderText:this.selectedMetadata.get("metadataType")||r.T.getPhrase(this.lang,"dropdownPlaceholder"),analyticsHelper:l.k}))}},{key:"renderSuggestEdit",value:function(){this.selectedMetadata.get("metadataType")&&this.showChildView("suggestEdit",new L({model:this.viewModel,channelName:this.channelName,ratings:this.ratingCollection,currentRating:this.viewModel.get("ratingSuggestion")?new M.i(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.metadataCollection||(this.metadataCollection=this.getMetadataCollection()),this.checkPreselection()}},{key:"viewOptions",value:function(){return{dataFetched:this.dataFetched(),spinnerEl:k.Kp.getSpinner({size:k.Ey.Large,extraClasses:"mx-auto"})}}},{key:"onRender",value:function(){this.dataFetched()&&(this.renderMetadataDropdown(),this.renderSuggestEdit())}}])&&J(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),w}(s.Q.View)},67670:function(e,t,n){"use strict";n.d(t,{v:function(){return d}});var o=n(31647),a=n(88172);function r(e){return r="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},r(e)}function i(e,t,n){return(t=l(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function 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,l(o.key),o)}}function l(e){var t=function(e,t){if("object"!==r(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,"string");if("object"!==r(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===r(t)?t:String(t)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(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&&u(e,t)}(f,e);var t,n,o,l,d=(o=f,l=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=c(o);if(l){var n=c(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function f(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),d.apply(this,arguments)}return t=f,(n=[{key:"defaults",value:function(){var e;return i(e={},a.ZV.Disabled,!0),i(e,a.ZV.Hidden,!1),e}}])&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.Q.Model)},19098:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,a){e.propertyIsEnumerable;var r,i=e.escapeExpression,s=e.lambda;return'<p class="font-weight-bold mb-0">'+i((n.lang||t&&t.lang||e.hooks.helperMissing).call(null!=t?t:e.nullContext||{},"currentType",{name:"lang",hash:{metadataType:null!=(r=null!=t?t.options:t)?r.metadataType:r},data:a}))+'</p>\n<p class="mb-3 '+i(s(null!=(r=null!=(r=null!=t?t.options:t)?r.styles:r)?r.metadataValue:r,t))+'">'+(null!=(r=s(null!=(r=null!=t?t.options:t)?r.metadataValue:r,t))?r:"")+"</p>\n"},3:function(e,t,n,o,a){var r;return e.propertyIsEnumerable,' <textarea\n id="suggest-edit"\n placeholder="'+e.escapeExpression(e.lambda(null!=(r=null!=t?t.options:t)?r.suggestionPlaceholder:r,t))+'"\n class="form-control"\n name="suggestion"\n ></textarea>\n <div class="form-feedback"></div>\n'},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,a){e.propertyIsEnumerable;var r,i=null!=t?t:e.nullContext||{},s=e.hooks.helperMissing,l=e.escapeExpression;return(null!=(r=n.unless.call(i,null!=(r=null!=t?t.options:t)?r.isOtherType:r,{name:"unless",hash:{},fn:e.program(1,a,0),inverse:e.noop,data:a}))?r:"")+'\n<div class="dropdown-divider"></div>\n\n<div class="form-group">\n <label for="suggest-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(i,"suggestionSubheading",{name:"lang",hash:{},data:a}))+'</label>\n <div class="rating-select-region"></div>\n <div class="rating-form-feedback invalid-feedback"></div>\n'+(null!=(r=n.unless.call(i,null!=(r=null!=t?t.options:t)?r.useRatingSelect:r,{name:"unless",hash:{},fn:e.program(3,a,0),inverse:e.noop,data:a}))?r:"")+'</div>\n\n<div class="form-group">\n <label for="reason-for-edit" class="font-weight-bold">'+l((n.lang||t&&t.lang||s).call(i,"reasoningSubheading",{name:"lang",hash:{},data:a}))+'</label>\n <textarea\n id="reason-for-edit"\n placeholder="'+l((n.lang||t&&t.lang||s).call(i,"reasoningPlaceholder",{name:"lang",hash:{},data:a}))+'"\n class="form-control"\n name="reason"\n ></textarea>\n <div class="form-feedback"></div>\n</div>'},useData:!0})},34651:function(e,t,n){var o=n(32227);e.exports=(o.default||o).template({1:function(e,t,n,o,a){e.propertyIsEnumerable;var r=null!=t?t:e.nullContext||{},i=e.hooks.helperMissing,s=e.escapeExpression;return"<p>"+s((n.lang||t&&t.lang||i).call(r,"guidelines",{name:"lang",hash:{},data:a}))+'</p>\n<p class="font-weight-bold mb-1">'+s((n.lang||t&&t.lang||i).call(r,"dropdownHeading",{name:"lang",hash:{},data:a}))+'</p>\n<div class="metadata-dropdown-region position-relative"></div>\n<div class="suggest-edit-region"></div>\n'},3:function(e,t,n,o,a){var r;return e.propertyIsEnumerable,(null!=(r=e.lambda(null!=(r=null!=t?t.options:t)?r.spinnerEl:r,t))?r:"")+"\n"},compiler:[8,">= 4.3.0"],main:function(e,t,n,o,a){var r;return e.propertyIsEnumerable,null!=(r=n.if.call(null!=t?t:e.nullContext||{},null!=(r=null!=t?t.options:t)?r.dataFetched:r,{name:"if",hash:{},fn:e.program(1,a,0),inverse:e.program(3,a,0),data:a}))?r:""},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6774],{86774:function(e,n,t){"use strict";t.r(n),t.d(n,{PublishLibraryView:function(){return w}});var r=t(48088),i=t(21679),o=t(
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6774],{86774:function(e,n,t){"use strict";t.r(n),t.d(n,{PublishLibraryView:function(){return w}});var r=t(48088),i=t(21679),o=t(57857),a=t(31647),l=t(69184),u=t(10101),c=t(88172),s=t(48090),f=t(61843),h=t(264),p=t(95061),y=t(48652),b=t.n(y);function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function 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,(void 0,i=function(e,n){if("object"!==g(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===g(i)?i:String(i)),r)}var i}function d(e,n){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,n){return e.__proto__=n,e},d(e,n)}function m(e){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},m(e)}var w=function(e){!function(e,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&&d(e,n)}(k,e);var n,t,a,y,w=(a=k,y=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,n=m(a);if(y){var t=m(this).constructor;e=Reflect.construct(n,arguments,t)}else e=n.apply(this,arguments);return function(e,n){if(n&&("object"===g(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,e)});function k(){return function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,k),w.apply(this,arguments)}return n=k,(t=[{key:"initialize",value:function(){this.libraryDataService=i.u.getInstance(s.Or.Library,this),this.videoDataService=i.u.getInstance(s.Or.Video,this)}},{key:"name",get:function(){return"PublishLibraryView"}},{key:"title",get:function(){return o.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.publishLibrary"}},{key:"template",get:function(){return b()}},{key:"channelName",get:function(){return f.N0.generateUniqueChannelName(this)}},{key:"behaviors",get:function(){var e=this;return[{title:o.T.getPhrase(this.lang,"heading"),behaviorClass:u.Yw,spinnerButtonOptions:{channelName:this.channelName,buttonText:o.T.getPhrase(this.lang,"continue"),onClick:function(){return e.onClickContinue()}}}]}},{key:"viewOptions",value:function(){return{hasLite:h.g.hasLite}}},{key:"onClickContinue",value:function(){var e=this;r.Radio.channel(this.channelName).trigger(c.I3.ShowSpinner);var n=0,t=function(){++n===e.libraries.length&&(e.triggerMethod("hide"),e.videoDataService.clearVideoCache(),r.Radio.channel(l.GL.LIBRARY_STATUS).trigger("status:changed"))};this.libraries.each((function(n){e.libraryDataService.publishLibrary(n.get("id"),t)}))}},{key:"requiredResources",get:function(){return{libraries:p.T.libraries}}}])&&v(n.prototype,t),Object.defineProperty(n,"prototype",{writable:!1}),k}(a.Q.View)},48652:function(e,n,t){var r=t(32227);e.exports=(r.default||r).template({1:function(e,n,t,r,i){return e.propertyIsEnumerable," <li>"+e.escapeExpression((t.lang||n&&n.lang||e.hooks.helperMissing).call(null!=n?n:e.nullContext||{},"meaning2",{name:"lang",hash:{},data:i}))+"</li>\n"},compiler:[8,">= 4.3.0"],main:function(e,n,t,r,i){e.propertyIsEnumerable;var o,a=null!=n?n:e.nullContext||{},l=e.hooks.helperMissing,u=e.escapeExpression;return"<p>"+u((t.lang||n&&n.lang||l).call(a,"infoHeading",{name:"lang",hash:{},data:i}))+"</p>\n<p>"+u((t.lang||n&&n.lang||l).call(a,"meaningSubheading",{name:"lang",hash:{},data:i}))+"</p>\n<ul>\n <li>"+u((t.lang||n&&n.lang||l).call(a,"meaning1",{name:"lang",hash:{},data:i}))+"</li>\n"+(null!=(o=t.unless.call(a,null!=(o=null!=n?n.options:n)?o.hasLite:o,{name:"unless",hash:{},fn:e.program(1,i,0),inverse:e.noop,data:i}))?o:"")+" <li>"+u((t.lang||n&&n.lang||l).call(a,"meaning3",{name:"lang",hash:{},data:i}))+"</li>\n</ul>"},useData:!0})}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6788],{36788:function(t,e,r){"use strict";r.r(e),r.d(e,{NoLibraryView:function(){return v}});var n=r(
|
|
1
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6788],{36788:function(t,e,r){"use strict";r.r(e),r.d(e,{NoLibraryView:function(){return v}});var n=r(57857),o=r(31647),i=r(80758),u=r(63791),c=r(48090),a=r(29457),f=r(2),l=r.n(f);function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(void 0,o=function(t,e){if("object"!==p(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!==p(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(n.key),"symbol"===p(o)?o:String(o)),n)}var o}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}var v=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)}(h,t);var e,r,o,f,v=(o=h,f=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=b(o);if(f){var r=b(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function h(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,h),v.apply(this,arguments)}return e=h,(r=[{key:"name",get:function(){return"NoLibraryView"}},{key:"title",get:function(){return n.T.getPhrase(this.lang,"title")}},{key:"lang",get:function(){return"libraryEditor.noLibrary"}},{key:"template",get:function(){return l()}},{key:"regions",value:function(){return{emptyState:{el:".no-library-region",replaceElement:!0}}}},{key:"behaviors",get:function(){return[{behaviorClass:i.o,region:"emptyState",type:a.ub.LibraryEditor,shouldRender:function(){return!0},componentOptions:{plusSvg:u.Nj.getSvg(u.vn.Plus),heading:n.T.getPhrase(this.lang,"emptyStateHeading"),description:n.T.getPhrase(this.lang,"emptyStateDescription"),btnText:n.T.getPhrase(this.lang,"emptyStateCta")},emptyStateComponents:c.aW}]}}])&&y(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),h}(o.Q.View)},2:function(t,e,r){var n=r(32227);t.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){return'<div class="no-library-region"></div>'},useData:!0})}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[6963],{54096:function(e,r,t){t.d(r,{G:function(){return a}});var n=t(1024),i=t(21679);function a(e){var r,t;return r=e,t=i.u.getInstance(r),n.useEffect((function(){return function(){i.u.releaseInstance(r)}})),t}},84657:function(e,r,t){t.d(r,{t:function(){return a},v:function(){return i}});var n=t(50028),i={BASE_VIDEO_COLLECTION:"thumbnail,tags,rating,series,season,owner",VIDEO_COLLECTION:"(videoCollection)",SERIES:"tallposter,rating,banner",FOLDER:"banner,thumbnail",CLASSIFICATION_COLLECTION:"banner,cover,tallPoster",CLASSIFICATION:function(e){return"banner,cover,tallPoster,thumbnail,followers{id:".concat(e,"},pinnedVideos[count()]{limit:0},playlists[count()]{limit:0},series[count()]{limit:0}")},VIDEO:"series,season,rating,producers,glance,distributors,owner,subjectPresentationAudiences,resources[thumbnail,pdf],tags,productionCompanies,directors,links,thumbnail,interactives[thumbnail,_canBeConsumed,_isClickViewContent,owner[avatar]],clips[_canBeConsumed,owner[avatar],_isClickViewContent],_canUpdate,_videoProgress,_canBeConsumed,categories[libraries],libraries,_canAddToLibrary,_restrictions",PLAYLIST:"cover,banner,owner,videos[count()]{limit:0,status:[".concat(n.X.Published,",").concat(n.X.Archived,"]},clips[count()]{limit:0},interactives[count()]{limit:0},followers[count()]{limit:0}"),PLAYLIST_COLLECTION:"videos[count()]{limit:0},interactives[count()]{limit:0},clips[count()]{limit:0},cover",CLIP:"(clip)",CLIP_COLLECTION:"(clipCollection)",INTERACTIVE:"(interactive)",LIBRARY_COLLECTION:"owner[logo]",LIBRARY:"owner[logo],categorytree"},a={CLASSIFICATION:"banner,cover,tallPoster,pinnedVideos[count()]{limit:0},playlists[count()]{limit:0},series[count()]{limit:0}",CLASSIFICATION_COLLECTION:"banner,cover,tallPoster",VIDEO:"series,season,rating,producers,glance,distributors,subjectPresentationAudiences,resources[thumbnail,pdf],tags,productionCompanies,directors,links,thumbnail,interactives[thumbnail,_canBeConsumed,_isClickViewContent],clips[_canBeConsumed,_isClickViewContent],_canBeConsumed,categories,libraries",VIDEO_COLLECTION:"thumbnail,rating,series,season,subjectPresentationAudiences,subtitles{limit:1},_canBeConsumed"}},34107:function(e,r,t){t.d(r,{D:function(){return c}});var n=t(2248),i=t(68003),a=t(40221),o=t(84657),c={domainLibraries:function(e,r,t,n){return{url:i._.urlBuilder("/api/domain/v2/me/libraries",{type:e,maxCategoryDepth:0}),key:"libraries:".concat(e.sort().join(":")),formatData:function(e){return e.map((function(e){return e.data}))},success:r,error:t,always:n}},libraryRequestLibraries:function(){return{url:"{gateway}/v1/library-requests/libraries",key:"libraries"}},librariesWithCategories:function(){return{url:i._.urlBuilder("/api/domain/v2/me/libraries",{type:["sharedLibrary","customLibrary","unpublishedCustomLibrary"],maxCategoryDepth:5}),key:"libraries:with:categories",normalize:!1}},librariesWithOwnerLogos:function(e,r,t,n){return e.sort(),{url:i._.urlBuilder("/api/domain/v2/objects",{query:o.v.LIBRARY_COLLECTION,id:e}),key:"libraries:owner:logo:".concat(e.join(",")),success:r,error:t,always:n}},library:function(e,r,t,n){return{url:i._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:o.v.LIBRARY}),key:"library:".concat(e),success:r,error:t,always:n}},exchange:function(e){return{url:i._.urlBuilder("{gateway}/v1/objects/".concat(e),{query:"categorytree"}),key:"exchange"}},librarySubscribers:function(e,r){var t={};return r&&(t.cursor=r),{url:i._.urlBuilder("{gateway}/v1/library-requests/libraries/".concat(e,"/subscribers"),t),key:"library:subscribers:".concat(e,":").concat(r)}},libraryOwner:function(e){return{url:"{gateway}/v1/library-requests/libraries/".concat(e,"/subscribers?ownerOnly=true"),key:"library:owner:".concat(e),formatData:function(e){return a.m.first(e.data)}}},updateSubscriberPermissions:function(e,r,t,i,a){return{url:"{gateway}/v1/libraries/".concat(e,"/library-request-permissions"),key:"update:subscriber:permissions:".concat(e,":").concat(r),type:n.k.PUT,data:{customerId:r,granted:t},invalidationKeys:["library:owner:".concat(e),"library:subscribers:".concat(e)],success:i,error:a}},removeSubscriber:function(e,r,t,i){return{url:"{gateway}/v1/objects/".concat(e,"/subscribedcustomers?memberId=").concat(r),key:"revoke:subscription:".concat(e,":").concat(r),type:n.k.DELETE,invalidationKeys:["library:subscribers:".concat(e)],success:t,error:i}},folder:function(e,r,t,n){return{url:"{gateway}/v1/objects/".concat(e,"?query=banner,libraries"),key:"library:folder:".concat(e),success:r,error:t,always:n}},folderParentTree:function(e,r,t,n){return{url:"/api/domain/v2/categories/".concat(e,"/parent-tree?includeAll=false"),key:"folder:parent:tree".concat(e),success:r,error:t,always:n}},childFolders:function(e,r,t,n,i){var a="{gateway}/v1/objects/".concat(e,"/categories?query={limit:100}thumbnail"),o="child:folders:".concat(e);return r&&(a+="&cursor=".concat(r),o+=":".concat(r)),{url:a,key:o,formatData:function(e){var r=e.data.sort((function(e,r){return e.name.toLowerCase().localeCompare(r.name.toLowerCase())}));return Object.assign(Object.assign({},e),{data:r})},success:t,error:n,always:i}},addToLibrary:function(e){return{url:"{gateway}/v1/library-requests",key:"add:".concat(e.objectId,":to:").concat(e.destinationLibraryId,":").concat(e.metadata.destinationCategoryId),type:n.k.POST,data:e}},libraries:function(){return{url:"{gateway}/v1/users/me/libraries",key:"objects:libraries"}}}},2491:function(e,r,t){t.d(r,{Z:function(){return o}});var n=t(92159),i=t(21186),a=t(54096);function o(){var e=(0,a.G)(n.P.ALERT);return{success:function(r){e.success(r)()},error:function(r){e.error(r)()},warning:function(r){e.createAlert({type:i.NK.Warning,heading:i.R6.Warning,message:r})}}}},82378:function(e,r,t){t.d(r,{i:function(){return a}});var n=t(1024),i=t(94223);function a(e,r){var t=e,a=r,o=(0,i.P)(e&&function(e){return t(e).key});return(0,n.useEffect)((function(){o&&o.shouldInitialFetch&&r&&a()}),[null==o?void 0:o.shouldInitialFetch,r]),(0,n.useEffect)((function(){o&&o.nextCursor&&!o.isFetching&&r&&a(o.nextCursor)}),[null==o?void 0:o.nextCursor,null==o?void 0:o.isFetching,r]),o}},94223:function(e,r,t){t.d(r,{P:function(){return u}});var n=t(1024),i=t(58566),a=t(35656),o=t(53808),c=t(86120);function s(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}function u(e,r,t){function a(e){if(e)return o.q.isFunction(r)?r(e):e.data}function u(e){var r,n;if(e)return t?t(e):null===(n=null===(r=e.pagination)||void 0===r?void 0:r.cursors)||void 0===n?void 0:n.next}return(0,i.useSelector)((0,n.useMemo)((function(){return function(r){if(o.q.isFunction(e)){for(var t=e,n=o.q.isFunction(e)&&t(),i=n&&c.a.getResponse(r,n),l=i&&i.isFetching,d=i&&i.statusCode,b=i&&i.hasCompleted,m=i&&i.shouldFetch,f=a(i&&i.data),y=u(i&&i.data),v=function(e){var r;if(e)return null===(r=e)||void 0===r?void 0:r.count}(i&&i.data);y&&(i=c.a.getResponse(r,t(y)),l=l||i.isFetching,d=i.statusCode,b=i.hasCompleted,!i.shouldFetch);){var p=a(i.data);p&&f.push.apply(f,function(e){if(Array.isArray(e))return s(e)}(g=p)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(g)||function(e,r){if(e){if("string"==typeof e)return s(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?s(e,r):void 0}}(g)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());var h=u(i.data);y=h===y?null:h}var C={shouldInitialFetch:m,items:f,nextCursor:y,isFetching:l,statusCode:d,hasCompleted:b};return"number"==typeof v&&(C.totalItems=v),C}var g}}),[e]))}a.o.Ok},91021:function(e,r,t){t.r(r),t.d(r,{RemoveLibrarySubscriberView:function(){return p}});var n=t(1024),i=t.n(n),a=t(57857),o=t(86120),c=t(52076),s=t(70065),u=t(71575),l=t(85610),d=t(66703),b=t(34107),m=t(2491),f=t(82378);function y(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=new Array(r);t<r;t++)n[t]=e[t];return n}var v="libraryRequests.removeLibrarySubscriber";function p(e){var r,t,n,p=o.a.useGetFetch(),h=(t=i().useState(!1),n=2,function(e){if(Array.isArray(e))return e}(t)||function(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,i,a,o,c=[],s=!0,u=!1;try{if(a=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;s=!1}else for(;!(s=(n=a.call(t)).done)&&(c.push(n.value),c.length!==r);s=!0);}catch(e){u=!0,i=e}finally{try{if(!s&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(u)throw i}}return c}}(t,n)||function(e,r){if(e){if("string"==typeof e)return y(e,r);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?y(e,r):void 0}}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),C=h[0],g=h[1],I=o.a.useBasicFetch(b.D.library(e.libraryId));function w(r){return b.D.librarySubscribers(e.libraryId,r)}var L=(0,f.i)(w,(function(e){p(w(e))})),A=(0,m.Z)(),O=null===(r=null==L?void 0:L.items)||void 0===r?void 0:r.find((function(r){return r.customerId===e.customerId})),k=I.hasCompleted&&!!O;return i().createElement(u.G,{title:a.T.getPhrase(v,"removeAccess"),closePopup:e.closePopup,showLoadingSpinner:!k},!!k&&i().createElement(i().Fragment,null,i().createElement("div",{className:"alert alert-info",role:"alert"},i().createElement(d.x,{namespace:v,phrase:"alert"})),i().createElement("p",null,i().createElement(d.x,{namespace:v,phrase:"removeSubscriberInfo",options:{school:O.customerName,library:I.data.name}})),i().createElement(l.u,null,i().createElement(l.u.Cancel,{onClick:e.closePopup}),i().createElement(l.u.Submit,{onClick:function(){g(!0),p(b.D.removeSubscriber(e.libraryId,e.customerId,(function(){A.success(a.T.getPhrase(v,"revokeSubscriptionSuccess",{school:O.customerName,library:I.data.name})),c.k.logUserAction({id:e.libraryId,customerId:e.customerId},{actionType:s.UserAction.Dissociate,entity:s.EntityType.Library,descriptor:s.AssocDescriptor.Customer,location:s.LocationContext.Popup,workflowPhase:s.WorkflowPhase.Complete}),e.closePopup()}),(function(){g(!1),A.error(a.T.getPhrase(v,"revokeSubscriptionError",{school:O.customerName,library:I.data.name}))})))},text:a.T.getPhrase(v,"removeAccess"),variant:"danger",showSpinner:C}))))}}}]);
|