badmfck-api-server 4.1.58 → 4.1.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -401,6 +401,20 @@ class Validator {
|
|
|
401
401
|
else if (Array.isArray(tmpl) && Array.isArray(item)) {
|
|
402
402
|
out[i] = this.syncStructure(tmpl, item);
|
|
403
403
|
}
|
|
404
|
+
else if (!this.isPlainObject(tmpl) && !Array.isArray(tmpl)) {
|
|
405
|
+
const wantType = typeof tmpl;
|
|
406
|
+
if (typeof item === wantType) {
|
|
407
|
+
out[i] = item;
|
|
408
|
+
}
|
|
409
|
+
else if (wantType === "string" || wantType === "number" || wantType === "boolean") {
|
|
410
|
+
const converted = this.convertToType(item, wantType);
|
|
411
|
+
const bad = converted === null || (wantType === "number" && Number.isNaN(converted));
|
|
412
|
+
out[i] = bad ? this.clone(tmpl) : converted;
|
|
413
|
+
}
|
|
414
|
+
else {
|
|
415
|
+
out[i] = item;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
404
418
|
else {
|
|
405
419
|
out[i] = this.syncStructure(tmpl, this.clone(tmpl));
|
|
406
420
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
|
-
<!-- Build: 2026-
|
|
5
|
-
<script>var __ver = "1.0.
|
|
4
|
+
<!-- Build: 2026-09-09T16:39:44.398Z | Version: 1.0.8 -->
|
|
5
|
+
<script>var __ver = "1.0.8";</script>
|
|
6
6
|
<meta charset="UTF-8" />
|
|
7
7
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
8
8
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
@@ -127,7 +127,7 @@ Error generating stack: `+i.message+`
|
|
|
127
127
|
&div:nth-child(3) {
|
|
128
128
|
animation-delay: -0.15s;
|
|
129
129
|
}
|
|
130
|
-
`,sm=({color:e,size:t=40})=>a.jsxs(M5,{$size:t,$color:e||"#665374",children:[a.jsx("div",{}),a.jsx("div",{}),a.jsx("div",{}),a.jsx("div",{})]}),qt=({children:e,onClose:t,label:r,scrollable:n,decorator:o,busy:i,sx:s,contentPadding:l})=>{o==="absolute"&&n&&(e=a.jsx(W,{sx:{display:o==="absolute"?"flex":void 0,flexDirection:o==="absolute"?"column":void 0,maxHeight:o==="absolute"?"80vh":void 0,zIndex:o==="absolute"?100:void 0,overflow:"auto"},children:e}));const c=r?a.jsx(W,{sx:{padding:l??"30px",boxSizing:"border-box",overflowX:"hidden",overflowY:"auto",flexGrow:1},children:e}):e,u=a.jsxs(W,{sx:{border:"1px solid rgba(255, 255, 255, 0.05)",padding:r?void 0:"30px",borderRadius:"6px",boxShadow:"0px 0px 100px rgba(0,0,0,.1)",pointerEvents:i?"none":"auto",userSelect:i?"none":"auto",display:"flex",position:"relative",flexDirection:"column",backgroundColor:"panelBackgroundPrimary",...s},children:[i&&a.jsxs(W,{sx:{position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,.5)",zIndex:1e5,display:"flex",flexDirection:"column",gap:"10px",justifyContent:"center",alignItems:"center"},children:[a.jsx(sm,{color:"#ad1bf1"}),a.jsx(O5,{children:"Please wait..."})]}),r&&a.jsxs(a.Fragment,{children:[a.jsx(W,{sx:{backgroundColor:o==="absolute"?"panelHeadBackgroundColor":void 0,padding:"20px",boxSizing:"border-box",width:"100%"},children:a.jsx(M,{variant:"head",sx:{display:"flex",paddingRight:"30px",overflowWrap:"break-word",wordBreak:"break-all",width:"100%",fontWeight:o==="absolute"?"200":"500",fontSize:o==="absolute"?"1.4rem":"1.2rem"},children:r})}),a.jsx(W,{sx:{boxSizing:"border-box",background:"panelDividerBackgroundColor",height:"2px",maxHeight:"2px"}})]}),t&&a.jsx(im,{icon:a.jsx(I5,{}),sx:{position:"absolute",top:"20px",right:"20px"},onClick:t}),c,i&&a.jsx(W,{sx:{position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",backdropFilter:"saturate(0.2)",zIndex:100001}})]});let d=a.jsx(a.Fragment,{children:u});return o==="absolute"&&(d=a.jsx(W,{sx:{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10,backgroundColor:"rgba(0,0,0,.6)"},children:u})),d},H5="#9a96ad",P=({children:e,sx:t})=>a.jsx(M,{variant:"caption",sx:{opacity:1,color:H5,letterSpacing:".02em",...t},children:e}),U5=new tt.Req(e=>m4(e)),W5=new tt.Req(e=>F1(e)),q5=new tt.Req(()=>g4()),V5=new tt.Req(e=>A4(e)),Q5=new tt.Req(()=>v4()),G5=new tt.Req(e=>y4(e)),K5=new tt.Req(()=>C4()),X5=new tt.Req(()=>E4()),am=new tt.Req(()=>w4()),Y5=new tt.Req(()=>B4()),J5=new tt.Req(()=>k4()),Z5=new tt.Req(()=>S4()),e8=new tt.Req(e=>b4(e.confirm)),Pt=(e,t,r=!0)=>{const n=V.useRef(e);n.current=e,V.useEffect(()=>{if(!r)return;n.current();const o=setInterval(()=>n.current(),t);return()=>clearInterval(o)},[t,r])},gi=ge.input`
|
|
130
|
+
`,sm=({color:e,size:t=40})=>a.jsxs(M5,{$size:t,$color:e||"#665374",children:[a.jsx("div",{}),a.jsx("div",{}),a.jsx("div",{}),a.jsx("div",{})]}),qt=({children:e,onClose:t,label:r,scrollable:n,decorator:o,busy:i,sx:s,contentPadding:l})=>{o==="absolute"&&n&&(e=a.jsx(W,{sx:{display:o==="absolute"?"flex":void 0,flexDirection:o==="absolute"?"column":void 0,maxHeight:o==="absolute"?"80vh":void 0,zIndex:o==="absolute"?100:void 0,overflow:"auto"},children:e}));const c=r?a.jsx(W,{sx:{padding:l??"30px",boxSizing:"border-box",overflowX:"hidden",overflowY:"auto",flexGrow:1},children:e}):e,u=a.jsxs(W,{sx:{border:"1px solid rgba(255, 255, 255, 0.05)",padding:r?void 0:"30px",borderRadius:"6px",boxShadow:"0px 0px 100px rgba(0,0,0,.1)",pointerEvents:i?"none":"auto",userSelect:i?"none":"auto",display:"flex",position:"relative",flexDirection:"column",backgroundColor:"panelBackgroundPrimary",...s},children:[i&&a.jsxs(W,{sx:{position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",backgroundColor:"rgba(255,255,255,.5)",zIndex:1e5,display:"flex",flexDirection:"column",gap:"10px",justifyContent:"center",alignItems:"center"},children:[a.jsx(sm,{color:"#ad1bf1"}),a.jsx(O5,{children:"Please wait..."})]}),r&&a.jsxs(a.Fragment,{children:[a.jsx(W,{sx:{backgroundColor:o==="absolute"?"panelHeadBackgroundColor":void 0,padding:"20px",boxSizing:"border-box",width:"100%"},children:a.jsx(M,{variant:"head",sx:{display:"flex",paddingRight:"30px",overflowWrap:"break-word",wordBreak:"break-all",width:"100%",fontWeight:o==="absolute"?"200":"500",fontSize:o==="absolute"?"1.4rem":"1.2rem"},children:r})}),a.jsx(W,{sx:{boxSizing:"border-box",background:"panelDividerBackgroundColor",height:"2px",maxHeight:"2px"}})]}),t&&a.jsx(im,{icon:a.jsx(I5,{}),sx:{position:"absolute",top:"20px",right:"20px"},onClick:t}),c,i&&a.jsx(W,{sx:{position:"absolute",top:"0px",left:"0px",width:"100%",height:"100%",backdropFilter:"saturate(0.2)",zIndex:100001}})]});let d=a.jsx(a.Fragment,{children:u});return o==="absolute"&&(d=a.jsx(W,{sx:{position:"fixed",top:"0",left:"0",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",zIndex:10,backgroundColor:"rgba(0,0,0,.6)"},children:u})),d},H5="#9a96ad",P=({children:e,sx:t})=>a.jsx(M,{variant:"caption",sx:{opacity:1,color:H5,letterSpacing:".02em",...t},children:e}),U5=new tt.Req(e=>m4(e)),W5=new tt.Req(e=>F1(e)),q5=new tt.Req(()=>g4()),V5=new tt.Req(e=>A4(e)),Q5=new tt.Req(()=>v4()),G5=new tt.Req(e=>y4(e)),K5=new tt.Req(()=>C4()),X5=new tt.Req(()=>E4()),am=new tt.Req(()=>w4()),Y5=new tt.Req(()=>B4()),J5=new tt.Req(()=>k4()),Z5=new tt.Req(()=>S4()),e8=new tt.Req(e=>e!=null&&e.confirm?b4(e.confirm):Promise.resolve({httpStatus:0})),Pt=(e,t,r=!0)=>{const n=V.useRef(e);n.current=e,V.useEffect(()=>{if(!r)return;n.current();const o=setInterval(()=>n.current(),t);return()=>clearInterval(o)},[t,r])},gi=ge.input`
|
|
131
131
|
width: 100%;
|
|
132
132
|
box-sizing: border-box;
|
|
133
133
|
padding: 13px 14px;
|
|
@@ -447,4 +447,4 @@ const j6={background:"#a7a7a7",backgroundSelected:"#66bb6a",toggle:"#FFFFFF"},D6
|
|
|
447
447
|
<body>
|
|
448
448
|
<div id="root"></div>
|
|
449
449
|
</body>
|
|
450
|
-
</html>
|
|
450
|
+
</html>
|