@nocobase/client-v2 2.1.17 → 2.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/flow/admin-shell/BaseLayoutModel.d.ts +6 -0
- package/es/flow/admin-shell/BaseLayoutRouteCoordinator.d.ts +7 -0
- package/es/flow/routeTransientInputArgs.d.ts +14 -0
- package/es/index.d.ts +1 -0
- package/es/index.mjs +93 -93
- package/es/utils/markdownSanitize.d.ts +11 -0
- package/lib/index.js +114 -114
- package/package.json +7 -7
- package/src/flow/FlowPage.tsx +29 -2
- package/src/flow/__tests__/FlowPage.test.tsx +152 -25
- package/src/flow/actions/__tests__/dataScopeFilter.test.ts +62 -0
- package/src/flow/actions/__tests__/openView.defineProps.route.test.tsx +80 -20
- package/src/flow/actions/dataScopeFilter.ts +10 -1
- package/src/flow/actions/openView.tsx +21 -1
- package/src/flow/admin-shell/BaseLayoutModel.tsx +111 -0
- package/src/flow/admin-shell/BaseLayoutRouteCoordinator.ts +184 -42
- package/src/flow/admin-shell/__tests__/AdminLayoutRouteCoordinator.test.ts +1016 -119
- package/src/flow/admin-shell/admin-layout/AdminLayoutComponent.tsx +29 -2
- package/src/flow/admin-shell/admin-layout/__tests__/AdminLayoutModel.test.tsx +359 -2
- package/src/flow/common/Markdown/Display.tsx +14 -3
- package/src/flow/common/Markdown/Edit.tsx +19 -7
- package/src/flow/internal/components/Markdown/util.ts +2 -1
- package/src/flow/models/fields/TextareaFieldModel.tsx +42 -19
- package/src/flow/models/fields/__tests__/TextareaFieldModel.test.tsx +32 -1
- package/src/flow/routeTransientInputArgs.ts +27 -0
- package/src/index.ts +1 -0
- package/src/utils/markdownSanitize.ts +88 -0
|
@@ -41,6 +41,7 @@ export interface LayoutRouteLike {
|
|
|
41
41
|
id?: string;
|
|
42
42
|
name?: string;
|
|
43
43
|
pathname?: string;
|
|
44
|
+
state?: unknown;
|
|
44
45
|
params?: Record<string, string | undefined>;
|
|
45
46
|
layoutRouteName?: string;
|
|
46
47
|
layoutBasePathname?: string;
|
|
@@ -56,6 +57,7 @@ export declare class BaseLayoutModel<TStructure extends BaseLayoutStructure = Ba
|
|
|
56
57
|
currentLayoutRoute: LayoutRouteMatch | null;
|
|
57
58
|
protected routeCoordinator?: BaseLayoutRouteCoordinator;
|
|
58
59
|
private activePageUid;
|
|
60
|
+
private currentRouteState?;
|
|
59
61
|
private layoutContentElement;
|
|
60
62
|
private readonly routePageMetaMap;
|
|
61
63
|
private contextBindingsActive;
|
|
@@ -82,6 +84,10 @@ export declare class BaseLayoutModel<TStructure extends BaseLayoutStructure = Ba
|
|
|
82
84
|
private teardownRuntime;
|
|
83
85
|
private getCurrentRouteByActivePage;
|
|
84
86
|
private getCurrentCoordinatorRouteLike;
|
|
87
|
+
private restoreCurrentLayoutRouteFromRouterContext;
|
|
88
|
+
private shouldIgnoreStaleLayoutRouteCleanup;
|
|
89
|
+
private getRouterContextRouteLike;
|
|
90
|
+
private isRouteLikeOwnedByCurrentLayout;
|
|
85
91
|
}
|
|
86
92
|
/**
|
|
87
93
|
* 按固定 UID 获取或创建 Layout host model。
|
|
@@ -25,6 +25,7 @@ interface RouteLike {
|
|
|
25
25
|
name?: string;
|
|
26
26
|
};
|
|
27
27
|
pathname?: string;
|
|
28
|
+
state?: unknown;
|
|
28
29
|
pageUid?: string;
|
|
29
30
|
layoutBasePathname?: string;
|
|
30
31
|
layoutRoute?: {
|
|
@@ -46,6 +47,7 @@ export declare class BaseLayoutRouteCoordinator {
|
|
|
46
47
|
private basePathname;
|
|
47
48
|
private readonly runtimes;
|
|
48
49
|
private layoutContentElement;
|
|
50
|
+
private lastNonNullLayoutContentElement;
|
|
49
51
|
constructor(flowEngine: FlowEngine, options?: BaseLayoutRouteCoordinatorOptions);
|
|
50
52
|
setLayoutContentElement(element: HTMLElement | null): void;
|
|
51
53
|
registerPage(pageUid: string, meta: RoutePageMeta): RouteModel<import("@nocobase/flow-engine").DefaultStructure>;
|
|
@@ -62,6 +64,11 @@ export declare class BaseLayoutRouteCoordinator {
|
|
|
62
64
|
private shouldStepNavigate;
|
|
63
65
|
private scheduleInitialDeepLinkReplay;
|
|
64
66
|
private stepNavigate;
|
|
67
|
+
private replayActiveRuntimeViewsAfterLayoutContentElementChange;
|
|
68
|
+
private invalidatePendingRuntimeViewOpens;
|
|
69
|
+
private resetRuntimeViewStateForLayoutContentElementChange;
|
|
70
|
+
private markPendingOpenViews;
|
|
71
|
+
private clearPendingOpenViews;
|
|
65
72
|
private handleOpenViews;
|
|
66
73
|
private openViews;
|
|
67
74
|
private ensureRouteModelContext;
|
|
@@ -0,0 +1,14 @@
|
|
|
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 ROUTE_TRANSIENT_INPUT_ARGS_KEY = "__nocobaseOpenViewInputArgs";
|
|
10
|
+
export type RouteTransientInputArgsState = {
|
|
11
|
+
[ROUTE_TRANSIENT_INPUT_ARGS_KEY]?: Record<string, Record<string, unknown>>;
|
|
12
|
+
usr?: RouteTransientInputArgsState;
|
|
13
|
+
};
|
|
14
|
+
export declare const getRouteTransientInputArgs: (state: unknown, viewUid?: string) => Record<string, unknown>;
|
package/es/index.d.ts
CHANGED
|
@@ -37,5 +37,6 @@ export * from './collection-manager/interfaces';
|
|
|
37
37
|
export * from './collection-manager/template-fields';
|
|
38
38
|
export * from './data-source';
|
|
39
39
|
export * from './flow';
|
|
40
|
+
export * from './utils/markdownSanitize';
|
|
40
41
|
export { DEFAULT_DATA_SOURCE_KEY, isTitleField, isTitleFieldInterface } from './flow-compat';
|
|
41
42
|
export { default as AntdAppProvider } from './theme/AntdAppProvider';
|