@nocobase/client 1.6.0-beta.3 → 1.6.0-beta.4

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 (44) hide show
  1. package/es/api-client/APIClient.d.ts +1 -0
  2. package/es/application/Application.d.ts +3 -0
  3. package/es/application/RouterManager.d.ts +4 -0
  4. package/es/application/hooks/index.d.ts +1 -0
  5. package/es/application/hooks/useGlobalVariable.d.ts +9 -0
  6. package/es/application/schema-settings/utils/createSwitchSettingsItem.d.ts +1 -0
  7. package/es/collection-manager/templates/sql.d.ts +2 -2
  8. package/es/collection-manager/templates/view.d.ts +2 -2
  9. package/es/index.d.ts +6 -2
  10. package/es/index.mjs +29973 -29293
  11. package/es/modules/actions/link/useURLAndHTMLSchema.d.ts +1 -0
  12. package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.d.ts +1 -0
  13. package/es/modules/fields/component/FileManager/fileManagerComponentFieldSettings.d.ts +1 -0
  14. package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.d.ts +10 -0
  15. package/es/modules/menu/GroupItem.d.ts +16 -0
  16. package/es/modules/menu/LinkMenuItem.d.ts +20 -0
  17. package/es/modules/menu/PageMenuItem.d.ts +36 -0
  18. package/es/route-switch/antd/admin-layout/convertRoutesToSchema.d.ts +109 -0
  19. package/es/route-switch/antd/admin-layout/index.d.ts +7 -1
  20. package/es/schema-component/antd/action/types.d.ts +1 -0
  21. package/es/schema-component/antd/block-item/BlockItemCard.d.ts +2 -2
  22. package/es/schema-component/antd/index.d.ts +7 -6
  23. package/es/schema-component/antd/menu/Menu.d.ts +27 -0
  24. package/es/schema-component/antd/menu/index.d.ts +0 -1
  25. package/es/schema-component/antd/menu/locale.d.ts +1 -1
  26. package/es/schema-component/antd/menu/util.d.ts +2 -2
  27. package/es/schema-component/antd/page/Page.d.ts +15 -0
  28. package/es/schema-component/antd/table-v2/index.d.ts +1 -1
  29. package/es/schema-component/antd/variable/TextAreaWithGlobalScope.d.ts +21 -0
  30. package/es/schema-component/antd/variable/index.d.ts +1 -0
  31. package/es/system-settings/SystemSettingsProvider.d.ts +2 -3
  32. package/lib/index.js +644 -640
  33. package/lib/locale/en-US.js +26 -1
  34. package/lib/locale/es-ES.js +22 -1
  35. package/lib/locale/fr-FR.js +22 -1
  36. package/lib/locale/ja-JP.js +22 -1
  37. package/lib/locale/ko-KR.js +22 -1
  38. package/lib/locale/pt-BR.js +22 -1
  39. package/lib/locale/ru-RU.js +22 -1
  40. package/lib/locale/tr-TR.js +22 -1
  41. package/lib/locale/uk-UA.js +22 -1
  42. package/lib/locale/zh-CN.js +31 -2
  43. package/lib/locale/zh-TW.js +23 -1
  44. package/package.json +5 -5
@@ -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
  }
@@ -69,6 +69,7 @@ export declare class Application {
69
69
  schemaSettingsManager: SchemaSettingsManager;
70
70
  dataSourceManager: DataSourceManager;
71
71
  name: string;
72
+ globalVars: Record<string, any>;
72
73
  loading: boolean;
73
74
  maintained: boolean;
74
75
  maintaining: boolean;
@@ -120,4 +121,6 @@ export declare class Application {
120
121
  mount(containerOrSelector: Element | ShadowRoot | string): any;
121
122
  addFieldInterfaces(fieldInterfaceClasses?: CollectionFieldInterfaceFactory[]): void;
122
123
  addFieldInterfaceComponentOption(fieldName: string, componentOption: CollectionFieldInterfaceComponentOption): void;
124
+ addGlobalVar(key: string, value: any): void;
125
+ getGlobalVar(key: any): any;
123
126
  }
@@ -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';
@@ -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 const useGlobalVariable: (key: string) => any;
@@ -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
  */
@@ -20,11 +20,11 @@ export declare class SqlCollectionTemplate extends CollectionTemplate {
20
20
  name: any;
21
21
  title: any;
22
22
  description: any;
23
- category: any;
24
23
  createdBy: any;
25
- updatedBy: any;
26
24
  createdAt: any;
25
+ updatedBy: any;
27
26
  updatedAt: any;
27
+ category: any;
28
28
  sortable: any;
29
29
  inherits: any;
30
30
  autoGenId: any;
@@ -21,11 +21,11 @@ export declare class ViewCollectionTemplate extends CollectionTemplate {
21
21
  name: any;
22
22
  title: any;
23
23
  description: any;
24
- category: any;
25
24
  createdBy: any;
26
- updatedBy: any;
27
25
  createdAt: any;
26
+ updatedBy: any;
28
27
  updatedAt: any;
28
+ category: any;
29
29
  sortable: any;
30
30
  inherits: any;
31
31
  autoGenId: any;
package/es/index.d.ts CHANGED
@@ -55,19 +55,23 @@ 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 { getGroupMenuSchema } from './modules/menu/GroupItem';
68
+ export { getLinkMenuSchema } from './modules/menu/LinkMenuItem';
69
+ export { getPageMenuSchema } from './modules/menu/PageMenuItem';
66
70
  export { OpenModeProvider, useOpenModeContext } from './modules/popup/OpenModeProvider';
67
71
  export { PopupContextProvider } from './modules/popup/PopupContextProvider';
68
72
  export { usePopupUtils } from './modules/popup/usePopupUtils';
69
- export { SwitchLanguage } from './i18n/SwitchLanguage';
70
73
  export { VariablePopupRecordProvider } from './modules/variable/variablesProvider/VariablePopupRecordProvider';
71
74
  export { useCurrentPopupRecord } from './modules/variable/variablesProvider/VariablePopupRecordProvider';
75
+ export { showFileName } from './modules/fields/component/FileManager/fileManagerComponentFieldSettings';
72
76
  export { languageCodes } from './locale';
73
77
  export { CollectionFieldUISchemaProvider, IsInNocoBaseRecursionFieldContext, NocoBaseRecursionField, RefreshComponentProvider, useRefreshFieldSchema, } from './formily/NocoBaseRecursionField';