@nocobase/client 1.6.0-beta.9 → 1.6.1

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.
Files changed (81) hide show
  1. package/es/api-client/hooks/useRequest.d.ts +2 -0
  2. package/es/application/Application.d.ts +7 -2
  3. package/es/{user/SwitchRole.d.ts → application/hooks/useAclSnippets.d.ts} +3 -1
  4. package/es/application/hooks/useAppSpin.d.ts +1 -1
  5. package/es/application/schema-initializer/hooks/useGetSchemaInitializerMenuItems.d.ts +1 -1
  6. package/es/application/schema-settings/hooks/useSchemaSettingsRender.d.ts +4 -4
  7. package/es/application/schema-settings/types.d.ts +1 -0
  8. package/es/collection-manager/hooks/useCollectionManager_deprecated.d.ts +4 -4
  9. package/es/collection-manager/interfaces/properties/index.d.ts +3 -0
  10. package/es/collection-manager/interfaces/time.d.ts +0 -11
  11. package/es/data-source/collection-template/CollectionTemplate.d.ts +1 -1
  12. package/es/filter-provider/utils.d.ts +1 -1
  13. package/es/{user/ChangePassword.d.ts → hoc/withTooltipComponent.d.ts} +2 -1
  14. package/es/hooks/useMenuItem.d.ts +3 -1
  15. package/es/index.css +1 -1
  16. package/es/index.d.ts +2 -4
  17. package/es/index.mjs +35145 -34574
  18. package/es/lazy-helper/index.d.ts +6 -5
  19. package/es/modules/blocks/data-blocks/details-multi/DetailsBlockInitializer.d.ts +3 -1
  20. package/es/modules/blocks/data-blocks/details-single/RecordReadPrettyFormBlockInitializer.d.ts +3 -1
  21. package/es/modules/blocks/data-blocks/form/FormBlockInitializer.d.ts +8 -2
  22. package/es/modules/blocks/data-blocks/form/RecordFormBlockInitializer.d.ts +6 -2
  23. package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.d.ts +8 -2
  24. package/es/modules/fields/component/TimePicker/timePickerComponentFieldSettings.d.ts +10 -0
  25. package/es/modules/menu/GroupItem.d.ts +0 -16
  26. package/es/modules/menu/LinkMenuItem.d.ts +0 -20
  27. package/es/modules/menu/PageMenuItem.d.ts +6 -22
  28. package/es/modules/popup/PopupContextProvider.d.ts +2 -0
  29. package/es/nocobase-buildin-plugin/index.d.ts +2 -0
  30. package/es/{user/EditProfile.d.ts → route-switch/antd/admin-layout/LanguageSettings.d.ts} +2 -1
  31. package/es/{user/LanguageSettings.d.ts → route-switch/antd/admin-layout/UserCenterButton.d.ts} +3 -1
  32. package/es/route-switch/antd/admin-layout/convertRoutesToSchema.d.ts +1 -62
  33. package/es/route-switch/antd/admin-layout/index.d.ts +6 -1
  34. package/es/route-switch/antd/admin-layout/menuItemSettings.d.ts +21 -0
  35. package/es/route-switch/antd/admin-layout/userCenterSettings.d.ts +11 -0
  36. package/es/schema-component/antd/action/hooks.d.ts +1 -1
  37. package/es/schema-component/antd/action/zIndexContext.d.ts +1 -0
  38. package/es/schema-component/antd/form-drawer/index.d.ts +36 -0
  39. package/es/schema-component/antd/form-item/FormItem.Settings.d.ts +57 -1
  40. package/es/schema-component/antd/index.d.ts +1 -0
  41. package/es/schema-component/antd/menu/Menu.d.ts +6 -5
  42. package/es/schema-component/antd/menu/index.d.ts +1 -0
  43. package/es/schema-component/antd/page/Page.d.ts +1 -0
  44. package/es/schema-component/antd/page/PageTabDesigner.d.ts +1 -3
  45. package/es/schema-component/antd/page/pagePopupUtils.d.ts +1 -0
  46. package/es/schema-component/antd/pagination/index.d.ts +5 -1
  47. package/es/schema-component/antd/record-picker/util.d.ts +1 -1
  48. package/es/schema-component/antd/select/ReadPretty.d.ts +5 -1
  49. package/es/schema-initializer/items/DataBlockInitializer.d.ts +1 -0
  50. package/es/schema-initializer/items/RecordAssociationBlockInitializer.d.ts +3 -1
  51. package/es/schema-initializer/items/RecordAssociationDetailsBlockInitializer.d.ts +3 -1
  52. package/es/schema-initializer/items/RecordAssociationFormBlockInitializer.d.ts +6 -2
  53. package/es/schema-initializer/items/RecordAssociationGridCardBlockInitializer.d.ts +3 -1
  54. package/es/schema-initializer/items/RecordAssociationListBlockInitializer.d.ts +3 -1
  55. package/es/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.d.ts +6 -2
  56. package/es/schema-settings/DataTemplates/FormDataTemplates.d.ts +3 -1
  57. package/es/schema-settings/EnableChildCollections/index.d.ts +3 -1
  58. package/es/schema-settings/GeneralSchemaDesigner.d.ts +5 -0
  59. package/es/schema-settings/LinkageRules/index.d.ts +5 -1
  60. package/es/schema-settings/SchemaSettingAccessControl.d.ts +14 -0
  61. package/es/schema-settings/SchemaSettings.d.ts +1 -0
  62. package/es/schema-settings/SchemaSettingsTimeFormat.d.ts +13 -0
  63. package/es/schema-settings/VariableInput/VariableInput.d.ts +3 -1
  64. package/es/schema-settings/index.d.ts +1 -0
  65. package/es/user/CurrentUser.d.ts +4 -9
  66. package/es/user/CurrentUserProvider.d.ts +0 -4
  67. package/lib/index.css +1 -1
  68. package/lib/index.js +407 -413
  69. package/lib/locale/en-US.js +3 -1
  70. package/lib/locale/es-ES.js +3 -1
  71. package/lib/locale/fr-FR.js +3 -1
  72. package/lib/locale/it-IT.js +861 -0
  73. package/lib/locale/ja-JP.js +3 -1
  74. package/lib/locale/ko-KR.js +3 -1
  75. package/lib/locale/pt-BR.js +3 -1
  76. package/lib/locale/ru-RU.js +3 -1
  77. package/lib/locale/tr-TR.js +3 -1
  78. package/lib/locale/uk-UA.js +3 -1
  79. package/lib/locale/zh-CN.js +4 -2
  80. package/lib/locale/zh-TW.js +3 -1
  81. package/package.json +8 -7
