pleroma/priv/static/packs/modals/onboarding_modal-399f44a19ddd0ddc4e9c.js

2 lines
69 KiB
JavaScript
Raw Normal View History

2017-11-12 05:23:05 -08:00
webpackJsonp([3],{150:function(e,t,n){"use strict";n.d(t,"a",function(){return h});var o=n(2),a=n.n(o),i=n(1),s=n.n(i),r=n(3),l=n.n(r),c=n(4),u=n.n(c),d=n(0),p=n.n(d),h=function(e){function t(){var n,o,a;s()(this,t);for(var i=arguments.length,r=Array(i),c=0;c<i;c++)r[c]=arguments[c];return n=o=l()(this,e.call.apply(e,[this].concat(r))),o.handleClick=function(){o.props.onClick()},a=n,l()(o,a)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.type,n=e.active,o=e.columnHeaderId,i="";return this.props.icon&&(i=a()("i",{className:"fa fa-fw fa-"+this.props.icon+" column-header__icon"})),a()("div",{role:"heading",tabIndex:"0",className:"column-header "+(n?"active":""),onClick:this.handleClick,id:o||null},void 0,i,t)},t}(p.a.PureComponent)},286:function(e,t,n){"use strict";n.d(t,"a",function(){return A});var o,a,i,s=n(2),r=n.n(s),l=n(1),c=n.n(l),u=n(3),d=n.n(u),p=n(4),h=n.n(p),g=n(0),m=n.n(g),f=n(287),v=n(101),b=n(12),y=n.n(b),_=n(5),k=n.n(_),w=n(288),C=n(290),x=n(295),j=n(6),S=n(297),M=n(298),N=n(300),D=n(302),O=n(303),z=n(305),T=n(311),P=n(33),E=n(11),R=n.n(E),F=n(100),I=(n.n(F),n(313)),q=Object(j.f)({placeholder:{id:"compose_form.placeholder",defaultMessage:"What is on your mind?"},spoiler_placeholder:{id:"compose_form.spoiler_placeholder",defaultMessage:"Write your warning here"},publish:{id:"compose_form.publish",defaultMessage:"Toot"},publishLoud:{id:"compose_form.publish_loud",defaultMessage:"{publish}!"}}),A=Object(j.g)((i=a=function(e){function t(){var n,o,a;c()(this,t);for(var i=arguments.length,s=Array(i),r=0;r<i;r++)s[r]=arguments[r];return n=o=d()(this,e.call.apply(e,[this].concat(s))),o.handleChange=function(e){o.props.onChange(e.target.value)},o.handleKeyDown=function(e){13===e.keyCode&&(e.ctrlKey||e.metaKey)&&o.handleSubmit()},o.handleSubmit=function(){o.props.text!==o.autosuggestTextarea.textarea.value&&o.props.onChange(o.autosuggestTextarea.textarea.value),o.props.onSubmit()},o.onSuggestionsClearRequested=function(){o.props.onClearSuggestions()},o.onSuggestionsFetchRequested=function(e){o.props.onFetchSuggestions(e)},o.onSuggestionSelected=function(e,t,n){o._restoreCaret=null,o.props.onSuggestionSelected(e,t,n)},o.handleChangeSpoilerText=function(e){o.props.onChangeSpoilerText(e.target.value)},o.setAutosuggestTextarea=function(e){o.autosuggestTextarea=e},o.handleEmojiPick=function(e){var t=o.autosuggestTextarea.textarea.selectionStart,n=e.native;o._restoreCaret=t+n.length+1,o.props.onPickEmoji(t,e)},a=n,d()(o,a)}return h()(t,e),t.prototype.componentWillReceiveProps=function(e){!e.is_uploading&&this.props.is_uploading&&(this._restoreCaret=this.autosuggestTextarea.textarea.selectionStart)},t.prototype.componentDidUpdate=function(e){if(this.props.focusDate!==e.focusDate||e.is_uploading&&!this.props.is_uploading&&"number"==typeof this._restoreCaret){var t=void 0,n=void 0;this.props.preselectDate!==e.preselectDate?(t=this.props.text.length,n=this.props.text.search(/\s/)+1):"number"==typeof this._restoreCaret?(n=this._restoreCaret,t=this._restoreCaret):(t=this.props.text.length,n=t),this.autosuggestTextarea.textarea.setSelectionRange(n,t),this.autosuggestTextarea.textarea.focus()}else e.is_submitting&&!this.props.is_submitting&&this.autosuggestTextarea.textarea.focus()},t.prototype.render=function(){var e=this.props,t=e.intl,n=e.onPaste,o=e.showSearch,a=this.props.is_submitting,i=[this.props.spoiler_text,Object(I.a)(this.props.text)].join(""),s="";return s="private"===this.props.privacy||"direct"===this.props.privacy?r()("span",{className:"compose-form__publish-private"},void 0,r()("i",{className:"fa fa-lock"})," ",t.formatMessage(q.publish)):"unlisted"!==this.props.privacy?t.formatMessage(q.publishLoud,{publish:t.formatMessage(q.publish)}):t.formatMessage(q.publish),r()("div",{className:"compose-form"},void 0,r()(S.a,{isVisible:this.props.spoiler,fullHeight:50},void 0,r()("div",{className:"spoiler-input"},void 0,r()("label",{},void 0,r()("span",{style:{display:"none"}},void 0,t.formatMessage(q.spoiler_placeholder)),r()("input",{placeholder:t.formatMessage(q.spoiler_placeholder),value:this.props.spo
//# sourceMappingURL=onboarding_modal-399f44a19ddd0ddc4e9c.js.map