@nocobase/client-v2 2.1.0-beta.25 → 2.1.0-beta.26
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/linkageRulesFormValueRefresh.d.ts +10 -0
- package/es/flow/index.d.ts +1 -0
- package/es/flow/models/actions/AssociateActionModel.d.ts +19 -0
- package/es/flow/models/actions/AssociationActionUtils.d.ts +17 -0
- package/es/flow/models/actions/DisassociateActionModel.d.ts +16 -0
- package/es/flow/models/actions/index.d.ts +3 -0
- package/es/flow/models/base/GridModel.d.ts +3 -1
- package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.d.ts +1 -0
- package/es/flow/models/fields/AssociationFieldModel/recordSelectSettingsUtils.d.ts +9 -0
- package/es/index.d.ts +1 -0
- package/es/index.mjs +80 -80
- package/lib/index.js +87 -87
- package/package.json +5 -5
- package/src/__tests__/globalDeps.test.ts +5 -0
- package/src/flow/actions/__tests__/linkageRules.formValueDrivenRefresh.test.ts +438 -0
- package/src/flow/actions/__tests__/linkageRulesRefresh.test.ts +42 -0
- package/src/flow/actions/linkageRules.tsx +8 -1
- package/src/flow/actions/linkageRulesFormValueRefresh.ts +492 -0
- package/src/flow/actions/linkageRulesRefresh.tsx +4 -2
- package/src/flow/index.ts +1 -0
- package/src/flow/models/actions/AssociateActionModel.tsx +196 -0
- package/src/flow/models/actions/AssociationActionUtils.ts +90 -0
- package/src/flow/models/actions/DisassociateActionModel.tsx +57 -0
- package/src/flow/models/actions/__tests__/AssociationActionModel.test.ts +250 -0
- package/src/flow/models/actions/index.ts +3 -0
- package/src/flow/models/base/GridModel.tsx +21 -1
- package/src/flow/models/base/__tests__/GridModel.dragSnapshotContainer.test.ts +98 -0
- package/src/flow/models/blocks/details/DetailsItemModel.tsx +3 -0
- package/src/flow/models/fields/AssociationFieldModel/RecordSelectFieldModel.tsx +5 -1
- package/src/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.tsx +21 -5
- package/src/flow/models/fields/AssociationFieldModel/recordSelectSettingsUtils.ts +20 -0
- package/src/flow/models/fields/mobile-components/MobileSelect.tsx +11 -3
- package/src/flow/models/fields/mobile-components/__tests__/MobileSelect.test.tsx +235 -0
- package/src/index.ts +1 -0
- package/src/utils/globalDeps.ts +6 -0
|
@@ -0,0 +1,10 @@
|
|
|
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 { FlowContext } from '@nocobase/flow-engine';
|
|
10
|
+
export declare function ensureFormValueDrivenLinkageRefresh(ctx: FlowContext, params: any, actionName: string): void;
|
package/es/flow/index.d.ts
CHANGED
|
@@ -27,4 +27,5 @@ export * from './admin-shell/AdminLayoutRouteCoordinator';
|
|
|
27
27
|
export * from '../settings-center';
|
|
28
28
|
export { openViewFlow } from './flows/openViewFlow';
|
|
29
29
|
export { editMarkdownFlow } from './flows/editMarkdownFlow';
|
|
30
|
+
export { resolveDynamicNamePath } from './models/blocks/form/value-runtime/path';
|
|
30
31
|
export { TextAreaWithContextSelector } from './components/TextAreaWithContextSelector';
|
|
@@ -0,0 +1,19 @@
|
|
|
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';
|
|
10
|
+
import { ActionModel } from '../base';
|
|
11
|
+
export declare class AssociateActionModel extends ActionModel {
|
|
12
|
+
static scene: import("../base").ActionSceneType;
|
|
13
|
+
static capabilityActionName: string;
|
|
14
|
+
defaultPopupTitle: string;
|
|
15
|
+
selectedRows: any[];
|
|
16
|
+
defaultProps: ButtonProps;
|
|
17
|
+
getAclActionName(): string;
|
|
18
|
+
associateSelectedRows(): Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 } from '@nocobase/flow-engine';
|
|
10
|
+
export declare const getAssociationBlockResourceSettings: (ctx: FlowModelContext | any) => any;
|
|
11
|
+
export declare const isAssociationBlockContext: (ctx: FlowModelContext | any) => boolean;
|
|
12
|
+
export declare const getAssociationTargetResourceSettings: (ctx: FlowModelContext | any) => {
|
|
13
|
+
dataSourceKey: any;
|
|
14
|
+
collectionName: any;
|
|
15
|
+
};
|
|
16
|
+
export declare const applyDisassociateAction: (ctx: FlowModelContext | any) => Promise<void>;
|
|
17
|
+
export declare const applyAssociateAction: (ctx: FlowModelContext | any, selectedRows: any[]) => Promise<void>;
|
|
@@ -0,0 +1,16 @@
|
|
|
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';
|
|
10
|
+
import { ActionModel } from '../base';
|
|
11
|
+
export declare class DisassociateActionModel extends ActionModel {
|
|
12
|
+
static scene: import("../base").ActionSceneType;
|
|
13
|
+
static capabilityActionName: string;
|
|
14
|
+
defaultProps: ButtonProps;
|
|
15
|
+
getAclActionName(): string;
|
|
16
|
+
}
|
|
@@ -7,8 +7,11 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
export * from './AddNewActionModel';
|
|
10
|
+
export * from './AssociateActionModel';
|
|
11
|
+
export * from './AssociationActionUtils';
|
|
10
12
|
export * from './BulkDeleteActionModel';
|
|
11
13
|
export * from './DeleteActionModel';
|
|
14
|
+
export * from './DisassociateActionModel';
|
|
12
15
|
export * from './EditActionModel';
|
|
13
16
|
export * from './FilterActionModel';
|
|
14
17
|
export * from './JSActionModel';
|
|
@@ -33,6 +33,7 @@ export declare class GridModel<T extends {
|
|
|
33
33
|
private readonly itemExtraToolbarItems;
|
|
34
34
|
private dragState?;
|
|
35
35
|
private _memoItemFlowSettings?;
|
|
36
|
+
onInit(options: any): void;
|
|
36
37
|
private updateDragPointerPosition;
|
|
37
38
|
private handleDragScroll;
|
|
38
39
|
private bindDragDocumentListeners;
|
|
@@ -46,6 +47,7 @@ export declare class GridModel<T extends {
|
|
|
46
47
|
getItemUids(): string[];
|
|
47
48
|
protected normalizeLayoutFromSource(source?: Partial<GridLayoutData>): GridLayoutV2;
|
|
48
49
|
getGridLayout(): GridLayoutV2;
|
|
50
|
+
serialize(): Record<string, any>;
|
|
49
51
|
syncLayoutProps(layout: GridLayoutV2): void;
|
|
50
52
|
setGridStepLayout(layout: GridLayoutV2): void;
|
|
51
53
|
private findLayoutRowByPath;
|
|
@@ -73,7 +75,7 @@ export declare class GridModel<T extends {
|
|
|
73
75
|
handleDragStart(event: DragStartEvent): void;
|
|
74
76
|
handleDragMove(event: DragMoveEvent): void;
|
|
75
77
|
private finishDrag;
|
|
76
|
-
handleDragEnd(
|
|
78
|
+
handleDragEnd(event: DragEndEvent): void;
|
|
77
79
|
handleDragCancel(_event: DragCancelEvent): void;
|
|
78
80
|
renderAddSubModelButton(): JSX.Element;
|
|
79
81
|
/**
|
package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export declare class SubTableColumnModel<T extends SubTableColumnModelStructure
|
|
|
25
25
|
renderHiddenInConfig(): React.JSX.Element;
|
|
26
26
|
static defineChildren(ctx: FlowModelContext): any;
|
|
27
27
|
get collection(): any;
|
|
28
|
+
get hasFormulaColumn(): boolean;
|
|
28
29
|
onInit(options: any): void;
|
|
29
30
|
afterAddAsSubModel(): Promise<void>;
|
|
30
31
|
getColumnProps(): TableColumnProps;
|
|
@@ -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 hasAncestorModel(model: any, modelNames: string[]): boolean;
|
package/es/index.d.ts
CHANGED
|
@@ -30,4 +30,5 @@ export * from './collection-field-interface/CollectionFieldInterface';
|
|
|
30
30
|
export * from './collection-field-interface/CollectionFieldInterfaceManager';
|
|
31
31
|
export * from './collection-manager/interfaces';
|
|
32
32
|
export * from './flow';
|
|
33
|
+
export { DEFAULT_DATA_SOURCE_KEY, isTitleField } from './flow-compat';
|
|
33
34
|
export { default as AntdAppProvider } from './theme/AntdAppProvider';
|