@@ -6,9 +6,11 @@
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, { ComponentType } from 'react';
10
9
  import { useImported } from 'react-imported-component';
11
10
  export declare const LAZY_COMPONENT_KEY: unique symbol;
11
+ type LazyComponentType<M extends Record<string, any>, K extends keyof M> = {
12
+ [P in K]: M[P];
13
+ };
12
14
  /**
13
15
  * Lazily loads a React component or multiple components.
14
16
  *
@@ -26,10 +28,8 @@ export declare const LAZY_COMPONENT_KEY: unique symbol;
26
28
  * @param {...K[]} componentNames - The names of the components to be lazy-loaded from the module.
27
29
  * @returns {Record<K, React.LazyExoticComponent<M[K]>>} An object containing the lazy-loaded components.
28
30
  */
29
- export declare function lazy<M extends ComponentType<any>>(factory: () => Promise<{
30
- default: M;
31
- }>): React.LazyExoticComponent<M>;
32
- export declare function lazy<M extends Record<string, any>, K extends keyof M & string>(factory: () => Promise<M>, ...componentNames: K[]): Record<K, React.LazyExoticComponent<M[K]>>;
31
+ export declare function lazy<M extends Record<'default', any>>(factory: () => Promise<M>): M['default'];
32
+ export declare function lazy<M extends Record<string, any>, K extends keyof M = keyof M>(factory: () => Promise<M>, ...componentNames: K[]): LazyComponentType<M, K>;
33
33
  /**
34
34
  * A hook to lazily load a module and return a specific export from it.
35
35
  *
@@ -46,3 +46,4 @@ export declare function lazy<M extends Record<string, any>, K extends keyof M &
46
46
  * @throws {Promise} Throws a promise while the module is being loaded.
47
47
  */
