@nocobase/client 2.1.0-alpha.1 → 2.1.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 (176) hide show
  1. package/.dumirc.ts +8 -0
  2. package/LICENSE +201 -661
  3. package/README.md +79 -10
  4. package/es/ai/ai-manager.d.ts +15 -0
  5. package/es/ai/index.d.ts +11 -0
  6. package/es/ai/tools-manager/hooks/context.d.ts +17 -0
  7. package/es/ai/tools-manager/hooks/index.d.ts +11 -0
  8. package/es/ai/tools-manager/hooks/provider.d.ts +16 -0
  9. package/es/ai/tools-manager/index.d.ts +20 -0
  10. package/es/ai/tools-manager/types.d.ts +80 -0
  11. package/es/ai/utils.d.ts +10 -0
  12. package/es/api-client/APIClient.d.ts +1 -0
  13. package/es/application/Application.d.ts +7 -1
  14. package/es/application/Plugin.d.ts +1 -0
  15. package/es/application/RouteRepository.d.ts +23 -0
  16. package/es/application/globalOperators.d.ts +11 -0
  17. package/es/block-provider/TableUidContext.d.ts +10 -0
  18. package/es/collection-manager/templates/view.d.ts +11 -11
  19. package/es/data-source/collection/utils.d.ts +2 -4
  20. package/es/flow/actions/aclCheckRefresh.d.ts +9 -0
  21. package/es/flow/actions/afterSuccess.d.ts +9 -0
  22. package/es/flow/actions/blockHeight.d.ts +9 -0
  23. package/es/flow/actions/filterFormDefaultValues.d.ts +9 -0
  24. package/es/flow/actions/formAssignRules.d.ts +9 -0
  25. package/es/flow/actions/index.d.ts +7 -0
  26. package/es/flow/actions/linkageRulesRefresh.d.ts +9 -0
  27. package/es/flow/actions/numberFormat.d.ts +9 -0
  28. package/es/flow/components/BlockItemCard.d.ts +1 -0
  29. package/es/flow/components/ConditionBuilder.d.ts +2 -0
  30. package/es/flow/components/DefaultValue.d.ts +1 -0
  31. package/es/flow/components/FieldAssignEditor.d.ts +32 -0
  32. package/es/flow/components/FieldAssignExactDatePicker.d.ts +23 -0
  33. package/es/flow/components/FieldAssignRulesEditor.d.ts +70 -0
  34. package/es/flow/components/FieldAssignValueInput.d.ts +48 -1
  35. package/es/flow/components/RunJSValueEditor.d.ts +19 -0
  36. package/es/flow/components/TextAreaWithContextSelector.d.ts +1 -0
  37. package/es/flow/components/code-editor/core/EditorCore.d.ts +3 -1
  38. package/es/flow/components/code-editor/formatDocInfo.d.ts +17 -0
  39. package/es/flow/components/code-editor/hooks/useCodeRunner.d.ts +3 -1
  40. package/es/flow/components/code-editor/index.d.ts +1 -0
  41. package/es/flow/components/code-editor/linter.d.ts +10 -2
  42. package/es/flow/components/code-editor/runjsCompletionSource.d.ts +20 -0
  43. package/es/flow/components/code-editor/runjsDiagnostics.d.ts +46 -0
  44. package/es/flow/components/fieldAssignOptions.d.ts +23 -0
  45. package/es/flow/components/filter/LinkageFilterItem.d.ts +27 -1
  46. package/es/flow/components/useAssociationTitleFieldSync.d.ts +13 -0
  47. package/es/flow/index.d.ts +2 -0
  48. package/es/flow/internal/utils/modelUtils.d.ts +27 -0
  49. package/es/flow/internal/utils/saveStepParamsWithSubModels.d.ts +11 -0
  50. package/es/flow/internal/utils/titleFieldQuickSync.d.ts +35 -0
  51. package/es/flow/models/actions/AddChildActionModel.d.ts +1 -0
  52. package/es/flow/models/actions/BulkDeleteActionModel.d.ts +1 -0
  53. package/es/flow/models/actions/LinkActionModel.d.ts +1 -4
  54. package/es/flow/models/actions/LinkActionUtils.d.ts +34 -0
  55. package/es/flow/models/actions/UpdateRecordActionUtils.d.ts +12 -0
  56. package/es/flow/models/actions/joinUrlSearch.d.ts +12 -0
  57. package/es/flow/models/base/ActionGroupModel.d.ts +8 -0
  58. package/es/flow/models/base/AssociationFieldGroupModel.d.ts +1 -1
  59. package/es/flow/models/base/BlockModel.d.ts +29 -1
  60. package/es/flow/models/base/CollectionBlockModel.d.ts +12 -57
  61. package/es/flow/models/base/GridModel.d.ts +7 -0
  62. package/es/flow/models/base/PageModel/ChildPageModel.d.ts +1 -0
  63. package/es/flow/models/base/PageModel/PageModel.d.ts +17 -1
  64. package/es/flow/models/base/PageModel/RootPageModel.d.ts +8 -0
  65. package/es/flow/models/blocks/details/DetailsBlockModel.d.ts +4 -0
  66. package/es/flow/models/blocks/details/DetailsGridModel.d.ts +1 -0
  67. package/es/flow/models/blocks/details/utils.d.ts +16 -0
  68. package/es/flow/models/blocks/filter-form/FieldOperatorSelect.d.ts +10 -0
  69. package/es/flow/models/blocks/filter-form/FilterFormBlockModel.d.ts +6 -0
  70. package/es/flow/models/blocks/filter-form/FilterFormGridModel.d.ts +12 -1
  71. package/es/flow/models/blocks/filter-form/FilterFormItemModel.d.ts +5 -37
  72. package/es/flow/models/blocks/filter-form/customFieldOperators.d.ts +34 -0
  73. package/es/flow/models/blocks/filter-form/fields/FilterFormCustomFieldModel.d.ts +16 -0
  74. package/es/flow/models/blocks/filter-form/fields/FilterFormCustomRecordSelectFieldModel.d.ts +20 -0
  75. package/es/flow/models/blocks/filter-form/fields/FilterFormRecordSelectFieldModel.d.ts +12 -0
  76. package/es/flow/models/blocks/filter-form/fields/index.d.ts +2 -0
  77. package/es/flow/models/blocks/filter-form/index.d.ts +4 -0
  78. package/es/flow/models/blocks/filter-form/legacyDefaultValueMigration.d.ts +13 -0
  79. package/es/flow/models/blocks/filter-form/valueNormalization.d.ts +17 -0
  80. package/es/flow/models/blocks/filter-manager/flow-actions/defaultOperator.d.ts +1 -3
  81. package/es/flow/models/blocks/form/CreateFormModel.d.ts +3 -1
  82. package/es/flow/models/blocks/form/EditFormModel.d.ts +4 -1
  83. package/es/flow/models/blocks/form/FormAssociationFieldGroupModel.d.ts +12 -0
  84. package/es/flow/models/blocks/form/FormAssociationItemModel.d.ts +39 -0
  85. package/es/flow/models/blocks/form/FormBlockModel.d.ts +35 -2
  86. package/es/flow/models/blocks/form/FormGridModel.d.ts +1 -0
  87. package/es/flow/models/blocks/form/QuickEditFormModel.d.ts +4 -1
  88. package/es/flow/models/blocks/form/assignRulesUpdateAssociationValues.d.ts +18 -0
  89. package/es/flow/models/blocks/form/dynamicNamePath.d.ts +19 -0
  90. package/es/flow/models/blocks/form/index.d.ts +2 -0
  91. package/es/flow/models/blocks/form/legacyDefaultValueMigration.d.ts +13 -0
  92. package/es/flow/models/blocks/form/submitHandler.d.ts +1 -1
  93. package/es/flow/models/blocks/form/submitValues.d.ts +27 -0
  94. package/es/flow/models/blocks/form/value-runtime/conditions.d.ts +9 -0
  95. package/es/flow/models/blocks/form/value-runtime/deps.d.ts +23 -0
  96. package/es/flow/models/blocks/form/value-runtime/form-patch.d.ts +19 -0
  97. package/es/flow/models/blocks/form/value-runtime/index.d.ts +11 -0
  98. package/es/flow/models/blocks/form/value-runtime/path.d.ts +25 -0
  99. package/es/flow/models/blocks/form/value-runtime/rules.d.ts +131 -0
  100. package/es/flow/models/blocks/form/value-runtime/runtime.d.ts +75 -0
  101. package/es/flow/models/blocks/form/value-runtime/types.d.ts +62 -0
  102. package/es/flow/models/blocks/form/value-runtime/utils.d.ts +12 -0
  103. package/es/flow/models/blocks/shared/legacyDefaultValueMigrationBase.d.ts +20 -0
  104. package/es/flow/models/blocks/table/TableBlockModel.d.ts +1 -23
  105. package/es/flow/models/blocks/table/TableSelectModel.d.ts +0 -1
  106. package/es/flow/models/blocks/table/dragSort/dragSortComponents.d.ts +14 -0
  107. package/es/flow/models/blocks/table/dragSort/dragSortHooks.d.ts +13 -0
  108. package/es/flow/models/blocks/table/dragSort/dragSortSettings.d.ts +39 -0
  109. package/es/flow/models/blocks/table/dragSort/dragSortUtils.d.ts +37 -0
  110. package/es/flow/models/blocks/table/dragSort/index.d.ts +12 -0
  111. package/es/flow/models/blocks/table/utils.d.ts +8 -8
  112. package/es/flow/models/fields/AssociationFieldModel/AssociationFieldModel.d.ts +1 -0
  113. package/es/flow/models/fields/AssociationFieldModel/CascadeSelectFieldModel.d.ts +16 -0
  114. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableActionGroupModel.d.ts +11 -0
  115. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableActionsColumnModel.d.ts +19 -0
  116. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableFieldModel.d.ts +30 -0
  117. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/actions/PopupSubTableEditActionModel.d.ts +28 -0
  118. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/actions/PopupSubTableFormSubmitActionModel.d.ts +16 -0
  119. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/actions/PopupSubTableRemoveActionModel.d.ts +14 -0
  120. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/blocks/PopupSubTableFormModel.d.ts +36 -0
  121. package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/index.d.ts +17 -0
  122. package/es/flow/models/fields/AssociationFieldModel/RecordPickerFieldModel.d.ts +8 -1
  123. package/es/flow/models/fields/AssociationFieldModel/RecordSelectFieldModel.d.ts +15 -0
  124. package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.d.ts +4 -1
  125. package/es/flow/models/fields/AssociationFieldModel/index.d.ts +1 -0
  126. package/es/flow/models/fields/AssociationFieldModel/itemChain.d.ts +94 -0
  127. package/es/flow/models/fields/AssociationFieldModel/recordSelectShared.d.ts +15 -5
  128. package/es/flow/models/fields/DisplayAssociationField/displaySubListUtils.d.ts +14 -0
  129. package/es/flow/models/fields/RichTextFieldModel/registerFontSize.d.ts +9 -0
  130. package/es/flow/models/fields/RichTextFieldModel/registerImageResize.d.ts +9 -0
  131. package/es/flow/models/fields/RichTextFieldModel/registerSmartBreak.d.ts +12 -0
  132. package/es/flow/models/fields/index.d.ts +0 -1
  133. package/es/flow/utils/actionCapability.d.ts +60 -0
  134. package/es/flow/utils/dispatchEventDeep.d.ts +20 -0
  135. package/es/flow/utils/index.d.ts +2 -0
  136. package/es/flow/utils/pagination.d.ts +29 -0
  137. package/es/flow/utils/useJsonTemplateResolver.d.ts +9 -0
  138. package/es/index.d.ts +1 -0
  139. package/es/index.mjs +37578 -24415
  140. package/es/pm/AdminSettingsLayoutModel.d.ts +13 -0
  141. package/es/pm/PluginSetting.d.ts +2 -1
  142. package/es/pm/index.d.ts +1 -0
  143. package/es/route-switch/antd/admin-layout/AdminLayoutModel.d.ts +27 -0
  144. package/es/route-switch/antd/admin-layout/AdminLayoutRouteCoordinator.d.ts +50 -0
  145. package/es/route-switch/antd/admin-layout/index.d.ts +5 -1
  146. package/es/route-switch/antd/admin-layout/mobileMenuNavigation.d.ts +15 -0
  147. package/es/schema-component/antd/association-field/Table.d.ts +0 -57
  148. package/es/schema-component/antd/date-picker/DatePicker.d.ts +26 -0
  149. package/es/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.d.ts +26 -0
  150. package/es/schema-settings/SchemaSettingsDefaultValue.d.ts +18 -0
  151. package/es/schema-settings/VariableInput/hooks/useParentIterationVariable.d.ts +3 -3
  152. package/es/user/CurrentUserProvider.d.ts +1 -1
  153. package/es/variables/index.d.ts +1 -1
  154. package/lib/index.js +504 -304
  155. package/lib/locale/de-DE.json +5 -0
  156. package/lib/locale/en-US.json +54 -0
  157. package/lib/locale/es-ES.json +5 -0
  158. package/lib/locale/fr-FR.json +5 -0
  159. package/lib/locale/hu-HU.json +5 -0
  160. package/lib/locale/id-ID.json +5 -0
  161. package/lib/locale/it-IT.json +5 -0
  162. package/lib/locale/ja-JP.json +5 -0
  163. package/lib/locale/ko-KR.json +5 -0
  164. package/lib/locale/nl-NL.json +5 -0
  165. package/lib/locale/pt-BR.json +5 -0
  166. package/lib/locale/ru-RU.json +5 -0
  167. package/lib/locale/tr-TR.json +5 -0
  168. package/lib/locale/uk-UA.json +5 -0
  169. package/lib/locale/vi-VN.json +5 -0
  170. package/lib/locale/zh-CN.json +82 -8
  171. package/lib/locale/zh-TW.json +15 -0
  172. package/package.json +9 -8
  173. package/es/flow/models/fields/UploadFieldModel.d.ts +0 -22
  174. package/es/index-C3fHjsMw.mjs +0 -279
  175. package/lib/index-C3fHjsMw-CDWZlvuM.js +0 -2237
  176. package/lib/style.css +0 -1
