@nocobase/client 1.6.0-alpha.27 → 1.6.0-alpha.29
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/hooks/useRequest.d.ts +2 -0
- package/es/application/Application.d.ts +5 -2
- package/es/application/CustomRouterContextProvider.d.ts +4 -1
- package/es/{user/SwitchRole.d.ts → application/hooks/useAclSnippets.d.ts} +3 -1
- package/es/application/hooks/useAppSpin.d.ts +1 -1
- package/es/application/schema-initializer/hooks/useGetSchemaInitializerMenuItems.d.ts +1 -1
- package/es/application/schema-settings/hooks/useSchemaSettingsRender.d.ts +4 -4
- package/es/application/schema-settings/types.d.ts +1 -0
- package/es/collection-manager/hooks/useCollectionManager_deprecated.d.ts +4 -4
- package/es/data-source/collection-template/CollectionTemplate.d.ts +1 -1
- package/es/filter-provider/utils.d.ts +1 -1
- package/es/global-theme/type.d.ts +2 -0
- package/es/hooks/useMenuItem.d.ts +3 -1
- package/es/index.mjs +5535 -5601
- package/es/lazy-helper/index.d.ts +6 -5
- package/es/modules/blocks/data-blocks/details-multi/DetailsBlockInitializer.d.ts +3 -1
- package/es/modules/blocks/data-blocks/details-single/RecordReadPrettyFormBlockInitializer.d.ts +3 -1
- package/es/modules/blocks/data-blocks/form/FormBlockInitializer.d.ts +8 -2
- package/es/modules/blocks/data-blocks/form/RecordFormBlockInitializer.d.ts +6 -2
- package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.d.ts +8 -2
- package/es/{user/EditProfile.d.ts → route-switch/antd/admin-layout/LanguageSettings.d.ts} +2 -1
- package/es/{user/ChangePassword.d.ts → route-switch/antd/admin-layout/UserCenterButton.d.ts} +3 -1
- package/es/route-switch/antd/admin-layout/userCenterSettings.d.ts +11 -0
- package/es/schema-component/antd/action/hooks.d.ts +1 -1
- package/es/schema-component/antd/date-picker/util.d.ts +1 -1
- package/es/schema-component/antd/form-item/FormItem.Settings.d.ts +57 -1
- package/es/schema-component/antd/menu/Menu.d.ts +3 -3
- package/es/schema-component/antd/pagination/index.d.ts +5 -1
- package/es/schema-component/antd/record-picker/util.d.ts +1 -1
- package/es/schema-component/antd/select/ReadPretty.d.ts +5 -1
- package/es/schema-component/antd/variable/TextAreaWithGlobalScope.d.ts +1 -0
- package/es/schema-component/antd/variable/VariableSelect.d.ts +2 -1
- package/es/{user/LanguageSettings.d.ts → schema-initializer/components/DeprecatedTemplateTitle.d.ts} +3 -1
- package/es/schema-initializer/hooks/useTemplateBlockNotifier.d.ts +14 -0
- package/es/schema-initializer/index.d.ts +1 -1
- package/es/schema-initializer/items/RecordAssociationBlockInitializer.d.ts +3 -1
- package/es/schema-initializer/items/RecordAssociationDetailsBlockInitializer.d.ts +3 -1
- package/es/schema-initializer/items/RecordAssociationFormBlockInitializer.d.ts +6 -2
- package/es/schema-initializer/items/RecordAssociationGridCardBlockInitializer.d.ts +3 -1
- package/es/schema-initializer/items/RecordAssociationListBlockInitializer.d.ts +3 -1
- package/es/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.d.ts +6 -2
- package/es/schema-initializer/utils.d.ts +2 -22
- package/es/schema-settings/DataTemplates/FormDataTemplates.d.ts +3 -1
- package/es/schema-settings/EnableChildCollections/index.d.ts +3 -1
- package/es/schema-settings/LinkageRules/index.d.ts +5 -1
- package/es/schema-settings/SchemaSettingAccessControl.d.ts +15 -0
- package/es/schema-settings/SchemaSettings.d.ts +1 -0
- package/es/schema-settings/VariableInput/VariableInput.d.ts +3 -1
- package/es/schema-settings/index.d.ts +1 -0
- package/es/user/CurrentUser.d.ts +4 -9
- package/es/user/CurrentUserProvider.d.ts +0 -4
- package/lib/index.js +144 -151
- package/lib/locale/en-US.js +4 -1
- package/lib/locale/es-ES.js +4 -1
- package/lib/locale/fr-FR.js +4 -1
- package/lib/locale/it-IT.js +861 -0
- package/lib/locale/ja-JP.js +4 -1
- package/lib/locale/ko-KR.js +4 -1
- package/lib/locale/pt-BR.js +4 -1
- package/lib/locale/ru-RU.js +4 -1
- package/lib/locale/tr-TR.js +4 -1
- package/lib/locale/uk-UA.js +4 -1
- package/lib/locale/zh-CN.js +5 -2
- package/lib/locale/zh-TW.js +4 -1
- package/package.json +7 -6
|
@@ -17,6 +17,8 @@ export type ResourceActionOptions<P = any> = {
|
|
|
17
17
|
action?: string;
|
|
18
18
|
params?: P;
|
|
19
19
|
url?: string;
|
|
20
|
+
skipNotify?: boolean | ((error: any) => boolean);
|
|
21
|
+
skipAuth?: boolean;
|
|
20
22
|
};
|
|
21
23
|
export type UseRequestService<P> = AxiosRequestConfig<P> | ResourceActionOptions<P> | FunctionService;
|
|
22
24
|
export type UseRequestOptions = Options<any, any> & {
|
|
@@ -15,7 +15,7 @@ import { PluginSettingOptions, PluginSettingsManager } from './PluginSettingsMan
|
|
|
15
15
|
import { ComponentTypeAndString, RouterManager, RouterOptions } from './RouterManager';
|
|
16
16
|
import { WebSocketClient, WebSocketClientOptions } from './WebSocketClient';
|
|
17
17
|
import { SchemaInitializer, SchemaInitializerManager } from './schema-initializer';
|
|
18
|
-
import { SchemaSettings, SchemaSettingsManager } from './schema-settings';
|
|
18
|
+
import { SchemaSettings, SchemaSettingsManager, SchemaSettingsItemType } from './schema-settings';
|
|
19
19
|
import { CollectionFieldInterfaceComponentOption } from '../data-source/collection-field-interface/CollectionFieldInterface';
|
|
20
20
|
import { DataSourceManager, type DataSourceManagerOptions } from '../data-source/data-source/DataSourceManager';
|
|
21
21
|
import type { CollectionFieldInterfaceFactory } from '../data-source';
|
|
@@ -123,10 +123,13 @@ export declare class Application {
|
|
|
123
123
|
getRootComponent(): React.FC<{
|
|
124
124
|
children?: React.ReactNode;
|
|
125
125
|
}>;
|
|
126
|
-
mount(containerOrSelector: Element | ShadowRoot | string):
|
|
126
|
+
mount(containerOrSelector: Element | ShadowRoot | string): import("react-dom/client").Root;
|
|
127
127
|
addFieldInterfaces(fieldInterfaceClasses?: CollectionFieldInterfaceFactory[]): void;
|
|
128
128
|
addFieldInterfaceComponentOption(fieldName: string, componentOption: CollectionFieldInterfaceComponentOption): void;
|
|
129
129
|
addGlobalVar(key: string, value: any): void;
|
|
130
130
|
getGlobalVar(key: any): any;
|
|
131
|
+
addUserCenterSettingsItem(item: SchemaSettingsItemType & {
|
|
132
|
+
aclSnippet?: string;
|
|
133
|
+
}): void;
|
|
131
134
|
}
|
|
132
135
|
export {};
|
|
@@ -47,5 +47,8 @@ export declare const useRouterBasename: () => string;
|
|
|
47
47
|
* Used to determine if the user closed the sub-page by clicking on the page menu
|
|
48
48
|
* @returns
|
|
49
49
|
*/
|
|
50
|
-
export declare const useIsSubPageClosedByPageMenu: (fieldSchema: Schema) =>
|
|
50
|
+
export declare const useIsSubPageClosedByPageMenu: (fieldSchema: Schema) => {
|
|
51
|
+
isSubPageClosedByPageMenu: () => boolean;
|
|
52
|
+
reset: () => void;
|
|
53
|
+
};
|
|
51
54
|
export declare const CustomRouterContextProvider: FC;
|
|
@@ -6,4 +6,6 @@
|
|
|
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
|
-
export declare const
|
|
9
|
+
export declare const useAclSnippets: () => {
|
|
10
|
+
allow: (aclSnippet: any) => any;
|
|
11
|
+
};
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
10
|
export declare const useAppSpin: () => {
|
|
11
|
-
render: () => React.ReactElement<any, string | React.JSXElementConstructor<any
|
|
11
|
+
render: () => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
12
12
|
};
|
|
@@ -13,4 +13,4 @@ export declare function useSchemaInitializerMenuItems(items: any[], name?: strin
|
|
|
13
13
|
/**
|
|
14
14
|
* @internal
|
|
15
15
|
*/
|
|
16
|
-
export declare function useGetSchemaInitializerMenuItems(onClick?: (args: any) => void): any;
|
|
16
|
+
export declare function useGetSchemaInitializerMenuItems(onClick?: (args: any) => void): (items: any[], parentKey: string) => any;
|
|
@@ -6,13 +6,13 @@
|
|
|
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 { SchemaSettingOptions } from '../types';
|
|
10
|
-
import React from 'react';
|
|
11
|
-
import { SchemaSettingsProps } from '../../../schema-settings';
|
|
12
|
-
import { Schema } from '@formily/json-schema';
|
|
13
9
|
import { GeneralField } from '@formily/core';
|
|
10
|
+
import { Schema } from '@formily/json-schema';
|
|
11
|
+
import React from 'react';
|
|
14
12
|
import { Designable } from '../../../schema-component';
|
|
13
|
+
import { SchemaSettingsProps } from '../../../schema-settings';
|
|
15
14
|
import { SchemaSettings } from '../SchemaSettings';
|
|
15
|
+
import { SchemaSettingOptions } from '../types';
|
|
16
16
|
type UseSchemaSettingsRenderOptions<T = {}> = Omit<SchemaSettingOptions<T>, 'name' | 'items'> & Omit<SchemaSettingsProps, 'title' | 'children'> & {
|
|
17
17
|
fieldSchema?: Schema;
|
|
18
18
|
field?: GeneralField;
|
|
@@ -10,6 +10,7 @@ import { ComponentType } from 'react';
|
|
|
10
10
|
import { SchemaSettingsActionModalItemProps, SchemaSettingsCascaderItemProps, SchemaSettingsItemProps, SchemaSettingsModalItemProps, SchemaSettingsPopupProps, SchemaSettingsRemoveProps, SchemaSettingsSelectItemProps, SchemaSettingsSubMenuProps, SchemaSettingsSwitchItemProps } from '../../schema-settings';
|
|
11
11
|
export interface SchemaSettingOptions<T = {}> {
|
|
12
12
|
name: string;
|
|
13
|
+
mode?: 'inline' | 'dropdown';
|
|
13
14
|
Component?: ComponentType<T>;
|
|
14
15
|
componentProps?: T;
|
|
15
16
|
items: SchemaSettingsItemType[];
|
|
@@ -15,12 +15,12 @@ export declare const useCollectionManager_deprecated: (dataSourceName?: string)
|
|
|
15
15
|
interfaces: {};
|
|
16
16
|
collections: import("../..").Collection[];
|
|
17
17
|
templates: import("../..").CollectionTemplate[];
|
|
18
|
-
getTemplate: (name?:
|
|
19
|
-
getInterface: (name: string) =>
|
|
18
|
+
getTemplate: (name?: string) => import("../..").CollectionTemplate;
|
|
19
|
+
getInterface: (name: string) => import("../..").CollectionFieldInterface;
|
|
20
20
|
getCollections: () => CollectionOptions[];
|
|
21
21
|
getParentCollectionFields: (parentCollection: any, currentCollection: any, customDataSource?: string) => import("../..").CollectionFieldOptions[];
|
|
22
22
|
getInheritCollections: (name: any, customDataSource?: string) => string[];
|
|
23
|
-
getChildrenCollections: (name: string, isSupportView?:
|
|
23
|
+
getChildrenCollections: (name: string, isSupportView?: boolean, customDataSource?: string) => import("../..").Collection[];
|
|
24
24
|
refreshCM: () => Promise<void>;
|
|
25
25
|
get: (name: any, customDataSource?: string) => CollectionOptions;
|
|
26
26
|
getInheritedFields: (name: string, customDataSource?: string) => import("../..").CollectionFieldOptions[];
|
|
@@ -58,5 +58,5 @@ export declare const useCollectionManager_deprecated: (dataSourceName?: string)
|
|
|
58
58
|
getCollectionJoinField: (name: string, customDataSource?: string) => any;
|
|
59
59
|
getAllCollectionsInheritChain: (collectionName: string, customDataSource?: string) => string[];
|
|
60
60
|
getInheritCollectionsChain: (collectionName: string, customDataSource?: string) => () => string[];
|
|
61
|
-
isTitleField: (field: any) =>
|
|
61
|
+
isTitleField: (field: any) => boolean;
|
|
62
62
|
};
|
|
@@ -54,7 +54,7 @@ export declare abstract class CollectionTemplate {
|
|
|
54
54
|
/** UI configurable CollectionOptions parameters (fields for adding or editing Collection forms) */
|
|
55
55
|
configurableProperties?: Record<string, ISchema>;
|
|
56
56
|
/** Available field types for the current template */
|
|
57
|
-
availableFieldInterfaces?: AvailableFieldInterfacesInclude
|
|
57
|
+
availableFieldInterfaces?: AvailableFieldInterfacesInclude & AvailableFieldInterfacesExclude;
|
|
58
58
|
/** Whether it is a divider */
|
|
59
59
|
divider?: boolean;
|
|
60
60
|
/** Template description */
|
|
@@ -40,6 +40,6 @@ export declare const useFilterAPI: () => {
|
|
|
40
40
|
/** 当前区块是否已连接其它区块 */
|
|
41
41
|
isConnected: boolean;
|
|
42
42
|
/** 调用该方法进行过滤 */
|
|
43
|
-
doFilter: (value: any, field?: string | ((target: FilterTarget['targets'][0]) => string), operator?: string | ((target: FilterTarget['targets'][0]) => string)) => void;
|
|
43
|
+
doFilter: (value: any, field?: string | ((target: FilterTarget['targets'][0], block: DataBlock) => string), operator?: string | ((target: FilterTarget['targets'][0]) => string)) => void;
|
|
44
44
|
};
|
|
45
45
|
export declare const isInFilterFormBlock: (fieldSchema: Schema) => boolean;
|
|
@@ -27,6 +27,8 @@ export interface CustomToken extends AliasToken {
|
|
|
27
27
|
colorSettings: string;
|
|
28
28
|
/** 鼠标悬浮时显示的背景色 */
|
|
29
29
|
colorBgSettingsHover: string;
|
|
30
|
+
/** 鼠标悬浮模板区块时显示的背景色 */
|
|
31
|
+
colorTemplateBgSettingsHover: string;
|
|
30
32
|
/** 鼠标悬浮时显示的边框色 */
|
|
31
33
|
colorBorderSettingsHover: string;
|
|
32
34
|
/** 页面左右内边距 */
|
|
@@ -37,7 +37,9 @@ export declare const useCollectMenuItems: () => {
|
|
|
37
37
|
* @returns
|
|
38
38
|
*/
|
|
39
39
|
export declare const useMenuItem: () => {
|
|
40
|
-
Component: ({ limitCount }:
|
|
40
|
+
Component: ({ limitCount }: {
|
|
41
|
+
limitCount?: number;
|
|
42
|
+
}) => React.JSX.Element;
|
|
41
43
|
getMenuItems: (Com: () => ReactNode) => Item[];
|
|
42
44
|
getMenuItem: (Com: () => JSX.Element) => Item;
|
|
43
45
|
clean: () => void;
|