@nocobase/plugin-mobile-client 0.20.0-alpha.9 → 0.21.0-alpha.10
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/core/schema/initializers/BlockInitializers.d.ts +7 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +23 -23
- package/dist/externalVersion.js +3 -3
- package/dist/server/plugin.d.ts +2 -2
- package/dist/server/plugin.js +5 -5
- package/dist/server/routes.js +1 -1
- package/package.json +2 -2
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { CompatibleSchemaInitializer } from '@nocobase/client';
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated
|
|
4
|
+
* use `mBlockInitializers` instead
|
|
5
|
+
*/
|
|
6
|
+
export declare const mBlockInitializers_deprecated: CompatibleSchemaInitializer;
|
|
7
|
+
export declare const mBlockInitializers: CompatibleSchemaInitializer;
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Plugin, RouterManager } from '@nocobase/client';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export declare class
|
|
3
|
+
export declare class PluginMobileClient extends Plugin {
|
|
4
4
|
mobileRouter: RouterManager;
|
|
5
5
|
load(): Promise<void>;
|
|
6
6
|
addSettings(): void;
|
|
@@ -10,4 +10,4 @@ export declare class MobileClientPlugin extends Plugin {
|
|
|
10
10
|
}>;
|
|
11
11
|
addRoutes(): void;
|
|
12
12
|
}
|
|
13
|
-
export default
|
|
13
|
+
export default PluginMobileClient;
|
package/dist/client/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document!="undefined"){var a=document.createElement("style");a.id="@nocobase/plugin-mobile-client",a.appendChild(document.createTextNode(':root{--adm-radius-s: 4px;--adm-radius-m: 8px;--adm-radius-l: 12px;--adm-font-size-1: 9px;--adm-font-size-2: 10px;--adm-font-size-3: 11px;--adm-font-size-4: 12px;--adm-font-size-5: 13px;--adm-font-size-6: 14px;--adm-font-size-7: 15px;--adm-font-size-8: 16px;--adm-font-size-9: 17px;--adm-font-size-10: 18px;--adm-color-primary: #1677ff;--adm-color-success: #00b578;--adm-color-warning: #ff8f1f;--adm-color-danger: #ff3141;--adm-color-yellow: #ff9f18;--adm-color-orange: #ff6430;--adm-color-wathet: #e7f1ff;--adm-color-text: #333333;--adm-color-text-secondary: #666666;--adm-color-weak: #999999;--adm-color-light: #cccccc;--adm-color-border: #eeeeee;--adm-color-background: #ffffff;--adm-color-highlight: var(--adm-color-danger);--adm-color-white: #ffffff;--adm-color-box: #f5f5f5;--adm-color-text-light-solid: var(--adm-color-white);--adm-color-text-dark-solid: #000000;--adm-color-fill-content: var(--adm-color-box);--adm-font-size-main: var(--adm-font-size-5);--adm-font-family: -apple-system, blinkmacsystemfont, "Helvetica Neue", helvetica, segoe ui, arial, roboto, "PingFang SC", "miui", "Hiragino Sans GB", "Microsoft Yahei", sans-serif;--adm-border-color: var(--adm-color-border)}html[data-prefers-color-scheme=dark]{--adm-color-primary: #3086ff;--adm-color-success: #34b368;--adm-color-warning: #ffa930;--adm-color-danger: #ff4a58;--adm-color-yellow: #ffa930;--adm-color-orange: #e65a2b;--adm-color-wathet: #0d2543;--adm-color-text: #e6e6e6;--adm-color-text-secondary: #b3b3b3;--adm-color-weak: #808080;--adm-color-light: #4d4d4d;--adm-color-border: #2b2b2b;--adm-color-box: #0a0a0a;--adm-color-background: #1a1a1a;--adm-color-background-body: var(--adm-color-background);--adm-border-color: var(--adm-color-border)}:root{-webkit-tap-highlight-color:rgba(0,0,0,0)}html{background-color:var(--adm-color-background-body)}body{color:var(--adm-color-text);font-size:var(--adm-font-size-main);font-family:var(--adm-font-family)}a,button{cursor:pointer}a{color:var(--adm-color-primary);transition:opacity ease-in-out .2s}a:active{opacity:.8}.adm-plain-anchor{color:unset;transition:none}.adm-plain-anchor:active{opacity:unset}body.adm-overflow-hidden{overflow:hidden!important}div.adm-px-tester{--size: 1;height:calc(var(--size) / 2 * 2px);width:0;position:fixed;right:-100vw;bottom:-100vh;-webkit-user-select:none;user-select:none;pointer-events:none}.adm-safe-area{--multiple: var(--adm-safe-area-multiple, 1);display:block;width:100%}.adm-safe-area-position-top{padding-top:calc(env(safe-area-inset-top) * var(--multiple))}.adm-safe-area-position-bottom{padding-bottom:calc(env(safe-area-inset-bottom) * var(--multiple))}.adm-badge-wrapper{display:inline-block;position:relative}.adm-badge{display:inline-flex;vertical-align:middle;box-sizing:content-box;border-radius:100px;background-color:var(--color);--right: 0;--top: 0;--color: var(--adm-badge-color, var(--adm-color-highlight))}.adm-badge-content{color:var(--adm-color-text-light-solid);box-sizing:border-box;min-width:8px;padding:1px 4px;font-size:var(--adm-font-size-1);line-height:12px;white-space:nowrap;font-weight:400;text-align:center}.adm-badge-fixed{position:absolute;right:var(--right);top:var(--top);transform:translate(50%,-50%)}.adm-badge-dot{min-width:10px;width:10px;height:10px;border-radius:5px}.adm-badge-bordered{border:solid 1px var(--adm-color-text-light-solid)}.adm-list{--header-font-size: var(--adm-font-size-7);--prefix-width: "auto";--prefix-padding-right: 12px;--align-items: center;--active-background-color: var(--adm-color-border);--border-inner: solid 1px var(--adm-color-border);--border-top: solid 1px var(--adm-color-border);--border-bottom: solid 1px var(--adm-color-border);--padding-left: 12px;--padding-right: 12px;--font-size: var(--adm-font-size-9);--extra-max-width: 70%}.adm-list-header{color:var(--adm-color-weak);font-size:var(--header-font-size);padding:8px var(--padding-right) 8px var(--padding-left)}.adm-list-body{background-color:var(--adm-color-background);overflow:hidden;font-size:var(--font-size)}.adm-list-body-inner{margin-top:-1px}.adm-list-default .adm-list-body{border-top:var(--border-top);border-bottom:var(--border-bottom)}.adm-list-card{margin:12px}.adm-list-card .adm-list-body{border-radius:8px}.adm-list-card .adm-list-header{padding-left:0}.adm-list-item{display:block;padding-left:var(--padding-left);position:relative;background-color:var(--adm-color-background);line-height:1.5}.adm-list-item-title,.adm-list-item-description{color:var(--adm-color-weak);font-size:var(--adm-font-size-main)}.adm-list-item-content{display:flex;align-items:var(--align-items);justify-content:flex-start;border-top:var(--border-inner);padding-right:var(--padding-right)}.adm-list-item-content-prefix{width:var(--prefix-width);flex:none;padding-right:var(--prefix-padding-right)}.adm-list-item-content-main{flex:auto;padding:12px 0}.adm-list-item-content-extra{flex:none;padding-left:12px;font-size:var(--adm-font-size-7);color:var(--adm-color-weak);max-width:var(--extra-max-width)}.adm-list-item-content-arrow{flex:none;display:flex;align-items:center;margin-left:4px;color:var(--adm-color-light);font-size:19px}.adm-list-item-disabled{cursor:not-allowed}.adm-list-item-disabled.adm-list-item-disabled>.adm-list-item-content>*{opacity:.4;pointer-events:none}a.adm-list-item:active:not(.adm-list-item-disabled){background-color:var(--active-background-color)}a.adm-list-item:active:not(.adm-list-item-disabled):after{content:" ";display:block;position:absolute;width:100%;bottom:-1px;left:0;border-bottom:var(--border-inner)}.adm-nav-bar{--height: 45px;--border-bottom: none;display:flex;align-items:center;height:var(--height);border-bottom:var(--border-bottom);padding:0 12px;white-space:nowrap}.adm-nav-bar-left,.adm-nav-bar-right{flex:1}.adm-nav-bar-title{flex:auto;text-align:center;overflow:hidden;text-overflow:ellipsis}.adm-nav-bar-back{display:flex;align-items:center;margin-right:16px;padding:6px 0;cursor:pointer}.adm-nav-bar-back-arrow{font-size:24px;margin-right:4px}.adm-nav-bar-left{font-size:var(--adm-font-size-7);display:flex;justify-content:flex-start;align-items:center}.adm-nav-bar-title{justify-content:center;white-space:nowrap;font-size:var(--adm-font-size-10);padding:0 12px}.adm-nav-bar-right{text-align:right}.adm-tab-bar-wrap{display:flex;flex-wrap:nowrap;justify-content:flex-start;align-items:stretch;overflow:hidden;min-height:48px}.adm-tab-bar-item{flex:1;color:var(--adm-color-text-secondary);white-space:nowrap;padding:4px 8px;width:-webkit-min-content;width:min-content;position:relative;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-direction:column}.adm-tab-bar-item-icon{font-size:24px;height:24px;line-height:1}.adm-tab-bar-item-title{font-size:var(--adm-font-size-2);line-height:15px}.adm-tab-bar-item-title-with-icon{margin-top:2px}.adm-tab-bar-item-active{color:var(--adm-color-primary)}.adm-tab-bar-icon-badge{--top: 6px}.adm-tab-bar-title-badge{--right: -2px;--top: -2px}')),document.head.appendChild(a)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
-
(function(m,
|
|
2
|
+
(function(m,o){typeof exports=="object"&&typeof module!="undefined"?o(exports,require("react/jsx-runtime"),require("@nocobase/client"),require("react-router-dom"),require("react"),require("react-i18next"),require("@ant-design/icons"),require("@formily/react"),require("antd"),require("lodash"),require("ahooks"),require("@formily/shared"),require("@formily/antd-v5")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","@nocobase/client","react-router-dom","react","react-i18next","@ant-design/icons","@formily/react","antd","lodash","ahooks","@formily/shared","@formily/antd-v5"],o):(m=typeof globalThis!="undefined"?globalThis:m||self,o(m["@nocobase/plugin-mobile-client"]={},m.jsxRuntime,m["@nocobase/client"],m["react-router-dom"],m.react,m["react-i18next"],m["@ant-design/icons"],m["@formily/react"],m.antd,m.lodash,m.ahooks,m["@formily/shared"],m["@formily/antd-v5"]))})(this,function(m,o,r,v,l,le,B,b,S,q,de,pe,Tt){"use strict";var gi=Object.defineProperty,bi=Object.defineProperties;var hi=Object.getOwnPropertyDescriptors;var wt=Object.getOwnPropertySymbols;var vi=Object.prototype.hasOwnProperty,yi=Object.prototype.propertyIsEnumerable;var Ee=(m,o,r)=>o in m?gi(m,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):m[o]=r,x=(m,o)=>{for(var r in o||(o={}))vi.call(o,r)&&Ee(m,r,o[r]);if(wt)for(var r of wt(o))yi.call(o,r)&&Ee(m,r,o[r]);return m},k=(m,o)=>bi(m,hi(o));var Pt=(m,o,r)=>(Ee(m,typeof o!="symbol"?o+"":o,r),r);var F=(m,o,r)=>new Promise((v,l)=>{var le=S=>{try{b(r.next(S))}catch(q){l(q)}},B=S=>{try{b(r.throw(S))}catch(q){l(q)}},b=S=>S.done?v(S.value):Promise.resolve(S.value).then(le,B);b((r=r.apply(m,o)).next())});function Mt(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,a.get?a:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const T=Mt(l),ke=()=>window.JsBridge,Ot=(e,t)=>ke().invoke(e,t),Et=()=>!!ke(),Be={onBackPressed:()=>{history.length===1?Ot({action:"moveTaskToBack"}):history.back()}};Object.keys(Be).forEach(e=>{window[e]=Be[e]});const Ne=l.memo(e=>{const t=v.useLocation(),n=v.useNavigate();return l.useEffect(()=>{Et()&&t.pathname==="/admin"&&n("/mobile",{replace:!0})},[t.pathname,n]),o.jsx(o.Fragment,{children:e.children})});Ne.displayName="MobileClientProvider";const N="mobile-client";function j(e){return`{{t('${e}', { ns: '${N}', nsMode: 'fallback' })}}`}function w(){return le.useTranslation([N,"client"],{nsMode:"fallback"})}const je={name:"mobilePage:addBlock",title:'{{t("Add block")}}',icon:"PlusOutlined",wrap:r.gridRowColWrap,items:[{name:"dataBlocks",type:"itemGroup",title:'{{t("Data blocks")}}',children:[{name:"gridCard",type:"item",title:'{{t("Grid Card")}}',Component:"GridCardBlockInitializer"},{name:"table",title:'{{t("Table")}}',Component:"TableBlockInitializer"},{name:"form",title:'{{t("Form")}}',Component:"FormBlockInitializer"},{name:"details",title:'{{t("Details")}}',Component:"DetailsBlockInitializer"},{name:"calendar",title:'{{t("Calendar")}}',Component:"CalendarBlockInitializer"},{name:"mapBlock",title:j("Map"),Component:"MapBlockInitializer"},{name:"charts",title:'{{t("Charts")}}',Component:"ChartV2BlockInitializer"}]},{name:"otherBlocks",type:"itemGroup",title:'{{t("Other blocks")}}',children:[{name:"menu",title:j("Menu"),Component:"MMenuBlockInitializer"},{name:"markdown",title:'{{t("Markdown")}}',Component:"MarkdownBlockInitializer"},{name:"settings",title:j("Settings"),Component:"MSettingsBlockInitializer"}]}]},Ae=new r.CompatibleSchemaInitializer(k(x({},je),{name:"MBlockInitializers"})),kt=new r.CompatibleSchemaInitializer(je,Ae),Bt=()=>{const e=r.useSchemaInitializerItem(),{insert:t}=r.useSchemaInitializer();return o.jsx(r.SchemaInitializerItem,x({icon:o.jsx(B.MenuOutlined,{}),onClick:()=>F(this,null,function*(){t({type:"void","x-component":"MMenu","x-designer":"MMenu.Designer","x-component-props":{}})})},e))};!!(typeof window!="undefined"&&typeof document!="undefined"&&window.document&&window.document.createElement)&&document.addEventListener("touchstart",()=>{},!0);function ue(e,t){const n=e;for(const a in t)t.hasOwnProperty(a)&&(n[a]=t[a]);return n}var J=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function _e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Fe={exports:{}};/*!
|
|
3
3
|
Copyright (c) 2018 Jed Watson.
|
|
4
4
|
Licensed under the MIT License (MIT), see
|
|
5
5
|
http://jedwatson.github.io/classnames
|
|
6
|
-
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a=[],i=0;i<arguments.length;i++){var c=arguments[i];if(c){var d=typeof c;if(d==="string"||d==="number")a.push(c);else if(Array.isArray(c)){if(c.length){var s=n.apply(null,c);s&&a.push(s)}}else if(d==="object"){if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]")){a.push(c.toString());continue}for(var u in c)t.call(c,u)&&c[u]&&a.push(u)}}}return a.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Ae);var kt=Ae.exports;const M=je(kt);function L(e,t){const n=Object.assign({},t.props);e.className&&(n.className=M(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 a in e)e.hasOwnProperty(a)&&(a.startsWith("data-")||a.startsWith("aria-"))&&(n[a]=e[a]);return l.cloneElement(t,n)}var Nt=typeof J=="object"&&J&&J.Object===Object&&J,_e=Nt,Bt=_e,jt=typeof self=="object"&&self&&self.Object===Object&&self,At=Bt||jt||Function("return this")(),me=At,_t=me,Ft=_t.Symbol,Fe=Ft,Le=Fe,De=Object.prototype,Lt=De.hasOwnProperty,Dt=De.toString,H=Le?Le.toStringTag:void 0;function zt(e){var t=Lt.call(e,H),n=e[H];try{e[H]=void 0;var a=!0}catch(c){}var i=Dt.call(e);return a&&(t?e[H]=n:delete e[H]),i}var Gt=zt,Ut=Object.prototype,qt=Ut.toString;function Ht(e){return qt.call(e)}var Vt=Ht,ze=Fe,Kt=Gt,Wt=Vt,Jt="[object Null]",Xt="[object Undefined]",Ge=ze?ze.toStringTag:void 0;function Zt(e){return e==null?e===void 0?Xt:Jt:Ge&&Ge in Object(e)?Kt(e):Wt(e)}var fe=Zt;function Qt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ge=Qt,Yt=fe,Rt=ge,en="[object AsyncFunction]",tn="[object Function]",nn="[object GeneratorFunction]",rn="[object Proxy]";function on(e){if(!Rt(e))return!1;var t=Yt(e);return t==tn||t==nn||t==en||t==rn}var Ue=on,an=me,sn=an["__core-js_shared__"],cn=sn,be=cn,qe=function(){var e=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function ln(e){return!!qe&&qe in e}var dn=ln,pn=Function.prototype,un=pn.toString;function mn(e){if(e!=null){try{return un.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var fn=mn,gn=Ue,bn=dn,hn=ge,vn=fn,yn=/[\\^$.*+?()[\]{}|]/g,xn=/^\[object .+?Constructor\]$/,Sn=Function.prototype,$n=Object.prototype,Cn=Sn.toString,wn=$n.hasOwnProperty,In=RegExp("^"+Cn.call(wn).replace(yn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Pn(e){if(!hn(e)||bn(e))return!1;var t=gn(e)?In:xn;return t.test(vn(e))}var Tn=Pn;function Mn(e,t){return e==null?void 0:e[t]}var On=Mn,En=Tn,kn=On;function Nn(e,t){var n=kn(e,t);return En(n)?n:void 0}var Bn=Nn,jn=Bn,An=function(){try{var e=jn(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),He=An,Ve=He;function _n(e,t,n){t=="__proto__"&&Ve?Ve(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Ke=_n;function Fn(e,t){return e===t||e!==e&&t!==t}var We=Fn,Ln=Ke,Dn=We,zn=Object.prototype,Gn=zn.hasOwnProperty;function Un(e,t,n){var a=e[t];(!(Gn.call(e,t)&&Dn(a,n))||n===void 0&&!(t in e))&&Ln(e,t,n)}var qn=Un,Hn=qn,Vn=Ke;function Kn(e,t,n,a){var i=!n;n||(n={});for(var c=-1,d=t.length;++c<d;){var s=t[c],u=a?a(n[s],e[s],s,n,e):void 0;u===void 0&&(u=e[s]),i?Vn(n,s,u):Hn(n,s,u)}return n}var Wn=Kn;function Jn(e){return e}var Je=Jn;function Xn(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 Zn=Xn,Qn=Zn,Xe=Math.max;function Yn(e,t,n){return t=Xe(t===void 0?e.length-1:t,0),function(){for(var a=arguments,i=-1,c=Xe(a.length-t,0),d=Array(c);++i<c;)d[i]=a[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=a[i];return s[t]=n(d),Qn(e,this,s)}}var Rn=Yn;function er(e){return function(){return e}}var tr=er,nr=tr,Ze=He,rr=Je,or=Ze?function(e,t){return Ze(e,"toString",{configurable:!0,enumerable:!1,value:nr(t),writable:!0})}:rr,ar=or,ir=800,sr=16,cr=Date.now;function lr(e){var t=0,n=0;return function(){var a=cr(),i=sr-(a-n);if(n=a,i>0){if(++t>=ir)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var dr=lr,pr=ar,ur=dr,mr=ur(pr),fr=mr,gr=Je,br=Rn,hr=fr;function vr(e,t){return hr(br(e,t,gr),e+"")}var yr=vr,xr=9007199254740991;function Sr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=xr}var Qe=Sr,$r=Ue,Cr=Qe;function wr(e){return e!=null&&Cr(e.length)&&!$r(e)}var Ye=wr,Ir=9007199254740991,Pr=/^(?:0|[1-9]\d*)$/;function Tr(e,t){var n=typeof e;return t=t==null?Ir:t,!!t&&(n=="number"||n!="symbol"&&Pr.test(e))&&e>-1&&e%1==0&&e<t}var Re=Tr,Mr=We,Or=Ye,Er=Re,kr=ge;function Nr(e,t,n){if(!kr(n))return!1;var a=typeof t;return(a=="number"?Or(n)&&Er(t,n.length):a=="string"&&t in n)?Mr(n[t],e):!1}var Br=Nr,jr=yr,Ar=Br;function _r(e){return jr(function(t,n){var a=-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&&Ar(n[0],n[1],d)&&(c=i<3?void 0:c,i=1),t=Object(t);++a<i;){var s=n[a];s&&e(t,s,a,c)}return t})}var Fr=_r;function Lr(e,t){for(var n=-1,a=Array(e);++n<e;)a[n]=t(n);return a}var Dr=Lr;function zr(e){return e!=null&&typeof e=="object"}var he=zr,Gr=fe,Ur=he,qr="[object Arguments]";function Hr(e){return Ur(e)&&Gr(e)==qr}var Vr=Hr,et=Vr,Kr=he,tt=Object.prototype,Wr=tt.hasOwnProperty,Jr=tt.propertyIsEnumerable,Xr=et(function(){return arguments}())?et:function(e){return Kr(e)&&Wr.call(e,"callee")&&!Jr.call(e,"callee")},Zr=Xr,Qr=Array.isArray,Yr=Qr,X={exports:{}};function Rr(){return!1}var eo=Rr;X.exports,function(e,t){var n=me,a=eo,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||a;e.exports=p}(X,X.exports);var to=X.exports,no=fe,ro=Qe,oo=he,ao="[object Arguments]",io="[object Array]",so="[object Boolean]",co="[object Date]",lo="[object Error]",po="[object Function]",uo="[object Map]",mo="[object Number]",fo="[object Object]",go="[object RegExp]",bo="[object Set]",ho="[object String]",vo="[object WeakMap]",yo="[object ArrayBuffer]",xo="[object DataView]",So="[object Float32Array]",$o="[object Float64Array]",Co="[object Int8Array]",wo="[object Int16Array]",Io="[object Int32Array]",Po="[object Uint8Array]",To="[object Uint8ClampedArray]",Mo="[object Uint16Array]",Oo="[object Uint32Array]",h={};h[So]=h[$o]=h[Co]=h[wo]=h[Io]=h[Po]=h[To]=h[Mo]=h[Oo]=!0,h[ao]=h[io]=h[yo]=h[so]=h[xo]=h[co]=h[lo]=h[po]=h[uo]=h[mo]=h[fo]=h[go]=h[bo]=h[ho]=h[vo]=!1;function Eo(e){return oo(e)&&ro(e.length)&&!!h[no(e)]}var ko=Eo;function No(e){return function(t){return e(t)}}var Bo=No,Z={exports:{}};Z.exports,function(e,t){var n=_e,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,c=i&&i.exports===a,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}(Z,Z.exports);var jo=Z.exports,Ao=ko,_o=Bo,nt=jo,rt=nt&&nt.isTypedArray,Fo=rt?_o(rt):Ao,Lo=Fo,Do=Dr,zo=Zr,Go=Yr,Uo=to,qo=Re,Ho=Lo,Vo=Object.prototype,Ko=Vo.hasOwnProperty;function Wo(e,t){var n=Go(e),a=!n&&zo(e),i=!n&&!a&&Uo(e),c=!n&&!a&&!i&&Ho(e),d=n||a||i||c,s=d?Do(e.length,String):[],u=s.length;for(var p in e)(t||Ko.call(e,p))&&!(d&&(p=="length"||i&&(p=="offset"||p=="parent")||c&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||qo(p,u)))&&s.push(p);return s}var Jo=Wo,Xo=Object.prototype;function Zo(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Xo;return e===n}var Qo=Zo;function Yo(e,t){return function(n){return e(t(n))}}var Ro=Yo,ea=Ro,ta=ea(Object.keys,Object),na=ta,ra=Qo,oa=na,aa=Object.prototype,ia=aa.hasOwnProperty;function sa(e){if(!ra(e))return oa(e);var t=[];for(var n in Object(e))ia.call(e,n)&&n!="constructor"&&t.push(n);return t}var ca=sa,la=Jo,da=ca,pa=Ye;function ua(e){return pa(e)?la(e):da(e)}var ma=ua,fa=Wn,ga=Fr,ba=ma,ha=ga(function(e,t,n,a){fa(t,ba(t),e,a)}),va=ha;const ya=je(va);function ve(...e){function t(a,i){return i===void 0?a:i}let n=Object.assign({},e[0]);for(let a=1;a<e.length;a++)n=ya(n,e[a],t);return n}function xa(e){return T.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(" ")}),T.createElement("g",{id:"LeftOutline-LeftOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},T.createElement("g",{id:"LeftOutline-编组"},T.createElement("rect",{id:"LeftOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),T.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 Sa(e){return T.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(" ")}),T.createElement("g",{id:"RightOutline-RightOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},T.createElement("g",{id:"RightOutline-RightOutlined"},T.createElement("rect",{id:"RightOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),T.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 ot="adm-safe-area",$a=e=>L(e,l.createElement("div",{className:M(ot,`${ot}-position-${e.position}`)})),z="adm-badge",at=l.createElement(l.Fragment,null),it=ue(e=>{const{content:t,color:n,children:a}=e,i=t===at,c=M(z,{[`${z}-fixed`]:!!a,[`${z}-dot`]:i,[`${z}-bordered`]:e.bordered}),d=t||t===0?L(e,l.createElement("div",{className:c,style:{"--color":n}},!i&&l.createElement("div",{className:`${z}-content`},t))):null;return a?l.createElement("div",{className:M(`${z}-wrapper`,e.wrapperClassName),style:e.wrapperStyle},a,d):d},{dot:at});function Ca(e){const{value:t,defaultValue:n,onChange:a}=e,i=de.useUpdate(),c=l.useRef(t!==void 0?t:n);t!==void 0&&(c.current=t);const d=de.useMemoizedFn((s,u=!1)=>{const p=typeof s=="function"?s(c.current):s;if(!(!u&&p===c.current))return c.current=p,i(),a==null?void 0:a(p)});return[c.current,d]}var st={exports:{}},g={};/**
|
|
6
|
+
*/(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a=[],i=0;i<arguments.length;i++){var c=arguments[i];if(c){var d=typeof c;if(d==="string"||d==="number")a.push(c);else if(Array.isArray(c)){if(c.length){var s=n.apply(null,c);s&&a.push(s)}}else if(d==="object"){if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]")){a.push(c.toString());continue}for(var u in c)t.call(c,u)&&c[u]&&a.push(u)}}}return a.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Fe);var Nt=Fe.exports;const M=_e(Nt);function D(e,t){const n=Object.assign({},t.props);e.className&&(n.className=M(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 a in e)e.hasOwnProperty(a)&&(a.startsWith("data-")||a.startsWith("aria-"))&&(n[a]=e[a]);return l.cloneElement(t,n)}var jt=typeof J=="object"&&J&&J.Object===Object&&J,De=jt,At=De,_t=typeof self=="object"&&self&&self.Object===Object&&self,Ft=At||_t||Function("return this")(),me=Ft,Dt=me,Lt=Dt.Symbol,Le=Lt,ze=Le,Ge=Object.prototype,zt=Ge.hasOwnProperty,Gt=Ge.toString,H=ze?ze.toStringTag:void 0;function Ut(e){var t=zt.call(e,H),n=e[H];try{e[H]=void 0;var a=!0}catch(c){}var i=Gt.call(e);return a&&(t?e[H]=n:delete e[H]),i}var qt=Ut,Ht=Object.prototype,Vt=Ht.toString;function Kt(e){return Vt.call(e)}var Wt=Kt,Ue=Le,Jt=qt,Xt=Wt,Zt="[object Null]",Qt="[object Undefined]",qe=Ue?Ue.toStringTag:void 0;function Yt(e){return e==null?e===void 0?Qt:Zt:qe&&qe in Object(e)?Jt(e):Xt(e)}var fe=Yt;function Rt(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var ge=Rt,en=fe,tn=ge,nn="[object AsyncFunction]",rn="[object Function]",on="[object GeneratorFunction]",an="[object Proxy]";function sn(e){if(!tn(e))return!1;var t=en(e);return t==rn||t==on||t==nn||t==an}var He=sn,cn=me,ln=cn["__core-js_shared__"],dn=ln,be=dn,Ve=function(){var e=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function pn(e){return!!Ve&&Ve in e}var un=pn,mn=Function.prototype,fn=mn.toString;function gn(e){if(e!=null){try{return fn.call(e)}catch(t){}try{return e+""}catch(t){}}return""}var bn=gn,hn=He,vn=un,yn=ge,xn=bn,Sn=/[\\^$.*+?()[\]{}|]/g,$n=/^\[object .+?Constructor\]$/,Cn=Function.prototype,In=Object.prototype,wn=Cn.toString,Pn=In.hasOwnProperty,Tn=RegExp("^"+wn.call(Pn).replace(Sn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Mn(e){if(!yn(e)||vn(e))return!1;var t=hn(e)?Tn:$n;return t.test(xn(e))}var On=Mn;function En(e,t){return e==null?void 0:e[t]}var kn=En,Bn=On,Nn=kn;function jn(e,t){var n=Nn(e,t);return Bn(n)?n:void 0}var An=jn,_n=An,Fn=function(){try{var e=_n(Object,"defineProperty");return e({},"",{}),e}catch(t){}}(),Ke=Fn,We=Ke;function Dn(e,t,n){t=="__proto__"&&We?We(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var Je=Dn;function Ln(e,t){return e===t||e!==e&&t!==t}var Xe=Ln,zn=Je,Gn=Xe,Un=Object.prototype,qn=Un.hasOwnProperty;function Hn(e,t,n){var a=e[t];(!(qn.call(e,t)&&Gn(a,n))||n===void 0&&!(t in e))&&zn(e,t,n)}var Vn=Hn,Kn=Vn,Wn=Je;function Jn(e,t,n,a){var i=!n;n||(n={});for(var c=-1,d=t.length;++c<d;){var s=t[c],u=a?a(n[s],e[s],s,n,e):void 0;u===void 0&&(u=e[s]),i?Wn(n,s,u):Kn(n,s,u)}return n}var Xn=Jn;function Zn(e){return e}var Ze=Zn;function Qn(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 Yn=Qn,Rn=Yn,Qe=Math.max;function er(e,t,n){return t=Qe(t===void 0?e.length-1:t,0),function(){for(var a=arguments,i=-1,c=Qe(a.length-t,0),d=Array(c);++i<c;)d[i]=a[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=a[i];return s[t]=n(d),Rn(e,this,s)}}var tr=er;function nr(e){return function(){return e}}var rr=nr,or=rr,Ye=Ke,ar=Ze,ir=Ye?function(e,t){return Ye(e,"toString",{configurable:!0,enumerable:!1,value:or(t),writable:!0})}:ar,sr=ir,cr=800,lr=16,dr=Date.now;function pr(e){var t=0,n=0;return function(){var a=dr(),i=lr-(a-n);if(n=a,i>0){if(++t>=cr)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var ur=pr,mr=sr,fr=ur,gr=fr(mr),br=gr,hr=Ze,vr=tr,yr=br;function xr(e,t){return yr(vr(e,t,hr),e+"")}var Sr=xr,$r=9007199254740991;function Cr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$r}var Re=Cr,Ir=He,wr=Re;function Pr(e){return e!=null&&wr(e.length)&&!Ir(e)}var et=Pr,Tr=9007199254740991,Mr=/^(?:0|[1-9]\d*)$/;function Or(e,t){var n=typeof e;return t=t==null?Tr:t,!!t&&(n=="number"||n!="symbol"&&Mr.test(e))&&e>-1&&e%1==0&&e<t}var tt=Or,Er=Xe,kr=et,Br=tt,Nr=ge;function jr(e,t,n){if(!Nr(n))return!1;var a=typeof t;return(a=="number"?kr(n)&&Br(t,n.length):a=="string"&&t in n)?Er(n[t],e):!1}var Ar=jr,_r=Sr,Fr=Ar;function Dr(e){return _r(function(t,n){var a=-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&&Fr(n[0],n[1],d)&&(c=i<3?void 0:c,i=1),t=Object(t);++a<i;){var s=n[a];s&&e(t,s,a,c)}return t})}var Lr=Dr;function zr(e,t){for(var n=-1,a=Array(e);++n<e;)a[n]=t(n);return a}var Gr=zr;function Ur(e){return e!=null&&typeof e=="object"}var he=Ur,qr=fe,Hr=he,Vr="[object Arguments]";function Kr(e){return Hr(e)&&qr(e)==Vr}var Wr=Kr,nt=Wr,Jr=he,rt=Object.prototype,Xr=rt.hasOwnProperty,Zr=rt.propertyIsEnumerable,Qr=nt(function(){return arguments}())?nt:function(e){return Jr(e)&&Xr.call(e,"callee")&&!Zr.call(e,"callee")},Yr=Qr,Rr=Array.isArray,eo=Rr,X={exports:{}};function to(){return!1}var no=to;X.exports,function(e,t){var n=me,a=no,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||a;e.exports=p}(X,X.exports);var ro=X.exports,oo=fe,ao=Re,io=he,so="[object Arguments]",co="[object Array]",lo="[object Boolean]",po="[object Date]",uo="[object Error]",mo="[object Function]",fo="[object Map]",go="[object Number]",bo="[object Object]",ho="[object RegExp]",vo="[object Set]",yo="[object String]",xo="[object WeakMap]",So="[object ArrayBuffer]",$o="[object DataView]",Co="[object Float32Array]",Io="[object Float64Array]",wo="[object Int8Array]",Po="[object Int16Array]",To="[object Int32Array]",Mo="[object Uint8Array]",Oo="[object Uint8ClampedArray]",Eo="[object Uint16Array]",ko="[object Uint32Array]",h={};h[Co]=h[Io]=h[wo]=h[Po]=h[To]=h[Mo]=h[Oo]=h[Eo]=h[ko]=!0,h[so]=h[co]=h[So]=h[lo]=h[$o]=h[po]=h[uo]=h[mo]=h[fo]=h[go]=h[bo]=h[ho]=h[vo]=h[yo]=h[xo]=!1;function Bo(e){return io(e)&&ao(e.length)&&!!h[oo(e)]}var No=Bo;function jo(e){return function(t){return e(t)}}var Ao=jo,Z={exports:{}};Z.exports,function(e,t){var n=De,a=t&&!t.nodeType&&t,i=a&&!0&&e&&!e.nodeType&&e,c=i&&i.exports===a,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}(Z,Z.exports);var _o=Z.exports,Fo=No,Do=Ao,ot=_o,at=ot&&ot.isTypedArray,Lo=at?Do(at):Fo,zo=Lo,Go=Gr,Uo=Yr,qo=eo,Ho=ro,Vo=tt,Ko=zo,Wo=Object.prototype,Jo=Wo.hasOwnProperty;function Xo(e,t){var n=qo(e),a=!n&&Uo(e),i=!n&&!a&&Ho(e),c=!n&&!a&&!i&&Ko(e),d=n||a||i||c,s=d?Go(e.length,String):[],u=s.length;for(var p in e)(t||Jo.call(e,p))&&!(d&&(p=="length"||i&&(p=="offset"||p=="parent")||c&&(p=="buffer"||p=="byteLength"||p=="byteOffset")||Vo(p,u)))&&s.push(p);return s}var Zo=Xo,Qo=Object.prototype;function Yo(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||Qo;return e===n}var Ro=Yo;function ea(e,t){return function(n){return e(t(n))}}var ta=ea,na=ta,ra=na(Object.keys,Object),oa=ra,aa=Ro,ia=oa,sa=Object.prototype,ca=sa.hasOwnProperty;function la(e){if(!aa(e))return ia(e);var t=[];for(var n in Object(e))ca.call(e,n)&&n!="constructor"&&t.push(n);return t}var da=la,pa=Zo,ua=da,ma=et;function fa(e){return ma(e)?pa(e):ua(e)}var ga=fa,ba=Xn,ha=Lr,va=ga,ya=ha(function(e,t,n,a){ba(t,va(t),e,a)}),xa=ya;const Sa=_e(xa);function ve(...e){function t(a,i){return i===void 0?a:i}let n=Object.assign({},e[0]);for(let a=1;a<e.length;a++)n=Sa(n,e[a],t);return n}function $a(e){return T.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(" ")}),T.createElement("g",{id:"LeftOutline-LeftOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},T.createElement("g",{id:"LeftOutline-编组"},T.createElement("rect",{id:"LeftOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),T.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 Ca(e){return T.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(" ")}),T.createElement("g",{id:"RightOutline-RightOutline",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},T.createElement("g",{id:"RightOutline-RightOutlined"},T.createElement("rect",{id:"RightOutline-矩形",fill:"#FFFFFF",opacity:0,x:0,y:0,width:48,height:48}),T.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 it="adm-safe-area",Ia=e=>D(e,l.createElement("div",{className:M(it,`${it}-position-${e.position}`)})),z="adm-badge",st=l.createElement(l.Fragment,null),ct=ue(e=>{const{content:t,color:n,children:a}=e,i=t===st,c=M(z,{[`${z}-fixed`]:!!a,[`${z}-dot`]:i,[`${z}-bordered`]:e.bordered}),d=t||t===0?D(e,l.createElement("div",{className:c,style:{"--color":n}},!i&&l.createElement("div",{className:`${z}-content`},t))):null;return a?l.createElement("div",{className:M(`${z}-wrapper`,e.wrapperClassName),style:e.wrapperStyle},a,d):d},{dot:st});function wa(e){const{value:t,defaultValue:n,onChange:a}=e,i=de.useUpdate(),c=l.useRef(t!==void 0?t:n);t!==void 0&&(c.current=t);const d=de.useMemoizedFn((s,u=!1)=>{const p=typeof s=="function"?s(c.current):s;if(!(!u&&p===c.current))return c.current=p,i(),a==null?void 0:a(p)});return[c.current,d]}var lt={exports:{}},g={};/**
|
|
7
7
|
* @license React
|
|
8
8
|
* react-is.production.min.js
|
|
9
9
|
*
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
*
|
|
12
12
|
* This source code is licensed under the MIT license found in the
|
|
13
13
|
* LICENSE file in the root directory of this source tree.
|
|
14
|
-
*/var ye=Symbol.for("react.element"),xe=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),te=Symbol.for("react.context"),
|
|
14
|
+
*/var ye=Symbol.for("react.element"),xe=Symbol.for("react.portal"),Q=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),ee=Symbol.for("react.provider"),te=Symbol.for("react.context"),Pa=Symbol.for("react.server_context"),ne=Symbol.for("react.forward_ref"),re=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),Ta=Symbol.for("react.offscreen"),dt;dt=Symbol.for("react.module.reference");function I(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case ye:switch(e=e.type,e){case Q:case R:case Y:case re:case oe:return e;default:switch(e=e&&e.$$typeof,e){case Pa:case te:case ne:case ie:case ae:case ee:return e;default:return t}}case xe:return t}}}g.ContextConsumer=te,g.ContextProvider=ee,g.Element=ye,g.ForwardRef=ne,g.Fragment=Q,g.Lazy=ie,g.Memo=ae,g.Portal=xe,g.Profiler=R,g.StrictMode=Y,g.Suspense=re,g.SuspenseList=oe,g.isAsyncMode=function(){return!1},g.isConcurrentMode=function(){return!1},g.isContextConsumer=function(e){return I(e)===te},g.isContextProvider=function(e){return I(e)===ee},g.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===ye},g.isForwardRef=function(e){return I(e)===ne},g.isFragment=function(e){return I(e)===Q},g.isLazy=function(e){return I(e)===ie},g.isMemo=function(e){return I(e)===ae},g.isPortal=function(e){return I(e)===xe},g.isProfiler=function(e){return I(e)===R},g.isStrictMode=function(e){return I(e)===Y},g.isSuspense=function(e){return I(e)===re},g.isSuspenseList=function(e){return I(e)===oe},g.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Q||e===R||e===Y||e===re||e===oe||e===Ta||typeof e=="object"&&e!==null&&(e.$$typeof===ie||e.$$typeof===ae||e.$$typeof===ee||e.$$typeof===te||e.$$typeof===ne||e.$$typeof===dt||e.getModuleId!==void 0)},g.typeOf=I,lt.exports=g;var Ma=lt.exports;function Oa(e,t){let n=0;function a(i){l.Children.forEach(i,c=>{Ma.isFragment(c)?a(c.props.children):(t(c,n),n+=1)})}a(e)}const V="adm-list",Ea={mode:"default"},ka=l.forwardRef((e,t)=>{const n=ve(Ea,e),a=l.useRef(null);return l.useImperativeHandle(t,()=>({get nativeElement(){return a.current}})),D(n,l.createElement("div",{className:M(V,`${V}-${n.mode}`),ref:a},n.header&&l.createElement("div",{className:`${V}-header`},n.header),l.createElement("div",{className:`${V}-body`},l.createElement("div",{className:`${V}-body-inner`},n.children))))});function K(e){return e!=null&&e!==!1}const O="adm-list-item",se=ue(ka,{Item:e=>{var t;const n=(t=e.clickable)!==null&&t!==void 0?t:!!e.onClick,a=e.arrow===void 0?n:e.arrow,i=l.createElement("div",{className:`${O}-content`},K(e.prefix)&&l.createElement("div",{className:`${O}-content-prefix`},e.prefix),l.createElement("div",{className:`${O}-content-main`},K(e.title)&&l.createElement("div",{className:`${O}-title`},e.title),e.children,K(e.description)&&l.createElement("div",{className:`${O}-description`},e.description)),K(e.extra)&&l.createElement("div",{className:`${O}-content-extra`},e.extra),K(a)&&l.createElement("div",{className:`${O}-content-arrow`},a===!0?l.createElement(Ca,null):a));return D(e,l.createElement(n?"a":"div",{className:M(`${O}`,n?["adm-plain-anchor"]:[],e.disabled&&`${O}-disabled`),onClick:e.disabled?void 0:e.onClick},i))}}),G="adm-nav-bar",Ba={backArrow:!0},Na=e=>{const t=ve(Ba,e),{back:n,backArrow:a}=t;return D(t,l.createElement("div",{className:M(G)},l.createElement("div",{className:`${G}-left`,role:"button"},n!==null&&l.createElement("div",{className:`${G}-back`,onClick:t.onBack},a&&l.createElement("span",{className:`${G}-back-arrow`},a===!0?l.createElement($a,null):a),l.createElement("span",{"aria-hidden":"true"},n)),t.left),l.createElement("div",{className:`${G}-title`},t.children),l.createElement("div",{className:`${G}-right`},t.right)))},ja=()=>null,E="adm-tab-bar",Aa={safeArea:!1},Se=ue(e=>{var t;const n=ve(Aa,e);let a=null;const i=[];Oa(n.children,(s,u)=>{if(!l.isValidElement(s))return;const p=s.key;typeof p=="string"&&(u===0&&(a=p),i.push(s))});const[c,d]=wa({value:n.activeKey,defaultValue:(t=n.defaultActiveKey)!==null&&t!==void 0?t:a,onChange:s=>{var u;s!==null&&((u=n.onChange)===null||u===void 0||u.call(n,s))}});return D(n,l.createElement("div",{className:E},l.createElement("div",{className:`${E}-wrap`},i.map(s=>{const u=s.key===c;function p(){const f=s.props.icon&&l.createElement("div",{className:`${E}-item-icon`},typeof s.props.icon=="function"?s.props.icon(u):s.props.icon),$=s.props.title&&l.createElement("div",{className:M(`${E}-item-title`,!!f&&`${E}-item-title-with-icon`)},typeof s.props.title=="function"?s.props.title(u):s.props.title);return f?l.createElement(l.Fragment,null,l.createElement(ct,{content:s.props.badge,className:`${E}-icon-badge`},f),$):$?l.createElement(ct,{content:s.props.badge,className:`${E}-title-badge`},$):null}return D(s.props,l.createElement("div",{key:s.key,onClick:()=>{const{key:f}=s;f!=null&&d(f.toString())},className:M(`${E}-item`,{[`${E}-item-active`]:u})},p()))})),n.safeArea&&l.createElement(Ia,{position:"bottom"})))},{Item:ja}),pt={type:"void","x-component":"MPage","x-designer":"MPage.Designer","x-component-props":{},properties:{grid:{type:"void","x-component":"Grid","x-initializer":"mobilePage:addBlock","x-component-props":{showDivider:!1}}}},_a=e=>{const{t}=w(),n=b.useFieldSchema(),{dn:a}=r.useDesignable(),i=b.useField(),c={dn:a,field:i,fieldSchema:n};return o.jsx(r.SchemaSettingsDropdown,k(x({title:o.jsx(S.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)"},icon:o.jsx(B.MenuOutlined,{}),type:"dashed",children:t("Menu configuration")})},c),{children:o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:t("Delete menu block")},breakRemoveOn:{"x-component":"Grid"}},"remove")}))},W=()=>{const{dn:e}=r.useDesignable(),t=b.useFieldSchema(),n=b.useField();return{onUpdateComponentProps:de.useMemoizedFn(i=>F(this,null,function*(){q.set(t,"x-component-props",i),n.componentProps=x(x({},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:j("Menu name"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{"x-decorator":"FormItem","x-component":"IconPicker",title:j("Icon"),"x-component-props":{}}}},Fa=e=>{const{icon:t,name:n}=e,a=r.useDesigner(),i=v.useNavigate(),c=v.useLocation(),d=b.useFieldSchema(),s=r.useCompile(),u=v.useParams(),p=()=>{const f=c.pathname.endsWith("/")?c.pathname.slice(0,-1):c.pathname;i(u.name?`/mobile/${d["x-uid"]}`:`${f}/${d["x-uid"]}`)};return o.jsxs(r.SortableItem,{className:r.cx("nb-mobile-menu-item",r.css`
|
|
15
15
|
width: 100%;
|
|
16
16
|
background: var(--adm-color-background);
|
|
17
17
|
> .adm-list-item {
|
|
18
18
|
background: inherit;
|
|
19
19
|
}
|
|
20
|
-
`),children:[
|
|
20
|
+
`),children:[o.jsx(se.Item,k(x({arrow:!0,clickable:!0},e),{prefix:o.jsx(r.Icon,{type:t}),onClick:p,children:s(n)})),o.jsx(a,{})]})},Da=()=>{const{t:e}=w(),{onUpdateComponentProps:t}=W(),n=b.useField();return o.jsxs(r.GeneralSchemaDesigner,{children:[o.jsx(r.SchemaSettingsModalItem,{title:e("Edit menu info"),initialValues:n.componentProps,schema:ut,onSubmit:t}),o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete menu item?")},breakRemoveOn:{"x-component":"MMenu"}},"remove")]})},mt=Fa;mt.Designer=Da;const La=r.createStyles(({token:e,css:t})=>({mobileMenu:t`
|
|
21
21
|
--adm-color-primary: ${e.colorPrimary};
|
|
22
22
|
--adm-color-primary-hover: ${e.colorPrimaryHover};
|
|
23
23
|
--adm-color-primary-active: ${e.colorPrimaryActive};
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
background: ${e.colorBgContainer};
|
|
29
29
|
width: 100%;
|
|
30
30
|
margin-bottom: var(--nb-spacing);
|
|
31
|
-
`})),$e=e=>{const{styles:t}=
|
|
31
|
+
`})),$e=e=>{const{styles:t}=La(),n=r.useDesigner(),a=b.useFieldSchema(),{insertBeforeEnd:i,designable:c}=r.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(r.SortableItem,{className:r.cx("nb-mobile-menu",t.mobileMenu),children:o.jsxs(se,{children:[c&&o.jsx(se.Item,{children:o.jsx(n,{})}),o.jsx(r.DndContext,{children:o.jsx(r.SchemaComponent,{onlyRenderProperties:!0,schema:a})}),c?o.jsx(se.Item,{children:o.jsx(r.SchemaInitializerActionModal,{buttonText:d("Add menu item"),title:d("Add menu item"),schema:ut,onSubmit:s})}):null]})})};$e.Item=mt,$e.Designer=_a;const ce=(e,t)=>e.reduceProperties((a,i)=>a||i["x-component"]===t&&i),za=e=>ce(e,"Grid"),Ga=["Grid","Grid.Row"],Ua=["Grid.Col"],Ce=(e,t)=>{if(!e)return 0;let n=0;return Ua.includes(e["x-component"])&&(n+=1),typeof t=="number"&&n>=t||Ga.includes(e["x-component"])&&e.mapProperties(a=>{n+=Ce(a,t)}),n},qa=()=>{const{t:e}=w(),t=b.useFieldSchema(),{onUpdateComponentProps:n}=W(),a=b.useField(),{dn:i}=r.useDesignable(),c=v.useNavigate(),d=ce(t,"MTabBar"),s=d&&a.componentProps.tabBarEnabled!==!1,u={dn:i,field:a,fieldSchema:t};return o.jsx(r.SchemaSettingsDropdown,k(x({title:o.jsx(S.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)",width:"100%"},icon:o.jsx(B.MenuOutlined,{}),type:"dashed",children:e("App level Configuration")})},u),{children:o.jsx(r.SchemaSettingsSwitchItem,{checked:s,title:e("Enable TabBar"),onChange:p=>F(this,null,function*(){if(p&&!d){const f=ce(t,"MPage");yield i.remove(f),yield i.insertBeforeEnd({type:"void","x-component":"MTabBar","x-component-props":{},name:"tabBar",properties:{[pe.uid()]:{type:"void","x-component":"MTabBar.Item","x-designer":"MTabBar.Item.Designer","x-component-props":{icon:"HomeOutlined",title:j("Untitled")},properties:{page:f.toJSON()}}}})}yield n({tabBarEnabled:p}),p===!1&&c("../")})})}))},Ha=r.createStyles(({token:e,css:t})=>({mobileContainer:t`
|
|
32
32
|
--adm-color-primary: ${e.colorPrimary};
|
|
33
33
|
|
|
34
34
|
& > .general-schema-designer > .general-schema-designer-icons {
|
|
@@ -52,24 +52,24 @@
|
|
|
52
52
|
bottom: 0;
|
|
53
53
|
left: 0;
|
|
54
54
|
z-index: 1000;
|
|
55
|
-
`})),
|
|
55
|
+
`})),ft=(e,t)=>e.reduceProperties((n,a)=>{if(n)return n;if(a["x-component"]==="MTabBar")return ft(a,t);if(a["x-component"]==="MTabBar.Item"&&t===a["x-uid"])return a}),Va=()=>{const{name:e}=v.useParams(),t=b.useFieldSchema();if(!e)return o.jsx(o.Fragment,{});const n=ft(t.properties.tabBar,e.replace("tab_",""));return n?o.jsx(r.SchemaComponent,{schema:n}):o.jsx(v.Navigate,{replace:!0,to:"../"})},Ie=e=>{var L,A;const{styles:t}=Ha(),{token:n}=r.useToken(),a=r.useDesigner(),i=b.useFieldSchema(),c=v.useNavigate(),d=v.useParams(),s=v.useLocation(),p=b.useField().componentProps.tabBarEnabled!==!1,f=(L=i==null?void 0:i.properties)==null?void 0:L.tabBar,$=f!=null&&f.properties?Object.keys(f.properties)[0]:null;let C=null;return $&&(C=(A=f==null?void 0:f.properties[$])==null?void 0:A["x-uid"]),l.useEffect(()=>{if(C&&!d.name){const P=s.pathname.endsWith("/")?s.pathname.slice(0,-1):s.pathname;c(`${P}/tab_${C}`,{replace:!0})}},[s.pathname,c,d.name,C]),o.jsxs(r.SortableItem,{eid:"nb-mobile-scroll-wrapper",className:r.cx("nb-mobile-container",t.mobileContainer),children:[o.jsx(a,{}),o.jsx("div",{style:{paddingBottom:C?n.paddingLG*2:0},className:"nb-mobile-container-content",children:C?o.jsx(Va,{}):o.jsx(r.SchemaComponent,{filterProperties:P=>P["x-component"]!=="MTabBar",schema:i})}),p&&o.jsx("div",{className:r.cx("nb-mobile-container-tab-bar",t.tabBar),children:o.jsx(r.SchemaComponent,{onlyRenderProperties:!0,filterProperties:P=>P["x-component"]==="MTabBar",schema:i})})]})};Ie.Designer=qa,Ie.displayName="MContainer";const gt={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":{}}}},Ka=()=>{const e=r.useDesigner();return o.jsx(r.SortableItem,{className:r.cx("nb-mobile-tab-bar-item",r.css`
|
|
56
56
|
position: absolute !important;
|
|
57
57
|
width: 100%;
|
|
58
58
|
height: 100%;
|
|
59
59
|
top: 0;
|
|
60
60
|
left: 0;
|
|
61
|
-
`),children:
|
|
61
|
+
`),children:o.jsx(e,{})})},Wa=()=>{const{t:e}=w(),t=b.useFieldSchema(),{onUpdateComponentProps:n}=W(),a=b.useField(),i=Object.keys(t.parent.properties).length;return o.jsxs(r.GeneralSchemaDesigner,{children:[o.jsx(r.SchemaSettingsModalItem,{title:e("Edit info"),initialValues:a.componentProps,schema:gt,onSubmit:n}),i>1?o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete tab item?")},breakRemoveOn:{"x-component":"MTabBar"}},"remove"):null]})},bt=Ka;bt.Designer=Wa;const we=e=>{const t=b.useFieldSchema(),{designable:n}=r.useDesignable(),{t:a}=w(),{insertBeforeEnd:i}=r.useDesignable(),c=v.useNavigate(),d=v.useParams(),s=r.useCompile(),u=l.useCallback(p=>i({type:"void","x-component":"MTabBar.Item","x-component-props":p,"x-designer":"MTabBar.Item.Designer",properties:{[pe.uid()]:pt},"x-server-hooks":[{type:"onSelfSave",method:"extractTextToLocale"}]}),[]);return o.jsx(r.SortableItem,{className:r.cx("nb-mobile-tab-bar",r.css`
|
|
62
62
|
position: relative;
|
|
63
63
|
width: 100%;
|
|
64
64
|
display: flex;
|
|
65
65
|
align-items: center;
|
|
66
|
-
`),children:
|
|
66
|
+
`),children:o.jsx(r.DndContext,{children:o.jsxs(Se,{activeKey:d.name,onChange:p=>{p!=="add-tab"&&c(`/mobile/${p}`)},safeArea:!0,className:r.cx(r.css`
|
|
67
67
|
width: 100%;
|
|
68
|
-
`),children:[t.mapProperties((p,f)=>{const
|
|
68
|
+
`),children:[t.mapProperties((p,f)=>{const $=p["x-component-props"];return l.createElement(Se.Item,k(x({},$),{key:`tab_${p["x-uid"]}`,title:o.jsxs(o.Fragment,{children:[a(s($.title)),o.jsx(r.SchemaComponent,{schema:p,name:f})]}),icon:$.icon?o.jsx(r.Icon,{type:$.icon}):void 0}))}),n&&(!t.properties||Object.keys(t.properties).length<5)?o.jsx(Se.Item,{className:r.css`
|
|
69
69
|
.adm-tab-bar-item-icon {
|
|
70
70
|
height: auto;
|
|
71
71
|
}
|
|
72
|
-
`,icon:
|
|
72
|
+
`,icon:o.jsx(r.SchemaInitializerActionModal,{title:a("Add tab"),onSubmit:u,schema:gt})},"add-tab"):null]})})})};we.Item=bt,we.displayName="MTabBar";const Ja=e=>{var C,L,A,P;const{showBack:t}=e,{t:n}=w(),a=b.useField(),i=b.useFieldSchema(),{dn:c}=r.useDesignable(),{onUpdateComponentProps:d}=W(),s=(C=i==null?void 0:i.properties)==null?void 0:C.header,u=!!s&&((L=a.componentProps)==null?void 0:L.headerEnabled)!==!1,p=(A=i==null?void 0:i.properties)==null?void 0:A.tabs,f=!!p&&((P=a.componentProps)==null?void 0:P.tabsEnabled)!==!1,$={dn:c,field:a,fieldSchema:i};return o.jsxs(r.SchemaSettingsDropdown,k(x({title:o.jsx(S.Button,{style:{borderColor:"var(--colorSettings)",color:"var(--colorSettings)",width:"100%"},icon:o.jsx(B.MenuOutlined,{}),type:"dashed",children:n("Page configuration")})},$),{children:[o.jsx(r.SchemaSettingsSwitchItem,{checked:u,title:n("Enable Header"),onChange:U=>F(this,null,function*(){var _;s||(yield c.insertAfterBegin({type:"void",name:"header","x-component":"MHeader","x-designer":"MHeader.Designer","x-component-props":{title:(_=i.parent["x-component-props"])==null?void 0:_.name,showBack:t}})),yield d({headerEnabled:U})})}),o.jsx(r.SchemaSettingsSwitchItem,{checked:f,title:n("Enable Tabs"),onChange:U=>F(this,null,function*(){if(!p){const _=za(i);return yield c.remove(_),c.insertBeforeEnd({type:"void",name:"tabs","x-component":"Tabs","x-component-props":{},"x-initializer":"popup:addTab","x-initializer-props":{gridInitializer:"mobilePage:addBlock"},properties:{tab1:{type:"void",title:j("Untitled"),"x-component":"Tabs.TabPane","x-designer":"Tabs.Designer","x-component-props":{},properties:{grid:k(x({},_),{"x-uid":pe.uid()})}}}})}yield d({tabsEnabled:U})})})]}))},Xa=r.createStyles(({token:e,css:t})=>({globalActionCSS:t`
|
|
73
73
|
#nb-position-container > & {
|
|
74
74
|
height: ${e.sizeXXL}px;
|
|
75
75
|
border-top: 1px solid var(--nb-box-bg);
|
|
@@ -99,25 +99,25 @@
|
|
|
99
99
|
}
|
|
100
100
|
display: flex;
|
|
101
101
|
flex-direction: column;
|
|
102
|
-
`})),Pe=e=>{var P,U,
|
|
102
|
+
`})),Pe=e=>{var P,U,_,It;const{styles:t}=Xa(),n=r.useDesigner(),a=b.useField(),i=b.useFieldSchema(),[c,d]=v.useSearchParams(),s=(P=i.properties)==null?void 0:P.tabs,u=a.componentProps.headerEnabled!==!1,p=a.componentProps.tabsEnabled!==!1&&s;let f=ce(i,"MPage");if(!p&&!f&&s){const y=Object.values(s.properties||{}).sort((Me,Oe)=>Me["x-index"]-Oe["x-index"]);y.length!==0&&(f=y[0])}const $=i.root===i.parent;let C=!1;if(!s&&i.properties)C=Ce(i.properties.grid,2)===1;else if(c.has("tab")&&((U=s==null?void 0:s.properties)!=null&&U[c.get("tab")]))C=Ce((It=(_=s.properties[c.get("tab")])==null?void 0:_.properties)==null?void 0:It.grid,2)===1;else if(s!=null&&s.properties){const y=Object.values(s.properties).sort((Me,Oe)=>Me["x-index"]-Oe["x-index"])[0];y&&setTimeout(()=>{d([["tab",y.name.toString()]],{replace:!0})})}const L=l.useCallback(y=>{d([["tab",y]],{replace:!0})},[d]),A=l.useCallback(y=>o.jsx(r.TabsContextProvider,{children:C?o.jsx(r.ActionBarProvider,{container:(typeof y.active=="undefined"||y.active)&&$?document.getElementById("nb-position-container"):null,forceProps:{layout:"one-column",className:t.globalActionCSS},children:y.children}):y.children}),[C,$,t.globalActionCSS]);return o.jsxs(r.SortableItem,{eid:"nb-mobile-scroll-wrapper",className:r.cx("nb-mobile-page",t.mobilePage),children:[o.jsx(n,x({},i==null?void 0:i["x-designer-props"])),o.jsxs("div",{style:{paddingBottom:s?null:"var(--nb-spacing)"},className:r.cx("nb-mobile-page-header",t.mobilePageHeader,{[r.css`
|
|
103
103
|
& > .ant-nb-grid {
|
|
104
104
|
margin-top: 14px;
|
|
105
105
|
}
|
|
106
|
-
`]:s&&!p||!s}),children:[u&&
|
|
106
|
+
`]:s&&!p||!s}),children:[u&&o.jsx(b.RecursionField,{schema:i,filterProperties:y=>y["x-component"]==="MHeader"}),o.jsx(r.TabsContextProvider,{PaneRoot:A,activeKey:c.get("tab"),onChange:L,children:o.jsx(b.RecursionField,{schema:p?i:f,filterProperties:y=>y["x-component"]==="Tabs"||y["x-component"]==="Grid"||y["x-component"]==="Grid.Row"})})]}),o.jsx(A,{children:!s&&o.jsx(b.RecursionField,{schema:i,filterProperties:y=>y["x-component"]!=="MHeader"})})]})};Pe.Designer=Ja,Pe.displayName="MPage";const Za=()=>{const e=b.useField(),{onUpdateComponentProps:t}=W(),{t:n}=w();return o.jsx(r.GeneralSchemaDesigner,{draggable:!1,children:o.jsx(r.SchemaSettingsModalItem,{title:n("Edit info"),components:{Switch:Tt.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=b.useField(),{title:n=j("Untitled"),showBack:a=!1}=x(x({},e),t==null?void 0:t.componentProps),i=r.useDesigner(),d=r.useCompile()(n),s=v.useNavigate(),{setTitle:u}=r.useDocumentTitle(),{token:p}=r.useToken();l.useEffect(()=>{u(d)},[d]);const f=l.useMemo(()=>({width:"100%",background:p.colorBgContainer}),[p.colorBgContainer]);return o.jsxs(r.SortableItem,{className:r.cx("nb-mobile-header"),style:f,children:[o.jsx(Na,{backArrow:a,onBack:()=>s(-1),children:d}),o.jsx(i,{})]})};ht.Designer=Za;const Qa=()=>{const{t:e}=w();return o.jsx(r.GeneralSchemaDesigner,{children:o.jsx(r.SchemaSettingsRemove,{removeParentsIfNoChildren:!0,confirm:{title:e("Delete settings block")},breakRemoveOn:{"x-component":"Grid"}},"remove")})},vt=()=>{const e=r.useDesigner();return o.jsxs(r.SortableItem,{className:r.cx("nb-mobile-setting",r.css`
|
|
107
107
|
margin-bottom: var(--nb-spacing);
|
|
108
|
-
`),children:[
|
|
108
|
+
`),children:[o.jsx(e,{}),o.jsx(r.SettingsMenu,{redirectUrl:"/mobile"})]})};vt.Designer=Qa;const Ya=()=>{const e=r.useSchemaInitializerItem(),{insert:t}=r.useSchemaInitializer();return o.jsx(r.SchemaInitializerItem,x({icon:o.jsx(B.SettingOutlined,{}),onClick:()=>F(this,null,function*(){t({type:"void","x-component":"MSettings","x-designer":"MSettings.Designer","x-component-props":{}})})},e))},yt=l.createContext(null),Ra=e=>o.jsx(yt.Provider,{value:{interface:!0},children:e.children}),xt=()=>l.useContext(yt),ei=r.css`
|
|
109
109
|
padding: 0 var(--nb-spacing);
|
|
110
110
|
& > .nb-action-bar {
|
|
111
111
|
padding: unset !important;
|
|
112
112
|
background: unset !important;
|
|
113
113
|
}
|
|
114
|
-
`,
|
|
114
|
+
`,ti=()=>({className:ei}),ni={xs:1,sm:1,md:1,lg:1,xl:1,xxl:1},ri=()=>({columnCount:xt()?ni:null,pagination:{simple:!0}}),oi=e=>o.jsx(r.SchemaComponentOptions,{components:{MMenuBlockInitializer:Bt,MSettingsBlockInitializer:Ya,MContainer:Ie,MMenu:$e,MTabBar:we,MPage:Pe,MHeader:ht,MSettings:vt},scope:{useGridCardBlockItemProps:ti,useGridCardBlockProps:ri},children:e.children}),ai=()=>{const{t:e}=w(),t=r.useApp(),n=()=>{window.open(t.getRouteUrl("/mobile"))};return o.jsx("div",{className:r.css`
|
|
115
115
|
position: absolute;
|
|
116
116
|
top: -40px;
|
|
117
117
|
right: 0;
|
|
118
|
-
`,children:
|
|
118
|
+
`,children:o.jsx(S.Button,{type:"dashed",onClick:n,icon:o.jsx(B.LinkOutlined,{}),children:e("Preview")})})},ii=r.css`
|
|
119
119
|
--nb-spacing: 14px;
|
|
120
|
-
`,
|
|
120
|
+
`,si=r.css``,ci=r.css`
|
|
121
121
|
--nb-designer-top: 2px;
|
|
122
122
|
--nb-designer-right: 2px;
|
|
123
123
|
.nb-sortable-designer:hover {
|
|
@@ -152,31 +152,31 @@
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
`,
|
|
155
|
+
`,St={getContainer:".nb-mobile-application",width:"90%",style:{position:"absolute"}},li=k(x({},St),{style:{maxWidth:"calc(100% - 16px)"},maskStyle:{position:"absolute"},wrapClassName:r.css`
|
|
156
156
|
position: absolute !important;
|
|
157
|
-
`}),
|
|
157
|
+
`}),di=()=>"nocobase-mobile-container",$t=e=>{const t=di(),n=v.useParams(),a=xt(),i=l.useMemo(()=>a?l.Fragment:r.AdminProvider,[a]);return r.useViewport(),o.jsx(i,{children:o.jsxs(oi,{children:[o.jsx(ai,{}),o.jsx(r.ActionContextProvider,{modalProps:li,drawerProps:St,children:o.jsxs("div",{className:r.cx("nb-mobile-application",ci,ii,si,r.css`
|
|
158
158
|
display: flex;
|
|
159
159
|
flex-direction: column;
|
|
160
160
|
width: 100%;
|
|
161
161
|
height: 100%;
|
|
162
162
|
position: relative;
|
|
163
163
|
overflow: hidden;
|
|
164
|
-
`),children:[n.name&&!n.name.startsWith("tab_")?
|
|
164
|
+
`),children:[n.name&&!n.name.startsWith("tab_")?o.jsx(v.Outlet,{}):o.jsx(r.RemoteSchemaComponent,{uid:t,children:e.children},t),o.jsx("div",{id:"nb-position-container"})]})})]})})},pi=()=>{const e=r.useApp(),{t}=w(),n=l.useMemo(()=>e.getRouteUrl("/mobile"),[e]);return o.jsx(S.Card,{style:{minHeight:"600px"},children:o.jsx(S.Form,{layout:"vertical",children:o.jsx(S.Form.Item,{tooltip:`${t("The full address is")} ${window.origin}${n}`,label:t("Mobile client access address"),children:o.jsx(S.Input,{value:n,disabled:!0})})})})},Ct=l.memo(()=>{const t=r.usePlugin(Te).getMobileRouterComponent();return o.jsx(Ra,{children:o.jsx("div",{className:r.css`
|
|
165
165
|
display: flex;
|
|
166
166
|
width: 100%;
|
|
167
167
|
height: 100%;
|
|
168
168
|
position: relative;
|
|
169
|
-
`,children:
|
|
169
|
+
`,children:o.jsx(t,{})})})});Ct.displayName="InterfaceRouter";const ui=e=>o.jsx("div",{className:r.cx("nb-mobile-device-ios6",r.css(`
|
|
170
170
|
display: flex;
|
|
171
171
|
width: 375px;
|
|
172
172
|
height: 667px;
|
|
173
|
-
`),e.className),children:e.children}),
|
|
173
|
+
`),e.className),children:e.children}),mi=e=>o.jsx("div",{className:r.cx("nb-mobile-device-wrapper",r.css`
|
|
174
174
|
width: 100%;
|
|
175
175
|
height: 100%;
|
|
176
176
|
display: flex;
|
|
177
177
|
justify-content: center;
|
|
178
178
|
align-items: center;
|
|
179
179
|
margin-top: 50px;
|
|
180
|
-
`),children:
|
|
180
|
+
`),children:o.jsx(ui,x({className:r.css`
|
|
181
181
|
box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
|
|
182
|
-
`},e))}),
|
|
182
|
+
`},e))}),fi=()=>o.jsx(mi,{children:o.jsx(Ct,{})});class Te extends r.Plugin{constructor(){super(...arguments);Pt(this,"mobileRouter")}load(){return F(this,null,function*(){this.setMobileRouter(),this.addRoutes(),this.addSettings(),this.app.use(Ne),this.app.schemaInitializerManager.add(Ae),this.app.schemaInitializerManager.add(kt)})}addSettings(){this.app.pluginSettingsManager.add(N,{title:`{{t("Mobile Client-side", { ns: "${N}" })}}`,icon:"MobileOutlined",Component:()=>o.jsx(v.Outlet,{})}),this.app.pluginSettingsManager.add(`${N}.interface`,{title:`{{t("Interface Configuration", { ns: "${N}" })}}`,Component:fi,sort:1}),this.app.pluginSettingsManager.add(`${N}.app`,{title:`{{t("App Configuration", { ns: "${N}" })}}`,Component:pi,sort:2})}setMobileRouter(){const n=r.createRouterManager({type:"hash"},this.app);n.add("root",{path:"/",element:o.jsx(v.Navigate,{replace:!0,to:"/mobile"})}),n.add("mobile",{path:"/mobile",element:o.jsx($t,{})}),n.add("mobile.page",{path:"/mobile/:name",element:o.jsx(r.RouteSchemaComponent,{})}),this.mobileRouter=n}getMobileRouterComponent(){return this.mobileRouter.getRouterComponent()}addRoutes(){this.app.router.add("mobile",{path:"/mobile",element:o.jsx($t,{})}),this.app.router.add("mobile.page",{path:"/mobile/:name",Component:"RouteSchemaComponent"})}}m.PluginMobileClient=Te,m.default=Te,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/externalVersion.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
module.exports = {
|
|
2
2
|
"react": "18.2.0",
|
|
3
3
|
"react-router-dom": "6.21.0",
|
|
4
|
-
"@nocobase/client": "0.
|
|
5
|
-
"@nocobase/server": "0.
|
|
4
|
+
"@nocobase/client": "0.21.0-alpha.10",
|
|
5
|
+
"@nocobase/server": "0.21.0-alpha.10",
|
|
6
6
|
"antd": "5.12.8",
|
|
7
7
|
"react-i18next": "11.18.6",
|
|
8
8
|
"@ant-design/icons": "5.2.6",
|
|
9
|
-
"@nocobase/database": "0.
|
|
9
|
+
"@nocobase/database": "0.21.0-alpha.10",
|
|
10
10
|
"@formily/react": "2.3.0",
|
|
11
11
|
"@formily/shared": "2.3.0",
|
|
12
12
|
"lodash": "4.17.21",
|
package/dist/server/plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Plugin } from '@nocobase/server';
|
|
2
|
-
export declare class
|
|
2
|
+
export declare class PluginMobileServer extends Plugin {
|
|
3
3
|
afterAdd(): void;
|
|
4
4
|
load(): Promise<void>;
|
|
5
5
|
install(): Promise<void>;
|
|
@@ -7,4 +7,4 @@ export declare class MobileClientPlugin extends Plugin {
|
|
|
7
7
|
afterDisable(): Promise<void>;
|
|
8
8
|
remove(): Promise<void>;
|
|
9
9
|
}
|
|
10
|
-
export default
|
|
10
|
+
export default PluginMobileServer;
|
package/dist/server/plugin.js
CHANGED
|
@@ -17,13 +17,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
18
|
var plugin_exports = {};
|
|
19
19
|
__export(plugin_exports, {
|
|
20
|
-
|
|
20
|
+
PluginMobileServer: () => PluginMobileServer,
|
|
21
21
|
default: () => plugin_default
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(plugin_exports);
|
|
24
24
|
var import_server = require("@nocobase/server");
|
|
25
25
|
var import_path = require("path");
|
|
26
|
-
class
|
|
26
|
+
class PluginMobileServer extends import_server.Plugin {
|
|
27
27
|
afterAdd() {
|
|
28
28
|
}
|
|
29
29
|
async load() {
|
|
@@ -53,7 +53,7 @@ class MobileClientPlugin extends import_server.Plugin {
|
|
|
53
53
|
grid: {
|
|
54
54
|
type: "void",
|
|
55
55
|
"x-component": "Grid",
|
|
56
|
-
"x-initializer": "
|
|
56
|
+
"x-initializer": "mobilePage:addBlock",
|
|
57
57
|
"x-component-props": {
|
|
58
58
|
showDivider: false
|
|
59
59
|
}
|
|
@@ -70,8 +70,8 @@ class MobileClientPlugin extends import_server.Plugin {
|
|
|
70
70
|
async remove() {
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
|
-
var plugin_default =
|
|
73
|
+
var plugin_default = PluginMobileServer;
|
|
74
74
|
// Annotate the CommonJS export names for ESM import in node:
|
|
75
75
|
0 && (module.exports = {
|
|
76
|
-
|
|
76
|
+
PluginMobileServer
|
|
77
77
|
});
|
package/dist/server/routes.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nocobase/plugin-mobile-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.0-alpha.10",
|
|
4
4
|
"main": "./dist/server/index.js",
|
|
5
5
|
"homepage": "https://docs.nocobase.com/handbook/mobile-client",
|
|
6
6
|
"homepage.zh-CN": "https://docs-cn.nocobase.com/handbook/mobile-client",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"@nocobase/test": "0.x",
|
|
34
34
|
"@nocobase/utils": "0.x"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "98adf5ec996a4f359c6ca1c4a6ac837c43b6e268"
|
|
37
37
|
}
|