@nocobase/client 2.1.0-alpha.2 → 2.1.0-alpha.21
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.
- package/LICENSE +201 -661
- package/README.md +79 -10
- package/es/ai/index.d.ts +1 -0
- package/es/ai/skills-manager/index.d.ts +9 -0
- package/es/ai/skills-manager/types.d.ts +23 -0
- package/es/ai/tools-manager/index.d.ts +0 -1
- package/es/ai/tools-manager/types.d.ts +11 -1
- package/es/application/Application.d.ts +5 -1
- package/es/block-provider/BlockProvider.d.ts +1 -0
- package/es/collection-manager/templates/view.d.ts +11 -11
- package/es/flow/actions/afterSuccess.d.ts +9 -0
- package/es/flow/actions/index.d.ts +1 -0
- package/es/flow/components/FieldAssignValueInput.d.ts +26 -1
- package/es/flow/components/RunJSValueEditor.d.ts +1 -1
- package/es/flow/components/code-editor/core/tooltipParent.d.ts +9 -0
- package/es/flow/components/code-editor/resolveScenes.d.ts +10 -0
- package/es/flow/components/code-editor/runjsDiagnostics.d.ts +5 -2
- package/es/flow/components/filter/LinkageFilterItem.d.ts +23 -0
- package/es/flow/internal/utils/modelUtils.d.ts +4 -0
- package/es/flow/models/actions/AddChildActionModel.d.ts +1 -0
- package/es/flow/models/actions/BulkDeleteActionModel.d.ts +1 -0
- package/es/flow/models/actions/JSItemActionModel.d.ts +19 -0
- package/es/flow/models/actions/LinkActionModel.d.ts +1 -4
- package/es/flow/models/actions/LinkActionUtils.d.ts +34 -0
- package/es/flow/models/actions/UpdateRecordActionUtils.d.ts +12 -0
- package/es/flow/models/actions/index.d.ts +1 -0
- package/es/flow/models/actions/joinUrlSearch.d.ts +12 -0
- package/es/flow/models/base/ActionGroupModel.d.ts +8 -0
- package/es/flow/models/base/BlockModel.d.ts +26 -0
- package/es/flow/models/base/CollectionBlockModel.d.ts +9 -27
- package/es/flow/models/base/GridModel.d.ts +1 -0
- package/es/flow/models/base/PageModel/ChildPageModel.d.ts +1 -0
- package/es/flow/models/base/PageModel/PageModel.d.ts +1 -1
- package/es/flow/models/base/PageModel/RootPageModel.d.ts +8 -0
- package/es/flow/models/blocks/details/DetailsBlockModel.d.ts +4 -0
- package/es/flow/models/blocks/details/DetailsItemModel.d.ts +7 -0
- package/es/flow/models/blocks/filter-form/FilterFormGridModel.d.ts +12 -1
- package/es/flow/models/blocks/form/CreateFormModel.d.ts +1 -0
- package/es/flow/models/blocks/form/EditFormModel.d.ts +2 -0
- package/es/flow/models/blocks/form/FormBlockModel.d.ts +1 -0
- package/es/flow/models/blocks/form/submitValues.d.ts +21 -0
- package/es/flow/models/blocks/form/value-runtime/rules.d.ts +3 -0
- package/es/flow/models/blocks/form/value-runtime/runtime.d.ts +1 -0
- package/es/flow/models/blocks/table/TableBlockModel.d.ts +1 -23
- package/es/flow/models/fields/AssociationFieldModel/AssociationFieldModel.d.ts +1 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/actions/popupSubTableBeforeClose.d.ts +25 -0
- package/es/flow/models/fields/AssociationFieldModel/RecordPickerFieldModel.d.ts +10 -0
- package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/index.d.ts +1 -0
- package/es/flow/models/fields/AssociationFieldModel/itemChain.d.ts +5 -0
- package/es/flow/models/fields/AssociationFieldModel/recordSelectShared.d.ts +2 -13
- package/es/flow/models/fields/DisplayAssociationField/displaySubListUtils.d.ts +14 -0
- package/es/flow/models/fields/DisplayTextFieldModel.d.ts +1 -0
- package/es/flow/utils/actionCapability.d.ts +60 -0
- package/es/flow/utils/index.d.ts +1 -0
- package/es/flow/utils/pagination.d.ts +29 -0
- package/es/index.css +1 -1
- package/es/index.mjs +2225 -107889
- package/es/index.mjs.LICENSE.txt +8 -0
- package/es/lazy-helper/index.d.ts +8 -6
- package/es/pm/AdminSettingsLayoutModel.d.ts +13 -0
- package/es/pm/PluginSetting.d.ts +2 -1
- package/es/pm/index.d.ts +1 -0
- package/es/route-switch/antd/admin-layout/AdminLayoutModel.d.ts +27 -0
- package/es/route-switch/antd/admin-layout/AdminLayoutRouteCoordinator.d.ts +50 -0
- package/es/route-switch/antd/admin-layout/index.d.ts +4 -0
- package/es/route-switch/antd/admin-layout/mobileMenuNavigation.d.ts +15 -0
- package/es/schema-component/antd/association-field/Table.d.ts +0 -57
- package/es/schema-component/antd/date-picker/DatePicker.d.ts +26 -0
- package/es/schema-settings/SchemaSettings.d.ts +2 -0
- package/es/schema-settings/SchemaSettingsDefaultValue.d.ts +18 -0
- package/es/schema-settings/VariableInput/hooks/useParentIterationVariable.d.ts +3 -3
- package/lib/index.css +1 -1
- package/lib/index.js +2032 -2018
- package/lib/index.js.LICENSE.txt +1 -0
- package/lib/locale/de-DE.json +5 -1
- package/lib/locale/en-US.json +5 -0
- package/lib/locale/es-ES.json +5 -1
- package/lib/locale/fr-FR.json +5 -1
- package/lib/locale/hu-HU.json +5 -1
- package/lib/locale/id-ID.json +5 -1
- package/lib/locale/it-IT.json +5 -1
- package/lib/locale/ja-JP.json +5 -1
- package/lib/locale/ko-KR.json +5 -1
- package/lib/locale/nl-NL.json +5 -1
- package/lib/locale/pt-BR.json +5 -1
- package/lib/locale/ru-RU.json +5 -1
- package/lib/locale/tr-TR.json +5 -1
- package/lib/locale/uk-UA.json +5 -1
- package/lib/locale/vi-VN.json +5 -1
- package/lib/locale/zh-CN.json +6 -1
- package/lib/locale/zh-TW.json +5 -1
- package/package.json +9 -9
- package/es/md-BbvRKckr.mjs +0 -61
- package/es/md-oH2RssNY.mjs +0 -61
- package/lib/md-BbvRKckr-IQIU5F3r.js +0 -1
- package/lib/md-oH2RssNY-IQIU5F3r.js +0 -1
package/README.md
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
# NocoBase
|
|
2
2
|
|
|
3
3
|
<video width="100%" controls>
|
|
4
|
-
|
|
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-first, open-source no-code 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
|
|
11
|
-
|
|
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
|
-
|
|
23
|
-
https://
|
|
29
|
+
Forum:
|
|
30
|
+
https://forum.nocobase.com/
|
|
24
31
|
|
|
25
|
-
|
|
26
|
-
https://www.nocobase.com/en/
|
|
32
|
+
Use Cases:
|
|
33
|
+
https://www.nocobase.com/en/blog/tags/customer-stories
|
|
27
34
|
|
|
35
|
+
## Release Notes
|
|
28
36
|
|
|
29
|
-
|
|
30
|
-
|
|
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
|
+