48
48
  export declare function useLazy<T = () => any>(importor: Parameters<typeof useImported>[0], picker: string | ((module: any) => T)): T;
49
+ export {};
@@ -28,5 +28,7 @@ export declare const DetailsBlockInitializer: ({ filterCollections, onlyCurrentD
28
28
  hideChildrenIfSingleCollection?: boolean;
29
29
  }) => React.JSX.Element;
30
30
  export declare const useCreateDetailsBlock: () => {
31
- createDetailsBlock: ({ item }: any) => void;
31
+ createDetailsBlock: ({ item }: {
32
+ item: any;
33
+ }) => void;
32
34
  };
@@ -9,6 +9,8 @@
9
9
  import React from 'react';
10
10
  export declare const RecordReadPrettyFormBlockInitializer: () => React.JSX.Element;
11
11
  export declare function useCreateSingleDetailsSchema(): {
12
- createSingleDetailsSchema: ({ item }: any) => Promise<void>;
12
+ createSingleDetailsSchema: ({ item }: {
13
+ item: any;
14
+ }) => Promise<void>;
13
15
  templateWrap: (templateSchema: any, options: any) => any;
14
16
  };
@@ -35,6 +35,12 @@ export declare const FormBlockInitializer: ({ filterCollections, onlyCurrentData
35
35
  otherText?: string;
36
36
  }) => React.JSX.Element;
37
37
  export declare const useCreateFormBlock: () => {
38
- createFormBlock: ({ item, fromOthersInPopup }: any) => void;
39
- templateWrap: (templateSchema: any, { item, fromOthersInPopup }: any) => any;
38
+ createFormBlock: ({ item, fromOthersInPopup }: {
39
+ item: any;
40
+ fromOthersInPopup: any;
41
+ }) => void;
42
+ templateWrap: (templateSchema: any, { item, fromOthersInPopup }: {
43
+ item: any;
44
+ fromOthersInPopup: any;
45
+ }) => any;
40
46
  };
@@ -12,6 +12,10 @@ import React from 'react';
12
12
  */
13
13
  export declare const RecordFormBlockInitializer: () => React.JSX.Element;
14
14
  export declare function useCreateEditFormBlock(): {
15
- createEditFormBlock: ({ item }: any) => void;
16
- templateWrap: (templateSchema: any, { item }: any) => any;
15
+ createEditFormBlock: ({ item }: {
16
+ item: any;
17
+ }) => void;
18
+ templateWrap: (templateSchema: any, { item }: {
19
+ item: any;
20
+ }) => any;
17
21
  };
@@ -21,8 +21,14 @@ export declare const useTableBlockProps: () => {
21
21
  onChange: () => void;
22
22
  };
23
23
  onRowSelectionChange: (selectedRowKeys: any, selectedRowData: any) => void;
24
- onRowDragEnd: ({ from, to }: any) => Promise<void>;
25
- onChange: ({ current, pageSize }: any, filters: any, sorter: any) => void;
24
+ onRowDragEnd: ({ from, to }: {
25
+ from: any;
26
+ to: any;
27
+ }) => Promise<void>;
28
+ onChange: ({ current, pageSize }: {
29
+ current: any;
30
+ pageSize: any;
31
+ }, filters: any, sorter: any) => void;
26
32
  onClickRow: (record: any, setSelectedRow: any, selectedRow: any) => void;
27
33
  onExpand: (expanded: any, record: any) => void;
28
34
  };
@@ -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
+ import { SchemaSettings } from '../../../../application/schema-settings/SchemaSettings';
10
+ export declare const timePickerComponentFieldSettings: SchemaSettings<{}>;
@@ -8,19 +8,3 @@
8
8
  */
9
9
  import React from 'react';
10
10
  export declare const GroupItem: () => React.JSX.Element;
11
- export declare function getGroupMenuSchema({ title, icon, schemaUid, route }: {
12
- title: any;
13
- icon: any;
14
- schemaUid: any;
15
- route?: any;
16
- }): {
17
- type: string;
18
- title: any;
19
- 'x-component': string;
20
- 'x-decorator': string;
21
- 'x-component-props': {
22
- icon: any;
23
- };
24
- 'x-uid': any;
25
- __route__: any;
26
- };
@@ -8,23 +8,3 @@
8
8
  */
