@nocobase/plugin-mobile-client 0.14.0-alpha.6 → 0.14.0-alpha.7

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.
@@ -1,4 +1,5 @@
1
1
  export declare const MBlockInitializers: {
2
+ 'data-testid': string;
2
3
  title: string;
3
4
  icon: string;
4
5
  wrap: (schema: import("@formily/json-schema").Stringify<{
@@ -17,7 +17,7 @@
17
17
  margin-top: 50px;
18
18
  `),children:o.jsx(Ot,$({className:a.css`
19
19
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
20
- `},e))}),Et=()=>o.jsx(kt,{children:o.jsx(Be,{})}),je=()=>window.JsBridge,Nt=(e,t)=>je().invoke(e,t),Bt=()=>!!je(),Ae={onBackPressed:()=>{history.length===1?Nt({action:"moveTaskToBack"}):history.back()}};Object.keys(Ae).forEach(e=>{window[e]=Ae[e]});const jt=l.memo(e=>{const{t}=w(),n=v.useLocation(),r=v.useNavigate();return l.useEffect(()=>{Bt()&&n.pathname==="/admin"&&r("/mobile",{replace:!0})},[n.pathname,r]),o.jsx(a.SettingsCenterProvider,{settings:{"mobile-client":{title:t("Mobile Client-side"),icon:"MobileOutlined",tabs:{interface:{title:t("Interface Configuration"),component:Et},app:{title:t("App Configuration"),component:Tt}}}},children:e.children})}),At={title:'{{t("Add block")}}',icon:"PlusOutlined",wrap:a.gridRowColWrap,items:[{key:"dataBlocks",type:"itemGroup",title:'{{t("Data blocks")}}',children:[{key:"GridCard",type:"item",title:'{{t("Grid Card")}}',component:"GridCardBlockInitializer"},{key:"table",type:"item",title:'{{t("Table")}}',component:"TableBlockInitializer"},{key:"form",type:"item",title:'{{t("Form")}}',component:"FormBlockInitializer"},{key:"details",type:"item",title:'{{t("Details")}}',component:"DetailsBlockInitializer"},{key:"calendar",type:"item",title:'{{t("Calendar")}}',component:"CalendarBlockInitializer"},{key:"mapBlock",type:"item",title:N("Map"),component:"MapBlockInitializer"}]},{key:"otherBlocks",type:"itemGroup",title:'{{t("Other blocks")}}',children:[{key:"menu",type:"item",title:N("Menu"),component:"MMenuBlockInitializer",sort:100},{key:"markdown",type:"item",title:'{{t("Markdown")}}',component:"MarkdownBlockInitializer"},{key:"settings",type:"item",title:N("Settings"),component:"MSettingsBlockInitializer",sort:100}]}]},_t=e=>{const{insert:t}=e;return o.jsx(a.SchemaInitializer.Item,{icon:o.jsx(T.MenuOutlined,{}),onClick:()=>_(this,null,function*(){t({type:"void","x-component":"MMenu","x-designer":"MMenu.Designer","x-component-props":{}})})})},yi="";!!(typeof window!="undefined"&&typeof document!="undefined"&&window.document&&window.document.createElement)&&document.addEventListener("touchstart",()=>{},!0);function pe(e,t){const n=e;for(const r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n}var W=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:{}};/*!
20
+ `},e))}),Et=()=>o.jsx(kt,{children:o.jsx(Be,{})}),je=()=>window.JsBridge,Nt=(e,t)=>je().invoke(e,t),Bt=()=>!!je(),Ae={onBackPressed:()=>{history.length===1?Nt({action:"moveTaskToBack"}):history.back()}};Object.keys(Ae).forEach(e=>{window[e]=Ae[e]});const jt=l.memo(e=>{const{t}=w(),n=v.useLocation(),r=v.useNavigate();return l.useEffect(()=>{Bt()&&n.pathname==="/admin"&&r("/mobile",{replace:!0})},[n.pathname,r]),o.jsx(a.SettingsCenterProvider,{settings:{"mobile-client":{title:t("Mobile Client-side"),icon:"MobileOutlined",tabs:{interface:{title:t("Interface Configuration"),component:Et},app:{title:t("App Configuration"),component:Tt}}}},children:e.children})}),At={"data-testid":"add-block-button-in-mobile-page",title:'{{t("Add block")}}',icon:"PlusOutlined",wrap:a.gridRowColWrap,items:[{key:"dataBlocks",type:"itemGroup",title:'{{t("Data blocks")}}',children:[{key:"GridCard",type:"item",title:'{{t("Grid Card")}}',component:"GridCardBlockInitializer"},{key:"table",type:"item",title:'{{t("Table")}}',component:"TableBlockInitializer"},{key:"form",type:"item",title:'{{t("Form")}}',component:"FormBlockInitializer"},{key:"details",type:"item",title:'{{t("Details")}}',component:"DetailsBlockInitializer"},{key:"calendar",type:"item",title:'{{t("Calendar")}}',component:"CalendarBlockInitializer"},{key:"mapBlock",type:"item",title:N("Map"),component:"MapBlockInitializer"}]},{key:"otherBlocks",type:"itemGroup",title:'{{t("Other blocks")}}',children:[{key:"menu",type:"item",title:N("Menu"),component:"MMenuBlockInitializer",sort:100},{key:"markdown",type:"item",title:'{{t("Markdown")}}',component:"MarkdownBlockInitializer"},{key:"settings",type:"item",title:N("Settings"),component:"MSettingsBlockInitializer",sort:100}]}]},_t=e=>{const{insert:t}=e;return o.jsx(a.SchemaInitializer.Item,{icon:o.jsx(T.MenuOutlined,{}),onClick:()=>_(this,null,function*(){t({type:"void","x-component":"MMenu","x-designer":"MMenu.Designer","x-component-props":{}})})})},yi="";!!(typeof window!="undefined"&&typeof document!="undefined"&&window.document&&window.document.createElement)&&document.addEventListener("touchstart",()=>{},!0);function pe(e,t){const n=e;for(const r in t)t.hasOwnProperty(r)&&(n[r]=t[r]);return n}var W=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:{}};/*!
21
21
  Copyright (c) 2018 Jed Watson.
22
22
  Licensed under the MIT License (MIT), see
23
23
  http://jedwatson.github.io/classnames
@@ -1,12 +1,12 @@
1
1
  module.exports = {
2
- "@nocobase/client": "0.14.0-alpha.6",
2
+ "@nocobase/client": "0.14.0-alpha.7",
3
3
  "react": "18.2.0",
4
4
  "react-router-dom": "6.14.1",
5
- "@nocobase/server": "0.14.0-alpha.6",
5
+ "@nocobase/server": "0.14.0-alpha.7",
6
6
  "antd": "5.8.6",
7
7
  "react-i18next": "11.18.6",
8
8
  "@ant-design/icons": "5.1.4",
9
- "@nocobase/database": "0.14.0-alpha.6",
9
+ "@nocobase/database": "0.14.0-alpha.7",
10
10
  "@formily/react": "2.2.27",
11
11
  "@formily/shared": "2.2.27",
12
12
  "lodash": "4.17.21",
@@ -23,7 +23,6 @@ __export(plugin_exports, {
23
23
  module.exports = __toCommonJS(plugin_exports);
24
24
  var import_server = require("@nocobase/server");
25
25
  var import_path = require("path");
26
- var import_routes = require("./routes");
27
26
  class MobileClientPlugin extends import_server.Plugin {
28
27
  afterAdd() {
29
28
  }
@@ -37,12 +36,6 @@ class MobileClientPlugin extends import_server.Plugin {
37
36
  });
38
37
  }
39
38
  async install() {
40
- const repository = this.app.db.getRepository("uiRoutes");
41
- for (const values of import_routes.routes) {
42
- await repository.create({
43
- values
44
- });
45
- }
46
39
  const uiSchemas = this.db.getRepository("uiSchemas");
47
40
  const systemSettings = this.db.getRepository("systemSettings");
48
41
  const schema = await uiSchemas.insert({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nocobase/plugin-mobile-client",
3
- "version": "0.14.0-alpha.6",
3
+ "version": "0.14.0-alpha.7",
4
4
  "main": "./dist/server/index.js",
5
5
  "displayName": "Mobile client",
6
6
  "displayName.zh-CN": "移动端",
@@ -30,5 +30,5 @@
30
30
  "@nocobase/test": "0.x",
31
31
  "@nocobase/utils": "0.x"
32
32
  },
33
- "gitHead": "7f2858222231c207030b57704a0bb6ebc98e4e45"
33
+ "gitHead": "dc958417d27ed0753439bcef192be91a03dfc30f"
34
34
  }