@nocobase/client-v2 2.1.11 → 2.1.14
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/actions/afterSuccess.d.ts +8 -1
- package/es/flow/actions/index.d.ts +1 -1
- package/es/flow/models/blocks/form/submitHandler.d.ts +1 -1
- package/es/flow/models/blocks/js-block/JSBlock.d.ts +1 -0
- package/es/flow/models/blocks/table/TableActionsColumnModel.d.ts +1 -0
- package/es/flow/models/blocks/table/TableBlockModel.d.ts +1 -0
- package/es/flow/models/blocks/table/dragSort/dragSortHooks.d.ts +1 -1
- package/es/flow/models/blocks/table/dragSort/dragSortSettings.d.ts +2 -1
- package/es/flow/models/blocks/table/dragSort/dragSortUtils.d.ts +6 -4
- package/es/flow/resolveViewParamsToViewList.d.ts +1 -1
- package/es/index.mjs +137 -89
- package/lib/index.js +163 -115
- package/package.json +7 -7
- package/src/collection-manager/field-configure.ts +1 -1
- package/src/collection-manager/interfaces/id.ts +1 -1
- package/src/collection-manager/interfaces/m2m.tsx +2 -2
- package/src/collection-manager/interfaces/m2o.tsx +2 -2
- package/src/collection-manager/interfaces/nanoid.ts +1 -1
- package/src/collection-manager/interfaces/o2m.tsx +2 -2
- package/src/collection-manager/interfaces/obo.tsx +2 -2
- package/src/collection-manager/interfaces/oho.tsx +2 -2
- package/src/collection-manager/interfaces/properties/index.ts +2 -2
- package/src/collection-manager/interfaces/uuid.ts +1 -1
- package/src/flow/__tests__/getKey.test.ts +7 -0
- package/src/flow/__tests__/resolveViewParamsToViewList.test.ts +34 -0
- package/src/flow/actions/__tests__/afterSuccess.test.ts +73 -0
- package/src/flow/actions/__tests__/openView.defineProps.route.test.tsx +104 -0
- package/src/flow/actions/afterSuccess.tsx +142 -3
- package/src/flow/actions/dateTimeFormat.tsx +2 -2
- package/src/flow/actions/index.ts +1 -1
- package/src/flow/actions/openView.tsx +38 -4
- package/src/flow/admin-shell/BaseLayoutModel.tsx +25 -3
- package/src/flow/admin-shell/BaseLayoutRouteCoordinator.ts +5 -2
- package/src/flow/admin-shell/__tests__/AdminLayoutRouteCoordinator.test.ts +13 -0
- package/src/flow/admin-shell/admin-layout/__tests__/AdminLayoutModel.test.tsx +82 -0
- package/src/flow/getViewDiffAndUpdateHidden.tsx +1 -0
- package/src/flow/models/base/ActionModelCore.tsx +6 -4
- package/src/flow/models/base/__tests__/ActionModelCore.render.test.tsx +37 -0
- package/src/flow/models/blocks/filter-form/fields/FilterFormCustomFieldModel.tsx +1 -1
- package/src/flow/models/blocks/form/FormActionModel.tsx +1 -1
- package/src/flow/models/blocks/form/__tests__/submitHandler.test.ts +54 -1
- package/src/flow/models/blocks/form/submitHandler.ts +17 -3
- package/src/flow/models/blocks/js-block/JSBlock.tsx +223 -2
- package/src/flow/models/blocks/js-block/__tests__/JSBlockModel.test.tsx +150 -0
- package/src/flow/models/blocks/table/TableActionsColumnModel.tsx +35 -12
- package/src/flow/models/blocks/table/TableBlockModel.tsx +25 -14
- package/src/flow/models/blocks/table/TableColumnModel.tsx +6 -2
- package/src/flow/models/blocks/table/__tests__/TableActionsColumnModel.test.tsx +57 -1
- package/src/flow/models/blocks/table/__tests__/TableBlockModel.dragSort.test.ts +127 -0
- package/src/flow/models/blocks/table/__tests__/TableBlockModel.rowSelection.test.tsx +1 -0
- package/src/flow/models/blocks/table/__tests__/TableColumnModel.test.tsx +51 -0
- package/src/flow/models/blocks/table/dragSort/dragSortHooks.tsx +28 -17
- package/src/flow/models/blocks/table/dragSort/dragSortSettings.ts +13 -6
- package/src/flow/models/blocks/table/dragSort/dragSortUtils.ts +15 -2
- package/src/flow/models/fields/AssociationFieldModel/RecordSelectFieldModel.tsx +45 -13
- package/src/flow/resolveViewParamsToViewList.tsx +11 -3
- package/src/flow/utils/__tests__/dateTimeFormat.test.ts +42 -0
- package/src/settings-center/SystemSettingsPage.tsx +1 -1
|
@@ -6,4 +6,11 @@
|
|
|
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
|
-
|
|
9
|
+
import { FlowContext, type FlowRuntimeContext, type MetaTreeNode } from '@nocobase/flow-engine';
|
|
10
|
+
type ResponseRecordPlainStepContext = {
|
|
11
|
+
steps?: FlowRuntimeContext['steps'];
|
|
12
|
+
};
|
|
13
|
+
export declare function getAfterSuccessResponseRecord(ctx: FlowContext | ResponseRecordPlainStepContext): any;
|
|
14
|
+
export declare function getMetaTreeWithResponseRecord(ctx: FlowRuntimeContext): MetaTreeNode[];
|
|
15
|
+
export declare const afterSuccess: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
|
|
16
|
+
export {};
|
|
@@ -6,7 +6,7 @@
|
|
|
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
|
-
export
|
|
9
|
+
export { afterSuccess } from './afterSuccess';
|
|
10
10
|
export * from './confirm';
|
|
11
11
|
export * from './dataScope';
|
|
12
12
|
export * from './openView';
|
|
@@ -6,4 +6,4 @@
|
|
|
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
|
-
export declare function submitHandler(ctx: any, params: any, cb?: (values?: any, filterByTk?: any) => void): Promise<
|
|
9
|
+
export declare function submitHandler(ctx: any, params: any, cb?: (values?: any, filterByTk?: any) => void): Promise<unknown>;
|
|
@@ -10,6 +10,7 @@ import React from 'react';
|
|
|
10
10
|
import { BlockModel } from '../../base';
|
|
11
11
|
export declare class JSBlockModel extends BlockModel {
|
|
12
12
|
private _mountedOnce;
|
|
13
|
+
get showBlockCard(): boolean;
|
|
13
14
|
renderComponent(): React.ReactNode;
|
|
14
15
|
render(): React.JSX.Element;
|
|
15
16
|
protected onMount(): void;
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { TableCustomColumnModel } from './TableCustomColumnModel';
|
|
11
|
+
export declare const tableRowActionsClassName: string;
|
|
11
12
|
export declare class TableActionsColumnModel extends TableCustomColumnModel {
|
|
12
13
|
afterAddAsSubModel(): Promise<void>;
|
|
13
14
|
getColumnProps(): {
|
|
@@ -64,6 +64,7 @@ export declare class TableBlockModel extends CollectionBlockModel<TableBlockMode
|
|
|
64
64
|
isRowSelectionEnabled(): boolean;
|
|
65
65
|
isShowIndexEnabled(): boolean;
|
|
66
66
|
getRecordIndex(record: Record<string, unknown>, index: number): string | number;
|
|
67
|
+
getDragSortFieldName(): string | undefined;
|
|
67
68
|
getLeftAuxiliaryColumn(): {
|
|
68
69
|
key: string;
|
|
69
70
|
width: number;
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import type { TableBlockModel } from '../TableBlockModel';
|
|
11
|
-
export declare function useDragSortBodyWrapper(model: TableBlockModel, dataSourceRef: React.MutableRefObject<any>, getRowKeyFunc: (record: any) => string | number): (props: any) => React.JSX.Element;
|
|
11
|
+
export declare function useDragSortBodyWrapper(model: TableBlockModel, dataSourceRef: React.MutableRefObject<any>, getRowKeyFunc: (record: any) => string | number, dragSortFieldName?: string): (props: any) => React.JSX.Element;
|
|
12
12
|
export declare function useDragSortRowComponent(dragSort: boolean): React.FC<{
|
|
13
13
|
[key: string]: any;
|
|
14
14
|
rowIndex?: number;
|
|
@@ -15,7 +15,7 @@ export declare const dragSortSettings: {
|
|
|
15
15
|
defaultParams: {
|
|
16
16
|
dragSort: boolean;
|
|
17
17
|
};
|
|
18
|
-
handler(ctx: any, params: any):
|
|
18
|
+
handler(ctx: any, params: any): void;
|
|
19
19
|
};
|
|
20
20
|
export declare const dragSortBySettings: {
|
|
21
21
|
title: string;
|
|
@@ -29,6 +29,7 @@ export declare const dragSortBySettings: {
|
|
|
29
29
|
value: any;
|
|
30
30
|
disabled: any;
|
|
31
31
|
}[];
|
|
32
|
+
allowClear: boolean;
|
|
32
33
|
placeholder: any;
|
|
33
34
|
};
|
|
34
35
|
};
|
|
@@ -6,25 +6,27 @@
|
|
|
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 { Collection } from '@nocobase/flow-engine';
|
|
9
|
+
import type { Collection, CollectionField } from '@nocobase/flow-engine';
|
|
10
10
|
/**
|
|
11
11
|
* 从 collection 中获取所有 sort 类型的字段
|
|
12
12
|
* @param collection - 集合对象
|
|
13
13
|
* @returns 排序字段数组
|
|
14
14
|
*/
|
|
15
|
-
export declare function getSortFields(collection: Collection | undefined):
|
|
15
|
+
export declare function getSortFields(collection: Collection | undefined): CollectionField[];
|
|
16
|
+
export declare function getSortField(collection: Collection | undefined, fieldName?: string | null): CollectionField | undefined;
|
|
17
|
+
export declare function hasSortField(collection: Collection | undefined, fieldName?: string | null): boolean;
|
|
16
18
|
/**
|
|
17
19
|
* 获取 collection 中第一个可用的 sort 字段
|
|
18
20
|
* @param collection - 集合对象
|
|
19
21
|
* @returns 第一个排序字段,如果没有则返回 undefined
|
|
20
22
|
*/
|
|
21
|
-
export declare function getFirstSortField(collection: Collection | undefined):
|
|
23
|
+
export declare function getFirstSortField(collection: Collection | undefined): CollectionField;
|
|
22
24
|
/**
|
|
23
25
|
* 将 sort 字段转换为选项格式
|
|
24
26
|
* @param fields - 字段数组
|
|
25
27
|
* @returns 选项数组
|
|
26
28
|
*/
|
|
27
|
-
export declare function convertFieldsToOptions(fields:
|
|
29
|
+
export declare function convertFieldsToOptions(fields: CollectionField[]): {
|
|
28
30
|
label: any;
|
|
29
31
|
value: any;
|
|
30
32
|
disabled: any;
|
|
@@ -17,4 +17,4 @@ export interface ViewItem {
|
|
|
17
17
|
index: number;
|
|
18
18
|
}
|
|
19
19
|
export declare function resolveViewParamsToViewList(flowEngine: FlowEngine, viewParams: ViewParam[], routeModel: FlowModel): ViewItem[];
|
|
20
|
-
export declare function updateViewListHidden(viewItems: ViewItem[]): void;
|
|
20
|
+
export declare function updateViewListHidden(viewItems: ViewItem[], isMobileLayout?: boolean): void;
|