@nocobase/client 1.6.0-alpha.3 → 1.6.0-alpha.30

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 (139) hide show
  1. package/es/api-client/APIClient.d.ts +1 -0
  2. package/es/api-client/hooks/useRequest.d.ts +2 -0
  3. package/es/appInfo/CurrentAppInfoProvider.d.ts +1 -0
  4. package/es/application/Application.d.ts +29 -2
  5. package/es/application/CustomRouterContextProvider.d.ts +4 -1
  6. package/es/application/RouterManager.d.ts +4 -0
  7. package/es/application/hooks/index.d.ts +1 -0
  8. package/es/{user/SwitchRole.d.ts → application/hooks/useAclSnippets.d.ts} +3 -1
  9. package/es/application/hooks/useAppSpin.d.ts +1 -1
  10. package/es/{user/EditProfile.d.ts → application/hooks/useGlobalVariable.d.ts} +1 -1
  11. package/es/application/schema-initializer/hooks/useGetSchemaInitializerMenuItems.d.ts +1 -1
  12. package/es/application/schema-settings/hooks/useSchemaSettingsRender.d.ts +4 -4
  13. package/es/application/schema-settings/types.d.ts +1 -0
  14. package/es/application/schema-settings/utils/createSwitchSettingsItem.d.ts +1 -0
  15. package/es/block-provider/BlockProvider.d.ts +2 -2
  16. package/es/collection-manager/hooks/useCollectionManager_deprecated.d.ts +5 -5
  17. package/es/collection-manager/interfaces/checkbox.d.ts +20 -0
  18. package/es/collection-manager/interfaces/createdAt.d.ts +1 -0
  19. package/es/collection-manager/interfaces/createdBy.d.ts +1 -0
  20. package/es/collection-manager/interfaces/id.d.ts +1 -0
  21. package/es/collection-manager/interfaces/properties/index.d.ts +3 -0
  22. package/es/collection-manager/interfaces/properties/operators.d.ts +20 -0
  23. package/es/collection-manager/interfaces/time.d.ts +0 -11
  24. package/es/collection-manager/interfaces/updatedAt.d.ts +1 -0
  25. package/es/collection-manager/interfaces/updatedBy.d.ts +1 -0
  26. package/es/collection-manager/templates/sql.d.ts +11 -11
  27. package/es/collection-manager/templates/view.d.ts +2 -0
  28. package/es/data-source/collection-template/CollectionTemplate.d.ts +1 -1
  29. package/es/filter-provider/utils.d.ts +1 -1
  30. package/es/global-theme/type.d.ts +2 -0
  31. package/es/hoc/withTooltipComponent.d.ts +10 -0
  32. package/es/hooks/useMenuItem.d.ts +3 -1
  33. package/es/index.css +1 -1
  34. package/es/index.d.ts +5 -3
  35. package/es/index.mjs +52430 -50968
  36. package/es/lazy-helper/index.d.ts +6 -5
  37. package/es/modules/actions/link/useURLAndHTMLSchema.d.ts +1 -0
  38. package/es/modules/blocks/data-blocks/details-multi/DetailsBlockInitializer.d.ts +3 -1
  39. package/es/modules/blocks/data-blocks/details-single/ReadPrettyFormItemInitializers.d.ts +2 -0
  40. package/es/modules/blocks/data-blocks/details-single/RecordReadPrettyFormBlockInitializer.d.ts +3 -1
  41. package/es/modules/blocks/data-blocks/form/FormBlockInitializer.d.ts +8 -2
  42. package/es/modules/blocks/data-blocks/form/RecordFormBlockInitializer.d.ts +6 -2
  43. package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.d.ts +10 -2
  44. package/es/modules/blocks/filter-blocks/FilterCollectionField.d.ts +15 -0
  45. package/es/modules/fields/component/FileManager/fileManagerComponentFieldSettings.d.ts +1 -0
  46. package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.d.ts +10 -0
  47. package/es/modules/fields/component/TimePicker/timePickerComponentFieldSettings.d.ts +10 -0
  48. package/es/modules/menu/PageMenuItem.d.ts +20 -0
  49. package/es/nocobase-buildin-plugin/index.d.ts +2 -0
  50. package/es/{user/ChangePassword.d.ts → route-switch/antd/admin-layout/LanguageSettings.d.ts} +2 -1
  51. package/es/route-switch/antd/admin-layout/UserCenterButton.d.ts +11 -0
  52. package/es/route-switch/antd/admin-layout/convertRoutesToSchema.d.ts +48 -0
  53. package/es/route-switch/antd/admin-layout/index.d.ts +13 -2
  54. package/es/route-switch/antd/admin-layout/menuItemSettings.d.ts +21 -0
  55. package/es/route-switch/antd/admin-layout/userCenterSettings.d.ts +11 -0
  56. package/es/schema-component/antd/action/Action.Designer.d.ts +0 -1
  57. package/es/schema-component/antd/action/hooks.d.ts +1 -1
  58. package/es/schema-component/antd/action/types.d.ts +1 -0
  59. package/es/schema-component/antd/action/utils.d.ts +1 -1
  60. package/es/schema-component/antd/action/zIndexContext.d.ts +1 -0
  61. package/es/schema-component/antd/association-field/AssociationSelect.d.ts +1 -0
  62. package/es/schema-component/antd/association-field/InternalViewer.d.ts +3 -0
  63. package/es/schema-component/antd/association-field/Table.d.ts +57 -6
  64. package/es/schema-component/antd/block-item/BlockItemCard.d.ts +2 -2
  65. package/es/schema-component/antd/date-picker/util.d.ts +2 -1
  66. package/es/schema-component/antd/form-item/FormItem.Settings.d.ts +57 -1
  67. package/es/schema-component/antd/form-item/hooks/useSpecialCase.d.ts +6 -2
  68. package/es/schema-component/antd/form-v2/Templates.d.ts +1 -1
  69. package/es/schema-component/antd/index.d.ts +7 -6
  70. package/es/schema-component/antd/input/EllipsisWithTooltip.d.ts +1 -0
  71. package/es/schema-component/antd/menu/Menu.d.ts +28 -0
  72. package/es/schema-component/antd/menu/index.d.ts +1 -1
  73. package/es/schema-component/antd/menu/locale.d.ts +1 -1
  74. package/es/schema-component/antd/menu/util.d.ts +2 -2
  75. package/es/schema-component/antd/page/Page.d.ts +16 -0
  76. package/es/schema-component/antd/page/PageTabDesigner.d.ts +1 -3
  77. package/es/schema-component/antd/pagination/index.d.ts +5 -1
  78. package/es/schema-component/antd/password/utils.d.ts +1 -1
  79. package/es/schema-component/antd/record-picker/util.d.ts +1 -1
  80. package/es/schema-component/antd/select/ReadPretty.d.ts +5 -1
  81. package/es/schema-component/antd/table-v2/DelayRender.d.ts +13 -0
  82. package/es/schema-component/antd/table-v2/Table.Column.ActionBar.d.ts +1 -1
  83. package/es/schema-component/antd/table-v2/Table.d.ts +3 -0
  84. package/es/schema-component/antd/table-v2/index.d.ts +1 -1
  85. package/es/schema-component/antd/time-picker/TimePicker.d.ts +2 -0
  86. package/es/schema-component/antd/unix-timestamp/UnixTimestamp.d.ts +1 -0
  87. package/es/schema-component/antd/upload/placeholder.d.ts +1 -1
  88. package/es/schema-component/antd/upload/shared.d.ts +2 -2
  89. package/es/schema-component/antd/variable/TextAreaWithGlobalScope.d.ts +22 -0
  90. package/es/schema-component/antd/variable/VariableSelect.d.ts +2 -1
  91. package/es/schema-component/antd/variable/index.d.ts +1 -0
  92. package/es/schema-component/common/utils/uitls.d.ts +1 -7
  93. package/es/schema-initializer/components/DeprecatedTemplateTitle.d.ts +11 -0
  94. package/es/schema-initializer/hooks/useTemplateBlockNotifier.d.ts +14 -0
  95. package/es/schema-initializer/index.d.ts +1 -1
  96. package/es/schema-initializer/items/DataBlockInitializer.d.ts +1 -0
  97. package/es/{user/LanguageSettings.d.ts → schema-initializer/items/ModalActionSchemaInitializerItem.d.ts} +2 -1
  98. package/es/schema-initializer/items/RecordAssociationBlockInitializer.d.ts +3 -1
  99. package/es/schema-initializer/items/RecordAssociationDetailsBlockInitializer.d.ts +3 -1
  100. package/es/schema-initializer/items/RecordAssociationFormBlockInitializer.d.ts +6 -2
  101. package/es/schema-initializer/items/RecordAssociationGridCardBlockInitializer.d.ts +3 -1
  102. package/es/schema-initializer/items/RecordAssociationListBlockInitializer.d.ts +3 -1
  103. package/es/schema-initializer/items/RecordReadPrettyAssociationFormBlockInitializer.d.ts +6 -2
  104. package/es/schema-initializer/items/index.d.ts +1 -0
  105. package/es/schema-initializer/utils.d.ts +2 -22
  106. package/es/schema-settings/DataTemplates/FormDataTemplates.d.ts +3 -1
  107. package/es/schema-settings/EnableChildCollections/index.d.ts +3 -1
  108. package/es/schema-settings/GeneralSchemaDesigner.d.ts +5 -0
  109. package/es/schema-settings/LinkageRules/bindLinkageRulesToFiled.d.ts +2 -2
  110. package/es/schema-settings/LinkageRules/compute-rules.d.ts +1 -1
  111. package/es/schema-settings/LinkageRules/index.d.ts +5 -1
  112. package/es/schema-settings/SchemaSettingAccessControl.d.ts +15 -0
  113. package/es/schema-settings/SchemaSettings.d.ts +1 -0
  114. package/es/schema-settings/SchemaSettingsDateRange.d.ts +13 -0
  115. package/es/schema-settings/SchemaSettingsTimeFormat.d.ts +13 -0
  116. package/es/schema-settings/VariableInput/VariableInput.d.ts +3 -1
  117. package/es/schema-settings/VariableInput/hooks/useParentRecordVariable.d.ts +2 -2
  118. package/es/schema-settings/VariableInput/hooks/useRecordVariable.d.ts +7 -0
  119. package/es/schema-settings/index.d.ts +1 -0
  120. package/es/system-settings/SystemSettingsProvider.d.ts +2 -3
  121. package/es/user/CurrentUser.d.ts +4 -9
  122. package/es/user/CurrentUserProvider.d.ts +0 -4
  123. package/es/variables/VariablesProvider.d.ts +3 -2
  124. package/es/variables/utils/cacheLazyLoadedValues.d.ts +10 -0
  125. package/lib/index.css +1 -1
  126. package/lib/index.js +885 -903
  127. package/lib/locale/en-US.js +40 -2
  128. package/lib/locale/es-ES.js +35 -1
  129. package/lib/locale/fr-FR.js +35 -1
  130. package/lib/locale/it-IT.js +861 -0
  131. package/lib/locale/ja-JP.js +35 -1
  132. package/lib/locale/ko-KR.js +35 -1
  133. package/lib/locale/pt-BR.js +35 -1
  134. package/lib/locale/ru-RU.js +27 -1
  135. package/lib/locale/tr-TR.js +27 -1
  136. package/lib/locale/uk-UA.js +35 -1
  137. package/lib/locale/zh-CN.js +56 -7
  138. package/lib/locale/zh-TW.js +36 -1
  139. package/package.json +9 -8
