@nocobase/client-v2 2.4.0-alpha.18 → 2.4.0-alpha.19
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/FlowModelRepository.d.ts +4 -1
- package/es/flow/FlowPage.d.ts +1 -1
- package/es/flow/models/actions/getHasManyDeleteFilterByTk.d.ts +12 -0
- package/es/flow/useRouteContentRequest.d.ts +19 -0
- package/es/index.mjs +111 -74
- package/lib/index.js +112 -75
- package/package.json +7 -7
- package/src/flow/FlowModelRepository.ts +47 -1
- package/src/flow/FlowPage.tsx +19 -10
- package/src/flow/__tests__/FlowModelRepository.test.ts +38 -1
- package/src/flow/__tests__/FlowPage.test.tsx +78 -46
- package/src/flow/admin-shell/admin-layout/AdminLayoutComponent.tsx +8 -1
- package/src/flow/models/actions/BulkDeleteActionModel.tsx +13 -2
- package/src/flow/models/actions/DeleteActionModel.tsx +16 -2
- package/src/flow/models/actions/__tests__/DeleteActionModel.test.ts +256 -0
- package/src/flow/models/actions/getHasManyDeleteFilterByTk.ts +40 -0
- package/src/flow/models/base/PageModel/PageTabModel.tsx +27 -12
- package/src/flow/models/blocks/details/DetailsItemModel.tsx +62 -1
- package/src/flow/models/blocks/details/__tests__/DetailsItemModel.spacing.test.tsx +77 -0
- package/src/flow/useRouteContentRequest.tsx +42 -0
|
@@ -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
|
-
import { FlowModel, IFlowModelRepository } from '@nocobase/flow-engine';
|
|
9
|
+
import { type CreateModelOptions, type FlowEngine, FlowModel, IFlowModelRepository } from '@nocobase/flow-engine';
|
|
10
10
|
import type { BaseApplication } from '../BaseApplication';
|
|
11
11
|
export declare class MockFlowModelRepository implements IFlowModelRepository<FlowModel> {
|
|
12
12
|
protected prefix: string;
|
|
@@ -27,6 +27,7 @@ export declare class FlowModelRepository implements IFlowModelRepository<FlowMod
|
|
|
27
27
|
private inFlightFindOne;
|
|
28
28
|
private buildFindOneKey;
|
|
29
29
|
findOne(query: any): Promise<any>;
|
|
30
|
+
ensureRouteContent(options: CreateModelOptions): Promise<any>;
|
|
30
31
|
save(model: FlowModel, options?: {
|
|
31
32
|
onlyStepParams?: boolean;
|
|
32
33
|
}): Promise<any>;
|
|
@@ -34,3 +35,5 @@ export declare class FlowModelRepository implements IFlowModelRepository<FlowMod
|
|
|
34
35
|
move(sourceId: string, targetId: string, position?: 'before' | 'after'): Promise<any>;
|
|
35
36
|
duplicate(uid: string): Promise<any>;
|
|
36
37
|
}
|
|
38
|
+
export declare function isRouteContentConfirmed(model: FlowModel): boolean;
|
|
39
|
+
export declare function loadRouteContentForEditing(engine: FlowEngine, options: CreateModelOptions): Promise<FlowModel<import("@nocobase/flow-engine").DefaultStructure>>;
|
package/es/flow/FlowPage.d.ts
CHANGED
|
@@ -16,6 +16,6 @@ type FlowPageProps = {
|
|
|
16
16
|
defaultTabTitle?: string;
|
|
17
17
|
showFlowSettings?: FlowModelRendererProps['showFlowSettings'];
|
|
18
18
|
};
|
|
19
|
-
export declare const FlowPage: React.MemoExoticComponent<(
|
|
19
|
+
export declare const FlowPage: React.MemoExoticComponent<import("@formily/reactive-react").ReactFC<Omit<FlowPageProps & Record<string, unknown>, "ref">>>;
|
|
20
20
|
export declare const RemoteFlowModelRenderer: (props: any) => React.JSX.Element;
|
|
21
21
|
export { FlowRoute };
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
type RecordData = Record<string, unknown>;
|
|
10
|
+
type TargetValue = string | number;
|
|
11
|
+
export declare function getHasManyDeleteFilterByTk(targetKey: unknown, records: RecordData | RecordData[]): TargetValue | TargetValue[] | undefined;
|
|
12
|
+
export {};
|
|
@@ -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 { FlowModel } from '@nocobase/flow-engine';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
export declare function useRouteContentRequest(load: (forEditing: boolean) => Promise<FlowModel>, editing: boolean, refreshDeps: unknown[]): {
|
|
12
|
+
model: FlowModel<import("@nocobase/flow-engine").DefaultStructure>;
|
|
13
|
+
error: Error;
|
|
14
|
+
loading: boolean;
|
|
15
|
+
needsConfirmation: boolean;
|
|
16
|
+
};
|
|
17
|
+
export declare function RouteContent({ pending, children }: React.PropsWithChildren<{
|
|
18
|
+
pending: boolean;
|
|
19
|
+
}>): React.JSX.Element;
|