@nocobase/plugin-mobile-client 0.13.0-alpha.8 → 0.14.0-alpha.1
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.
package/dist/client/index.js
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
Copyright (c) 2018 Jed Watson.
|
|
22
22
|
Licensed under the MIT License (MIT), see
|
|
23
23
|
http://jedwatson.github.io/classnames
|
|
24
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var c=arguments[i];if(c){var d=typeof c;if(d==="string"||d==="number")r.push(c);else if(Array.isArray(c)){if(c.length){var s=n.apply(null,c);s&&r.push(s)}}else if(d==="object"){if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]")){r.push(c.toString());continue}for(var u in c)t.call(c,u)&&c[u]&&r.push(u)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Fe);var Ft=Fe.exports;const O=_e(Ft);function F(e,t){const n=Object.assign({},t.props);e.className&&(n.className=O(t.props.className,e.className)),e.style&&(n.style=Object.assign(Object.assign({},n.style),e.style)),e.tabIndex!==void 0&&(n.tabIndex=e.tabIndex);for(const r in e)e.hasOwnProperty(r)&&(r.startsWith("data-")||r.startsWith("aria-"))&&(n[r]=e[r]);return l.cloneElement(t,n)}var Lt=typeof W=="object"&&W&&W.Object===Object&&W,Le=Lt,Dt=Le,zt=typeof self=="object"&&self&&self.Object===Object&&self,Gt=Dt||zt||Function("return this")(),ue=Gt,Ut=ue,qt=Ut.Symbol,De=qt,ze=De,Ge=Object.prototype,Ht=Ge.hasOwnProperty,Vt=Ge.toString,q=ze?ze.toStringTag:void 0;function Kt(e){var t=Ht.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(c){}var i=Vt.call(e);return r&&(t?e[q]=n:delete e[q]),i}var Wt=Kt,Jt=Object.prototype,Xt=Jt.toString;function Zt(e){return Xt.call(e)}var Qt=Zt,Ue=De,Yt=Wt,Rt=Qt,en="[object Null]",tn="[object Undefined]",qe=Ue?Ue.toStringTag:void 0;function nn(e){return e==null?e===void 0?tn:en:qe&&qe in Object(e)?Yt(e):Rt(e)}var me=nn;function rn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var fe=rn,on=me,an=fe,sn="[object AsyncFunction]",cn="[object Function]",ln="[object GeneratorFunction]",dn="[object Proxy]";function pn(e){if(!an(e))return!1;var t=on(e);return t==cn||t==ln||t==sn||t==dn}var He=pn,un=ue,mn=un["__core-js_shared__"],fn=mn,be=fn,Ve=function(){var e=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function bn(e){return!!Ve&&Ve in e}var gn=bn,hn=Function.prototype,vn=hn.toString;function yn(e){if(e!=null){try{return vn.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var xn=yn,Sn=He,$n=gn,wn=fe,Pn=xn,Cn=/[\\^$.*+?()[\]{}|]/g,In=/^\[object .+?Constructor\]$/,Tn=Function.prototype,Mn=Object.prototype,On=Tn.toString,kn=Mn.hasOwnProperty,En=RegExp("^"+On.call(kn).replace(Cn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Nn(e){if(!wn(e)||$n(e))return!1;var t=Sn(e)?En:In;return t.test(Pn(e))}var Bn=Nn;function jn(e,t){return e==null?void 0:e[t]}var An=jn,_n=Bn,Fn=An;function Ln(e,t){var n=Fn(e,t);return _n(n)?n:void 0}var Dn=Ln,zn=Dn,Gn=function(){try{var e=zn(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Ke=Gn,We=Ke;function Un(e,t,n){t=="__proto__"&&We?We(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Je=Un;function qn(e,t){return e===t||e!==e&&t!==t}var Xe=qn,Hn=Je,Vn=Xe,Kn=Object.prototype,Wn=Kn.hasOwnProperty;function Jn(e,t,n){var r=e[t];(!(Wn.call(e,t)&&Vn(r,n))||n===void 0&&!(t in e))&&Hn(e,t,n)}var Xn=Jn,Zn=Xn,Qn=Je;function Yn(e,t,n,r){var i=!n;n||(n={});for(var c=-1,d=t.length;++c<d;){var s=t[c],u=r?r(n[s],e[s],s,n,e):void 0;u===void 0&&(u=e[s]),i?Qn(n,s,u):Zn(n,s,u)}return n}var Rn=Yn;function er(e){return e}var Ze=er;function tr(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var nr=tr,rr=nr,Qe=Math.max;function or(e,t,n){return t=Qe(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,c=Qe(r.length-t,0),d=Array(c);++i<c;)d[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(d),rr(e,this,s)}}var ar=or;function ir(e){return function(){return e}}var sr=ir,cr=sr,Ye=Ke,lr=Ze,dr=Ye?function(e,t){return Ye(e,"toString",{configurable:!0,enumerable:!1,value:cr(t),writable:!0})}:lr,pr=dr,ur=800,mr=16,fr=Date.now;function br(e){var t=0,n=0;return function(){var r=fr(),i=mr-(r-n);if(n=r,i>0){if(++t>=ur)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var gr=br,hr=pr,vr=gr,yr=vr(hr),xr=yr,Sr=Ze,$r=ar,wr=xr;function Pr(e,t){return wr($r(e,t,Sr),e+"")}var Cr=Pr,Ir=9007199254740991;function Tr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ir}var Re=Tr,Mr=He,Or=Re;function kr(e){return e!=null&&Or(e.length)&&!Mr(e)}var et=kr,Er=9007199254740991,Nr=/^(?:0|[1-9]\d*)$/;function Br(e,t){var n=typeof e;return t=t==null?Er:t,!!t&&(n=="number"||n!="symbol"&&Nr.test(e))&&e>-1&&e%1==0&&e<t}var tt=Br,jr=Xe,Ar=et,_r=tt,Fr=fe;function Lr(e,t,n){if(!Fr(n))return!1;var r=typeof t;return(r=="number"?Ar(n)&&_r(t,n.length):r=="string"&&t in n)?jr(n[t],e):!1}var Dr=Lr,zr=Cr,Gr=Dr;function Ur(e){return zr(function(t,n){var r=-1,i=n.length,c=i>1?n[i-1]:void 0,d=i>2?n[2]:void 0;for(c=e.length>3&&typeof c=="function"?(i--,c):void 0,d&&Gr(n[0],n[1],d)&&(c=i<3?void 0:c,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,c)}return t})}var qr=Ur;function Hr(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Vr=Hr;function Kr(e){return e!=null&&typeof e=="object"}var ge=Kr,Wr=me,Jr=ge,Xr="[object Arguments]";function Zr(e){return Jr(e)&&Wr(e)==Xr}var Qr=Zr,nt=Qr,Yr=ge,rt=Object.prototype,Rr=rt.hasOwnProperty,eo=rt.propertyIsEnumerable,to=nt(function(){return arguments}())?nt:function(e){return Yr(e)&&Rr.call(e,"callee")&&!eo.call(e,"callee")},no=to,ro=Array.isArray,oo=ro,J={exports:{}};function ao(){return!1}var io=ao;J.exports,function(e,t){var n=ue,r=io,i=t&&!t.nodeType&&t,c=i&&!0&&e&&!e.nodeType&&e,d=c&&c.exports===i,s=d?n.Buffer:void 0,u=s?s.isBuffer:void 0,p=u||r;e.exports=p}(J,J.exports);var so=J.exports,co=me,lo=Re,po=ge,uo="[object Arguments]",mo="[object Array]",fo="[object Boolean]",bo="[object Date]",go="[object Error]",ho="[object Function]",vo="[object Map]",yo="[object Number]",xo="[object Object]",So="[object RegExp]",$o="[object Set]",wo="[object String]",Po="[object WeakMap]",Co="[object ArrayBuffer]",Io="[object DataView]",To="[object Float32Array]",Mo="[object Float64Array]",Oo="[object Int8Array]",ko="[object Int16Array]",Eo="[object Int32Array]",No="[object Uint8Array]",Bo="[object Uint8ClampedArray]",jo="[object Uint16Array]",Ao="[object Uint32Array]",h={};h[To]=h[Mo]=h[Oo]=h[ko]=h[Eo]=h[No]=h[Bo]=h[jo]=h[Ao]=!0,h[uo]=h[mo]=h[Co]=h[fo]=h[Io]=h[bo]=h[go]=h[ho]=h[vo]=h[yo]=h[xo]=h[So]=h[$o]=h[wo]=h[Po]=!1;function _o(e){return po(e)&&lo(e.length)&&!!h[co(e)]}var Fo=_o;function Lo(e){return function(t){return e(t)}}var Do=Lo,X={exports:{}};X.exports,function(e,t){var n=Le,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,c=i&&i.exports===r,d=c&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||d&&d.binding&&d.binding("util")}catch(p){}}();e.exports=s}(X,X.exports);var zo=X.exports,Go=Fo,Uo=Do,ot=zo,at=ot&&ot.isTypedArray,qo=at?Uo(at):Go,Ho=qo,Vo=Vr,Ko=no,Wo=oo,Jo=so,Xo=tt,Zo=Ho,Qo=Object.prototype,Yo=Qo.hasOwnProperty;function Ro(e,t){var n=Wo(e),r=!n&&Ko(e),i=!n&&!r&&Jo(e),c=!n&&!r&&!i&&Zo(e),d=n||r||i||c,s=d?Vo(e.length,String):[],u=s.length;for(var p in e)(t||Yo.call(e,p))&&!(d&&(p=="length"||i&&(p=="offset"||p=="parent")||c&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||Xo(p,u)))&&s.push(p);return s}var ea=Ro,ta=Object.prototype;function na(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||ta;return e===n}var ra=na;function oa(e,t){return function(n){return e(t(n))}}var aa=oa,ia=aa,sa=ia(Object.keys,Object),ca=sa,la=ra,da=ca,pa=Object.prototype,ua=pa.hasOwnProperty;function ma(e){if(!la(e))return da(e);var t=[];for(var n in Object(e))ua.call(e,n)&&n!="constructor"&&t.push(n);return t}var fa=ma,ba=ea,ga=fa,ha=et;function va(e){return ha(e)?ba(e):ga(e)}var ya=va,xa=Rn,Sa=qr,$a=ya,wa=Sa(function(e,t,n,r){xa(t,$a(t),e,r)}),Pa=wa;const Ca=_e(Pa);function he(...e){function t(r,i){return i===void 0?r:i}let n=Object.assign({},e[0]);for(let r=1;r<e.length;r++)n=Ca(n,e[r],t);return n}function Ia(e){return M.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),M.createElement("g",{id:"LeftOutline-LeftOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},M.createElement("g",{id:"LeftOutline-编组"},M.createElement("rect",{id:"LeftOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),M.createElement("path",{d:"M31.7053818,5.11219264 L13.5234393,22.6612572 L13.5234393,22.6612572 C12.969699,23.2125856 12.9371261,24.0863155 13.4257204,24.6755735 L13.5234393,24.7825775 L31.7045714,42.8834676 C31.7795345,42.9580998 31.8810078,43 31.9867879,43 L35.1135102,43 C35.3344241,43 35.5135102,42.8209139 35.5135102,42.6 C35.5135102,42.4936115 35.4711279,42.391606 35.3957362,42.316542 L16.7799842,23.7816937 L16.7799842,23.7816937 L35.3764658,5.6866816 C35.5347957,5.53262122 35.5382568,5.27937888 35.3841964,5.121049 C35.3088921,5.04365775 35.205497,5 35.0975148,5 L31.9831711,5 C31.8795372,5 31.7799483,5.04022164 31.7053818,5.11219264 Z",id:"LeftOutline-路径",fill:"currentColor",fillRule:"nonzero"}))))}function Ta(e){return M.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),M.createElement("g",{id:"RightOutline-RightOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},M.createElement("g",{id:"RightOutline-RightOutlined"},M.createElement("rect",{id:"RightOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),M.createElement("path",{d:"M17.3947957,5.11219264 L35.5767382,22.6612572 L35.5767382,22.6612572 C36.1304785,23.2125856 36.1630514,24.0863155 35.6744571,24.6755735 L35.5767382,24.7825775 L17.3956061,42.8834676 C17.320643,42.9580998 17.2191697,43 17.1133896,43 L13.9866673,43 C13.7657534,43 13.5866673,42.8209139 13.5866673,42.6 C13.5866673,42.4936115 13.6290496,42.391606 13.7044413,42.316542 L32.3201933,23.7816937 L32.3201933,23.7816937 L13.7237117,5.6866816 C13.5653818,5.53262122 13.5619207,5.27937888 13.7159811,5.121049 C13.7912854,5.04365775 13.8946805,5 14.0026627,5 L17.1170064,5 C17.2206403,5 17.3202292,5.04022164 17.3947957,5.11219264 Z",id:"RightOutline-right",fill:"currentColor",fillRule:"nonzero"}))))}const Si="",it="adm-safe-area",Ma=e=>F(e,l.createElement("div",{className:O(it,`${it}-position-${e.position}`)})),$i="",D="adm-badge",st=l.createElement(l.Fragment,null),ct=pe(e=>{const{content:t,color:n,children:r}=e,i=t===st,c=O(D,!!r&&`${D}-fixed`,i&&`${D}-dot`,e.bordered&&`${D}-bordered`),d=t||t===0?F(e,l.createElement("div",{className:c,style:{"--color":n}},!i&&l.createElement("div",{className:`${D}-content`},t))):null;return r?l.createElement("div",{className:O(`${D}-wrapper`,e.wrapperClassName),style:e.wrapperStyle},r,d):d},{dot:st});function Oa(e){const{value:t,defaultValue:n,onChange:r}=e,i=le.useUpdate(),c=l.useRef(t!==void 0?t:n);t!==void 0&&(c.current=t);const d=le.useMemoizedFn((s,u=!1)=>{const p=typeof s=="function"?s(c.current):s;if(!(!u&&p===c.current))return c.current=p,i(),r==null?void 0:r(p)});return[c.current,d]}var lt={exports:{}},b={};/**
|
|
24
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],i=0;i<arguments.length;i++){var c=arguments[i];if(c){var d=typeof c;if(d==="string"||d==="number")r.push(c);else if(Array.isArray(c)){if(c.length){var s=n.apply(null,c);s&&r.push(s)}}else if(d==="object"){if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]")){r.push(c.toString());continue}for(var u in c)t.call(c,u)&&c[u]&&r.push(u)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Fe);var Ft=Fe.exports;const O=_e(Ft);function F(e,t){const n=Object.assign({},t.props);e.className&&(n.className=O(t.props.className,e.className)),e.style&&(n.style=Object.assign(Object.assign({},n.style),e.style)),e.tabIndex!==void 0&&(n.tabIndex=e.tabIndex);for(const r in e)e.hasOwnProperty(r)&&(r.startsWith("data-")||r.startsWith("aria-"))&&(n[r]=e[r]);return l.cloneElement(t,n)}var Lt=typeof W=="object"&&W&&W.Object===Object&&W,Le=Lt,Dt=Le,zt=typeof self=="object"&&self&&self.Object===Object&&self,Gt=Dt||zt||Function("return this")(),ue=Gt,Ut=ue,qt=Ut.Symbol,De=qt,ze=De,Ge=Object.prototype,Ht=Ge.hasOwnProperty,Vt=Ge.toString,q=ze?ze.toStringTag:void 0;function Kt(e){var t=Ht.call(e,q),n=e[q];try{e[q]=void 0;var r=!0}catch(c){}var i=Vt.call(e);return r&&(t?e[q]=n:delete e[q]),i}var Wt=Kt,Jt=Object.prototype,Xt=Jt.toString;function Zt(e){return Xt.call(e)}var Qt=Zt,Ue=De,Yt=Wt,Rt=Qt,en="[object Null]",tn="[object Undefined]",qe=Ue?Ue.toStringTag:void 0;function nn(e){return e==null?e===void 0?tn:en:qe&&qe in Object(e)?Yt(e):Rt(e)}var me=nn;function rn(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var fe=rn,on=me,an=fe,sn="[object AsyncFunction]",cn="[object Function]",ln="[object GeneratorFunction]",dn="[object Proxy]";function pn(e){if(!an(e))return!1;var t=on(e);return t==cn||t==ln||t==sn||t==dn}var He=pn,un=ue,mn=un["__core-js_shared__"],fn=mn,be=fn,Ve=function(){var e=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function bn(e){return!!Ve&&Ve in e}var gn=bn,hn=Function.prototype,vn=hn.toString;function yn(e){if(e!=null){try{return vn.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var xn=yn,Sn=He,$n=gn,wn=fe,Pn=xn,Cn=/[\\^$.*+?()[\]{}|]/g,In=/^\[object .+?Constructor\]$/,Tn=Function.prototype,Mn=Object.prototype,On=Tn.toString,kn=Mn.hasOwnProperty,En=RegExp("^"+On.call(kn).replace(Cn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Nn(e){if(!wn(e)||$n(e))return!1;var t=Sn(e)?En:In;return t.test(Pn(e))}var Bn=Nn;function jn(e,t){return e==null?void 0:e[t]}var An=jn,_n=Bn,Fn=An;function Ln(e,t){var n=Fn(e,t);return _n(n)?n:void 0}var Dn=Ln,zn=Dn,Gn=function(){try{var e=zn(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Ke=Gn,We=Ke;function Un(e,t,n){t=="__proto__"&&We?We(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Je=Un;function qn(e,t){return e===t||e!==e&&t!==t}var Xe=qn,Hn=Je,Vn=Xe,Kn=Object.prototype,Wn=Kn.hasOwnProperty;function Jn(e,t,n){var r=e[t];(!(Wn.call(e,t)&&Vn(r,n))||n===void 0&&!(t in e))&&Hn(e,t,n)}var Xn=Jn,Zn=Xn,Qn=Je;function Yn(e,t,n,r){var i=!n;n||(n={});for(var c=-1,d=t.length;++c<d;){var s=t[c],u=r?r(n[s],e[s],s,n,e):void 0;u===void 0&&(u=e[s]),i?Qn(n,s,u):Zn(n,s,u)}return n}var Rn=Yn;function er(e){return e}var Ze=er;function tr(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var nr=tr,rr=nr,Qe=Math.max;function or(e,t,n){return t=Qe(t===void 0?e.length-1:t,0),function(){for(var r=arguments,i=-1,c=Qe(r.length-t,0),d=Array(c);++i<c;)d[i]=r[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=r[i];return s[t]=n(d),rr(e,this,s)}}var ar=or;function ir(e){return function(){return e}}var sr=ir,cr=sr,Ye=Ke,lr=Ze,dr=Ye?function(e,t){return Ye(e,"toString",{configurable:!0,enumerable:!1,value:cr(t),writable:!0})}:lr,pr=dr,ur=800,mr=16,fr=Date.now;function br(e){var t=0,n=0;return function(){var r=fr(),i=mr-(r-n);if(n=r,i>0){if(++t>=ur)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var gr=br,hr=pr,vr=gr,yr=vr(hr),xr=yr,Sr=Ze,$r=ar,wr=xr;function Pr(e,t){return wr($r(e,t,Sr),e+"")}var Cr=Pr,Ir=9007199254740991;function Tr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ir}var Re=Tr,Mr=He,Or=Re;function kr(e){return e!=null&&Or(e.length)&&!Mr(e)}var et=kr,Er=9007199254740991,Nr=/^(?:0|[1-9]\d*)$/;function Br(e,t){var n=typeof e;return t=t==null?Er:t,!!t&&(n=="number"||n!="symbol"&&Nr.test(e))&&e>-1&&e%1==0&&e<t}var tt=Br,jr=Xe,Ar=et,_r=tt,Fr=fe;function Lr(e,t,n){if(!Fr(n))return!1;var r=typeof t;return(r=="number"?Ar(n)&&_r(t,n.length):r=="string"&&t in n)?jr(n[t],e):!1}var Dr=Lr,zr=Cr,Gr=Dr;function Ur(e){return zr(function(t,n){var r=-1,i=n.length,c=i>1?n[i-1]:void 0,d=i>2?n[2]:void 0;for(c=e.length>3&&typeof c=="function"?(i--,c):void 0,d&&Gr(n[0],n[1],d)&&(c=i<3?void 0:c,i=1),t=Object(t);++r<i;){var s=n[r];s&&e(t,s,r,c)}return t})}var qr=Ur;function Hr(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var Vr=Hr;function Kr(e){return e!=null&&typeof e=="object"}var ge=Kr,Wr=me,Jr=ge,Xr="[object Arguments]";function Zr(e){return Jr(e)&&Wr(e)==Xr}var Qr=Zr,nt=Qr,Yr=ge,rt=Object.prototype,Rr=rt.hasOwnProperty,eo=rt.propertyIsEnumerable,to=nt(function(){return arguments}())?nt:function(e){return Yr(e)&&Rr.call(e,"callee")&&!eo.call(e,"callee")},no=to,ro=Array.isArray,oo=ro,J={exports:{}};function ao(){return!1}var io=ao;J.exports,function(e,t){var n=ue,r=io,i=t&&!t.nodeType&&t,c=i&&!0&&e&&!e.nodeType&&e,d=c&&c.exports===i,s=d?n.Buffer:void 0,u=s?s.isBuffer:void 0,p=u||r;e.exports=p}(J,J.exports);var so=J.exports,co=me,lo=Re,po=ge,uo="[object Arguments]",mo="[object Array]",fo="[object Boolean]",bo="[object Date]",go="[object Error]",ho="[object Function]",vo="[object Map]",yo="[object Number]",xo="[object Object]",So="[object RegExp]",$o="[object Set]",wo="[object String]",Po="[object WeakMap]",Co="[object ArrayBuffer]",Io="[object DataView]",To="[object Float32Array]",Mo="[object Float64Array]",Oo="[object Int8Array]",ko="[object Int16Array]",Eo="[object Int32Array]",No="[object Uint8Array]",Bo="[object Uint8ClampedArray]",jo="[object Uint16Array]",Ao="[object Uint32Array]",h={};h[To]=h[Mo]=h[Oo]=h[ko]=h[Eo]=h[No]=h[Bo]=h[jo]=h[Ao]=!0,h[uo]=h[mo]=h[Co]=h[fo]=h[Io]=h[bo]=h[go]=h[ho]=h[vo]=h[yo]=h[xo]=h[So]=h[$o]=h[wo]=h[Po]=!1;function _o(e){return po(e)&&lo(e.length)&&!!h[co(e)]}var Fo=_o;function Lo(e){return function(t){return e(t)}}var Do=Lo,X={exports:{}};X.exports,function(e,t){var n=Le,r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,c=i&&i.exports===r,d=c&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||d&&d.binding&&d.binding("util")}catch(p){}}();e.exports=s}(X,X.exports);var zo=X.exports,Go=Fo,Uo=Do,ot=zo,at=ot&&ot.isTypedArray,qo=at?Uo(at):Go,Ho=qo,Vo=Vr,Ko=no,Wo=oo,Jo=so,Xo=tt,Zo=Ho,Qo=Object.prototype,Yo=Qo.hasOwnProperty;function Ro(e,t){var n=Wo(e),r=!n&&Ko(e),i=!n&&!r&&Jo(e),c=!n&&!r&&!i&&Zo(e),d=n||r||i||c,s=d?Vo(e.length,String):[],u=s.length;for(var p in e)(t||Yo.call(e,p))&&!(d&&(p=="length"||i&&(p=="offset"||p=="parent")||c&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||Xo(p,u)))&&s.push(p);return s}var ea=Ro,ta=Object.prototype;function na(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||ta;return e===n}var ra=na;function oa(e,t){return function(n){return e(t(n))}}var aa=oa,ia=aa,sa=ia(Object.keys,Object),ca=sa,la=ra,da=ca,pa=Object.prototype,ua=pa.hasOwnProperty;function ma(e){if(!la(e))return da(e);var t=[];for(var n in Object(e))ua.call(e,n)&&n!="constructor"&&t.push(n);return t}var fa=ma,ba=ea,ga=fa,ha=et;function va(e){return ha(e)?ba(e):ga(e)}var ya=va,xa=Rn,Sa=qr,$a=ya,wa=Sa(function(e,t,n,r){xa(t,$a(t),e,r)}),Pa=wa;const Ca=_e(Pa);function he(...e){function t(r,i){return i===void 0?r:i}let n=Object.assign({},e[0]);for(let r=1;r<e.length;r++)n=Ca(n,e[r],t);return n}function Ia(e){return M.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),M.createElement("g",{id:"LeftOutline-LeftOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},M.createElement("g",{id:"LeftOutline-编组"},M.createElement("rect",{id:"LeftOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),M.createElement("path",{d:"M31.7053818,5.11219264 L13.5234393,22.6612572 L13.5234393,22.6612572 C12.969699,23.2125856 12.9371261,24.0863155 13.4257204,24.6755735 L13.5234393,24.7825775 L31.7045714,42.8834676 C31.7795345,42.9580998 31.8810078,43 31.9867879,43 L35.1135102,43 C35.3344241,43 35.5135102,42.8209139 35.5135102,42.6 C35.5135102,42.4936115 35.4711279,42.391606 35.3957362,42.316542 L16.7799842,23.7816937 L16.7799842,23.7816937 L35.3764658,5.6866816 C35.5347957,5.53262122 35.5382568,5.27937888 35.3841964,5.121049 C35.3088921,5.04365775 35.205497,5 35.0975148,5 L31.9831711,5 C31.8795372,5 31.7799483,5.04022164 31.7053818,5.11219264 Z",id:"LeftOutline-路径",fill:"currentColor",fillRule:"nonzero"}))))}function Ta(e){return M.createElement("svg",Object.assign({width:"1em",height:"1em",viewBox:"0 0 48 48",xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink"},e,{style:Object.assign({verticalAlign:"-0.125em"},e.style),className:["antd-mobile-icon",e.className].filter(Boolean).join(" ")}),M.createElement("g",{id:"RightOutline-RightOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},M.createElement("g",{id:"RightOutline-RightOutlined"},M.createElement("rect",{id:"RightOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),M.createElement("path",{d:"M17.3947957,5.11219264 L35.5767382,22.6612572 L35.5767382,22.6612572 C36.1304785,23.2125856 36.1630514,24.0863155 35.6744571,24.6755735 L35.5767382,24.7825775 L17.3956061,42.8834676 C17.320643,42.9580998 17.2191697,43 17.1133896,43 L13.9866673,43 C13.7657534,43 13.5866673,42.8209139 13.5866673,42.6 C13.5866673,42.4936115 13.6290496,42.391606 13.7044413,42.316542 L32.3201933,23.7816937 L32.3201933,23.7816937 L13.7237117,5.6866816 C13.5653818,5.53262122 13.5619207,5.27937888 13.7159811,5.121049 C13.7912854,5.04365775 13.8946805,5 14.0026627,5 L17.1170064,5 C17.2206403,5 17.3202292,5.04022164 17.3947957,5.11219264 Z",id:"RightOutline-right",fill:"currentColor",fillRule:"nonzero"}))))}const Si="",it="adm-safe-area",Ma=e=>F(e,l.createElement("div",{className:O(it,`${it}-position-${e.position}`)})),$i="",D="adm-badge",st=l.createElement(l.Fragment,null),ct=pe(e=>{const{content:t,color:n,children:r}=e,i=t===st,c=O(D,!!r&&`${D}-fixed`,i&&`${D}-dot`,e.bordered&&`${D}-bordered`),d=t||t===0?F(e,l.createElement("div",{className:c,style:{"--color":n}},!i&&l.createElement("div",{className:`${D}-content`},t))):null;return r?l.createElement("div",{className:O(`${D}-wrapper`,e.wrapperClassName),style:e.wrapperStyle},r,d):d},{dot:st});function Oa(e){const{value:t,defaultValue:n,onChange:r}=e,i=le.useUpdate(),c=l.useRef(t!==void 0?t:n);t!==void 0&&(c.current=t);const d=le.useMemoizedFn((s,u=!1)=>{const p=typeof s=="function"?s(c.current):s;if(!(!u&&p===c.current))return c.current=p,i(),r==null?void 0:r(p)});return[c.current,d]}var lt={exports:{}},g={};/**
|
|
25
25
|
* @license React
|
|
26
26
|
* react-is.production.min.js
|
|
27
27
|
*
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the MIT license found in the
|
|
31
31
|
* LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/var ve=Symbol.for("react.element"),ye=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),Q=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),ee=Symbol.for("react.context"),ka=Symbol.for("react.server_context"),te=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),Ea=Symbol.for("react.offscreen"),dt;dt=Symbol.for("react.module.reference");function P(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ve:switch(e=e.type,e){case Z:case Y:case Q:case ne:case re:return e;default:switch(e=e&&e.$$typeof,e){case ka:case ee:case te:case ae:case oe:case R:return e;default:return t}}case ye:return t}}}
|
|
32
|
+
*/var ve=Symbol.for("react.element"),ye=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),Q=Symbol.for("react.strict_mode"),Y=Symbol.for("react.profiler"),R=Symbol.for("react.provider"),ee=Symbol.for("react.context"),ka=Symbol.for("react.server_context"),te=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),Ea=Symbol.for("react.offscreen"),dt;dt=Symbol.for("react.module.reference");function P(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ve:switch(e=e.type,e){case Z:case Y:case Q:case ne:case re:return e;default:switch(e=e&&e.$$typeof,e){case ka:case ee:case te:case ae:case oe:case R:return e;default:return t}}case ye:return t}}}g.ContextConsumer=ee,g.ContextProvider=R,g.Element=ve,g.ForwardRef=te,g.Fragment=Z,g.Lazy=ae,g.Memo=oe,g.Portal=ye,g.Profiler=Y,g.StrictMode=Q,g.Suspense=ne,g.SuspenseList=re,g.isAsyncMode=function(){return!1},g.isConcurrentMode=function(){return!1},g.isContextConsumer=function(e){return P(e)===ee},g.isContextProvider=function(e){return P(e)===R},g.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ve},g.isForwardRef=function(e){return P(e)===te},g.isFragment=function(e){return P(e)===Z},g.isLazy=function(e){return P(e)===ae},g.isMemo=function(e){return P(e)===oe},g.isPortal=function(e){return P(e)===ye},g.isProfiler=function(e){return P(e)===Y},g.isStrictMode=function(e){return P(e)===Q},g.isSuspense=function(e){return P(e)===ne},g.isSuspenseList=function(e){return P(e)===re},g.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Z||e===Y||e===Q||e===ne||e===re||e===Ea||typeof e=="object"&&e!==null&&(e.$$typeof===ae||e.$$typeof===oe||e.$$typeof===R||e.$$typeof===ee||e.$$typeof===te||e.$$typeof===dt||e.getModuleId!==void 0)},g.typeOf=P,lt.exports=g;var Na=lt.exports;function Ba(e,t){let n=0;function r(i){l.Children.forEach(i,c=>{Na.isFragment(c)?r(c.props.children):(t(c,n),n+=1)})}r(e)}const Pi="",H="adm-list",ja={mode:"default"},Aa=l.forwardRef((e,t)=>{const n=he(ja,e),r=l.useRef(null);return l.useImperativeHandle(t,()=>({get nativeElement(){return r.current}})),F(n,l.createElement("div",{className:O(H,`${H}-${n.mode}`),ref:r},n.header&&l.createElement("div",{className:`${H}-header`},n.header),l.createElement("div",{className:`${H}-body`},l.createElement("div",{className:`${H}-body-inner`},n.children))))});function V(e){return e!=null&&e!==!1}const k="adm-list-item",ie=pe(Aa,{Item:e=>{var t;const n=(t=e.clickable)!==null&&t!==void 0?t:!!e.onClick,r=e.arrow===void 0?n:e.arrow,i=l.createElement("div",{className:`${k}-content`},V(e.prefix)&&l.createElement("div",{className:`${k}-content-prefix`},e.prefix),l.createElement("div",{className:`${k}-content-main`},V(e.title)&&l.createElement("div",{className:`${k}-title`},e.title),e.children,V(e.description)&&l.createElement("div",{className:`${k}-description`},e.description)),V(e.extra)&&l.createElement("div",{className:`${k}-content-extra`},e.extra),V(r)&&l.createElement("div",{className:`${k}-content-arrow`},r===!0?l.createElement(Ta,null):r));return F(e,l.createElement(n?"a":"div",{className:O(`${k}`,n?["adm-plain-anchor"]:[],e.disabled&&`${k}-disabled`),onClick:e.disabled?void 0:e.onClick},i))}}),Ii="",z="adm-nav-bar",_a={backArrow:!0},Fa=e=>{const t=he(_a,e),{back:n,backArrow:r}=t;return F(t,l.createElement("div",{className:O(z)},l.createElement("div",{className:`${z}-left`,role:"button"},n!==null&&l.createElement("div",{className:`${z}-back`,onClick:t.onBack},r&&l.createElement("span",{className:`${z}-back-arrow`},r===!0?l.createElement(Ia,null):r),l.createElement("span",{"aria-hidden":"true"},n)),t.left),l.createElement("div",{className:`${z}-title`},t.children),l.createElement("div",{className:`${z}-right`},t.right)))},Ti="",La=()=>null,E="adm-tab-bar",Da={safeArea:!1},xe=pe(e=>{var t;const n=he(Da,e);let r=null;const i=[];Ba(n.children,(s,u)=>{if(!l.isValidElement(s))return;const p=s.key;typeof p=="string"&&(u===0&&(r=p),i.push(s))});const[c,d]=Oa({value:n.activeKey,defaultValue:(t=n.defaultActiveKey)!==null&&t!==void 0?t:r,onChange:s=>{var u;s!==null&&((u=n.onChange)===null||u===void 0||u.call(n,s))}});return F(n,l.createElement("div",{className:E},l.createElement("div",{className:`${E}-wrap`},i.map(s=>{const u=s.key===c;function p(){const b=s.props.icon&&l.createElement("div",{className:`${E}-item-icon`},typeof s.props.icon=="function"?s.props.icon(u):s.props.icon),x=s.props.title&&l.createElement("div",{className:O(`${E}-item-title`,!!b&&`${E}-item-title-with-icon`)},typeof s.props.title=="function"?s.props.title(u):s.props.title);return b?l.createElement(l.Fragment,null,l.createElement(ct,{content:s.props.badge,className:`${E}-icon-badge`},b),x):x?l.createElement(ct,{content:s.props.badge,className:`${E}-title-badge`},x):null}return F(s.props,l.createElement("div",{key:s.key,onClick:()=>{const{key:b}=s;b!=null&&d(b.toString())},className:O(`${E}-item`,{[`${E}-item-active`]:u})},p()))})),n.safeArea&&l.createElement(Ma,{position:"bottom"})))},{Item:La}),pt={type:"void","x-component":"MPage","x-designer":"MPage.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"MBlockInitializers","x-component-props":{showDivider:!1}}}},za=e=>{const{t}=w(),n=f.useFieldSchema(),{dn:r}=a.useDesignable(),i=f.useField(),c={dn:r,field:i,fieldSchema:n};return o.jsx(a.SchemaSettings,A($({title:o.jsx(I.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)"},icon:o.jsx(T.MenuOutlined,{}),type:"dashed",children:t("Menu configuration")})},c),{children:o.jsx(a.SchemaSettings.Remove,{removeParentsIfNoChildren:!0,confirm:{title:t("Delete menu block")},breakRemoveOn:{"x-component":"Grid"}},"remove")}))},K=()=>{const{dn:e}=a.useDesignable(),t=f.useFieldSchema(),n=f.useField();return{onUpdateComponentProps:le.useMemoizedFn(i=>_(this,null,function*(){U.set(t,"x-component-props",i),n.componentProps=$($({},n.componentProps),i),yield e.emit("patch",{schema:{"x-uid":t["x-uid"],"x-component-props":t["x-component-props"],"x-server-hooks":[{type:"onSelfSave",method:"extractTextToLocale"}]}}),yield e.refresh()}))}},ut={properties:{name:{type:"string",title:N("Menu name"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{"x-decorator":"FormItem","x-component":"IconPicker",title:N("Icon"),"x-component-props":{}}}},Ga=e=>{const{icon:t,name:n}=e,r=a.useDesigner(),i=v.useNavigate(),c=v.useLocation(),d=f.useFieldSchema(),s=a.useCompile(),u=v.useParams(),p=()=>{const b=c.pathname.endsWith("/")?c.pathname.slice(0,-1):c.pathname;i(u.name?`/mobile/${d["x-uid"]}`:`${b}/${d["x-uid"]}`)};return o.jsxs(a.SortableItem,{className:a.cx("nb-mobile-menu-item",a.css`
|
|
33
33
|
width: 100%;
|
|
34
34
|
background: var(--adm-color-background);
|
|
35
35
|
> .adm-list-item {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
background: ${e.colorBgContainer};
|
|
47
47
|
width: 100%;
|
|
48
48
|
margin-bottom: var(--nb-spacing);
|
|
49
|
-
`})),Se=e=>{const{styles:t}=qa(),n=a.useDesigner(),r=f.useFieldSchema(),{insertBeforeEnd:i,designable:c}=a.useDesignable(),{t:d}=w(),s=u=>{const p={page:pt};return i({type:"void",title:u.name,"x-component":"MMenu.Item","x-component-props":u,"x-designer":"MMenu.Item.Designer",properties:p})};return o.jsx(a.SortableItem,{className:a.cx("nb-mobile-menu",t.mobileMenu),children:o.jsxs(ie,{children:[c&&o.jsx(ie.Item,{children:o.jsx(n,{})}),o.jsx(a.DndContext,{children:o.jsx(a.SchemaComponent,{onlyRenderProperties:!0,schema:r})}),c?o.jsx(ie.Item,{children:o.jsx(a.SchemaInitializer.ActionModal,{buttonText:d("Add menu item"),title:d("Add menu item"),schema:ut,onSubmit:s})}):null]})})};Se.Item=mt,Se.Designer=za;const se=(e,t)=>e.reduceProperties((r,i)=>r||i["x-component"]===t&&i),Ha=e=>se(e,"Grid"),Va=["Grid","Grid.Row"],Ka=["Grid.Col"],$e=(e,t)=>{if(!e)return 0;let n=0;return Ka.includes(e["x-component"])&&(n+=1),typeof t=="number"&&n>=t||Va.includes(e["x-component"])&&e.mapProperties(r=>{n+=$e(r,t)}),n},Wa=()=>{const{t:e}=w(),t=f.useFieldSchema(),{onUpdateComponentProps:n}=K(),r=f.useField(),{dn:i}=a.useDesignable(),c=v.useNavigate(),d=se(t,"MTabBar"),s=d&&r.componentProps.tabBarEnabled!==!1,u={dn:i,field:r,fieldSchema:t};return o.jsx(a.SchemaSettings,A($({title:o.jsx(I.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)",width:"100%"},icon:o.jsx(T.MenuOutlined,{}),type:"dashed",children:e("App level Configuration")})},u),{children:o.jsx(a.SchemaSettings.SwitchItem,{checked:s,title:e("Enable TabBar"),onChange:p=>_(this,null,function*(){if(p&&!d){const
|
|
49
|
+
`})),Se=e=>{const{styles:t}=qa(),n=a.useDesigner(),r=f.useFieldSchema(),{insertBeforeEnd:i,designable:c}=a.useDesignable(),{t:d}=w(),s=u=>{const p={page:pt};return i({type:"void",title:u.name,"x-component":"MMenu.Item","x-component-props":u,"x-designer":"MMenu.Item.Designer",properties:p})};return o.jsx(a.SortableItem,{className:a.cx("nb-mobile-menu",t.mobileMenu),children:o.jsxs(ie,{children:[c&&o.jsx(ie.Item,{children:o.jsx(n,{})}),o.jsx(a.DndContext,{children:o.jsx(a.SchemaComponent,{onlyRenderProperties:!0,schema:r})}),c?o.jsx(ie.Item,{children:o.jsx(a.SchemaInitializer.ActionModal,{buttonText:d("Add menu item"),title:d("Add menu item"),schema:ut,onSubmit:s})}):null]})})};Se.Item=mt,Se.Designer=za;const se=(e,t)=>e.reduceProperties((r,i)=>r||i["x-component"]===t&&i),Ha=e=>se(e,"Grid"),Va=["Grid","Grid.Row"],Ka=["Grid.Col"],$e=(e,t)=>{if(!e)return 0;let n=0;return Ka.includes(e["x-component"])&&(n+=1),typeof t=="number"&&n>=t||Va.includes(e["x-component"])&&e.mapProperties(r=>{n+=$e(r,t)}),n},Wa=()=>{const{t:e}=w(),t=f.useFieldSchema(),{onUpdateComponentProps:n}=K(),r=f.useField(),{dn:i}=a.useDesignable(),c=v.useNavigate(),d=se(t,"MTabBar"),s=d&&r.componentProps.tabBarEnabled!==!1,u={dn:i,field:r,fieldSchema:t};return o.jsx(a.SchemaSettings,A($({title:o.jsx(I.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)",width:"100%"},icon:o.jsx(T.MenuOutlined,{}),type:"dashed",children:e("App level Configuration")})},u),{children:o.jsx(a.SchemaSettings.SwitchItem,{checked:s,title:e("Enable TabBar"),onChange:p=>_(this,null,function*(){if(p&&!d){const b=se(t,"MPage");yield i.remove(b),yield i.insertBeforeEnd({type:"void","x-component":"MTabBar","x-component-props":{},name:"tabBar",properties:{[de.uid()]:{type:"void","x-component":"MTabBar.Item","x-designer":"MTabBar.Item.Designer","x-component-props":{icon:"HomeOutlined",title:N("Untitled")},properties:{page:b.toJSON()}}}})}yield n({tabBarEnabled:p}),p===!1&&c("../")})})}))},Ja=a.createStyles(({token:e,css:t})=>({mobileContainer:t`
|
|
50
50
|
--adm-color-primary: ${e.colorPrimary};
|
|
51
51
|
|
|
52
52
|
& > .general-schema-designer > .general-schema-designer-icons {
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
bottom: 0;
|
|
71
71
|
left: 0;
|
|
72
72
|
z-index: 1000;
|
|
73
|
-
`})),ft=(e,t)=>e.reduceProperties((n,r)=>{if(n)return n;if(r["x-component"]==="MTabBar")return ft(r,t);if(r["x-component"]==="MTabBar.Item"&&t===r["x-uid"])return r}),Xa=()=>{const{name:e}=v.useParams(),t=f.useFieldSchema();if(!e)return o.jsx(o.Fragment,{});const n=ft(t.properties.tabBar,e.replace("tab_",""));return n?o.jsx(a.SchemaComponent,{schema:n}):o.jsx(v.Navigate,{replace:!0,to:"../"})},we=e=>{var L,B;const{styles:t}=Ja(),{token:n}=a.useToken(),r=a.useDesigner(),i=f.useFieldSchema(),c=v.useNavigate(),d=v.useParams(),s=v.useLocation(),p=f.useField().componentProps.tabBarEnabled!==!1,
|
|
73
|
+
`})),ft=(e,t)=>e.reduceProperties((n,r)=>{if(n)return n;if(r["x-component"]==="MTabBar")return ft(r,t);if(r["x-component"]==="MTabBar.Item"&&t===r["x-uid"])return r}),Xa=()=>{const{name:e}=v.useParams(),t=f.useFieldSchema();if(!e)return o.jsx(o.Fragment,{});const n=ft(t.properties.tabBar,e.replace("tab_",""));return n?o.jsx(a.SchemaComponent,{schema:n}):o.jsx(v.Navigate,{replace:!0,to:"../"})},we=e=>{var L,B;const{styles:t}=Ja(),{token:n}=a.useToken(),r=a.useDesigner(),i=f.useFieldSchema(),c=v.useNavigate(),d=v.useParams(),s=v.useLocation(),p=f.useField().componentProps.tabBarEnabled!==!1,b=(L=i==null?void 0:i.properties)==null?void 0:L.tabBar,x=b!=null&&b.properties?Object.keys(b.properties)[0]:null;let S=null;return x&&(S=(B=b==null?void 0:b.properties[x])==null?void 0:B["x-uid"]),l.useEffect(()=>{if(S&&!d.name){const C=s.pathname.endsWith("/")?s.pathname.slice(0,-1):s.pathname;c(`${C}/tab_${S}`,{replace:!0})}},[s.pathname,c,d.name,S]),o.jsxs(a.SortableItem,{eid:"nb-mobile-scroll-wrapper",className:a.cx("nb-mobile-container",t.mobileContainer),children:[o.jsx(r,{}),o.jsx("div",{style:{paddingBottom:S?n.paddingLG*2:0},className:"nb-mobile-container-content",children:S?o.jsx(Xa,{}):o.jsx(a.SchemaComponent,{filterProperties:C=>C["x-component"]!=="MTabBar",schema:i})}),p&&o.jsx("div",{className:a.cx("nb-mobile-container-tab-bar",t.tabBar),children:o.jsx(a.SchemaComponent,{onlyRenderProperties:!0,filterProperties:C=>C["x-component"]==="MTabBar",schema:i})})]})};we.Designer=Wa,we.displayName="MContainer";const bt={properties:{title:{type:"string",title:"{{ t('Title') }}",required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{required:!0,"x-decorator":"FormItem","x-component":"IconPicker",title:"{{ t('Icon') }}","x-component-props":{}}}},Za=()=>{const e=a.useDesigner();return o.jsx(a.SortableItem,{className:a.cx("nb-mobile-tab-bar-item",a.css`
|
|
74
74
|
position: absolute !important;
|
|
75
75
|
width: 100%;
|
|
76
76
|
height: 100%;
|
|
@@ -82,12 +82,12 @@
|
|
|
82
82
|
display: flex;
|
|
83
83
|
align-items: center;
|
|
84
84
|
`),children:o.jsx(a.DndContext,{children:o.jsxs(xe,{activeKey:d.name,onChange:p=>{p!=="add-tab"&&c(`/mobile/${p}`)},safeArea:!0,className:a.cx(a.css`
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
width: 100%;
|
|
86
|
+
`),children:[t.mapProperties((p,b)=>{const x=p["x-component-props"];return l.createElement(xe.Item,A($({},x),{key:`tab_${p["x-uid"]}`,title:o.jsxs(o.Fragment,{children:[r(s(x.title)),o.jsx(a.SchemaComponent,{schema:p,name:b})]}),icon:x.icon?o.jsx(a.Icon,{type:x.icon}):void 0}))}),n&&(!t.properties||Object.keys(t.properties).length<5)?o.jsx(xe.Item,{className:a.css`
|
|
87
87
|
.adm-tab-bar-item-icon {
|
|
88
88
|
height: auto;
|
|
89
89
|
}
|
|
90
|
-
`,icon:o.jsx(a.SchemaInitializer.ActionModal,{title:r("Add tab"),onSubmit:u,schema:bt})},"add-tab"):null]})})})};Pe.Item=gt,Pe.displayName="MTabBar";const Ya=e=>{var S,L,B,C;const{showBack:t}=e,{t:n}=w(),r=f.useField(),i=f.useFieldSchema(),{dn:c}=a.useDesignable(),{onUpdateComponentProps:d}=K(),s=(S=i==null?void 0:i.properties)==null?void 0:S.header,u=!!s&&((L=r.componentProps)==null?void 0:L.headerEnabled)!==!1,p=(B=i==null?void 0:i.properties)==null?void 0:B.tabs,
|
|
90
|
+
`,icon:o.jsx(a.SchemaInitializer.ActionModal,{title:r("Add tab"),onSubmit:u,schema:bt})},"add-tab"):null]})})})};Pe.Item=gt,Pe.displayName="MTabBar";const Ya=e=>{var S,L,B,C;const{showBack:t}=e,{t:n}=w(),r=f.useField(),i=f.useFieldSchema(),{dn:c}=a.useDesignable(),{onUpdateComponentProps:d}=K(),s=(S=i==null?void 0:i.properties)==null?void 0:S.header,u=!!s&&((L=r.componentProps)==null?void 0:L.headerEnabled)!==!1,p=(B=i==null?void 0:i.properties)==null?void 0:B.tabs,b=!!p&&((C=r.componentProps)==null?void 0:C.tabsEnabled)!==!1,x={dn:c,field:r,fieldSchema:i};return o.jsxs(a.SchemaSettings,A($({title:o.jsx(I.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)",width:"100%"},icon:o.jsx(T.MenuOutlined,{}),type:"dashed",children:n("Page configuration")})},x),{children:[o.jsx(a.SchemaSettings.SwitchItem,{checked:u,title:n("Enable Header"),onChange:G=>_(this,null,function*(){var j;s||(yield c.insertAfterBegin({type:"void",name:"header","x-component":"MHeader","x-designer":"MHeader.Designer","x-component-props":{title:(j=i.parent["x-component-props"])==null?void 0:j.name,showBack:t}})),yield d({headerEnabled:G})})}),o.jsx(a.SchemaSettings.SwitchItem,{checked:b,title:n("Enable Tabs"),onChange:G=>_(this,null,function*(){if(!p){const j=Ha(i);return yield c.remove(j),c.insertBeforeEnd({type:"void",name:"tabs","x-component":"Tabs","x-component-props":{},"x-initializer":"TabPaneInitializers","x-initializer-props":{gridInitializer:"MBlockInitializers"},properties:{tab1:{type:"void",title:N("Untitled"),"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:A($({},j),{"x-uid":de.uid()})}}}})}yield d({tabsEnabled:G})})})]}))},Ra=a.createStyles(({token:e,css:t})=>({globalActionCSS:t`
|
|
91
91
|
#nb-position-container > & {
|
|
92
92
|
height: ${e.sizeXXL}px;
|
|
93
93
|
border-top: 1px solid var(--nb-box-bg);
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
}
|
|
118
118
|
display: flex;
|
|
119
119
|
flex-direction: column;
|
|
120
|
-
`})),Ce=e=>{var C,G,j,St,$t;const{styles:t}=Ra(),n=a.useDesigner(),r=f.useField(),i=f.useFieldSchema(),[c,d]=v.useSearchParams(),s=(C=i.properties)==null?void 0:C.tabs,u=r.componentProps.headerEnabled!==!1,p=r.componentProps.tabsEnabled!==!1;let
|
|
120
|
+
`})),Ce=e=>{var C,G,j,St,$t;const{styles:t}=Ra(),n=a.useDesigner(),r=f.useField(),i=f.useFieldSchema(),[c,d]=v.useSearchParams(),s=(C=i.properties)==null?void 0:C.tabs,u=r.componentProps.headerEnabled!==!1,p=r.componentProps.tabsEnabled!==!1;let b=se(i,"MPage");if(!p&&!b&&s){const y=Object.values(s.properties||{}).sort((Te,Me)=>Te["x-index"]-Me["x-index"]);y.length!==0&&(b=(G=Object.values(y[0].properties))==null?void 0:G[0])}const x=i.root===i.parent;let S=!1;if(!s&&i.properties)S=$e(i.properties.grid,2)===1;else if(c.has("tab")&&((j=s==null?void 0:s.properties)!=null&&j[c.get("tab")]))S=$e(($t=(St=s.properties[c.get("tab")])==null?void 0:St.properties)==null?void 0:$t.grid,2)===1;else if(s!=null&&s.properties){const y=Object.values(s.properties).sort((Te,Me)=>Te["x-index"]-Me["x-index"])[0];y&&setTimeout(()=>{d([["tab",y.name.toString()]],{replace:!0})})}const L=l.useCallback(y=>{d([["tab",y]],{replace:!0})},[d]),B=l.useCallback(y=>o.jsx(a.TabsContextProvider,{children:S?o.jsx(a.ActionBarProvider,{container:(typeof y.active=="undefined"||y.active)&&x?document.getElementById("nb-position-container"):null,forceProps:{layout:"one-column",className:t.globalActionCSS},children:y.children}):y.children}),[S,x,t.globalActionCSS]);return o.jsxs(a.SortableItem,{eid:"nb-mobile-scroll-wrapper",className:a.cx("nb-mobile-page",t.mobilePage),children:[o.jsx(n,$({},i==null?void 0:i["x-designer-props"])),o.jsxs("div",{style:{paddingBottom:s?null:"var(--nb-spacing)"},className:a.cx("nb-mobile-page-header",t.mobilePageHeader),children:[u&&o.jsx(f.RecursionField,{schema:i,filterProperties:y=>y["x-component"]==="MHeader"}),o.jsx(a.TabsContextProvider,{PaneRoot:B,activeKey:c.get("tab"),onChange:L,children:o.jsx(f.RecursionField,{schema:p?i:b,filterProperties:y=>y["x-component"]==="Tabs"||y["x-component"]==="Grid.Row"})})]}),o.jsx(B,{children:!s&&o.jsx(f.RecursionField,{schema:i,filterProperties:y=>y["x-component"]!=="MHeader"})})]})};Ce.Designer=Ya,Ce.displayName="MPage";const ei=()=>{const e=f.useField(),{onUpdateComponentProps:t}=K(),{t:n}=w();return o.jsx(a.GeneralSchemaDesigner,{draggable:!1,children:o.jsx(a.SchemaSettings.ModalItem,{title:n("Edit info"),components:{Switch:Ct.Switch},initialValues:e.componentProps,schema:{properties:{title:{type:"string",title:n("Title"),required:!0,"x-component":"Input","x-decorator":"FormItem"},showBack:{type:"boolean",title:n("Display back button"),"x-component":"Switch","x-decorator":"FormItem"}}},onSubmit:t})})},ht=e=>{const t=f.useField(),{title:n=N("Untitled"),showBack:r=!1}=$($({},e),t==null?void 0:t.componentProps),i=a.useDesigner(),d=a.useCompile()(n),s=v.useNavigate(),{setTitle:u}=a.useDocumentTitle(),{token:p}=a.useToken();l.useEffect(()=>{u(d)},[d]);const b=l.useMemo(()=>({width:"100%",background:p.colorBgContainer}),[p.colorBgContainer]);return o.jsxs(a.SortableItem,{className:a.cx("nb-mobile-header"),style:b,children:[o.jsx(Fa,{backArrow:r,onBack:()=>s(-1),children:d}),o.jsx(i,{})]})};ht.Designer=ei;const ti=()=>{const{t:e}=w();return o.jsx(a.GeneralSchemaDesigner,{children:o.jsx(a.SchemaSettings.Remove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete settings block")},breakRemoveOn:{"x-component":"Grid"}},"remove")})},vt=()=>{const e=a.useDesigner();return o.jsxs(a.SortableItem,{className:a.cx("nb-mobile-setting",a.css`
|
|
121
121
|
margin-bottom: var(--nb-spacing);
|
|
122
122
|
`),children:[o.jsx(e,{}),o.jsx(a.SettingsMenu,{redirectUrl:"/mobile"})]})};vt.Designer=ti;const ni=e=>{const{insert:t}=e;return o.jsx(a.SchemaInitializer.Item,{icon:o.jsx(T.SettingOutlined,{}),onClick:()=>_(this,null,function*(){t({type:"void","x-component":"MSettings","x-designer":"MSettings.Designer","x-component-props":{}})})})},ri=a.css`
|
|
123
123
|
padding: 0 var(--nb-spacing);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
"@nocobase/client": "0.14.0-alpha.1",
|
|
3
|
+
"react": "18.2.0",
|
|
4
|
+
"react-router-dom": "6.14.1",
|
|
5
|
+
"@nocobase/server": "0.14.0-alpha.1",
|
|
6
|
+
"antd": "5.8.6",
|
|
7
|
+
"react-i18next": "11.18.6",
|
|
8
|
+
"@ant-design/icons": "5.1.4",
|
|
9
|
+
"@nocobase/database": "0.14.0-alpha.1",
|
|
10
|
+
"@formily/react": "2.2.27",
|
|
11
|
+
"@formily/shared": "2.2.27",
|
|
12
|
+
"lodash": "4.17.21",
|
|
13
|
+
"ahooks": "3.7.8",
|
|
14
|
+
"@formily/antd-v5": "1.1.0"
|
|
15
|
+
};
|
|
@@ -30,6 +30,10 @@ class mobile_ui_schema_uid_default extends import_server.Migration {
|
|
|
30
30
|
return;
|
|
31
31
|
}
|
|
32
32
|
const uiRoutes = this.db.getRepository("uiRoutes");
|
|
33
|
+
if (!uiRoutes) {
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
await this.db.getCollection("systemSettings").sync();
|
|
33
37
|
const routes = await uiRoutes.find();
|
|
34
38
|
for (const route of routes) {
|
|
35
39
|
if (route.uiSchemaUid && ((_b = route == null ? void 0 : route.options) == null ? void 0 : _b.component) === "MApplication") {
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-mobile-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0-alpha.1",
|
|
4
4
|
"main": "./dist/server/index.js",
|
|
5
|
-
"displayName": "Mobile
|
|
5
|
+
"displayName": "Mobile client",
|
|
6
6
|
"displayName.zh-CN": "移动端",
|
|
7
|
-
"description": "
|
|
8
|
-
"description.zh-CN": "
|
|
7
|
+
"description": "Provides the ability to configure mobile pages",
|
|
8
|
+
"description.zh-CN": "提供移动端页面配置的能力",
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"@ant-design/icons": "5.x",
|
|
11
11
|
"@formily/antd-v5": "1.x",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"@nocobase/test": "0.x",
|
|
31
31
|
"@nocobase/utils": "0.x"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "25841167f720207933dd49fde3b4e426048ce258"
|
|
34
34
|
}
|