@nocobase/client-v2 2.1.0-alpha.30 → 2.1.0-alpha.32
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/components/form/JsonTextArea.d.ts +18 -0
- package/es/components/index.d.ts +1 -0
- package/es/flow/actions/dateRangeLimit.d.ts +9 -0
- package/es/flow/actions/index.d.ts +1 -0
- package/es/flow/actions/linkageRulesFormValueRefresh.d.ts +10 -0
- package/es/flow/index.d.ts +1 -0
- package/es/flow/models/actions/AssociateActionModel.d.ts +19 -0
- package/es/flow/models/actions/AssociationActionUtils.d.ts +17 -0
- package/es/flow/models/actions/DisassociateActionModel.d.ts +16 -0
- package/es/flow/models/actions/index.d.ts +3 -0
- package/es/flow/models/base/GridModel.d.ts +3 -1
- package/es/flow/models/base/PageModel/PageModel.d.ts +4 -0
- package/es/flow/models/base/PageModel/RootPageModel.d.ts +9 -0
- package/es/flow/models/blocks/filter-form/FilterFormGridModel.d.ts +15 -6
- package/es/flow/models/blocks/form/value-runtime/runtime.d.ts +7 -0
- package/es/flow/models/blocks/shared/filterOperators.d.ts +9 -0
- package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.d.ts +3 -0
- package/es/flow/models/fields/AssociationFieldModel/recordSelectSettingsUtils.d.ts +9 -0
- package/es/flow/models/fields/DateTimeFieldModel/dateLimit.d.ts +20 -0
- package/es/flow/models/fields/JSEditableFieldModel.d.ts +4 -0
- package/es/flow-compat/data.d.ts +9 -2
- package/es/flow-compat/index.d.ts +1 -1
- package/es/index.d.ts +1 -0
- package/es/index.mjs +100 -93
- package/lib/index.js +101 -94
- package/package.json +6 -5
- package/src/BaseApplication.tsx +1 -1
- package/src/__tests__/app.test.tsx +23 -6
- package/src/__tests__/globalDeps.test.ts +5 -0
- package/src/components/form/JsonTextArea.tsx +129 -0
- package/src/components/index.ts +1 -0
- package/src/flow/actions/__tests__/fieldLinkageRules.scopeDepth.test.ts +478 -0
- package/src/flow/actions/__tests__/linkageRules.formValueDrivenRefresh.test.ts +438 -0
- package/src/flow/actions/__tests__/linkageRulesRefresh.test.ts +42 -0
- package/src/flow/actions/__tests__/pattern.test.ts +190 -0
- package/src/flow/actions/dateRangeLimit.tsx +66 -0
- package/src/flow/actions/index.ts +1 -0
- package/src/flow/actions/linkageRules.tsx +119 -14
- package/src/flow/actions/linkageRulesFormValueRefresh.ts +492 -0
- package/src/flow/actions/linkageRulesRefresh.tsx +4 -2
- package/src/flow/actions/openView.tsx +2 -1
- package/src/flow/actions/pattern.tsx +25 -2
- package/src/flow/actions/titleField.tsx +8 -3
- package/src/flow/admin-shell/AdminLayoutRouteCoordinator.ts +7 -1
- package/src/flow/admin-shell/__tests__/AdminLayoutRouteCoordinator.test.ts +117 -0
- package/src/flow/components/FieldAssignValueInput.tsx +1 -0
- package/src/flow/components/filter/LinkageFilterItem.tsx +6 -5
- package/src/flow/components/filter/VariableFilterItem.tsx +14 -13
- package/src/flow/components/filter/__tests__/LinkageFilterItem.test.tsx +33 -0
- package/src/flow/components/filter/__tests__/VariableFilterItem.test.tsx +48 -5
- package/src/flow/index.ts +1 -0
- package/src/flow/internal/utils/__tests__/titleFieldQuickSync.test.ts +1 -0
- package/src/flow/internal/utils/titleFieldQuickSync.ts +2 -2
- package/src/flow/models/actions/AssociateActionModel.tsx +196 -0
- package/src/flow/models/actions/AssociationActionUtils.ts +90 -0
- package/src/flow/models/actions/DisassociateActionModel.tsx +57 -0
- package/src/flow/models/actions/FilterActionModel.tsx +17 -9
- package/src/flow/models/actions/__tests__/AssociationActionModel.test.ts +250 -0
- package/src/flow/models/actions/index.ts +3 -0
- package/src/flow/models/base/GridModel.tsx +21 -1
- package/src/flow/models/base/PageModel/PageModel.tsx +15 -3
- package/src/flow/models/base/PageModel/RootPageModel.tsx +37 -2
- package/src/flow/models/base/PageModel/__tests__/PageModel.test.ts +73 -0
- package/src/flow/models/base/PageModel/__tests__/RootPageModel.test.ts +116 -0
- package/src/flow/models/base/__tests__/GridModel.dragSnapshotContainer.test.ts +98 -0
- package/src/flow/models/blocks/details/DetailsItemModel.tsx +3 -0
- package/src/flow/models/blocks/filter-form/FilterFormGridModel.tsx +200 -36
- package/src/flow/models/blocks/filter-form/__tests__/FilterFormGridModel.toggleFormFieldsCollapse.test.ts +270 -1
- package/src/flow/models/blocks/filter-form/__tests__/customFieldOperators.test.tsx +23 -0
- package/src/flow/models/blocks/filter-form/customFieldOperators.ts +12 -1
- package/src/flow/models/blocks/filter-form/fields/FieldComponentProps.tsx +22 -8
- package/src/flow/models/blocks/filter-form/fields/__tests__/FilterFormCustomFieldModel.recordSelect.test.tsx +18 -0
- package/src/flow/models/blocks/filter-manager/FilterManager.ts +51 -1
- package/src/flow/models/blocks/filter-manager/__tests__/FilterManager.test.ts +75 -0
- package/src/flow/models/blocks/form/FormItemModel.tsx +48 -28
- package/src/flow/models/blocks/form/value-runtime/__tests__/runtime.test.ts +167 -1
- package/src/flow/models/blocks/form/value-runtime/runtime.ts +103 -11
- package/src/flow/models/blocks/shared/filterOperators.ts +14 -0
- package/src/flow/models/blocks/table/TableBlockModel.tsx +19 -3
- package/src/flow/models/fields/AssociationFieldModel/RecordSelectFieldModel.tsx +5 -1
- package/src/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.tsx +48 -8
- package/src/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableField.tsx +47 -0
- package/src/flow/models/fields/AssociationFieldModel/SubTableFieldModel/__tests__/SubTableColumnModel.rowRecord.test.ts +42 -0
- package/src/flow/models/fields/AssociationFieldModel/SubTableFieldModel/__tests__/SubTableField.refresh.test.tsx +122 -0
- package/src/flow/models/fields/AssociationFieldModel/SubTableFieldModel/index.tsx +2 -0
- package/src/flow/models/fields/AssociationFieldModel/recordSelectSettingsUtils.ts +20 -0
- package/src/flow/models/fields/ClickableFieldModel.tsx +21 -9
- package/src/flow/models/fields/DateTimeFieldModel/DateOnlyFieldModel.tsx +9 -0
- package/src/flow/models/fields/DateTimeFieldModel/DateTimeFieldModel.tsx +4 -0
- package/src/flow/models/fields/DateTimeFieldModel/DateTimeNoTzFieldModel.tsx +9 -0
- package/src/flow/models/fields/DateTimeFieldModel/DateTimeTzFieldModel.tsx +9 -0
- package/src/flow/models/fields/DateTimeFieldModel/__tests__/DateTimeNoTzFieldModel.dateLimit.test.tsx +242 -0
- package/src/flow/models/fields/DateTimeFieldModel/dateLimit.ts +152 -0
- package/src/flow/models/fields/DividerItemModel.tsx +30 -15
- package/src/flow/models/fields/JSEditableFieldModel.tsx +110 -14
- package/src/flow/models/fields/__tests__/ClickableFieldModel.test.ts +87 -0
- package/src/flow/models/fields/__tests__/JSEditableFieldModel.test.tsx +210 -0
- package/src/flow/models/fields/mobile-components/MobileSelect.tsx +11 -3
- package/src/flow/models/fields/mobile-components/__tests__/MobileSelect.test.tsx +235 -0
- package/src/flow-compat/data.ts +25 -3
- package/src/flow-compat/index.ts +7 -1
- package/src/index.ts +1 -0
- package/src/utils/globalDeps.ts +6 -0
|
@@ -0,0 +1,18 @@
|
|
|
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 { TextAreaProps } from 'antd/es/input';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
export interface JsonTextAreaProps extends Omit<TextAreaProps, 'value' | 'onChange'> {
|
|
12
|
+
value?: unknown;
|
|
13
|
+
onChange?: (value: unknown) => void;
|
|
14
|
+
space?: number;
|
|
15
|
+
json5?: boolean;
|
|
16
|
+
showError?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const JsonTextArea: React.MemoExoticComponent<(props: JsonTextAreaProps) => React.JSX.Element>;
|
package/es/components/index.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
export declare const dateRangeLimit: import("@nocobase/flow-engine").ActionDefinition<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>, import("@nocobase/flow-engine").FlowContext>;
|
|
@@ -19,6 +19,7 @@ export * from './refreshTargetBlocks';
|
|
|
19
19
|
export * from './setTargetDataScope';
|
|
20
20
|
export { titleField } from './titleField';
|
|
21
21
|
export * from './dateTimeFormat';
|
|
22
|
+
export * from './dateRangeLimit';
|
|
22
23
|
export * from './sortingRules';
|
|
23
24
|
export * from './dataLoadingMode';
|
|
24
25
|
export * from './renderMode';
|
|
@@ -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 { FlowContext } from '@nocobase/flow-engine';
|
|
10
|
+
export declare function ensureFormValueDrivenLinkageRefresh(ctx: FlowContext, params: any, actionName: string): void;
|
package/es/flow/index.d.ts
CHANGED
|
@@ -27,4 +27,5 @@ export * from './admin-shell/AdminLayoutRouteCoordinator';
|
|
|
27
27
|
export * from '../settings-center';
|
|
28
28
|
export { openViewFlow } from './flows/openViewFlow';
|
|
29
29
|
export { editMarkdownFlow } from './flows/editMarkdownFlow';
|
|
30
|
+
export { resolveDynamicNamePath } from './models/blocks/form/value-runtime/path';
|
|
30
31
|
export { TextAreaWithContextSelector } from './components/TextAreaWithContextSelector';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
import type { ButtonProps } from 'antd';
|
|
10
|
+
import { ActionModel } from '../base';
|
|
11
|
+
export declare class AssociateActionModel extends ActionModel {
|
|
12
|
+
static scene: import("../base").ActionSceneType;
|
|
13
|
+
static capabilityActionName: string;
|
|
14
|
+
defaultPopupTitle: string;
|
|
15
|
+
selectedRows: any[];
|
|
16
|
+
defaultProps: ButtonProps;
|
|
17
|
+
getAclActionName(): string;
|
|
18
|
+
associateSelectedRows(): Promise<void>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 { FlowModelContext } from '@nocobase/flow-engine';
|
|
10
|
+
export declare const getAssociationBlockResourceSettings: (ctx: FlowModelContext | any) => any;
|
|
11
|
+
export declare const isAssociationBlockContext: (ctx: FlowModelContext | any) => boolean;
|
|
12
|
+
export declare const getAssociationTargetResourceSettings: (ctx: FlowModelContext | any) => {
|
|
13
|
+
dataSourceKey: any;
|
|
14
|
+
collectionName: any;
|
|
15
|
+
};
|
|
16
|
+
export declare const applyDisassociateAction: (ctx: FlowModelContext | any) => Promise<void>;
|
|
17
|
+
export declare const applyAssociateAction: (ctx: FlowModelContext | any, selectedRows: any[]) => Promise<void>;
|
|
@@ -0,0 +1,16 @@
|
|
|
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 { ButtonProps } from 'antd';
|
|
10
|
+
import { ActionModel } from '../base';
|
|
11
|
+
export declare class DisassociateActionModel extends ActionModel {
|
|
12
|
+
static scene: import("../base").ActionSceneType;
|
|
13
|
+
static capabilityActionName: string;
|
|
14
|
+
defaultProps: ButtonProps;
|
|
15
|
+
getAclActionName(): string;
|
|
16
|
+
}
|
|
@@ -7,8 +7,11 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
export * from './AddNewActionModel';
|
|
10
|
+
export * from './AssociateActionModel';
|
|
11
|
+
export * from './AssociationActionUtils';
|
|
10
12
|
export * from './BulkDeleteActionModel';
|
|
11
13
|
export * from './DeleteActionModel';
|
|
14
|
+
export * from './DisassociateActionModel';
|
|
12
15
|
export * from './EditActionModel';
|
|
13
16
|
export * from './FilterActionModel';
|
|
14
17
|
export * from './JSActionModel';
|
|
@@ -33,6 +33,7 @@ export declare class GridModel<T extends {
|
|
|
33
33
|
private readonly itemExtraToolbarItems;
|
|
34
34
|
private dragState?;
|
|
35
35
|
private _memoItemFlowSettings?;
|
|
36
|
+
onInit(options: any): void;
|
|
36
37
|
private updateDragPointerPosition;
|
|
37
38
|
private handleDragScroll;
|
|
38
39
|
private bindDragDocumentListeners;
|
|
@@ -46,6 +47,7 @@ export declare class GridModel<T extends {
|
|
|
46
47
|
getItemUids(): string[];
|
|
47
48
|
protected normalizeLayoutFromSource(source?: Partial<GridLayoutData>): GridLayoutV2;
|
|
48
49
|
getGridLayout(): GridLayoutV2;
|
|
50
|
+
serialize(): Record<string, any>;
|
|
49
51
|
syncLayoutProps(layout: GridLayoutV2): void;
|
|
50
52
|
setGridStepLayout(layout: GridLayoutV2): void;
|
|
51
53
|
private findLayoutRowByPath;
|
|
@@ -73,7 +75,7 @@ export declare class GridModel<T extends {
|
|
|
73
75
|
handleDragStart(event: DragStartEvent): void;
|
|
74
76
|
handleDragMove(event: DragMoveEvent): void;
|
|
75
77
|
private finishDrag;
|
|
76
|
-
handleDragEnd(
|
|
78
|
+
handleDragEnd(event: DragEndEvent): void;
|
|
77
79
|
handleDragCancel(_event: DragCancelEvent): void;
|
|
78
80
|
renderAddSubModelButton(): JSX.Element;
|
|
79
81
|
/**
|
|
@@ -26,6 +26,10 @@ export declare class PageModel extends FlowModel<PageModelStructure> {
|
|
|
26
26
|
private dirtyRefreshScheduled;
|
|
27
27
|
private unmounted;
|
|
28
28
|
private documentTitleUpdateVersion;
|
|
29
|
+
/**
|
|
30
|
+
* 根页面标签页开关以路由表为准,避免 flow model 里的旧配置覆盖路由管理设置。
|
|
31
|
+
*/
|
|
32
|
+
private getEnableTabs;
|
|
29
33
|
private getActiveTabKey;
|
|
30
34
|
private scheduleActiveLifecycleRefresh;
|
|
31
35
|
onMount(): void;
|
|
@@ -10,6 +10,14 @@ import { DragEndEvent } from '@dnd-kit/core';
|
|
|
10
10
|
import { PageModel } from './PageModel';
|
|
11
11
|
export declare class RootPageModel extends PageModel {
|
|
12
12
|
mounted: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* 打开页面设置前,把标签页开关表单值同步为路由表中的当前状态。
|
|
15
|
+
*/
|
|
16
|
+
private syncPageSettingsEnableTabsFromRoute;
|
|
17
|
+
/**
|
|
18
|
+
* 保存页面设置后立即同步当前页面状态,让标签页显隐无需等路由列表刷新或页面重载。
|
|
19
|
+
*/
|
|
20
|
+
private syncEnableTabsToCurrentPage;
|
|
13
21
|
/**
|
|
14
22
|
* 新建 tab 在首次保存完成前,前端 route 里可能还没有数据库 id。
|
|
15
23
|
* 拖拽前兜底触发一次保存,确保 move 接口拿到真实主键。
|
|
@@ -19,6 +27,7 @@ export declare class RootPageModel extends PageModel {
|
|
|
19
27
|
*/
|
|
20
28
|
private ensurePersistedRouteId;
|
|
21
29
|
onMount(): void;
|
|
30
|
+
openFlowSettings(options?: Parameters<PageModel['openFlowSettings']>[0]): Promise<boolean>;
|
|
22
31
|
saveStepParams(): Promise<void>;
|
|
23
32
|
handleDragEnd(event: DragEndEvent): Promise<void>;
|
|
24
33
|
}
|
|
@@ -6,12 +6,14 @@
|
|
|
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 { DragOverlayConfig } from '@nocobase/flow-engine';
|
|
9
|
+
import { DragOverlayConfig, GridLayoutData, GridLayoutV2 } from '@nocobase/flow-engine';
|
|
10
10
|
import React from 'react';
|
|
11
11
|
import { GridModel } from '../../base';
|
|
12
12
|
import { FilterFormItemModel } from './FilterFormItemModel';
|
|
13
13
|
export declare class FilterFormGridModel extends GridModel {
|
|
14
14
|
private fullLayoutBeforeCollapse?;
|
|
15
|
+
private normalizedItemUidsOverride?;
|
|
16
|
+
private readingFullLayoutForSettingsInteraction;
|
|
15
17
|
itemSettingsMenuLevel: number;
|
|
16
18
|
itemFlowSettings: {
|
|
17
19
|
showBackground: boolean;
|
|
@@ -27,17 +29,24 @@ export declare class FilterFormGridModel extends GridModel {
|
|
|
27
29
|
value: boolean;
|
|
28
30
|
};
|
|
29
31
|
private getAssociationFilterTargetKey;
|
|
32
|
+
private normalizeFilterFormLayout;
|
|
33
|
+
private normalizeStoredFullLayout;
|
|
34
|
+
protected normalizeLayoutFromSource(source?: Partial<GridLayoutData>): GridLayoutV2;
|
|
35
|
+
getGridLayout(): GridLayoutV2;
|
|
36
|
+
saveGridLayout(layout?: GridLayoutData | GridLayoutV2): void;
|
|
37
|
+
handleDragStart(event: Parameters<GridModel['handleDragStart']>[0]): void;
|
|
38
|
+
private collectLayoutItemUids;
|
|
39
|
+
private getCellVisibleRowCount;
|
|
40
|
+
private getRowVisibleRowCount;
|
|
41
|
+
private limitCellByVisibleCount;
|
|
42
|
+
private limitRowByVisibleCount;
|
|
43
|
+
private limitLayoutRowsByVisibleCount;
|
|
30
44
|
/**
|
|
31
45
|
* 获取筛选表单当前“完整布局”。
|
|
32
46
|
* 折叠态会临时裁剪 props.rows,因此这里优先选取行数更多的那份布局,
|
|
33
47
|
* 避免拖拽排序或重新挂载后只拿到被裁剪过的运行时 rows。
|
|
34
48
|
*/
|
|
35
49
|
private getFullLayout;
|
|
36
|
-
/**
|
|
37
|
-
* 按“可视字段行数”裁剪布局,而不是只按 grid row 数裁剪。
|
|
38
|
-
* 这样即使拖拽后多个字段被排进同一个 cell,也仍然可以正确折叠。
|
|
39
|
-
*/
|
|
40
|
-
private limitRowsByVisibleCount;
|
|
41
50
|
toggleFormFieldsCollapse(collapse: boolean, visibleRows: number): void;
|
|
42
51
|
onModelCreated(subModel: FilterFormItemModel): Promise<void>;
|
|
43
52
|
renderAddSubModelButton(): React.JSX.Element;
|
|
@@ -46,6 +46,8 @@ export declare class FormValueRuntime {
|
|
|
46
46
|
syncAssignRules(items: FormAssignRuleItem[]): void;
|
|
47
47
|
get formValues(): any;
|
|
48
48
|
getFormValuesSnapshot(): any;
|
|
49
|
+
canApplyDefaultValuePatch(namePath: NamePath, resolved: any): boolean;
|
|
50
|
+
recordDefaultValuePatch(namePath: NamePath, value?: any): void;
|
|
49
51
|
private getFormValueAtPath;
|
|
50
52
|
mount(options?: {
|
|
51
53
|
sync?: boolean;
|
|
@@ -82,6 +84,11 @@ export declare class FormValueRuntime {
|
|
|
82
84
|
private bumpChangeTick;
|
|
83
85
|
private emitFormValuesChange;
|
|
84
86
|
private markExplicit;
|
|
87
|
+
private normalizeObservedNamePath;
|
|
88
|
+
private clearExplicitForDefaultPatch;
|
|
89
|
+
private shouldPreserveDescendantDefaultsOnExplicit;
|
|
90
|
+
private shouldKeepDefaultPathEnabled;
|
|
91
|
+
private shouldKeepDefaultPathValueEnabled;
|
|
85
92
|
private isExplicit;
|
|
86
93
|
private findExplicitHit;
|
|
87
94
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
export declare function isArrayLikeField(field: any): boolean;
|
package/es/flow/models/fields/AssociationFieldModel/SubTableFieldModel/SubTableColumnModel.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ import { FieldModel } from '../../../base/FieldModel';
|
|
|
14
14
|
export declare function FieldWithoutPermissionPlaceholder({ targetModel }: {
|
|
15
15
|
targetModel: any;
|
|
16
16
|
}): React.JSX.Element;
|
|
17
|
+
export declare function buildRowPathFromFieldIndex(fieldIndex: unknown): Array<string | number> | null;
|
|
18
|
+
export declare function getLatestSubTableRowRecord(form: any, fieldIndex: unknown, fallbackRecord: any): any;
|
|
17
19
|
export interface SubTableColumnModelStructure {
|
|
18
20
|
parent: SubTableFieldModel;
|
|
19
21
|
subModels: {
|
|
@@ -25,6 +27,7 @@ export declare class SubTableColumnModel<T extends SubTableColumnModelStructure
|
|
|
25
27
|
renderHiddenInConfig(): React.JSX.Element;
|
|
26
28
|
static defineChildren(ctx: FlowModelContext): any;
|
|
27
29
|
get collection(): any;
|
|
30
|
+
get hasFormulaColumn(): boolean;
|
|
28
31
|
onInit(options: any): void;
|
|
29
32
|
afterAddAsSubModel(): Promise<void>;
|
|
30
33
|
getColumnProps(): TableColumnProps;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
export declare function hasAncestorModel(model: any, modelNames: string[]): boolean;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
type DateLimitProps = {
|
|
10
|
+
_minDate?: any;
|
|
11
|
+
_maxDate?: any;
|
|
12
|
+
currentForm?: any;
|
|
13
|
+
};
|
|
14
|
+
export declare function useDateLimit(props: DateLimitProps): {
|
|
15
|
+
minDate: any;
|
|
16
|
+
maxDate: any;
|
|
17
|
+
disabledDate: any;
|
|
18
|
+
disabledTime: any;
|
|
19
|
+
};
|
|
20
|
+
export {};
|
|
@@ -16,6 +16,10 @@ import { FieldModel } from '../base/FieldModel';
|
|
|
16
16
|
*/
|
|
17
17
|
export declare class JSEditableFieldModel extends FieldModel {
|
|
18
18
|
private _mountedOnce;
|
|
19
|
+
private _pendingJsSettingsApply;
|
|
20
|
+
private _lastAppliedJsSettings?;
|
|
21
|
+
scheduleApplyJsSettings(): void;
|
|
22
|
+
useHooksBeforeRender(): void;
|
|
19
23
|
render(): React.JSX.Element;
|
|
20
24
|
/**
|
|
21
25
|
* 在 CreateForm / 提交后重置等场景下,字段可能被卸载并重新挂载。
|
package/es/flow-compat/data.d.ts
CHANGED
|
@@ -6,10 +6,17 @@
|
|
|
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 type { CollectionFieldInterfaceDataSourceManager } from '@nocobase/flow-engine';
|
|
10
10
|
export interface CollectionFieldOptions {
|
|
11
11
|
interface?: string;
|
|
12
12
|
[key: string]: any;
|
|
13
13
|
}
|
|
14
|
+
type FieldInterfaceOptions = {
|
|
15
|
+
titleUsable?: boolean;
|
|
16
|
+
} | null | undefined;
|
|
14
17
|
export declare const DEFAULT_DATA_SOURCE_KEY = "main";
|
|
15
|
-
export declare const
|
|
18
|
+
export declare const getFlowFieldInterfaceOptions: (interfaceName: string | undefined, ...dataSourceManagers: Array<CollectionFieldInterfaceDataSourceManager | null | undefined>) => any;
|
|
19
|
+
export declare const hasFlowFieldInterfaceLookup: (...dataSourceManagers: Array<CollectionFieldInterfaceDataSourceManager | null | undefined>) => boolean;
|
|
20
|
+
export declare const isTitleFieldInterface: (fieldInterfaceOptions: FieldInterfaceOptions) => boolean;
|
|
21
|
+
export declare const isTitleField: (dataSourceManager: CollectionFieldInterfaceDataSourceManager | null | undefined, field: CollectionFieldOptions | null | undefined) => boolean;
|
|
22
|
+
export {};
|
|
@@ -10,7 +10,7 @@ export { Plugin } from '../Plugin';
|
|
|
10
10
|
export { useApp } from '../hooks/useApp';
|
|
11
11
|
export { usePlugin } from '../hooks/usePlugin';
|
|
12
12
|
export { ColorPicker } from './ColorPicker';
|
|
13
|
-
export { DEFAULT_DATA_SOURCE_KEY, isTitleField } from './data';
|
|
13
|
+
export { DEFAULT_DATA_SOURCE_KEY, getFlowFieldInterfaceOptions, hasFlowFieldInterfaceLookup, isTitleField, isTitleFieldInterface, } from './data';
|
|
14
14
|
export { FieldValidation } from './FieldValidation';
|
|
15
15
|
export { HighPerformanceSpin } from './HighPerformanceSpin';
|
|
16
16
|
export { Icon, hasIcon, icons, registerIcon, registerIcons } from './Icon';
|
package/es/index.d.ts
CHANGED
|
@@ -30,4 +30,5 @@ export * from './collection-field-interface/CollectionFieldInterface';
|
|
|
30
30
|
export * from './collection-field-interface/CollectionFieldInterfaceManager';
|
|
31
31
|
export * from './collection-manager/interfaces';
|
|
32
32
|
export * from './flow';
|
|
33
|
+
export { DEFAULT_DATA_SOURCE_KEY, isTitleField, isTitleFieldInterface } from './flow-compat';
|
|
33
34
|
export { default as AntdAppProvider } from './theme/AntdAppProvider';
|