@nocobase/client-v2 2.2.0-alpha.3 → 2.2.0-alpha.5
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/BaseApplication.d.ts +2 -0
- package/es/RouteRepository.d.ts +8 -0
- package/es/RouterManager.d.ts +15 -0
- package/es/authRedirect.d.ts +1 -0
- package/es/components/form/TypedVariableInput.d.ts +9 -1
- package/es/components/form/filter/CollectionFilter.d.ts +2 -0
- package/es/components/form/filter/CollectionFilterPanel.d.ts +2 -0
- package/es/components/form/filter/useFilterActionProps.d.ts +2 -0
- package/es/entry-actions/EntryActionManager.d.ts +24 -0
- package/es/entry-actions/index.d.ts +9 -0
- package/es/flow/admin-shell/BaseLayoutModel.d.ts +6 -0
- package/es/flow/admin-shell/BaseLayoutRouteCoordinator.d.ts +7 -0
- package/es/flow/admin-shell/admin-layout/AppListRender.d.ts +2 -1
- package/es/flow/admin-shell/admin-layout/AppSwitcherActionPanelModel.d.ts +24 -0
- package/es/flow/admin-shell/admin-layout/index.d.ts +1 -0
- package/es/flow/admin-shell/admin-layout/useApplications.d.ts +7 -2
- package/es/flow/models/base/ActionModelCore.d.ts +2 -0
- package/es/flow/routeTransientInputArgs.d.ts +14 -0
- package/es/index.d.ts +6 -0
- package/es/index.mjs +229 -143
- package/es/utils/getRouteRuntimeVersion.d.ts +23 -0
- package/es/utils/index.d.ts +1 -0
- package/es/utils/markdownSanitize.d.ts +11 -0
- package/lib/index.js +219 -133
- package/package.json +7 -7
- package/src/BaseApplication.tsx +2 -0
- package/src/RouteRepository.ts +25 -0
- package/src/RouterManager.tsx +142 -1
- package/src/__tests__/RouteRepository.test.ts +23 -0
- package/src/__tests__/RouterManager.test.ts +125 -0
- package/src/__tests__/authRedirect.test.ts +17 -0
- package/src/__tests__/getRouteRuntimeVersion.test.ts +68 -0
- package/src/authRedirect.ts +38 -0
- package/src/components/form/JsonTextArea.tsx +4 -0
- package/src/components/form/TypedVariableInput.tsx +58 -34
- package/src/components/form/__tests__/TypedVariableInput.test.tsx +52 -0
- package/src/components/form/filter/CollectionFilter.tsx +4 -0
- package/src/components/form/filter/CollectionFilterPanel.tsx +4 -0
- package/src/components/form/filter/__tests__/useFilterActionProps.test.tsx +95 -0
- package/src/components/form/filter/useFilterActionProps.ts +37 -6
- package/src/entry-actions/EntryActionManager.ts +76 -0
- package/src/entry-actions/index.ts +10 -0
- package/src/flow/FlowPage.tsx +29 -2
- package/src/flow/__tests__/FlowPage.test.tsx +152 -25
- package/src/flow/__tests__/FlowRoute.test.tsx +547 -2
- 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/dateTimeFormat.tsx +2 -2
- package/src/flow/actions/openView.tsx +21 -1
- package/src/flow/admin-shell/BaseLayoutModel.tsx +124 -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 +41 -4
- package/src/flow/admin-shell/admin-layout/AdminLayoutEntryGuard.test.tsx +177 -1
- package/src/flow/admin-shell/admin-layout/AdminLayoutEntryGuard.tsx +20 -0
- package/src/flow/admin-shell/admin-layout/AppListRender.tsx +13 -2
- package/src/flow/admin-shell/admin-layout/AppSwitcherActionPanelModel.tsx +289 -0
- package/src/flow/admin-shell/admin-layout/__tests__/AdminLayoutModel.test.tsx +436 -2
- package/src/flow/admin-shell/admin-layout/__tests__/TopbarActionsBar.test.tsx +48 -0
- package/src/flow/admin-shell/admin-layout/index.ts +1 -0
- package/src/flow/admin-shell/admin-layout/useApplications.tsx +81 -12
- package/src/flow/common/Markdown/Display.tsx +14 -3
- package/src/flow/common/Markdown/Edit.tsx +19 -7
- package/src/flow/components/FlowRoute.tsx +128 -16
- package/src/flow/internal/components/Markdown/util.ts +2 -1
- package/src/flow/models/base/ActionModel.tsx +10 -8
- package/src/flow/models/base/ActionModelCore.tsx +5 -0
- package/src/flow/models/blocks/table/TableColumnModel.tsx +6 -2
- package/src/flow/models/blocks/table/__tests__/TableColumnModel.test.tsx +51 -0
- package/src/flow/models/fields/AssociationFieldModel/RecordSelectFieldModel.tsx +45 -13
- package/src/flow/models/fields/TextareaFieldModel.tsx +42 -19
- package/src/flow/models/fields/__tests__/TextareaFieldModel.test.tsx +32 -1
- package/src/flow/models/topbar/TopbarActionModel.tsx +78 -3
- package/src/flow/routeTransientInputArgs.ts +27 -0
- package/src/flow/utils/__tests__/dateTimeFormat.test.ts +42 -0
- package/src/index.ts +6 -0
- package/src/nocobase-buildin-plugin/index.tsx +7 -1
- package/src/utils/getRouteRuntimeVersion.ts +185 -0
- package/src/utils/index.tsx +1 -0
- package/src/utils/markdownSanitize.ts +88 -0
package/es/BaseApplication.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import type { i18n as i18next } from 'i18next';
|
|
|
12
12
|
import React, { ReactElement, ReactNode } from 'react';
|
|
13
13
|
import type { AppListProps } from '@ant-design/pro-layout/es/components/AppsLogoComponents/types';
|
|
14
14
|
import { AIManager } from './ai';
|
|
15
|
+
import { EntryActionManager } from './entry-actions';
|
|
15
16
|
import { SystemSettingsSource } from './flow/system-settings';
|
|
16
17
|
import { LayoutManager } from './layout-manager/LayoutManager';
|
|
17
18
|
import type { PluginClass, PluginManager, PluginType } from './PluginManager';
|
|
@@ -75,6 +76,7 @@ export declare abstract class BaseApplication<TOptions extends BaseApplicationOp
|
|
|
75
76
|
pluginManager: TPluginManager;
|
|
76
77
|
pluginSettingsManager: TPluginSettingsManager;
|
|
77
78
|
layoutManager: LayoutManager<this>;
|
|
79
|
+
entryActionManager: EntryActionManager;
|
|
78
80
|
aiManager: AIManager;
|
|
79
81
|
devDynamicImport?: DevDynamicImport;
|
|
80
82
|
requirejs: RequireJS;
|
package/es/RouteRepository.d.ts
CHANGED
|
@@ -124,6 +124,13 @@ export declare class RouteRepository {
|
|
|
124
124
|
* @returns 匹配到的路由节点
|
|
125
125
|
*/
|
|
126
126
|
getRouteBySchemaUid(schemaUid: string): NocoBaseDesktopRoute | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* 通过路由 id 反查对应路由节点。
|
|
129
|
+
*
|
|
130
|
+
* @param routeId 桌面路由主键
|
|
131
|
+
* @returns 匹配到的路由节点
|
|
132
|
+
*/
|
|
133
|
+
getRouteById(routeId: string | number): NocoBaseDesktopRoute | undefined;
|
|
127
134
|
protected getAPIClient(): APIClient;
|
|
128
135
|
protected getResource(collectionName: string): import("@nocobase/sdk").IResource;
|
|
129
136
|
protected emitChange(layoutUid?: string): void;
|
|
@@ -135,5 +142,6 @@ export declare class RouteRepository {
|
|
|
135
142
|
private nextRefreshRequestId;
|
|
136
143
|
private getRefreshRequestId;
|
|
137
144
|
private findRoute;
|
|
145
|
+
private findRouteById;
|
|
138
146
|
}
|
|
139
147
|
export {};
|
package/es/RouterManager.d.ts
CHANGED
|
@@ -40,9 +40,18 @@ export type RenderComponentType = (Component: ComponentTypeAndString, props?: an
|
|
|
40
40
|
export type RouterComponentType = React.FC<{
|
|
41
41
|
BaseLayout?: ComponentType;
|
|
42
42
|
}>;
|
|
43
|
+
type AdminRouteNavigationTarget = {
|
|
44
|
+
currentPathname?: string;
|
|
45
|
+
targetPathname: unknown;
|
|
46
|
+
basePath?: string;
|
|
47
|
+
adminRoutePath?: string;
|
|
48
|
+
replace?: boolean;
|
|
49
|
+
};
|
|
50
|
+
export declare function shouldOpenAdminRouteInNewWindow(options: AdminRouteNavigationTarget): boolean;
|
|
43
51
|
export declare class RouterManager<TApp extends BaseApplication<any> = BaseApplication<any>> {
|
|
44
52
|
protected routes: Record<string, RouteType>;
|
|
45
53
|
protected options: RouterOptions;
|
|
54
|
+
private routerNavigate?;
|
|
46
55
|
app: TApp;
|
|
47
56
|
router: Router;
|
|
48
57
|
get basename(): string;
|
|
@@ -52,6 +61,11 @@ export declare class RouterManager<TApp extends BaseApplication<any> = BaseAppli
|
|
|
52
61
|
(to: import("react-router").To, opts?: import("@remix-run/router").RouterNavigateOptions): Promise<void>;
|
|
53
62
|
};
|
|
54
63
|
constructor(options: RouterOptions, app: TApp);
|
|
64
|
+
private navigateWithPortalPolicy;
|
|
65
|
+
private shouldOpenAdminRouteInNewWindow;
|
|
66
|
+
private getRuntimeBasePath;
|
|
67
|
+
private getAdminRoutePath;
|
|
68
|
+
private getAdminRouteNavigationHref;
|
|
55
69
|
protected resolveLoadedComponent(moduleOrComponent: ComponentLoaderResult): ComponentTypeAndString | undefined;
|
|
56
70
|
protected createRouteLazyComponent(componentLoader: ComponentLoader): ComponentType;
|
|
57
71
|
/**
|
|
@@ -73,3 +87,4 @@ export declare class RouterManager<TApp extends BaseApplication<any> = BaseAppli
|
|
|
73
87
|
has(name: string): boolean;
|
|
74
88
|
remove(name: string): void;
|
|
75
89
|
}
|
|
90
|
+
export {};
|
package/es/authRedirect.d.ts
CHANGED
|
@@ -31,6 +31,7 @@ export declare function getModernClientPrefix(): string;
|
|
|
31
31
|
export declare function stripModernClientPrefix(publicPath?: string): string;
|
|
32
32
|
export declare function getV2EffectiveBasePath(app: AppLike): string;
|
|
33
33
|
declare function getDefaultV2AdminRedirectPath(app: AppLike): string;
|
|
34
|
+
export declare function normalizeV2RedirectPath(app: AppLike, target?: string | null, fallbackPath?: string): string;
|
|
34
35
|
/**
|
|
35
36
|
* 将当前 v2 页面地址转换为根相对 redirect 路径。
|
|
36
37
|
*
|
|
@@ -33,7 +33,9 @@ export interface TypedVariableInputProps {
|
|
|
33
33
|
* Allowed constant types. The `Constant` switcher entry always exposes a
|
|
34
34
|
* typed submenu (matching v1 `Variable.Input`) so users can see what type
|
|
35
35
|
* the constant is, even when only one type is permitted. Default: all four
|
|
36
|
-
* supported types.
|
|
36
|
+
* supported types. Passing `[]` switches the component into a variable-only
|
|
37
|
+
* mode: constants/null are hidden, the empty state becomes a readonly
|
|
38
|
+
* placeholder, and clearing a selected variable resets to `null`.
|
|
37
39
|
*/
|
|
38
40
|
types?: TypedConstantSpec[];
|
|
39
41
|
/**
|
|
@@ -70,6 +72,12 @@ export interface TypedVariableInputProps {
|
|
|
70
72
|
defaultToFirstConstantTypeWhenUndefined?: boolean;
|
|
71
73
|
/** Variable-token delimiters. Default `['{{', '}}']` — see `VariableInput`. */
|
|
72
74
|
delimiters?: VariableDelimiters;
|
|
75
|
+
/**
|
|
76
|
+
* Hide variable choices from the switcher. In variable-only mode this hides
|
|
77
|
+
* the selector button entirely; in mixed constant/variable mode it keeps the
|
|
78
|
+
* null/constant choices but removes variable entries.
|
|
79
|
+
*/
|
|
80
|
+
hideVariable?: boolean;
|
|
73
81
|
disabled?: boolean;
|
|
74
82
|
placeholder?: string;
|
|
75
83
|
style?: React.CSSProperties;
|
|
@@ -15,6 +15,8 @@ export interface CollectionFilterProps {
|
|
|
15
15
|
collection: Collection | undefined;
|
|
16
16
|
/** Previously compiled filter param used to seed the editable filter group. */
|
|
17
17
|
initialValue?: CompiledFilter;
|
|
18
|
+
/** Default compiled filter used both for initial empty state and Reset. */
|
|
19
|
+
defaultValue?: CompiledFilter;
|
|
18
20
|
/** Called on Submit or Reset with the compiled NocoBase filter param (`undefined` when cleared). */
|
|
19
21
|
onChange: (filter: CompiledFilter) => void;
|
|
20
22
|
/** Translator. Defaults to identity. */
|
|
@@ -18,6 +18,8 @@ export interface CollectionFilterPanelProps {
|
|
|
18
18
|
collection: Collection | undefined;
|
|
19
19
|
/** Previously compiled filter param used to seed the editable filter group. */
|
|
20
20
|
initialValue?: CompiledFilter;
|
|
21
|
+
/** Default compiled filter used both for initial empty state and Reset. */
|
|
22
|
+
defaultValue?: CompiledFilter;
|
|
21
23
|
/** Called when the condition group structure changes or `reset()` is invoked. */
|
|
22
24
|
onChange?: (filter: CompiledFilter) => void;
|
|
23
25
|
/** Translator. Defaults to identity. */
|
|
@@ -46,6 +46,8 @@ export interface UseFilterActionPropsArgs extends UseFilterOptionsArgs {
|
|
|
46
46
|
collection: Collection | undefined;
|
|
47
47
|
/** Previously compiled filter param used to seed the editable filter group. */
|
|
48
48
|
initialValue?: CompiledFilter;
|
|
49
|
+
/** Default compiled filter used both for initial empty state and Reset. */
|
|
50
|
+
defaultValue?: CompiledFilter;
|
|
49
51
|
/**
|
|
50
52
|
* Called when the user submits or resets the filter popover. Receives the compiled filter param (`undefined` when cleared) and which footer button triggered the call. Typical implementation: `(filter, action) => { listRequest.run(filter); if (action === 'submit') closePopover(); }`.
|
|
51
53
|
*/
|
|
@@ -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
|
+
import { type FlowModelContext, type SubModelItem, type SubModelItemsType } from '@nocobase/flow-engine';
|
|
10
|
+
export type EntryActionScope = 'action-panel' | 'app-switcher' | string;
|
|
11
|
+
export type EntryActionProvider = (ctx: FlowModelContext) => SubModelItem[] | Promise<SubModelItem[]>;
|
|
12
|
+
export declare class EntryActionManager {
|
|
13
|
+
private readonly providers;
|
|
14
|
+
revision: number;
|
|
15
|
+
constructor();
|
|
16
|
+
register(name: string, options: {
|
|
17
|
+
scope: EntryActionScope;
|
|
18
|
+
provider: EntryActionProvider;
|
|
19
|
+
sort?: number;
|
|
20
|
+
}): void;
|
|
21
|
+
unregister(name: string): void;
|
|
22
|
+
invalidate(): void;
|
|
23
|
+
getItems(scope: EntryActionScope): SubModelItemsType;
|
|
24
|
+
}
|
|
@@ -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 './EntryActionManager';
|
|
@@ -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;
|
|
@@ -8,4 +8,5 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { AppListProps } from '@ant-design/pro-layout/es/components/AppsLogoComponents/types';
|
|
10
10
|
import React from 'react';
|
|
11
|
-
|
|
11
|
+
import type { AppSwitcherActionPanelModel } from './AppSwitcherActionPanelModel';
|
|
12
|
+
export declare function useAppListRender(appSwitcherModel?: AppSwitcherActionPanelModel): (appList: AppListProps) => React.JSX.Element;
|
|
@@ -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
|
+
import { ActionModel } from '../../models/base';
|
|
10
|
+
import { FlowModel, type SubModelItemsType } from '@nocobase/flow-engine';
|
|
11
|
+
import React from 'react';
|
|
12
|
+
type AppSwitcherActionPanelStructure = {
|
|
13
|
+
subModels: {
|
|
14
|
+
actions?: ActionModel[];
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export declare class AppSwitcherActionPanelModel extends FlowModel<AppSwitcherActionPanelStructure> {
|
|
18
|
+
getConfigureActionsItems(): SubModelItemsType;
|
|
19
|
+
renderConfigureActions(): React.JSX.Element;
|
|
20
|
+
private getRenderableActions;
|
|
21
|
+
hasActions(): boolean;
|
|
22
|
+
renderContent(): React.JSX.Element;
|
|
23
|
+
}
|
|
24
|
+
export {};
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export * from './AdminLayoutComponent';
|
|
10
10
|
export * from './AdminLayoutModel';
|
|
11
|
+
export * from './AppSwitcherActionPanelModel';
|
|
11
12
|
export * from '../BaseLayoutModel';
|
|
12
13
|
export * from '../BaseLayoutRouteCoordinator';
|
|
13
14
|
export * from './AdminLayoutSlotModels';
|
|
@@ -6,8 +6,13 @@
|
|
|
6
6
|
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
|
+
import type { AppListProps } from '@ant-design/pro-layout/es/components/AppsLogoComponents/types';
|
|
9
10
|
import React from 'react';
|
|
10
|
-
|
|
11
|
+
import type { AdminLayoutModel } from './AdminLayoutModel';
|
|
12
|
+
import type { AppSwitcherActionPanelModel } from './AppSwitcherActionPanelModel';
|
|
13
|
+
export declare const APP_SWITCHER_ACTION_PANEL_MODEL_UID: string;
|
|
14
|
+
export declare const useApplications: (adminLayoutModel?: AdminLayoutModel) => {
|
|
11
15
|
Component: React.JSXElementConstructor<any> | React.ExoticComponent<any>;
|
|
12
|
-
appList:
|
|
16
|
+
appList: AppListProps;
|
|
17
|
+
appSwitcherModel: AppSwitcherActionPanelModel;
|
|
13
18
|
};
|
|
@@ -30,6 +30,7 @@ export declare class ActionModel<T extends DefaultStructure = DefaultStructure>
|
|
|
30
30
|
enableEditTooltip: boolean;
|
|
31
31
|
enableEditTitle: boolean;
|
|
32
32
|
enableEditIcon: boolean;
|
|
33
|
+
enableEditIconOnly: boolean;
|
|
33
34
|
enableEditType: boolean;
|
|
34
35
|
enableEditDanger: boolean;
|
|
35
36
|
enableEditColor: boolean;
|
|
@@ -44,6 +45,7 @@ export declare class ActionModel<T extends DefaultStructure = DefaultStructure>
|
|
|
44
45
|
getInputArgs(): Record<string, any>;
|
|
45
46
|
onClick(event: any): void;
|
|
46
47
|
getTitle(): string;
|
|
48
|
+
getTitleFieldDescription(): any;
|
|
47
49
|
getIcon(): React.ReactNode;
|
|
48
50
|
renderButton(): React.JSX.Element;
|
|
49
51
|
render(): React.JSX.Element;
|
|
@@ -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
|
@@ -28,6 +28,8 @@ export * from './layout-manager';
|
|
|
28
28
|
export * from './hooks';
|
|
29
29
|
export { default as languageCodes } from './locale/languageCodes';
|
|
30
30
|
export * from './nocobase-buildin-plugin';
|
|
31
|
+
export { getRouteRuntimeVersion } from './utils/getRouteRuntimeVersion';
|
|
32
|
+
export type { RouteRuntimeVersion } from './utils/getRouteRuntimeVersion';
|
|
31
33
|
export * from './collection-field-interface/CollectionFieldInterface';
|
|
32
34
|
export * from './collection-field-interface/CollectionFieldInterfaceManager';
|
|
33
35
|
export * from './collection-manager/field-configure';
|
|
@@ -36,7 +38,11 @@ export * from './collection-manager/filter-operators';
|
|
|
36
38
|
export * from './collection-manager/interfaces';
|
|
37
39
|
export * from './collection-manager/template-fields';
|
|
38
40
|
export * from './data-source';
|
|
41
|
+
export * from './entry-actions';
|
|
39
42
|
export * from './flow';
|
|
43
|
+
export { CodeEditorExtension } from './flow/components/code-editor/extension';
|
|
44
|
+
export type { CodeEditorExtra, CodeEditorExtraRegistry, EditorRef } from './flow/components/code-editor/types';
|
|
40
45
|
export { DEFAULT_DATA_SOURCE_KEY, IconPicker, isTitleField, isTitleFieldInterface, NocoBaseDesktopRouteType, } from './flow-compat';
|
|
41
46
|
export type { NocoBaseDesktopRoute } from './flow-compat';
|
|
47
|
+
export * from './utils/markdownSanitize';
|
|
42
48
|
export { default as AntdAppProvider } from './theme/AntdAppProvider';
|