@nocobase/client-v2 2.2.0-beta.9 → 3.0.0-alpha.1
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/APIClient.d.ts +1 -3
- package/es/BaseApplication.d.ts +1 -0
- package/es/acl/ACLProvider.d.ts +10 -0
- package/es/authRedirect.d.ts +5 -0
- package/es/collection-field-interface/CollectionFieldInterface.d.ts +1 -0
- package/es/collection-field-interface/CollectionFieldInterfaceManager.d.ts +1 -0
- package/es/components/AttachmentUpload.d.ts +51 -0
- package/es/components/category-tabs/SortableCategoryTabs.d.ts +55 -0
- package/es/components/category-tabs/index.d.ts +9 -0
- package/es/components/form/ScanInput/useCodeScanner.d.ts +3 -2
- package/es/components/form/TypedVariableInput.d.ts +31 -5
- package/es/components/form/filter/CollectionFilter.d.ts +2 -0
- package/es/components/form/filter/CollectionFilterItem.d.ts +11 -1
- package/es/components/form/filter/CollectionFilterPanel.d.ts +2 -0
- package/es/components/form/filter/index.d.ts +2 -0
- package/es/components/form/filter/useFilterActionProps.d.ts +2 -0
- package/es/components/index.d.ts +2 -0
- package/es/flow/actions/index.d.ts +1 -1
- package/es/flow/actions/linkageRules.d.ts +3 -0
- package/es/flow/admin-shell/admin-layout/AdminLayoutMenuModels.d.ts +1 -0
- package/es/flow/admin-shell/admin-layout/NocoBaseLogo.d.ts +10 -0
- package/es/flow/components/FieldAssignExactDatePicker.d.ts +1 -0
- package/es/flow/components/FieldAssignValueInput.d.ts +9 -0
- package/es/flow/components/FlowRoute.d.ts +2 -2
- package/es/flow/components/RunJSValueEditor.d.ts +1 -0
- package/es/flow/components/filter/FilterGroup.d.ts +1 -0
- package/es/flow/components/filter/VariableFilterItem.d.ts +6 -1
- package/es/flow/index.d.ts +1 -0
- package/es/flow/internal/registerDeviceTypeContext.d.ts +10 -0
- package/es/flow/models/base/ActionModelCore.d.ts +4 -2
- package/es/flow/models/base/BlockGridModel.d.ts +3 -0
- package/es/flow/models/base/PageModel/PageModel.d.ts +12 -0
- package/es/flow/models/base/PageModel/PageModelTabBar.d.ts +22 -0
- package/es/flow/models/base/PageModel/PageTabModel.d.ts +12 -0
- package/es/flow/models/blocks/form/QuickEditFormModel.d.ts +17 -2
- package/es/flow/models/blocks/table/TableColumnModel.d.ts +1 -0
- package/es/flow/models/fields/DateTimeFieldModel/dateLimit.d.ts +15 -7
- package/es/flow-compat/fieldValidationConstants.d.ts +1 -1
- package/es/flow-compat/routeTypes.d.ts +1 -0
- package/es/index.d.ts +8 -1
- package/es/index.mjs +190 -141
- package/es/nocobase-buildin-plugin/currentUserAuthStatus.d.ts +11 -0
- package/es/nocobase-buildin-plugin/index.d.ts +9 -0
- package/es/settings-app/SettingsApplication.d.ts +18 -0
- package/es/settings-app/SettingsBrand.d.ts +16 -0
- package/es/settings-app/SettingsBuildInPlugin.d.ts +9 -0
- package/es/settings-app/SettingsDocumentRedirect.d.ts +10 -0
- package/es/settings-app/SettingsGroupNav.d.ts +17 -0
- package/es/settings-app/SettingsPluginSettingsManager.d.ts +14 -0
- package/es/settings-app/SettingsRouterManager.d.ts +15 -0
- package/es/settings-app/SettingsSearch.d.ts +17 -0
- package/es/settings-app/SettingsShell.d.ts +10 -0
- package/es/settings-app/isSettingsApp.d.ts +18 -0
- package/es/settings-app/runtimePaths.d.ts +18 -0
- package/es/settings-app/settingsDocumentPath.d.ts +14 -0
- package/es/settings-app/settingsTheme.d.ts +87 -0
- package/es/settings-app/useSettingsThemeConfig.d.ts +22 -0
- package/es/settings-center/AdminSettingsLayout.d.ts +2 -2
- package/es/settings-center/groups.d.ts +66 -0
- package/es/settings-center/useSettingsGroups.d.ts +36 -0
- package/es/settings-center/useSettingsSearch.d.ts +35 -0
- package/es/settings-center/utils.d.ts +24 -0
- package/es/theme/index.d.ts +1 -0
- package/es/theme/itemActive.d.ts +24 -0
- package/es/theme/type.d.ts +9 -0
- package/es/utils/getRouteRuntimeVersion.d.ts +23 -0
- package/es/utils/index.d.ts +1 -0
- package/lib/index.js +195 -146
- package/lib/locale/languageCodes.js +3 -1
- package/package.json +9 -7
- package/src/APIClient.ts +1 -10
- package/src/Application.tsx +4 -0
- package/src/BaseApplication.tsx +11 -6
- package/src/__tests__/app.test.tsx +73 -0
- package/src/__tests__/authRedirect.test.ts +137 -0
- package/src/__tests__/browserChecker.test.ts +185 -6
- package/src/__tests__/getRouteRuntimeVersion.test.ts +68 -0
- package/src/__tests__/mockSettingsApplication.ts +29 -0
- package/src/__tests__/nocobase-buildin-plugin-auth.test.tsx +79 -10
- package/src/__tests__/plugin-manager.test.tsx +7 -6
- package/src/__tests__/settings-application.test.ts +164 -0
- package/src/__tests__/settings-auth-routes.test.ts +71 -0
- package/src/__tests__/settings-center.test.tsx +38 -37
- package/src/__tests__/settings-layout-root.test.tsx +260 -0
- package/src/__tests__/settings-runtime-paths.test.ts +99 -0
- package/src/__tests__/settings-shell.test.tsx +200 -0
- package/src/acl/ACLProvider.tsx +21 -0
- package/src/authRedirect.ts +72 -3
- package/src/collection-field-interface/CollectionFieldInterface.ts +1 -0
- package/src/collection-field-interface/CollectionFieldInterfaceManager.ts +1 -0
- package/src/collection-manager/field-validation.ts +1 -1
- package/src/components/AttachmentUpload.tsx +275 -0
- package/src/components/README.md +7 -1
- package/src/components/README.zh-CN.md +6 -1
- package/src/components/category-tabs/SortableCategoryTabs.tsx +210 -0
- package/src/components/category-tabs/index.ts +10 -0
- package/src/components/form/JsonTextArea.tsx +4 -0
- package/src/components/form/ScanInput/CodeScanner.tsx +79 -35
- package/src/components/form/ScanInput/__tests__/CodeScanner.test.tsx +101 -0
- package/src/components/form/ScanInput/__tests__/useCodeScanner.test.tsx +284 -11
- package/src/components/form/ScanInput/useCodeScanner.ts +332 -24
- package/src/components/form/TypedVariableInput.tsx +452 -101
- package/src/components/form/__tests__/TypedVariableInput.test.tsx +364 -12
- package/src/components/form/filter/CollectionFilter.tsx +4 -0
- package/src/components/form/filter/CollectionFilterItem.tsx +32 -7
- package/src/components/form/filter/CollectionFilterPanel.tsx +4 -0
- package/src/components/form/filter/__tests__/CollectionFilterItem.test.tsx +38 -0
- package/src/components/form/filter/__tests__/useFilterActionProps.test.tsx +95 -0
- package/src/components/form/filter/index.ts +2 -0
- package/src/components/form/filter/useFilterActionProps.ts +37 -6
- package/src/components/index.ts +2 -0
- package/src/flow/FlowPage.tsx +9 -1
- package/src/flow/__tests__/FlowPage.test.tsx +50 -3
- package/src/flow/__tests__/FlowRoute.test.tsx +128 -10
- package/src/flow/__tests__/PluginFlowEngine.test.ts +58 -0
- package/src/flow/actions/__tests__/actionLinkageRules.forkProps.test.ts +314 -0
- package/src/flow/actions/__tests__/dataScopeFormValueClear.test.ts +102 -0
- package/src/flow/actions/__tests__/linkageRules.tab.test.ts +171 -0
- package/src/flow/actions/__tests__/linkageRulesRefresh.test.ts +7 -3
- package/src/flow/actions/index.ts +2 -0
- package/src/flow/actions/linkageRules.tsx +111 -16
- package/src/flow/actions/linkageRulesRefresh.tsx +2 -6
- package/src/flow/admin-shell/admin-layout/AdminLayoutComponent.tsx +1 -57
- package/src/flow/admin-shell/admin-layout/NocoBaseLogo.tsx +77 -0
- package/src/flow/admin-shell/admin-layout/TopbarActionsBar.tsx +37 -14
- package/src/flow/admin-shell/admin-layout/__tests__/AdminLayoutComponent.test.tsx +253 -6
- package/src/flow/admin-shell/admin-layout/__tests__/TopbarActionsBar.test.tsx +77 -13
- package/src/flow/common/Markdown/style.ts +4 -0
- package/src/flow/components/BlockItemCard.tsx +2 -2
- package/src/flow/components/FieldAssignExactDatePicker.tsx +25 -11
- package/src/flow/components/FieldAssignValueInput.tsx +91 -20
- package/src/flow/components/FlowRoute.tsx +78 -32
- package/src/flow/components/RunJSValueEditor.tsx +9 -1
- package/src/flow/components/__tests__/FieldAssignValueInput.context.test.tsx +216 -0
- package/src/flow/components/filter/FilterGroup.tsx +33 -5
- package/src/flow/components/filter/VariableFilterItem.tsx +158 -10
- package/src/flow/components/filter/__tests__/FilterGroup.test.tsx +45 -0
- package/src/flow/components/filter/__tests__/VariableFilterItem.leftMetaTree.test.tsx +9 -0
- package/src/flow/components/filter/__tests__/VariableFilterItem.test.tsx +70 -1
- package/src/flow/index.ts +3 -0
- package/src/flow/internal/registerDeviceTypeContext.ts +39 -0
- package/src/flow/models/base/ActionModelCore.tsx +11 -2
- package/src/flow/models/base/BlockGridModel.tsx +26 -0
- package/src/flow/models/base/CollectionBlockModel.tsx +6 -2
- package/src/flow/models/base/PageModel/PageModel.tsx +387 -53
- package/src/flow/models/base/PageModel/PageModelTabBar.tsx +114 -0
- package/src/flow/models/base/PageModel/PageTabModel.tsx +249 -18
- package/src/flow/models/base/PageModel/__tests__/PageModel.test.ts +790 -10
- package/src/flow/models/base/PageModel/__tests__/PageModelTabBar.module-isolation.test.tsx +130 -0
- package/src/flow/models/base/PageModel/__tests__/PageModelTabBar.test.tsx +118 -0
- package/src/flow/models/base/PageModel/__tests__/PageTabModel.test.ts +1075 -7
- package/src/flow/models/base/__tests__/ActionModelCore.render.test.tsx +49 -0
- package/src/flow/models/base/__tests__/BlockGridModel.selectSceneActivation.test.ts +124 -0
- package/src/flow/models/base/__tests__/CollectionBlockModel.addAppends.test.ts +41 -0
- package/src/flow/models/blocks/filter-form/FilterFormBlockModel.tsx +28 -3
- package/src/flow/models/blocks/filter-form/FilterFormItemModel.tsx +27 -12
- package/src/flow/models/blocks/filter-form/__tests__/FilterFormItemModel.defineChildren.test.ts +36 -0
- package/src/flow/models/blocks/filter-form/__tests__/defaultValues.wiring.test.ts +66 -4
- package/src/flow/models/blocks/form/QuickEditFormModel.tsx +189 -36
- package/src/flow/models/blocks/form/__tests__/QuickEditFormModel.quickEdit.test.ts +350 -2
- package/src/flow/models/blocks/js-block/JSBlock.tsx +1 -1
- package/src/flow/models/blocks/table/TableActionsColumnModel.tsx +2 -1
- package/src/flow/models/blocks/table/TableBlockModel.tsx +4 -2
- package/src/flow/models/blocks/table/TableColumnModel.tsx +30 -1
- package/src/flow/models/blocks/table/__tests__/TableBlockModel.quickEditRefresh.test.ts +12 -0
- package/src/flow/models/blocks/table/__tests__/TableColumnModel.test.tsx +33 -0
- package/src/flow/models/fields/AssociationFieldModel/PopupSubTableFieldModel/PopupSubTableFieldModel.tsx +2 -1
- package/src/flow/models/fields/DateTimeFieldModel/__tests__/DateTimeNoTzFieldModel.dateLimit.test.tsx +149 -0
- package/src/flow/models/fields/DateTimeFieldModel/dateLimit.ts +149 -113
- package/src/flow/models/fields/JsonFieldModel.tsx +31 -8
- package/src/flow/models/fields/VariableFieldFormModel.tsx +3 -3
- package/src/flow/models/fields/__tests__/JsonFieldModel.test.ts +82 -0
- package/src/flow/models/fields/__tests__/VariableFieldFormModel.test.tsx +51 -0
- package/src/flow/models/fields/mobile-components/MobileLazySelect.tsx +20 -10
- package/src/flow/models/fields/mobile-components/MobileSelect.tsx +24 -12
- package/src/flow/models/topbar/TopbarActionModel.tsx +52 -180
- package/src/flow/utils/dataScopeFormValueClear.ts +4 -3
- package/src/flow-compat/fieldValidationConstants.ts +1 -1
- package/src/flow-compat/routeTypes.ts +1 -0
- package/src/index.ts +14 -1
- package/src/locale/languageCodes.ts +3 -1
- package/src/nocobase-buildin-plugin/currentUserAuthStatus.ts +58 -0
- package/src/nocobase-buildin-plugin/index.tsx +110 -70
- package/src/settings-app/SettingsApplication.ts +31 -0
- package/src/settings-app/SettingsBrand.tsx +108 -0
- package/src/settings-app/SettingsBuildInPlugin.ts +10 -0
- package/src/settings-app/SettingsDocumentRedirect.tsx +26 -0
- package/src/settings-app/SettingsGroupNav.tsx +124 -0
- package/src/settings-app/SettingsPluginSettingsManager.ts +38 -0
- package/src/settings-app/SettingsRouterManager.ts +92 -0
- package/src/settings-app/SettingsSearch.tsx +238 -0
- package/src/settings-app/SettingsShell.tsx +167 -0
- package/src/settings-app/isSettingsApp.ts +21 -0
- package/src/settings-app/runtimePaths.ts +104 -0
- package/src/settings-app/settingsDocumentPath.ts +66 -0
- package/src/settings-app/settingsTheme.ts +301 -0
- package/src/settings-app/useSettingsThemeConfig.ts +100 -0
- package/src/settings-center/AdminSettingsLayout.tsx +122 -141
- package/src/settings-center/SystemSettingsPage.tsx +4 -170
- package/src/settings-center/groups.ts +108 -0
- package/src/settings-center/useSettingsGroups.ts +105 -0
- package/src/settings-center/useSettingsSearch.ts +173 -0
- package/src/settings-center/utils.tsx +50 -1
- package/src/theme/index.tsx +1 -0
- package/src/theme/itemActive.ts +31 -0
- package/src/theme/type.ts +10 -0
- package/src/utils/getRouteRuntimeVersion.ts +185 -0
- package/src/utils/index.tsx +1 -0
package/es/APIClient.d.ts
CHANGED
|
@@ -6,10 +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 { APIClient as APIClientSDK
|
|
9
|
+
import { APIClient as APIClientSDK } from '@nocobase/sdk';
|
|
10
10
|
export declare class APIClient extends APIClientSDK {
|
|
11
|
-
appName?: string;
|
|
12
|
-
constructor(options?: APIClientOptions);
|
|
13
11
|
getHostname(): string;
|
|
14
12
|
getHeaders(): {};
|
|
15
13
|
interceptors(): void;
|
package/es/BaseApplication.d.ts
CHANGED
|
@@ -143,6 +143,7 @@ export declare abstract class BaseApplication<TOptions extends BaseApplicationOp
|
|
|
143
143
|
setMaintaining(maintaining: boolean): void;
|
|
144
144
|
getOptions(): TOptions;
|
|
145
145
|
getName(): string;
|
|
146
|
+
getCdnUrl(): string;
|
|
146
147
|
getPublicPath(): string;
|
|
147
148
|
getApiUrl(pathname?: string): string;
|
|
148
149
|
getRouteUrl(pathname: string): string;
|
package/es/acl/ACLProvider.d.ts
CHANGED
|
@@ -43,6 +43,16 @@ export declare const ACLRolesCheckProvider: FC;
|
|
|
43
43
|
* 返回原始 ACL provider 上下文。
|
|
44
44
|
*/
|
|
45
45
|
export declare const useACLContext: () => ACLContextValue;
|
|
46
|
+
/**
|
|
47
|
+
* 读取当前角色的 snippets,且不要求调用方位于 `ACLRolesCheckProvider` 之内。
|
|
48
|
+
*
|
|
49
|
+
* 设置中心顶栏导航挂在 app 级 provider 上,位置比 `ACLRolesCheckProvider` 更外层,
|
|
50
|
+
* 这种情况下退回到 app context 上的 ACL observable store。
|
|
51
|
+
* 调用方需要用 `observer` 包裹,store 更新后才会重新渲染。
|
|
52
|
+
*
|
|
53
|
+
* @returns {string[]} 当前角色的 snippets
|
|
54
|
+
*/
|
|
55
|
+
export declare const useACLSnippets: () => string[];
|
|
46
56
|
/**
|
|
47
57
|
* 触发当前角色权限重新检查。
|
|
48
58
|
*/
|
package/es/authRedirect.d.ts
CHANGED
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { BaseApplication } from './BaseApplication';
|
|
10
10
|
type AppLike = Pick<BaseApplication<any>, 'getPublicPath'> & {
|
|
11
|
+
name?: string;
|
|
12
|
+
pluginSettingsManager?: {
|
|
13
|
+
getRouteName?: (name: string) => string;
|
|
14
|
+
getRoutePath?: (name: string) => string;
|
|
15
|
+
};
|
|
11
16
|
router?: {
|
|
12
17
|
getBasename?: () => string | undefined;
|
|
13
18
|
};
|
|
@@ -98,6 +98,7 @@ export declare abstract class CollectionFieldInterface {
|
|
|
98
98
|
titleUsable?: boolean;
|
|
99
99
|
usePathOptions?(field: any): any;
|
|
100
100
|
hidden?: boolean;
|
|
101
|
+
creatable?: boolean;
|
|
101
102
|
addComponentOption(componentOption: CollectionFieldInterfaceComponentOption): void;
|
|
102
103
|
getConfigureFormProperties(collectionInfo?: any): Record<string, ISchema>;
|
|
103
104
|
getDefaultValueProperty(): {
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
export type UploadedAttachment = {
|
|
11
|
+
id?: number;
|
|
12
|
+
title?: string;
|
|
13
|
+
filename?: string;
|
|
14
|
+
url?: string;
|
|
15
|
+
};
|
|
16
|
+
export type AttachmentStorageRules = {
|
|
17
|
+
size?: number;
|
|
18
|
+
mimetype?: string | string[];
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* 读取默认附件存储的上传限制。
|
|
22
|
+
*
|
|
23
|
+
* 校验交给存储自身的配置(大小、mimetype),而不是在每个调用点各写一套硬编码规则。
|
|
24
|
+
*
|
|
25
|
+
* @returns {AttachmentStorageRules | null} 存储规则,取不到时为 null
|
|
26
|
+
*/
|
|
27
|
+
export declare function useAttachmentStorageRules(): AttachmentStorageRules;
|
|
28
|
+
export type AttachmentUploadProps = {
|
|
29
|
+
value?: UploadedAttachment | null;
|
|
30
|
+
onChange?: (value: UploadedAttachment | null) => void;
|
|
31
|
+
/** 卡片尺寸;`fit` 对应 CSS object-fit */
|
|
32
|
+
preview?: {
|
|
33
|
+
width?: number;
|
|
34
|
+
height?: number;
|
|
35
|
+
fit?: 'contain' | 'cover';
|
|
36
|
+
};
|
|
37
|
+
/** 在存储规则之外再收窄可选文件类型,例如只收图片 */
|
|
38
|
+
accept?: string;
|
|
39
|
+
/** 上传卡片里 `+` 下方的文字 */
|
|
40
|
+
uploadText?: string;
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* 附件上传控件。
|
|
45
|
+
*
|
|
46
|
+
* 受控组件,值就是 `attachments:create` 返回的附件对象,可直接挂在 `Form.Item` 上。
|
|
47
|
+
* 外观沿用附件字段的原生形态:一张 picture-card,删除在卡片自身的悬浮操作里,不额外摆按钮。
|
|
48
|
+
* 上传前按默认存储的规则校验大小与 mimetype,与业务表单里的附件字段保持同一套限制。
|
|
49
|
+
*/
|
|
50
|
+
export declare const AttachmentUpload: React.FC<AttachmentUploadProps>;
|
|
51
|
+
export default AttachmentUpload;
|
|
@@ -0,0 +1,55 @@
|
|
|
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
|
+
/**
|
|
11
|
+
* A category descriptor for {@link SortableCategoryTabs}. The component is
|
|
12
|
+
* i18n-agnostic: `label` is rendered verbatim, so consumers pass an
|
|
13
|
+
* already-compiled/translated node. `color` is an antd preset color name or a
|
|
14
|
+
* hex string; `'default'` / `undefined` renders no badge color.
|
|
15
|
+
*/
|
|
16
|
+
export type SortableCategoryTabItem = {
|
|
17
|
+
id: string | number;
|
|
18
|
+
label: React.ReactNode;
|
|
19
|
+
color?: string;
|
|
20
|
+
};
|
|
21
|
+
export type SortableCategoryTabsProps = {
|
|
22
|
+
activeKey: string;
|
|
23
|
+
onChange: (key: string) => void;
|
|
24
|
+
/** Draggable category tabs (the fixed leading tab is configured via `allTab`). */
|
|
25
|
+
categories: SortableCategoryTabItem[];
|
|
26
|
+
/** The fixed, non-draggable leading tab, e.g. "All". */
|
|
27
|
+
allTab: {
|
|
28
|
+
key: string;
|
|
29
|
+
label: React.ReactNode;
|
|
30
|
+
};
|
|
31
|
+
/** Show the "+" add button and handle its click. */
|
|
32
|
+
onAdd?: () => void;
|
|
33
|
+
/** Per-category edit menu item handler; menu is hidden when omitted. */
|
|
34
|
+
onEdit?: (id: string | number) => void;
|
|
35
|
+
/** Per-category delete menu item handler; menu is hidden when omitted. */
|
|
36
|
+
onDelete?: (id: string | number) => void;
|
|
37
|
+
/** Reorder handler. Receives the dragged and dropped category ids. */
|
|
38
|
+
onSort?: (sourceId: string | number, targetId: string | number) => void | Promise<void>;
|
|
39
|
+
/** Consumer-translated labels for the per-category dropdown menu. */
|
|
40
|
+
menuLabels?: {
|
|
41
|
+
edit?: string;
|
|
42
|
+
delete?: string;
|
|
43
|
+
};
|
|
44
|
+
className?: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* A draggable, editable category tab bar. Renders only the tab bar (no content
|
|
48
|
+
* panes) — the page renders its content below and reacts to `activeKey`.
|
|
49
|
+
*
|
|
50
|
+
* Shared by settings pages that group records under reorderable categories
|
|
51
|
+
* (data-source collections, workflows, …). Drag-to-reorder is powered by
|
|
52
|
+
* `@dnd-kit`; the "+" / per-tab edit-delete affordances are optional.
|
|
53
|
+
*/
|
|
54
|
+
export declare function SortableCategoryTabs(props: SortableCategoryTabsProps): React.JSX.Element;
|
|
55
|
+
export default SortableCategoryTabs;
|
|
@@ -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 './SortableCategoryTabs';
|
|
@@ -15,17 +15,18 @@ type UseCodeScannerOptions = {
|
|
|
15
15
|
enabled: boolean;
|
|
16
16
|
elementId: string;
|
|
17
17
|
formatsToSupport?: CodeFormatsToSupport;
|
|
18
|
-
scanBoxSize?: ScannerSize;
|
|
19
18
|
onScannerSizeChanged?: (size: ScannerSize) => void;
|
|
20
19
|
onScanSuccess: (text: string) => void;
|
|
21
20
|
onScanFailure?: () => void;
|
|
21
|
+
onCameraStartFailure?: (error: unknown) => void;
|
|
22
22
|
};
|
|
23
23
|
export declare const DEFAULT_CODE_FORMATS: CodeFormatsToSupport;
|
|
24
24
|
export declare function getCodeScanBoxSize(width: number, height: number): {
|
|
25
25
|
width: number;
|
|
26
26
|
height: number;
|
|
27
27
|
};
|
|
28
|
-
export declare function
|
|
28
|
+
export declare function scanQrVideoFrame(video: HTMLVideoElement, canvas: HTMLCanvasElement): string;
|
|
29
|
+
export declare function useCodeScanner({ enabled, elementId, formatsToSupport, onScannerSizeChanged, onScanSuccess, onScanFailure, onCameraStartFailure, }: UseCodeScannerOptions): {
|
|
29
30
|
startScanFile: (file: File) => Promise<void>;
|
|
30
31
|
};
|
|
31
32
|
export {};
|
|
@@ -10,11 +10,11 @@ import { type MetaTreeNode } from '@nocobase/flow-engine';
|
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { type VariableDelimiters } from './VariableInput';
|
|
12
12
|
/**
|
|
13
|
-
* Constant types this input can edit.
|
|
14
|
-
* `useTypedConstant`
|
|
15
|
-
*
|
|
13
|
+
* Constant types this input can edit. Matches v1 `Variable.Input`
|
|
14
|
+
* `useTypedConstant` minus `'null'` (handled by the dedicated `nullable` prop).
|
|
15
|
+
* `'object'` renders an inline JSON editor (textarea).
|
|
16
16
|
*/
|
|
17
|
-
export type TypedConstantType = 'string' | 'number' | 'boolean' | 'date';
|
|
17
|
+
export type TypedConstantType = 'string' | 'number' | 'boolean' | 'date' | 'object';
|
|
18
18
|
/**
|
|
19
19
|
* One allowed constant type. Either a bare type name (`'number'`) or a
|
|
20
20
|
* `[type, editorProps]` pair (`['number', { min: 1, max: 65535 }]`) where
|
|
@@ -33,25 +33,51 @@ export interface TypedVariableInputProps {
|
|
|
33
33
|
* Allowed constant types. The `Constant` switcher entry always exposes a
|
|
34
34
|
* typed submenu (matching v1 `Variable.Input`) so users can see what type
|
|
35
35
|
* the constant is, even when only one type is permitted. Default: all four
|
|
36
|
-
* supported types.
|
|
36
|
+
* supported types. Passing `[]` switches the component into a variable-only
|
|
37
|
+
* mode: constants/null are hidden, the empty state becomes a readonly
|
|
38
|
+
* placeholder, and clearing a selected variable resets to `null`.
|
|
37
39
|
*/
|
|
38
40
|
types?: TypedConstantSpec[];
|
|
39
41
|
/**
|
|
40
42
|
* Restrict the variable picker to specific top-level meta-tree namespaces
|
|
41
43
|
* (e.g. `['$env']`). When omitted, every registered top-level property is
|
|
42
44
|
* exposed — matching `VariableInput`'s default behaviour.
|
|
45
|
+
*
|
|
46
|
+
* Ignored when `metaTree` is supplied (an explicit tree wins).
|
|
43
47
|
*/
|
|
44
48
|
namespaces?: string[];
|
|
45
49
|
/** Additional leaves appended to the picker after the namespace-filtered nodes. */
|
|
46
50
|
extraNodes?: MetaTreeNode[];
|
|
51
|
+
/**
|
|
52
|
+
* Provide the variable tree explicitly instead of reading the global
|
|
53
|
+
* FlowContext meta tree. When set, `namespaces`/`extraNodes` are ignored and
|
|
54
|
+
* this tree is used verbatim — use for context-scoped variable sources that
|
|
55
|
+
* are not part of the global registry (e.g. a workflow node's upstream
|
|
56
|
+
* outputs). Lazy `children` thunks are resolved on demand as the user
|
|
57
|
+
* expands the cascader.
|
|
58
|
+
*/
|
|
59
|
+
metaTree?: MetaTreeNode[];
|
|
47
60
|
/**
|
|
48
61
|
* When true (default), the switcher exposes a `Null` option that resets the
|
|
49
62
|
* value to `null`. When false, the value is constrained to one of the
|
|
50
63
|
* allowed types or a variable reference.
|
|
51
64
|
*/
|
|
52
65
|
nullable?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Opt-in: when the incoming `value` is `undefined`, initialize the editor to
|
|
68
|
+
* the first allowed constant type instead of rendering the null-mode
|
|
69
|
+
* placeholder. `null` still keeps its explicit null semantics; only
|
|
70
|
+
* `undefined` triggers this path.
|
|
71
|
+
*/
|
|
72
|
+
defaultToFirstConstantTypeWhenUndefined?: boolean;
|
|
53
73
|
/** Variable-token delimiters. Default `['{{', '}}']` — see `VariableInput`. */
|
|
54
74
|
delimiters?: VariableDelimiters;
|
|
75
|
+
/**
|
|
76
|
+
* Hide variable choices from the switcher. In variable-only mode this hides
|
|
77
|
+
* the selector button entirely; in mixed constant/variable mode it keeps the
|
|
78
|
+
* null/constant choices but removes variable entries.
|
|
79
|
+
*/
|
|
80
|
+
hideVariable?: boolean;
|
|
55
81
|
disabled?: boolean;
|
|
56
82
|
placeholder?: string;
|
|
57
83
|
style?: React.CSSProperties;
|
|
@@ -15,6 +15,8 @@ export interface CollectionFilterProps {
|
|
|
15
15
|
collection: Collection | undefined;
|
|
16
16
|
/** Previously compiled filter param used to seed the editable filter group. */
|
|
17
17
|
initialValue?: CompiledFilter;
|
|
18
|
+
/** Default compiled filter used both for initial empty state and Reset. */
|
|
19
|
+
defaultValue?: CompiledFilter;
|
|
18
20
|
/** Called on Submit or Reset with the compiled NocoBase filter param (`undefined` when cleared). */
|
|
19
21
|
onChange: (filter: CompiledFilter) => void;
|
|
20
22
|
/** Translator. Defaults to identity. */
|
|
@@ -37,6 +37,16 @@ export interface CollectionFilterItemProps {
|
|
|
37
37
|
app?: {
|
|
38
38
|
getComponent?: (name: string) => React.ComponentType<any> | undefined;
|
|
39
39
|
};
|
|
40
|
+
/** Optional override for the left field picker placeholder. */
|
|
41
|
+
fieldPlaceholder?: string;
|
|
42
|
+
/** Optional override for the operator picker placeholder. */
|
|
43
|
+
operatorPlaceholder?: string;
|
|
44
|
+
/** Optional override for the value input placeholder. Pass `null` to suppress it. */
|
|
45
|
+
valuePlaceholder?: string | null;
|
|
46
|
+
/** Optional override for the left field picker width. Defaults to v2's original 200px. */
|
|
47
|
+
fieldWidth?: number;
|
|
48
|
+
/** Optional override for the operator picker min-width. Defaults to v2's original 120px. */
|
|
49
|
+
operatorMinWidth?: number;
|
|
40
50
|
}
|
|
41
51
|
/**
|
|
42
52
|
* Filter row bound directly to a `Collection`, with no `FlowModel` dependency. Use this from settings pages or other surfaces that need a filter UI but don't have (and shouldn't synthesise) a block model just to satisfy `FilterItem`. Pair with `FilterContainer` via either an inline wrapper or `createCollectionFilterItem(collection)`.
|
|
@@ -47,7 +57,7 @@ export declare const CollectionFilterItem: FC<CollectionFilterItemProps>;
|
|
|
47
57
|
/**
|
|
48
58
|
* Convenience factory returning a `FilterContainer`-compatible `FilterItem` component bound to a specific collection. Avoids creating an inline closure on every parent render, which would otherwise reset any focused inner antd control.
|
|
49
59
|
*/
|
|
50
|
-
export declare function createCollectionFilterItem(collection: Collection, bound?: Pick<CollectionFilterItemProps, 'filterableFieldNames' | 'nonfilterableFieldNames' | 'noIgnore' | 't' | 'app'>): React.FC<{
|
|
60
|
+
export declare function createCollectionFilterItem(collection: Collection, bound?: Pick<CollectionFilterItemProps, 'filterableFieldNames' | 'nonfilterableFieldNames' | 'noIgnore' | 't' | 'app' | 'fieldPlaceholder' | 'operatorPlaceholder' | 'valuePlaceholder' | 'fieldWidth' | 'operatorMinWidth'>): React.FC<{
|
|
51
61
|
value: CollectionFilterItemValue;
|
|
52
62
|
}>;
|
|
53
63
|
export default CollectionFilterItem;
|
|
@@ -18,6 +18,8 @@ export interface CollectionFilterPanelProps {
|
|
|
18
18
|
collection: Collection | undefined;
|
|
19
19
|
/** Previously compiled filter param used to seed the editable filter group. */
|
|
20
20
|
initialValue?: CompiledFilter;
|
|
21
|
+
/** Default compiled filter used both for initial empty state and Reset. */
|
|
22
|
+
defaultValue?: CompiledFilter;
|
|
21
23
|
/** Called when the condition group structure changes or `reset()` is invoked. */
|
|
22
24
|
onChange?: (filter: CompiledFilter) => void;
|
|
23
25
|
/** Translator. Defaults to identity. */
|
|
@@ -9,5 +9,7 @@
|
|
|
9
9
|
export { CollectionFilter } from './CollectionFilter';
|
|
10
10
|
export type { CollectionFilterProps } from './CollectionFilter';
|
|
11
11
|
export { CollectionFilterPanel } from './CollectionFilterPanel';
|
|
12
|
+
export { CollectionFilterItem } from './CollectionFilterItem';
|
|
13
|
+
export type { CollectionFilterItemValue } from './CollectionFilterItem';
|
|
12
14
|
export type { CollectionFilterPanelProps, CollectionFilterPanelRef } from './CollectionFilterPanel';
|
|
13
15
|
export type { CompiledFilter } from './useFilterActionProps';
|
|
@@ -46,6 +46,8 @@ export interface UseFilterActionPropsArgs extends UseFilterOptionsArgs {
|
|
|
46
46
|
collection: Collection | undefined;
|
|
47
47
|
/** Previously compiled filter param used to seed the editable filter group. */
|
|
48
48
|
initialValue?: CompiledFilter;
|
|
49
|
+
/** Default compiled filter used both for initial empty state and Reset. */
|
|
50
|
+
defaultValue?: CompiledFilter;
|
|
49
51
|
/**
|
|
50
52
|
* Called when the user submits or resets the filter popover. Receives the compiled filter param (`undefined` when cleared) and which footer button triggered the call. Typical implementation: `(filter, action) => { listRequest.run(filter); if (action === 'submit') closePopover(); }`.
|
|
51
53
|
*/
|
package/es/components/index.d.ts
CHANGED
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
export * from './AppComponents';
|
|
10
|
+
export * from './AttachmentUpload';
|
|
10
11
|
export * from './BlankComponent';
|
|
12
|
+
export * from './category-tabs';
|
|
11
13
|
export * from './form/table/dnd';
|
|
12
14
|
export * from './form';
|
|
13
15
|
export * from './Icon';
|
|
@@ -35,7 +35,7 @@ export * from './formAssignRules';
|
|
|
35
35
|
export * from './filterFormDefaultValues';
|
|
36
36
|
export * from './linkageRulesRefresh';
|
|
37
37
|
export * from './blockHeight';
|
|
38
|
-
export { fieldLinkageRules, subFormFieldLinkageRules, detailsFieldLinkageRules, linkageSetDetailsFieldProps, actionLinkageRules, menuLinkageRules, blockLinkageRules, linkageSetBlockProps, linkageSetActionProps, linkageSetMenuItemProps, linkageSetFieldProps, subFormLinkageSetFieldProps, linkageAssignField, linkageRunjs, subFormLinkageAssignField, } from './linkageRules';
|
|
38
|
+
export { fieldLinkageRules, subFormFieldLinkageRules, detailsFieldLinkageRules, linkageSetDetailsFieldProps, actionLinkageRules, menuLinkageRules, tabLinkageRules, blockLinkageRules, linkageSetBlockProps, linkageSetActionProps, linkageSetMenuItemProps, linkageSetTabProps, linkageSetFieldProps, subFormLinkageSetFieldProps, linkageAssignField, linkageRunjs, subFormLinkageAssignField, } from './linkageRules';
|
|
39
39
|
export { displayFieldComponent } from './displayFieldComponent';
|
|
40
40
|
export * from './overflowMode';
|
|
41
41
|
export * from './numberFormat';
|
|
@@ -7,9 +7,11 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import { FlowContext, FlowModel } from '@nocobase/flow-engine';
|
|
10
|
+
export declare function updateLinkageRules<T>(rules: T[], updater: (nextRules: T[]) => void): T[];
|
|
10
11
|
export declare const linkageSetBlockProps: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
|
|
11
12
|
export declare const linkageSetActionProps: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
|
|
12
13
|
export declare const linkageSetMenuItemProps: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
|
|
14
|
+
export declare const linkageSetTabProps: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
|
|
13
15
|
export declare const linkageSetFieldProps: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
|
|
14
16
|
export declare const subFormLinkageSetFieldProps: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
|
|
15
17
|
export declare const linkageSetDetailsFieldProps: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
|
|
@@ -20,6 +22,7 @@ export declare const linkageRunjs: import("@nocobase/flow-engine").ActionDefinit
|
|
|
20
22
|
export declare const blockLinkageRules: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
|
|
21
23
|
export declare const actionLinkageRules: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
|
|
22
24
|
export declare const menuLinkageRules: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
|
|
25
|
+
export declare const tabLinkageRules: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
|
|
23
26
|
export declare const fieldLinkageRules: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
|
|
24
27
|
export declare const subFormFieldLinkageRules: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
|
|
25
28
|
export declare const detailsFieldLinkageRules: import("@nocobase/flow-engine").ActionDefinition<FlowModel<import("@nocobase/flow-engine").DefaultStructure>, FlowContext>;
|
|
@@ -32,6 +32,7 @@ export declare class AdminLayoutMenuItemModel extends FlowModel<AdminLayoutMenuI
|
|
|
32
32
|
buildRouteOptionsWithPersistedFlowFlag(hasPersistedMenuInstanceFlow: boolean): {
|
|
33
33
|
[x: string]: any;
|
|
34
34
|
hasPersistedMenuInstanceFlow?: boolean;
|
|
35
|
+
hasPersistedPageTabFlowModel?: boolean;
|
|
35
36
|
};
|
|
36
37
|
syncPersistedFlowRouteFlag(): Promise<void>;
|
|
37
38
|
destroyPersistedState(): Promise<void>;
|
|
@@ -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
|
+
import React from 'react';
|
|
10
|
+
export declare const NocoBaseLogo: React.MemoExoticComponent<import("@formily/reactive-react").ReactFC<unknown>>;
|
|
@@ -19,5 +19,6 @@ export interface FieldAssignExactDatePickerProps {
|
|
|
19
19
|
isRange?: boolean;
|
|
20
20
|
onChange?: (value: ExactDatePickerValue) => void;
|
|
21
21
|
style?: React.CSSProperties;
|
|
22
|
+
disabled?: boolean;
|
|
22
23
|
}
|
|
23
24
|
export declare const FieldAssignExactDatePicker: React.FC<FieldAssignExactDatePickerProps>;
|
|
@@ -10,6 +10,11 @@ import React from 'react';
|
|
|
10
10
|
import { dayjs } from '@nocobase/utils/client';
|
|
11
11
|
import { type CollectionField, type MetaTreeNode } from '@nocobase/flow-engine';
|
|
12
12
|
import { type ExactDatePickerMode } from './FieldAssignExactDatePicker';
|
|
13
|
+
type VariableInputConverters = {
|
|
14
|
+
renderInputComponent?: (metaTreeNode: MetaTreeNode | null) => React.ComponentType<any> | null;
|
|
15
|
+
resolvePathFromValue?: (value: any) => string[] | undefined;
|
|
16
|
+
resolveValueFromPath?: (metaTreeNode: MetaTreeNode) => any;
|
|
17
|
+
};
|
|
13
18
|
export type DateVariableExactNormalizeMode = 'none' | 'date' | 'datetimeNoTz' | 'iso';
|
|
14
19
|
export declare function toExactPickerDisplayValue(rawValue: unknown, options: {
|
|
15
20
|
format: string;
|
|
@@ -52,7 +57,11 @@ interface Props {
|
|
|
52
57
|
* 默认 false,保持历史行为。
|
|
53
58
|
*/
|
|
54
59
|
enableDateVariableAsConstant?: boolean;
|
|
60
|
+
/** 是否允许在变量选择器中使用 RunJS。默认 true,保持历史行为。 */
|
|
61
|
+
allowRunJS?: boolean;
|
|
55
62
|
maxAssociationFieldDepth?: number;
|
|
63
|
+
disabled?: boolean;
|
|
64
|
+
variableConverters?: VariableInputConverters;
|
|
56
65
|
}
|
|
57
66
|
export declare function mergeItemMetaTreeForAssignValue(baseTree: MetaTreeNode[], extraTree: MetaTreeNode[]): MetaTreeNode[];
|
|
58
67
|
export declare function resolveAssignValueFieldPath(itemModel: any): string | undefined;
|
|
@@ -19,8 +19,8 @@ export type FlowRouteProps = {
|
|
|
19
19
|
/**
|
|
20
20
|
* 管理后台动态页面路由组件。
|
|
21
21
|
*
|
|
22
|
-
* 负责读取当前路由页面 UID
|
|
23
|
-
*
|
|
22
|
+
* 负责读取当前路由页面 UID,并把页面生命周期桥接到 AdminLayout host model。
|
|
23
|
+
* 设备变量通常由 PluginFlowEngine 共享初始化提供;独立渲染时会在挂载后补充注册。
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
26
|
* ```tsx
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import { type MetaTreeNode, FlowModel } from '@nocobase/flow-engine';
|
|
10
|
+
import { type MetaTreeNode, type Converters, FlowModel } from '@nocobase/flow-engine';
|
|
11
11
|
export interface VariableFilterItemValue {
|
|
12
12
|
path: string;
|
|
13
13
|
operator: string;
|
|
@@ -19,6 +19,7 @@ export interface VariableFilterItemProps {
|
|
|
19
19
|
/** 筛选条件值对象 */
|
|
20
20
|
value: VariableFilterItemValue;
|
|
21
21
|
model: FlowModel;
|
|
22
|
+
disabled?: boolean;
|
|
22
23
|
/**
|
|
23
24
|
* 是否启用右侧 VariableInput(变量或静态值二合一)。
|
|
24
25
|
* 默认 false:保持原有行为,右侧仅静态输入组件。
|
|
@@ -29,6 +30,10 @@ export interface VariableFilterItemProps {
|
|
|
29
30
|
* 默认使用整棵 ctx 的 metaTree:model.context.getPropertyMetaTree()
|
|
30
31
|
*/
|
|
31
32
|
rightMetaTree?: MetaTreeNode[] | (() => MetaTreeNode[] | Promise<MetaTreeNode[]>);
|
|
33
|
+
/**
|
|
34
|
+
* 右侧变量的领域转换器。常量和空值仍由 VariableFilterItem 处理,未匹配的值回退到 FlowEngine 默认转换器。
|
|
35
|
+
*/
|
|
36
|
+
rightVariableConverters?: Pick<Converters, 'resolvePathFromValue' | 'resolveValueFromPath'>;
|
|
32
37
|
ignoreFieldNames?: string[];
|
|
33
38
|
maxAssociationFieldDepth?: number;
|
|
34
39
|
}
|
package/es/flow/index.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ export * from './FlowPage';
|
|
|
21
21
|
export * from './models';
|
|
22
22
|
export * from './utils';
|
|
23
23
|
export * from './actions';
|
|
24
|
+
export { FieldAssignValueInput } from './components/FieldAssignValueInput';
|
|
24
25
|
export * from './system-settings';
|
|
25
26
|
export * from './admin-shell/admin-layout';
|
|
26
27
|
export * from './admin-shell/BaseLayoutModel';
|
|
@@ -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
|
+
import type { FlowEngine } from '@nocobase/flow-engine';
|
|
10
|
+
export declare const registerDeviceTypeContext: (flowEngine: FlowEngine) => void;
|
|
@@ -6,7 +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 {
|
|
9
|
+
import { FlowModel } from '@nocobase/flow-engine';
|
|
10
|
+
import type { DefaultStructure, FlowModelOptions } from '@nocobase/flow-engine';
|
|
10
11
|
import type { ButtonProps } from 'antd/es/button';
|
|
11
12
|
import React from 'react';
|
|
12
13
|
export declare function ActionWithoutPermission(props: any): React.JSX.Element;
|
|
@@ -41,7 +42,8 @@ export declare class ActionModel<T extends DefaultStructure = DefaultStructure>
|
|
|
41
42
|
static _getScene(): any[];
|
|
42
43
|
static _isScene(scene: ActionSceneType): boolean;
|
|
43
44
|
getAclActionName(): any;
|
|
44
|
-
onInit(options:
|
|
45
|
+
onInit(options: FlowModelOptions<T>): void;
|
|
46
|
+
serialize(): Record<string, any>;
|
|
45
47
|
getInputArgs(): Record<string, any>;
|
|
46
48
|
onClick(event: any): void;
|
|
47
49
|
getTitle(): string;
|
|
@@ -11,8 +11,11 @@ import React from 'react';
|
|
|
11
11
|
import { FilterManager } from '../blocks/filter-manager/FilterManager';
|
|
12
12
|
import { GridModel } from './GridModel';
|
|
13
13
|
export declare class BlockGridModel extends GridModel {
|
|
14
|
+
private viewActivatedListener?;
|
|
14
15
|
dragOverlayConfig: DragOverlayConfig;
|
|
15
16
|
onInit(options: any): void;
|
|
17
|
+
onMount(): void;
|
|
18
|
+
protected onUnmount(): void;
|
|
16
19
|
get subModelBaseClasses(): string[];
|
|
17
20
|
get filterManager(): FilterManager;
|
|
18
21
|
get addBlockItems(): SubModelItemsType | undefined;
|
|
@@ -26,11 +26,23 @@ export declare class PageModel extends FlowModel<PageModelStructure> {
|
|
|
26
26
|
private dirtyRefreshScheduled;
|
|
27
27
|
private unmounted;
|
|
28
28
|
private documentTitleUpdateVersion;
|
|
29
|
+
private implicitActiveKey?;
|
|
30
|
+
private locallyCommittedTabTransition?;
|
|
29
31
|
/**
|
|
30
32
|
* 根页面标签页开关以路由表为准,避免 flow model 里的旧配置覆盖路由管理设置。
|
|
31
33
|
*/
|
|
32
34
|
private getEnableTabs;
|
|
35
|
+
private getAllTabs;
|
|
36
|
+
private getUnhiddenTabs;
|
|
37
|
+
private getRequestedTabKey;
|
|
38
|
+
private resolveTabActiveState;
|
|
33
39
|
private getActiveTabKey;
|
|
40
|
+
private getTabActiveKeySyncDependency;
|
|
41
|
+
private requestDocumentTitleUpdate;
|
|
42
|
+
private rememberImplicitActiveKey;
|
|
43
|
+
private commitTabActiveKey;
|
|
44
|
+
private consumeLocallyCommittedTabTransition;
|
|
45
|
+
private synchronizeTabActiveKey;
|
|
34
46
|
private scheduleActiveLifecycleRefresh;
|
|
35
47
|
activateCurrentTab(forceRefresh?: boolean): void;
|
|
36
48
|
deactivateCurrentTab(): void;
|
|
@@ -0,0 +1,22 @@
|
|
|
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 { Tabs } from 'antd';
|
|
10
|
+
import type { TabsProps } from 'antd';
|
|
11
|
+
import React from 'react';
|
|
12
|
+
export declare const NO_ACTIVE_PAGE_TAB_KEY = "__no_active_page_tab__";
|
|
13
|
+
type RenderTabBar = NonNullable<React.ComponentProps<typeof Tabs>['renderTabBar']>;
|
|
14
|
+
type PageTabItem = NonNullable<TabsProps['items']>[number];
|
|
15
|
+
type FilteredPageTabBarProps = {
|
|
16
|
+
hiddenTabKeys: Set<string>;
|
|
17
|
+
hiddenActiveTabLabel?: React.ReactNode;
|
|
18
|
+
items: PageTabItem[];
|
|
19
|
+
tabBarProps: Parameters<RenderTabBar>[0];
|
|
20
|
+
};
|
|
21
|
+
export declare function FilteredPageTabBar({ hiddenTabKeys, hiddenActiveTabLabel, items, tabBarProps, }: FilteredPageTabBarProps): React.JSX.Element;
|
|
22
|
+
export {};
|
|
@@ -22,9 +22,21 @@ export declare class BasePageTabModel extends FlowModel<{
|
|
|
22
22
|
render(): React.JSX.Element;
|
|
23
23
|
}
|
|
24
24
|
export declare class RootPageTabModel extends BasePageTabModel {
|
|
25
|
+
private persistedLinkageRulesHydrated;
|
|
26
|
+
private persistedLinkageRulesHydrating?;
|
|
27
|
+
onInit(options: any): void;
|
|
28
|
+
private hasExplicitLinkageRulesStep;
|
|
29
|
+
private shouldHydratePersistedLinkageRules;
|
|
30
|
+
private fetchPersistedAnchor;
|
|
31
|
+
private performPersistedLinkageRulesHydrate;
|
|
32
|
+
private hydratePersistedLinkageRules;
|
|
33
|
+
openFlowSettings(options?: Parameters<FlowModel['openFlowSettings']>[0]): Promise<boolean>;
|
|
25
34
|
renderChildren(): React.JSX.Element;
|
|
26
35
|
saveStepParams(): Promise<void>;
|
|
27
36
|
save(): Promise<void>;
|
|
37
|
+
private buildAnchorPayload;
|
|
38
|
+
private persistLinkageRulesToAnchor;
|
|
39
|
+
private syncPersistedPageTabFlowModelMarker;
|
|
28
40
|
destroy(): Promise<boolean>;
|
|
29
41
|
}
|
|
30
42
|
export declare class ChildPageTabModel extends BasePageTabModel {
|