@nocobase/client 0.21.0-alpha.1 → 0.21.0-alpha.10

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 (148) hide show
  1. package/es/acl/ACLProvider.d.ts +1 -1
  2. package/es/application/Application.d.ts +6 -3
  3. package/es/application/RouterManager.d.ts +1 -1
  4. package/es/application/components/MainComponent.d.ts +1 -1
  5. package/es/application/components/defaultComponents.d.ts +1 -1
  6. package/es/application/schema-initializer/components/SchemaInitializerActionModal.d.ts +1 -0
  7. package/es/application/schema-initializer/components/SchemaInitializerItem.d.ts +3 -0
  8. package/es/application/schema-initializer/components/SchemaInitializerItemGroup.d.ts +4 -0
  9. package/es/application/schema-initializer/components/SchemaInitializerSelect.d.ts +3 -0
  10. package/es/application/schema-initializer/components/SchemaInitializerSubMenu.d.ts +9 -1
  11. package/es/application/schema-initializer/components/SchemaInitializerSwitch.d.ts +3 -0
  12. package/es/application/schema-initializer/hooks/index.d.ts +2 -18
  13. package/es/application/schema-initializer/hooks/useGetSchemaInitializerMenuItems.d.ts +8 -0
  14. package/es/application/schema-initializer/hooks/useSchemaInitializerRender.d.ts +10 -0
  15. package/es/application/schema-initializer/index.d.ts +1 -1
  16. package/es/application/schema-initializer/{hoc/index.d.ts → withInitializer.d.ts} +1 -1
  17. package/es/application/schema-settings/context/SchemaSettingItemContext.d.ts +4 -0
  18. package/es/application/schema-settings/context/index.d.ts +1 -4
  19. package/es/application/schema-settings/hooks/index.d.ts +1 -19
  20. package/es/application/schema-settings/hooks/useSchemaSettingsRender.d.ts +19 -0
  21. package/es/application/schema-toolbar/hooks/index.d.ts +1 -1
  22. package/es/block-provider/BlockProvider.d.ts +37 -3
  23. package/es/block-provider/DetailsBlockProvider.d.ts +5 -2
  24. package/es/block-provider/FormBlockProvider.d.ts +11 -0
  25. package/es/block-provider/FormFieldProvider.d.ts +15 -0
  26. package/es/block-provider/TableBlockProvider.d.ts +9 -0
  27. package/es/block-provider/TableFieldProvider.d.ts +15 -0
  28. package/es/block-provider/TableSelectorProvider.d.ts +3 -0
  29. package/es/block-provider/TemplateBlockProvider.d.ts +3 -0
  30. package/es/block-provider/hooks/index.d.ts +5 -5
  31. package/es/block-provider/hooks/useDataBlockParentRecord.d.ts +17 -0
  32. package/es/block-provider/hooks/useFormActiveFields.d.ts +1 -0
  33. package/es/block-provider/hooks/useParsedFilter.d.ts +5 -0
  34. package/es/collection-manager/interfaces/nanoid.d.ts +53 -0
  35. package/es/collection-manager/interfaces/properties/index.d.ts +8 -0
  36. package/es/collection-manager/interfaces/uuid.d.ts +53 -0
  37. package/es/collection-manager/templates/sql.d.ts +8 -0
  38. package/es/collection-manager/templates/view.d.ts +9 -1
  39. package/es/data-source/collection/AssociationProvider.d.ts +1 -0
  40. package/es/data-source/collection/CollectionManager.d.ts +1 -0
  41. package/es/data-source/components/CollectionDeletedPlaceholder.d.ts +1 -1
  42. package/es/data-source/data-source/DataSourceManager.d.ts +1 -1
  43. package/es/data-source/utils.d.ts +6 -1
  44. package/es/index.d.ts +5 -4
  45. package/es/index.mjs +9508 -9067
  46. package/es/modules/actions/add-new/createFormBlockInitializers.d.ts +1 -0
  47. package/es/modules/actions/add-record/customizeCreateFormBlockInitializers.d.ts +1 -0
  48. package/es/modules/blocks/BlockSchemaToolbar.d.ts +6 -0
  49. package/es/modules/blocks/data-blocks/details-multi/DetailsActionInitializers.d.ts +1 -0
  50. package/es/modules/blocks/data-blocks/details-multi/DetailsBlockInitializer.d.ts +3 -0
  51. package/es/modules/blocks/data-blocks/details-multi/hooks/useDetailsWithPaginationBlockParams.d.ts +1 -0
  52. package/es/modules/blocks/data-blocks/details-multi/hooks/useDetailsWithPaginationDecoratorProps.d.ts +2 -1
  53. package/es/modules/blocks/data-blocks/details-single/ReadPrettyFormActionInitializers.d.ts +1 -0
  54. package/es/modules/blocks/data-blocks/details-single/ReadPrettyFormItemInitializers.d.ts +1 -1
  55. package/es/modules/blocks/data-blocks/details-single/createDetailsUISchema.d.ts +4 -0
  56. package/es/modules/blocks/data-blocks/details-single/hooks/useDetailsDecoratorProps.d.ts +7 -1
  57. package/es/modules/blocks/data-blocks/form/FormBlockInitializer.d.ts +65 -1
  58. package/es/modules/blocks/data-blocks/form/createEditFormBlockUISchema.d.ts +4 -0
  59. package/es/modules/blocks/data-blocks/form/createFormActionInitializers.d.ts +1 -0
  60. package/es/modules/blocks/data-blocks/form/createFormBlockSettings.d.ts +0 -1
  61. package/es/modules/blocks/data-blocks/form/formItemInitializers.d.ts +1 -0
  62. package/es/modules/blocks/data-blocks/form/hooks/useCreateFormBlockDecoratorProps.d.ts +1 -1
  63. package/es/modules/blocks/data-blocks/form/hooks/useEditFormBlockDecoratorProps.d.ts +1 -1
  64. package/es/modules/blocks/data-blocks/form/updateFormActionInitializers.d.ts +1 -0
  65. package/es/modules/blocks/data-blocks/grid-card/GridCardActionInitializers.d.ts +1 -0
  66. package/es/modules/blocks/data-blocks/grid-card/GridCardBlockInitializer.d.ts +5 -0
  67. package/es/modules/blocks/data-blocks/grid-card/{createGridCardBlockSchema.d.ts → createGridCardBlockUISchema.d.ts} +1 -1
  68. package/es/modules/blocks/data-blocks/grid-card/gridCardItemActionInitializers.d.ts +1 -0
  69. package/es/modules/blocks/data-blocks/grid-card/hooks/useGridCardBlockDecoratorProps.d.ts +1 -1
  70. package/es/modules/blocks/data-blocks/list/ListActionInitializers.d.ts +1 -0
  71. package/es/modules/blocks/data-blocks/list/ListBlockInitializer.d.ts +5 -0
  72. package/es/modules/blocks/data-blocks/list/{createListBlockSchema.d.ts → createListBlockUISchema.d.ts} +1 -1
  73. package/es/modules/blocks/data-blocks/list/hooks/useListBlockDecoratorProps.d.ts +1 -1
  74. package/es/modules/blocks/data-blocks/list/listItemActionInitializers.d.ts +1 -0
  75. package/es/modules/blocks/data-blocks/table/TableActionColumnInitializers.d.ts +1 -0
  76. package/es/modules/blocks/data-blocks/table/TableActionInitializers.d.ts +1 -0
  77. package/es/modules/blocks/data-blocks/table/TableBlockInitializer.d.ts +5 -0
  78. package/es/modules/blocks/data-blocks/table/TableColumnInitializers.d.ts +1 -0
  79. package/es/modules/blocks/data-blocks/table/TreeRecordProvider.d.ts +12 -0
  80. package/es/modules/blocks/data-blocks/table/hooks/useTableBlockDecoratorProps.d.ts +1 -1
  81. package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.d.ts +6 -15
  82. package/es/modules/blocks/filter-blocks/collapse/filterCollapseItemInitializer.d.ts +1 -0
  83. package/es/modules/blocks/filter-blocks/form/FilterFormActionInitializers.d.ts +1 -0
  84. package/es/modules/blocks/filter-blocks/form/filterFormItemInitializers.d.ts +1 -0
  85. package/es/modules/blocks/useParentRecordCommon.d.ts +7 -0
  86. package/es/modules/blocks/useSourceId.d.ts +1 -0
  87. package/es/modules/blocks/useSourceKey.d.ts +6 -0
  88. package/es/modules/fields/component/Picker/TableSelectorInitializers.d.ts +1 -0
  89. package/es/modules/page/BlockInitializers.d.ts +1 -0
  90. package/es/modules/variable/DeclareVariable.d.ts +17 -0
  91. package/es/modules/variable/useVariable.d.ts +14 -0
  92. package/es/route-switch/antd/admin-layout/index.d.ts +1 -1
  93. package/es/schema-component/antd/action/Action.Designer.d.ts +1 -0
  94. package/es/schema-component/antd/action/context.d.ts +2 -0
  95. package/es/schema-component/antd/action/hooks.d.ts +3 -1
  96. package/es/schema-component/antd/association-field/schema.d.ts +4 -1
  97. package/es/schema-component/antd/association-filter/AssociationFilter.Item.d.ts +1 -1
  98. package/es/schema-component/antd/association-filter/AssociationFilter.d.ts +1 -1
  99. package/es/schema-component/antd/association-filter/AssociationFilterProvider.d.ts +1 -1
  100. package/es/schema-component/antd/block-item/BlockItemCard.d.ts +3 -0
  101. package/es/schema-component/antd/block-item/BlockItemError.d.ts +2 -0
  102. package/es/schema-component/antd/filter/FilterAction.d.ts +1 -1
  103. package/es/schema-component/antd/form-item/FormItem.Settings.d.ts +2 -1
  104. package/es/schema-component/antd/input-number/ReadPretty.d.ts +1 -1
  105. package/es/schema-component/antd/table-v2/Table.d.ts +57 -0
  106. package/es/schema-component/antd/table-v2/index.d.ts +1 -0
  107. package/es/schema-component/core/SchemaComponent.d.ts +8 -1
  108. package/es/schema-component/hooks/addAppVersion.d.ts +1 -0
  109. package/es/schema-component/hooks/useDesignable.d.ts +8 -0
  110. package/es/schema-component/hooks/useTableSize.d.ts +1 -1
  111. package/es/schema-component/types.d.ts +2 -0
  112. package/es/schema-initializer/buttons/CustomFormItemInitializers.d.ts +1 -0
  113. package/es/schema-initializer/buttons/RecordBlockInitializers.d.ts +1 -0
  114. package/es/schema-initializer/buttons/SubTableActionInitializers.d.ts +1 -0
  115. package/es/schema-initializer/buttons/TabPaneInitializers.d.ts +4 -4
  116. package/es/schema-initializer/items/DataBlockInitializer.d.ts +10 -2
  117. package/es/schema-initializer/utils.d.ts +14 -37
  118. package/es/schema-settings/DataTemplates/FormDataTemplates.d.ts +1 -1
  119. package/es/schema-settings/EnableChildCollections/index.d.ts +1 -1
  120. package/es/schema-settings/LinkageRules/LinkageRuleActionGroup.d.ts +1 -9
  121. package/es/schema-settings/LinkageRules/index.d.ts +1 -21
  122. package/es/schema-settings/SchemaSettings.d.ts +2 -0
  123. package/es/schema-settings/VariableInput/hooks/useParentRecordVariable.d.ts +1 -0
  124. package/es/schema-settings/VariableInput/hooks/usePopupVariable.d.ts +16 -0
  125. package/es/schema-settings/VariableInput/hooks/useRecordVariable.d.ts +1 -1
  126. package/es/schema-settings/index.d.ts +1 -0
  127. package/es/schema-settings/types.d.ts +2 -0
  128. package/es/schema-templates/SchemaTemplateManagerProvider.d.ts +2 -4
  129. package/es/variables/types.d.ts +2 -0
  130. package/lib/index.js +372 -423
  131. package/lib/locale/en_US.js +5 -0
  132. package/lib/locale/es_ES.js +5 -0
  133. package/lib/locale/fr_FR.js +5 -0
  134. package/lib/locale/ja_JP.js +7 -2
  135. package/lib/locale/ko_KR.js +6 -1
  136. package/lib/locale/pt_BR.js +4 -1
  137. package/lib/locale/ru_RU.js +5 -1
  138. package/lib/locale/tr_TR.js +6 -1
  139. package/lib/locale/uk_UA.js +6 -1
  140. package/lib/locale/zh-CN.js +11 -1
  141. package/lib/locale/zh-TW.js +7 -0
  142. package/package.json +7 -5
  143. package/es/acl/Configuration/schemas/roleCollections.d.ts +0 -2
  144. package/es/block-provider/hooks/useDataBlockSourceId.d.ts +0 -11
  145. package/es/formula/Expression.d.ts +0 -3
  146. package/es/formula/Result.d.ts +0 -3
  147. package/es/formula/index.d.ts +0 -7
  148. package/es/modules/blocks/data-blocks/form/hooks/useFormBlockSourceId.d.ts +0 -1
