@nocobase/client 2.0.0-alpha.66 → 2.0.0-alpha.67
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/block-provider/TableUidContext.d.ts +10 -0
- package/es/flow/components/code-editor/hooks/useCodeRunner.d.ts +3 -1
- package/es/flow/models/base/BlockModel.d.ts +2 -1
- package/es/flow/models/blocks/form/QuickEditFormModel.d.ts +4 -1
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableActionGroupModel.d.ts +11 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableActionsColumnModel.d.ts +19 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableFieldModel.d.ts +30 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/actions/PopupSubTableEditActionModel.d.ts +28 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/actions/PopupSubTableFormSubmitActionModel.d.ts +16 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/actions/PopupSubTableRemoveActionModel.d.ts +14 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/blocks/PopupSubTableFormModel.d.ts +35 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/index.d.ts +17 -0
- package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.d.ts +3 -0
- package/es/flow/models/fields/AssociationFieldModel/index.d.ts +1 -0
- package/es/flow/models/fields/AssociationFieldModel/recordSelectShared.d.ts +2 -0
- package/es/flow/models/fields/index.d.ts +0 -1
- package/es/index.mjs +4474 -3325
- package/es/variables/index.d.ts +1 -1
- package/lib/{index-C3fHjsMw-B2Crrfl6.js → index-C3fHjsMw-CMjLjGXM.js} +341 -276
- package/lib/index.js +187 -122
- package/lib/locale/zh-CN.json +16 -6
- package/package.json +6 -6
- package/es/flow/models/fields/UploadFieldModel.d.ts +0 -22
|
@@ -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
|
+
/// <reference types="react" />
|
|
10
|
+
export declare const TableUidContext: import("react").Context<string>;
|
|
@@ -13,9 +13,11 @@ export type RunLog = {
|
|
|
13
13
|
line?: number;
|
|
14
14
|
column?: number;
|
|
15
15
|
};
|
|
16
|
+
type RunResult = Awaited<ReturnType<JSRunner['run']>>;
|
|
16
17
|
export declare function useCodeRunner(hostCtx: FlowModelContext, version?: string): {
|
|
17
|
-
run: (code: string) => Promise<
|
|
18
|
+
run: (code: string) => Promise<RunResult | undefined>;
|
|
18
19
|
logs: RunLog[];
|
|
19
20
|
clearLogs: () => void;
|
|
20
21
|
running: boolean;
|
|
21
22
|
};
|
|
23
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DefaultStructure, FlowModel } from '@nocobase/flow-engine';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export type BlockSceneType = 'new' | 'filter' | 'one' | 'many' | 'select' | BlockSceneType[];
|
|
3
|
+
export type BlockSceneType = 'new' | 'filter' | 'one' | 'many' | 'select' | 'subForm' | BlockSceneType[];
|
|
4
4
|
export declare const BlockSceneEnum: {
|
|
5
5
|
new: BlockSceneType;
|
|
6
6
|
one: BlockSceneType;
|
|
@@ -8,6 +8,7 @@ export declare const BlockSceneEnum: {
|
|
|
8
8
|
select: BlockSceneType;
|
|
9
9
|
filter: BlockSceneType;
|
|
10
10
|
oam: BlockSceneType;
|
|
11
|
+
subForm: BlockSceneType;
|
|
11
12
|
};
|
|
12
13
|
export declare class BlockModel<T = DefaultStructure> extends FlowModel<T> {
|
|
13
14
|
decoratorProps: Record<string, any>;
|
|
@@ -16,6 +16,7 @@ export declare class QuickEditFormModel extends FlowModel {
|
|
|
16
16
|
viewContainer: any;
|
|
17
17
|
__onSubmitSuccess: any;
|
|
18
18
|
_fieldProps: any;
|
|
19
|
+
_onOk: any;
|
|
19
20
|
get form(): any;
|
|
20
21
|
useHooksBeforeRender(): void;
|
|
21
22
|
static open(options: {
|
|
@@ -24,10 +25,12 @@ export declare class QuickEditFormModel extends FlowModel {
|
|
|
24
25
|
dataSourceKey: string;
|
|
25
26
|
collectionName: string;
|
|
26
27
|
fieldPath: string;
|
|
27
|
-
filterByTk: string;
|
|
28
28
|
record: any;
|
|
29
|
+
filterByTk?: string;
|
|
29
30
|
onSuccess?: (values: any) => void;
|
|
30
31
|
fieldProps?: any;
|
|
32
|
+
sourceFieldModelUid?: string;
|
|
33
|
+
onOk?: (values: any) => void;
|
|
31
34
|
}): Promise<void>;
|
|
32
35
|
onInit(options: any): void;
|
|
33
36
|
addAppends(fieldPath: string, refresh?: boolean): void;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 { ActionGroupModel } from '../../../base/ActionGroupModel';
|
|
10
|
+
export declare class PopupSubTableActionGroupModel extends ActionGroupModel {
|
|
11
|
+
}
|
|
@@ -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 React from 'react';
|
|
10
|
+
import { TableCustomColumnModel } from '../../../blocks/table/TableCustomColumnModel';
|
|
11
|
+
export declare class PopupSubTableActionsColumnModel extends TableCustomColumnModel {
|
|
12
|
+
_subTableModel: any;
|
|
13
|
+
afterAddAsSubModel(): Promise<void>;
|
|
14
|
+
getColumnProps(model: any): {
|
|
15
|
+
title: React.JSX.Element;
|
|
16
|
+
render: (value: any, record: any, index: any) => React.JSX.Element;
|
|
17
|
+
};
|
|
18
|
+
render(): (value: any, record: any, index: any) => React.JSX.Element;
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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 React from 'react';
|
|
10
|
+
import { AssociationFieldModel } from '../AssociationFieldModel';
|
|
11
|
+
export declare class PopupSubTableFieldModel extends AssociationFieldModel {
|
|
12
|
+
disableTitleField: boolean;
|
|
13
|
+
defaultOverflowMode: string;
|
|
14
|
+
updateAssociation: boolean;
|
|
15
|
+
selectedRows: {
|
|
16
|
+
value: any[];
|
|
17
|
+
};
|
|
18
|
+
setCurrentPage: any;
|
|
19
|
+
currentPageSize: any;
|
|
20
|
+
get collection(): any;
|
|
21
|
+
get collectionField(): any;
|
|
22
|
+
onInit(options: any): void;
|
|
23
|
+
onDispatchEventStart(eventName: string): Promise<void>;
|
|
24
|
+
set onSelectExitRecordClick(fn: any);
|
|
25
|
+
set onAddRecordClick(fn: any);
|
|
26
|
+
afterAddAsSubModel(): Promise<void>;
|
|
27
|
+
getBaseColumns(model: any): any;
|
|
28
|
+
change(): void;
|
|
29
|
+
render(): React.JSX.Element;
|
|
30
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 React from 'react';
|
|
11
|
+
import { ActionModel } from '../../../../base/ActionModel';
|
|
12
|
+
export declare function EditFormContent({ model, scene }: {
|
|
13
|
+
model: any;
|
|
14
|
+
scene?: string;
|
|
15
|
+
}): React.JSX.Element;
|
|
16
|
+
export declare class SubTableRecordAction extends ActionModel {
|
|
17
|
+
renderHiddenInConfig(): React.ReactNode | undefined;
|
|
18
|
+
}
|
|
19
|
+
export declare class PopupSubTableEditActionModel extends SubTableRecordAction {
|
|
20
|
+
renderHiddenInConfig(): React.ReactNode | undefined;
|
|
21
|
+
selectedRows: {
|
|
22
|
+
value: any[];
|
|
23
|
+
};
|
|
24
|
+
defaultPopupTitle: string;
|
|
25
|
+
defaultProps: ButtonProps;
|
|
26
|
+
getAclActionName(): string;
|
|
27
|
+
onDispatchEventStart(eventName: string): Promise<void>;
|
|
28
|
+
}
|
|
@@ -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 { ButtonProps } from 'antd';
|
|
10
|
+
import { ActionGroupModel, ActionModel } from '../../../../base';
|
|
11
|
+
export declare class PopupSubTableFormSubmitActionModel extends ActionModel {
|
|
12
|
+
defaultProps: ButtonProps;
|
|
13
|
+
}
|
|
14
|
+
export declare class PopupSubTableFormActionGroupModel extends ActionGroupModel {
|
|
15
|
+
static baseClass: typeof PopupSubTableFormSubmitActionModel;
|
|
16
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 { SubTableRecordAction } from './PopupSubTableEditActionModel';
|
|
11
|
+
export declare class PopupSubTableRemoveActionModel extends SubTableRecordAction {
|
|
12
|
+
defaultProps: ButtonProps;
|
|
13
|
+
onDispatchEventStart(eventName: string): Promise<void>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 { FlowModelContext, SingleRecordResource } from '@nocobase/flow-engine';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import { FormBlockModel } from '../../../../blocks/form/FormBlockModel';
|
|
12
|
+
export declare class PopupSubTableFormModel extends FormBlockModel {
|
|
13
|
+
static scene: import("../../../../base").BlockSceneType;
|
|
14
|
+
private actionFlowSettings;
|
|
15
|
+
private actionExtraToolbarItems;
|
|
16
|
+
onInit(options: any): void;
|
|
17
|
+
createResource(_ctx: FlowModelContext, params: any): SingleRecordResource<unknown>;
|
|
18
|
+
_defaultCustomModelClasses: {
|
|
19
|
+
FormActionGroupModel: string;
|
|
20
|
+
FormItemModel: string;
|
|
21
|
+
FormCustomItemModel: string;
|
|
22
|
+
};
|
|
23
|
+
protected defaultBlockTitle(): string;
|
|
24
|
+
/**
|
|
25
|
+
* 定义子菜单选项
|
|
26
|
+
*/
|
|
27
|
+
static defineChildren(ctx: any): Promise<{
|
|
28
|
+
key: string;
|
|
29
|
+
label: string;
|
|
30
|
+
useModel: string;
|
|
31
|
+
createModelOptions: any;
|
|
32
|
+
}[]>;
|
|
33
|
+
onMount(): Promise<void>;
|
|
34
|
+
renderComponent(): React.JSX.Element;
|
|
35
|
+
}
|
|
@@ -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
|
+
export * from './PopupSubTableFieldModel';
|
|
10
|
+
export * from './PopupSubTableActionGroupModel';
|
|
11
|
+
export * from './PopupSubTableActionsColumnModel';
|
|
12
|
+
export * from './actions/PopupSubTableEditActionModel';
|
|
13
|
+
export * from './actions/PopupSubTableRemoveActionModel';
|
|
14
|
+
export * from './actions/PopupSubTableFormSubmitActionModel';
|
|
15
|
+
export * from './PopupSubTableActionGroupModel';
|
|
16
|
+
export * from './blocks/PopupSubTableFormModel';
|
|
17
|
+
export * from './PopupSubTableActionsColumnModel';
|
package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.d.ts
CHANGED
|
@@ -11,6 +11,9 @@ import { TableColumnProps } from 'antd';
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import { SubTableFieldModel } from '.';
|
|
13
13
|
import { FieldModel } from '../../../base';
|
|
14
|
+
export declare function FieldWithoutPermissionPlaceholder({ targetModel }: {
|
|
15
|
+
targetModel: any;
|
|
16
|
+
}): React.JSX.Element;
|
|
14
17
|
export interface SubTableColumnModelStructure {
|
|
15
18
|
parent: SubTableFieldModel;
|
|
16
19
|
subModels: {
|
|
@@ -6,6 +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 { type FlowRuntimeContext } from '@nocobase/flow-engine';
|
|
9
10
|
import type { SelectProps } from 'antd';
|
|
10
11
|
import React from 'react';
|
|
11
12
|
export interface AssociationFieldNames {
|
|
@@ -14,6 +15,7 @@ export interface AssociationFieldNames {
|
|
|
14
15
|
}
|
|
15
16
|
export type AssociationOption = Record<string, any>;
|
|
16
17
|
export type PopupScrollEvent = Parameters<NonNullable<SelectProps<any>['onPopupScroll']>>[0];
|
|
18
|
+
export declare function buildOpenerUids(ctx: FlowRuntimeContext, inputArgs?: Record<string, unknown>): string[];
|
|
17
19
|
export interface LazySelectProps extends Omit<SelectProps<any>, 'mode' | 'options' | 'value' | 'onChange'> {
|
|
18
20
|
fieldNames: AssociationFieldNames;
|
|
19
21
|
value?: AssociationOption | AssociationOption[];
|
|
@@ -23,7 +23,6 @@ export * from './RichTextFieldModel';
|
|
|
23
23
|
export * from './SelectFieldModel';
|
|
24
24
|
export * from './TextareaFieldModel';
|
|
25
25
|
export * from './TimeFieldModel';
|
|
26
|
-
export * from './UploadFieldModel';
|
|
27
26
|
export * from './VariableFieldFormModel';
|
|
28
27
|
export * from './JSFieldModel';
|
|
29
28
|
export * from './JSEditableFieldModel';
|