Fix Tab
This commit is contained in:
1 parent
d9755c732c
commit
91cdf15cc1
8 files changed
+13
-8
No files matched your search
@@ -162,5 +162,5 @@ Error generating stack: `+i.message+`
|
||||
[zustand devtools middleware] Unsupported __setState action format.
|
||||
When using 'store' option in devtools(), the 'state' should have only one key, which is a value of 'store' that was passed in devtools(),
|
||||
and value of this only key should be a state object. Example: { "type": "__setState", "state": { "abc123Store": { "foo": "bar" } } }
|
||||
`);const p=m.state[a];if(p==null)return;JSON.stringify(o.getState())!==JSON.stringify(p)&&h(p);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(m)});case"DISPATCH":switch(y.payload.type){case"RESET":return h(v),a===void 0?c==null?void 0:c.init(o.getState()):c==null?void 0:c.init(ca(l.name));case"COMMIT":if(a===void 0){c==null||c.init(o.getState());return}return c==null?void 0:c.init(ca(l.name));case"ROLLBACK":return wc(y.state,m=>{if(a===void 0){h(m),c==null||c.init(o.getState());return}h(m[a]),c==null||c.init(ca(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return wc(y.state,m=>{if(a===void 0){h(m);return}JSON.stringify(o.getState())!==JSON.stringify(m[a])&&h(m[a])});case"IMPORT_STATE":{const{nextLiftedState:m}=y.payload,p=(S=m.computedStates.slice(-1)[0])==null?void 0:S.state;if(!p)return;h(a===void 0?p:p[a]),c==null||c.send(null,m);return}case"PAUSE_RECORDING":return d=!d}return}}),v},qT=KT,wc=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)},Dd=HT()(qT(e=>({user:void 0,setUser:t=>e(()=>({user:t}))})));function Tu(e,t){return typeof e=="function"?e(t):e}function z1(e,t){return Ep(t).reduce((r,o)=>{if(r===null)return null;if(typeof r<"u")return r[o]},e)}function Cc(e,t,n){const r=Ep(t);function o(i){if(!r.length)return Tu(n,i);const s=r.shift();if(typeof s=="string")return typeof i=="object"?(i===null&&(i={}),{...i,[s]:o(i[s])}):{[s]:o()};if(Array.isArray(i)&&s!==void 0){const a=i.slice(0,s);return[...a.length?a:new Array(s),o(i[s]),...i.slice(s+1)]}return[...new Array(s),o()]}return o(e)}function QT(e,t){const n=Ep(t);function r(o){if(!o)return;if(n.length===1){const s=n[0];if(Array.isArray(o)&&typeof s=="number")return o.filter((u,c)=>c!==s);const{[s]:a,...l}=o;return l}const i=n.shift();if(typeof i=="string"&&typeof o=="object")return{...o,[i]:r(o[i])};if(typeof i=="number"&&Array.isArray(o)){if(i>=o.length)return o;const s=o.slice(0,i);return[...s.length?s:new Array(i),r(o[i]),...o.slice(i+1)]}throw new Error("It seems we have created an infinite loop in deleteBy. ")}return r(e)}const GT=/^(\d*)$/gm,XT=/\.(\d*)\./gm,YT=/^(\d*)\./gm,JT=/\.(\d*$)/gm,ZT=/\.{2,}/gm,zd="__int__",da=`${zd}$1`;function Ep(e){if(typeof e!="string")throw new Error("Path must be a string.");return e.replaceAll("[",".").replaceAll("]","").replace(GT,da).replace(XT,`.${da}.`).replace(YT,`${da}.`).replace(JT,`.${da}`).replace(ZT,".").split(".").map(t=>t.indexOf(zd)===0?parseInt(t.substring(zd.length),10):t)}function eM(e){return!(Array.isArray(e)&&e.length===0)}function Bd(e,t){const{asyncDebounceMs:n}=t,{onChangeAsync:r,onBlurAsync:o,onSubmitAsync:i,onBlurAsyncDebounceMs:s,onChangeAsyncDebounceMs:a}=t.validators||{},l=n??0,u={cause:"change",validate:r,debounceMs:a??l},c={cause:"blur",validate:o,debounceMs:s??l},f={cause:"submit",validate:i,debounceMs:0},d=h=>({...h,debounceMs:0});switch(e){case"submit":return[d(u),d(c),f];case"blur":return[c];case"change":return[u];case"server":default:return[]}}function Ud(e,t){const{onChange:n,onBlur:r,onSubmit:o}=t.validators||{},i={cause:"change",validate:n},s={cause:"blur",validate:r},a={cause:"submit",validate:o},l={cause:"server",validate:()=>{}};switch(e){case"submit":return[i,s,a,l];case"server":return[l];case"blur":return[s,l];case"change":default:return[i,l]}}function Ec(e){return{values:e.values??{},errors:e.errors??[],errorMap:e.errorMap??{},fieldMeta:e.fieldMeta??{},canSubmit:e.canSubmit??!0,isFieldsValid:e.isFieldsValid??!1,isFieldsValidating:e.isFieldsValidating??!1,isFormValid:e.isFormValid??!1,isFormValidating:e.isFormValidating??!1,isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isTouched:e.isTouched??!1,isPristine:e.isPristine??!0,isDirty:e.isDirty??!1,isValid:e.isValid??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0}}}class tM{constructor(t){var n;this.options={},this.fieldInfo={},this.prevTransformArray=[],this.mount=()=>{const{onMount:r}=this.options.validators||{};if(!r)return;const o=this.runValidator({validate:r,value:{value:this.state.values,formApi:this},type:"validate"});o&&this.store.setState(i=>({...i,errorMap:{...i.errorMap,onMount:o}}))},this.update=r=>{if(!r)return;const o=this.options;this.options=r,this.store.batch(()=>{const i=r.defaultValues&&r.defaultValues!==o.defaultValues&&!this.state.isTouched,s=r.defaultState!==o.defaultState&&!this.state.isTouched;this.store.setState(()=>Ec(Object.assign({},this.state,s?r.defaultState:{},i?{values:r.defaultValues}:{})))})},this.reset=()=>{const{fieldMeta:r}=this.state,o=this.resetFieldMeta(r);this.store.setState(()=>{var i;return Ec({...this.options.defaultState,values:this.options.defaultValues??((i=this.options.defaultState)==null?void 0:i.values),fieldMeta:o})})},this.validateAllFields=async r=>{const o=[];return t
Line truncated
|
||||
`);const p=m.state[a];if(p==null)return;JSON.stringify(o.getState())!==JSON.stringify(p)&&h(p);return}o.dispatchFromDevtools&&typeof o.dispatch=="function"&&o.dispatch(m)});case"DISPATCH":switch(y.payload.type){case"RESET":return h(v),a===void 0?c==null?void 0:c.init(o.getState()):c==null?void 0:c.init(ca(l.name));case"COMMIT":if(a===void 0){c==null||c.init(o.getState());return}return c==null?void 0:c.init(ca(l.name));case"ROLLBACK":return wc(y.state,m=>{if(a===void 0){h(m),c==null||c.init(o.getState());return}h(m[a]),c==null||c.init(ca(l.name))});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return wc(y.state,m=>{if(a===void 0){h(m);return}JSON.stringify(o.getState())!==JSON.stringify(m[a])&&h(m[a])});case"IMPORT_STATE":{const{nextLiftedState:m}=y.payload,p=(S=m.computedStates.slice(-1)[0])==null?void 0:S.state;if(!p)return;h(a===void 0?p:p[a]),c==null||c.send(null,m);return}case"PAUSE_RECORDING":return d=!d}return}}),v},qT=KT,wc=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)},Dd=HT()(qT(e=>({user:void 0,setUser:t=>e(()=>({user:t}))})));function Tu(e,t){return typeof e=="function"?e(t):e}function z1(e,t){return Ep(t).reduce((r,o)=>{if(r===null)return null;if(typeof r<"u")return r[o]},e)}function Cc(e,t,n){const r=Ep(t);function o(i){if(!r.length)return Tu(n,i);const s=r.shift();if(typeof s=="string")return typeof i=="object"?(i===null&&(i={}),{...i,[s]:o(i[s])}):{[s]:o()};if(Array.isArray(i)&&s!==void 0){const a=i.slice(0,s);return[...a.length?a:new Array(s),o(i[s]),...i.slice(s+1)]}return[...new Array(s),o()]}return o(e)}function QT(e,t){const n=Ep(t);function r(o){if(!o)return;if(n.length===1){const s=n[0];if(Array.isArray(o)&&typeof s=="number")return o.filter((u,c)=>c!==s);const{[s]:a,...l}=o;return l}const i=n.shift();if(typeof i=="string"&&typeof o=="object")return{...o,[i]:r(o[i])};if(typeof i=="number"&&Array.isArray(o)){if(i>=o.length)return o;const s=o.slice(0,i);return[...s.length?s:new Array(i),r(o[i]),...o.slice(i+1)]}throw new Error("It seems we have created an infinite loop in deleteBy. ")}return r(e)}const GT=/^(\d*)$/gm,XT=/\.(\d*)\./gm,YT=/^(\d*)\./gm,JT=/\.(\d*$)/gm,ZT=/\.{2,}/gm,zd="__int__",da=`${zd}$1`;function Ep(e){if(typeof e!="string")throw new Error("Path must be a string.");return e.replaceAll("[",".").replaceAll("]","").replace(GT,da).replace(XT,`.${da}.`).replace(YT,`${da}.`).replace(JT,`.${da}`).replace(ZT,".").split(".").map(t=>t.indexOf(zd)===0?parseInt(t.substring(zd.length),10):t)}function eM(e){return!(Array.isArray(e)&&e.length===0)}function Bd(e,t){const{asyncDebounceMs:n}=t,{onChangeAsync:r,onBlurAsync:o,onSubmitAsync:i,onBlurAsyncDebounceMs:s,onChangeAsyncDebounceMs:a}=t.validators||{},l=n??0,u={cause:"change",validate:r,debounceMs:a??l},c={cause:"blur",validate:o,debounceMs:s??l},f={cause:"submit",validate:i,debounceMs:0},d=h=>({...h,debounceMs:0});switch(e){case"submit":return[d(u),d(c),f];case"blur":return[c];case"change":return[u];case"server":default:return[]}}function Ud(e,t){const{onChange:n,onBlur:r,onSubmit:o}=t.validators||{},i={cause:"change",validate:n},s={cause:"blur",validate:r},a={cause:"submit",validate:o},l={cause:"server",validate:()=>{}};switch(e){case"submit":return[i,s,a,l];case"server":return[l];case"blur":return[s,l];case"change":default:return[i,l]}}function Ec(e){return{values:e.values??{},errors:e.errors??[],errorMap:e.errorMap??{},fieldMeta:e.fieldMeta??{},canSubmit:e.canSubmit??!0,isFieldsValid:e.isFieldsValid??!1,isFieldsValidating:e.isFieldsValidating??!1,isFormValid:e.isFormValid??!1,isFormValidating:e.isFormValidating??!1,isSubmitted:e.isSubmitted??!1,isSubmitting:e.isSubmitting??!1,isTouched:e.isTouched??!1,isPristine:e.isPristine??!0,isDirty:e.isDirty??!1,isValid:e.isValid??!1,isValidating:e.isValidating??!1,submissionAttempts:e.submissionAttempts??0,validationMetaMap:e.validationMetaMap??{onChange:void 0,onBlur:void 0,onSubmit:void 0,onMount:void 0,onServer:void 0}}}class tM{constructor(t){var n;this.options={},this.fieldInfo={},this.prevTransformArray=[],this.mount=()=>{const{onMount:r}=this.options.validators||{};if(!r)return;const o=this.runValidator({validate:r,value:{value:this.state.values,formApi:this},type:"validate"});o&&this.store.setState(i=>({...i,errorMap:{...i.errorMap,onMount:o}}))},this.update=r=>{if(!r)return;const o=this.options;this.options=r,this.store.batch(()=>{const i=r.defaultValues&&r.defaultValues!==o.defaultValues&&!this.state.isTouched,s=r.defaultState!==o.defaultState&&!this.state.isTouched;this.store.setState(()=>Ec(Object.assign({},this.state,s?r.defaultState:{},i?{values:r.defaultValues}:{})))})},this.reset=()=>{const{fieldMeta:r}=this.state,o=this.resetFieldMeta(r);this.store.setState(()=>{var i;return Ec({...this.options.defaultState,values:this.options.defaultValues??((i=this.options.defaultState)==null?void 0:i.values),fieldMeta:o})})},this.validateAllFields=async r=>{const o=[];return t
Line truncated
|
||||
`)===0?O.substr(1,O.length):O}).forEach(function(O){var $=O.split(":"),L=$.shift().trim();if(L){var W=$.join(":").trim();T.append(L,W)}}),T}k.call(I.prototype);function z(E,T){if(!(this instanceof z))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');T||(T={}),this.type="default",this.status=T.status===void 0?200:T.status,this.ok=this.status>=200&&this.status<300,this.statusText=T.statusText===void 0?"":""+T.statusText,this.headers=new y(T.headers),this.url=T.url||"",this._initBody(E)}k.call(z.prototype),z.prototype.clone=function(){return new z(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new y(this.headers),url:this.url})},z.error=function(){var E=new z(null,{status:0,statusText:""});return E.type="error",E};var B=[301,302,303,307,308];z.redirect=function(E,T){if(B.indexOf(T)===-1)throw new RangeError("Invalid status code");return new z(null,{status:T,headers:{location:E}})},s.DOMException=a.DOMException;try{new s.DOMException}catch{s.DOMException=function(T,N){this.message=T,this.name=N;var O=Error(T);this.stack=O.stack},s.DOMException.prototype=Object.create(Error.prototype),s.DOMException.prototype.constructor=s.DOMException}function A(E,T){return new Promise(function(N,O){var $=new I(E,T);if($.signal&&$.signal.aborted)return O(new s.DOMException("Aborted","AbortError"));var L=new XMLHttpRequest;function W(){L.abort()}L.onload=function(){var V={status:L.status,statusText:L.statusText,headers:j(L.getAllResponseHeaders()||"")};V.url="responseURL"in L?L.responseURL:V.headers.get("X-Request-URL");var H="response"in L?L.response:L.responseText;setTimeout(function(){N(new z(H,V))},0)},L.onerror=function(){setTimeout(function(){O(new TypeError("Network request failed"))},0)},L.ontimeout=function(){setTimeout(function(){O(new TypeError("Network request failed"))},0)},L.onabort=function(){setTimeout(function(){O(new s.DOMException("Aborted","AbortError"))},0)};function K(V){try{return V===""&&a.location.href?a.location.href:V}catch{return V}}L.open($.method,K($.url),!0),$.credentials==="include"?L.withCredentials=!0:$.credentials==="omit"&&(L.withCredentials=!1),"responseType"in L&&(l.blob?L.responseType="blob":l.arrayBuffer&&$.headers.get("Content-Type")&&$.headers.get("Content-Type").indexOf("application/octet-stream")!==-1&&(L.responseType="arraybuffer")),T&&typeof T.headers=="object"&&!(T.headers instanceof y)?Object.getOwnPropertyNames(T.headers).forEach(function(V){L.setRequestHeader(V,h(T.headers[V]))}):$.headers.forEach(function(V,H){L.setRequestHeader(H,V)}),$.signal&&($.signal.addEventListener("abort",W),L.onreadystatechange=function(){L.readyState===4&&$.signal.removeEventListener("abort",W)}),L.send(typeof $._bodyInit>"u"?null:$._bodyInit)})}return A.polyfill=!0,a.fetch||(a.fetch=A,a.Headers=y,a.Request=I,a.Response=z),s.Headers=y,s.Request=I,s.Response=z,s.fetch=A,s})({})})(r),r.fetch.ponyfill=!0,delete r.fetch.polyfill;var o=n.fetch?n:r;t=o.fetch,t.default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}(ha,ha.exports)),ha.exports}(function(e,t){var n;if(typeof fetch=="function"&&(typeof Ni<"u"&&Ni.fetch?n=Ni.fetch:typeof window<"u"&&window.fetch?n=window.fetch:n=fetch),typeof XM<"u"&&typeof window>"u"){var r=n||YM();r.default&&(r=r.default),t.default=r,e.exports=t.default}})(Wd,Wd.exports);var Q1=Wd.exports;const G1=bl(Q1),wg=Ag({__proto__:null,default:G1},[Q1]);function Cg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Eg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Cg(Object(n),!0).forEach(function(r){JM(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JM(e,t,n){return t=ZM(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZM(e){var t=e$(e,"string");return Gr(t)=="symbol"?t:t+""}function e$(e,t){if(Gr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Gr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gr(e){"@babel/helpers - typeof";return Gr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gr(e)}var jn;typeof fetch=="function"&&(typeof global<"u"&&global.fetch?jn=global.fetch:typeof window<"u"&&window.fetch?jn=window.fetch:jn=fetch);var Cs;q1()&&(typeof global<"u"&&global.XMLHttpRequest?Cs=global.XMLHttpRequest:typeof window<"u"&&windo
Line truncated
|
||||
Vendored
+1
-1
@@ -5,7 +5,7 @@
|
||||
<link rel="icon" type="image/svg+xml" href="/phpCourse/exam/dist/vite.svg" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Vite + React + TS</title>
|
||||
<script type="module" crossorigin src="/phpCourse/exam/dist/assets/index-Zuvl5YZF.js"></script>
|
||||
<script type="module" crossorigin src="/phpCourse/exam/dist/assets/index-BObjV29d.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"NotFound_user:login": "Benutzer existiert nicht",
|
||||
"Unauthorized:login": "Ungültige E-Mail oder Passwort",
|
||||
"Unauthorized_login": "Ungültige E-Mail oder Passwort",
|
||||
|
||||
"GuestBook": "Gästebuch",
|
||||
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"NotFound_user:login": "User does not exist",
|
||||
"Unauthorized:login": "Invalid email or password",
|
||||
"Unauthorized_login": "Invalid email or password",
|
||||
|
||||
"GuestBook": "GuestBook",
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build --emptyOutDir",
|
||||
"build": "pnpm lint && tsc -b && vite build --emptyOutDir",
|
||||
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"NotFound_user:login": "Benutzer existiert nicht",
|
||||
"Unauthorized:login": "Ungültige E-Mail oder Passwort",
|
||||
"Unauthorized_login": "Ungültige E-Mail oder Passwort",
|
||||
|
||||
"GuestBook": "Gästebuch",
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"NotFound_user:login": "User does not exist",
|
||||
"Unauthorized:login": "Invalid email or password",
|
||||
"Unauthorized_login": "Invalid email or password",
|
||||
|
||||
"GuestBook": "GuestBook",
|
||||
|
||||
|
||||
@@ -35,6 +35,11 @@ const Login: FC = () => {
|
||||
e.stopPropagation();
|
||||
form.handleSubmit();
|
||||
}}
|
||||
onKeyDown={(event) => {
|
||||
if (event.key === 'Tab') {
|
||||
event.stopPropagation();
|
||||
}
|
||||
}}
|
||||
noValidate
|
||||
>
|
||||
<Box sx={{ display: 'grid', gap: 1, padding: 1, minWidth: '100px' }}>
|
||||
@@ -58,7 +63,7 @@ const Login: FC = () => {
|
||||
onBlur={field.handleBlur}
|
||||
onChange={(e) => field.handleChange(e.target.value)}
|
||||
size="small"
|
||||
label={t('Erail')}
|
||||
label={t('Email')}
|
||||
required
|
||||
error={field.state.meta.isTouched && field.state.meta.errors.length > 0}
|
||||
helperText={field.state.meta.isTouched ? field.state.meta.errors.join(',') : ''}
|
||||
|
||||
Reference in new issue
Block a user