@nocobase/client 2.1.0-beta.14 → 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.
Files changed (44) hide show
  1. package/es/ai/index.d.ts +1 -0
  2. package/es/ai/skills-manager/index.d.ts +9 -0
  3. package/es/ai/skills-manager/types.d.ts +23 -0
  4. package/es/ai/tools-manager/types.d.ts +11 -1
  5. package/es/application/Application.d.ts +5 -1
  6. package/es/block-provider/BlockProvider.d.ts +1 -0
  7. package/es/flow/models/blocks/form/value-runtime/rules.d.ts +1 -0
  8. package/es/flow/models/blocks/form/value-runtime/runtime.d.ts +1 -0
  9. package/es/flow/models/blocks/table/TableColumnModel.d.ts +3 -1
  10. package/es/flow/models/blocks/table/sortUtils.d.ts +32 -0
  11. package/es/index.css +1 -1
  12. package/es/index.mjs +2038 -109379
  13. package/es/index.mjs.LICENSE.txt +8 -0
  14. package/es/lazy-helper/index.d.ts +8 -6
  15. package/es/pm/AdminSettingsLayoutModel.d.ts +13 -0
  16. package/es/pm/PluginSetting.d.ts +2 -1
  17. package/es/pm/index.d.ts +1 -0
  18. package/es/route-switch/antd/admin-layout/AdminLayoutModel.d.ts +27 -0
  19. package/es/route-switch/antd/admin-layout/AdminLayoutRouteCoordinator.d.ts +50 -0
  20. package/lib/index.css +1 -1
  21. package/lib/index.js +2009 -2046
  22. package/lib/index.js.LICENSE.txt +1 -0
  23. package/lib/locale/de-DE.json +2 -1
  24. package/lib/locale/en-US.json +1 -0
  25. package/lib/locale/es-ES.json +2 -1
  26. package/lib/locale/fr-FR.json +2 -1
  27. package/lib/locale/hu-HU.json +2 -1
  28. package/lib/locale/id-ID.json +2 -1
  29. package/lib/locale/it-IT.json +2 -1
  30. package/lib/locale/ja-JP.json +2 -1
  31. package/lib/locale/ko-KR.json +2 -1
  32. package/lib/locale/nl-NL.json +2 -1
  33. package/lib/locale/pt-BR.json +2 -1
  34. package/lib/locale/ru-RU.json +2 -1
  35. package/lib/locale/tr-TR.json +2 -1
  36. package/lib/locale/uk-UA.json +2 -1
  37. package/lib/locale/vi-VN.json +2 -1
  38. package/lib/locale/zh-CN.json +1 -0
  39. package/lib/locale/zh-TW.json +2 -1
  40. package/package.json +7 -7
  41. package/es/md-BbvRKckr.mjs +0 -61
  42. package/es/md-oH2RssNY.mjs +0 -61
  43. package/lib/md-BbvRKckr-IQIU5F3r.js +0 -1
  44. package/lib/md-oH2RssNY-IQIU5F3r.js +0 -1
@@ -0,0 +1,8 @@
1
+ /* istanbul ignore file -- @preserve */
2
+
3
+ /*!
4
+ * Quill Editor v1.3.7
5
+ * https://quilljs.com/
6
+ * Copyright (c) 2014, Jason Chen
7
+ * Copyright (c) 2013, salesforce.com
8
+ */
@@ -6,8 +6,8 @@
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 { useImported } from 'react-imported-component';
10
9
  export declare const LAZY_COMPONENT_KEY: unique symbol;
10
+ type ModuleImportor<TModule extends Record<string, any> = Record<string, any>> = () => Promise<TModule>;
11
11
  type LazyComponentType<M extends Record<string, any>, K extends keyof M> = {
12
12
  [P in K]: M[P];
13
13
  };
@@ -33,17 +33,19 @@ export declare function lazy<M extends Record<string, any>, K extends keyof M =
33
33
  /**
34
34
  * A hook to lazily load a module and return a specific export from it.
35
35
  *
36
- * This hook uses `useImported` to dynamically import a module and return a specific export
37
- * from the module. It throws a promise while the module is being loaded, which can be caught
38
- * by the parent error boundary to show a loading state.
36
+ * This hook dynamically imports a module and returns a specific export from it.
37
+ * It throws a promise while the module is being loaded, which can be caught by
38
+ * the parent Suspense boundary to show a loading state.
39
+ *
40
+ * @deprecated Use this hook only when you need to dynamically load a module inside a hook. Otherwise, use lazy() to load React components, or use import() directly to load modules, utility functions, or third-party libraries. Avoid adding new usages of useLazy.
39
41
  *
40
42
  * @template T - The type of the export being picked from the module.
41
43
  *
42
- * @param {Parameters<typeof useImported>[0]} importor - The function to import the module.
44
+ * @param {ModuleImportor} importor - The function to import the module.
43
45
  * @param {string | ((module: any) => T)} picker - The name of the export to pick or a function to pick the export.
44
46
  * @returns {T} The picked export from the imported module.
45
47
  *
46
48
  * @throws {Promise} Throws a promise while the module is being loaded.
47
49
  */
