X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=priv%2Fstatic%2Fpacks%2Ffeatures%2Fdomain_blocks.js;h=d62bced9be002051848cfd9b596563758a0506f9;hb=00d43333735acbcadc1dd04ff793f4ce6e8eecb1;hp=7b36d8fd8f677766e251430a7430a34ede5baa4f;hpb=726b131b0a675a1116e579e0c1adbed8e5a1a856;p=akkoma diff --git a/priv/static/packs/features/domain_blocks.js b/priv/static/packs/features/domain_blocks.js index 7b36d8fd8..d62bced9b 100644 --- a/priv/static/packs/features/domain_blocks.js +++ b/priv/static/packs/features/domain_blocks.js @@ -1,2 +1,2 @@ -webpackJsonp([12],{1013:function(t,n,e){"use strict";var o=e(2),i=e.n(o),r=e(1014),a=e.n(r),s=e(0),c=(e.n(s),e(9)),l=e(158),u=e(7),d=e(1015),h=e(26),p=Object(u.f)({blockDomainConfirm:{id:"confirmations.domain_block.confirm",defaultMessage:"Hide entire domain"}}),f=function(){return function(t,n){return a()(n),{}}},b=function(t,n){var e=n.intl;return{onBlockDomain:function(n){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,n)}}),confirm:e.formatMessage(p.blockDomainConfirm),onConfirm:function(){return t(Object(l.e)(n))}}))},onUnblockDomain:function(n){t(Object(l.h)(n))}}};n.a=Object(u.g)(Object(c.connect)(f,b)(d.a))},1014:function(t,n,e){"use strict";n.__esModule=!0,n.default=function(t){if(null==t)throw new TypeError("Cannot destructure undefined")}},1015:function(t,n,e){"use strict";e.d(n,"a",function(){return O});var o,i,r,a=e(2),s=e.n(a),c=e(1),l=e.n(c),u=e(3),d=e.n(u),h=e(4),p=e.n(h),f=e(0),b=(e.n(f),e(5)),v=e.n(b),m=e(23),g=e(7),y=e(12),k=e.n(y),C=Object(g.f)({unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),O=Object(g.g)((r=i=function(t){function n(){var e,o,i;l()(this,n);for(var r=arguments.length,a=Array(r),s=0;st.scrollHeight-n-t.clientHeight&&o.props.onLoadMore&&!o.props.isLoading&&o.props.onLoadMore(),n<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=e,u()(o,i)}return h()(n,t),n.prototype.componentDidMount=function(){this.attachScrollListener(),this.attachIntersectionObserver(),Object(I.a)(this.onFullScreenChange),this.handleScroll()},n.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},n.prototype.componentDidUpdate=function(t,n,e){if(null!==e){var o=this.node.scrollHeight-e;this.node.scrollTop!==o&&(this.node.scrollTop=o)}},n.prototype.componentWillUnmount=function(){this.detachScrollListener(),this.detachIntersectionObserver(),Object(I.b)(this.onFullScreenChange)},n.prototype.attachIntersectionObserver=function(){this.intersectionObserverWrapper.connect({root:this.node,rootMargin:"300% 0px"})},n.prototype.detachIntersectionObserver=function(){this.intersectionObserverWrapper.disconnect()},n.prototype.attachScrollListener=function(){this.node.addEventListener("scroll",this.handleScroll)},n.prototype.detachScrollListener=function(){this.node.removeEventListener("scroll",this.handleScroll)},n.prototype.getFirstChildKey=function(t){var n=t.children,e=n;return n instanceof S.List?e=n.get(0):Array.isArray(n)&&(e=n[0]),e&&e.key},n.prototype.render=function(){var t=this,n=this.props,e=n.children,o=n.scrollKey,i=n.trackScroll,r=n.shouldUpdateScroll,s=n.isLoading,c=n.hasMore,l=n.prepend,u=n.emptyMessage,d=n.onLoadMore,h=this.state.fullscreen,p=v.a.Children.count(e),f=c&&p>0&&d?a()(C.a,{visible:!s,onClick:this.handleLoadMore}):null,b=null;return b=s||p>0||!u?v.a.createElement("div",{className:_()("scrollable",{fullscreen:h}),ref:this.setRef},a()("div",{role:"feed",className:"item-list"},void 0,l,v.a.Children.map(this.props.children,function(n,e){return a()(k.a,{id:n.key,index:e,listLength:p,intersectionObserverWrapper:t.intersectionObserverWrapper,saveHeightKey:i?t.context.router.route.location.key+":"+o:null},n.key,n)}),f)):v.a.createElement("div",{className:"empty-column-indicator",ref:this.setRef},u),i?a()(m.a,{scrollKey:o,shouldUpdateScroll:r},void 0,b):b},n}(b.PureComponent),o.contextTypes={router:y.a.object},o.defaultProps={trackScroll:!0},i)},288:function(t,n,e){"use strict";var o=e(9),i=e(289),r=e(94),a=function(t,n){return{cachedHeight:t.getIn(["height_cache",n.saveHeightKey,n.id])}},s=function(t){return{onHeightChange:function(n,e,o){t(Object(r.d)(n,e,o))}}};n.a=Object(o.connect)(a,s)(i.a)},289:function(t,n,e){"use strict";e.d(n,"a",function(){return v});var o=e(1),i=e.n(o),r=e(3),a=e.n(r),s=e(4),c=e.n(s),l=e(0),u=e.n(l),d=e(290),h=e(292),p=e(8),f=(e.n(p),["id","index","listLength"]),b=["id","index","listLength","cachedHeight"],v=function(t){function n(){var e,o,r;i()(this,n);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=e(291),a=e.n(r),s=new a.a,c=!1;n.a=i},291:function(t,n,e){"use strict";function o(){this.length=0}o.prototype.push=function(t){var n={item:t};this.last?this.last=this.last.next=n:this.last=this.first=n,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,n){t=void 0===t?0:t,n=void 0===n?1/0:n;for(var e=[],o=0,i=this.first;i&&!(--n<0);i=i.next)++o>t&&e.push(i.item);return e},t.exports=o},292:function(t,n,e){"use strict";function o(t){if("boolean"!=typeof i){var n=t.target.getBoundingClientRect(),e=t.boundingClientRect;i=n.height!==e.height||n.top!==e.top||n.width!==e.width||n.bottom!==e.bottom||n.left!==e.left||n.right!==e.right}return i?t.target.getBoundingClientRect():t.boundingClientRect}var i=void 0;n.a=o},293:function(t,n,e){"use strict";var o=e(1),i=e.n(o),r=function(){function t(){i()(this,t),this.callbacks={},this.observerBacklog=[],this.observer=null}return t.prototype.connect=function(t){var n=this,e=function(t){t.forEach(function(t){var e=t.target.getAttribute("data-id");n.callbacks[e]&&n.callbacks[e](t)})};this.observer=new IntersectionObserver(e,t),this.observerBacklog.forEach(function(t){var e=t[0],o=t[1],i=t[2];n.observe(e,o,i)}),this.observerBacklog=null},t.prototype.observe=function(t,n,e){this.observer?(this.callbacks[t]=e,this.observer.observe(n)):this.observerBacklog.push([t,n,e])},t.prototype.unobserve=function(t,n){this.observer&&(delete this.callbacks[t],this.observer.unobserve(n))},t.prototype.disconnect=function(){this.observer&&(this.callbacks={},this.observer.disconnect(),this.observer=null)},t}();n.a=r},297:function(t,n,e){"use strict";e.d(n,"a",function(){return f});var o=e(2),i=e.n(o),r=e(1),a=e.n(r),s=e(3),c=e.n(s),l=e(4),u=e.n(l),d=e(0),h=(e.n(d),e(7)),p=e(285),f=function(t){function n(){return a()(this,n),c()(this,t.apply(this,arguments))}return u()(n,t),n.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"})))},n}(p.a)},847:function(t,n,e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),e.d(n,"default",function(){return A});var o,i,r,a,s=e(2),c=e.n(s),l=e(1),u=e.n(l),d=e(3),h=e.n(d),p=e(4),f=e.n(p),b=e(32),v=e.n(b),m=e(0),g=(e.n(m),e(9)),y=e(14),k=e.n(y),C=e(5),O=e.n(C),S=e(298),M=e(283),_=e(297),I=e(1013),j=e(158),H=e(7),L=e(12),w=e.n(L),N=e(287),R=Object(H.f)({heading:{id:"column.domain_blocks",defaultMessage:"Hidden domains"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"}}),x=function(t){return{domains:t.getIn(["domain_lists","blocks","items"])}},A=(o=Object(g.connect)(x))(i=Object(H.g)((a=r=function(t){function n(){var e,o,i;u()(this,n);for(var r=arguments.length,a=Array(r),s=0;s