akkoma/priv/static/packs/features/lists.js
2018-08-12 18:02:43 +02:00

2 lines
6.9 KiB
JavaScript

webpackJsonp([20],{155:function(n,t,e){"use strict";e.d(t,"a",function(){return b});var i=e(2),o=e.n(i),a=e(1),r=e.n(a),l=e(3),c=e.n(l),s=e(4),u=e.n(s),d=e(0),f=e.n(d),h=e(10),p=e.n(h),b=function(n){function t(){var e,i,o;r()(this,t);for(var a=arguments.length,l=Array(a),s=0;s<a;s++)l[s]=arguments[s];return e=i=c()(this,n.call.apply(n,[this].concat(l))),i.handleClick=function(){i.props.onClick()},o=e,c()(i,o)}return u()(t,n),t.prototype.render=function(){var n=this.props,t=n.icon,e=n.type,i=n.active,a=n.columnHeaderId,r="";return t&&(r=o()("i",{className:"fa fa-fw fa-"+t+" column-header__icon"})),o()("h1",{className:p()("column-header",{active:i}),id:a||null},void 0,o()("button",{onClick:this.handleClick},void 0,r,e))},t}(f.a.PureComponent)},274:function(n,t,e){"use strict";e.d(t,"a",function(){return g});var i=e(2),o=e.n(i),a=e(1),r=e.n(a),l=e(3),c=e.n(l),s=e(4),u=e.n(s),d=e(32),f=e.n(d),h=e(0),p=e.n(h),b=e(155),m=e(91),v=e(43),g=function(n){function t(){var e,i,o;r()(this,t);for(var a=arguments.length,l=Array(a),s=0;s<a;s++)l[s]=arguments[s];return e=i=c()(this,n.call.apply(n,[this].concat(l))),i.handleHeaderClick=function(){var n=i.node.querySelector(".scrollable");n&&(i._interruptScrollAnimation=Object(m.b)(n))},i.handleScroll=f()(function(){void 0!==i._interruptScrollAnimation&&i._interruptScrollAnimation()},200),i.setRef=function(n){i.node=n},o=e,c()(i,o)}return u()(t,n),t.prototype.scrollTop=function(){var n=this.node.querySelector(".scrollable");n&&(this._interruptScrollAnimation=Object(m.b)(n))},t.prototype.render=function(){var n=this.props,t=n.heading,e=n.icon,i=n.children,a=n.active,r=n.hideHeadingOnMobile,l=t&&(!r||r&&!Object(v.b)(window.innerWidth)),c=l&&t.replace(/ /g,"-"),s=l&&o()(b.a,{icon:e,active:a,type:t,onClick:this.handleHeaderClick,columnHeaderId:c});return p.a.createElement("div",{ref:this.setRef,role:"region","aria-labelledby":c,className:"column",onScroll:this.handleScroll},s,i)},t}(p.a.PureComponent)},276:function(n,t,e){"use strict";e.d(t,"a",function(){return g});var i,o,a=e(2),r=e.n(a),l=e(1),c=e.n(l),s=e(3),u=e.n(s),d=e(4),f=e.n(d),h=e(0),p=e.n(h),b=e(7),m=e(5),v=e.n(m),g=(o=i=function(n){function t(){var e,i,o;c()(this,t);for(var a=arguments.length,r=Array(a),l=0;l<a;l++)r[l]=arguments[l];return e=i=u()(this,n.call.apply(n,[this].concat(r))),i.handleClick=function(){window.history&&1===window.history.length?i.context.router.history.push("/"):i.context.router.history.goBack()},o=e,u()(i,o)}return f()(t,n),t.prototype.render=function(){return r()("button",{onClick:this.handleClick,className:"column-back-button"},void 0,r()("i",{className:"fa fa-fw fa-chevron-left column-back-button__icon"}),r()(b.b,{id:"column_back_button.label",defaultMessage:"Back"}))},t}(p.a.PureComponent),i.contextTypes={router:v.a.object},o)},288:function(n,t,e){"use strict";e.d(t,"a",function(){return p});var i=e(2),o=e.n(i),a=e(1),r=e.n(a),l=e(3),c=e.n(l),s=e(4),u=e.n(s),d=e(0),f=(e.n(d),e(7)),h=e(276),p=function(n){function t(){return r()(this,t),c()(this,n.apply(this,arguments))}return u()(t,n),t.prototype.render=function(){return o()("div",{className:"column-back-button--slim"},void 0,o()("div",{role:"button",tabIndex:"0",onClick:this.handleClick,className:"column-back-button column-back-button--slim-button"},void 0,o()("i",{className:"fa fa-fw fa-chevron-left column-back-button__icon"}),o()(f.b,{id:"column_back_button.label",defaultMessage:"Back"})))},t}(h.a)},817:function(n,t,e){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),e.d(t,"default",function(){return R});var i,o,a,r,l=e(2),c=e.n(l),s=e(1),u=e.n(s),d=e(3),f=e.n(d),h=e(4),p=e.n(h),b=e(0),m=(e.n(b),e(9)),v=e(5),g=e.n(v),k=e(14),y=e.n(k),C=e(289),_=e(274),N=e(288),j=e(96),S=e(7),w=e(12),O=e.n(w),M=e(897),x=e(898),A=e(997),q=e(95),H=(e.n(q),Object(S.f)({heading:{id:"column.lists",defaultMessage:"Lists"},subheading:{id:"lists.subheading",defaultMessage:"Your lists"}})),I=Object(q.createSelector)([function(n){return n.get("lists")}],function(n){return n?n.toList().filter(function(n){return!!n}).sort(function(n,t){return n.get("title").localeCompare(t.get("title"))}):n}),P=function(n){return{lists:I(n)}},R=(i=Object(m.connect)(P))(o=Object(S.g)((r=a=function(n){function t(){return u()(this,t),f()(this,n.apply(this,arguments))}return p()(t,n),t.prototype.componentWillMount=function(){this.props.dispatch(Object(j.C)())},t.prototype.render=function(){var n=this.props,t=n.intl,e=n.lists;return e?c()(_.a,{icon:"list-ul",heading:t.formatMessage(H.heading)},void 0,c()(N.a,{}),c()(A.a,{}),c()("div",{className:"scrollable"},void 0,c()(x.a,{text:t.formatMessage(H.subheading)}),e.map(function(n){return c()(M.a,{to:"/timelines/list/"+n.get("id"),icon:"list-ul",text:n.get("title")},n.get("id"))}))):c()(_.a,{},void 0,c()(C.a,{}))},t}(O.a),a.propTypes={params:g.a.object.isRequired,dispatch:g.a.func.isRequired,lists:y.a.list,intl:g.a.object.isRequired},o=r))||o)||o},897:function(n,t,e){"use strict";var i=e(2),o=e.n(i),a=e(0),r=(e.n(a),e(44)),l=function(n){var t=n.icon,e=n.text,i=n.to,a=n.href,l=n.method,c=n.badge,s=void 0!==c?o()("span",{className:"column-link__badge"},void 0,c):null;return a?o()("a",{href:a,className:"column-link","data-method":l},void 0,o()("i",{className:"fa fa-fw fa-"+t+" column-link__icon"}),e,s):o()(r.b,{to:i,className:"column-link"},void 0,o()("i",{className:"fa fa-fw fa-"+t+" column-link__icon"}),e,s)};t.a=l},898:function(n,t,e){"use strict";var i=e(2),o=e.n(i),a=e(0),r=(e.n(a),function(n){var t=n.text;return o()("div",{className:"column-subheading"},void 0,t)});t.a=r},997:function(n,t,e){"use strict";e.d(t,"a",function(){return _});var i,o,a=e(2),r=e.n(a),l=e(1),c=e.n(l),s=e(3),u=e.n(s),d=e(4),f=e.n(d),h=e(0),p=e.n(h),b=e(9),m=e(96),v=e(23),g=e(7),k=Object(g.f)({label:{id:"lists.new.title_placeholder",defaultMessage:"New list title"},title:{id:"lists.new.create",defaultMessage:"Add list"}}),y=function(n){return{value:n.getIn(["listEditor","title"]),disabled:n.getIn(["listEditor","isSubmitting"])}},C=function(n){return{onChange:function(t){return n(Object(m.w)(t))},onSubmit:function(){return n(Object(m.G)(!0))}}},_=(i=Object(b.connect)(y,C))(o=Object(g.g)(o=function(n){function t(){var e,i,o;c()(this,t);for(var a=arguments.length,r=Array(a),l=0;l<a;l++)r[l]=arguments[l];return e=i=u()(this,n.call.apply(n,[this].concat(r))),i.handleChange=function(n){i.props.onChange(n.target.value)},i.handleSubmit=function(n){n.preventDefault(),i.props.onSubmit()},i.handleClick=function(){i.props.onSubmit()},o=e,u()(i,o)}return f()(t,n),t.prototype.render=function(){var n=this.props,t=n.value,e=n.disabled,i=n.intl,o=i.formatMessage(k.label),a=i.formatMessage(k.title);return r()("form",{className:"column-inline-form",onSubmit:this.handleSubmit},void 0,r()("label",{},void 0,r()("span",{style:{display:"none"}},void 0,o),r()("input",{className:"setting-text",value:t,disabled:e,onChange:this.handleChange,placeholder:o})),r()(v.a,{disabled:e,icon:"plus",title:a,onClick:this.handleClick}))},t}(p.a.PureComponent))||o)||o}});
//# sourceMappingURL=lists.js.map