@nocobase/plugin-gantt 2.1.0-beta.37 → 2.1.0-beta.40
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/client-v2.d.ts +2 -0
- package/client-v2.js +3 -0
- package/dist/client/index.js +1 -1
- package/dist/client-v2/416.b7bb09162520e448.js +10 -0
- package/dist/client-v2/617.de3dc437887f3f07.js +10 -0
- package/dist/client-v2/793.629d4cd39664b681.js +10 -0
- package/dist/client-v2/872.e640aca77c79d895.js +10 -0
- package/dist/client-v2/index.d.ts +10 -0
- package/dist/client-v2/index.js +10 -0
- package/dist/client-v2/locale.d.ts +84 -0
- package/dist/client-v2/models/GanttBlockModel.d.ts +98 -0
- package/dist/client-v2/models/GanttBlockModel.helpers.d.ts +31 -0
- package/dist/client-v2/models/GanttBlockModel.settings.d.ts +9 -0
- package/dist/client-v2/models/actions/GanttActionModels.d.ts +33 -0
- package/dist/client-v2/models/actions/GanttPopupModels.d.ts +26 -0
- package/dist/client-v2/models/components/GanttBlock.d.ts +13 -0
- package/dist/client-v2/models/components/GanttBlock.helpers.d.ts +30 -0
- package/dist/client-v2/models/components/GanttBlock.styles.d.ts +23 -0
- package/dist/client-v2/models/components/GanttBlock.tree.d.ts +49 -0
- package/dist/client-v2/models/components/getLabelFormatValue.d.ts +11 -0
- package/dist/client-v2/models/index.d.ts +11 -0
- package/dist/client-v2/plugin.d.ts +13 -0
- package/dist/client-v2/shared/components/calendar/calendar.d.ts +22 -0
- package/dist/client-v2/shared/components/calendar/style.d.ts +14 -0
- package/dist/client-v2/shared/components/calendar/top-part-of-calendar.d.ts +19 -0
- package/dist/client-v2/shared/components/gantt/style.d.ts +14 -0
- package/dist/client-v2/shared/components/gantt/task-gantt-content.d.ts +35 -0
- package/dist/client-v2/shared/components/gantt/task-gantt.d.ts +24 -0
- package/dist/client-v2/shared/components/grid/grid-body.d.ts +21 -0
- package/dist/client-v2/shared/components/grid/grid.d.ts +12 -0
- package/dist/client-v2/shared/components/grid/style.d.ts +15 -0
- package/dist/client-v2/shared/components/other/arrow.d.ts +20 -0
- package/dist/client-v2/shared/components/other/horizontal-scroll.d.ts +16 -0
- package/dist/client-v2/shared/components/other/style.d.ts +16 -0
- package/dist/client-v2/shared/components/other/tooltip.d.ts +36 -0
- package/dist/client-v2/shared/components/other/vertical-scroll.d.ts +17 -0
- package/dist/client-v2/shared/components/task-item/bar/bar-date-handle.d.ts +19 -0
- package/dist/client-v2/shared/components/task-item/bar/bar-display.d.ts +29 -0
- package/dist/client-v2/shared/components/task-item/bar/bar-progress-handle.d.ts +15 -0
- package/dist/client-v2/shared/components/task-item/bar/bar-small.d.ts +11 -0
- package/dist/client-v2/shared/components/task-item/bar/bar.d.ts +11 -0
- package/dist/client-v2/shared/components/task-item/bar/style.d.ts +10 -0
- package/dist/client-v2/shared/components/task-item/milestone/milestone.d.ts +11 -0
- package/dist/client-v2/shared/components/task-item/milestone/style.d.ts +10 -0
- package/dist/client-v2/shared/components/task-item/project/project.d.ts +11 -0
- package/dist/client-v2/shared/components/task-item/project/style.d.ts +11 -0
- package/dist/client-v2/shared/components/task-item/style.d.ts +12 -0
- package/dist/client-v2/shared/components/task-item/task-item.d.ts +23 -0
- package/dist/client-v2/shared/helpers/bar-helper.d.ts +22 -0
- package/dist/client-v2/shared/helpers/date-helper.d.ts +27 -0
- package/dist/client-v2/shared/helpers/other-helper.d.ts +17 -0
- package/dist/client-v2/shared/types/bar-task.d.ts +30 -0
- package/dist/client-v2/shared/types/date-setup.d.ts +13 -0
- package/dist/client-v2/shared/types/gantt-task-actions.d.ts +16 -0
- package/dist/client-v2/shared/types/public-types.d.ts +145 -0
- package/dist/externalVersion.js +7 -6
- package/dist/locale/de-DE.json +2 -0
- package/dist/locale/en-US.json +28 -1
- package/dist/locale/es-ES.json +2 -0
- package/dist/locale/fr-FR.json +2 -0
- package/dist/locale/hu-HU.json +2 -0
- package/dist/locale/id-ID.json +2 -0
- package/dist/locale/it-IT.json +2 -0
- package/dist/locale/ja-JP.json +2 -0
- package/dist/locale/ko-KR.json +2 -0
- package/dist/locale/nl-NL.json +2 -0
- package/dist/locale/pt-BR.json +2 -0
- package/dist/locale/ru-RU.json +2 -0
- package/dist/locale/tr-TR.json +2 -0
- package/dist/locale/uk-UA.json +2 -0
- package/dist/locale/vi-VN.json +2 -0
- package/dist/locale/zh-CN.json +28 -1
- package/dist/locale/zh-TW.json +4 -0
- package/package.json +2 -2
|
@@ -0,0 +1,98 @@
|
|
|
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 { ActionModel, TableActionsColumnModel, TableBlockModel } from '@nocobase/client-v2';
|
|
10
|
+
import { MultiRecordResource } from '@nocobase/flow-engine';
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import { Task } from '../shared/types/public-types';
|
|
13
|
+
type GanttScrollToDateOptions = {
|
|
14
|
+
behavior?: ScrollBehavior;
|
|
15
|
+
};
|
|
16
|
+
export declare class GanttBlockModel extends TableBlockModel {
|
|
17
|
+
static scene: import("@nocobase/client-v2").BlockSceneType;
|
|
18
|
+
customModelClasses: {
|
|
19
|
+
CollectionActionGroupModel: string;
|
|
20
|
+
RecordActionGroupModel: string;
|
|
21
|
+
TableColumnModel: string;
|
|
22
|
+
TableAssociationFieldGroupModel: string;
|
|
23
|
+
TableCustomColumnModel: string;
|
|
24
|
+
};
|
|
25
|
+
static filterCollection(collection: any): any;
|
|
26
|
+
get resource(): MultiRecordResource<any>;
|
|
27
|
+
createResource(): MultiRecordResource<unknown>;
|
|
28
|
+
normalizePageSize(value?: any): number;
|
|
29
|
+
getPageSize(): number;
|
|
30
|
+
normalizeTableWidth(value?: any): number;
|
|
31
|
+
getAutoTableWidth(): any;
|
|
32
|
+
getTableWidth(): any;
|
|
33
|
+
shouldShowRowNumbers(): boolean;
|
|
34
|
+
isTreeCollection(): boolean;
|
|
35
|
+
isTreeTableEnabled(): boolean;
|
|
36
|
+
shouldDefaultExpandAllRows(): boolean;
|
|
37
|
+
getTreeChildrenFieldName(): any;
|
|
38
|
+
private treeExpanded;
|
|
39
|
+
isTreeExpanded(): boolean;
|
|
40
|
+
setTreeExpandFlag(expanded: boolean): void;
|
|
41
|
+
expandAllTreeRows(): void;
|
|
42
|
+
collapseAllTreeRows(): void;
|
|
43
|
+
toggleAllTreeRows(): void;
|
|
44
|
+
scrollToDate(date: Date, options?: GanttScrollToDateOptions): void;
|
|
45
|
+
scrollToToday(options?: GanttScrollToDateOptions): void;
|
|
46
|
+
getCollectionFields(): import("@nocobase/flow-engine").CollectionField[];
|
|
47
|
+
getFieldOptions(types: string[]): {
|
|
48
|
+
label: any;
|
|
49
|
+
value: any;
|
|
50
|
+
}[];
|
|
51
|
+
getDefaultTitleFieldName(): any;
|
|
52
|
+
getDefaultStartFieldName(): any;
|
|
53
|
+
getDefaultEndFieldName(): any;
|
|
54
|
+
getFieldNames(): {
|
|
55
|
+
title: any;
|
|
56
|
+
start: any;
|
|
57
|
+
end: any;
|
|
58
|
+
progress: any;
|
|
59
|
+
color: any;
|
|
60
|
+
range: any;
|
|
61
|
+
};
|
|
62
|
+
getRecordFilterByTk(record: any, fallback?: string): any;
|
|
63
|
+
private getTaskId;
|
|
64
|
+
private formatTitle;
|
|
65
|
+
private getRecordColor;
|
|
66
|
+
private formatData;
|
|
67
|
+
getTasks(): (Task & {
|
|
68
|
+
record?: any;
|
|
69
|
+
})[];
|
|
70
|
+
getEventViewAction(): any;
|
|
71
|
+
getPopupActionUid(actionKey: 'eventViewAction'): string;
|
|
72
|
+
getPopupSettingsDefaults(actionUid?: string): {
|
|
73
|
+
mode: string;
|
|
74
|
+
size: string;
|
|
75
|
+
pageModelClass: string;
|
|
76
|
+
uid: string;
|
|
77
|
+
collectionName: any;
|
|
78
|
+
dataSourceKey: any;
|
|
79
|
+
};
|
|
80
|
+
getStoredPopupSettings(): any;
|
|
81
|
+
normalizePopupSettings(popupSettings?: Record<string, any>): {
|
|
82
|
+
[x: string]: any;
|
|
83
|
+
};
|
|
84
|
+
setPopupSettings(popupSettings?: Record<string, any>): {
|
|
85
|
+
[x: string]: any;
|
|
86
|
+
};
|
|
87
|
+
getPopupSettings(action: any, actionUid?: string): any;
|
|
88
|
+
syncPopupActionSettings(action: any): Promise<void>;
|
|
89
|
+
loadPopupAction(actionKey: 'eventViewAction'): Promise<import("@nocobase/flow-engine").FlowModel<import("@nocobase/flow-engine").DefaultStructure>>;
|
|
90
|
+
ensurePopupAction(actionKey?: 'eventViewAction'): Promise<any>;
|
|
91
|
+
openEvent(record: any): Promise<void>;
|
|
92
|
+
getActionsColumn(): TableActionsColumnModel;
|
|
93
|
+
renderConfigureActions(): React.JSX.Element;
|
|
94
|
+
getVisibleActionModels(): ActionModel<import("@nocobase/flow-engine").DefaultStructure>[];
|
|
95
|
+
renderActionBar(): React.JSX.Element;
|
|
96
|
+
renderComponent(): React.JSX.Element;
|
|
97
|
+
}
|
|
98
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
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 DATE_FIELD_TYPES: string[];
|
|
11
|
+
export declare const TITLE_FIELD_TYPES: string[];
|
|
12
|
+
export declare const PROGRESS_FIELD_TYPES: string[];
|
|
13
|
+
export declare const COLOR_FIELD_TYPES: string[];
|
|
14
|
+
export declare const DEFAULT_PRESET_COLOR = "#d9d9d9";
|
|
15
|
+
export declare const getTimeScaleOptions: (translate?: (key: string, options?: Record<string, any>) => string) => {
|
|
16
|
+
label: string;
|
|
17
|
+
value: string;
|
|
18
|
+
}[];
|
|
19
|
+
export declare const DRAG_HANDLER_TOOLBAR_ITEMS: {
|
|
20
|
+
key: string;
|
|
21
|
+
component: React.ComponentType<any>;
|
|
22
|
+
sort: number;
|
|
23
|
+
}[];
|
|
24
|
+
export declare const HIDDEN_GANTT_TABLE_SETTING_STEPS: string[];
|
|
25
|
+
export declare const HIDDEN_GANTT_TOP_ACTION_MODELS: Set<string>;
|
|
26
|
+
export declare const isSupportedByValues: (value: any, values: string[]) => boolean;
|
|
27
|
+
export declare const applyGanttFieldNames: (model: any, params: Record<string, any>) => void;
|
|
28
|
+
export declare const getProgress: (record: any, progressFieldName?: string) => number;
|
|
29
|
+
export declare const normalizeColorValue: (value: any) => any;
|
|
30
|
+
export declare const getFieldEnumColor: (field: any, value: any) => any;
|
|
31
|
+
export declare const normalizeEventOpenMode: (value?: string) => "dialog" | "embed" | "drawer";
|
|
@@ -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 registerGanttBlockModelSettings(GanttBlockModel: any): void;
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { ActionGroupModel, ActionModel } from '@nocobase/client-v2';
|
|
10
|
+
import { type FlowModelContext } from '@nocobase/flow-engine';
|
|
11
|
+
export declare const ALLOWED_GANTT_COLLECTION_ACTIONS: string[];
|
|
12
|
+
export declare class GanttCollectionActionGroupModel extends ActionGroupModel {
|
|
13
|
+
static defineChildren(ctx: FlowModelContext): Promise<any[]>;
|
|
14
|
+
}
|
|
15
|
+
export declare class GanttTodayActionModel extends ActionModel {
|
|
16
|
+
static scene: import("@nocobase/client-v2").ActionSceneType;
|
|
17
|
+
defaultProps: {
|
|
18
|
+
type: "default";
|
|
19
|
+
title: string;
|
|
20
|
+
icon: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare class GanttExpandCollapseActionModel extends ActionModel {
|
|
24
|
+
static scene: import("@nocobase/client-v2").ActionSceneType;
|
|
25
|
+
expandFlag: boolean;
|
|
26
|
+
defaultProps: {
|
|
27
|
+
type: "default";
|
|
28
|
+
title: string;
|
|
29
|
+
icon: string;
|
|
30
|
+
};
|
|
31
|
+
getTitle(): string;
|
|
32
|
+
setExpandFlag(flag: boolean): void;
|
|
33
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { PopupActionModel } from '@nocobase/client-v2';
|
|
10
|
+
export declare const createGanttEventViewActionOptions: (uid?: string) => {
|
|
11
|
+
uid: string;
|
|
12
|
+
use: string;
|
|
13
|
+
};
|
|
14
|
+
declare class GanttPopupActionModel extends PopupActionModel {
|
|
15
|
+
get collection(): any;
|
|
16
|
+
getInputArgs(): {
|
|
17
|
+
dataSourceKey: any;
|
|
18
|
+
collectionName: any;
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
export declare class GanttEventViewActionModel extends GanttPopupActionModel {
|
|
22
|
+
static scene: import("@nocobase/client-v2").ActionSceneType;
|
|
23
|
+
defaultPopupTitle: string;
|
|
24
|
+
getAclActionName(): any;
|
|
25
|
+
}
|
|
26
|
+
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 React from 'react';
|
|
10
|
+
import type { GanttBlockModel } from '../GanttBlockModel';
|
|
11
|
+
export declare const GanttBlock: React.MemoExoticComponent<import("@formily/reactive-react").ReactFC<{
|
|
12
|
+
model: GanttBlockModel;
|
|
13
|
+
}>>;
|
|
@@ -0,0 +1,30 @@
|
|
|
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 { GanttBlockModel } from '../GanttBlockModel';
|
|
10
|
+
export declare const ROW_SELECTION_COLUMN_WIDTH = 50;
|
|
11
|
+
export declare const TREE_EXPAND_COLUMN_WIDTH = 42;
|
|
12
|
+
export declare const getColumnWidth: (dataSetLength: any, clientWidth: any) => number;
|
|
13
|
+
export declare const getMaxHorizontalScrollLeft: (scrollWidth: number, clientWidth: number) => number;
|
|
14
|
+
export declare const clampHorizontalScrollLeft: (scrollLeft: number, maxScrollLeft: number) => number;
|
|
15
|
+
export declare const mapHorizontalScrollLeft: ({ scrollLeft, fromMaxScrollLeft, toMaxScrollLeft, }: {
|
|
16
|
+
scrollLeft: number;
|
|
17
|
+
fromMaxScrollLeft: number;
|
|
18
|
+
toMaxScrollLeft: number;
|
|
19
|
+
}) => number;
|
|
20
|
+
export declare const getGanttRowKey: (model: GanttBlockModel, record: any) => string;
|
|
21
|
+
export declare const measureElementHeight: (element: Element | null) => number;
|
|
22
|
+
export declare const measureMaxElementHeight: (elements: Element[]) => number;
|
|
23
|
+
export declare const getDateIndex: (date: Date, dates: Date[]) => number;
|
|
24
|
+
export declare const getTreeRowNumber: (path?: string) => string;
|
|
25
|
+
export declare const getRowNumber: ({ page, pageSize, rowIndex, rowPath, }: {
|
|
26
|
+
page?: number;
|
|
27
|
+
pageSize?: number;
|
|
28
|
+
rowIndex: number;
|
|
29
|
+
rowPath?: string;
|
|
30
|
+
}) => string | number;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
export declare const createGanttBlockClassNames: ({ token, tableWidth, hasVerticalScroll, hasHorizontalScroll, hasHorizontalTableScroll, rowHeight, }: {
|
|
10
|
+
token: any;
|
|
11
|
+
tableWidth: number;
|
|
12
|
+
hasVerticalScroll?: boolean;
|
|
13
|
+
hasHorizontalScroll?: boolean;
|
|
14
|
+
hasHorizontalTableScroll?: boolean;
|
|
15
|
+
rowHeight: number;
|
|
16
|
+
}) => {
|
|
17
|
+
tableClass: string;
|
|
18
|
+
contentClass: string;
|
|
19
|
+
actionsColumnClass: string;
|
|
20
|
+
actionsTableClass: string;
|
|
21
|
+
chartClass: string;
|
|
22
|
+
paginationClass: string;
|
|
23
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
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 { ColumnsType } from 'antd/es/table';
|
|
10
|
+
import React from 'react';
|
|
11
|
+
import type { Task } from '../../shared/types/public-types';
|
|
12
|
+
import type { GanttBlockModel } from '../GanttBlockModel';
|
|
13
|
+
export declare const GANTT_TREE_CHILDREN_COLUMN = "__ganttChildren";
|
|
14
|
+
export type GanttTreeMeta = {
|
|
15
|
+
childrenByParent: Map<string, Task[]>;
|
|
16
|
+
depthByTaskId: Map<string, number>;
|
|
17
|
+
roots: Task[];
|
|
18
|
+
};
|
|
19
|
+
export declare const getGanttTreeMeta: (tasks: Task[]) => GanttTreeMeta;
|
|
20
|
+
export declare const getVisibleGanttTasks: ({ expandedRowKeySet, tasks, treeTableEnabled, treeMeta, }: {
|
|
21
|
+
expandedRowKeySet: Set<string>;
|
|
22
|
+
tasks: Task[];
|
|
23
|
+
treeTableEnabled: boolean;
|
|
24
|
+
treeMeta?: GanttTreeMeta;
|
|
25
|
+
}) => Task[];
|
|
26
|
+
export declare const getExpandableGanttRowKeys: (tasks: Task[], treeMeta?: GanttTreeMeta) => string[];
|
|
27
|
+
export declare const getOrderedGanttTasks: ({ tasks, treeTableEnabled }: {
|
|
28
|
+
tasks: Task[];
|
|
29
|
+
treeTableEnabled: boolean;
|
|
30
|
+
}) => Task[];
|
|
31
|
+
export declare const getGanttTableRecords: ({ tasks, treeTableEnabled, treeMeta, }: {
|
|
32
|
+
tasks: Task[];
|
|
33
|
+
treeTableEnabled: boolean;
|
|
34
|
+
treeMeta?: GanttTreeMeta;
|
|
35
|
+
}) => Record<string, any>[];
|
|
36
|
+
export declare const useGanttTree: ({ model, tasks, tableColumns, }: {
|
|
37
|
+
model: GanttBlockModel;
|
|
38
|
+
tasks: Task[];
|
|
39
|
+
tableColumns: ColumnsType<any>;
|
|
40
|
+
}) => {
|
|
41
|
+
treeTableEnabled: boolean;
|
|
42
|
+
visibleTasks: Task[];
|
|
43
|
+
tableRecords: Record<string, any>[];
|
|
44
|
+
resolvedTableColumns: ColumnsType<any>;
|
|
45
|
+
expandable: {
|
|
46
|
+
expandedRowKeys: React.Key[];
|
|
47
|
+
onExpand: (expanded: boolean, record: any) => void;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
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 getDatePickerLabel: (props: any) => string;
|
|
10
|
+
export declare const getLabelFormatValue: (labelUiSchema: any, value: any) => any;
|
|
11
|
+
export declare const toPlainLabel: (value: any) => string;
|
|
@@ -0,0 +1,11 @@
|
|
|
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 './GanttBlockModel';
|
|
10
|
+
export * from './actions/GanttActionModels';
|
|
11
|
+
export * from './actions/GanttPopupModels';
|
|
@@ -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 { Application, Plugin } from '@nocobase/client-v2';
|
|
10
|
+
export declare class PluginGanttClient extends Plugin<any, Application> {
|
|
11
|
+
load(): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export default PluginGanttClient;
|
|
@@ -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 React from 'react';
|
|
10
|
+
import { DateSetup } from '../../types/date-setup';
|
|
11
|
+
import { ViewMode } from '../../types/public-types';
|
|
12
|
+
export type CalendarProps = {
|
|
13
|
+
dateSetup: DateSetup;
|
|
14
|
+
locale: string;
|
|
15
|
+
viewMode: ViewMode;
|
|
16
|
+
rtl: boolean;
|
|
17
|
+
headerHeight: number;
|
|
18
|
+
columnWidth: number;
|
|
19
|
+
fontFamily: string;
|
|
20
|
+
fontSize: string;
|
|
21
|
+
};
|
|
22
|
+
export declare const Calendar: React.FC<CalendarProps>;
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
|
|
10
|
+
calendarheader: import("antd-style").SerializedStyles;
|
|
11
|
+
calendarBottomText: import("antd-style").SerializedStyles;
|
|
12
|
+
nbGanttCalendar: import("antd-style").SerializedStyles;
|
|
13
|
+
}>;
|
|
14
|
+
export default useStyles;
|
|
@@ -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 React from 'react';
|
|
10
|
+
type TopPartOfCalendarProps = {
|
|
11
|
+
value: string;
|
|
12
|
+
x1Line: number;
|
|
13
|
+
y1Line: number;
|
|
14
|
+
y2Line: number;
|
|
15
|
+
xText: number;
|
|
16
|
+
yText: number;
|
|
17
|
+
};
|
|
18
|
+
export declare const TopPartOfCalendar: React.FC<TopPartOfCalendarProps>;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
|
|
10
|
+
ganttverticalcontainer: import("antd-style").SerializedStyles;
|
|
11
|
+
horizontalcontainer: import("antd-style").SerializedStyles;
|
|
12
|
+
wrapper: import("antd-style").SerializedStyles;
|
|
13
|
+
}>;
|
|
14
|
+
export default useStyles;
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
import { EventOption } from '../../types/public-types';
|
|
11
|
+
import { BarTask } from '../../types/bar-task';
|
|
12
|
+
import { GanttEvent } from '../../types/gantt-task-actions';
|
|
13
|
+
export type TaskGanttContentProps = {
|
|
14
|
+
tasks: BarTask[];
|
|
15
|
+
dates: Date[];
|
|
16
|
+
ganttEvent: GanttEvent;
|
|
17
|
+
selectedTask: BarTask | undefined;
|
|
18
|
+
rowHeight: number;
|
|
19
|
+
columnWidth: number;
|
|
20
|
+
timeStep: number;
|
|
21
|
+
svg?: React.RefObject<SVGSVGElement>;
|
|
22
|
+
svgWidth: number;
|
|
23
|
+
taskHeight: number;
|
|
24
|
+
arrowColor: string;
|
|
25
|
+
arrowIndent: number;
|
|
26
|
+
fontSize: string;
|
|
27
|
+
fontFamily: string;
|
|
28
|
+
rtl: boolean;
|
|
29
|
+
setGanttEvent: (value: GanttEvent) => void;
|
|
30
|
+
setFailedTask: (value: BarTask | null) => void;
|
|
31
|
+
setSelectedTask: (taskId: string) => void;
|
|
32
|
+
loading?: boolean;
|
|
33
|
+
enableDragToReschedule?: boolean;
|
|
34
|
+
} & EventOption;
|
|
35
|
+
export declare const TaskGanttContent: React.FC<TaskGanttContentProps>;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
import { CalendarProps } from '../calendar/calendar';
|
|
11
|
+
import { GridProps } from '../grid/grid';
|
|
12
|
+
import { TaskGanttContentProps } from './task-gantt-content';
|
|
13
|
+
export type TaskGanttProps = {
|
|
14
|
+
gridProps: GridProps;
|
|
15
|
+
calendarProps: CalendarProps;
|
|
16
|
+
barProps: TaskGanttContentProps;
|
|
17
|
+
ganttHeight?: number;
|
|
18
|
+
ganttFullHeight?: number;
|
|
19
|
+
scrollY: number;
|
|
20
|
+
ref: any;
|
|
21
|
+
onHorizontalScroll?: (scrollLeft: number) => void;
|
|
22
|
+
showLeftBorder?: boolean;
|
|
23
|
+
};
|
|
24
|
+
export declare const TaskGantt: React.FC<TaskGanttProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
import { Task } from '../../types/public-types';
|
|
11
|
+
export type GridBodyProps = {
|
|
12
|
+
tasks: Task[];
|
|
13
|
+
dates: Date[];
|
|
14
|
+
svgWidth: number;
|
|
15
|
+
rowHeight: number;
|
|
16
|
+
columnWidth: number;
|
|
17
|
+
todayColor: string;
|
|
18
|
+
rtl: boolean;
|
|
19
|
+
selectedRowKeys: React.Key[];
|
|
20
|
+
};
|
|
21
|
+
export declare const GridBody: React.FC<GridBodyProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
import { GridBodyProps } from './grid-body';
|
|
11
|
+
export type GridProps = GridBodyProps;
|
|
12
|
+
export declare const Grid: React.FC<GridProps>;
|
|
@@ -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
|
+
declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
|
|
10
|
+
gridBackground: import("antd-style").SerializedStyles;
|
|
11
|
+
gridColumnShade: import("antd-style").SerializedStyles;
|
|
12
|
+
gridSelectedRow: import("antd-style").SerializedStyles;
|
|
13
|
+
gridRowLine: import("antd-style").SerializedStyles;
|
|
14
|
+
}>;
|
|
15
|
+
export default useStyles;
|
|
@@ -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
|
+
import React from 'react';
|
|
10
|
+
import { BarTask } from '../../types/bar-task';
|
|
11
|
+
type ArrowProps = {
|
|
12
|
+
taskFrom: BarTask;
|
|
13
|
+
taskTo: BarTask;
|
|
14
|
+
rowHeight: number;
|
|
15
|
+
taskHeight: number;
|
|
16
|
+
arrowIndent: number;
|
|
17
|
+
rtl: boolean;
|
|
18
|
+
};
|
|
19
|
+
export declare const Arrow: React.FC<ArrowProps>;
|
|
20
|
+
export {};
|
|
@@ -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 React, { SyntheticEvent } from 'react';
|
|
10
|
+
type HorizontalScrollProps = {
|
|
11
|
+
scrollWidth: number;
|
|
12
|
+
rtl: boolean;
|
|
13
|
+
onScroll: (event: SyntheticEvent<HTMLDivElement>) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare const HorizontalScroll: React.ForwardRefExoticComponent<HorizontalScrollProps & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
export {};
|
|
@@ -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
|
+
declare const useStyles: (props?: unknown) => import("antd-style").ReturnStyles<{
|
|
10
|
+
scrollWrapper: import("antd-style").SerializedStyles;
|
|
11
|
+
tooltipDefaultContainer: import("antd-style").SerializedStyles;
|
|
12
|
+
tooltipDetailsContainer: import("antd-style").SerializedStyles;
|
|
13
|
+
tooltipDetailsContainerHidden: import("antd-style").SerializedStyles;
|
|
14
|
+
nbGridOther: import("antd-style").SerializedStyles;
|
|
15
|
+
}>;
|
|
16
|
+
export default useStyles;
|
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
import { BarTask } from '../../types/bar-task';
|
|
11
|
+
import { Task } from '../../types/public-types';
|
|
12
|
+
export type TooltipProps = {
|
|
13
|
+
task: BarTask;
|
|
14
|
+
arrowIndent: number;
|
|
15
|
+
rtl: boolean;
|
|
16
|
+
svgContainerHeight: number;
|
|
17
|
+
svgContainerWidth: number;
|
|
18
|
+
svgWidth: number;
|
|
19
|
+
headerHeight: number;
|
|
20
|
+
scrollX: number;
|
|
21
|
+
scrollY: number;
|
|
22
|
+
rowHeight: number;
|
|
23
|
+
fontSize: string;
|
|
24
|
+
fontFamily: string;
|
|
25
|
+
TooltipContent: React.FC<{
|
|
26
|
+
task: Task;
|
|
27
|
+
fontSize: string;
|
|
28
|
+
fontFamily: string;
|
|
29
|
+
}>;
|
|
30
|
+
};
|
|
31
|
+
export declare const Tooltip: React.FC<TooltipProps>;
|
|
32
|
+
export declare const StandardTooltipContent: React.FC<{
|
|
33
|
+
task: Task;
|
|
34
|
+
fontSize: string;
|
|
35
|
+
fontFamily: string;
|
|
36
|
+
}>;
|
|
@@ -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 React, { SyntheticEvent } from 'react';
|
|
10
|
+
export declare const VerticalScroll: React.FC<{
|
|
11
|
+
scroll: number;
|
|
12
|
+
ganttHeight?: number;
|
|
13
|
+
ganttFullHeight: number;
|
|
14
|
+
headerHeight: number;
|
|
15
|
+
rtl: boolean;
|
|
16
|
+
onScroll: (event: SyntheticEvent<HTMLDivElement>) => void;
|
|
17
|
+
}>;
|