UNPKG

@aws-amplify/amplify-appsync-simulator

Version:

An AppSync Simulator to test AppSync API.

2 lines 3.44 kB
(self.webpackChunk_aws_amplify_amplify_graphiql_explorer=self.webpackChunk_aws_amplify_amplify_graphiql_explorer||[]).push([[360,819],{1819:(e,o,n)=>{!function(e){function o(o,n,t){var i,r=o.getWrapperElement();return(i=r.appendChild(document.createElement("div"))).className=t?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof n?i.innerHTML=n:i.appendChild(n),e.addClass(r,"dialog-opened"),i}function n(e,o){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=o}e.defineExtension("openDialog",(function(t,i,r){r||(r={}),n(this,null);var s=o(this,t,r.bottom),u=!1,l=this;function a(o){if("string"==typeof o)p.value=o;else{if(u)return;u=!0,e.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s),l.focus(),r.onClose&&r.onClose(s)}}var c,p=s.getElementsByTagName("input")[0];return p?(p.focus(),r.value&&(p.value=r.value,!1!==r.selectValueOnOpen&&p.select()),r.onInput&&e.on(p,"input",(function(e){r.onInput(e,p.value,a)})),r.onKeyUp&&e.on(p,"keyup",(function(e){r.onKeyUp(e,p.value,a)})),e.on(p,"keydown",(function(o){r&&r.onKeyDown&&r.onKeyDown(o,p.value,a)||((27==o.keyCode||!1!==r.closeOnEnter&&13==o.keyCode)&&(p.blur(),e.e_stop(o),a()),13==o.keyCode&&i(p.value,o))})),!1!==r.closeOnBlur&&e.on(s,"focusout",(function(e){null!==e.relatedTarget&&a()}))):(c=s.getElementsByTagName("button")[0])&&(e.on(c,"click",(function(){a(),l.focus()})),!1!==r.closeOnBlur&&e.on(c,"blur",a),c.focus()),a})),e.defineExtension("openConfirm",(function(t,i,r){n(this,null);var s=o(this,t,r&&r.bottom),u=s.getElementsByTagName("button"),l=!1,a=this,c=1;function p(){l||(l=!0,e.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s),a.focus())}u[0].focus();for(var f=0;f<u.length;++f){var d=u[f];!function(o){e.on(d,"click",(function(n){e.e_preventDefault(n),p(),o&&o(a)}))}(i[f]),e.on(d,"blur",(function(){--c,setTimeout((function(){c<=0&&p()}),200)})),e.on(d,"focus",(function(){++c}))}})),e.defineExtension("openNotification",(function(t,i){n(this,a);var r,s=o(this,t,i&&i.bottom),u=!1,l=i&&"undefined"!==typeof i.duration?i.duration:5e3;function a(){u||(u=!0,clearTimeout(r),e.rmClass(s.parentNode,"dialog-opened"),s.parentNode.removeChild(s))}return e.on(s,"click",(function(o){e.e_preventDefault(o),a()})),l&&(r=setTimeout(a,l)),a}))}(n(1953))},3360:(e,o,n)=>{!function(e){"use strict";function o(e,o,n,t,i){e.openDialog?e.openDialog(o,i,{value:t,selectValueOnOpen:!0,bottom:e.options.search.bottom}):i(prompt(n,t))}function n(e){return e.phrase("Jump to line:")+' <input type="text" style="width: 10em" class="CodeMirror-search-field"/> <span style="color: #888" class="CodeMirror-search-hint">'+e.phrase("(Use line:column or scroll% syntax)")+"</span>"}function t(e,o){var n=Number(o);return/^[-+]/.test(o)?e.getCursor().line+n:n-1}e.defineOption("search",{bottom:!1}),e.commands.jumpToLine=function(e){var i=e.getCursor();o(e,n(e),e.phrase("Jump to line:"),i.line+1+":"+i.ch,(function(o){var n;if(o)if(n=/^\s*([\+\-]?\d+)\s*\:\s*(\d+)\s*$/.exec(o))e.setCursor(t(e,n[1]),Number(n[2]));else if(n=/^\s*([\+\-]?\d+(\.\d+)?)\%\s*/.exec(o)){var r=Math.round(e.lineCount()*Number(n[1])/100);/^[-+]/.test(n[1])&&(r=i.line+r+1),e.setCursor(r-1,i.ch)}else(n=/^\s*\:?\s*([\+\-]?\d+)\s*/.exec(o))&&e.setCursor(t(e,n[1]),i.ch)}))},e.keyMap.default["Alt-G"]="jumpToLine"}(n(1953),n(1819))}}]); //# sourceMappingURL=360.2efc3345.chunk.js.map