@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
package/README.md CHANGED
@@ -1,17 +1,24 @@
1
1
  # NocoBase
2
2
 
3
3
  <video width="100%" controls>
4
- <source src="https://static-docs.nocobase.com/NocoBase0510.mp4" type="video/mp4">
4
+ <source src="https://github.com/user-attachments/assets/4d11a87b-00e2-48f3-9bf7-389d21072d13" type="video/mp4">
5
5
  </video>
6
6
 
7
+ <p align="center">
8
+ <a href="https://trendshift.io/repositories/4112" target="_blank"><img src="https://trendshift.io/api/badge/repositories/4112" alt="nocobase%2Fnocobase | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
9
+ <a href="https://www.producthunt.com/posts/nocobase?embed=true&utm_source=badge-top-post-topic-badge&utm_medium=badge&utm_souce=badge-nocobase" target="_blank"><img src="https://api.producthunt.com/widgets/embed-image/v1/top-post-topic-badge.svg?post_id=456520&theme=light&period=weekly&topic_id=267" alt="NocoBase - Scalability&#0045;first&#0044;&#0032;open&#0045;source&#0032;no&#0045;code&#0032;platform | Product Hunt" style="width: 250px; height: 54px;" width="250" height="54" /></a>
10
+ </p>
7
11
 
8
12
  ## What is NocoBase
9
13
 
10
- NocoBase is a scalability-first, open-source no-code development platform.
11
- Instead of investing years of time and millions of dollars in research and development, deploy NocoBase in a few minutes and you'll have a private, controllable, and extremely scalable no-code development platform!
14
+ NocoBase is the most extensible AI-powered no-code platform.
15
+ Total control. Infinite extensibility. AI collaboration.
16
+ Enable your team to adapt quickly and cut costs dramatically.
17
+ No years of development. No millions wasted.
18
+ Deploy NocoBase in minutes — and take control of everything.
12
19
 
13
20
  Homepage:
14
- https://www.nocobase.com/
21
+ https://www.nocobase.com/
15
22
 
16
23
  Online Demo:
17
24
  https://demo.nocobase.com/new
@@ -19,12 +26,74 @@ https://demo.nocobase.com/new
19
26
  Documents:
20
27
  https://docs.nocobase.com/
21
28
 
22
- Commericial license & plugins:
23
- https://www.nocobase.com/en/commercial
29
+ Forum:
30
+ https://forum.nocobase.com/
24
31
 
25
- License agreement:
26
- https://www.nocobase.com/en/agreement
32
+ Use Cases:
33
+ https://www.nocobase.com/en/blog/tags/customer-stories
27
34
 
35
+ ## Release Notes
28
36
 
