(this.webpackJsonp=this.webpackJsonp||[]).push([[63],{"0lcf":function(e,t,n){"use strict";n.r(t);n("SchZ"),n("u3En")},"6JOy":function(e,t,n){},AubP:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=u(n("NUBc"));n("YQTV");var r=u(n("q1tI")),l=n("spEH"),o=u(n("Rs/d")),i=n("PhNK"),s=n("sYIF"),c=n("eO8H");function u(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.commits,n=e.projectsId,u=e.owner,f=e.total,d=e.limit,p=e.changeCommitFunc;return r.default.createElement("div",{className:"pb20"},t.map((function(e,t){return r.default.createElement("div",{className:"prCommits"},r.default.createElement("p",{className:"prCreate"},e.created_at),r.default.createElement("div",{className:"prInfo"},r.default.createElement(l.FlexAJ,null,r.default.createElement(l.AlignCenter,null,r.default.createElement(c.Link,{to:"/"+u+"/"+n+"/commits/"+(0,i.truncateCommitId)(""+e.sha),className:"commitKey",style:{marginLeft:0}},(0,i.truncateCommitId)(""+e.sha)),r.default.createElement("p",{className:"ml15 font-16 color-grey-3 task-hide",style:{maxWidth:"700px"}},e.message)),r.default.createElement(c.Link,{to:"/"+u+"/"+n+"/commits/"+(0,i.truncateCommitId)(e.sha),className:"color-blue"},"浏览代码")),r.default.createElement(l.AlignCenter,{className:"mt15"},r.default.createElement(o.default,{url:(0,s.getImageUrl)("/"+(e.committer&&e.committer.image_url)),name:""+(e.committer&&e.committer.name)}),r.default.createElement("span",null,":提交于",e.time_from_now))))})),f>d&&r.default.createElement("div",{style:{textAlign:"center",paddingTop:"20px"}},r.default.createElement(a.default,{pageSize:d,total:f,onChange:function(e){return p(e)}})))}},Fyak:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=u(n("ZTPi")),r=Object.assign||function(e){for(var t=1;t0&&i.default.createElement(f,{tab:i.default.createElement("span",null,i.default.createElement("span",{className:"font-16"},"提交"),h>0&&i.default.createElement("span",{className:"tabNum"},h)),key:"1"},i.default.createElement(s.default,r({},this.props,{commits:p,total:h,limit:d,changeCommitFunc:this.changeCommitFunc,projectsId:t,owner:n}))),m&&m.files&&m.files.length>0&&i.default.createElement(f,{tab:i.default.createElement("span",null,i.default.createElement("span",{className:"font-16"},"文件"),m.files_count>0&&i.default.createElement("span",{className:"tabNum"},m.files_count)),key:"3"},i.default.createElement(c.default,r({},this.props,{data:m,projectsId:t,owner:n})))))}}]),t}(o.Component);t.default=d},PhNK:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.truncateCommitId=function(e){return e&&e.length>11?e.substring(0,10):e},t.timeFormat=function(e){var t=new Date(1e3*e),n=t.getHours()<10?"0".concat(t.getHours()):t.getHours(),a=t.getMinutes()<10?"0".concat(t.getMinutes()):t.getMinutes();return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()+" "+n+":"+a}},QCvN:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=g(n("W9HT")),r=g(n("2/Rp")),l=g(n("Vl3Y")),o=g(n("5rEg")),i=g(n("mr32")),s=g(n("BvKs")),c=g(n("2fM7")),u=Object.assign||function(e){for(var t=1;t0&&e.map((function(e,a){return p.default.createElement(s.default.Item,{key:e,onClick:function(){return n.getOption(e,t)}},e)})))},n.renderSelect=function(e){if(e&&e.length>0)return e.map((function(e,t){return p.default.createElement(y,{key:t+1,value:e.id+""},e.name)}))},n.handleSubmit=function(){n.setState({isSpin:!0}),n.props.form.validateFieldsAndScroll((function(e,t){if(e)n.setState({isSpin:!1});else{var a=n.props.match.params,r=a.projectsId,l=a.mergeId,o=a.owner,i=n.props,s=i.merge,c=i.pull,f=i.merge_type,d=i.data,p=i.commits_count,h=i.files_count;t.issue_tag_ids&&t.issue_tag_ids.length>0?t.issue_tag_ids=[parseInt(t.issue_tag_ids)]:t.issue_tag_ids=[];var g=n.state,y=g.desc,v=g.atWhoLoginList;if("new"===f){var b="/"+o+"/"+r+"/pulls.json";m.default.post(b,u({},t,{body:y,head:c,base:s,is_original:d&&d.is_original,fork_project_id:d&&d.fork_project_id,merge_user_login:d&&d.merge_user_login,files_count:h,commits_count:p,receivers_login:v})).then((function(e){if(e){n.setState({isSpin:!1});var t=e.data.pull_request_number;n.props.history.push("/"+o+"/"+r+"/pulls/"+t);var a=n.props.getDetail;a&&a()}else n.setState({isSpin:!1})})).catch((function(e){n.setState({isSpin:!1})}))}else{var _="/"+o+"/"+r+"/pulls/"+l+".json";m.default.put(_,u({},t,{body:y,head:c,base:s,receivers_login:v})).then((function(e){e?(n.setState({isSpin:!1}),n.props.history.push("/"+o+"/"+r+"/pulls/"+l)):n.setState({isSpin:!1})})).catch((function(e){n.setState({isSpin:!1}),console.log(e)}))}}}))},n.onContentChange=function(e){n.setState({desc:e})},n.changeAtWhoLoginList=function(e){n.setState({atWhoLoginList:e})},n.state={desc:void 0,issue_tag_ids:void 0,fixed_version_id:void 0,assigned_to_id:void 0,titledata:void 0,isSpin:!1,mergedata:void 0,priority_id:void 0,title:void 0,members:void 0,issue_tags:void 0,issue_versions:void 0,issue_priories:void 0,atWhoLoginList:void 0},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),f(t,[{key:"render",value:function(){var e=this,t=this.props.merge_type,n=this.props.form.getFieldDecorator,s=this.props.match.params,u=s.projectsId,f=s.mergeId,d=s.owner,m=this.state,g=m.issue_tag_ids,v=m.fixed_version_id,b=m.assigned_to_id,_=m.priority_id,E=m.desc,w=m.isSpin,O=m.title,C=m.members,j=m.issue_tags,S=m.issue_versions,N=m.issue_priories;return p.default.createElement("div",null,p.default.createElement(a.default,{spinning:w},p.default.createElement("div",{className:"mb20"},p.default.createElement("span",{className:"font-16 fwb mr10 ver-middle"},"new"===t?"新建":"编辑","合并请求:"),p.default.createElement(i.default,{color:"#28BD6C",className:"ver-middle"},"可合并的")),p.default.createElement(l.default,null,p.default.createElement("div",{className:"width100 inline-block"},p.default.createElement("div",{className:"width70 pull-left"},p.default.createElement(l.default.Item,null,n("title",{rules:[{required:!0,message:"请填写请求标题"}],initialValue:O})(p.default.createElement(o.default,{placeholder:"标题",maxLength:200}))),p.default.createElement(h.default,{placeholder:"请输入合并请求的描述...",height:450,mdID:"merge-new-description",initValue:E,onChange:this.onContentChange,isCanAtme:!0,changeAtWhoLoginList:this.changeAtWhoLoginList,owner:d,projectsId:u}),p.default.createElement("p",{className:"clearfix mt20"},p.default.createElement(r.default,{type:"primary",loading:w,onClick:this.handleSubmit},p.default.createElement("span",{className:"plr10"},"new"===t?"创建":"提交")),p.default.createElement(r.default,{type:"default",className:"ml30",onClick:function(){e.props.history.push("new"===t?"/"+d+"/"+u+"/pulls":"/"+d+"/"+u+"/pulls/"+f)}},p.default.createElement("span",{className:"plr10"},"取消")))),p.default.createElement("div",{className:"width30 pull-left"},p.default.createElement("div",{className:"pl30"},p.default.createElement(l.default.Item,null,n("assigned_to_id",{initialValue:b})(p.default.createElement(c.default,{placeholder:"未选择审查人员",showSearch:!0,className:"searchIcon",suffixIcon:p.default.createElement("i",{className:"iconfont icon-sousuo1"}),optionFilterProp:"children",filterOption:function(e,t){return t.props.value&&t.props.children&&t.props.children.toLowerCase().indexOf(e.toLowerCase())>=0}},p.default.createElement(y,{key:0,value:""},"未选择审查人员"),this.renderSelect(C)))),p.default.createElement(l.default.Item,null,n("fixed_version_id",{initialValue:v})(p.default.createElement(c.default,{placeholder:S&&S.length>0?"未选择里程碑":"请添加里程碑",showSearch:!0,className:"searchIcon",suffixIcon:p.default.createElement("i",{className:"iconfont icon-sousuo1"}),optionFilterProp:"children",filterOption:function(e,t){return t.props.value&&t.props.children&&t.props.children.toLowerCase().indexOf(e.toLowerCase())>=0}},p.default.createElement(y,{key:0,value:""},S&&S.length>0?"未选择里程碑":"请添加里程碑"),this.renderSelect(S)))),p.default.createElement(l.default.Item,null,n("issue_tag_ids",{initialValue:g})(p.default.createElement(c.default,{placeholder:j&&j.length>0?"未选择标记":"请在仓库设置里添加标记",showSearch:!0,className:"searchIcon",suffixIcon:p.default.createElement("i",{className:"iconfont icon-sousuo1"}),optionFilterProp:"children",filterOption:function(e,t){return t.props.value&&t.props.children&&t.props.children.toLowerCase().indexOf(e.toLowerCase())>=0}},p.default.createElement(y,{key:0,value:""},j&&j.length>0?"未选择标记":"请在仓库设置里添加标记"),this.renderSelect(j)))),p.default.createElement(l.default.Item,null,n("priority_id",{initialValue:_})(p.default.createElement(c.default,{placeholder:"优先级",showSearch:!0},this.renderSelect(N))))))))))}}]),t}(d.Component),b=l.default.create({name:"NewMergeForm"})(v);t.default=b},"Rs/d":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,r,l=(a=["\n display:flex;\n font-weight: bold;\n ","\n align-items: center;\n & img{\n width:30px;\n height:30px;\n border-radius:50%;\n }\n ","\n "],r=["\n display:flex;\n font-weight: bold;\n ","\n align-items: center;\n & img{\n width:30px;\n height:30px;\n border-radius:50%;\n }\n ","\n "],Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(r)}}))),o=c(n("q1tI")),i=c(n("vOnD")),s=n("eO8H");function c(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.url,n=e.name,a=e.column,r=e.id,c=e.login,u=i.default.span(l,a&&"flex-direction: column;text-align:center;",!a&&"\n & span{\n margin-left:8px;\n }");return r?o.default.createElement(s.Link,{to:"/"+c},o.default.createElement(u,null,t&&o.default.createElement("img",{src:t,alt:""}),o.default.createElement("span",null,n))):o.default.createElement(u,null,t&&o.default.createElement("img",{src:t,alt:""}),o.default.createElement("span",null,n))}},VPG4:function(e,t,n){},aABL:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=u(n("3S7+")),r=u(n("CFYs")),l=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,l=void 0;try{for(var o,i=e[Symbol.iterator]();!(a=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,l=e}finally{try{!a&&i.return&&i.return()}finally{if(r)throw l}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};n("TfFZ"),n("D8SU");var o=n("q1tI"),i=u(o),s=n("PhNK"),c=n("spEH");function u(e){return e&&e.__esModule?e:{default:e}}n("js5m"),n("VPG4"),t.default=function(e){var t=e.data,n=e.history,u=e.owner,f=e.projectsId,d=e.parentsSha,p=(0,o.useState)(t&&t.files),m=l(p,2),h=m[0],g=m[1],y=(0,o.useState)("复制文件路径"),v=l(y,2),b=v[0],_=v[1],E=(0,o.useState)(!1),w=l(E,2),O=w[0],C=w[1];function j(e,t,n){if(!n){var a=h.concat();a[t].flag=!e,a.splice(),g(a)}}(0,o.useEffect)((function(){t&&g(t.files)}),[t]),(0,o.useEffect)((function(){document.addEventListener("click",(function(){C(!1)}))}),[]);var S=i.default.createElement("div",{className:"folders"},i.default.createElement("div",{className:"folderList"},h&&h.map((function(e,t){return i.default.createElement("a",{href:"#value"+t},i.default.createElement(c.FlexAJ,{className:"filesInfo",key:t,onClick:function(){e.flag&&j(e.flag,t,e.isBin),C(!1)}},i.default.createElement(c.AlignCenter,null,i.default.createElement("i",{className:"iconfont icon-wenjianicon mr4"}),i.default.createElement("span",{className:"cursor-pointer","data-clipboard-text":e.name},e.name)),i.default.createElement("div",{className:"see-file"},i.default.createElement(a.default,{placement:"top",title:e.addition+e.deletion+"处更改"+(e.addition+e.deletion>0?":":"")+(e.addition>0?e.addition+"处添加":"")+(e.addition>0&&e.deletion>0?"和":"")+(e.deletion>0?e.deletion+"处删除":"")},i.default.createElement(r.default,{showInfo:!1,strokeColor:"#2DB44D",size:"small",percent:e.addition/(e.addition+e.deletion)*100}),e.addition>0&&i.default.createElement("span",{className:"color-green ml10"},"+",e.addition),e.deletion>0&&i.default.createElement("span",{className:"color-red ml10"},"-",e.deletion)))))}))));return i.default.createElement("div",{onClick:function(e){e.nativeEvent.stopImmediatePropagation()}},i.default.createElement(c.AlignCenter,{className:"color-grey-9",style:{position:"relative"}},i.default.createElement("div",{onClick:function(){C(!O)}},i.default.createElement("i",{className:"iconfont mr5 "+(O?"font-18 icon-sanjiaoxing-down":"font-16 icon-triangle")}),i.default.createElement("span",{className:"color-grey-6 update-file-count"},"共有",i.default.createElement("span",{className:"color-grey-3"}," ",t&&t.files_count," 个文件 "),"被更改,包括",t&&t.total_addition?i.default.createElement("span",{className:"color-green"}," ",t&&t.total_addition," 次插入"):"",t&&t.total_addition&&t.total_deletion?" 和 ":"",t&&t.total_deletion?i.default.createElement("span",{className:"color-red"}," ",t&&t.total_deletion," 次删除"):"")),O&&S),h&&h.length>0&&i.default.createElement("div",{className:"fileList"},h.map((function(e,t){return i.default.createElement("div",{className:"files",key:t},i.default.createElement("a",{id:"value"+t,className:"anchorPoint"}),i.default.createElement(c.FlexAJ,{className:"filesInfo"},i.default.createElement(c.AlignCenter,null,e.isBin?"":i.default.createElement("i",{className:e.flag?"iconfont icon-triangle font-15 color-grey-9":"iconfont icon-sanjiaoxing-down color-grey-9 mt4",onClick:function(){return j(e.flag,t,e.isBin)}}),i.default.createElement("span",{className:"cursor-pointer","data-clipboard-text":e.name,onClick:function(){return j(e.flag,t,e.isBin)}},e.name),i.default.createElement(a.default,{title:b,onVisibleChange:function(){return _("复制文件路径")}},i.default.createElement("i",{className:"iconfont icon-fuzhiicon ml6",onClick:function(){return t=e.name,(n=document.createElement("input")).defaultValue=t,document.body.appendChild(n),n.select(),document.execCommand("Copy"),n.className="copyCont",n.style.display="none",void _("复制成功");var t,n}}))),i.default.createElement("div",{className:"see-file"},i.default.createElement(a.default,{placement:"top",title:e.addition+e.deletion+"处更改"+(e.addition+e.deletion>0?":":"")+" "+(e.addition>0?e.addition+"处添加":"")+(e.addition>0&&e.deletion>0?"和":"")+(e.deletion>0?e.deletion+"处删除":"")},i.default.createElement(r.default,{showInfo:!1,strokeColor:"#2DB44D",size:"small",percent:e.addition/(e.addition+e.deletion)*100}),i.default.createElement("span",{className:"ml10"},e.addition+e.deletion,"处")),!e.isSubmodule&&i.default.createElement("span",{className:"see-file-btn",onClick:function(){n.push("/"+u+"/"+f+(e.isDeleted?"/commits/"+(0,s.truncateCommitId)(d):"/tree/"+(0,s.truncateCommitId)(e.sha)+"/"+e.name))}},"查看文件"))),e.sections&&e.sections.length>=1&&!e.flag&&i.default.createElement("div",{className:"filesContent"},e.sections.map((function(e,t){return e.lines&&e.lines.length>0&&e.lines.map((function(e,n){return i.default.createElement("div",{key:t+n,className:2===e.type?"linesContent add":3===e.type?"linesContent reduce":4===e.type?"linesContent translate":"linesContent"},i.default.createElement("span",{className:"lines"},i.default.createElement("span",null,e.leftIdx&&"0"!==e.leftIdx?e.leftIdx:""),i.default.createElement("span",null,e.rightIdx&&"0"!==e.rightIdx?e.rightIdx:"")),i.default.createElement("p",null,e.content))}))}))))}))))}},js5m:function(e,t,n){},mr32:function(e,t,n){"use strict";n.r(t);var a=n("q1tI"),r=n("TSYQ"),l=n.n(r),o=n("BGR+"),i=n("VCL8"),s=n("CtXQ"),c=n("H84U");function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(){return(f=Object.assign||function(e){for(var t=1;t