@@ -20,7 +20,7 @@ export declare const useRecordPkValue: () => any;
20
20
  export declare const ACLActionProvider: (props: any) => React.JSX.Element;
21
21
  export declare const useACLFieldWhitelist: () => {
22
22
  whitelist: any[];
23
- schemaInWhitelist(fieldSchema: Schema, isSkip?: any): boolean;
23
+ schemaInWhitelist: (fieldSchema: Schema, isSkip?: any) => boolean;
24
24
  };
25
25
  export declare const ACLCollectionFieldProvider: (props: any) => React.JSX.Element;
26
26
  export declare const ACLMenuItemProvider: (props: any) => React.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { APIClientOptions } from '@nocobase/sdk';
2
2
  import { i18n as i18next } from 'i18next';
3
- import React, { ComponentType, ReactElement } from 'react';
3
+ import React, { ComponentType, ReactElement, ReactNode } from 'react';
4
4
  import { APIClient } from '../api-client';
5
5
  import { PluginManager, PluginType } from './PluginManager';
6
6
  import { PluginSettingOptions, PluginSettingsManager } from './PluginSettingsManager';
@@ -69,6 +69,7 @@ export declare class Application {
69
69
  private addRoutes;
70
70
  getOptions(): ApplicationOptions;
71
71
  getPublicPath(): string;
72
+ getApiUrl(pathname?: string): string;
72
73
  getRouteUrl(pathname: string): string;
73
74
  getCollectionManager(dataSource?: string): import("..").CollectionManager;
74
75
  /**
@@ -80,13 +81,15 @@ export declare class Application {
80
81
  addProviders(providers: (ComponentType | [ComponentType, any])[]): void;
81
82
  load(): Promise<void>;
82
83
  getComponent<T = any>(Component: ComponentTypeAndString<T>, isShowError?: boolean): ComponentType<T> | undefined;
83
- renderComponent<T extends {}>(Component: ComponentTypeAndString, props?: T): ReactElement;
84
+ renderComponent<T extends {}>(Component: ComponentTypeAndString, props?: T, children?: ReactNode): ReactElement;
84
85
  /**
85
86
  * @internal use addComponents({ SomeComponent }) instead
86
87
  */
87
88
  protected addComponent(component: ComponentType, name?: string): void;
88
89
  addComponents(components: Record<string, ComponentType>): void;
89
90
  addScopes(scopes: Record<string, any>): void;
90
- getRootComponent(): React.FC;
91
+ getRootComponent(): React.FC<{
92
+ children?: React.ReactNode;
93
+ }>;
91
94
  mount(containerOrSelector: Element | ShadowRoot | string): any;
92
95
  }