29
- ## Contact Us:
30
- hello@nocobase.com
37
+ Our [blog](https://www.nocobase.com/en/blog/timeline) is regularly updated with release notes and provides a weekly summary.
38
+
39
+ ## Distinctive features
40
+
41
+ ### 1. Data model-driven, not form/table–driven
42
+
43
+ Instead of being constrained by forms or tables, NocoBase adopts a data model–driven approach, separating data structure from user interface to unlock unlimited possibilities.
44
+
45
+ - UI and data structure are fully decoupled
46
+ - Multiple blocks and actions can be created for the same table or record in any quantity or form
47
+ - Supports the main database, external databases, and third-party APIs as data sources
48
+
49
+ ![model](https://static-docs.nocobase.com/model.png)
50
+
51
+ ### 2. AI employees, integrated into your business systems
52
+ Unlike standalone AI demos, NocoBase allows you to embed AI capabilities seamlessly into your interfaces, workflows, and data context, making AI truly useful in real business scenarios.
53
+
54
+ - Define AI employees for roles such as translator, analyst, researcher, or assistant
55
+ - Seamless AI–human collaboration in interfaces and workflows
56
+ - Ensure AI usage is secure, transparent, and customizable for your business needs
57
+
58
+ ![AI-employee](https://static-docs.nocobase.com/ai-employee-home.png)
59
+
60
+ ### 3. What you see is what you get, incredibly easy to use
61
+
62
+ While enabling the development of complex business systems, NocoBase keeps the experience simple and intuitive.
63
+
64
+ - One-click switch between usage mode and configuration mode
65
+ - Pages serve as a canvas to arrange blocks and actions, similar to Notion
66
+ - Configuration mode is designed for ordinary users, not just programmers
67
+
68
+ ![wysiwyg](https://static-docs.nocobase.com/wysiwyg.gif)
69
+
70
+ ### 4. Everything is a plugin, designed for extension
71
+ Adding more no-code features will never cover every business case. NocoBase is built for extension through its plugin-based microkernel architecture.
72
+
73
+ - All functionalities are plugins, similar to WordPress
74
+ - Plugins are ready to use upon installation
75
+ - Pages, blocks, actions, APIs, and data sources can all be extended through custom plugins
76
+
77
+ ![plugins](https://static-docs.nocobase.com/plugins.png)
78
+
79
+ ## Installation
80
+
81
+ NocoBase supports three installation methods:
82
+
83
+ - <a target="_blank" href="https://docs.nocobase.com/welcome/getting-started/installation/docker-compose">Installing With Docker (👍Recommended)</a>
84
+
85
+ Suitable for no-code scenarios, no code to write. When upgrading, just download the latest image and reboot.
86
+
87
+ - <a target="_blank" href="https://docs.nocobase.com/welcome/getting-started/installation/create-nocobase-app">Installing from create-nocobase-app CLI</a>
88
+
89
+ The business code of the project is completely independent and supports low-code development.
90
+
91
+ - <a target="_blank" href="https://docs.nocobase.com/welcome/getting-started/installation/git-clone">Installing from Git source code</a>
92
+
93
+ If you want to experience the latest unreleased version, or want to participate in the contribution, you need to make changes and debug on the source code, it is recommended to choose this installation method, which requires a high level of development skills, and if the code has been updated, you can git pull the latest code.
94
+
95
+ ## How NocoBase works
96
+
97
+ <video width="100%" controls>
98
+ <source src="https://github.com/user-attachments/assets/8d183b44-9bb5-4792-b08f-bc08fe8dfaaf" type="video/mp4">
99
+ </video>
@@ -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
+ import { Application } from '../application';
10
+ import { ToolsManager } from './tools-manager';
11
+ export declare class AIManager {
12
+ protected readonly app: Application;
13
+ toolsManager: ToolsManager;
14
+ constructor(app: Application);
15
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export * from './ai-manager';
10
+ export * from './tools-manager';
11
+ export * from './utils';
@@ -0,0 +1,17 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ import { ToolsEntry } from '../types';
11
+ export interface ToolsContextValue {
12
+ tools: ToolsEntry[];
13
+ loading: boolean;
14
+ error: Error | null;
15
+ refresh: () => Promise<void>;
16
+ }
17
+ export declare const ToolsContext: React.Context<ToolsContextValue>;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const useTools: () => import("./context").ToolsContextValue;
10
+ export * from './context';
11
+ export * from './provider';
@@ -0,0 +1,16 @@
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, { ReactNode } from 'react';
10
+ import { ToolsManager } from '../types';
11
+ interface ToolsProviderProps {
12
+ toolsManager: ToolsManager;
13
+ children: ReactNode;
14
+ }
15
+ export declare const ToolsProvider: React.FC<ToolsProviderProps>;
16
+ export {};
@@ -0,0 +1,20 @@
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 { Registry } from '@nocobase/utils/client';
10
+ import { FrontendTools, ToolsEntry, ToolsFilter, ToolsManager, ToolsOptions } from './types';
11
+ import { Application } from '../../application';
12
+ export declare class DefaultToolsManager implements ToolsManager {
13
+ protected readonly app: Application;
14
+ private readonly tools;
15
+ constructor(app: Application, tools?: any);
16
+ listTools(filter?: ToolsFilter): Promise<ToolsEntry[]>;
17
+ useTools(): Registry<FrontendTools>;
18
+ registerTools(name: string, options: ToolsOptions): void;
19
+ }
20
+ export * from './types';
@@ -0,0 +1,80 @@
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 type { ComponentType } from 'react';
10
+ import type { Application } from '../../application';
11
+ import { Registry } from '@nocobase/utils/client';
12
+ export interface ToolsManager extends ToolsRegistration {
13
+ listTools(filter?: ToolsFilter): Promise<ToolsEntry[]>;
14
+ useTools(): Registry<FrontendTools>;
15
+ }
16
+ export interface ToolsRegistration {
17
+ registerTools(name: string, options: ToolsOptions): void;
18
+ }
19
+ export type ToolsOptions = {
20
+ ui?: {
21
+ card?: ComponentType<ToolsUIProperties>;
22
+ modal?: {
23
+ title?: string;
24
+ okText?: string;
25
+ useOnOk?: (decisions: ToolsUIProperties['decisions'], adjustArgs: Record<string, any>) => {
26
+ onOk: () => void | Promise<void>;
27
+ };
28
+ Component?: ComponentType<{
29
+ tool: ToolCall;
30
+ saveToolArgs?: (args: unknown) => Promise<void>;
31
+ }>;
32
+ };
33
+ };
34
+ invoke?: (ctx: Application, params: any) => any | Promise<any>;
35
+ useHooks?: () => ToolsOptions;
36
+ };
37
+ export type ToolCall<T = unknown> = {
38
+ id: string;
39
+ type: string;
40
+ name: string;
41
+ status?: 'success' | 'error';
42
+ invokeStatus: 'init' | 'interrupted' | 'waiting' | 'pending' | 'done' | 'confirmed';
43
+ auto: boolean;
44
+ args: T;
45
+ [key: string]: any;
46
+ };
47
+ export type FrontendTools = ToolsOptions;
48
+ export type BackendTools = {
49
+ scope: Scope;
50
+ defaultPermission?: Permission;
51
+ silence?: boolean;
52
+ introduction?: {
53
+ title: string;
54
+ about: string;
55
+ };
56
+ definition: {
57
+ name: string;
58
+ description: string;
59
+ schema?: any;
60
+ };
61
+ };
62
+ export type ToolsEntry = BackendTools & FrontendTools;
63
+ export type ToolsUIProperties<ToolCallArgs = unknown> = {
64
+ messageId: string;
65
+ tools: ToolsEntry;
66
+ toolCall: ToolCall<ToolCallArgs>;
67
+ decisions: DecisionActions;
68
+ };
69
+ export type DecisionActions = {
70
+ approve: () => Promise<void>;
71
+ edit: (args: any) => Promise<void>;
72
+ reject: (message: string) => Promise<void>;
73
+ };
74
+ export type ToolsFilter = {
75
+ scope?: Scope;
76
+ defaultPermission?: Permission;
77
+ silence?: boolean;
78
+ };
79
+ export type Scope = 'SPECIFIED' | 'GENERAL' | 'CUSTOM';
80
+ export type Permission = 'ASK' | 'ALLOW';
@@ -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 { ToolsEntry } from './tools-manager';
10
+ export declare const toToolsMap: (tools: ToolsEntry[]) => Map<string, ToolsEntry>;
@@ -16,6 +16,7 @@ export declare class APIClient extends APIClientSDK {
16
16
  /** 该值会在 AntdAppProvider 中被重新赋值 */
17
17
  notification: any;
18
18
  cloneInstance(): APIClient;
19
+ getHostname(): string;
19
20
  getHeaders(): {};
20
21
  service(uid: string): Result<any, any>;
21
22
  interceptors(): void;
@@ -18,10 +18,11 @@ import { SchemaInitializer, SchemaInitializerManager } from './schema-initialize
18
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
- import { FlowEngine, FlowEngineContext } from '@nocobase/flow-engine';
21
+ import { FlowEngine, FlowEngineContext, FlowModel } from '@nocobase/flow-engine';
22
22
  import type { CollectionFieldInterfaceFactory } from '../data-source';
23
23
  import type { Plugin } from './Plugin';
24
24
  import type { RequireJS } from './utils/requirejs';
25
+ import { AIManager } from '../ai';
25
26
  type JsonLogic = {
26
27
  addOperation: (name: string, fn?: any) => void;
27
28
  rmOperation: (name: string) => void;
@@ -82,6 +83,7 @@ interface Variable {
82
83
  export declare class Application {
83
84
  protected options: ApplicationOptions;
84
85
  eventBus: EventTarget;
86
+ aiManager: AIManager;
85
87
  providers: ComponentAndProps[];
86
88
  router: RouterManager;
87
89
  scopes: Record<string, any>;
@@ -103,6 +105,7 @@ export declare class Application {
103
105
  globalVarCtxs: Record<string, any>;
104
106
  jsonLogic: JsonLogic;
105
107
  flowEngine: FlowEngine;
108
+ model: ApplicationModel;
106
109
  context: FlowEngineContext & {
107
110
  pluginSettingsRouter: PluginSettingsManager;
108
111
  pluginManager: PluginManager;
@@ -201,4 +204,7 @@ export declare class Application {
201
204
  Component: ComponentType;
202
205
  }): void;
203
206
  }
207
+ declare class ApplicationModel extends FlowModel {
208
+ render(): React.JSX.Element;
209
+ }
204
210
  export {};
@@ -19,6 +19,7 @@ export declare class Plugin<T = any> {
19
19
  };
20
20
  get flowEngine(): import("@nocobase/flow-engine").FlowEngine;
21
21
  get engine(): import("@nocobase/flow-engine").FlowEngine;
22
+ get ai(): import("..").AIManager;
22
23
  get pm(): import("./PluginManager").PluginManager;
23
24
  get router(): import("./RouterManager").RouterManager;
24
25
  get pluginSettingsManager(): import("./PluginSettingsManager").PluginSettingsManager;
@@ -0,0 +1,23 @@
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
+ type RouteOptions = {
10
+ id: string;
11
+ schemaUid: string;
12
+ children?: RouteOptions[];
13
+ };
14
+ export declare class RouteRepository {
15
+ protected ctx: any;
16
+ routes: Array<RouteOptions>;
17
+ constructor(ctx: any);
18
+ setRoutes(routes: Array<any>): void;
19
+ listAccessible(): RouteOptions[];
20
+ getRouteBySchemaUid(schemaUid: string): RouteOptions | undefined;
21
+ private findRoute;
22
+ }
23
+ export {};
@@ -0,0 +1,11 @@
1
+ export function getOperators(): {
2
+ is_logic(logic: any): boolean;
3
+ truthy(value: any): boolean;
4
+ getOperator(logic: any): string;
5
+ getValues(logic: any): any;
6
+ apply(logic: any, data: any): any;
7
+ uses_data(logic: any): any[];
8
+ addOperation(name: any, code: any): void;
9
+ rmOperation(name: any): void;
10
+ rule_like(rule: any, pattern: any): any;
11
+ };
@@ -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
+ /// <reference types="react" />
10
+ export declare const TableUidContext: import("react").Context<string>;
@@ -18,6 +18,17 @@ export declare class ViewCollectionTemplate extends CollectionTemplate {
18
18
  };
19
19
  divider: boolean;
20
20
  configurableProperties: {
21
+ filterTargetKey: {
22
+ title: string;
23
+ type: string;
24
+ description: string;
25
+ 'x-decorator': string;
26
+ 'x-component': string;
27
+ 'x-component-props': {
28
+ multiple: boolean;
29
+ };
30
+ 'x-reactions': string[];
31
+ };
21
32
  name: any;
22
33
  title: any;
23
34
  description: any;
@@ -125,16 +136,5 @@ export declare class ViewCollectionTemplate extends CollectionTemplate {
125
136
  };
126
137
  };
127
138
  };
128
- filterTargetKey: {
129
- title: string;
130
- type: string;
131
- description: string;
132
- 'x-decorator': string;
133
- 'x-component': string;
134
- 'x-component-props': {
135
- multiple: boolean;
136
- };
137
- 'x-reactions': string[];
138
- };
139
139
  };
140
140
  }
@@ -12,7 +12,7 @@ import type { CollectionOptions } from './Collection';
12
12
  * @internal
13
13
  */
14
14
  export declare const collectionTransform: (collection: CollectionOptions, app: Application) => {
15
- title: string;
15
+ title: any;
16
16
  rawTitle: any;
17
17
  fields: {
18
18
  name?: any;
@@ -28,9 +28,7 @@ export declare const collectionTransform: (collection: CollectionOptions, app: A
28
28
  with?: string | string[];
29
29
  delayRestore?: any;
30
30
  };
31
- tableName?: string; /**
32
- * @internal
33
- */
31
+ tableName?: string;
34
32
  inherits?: string | string[];
35
33
  inherit?: string;
36
34
  key?: string;
@@ -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 aclCheckRefresh: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -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 afterSuccess: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -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 blockHeight: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -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 filterFormDefaultValues: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -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 formAssignRules: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -6,6 +6,7 @@
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 * from './afterSuccess';
9
10
  export * from './confirm';
10
11
  export * from './dataScope';
11
12
  export * from './openView';
@@ -25,9 +26,15 @@ export * from './layout';
25
26
  export * from './required';
26
27
  export * from './fieldComponent';
27
28
  export * from './aclCheck';
29
+ export * from './aclCheckRefresh';
28
30
  export * from './pattern';
29
31
  export * from './validation';
30
32
  export * from './columnFixed';
33
+ export * from './formAssignRules';
34
+ export * from './filterFormDefaultValues';
35
+ export * from './linkageRulesRefresh';
36
+ export * from './blockHeight';
31
37
  export { fieldLinkageRules, subFormFieldLinkageRules, detailsFieldLinkageRules, linkageSetDetailsFieldProps, actionLinkageRules, blockLinkageRules, linkageSetBlockProps, linkageSetActionProps, linkageSetFieldProps, subFormLinkageSetFieldProps, linkageAssignField, linkageRunjs, subFormLinkageAssignField, } from './linkageRules';
32
38
  export { displayFieldComponent } from './displayFieldComponent';
33
39
  export * from './overflowMode';
40
+ export * from './numberFormat';
@@ -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 linkageRulesRefresh: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -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 numberFormat: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
@@ -12,4 +12,5 @@ export declare const BlockItemCard: React.ForwardRefExoticComponent<CardProps &
12
12
  beforeContent?: React.ReactNode;
13
13
  afterContent?: React.ReactNode;
14
14
  description?: any;
15
+ heightMode?: string;
15
16
  } & React.RefAttributes<unknown>>;
@@ -6,10 +6,12 @@
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 { type MetaTreeNode } from '@nocobase/flow-engine';
9
10
  import React from 'react';
10
11
  import { FilterGroupType } from '@nocobase/utils/client';
11
12
  export declare const ConditionBuilder: React.MemoExoticComponent<import("@formily/reactive-react").ReactFC<{
12
13
  value: FilterGroupType;
13
14
  onChange: (value: FilterGroupType) => void;
15
+ extraMetaTree?: MetaTreeNode[];
14
16
  }>>;
15
17
  export declare const commonConditionHandler: (ctx: any, params: any) => void;
@@ -14,6 +14,7 @@ interface Props {
14
14
  onChange: (value: any) => void;
15
15
  metaTree: MetaTreeNode[] | (() => Promise<MetaTreeNode[]>);
16
16
  model: FieldModel;
17
+ flags?: Record<string, any>;
17
18
  }
18
19
  export declare const DefaultValue: React.ForwardRefExoticComponent<Partial<Props> & React.RefAttributes<unknown>>;
19
20
  export {};
@@ -0,0 +1,32 @@
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 interface FieldAssignEditorProps {
11
+ t: (key: string) => string;
12
+ fieldOptions: Array<{
13
+ label: string;
14
+ value: string;
15
+ }>;
16
+ /** 赋值目标路径(例如 `title` / `user.name`) */
17
+ field?: string;
18
+ onFieldChange: (targetPath?: string) => void;
19
+ value: any;
20
+ onValueChange: (value: any) => void;
21
+ fieldLabel?: React.ReactNode;
22
+ valueLabel?: React.ReactNode;
23
+ showValueEditorWhenNoField?: boolean;
24
+ }
25
+ /**
26
+ * 通用“字段赋值”编辑器:
27
+ * - 选择字段
28
+ * - 编辑赋值(支持变量引用 + 常量)
29
+ *
30
+ * 可在“表单赋值配置”和“联动规则赋值动作”等场景复用。
31
+ */
32
+ export declare const FieldAssignEditor: React.FC<FieldAssignEditorProps>;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import React from 'react';
10
+ import { dayjs } from '@nocobase/utils/client';
11
+ export type ExactDatePickerMode = 'year' | 'quarter' | 'month' | 'date';
12
+ export type ExactDatePickerValue = dayjs.Dayjs | [dayjs.Dayjs, dayjs.Dayjs] | null;
13
+ export interface FieldAssignExactDatePickerProps {
14
+ picker?: ExactDatePickerMode;
15
+ format?: string;
16
+ showTime?: boolean;
17
+ timeFormat?: string;
18
+ value?: unknown;
19
+ isRange?: boolean;
20
+ onChange?: (value: ExactDatePickerValue) => void;
21
+ style?: React.CSSProperties;
22
+ }
23
+ export declare const FieldAssignExactDatePicker: React.FC<FieldAssignExactDatePickerProps>;