@nocobase/plugin-mobile-client 1.2.14-alpha → 1.3.0-alpha.20240710141659

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.
@@ -8,7 +8,7 @@
8
8
  */
9
9
 
10
10
  (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)}})();
11
- (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 Pt=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(Pt)for(var r of Pt(o))yi.call(o,r)&&Ee(m,r,o[r]);return m},k=(m,o)=>bi(m,hi(o));var wt=(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 A(e){return`{{t('${e}', { ns: '${N}', nsMode: 'fallback' })}}`}function P(){return le.useTranslation([N,"client"],{nsMode:"fallback"})}const Ae={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:A("Map"),Component:"MapBlockInitializer"},{name:"charts",title:'{{t("Charts")}}',Component:"ChartV2BlockInitializer"}]},{name:"otherBlocks",type:"itemGroup",title:'{{t("Other blocks")}}',children:[{name:"menu",title:A("Menu"),Component:"MMenuBlockInitializer"},{name:"markdown",title:'{{t("Markdown")}}',Component:"MarkdownBlockInitializer"},{name:"settings",title:A("Settings"),Component:"MSettingsBlockInitializer"}]}]},je=new r.CompatibleSchemaInitializer(k(x({},Ae),{name:"MBlockInitializers"})),kt=new r.CompatibleSchemaInitializer(Ae,je),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:{}};/*!
11
+ (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 Pt=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(Pt)for(var r of Pt(o))yi.call(o,r)&&Ee(m,r,o[r]);return m},k=(m,o)=>bi(m,hi(o));var wt=(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=r.useNavigateNoUpdate();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 A(e){return`{{t('${e}', { ns: '${N}', nsMode: 'fallback' })}}`}function P(){return le.useTranslation([N,"client"],{nsMode:"fallback"})}const Ae={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:A("Map"),Component:"MapBlockInitializer"},{name:"charts",title:'{{t("Charts")}}',Component:"ChartV2BlockInitializer"}]},{name:"otherBlocks",type:"itemGroup",title:'{{t("Other blocks")}}',children:[{name:"menu",title:A("Menu"),Component:"MMenuBlockInitializer"},{name:"markdown",title:'{{t("Markdown")}}',Component:"MarkdownBlockInitializer"},{name:"settings",title:A("Settings"),Component:"MSettingsBlockInitializer"}]}]},je=new r.CompatibleSchemaInitializer(k(x({},Ae),{name:"MBlockInitializers"})),kt=new r.CompatibleSchemaInitializer(Ae,je),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:{}};/*!
12
12
  Copyright (c) 2018 Jed Watson.
13
13
  Licensed under the MIT License (MIT), see
14
14
  http://jedwatson.github.io/classnames
@@ -8,14 +8,14 @@
8
8
  */
9
9
 
10
10
  module.exports = {
11
+ "@nocobase/client": "1.3.0-alpha.20240710141659",
11
12
  "react": "18.2.0",
12
13
  "react-router-dom": "6.21.0",
13
- "@nocobase/client": "1.2.14-alpha",
14
- "@nocobase/server": "1.2.14-alpha",
14
+ "@nocobase/server": "1.3.0-alpha.20240710141659",
15
15
  "antd": "5.12.8",
16
16
  "react-i18next": "11.18.6",
17
17
  "@ant-design/icons": "5.2.6",
18
- "@nocobase/database": "1.2.14-alpha",
18
+ "@nocobase/database": "1.3.0-alpha.20240710141659",
19
19
  "@formily/react": "2.3.0",
20
20
  "@formily/shared": "2.3.0",
21
21
  "lodash": "4.17.21",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-mobile-client",
3
- "version": "1.2.14-alpha",
3
+ "version": "1.3.0-alpha.20240710141659",
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": "1.x",
34
34
  "@nocobase/utils": "1.x"
35
35
  },
36
- "gitHead": "717c71eee8cec8d230f1856759d97d6a843f8be6"
36
+ "gitHead": "cb8b234443034da0dfa57dd5d6cca1f3b3db6f08"
37
37
  }