@nocobase/client 1.3.16-beta → 1.3.18-beta
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/api-client/APIClient.d.ts +1 -0
- package/es/application/Application.d.ts +2 -2
- package/es/data-source/data-block/DataBlockProvider.d.ts +3 -0
- package/es/index.mjs +2880 -2708
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.d.ts +13 -2
- package/es/schema-component/antd/association-field/hooks.d.ts +12 -2
- package/es/schema-component/antd/date-picker/DatePicker.d.ts +1 -1
- package/es/schema-component/antd/form-item/hooks/useLinkageRulesForSubTableOrSubForm.d.ts +12 -0
- package/es/schema-component/antd/quick-edit/QuickEdit.d.ts +1 -1
- package/es/schema-component/common/utils/uitls.d.ts +7 -2
- package/es/schema-component/hooks/useDesignable.d.ts +2 -2
- package/es/{schema-component/antd/form-v2/utils.d.ts → schema-settings/LinkageRules/bindLinkageRulesToFiled.d.ts} +21 -3
- package/es/schema-settings/LinkageRules/forEachLinkageRule.d.ts +9 -0
- package/es/schema-settings/LinkageRules/index.d.ts +1 -2
- package/lib/index.js +68 -71
- package/lib/locale/en_US.js +3 -1
- package/lib/locale/zh-CN.js +3 -1
- package/package.json +6 -6
|
@@ -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 React from 'react';
|
|
9
10
|
import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
|
|
10
11
|
export declare const setDefaultSortingRules: {
|
|
11
12
|
name: string;
|
|
@@ -13,8 +14,8 @@ export declare const setDefaultSortingRules: {
|
|
|
13
14
|
useComponentProps(): {
|
|
14
15
|
title: string;
|
|
15
16
|
components: {
|
|
16
|
-
ArrayItems: import("@formily/react").ReactFC<
|
|
17
|
-
Item: import("@formily/react").ReactFC<
|
|
17
|
+
ArrayItems: import("@formily/react").ReactFC<React.HTMLAttributes<HTMLDivElement>> & import("@formily/antd-v5").ArrayBaseMixins & {
|
|
18
|
+
Item: import("@formily/react").ReactFC<React.HTMLAttributes<HTMLDivElement> & {
|
|
18
19
|
type?: "card" | "divide";
|
|
19
20
|
}>;
|
|
20
21
|
};
|
|
@@ -92,4 +93,14 @@ export declare const allowAddNewData: {
|
|
|
92
93
|
onChange(value: any): void;
|
|
93
94
|
};
|
|
94
95
|
};
|
|
96
|
+
export declare const linkageRules: {
|
|
97
|
+
name: string;
|
|
98
|
+
Component: (props: any) => React.JSX.Element;
|
|
99
|
+
useComponentProps(): {
|
|
100
|
+
collectionName: any;
|
|
101
|
+
Component: React.FunctionComponent<any>;
|
|
102
|
+
readPretty: boolean;
|
|
103
|
+
afterSubmit: () => void;
|
|
104
|
+
};
|
|
105
|
+
};
|
|
95
106
|
export declare const subTablePopoverComponentFieldSettings: SchemaSettings<{}>;
|
|
@@ -6,8 +6,9 @@
|
|
|
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
|
-
/// <reference types="react" />
|
|
10
9
|
import { GeneralField } from '@formily/core';
|
|
10
|
+
import { Schema } from '@formily/react';
|
|
11
|
+
import { FC } from 'react';
|
|
11
12
|
import { Collection } from '../../../data-source';
|
|
12
13
|
import { AssociationFieldMode } from './AssociationFieldModeProvider';
|
|
13
14
|
export declare const useInsertSchema: (component: any) => (ss: any) => void;
|
|
@@ -25,9 +26,16 @@ export declare const useFieldNames: (props?: {
|
|
|
25
26
|
value: string;
|
|
26
27
|
};
|
|
27
28
|
}) => any;
|
|
28
|
-
|
|
29
|
+
interface SubFormProviderProps {
|
|
29
30
|
value: any;
|
|
30
31
|
collection: Collection;
|
|
32
|
+
/**
|
|
33
|
+
* the schema of the current sub-table or sub-form
|
|
34
|
+
*/
|
|
35
|
+
fieldSchema?: Schema;
|
|
36
|
+
}
|
|
37
|
+
export declare const SubFormProvider: FC<{
|
|
38
|
+
value: SubFormProviderProps;
|
|
31
39
|
}>;
|
|
32
40
|
/**
|
|
33
41
|
* 用于获取子表单所对应的 form 对象,其应该保持响应性,即一个 Proxy 对象;
|
|
@@ -41,4 +49,6 @@ export declare const SubFormProvider: import("react").Provider<{
|
|
|
41
49
|
export declare const useSubFormValue: () => {
|
|
42
50
|
formValue: any;
|
|
43
51
|
collection: Collection;
|
|
52
|
+
fieldSchema: Schema<any, any, any, any, any, any, any, any, any>;
|
|
44
53
|
};
|
|
54
|
+
export {};
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import { DatePickerProps as AntdDatePickerProps } from 'antd';
|
|
10
|
+
import { RangePickerProps } from 'antd/es/date-picker';
|
|
10
11
|
import React from 'react';
|
|
11
12
|
import { ReadPrettyComposed } from './ReadPretty';
|
|
12
|
-
import { RangePickerProps } from 'antd/es/date-picker';
|
|
13
13
|
interface IDatePickerProps {
|
|
14
14
|
utc?: boolean;
|
|
15
15
|
}
|
|
@@ -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
|
+
/**
|
|
10
|
+
* used to bind the linkage rules of the sub-table or sub-form with the current field
|
|
11
|
+
*/
|
|
12
|
+
export declare const useLinkageRulesForSubTableOrSubForm: () => void;
|
|
@@ -6,8 +6,8 @@
|
|
|
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 React from 'react';
|
|
10
9
|
import { IFormItemProps } from '@formily/antd-v5';
|
|
10
|
+
import React from 'react';
|
|
11
11
|
export interface QuickEditProps extends IFormItemProps {
|
|
12
12
|
children?: React.ReactNode;
|
|
13
13
|
}
|
|
@@ -19,16 +19,21 @@ export declare function getInnermostKeyAndValue(obj: any): {
|
|
|
19
19
|
value: any;
|
|
20
20
|
};
|
|
21
21
|
export declare const getTargetField: (obj: any) => any[];
|
|
22
|
-
export declare const conditionAnalyses: ({ ruleGroup, variables, localVariables, }: {
|
|
22
|
+
export declare const conditionAnalyses: ({ ruleGroup, variables, localVariables, variableNameOfLeftCondition, }: {
|
|
23
23
|
ruleGroup: any;
|
|
24
24
|
variables: VariablesContextType;
|
|
25
25
|
localVariables: VariableOption[];
|
|
26
|
+
/**
|
|
27
|
+
* used to parse the variable name of the left condition value
|
|
28
|
+
* @default '$nForm'
|
|
29
|
+
*/
|
|
30
|
+
variableNameOfLeftCondition?: string;
|
|
26
31
|
}) => Promise<boolean>;
|
|
27
32
|
/**
|
|
28
33
|
* 转化成变量字符串,方便解析出值
|
|
29
34
|
* @param targetField
|
|
30
35
|
* @returns
|
|
31
36
|
*/
|
|
32
|
-
export declare function targetFieldToVariableString(targetField: string[]): string;
|
|
37
|
+
export declare function targetFieldToVariableString(targetField: string[], variableName?: string): string;
|
|
33
38
|
export declare function getRenderContent(templateEngine: any, content: any, variables: any, localVariables: any, defaultParse: any): Promise<any>;
|
|
34
39
|
export {};
|
|
@@ -56,8 +56,8 @@ export declare class Designable {
|
|
|
56
56
|
get query(): Query;
|
|
57
57
|
loadAPIClientEvents(): void;
|
|
58
58
|
prepareProperty(schema: ISchema): void;
|
|
59
|
-
on(name: 'insertAdjacent' | 'remove' | 'error' | 'patch' | 'batchPatch', listener: any): void;
|
|
60
|
-
emit(name: 'insertAdjacent' | 'remove' | 'error' | 'patch' | 'batchPatch', ...args: any[]): Promise<any>;
|
|
59
|
+
on(name: 'insertAdjacent' | 'remove' | 'error' | 'patch' | 'batchPatch' | 'initializeActionContext', listener: any): void;
|
|
60
|
+
emit(name: 'insertAdjacent' | 'remove' | 'error' | 'patch' | 'batchPatch' | 'initializeActionContext', ...args: any[]): Promise<any>;
|
|
61
61
|
parentsIn(schema: Schema): boolean;
|
|
62
62
|
refresh(): void;
|
|
63
63
|
deepMerge(schema: ISchema): void;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import { Field } from '@formily/core';
|
|
10
|
-
import { VariableOption, VariablesContextType } from '
|
|
10
|
+
import { VariableOption, VariablesContextType } from '../../variables/types';
|
|
11
11
|
interface Props {
|
|
12
12
|
operator: any;
|
|
13
13
|
value: any;
|
|
@@ -17,15 +17,33 @@ interface Props {
|
|
|
17
17
|
condition: any;
|
|
18
18
|
variables: VariablesContextType;
|
|
19
19
|
localVariables: VariableOption[];
|
|
20
|
+
/**
|
|
21
|
+
* used to parse the variable name of the left condition value
|
|
22
|
+
* @default '$nForm'
|
|
23
|
+
*/
|
|
24
|
+
variableNameOfLeftCondition?: string;
|
|
20
25
|
}
|
|
21
|
-
|
|
26
|
+
export declare function bindLinkageRulesToFiled({ field, linkageRules, formValues, localVariables, action, rule, variables, variableNameOfLeftCondition, }: {
|
|
27
|
+
field: any;
|
|
28
|
+
linkageRules: any[];
|
|
29
|
+
formValues: any;
|
|
30
|
+
localVariables: VariableOption[];
|
|
31
|
+
action: any;
|
|
32
|
+
rule: any;
|
|
33
|
+
variables: VariablesContextType;
|
|
34
|
+
/**
|
|
35
|
+
* used to parse the variable name of the left condition value
|
|
36
|
+
* @default '$nForm'
|
|
37
|
+
*/
|
|
38
|
+
variableNameOfLeftCondition?: string;
|
|
39
|
+
}): () => void;
|
|
40
|
+
export declare const collectFieldStateOfLinkageRules: ({ operator, value, field, condition, variables, localVariables, variableNameOfLeftCondition, }: Props) => any; /**
|
|
22
41
|
* 获取字段临时状态对象
|
|
23
42
|
*/
|
|
24
43
|
export declare function getTempFieldState(condition: boolean | Promise<boolean>, value: any): Promise<{
|
|
25
44
|
condition: boolean;
|
|
26
45
|
value: any;
|
|
27
46
|
}>;
|
|
28
|
-
export declare const collectFieldStateOfLinkageRules: ({ operator, value, field, condition, variables, localVariables, }: Props) => any;
|
|
29
47
|
export declare function replaceVariables(value: string, { variables, localVariables, }: {
|
|
30
48
|
variables: VariablesContextType;
|
|
31
49
|
localVariables: VariableOption[];
|
|
@@ -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 forEachLinkageRule(linkageRules: any[], callback: (action: any, rule: any) => void): void;
|
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
|
-
interface Props {
|
|
10
|
+
export interface Props {
|
|
11
11
|
dynamicComponent: any;
|
|
12
12
|
}
|
|
13
13
|
export declare const FormLinkageRules: React.FunctionComponent<Props>;
|
|
14
|
-
export {};
|