@nocobase/client 2.1.0-alpha.1 → 2.1.0-alpha.11
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/.dumirc.ts +8 -0
- package/LICENSE +201 -661
- package/README.md +79 -10
- package/es/ai/ai-manager.d.ts +15 -0
- package/es/ai/index.d.ts +12 -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/hooks/context.d.ts +17 -0
- package/es/ai/tools-manager/hooks/index.d.ts +11 -0
- package/es/ai/tools-manager/hooks/provider.d.ts +16 -0
- package/es/ai/tools-manager/index.d.ts +20 -0
- package/es/ai/tools-manager/types.d.ts +82 -0
- package/es/ai/utils.d.ts +10 -0
- package/es/api-client/APIClient.d.ts +1 -0
- package/es/application/Application.d.ts +7 -1
- package/es/application/Plugin.d.ts +1 -0
- package/es/application/RouteRepository.d.ts +23 -0
- package/es/application/globalOperators.d.ts +11 -0
- package/es/block-provider/TableUidContext.d.ts +10 -0
- package/es/collection-manager/templates/view.d.ts +11 -11
- package/es/data-source/collection/utils.d.ts +2 -4
- package/es/flow/FlowModelRepository.d.ts +7 -0
- package/es/flow/actions/aclCheckRefresh.d.ts +9 -0
- package/es/flow/actions/afterSuccess.d.ts +9 -0
- package/es/flow/actions/blockHeight.d.ts +9 -0
- package/es/flow/actions/filterFormDefaultValues.d.ts +9 -0
- package/es/flow/actions/formAssignRules.d.ts +9 -0
- package/es/flow/actions/index.d.ts +7 -0
- package/es/flow/actions/linkageRulesRefresh.d.ts +9 -0
- package/es/flow/actions/numberFormat.d.ts +9 -0
- package/es/flow/components/BlockItemCard.d.ts +1 -0
- package/es/flow/components/ConditionBuilder.d.ts +2 -0
- package/es/flow/components/DefaultValue.d.ts +1 -0
- package/es/flow/components/FieldAssignEditor.d.ts +32 -0
- package/es/flow/components/FieldAssignExactDatePicker.d.ts +23 -0
- package/es/flow/components/FieldAssignRulesEditor.d.ts +70 -0
- package/es/flow/components/FieldAssignValueInput.d.ts +48 -1
- package/es/flow/components/RunJSValueEditor.d.ts +19 -0
- package/es/flow/components/TextAreaWithContextSelector.d.ts +1 -0
- package/es/flow/components/code-editor/core/EditorCore.d.ts +3 -1
- package/es/flow/components/code-editor/formatDocInfo.d.ts +17 -0
- package/es/flow/components/code-editor/hooks/useCodeRunner.d.ts +3 -1
- package/es/flow/components/code-editor/index.d.ts +1 -0
- package/es/flow/components/code-editor/linter.d.ts +10 -2
- package/es/flow/components/code-editor/runjsCompletionSource.d.ts +20 -0
- package/es/flow/components/code-editor/runjsDiagnostics.d.ts +46 -0
- package/es/flow/components/fieldAssignOptions.d.ts +23 -0
- package/es/flow/components/filter/LinkageFilterItem.d.ts +27 -1
- package/es/flow/components/useAssociationTitleFieldSync.d.ts +13 -0
- package/es/flow/index.d.ts +2 -0
- package/es/flow/internal/utils/modelUtils.d.ts +27 -0
- package/es/flow/internal/utils/saveStepParamsWithSubModels.d.ts +11 -0
- package/es/flow/internal/utils/titleFieldQuickSync.d.ts +35 -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/AssociationFieldGroupModel.d.ts +1 -1
- package/es/flow/models/base/BlockModel.d.ts +29 -1
- package/es/flow/models/base/CollectionBlockModel.d.ts +12 -57
- package/es/flow/models/base/GridModel.d.ts +7 -0
- package/es/flow/models/base/PageModel/ChildPageModel.d.ts +1 -0
- package/es/flow/models/base/PageModel/PageModel.d.ts +17 -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/DetailsGridModel.d.ts +1 -0
- package/es/flow/models/blocks/details/utils.d.ts +16 -0
- package/es/flow/models/blocks/filter-form/FieldOperatorSelect.d.ts +10 -0
- package/es/flow/models/blocks/filter-form/FilterFormBlockModel.d.ts +6 -0
- package/es/flow/models/blocks/filter-form/FilterFormGridModel.d.ts +12 -1
- package/es/flow/models/blocks/filter-form/FilterFormItemModel.d.ts +5 -37
- package/es/flow/models/blocks/filter-form/customFieldOperators.d.ts +34 -0
- package/es/flow/models/blocks/filter-form/fields/FilterFormCustomFieldModel.d.ts +16 -0
- package/es/flow/models/blocks/filter-form/fields/FilterFormCustomRecordSelectFieldModel.d.ts +20 -0
- package/es/flow/models/blocks/filter-form/fields/FilterFormRecordSelectFieldModel.d.ts +12 -0
- package/es/flow/models/blocks/filter-form/fields/index.d.ts +2 -0
- package/es/flow/models/blocks/filter-form/index.d.ts +4 -0
- package/es/flow/models/blocks/filter-form/legacyDefaultValueMigration.d.ts +13 -0
- package/es/flow/models/blocks/filter-form/valueNormalization.d.ts +17 -0
- package/es/flow/models/blocks/filter-manager/flow-actions/defaultOperator.d.ts +1 -3
- package/es/flow/models/blocks/form/CreateFormModel.d.ts +3 -1
- package/es/flow/models/blocks/form/EditFormModel.d.ts +4 -1
- package/es/flow/models/blocks/form/FormAssociationFieldGroupModel.d.ts +12 -0
- package/es/flow/models/blocks/form/FormAssociationItemModel.d.ts +39 -0
- package/es/flow/models/blocks/form/FormBlockModel.d.ts +35 -2
- package/es/flow/models/blocks/form/FormGridModel.d.ts +1 -0
- package/es/flow/models/blocks/form/QuickEditFormModel.d.ts +4 -1
- package/es/flow/models/blocks/form/assignRulesUpdateAssociationValues.d.ts +18 -0
- package/es/flow/models/blocks/form/dynamicNamePath.d.ts +19 -0
- package/es/flow/models/blocks/form/index.d.ts +2 -0
- package/es/flow/models/blocks/form/legacyDefaultValueMigration.d.ts +13 -0
- package/es/flow/models/blocks/form/submitHandler.d.ts +1 -1
- package/es/flow/models/blocks/form/submitValues.d.ts +27 -0
- package/es/flow/models/blocks/form/value-runtime/conditions.d.ts +9 -0
- package/es/flow/models/blocks/form/value-runtime/deps.d.ts +23 -0
- package/es/flow/models/blocks/form/value-runtime/form-patch.d.ts +19 -0
- package/es/flow/models/blocks/form/value-runtime/index.d.ts +11 -0
- package/es/flow/models/blocks/form/value-runtime/path.d.ts +25 -0
- package/es/flow/models/blocks/form/value-runtime/rules.d.ts +131 -0
- package/es/flow/models/blocks/form/value-runtime/runtime.d.ts +75 -0
- package/es/flow/models/blocks/form/value-runtime/types.d.ts +62 -0
- package/es/flow/models/blocks/form/value-runtime/utils.d.ts +12 -0
- package/es/flow/models/blocks/shared/legacyDefaultValueMigrationBase.d.ts +20 -0
- package/es/flow/models/blocks/table/TableBlockModel.d.ts +1 -23
- package/es/flow/models/blocks/table/TableSelectModel.d.ts +0 -1
- package/es/flow/models/blocks/table/dragSort/dragSortComponents.d.ts +14 -0
- package/es/flow/models/blocks/table/dragSort/dragSortHooks.d.ts +13 -0
- package/es/flow/models/blocks/table/dragSort/dragSortSettings.d.ts +39 -0
- package/es/flow/models/blocks/table/dragSort/dragSortUtils.d.ts +37 -0
- package/es/flow/models/blocks/table/dragSort/index.d.ts +12 -0
- package/es/flow/models/blocks/table/utils.d.ts +8 -8
- package/es/flow/models/fields/AssociationFieldModel/AssociationFieldModel.d.ts +1 -0
- package/es/flow/models/fields/AssociationFieldModel/CascadeSelectFieldModel.d.ts +16 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableActionGroupModel.d.ts +11 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableActionsColumnModel.d.ts +19 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableFieldModel.d.ts +30 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/actions/PopupSubTableEditActionModel.d.ts +28 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/actions/PopupSubTableFormSubmitActionModel.d.ts +16 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/actions/PopupSubTableRemoveActionModel.d.ts +14 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/blocks/PopupSubTableFormModel.d.ts +36 -0
- package/es/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/index.d.ts +17 -0
- package/es/flow/models/fields/AssociationFieldModel/RecordPickerFieldModel.d.ts +8 -1
- package/es/flow/models/fields/AssociationFieldModel/RecordSelectFieldModel.d.ts +15 -0
- package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.d.ts +4 -1
- package/es/flow/models/fields/AssociationFieldModel/index.d.ts +1 -0
- package/es/flow/models/fields/AssociationFieldModel/itemChain.d.ts +94 -0
- package/es/flow/models/fields/AssociationFieldModel/recordSelectShared.d.ts +15 -5
- package/es/flow/models/fields/DisplayAssociationField/displaySubListUtils.d.ts +14 -0
- package/es/flow/models/fields/DisplayTextFieldModel.d.ts +1 -0
- package/es/flow/models/fields/RichTextFieldModel/registerFontSize.d.ts +9 -0
- package/es/flow/models/fields/RichTextFieldModel/registerImageResize.d.ts +9 -0
- package/es/flow/models/fields/RichTextFieldModel/registerSmartBreak.d.ts +12 -0
- package/es/flow/models/fields/index.d.ts +0 -1
- package/es/flow/utils/actionCapability.d.ts +60 -0
- package/es/flow/utils/dispatchEventDeep.d.ts +20 -0
- package/es/flow/utils/index.d.ts +2 -0
- package/es/flow/utils/pagination.d.ts +29 -0
- package/es/flow/utils/useJsonTemplateResolver.d.ts +9 -0
- package/es/index.css +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.mjs +2069 -95749
- 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 +5 -1
- 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-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.d.ts +26 -0
- package/es/schema-component/antd/menu/Menu.d.ts +7 -0
- package/es/schema-settings/SchemaSettingsDefaultValue.d.ts +18 -0
- package/es/schema-settings/VariableInput/hooks/useParentIterationVariable.d.ts +3 -3
- package/es/user/CurrentUserProvider.d.ts +1 -1
- package/es/variables/index.d.ts +1 -1
- package/lib/index.css +1 -1
- package/lib/index.js +1741 -1564
- package/lib/index.js.LICENSE.txt +1 -0
- package/lib/locale/de-DE.json +5 -0
- package/lib/locale/en-US.json +54 -0
- package/lib/locale/es-ES.json +5 -0
- package/lib/locale/fr-FR.json +5 -0
- package/lib/locale/hu-HU.json +5 -0
- package/lib/locale/id-ID.json +5 -0
- package/lib/locale/it-IT.json +5 -0
- package/lib/locale/ja-JP.json +5 -0
- package/lib/locale/ko-KR.json +5 -0
- package/lib/locale/nl-NL.json +5 -0
- package/lib/locale/pt-BR.json +5 -0
- package/lib/locale/ru-RU.json +5 -0
- package/lib/locale/tr-TR.json +5 -0
- package/lib/locale/uk-UA.json +5 -0
- package/lib/locale/vi-VN.json +5 -0
- package/lib/locale/zh-CN.json +82 -8
- package/lib/locale/zh-TW.json +15 -0
- package/package.json +9 -8
- package/es/flow/models/fields/UploadFieldModel.d.ts +0 -22
- package/es/index-C3fHjsMw.mjs +0 -279
- package/es/md-BbvRKckr.mjs +0 -61
- package/es/md-oH2RssNY.mjs +0 -61
- package/lib/index-C3fHjsMw-CDWZlvuM.js +0 -2237
- package/lib/md-BbvRKckr-IQIU5F3r.js +0 -1
- package/lib/md-oH2RssNY-IQIU5F3r.js +0 -1
- package/lib/style.css +0 -1
|
@@ -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
|
|
37
|
-
*
|
|
38
|
-
*
|
|
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 {
|
|
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:
|
|
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
|
+
}
|
package/es/pm/PluginSetting.d.ts
CHANGED
|
@@ -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
|
|
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 {};
|
|
@@ -27,7 +27,7 @@ export declare const useMobileLayout: () => {
|
|
|
27
27
|
isMobileLayout: boolean;
|
|
28
28
|
setIsMobileLayout: React.Dispatch<React.SetStateAction<boolean>>;
|
|
29
29
|
};
|
|
30
|
-
export declare const InternalAdminLayout: () => React.JSX.Element;
|
|
30
|
+
export declare const InternalAdminLayout: (props: any) => React.JSX.Element;
|
|
31
31
|
export declare const AdminProvider: (props: any) => React.JSX.Element;
|
|
32
32
|
export declare const AdminLayout: (props: any) => React.JSX.Element;
|
|
33
33
|
export declare class AdminLayoutPlugin extends Plugin {
|
|
@@ -35,4 +35,8 @@ export declare class AdminLayoutPlugin extends Plugin {
|
|
|
35
35
|
load(): Promise<void>;
|
|
36
36
|
}
|
|
37
37
|
export declare function findRouteBySchemaUid(schemaUid: string, treeArray: any[]): any;
|
|
38
|
+
export declare const shouldRenderIconInTitle: ({ depth, isMobile }: {
|
|
39
|
+
depth: number;
|
|
40
|
+
isMobile: boolean;
|
|
41
|
+
}) => boolean;
|
|
38
42
|
export declare function findFirstPageRoute(routes: NocoBaseDesktopRoute[]): any;
|
|
@@ -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
|
+
export declare const MOBILE_MENU_CLOSE_DELAY_MS = 220;
|
|
10
|
+
export declare const runAfterMobileMenuClosed: ({ isMobile, closeMobileMenu, callback, delayMs, }: {
|
|
11
|
+
isMobile: boolean;
|
|
12
|
+
closeMobileMenu: () => void;
|
|
13
|
+
callback: () => void;
|
|
14
|
+
delayMs?: number;
|
|
15
|
+
}) => void;
|
|
@@ -6,61 +6,4 @@
|
|
|
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 declare const useColumnsDeepMemoized: (columns: any[]) => Pick<import("@formily/react").Stringify<{
|
|
10
|
-
[key: symbol]: any;
|
|
11
|
-
[key: `x-${string}`]: any;
|
|
12
|
-
[key: `x-${number}`]: any;
|
|
13
|
-
version?: string;
|
|
14
|
-
name?: import("@formily/react").SchemaKey;
|
|
15
|
-
title?: any;
|
|
16
|
-
description?: any;
|
|
17
|
-
default?: any;
|
|
18
|
-
readOnly?: boolean;
|
|
19
|
-
writeOnly?: boolean;
|
|
20
|
-
type?: import("@formily/react").SchemaTypes;
|
|
21
|
-
enum?: import("@formily/react").SchemaEnum<any>;
|
|
22
|
-
const?: any;
|
|
23
|
-
multipleOf?: number;
|
|
24
|
-
maximum?: number;
|
|
25
|
-
exclusiveMaximum?: number;
|
|
26
|
-
minimum?: number;
|
|
27
|
-
exclusiveMinimum?: number;
|
|
28
|
-
maxLength?: number;
|
|
29
|
-
minLength?: number;
|
|
30
|
-
pattern?: string | RegExp;
|
|
31
|
-
maxItems?: number;
|
|
32
|
-
minItems?: number;
|
|
33
|
-
uniqueItems?: boolean;
|
|
34
|
-
maxProperties?: number;
|
|
35
|
-
minProperties?: number;
|
|
36
|
-
required?: string | boolean | string[];
|
|
37
|
-
format?: string;
|
|
38
|
-
$ref?: string;
|
|
39
|
-
$namespace?: string;
|
|
40
|
-
definitions?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
41
|
-
properties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
42
|
-
items?: import("@formily/react").SchemaItems<any, any, any, any, any, any, any, any>;
|
|
43
|
-
additionalItems?: import("@formily/react").Stringify<any>;
|
|
44
|
-
patternProperties?: import("@formily/react").SchemaProperties<any, any, any, any, any, any, any, any>;
|
|
45
|
-
additionalProperties?: import("@formily/react").Stringify<any>;
|
|
46
|
-
"x-value"?: any;
|
|
47
|
-
"x-index"?: number;
|
|
48
|
-
"x-pattern"?: any;
|
|
49
|
-
"x-display"?: any;
|
|
50
|
-
"x-validator"?: any;
|
|
51
|
-
"x-decorator"?: any;
|
|
52
|
-
"x-decorator-props"?: any;
|
|
53
|
-
"x-component"?: any;
|
|
54
|
-
"x-component-props"?: any;
|
|
55
|
-
"x-reactions"?: import("@formily/react").SchemaReactions<any>;
|
|
56
|
-
"x-content"?: any;
|
|
57
|
-
"x-data"?: any;
|
|
58
|
-
"x-visible"?: boolean;
|
|
59
|
-
"x-hidden"?: boolean;
|
|
60
|
-
"x-disabled"?: boolean;
|
|
61
|
-
"x-editable"?: boolean;
|
|
62
|
-
"x-read-only"?: boolean;
|
|
63
|
-
"x-read-pretty"?: boolean;
|
|
64
|
-
"x-compile-omitted"?: string[];
|
|
65
|
-
}>, symbol | "name" | "title" | "pattern" | "default" | "maximum" | "type" | "maxLength" | "minLength" | "readOnly" | "required" | "description" | `x-${string}` | `x-${number}` | "version" | "writeOnly" | "enum" | "const" | "multipleOf" | "exclusiveMaximum" | "minimum" | "exclusiveMinimum" | "maxItems" | "minItems" | "uniqueItems" | "maxProperties" | "minProperties" | "format" | "$ref" | "$namespace" | "definitions" | "items" | "additionalItems" | "patternProperties" | "additionalProperties">[];
|
|
66
9
|
export declare const Table: any;
|
|
@@ -10,6 +10,32 @@ import React from 'react';
|
|
|
10
10
|
interface IDatePickerProps {
|
|
11
11
|
utc?: boolean;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* 解析筛选日期组件的展示格式。
|
|
15
|
+
*
|
|
16
|
+
* 这里优先使用 schema 上显式配置的 dateFormat / format,
|
|
17
|
+
* 只有在当前 picker 没有自定义格式时才回退到默认 picker 格式。
|
|
18
|
+
*
|
|
19
|
+
* @param options 当前筛选日期组件的格式参数
|
|
20
|
+
* @returns 适用于当前 picker 的最终展示格式
|
|
21
|
+
* @example
|
|
22
|
+
* ```typescript
|
|
23
|
+
* resolveFilterPickerFormat({
|
|
24
|
+
* targetPicker: 'date',
|
|
25
|
+
* picker: 'date',
|
|
26
|
+
* dateFormat: 'MM/DD/YY',
|
|
27
|
+
* showTime: false,
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare const resolveFilterPickerFormat: (options: {
|
|
32
|
+
targetPicker: string;
|
|
33
|
+
picker?: string;
|
|
34
|
+
format?: string;
|
|
35
|
+
dateFormat?: string;
|
|
36
|
+
showTime?: boolean;
|
|
37
|
+
timeFormat?: string;
|
|
38
|
+
}) => any;
|
|
13
39
|
export declare const useDatePickerContext: () => IDatePickerProps;
|
|
14
40
|
export declare const DatePickerProvider: React.Provider<IDatePickerProps>;
|
|
15
41
|
export declare const DatePicker: {
|
package/es/schema-component/antd/form-item/hooks/useLazyLoadDisplayAssociationFieldsOfForm.d.ts
CHANGED
|
@@ -14,3 +14,29 @@
|
|
|
14
14
|
*/
|
|
15
15
|
declare const useLazyLoadDisplayAssociationFieldsOfForm: () => void;
|
|
16
16
|
export default useLazyLoadDisplayAssociationFieldsOfForm;
|
|
17
|
+
/**
|
|
18
|
+
* Remove circular references from an object while preserving shared references.
|
|
19
|
+
*
|
|
20
|
+
* This function distinguishes between:
|
|
21
|
+
* - Circular references: Objects that reference themselves in the recursion path (removed)
|
|
22
|
+
* - Shared references: Objects that appear multiple times but aren't circular (preserved)
|
|
23
|
+
*
|
|
24
|
+
* @param value - The value to process
|
|
25
|
+
* @param seen - WeakMap cache of processed objects
|
|
26
|
+
* @param path - WeakSet tracking current recursion path
|
|
27
|
+
* @returns The processed value with circular references removed
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* // Shared reference (preserved)
|
|
31
|
+
* const shared = { name: "shared" };
|
|
32
|
+
* removeCircularReferences({ a: shared, b: shared });
|
|
33
|
+
* // Returns: { a: { name: "shared" }, b: { name: "shared" } }
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* // Circular reference (removed)
|
|
37
|
+
* const circular = { name: "circular" };
|
|
38
|
+
* circular.self = circular;
|
|
39
|
+
* removeCircularReferences(circular);
|
|
40
|
+
* // Returns: { name: "circular" }
|
|
41
|
+
*/
|
|
42
|
+
export declare function removeCircularReferences(value: any, seen?: WeakMap<object, any>, path?: WeakSet<object>): any;
|
|
@@ -23,8 +23,15 @@ export declare const useParentRoute: () => NocoBaseDesktopRoute;
|
|
|
23
23
|
*/
|
|
24
24
|
export declare const useNocoBaseRoutes: (collectionName?: string) => {
|
|
25
25
|
createRoute: (values: NocoBaseDesktopRoute, refreshAfterCreate?: boolean) => Promise<any>;
|
|
26
|
+
createV2: (values: {
|
|
27
|
+
schemaUid: string;
|
|
28
|
+
parentId?: string | number | null;
|
|
29
|
+
title: string;
|
|
30
|
+
icon?: string;
|
|
31
|
+
}, refreshAfterCreate?: boolean) => Promise<any>;
|
|
26
32
|
updateRoute: (filterByTk: any, values: NocoBaseDesktopRoute, refreshAfterUpdate?: boolean) => Promise<any>;
|
|
27
33
|
deleteRoute: (filterByTk: any, refreshAfterDelete?: boolean) => Promise<any>;
|
|
34
|
+
destroyV2: (schemaUid: string, refreshAfterDestroy?: boolean) => Promise<any>;
|
|
28
35
|
moveRoute: ({ sourceId, targetId, targetScope, sortField, sticky, method, refreshAfterMove, }: {
|
|
29
36
|
sourceId: string | number;
|
|
30
37
|
targetId?: string | number;
|
|
@@ -8,6 +8,24 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import { Schema } from '@formily/react';
|
|
10
10
|
import React from 'react';
|
|
11
|
+
/**
|
|
12
|
+
* 将 CollectionField 的 uiSchema 映射到默认值弹窗里真正渲染的字段 schema。
|
|
13
|
+
*
|
|
14
|
+
* 默认值弹窗不会直接渲染 CollectionField,而是会把它替换成实际的表单组件。
|
|
15
|
+
* 这里必须把选项字段依赖的 `enum` 也带过去,否则下拉 / 单选 / 多选在弹窗里会没有可选项。
|
|
16
|
+
*
|
|
17
|
+
* @param clonedSchema 当前字段 schema 的克隆副本
|
|
18
|
+
* @param collectionFieldUiSchema 数据表字段上的 uiSchema
|
|
19
|
+
* @example
|
|
20
|
+
* ```typescript
|
|
21
|
+
* const schema = { 'x-component': 'CollectionField' };
|
|
22
|
+
* applyCollectionFieldUiSchemaToDefaultValueSchema(schema, {
|
|
23
|
+
* 'x-component': 'Select',
|
|
24
|
+
* enum: [{ label: 'Option 1', value: 'option1' }],
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare const applyCollectionFieldUiSchemaToDefaultValueSchema: (clonedSchema: Record<string, any>, collectionFieldUiSchema: Record<string, any>) => void;
|
|
11
29
|
export declare const SchemaSettingsDefaultValue: (props: {
|
|
12
30
|
fieldSchema?: Schema;
|
|
13
31
|
hideVariableButton?: boolean;
|
|
@@ -13,8 +13,8 @@ export declare const useParentObjectContext: () => {
|
|
|
13
13
|
shouldDisplayParentObject: boolean;
|
|
14
14
|
/** 变量的值 */
|
|
15
15
|
parentObjectCtx: any;
|
|
16
|
-
collectionName:
|
|
17
|
-
dataSource:
|
|
16
|
+
collectionName: any;
|
|
17
|
+
dataSource: any;
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
20
|
* 变量:`上级对象`
|
|
@@ -34,5 +34,5 @@ export declare const useParentObjectVariable: ({ collectionField, schema, noDisa
|
|
|
34
34
|
shouldDisplayParentObject: boolean;
|
|
35
35
|
/** 变量的值 */
|
|
36
36
|
parentObjectCtx: any;
|
|
37
|
-
collectionName:
|
|
37
|
+
collectionName: any;
|
|
38
38
|
};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
10
|
export declare const CurrentUserContext: React.Context<import("../api-client").UseRequestResult<any>>;
|
|
11
|
-
export declare const useCurrentUserContext: () =>
|
|
11
|
+
export declare const useCurrentUserContext: () => any;
|
|
12
12
|
export declare const useIsLoggedIn: () => boolean;
|
|
13
13
|
export declare const useCurrentRoles: () => any;
|
|
14
14
|
export declare const CurrentUserProvider: (props: any) => React.JSX.Element;
|
package/es/variables/index.d.ts
CHANGED
|
@@ -16,4 +16,4 @@ export * from './utils/isVariable';
|
|
|
16
16
|
export * from './utils/transformVariableValue';
|
|
17
17
|
export * from './constants';
|
|
18
18
|
export type { VariablesContextType } from './types';
|
|
19
|
-
export { useVariableScopeInfo } from './VariableScope';
|
|
19
|
+
export { VariableScope, useVariableScopeInfo } from './VariableScope';
|
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(--
|
|
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"}
|