@nocobase/client 2.1.0-beta.1 → 2.1.0-beta.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 (61) hide show
  1. package/LICENSE +201 -661
  2. package/README.md +79 -10
  3. package/es/ai/tools-manager/index.d.ts +0 -1
  4. package/es/collection-manager/templates/view.d.ts +11 -11
  5. package/es/flow/actions/afterSuccess.d.ts +9 -0
  6. package/es/flow/actions/index.d.ts +1 -0
  7. package/es/flow/components/FieldAssignValueInput.d.ts +6 -0
  8. package/es/flow/components/code-editor/runjsDiagnostics.d.ts +5 -2
  9. package/es/flow/components/filter/LinkageFilterItem.d.ts +23 -0
  10. package/es/flow/internal/utils/modelUtils.d.ts +4 -0
  11. package/es/flow/models/actions/AddChildActionModel.d.ts +1 -0
  12. package/es/flow/models/actions/BulkDeleteActionModel.d.ts +1 -0
  13. package/es/flow/models/actions/LinkActionModel.d.ts +1 -4
  14. package/es/flow/models/actions/LinkActionUtils.d.ts +34 -0
  15. package/es/flow/models/actions/UpdateRecordActionUtils.d.ts +12 -0
  16. package/es/flow/models/actions/joinUrlSearch.d.ts +12 -0
  17. package/es/flow/models/base/ActionGroupModel.d.ts +8 -0
  18. package/es/flow/models/base/BlockModel.d.ts +26 -0
  19. package/es/flow/models/base/CollectionBlockModel.d.ts +9 -27
  20. package/es/flow/models/base/GridModel.d.ts +1 -0
  21. package/es/flow/models/base/PageModel/ChildPageModel.d.ts +1 -0
  22. package/es/flow/models/base/PageModel/PageModel.d.ts +1 -1
  23. package/es/flow/models/base/PageModel/RootPageModel.d.ts +8 -0
  24. package/es/flow/models/blocks/details/DetailsBlockModel.d.ts +4 -0
  25. package/es/flow/models/blocks/filter-form/FilterFormGridModel.d.ts +12 -1
  26. package/es/flow/models/blocks/form/CreateFormModel.d.ts +1 -0
  27. package/es/flow/models/blocks/form/EditFormModel.d.ts +2 -0
  28. package/es/flow/models/blocks/form/FormBlockModel.d.ts +1 -0
  29. package/es/flow/models/blocks/form/submitValues.d.ts +8 -0
  30. package/es/flow/models/blocks/form/value-runtime/rules.d.ts +2 -0
  31. package/es/flow/models/blocks/table/TableBlockModel.d.ts +1 -23
  32. package/es/flow/models/fields/DisplayAssociationField/displaySubListUtils.d.ts +14 -0
  33. package/es/flow/utils/actionCapability.d.ts +60 -0
  34. package/es/flow/utils/index.d.ts +1 -0
  35. package/es/flow/utils/pagination.d.ts +29 -0
  36. package/es/index.mjs +5675 -4712
  37. package/es/route-switch/antd/admin-layout/index.d.ts +4 -0
  38. package/es/route-switch/antd/admin-layout/mobileMenuNavigation.d.ts +15 -0
  39. package/es/schema-component/antd/association-field/Table.d.ts +0 -57
  40. package/es/schema-component/antd/date-picker/DatePicker.d.ts +26 -0
  41. package/es/schema-settings/SchemaSettingsDefaultValue.d.ts +18 -0
  42. package/es/schema-settings/VariableInput/hooks/useParentIterationVariable.d.ts +3 -3
  43. package/lib/index.js +220 -179
  44. package/lib/locale/de-DE.json +3 -0
  45. package/lib/locale/en-US.json +3 -0
  46. package/lib/locale/es-ES.json +3 -0
  47. package/lib/locale/fr-FR.json +3 -0
  48. package/lib/locale/hu-HU.json +3 -0
  49. package/lib/locale/id-ID.json +3 -0
  50. package/lib/locale/it-IT.json +3 -0
  51. package/lib/locale/ja-JP.json +3 -0
  52. package/lib/locale/ko-KR.json +3 -0
  53. package/lib/locale/nl-NL.json +3 -0
  54. package/lib/locale/pt-BR.json +3 -0
  55. package/lib/locale/ru-RU.json +3 -0
  56. package/lib/locale/tr-TR.json +3 -0
  57. package/lib/locale/uk-UA.json +3 -0
  58. package/lib/locale/vi-VN.json +3 -0
  59. package/lib/locale/zh-CN.json +4 -1
  60. package/lib/locale/zh-TW.json +3 -0
  61. package/package.json +7 -7
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>
@@ -18,4 +18,3 @@ export declare class DefaultToolsManager implements ToolsManager {
18
18
  registerTools(name: string, options: ToolsOptions): void;
19
19
  }