48
- export declare function useLazy<T = () => any>(importor: Parameters<typeof useImported>[0], picker: string | ((module: any) => T)): T;
50
+ export declare function useLazy<T = () => any>(importor: ModuleImportor, picker: string | ((module: any) => T)): T;
49
51
  export {};
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { FlowModel } from '@nocobase/flow-engine';
10
+ import React from 'react';
11
+ export declare class AdminSettingsLayoutModel extends FlowModel {
12
+ render(): React.JSX.Element;
13
+ }
@@ -8,4 +8,5 @@
8
8
  */
9
9
  import React from 'react';
10
10
  export declare const SettingsCenterContext: React.Context<any>;
11
- export declare const AdminSettingsLayout: () => React.JSX.Element;
11
+ export declare const InternalAdminSettingsLayout: () => React.JSX.Element;
12
+ export declare const AdminSettingsLayout: (props: any) => React.JSX.Element;
package/es/pm/index.d.ts CHANGED
@@ -7,6 +7,7 @@
7
7
  * For more information, please refer to: https://www.nocobase.com/agreement.
8
8
  */
9
9
  import { Plugin } from '../application/Plugin';
10
+ export * from './AdminSettingsLayoutModel';
10
11
  export * from './PluginManager';
11
12
  export * from './PluginManagerLink';
12
13
  export * from './PluginSetting';
@@ -0,0 +1,27 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { FlowModel } from '@nocobase/flow-engine';
10
+ import React from 'react';
11
+ import { type RoutePageMeta } from './AdminLayoutRouteCoordinator';
12
+ export declare class AdminLayoutModel extends FlowModel {
13
+ private routeCoordinator?;
14
+ private routeDisposer?;
15
+ private activePageUid;
16
+ private layoutContentElement;
17
+ private routePageMetaMap;
18
+ private getCoordinator;
19
+ private getCurrentRouteByActivePage;
20
+ registerRoutePage(pageUid: string, meta: RoutePageMeta): FlowModel<import("@nocobase/flow-engine").DefaultStructure>;
21
+ updateRoutePage(pageUid: string, meta: Partial<RoutePageMeta>): void;
22
+ unregisterRoutePage(pageUid: string): void;
23
+ setLayoutContentElement(element: HTMLElement | null): void;
24
+ protected onMount(): void;
25
+ protected onUnmount(): void;
26
+ render(): React.JSX.Element;
27
+ }
@@ -0,0 +1,50 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ import { FlowEngine, FlowModel, type ViewParam } from '@nocobase/flow-engine';
10
+ export interface RoutePageMeta {
11
+ active: boolean;
12
+ currentRoute?: Record<string, any>;
13
+ refreshDesktopRoutes?: () => void;
14
+ layoutContentElement?: HTMLElement | null;
15
+ }
16
+ interface RouteLike {
17
+ params?: {
18
+ name?: string;
19
+ };
20
+ pathname?: string;
21
+ }
22
+ /**
23
+ * 管理 admin 场景下每个 page 的 v2 视图栈编排。
24
+ * 该协调器只负责状态机和开关视图,不直接绑定 React 生命周期。
25
+ */
26
+ export declare class AdminLayoutRouteCoordinator {
27
+ private readonly flowEngine;
28
+ private readonly runtimes;
29
+ private layoutContentElement;
30
+ constructor(flowEngine: FlowEngine);
31
+ setLayoutContentElement(element: HTMLElement | null): void;
32
+ registerPage(pageUid: string, meta: RoutePageMeta): FlowModel<import("@nocobase/flow-engine").DefaultStructure>;
33
+ syncPageMeta(pageUid: string, meta: Partial<RoutePageMeta>): void;
34
+ unregisterPage(pageUid: string): void;
35
+ syncRoute(routeLike: RouteLike): void;
36
+ cleanupPage(pageUid: string): void;
37
+ destroy(): void;
38
+ private syncRuntimeWithPathname;
39
+ private shouldStepNavigate;
40
+ private stepNavigate;
41
+ private handleOpenViews;
42
+ private openViews;
43
+ private ensureRouteModelContext;
44
+ private getOrCreateRouteModel;
45
+ }
46
+ /**
47
+ * 将 pathname 解析结果和 pageUid 对齐,便于测试里复用。
48
+ */
49
+ export declare function toViewStack(pathname: string): ViewParam[];
50
+ export {};
package/lib/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(--colorTextSiderMenuActive)!important;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"}
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"}