Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
org.mockserver.dashboard.static.js.main.3a73a63b.chunk.js Maven / Gradle / Ivy
(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{358:function(e,t,a){e.exports=a(713)},362:function(e,t,a){e.exports=a(712)},47:function(e,t,a){"use strict";a.d(t,"a",function(){return n}),a.d(t,"d",function(){return i}),a.d(t,"f",function(){return r}),a.d(t,"c",function(){return l}),a.d(t,"g",function(){return o}),a.d(t,"b",function(){return c}),a.d(t,"e",function(){return s});var n="CONNECT_SOCKET",i="SEND_MESSAGE",r=function(e,t,a,n){return function(r){return r(function(e,t,a,n){return{type:i,message:e,host:t,port:a,secure:n}}(e,t,a,n))}},l="MESSAGE_RECEIVED",o=function(e){return{type:l,entities:e}},c="DISCONNECT_SOCKET",s=function(){return function(e){return e({type:c})}}},568:function(e,t,a){},700:function(e,t,a){},712:function(e,t,a){"use strict";a.r(t);var n=a(0),i=a.n(n),r=a(15),l=a(39),o=a(20),c=a(21),s=a(24),d=a(22),p=a(25),u=a(715),m=a(716),h=a(718),b=a(714),g=a(14),v=a(163),y=a.n(v),E=a(164),f=a.n(E),x=a(48),k=a(47),w=function(e){var t=void 0,a=!0,n=!1,i=void 0;try{for(var r,l=e[Symbol.iterator]();!(a=(r=l.next()).done);a=!0){var o=r.value,c=!1,s=!0,d=!1,p=void 0;try{for(var u,m=o.values[Symbol.iterator]();!(s=(u=m.next()).done);s=!0){u.value&&(c=!0)}}catch(h){d=!0,p=h}finally{try{s||null==m.return||m.return()}finally{if(d)throw p}}o.name&&c&&(t||(t=[]),t.push(o))}}catch(h){n=!0,i=h}finally{try{a||null==l.return||l.return()}finally{if(n)throw i}}return t},O=function(e){var t=e.host,a=void 0===t?"127.0.0.1":t,n=e.port,i=void 0===n?"1080":n,r=e.secure,l=void 0===r||r,o=e.requestMatcher,c=void 0===o?{}:o,s=e.sendMessage,d={method:void 0,path:void 0,keepAlive:void 0,secure:void 0,headers:void 0,queryStringParameters:void 0,cookies:void 0};c.enabled&&((d={method:c.method,path:c.path,keepAlive:!!c.keepAlive||void 0,secure:!!c.secure||void 0,headers:void 0,queryStringParameters:void 0,cookies:void 0}).cookies=function(e){var t=void 0,a=!0,n=!1,i=void 0;try{for(var r,l=e[Symbol.iterator]();!(a=(r=l.next()).done);a=!0){var o=r.value;o.name&&o.value&&(t||(t=[]),t.push(o))}}catch(c){n=!0,i=c}finally{try{a||null==l.return||l.return()}finally{if(n)throw i}}return t}(c.cookies),d.headers=w(c.headers),d.queryStringParameters=w(c.queryStringParameters)),s(d,a,i,l)},T=function(e){function t(){var e,a;Object(o.a)(this,t);for(var n=arguments.length,r=new Array(n),l=0;l0?i.a.createElement(g.f,{style:{display:"inline-block",verticalAlign:"bottom",minWidth:"28px",width:"28px"},disabled:a,onClick:function(){return t.remove(n)}},i.a.createElement(f.a,null)):"")}),i.a.createElement(g.f,{style:{display:"inline-block",verticalAlign:"bottom",minWidth:"28px",width:"28px"},disabled:a,onClick:function(){return t.push("")}},i.a.createElement(y.a,null)))},a.renderKeysToMultiValues=function(e){var t=e.fields,n=e.disabled,r=e.title;return i.a.createElement("div",{style:{width:"100%",display:"inline-block",paddingRight:"10px"}},i.a.createElement("div",{style:{color:n?"#9c9c9c":"rgb(0, 188, 212)",width:"20%",paddingTop:"45px",paddingRight:"15px",display:"inline-block",verticalAlign:"top",textAlign:"right",fontFamily:"Roboto, sans-serif"}},r),i.a.createElement("div",{style:{display:"inline-block",width:"75%"}},t.map(function(e,r){return i.a.createElement("div",{key:r,style:{display:"inline-block",width:"80%"}},i.a.createElement("div",{style:{width:"30%",padding:"5px",display:"inline-block",verticalAlign:"top"}},i.a.createElement(u.a,{disabled:n,name:"".concat(e,".name"),component:x.AutoComplete,hintText:"Name",floatingLabelText:"Name",fullWidth:!0,openOnFocus:!0,filter:g.a.fuzzyFilter,dataSource:[]})),i.a.createElement(m.a,{name:"".concat(e,".values"),component:a.renderValues,disabled:n}),r>0?i.a.createElement(g.e,{mini:!0,style:{display:"inline-block",verticalAlign:"bottom"},disabled:n,onClick:function(){return t.remove(r)}},i.a.createElement(f.a,null)):"")}),i.a.createElement(g.e,{mini:!0,style:{display:"inline-block",verticalAlign:"bottom"},disabled:n,onClick:function(){return t.push({values:[""]})}},i.a.createElement(y.a,null))))},a.renderKeysToValues=function(e){var t=e.fields,a=e.disabled,n=e.title;return i.a.createElement("div",{style:{width:"100%",display:"inline-block",paddingRight:"10px"}},i.a.createElement("div",{style:{color:a?"#9c9c9c":"rgb(0, 188, 212)",width:"20%",paddingTop:"45px",paddingRight:"15px",display:"inline-block",verticalAlign:"top",textAlign:"right",fontFamily:"Roboto, sans-serif"}},n),i.a.createElement("div",{style:{display:"inline-block",width:"75%"}},t.map(function(e,n){return i.a.createElement("div",{key:n,style:{display:"inline-block",width:"80%"}},i.a.createElement("div",{style:{width:"30%",padding:"5px",display:"inline-block",verticalAlign:"top"}},i.a.createElement(u.a,{disabled:a,name:"".concat(e,".name"),component:x.AutoComplete,hintText:"Name",floatingLabelText:"Name",fullWidth:!0,openOnFocus:!0,filter:g.a.fuzzyFilter,dataSource:[]})),i.a.createElement("div",{style:{width:"45%",padding:"5px",paddingRight:"10px",display:"inline-block",verticalAlign:"bottom"}},i.a.createElement(u.a,{disabled:a,fullWidth:!0,name:"".concat(e,".value"),component:x.TextField,hintText:"Value",floatingLabelText:"Value"})),n>0?i.a.createElement(g.e,{mini:!0,style:{display:"inline-block",verticalAlign:"bottom"},disabled:a,onClick:function(){return t.remove(n)}},i.a.createElement(f.a,null)):"")}),i.a.createElement(g.e,{mini:!0,style:{display:"inline-block",verticalAlign:"bottom"},disabled:a,onClick:function(){return t.push({})}},i.a.createElement(y.a,null))))},a}return Object(p.a)(t,e),Object(c.a)(t,[{key:"componentWillUnmount",value:function(){this.props.disconnectSocket()}},{key:"componentWillReceiveProps",value:function(e){e.requestMatcher===this.props.requestMatcher&&e.expanded===this.props.expanded||O(e)}},{key:"render",value:function(){var e=!this.props.requestMatcher.enabled;return i.a.createElement("div",{style:{margin:"1%",width:"98%"}},i.a.createElement(g.b,{expanded:this.expanded},i.a.createElement(g.c,{title:"Filter",actAsExpander:!0,showExpandableButton:!0,style:{backgroundColor:e?"rgba(220, 220, 220, 0.5)":"rgba(0, 188, 212, 0.75)"}}),i.a.createElement(g.d,{expandable:!0},i.a.createElement("div",{style:{display:"inline"}},i.a.createElement("div",{style:{width:"10%",display:"inline-block",verticalAlign:"top"}},i.a.createElement("div",{style:{paddingRight:"10px",padding:"5px",display:"inline-block"}},i.a.createElement(u.a,{name:"enabled",component:x.Toggle,label:"Enabled",labelPosition:"left"}))),i.a.createElement("div",{style:{width:"90%",display:"inline-block",verticalAlign:"bottom",marginBottom:"2%"}},i.a.createElement("div",{style:{width:"32%",paddingLeft:"3%",display:"inline-block",verticalAlign:"top"}},i.a.createElement("div",null,i.a.createElement("div",{style:{width:"45%",padding:"5px",display:"inline-block",verticalAlign:"top"}},i.a.createElement(u.a,{disabled:e,name:"method",component:x.SelectField,fullWidth:!0,floatingLabelText:"Method"},i.a.createElement(g.g,{value:"",primaryText:""}),i.a.createElement(g.g,{value:"CONNECT",primaryText:"CONNECT"}),i.a.createElement(g.g,{value:"DELETE",primaryText:"DELETE"}),i.a.createElement(g.g,{value:"GET",primaryText:"GET"}),i.a.createElement(g.g,{value:"HEAD",primaryText:"HEAD"}),i.a.createElement(g.g,{value:"OPTIONS",primaryText:"OPTIONS"}),i.a.createElement(g.g,{value:"PATCH",primaryText:"PATCH"}),i.a.createElement(g.g,{value:"POST",primaryText:"POST"}),i.a.createElement(g.g,{value:"PUT",primaryText:"PUT"}),i.a.createElement(g.g,{value:"TRACE",primaryText:"TRACE"}))),i.a.createElement("div",{style:{width:"45%",padding:"5px",display:"inline-block",verticalAlign:"top"}},i.a.createElement(u.a,{disabled:e,name:"path",component:x.TextField,fullWidth:!0,hintText:"Path",floatingLabelText:"Path"}))),i.a.createElement("div",null,i.a.createElement("div",{style:{width:"45%",padding:"5px",display:"inline-block",verticalAlign:"bottom"}},i.a.createElement(u.a,{disabled:e,name:"secure",component:x.Toggle,label:"Secure",labelPosition:"right"})),i.a.createElement("div",{style:{width:"45%",padding:"5px",display:"inline-block",verticalAlign:"bottom",overflow:"none"}},i.a.createElement(u.a,{disabled:e,name:"keepAlive",component:x.Toggle,label:"Keep-Alive",labelPosition:"right"})))),i.a.createElement("div",{style:{width:"65%",display:"inline-block",verticalAlign:"bottom"}},i.a.createElement("div",null,i.a.createElement(m.a,{name:"headers",component:this.renderKeysToMultiValues,disabled:e,title:"Headers:"}),i.a.createElement(m.a,{name:"cookies",component:this.renderKeysToValues,disabled:e,title:"Cookies:"}),i.a.createElement(m.a,{name:"queryStringParameters",component:this.renderKeysToMultiValues,disabled:e,title:"Query Parameters:"}))))))))}}]),t}(n.Component),S=Object(h.a)("requestFilter");T=Object(b.a)({form:"requestFilter",initialValues:{headers:[{values:[""]}],queryStringParameters:[{values:[""]}],cookies:[{}]},destroyOnUnmount:!1})(T);var A={sendMessage:k.f,disconnectSocket:k.e},j=T=Object(l.b)(function(e,t){return{requestMatcher:S(e,"enabled","method","path","keepAlive","secure","headers","queryStringParameters","cookies"),expanded:e.requestFilterExpanded}},A,void 0,{pure:!0})(T),C=a(243),R=a.n(C),M=function(e){function t(){return Object(o.a)(this,t),Object(s.a)(this,Object(d.a)(t).apply(this,arguments))}return Object(p.a)(t,e),Object(c.a)(t,[{key:"render",value:function(){var e=this.props,a=e.index,n=void 0===a?0:a,r=e.displayIndex,l=void 0===r||r,o=e.collapsed,c=void 0===o?0:o,s=e.jsonItem,d=void 0===s?null:s,p=e.display,u=void 0===p?"block":p,m=e.enableClipboard,h=void 0===m||m,b=e.textStyle,g=void 0===b?{}:b;return Array.isArray(d)?i.a.createElement(R.a,{src:d,style:{whiteSpace:"nowrap",paddingTop:"6px",display:"table-cell"===u?"table-cell":"block"},name:null,theme:"tomorrow",iconStyle:"triangle",indentWidth:4,collapsed:null!=c?c:0,shouldCollapse:function(){return!1},enableClipboard:h,displayObjectSize:!1,displayDataTypes:!1,onEdit:!1,onAdd:!1,onDelete:!1}):"object"===typeof d?i.a.createElement(R.a,{src:d,style:{whiteSpace:"nowrap",paddingTop:"6px",display:"table-cell"===u?"table-cell":"block"},name:l?i.a.createElement("div",{style:{display:"table-cell",maxWidth:"200px",minWidth:"115px",textOverflow:"ellipsis",overflow:"hidden"}},t.calculateIndex(null!=n?""+n:n,d)):null,theme:"tomorrow",iconStyle:"triangle",indentWidth:4,collapsed:null!=c?c:0,shouldCollapse:function(){return!1},enableClipboard:h,displayObjectSize:!1,displayDataTypes:!1,onEdit:!1,onAdd:!1,onDelete:!1}):"string"===typeof d&&d.length>20?i.a.createElement("details",{style:g},i.a.createElement("summary",{style:{color:"rgb(222, 147, 95)",fontSize:"30px",lineHeight:"15px",display:"table-cell"}},i.a.createElement("span",null,"...")),i.a.createElement("pre",{style:{position:"relative",top:"-5px",left:"20px",paddingRight:"35px"}},d)):"string"===typeof d?i.a.createElement("pre",{style:g},d):"number"===typeof d?i.a.createElement("pre",{style:g},d):i.a.createElement("div",null)}}],[{key:"calculateIndex",value:function(e,t){var a=t,n=null;if(a){if(a.httpRequest&&(a=a.httpRequest),a.method&&(n=a.method),a.path){var i=a.path;n=n?n+" "+i:i}if(a.statusCode){var r=a.statusCode;n=n?n+" "+r:r}if(a.reasonPhrase){var l=a.reasonPhrase;n=n?n+" "+l:l}}return n}}]),t}(n.Component),N=(a(568),function(e){function t(){var e,a;Object(o.a)(this,t);for(var n=arguments.length,i=new Array(n),r=0;r0&&(r.push(i.a.createElement("div",{style:a,key:"msg"+c},l[c])),o++),t&&t.length>0&&t.length>c){if(-1!==l[c].indexOf("because:")){var s=t[c].split(",").map(function(e,t){var a="orange";return-1!==e.indexOf("matched")?a="rgb(85, 205, 189)":-1!==e.indexOf("didn't match")&&(a="rgb(234, 67, 106)"),i.a.createElement("span",{key:t,style:{display:"block",fontSize:"0.85em",lineHeight:"1.25em",color:a}},e)}),d=Object.assign({},a);d.paddingTop="0px",r.push(i.a.createElement("div",{style:d,key:"arg"+c},i.a.createElement("details",null,i.a.createElement("summary",{style:{color:"rgb(222, 147, 95)",fontSize:"30px",lineHeight:"15px"}},i.a.createElement("span",null,"...")),s)))}else{var p=t[c];if("string"===typeof p&&-1!==l[c].indexOf("generated output:"))try{p=JSON.parse(p)}catch(m){}r.push(i.a.createElement(M,{key:"arg"+c,index:null,displayIndex:-1===l[c].indexOf("for action:"),collapsed:"0",display:"table-cell",textStyle:{fontFamily:"Roboto, sans-serif",backgroundColor:"rgb(29, 31, 33)",display:"table-cell",verticalAlign:"top"},enableClipboard:!1,jsonItem:p}))}o++}for(var u=o;u0&&void 0!==arguments[0]?arguments[0]:{activeExpectations:[],recordedExpectations:[],recordedRequests:[],logMessages:[]},t=arguments.length>1?arguments[1]:void 0;return t.type===l.c&&t.entities?{activeExpectations:t.entities.activeExpectations?t.entities.activeExpectations:[],recordedExpectations:t.entities.recordedExpectations?t.entities.recordedExpectations:[],recordedRequests:t.entities.recordedRequests?t.entities.recordedRequests:[],logMessages:t.entities.logMessages,logMessageMaxWidth:150}:e},c=Object(n.c)({entities:o,form:r.a}),s=function(){var e=null,t=!1,a=function(){t=!1,null!=e&&e.close(),e=null},n=function(n,i){null!=e&&e.close(),(e=new WebSocket((n.secure?"wss":"ws")+"://"+n.host+":"+n.port+"/_mockserver_ui_websocket")).onmessage=function(e){i(Object(l.g)(JSON.parse(e.data)))},e.onclose=function(){a()},e.onopen=function(){t=!0,e&&n.message&&1===e.readyState&&e.send(JSON.stringify(n.message))}};return function(i){return function(i){return function(r){switch(r.type){case l.a:n(r,i);break;case l.b:a();break;case l.d:t?e.send(JSON.stringify(r.message)):n(r,i);break;default:return i(r)}}}}}(),d=a(360),p=function(e){return function(t){return function(a){t(Object(d.a)({},a,{getState:e.getState}))}}};t.default=function(e){return Object(n.d)(c,e,Object(n.a)(i.a,s,p))}}},[[362,1,2]]]);
//# sourceMappingURL=main.3a73a63b.chunk.js.map