20
20
  export * from './types';
21
- export * from './hooks';
@@ -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
  }
@@ -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>;
@@ -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';
@@ -54,6 +54,12 @@ interface Props {
54
54
  enableDateVariableAsConstant?: boolean;
55
55
  }
56
56
  export declare function mergeItemMetaTreeForAssignValue(baseTree: MetaTreeNode[], extraTree: MetaTreeNode[]): MetaTreeNode[];
57
+ export declare function resolveAssignValueFieldPath(itemModel: any): string | undefined;
58
+ export declare function resolveAssignValueFieldModelUse(options: {
59
+ itemModel: any;
60
+ fieldModelUse?: string;
61
+ preferFormItemFieldModel?: boolean;
62
+ }): string | undefined;
57
63
  /**
58
64
  * 根据所选字段渲染对应的赋值编辑器:
59
65
  * - 使用临时的 VariableFieldFormModel 包裹字段模型,确保常量编辑为真实字段组件
@@ -37,7 +37,10 @@ export type PreviewRunJSResult = {
37
37
  success: boolean;
38
38
  message: string;
39
39
  };
40
+ export type RunJSDiagnosticsOptions = {
41
+ version?: string;
42
+ };
40
43
  export declare const MAX_MESSAGE_CHARS = 4000;
41
44
  export declare function formatRunJSPreviewMessage(result: DiagnoseRunJSResult): string;
42
- export declare function diagnoseRunJS(code: string, ctx: FlowContext): Promise<DiagnoseRunJSResult>;
43
- export declare function previewRunJS(code: string, ctx: FlowContext): Promise<PreviewRunJSResult>;
45
+ export declare function diagnoseRunJS(code: string, ctx: FlowContext, options?: RunJSDiagnosticsOptions): Promise<DiagnoseRunJSResult>;
46
+ export declare function previewRunJS(code: string, ctx: FlowContext, options?: RunJSDiagnosticsOptions): Promise<PreviewRunJSResult>;
@@ -21,8 +21,31 @@ export interface LinkageFilterItemProps {
21
21
  /** 向变量树额外注入节点(置于根部) */
22
22
  extraMetaTree?: MetaTreeNode[];
23
23
  }
24
+ type OperatorMeta = {
25
+ value: string;
26
+ label: string | React.ReactNode;
27
+ noValue?: boolean;
28
+ schema?: any;
29
+ selected?: boolean;
30
+ };
31
+ type FilterableChild = {
32
+ name: string;
33
+ title?: string;
34
+ schema?: any;
35
+ operators?: OperatorMeta[];
36
+ };
37
+ type FieldInterfaceDef = {
38
+ filterable?: {
39
+ operators?: Array<OperatorMeta & {
40
+ visible?: (meta: MetaTreeNode) => boolean;
41
+ }>;
42
+ children?: FilterableChild[];
43
+ };
44
+ };
24
45
  export declare function mergeExtraMetaTreeWithBase(baseMetaTree: MetaTreeNode[] | undefined, extraMetaTree?: MetaTreeNode[]): MetaTreeNode[];
46
+ export declare function enhanceMetaTreeWithFilterableChildren(metaTree: MetaTreeNode[] | undefined, getFieldInterface?: (name: string) => FieldInterfaceDef | undefined): Promise<MetaTreeNode[]>;
25
47
  /**
26
48
  * LinkageFilterItem:左/右均为可变量输入,适用于联动规则等“前端逻辑”场景
27
49
  */
28
50
  export declare const LinkageFilterItem: React.FC<LinkageFilterItemProps>;
51
+ export {};
@@ -13,8 +13,12 @@ export interface CollectionLike {
13
13
  dataSourceKey?: string;
14
14
  name?: string;
15
15
  }
16
+ export declare const CUSTOM_FIELD_TARGET_PATH_PREFIX = "__custom__";
17
+ export declare function buildCustomFieldTargetPath(customFieldName: string): string;
16
18
  export declare function isToManyAssociationField(field: unknown): boolean;
