X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=priv%2Fstatic%2Fpacks%2Ffeatures%2Fdomain_blocks.js;h=ce1ddc6d2441006145d2466c29fd80b4916f0e6e;hb=04b1c135543965860029557fc216eb38fd63b6c7;hp=51f9a96a99e6dbe443ed24e20b12b338cd6ca6d5;hpb=4a612b8c1b4c6a499f34ad7110f1eeda537bc878;p=akkoma diff --git a/priv/static/packs/features/domain_blocks.js b/priv/static/packs/features/domain_blocks.js index 51f9a96a9..ce1ddc6d2 100644 --- a/priv/static/packs/features/domain_blocks.js +++ b/priv/static/packs/features/domain_blocks.js @@ -1,2 +1,2 @@ -webpackJsonp([12],{1004:function(t,e,n){"use strict";var o=n(2),i=n.n(o),r=n(1005),a=n.n(r),s=n(0),c=(n.n(s),n(9)),l=n(160),u=n(7),d=n(1006),h=n(26),p=Object(u.f)({blockDomainConfirm:{id:"confirmations.domain_block.confirm",defaultMessage:"Hide entire domain"}}),f=function(){return function(t,e){return a()(e),{}}},b=function(t,e){var n=e.intl;return{onBlockDomain:function(e){t(Object(h.d)("CONFIRM",{message:i()(u.b,{id:"confirmations.domain_block.message",defaultMessage:"Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable.",values:{domain:i()("strong",{},void 0,e)}}),confirm:n.formatMessage(p.blockDomainConfirm),onConfirm:function(){return t(Object(l.e)(e))}}))},onUnblockDomain:function(e){t(Object(l.h)(e))}}};e.a=Object(u.g)(Object(c.connect)(f,b)(d.a))},1005:function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t){if(null==t)throw new TypeError("Cannot destructure undefined")}},1006:function(t,e,n){"use strict";n.d(e,"a",function(){return O});var o,i,r,a=n(2),s=n.n(a),c=n(1),l=n.n(c),u=n(3),d=n.n(u),h=n(4),p=n.n(h),f=n(0),b=(n.n(f),n(5)),v=n.n(b),m=n(23),g=n(7),y=n(12),k=n.n(y),C=Object(g.f)({unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),O=Object(g.g)((r=i=function(t){function e(){var n,o,i;l()(this,e);for(var r=arguments.length,a=Array(r),s=0;st.scrollHeight-e-t.clientHeight&&o.props.onLoadMore&&!o.props.isLoading&&o.props.onLoadMore(),e<100&&o.props.onScrollToTop?o.props.onScrollToTop():o.props.onScroll&&o.props.onScroll()}},150,{trailing:!0}),o.onFullScreenChange=function(){o.setState({fullscreen:Object(I.d)()})},o.setRef=function(t){o.node=t},o.handleLoadMore=function(t){t.preventDefault(),o.props.onLoadMore()},i=n,u()(o,i)}return h()(e,t),e.prototype.componentDidMount=function(){this.attachScrollListener(),this.attachIntersectionObserver(),Object(I.a)(this.onFullScreenChange),this.handleScroll()},e.prototype.getSnapshotBeforeUpdate=function(t){return v.a.Children.count(t.children)>0&&v.a.Children.count(t.children)0?this.node.scrollHeight-this.node.scrollTop:null},e.prototype.componentDidUpdate=function(t,e,n){if(null!==n){var o=this.node.scrollHeight-n;this.node.scrollTop!==o&&(this.node.scrollTop=o)}},e.prototype.componentWillUnmount=function(){this.detachScrollListener(),this.detachIntersectionObserver(),Object(I.b)(this.onFullScreenChange)},e.prototype.attachIntersectionObserver=function(){this.intersectionObserverWrapper.connect({root:this.node,rootMargin:"300% 0px"})},e.prototype.detachIntersectionObserver=function(){this.intersectionObserverWrapper.disconnect()},e.prototype.attachScrollListener=function(){this.node.addEventListener("scroll",this.handleScroll)},e.prototype.detachScrollListener=function(){this.node.removeEventListener("scroll",this.handleScroll)},e.prototype.getFirstChildKey=function(t){var e=t.children,n=e;return e instanceof S.List?n=e.get(0):Array.isArray(e)&&(n=e[0]),n&&n.key},e.prototype.render=function(){var t=this,e=this.props,n=e.children,o=e.scrollKey,i=e.trackScroll,r=e.shouldUpdateScroll,s=e.isLoading,c=e.hasMore,l=e.prepend,u=e.alwaysPrepend,d=e.emptyMessage,h=e.onLoadMore,p=this.state.fullscreen,f=v.a.Children.count(n),b=c&&f>0&&h?a()(C.a,{visible:!s,onClick:this.handleLoadMore}):null,g=null;return g=s||f>0||!d?v.a.createElement("div",{className:_()("scrollable",{fullscreen:p}),ref:this.setRef},a()("div",{role:"feed",className:"item-list"},void 0,l,v.a.Children.map(this.props.children,function(e,n){return a()(k.a,{id:e.key,index:n,listLength:f,intersectionObserverWrapper:t.intersectionObserverWrapper,saveHeightKey:i?t.context.router.route.location.key+":"+o:null},e.key,e)}),b)):a()("div",{style:{flex:"1 1 auto",display:"flex",flexDirection:"column"}},void 0,u&&l,v.a.createElement("div",{className:"empty-column-indicator",ref:this.setRef},d)),i?a()(m.a,{scrollKey:o,shouldUpdateScroll:r},void 0,g):g},e}(b.PureComponent),o.contextTypes={router:y.a.object},o.defaultProps={trackScroll:!0},i)},279:function(t,e,n){"use strict";var o=n(9),i=n(280),r=n(94),a=function(t,e){return{cachedHeight:t.getIn(["height_cache",e.saveHeightKey,e.id])}},s=function(t){return{onHeightChange:function(e,n,o){t(Object(r.d)(e,n,o))}}};e.a=Object(o.connect)(a,s)(i.a)},280:function(t,e,n){"use strict";n.d(e,"a",function(){return v});var o=n(1),i=n.n(o),r=n(3),a=n.n(r),s=n(4),c=n.n(s),l=n(0),u=n.n(l),d=n(281),h=n(283),p=n(8),f=(n.n(p),["id","index","listLength"]),b=["id","index","listLength","cachedHeight"],v=function(t){function e(){var n,o,r;i()(this,e);for(var s=arguments.length,c=Array(s),l=0;l0;)s.shift()();s.length?requestIdleCallback(o):c=!1}function i(t){s.push(t),c||(c=!0,requestIdleCallback(o))}var r=n(282),a=n.n(r),s=new a.a,c=!1;e.a=i},282:function(t,e,n){"use strict";function o(){this.length=0}o.prototype.push=function(t){var e={item:t};this.last?this.last=this.last.next=e:this.last=this.first=e,this.length++},o.prototype.shift=function(){var t=this.first;if(t)return this.first=t.next,--this.length||(this.last=void 0),t.item},o.prototype.slice=function(t,e){t=void 0===t?0:t,e=void 0===e?1/0:e;for(var n=[],o=0,i=this.first;i&&!(--e<0);i=i.next)++o>t&&n.push(i.item);return n},t.exports=o},283:function(t,e,n){"use strict";function o(t){if("boolean"!=typeof i){var e=t.target.getBoundingClientRect(),n=t.boundingClientRect;i=e.height!==n.height||e.top!==n.top||e.width!==n.width||e.bottom!==n.bottom||e.left!==n.left||e.right!==n.right}return i?t.target.getBoundingClientRect():t.boundingClientRect}var i=void 0;e.a=o},284:function(t,e,n){"use strict";var o=n(1),i=n.n(o),r=function(){function t(){i()(this,t),this.callbacks={},this.observerBacklog=[],this.observer=null}return t.prototype.connect=function(t){var e=this,n=function(t){t.forEach(function(t){var n=t.target.getAttribute("data-id");e.callbacks[n]&&e.callbacks[n](t)})};this.observer=new IntersectionObserver(n,t),this.observerBacklog.forEach(function(t){var n=t[0],o=t[1],i=t[2];e.observe(n,o,i)}),this.observerBacklog=null},t.prototype.observe=function(t,e,n){this.observer?(this.callbacks[t]=n,this.observer.observe(e)):this.observerBacklog.push([t,e,n])},t.prototype.unobserve=function(t,e){this.observer&&(delete this.callbacks[t],this.observer.unobserve(e))},t.prototype.disconnect=function(){this.observer&&(this.callbacks={},this.observer.disconnect(),this.observer=null)},t}();e.a=r},288:function(t,e,n){"use strict";n.d(e,"a",function(){return f});var o=n(2),i=n.n(o),r=n(1),a=n.n(r),s=n(3),c=n.n(s),l=n(4),u=n.n(l),d=n(0),h=(n.n(d),n(7)),p=n(276),f=function(t){function e(){return a()(this,e),c()(this,t.apply(this,arguments))}return u()(e,t),e.prototype.render=function(){return i()("div",{className:"column-back-button--slim"},void 0,i()("div",{role:"button",tabIndex:"0",onClick:this.handleClick,className:"column-back-button column-back-button--slim-button"},void 0,i()("i",{className:"fa fa-fw fa-chevron-left column-back-button__icon"}),i()(h.b,{id:"column_back_button.label",defaultMessage:"Back"})))},e}(p.a)},832:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),n.d(e,"default",function(){return A});var o,i,r,a,s=n(2),c=n.n(s),l=n(1),u=n.n(l),d=n(3),h=n.n(d),p=n(4),f=n.n(p),b=n(32),v=n.n(b),m=n(0),g=(n.n(m),n(9)),y=n(14),k=n.n(y),C=n(5),O=n.n(C),S=n(289),M=n(274),_=n(288),I=n(1004),j=n(160),H=n(7),L=n(12),w=n.n(L),x=n(278),N=Object(H.f)({heading:{id:"column.domain_blocks",defaultMessage:"Hidden domains"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),R=function(t){return{domains:t.getIn(["domain_lists","blocks","items"])}},A=(o=Object(g.connect)(R))(i=Object(H.g)((a=r=function(t){function e(){var n,o,i;u()(this,e);for(var r=arguments.length,a=Array(r),s=0;s