@nocobase/client 2.0.22 → 2.1.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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 { FlowModel } from '@nocobase/flow-engine';
10
+ import React from 'react';
11
+ export declare class AdminSettingsLayoutModel extends FlowModel {
12
+ render(): React.JSX.Element;
13
+ }
@@ -8,4 +8,5 @@
8
8
  */
9
9
  import React from 'react';
10
10
  export declare const SettingsCenterContext: React.Context<any>;
11
- export declare const AdminSettingsLayout: () => React.JSX.Element;
11
+ export declare const InternalAdminSettingsLayout: () => React.JSX.Element;
12
+ export declare const AdminSettingsLayout: (props: any) => React.JSX.Element;
package/es/pm/index.d.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import { Plugin } from '../application/Plugin';
10
+ export * from './AdminSettingsLayoutModel';
10
11
  export * from './PluginManager';
11
12
  export * from './PluginManagerLink';
12
13
  export * from './PluginSetting';
@@ -0,0 +1,27 @@
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 { FlowModel } from '@nocobase/flow-engine';
10
+ import React from 'react';
11
+ import { type RoutePageMeta } from './AdminLayoutRouteCoordinator';
12
+ export declare class AdminLayoutModel extends FlowModel {
13
+ private routeCoordinator?;
14
+ private routeDisposer?;
15
+ private activePageUid;
16
+ private layoutContentElement;
17
+ private routePageMetaMap;
18
+ private getCoordinator;
19
+ private getCurrentRouteByActivePage;
20
+ registerRoutePage(pageUid: string, meta: RoutePageMeta): FlowModel<import("@nocobase/flow-engine").DefaultStructure>;
21
+ updateRoutePage(pageUid: string, meta: Partial<RoutePageMeta>): void;
22
+ unregisterRoutePage(pageUid: string): void;
23
+ setLayoutContentElement(element: HTMLElement | null): void;
24
+ protected onMount(): void;
25
+ protected onUnmount(): void;
26
+ render(): React.JSX.Element;
27
+ }
@@ -0,0 +1,50 @@
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 { FlowEngine, FlowModel, type ViewParam } from '@nocobase/flow-engine';
10
+ export interface RoutePageMeta {
11
+ active: boolean;
12
+ currentRoute?: Record<string, any>;
13
+ refreshDesktopRoutes?: () => void;
14
+ layoutContentElement?: HTMLElement | null;
15
+ }
16
+ interface RouteLike {
17
+ params?: {
18
+ name?: string;
19
+ };
20
+ pathname?: string;
21
+ }
22
+ /**
23
+ * 管理 admin 场景下每个 page 的 v2 视图栈编排。
24
+ * 该协调器只负责状态机和开关视图,不直接绑定 React 生命周期。
25
+ */
26
+ export declare class AdminLayoutRouteCoordinator {
27
+ private readonly flowEngine;
28
+ private readonly runtimes;
29
+ private layoutContentElement;
30
+ constructor(flowEngine: FlowEngine);
31
+ setLayoutContentElement(element: HTMLElement | null): void;
32
+ registerPage(pageUid: string, meta: RoutePageMeta): FlowModel<import("@nocobase/flow-engine").DefaultStructure>;
33
+ syncPageMeta(pageUid: string, meta: Partial<RoutePageMeta>): void;
34
+ unregisterPage(pageUid: string): void;
35
+ syncRoute(routeLike: RouteLike): void;
36
+ cleanupPage(pageUid: string): void;
37
+ destroy(): void;
38
+ private syncRuntimeWithPathname;
39
+ private shouldStepNavigate;
40
+ private stepNavigate;
41
+ private handleOpenViews;
42
+ private openViews;
43
+ private ensureRouteModelContext;
44
+ private getOrCreateRouteModel;
45
+ }
46
+ /**
47
+ * 将 pathname 解析结果和 pageUid 对齐,便于测试里复用。
48
+ */
49
+ export declare function toViewStack(pathname: string): ViewParam[];
50
+ export {};