@nocobase/client 2.0.0-alpha.59 → 2.0.0-alpha.60
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/collection-manager/interfaces/color.d.ts +0 -1
- package/es/flow/FlowPage.d.ts +1 -1
- package/es/flow/getViewDiffAndUpdateHidden.d.ts +1 -0
- package/es/flow/models/actions/AddChildActionModel.d.ts +1 -0
- package/es/flow/models/actions/ExpandCollapseActionModel.d.ts +2 -0
- package/es/flow/models/actions/JSActionModel.d.ts +13 -0
- package/es/flow/models/actions/index.d.ts +1 -0
- package/es/flow/models/base/ActionModel.d.ts +9 -2
- package/es/flow/models/base/CollectionBlockModel.d.ts +10 -25
- package/es/flow/models/base/PageModel/PageModel.d.ts +1 -0
- package/es/flow/models/blocks/filter-form/FilterFormItemModel.d.ts +3 -0
- package/es/flow/models/blocks/filter-form/FilterFormSubmitActionModel.d.ts +1 -1
- package/es/flow/models/blocks/form/CreateFormModel.d.ts +1 -0
- package/es/flow/models/blocks/form/EditFormModel.d.ts +1 -0
- package/es/flow/models/blocks/form/FormBlockModel.d.ts +9 -1
- package/es/flow/models/blocks/form/submitHandler.d.ts +9 -0
- package/es/flow/models/blocks/js-block/JSBlock.d.ts +1 -0
- package/es/flow/models/blocks/table/TableColumnModel.d.ts +1 -0
- package/es/flow/models/blocks/utils/transformChildrenToJS.d.ts +5 -1
- package/es/flow/models/fields/AssociationFieldModel/RecordSelectFieldModel.d.ts +0 -2
- package/es/flow/models/fields/AssociationFieldModel/recordSelectShared.d.ts +2 -0
- package/es/flow/models/fields/JSItemModel.d.ts +0 -1
- package/es/flow/resolveViewParamsToViewList.d.ts +4 -2
- package/es/hooks/useFullscreenOverlay.d.ts +20 -0
- package/es/index.mjs +5305 -4639
- package/lib/index-C3fHjsMw-CiyrLQdu.js +2237 -0
- package/lib/index.js +164 -161
- package/lib/locale/en-US.json +2 -0
- package/lib/locale/zh-CN.json +4 -1
- package/package.json +6 -6
- package/lib/index-C3fHjsMw-DzdIO9mJ.js +0 -2234
package/es/flow/FlowPage.d.ts
CHANGED
|
@@ -15,6 +15,6 @@ type FlowPageProps = {
|
|
|
15
15
|
onModelLoaded?: (uid: string, model: FlowModel) => void;
|
|
16
16
|
defaultTabTitle?: string;
|
|
17
17
|
};
|
|
18
|
-
export declare const FlowPage: (props: FlowPageProps & Record<string, unknown>) => React.JSX.Element
|
|
18
|
+
export declare const FlowPage: React.MemoExoticComponent<(props: FlowPageProps & Record<string, unknown>) => React.JSX.Element>;
|
|
19
19
|
export declare const RemoteFlowModelRenderer: (props: any) => React.JSX.Element;
|
|
20
20
|
export {};
|
|
@@ -7,8 +7,10 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import { ActionModel } from '../base';
|
|
10
|
+
import { ButtonProps } from 'antd';
|
|
10
11
|
export declare class ExpandCollapseActionModel extends ActionModel {
|
|
11
12
|
expandFlag: boolean;
|
|
13
|
+
defaultProps: ButtonProps;
|
|
12
14
|
static scene: import("../base").ActionSceneType;
|
|
13
15
|
setTitle(title: any): void;
|
|
14
16
|
setExpandFlag(flag: any): void;
|
|
@@ -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 type { ButtonProps } from 'antd/es/button';
|
|
10
|
+
import { ActionModel } from '../base';
|
|
11
|
+
export declare class JSActionModel extends ActionModel {
|
|
12
|
+
defaultProps: ButtonProps;
|
|
13
|
+
}
|
|
@@ -11,6 +11,7 @@ export * from './BulkDeleteActionModel';
|
|
|
11
11
|
export * from './DeleteActionModel';
|
|
12
12
|
export * from './EditActionModel';
|
|
13
13
|
export * from './FilterActionModel';
|
|
14
|
+
export * from './JSActionModel';
|
|
14
15
|
export * from './JSCollectionActionModel';
|
|
15
16
|
export * from './JSRecordActionModel';
|
|
16
17
|
export * from './PopupCollectionActionModel';
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import { DefaultStructure, FlowModel } from '@nocobase/flow-engine';
|
|
10
10
|
import type { ButtonProps } from 'antd/es/button';
|
|
11
11
|
import React from 'react';
|
|
12
|
+
export declare function ActionWithoutPermission(props: any): React.JSX.Element;
|
|
12
13
|
export type ActionSceneType = 'collection' | 'record' | ActionSceneType[];
|
|
13
14
|
export declare const ActionSceneEnum: {
|
|
14
15
|
collection: ActionSceneType;
|
|
@@ -17,9 +18,14 @@ export declare const ActionSceneEnum: {
|
|
|
17
18
|
both: ActionSceneType;
|
|
18
19
|
};
|
|
19
20
|
export declare class ActionModel<T extends DefaultStructure = DefaultStructure> extends FlowModel<T> {
|
|
20
|
-
props: ButtonProps
|
|
21
|
+
props: ButtonProps & {
|
|
22
|
+
tooltip?: string;
|
|
23
|
+
};
|
|
21
24
|
scene: ActionSceneType;
|
|
22
|
-
defaultProps: ButtonProps
|
|
25
|
+
defaultProps: ButtonProps & {
|
|
26
|
+
tooltip?: string;
|
|
27
|
+
};
|
|
28
|
+
enableEditTooltip: boolean;
|
|
23
29
|
enableEditTitle: boolean;
|
|
24
30
|
enableEditIcon: boolean;
|
|
25
31
|
enableEditType: boolean;
|
|
@@ -33,6 +39,7 @@ export declare class ActionModel<T extends DefaultStructure = DefaultStructure>
|
|
|
33
39
|
onClick(event: any): void;
|
|
34
40
|
getTitle(): string;
|
|
35
41
|
getIcon(): React.ReactNode;
|
|
42
|
+
renderButton(): React.JSX.Element;
|
|
36
43
|
render(): React.JSX.Element;
|
|
37
44
|
renderHiddenInConfig(): React.ReactNode | undefined;
|
|
38
45
|
}
|
|
@@ -18,6 +18,8 @@ export interface ResourceSettingsInitParams {
|
|
|
18
18
|
export declare class CollectionBlockModel<T = DefaultStructure> extends DataBlockModel<T> {
|
|
19
19
|
isManualRefresh: boolean;
|
|
20
20
|
collectionRequired: boolean;
|
|
21
|
+
private previousBeforeRenderHash;
|
|
22
|
+
protected onMount(): void;
|
|
21
23
|
onActive(): void;
|
|
22
24
|
/**
|
|
23
25
|
* 子菜单过滤函数
|
|
@@ -45,38 +47,20 @@ export declare class CollectionBlockModel<T = DefaultStructure> extends DataBloc
|
|
|
45
47
|
}[] | ({
|
|
46
48
|
key: string;
|
|
47
49
|
label: string;
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
useModel: string;
|
|
52
|
-
createModelOptions: any;
|
|
53
|
-
}[];
|
|
50
|
+
useModel: string;
|
|
51
|
+
createModelOptions: any;
|
|
52
|
+
children?: undefined;
|
|
54
53
|
} | {
|
|
55
54
|
key: string;
|
|
56
55
|
label: string;
|
|
57
|
-
children: {
|
|
58
|
-
key: string;
|
|
59
|
-
label: any;
|
|
60
|
-
searchable: boolean;
|
|
61
|
-
searchPlaceholder: string;
|
|
62
|
-
children: (ctx: any) => {
|
|
63
|
-
key: string;
|
|
64
|
-
label: any;
|
|
65
|
-
useModel: string;
|
|
66
|
-
createModelOptions: any;
|
|
67
|
-
}[];
|
|
68
|
-
}[] | {
|
|
56
|
+
children: () => {
|
|
69
57
|
key: string;
|
|
70
|
-
label:
|
|
58
|
+
label: string;
|
|
71
59
|
useModel: string;
|
|
72
60
|
createModelOptions: any;
|
|
73
61
|
}[];
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
label: string;
|
|
77
|
-
useModel: string;
|
|
78
|
-
createModelOptions: any;
|
|
79
|
-
children?: undefined;
|
|
62
|
+
useModel?: undefined;
|
|
63
|
+
createModelOptions?: undefined;
|
|
80
64
|
} | {
|
|
81
65
|
key: string;
|
|
82
66
|
label: string;
|
|
@@ -126,6 +110,7 @@ export declare class CollectionBlockModel<T = DefaultStructure> extends DataBloc
|
|
|
126
110
|
getResourceSettingsInitParams(): ResourceSettingsInitParams;
|
|
127
111
|
onInit(options: any): void;
|
|
128
112
|
createResource(ctx: any, params: any): SingleRecordResource | MultiRecordResource;
|
|
113
|
+
refresh(): Promise<void>;
|
|
129
114
|
protected defaultBlockTitle(): string;
|
|
130
115
|
addAppends(fieldPath: string, refresh?: boolean): void;
|
|
131
116
|
}
|
|
@@ -28,6 +28,7 @@ export declare class PageModel extends FlowModel<PageModelStructure> {
|
|
|
28
28
|
label: React.JSX.Element;
|
|
29
29
|
children: any;
|
|
30
30
|
}[];
|
|
31
|
+
getFirstTab(): BasePageTabModel;
|
|
31
32
|
renderFirstTab(): any;
|
|
32
33
|
handleDragEnd(event: DragEndEvent): Promise<void>;
|
|
33
34
|
renderTabs(): React.JSX.Element;
|
|
@@ -62,10 +62,12 @@ export declare class FilterFormItemModel extends FilterableItemModel<{
|
|
|
62
62
|
disabled: boolean;
|
|
63
63
|
}[];
|
|
64
64
|
operator: string;
|
|
65
|
+
mounted: boolean;
|
|
65
66
|
private debouncedDoFilter;
|
|
66
67
|
get defaultTargetUid(): string;
|
|
67
68
|
private getCurrentOperatorMeta;
|
|
68
69
|
onInit(options: any): void;
|
|
70
|
+
onMount(): void;
|
|
69
71
|
onUnmount(): void;
|
|
70
72
|
doFilter(): void;
|
|
71
73
|
doReset(): void;
|
|
@@ -74,6 +76,7 @@ export declare class FilterFormItemModel extends FilterableItemModel<{
|
|
|
74
76
|
* @returns
|
|
75
77
|
*/
|
|
76
78
|
getFilterValue(): any;
|
|
79
|
+
getDefaultValue(): any;
|
|
77
80
|
/**
|
|
78
81
|
* 处理回车事件
|
|
79
82
|
* 当用户在输入框中按下回车键时触发筛选
|
|
@@ -10,6 +10,6 @@ import type { ButtonProps } from 'antd/es/button';
|
|
|
10
10
|
import { FilterFormActionModel } from './FilterFormActionModel';
|
|
11
11
|
export declare class FilterFormSubmitActionModel extends FilterFormActionModel {
|
|
12
12
|
defaultProps: ButtonProps;
|
|
13
|
-
|
|
13
|
+
onInit(options: any): void;
|
|
14
14
|
onUnmount(): void;
|
|
15
15
|
}
|
|
@@ -15,5 +15,6 @@ export declare class CreateFormModel extends FormBlockModel {
|
|
|
15
15
|
private actionExtraToolbarItems;
|
|
16
16
|
createResource(ctx: any, params: any): SingleRecordResource<unknown>;
|
|
17
17
|
getAclActionName(): string;
|
|
18
|
+
submit(params?: any): Promise<void>;
|
|
18
19
|
renderComponent(): React.JSX.Element;
|
|
19
20
|
}
|
|
@@ -32,10 +32,18 @@ export declare class FormBlockModel<T extends DefaultCollectionBlockModelStructu
|
|
|
32
32
|
renderConfigureActions(): React.JSX.Element;
|
|
33
33
|
setFieldsValue(values: any): void;
|
|
34
34
|
setFieldValue(fieldName: string, value: any): void;
|
|
35
|
+
onDispatchEventStart(eventName: string, options?: any, inputArgs?: Record<string, any>): Promise<void>;
|
|
36
|
+
getStepParams(flowKey: string, stepKey: string): any | undefined;
|
|
37
|
+
getStepParams(flowKey: string): Record<string, any> | undefined;
|
|
38
|
+
getStepParams(): Record<string, any>;
|
|
39
|
+
setStepParams(flowKey: string, stepKey: string, params: any): void;
|
|
40
|
+
setStepParams(flowKey: string, stepParams: Record<string, any>): void;
|
|
41
|
+
setStepParams(allParams: Record<string, any>): void;
|
|
42
|
+
saveStepParams(): Promise<any>;
|
|
35
43
|
protected createFormValuesMetaFactory(): PropertyMetaFactory;
|
|
36
44
|
useHooksBeforeRender(): void;
|
|
37
45
|
onInit(options: any): void;
|
|
38
|
-
onMount(): void;
|
|
46
|
+
protected onMount(): void;
|
|
39
47
|
getCurrentRecord(): {};
|
|
40
48
|
renderComponent(): void;
|
|
41
49
|
}
|
|
@@ -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 declare function submitHandler(ctx: any, params: any): Promise<void>;
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import { DisplayItemModel, FlowModelContext, ModelRenderMode } from '@nocobase/flow-engine';
|
|
10
10
|
import { TableColumnProps } from 'antd';
|
|
11
11
|
import React from 'react';
|
|
12
|
+
export declare function FieldDeletePlaceholder(props: any): React.JSX.Element;
|
|
12
13
|
export declare const CustomWidth: ({ setOpen, t, handleChange, defaultValue }: {
|
|
13
14
|
setOpen: any;
|
|
14
15
|
t: any;
|
|
@@ -33,6 +33,10 @@ export interface JSFieldMenuChildrenOptions {
|
|
|
33
33
|
fieldUseModel: string;
|
|
34
34
|
refreshTargets: string[];
|
|
35
35
|
associationPathName?: string;
|
|
36
|
-
|
|
36
|
+
/**
|
|
37
|
+
* 仅在需要“关系字段”入口时传入(例如 Table / Details 区块);
|
|
38
|
+
* 表单的 JS field 菜单默认不展示关系字段。
|
|
39
|
+
*/
|
|
40
|
+
associationProvider?: (ctx: FlowModelContext) => SubModelItem[] | Promise<SubModelItem[]>;
|
|
37
41
|
}
|
|
38
42
|
export declare function buildJSFieldMenuChildren(ctx: FlowModelContext, opts: JSFieldMenuChildrenOptions): Promise<SubModelItem[]>;
|
|
@@ -9,12 +9,10 @@
|
|
|
9
9
|
import { CollectionField, MultiRecordResource } from '@nocobase/flow-engine';
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { AssociationFieldModel } from './AssociationFieldModel';
|
|
12
|
-
import { type LazySelectProps } from './recordSelectShared';
|
|
13
12
|
export declare function CreateContent({ model, toOne }: {
|
|
14
13
|
model: any;
|
|
15
14
|
toOne?: boolean;
|
|
16
15
|
}): React.JSX.Element;
|
|
17
|
-
export declare function LazySelect(props: Readonly<LazySelectProps>): React.JSX.Element;
|
|
18
16
|
export declare class RecordSelectFieldModel extends AssociationFieldModel {
|
|
19
17
|
resource: MultiRecordResource;
|
|
20
18
|
get collectionField(): CollectionField;
|
|
@@ -31,6 +31,8 @@ export interface LazySelectProps extends Omit<SelectProps<any>, 'mode' | 'option
|
|
|
31
31
|
onModalAddClick?: (e: any) => void;
|
|
32
32
|
onDropdownAddClick?: (e: any) => void;
|
|
33
33
|
searchText?: string;
|
|
34
|
+
allowCreate?: boolean;
|
|
35
|
+
allowEdit?: boolean;
|
|
34
36
|
}
|
|
35
37
|
export interface LabelByFieldProps {
|
|
36
38
|
option: AssociationOption;
|
|
@@ -15,7 +15,6 @@ import { CommonItemModel } from '../base/CommonItemModel';
|
|
|
15
15
|
*/
|
|
16
16
|
export declare class JSItemModel extends CommonItemModel {
|
|
17
17
|
private _offResourceRefresh?;
|
|
18
|
-
private _lastPage?;
|
|
19
18
|
private _mountedOnce;
|
|
20
19
|
getInputArgs(): {};
|
|
21
20
|
render(): React.JSX.Element;
|
|
@@ -9,10 +9,12 @@
|
|
|
9
9
|
import { FlowEngine, FlowModel, ViewParam } from '@nocobase/flow-engine';
|
|
10
10
|
export interface ViewItem {
|
|
11
11
|
params: ViewParam;
|
|
12
|
-
|
|
12
|
+
modelUid?: string;
|
|
13
|
+
model?: FlowModel;
|
|
13
14
|
hidden: {
|
|
14
15
|
value: boolean;
|
|
15
16
|
};
|
|
16
17
|
index: number;
|
|
17
18
|
}
|
|
18
|
-
export declare function resolveViewParamsToViewList(flowEngine: FlowEngine, viewParams: ViewParam[], routeModel: FlowModel):
|
|
19
|
+
export declare function resolveViewParamsToViewList(flowEngine: FlowEngine, viewParams: ViewParam[], routeModel: FlowModel): ViewItem[];
|
|
20
|
+
export declare function updateViewListHidden(viewItems: ViewItem[]): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 React from 'react';
|
|
10
|
+
type UseFullscreenOverlayResult = {
|
|
11
|
+
isFullscreen: boolean;
|
|
12
|
+
toggleFullscreen: () => void;
|
|
13
|
+
enterFullscreen: () => void;
|
|
14
|
+
exitFullscreen: () => void;
|
|
15
|
+
placeholderRef: React.RefCallback<HTMLDivElement>;
|
|
16
|
+
placeholderStyle: React.CSSProperties;
|
|
17
|
+
container: HTMLElement | null;
|
|
18
|
+
};
|
|
19
|
+
export declare function useFullscreenOverlay(): UseFullscreenOverlayResult;
|
|
20
|
+
export {};
|