17
19
  export declare function getCollectionFromModel(model: unknown): CollectionLike | undefined;
20
+ export declare function getFormItemFieldPathCandidates(model: unknown): string[];
21
+ export declare function getFormItemPreferredFieldPath(model: unknown): string | undefined;
18
22
  /**
19
23
  * Find a configured FormItemModel by its `fieldSettings.init.fieldPath` (or `fieldPath`) in the current form grid,
20
24
  * including nested subform items. Also supports combined path matching when a model stores
@@ -9,6 +9,7 @@
9
9
  import type { ButtonProps } from 'antd/es/button';
10
10
  import { PopupActionModel } from '../base';
11
11
  export declare class AddChildActionModel extends PopupActionModel {
12
+ static capabilityActionName: any;
12
13
  defaultProps: ButtonProps;
13
14
  getAclActionName(): string;
14
15
  onInit(options: any): void;
@@ -10,6 +10,7 @@ import { ButtonProps } from 'antd';
10
10
  import { ActionModel } from '../base';
11
11
  export declare class BulkDeleteActionModel extends ActionModel {
12
12
  static scene: import("../base").ActionSceneType;
13
+ static capabilityActionName: string;
13
14
  defaultProps: ButtonProps;
14
15
  getAclActionName(): string;
15
16
  }
@@ -8,10 +8,7 @@
8
8
  */
9
9
  import type { ButtonProps } from 'antd/es/button';
10
10
  import { ActionModel } from '../base';