9
9
  import React from 'react';
10
10
  export declare const LinkMenuItem: () => React.JSX.Element;
11
- export declare function getLinkMenuSchema({ title, icon, schemaUid, href, params, route }: {
12
- title: any;
13
- icon: any;
14
- schemaUid: any;
15
- href: any;
16
- params: any;
17
- route?: any;
18
- }): {
19
- type: string;
20
- title: any;
21
- 'x-component': string;
22
- 'x-decorator': string;
23
- 'x-component-props': {
24
- icon: any;
25
- href: any;
26
- params: any;
27
- };
28
- 'x-uid': any;
29
- __route__: any;
30
- };
@@ -7,40 +7,24 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import React from 'react';
10
+ export declare const useInsertPageSchema: () => (schema: any) => Promise<void>;
10
11
  export declare const PageMenuItem: () => React.JSX.Element;
11
- export declare function getPageMenuSchema({ title, icon, pageSchemaUid, tabSchemaUid, menuSchemaUid, tabSchemaName, route, }: {
12
- title: any;
13
- icon: any;
12
+ export declare function getPageMenuSchema({ pageSchemaUid, tabSchemaUid, tabSchemaName }: {
14
13
  pageSchemaUid: any;
15
14
  tabSchemaUid: any;
16
- menuSchemaUid: any;
17
15
  tabSchemaName: any;
18
- route?: any;
19
16
  }): {
20
17
  type: string;
21
- title: any;
22
18
  'x-component': string;
23
- 'x-decorator': string;
24
- 'x-component-props': {
25
- icon: any;
26
- };
27
19
  properties: {
28
- page: {
20
+ [x: number]: {
29
21
  type: string;
30
22
  'x-component': string;
31
- 'x-async': boolean;
32
- properties: {
33
- [x: number]: {
34
- type: string;
35
- 'x-component': string;
36
- 'x-initializer': string;
37
- properties: {};
38
- 'x-uid': any;
39
- };
40
- };
23
+ 'x-initializer': string;
24
+ properties: {};
41
25
  'x-uid': any;
26
+ 'x-async': boolean;
42
27
  };
43
28
  };
44
29
  'x-uid': any;
45
- __route__: any;
46
30
  };
@@ -15,4 +15,6 @@ import React from 'react';
15
15
  export declare const PopupContextProvider: React.FC<{
16
16
  visible?: boolean;
17
17
  setVisible?: (visible: boolean) => void;
18
+ openMode?: string;
19
+ openSize?: string;
18
20
  }>;
@@ -6,7 +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
+ import React from 'react';
9
10
  import { Plugin } from '../application/Plugin';
11
+ export declare const AppNotFound: () => React.JSX.Element;
10
12
  export declare class NocoBaseBuildInPlugin extends Plugin {
11
13
  afterAdd(): Promise<void>;
12
14
  load(): Promise<void>;
@@ -6,4 +6,5 @@
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 useEditProfile: () => import("antd/es/menu/hooks/useItems").ItemType;
9
+ import React from 'react';
10
+ export declare const LanguageSettings: () => React.JSX.Element;
@@ -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 useLanguageSettings: () => import("antd/es/menu/hooks/useItems").ItemType;
9
+ import React from 'react';
10
+ export declare const UserCenterButton: () => React.JSX.Element;
11
+ export declare function UserCenter(): React.JSX.Element;
@@ -20,6 +20,7 @@ export interface NocoBaseDesktopRoute {
20
20
  parentId?: number;
21
21
  children?: NocoBaseDesktopRoute[];
22
22
  title?: string;
23
+ tooltip?: string;
23
24
  icon?: string;
24
25
  schemaUid?: string;
25
26
  menuSchemaUid?: string;
@@ -45,65 +46,3 @@ export interface NocoBaseDesktopRoute {
45
46
  createdBy?: any;
46
47
  updatedBy?: any;
47
48
  }
48
- /**
49
- * 为了简化菜单的重构,直接讲路由数据转换为 Schema 数据。这样就可以实现在不大改组件的前提下,完成菜单的重构。
50
- * 注:菜单重构指的是将菜单的结构由原来的 Schema 结构改为一个树结构,并保存在 desktopRoutes 中。
51
- * @param routes
52
- */
53
- export declare function convertRoutesToSchema(routes: NocoBaseDesktopRoute[]): import("@formily/json-schema").Stringify<{
54
- [key: symbol]: any;
55
- [key: `x-${string}`]: any;
56
- [key: `x-${number}`]: any;
57
- version?: string;
58
- name?: import("@formily/json-schema").SchemaKey;
59
- title?: any;
60
- description?: any;
61
- default?: any;
62
- readOnly?: boolean;
63
- writeOnly?: boolean;
64
- type?: import("@formily/json-schema").SchemaTypes;
65
- enum?: import("@formily/json-schema").SchemaEnum<any>;
66
- const?: any;
67
- multipleOf?: number;
68
- maximum?: number;
69
- exclusiveMaximum?: number;
70
- minimum?: number;
71
- exclusiveMinimum?: number;
72
- maxLength?: number;
73
- minLength?: number;
74
- pattern?: string | RegExp;
75
- maxItems?: number;
76
- minItems?: number;
77
- uniqueItems?: boolean;
78
- maxProperties?: number;
79
- minProperties?: number;
80
- required?: string | boolean | string[];
81
- format?: string;
82
- $ref?: string;
83
- $namespace?: string;
84
- definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
85
- properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
86
- items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any>;
87
- additionalItems?: import("@formily/json-schema").Stringify<any>;
88
- patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any>;
89
- additionalProperties?: import("@formily/json-schema").Stringify<any>;
90
- "x-value"?: any;
91
- "x-index"?: number;
92
- "x-pattern"?: any;
93
- "x-display"?: any;
94
- "x-validator"?: any;
95
- "x-decorator"?: any;
96
- "x-decorator-props"?: any;
97
- "x-component"?: any;
98
- "x-component-props"?: any;
99
- "x-reactions"?: import("@formily/json-schema").SchemaReactions<any>;
100
- "x-content"?: any;
101
- "x-data"?: any;
102
- "x-visible"?: boolean;
103
- "x-hidden"?: boolean;
104
- "x-disabled"?: boolean;
105
- "x-editable"?: boolean;
106
- "x-read-only"?: boolean;
107
- "x-read-pretty"?: boolean;
108
- "x-compile-omitted"?: string[];
109
- }>;
@@ -6,11 +6,15 @@
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
+ import React, { FC } from 'react';
10
10
  import { Plugin } from '../../../application/Plugin';
11
11
  import { KeepAlive } from './KeepAlive';
12
12
  import { NocoBaseDesktopRoute, NocoBaseDesktopRouteType } from './convertRoutesToSchema';
13
13
  export { KeepAlive, NocoBaseDesktopRouteType };
14
+ export declare const NocoBaseRouteContext: React.Context<NocoBaseDesktopRoute>;
15
+ export declare const CurrentRouteProvider: FC<{
16
+ uid: string;
17
+ }>;
14
18
  export declare const useCurrentRoute: () => NocoBaseDesktopRoute;
15
19
  export declare const useAllAccessDesktopRoutes: () => {
16
20
  allAccessRoutes: NocoBaseDesktopRoute[];
@@ -25,3 +29,4 @@ export declare class AdminLayoutPlugin extends Plugin {
25
29
  afterAdd(): Promise<void>;
26
30
  load(): Promise<void>;
27
31
  }
32
+ export declare function findRouteBySchemaUid(schemaUid: string, treeArray: any[]): any;
@@ -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 { FC } from 'react';
10
+ import { SchemaSettings } from '../../../application/schema-settings/SchemaSettings';
11
+ export declare const RemoveRoute: FC;
12
+ export declare const menuItemSettings: SchemaSettings<{}>;
13
+ export declare const MenuSchemaToolbar: FC<{
14
+ container?: HTMLElement;
15
+ }>;
16
+ /**
17
+ * 重置主题,避免被 ProLayout 的主题影响
18
+ * @param props
19
+ * @returns
20
+ */
21
+ export declare const ResetThemeTokenAndKeepAlgorithm: FC;
@@ -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 { SchemaSettings } from '../../../application/schema-settings/SchemaSettings';
10
+ declare const userCenterSettings: SchemaSettings<{}>;
11
+ export { userCenterSettings };
@@ -8,7 +8,7 @@
8
8
  */
9
9
  /// <reference types="react" />
10
10
  export declare const useActionContext: () => {
11
- setVisible: (visible: boolean, confirm?: any) => void;
11
+ setVisible: (visible: boolean, confirm?: boolean) => void;
12
12
  button?: import("react").JSX.Element;
13
13
  visible?: boolean;
14
14
  openMode?: "page" | "modal" | "drawer";
@@ -9,3 +9,4 @@
9
9
  import React from 'react';
10
10
  export declare const zIndexContext: React.Context<number>;
11
11
  export declare const useZIndexContext: () => number;
12
+ export declare const getZIndex: (type: 'page' | 'drawer' | 'modal', basicZIndex: number, level: number) => number;
@@ -0,0 +1,36 @@
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 { IFormProps, Form } from '@formily/core';
11
+ import { ReactFC } from '@formily/react';
12
+ import { IMiddleware } from '@formily/shared';
13
+ import { DrawerProps, ThemeConfig } from 'antd';
14
+ type FormDrawerRenderer = React.ReactElement | ((form: Form) => React.ReactElement);
15
+ type DrawerTitle = string | number | React.ReactElement;
16
+ type EventType = React.KeyboardEvent<HTMLDivElement> | React.MouseEvent<HTMLDivElement | HTMLButtonElement>;
17
+ export interface IFormDrawer {
18
+ forOpen(middleware: IMiddleware<IFormProps>): IFormDrawer;
19
+ open(props?: IFormProps): Promise<any>;
20
+ close(): void;
21
+ }
22
+ export interface IDrawerProps extends DrawerProps {
23
+ onClose?: (e: EventType) => void | boolean;
24
+ loadingText?: React.ReactNode;
25
+ }
26
+ export declare function FormDrawer(title: IDrawerProps, id: string, renderer: FormDrawerRenderer): IFormDrawer;
27
+ export declare function FormDrawer(title: IDrawerProps, id: FormDrawerRenderer): IFormDrawer;
28
+ export declare function FormDrawer(title: DrawerTitle, id: string, renderer: FormDrawerRenderer): IFormDrawer;
29
+ export declare function FormDrawer(title: IDrawerProps, id: string, renderer: FormDrawerRenderer, theme: ThemeConfig): IFormDrawer;
30
+ export declare function FormDrawer(title: DrawerTitle, id: FormDrawerRenderer): IFormDrawer;
31
+ export declare namespace FormDrawer {
32
+ var Extra: ReactFC;
33
+ var Footer: ReactFC;
34
+ var Portal: ReactFC<import("../__builtins__").IPortalProps>;
35
+ }
36
+ export default FormDrawer;
@@ -19,7 +19,63 @@ export declare function useIsAssociationField(): boolean;
19
19
  export declare function useIsFileField(): boolean;
20
20
  export declare function useFieldMode(): any;
21
21
  export declare function useIsSelectFieldMode(): boolean;
22
- export declare function useValidateSchema(): any;
22
+ export declare function useValidateSchema(): Record<string, import("@formily/react").Stringify<{
23
+ [key: symbol]: any;
24
+ [key: `x-${string}`]: any;
25
+ [key: `x-${number}`]: any;
26
+ version?: string;
27
+ name?: import("@formily/react").SchemaKey;
28
+ title?: any;
29
+ description?: any;
30
+ default?: any;
31
+ readOnly?: boolean;
32
+ writeOnly?: boolean;
33
+ type?: import("@formily/react").SchemaTypes;
34
+ enum?: import("@formily/react").SchemaEnum<any>;
35
+ const?: any;
36
+ multipleOf?: number;
37
+ maximum?: number;
38
+ exclusiveMaximum?: number;
39
+ minimum?: number;
40
+ exclusiveMinimum?: number;
41
+ maxLength?: number;
42
+ minLength?: number;
43
+ pattern?: string | RegExp;
44
+ maxItems?: number;
45
+ minItems?: number;
46
+ uniqueItems?: boolean;
47
+ maxProperties?: number;
48
+ minProperties?: number;
49
+ required?: string | boolean | string[];
50
+ format?: string;
51
+ $ref?: string;
52
+ $namespace?: string;
53
+ definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
54
+ properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
55
+ items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
56
+ additionalItems?: import("@formily/react").Stringify<any>;
57
+ patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
58
+ additionalProperties?: import("@formily/react").Stringify<any>;
59
+ "x-value"?: any;
60
+ "x-index"?: number;
61
+ "x-pattern"?: any;
62
+ "x-display"?: any;
63
+ "x-validator"?: any;
64
+ "x-decorator"?: any;
65
+ "x-decorator-props"?: any;
66
+ "x-component"?: any;
67
+ "x-component-props"?: any;
68
+ "x-reactions"?: import("@formily/react").SchemaReactions<any>;
69
+ "x-content"?: any;
70
+ "x-data"?: any;
71
+ "x-visible"?: boolean;
72
+ "x-hidden"?: boolean;
73
+ "x-disabled"?: boolean;
74
+ "x-editable"?: boolean;
75
+ "x-read-only"?: boolean;
76
+ "x-read-pretty"?: boolean;
77
+ "x-compile-omitted"?: string[];
78
+ }>>;
23
79
  export declare function useTitleFieldOptions(): {
24
80
  value: any;
25
81
  label: any;
@@ -64,4 +64,5 @@ export * from './tree-select';
64
64
  export * from './unix-timestamp';
65
65
  export * from './upload';
66
66
  export * from './variable';
67
+ export * from './form-drawer';
67
68
  import './index.less';
@@ -14,6 +14,7 @@ type ComposedMenu = React.FC<any> & {
14
14
  SubMenu?: React.FC<any>;
15
15
  Designer?: React.FC<any>;
16
16
  };
17
+ export declare const ParentRouteContext: React.Context<NocoBaseDesktopRoute>;
17
18
  export declare const useParentRoute: () => NocoBaseDesktopRoute;
18
19
  /**
19
20
  * Note: The routes here are different from React Router routes - these refer specifically to menu routing/navigation items
@@ -21,12 +22,12 @@ export declare const useParentRoute: () => NocoBaseDesktopRoute;
21
22
  * @returns
22
23
  */
23
24
  export declare const useNocoBaseRoutes: (collectionName?: string) => {
24
- createRoute: (values: NocoBaseDesktopRoute, refreshAfterCreate?: any) => Promise<any>;
25
- updateRoute: (filterByTk: any, values: NocoBaseDesktopRoute, refreshAfterUpdate?: any) => Promise<any>;
26
- deleteRoute: (filterByTk: any, refreshAfterDelete?: any) => Promise<any>;
25
+ createRoute: (values: NocoBaseDesktopRoute, refreshAfterCreate?: boolean) => Promise<any>;
26
+ updateRoute: (filterByTk: any, values: NocoBaseDesktopRoute, refreshAfterUpdate?: boolean) => Promise<any>;
27
+ deleteRoute: (filterByTk: any, refreshAfterDelete?: boolean) => Promise<any>;
27
28
  moveRoute: ({ sourceId, targetId, targetScope, sortField, sticky, method, refreshAfterMove, }: {
28
- sourceId: string;
29
- targetId?: string;
29
+ sourceId: string | number;
30
+ targetId?: string | number;
30
31
  targetScope?: any;
31
32
  sortField?: string;
32
33
  sticky?: boolean;
@@ -8,3 +8,4 @@
8
8
  */
9
9
  export * from './MenuItemInitializers';
10
10
  export * from './util';
11
+ export { useMenuTranslation } from './locale';
@@ -36,5 +36,6 @@ export declare function getTabSchema({ title, icon, schemaUid, tabSchemaName, }:
36
36
  'x-initializer': string;
37
37
  properties: {};
38
38
  'x-uid': string;
39
+ 'x-async': boolean;
39
40
  };
40
41
  export {};
@@ -10,6 +10,4 @@ import React from 'react';
10
10
  export declare const PageDesigner: ({ title }: {
11
11
  title: any;
12
12
  }) => React.JSX.Element;
13
- export declare const PageTabDesigner: ({ schema }: {
14
- schema: any;
15
- }) => React.JSX.Element;
13
+ export declare const PageTabDesigner: () => React.JSX.Element;
@@ -49,6 +49,7 @@ export declare const getStoredPopupContext: (popupUid: string) => PopupContextSt
49
49
  * @param params
50
50
  */
51
51
  export declare const storePopupContext: (popupUid: string, params: PopupContextStorage) => void;
52
+ export declare const deletePopupContext: (popupUid: string) => void;
52
53
  export declare const getBlockService: (popupUid: string) => {
53
54
  service: any;
54
55
  };
@@ -11,4 +11,8 @@ import React from 'react';
11
11
  export interface PaginationProps extends AntdPaginationProps {
12
12
  hidden?: boolean;
13
13
  }
14
- export declare const Pagination: React.FunctionComponent<PaginationProps>;
14
+ export declare const Pagination: React.FunctionComponent<Omit<{
15
+ children?: React.ReactNode;
16
+ }, keyof PaginationProps> & PaginationProps & {
17
+ children?: any;
18
+ }>;
@@ -10,4 +10,4 @@ import { ISchema } from '@formily/react';
10
10
  import { CollectionFieldOptions_deprecated } from '../../../collection-manager';
11
11
  export declare const useLabelUiSchema: (collectionField: CollectionFieldOptions_deprecated, label: string) => ISchema;
12
12
  export declare const getDatePickerLabels: (props: any) => string;
13
- export declare const getLabelFormatValue: (labelUiSchema: ISchema, value: any, isTag?: boolean, TitleRenderer?: any) => any;
13
+ export declare const getLabelFormatValue: (labelUiSchema: ISchema, value: any, isTag?: boolean, targetTitleCollectionField?: any, TitleRenderer?: any) => any;
@@ -18,4 +18,8 @@ export interface SelectReadPrettyProps {
18
18
  */
19
19
  fieldNames?: FieldNames;
20
20
  }
21
- export declare const ReadPretty: (props: SelectReadPrettyProps) => React.JSX.Element;
21
+ export declare const ReadPretty: (props: Omit<{
22
+ children?: React.ReactNode;
23
+ }, keyof SelectReadPrettyProps> & SelectReadPrettyProps & {
24
+ children?: any;
25
+ }) => React.JSX.Element;
@@ -59,5 +59,6 @@ export interface DataBlockInitializerProps {
59
59
  /** 用于更改 Other records 的文案 */
60
60
  otherText?: string;
61
61
  children?: React.ReactNode;
62
+ alwaysRenderMenu?: boolean;
62
63
  }
63
64
  export declare const DataBlockInitializer: FC<DataBlockInitializerProps>;
@@ -12,5 +12,7 @@ import React from 'react';
12
12
  */
13
13
  export declare const RecordAssociationBlockInitializer: () => React.JSX.Element;
14
14
  export declare function useCreateAssociationTableBlock(): {
15
- createAssociationTableBlock: ({ item }: any) => void;
15
+ createAssociationTableBlock: ({ item }: {
16
+ item: any;
17
+ }) => void;
16
18
  };
@@ -9,5 +9,7 @@
9
9
  import React from 'react';
10
10
  export declare const RecordAssociationDetailsBlockInitializer: () => React.JSX.Element;
11
11
  export declare function useCreateAssociationDetailsBlock(): {
12
- createAssociationDetailsBlock: ({ item }: any) => void;
12
+ createAssociationDetailsBlock: ({ item }: {
13
+ item: any;
14
+ }) => void;
13
15
  };
@@ -12,6 +12,10 @@ import React from 'react';
12
12
  */
13
13
  export declare const RecordAssociationFormBlockInitializer: () => React.JSX.Element;
14
14
  export declare function useCreateAssociationFormBlock(): {
15
- createAssociationFormBlock: ({ item }: any) => void;
16
- templateWrap: (templateSchema: any, { item }: any) => any;
15
+ createAssociationFormBlock: ({ item }: {
16
+ item: any;
17
+ }) => void;
18
+ templateWrap: (templateSchema: any, { item }: {
19
+ item: any;
20
+ }) => any;
17
21
  };
@@ -12,5 +12,7 @@ import React from 'react';
12
12
  */
13
13
  export declare const RecordAssociationGridCardBlockInitializer: () => React.JSX.Element;
14
14
  export declare function useCreateAssociationGridCardBlock(): {
15
- createAssociationGridCardBlock: ({ item }: any) => void;
15
+ createAssociationGridCardBlock: ({ item }: {
16
+ item: any;
17
+ }) => void;
16
18
  };