@nocobase/client 2.0.0-alpha.55 → 2.0.0-alpha.57
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/.dumirc.ts +4 -0
- package/es/flow/FlowModelRepository.d.ts +2 -0
- package/es/flow/actions/openView.d.ts +2 -13
- package/es/flow/components/placeholders/BlockPlaceholder.d.ts +1 -0
- package/es/flow/models/base/ActionModel.d.ts +1 -1
- package/es/flow/models/base/BlockModel.d.ts +1 -0
- package/es/flow/models/base/CollectionBlockModel.d.ts +1 -0
- package/es/flow/models/base/GridModel.d.ts +20 -1
- package/es/flow/models/blocks/details/DetailsBlockModel.d.ts +1 -0
- package/es/flow/models/blocks/details/DetailsItemModel.d.ts +1 -1
- package/es/flow/models/blocks/filter-form/FilterFormItemModel.d.ts +1 -1
- package/es/flow/models/blocks/form/FormActionModel.d.ts +0 -1
- package/es/flow/models/blocks/form/FormItemModel.d.ts +1 -1
- package/es/flow/models/blocks/table/TableColumnModel.d.ts +8 -2
- package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.d.ts +1 -1
- package/es/index.mjs +6600 -6691
- package/lib/{index-C3fHjsMw-C1XXV2DW.js → index-C3fHjsMw-FAJ32xs7.js} +267 -260
- package/lib/index.js +182 -175
- package/lib/locale/zh-CN.json +12 -3
- package/lib/locale/zh-TW.json +1 -1
- package/package.json +6 -6
package/.dumirc.ts
CHANGED
|
@@ -214,6 +214,10 @@ export default defineConfig({
|
|
|
214
214
|
title: 'hideInSettings - 在设置界面中隐藏',
|
|
215
215
|
link: '/examples/flow-definition/hide-in-settings',
|
|
216
216
|
},
|
|
217
|
+
{
|
|
218
|
+
title: '扩展设置菜单(Common actions)',
|
|
219
|
+
link: '/examples/flow-definition/settings-menu-extra-items',
|
|
220
|
+
},
|
|
217
221
|
{
|
|
218
222
|
title: 'uiMode - 步骤设置的 UI 模式',
|
|
219
223
|
link: '/examples/flow-definition/ui-mode',
|
|
@@ -24,6 +24,8 @@ export declare class MockFlowModelRepository implements IFlowModelRepository<Flo
|
|
|
24
24
|
export declare class FlowModelRepository implements IFlowModelRepository<FlowModel> {
|
|
25
25
|
private app;
|
|
26
26
|
constructor(app: Application);
|
|
27
|
+
private inFlightFindOne;
|
|
28
|
+
private buildFindOneKey;
|
|
27
29
|
findOne(query: any): Promise<any>;
|
|
28
30
|
save(model: FlowModel, options?: {
|
|
29
31
|
onlyStepParams?: boolean;
|
|
@@ -9,18 +9,7 @@
|
|
|
9
9
|
import { FlowModel } from '@nocobase/flow-engine';
|
|
10
10
|
/**
|
|
11
11
|
* 弹窗打开动作(openView)配置
|
|
12
|
-
*
|
|
13
|
-
* -
|
|
14
|
-
* - 默认使用当前模型 uid;必填。
|
|
15
|
-
* - 当 uid 与当前模型不同:调用 ctx.openView(uid, …) 打开“其它弹窗”。
|
|
16
|
-
* - 当 uid 与当前模型相同:在当前上下文打开“自身弹窗”。
|
|
17
|
-
* - 数据源/集合:
|
|
18
|
-
* - 顶层只读展示(使用级联),底层字段 dataSourceKey / collectionName 永远禁用。
|
|
19
|
-
* - 默认取当前集合的数据源/集合;若从他弹窗回填则以回填为准。
|
|
20
|
-
* - 关联名/来源主键:
|
|
21
|
-
* - 当关联名无值时隐藏;有默认值时禁用。
|
|
22
|
-
* - Source ID 在关联名不存在时隐藏;在关联场景默认使用 {{ ctx.resource.sourceId }}。
|
|
23
|
-
* - Filter by TK:默认使用 {{ ctx.record.<filterTargetKey> }}。
|
|
24
|
-
* - 变量选择:仅暴露 record/resource,避免误选 view/collection。
|
|
12
|
+
* - 当 params.uid !== ctx.model.uid:委托 ctx.openView 打开其它弹窗
|
|
13
|
+
* - filterByTk/sourceId 优先级:显式 inputArgs > params > actionDefaults
|
|
25
14
|
*/
|
|
26
15
|
export declare const openView: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
|
|
@@ -27,7 +27,7 @@ export declare class ActionModel<T extends DefaultStructure = DefaultStructure>
|
|
|
27
27
|
enableEditColor: boolean;
|
|
28
28
|
static _getScene(): any[];
|
|
29
29
|
static _isScene(scene: ActionSceneType): boolean;
|
|
30
|
-
getAclActionName():
|
|
30
|
+
getAclActionName(): any;
|
|
31
31
|
onInit(options: any): void;
|
|
32
32
|
getInputArgs(): Record<string, any>;
|
|
33
33
|
onClick(event: any): void;
|
|
@@ -14,6 +14,7 @@ export declare class BlockModel<T = DefaultStructure> extends FlowModel<T> {
|
|
|
14
14
|
static scene: BlockSceneType;
|
|
15
15
|
_defaultCustomModelClasses: any;
|
|
16
16
|
customModelClasses: any;
|
|
17
|
+
collectionRequired: boolean;
|
|
17
18
|
static _getScene(): BlockSceneType[];
|
|
18
19
|
static _isScene(scene: BlockSceneType): boolean;
|
|
19
20
|
getModelClassName(className: string): any;
|
|
@@ -54,7 +54,7 @@ export declare class GridModel<T extends {
|
|
|
54
54
|
renderAddSubModelButton(): JSX.Element;
|
|
55
55
|
/**
|
|
56
56
|
* 运行态按可见 block 过滤行/列,避免“整行都是 hidden block”但依然保留行间距占位。
|
|
57
|
-
* - 配置态(
|
|
57
|
+
* - 配置态(flowSettingsEnabled)保持原始 rows/sizes 以便拖拽和布局编辑。
|
|
58
58
|
* - 运行态仅在判断为“整列/整行都不可见”时做过滤,不写回 props/stepParams,布局元数据保持不变。
|
|
59
59
|
*/
|
|
60
60
|
private getVisibleLayout;
|
|
@@ -70,4 +70,23 @@ export declare class GridModel<T extends {
|
|
|
70
70
|
export declare function transformRowsToSingleColumn(rows: Record<string, string[][]>, options?: {
|
|
71
71
|
emptyColumnUid?: string;
|
|
72
72
|
}): Record<string, string[][]>;
|
|
73
|
+
export declare function recalculateGridSizes({ position, direction, resizeDistance, prevMoveDistance, oldSizes, oldRows, gridContainerWidth, gutter, columnCount, }: {
|
|
74
|
+
position: {
|
|
75
|
+
rowId: string;
|
|
76
|
+
columnIndex: number;
|
|
77
|
+
itemIndex: number;
|
|
78
|
+
};
|
|
79
|
+
direction: 'left' | 'right' | 'bottom' | 'corner';
|
|
80
|
+
resizeDistance: number;
|
|
81
|
+
prevMoveDistance: number;
|
|
82
|
+
oldSizes: Record<string, number[]>;
|
|
83
|
+
oldRows: Record<string, string[][]>;
|
|
84
|
+
gridContainerWidth: number;
|
|
85
|
+
gutter?: number;
|
|
86
|
+
columnCount?: number;
|
|
87
|
+
}): {
|
|
88
|
+
newRows: Record<string, string[][]>;
|
|
89
|
+
newSizes: Record<string, number[]>;
|
|
90
|
+
moveDistance: number;
|
|
91
|
+
};
|
|
73
92
|
export {};
|
|
@@ -32,5 +32,6 @@ export declare class DetailsBlockModel extends CollectionBlockModel<{
|
|
|
32
32
|
handlePageChange: (page: number) => Promise<void>;
|
|
33
33
|
refresh(): Promise<void>;
|
|
34
34
|
renderPagination(): React.JSX.Element;
|
|
35
|
+
renderConfigureActions(): React.JSX.Element;
|
|
35
36
|
renderComponent(): React.JSX.Element;
|
|
36
37
|
}
|
|
@@ -9,12 +9,18 @@
|
|
|
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 const CustomWidth: ({ setOpen, t, handleChange, defaultValue }: {
|
|
13
|
+
setOpen: any;
|
|
14
|
+
t: any;
|
|
15
|
+
handleChange: any;
|
|
16
|
+
defaultValue: any;
|
|
17
|
+
}) => React.JSX.Element;
|
|
12
18
|
export declare class TableColumnModel extends DisplayItemModel {
|
|
13
19
|
static renderMode: ModelRenderMode;
|
|
14
|
-
renderHiddenInConfig(): React.JSX.Element;
|
|
15
20
|
afterAddAsSubModel(): Promise<void>;
|
|
21
|
+
renderHiddenInConfig(): React.ReactNode | undefined;
|
|
16
22
|
static defineChildren(ctx: FlowModelContext): any;
|
|
17
23
|
getColumnProps(): TableColumnProps;
|
|
18
24
|
onInit(options: any): void;
|
|
19
|
-
|
|
25
|
+
renderItem(): any;
|
|
20
26
|
}
|