|
|
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
|
+

|
|
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
|
+

|
|
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
|
+

|
|
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>
|
package/es/ai/index.d.ts
CHANGED
|
@@ -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 * from './types';
|
|
@@ -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
|
+
export type SkillsScope = 'SPECIFIED' | 'GENERAL' | 'CUSTOM';
|
|
10
|
+
export type SkillsEntry = {
|
|
11
|
+
scope: SkillsScope;
|
|
12
|
+
name: string;
|
|
13
|
+
description: string;
|
|
14
|
+
content?: string;
|
|
15
|
+
tools?: string[];
|
|
16
|
+
title?: string;
|
|
17
|
+
about?: string;
|
|
18
|
+
from?: string;
|
|
19
|
+
};
|
|
20
|
+
export type SkillsFilter = {
|
|
21
|
+
scope?: SkillsScope;
|
|
22
|
+
name?: string;
|
|
23
|
+
};
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import type { ComponentType } from 'react';
|
|
10
|
+
import type { ModalProps } from 'antd';
|
|
10
11
|
import type { Application } from '../../application';
|
|
11
12
|
import { Registry } from '@nocobase/utils/client';
|
|
12
13
|
export interface ToolsManager extends ToolsRegistration {
|
|
@@ -16,12 +17,18 @@ export interface ToolsManager extends ToolsRegistration {
|
|
|
16
17
|
export interface ToolsRegistration {
|
|
17
18
|
registerTools(name: string, options: ToolsOptions): void;
|
|
18
19
|
}
|
|
20
|
+
export type ToolModalProps = Pick<ModalProps, 'width' | 'styles'>;
|
|
19
21
|
export type ToolsOptions = {
|
|
20
22
|
ui?: {
|
|
21
23
|
card?: ComponentType<ToolsUIProperties>;
|
|
22
24
|
modal?: {
|
|
23
25
|
title?: string;
|
|
24
26
|
okText?: string;
|
|
27
|
+
props?: ToolModalProps;
|
|
28
|
+
footer?: ComponentType<{
|
|
29
|
+
tool: ToolCall;
|
|
30
|
+
}>;
|
|
31
|
+
hideOkButton?: boolean;
|
|
25
32
|
useOnOk?: (decisions: ToolsUIProperties['decisions'], adjustArgs: Record<string, any>) => {
|
|
26
33
|
onOk: () => void | Promise<void>;
|
|
27
34
|
};
|
|
@@ -47,6 +54,7 @@ export type ToolCall<T = unknown> = {
|
|
|
47
54
|
export type FrontendTools = ToolsOptions;
|
|
48
55
|
export type BackendTools = {
|
|
49
56
|
scope: Scope;
|
|
57
|
+
from: From;
|
|
50
58
|
defaultPermission?: Permission;
|
|
51
59
|
silence?: boolean;
|
|
52
60
|
introduction?: {
|
|
@@ -69,12 +77,14 @@ export type ToolsUIProperties<ToolCallArgs = unknown> = {
|
|
|
69
77
|
export type DecisionActions = {
|
|
70
78
|
approve: () => Promise<void>;
|
|
71
79
|
edit: (args: any) => Promise<void>;
|
|
72
|
-
reject: (message
|
|
80
|
+
reject: (message?: string) => Promise<void>;
|
|
73
81
|
};
|
|
74
82
|
export type ToolsFilter = {
|
|
75
83
|
scope?: Scope;
|
|
76
84
|
defaultPermission?: Permission;
|
|
77
85
|
silence?: boolean;
|
|
86
|
+
sessionId?: string;
|
|
78
87
|
};
|
|
79
88
|
export type Scope = 'SPECIFIED' | 'GENERAL' | 'CUSTOM';
|
|
80
89
|
export type Permission = 'ASK' | 'ALLOW';
|
|
90
|
+
export type From = 'loader' | 'workflow' | 'mcp';
|
|
@@ -18,7 +18,7 @@ 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';
|
|
@@ -105,6 +105,7 @@ export declare class Application {
|
|
|
105
105
|
globalVarCtxs: Record<string, any>;
|
|
106
106
|
jsonLogic: JsonLogic;
|
|
107
107
|
flowEngine: FlowEngine;
|
|
108
|
+
model: ApplicationModel;
|
|
108
109
|
context: FlowEngineContext & {
|
|
109
110
|
pluginSettingsRouter: PluginSettingsManager;
|
|
110
111
|
pluginManager: PluginManager;
|
|
@@ -203,4 +204,7 @@ export declare class Application {
|
|
|
203
204
|
Component: ComponentType;
|
|
204
205
|
}): void;
|
|
205
206
|
}
|
|
207
|
+
declare class ApplicationModel extends FlowModel {
|
|
208
|
+
render(): React.JSX.Element;
|
|
209
|
+
}
|
|
206
210
|
export {};
|
|
@@ -102,6 +102,7 @@ export declare const BlockProvider: (props: {
|
|
|
102
102
|
* @returns
|
|
103
103
|
*/
|
|
104
104
|
export declare const useBlockAssociationContext: () => any;
|
|
105
|
+
export declare const getFilterByTkByCollection: (collection: any, recordData: Record<string, any>) => any;
|
|
105
106
|
export declare const useFilterByTk: (blockProps?: any) => any;
|
|
106
107
|
/**
|
|
107
108
|
* @deprecated
|
|
@@ -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';
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import { dayjs } from '@nocobase/utils/client';
|
|
11
|
-
import { type MetaTreeNode } from '@nocobase/flow-engine';
|
|
11
|
+
import { type CollectionField, type MetaTreeNode } from '@nocobase/flow-engine';
|
|
12
12
|
import { type ExactDatePickerMode } from './FieldAssignExactDatePicker';
|
|
13
13
|
export type DateVariableExactNormalizeMode = 'none' | 'date' | 'datetimeNoTz' | 'iso';
|
|
14
14
|
export declare function toExactPickerDisplayValue(rawValue: unknown, options: {
|
|
@@ -54,6 +54,31 @@ 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
|
+
type AssignValueFieldSettingsInit = {
|
|
59
|
+
dataSourceKey?: string;
|
|
60
|
+
collectionName?: string;
|
|
61
|
+
fieldPath?: string;
|
|
62
|
+
};
|
|
63
|
+
type AssignValueFieldSource = {
|
|
64
|
+
originFieldModel?: any;
|
|
65
|
+
originProps: Record<string, any>;
|
|
66
|
+
customFieldName?: string;
|
|
67
|
+
customFieldProps: Record<string, any>;
|
|
68
|
+
currentAllowMultiple?: boolean;
|
|
69
|
+
currentFieldModelUse?: string;
|
|
70
|
+
};
|
|
71
|
+
export declare function resolveAssignValueFieldModelConfig(options: {
|
|
72
|
+
itemModel: any;
|
|
73
|
+
defaultBindingUse?: string;
|
|
74
|
+
collectionField?: Pick<CollectionField, 'isAssociationField'> | null;
|
|
75
|
+
fieldSource?: AssignValueFieldSource;
|
|
76
|
+
preferFormItemFieldModel?: boolean;
|
|
77
|
+
fieldSettingsInit?: AssignValueFieldSettingsInit;
|
|
78
|
+
}): {
|
|
79
|
+
use?: string;
|
|
80
|
+
stepParams: Record<string, any>;
|
|
81
|
+
};
|
|
57
82
|
/**
|
|
58
83
|
* 根据所选字段渲染对应的赋值编辑器:
|
|
59
84
|
* - 使用临时的 VariableFieldFormModel 包裹字段模型,确保常量编辑为真实字段组件
|
|
@@ -10,7 +10,7 @@ import React from 'react';
|
|
|
10
10
|
import { type RunJSValue } from '@nocobase/flow-engine';
|
|
11
11
|
export interface RunJSValueEditorProps {
|
|
12
12
|
t?: (key: string) => string;
|
|
13
|
-
value
|
|
13
|
+
value?: unknown;
|
|
14
14
|
onChange?: (value: RunJSValue) => void;
|
|
15
15
|
height?: string;
|
|
16
16
|
scene?: 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 resolveTooltipParent: (element: HTMLElement | null) => HTMLElement;
|
|
@@ -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
|
+
export declare function inferRunJSScenesFromContext(hostCtx: any, explicitScene?: string | string[]): string[];
|
|
10
|
+
export declare function mergeRunJSScenes(explicitScene?: string | string[], autoScenes?: string[]): string[];
|
|
@@ -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
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 { ActionModel } from '../base';
|
|
11
|
+
export declare class JSItemActionModel extends ActionModel {
|
|
12
|
+
private _offResourceRefresh?;
|
|
13
|
+
private _mountedOnce;
|
|
14
|
+
static scene: import("../base").ActionSceneType;
|
|
15
|
+
render(): React.JSX.Element;
|
|
16
|
+
renderHiddenInConfig(): React.ReactNode | undefined;
|
|
17
|
+
protected onMount(): void;
|
|
18
|
+
protected onUnmount(): void;
|
|
19
|
+
}
|
|
@@ -8,10 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { ButtonProps } from 'antd/es/button';
|
|
10
10
|
import { ActionModel } from '../base';
|
|
11
|
-
export
|
|
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>;
|
|
@@ -13,6 +13,7 @@ export * from './EditActionModel';
|
|
|
13
13
|
export * from './FilterActionModel';
|
|
14
14
|
export * from './JSActionModel';
|
|
15
15
|
export * from './JSCollectionActionModel';
|
|
16
|
+
export * from './JSItemActionModel';
|
|
16
17
|
export * from './JSRecordActionModel';
|
|
17
18
|
export * from './PopupCollectionActionModel';
|
|
18
19
|
export * from './RefreshActionModel';
|
|
@@ -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;
|