@nocobase/client 1.0.1-alpha.1 → 1.2.0-alpha
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/application/schema-settings/index.d.ts +1 -0
- package/es/application/schema-settings/utils/createModalSettingsItem.d.ts +28 -0
- package/es/application/schema-settings/utils/createSelectSettingsItem.d.ts +28 -0
- package/es/application/schema-settings/utils/createSwitchSettingsItem.d.ts +25 -0
- package/es/application/schema-settings/utils/index.d.ts +11 -0
- package/es/application/schema-settings/utils/util.d.ts +21 -0
- package/es/block-provider/TemplateBlockProvider.d.ts +1 -1
- package/es/block-provider/hooks/index.d.ts +4 -1
- package/es/data-source/collection/Collection.d.ts +1 -0
- package/es/i18n/i18n.d.ts +4 -0
- package/es/index.d.ts +1 -0
- package/es/index.mjs +2320 -2115
- package/es/schema-component/antd/card-item/CardItem.d.ts +2 -2
- package/es/schema-component/antd/filter/useFilterActionProps.d.ts +1 -1
- package/es/schema-component/antd/grid/Grid.d.ts +2 -0
- package/es/schema-component/antd/input/Json.d.ts +2 -0
- package/es/schema-component/hooks/useBlockSize.d.ts +6 -1
- package/es/schema-initializer/items/DataBlockInitializer.d.ts +3 -2
- package/es/schema-initializer/items/FilterBlockInitializer.d.ts +1 -1
- package/es/schema-settings/index.d.ts +2 -0
- package/es/schema-settings/setDefaultSortingRulesSchemaSettingsItem.d.ts +10 -0
- package/es/schema-settings/setTheDataScopeSchemaSettingsItem.d.ts +10 -0
- package/lib/index.js +89 -87
- package/lib/locale/en_US.js +2 -1
- package/lib/locale/es_ES.js +2 -1
- package/lib/locale/fr_FR.js +2 -1
- package/lib/locale/ja_JP.js +3 -2
- package/lib/locale/ko_KR.js +2 -1
- package/lib/locale/pt_BR.js +2 -1
- package/lib/locale/ru_RU.js +2 -1
- package/lib/locale/tr_TR.js +2 -1
- package/lib/locale/uk_UA.js +2 -1
- package/lib/locale/zh-CN.js +3 -2
- package/lib/locale/zh-TW.js +2 -1
- package/package.json +6 -5
|
@@ -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 { SchemaSettingsItemType } from '@nocobase/client';
|
|
10
|
+
import { ISchema } from '@formily/react';
|
|
11
|
+
import { TFunction } from 'react-i18next';
|
|
12
|
+
export interface CreateModalSchemaSettingsItemProps {
|
|
13
|
+
name: string;
|
|
14
|
+
title: string | ((t: TFunction<'translation', undefined>) => string);
|
|
15
|
+
parentSchemaKey: string;
|
|
16
|
+
defaultValue?: any;
|
|
17
|
+
useDefaultValue?: () => any;
|
|
18
|
+
schema: (defaultValue: any) => ISchema;
|
|
19
|
+
valueKeys?: string[];
|
|
20
|
+
useVisible?: () => boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* create `switch` type schema settings item
|
|
24
|
+
*
|
|
25
|
+
* @internal
|
|
26
|
+
* @unstable
|
|
27
|
+
*/
|
|
28
|
+
export declare function createModalSettingsItem(options: CreateModalSchemaSettingsItemProps): SchemaSettingsItemType;
|
|
@@ -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 { SelectProps } from '@nocobase/client';
|
|
10
|
+
import { TFunction } from 'react-i18next';
|
|
11
|
+
interface CreateSelectSchemaSettingsItemProps {
|
|
12
|
+
name: string;
|
|
13
|
+
title: string | ((t: TFunction<'translation', undefined>) => string);
|
|
14
|
+
options?: SelectProps['options'];
|
|
15
|
+
useOptions?: () => SelectProps['options'];
|
|
16
|
+
schemaKey: string;
|
|
17
|
+
defaultValue?: string | number;
|
|
18
|
+
useDefaultValue?: () => string | number;
|
|
19
|
+
useVisible?: () => boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* create `select` type schema settings item
|
|
23
|
+
*
|
|
24
|
+
* @internal
|
|
25
|
+
* @unstable
|
|
26
|
+
*/
|
|
27
|
+
export declare const createSelectSchemaSettingsItem: (options: CreateSelectSchemaSettingsItemProps) => SchemaSettingsItemType;
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { SchemaSettingsItemType } from '@nocobase/client';
|
|
10
|
+
import { TFunction } from 'react-i18next';
|
|
11
|
+
export interface CreateSwitchSchemaSettingsItemProps {
|
|
12
|
+
name: string;
|
|
13
|
+
title: string | ((t: TFunction<'translation', undefined>) => string);
|
|
14
|
+
schemaKey: string;
|
|
15
|
+
defaultValue?: boolean;
|
|
16
|
+
useDefaultValue?: () => boolean;
|
|
17
|
+
useVisible?: () => boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* create `switch` type schema settings item
|
|
21
|
+
*
|
|
22
|
+
* @internal
|
|
23
|
+
* @unstable
|
|
24
|
+
*/
|
|
25
|
+
export declare function createSwitchSettingsItem(options: CreateSwitchSchemaSettingsItemProps): SchemaSettingsItemType;
|
|
@@ -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
|
+
export * from './createSelectSettingsItem';
|
|
10
|
+
export * from './createSwitchSettingsItem';
|
|
11
|
+
export * from './createModalSettingsItem';
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { ISchema } from '@formily/json-schema';
|
|
10
|
+
type IGetNewSchema = {
|
|
11
|
+
fieldSchema: ISchema;
|
|
12
|
+
schemaKey: string;
|
|
13
|
+
value: any;
|
|
14
|
+
valueKeys?: string[];
|
|
15
|
+
};
|
|
16
|
+
export declare function getNewSchema(options: IGetNewSchema): {
|
|
17
|
+
[x: number]: any;
|
|
18
|
+
'x-uid': any;
|
|
19
|
+
};
|
|
20
|
+
export declare const useHookDefault: (defaultValues?: any) => any;
|
|
21
|
+
export {};
|
|
@@ -11,7 +11,7 @@ import React from 'react';
|
|
|
11
11
|
* @internal
|
|
12
12
|
*/
|
|
13
13
|
export declare const useTemplateBlockContext: () => {
|
|
14
|
-
|
|
14
|
+
templateFinished?: boolean;
|
|
15
15
|
onTemplateSuccess?: Function;
|
|
16
16
|
};
|
|
17
17
|
declare const TemplateBlockProvider: (props: any) => React.JSX.Element;
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { ChangeEvent } from 'react';
|
|
10
10
|
import { VariableOption, VariablesContextType } from '../../variables/types';
|
|
11
|
+
export * from './useBlockHeightProps';
|
|
11
12
|
export * from './useDataBlockParentRecord';
|
|
12
13
|
export * from './useFormActiveFields';
|
|
13
14
|
export * from './useParsedFilter';
|
|
14
|
-
export * from './useBlockHeightProps';
|
|
15
15
|
export declare const usePickActionProps: () => {
|
|
16
16
|
onClick(): void;
|
|
17
17
|
};
|
|
@@ -38,6 +38,9 @@ export interface FilterTarget {
|
|
|
38
38
|
/** associated field */
|
|
39
39
|
field?: string;
|
|
40
40
|
}[];
|
|
41
|
+
/**
|
|
42
|
+
* 筛选表单区块的 uid
|
|
43
|
+
*/
|
|
41
44
|
uid?: string;
|
|
42
45
|
}
|
|
43
46
|
export declare const findFilterTargets: (fieldSchema: any) => FilterTarget;
|
package/es/i18n/i18n.d.ts
CHANGED
|
@@ -7,5 +7,9 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import { TFuncKey, TOptions } from 'i18next';
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated
|
|
12
|
+
* use {@link @nocobase/utils/client#tval} instead
|
|
13
|
+
*/
|
|
10
14
|
export declare function tval(text: TFuncKey | TFuncKey[], options?: TOptions): string;
|
|
11
15
|
export declare const i18n: import("i18next").i18n;
|
package/es/index.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export * from './testUtils';
|
|
|
54
54
|
export * from './user';
|
|
55
55
|
export * from './variables';
|
|
56
56
|
export { withDynamicSchemaProps } from './hoc/withDynamicSchemaProps';
|
|
57
|
+
export { SchemaSettingsActionLinkItem } from './modules/actions/link/customizeLinkActionSettings';
|
|
57
58
|
export * from './modules/blocks/BlockSchemaToolbar';
|
|
58
59
|
export * from './modules/blocks/data-blocks/form';
|
|
59
60
|
export * from './modules/blocks/data-blocks/table';
|