@@ -34,7 +34,7 @@ export declare class RouterManager {
34
34
  /**
35
35
  * @internal
36
36
  */
37
- getRouterComponent(): React.FC<{
37
+ getRouterComponent(children?: React.ReactNode): React.FC<{
38
38
  BaseLayout?: ComponentType;
39
39
  }>;
40
40
  add(name: string, route: RouteType): void;
@@ -1,2 +1,2 @@
1
1
  import React from 'react';
2
- export declare const MainComponent: React.MemoExoticComponent<() => React.JSX.Element>;
2
+ export declare const MainComponent: React.NamedExoticComponent<object>;
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export declare const defaultAppComponents: {
3
- AppMain: React.MemoExoticComponent<() => React.JSX.Element>;
3
+ AppMain: React.NamedExoticComponent<object>;
4
4
  AppSpin: React.FC;
5
5
  AppError: React.FC<{
6
6
  error: Error;
@@ -6,6 +6,7 @@ export interface SchemaInitializerActionModalProps {
6
6
  onSubmit?: (values: any) => void;
7
7
  buttonText?: any;
8
8
  component?: any;
9
+ isItem?: boolean;
9
10
  }
10
11
  export declare const SchemaInitializerActionModal: FC<SchemaInitializerActionModalProps>;
11
12
  export declare const SchemaInitializerActionModalInternal: () => React.JSX.Element;
@@ -11,4 +11,7 @@ export interface SchemaInitializerItemProps {
11
11
  children?: ReactNode;
12
12
  }
13
13
  export declare const SchemaInitializerItem: React.MemoExoticComponent<React.ForwardRefExoticComponent<SchemaInitializerItemProps & React.RefAttributes<any>>>;
14
+ /**
15
+ * @internal
16
+ */
14
17
  export declare const SchemaInitializerItemInternal: () => React.JSX.Element;
@@ -3,7 +3,11 @@ import { SchemaInitializerOptions } from '../types';
3
3
  export interface SchemaInitializerItemGroupProps {
4
4
  title: string;
5
5
  children?: SchemaInitializerOptions['items'];
6
+ items?: SchemaInitializerOptions['items'];
6
7
  divider?: boolean;
7
8
  }
8
9
  export declare const SchemaInitializerItemGroup: FC<SchemaInitializerItemGroupProps>;
10
+ /**
11
+ * @internal
12
+ */
9
13
  export declare const SchemaInitializerItemGroupInternal: () => React.JSX.Element;
@@ -8,4 +8,7 @@ export interface SchemaInitializerSelectItemProps extends SchemaInitializerItemP
8
8
  openOnHover?: boolean;
9
9
  }
10
10
  export declare const SchemaInitializerSelect: FC<SchemaInitializerSelectItemProps>;
11
+ /**
12
+ * @internal
13
+ */
11
14
  export declare const SchemaInitializerSelectInternal: () => React.JSX.Element;
@@ -2,16 +2,24 @@ import { MenuProps } from 'antd';
2
2
  import React, { FC, ReactNode } from 'react';
3
3
  import { SchemaInitializerOptions } from '../types';
4
4
  export interface SchemaInitializerSubMenuProps {
5
- name: string;
5
+ name?: string;
6
6
  title?: string;
7
7
  onClick?: (args: any) => void;
8
8
  onOpenChange?: (openKeys: string[]) => void;
9
9
  icon?: string | ReactNode;
10
10
  children?: SchemaInitializerOptions['items'];
11
+ items?: SchemaInitializerOptions['items'];
11
12
  }
13
+ /**
14
+ * @internal
15
+ */
16
+ export declare const SchemaInitializerMenuProvider: (props: any) => React.JSX.Element;
12
17
  export declare const useSchemaInitializerSubMenuContext: () => {
13
18
  isInMenu?: true;
14
19
  };
15
20
  export declare const SchemaInitializerMenu: FC<MenuProps>;
16
21
  export declare const SchemaInitializerSubMenu: FC<SchemaInitializerSubMenuProps>;
22
+ /**
23
+ * @internal
24
+ */
17
25
  export declare const SchemaInitializerSubMenuInternal: () => React.JSX.Element;
@@ -5,4 +5,7 @@ export interface SchemaInitializerSwitchItemProps extends SchemaInitializerItemP
5
5
  disabled?: boolean;
6
6
  }
7
7
  export declare const SchemaInitializerSwitch: FC<SchemaInitializerSwitchItemProps>;
8
+ /**
9
+ * @internal
10
+ */
8
11
  export declare const SchemaInitializerSwitchInternal: () => React.JSX.Element;
@@ -1,19 +1,3 @@
1
- import { ButtonProps } from 'antd';
2
- import React from 'react';
3
- import { SchemaInitializerOptions } from '../types';
4
1
  export * from './useAriaAttributeOfMenuItem';
5
- /**
6
- * @internal
7
- */
8
- export declare function useSchemaInitializerMenuItems(items: any[], name?: string, onClick?: (args: any) => void): any;
9
- /**
10
- * @internal
11
- */
12
- export declare function useGetSchemaInitializerMenuItems(onClick?: (args: any) => void): any;
13
- export declare function useSchemaInitializerRender<P1 = ButtonProps, P2 = {}>(name: string, options?: Omit<SchemaInitializerOptions<P1, P2>, 'name'>): {
14
- exists: boolean;
15
- render: () => any;
16
- } | {
17
- exists: boolean;
18
- render: (props?: Omit<SchemaInitializerOptions<P1, P2>, 'name'>) => React.FunctionComponentElement<any> | React.FunctionComponentElement<SchemaInitializerOptions<any, any>>;
19
- };
2
+ export * from './useSchemaInitializerRender';
3
+ export * from './useGetSchemaInitializerMenuItems';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @internal
3
+ */
4
+ export declare function useSchemaInitializerMenuItems(items: any[], name?: string, onClick?: (args: any) => void): any;
5
+ /**
6
+ * @internal
7
+ */
8
+ export declare function useGetSchemaInitializerMenuItems(onClick?: (args: any) => void): any;
@@ -0,0 +1,10 @@
1
+ import { ButtonProps } from 'antd';
2
+ import React from 'react';
3
+ import { SchemaInitializerOptions } from '../types';
4
+ export declare function useSchemaInitializerRender<P1 = ButtonProps, P2 = {}>(name: string, options?: Omit<SchemaInitializerOptions<P1, P2>, 'name'>): {
5
+ exists: boolean;
6
+ render: () => any;
7
+ } | {
8
+ exists: boolean;
9
+ render: (props?: Omit<SchemaInitializerOptions<P1, P2>, 'name'>) => React.FunctionComponentElement<SchemaInitializerOptions<any, any>>;
10
+ };
@@ -1,4 +1,4 @@
1
- export * from './hoc';
1
+ export * from './withInitializer';
2
2
  export * from './hooks';
3
3
  export * from './types';
4
4
  export * from './context';
@@ -1,3 +1,3 @@
1
1
  import React, { ComponentType } from 'react';
2
- import { SchemaInitializerOptions } from '../types';
2
+ import { SchemaInitializerOptions } from './types';
3
3
  export declare function withInitializer<T>(C: ComponentType<T>): React.MemoExoticComponent<import("@formily/react").ReactFC<Omit<SchemaInitializerOptions<T, {}>, "ref">>>;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { SchemaSettingsItemType } from '../types';
3
+ export declare const SchemaSettingItemContext: import("react").Context<SchemaSettingsItemType>;
4
+ export declare function useSchemaSettingsItem<T = {}>(): T;
@@ -1,4 +1 @@
1
- /// <reference types="react" />
2
- import { SchemaSettingsItemType } from '../types';
3
- export declare const SchemaSettingItemContext: import("react").Context<SchemaSettingsItemType>;
4
- export declare function useSchemaSettingsItem(): SchemaSettingsItemType;
1
+ export * from './SchemaSettingItemContext';
@@ -1,19 +1 @@
1
- import { SchemaSettingOptions } from '../types';
2
- import React from 'react';
3
- import { SchemaSettingsProps } from '../../../schema-settings';
4
- import { Schema } from '@formily/json-schema';
5
- import { GeneralField } from '@formily/core';
6
- import { Designable } from '../../../schema-component';
7
- type UseSchemaSettingsRenderOptions<T = {}> = Omit<SchemaSettingOptions<T>, 'name' | 'items'> & Omit<SchemaSettingsProps, 'title' | 'children'> & {
8
- fieldSchema?: Schema;
9
- field?: GeneralField;
10
- dn?: Designable;
11
- };
12
- export declare function useSchemaSettingsRender<T = {}>(name: string, options?: UseSchemaSettingsRenderOptions<T>): {
13
- exists: boolean;
14
- render: () => any;
15
- } | {
16
- exists: boolean;
17
- render: (options2?: UseSchemaSettingsRenderOptions) => React.FunctionComponentElement<any> | React.FunctionComponentElement<SchemaSettingOptions<any>>;
18
- };
19
- export {};
1
+ export * from './useSchemaSettingsRender';
@@ -0,0 +1,19 @@
1
+ import { SchemaSettingOptions } from '../types';
2
+ import React from 'react';
3
+ import { SchemaSettingsProps } from '../../../schema-settings';
4
+ import { Schema } from '@formily/json-schema';
5
+ import { GeneralField } from '@formily/core';
6
+ import { Designable } from '../../../schema-component';
7
+ type UseSchemaSettingsRenderOptions<T = {}> = Omit<SchemaSettingOptions<T>, 'name' | 'items'> & Omit<SchemaSettingsProps, 'title' | 'children'> & {
8
+ fieldSchema?: Schema;
9
+ field?: GeneralField;
10
+ dn?: Designable;
11
+ };
12
+ export declare function useSchemaSettingsRender<T = {}>(name: string, options?: UseSchemaSettingsRenderOptions<T>): {
13
+ exists: boolean;
14
+ render: () => any;
15
+ } | {
16
+ exists: boolean;
17
+ render: (options2?: UseSchemaSettingsRenderOptions) => React.FunctionComponentElement<SchemaSettingOptions<any>>;
18
+ };
19
+ export {};
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
1
  import { ISchema } from '@formily/json-schema';
2
+ import React from 'react';
3
3
  import { SchemaToolbarProps } from '../../../schema-settings/GeneralSchemaDesigner';
4
4
  export declare const useSchemaToolbarRender: (fieldSchema: ISchema) => {
5
5
  render(props?: SchemaToolbarProps & {
@@ -1,5 +1,6 @@
1
1
  import { GeneralField } from '@formily/core';
2
2
  import React from 'react';
3
+ import { useSourceId } from '../modules/blocks/useSourceId';
3
4
  /**
4
5
  * @deprecated
5
6
  */
@@ -18,16 +19,28 @@ export declare const BlockRequestContext_deprecated: React.Context<{
18
19
  __parent?: any;
19
20
  updateAssociationValues?: any[];
20
21
  }>;
22
+ /**
23
+ * @deprecated
24
+ * use `useDataBlockResource` instead
25
+ * @returns
26
+ */
21
27
  export declare const useBlockResource: () => any;
28
+ /**
29
+ * @internal
30
+ * @param props
31
+ * @returns
32
+ */
22
33
  export declare const MaybeCollectionProvider: (props: any) => any;
23
34
  /**
24
35
  * @deprecated
36
+ * use `DataBlockRequestProvider` instead
25
37
  * @param props
26
38
  * @returns
27
39
  */
28
40
  export declare const BlockRequestProvider_deprecated: (props: any) => React.JSX.Element;
29
41
  /**
30
42
  * @deprecated
43
+ * use `useDataBlockRequest` instead
31
44
  */
32
45
  export declare const useBlockRequestContext: () => {
33
46
  block?: string;
@@ -39,13 +52,23 @@ export declare const useBlockRequestContext: () => {
39
52
  __parent?: any;
40
53
  updateAssociationValues?: any[];
41
54
  };
55
+ /**
56
+ * @internal
57
+ * @param props
58
+ * @returns
59
+ */
42
60
  export declare const RenderChildrenWithAssociationFilter: React.FC<any>;
61
+ /**
62
+ * @internal
63
+ * @returns
64
+ */
43
65
  export declare const useBlockContext: () => {
44
66
  /** 用以区分区块的标识 */
45
67
  name: string;
46
68
  };
47
69
  /**
48
- * @deprecated use `DataBlockProvider` instead
70
+ * @deprecated
71
+ * use `DataBlockProvider` instead
49
72
  */
50
73
  export declare const BlockProvider: (props: {
51
74
  name: string;
@@ -61,15 +84,26 @@ export declare const BlockProvider: (props: {
61
84
  /** @deprecated */
62
85
  useParams?: any;
63
86
  }) => React.JSX.Element;
87
+ /**
88
+ * @deprecated
89
+ * use `useDataBlockProps` instead
90
+ * @returns
91
+ */
64
92
  export declare const useBlockAssociationContext: () => any;
65
93
  export declare const useFilterByTk: () => any;
66
94
  /**
67
95
  * @deprecated
68
- * 已弃用,应使用 useSourceIdFromParentRecord
69
- * @returns
70
96
  */
71
97
  export declare const useSourceIdFromRecord: () => any;
98
+ /**
99
+ * @deprecated
100
+ * use `useSourceId` instead
101
+ */
72
102
  export declare const useSourceIdFromParentRecord: () => any;
103
+ /**
104
+ * @internal
105
+ * @returns
106
+ */
73
107
  export declare const useParamsFromRecord: () => {
74
108
  filterByTk: any;
75
109
  };
@@ -1,13 +1,16 @@
1
1
  import React from 'react';
2
+ /**
3
+ * @internal
4
+ */
2
5
  export declare const DetailsBlockContext: React.Context<any>;
3
6
  export declare const DetailsBlockProvider: React.FunctionComponent<any>;
4
7
  /**
5
- * @deprecated
8
+ * @internal
6
9
  */
7
10
  export declare const useDetailsBlockContext: () => any;
8
11
  /**
9
12
  * @deprecated
10
- * 即将废弃,请用 useDetailsWithPaginationProps 或者 useDetailsProps
13
+ * use `useDetailsWithPaginationProps` or `useDetailsProps` instead
11
14
  * @returns
12
15
  */
13
16
  export declare const useDetailsBlockProps: () => {
@@ -16,6 +16,7 @@ export declare const FormBlockContext: React.Context<{
16
16
  formRecord?: CollectionRecord;
17
17
  }>;
18
18
  /**
19
+ * @internal
19
20
  * 获取表单区块的类型:update 表示是表单编辑区块,create 表示是表单新增区块
20
21
  * @returns
21
22
  */
@@ -24,6 +25,10 @@ export declare const useFormBlockType: () => {
24
25
  };
25
26
  export declare const useIsDetailBlock: () => boolean;
26
27
  export declare const FormBlockProvider: React.FunctionComponent<any>;
28
+ /**
29
+ * @internal
30
+ * @returns
31
+ */
27
32
  export declare const useFormBlockContext: () => {
28
33
  [key: string]: any;
29
34
  form?: any;
@@ -38,7 +43,13 @@ export declare const useFormBlockContext: () => {
38
43
  params?: any;
39
44
  formRecord?: CollectionRecord;
40
45
  };
46
+ /**
47
+ * @internal
48
+ */
41
49
  export declare const useFormBlockProps: () => {
42
50
  form: any;
43
51
  };
52
+ /**
53
+ * @internal
54
+ */
44
55
  export declare const findFormBlock: (schema: Schema) => Schema<any, any, any, any, any, any, any, any, any>;
@@ -1,8 +1,23 @@
1
1
  import React from 'react';
2
+ /**
3
+ * @internal
4
+ */
2
5
  export declare const FormFieldContext: React.Context<any>;
6
+ /**
7
+ * @internal
8
+ */
3
9
  export declare const WithoutFormFieldResource: React.Context<any>;
10
+ /**
11
+ * @internal
12
+ */
4
13
  export declare const FormFieldProvider: (props: any) => React.JSX.Element;
14
+ /**
15
+ * @internal
16
+ */
5
17
  export declare const useFormFieldContext: () => any;
18
+ /**
19
+ * @internal
20
+ */
6
21
  export declare const useFormFieldProps: () => {
7
22
  form: any;
8
23
  };
@@ -1,5 +1,14 @@
1
1
  import React from 'react';
2
+ /**
3
+ * @internal
4
+ */
2
5
  export declare const TableBlockContext: React.Context<any>;
6
+ /**
7
+ * @internal
8
+ */
3
9
  export declare function getIdsWithChildren(nodes: any): any[];
4
10
  export declare const TableBlockProvider: React.FunctionComponent<any>;
11
+ /**
12
+ * @internal
13
+ */
5
14
  export declare const useTableBlockContext: () => any;
@@ -1,6 +1,9 @@
1
1
  import { Field } from '@formily/core';
2
2
  import React from 'react';
3
3
  import { APIClient } from '../api-client';
4
+ /**
5
+ * @internal
6
+ */
4
7
  export declare const TableFieldContext: React.Context<any>;
5
8
  export declare class TableFieldResource {
6
9
  field: Field;
@@ -22,9 +25,21 @@ export declare class TableFieldResource {
22
25
  update(options: any): Promise<void>;
23
26
  destroy(options: any): Promise<void>;
24
27
  }
28
+ /**
29
+ * @internal
30
+ */
25
31
  export declare const WithoutTableFieldResource: React.Context<any>;
32
+ /**
33
+ * @internal
34
+ */
26
35
  export declare const TableFieldProvider: (props: any) => React.JSX.Element;
36
+ /**
37
+ * @internal
38
+ */
27
39
  export declare const useTableFieldContext: () => any;
40
+ /**
41
+ * @internal
42
+ */
28
43
  export declare const useTableFieldProps: () => {
29
44
  size: string;
30
45
  loading: any;
@@ -6,6 +6,9 @@ type Params = {
6
6
  page?: number;
7
7
  sort?: any;
8
8
  };
9
+ /**
10
+ * @internal
11
+ */
9
12
  export declare const TableSelectorContext: React.Context<any>;
10
13
  export declare const TableSelectorParamsProvider: ({ params, children }: {
11
14
  params: Params;
@@ -1,4 +1,7 @@
1
1
  import React from 'react';
2
+ /**
3
+ * @internal
4
+ */
2
5
  export declare const useTemplateBlockContext: () => {
3
6
  templateFinshed?: boolean;
4
7
  onTemplateSuccess?: Function;
@@ -1,7 +1,7 @@
1
1
  import { ChangeEvent } from 'react';
2
+ export * from './useDataBlockParentRecord';
2
3
  export * from './useFormActiveFields';
3
4
  export * from './useParsedFilter';
4
- export * from './useDataBlockSourceId';
5
5
  export declare const usePickActionProps: () => {
6
6
  onClick(): void;
7
7
  };
@@ -39,7 +39,7 @@ export declare const useResetBlockActionProps: () => {
39
39
  onClick(): Promise<void>;
40
40
  };
41
41
  export declare const useCustomizeUpdateActionProps: () => {
42
- onClick(): Promise<void>;
42
+ onClick(e?: any, callBack?: any): Promise<void>;
43
43
  };
44
44
  export declare const useCustomizeBulkUpdateActionProps: () => {
45
45
  onClick(): Promise<void>;
@@ -51,19 +51,19 @@ export declare const useUpdateActionProps: () => {
51
51
  onClick(): Promise<void>;
52
52
  };
53
53
  export declare const useDestroyActionProps: () => {
54
- onClick(): Promise<void>;
54
+ onClick(e?: any, callBack?: any): Promise<void>;
55
55
  };
56
56
  export declare const useRemoveActionProps: (associationName: any) => {
57
57
  onClick(value: any): Promise<void>;
58
58
  };
59
59
  export declare const useDisassociateActionProps: () => {
60
- onClick(): Promise<void>;
60
+ onClick(e?: any, callBack?: any): Promise<void>;
61
61
  };
62
62
  export declare const useDetailPrintActionProps: () => {
63
63
  onClick(): Promise<void>;
64
64
  };
65
65
  export declare const useBulkDestroyActionProps: () => {
66
- onClick(): Promise<void>;
66
+ onClick(e?: any, callBack?: any): Promise<void>;
67
67
  };
68
68
  export declare const useRefreshActionProps: () => {
69
69
  onClick(): Promise<void>;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @internal
3
+ * @deprecated
4
+ * 已弃用(该方法现在只是用来兼容旧版 Schema 的),请通过各个区块的 x-use-decorator-props 中获取 parentRecord
5
+ *
6
+ * 注意:这里有一个需要更改 schema 才能解决的问题,就是在获取 parentRecord 的时候无法确定(在关系字段和当前表同表时)
7
+ * 是需要从 recordData 还是 parentRecordData 中获取;解决方法是通过更改 schema,在不同类型的关系区块中
8
+ * (`通过点击关系字段按钮打开的弹窗中创建的非关系字段区块`和`关系字段区块`)使用不同的 hook。
9
+ *
10
+ * 更新:上面所说的“需要更改 schema 才能解决的问题”已在这个任务中更改:https://nocobase.height.app/T-3848/description
11
+ *
12
+ * @param param0
13
+ * @returns
14
+ */
15
+ export declare const useDataBlockParentRecord: ({ association }: {
16
+ association: string;
17
+ }) => any;
@@ -10,6 +10,7 @@ interface ProviderProps extends Partial<FormActiveFieldsProviderValue> {
10
10
  children: React.ReactNode;
11
11
  }
12
12
  /**
13
+ * @internal
13
14
  * 用于提供获取和更新当前表单区块中已显示出来的字段
14
15
  * @param param0
15
16
  * @returns
@@ -1,3 +1,8 @@
1
+ /**
2
+ * @internal
3
+ * @param param0
4
+ * @returns
5
+ */
1
6
  export declare function useParsedFilter({ filterOption }: {
2
7
  filterOption: any;
3
8
  }): {
@@ -46,6 +46,59 @@ export declare class NanoidFieldInterface extends CollectionFieldInterface {
46
46
  'x-decorator': string;
47
47
  'x-component': string;
48
48
  };
49
+ autoFill: {
50
+ type: string;
51
+ title: string;
52
+ 'x-content': string;
53
+ 'x-decorator': string;
54
+ 'x-component': string;
55
+ default: boolean;
56
+ };
57
+ layout: {
58
+ type: string;
59
+ title: string;
60
+ 'x-component': string;
61
+ 'x-decorator': string;
62
+ 'x-decorator-props': {
63
+ style: {
64
+ marginBottom: string;
65
+ };
66
+ };
67
+ properties: {
68
+ primaryKey: {
69
+ type: string;
70
+ 'x-content': string;
71
+ 'x-decorator': string;
72
+ 'x-component': string;
73
+ 'x-disabled': string;
74
+ 'x-reactions': {
75
+ dependencies: string[];
76
+ when: string;
77
+ fulfill: {
78
+ state: {
79
+ value: boolean;
80
+ };
81
+ };
82
+ }[];
83
+ };
84
+ unique: {
85
+ type: string;
86
+ 'x-content': string;
87
+ 'x-decorator': string;
88
+ 'x-component': string;
89
+ 'x-disabled': string;
90
+ 'x-reactions': {
91
+ dependencies: string[];
92
+ when: string;
93
+ fulfill: {
94
+ state: {
95
+ value: boolean;
96
+ };
97
+ };
98
+ }[];
99
+ };
100
+ };
101
+ };
49
102
  };
50
103
  filterable: {
51
104
  operators: ({
@@ -41,6 +41,14 @@ export declare const autoIncrement: {
41
41
  'x-component': string;
42
42
  'x-disabled': string;
43
43
  };
44
+ export declare const autoFill: {
45
+ type: string;
46
+ title: string;
47
+ 'x-content': string;
48
+ 'x-decorator': string;
49
+ 'x-component': string;
50
+ default: boolean;
51
+ };
44
52
  export declare const relationshipType: ISchema;
45
53
  export declare const constraintsProps: {
46
54
  onDelete: {