11
- export declare function joinUrlSearch(url: string, params?: {
12
- name: string;
13
- value: any;
14
- }[]): string;
11
+ export { joinUrlSearch } from './joinUrlSearch';
15
12
  export declare class LinkActionModel extends ActionModel {
16
13
  static scene: import("../base").ActionSceneType;
17
14
  defaultProps: ButtonProps;
@@ -0,0 +1,34 @@
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 function completeURL(url: string, origin?: string): string;
10
+ export declare function handleLinkNavigation(options: {
11
+ link: string;
12
+ openInNewWindow?: boolean;
13
+ router: {
14
+ navigate: (to: string, options?: {
15
+ replace?: boolean;
16
+ }) => void;
17
+ };
18
+ isExternalLink: boolean;
19
+ setLocationHref?: (url: string) => void;
20
+ openWindow?: (url?: string, target?: string) => Window | null;
21
+ }): void;
22
+ /**
23
+ * 判断 Link 导航后是否需要销毁当前视图
24
+ * @param options 判定参数
25
+ * @param options.openInNewWindow 是否新窗口打开
26
+ * @param options.isExternalLink 是否外部链接
27
+ * @param options.viewType 当前视图类型
28
+ * @returns 是否应销毁当前视图
29
+ */
30
+ export declare function shouldDestroyViewAfterLinkNavigation(options: {
31
+ openInNewWindow?: boolean;
32
+ isExternalLink: boolean;
33
+ viewType?: string;
34
+ }): boolean;
@@ -0,0 +1,12 @@
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 function refreshLinkageRulesAfterUpdate(ctx: any): Promise<void>;
10
+ export declare function applyUpdateRecordAction(ctx: any, params: any, options?: {
11
+ settingsFlowKey?: string;
12
+ }): Promise<void>;
@@ -0,0 +1,12 @@
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 function joinUrlSearch(url: string, params?: {
10
+ name: string;
11
+ value: any;
12
+ }[]): string;
@@ -16,6 +16,14 @@ export declare class ActionGroupModel extends FlowModel {
16
16
  static get currentModels(): Map<string, typeof ActionModel>;
17
17
  static get models(): Map<any, any>;
18
18
  static registerActionModels(models: Record<string, any>): void;
19
+ /**
20
+ * 判断动作模型在当前数据表上下文下是否应显示在 v2 的“添加动作”菜单中。
21
+ *
22
+ * @param ModelClass 动作模型类
23
+ * @param ctx Flow 上下文
24
+ * @returns 是否显示
25
+ */
26
+ static isActionModelVisible(ModelClass: typeof ActionModel, ctx: FlowModelContext): boolean;
19
27
  static defineChildren(ctx: FlowModelContext): Promise<any[]>;
20
28
  }
21
29
  export declare class CollectionActionGroupModel extends ActionGroupModel {
@@ -18,6 +18,32 @@ export declare class BlockModel<T = DefaultStructure> extends FlowModel<T> {
18
18
  customModelClasses: any;
19
19
  collectionRequired: boolean;
20
20
  private ObservedRenderComponent;
21
+ /**
22
+ * 记录各筛选来源是否活跃(有有效筛选值)
23
+ * key: filterId (筛选器 uid), value: boolean (是否有有效筛选)
24
+ */
25
+ private activeFilterSources;
26
+ /**
27
+ * 设置指定筛选来源的活跃状态
28
+ * @param filterId 筛选器 uid
29
+ * @param active 是否有有效筛选值
30
+ */
31
+ setFilterActive(filterId: string, active: boolean): void;
32
+ /**
33
+ * 检查是否有任何活跃的筛选来源
34
+ * @returns boolean
35
+ */
36
+ hasActiveFilters(): boolean;
37
+ /**
38
+ * 移除指定筛选来源
39
+ * @param filterId 筛选器 uid
40
+ */
41
+ removeFilterSource(filterId: string): void;
42
+ /**
43
+ * 获取数据加载模式
44
+ * @returns 'auto' | 'manual'
45
+ */
46
+ getDataLoadingMode(): 'auto' | 'manual';
21
47
  static _getScene(): BlockSceneType[];
22
48
  static _isScene(scene: BlockSceneType): boolean;
23
49
  getModelClassName(className: string): any;
@@ -21,17 +21,20 @@ export declare class CollectionBlockModel<T = DefaultStructure> extends DataBloc
21
21
  private previousBeforeRenderHash;
22
22
  private lastSeenDirtyVersion;
23
23
  private dirtyRefreshing;
24
- /**
25
- * 记录各筛选来源是否活跃(有有效筛选值)
26
- * key: filterId (筛选器 uid), value: boolean (是否有有效筛选)
27
- */
28
- private activeFilterSources;
29
24
  protected onMount(): void;
30
- onActive(): void;
25
+ private getDirtyTrackingVersion;
26
+ onActive(forceRefresh?: boolean): void;
31
27
  /**
32
28
  * 子菜单过滤函数
33
29
  */
34
30
  static filterCollection(_collection: Collection): boolean;
31
+ /**
32
+ * 判断当前区块模型在 collection 选择菜单中是否应该展示指定数据表。
33
+ *
34
+ * @param collection 数据表
35
+ * @returns 是否显示
36
+ */
37
+ static isCollectionAvailable(collection: Collection | undefined): boolean;
35
38
  /**
36
39
  * 定义子菜单选项
37
40
  */
@@ -61,27 +64,6 @@ export declare class CollectionBlockModel<T = DefaultStructure> extends DataBloc
61
64
  }[]>;
62
65
  getResourceSettingsInitParams(): ResourceSettingsInitParams;
63
66
  onInit(options: any): void;
64
- /**
65
- * 获取数据加载模式
66
- * @returns 'auto' | 'manual'
67
- */
68
- getDataLoadingMode(): 'auto' | 'manual';
69
- /**
70
- * 设置指定筛选来源的活跃状态
71
- * @param filterId 筛选器 uid
72
- * @param active 是否有有效筛选值
73
- */
74
- setFilterActive(filterId: string, active: boolean): void;
75
- /**
76
- * 检查是否有任何活跃的筛选来源
77
- * @returns boolean
78
- */
79
- hasActiveFilters(): boolean;
80
- /**
81
- * 移除指定筛选来源
82
- * @param filterId 筛选器 uid
83
- */
84
- removeFilterSource(filterId: string): void;
85
67
  createResource(ctx: any, params: any): SingleRecordResource | MultiRecordResource;
86
68
  refresh(): Promise<void>;
87
69
  protected defaultBlockTitle(): string;
@@ -45,6 +45,7 @@ export declare class GridModel<T extends {
45
45
  mergeRowsWithItems(rows: Record<string, string[][]>): Record<string, string[][]>;
46
46
  resetRows(syncProps?: boolean): void;
47
47
  private computePointerPosition;
48
+ private getDragContainer;
48
49
  private updateLayoutSnapshot;
49
50
  private scheduleSnapshotRefresh;
50
51
  /**
@@ -14,6 +14,7 @@ export declare class ChildPageModel extends PageModel {
14
14
  tabBarExtraContent: {
15
15
  left: React.JSX.Element;
16
16
  };
17
+ renderBackButtonWhenTabsDisabled(): React.JSX.Element;
17
18
  createPageTabModelOptions: () => CreateModelOptions;
18
19
  handleDragEnd(event: DragEndEvent): Promise<void>;
19
20
  render(): React.JSX.Element;
@@ -30,7 +30,7 @@ export declare class PageModel extends FlowModel<PageModelStructure> {
30
30
  private scheduleActiveLifecycleRefresh;
31
31
  onMount(): void;
32
32
  protected onUnmount(): void;
33
- invokeTabModelLifecycleMethod(tabActiveKey: string, method: 'onActive' | 'onInactive'): void;
33
+ invokeTabModelLifecycleMethod(tabActiveKey: string, method: 'onActive' | 'onInactive', forceRefresh?: boolean): void;
34
34
  /**
35
35
  * Resolve configured document title template and update browser tab title.
36
36
  * Priority:
@@ -10,6 +10,14 @@ import { DragEndEvent } from '@dnd-kit/core';
10
10
  import { PageModel } from './PageModel';
11
11
  export declare class RootPageModel extends PageModel {
12
12
  mounted: boolean;
13
+ /**
14
+ * 新建 tab 在首次保存完成前,前端 route 里可能还没有数据库 id。
15
+ * 拖拽前兜底触发一次保存,确保 move 接口拿到真实主键。
16
+ *
17
+ * @param model - 当前参与拖拽的 tab model
18
+ * @returns 可用于排序接口的 route id
19
+ */
20
+ private ensurePersistedRouteId;
13
21
  onMount(): void;
14
22
  saveStepParams(): Promise<void>;
15
23
  handleDragEnd(event: DragEndEvent): Promise<void>;
@@ -18,6 +18,8 @@ export declare class DetailsBlockModel extends CollectionBlockModel<{
18
18
  };
19
19
  }> {
20
20
  static scene: import("../../base").BlockSceneType;
21
+ private hadSingleRecordData;
22
+ private hasMultiRefreshDispatched;
21
23
  _defaultCustomModelClasses: {
22
24
  RecordActionGroupModel: string;
23
25
  DetailsItemModel: string;
@@ -28,7 +30,9 @@ export declare class DetailsBlockModel extends CollectionBlockModel<{
28
30
  createResource(ctx: any, params: any): SingleRecordResource<unknown> | MultiRecordResource<unknown>;
29
31
  onInit(options: any): void;
30
32
  isMultiRecordResource(): boolean;
33
+ hasDispatchedMultiRefresh(): boolean;
31
34
  getCurrentRecord(): any;
35
+ hasAvailableData(): boolean;
32
36
  handlePageChange: (page: number) => Promise<void>;
33
37
  refresh(): Promise<void>;
34
38
  renderPagination(): React.JSX.Element;
@@ -22,10 +22,21 @@ export declare class FilterFormGridModel extends GridModel {
22
22
  };
23
23
  };
24
24
  dragOverlayConfig: DragOverlayConfig;
25
- private hiddenRows;
26
25
  readonly loading: {
27
26
  value: boolean;
28
27
  };
28
+ private getAssociationFilterTargetKey;
29
+ /**
30
+ * 获取筛选表单当前“完整布局”。
31
+ * 折叠态会临时裁剪 props.rows,因此这里优先选取行数更多的那份布局,
32
+ * 避免拖拽排序或重新挂载后只拿到被裁剪过的运行时 rows。
33
+ */
34
+ private getFullLayout;
35
+ /**
36
+ * 按“可视字段行数”裁剪布局,而不是只按 grid row 数裁剪。
37
+ * 这样即使拖拽后多个字段被排进同一个 cell,也仍然可以正确折叠。
38
+ */
39
+ private limitRowsByVisibleCount;
29
40
  toggleFormFieldsCollapse(collapse: boolean, visibleRows: number): void;
30
41
  onModelCreated(subModel: FilterFormItemModel): Promise<void>;
31
42
  renderAddSubModelButton(): React.JSX.Element;
@@ -11,6 +11,7 @@ import React from 'react';
11
11
  import { FormBlockModel } from './FormBlockModel';
12
12
  export declare class CreateFormModel extends FormBlockModel {
13
13
  static scene: import("../../base/BlockModel").BlockSceneType;
14
+ static blockCapabilityActionName: string;
14
15
  private actionFlowSettings;
15
16
  private actionExtraToolbarItems;
16
17
  createResource(ctx: any, params: any): SingleRecordResource<unknown>;
@@ -11,11 +11,13 @@ import React from 'react';
11
11
  import { FormBlockModel } from './FormBlockModel';
12
12
  export declare class EditFormModel extends FormBlockModel {
13
13
  static scene: import("../../base").BlockSceneType;
14
+ static blockCapabilityActionName: string;
14
15
  private actionFlowSettings;
15
16
  private actionExtraToolbarItems;
16
17
  createResource(_ctx: FlowModelContext, params: any): SingleRecordResource<unknown> | MultiRecordResource<unknown>;
17
18
  isMultiRecordResource(): boolean;
18
19
  getCurrentRecord(): any;
20
+ hasAvailableData(): boolean;
19
21
  getAclActionName(): string;
20
22
  handlePageChange: (page: number) => Promise<void>;
21
23
  submitHandler(ctx: any, params: any, cb?: (values?: any, filterByTk?: any) => void): Promise<void>;
@@ -32,6 +32,7 @@ export declare class FormBlockModel<T extends DefaultCollectionBlockModelStructu
32
32
  FormAssociationFieldGroupModel: string;
33
33
  };
34
34
  customModelClasses: CustomFormBlockModelClassesEnum;
35
+ private syncRuntimeAssignRules;
35
36
  renderConfigureActions(): React.JSX.Element;
36
37
  setFieldsValue(values: any): void;
37
38
  setFieldValue(fieldName: any, value: any): void;
@@ -6,7 +6,15 @@
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 { NamePath } from './value-runtime/types';
9
10
  import type { FormBlockModel } from './FormBlockModel';
11
+ /**
12
+ * 生成提交前的校验字段列表:
13
+ * - 在配置态下可用于绕开“联动隐藏字段”的必填校验;
14
+ * - 仅排除 `model.hidden=true` 的字段路径;
15
+ * - 返回 null 表示无法安全推断,调用方应回退到 `validateFields()` 全量校验。
16
+ */
17
+ export declare function getValidationNamePathsExcludingHiddenModels(blockModel: FormBlockModel): NamePath[] | null;
10
18
  /**
11
19
  * 提交前过滤:移除当前表单 block 中被「联动规则隐藏」的字段值(`model.hidden === true`)。
12
20
  *
@@ -83,6 +83,8 @@ export declare class RuleEngine {
83
83
  private getUpdateAssociationForTargetPath;
84
84
  private getDefaultRuleId;
85
85
  private getModelTargetNamePath;
86
+ private getAssignTemplateTargetPathForModel;
87
+ private hasAssignTemplateForTargetPath;
86
88
  private tryRegisterDefaultRuleInstance;
87
89
  private getModelTargetPath;
88
90
  private getAssignRuleInstanceId;
@@ -62,29 +62,7 @@ export declare class TableBlockModel extends CollectionBlockModel<TableBlockMode
62
62
  };
63
63
  renderCell: (checked: any, record: any, index: any, originNode: any) => any;
64
64
  renderConfigureActions(): React.JSX.Element;
65
- pagination(): {
66
- current: number;
67
- pageSize: number;
68
- total: any;
69
- showTotal: (total: any) => any;
70
- showSizeChanger: boolean;
71
- simple?: undefined;
72
- showTitle?: undefined;
73
- hideOnSinglePage?: undefined;
74
- className?: undefined;
75
- itemRender?: undefined;
76
- } | {
77
- simple: boolean;
78
- showTitle: boolean;
79
- showSizeChanger: boolean;
80
- hideOnSinglePage: boolean;
81
- pageSize: number;
82
- total: number;
83
- className: string;
84
- itemRender: (_: any, type: any, originalElement: any) => any;
85
- current?: undefined;
86
- showTotal?: undefined;
87
- };
65
+ pagination(): import("antd").PaginationProps;
88
66
  renderComponent(): React.JSX.Element;
89
67
  }
90
68
  export {};
@@ -0,0 +1,14 @@
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 normalizeFieldIndexChain: (fieldIndex: unknown) => string[];
10
+ export declare const buildDisplaySubListForkKey: ({ parentFieldIndex, index, blockPage, }: {
11
+ parentFieldIndex: string[];
12
+ index: number;
13
+ blockPage: number;
14
+ }) => string;