@@ -20,6 +20,7 @@ export declare class APIClient extends APIClientSDK {
20
20
  service(uid: string): Result<any, any>;
21
21
  interceptors(): void;
22
22
  toErrMessages(error: any): any;
23
+ handleNotificationError(error: any): Promise<any>;
23
24
  useNotificationMiddleware(): void;
24
25
  silent(): APIClient;
25
26
  }
@@ -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> & {
@@ -16,6 +16,7 @@ export declare const useCurrentAppInfo: () => {
16
16
  lang: string;
17
17
  version: string;
18
18
  exportLimit?: number;
19
+ name: string;
19
20
  };
20
21
  };
21
22
  export declare const CurrentAppInfoProvider: (props: any) => React.JSX.Element;
@@ -15,12 +15,16 @@ 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, SchemaSettingsItemType, SchemaSettingsManager } 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';
22
22
  import type { Plugin } from './Plugin';
23
23
  import type { RequireJS } from './utils/requirejs';
24
+ type JsonLogic = {
25
+ addOperation: (name: string, fn?: any) => void;
26
+ rmOperation: (name: string) => void;
27
+ };
24
28
  declare global {
25
29
  interface Window {
26
30
  define: RequireJS['define'];
@@ -52,6 +56,7 @@ export interface ApplicationOptions {
52
56
  }
53
57
  export declare class Application {
54
58
  protected options: ApplicationOptions;
59
+ eventBus: EventTarget;
55
60
  providers: ComponentAndProps[];
56
61
  router: RouterManager;
57
62
  scopes: Record<string, any>;
@@ -68,13 +73,27 @@ export declare class Application {
68
73
  schemaSettingsManager: SchemaSettingsManager;
69
74
  dataSourceManager: DataSourceManager;
70
75
  name: string;
76
+ favicon: string;
77
+ globalVars: Record<string, any>;
78
+ jsonLogic: JsonLogic;
71
79
  loading: boolean;
72
80
  maintained: boolean;
73
81
  maintaining: boolean;
74
82
  error: any;
83
+ hasLoadError: boolean;
84
+ private wsAuthorized;
75
85
  get pm(): PluginManager;
76
86
  get disableAcl(): boolean;
87
+ get isWsAuthorized(): boolean;
88
+ updateFavicon(favicon?: string): void;
89
+ setWsAuthorized(authorized: boolean): void;
77
90
  constructor(options?: ApplicationOptions);
91
+ private initListeners;
92
+ protected setTokenInWebSocket(options: {
93
+ token: string;
94
+ authenticator: string;
95
+ }): void;
96
+ setMaintaining(maintaining: boolean): void;
78
97
  private initRequireJs;
79
98
  private addDefaultProviders;
80
99
  private addReactRouterComponents;
@@ -84,6 +103,7 @@ export declare class Application {
84
103
  getPublicPath(): string;
85
104
  getApiUrl(pathname?: string): string;
86
105
  getRouteUrl(pathname: string): string;
106
+ getHref(pathname: string): string;
87
107
  getCollectionManager(dataSource?: string): import("../data-source").CollectionManager;
88
108
  /**
89
109
  * @internal
@@ -93,6 +113,7 @@ export declare class Application {
93
113
  addProvider<T = any>(component: ComponentType, props?: T): number;
94
114
  addProviders(providers: (ComponentType | [ComponentType, any])[]): void;
95
115
  load(): Promise<void>;
116
+ loadWebSocket(): Promise<void>;
96
117
  getComponent<T = any>(Component: ComponentTypeAndString<T>, isShowError?: boolean): ComponentType<T> | undefined;
97
118
  renderComponent<T extends {}>(Component: ComponentTypeAndString, props?: T, children?: ReactNode): ReactElement;
98
119
  /**
@@ -104,7 +125,13 @@ export declare class Application {
104
125
  getRootComponent(): React.FC<{
105
126
  children?: React.ReactNode;
106
127
  }>;
107
- mount(containerOrSelector: Element | ShadowRoot | string): any;
128
+ mount(containerOrSelector: Element | ShadowRoot | string): import("react-dom/client").Root;
108
129
  addFieldInterfaces(fieldInterfaceClasses?: CollectionFieldInterfaceFactory[]): void;
109
130
  addFieldInterfaceComponentOption(fieldName: string, componentOption: CollectionFieldInterfaceComponentOption): void;
131
+ addGlobalVar(key: string, value: any): void;
132
+ getGlobalVar(key: any): any;
133
+ addUserCenterSettingsItem(item: SchemaSettingsItemType & {
134
+ aclSnippet?: string;
135
+ }): void;
110
136
  }
137
+ 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) => boolean;
50
+ export declare const useIsSubPageClosedByPageMenu: (fieldSchema: Schema) => {
51
+ isSubPageClosedByPageMenu: () => boolean;
52
+ reset: () => void;
53
+ };
51
54
  export declare const CustomRouterContextProvider: FC;
@@ -31,6 +31,10 @@ export declare class RouterManager {
31
31
  protected routes: Record<string, RouteType>;
32
32
  protected options: RouterOptions;
33
33
  app: Application;
34
+ private router;
35
+ get basename(): any;
36
+ get state(): any;
37
+ get navigate(): any;
34
38
  constructor(options: RouterOptions, app: Application);
35
39
  /**
36
40
  * @internal
@@ -10,3 +10,4 @@ export * from './useApp';
10
10
  export * from './useAppSpin';
11
11
  export * from './usePlugin';
12
12
  export * from './useRouter';
13
+ export * from './useGlobalVariable';
@@ -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 useSwitchRole: () => import("antd/es/menu/hooks/useItems").ItemType;
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>> | React.FunctionComponentElement<import("antd").SpinProps>;
11
+ render: () => React.ReactElement<any, string | React.JSXElementConstructor<any>>;
12
12
  };
@@ -6,4 +6,4 @@
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
+ export declare const useGlobalVariable: (key: string) => any;
@@ -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,6 +15,7 @@ export interface CreateSwitchSchemaSettingsItemProps {
15
15
  defaultValue?: boolean;
16
16
  useDefaultValue?: () => boolean;
17
17
  useVisible?: () => boolean;
18
+ useComponentProps?: () => any;
18
19
  /**
19
20
  * @default 'common'
20
21
  */
@@ -102,7 +102,7 @@ export declare const BlockProvider: (props: {
102
102
  * @returns
103
103
  */
104
104
  export declare const useBlockAssociationContext: () => any;
105
- export declare const useFilterByTk: () => any;
105
+ export declare const useFilterByTk: (blockProps?: any) => any;
106
106
  /**
107
107
  * @deprecated
108
108
  */
@@ -116,7 +116,7 @@ export declare const useSourceIdFromParentRecord: () => any;
116
116
  * @internal
117
117
  * @returns
118
118
  */
119
- export declare const useParamsFromRecord: () => {
119
+ export declare const useParamsFromRecord: (props?: any) => {
120
120
  filterByTk: any;
121
121
  };
122
122
  export declare const RecordLink: (props: any) => React.JSX.Element;
@@ -15,18 +15,18 @@ export declare const useCollectionManager_deprecated: (dataSourceName?: string)
15
15
  interfaces: {};
16
16
  collections: import("../..").Collection[];
17
17
  templates: import("../..").CollectionTemplate[];
18
- getTemplate: (name?: any) => any;
19
- getInterface: (name: string) => any;
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?: any, customDataSource?: string) => import("../..").Collection[];
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[];
27
27
  getCollectionField: (name: string, customDataSource?: string) => any;
28
28
  getCollectionFields: (name: any, customDataSource?: string) => CollectionFieldOptions_deprecated[];
29
- getCollectionFieldsOptions: (collectionName: string, type?: string | string[], opts?: {
29
+ getCollectionFieldsOptions: (collectionName: string, type?: string | string[], interfaces?: string | string[], opts?: {
30
30
  dataSource?: string;
31
31
  cached?: Record<string, any>;
32
32
  collectionNames?: string[];
@@ -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) => any;
61
+ isTitleField: (field: any) => boolean;
62
62
  };
@@ -48,10 +48,30 @@ export declare class CheckboxFieldInterface extends CollectionFieldInterface {
48
48
  value: string;
49
49
  selected: boolean;
50
50
  noValue: boolean;
51
+ schema: {
52
+ 'x-component': string;
53
+ 'x-component-props': {
54
+ multiple: boolean;
55
+ options: {
56
+ label: string;
57
+ value: boolean;
58
+ }[];
59
+ };
60
+ };
51
61
  } | {
52
62
  label: string;
53
63
  value: string;
54
64
  noValue: boolean;
65
+ schema: {
66
+ 'x-component': string;
67
+ 'x-component-props': {
68
+ multiple: boolean;
69
+ options: {
70
+ label: string;
71
+ value: boolean;
72
+ }[];
73
+ };
74
+ };
55
75
  selected?: undefined;
56
76
  })[];
57
77
  };
@@ -25,6 +25,7 @@ export declare class CreatedAtFieldInterface extends CollectionFieldInterface {
25
25
  'x-read-pretty': boolean;
26
26
  };
27
27
  };
28
+ description: string;
28
29
  availableTypes: any[];
29
30
  properties: {
30
31
  'uiSchema.title': {
@@ -59,4 +59,5 @@ export declare class CreatedByFieldInterface extends CollectionFieldInterface {
59
59
  schemaInitialize(schema: ISchema, { block }: {
60
60
  block: string;
61
61
  }): void;
62
+ description: string;
62
63
  }
@@ -66,5 +66,6 @@ export declare class IdFieldInterface extends CollectionFieldInterface {
66
66
  selected?: undefined;
67
67
  })[];
68
68
  };
69
+ description: string;
69
70
  titleUsable: boolean;
70
71
  }
@@ -86,6 +86,9 @@ export declare const reverseFieldProperties: Record<string, ISchema>;
86
86
  export declare const dateTimeProps: {
87
87
  [key: string]: ISchema;
88
88
  };
89
+ export declare const timeProps: {
90
+ [key: string]: ISchema;
91
+ };
89
92
  export declare const dataSource: ISchema;
90
93
  export declare const defaultProps: {
91
94
  'uiSchema.title': {
@@ -184,10 +184,30 @@ export declare const boolean: ({
184
184
  value: string;
185
185
  selected: boolean;
186
186
  noValue: boolean;
187
+ schema: {
188
+ 'x-component': string;
189
+ 'x-component-props': {
190
+ multiple: boolean;
191
+ options: {
192
+ label: string;
193
+ value: boolean;
194
+ }[];
195
+ };
196
+ };
187
197
  } | {
188
198
  label: string;
189
199
  value: string;
190
200
  noValue: boolean;
201
+ schema: {
202
+ 'x-component': string;
203
+ 'x-component-props': {
204
+ multiple: boolean;
205
+ options: {
206
+ label: string;
207
+ value: boolean;
208
+ }[];
209
+ };
210
+ };
191
211
  selected?: undefined;
192
212
  })[];
193
213
  export declare const tableoid: {
@@ -24,17 +24,6 @@ export declare class TimeFieldInterface extends CollectionFieldInterface {
24
24
  availableTypes: string[];
25
25
  hasDefaultValue: boolean;
26
26
  properties: {
27
- 'uiSchema.x-component-props.format': {
28
- type: string;
29
- title: string;
30
- 'x-component': string;
31
- 'x-decorator': string;
32
- default: string;
33
- enum: {
34
- label: string;
35
- value: string;
36
- }[];
37
- };
38
27
  'uiSchema.title': {
39
28
  type: string;
40
29
  title: string;
@@ -25,6 +25,7 @@ export declare class UpdatedAtFieldInterface extends CollectionFieldInterface {
25
25
  'x-read-pretty': boolean;
26
26
  };
27
27
  };
28
+ description: string;
28
29
  availableTypes: any[];
29
30
  properties: {
30
31
  'uiSchema.title': {
@@ -59,4 +59,5 @@ export declare class UpdatedByFieldInterface extends CollectionFieldInterface {
59
59
  schemaInitialize(schema: ISchema, { block }: {
60
60
  block: any;
61
61
  }): void;
62
+ description: string;
62
63
  }
@@ -17,17 +17,6 @@ export declare class SqlCollectionTemplate extends CollectionTemplate {
17
17
  fields: any[];
18
18
  };
19
19
  configurableProperties: {
20
- filterTargetKey: {
21
- title: string;
22
- type: string;
23
- description: string;
24
- 'x-decorator': string;
25
- 'x-component': string;
26
- 'x-component-props': {
27
- multiple: boolean;
28
- };
29
- 'x-reactions': string[];
30
- };
31
20
  name: any;
32
21
  title: any;
33
22
  description: any;
@@ -84,5 +73,16 @@ export declare class SqlCollectionTemplate extends CollectionTemplate {
84
73
  };
85
74
  };
86
75
  };
76
+ filterTargetKey: {
77
+ title: string;
78
+ type: string;
79
+ description: string;
80
+ 'x-decorator': string;
81
+ 'x-component': string;
82
+ 'x-component-props': {
83
+ multiple: boolean;
84
+ };
85
+ 'x-reactions': string[];
86
+ };
87
87
  };
88
88
  }
@@ -101,6 +101,7 @@ export declare class ViewCollectionTemplate extends CollectionTemplate {
101
101
  type: string;
102
102
  'x-component': import("react").MemoExoticComponent<(props: any) => import("react").JSX.Element>;
103
103
  'x-hidden': string;
104
+ 'x-decorator': string;
104
105
  'x-reactions': {
105
106
  dependencies: string[];
106
107
  fulfill: {
@@ -109,6 +110,7 @@ export declare class ViewCollectionTemplate extends CollectionTemplate {
109
110
  };
110
111
  };
111
112
  };
113
+ description: string;
112
114
  };
113
115
  preview: {
114
116
  type: string;
@@ -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 | AvailableFieldInterfacesExclude;
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
  /** 页面左右内边距 */
@@ -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 React from 'react';
10
+ export declare const withTooltipComponent: (Component: React.FC) => (props: any) => React.JSX.Element;
@@ -37,7 +37,9 @@ export declare const useCollectMenuItems: () => {
37
37
  * @returns
38
38
  */
39
39
  export declare const useMenuItem: () => {
40
- Component: ({ limitCount }: any) => React.JSX.Element;
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;
package/es/index.css CHANGED
@@ -1 +1 @@
1
- ::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:var(--colorBgScrollTrack)}::-webkit-scrollbar-thumb{background:var(--colorBgScrollBar);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--colorBgScrollBarHover)}::-webkit-scrollbar-thumb:active{background:var(--colorBgScrollBarActive)}.rc-virtual-list-scrollbar-thumb{background:var(--colorBgScrollBar)!important}.rc-virtual-list-scrollbar-thumb:hover{background:var(--colorBgScrollBarHover)!important}.rc-virtual-list-scrollbar-thumb:active{background:var(--colorBgScrollBarActive)!important}.ant-btn.ant-btn-danger{text-shadow:none;box-shadow:none}.ant-formily-item-label{color:#000000d9;font-weight:600}.ant-table-pagination.ant-pagination{margin-bottom:0!important}.ant-formily-item{font-size:inherit!important}.ant-formily-item-bordered-none .ant-formily-item-feedback-layout-loose{margin-bottom:0!important}.ant-formily-item-control-content-component .ant-tag{white-space:pre-wrap}html body{--adm-font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}
1
+ ::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:var(--colorBgScrollTrack)}::-webkit-scrollbar-thumb{background:var(--colorBgScrollBar);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--colorBgScrollBarHover)}::-webkit-scrollbar-thumb:active{background:var(--colorBgScrollBarActive)}.rc-virtual-list-scrollbar-thumb{background:var(--colorBgScrollBar)!important}.rc-virtual-list-scrollbar-thumb:hover{background:var(--colorBgScrollBarHover)!important}.rc-virtual-list-scrollbar-thumb:active{background:var(--colorBgScrollBarActive)!important}.ant-menu-submenu-popup{-webkit-backdrop-filter:none;backdrop-filter:none}.ant-menu-item.ant-menu-item-only-child.ant-pro-base-menu-horizontal-menu-item:active{background-color:var(--colorBgMenuItemSelected)!important}.ant-btn.ant-btn-danger{text-shadow:none;box-shadow:none}.ant-formily-item-label{color:#000000d9;font-weight:600}.ant-table-pagination.ant-pagination{margin-bottom:0!important}.ant-formily-item{font-size:inherit!important}.ant-formily-item-bordered-none .ant-formily-item-feedback-layout-loose{margin-bottom:0!important}.ant-formily-item-control-content-component .ant-tag{white-space:pre-wrap}html body{--adm-font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}
package/es/index.d.ts CHANGED
@@ -55,19 +55,21 @@ export * from './user';
55
55
  export * from './variables';
56
56
  export { withDynamicSchemaProps } from './hoc/withDynamicSchemaProps';
57
57
  export { withSkeletonComponent } from './hoc/withSkeletonComponent';
58
+ export { SwitchLanguage } from './i18n/SwitchLanguage';
58
59
  export { SchemaSettingsActionLinkItem } from './modules/actions/link/customizeLinkActionSettings';
59
- export { useURLAndHTMLSchema } from './modules/actions/link/useURLAndHTMLSchema';
60
+ export { getVariableComponentWithScope, useURLAndHTMLSchema } from './modules/actions/link/useURLAndHTMLSchema';
60
61
  export * from './modules/blocks/BlockSchemaToolbar';
61
62
  export * from './modules/blocks/data-blocks/form';
62
63
  export * from './modules/blocks/data-blocks/table';
63
64
  export * from './modules/blocks/data-blocks/table-selector';
64
65
  export * from './modules/blocks/index';
65
66
  export * from './modules/blocks/useParentRecordCommon';
67
+ export { getPageMenuSchema, useInsertPageSchema } from './modules/menu/PageMenuItem';
66
68
  export { OpenModeProvider, useOpenModeContext } from './modules/popup/OpenModeProvider';
67
69
  export { PopupContextProvider } from './modules/popup/PopupContextProvider';
68
70
  export { usePopupUtils } from './modules/popup/usePopupUtils';
69
- export { SwitchLanguage } from './i18n/SwitchLanguage';
70
71
  export { VariablePopupRecordProvider } from './modules/variable/variablesProvider/VariablePopupRecordProvider';
72
+ export { showFileName } from './modules/fields/component/FileManager/fileManagerComponentFieldSettings';
71
73
  export { useCurrentPopupRecord } from './modules/variable/variablesProvider/VariablePopupRecordProvider';
72
74
  export { languageCodes } from './locale';
73
- export { CollectionFieldUISchemaProvider, IsInNocoBaseRecursionFieldContext, NocoBaseRecursionField, useRefreshFieldSchema, } from './formily/NocoBaseRecursionField';
75
+ export { CollectionFieldUISchemaProvider, IsInNocoBaseRecursionFieldContext, NocoBaseRecursionField, RefreshComponentProvider, useRefreshFieldSchema, } from './formily/NocoBaseRecursionField';