@@ -0,0 +1,13 @@
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 { FlowModel } from '@nocobase/flow-engine';
10
+ import React from 'react';
11
+ export declare class AdminSettingsLayoutModel extends FlowModel {
12
+ render(): React.JSX.Element;
13
+ }
@@ -8,4 +8,5 @@
8
8
  */
9
9
  import React from 'react';
10
10
  export declare const SettingsCenterContext: React.Context<any>;
11
- export declare const AdminSettingsLayout: () => React.JSX.Element;
11
+ export declare const InternalAdminSettingsLayout: () => React.JSX.Element;
12
+ export declare const AdminSettingsLayout: (props: any) => React.JSX.Element;
package/es/pm/index.d.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import { Plugin } from '../application/Plugin';
10
+ export * from './AdminSettingsLayoutModel';
10
11
  export * from './PluginManager';
11
12
  export * from './PluginManagerLink';
12
13
  export * from './PluginSetting';
@@ -0,0 +1,27 @@
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 { FlowModel } from '@nocobase/flow-engine';
10
+ import React from 'react';
11
+ import { type RoutePageMeta } from './AdminLayoutRouteCoordinator';
12
+ export declare class AdminLayoutModel extends FlowModel {
13
+ private routeCoordinator?;
14
+ private routeDisposer?;
15
+ private activePageUid;
16
+ private layoutContentElement;
17
+ private routePageMetaMap;
18
+ private getCoordinator;
19
+ private getCurrentRouteByActivePage;
20
+ registerRoutePage(pageUid: string, meta: RoutePageMeta): FlowModel<import("@nocobase/flow-engine").DefaultStructure>;
21
+ updateRoutePage(pageUid: string, meta: Partial<RoutePageMeta>): void;
22
+ unregisterRoutePage(pageUid: string): void;
23
+ setLayoutContentElement(element: HTMLElement | null): void;
24
+ protected onMount(): void;
25
+ protected onUnmount(): void;
26
+ render(): React.JSX.Element;
27
+ }
@@ -0,0 +1,50 @@
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 { FlowEngine, FlowModel, type ViewParam } from '@nocobase/flow-engine';
10
+ export interface RoutePageMeta {
11
+ active: boolean;
12
+ currentRoute?: Record<string, any>;
13
+ refreshDesktopRoutes?: () => void;
14
+ layoutContentElement?: HTMLElement | null;
15
+ }
16
+ interface RouteLike {
17
+ params?: {
18
+ name?: string;
19
+ };
20
+ pathname?: string;
21
+ }
22
+ /**
23
+ * 管理 admin 场景下每个 page 的 v2 视图栈编排。
24
+ * 该协调器只负责状态机和开关视图,不直接绑定 React 生命周期。
25
+ */
26
+ export declare class AdminLayoutRouteCoordinator {
27
+ private readonly flowEngine;
28
+ private readonly runtimes;
29
+ private layoutContentElement;
30
+ constructor(flowEngine: FlowEngine);
31
+ setLayoutContentElement(element: HTMLElement | null): void;
32
+ registerPage(pageUid: string, meta: RoutePageMeta): FlowModel<import("@nocobase/flow-engine").DefaultStructure>;
33
+ syncPageMeta(pageUid: string, meta: Partial<RoutePageMeta>): void;
34
+ unregisterPage(pageUid: string): void;
35
+ syncRoute(routeLike: RouteLike): void;
36
+ cleanupPage(pageUid: string): void;
37
+ destroy(): void;
38
+ private syncRuntimeWithPathname;
39
+ private shouldStepNavigate;
40
+ private stepNavigate;
41
+ private handleOpenViews;
42
+ private openViews;
43
+ private ensureRouteModelContext;
44
+ private getOrCreateRouteModel;
45
+ }
46
+ /**
47
+ * 将 pathname 解析结果和 pageUid 对齐,便于测试里复用。
48
+ */
49
+ export declare function toViewStack(pathname: string): ViewParam[];
50
+ export {};
@@ -27,7 +27,7 @@ export declare const useMobileLayout: () => {
27
27
  isMobileLayout: boolean;
28
28
  setIsMobileLayout: React.Dispatch<React.SetStateAction<boolean>>;
29
29
  };
