@nocobase/client 2.1.0-beta.15 → 2.1.0-beta.16
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/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/types.d.ts +11 -1
- package/es/application/Application.d.ts +5 -1
- package/es/flow/models/blocks/table/TableColumnModel.d.ts +3 -1
- package/es/flow/models/blocks/table/sortUtils.d.ts +32 -0
- package/es/index.css +1 -1
- package/es/index.mjs +2038 -109423
- 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/lib/index.css +1 -1
- package/lib/index.js +2009 -2046
- package/lib/index.js.LICENSE.txt +1 -0
- package/package.json +7 -7
- 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/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 {};
|
|
@@ -21,7 +21,9 @@ export declare class TableColumnModel extends DisplayItemModel {
|
|
|
21
21
|
afterAddAsSubModel(): Promise<void>;
|
|
22
22
|
renderHiddenInConfig(): React.ReactNode | undefined;
|
|
23
23
|
static defineChildren(ctx: FlowModelContext): any;
|
|
24
|
-
getColumnProps(): TableColumnProps
|
|
24
|
+
getColumnProps(): TableColumnProps & {
|
|
25
|
+
sortField?: string;
|
|
26
|
+
};
|
|
25
27
|
onInit(options: any): void;
|
|
26
28
|
renderItem(): any;
|
|
27
29
|
}
|
|
@@ -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
|
+
type AssociationTitleFieldModel = {
|
|
10
|
+
fieldPath?: string;
|
|
11
|
+
props?: {
|
|
12
|
+
dataIndex?: string;
|
|
13
|
+
titleField?: string;
|
|
14
|
+
};
|
|
15
|
+
collectionField?: {
|
|
16
|
+
name?: string;
|
|
17
|
+
targetCollectionTitleFieldName?: string;
|
|
18
|
+
isAssociationField?: () => boolean;
|
|
19
|
+
};
|
|
20
|
+
getStepParams?: (flowKey: string, stepKey: string) => {
|
|
21
|
+
label?: string;
|
|
22
|
+
} | undefined;
|
|
23
|
+
};
|
|
24
|
+
export declare function getSavedAssociationTitleField(model: AssociationTitleFieldModel): string;
|
|
25
|
+
export declare function getTableColumnSortField(model: AssociationTitleFieldModel): string;
|
|
26
|
+
export declare function resolveTableSorterField(sorter: {
|
|
27
|
+
field?: string;
|
|
28
|
+
column?: {
|
|
29
|
+
sortField?: string;
|
|
30
|
+
};
|
|
31
|
+
}): string;
|
|
32
|
+
export {};
|
package/es/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:var(--colorBgScrollTrack)}::-webkit-scrollbar-thumb{background:var(--colorBgScrollBar);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--colorBgScrollBarHover)}::-webkit-scrollbar-thumb:active{background:var(--colorBgScrollBarActive)}.rc-virtual-list-scrollbar-thumb{background:var(--colorBgScrollBar)!important}.rc-virtual-list-scrollbar-thumb:hover{background:var(--colorBgScrollBarHover)!important}.rc-virtual-list-scrollbar-thumb:active{background:var(--colorBgScrollBarActive)!important}.ant-menu-submenu-popup{-webkit-backdrop-filter:none;backdrop-filter:none}.ant-menu-item.ant-menu-item-only-child.ant-pro-base-menu-horizontal-menu-item:active{background-color:var(--colorBgMenuItemSelected)!important}.nb-hidden{display:none}.nb-dialog-overflow-hidden .ant-modal-content{overflow:hidden}.ant-layout-sider .ant-menu{background:var(--colorBgSider)!important}.ant-layout-sider .ant-menu .ant-menu-item{color:var(--colorTextSiderMenu)!important}.ant-layout-sider .ant-menu .ant-menu-item:hover{background-color:var(--colorBgSiderMenuHover)!important;color:var(--colorTextSiderMenuHover)!important}.ant-layout-sider .ant-menu .ant-menu-item:active{background-color:var(--colorBgSiderMenuActive)!important}.ant-layout-sider .ant-menu .ant-menu-item.ant-menu-item-selected{background-color:var(--colorBgSiderMenuActive)!important;color:var(--colorTextSiderMenuActive)!important}.ant-layout-sider .ant-menu .ant-menu-submenu .ant-menu-submenu-title{color:var(--colorTextSiderMenu)!important}.ant-layout-sider .ant-menu .ant-menu-submenu .ant-menu-submenu-title:hover{background-color:var(--colorBgSiderMenuHover)!important;color:var(--colorTextSiderMenuHover)!important}.ant-layout-sider .ant-menu .ant-menu-submenu.ant-menu-submenu-selected .ant-menu-submenu-title{color:var(--
|
|
1
|
+
::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background:var(--colorBgScrollTrack)}::-webkit-scrollbar-thumb{background:var(--colorBgScrollBar);border-radius:4px}::-webkit-scrollbar-thumb:hover{background:var(--colorBgScrollBarHover)}::-webkit-scrollbar-thumb:active{background:var(--colorBgScrollBarActive)}.rc-virtual-list-scrollbar-thumb{background:var(--colorBgScrollBar)!important}.rc-virtual-list-scrollbar-thumb:hover{background:var(--colorBgScrollBarHover)!important}.rc-virtual-list-scrollbar-thumb:active{background:var(--colorBgScrollBarActive)!important}.ant-menu-submenu-popup{-webkit-backdrop-filter:none;backdrop-filter:none}.ant-menu-item.ant-menu-item-only-child.ant-pro-base-menu-horizontal-menu-item:active{background-color:var(--colorBgMenuItemSelected)!important}.nb-hidden{display:none}.nb-dialog-overflow-hidden .ant-modal-content{overflow:hidden}.ant-layout-sider .ant-menu{background:var(--colorBgSider)!important}.ant-layout-sider .ant-menu .ant-menu-item{color:var(--colorTextSiderMenu)!important}.ant-layout-sider .ant-menu .ant-menu-item:hover{background-color:var(--colorBgSiderMenuHover)!important;color:var(--colorTextSiderMenuHover)!important}.ant-layout-sider .ant-menu .ant-menu-item:active{background-color:var(--colorBgSiderMenuActive)!important}.ant-layout-sider .ant-menu .ant-menu-item.ant-menu-item-selected{background-color:var(--colorBgSiderMenuActive)!important;color:var(--colorTextSiderMenuActive)!important}.ant-layout-sider .ant-menu .ant-menu-submenu .ant-menu-submenu-title{color:var(--colorTextSiderMenu)!important}.ant-layout-sider .ant-menu .ant-menu-submenu .ant-menu-submenu-title:hover{background-color:var(--colorBgSiderMenuHover)!important;color:var(--colorTextSiderMenuHover)!important}.ant-layout-sider .ant-menu .ant-menu-submenu.ant-menu-submenu-selected .ant-menu-submenu-title{color:var(--colorTextSiderMenu)!important}.ant-layout-sider .ant-menu .ant-menu-submenu.ant-menu-submenu-selected .ant-menu-submenu-title:hover{background-color:var(--colorBgSiderMenuHover)!important;color:var(--colorTextSiderMenuHover)!important}.ant-layout-sider .ant-menu .ant-menu-submenu.ant-menu-submenu-selected.ant-menu-submenu-selected>.ant-menu-submenu-title{color:var(--colorTextSiderMenuActive)!important}.ant-btn.ant-btn-danger{text-shadow:none;box-shadow:none}.ant-formily-item-label{color:#000000d9;font-weight:600}.ant-table-pagination.ant-pagination{margin-bottom:0!important}.ant-formily-item{font-size:inherit!important}.ant-formily-item-bordered-none .ant-formily-item-feedback-layout-loose{margin-bottom:0!important}.ant-formily-item-control-content-component .ant-tag{white-space:pre-wrap}html body{--adm-font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"}
|