@nocobase/plugin-mobile-client 1.3.0-alpha.20240710084543 → 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.
Files changed (72) hide show
  1. package/dist/client/MobileClientProvider.d.ts +10 -0
  2. package/dist/client/configuration/App.d.ts +10 -0
  3. package/dist/client/configuration/Interface.d.ts +10 -0
  4. package/dist/client/configuration/index.d.ts +10 -0
  5. package/dist/client/core/bridge/index.d.ts +10 -0
  6. package/dist/client/core/bridge/injects.d.ts +21 -0
  7. package/dist/client/core/bridge/native-call.d.ts +9 -0
  8. package/dist/client/core/index.d.ts +11 -0
  9. package/dist/client/core/schema/common/index.d.ts +9 -0
  10. package/dist/client/core/schema/common/page.d.ts +24 -0
  11. package/dist/client/core/schema/components/container/Container.Designer.d.ts +10 -0
  12. package/dist/client/core/schema/components/container/Container.d.ts +13 -0
  13. package/dist/client/core/schema/components/container/index.d.ts +9 -0
  14. package/dist/client/core/schema/components/container/style.d.ts +13 -0
  15. package/dist/client/core/schema/components/header/Header.Designer.d.ts +10 -0
  16. package/dist/client/core/schema/components/header/Header.d.ts +18 -0
  17. package/dist/client/core/schema/components/header/index.d.ts +9 -0
  18. package/dist/client/core/schema/components/index.d.ts +14 -0
  19. package/dist/client/core/schema/components/menu/Menu.Designer.d.ts +10 -0
  20. package/dist/client/core/schema/components/menu/Menu.Item.d.ts +14 -0
  21. package/dist/client/core/schema/components/menu/Menu.d.ts +15 -0
  22. package/dist/client/core/schema/components/menu/MenuBlockInitializer.d.ts +10 -0
  23. package/dist/client/core/schema/components/menu/index.d.ts +10 -0
  24. package/dist/client/core/schema/components/menu/schema.d.ts +25 -0
  25. package/dist/client/core/schema/components/menu/style.d.ts +12 -0
  26. package/dist/client/core/schema/components/page/Page.Designer.d.ts +10 -0
  27. package/dist/client/core/schema/components/page/Page.d.ts +13 -0
  28. package/dist/client/core/schema/components/page/index.d.ts +9 -0
  29. package/dist/client/core/schema/components/page/style.d.ts +14 -0
  30. package/dist/client/core/schema/components/settings/Settings.Designer.d.ts +10 -0
  31. package/dist/client/core/schema/components/settings/Settings.d.ts +14 -0
  32. package/dist/client/core/schema/components/settings/SettingsBlockInitializer.d.ts +10 -0
  33. package/dist/client/core/schema/components/settings/index.d.ts +10 -0
  34. package/dist/client/core/schema/components/tab-bar/TabBar.Item.d.ts +14 -0
  35. package/dist/client/core/schema/components/tab-bar/TabBar.d.ts +14 -0
  36. package/dist/client/core/schema/components/tab-bar/index.d.ts +9 -0
  37. package/dist/client/core/schema/components/tab-bar/schema.d.ts +26 -0
  38. package/dist/client/core/schema/helpers/index.d.ts +75 -0
  39. package/dist/client/core/schema/hooks/index.d.ts +9 -0
  40. package/dist/client/core/schema/hooks/useSchemaPatch.d.ts +11 -0
  41. package/dist/client/core/schema/index.d.ts +11 -0
  42. package/dist/client/core/schema/initializers/BlockInitializers.d.ts +15 -0
  43. package/dist/client/core/schema/initializers/index.d.ts +9 -0
  44. package/dist/client/core/schema/scopes/grid-card.d.ts +23 -0
  45. package/dist/client/core/schema/scopes/index.d.ts +9 -0
  46. package/dist/client/devices/iOS6.d.ts +13 -0
  47. package/dist/client/devices/index.d.ts +10 -0
  48. package/dist/client/index.d.ts +21 -0
  49. package/dist/client/index.js +191 -0
  50. package/dist/client/locale/index.d.ts +12 -0
  51. package/dist/client/router/Application.d.ts +11 -0
  52. package/dist/client/router/InterfaceProvider.d.ts +12 -0
  53. package/dist/client/router/InterfaceRouter.d.ts +10 -0
  54. package/dist/client/router/OpenInNewTab.d.ts +10 -0
  55. package/dist/client/router/index.d.ts +9 -0
  56. package/dist/externalVersion.js +24 -0
  57. package/dist/index.d.ts +10 -0
  58. package/dist/index.js +48 -0
  59. package/dist/locale/en-US.json +32 -0
  60. package/dist/locale/ko_KR.json +32 -0
  61. package/dist/locale/zh-CN.json +32 -0
  62. package/dist/server/index.d.ts +9 -0
  63. package/dist/server/index.js +42 -0
  64. package/dist/server/migrations/20230620203218-mobile-ui-schema-uid.d.ts +13 -0
  65. package/dist/server/migrations/20230620203218-mobile-ui-schema-uid.js +68 -0
  66. package/dist/server/migrations/20231215215233-mobile-container-uid.d.ts +13 -0
  67. package/dist/server/migrations/20231215215233-mobile-container-uid.js +85 -0
  68. package/dist/server/plugin.d.ts +18 -0
  69. package/dist/server/plugin.js +86 -0
  70. package/dist/server/routes.d.ts +42 -0
  71. package/dist/server/routes.js +73 -0
  72. package/package.json +2 -2
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { CompatibleSchemaInitializer } from '@nocobase/client';
10
+ /**
11
+ * @deprecated
12
+ * use `mBlockInitializers` instead
13
+ */
14
+ export declare const mBlockInitializers_deprecated: CompatibleSchemaInitializer;
15
+ export declare const mBlockInitializers: CompatibleSchemaInitializer;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export * from './BlockInitializers';
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { PaginationProps } from 'antd';
10
+ export declare const useGridCardBlockItemProps: () => {
11
+ className: string;
12
+ };
13
+ export declare const useGridCardBlockProps: () => {
14
+ columnCount: {
15
+ xs: number;
16
+ sm: number;
17
+ md: number;
18
+ lg: number;
19
+ xl: number;
20
+ xxl: number;
21
+ };
22
+ pagination: PaginationProps;
23
+ };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export * from './grid-card';
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ declare const iOS6: React.FC<{
11
+ className: string;
12
+ }>;
13
+ export default iOS6;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const MobileDevice: React.FC;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { Plugin, RouterManager } from '@nocobase/client';
10
+ import React from 'react';
11
+ export declare class PluginMobileClient extends Plugin {
12
+ mobileRouter: RouterManager;
13
+ load(): Promise<void>;
14
+ addSettings(): void;
15
+ setMobileRouter(): void;
16
+ getMobileRouterComponent(): React.FC<{
17
+ BaseLayout?: React.ComponentType;
18
+ }>;
19
+ addRoutes(): void;
20
+ }
21
+ export default PluginMobileClient;
@@ -0,0 +1,191 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
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=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
+ Copyright (c) 2018 Jed Watson.
13
+ Licensed under the MIT License (MIT), see
14
+ http://jedwatson.github.io/classnames
15
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var c="",d=0;d<arguments.length;d++){var s=arguments[d];s&&(c=i(c,a(s)))}return c}function a(c){if(typeof c=="string"||typeof c=="number")return c;if(typeof c!="object")return"";if(Array.isArray(c))return n.apply(null,c);if(c.toString!==Object.prototype.toString&&!c.toString.toString().includes("[native code]"))return c.toString();var d="";for(var s in c)t.call(c,s)&&c[s]&&(d=i(d,s));return d}function i(c,d){return d?c?c+" "+d:c+d:c}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 At=typeof J=="object"&&J&&J.Object===Object&&J,De=At,jt=De,_t=typeof self=="object"&&self&&self.Object===Object&&self,Ft=jt||_t||Function("return this")(),me=Ft,Dt=me,Lt=Dt.Symbol,Le=Lt,ze=Le,Ge=Object.prototype,zt=Ge.hasOwnProperty,Gt=Ge.toString,V=ze?ze.toStringTag:void 0;function Ut(e){var t=zt.call(e,V),n=e[V];try{e[V]=void 0;var a=!0}catch(c){}var i=Gt.call(e);return a&&(t?e[V]=n:delete e[V]),i}var qt=Ut,Vt=Object.prototype,Ht=Vt.toString;function Kt(e){return Ht.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 Ve=sn,cn=me,ln=cn["__core-js_shared__"],dn=ln,be=dn,He=function(){var e=/[^.]+$/.exec(be&&be.keys&&be.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function pn(e){return!!He&&He 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=Ve,vn=un,yn=ge,xn=bn,Sn=/[\\^$.*+?()[\]{}|]/g,$n=/^\[object .+?Constructor\]$/,Cn=Function.prototype,In=Object.prototype,Pn=Cn.toString,wn=In.hasOwnProperty,Tn=RegExp("^"+Pn.call(wn).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 An(e,t){var n=Nn(e,t);return Bn(n)?n:void 0}var jn=An,_n=jn,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 Vn(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 Hn=Vn,Kn=Hn,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=Ve,Pr=Re;function wr(e){return e!=null&&Pr(e.length)&&!Ir(e)}var et=wr,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 Ar(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 jr=Ar,_r=Sr,Fr=jr;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,Vr=he,Hr="[object Arguments]";function Kr(e){return Vr(e)&&qr(e)==Hr}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]",Po="[object Int8Array]",wo="[object Int16Array]",To="[object Int32Array]",Mo="[object Uint8Array]",Oo="[object Uint8ClampedArray]",Eo="[object Uint16Array]",ko="[object Uint32Array]",h={};h[Co]=h[Io]=h[Po]=h[wo]=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 Ao(e){return function(t){return e(t)}}var jo=Ao,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=jo,ot=_o,at=ot&&ot.isTypedArray,Lo=at?Do(at):Fo,zo=Lo,Go=Gr,Uo=Yr,qo=eo,Vo=ro,Ho=tt,Ko=zo,Wo=Object.prototype,Jo=Wo.hasOwnProperty;function Xo(e,t){var n=qo(e),a=!n&&Uo(e),i=!n&&!a&&Vo(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")||Ho(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 Pa(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={};/**
16
+ * @license React
17
+ * react-is.production.min.js
18
+ *
19
+ * Copyright (c) Facebook, Inc. and its affiliates.
20
+ *
21
+ * This source code is licensed under the MIT license found in the
22
+ * LICENSE file in the root directory of this source tree.
23
+ */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"),wa=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 wa: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 H="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(H,`${H}-${n.mode}`),ref:a},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 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)))},Aa=()=>null,E="adm-tab-bar",ja={safeArea:!1},Se=ue(e=>{var t;const n=ve(ja,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]=Pa({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:Aa}),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}=P(),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:A("Menu name"),required:!0,"x-component":"Input","x-decorator":"FormItem"},icon:{"x-decorator":"FormItem","x-component":"IconPicker",title:A("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`
24
+ width: 100%;
25
+ background: var(--adm-color-background);
26
+ > .adm-list-item {
27
+ background: inherit;
28
+ }
29
+ `),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}=P(),{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`
30
+ --adm-color-primary: ${e.colorPrimary};
31
+ --adm-color-primary-hover: ${e.colorPrimaryHover};
32
+ --adm-color-primary-active: ${e.colorPrimaryActive};
33
+ --padding-left: ${e.paddingSM}px;
34
+ --adm-color-background: ${e.colorBgContainer};
35
+ --adm-color-border: ${e.colorBorder};
36
+
37
+ background: ${e.colorBgContainer};
38
+ width: 100%;
39
+ margin-bottom: var(--nb-spacing);
40
+ `})),$e=e=>{const{styles:t}=La(),n=r.useDesigner(),a=b.useFieldSchema(),{insertBeforeEnd:i,designable:c}=r.useDesignable(),{t:d}=P(),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}=P(),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:A("Untitled")},properties:{page:f.toJSON()}}}})}yield n({tabBarEnabled:p}),p===!1&&c("../")})})}))},Va=r.createStyles(({token:e,css:t})=>({mobileContainer:t`
41
+ --adm-color-primary: ${e.colorPrimary};
42
+
43
+ & > .general-schema-designer > .general-schema-designer-icons {
44
+ right: unset;
45
+ left: 2px;
46
+ }
47
+ background: var(--nb-box-bg);
48
+ display: flex;
49
+ flex-direction: column;
50
+ width: 100%;
51
+ height: 100%;
52
+ overflow-y: scroll;
53
+ position: initial !important;
54
+ `,tabBar:t`
55
+ & > .general-schema-designer {
56
+ --nb-designer-top: ${e.marginMD}px;
57
+ }
58
+ position: absolute;
59
+ background: ${e.colorBgContainer};
60
+ width: 100%;
61
+ bottom: 0;
62
+ left: 0;
63
+ z-index: 1000;
64
+ `})),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}),Ha=()=>{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,j;const{styles:t}=Va(),{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=(j=f==null?void 0:f.properties[$])==null?void 0:j["x-uid"]),l.useEffect(()=>{if(C&&!d.name){const w=s.pathname.endsWith("/")?s.pathname.slice(0,-1):s.pathname;c(`${w}/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(Ha,{}):o.jsx(r.SchemaComponent,{filterProperties:w=>w["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:w=>w["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`
65
+ position: absolute !important;
66
+ width: 100%;
67
+ height: 100%;
68
+ top: 0;
69
+ left: 0;
70
+ `),children:o.jsx(e,{})})},Wa=()=>{const{t:e}=P(),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 Pe=e=>{const t=b.useFieldSchema(),{designable:n}=r.useDesignable(),{t:a}=P(),{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`
71
+ position: relative;
72
+ width: 100%;
73
+ display: flex;
74
+ align-items: center;
75
+ `),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`
76
+ width: 100%;
77
+ `),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`
78
+ .adm-tab-bar-item-icon {
79
+ height: auto;
80
+ }
81
+ `,icon:o.jsx(r.SchemaInitializerActionModal,{title:a("Add tab"),onSubmit:u,schema:gt})},"add-tab"):null]})})})};Pe.Item=bt,Pe.displayName="MTabBar";const Ja=e=>{var C,L,j,w;const{showBack:t}=e,{t:n}=P(),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=(j=i==null?void 0:i.properties)==null?void 0:j.tabs,f=!!p&&((w=a.componentProps)==null?void 0:w.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:A("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`
82
+ #nb-position-container > & {
83
+ height: ${e.sizeXXL}px;
84
+ border-top: 1px solid var(--nb-box-bg);
85
+ margin-bottom: 0px !important;
86
+ padding: 0 var(--nb-spacing);
87
+ align-items: center;
88
+ overflow-x: auto;
89
+ background: ${e.colorBgContainer};
90
+ z-index: 100;
91
+ }
92
+ `,mobilePage:t`
93
+ background: var(--nb-box-bg);
94
+ display: flex;
95
+ flex-direction: column;
96
+ width: 100%;
97
+ height: 100%;
98
+ // overflow-x: hidden;
99
+ // overflow-y: auto;
100
+ padding-bottom: var(--nb-spacing);
101
+ `,mobilePageHeader:t`
102
+ & > .ant-tabs > .ant-tabs-nav {
103
+ .ant-tabs-tab {
104
+ margin: 0 !important;
105
+ padding: 0 ${e.paddingContentHorizontal}px !important;
106
+ }
107
+ background: ${e.colorBgContainer};
108
+ }
109
+ display: flex;
110
+ flex-direction: column;
111
+ `})),we=e=>{var w,U,_,It;const{styles:t}=Xa(),n=r.useDesigner(),a=b.useField(),i=b.useFieldSchema(),[c,d]=v.useSearchParams(),s=(w=i.properties)==null?void 0:w.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]),j=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`
112
+ & > .ant-nb-grid {
113
+ margin-top: 14px;
114
+ }
115
+ `]:s&&!p||!s}),children:[u&&o.jsx(b.RecursionField,{schema:i,filterProperties:y=>y["x-component"]==="MHeader"}),o.jsx(r.TabsContextProvider,{PaneRoot:j,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(j,{children:!s&&o.jsx(b.RecursionField,{schema:i,filterProperties:y=>y["x-component"]!=="MHeader"})})]})};we.Designer=Ja,we.displayName="MPage";const Za=()=>{const e=b.useField(),{onUpdateComponentProps:t}=W(),{t:n}=P();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=A("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}=P();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`
116
+ margin-bottom: var(--nb-spacing);
117
+ `),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`
118
+ padding: 0 var(--nb-spacing);
119
+ & > .nb-action-bar {
120
+ padding: unset !important;
121
+ background: unset !important;
122
+ }
123
+ `,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:Pe,MPage:we,MHeader:ht,MSettings:vt},scope:{useGridCardBlockItemProps:ti,useGridCardBlockProps:ri},children:e.children}),ai=()=>{const{t:e}=P(),t=r.useApp(),n=()=>{window.open(t.getRouteUrl("/mobile"))};return o.jsx("div",{className:r.css`
124
+ position: absolute;
125
+ top: -40px;
126
+ right: 0;
127
+ `,children:o.jsx(S.Button,{type:"dashed",onClick:n,icon:o.jsx(B.LinkOutlined,{}),children:e("Preview")})})},ii=r.css`
128
+ --nb-spacing: 14px;
129
+ `,si=r.css``,ci=r.css`
130
+ --nb-designer-top: 2px;
131
+ --nb-designer-right: 2px;
132
+ .nb-sortable-designer:hover {
133
+ position: relative;
134
+ > .general-schema-designer {
135
+ display: block;
136
+ }
137
+ }
138
+ .general-schema-designer {
139
+ position: absolute;
140
+ z-index: 999;
141
+ top: 0;
142
+ bottom: 0;
143
+ left: 0;
144
+ right: 0;
145
+ display: none;
146
+ border: 0;
147
+ pointer-events: none;
148
+ > .general-schema-designer-icons {
149
+ position: absolute;
150
+ top: var(--nb-designer-top);
151
+ right: var(--nb-designer-right);
152
+ line-height: 16px;
153
+ pointer-events: all;
154
+ .ant-space-item {
155
+ background-color: var(--colorSettings);
156
+ color: #fff;
157
+ line-height: 16px;
158
+ width: 16px;
159
+ padding-left: 1px;
160
+ align-self: stretch;
161
+ }
162
+ }
163
+ }
164
+ `,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`
165
+ position: absolute !important;
166
+ `}),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`
167
+ display: flex;
168
+ flex-direction: column;
169
+ width: 100%;
170
+ height: 100%;
171
+ position: relative;
172
+ overflow: hidden;
173
+ `),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}=P(),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`
174
+ display: flex;
175
+ width: 100%;
176
+ height: 100%;
177
+ position: relative;
178
+ `,children:o.jsx(t,{})})})});Ct.displayName="InterfaceRouter";const ui=e=>o.jsx("div",{className:r.cx("nb-mobile-device-ios6",r.css(`
179
+ display: flex;
180
+ width: 375px;
181
+ height: 667px;
182
+ `),e.className),children:e.children}),mi=e=>o.jsx("div",{className:r.cx("nb-mobile-device-wrapper",r.css`
183
+ width: 100%;
184
+ height: 100%;
185
+ display: flex;
186
+ justify-content: center;
187
+ align-items: center;
188
+ margin-top: 50px;
189
+ `),children:o.jsx(ui,x({className:r.css`
190
+ box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
191
+ `},e))}),fi=()=>o.jsx(mi,{children:o.jsx(Ct,{})});class Te extends r.Plugin{constructor(){super(...arguments);wt(this,"mobileRouter")}load(){return F(this,null,function*(){this.setMobileRouter(),this.addRoutes(),this.addSettings(),this.app.use(Ne),this.app.schemaInitializerManager.add(je),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"}})});
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const NAMESPACE = "mobile-client";
10
+ export declare function lang(key: string): string;
11
+ export declare function generateNTemplate(key: string): string;
12
+ export declare function useTranslation(): import("react-i18next").UseTranslationResponse<("client" | "mobile-client")[], undefined>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ declare const MApplication: React.FC;
11
+ export default MApplication;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const InterfaceContext: React.Context<any>;
11
+ export declare const InterfaceProvider: (props: any) => React.JSX.Element;
12
+ export declare const useInterfaceContext: () => any;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const InterfaceRouter: React.FC;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ export declare const OpenInNewTab: () => React.JSX.Element;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export * from './InterfaceRouter';
@@ -0,0 +1,24 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ module.exports = {
11
+ "@nocobase/client": "1.3.0-alpha.20240710141659",
12
+ "react": "18.2.0",
13
+ "react-router-dom": "6.21.0",
14
+ "@nocobase/server": "1.3.0-alpha.20240710141659",
15
+ "antd": "5.12.8",
16
+ "react-i18next": "11.18.6",
17
+ "@ant-design/icons": "5.2.6",
18
+ "@nocobase/database": "1.3.0-alpha.20240710141659",
19
+ "@formily/react": "2.3.0",
20
+ "@formily/shared": "2.3.0",
21
+ "lodash": "4.17.21",
22
+ "ahooks": "3.7.8",
23
+ "@formily/antd-v5": "1.1.9"
24
+ };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export * from './server';
10
+ export { default } from './server';
package/dist/index.js ADDED
@@ -0,0 +1,48 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __create = Object.create;
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __export = (target, all) => {
17
+ for (var name in all)
18
+ __defProp(target, name, { get: all[name], enumerable: true });
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
29
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
30
+ // If the importer is in node compatibility mode or this is not an ESM
31
+ // file that has been converted to a CommonJS file using a Babel-
32
+ // compatible transform (i.e. "__esModule" has not been set), then set
33
+ // "default" to the CommonJS "module.exports" for node compatibility.
34
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
35
+ mod
36
+ ));
37
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
38
+ var src_exports = {};
39
+ __export(src_exports, {
40
+ default: () => import_server.default
41
+ });
42
+ module.exports = __toCommonJS(src_exports);
43
+ __reExport(src_exports, require("./server"), module.exports);
44
+ var import_server = __toESM(require("./server"));
45
+ // Annotate the CommonJS export names for ESM import in node:
46
+ 0 && (module.exports = {
47
+ ...require("./server")
48
+ });
@@ -0,0 +1,32 @@
1
+ {
2
+ "Mobile Client-side": "Mobile Client-side",
3
+ "Interface Configuration": "Interface Configuration",
4
+ "App Configuration": "App Configuration",
5
+ "Enable TabBar": "Enable TabBar",
6
+ "Untitled": "Untitled",
7
+ "Edit info": "Edit info",
8
+ "Title": "Title",
9
+ "Display back button": "Display back button",
10
+ "Delete menu": "Delete menu",
11
+ "Edit menu info": "Edit menu info",
12
+ "Menu": "Menu",
13
+ "Menu name": "Menu name",
14
+ "Icon": "Icon",
15
+ "Delete menu item?": "Delete menu item?",
16
+ "Add menu item": "Add menu item",
17
+ "Page template": "Page template",
18
+ "Template mode": "Template mode",
19
+ "Enable Header": "Enable Header",
20
+ "Enable Tabs": "Enable Tabs",
21
+ "Delete tab item?": "Delete tab item?",
22
+ "Add tab": "Add tab",
23
+ "App level Configuration": "App level Configuration",
24
+ "Menu configuration": "Menu configuration",
25
+ "Page configuration": "Page configuration",
26
+ "Settings": "Settings",
27
+ "Delete settings block": "Delete settings block",
28
+ "Delete menu block": "Delete menu block",
29
+ "Mobile client access address": "Mobile client access address",
30
+ "The full address is": "The full address is",
31
+ "Preview": "Preview"
32
+ }
@@ -0,0 +1,32 @@
1
+ {
2
+ "Mobile Client-side": "모바일 클라이언트",
3
+ "Interface Configuration": "인터페이스 구성",
4
+ "App Configuration": "앱 구성",
5
+ "Enable TabBar": "탭바 활성화",
6
+ "Untitled": "제목 없음",
7
+ "Edit info": "정보 편집",
8
+ "Title": "제목",
9
+ "Display back button": "뒤로 가기 버튼 표시",
10
+ "Delete menu": "메뉴 삭제",
11
+ "Edit menu info": "메뉴 정보 편집",
12
+ "Menu": "메뉴",
13
+ "Menu name": "메뉴 이름",
14
+ "Icon": "아이콘",
15
+ "Delete menu item?": "메뉴 항목 삭제?",
16
+ "Add menu item": "메뉴 항목 추가",
17
+ "Page template": "페이지 템플릿",
18
+ "Template mode": "템플릿 모드",
19
+ "Enable Header": "헤더 활성화",
20
+ "Enable Tabs": "탭 활성화",
21
+ "Delete tab item?": "탭 항목 삭제?",
22
+ "Add tab": "탭 추가",
23
+ "App level Configuration": "앱 수준 구성",
24
+ "Menu configuration": "메뉴 구성",
25
+ "Page configuration": "페이지 구성",
26
+ "Settings": "설정",
27
+ "Delete settings block": "설정 블록 삭제",
28
+ "Delete menu block": "메뉴 블록 삭제",
29
+ "Mobile client access address": "모바일 클라이언트 접근 주소",
30
+ "The full address is": "전체 주소는",
31
+ "Preview": "미리보기"
32
+ }