mediacms/static/js/playlist.js

1 wiersz
23 KiB
JavaScript
Czysty Zwykły widok Historia

!function(){"use strict";var e={4311:function(e,t,n){var i=n(2667),a=(n(2004),n(8407),n(4458),n(5101),n(9808),n(5466)),o=(n(6116),n(2880)),r=n(1346),l=n(8204),s=(n(4426),n(8349)),u=n(5971),c=n(7801),p=n(2431),m=n(3074),f=n.n(m),d=n(1345);function y(e){return a.createElement(d.C,{items:e.media,playlistId:e.playlistId,hidePlaylistOptions:e.hidePlaylistOptions,singleLinkContent:!0,hideDate:!0,hideViews:!0,hidePlaylistOrderNumber:!1,horizontalItemsOrientation:!0,itemsCountCallback:e.itemsCountCallback,pageItems:99999,inPlaylistPage:!0})}y.propTypes={media:f().array.isRequired,playlistId:f().string.isRequired,itemsCountCallback:f().func,hidePlaylistOptions:f().bool},y.defaultProps={hidePlaylistOptions:!0};var h=n(7207),v=n(2836),g=n(8420),P=n(2331),b=n(8534),E=n(7823),C=n(3562),k=n(8852);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 _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function w(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 R(e,t,n){return t&&w(e.prototype,t),n&&w(e,n),e}function Z(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}}),t&&x(e,t)}function x(e,t){return(x=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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=I(e);if(t){var a=I(this).constructor;n=Reflect.construct(i,arguments,a)}else n=i.apply(this,arguments);return N(this,n)}}function N(e,t){return!t||"object"!==O(t)&&"function"!=typeof t?D(e):t}function D(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var L=function(e){Z(n,e);var t=S(n);function n(e){var i;return _(this,n),(i=t.call(this,e)).state={isOpenMoreOptionsMenu:!1,optionsCurrentPage:"main"},i.onPopupsDisplayChange=i.onPopupsDisplayChange.bind(D(i)),i.onOptionsPageChangeCallback=i.onOptionsPageChangeCallback.bind(D(i)),i.proceedPlaylistRemoval=i.proceedPlaylistRemoval.bind(D(i)),i.cancelPlaylistRemoval=i.cancelPlaylistRemoval.bind(D(i)),i.settingOptionsList={deleteMedia:{itemType:"open-subpage",text:"Delete",icon:"delete",buttonAttr:{className:"change-page","data-page-id":"proceedPlaylistRemovalPopup"}}},i.moreOptionsPages={main:a.createElement(v.W8,null,a.createElement(b.S,{items:[i.settingOptionsList.deleteMedia]})),proceedPlaylistRemovalPopup:a.createElement(v.W8,null,a.createElement("div",{className:"popup-message"},a.createElement("span",{className:"popup-message-title"},"Playlist removal"),a.createElement("span",{className:"popup-message-main"},"You're willing to remove playlist permanently?")),a.createElement("hr",null),a.createElement("span",{className:"popup-message-bottom"},a.createElement("button",{className:"button-link cancel-playlist-removal",onClick:i.cancelPlaylistRemoval},"CANCEL"),a.createElement("button",{className:"button-link proceed-playlist-removal",onClick:i.proceedPlaylistRemoval},"PROCEED")))},i.initMoreOptionsPopup(),i}return R(n,[{key:"initMoreOptionsPopup",value:function(){this.optionsPopup=new h.Z(a.createElement(p.M,null,a.createElement(P.O,{type:"more_horiz"})),a.createElement(C.o,{pageChangeCallback:this.onOptionsPageChangeCallback,initPage:"main",focusFirstItemOnPageChange:!1,pages:this.moreOptionsPages,pageChangeSelector:".change-page",pageIdSelectorAttr:"data-page-id"})