30
- export declare const InternalAdminLayout: () => React.JSX.Element;
30
+ export declare const InternalAdminLayout: (props: any) => React.JSX.Element;
31
31
  export declare const AdminProvider: (props: any) => React.JSX.Element;
32
32
  export declare const AdminLayout: (props: any) => React.JSX.Element;
33
33
  export declare class AdminLayoutPlugin extends Plugin {
@@ -35,4 +35,8 @@ export declare class AdminLayoutPlugin extends Plugin {
35
35
  load(): Promise<void>;
36
36
  }
37
37
  export declare function findRouteBySchemaUid(schemaUid: string, treeArray: any[]): any;
38
+ export declare const shouldRenderIconInTitle: ({ depth, isMobile }: {
39
+ depth: number;
40
+ isMobile: boolean;
41
+ }) => boolean;
38
42
  export declare function findFirstPageRoute(routes: NocoBaseDesktopRoute[]): any;
@@ -0,0 +1,15 @@
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 MOBILE_MENU_CLOSE_DELAY_MS = 220;
10
+ export declare const runAfterMobileMenuClosed: ({ isMobile, closeMobileMenu, callback, delayMs, }: {
11
+ isMobile: boolean;
12
+ closeMobileMenu: () => void;
13
+ callback: () => void;
14
+ delayMs?: number;
15
+ }) => void;
@@ -6,61 +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 useColumnsDeepMemoized: (columns: any[]) => Pick<import("@formily/react").Stringify<{
10
- [key: symbol]: any;
11
- [key: `x-${string}`]: any;
12
- [key: `x-${number}`]: any;
13
- version?: string;
14
- name?: import("@formily/react").SchemaKey;
15
- title?: any;
16
- description?: any;
17
- default?: any;
18
- readOnly?: boolean;
19
- writeOnly?: boolean;
20
- type?: import("@formily/react").SchemaTypes;
21
- enum?: import("@formily/react").SchemaEnum<any>;
22
- const?: any;
23
- multipleOf?: number;
24
- maximum?: number;
25
- exclusiveMaximum?: number;
26
- minimum?: number;
27
- exclusiveMinimum?: number;
28
- maxLength?: number;
29
- minLength?: number;
30
- pattern?: string | RegExp;
31
- maxItems?: number;
32
- minItems?: number;
33
- uniqueItems?: boolean;
34
- maxProperties?: number;
35
- minProperties?: number;
36
- required?: string | boolean | string[];
37
- format?: string;
38
- $ref?: string;
39
- $namespace?: string;
40
- definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
41
- properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
42
- items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
43
- additionalItems?: import("@formily/react").Stringify<any>;
44
- patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
45
- additionalProperties?: import("@formily/react").Stringify<any>;
46
- "x-value"?: any;
47
- "x-index"?: number;
48
- "x-pattern"?: any;
49
- "x-display"?: any;
50
- "x-validator"?: any;
51
- "x-decorator"?: any;
52
- "x-decorator-props"?: any;
53
- "x-component"?: any;
54
- "x-component-props"?: any;
55
- "x-reactions"?: import("@formily/react").SchemaReactions<any>;
56
- "x-content"?: any;
57
- "x-data"?: any;
58
- "x-visible"?: boolean;
59
- "x-hidden"?: boolean;
60
- "x-disabled"?: boolean;
61
- "x-editable"?: boolean;
62
- "x-read-only"?: boolean;
63
- "x-read-pretty"?: boolean;
64
- "x-compile-omitted"?: string[];
65
- }>, symbol | "name" | "title" | "pattern" | "default" | "maximum" | "type" | "maxLength" | "minLength" | "readOnly" | "required" | "description" | `x-${string}` | `x-${number}` | "version" | "writeOnly" | "enum" | "const" | "multipleOf" | "exclusiveMaximum" | "minimum" | "exclusiveMinimum" | "maxItems" | "minItems" | "uniqueItems" | "maxProperties" | "minProperties" | "format" | "$ref" | "$namespace" | "definitions" | "items" | "additionalItems" | "patternProperties" | "additionalProperties">[];
66
9
  export declare const Table: any;
@@ -10,6 +10,32 @@ import React from 'react';
10
10
  interface IDatePickerProps {
11
11
  utc?: boolean;
12
12
  }
13
+ /**
14
+ * 解析筛选日期组件的展示格式。
15
+ *
16
+ * 这里优先使用 schema 上显式配置的 dateFormat / format,
17
+ * 只有在当前 picker 没有自定义格式时才回退到默认 picker 格式。
18
+ *
19
+ * @param options 当前筛选日期组件的格式参数
20
+ * @returns 适用于当前 picker 的最终展示格式
21
+ * @example
22
+ * ```typescript
23
+ * resolveFilterPickerFormat({
24
+ * targetPicker: 'date',
25
+ * picker: 'date',
26
+ * dateFormat: 'MM/DD/YY',
27
+ * showTime: false,
28
+ * });
29
+ * ```
30
+ */
31
+ export declare const resolveFilterPickerFormat: (options: {
32
+ targetPicker: string;
33
+ picker?: string;
34
+ format?: string;
35
+ dateFormat?: string;
36
+ showTime?: boolean;
37
+ timeFormat?: string;
38
+ }) => any;
13
39
  export declare const useDatePickerContext: () => IDatePickerProps;
14
40
  export declare const DatePickerProvider: React.Provider<IDatePickerProps>;
15
41
  export declare const DatePicker: {
@@ -14,3 +14,29 @@
14
14
  */
15
15
  declare const useLazyLoadDisplayAssociationFieldsOfForm: () => void;
16
16
  export default useLazyLoadDisplayAssociationFieldsOfForm;
17
+ /**
18
+ * Remove circular references from an object while preserving shared references.
19
+ *
20
+ * This function distinguishes between:
21
+ * - Circular references: Objects that reference themselves in the recursion path (removed)
22
+ * - Shared references: Objects that appear multiple times but aren't circular (preserved)
23
+ *
24
+ * @param value - The value to process
25
+ * @param seen - WeakMap cache of processed objects
26
+ * @param path - WeakSet tracking current recursion path
27
+ * @returns The processed value with circular references removed
28
+ *
29
+ * @example
30
+ * // Shared reference (preserved)
31
+ * const shared = { name: "shared" };
32
+ * removeCircularReferences({ a: shared, b: shared });
33
+ * // Returns: { a: { name: "shared" }, b: { name: "shared" } }
34
+ *
35
+ * @example
36
+ * // Circular reference (removed)
37
+ * const circular = { name: "circular" };
38
+ * circular.self = circular;
39
+ * removeCircularReferences(circular);
40
+ * // Returns: { name: "circular" }
41
+ */
42
+ export declare function removeCircularReferences(value: any, seen?: WeakMap<object, any>, path?: WeakSet<object>): any;
@@ -8,6 +8,24 @@
8
8
  */
9
9
  import { Schema } from '@formily/react';
10
10
  import React from 'react';
11
+ /**
12
+ * 将 CollectionField 的 uiSchema 映射到默认值弹窗里真正渲染的字段 schema。
13
+ *
14
+ * 默认值弹窗不会直接渲染 CollectionField,而是会把它替换成实际的表单组件。
15
+ * 这里必须把选项字段依赖的 `enum` 也带过去,否则下拉 / 单选 / 多选在弹窗里会没有可选项。
16
+ *
17
+ * @param clonedSchema 当前字段 schema 的克隆副本
18
+ * @param collectionFieldUiSchema 数据表字段上的 uiSchema
19
+ * @example
20
+ * ```typescript
21
+ * const schema = { 'x-component': 'CollectionField' };
22
+ * applyCollectionFieldUiSchemaToDefaultValueSchema(schema, {
23
+ * 'x-component': 'Select',
24
+ * enum: [{ label: 'Option 1', value: 'option1' }],
25
+ * });
26
+ * ```
27
+ */
28
+ export declare const applyCollectionFieldUiSchemaToDefaultValueSchema: (clonedSchema: Record<string, any>, collectionFieldUiSchema: Record<string, any>) => void;
11
29
  export declare const SchemaSettingsDefaultValue: (props: {
12
30
  fieldSchema?: Schema;
13
31
  hideVariableButton?: boolean;
@@ -13,8 +13,8 @@ export declare const useParentObjectContext: () => {
13
13
  shouldDisplayParentObject: boolean;
14
14
  /** 变量的值 */
15
15
  parentObjectCtx: any;
16
- collectionName: string;
17
- dataSource: string;
16
+ collectionName: any;
17
+ dataSource: any;
18
18
  };
19
19
  /**
20
20
  * 变量:`上级对象`
@@ -34,5 +34,5 @@ export declare const useParentObjectVariable: ({ collectionField, schema, noDisa
34
34
  shouldDisplayParentObject: boolean;
35
35
  /** 变量的值 */
36
36
  parentObjectCtx: any;
37
- collectionName: string;
37
+ collectionName: any;
38
38
  };
@@ -8,7 +8,7 @@
8
8
  */
9
9
  import React from 'react';
10
10
  export declare const CurrentUserContext: React.Context<import("../api-client").UseRequestResult<any>>;
11
- export declare const useCurrentUserContext: () => import("../api-client").UseRequestResult<any>;
11
+ export declare const useCurrentUserContext: () => any;
12
12
  export declare const useIsLoggedIn: () => boolean;
13
13
  export declare const useCurrentRoles: () => any;
14
14
  export declare const CurrentUserProvider: (props: any) => React.JSX.Element;
@@ -16,4 +16,4 @@ export * from './utils/isVariable';
16
16
  export * from './utils/transformVariableValue';
17
17
  export * from './constants';
18
18
  export type { VariablesContextType } from './types';
19
- export { useVariableScopeInfo } from './VariableScope';
19
+ export { VariableScope, useVariableScopeInfo } from './VariableScope';