(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[22],{PsIU:function(e,a,t){"use strict";var n=t("tAuX"),l=t("g09b");Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,t("+L6B");var d=l(t("2/Rp"));t("7Kak");var i=l(t("9yH6"));t("IzEo");var r=l(t("bx4M")),u=l(t("p0pE")),s=l(t("2Taf")),o=l(t("vZ4D")),f=l(t("l4Ni")),c=l(t("ujKo")),p=l(t("MhPg"));t("5NDa");var m=l(t("5rEg"));t("y8nQ");var g=l(t("Vl3Y")),h=n(t("q1tI")),b=t("y1Nh"),v=t("MuoO"),y=l(t("QyDL")),E=t("Y2fQ"),M=function(e,a,t,n){var l,d=arguments.length,i=d<3?a:null===n?n=Object.getOwnPropertyDescriptor(a,t):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)i=Reflect.decorate(e,a,t,n);else for(var r=e.length-1;r>=0;r--)(l=e[r])&&(i=(d<3?l(i):d>3?l(a,t,i):l(a,t))||i);return d>3&&i&&Object.defineProperty(a,t,i),i},A=g.default.Item,j=m.default.TextArea,V=function(e){return Object.keys(e).map(function(a){return e[a]}).join(",")},x=function(e){function a(){var e;return(0,s.default)(this,a),e=(0,f.default)(this,(0,c.default)(a).apply(this,arguments)),e.state={updateModalVisible:!1,formValues:{},updateFormValues:{id:0,value:""}},e.columns=[{title:(0,E.formatMessage)({id:"Name"}),dataIndex:"name"},{title:"\u503c",dataIndex:"value"},{title:(0,E.formatMessage)({id:"Handle"}),width:110,render:function(a,t){return h.default.createElement(h.Fragment,null,h.default.createElement("a",{onClick:function(){return e.handleUpdateModalVisible(!0,t)}},(0,E.formatMessage)({id:"Edit"})))}}],e.handleStandardTableChange=function(a,t,n){var l=e.props.dispatch,d=e.state.formValues,i=Object.keys(t).reduce(function(e,a){var n=(0,u.default)({},e);return n[a]=V(t[a]),n},{}),r=(0,u.default)({currentPage:a.current,pageSize:a.pageSize},d,i);n.field&&(r.sorter="".concat(n.field,"_").concat(n.order)),l({type:"adminAndconfigAndindex/fetch",payload:r})},e.handleUpdateModalVisible=function(a,t){e.setState({updateModalVisible:!!a,updateFormValues:t||{id:0,value:""}})},e.handleUpdate=function(a){var t=e.props.dispatch;t({type:"adminAndconfigAndindex/update",payload:a}),e.handleUpdateModalVisible()},e.handleSubmit=function(a){var t=e.props,n=t.adminAndconfigAndindex.data,l=t.dispatch,d=t.form;a.preventDefault(),d.validateFieldsAndScroll(function(e,a){e||Object.keys(a).forEach(function(e){a[e]!==n.list[e].value&&l({type:"adminAndconfigAndindex/update",payload:{id:e,value:a[e]}})})})},e}return(0,p.default)(a,e),(0,o.default)(a,[{key:"componentDidMount",value:function(){var e=this.props.dispatch;e({type:"adminAndconfigAndindex/fetch"})}},{key:"render",value:function(){var e=this.props,a=e.adminAndconfigAndindex.data,t=e.form.getFieldDecorator,n=this.state,l=n.updateModalVisible,u=n.updateFormValues,s={handleUpdateModalVisible:this.handleUpdateModalVisible,handleUpdate:this.handleUpdate},o={labelCol:{xs:{span:24},sm:{span:7}},wrapperCol:{xs:{span:24},sm:{span:12},md:{span:10}}},f={wrapperCol:{xs:{span:24,offset:0},sm:{span:10,offset:7}}};return 0===a.list.length?h.default.createElement(b.PageHeaderWrapper,null):h.default.createElement(b.PageHeaderWrapper,null,h.default.createElement(r.default,{bordered:!1},h.default.createElement(g.default,{onSubmit:this.handleSubmit,hideRequiredMark:!0,style:{marginTop:8}},h.default.createElement(A,Object.assign({},o,{label:(0,E.formatMessage)({id:"Select Plugin"})}),t("168",{rules:[{required:!0}],initialValue:a.list[168].value})(h.default.createElement(i.default.Group,null,h.default.createElement(i.default,{value:"jssocials"},"jssocials"),h.default.createElement(i.default,{value:"sharejs"},"sharejs")))),h.default.createElement(A,Object.assign({},o,{label:(0,E.formatMessage)({id:"jsSocials Config"})}),t("169",{rules:[{required:!0}],initialValue:a.list[169].value})(h.default.createElement(j,null))),h.default.createElement(A,Object.assign({},o,{label:(0,E.formatMessage)({id:"ShareJs Config"})}),t("170",{rules:[{required:!0}],initialValue:a.list[170].value})(h.default.createElement(j,null))),h.default.createElement(A,Object.assign({},f,{style:{marginTop:32}}),h.default.createElement(d.default,{type:"primary",htmlType:"submit"},(0,E.formatMessage)({id:"Submit"}))))),h.default.createElement(y.default,Object.assign({},s,{updateModalVisible:l,updateFormValues:u})))}}]),a}(h.Component);x=M([(0,v.connect)(function(e){var a=e.adminAndconfigAndindex,t=e.loading;return{adminAndconfigAndindex:a,loading:t.models.adminAndconfigAndindex}})],x);var O=g.default.create()(x);a.default=O}}]);