mediacms/static/js/liked.js
Yiannis Stergiou aa6520daac
Frontent dev env (#247)
* Added frontend development files/environment

* More items-categories related removals

* Improvements in pages templates (inc. static pages)

* Improvements in video player

* Added empty home page message + cta

* Updates in media, playlist and management pages

* Improvements in material icons font loading

* Replaced media & playlists links in frontend dev-env

* frontend package version update

* chnaged frontend dev url port

* static files update

* Changed default position of theme switcher

* enabled frontend docker container
2021-07-11 18:01:34 +03:00

1 line
6.3 KiB
JavaScript

!function(){"use strict";var e,t={510:function(e,t,n){var r=n(2541),o=n(8259);(0,r.X)("page-liked",o.LikedMediaPage)},8285:function(e,t,n){n.r(t),n.d(t,{ProfileLikedPage:function(){return b}}),n(5101),n(3080),n(2004),n(8407),n(6394),n(8288),n(5677),n(2129),n(4655);var r=n(5466),o=n(3074),i=n.n(o),u=n(3613),a=n(8578),l=n(5910),c=n(8556),f=n(6970),s=n(824);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 y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function m(e,t){return!t||"object"!==d(t)&&"function"!=typeof t?g(e):t}function g(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function h(e){return(h=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}}),t&&y(e,t)}(b,e);var t,n,o,i,d=(o=b,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=h(o);if(i){var n=h(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return m(this,e)});function b(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,b),(t=d.call(this,e,"author-liked")).state={resultsCount:null},t.getCountFunc=t.getCountFunc.bind(g(t)),t}return t=b,(n=[{key:"getCountFunc",value:function(e){this.setState({resultsCount:e})}},{key:"pageContent",value:function(){var e=this;return[this.state.author?r.createElement(c.Z,{key:"ProfilePagesHeader",author:this.state.author,type:"liked"}):null,this.state.author?r.createElement(f.Z,{key:"ProfilePagesContent"},r.createElement(u.ApiUrlConsumer,null,(function(t){return r.createElement(l.MediaListWrapper,{title:e.props.title+(null!==e.state.resultsCount?" ("+e.state.resultsCount+")":""),className:"items-list-ver"},r.createElement(s.LazyLoadItemListAsync,{itemsCountCallback:e.getCountFunc,requestUrl:t.user.liked,hideAuthor:!a.PageStore.get("config-media-item").displayAuthor,hideViews:!a.PageStore.get("config-media-item").displayViews,hideDate:!a.PageStore.get("config-media-item").displayPublishDate,canEdit:!1}))}))):null]}}])&&p(t.prototype,n),b}(n(4982).a);b.propTypes={title:i().string.isRequired},b.defaultProps={title:"Liked media"}},8259:function(e,t,n){var r=this&&this.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&r(t,e,n);return o(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.LikedMediaPage=t.AnonymousLikedMediaPage=void 0;var u=i(n(5466)),a=n(3613),l=n(8578),c=n(2546),f=n(473),s=n(5910),d=n(824),p=n(8285),y=n(7637);t.AnonymousLikedMediaPage=function(e){var t=e.id,n=void 0===t?"liked-media":t,r=e.title,o=void 0===r?l.PageStore.get("config-enabled").pages.liked.title:r,i=u.useState(null),c=i[0],f=i[1];return u.default.createElement(y.Page,{id:n},u.default.createElement(a.ApiUrlConsumer,null,(function(e){return u.default.createElement(s.MediaListWrapper,{title:o+(null!==c?" ("+c+")":""),className:"search-results-wrap items-list-hor"},u.default.createElement(d.LazyLoadItemListAsync,{singleLinkContent:!1,horizontalItemsOrientation:!0,itemsCountCallback:f,requestUrl:e.user.liked,hideViews:!l.PageStore.get("config-media-item").displayViews,hideAuthor:!l.PageStore.get("config-media-item").displayAuthor,hideDate:!l.PageStore.get("config-media-item").displayPublishDate}))})))},t.LikedMediaPage=function(){var e=c.useUser(),n=e.username,r=e.isAnonymous||!l.PageStore.get("config-options").pages.profile.includeLikedMedia;return r||(f.addClassname(document.getElementById("page-liked"),"profile-page-liked"),window.MediaCMS.profileId=n),r?u.default.createElement(t.AnonymousLikedMediaPage,null):u.default.createElement(p.ProfileLikedPage,null)}}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var i=n[e]={exports:{}};return t[e].call(i.exports,i,i.exports,r),i.exports}r.m=t,e=[],r.O=function(t,n,o,i){if(!n){var u=1/0;for(c=0;c<e.length;c++){n=e[c][0],o=e[c][1],i=e[c][2];for(var a=!0,l=0;l<n.length;l++)(!1&i||u>=i)&&Object.keys(r.O).every((function(e){return r.O[e](n[l])}))?n.splice(l--,1):(a=!1,i<u&&(u=i));a&&(e.splice(c--,1),t=o())}return t}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[n,o,i]},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,{a:t}),t},r.d=function(e,t){for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.j=41,function(){var e={41:0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,i,u=n[0],a=n[1],l=n[2],c=0;for(o in a)r.o(a,o)&&(r.m[o]=a[o]);if(l)var f=l(r);for(t&&t(n);c<u.length;c++)i=u[c],r.o(e,i)&&e[i]&&e[i][0](),e[u[c]]=0;return r.O(f)},n=self.webpackChunkmediacms_frontend=self.webpackChunkmediacms_frontend||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))}();var o=r.O(void 0,[431],(function(){return r(510)}));o=r.O(o)}();