@nocobase/plugin-gantt 2.1.0-beta.36 → 2.1.0-beta.38
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/143.1a8cf1cd5ce17b64.js +10 -0
- package/dist/client-v2/416.b7bb09162520e448.js +10 -0
- package/dist/client-v2/617.de3dc437887f3f07.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 +78 -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 +22 -0
- package/dist/client-v2/models/components/GanttBlock.styles.d.ts +22 -0
- package/dist/client-v2/models/components/GanttBlock.tree.d.ts +46 -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/externalVersion.js +7 -6
- package/dist/locale/de-DE.json +2 -0
- package/dist/locale/en-US.json +25 -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 +25 -1
- package/dist/locale/zh-TW.json +4 -0
- package/dist/node_modules/@ctrl/tinycolor/LICENSE +7 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/bundles/tinycolor.umd.min.js +2 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/conversion.d.ts +61 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/conversion.js +250 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/css-color-names.d.ts +4 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/css-color-names.js +157 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/format-input.d.ts +37 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/format-input.js +189 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/from-ratio.d.ts +14 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/from-ratio.js +30 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/index.d.ts +207 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/index.js +512 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/interfaces.d.ts +46 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/interfaces.js +2 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/module/conversion.js +235 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/module/css-color-names.js +154 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/module/format-input.js +183 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/module/from-ratio.js +25 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/module/index.js +508 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/module/interfaces.js +1 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/module/public_api.js +12 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/module/random.js +278 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/module/readability.js +80 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/module/to-ms-filter.js +16 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/module/umd_api.js +20 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/module/util.js +82 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/public_api.d.ts +11 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/public_api.js +1 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/random.d.ts +24 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/random.js +282 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/readability.d.ts +46 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/readability.js +86 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/to-ms-filter.d.ts +5 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/to-ms-filter.js +20 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/umd_api.d.ts +23 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/umd_api.js +22 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/util.d.ts +36 -0
- package/dist/node_modules/@ctrl/tinycolor/dist/util.js +92 -0
- package/dist/node_modules/@ctrl/tinycolor/package.json +1 -0
- package/dist/shared/components/calendar/calendar.d.ts +22 -0
- package/dist/shared/components/calendar/calendar.js +417 -0
- package/dist/shared/components/calendar/style.d.ts +14 -0
- package/dist/shared/components/calendar/style.js +79 -0
- package/dist/shared/components/calendar/top-part-of-calendar.d.ts +19 -0
- package/dist/shared/components/calendar/top-part-of-calendar.js +57 -0
- package/dist/shared/components/gantt/style.d.ts +14 -0
- package/dist/shared/components/gantt/style.js +74 -0
- package/dist/shared/components/gantt/task-gantt-content.d.ts +35 -0
- package/dist/shared/components/gantt/task-gantt-content.js +337 -0
- package/dist/shared/components/gantt/task-gantt.d.ts +24 -0
- package/dist/shared/components/gantt/task-gantt.js +128 -0
- package/dist/shared/components/grid/grid-body.d.ts +21 -0
- package/dist/shared/components/grid/grid-body.js +114 -0
- package/dist/shared/components/grid/grid.d.ts +12 -0
- package/dist/shared/components/grid/grid.js +50 -0
- package/dist/shared/components/grid/style.d.ts +14 -0
- package/dist/shared/components/grid/style.js +54 -0
- package/dist/shared/components/other/arrow.d.ts +20 -0
- package/dist/shared/components/other/arrow.js +90 -0
- package/dist/shared/components/other/horizontal-scroll.d.ts +16 -0
- package/dist/shared/components/other/horizontal-scroll.js +64 -0
- package/dist/shared/components/other/style.d.ts +16 -0
- package/dist/shared/components/other/style.js +125 -0
- package/dist/shared/components/other/tooltip.d.ts +36 -0
- package/dist/shared/components/other/tooltip.js +137 -0
- package/dist/shared/components/other/vertical-scroll.d.ts +17 -0
- package/dist/shared/components/other/vertical-scroll.js +74 -0
- package/dist/shared/components/task-item/bar/bar-date-handle.d.ts +19 -0
- package/dist/shared/components/task-item/bar/bar-date-handle.js +62 -0
- package/dist/shared/components/task-item/bar/bar-display.d.ts +29 -0
- package/dist/shared/components/task-item/bar/bar-display.js +98 -0
- package/dist/shared/components/task-item/bar/bar-progress-handle.d.ts +15 -0
- package/dist/shared/components/task-item/bar/bar-progress-handle.js +49 -0
- package/dist/shared/components/task-item/bar/bar-small.d.ts +11 -0
- package/dist/shared/components/task-item/bar/bar-small.js +85 -0
- package/dist/shared/components/task-item/bar/bar.d.ts +11 -0
- package/dist/shared/components/task-item/bar/bar.js +113 -0
- package/dist/shared/components/task-item/bar/style.d.ts +10 -0
- package/dist/shared/components/task-item/bar/style.js +58 -0
- package/dist/shared/components/task-item/milestone/milestone.d.ts +11 -0
- package/dist/shared/components/task-item/milestone/milestone.js +72 -0
- package/dist/shared/components/task-item/milestone/style.d.ts +10 -0
- package/dist/shared/components/task-item/milestone/style.js +45 -0
- package/dist/shared/components/task-item/project/project.d.ts +11 -0
- package/dist/shared/components/task-item/project/project.js +77 -0
- package/dist/shared/components/task-item/project/style.d.ts +11 -0
- package/dist/shared/components/task-item/project/style.js +51 -0
- package/dist/shared/components/task-item/style.d.ts +12 -0
- package/dist/shared/components/task-item/style.js +74 -0
- package/dist/shared/components/task-item/task-item.d.ts +23 -0
- package/dist/shared/components/task-item/task-item.js +132 -0
- package/dist/shared/helpers/bar-helper.d.ts +22 -0
- package/dist/shared/helpers/bar-helper.js +415 -0
- package/dist/shared/helpers/date-helper.d.ts +27 -0
- package/dist/shared/helpers/date-helper.js +231 -0
- package/dist/shared/helpers/other-helper.d.ts +17 -0
- package/dist/shared/helpers/other-helper.js +97 -0
- package/dist/shared/types/bar-task.d.ts +30 -0
- package/dist/shared/types/bar-task.js +24 -0
- package/dist/shared/types/date-setup.d.ts +13 -0
- package/dist/shared/types/date-setup.js +24 -0
- package/dist/shared/types/gantt-task-actions.d.ts +16 -0
- package/dist/shared/types/gantt-task-actions.js +24 -0
- package/dist/shared/types/public-types.d.ts +145 -0
- package/dist/shared/types/public-types.js +46 -0
- package/package.json +2 -2
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is part of the NocoBase (R) project.
|
|
3
|
+
* Copyright (c) 2020-2024 NocoBase Co., Ltd.
|
|
4
|
+
* Authors: NocoBase Team.
|
|
5
|
+
*
|
|
6
|
+
* This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
|
|
7
|
+
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var grid_exports = {};
|
|
38
|
+
__export(grid_exports, {
|
|
39
|
+
Grid: () => Grid
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(grid_exports);
|
|
42
|
+
var import_react = __toESM(require("react"));
|
|
43
|
+
var import_grid_body = require("./grid-body");
|
|
44
|
+
const Grid = (props) => {
|
|
45
|
+
return /* @__PURE__ */ import_react.default.createElement("g", { className: "grid" }, /* @__PURE__ */ import_react.default.createElement(import_grid_body.GridBody, { ...props }));
|
|
46
|
+
};
|
|
47
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
+
0 && (module.exports = {
|
|
49
|
+
Grid
|
|
50
|
+
});
|
|
@@ -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
|
+
gridRow: import("antd-style").SerializedStyles;
|
|
11
|
+
gridHeightRow: import("antd-style").SerializedStyles;
|
|
12
|
+
nbGridbody: import("antd-style").SerializedStyles;
|
|
13
|
+
}>;
|
|
14
|
+
export default useStyles;
|
|
@@ -0,0 +1,54 @@
|
|
|
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
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var style_exports = {};
|
|
28
|
+
__export(style_exports, {
|
|
29
|
+
default: () => style_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(style_exports);
|
|
32
|
+
var import_antd_style = require("antd-style");
|
|
33
|
+
const useStyles = (0, import_antd_style.createStyles)(({ token, css }) => {
|
|
34
|
+
return {
|
|
35
|
+
gridRow: css`
|
|
36
|
+
fill: ${token.colorBgContainer};
|
|
37
|
+
`,
|
|
38
|
+
gridHeightRow: css`
|
|
39
|
+
fill: #e6f7ff;
|
|
40
|
+
border-color: ${token.colorBorder};
|
|
41
|
+
`,
|
|
42
|
+
nbGridbody: css`
|
|
43
|
+
.gridrowline: {
|
|
44
|
+
stroke: ${token.colorBorderSecondary};
|
|
45
|
+
stroke-width: 0;
|
|
46
|
+
border-bottom: 1px solid ${token.colorBorderSecondary};
|
|
47
|
+
}
|
|
48
|
+
.gridtick: {
|
|
49
|
+
stroke: ${token.colorBorderSecondary};
|
|
50
|
+
}
|
|
51
|
+
`
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
var style_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,90 @@
|
|
|
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
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var arrow_exports = {};
|
|
38
|
+
__export(arrow_exports, {
|
|
39
|
+
Arrow: () => Arrow
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(arrow_exports);
|
|
42
|
+
var import_react = __toESM(require("react"));
|
|
43
|
+
const Arrow = ({ taskFrom, taskTo, rowHeight, taskHeight, arrowIndent, rtl }) => {
|
|
44
|
+
let path;
|
|
45
|
+
let trianglePoints;
|
|
46
|
+
if (rtl) {
|
|
47
|
+
[path, trianglePoints] = drownPathAndTriangleRTL(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
|
|
48
|
+
} else {
|
|
49
|
+
[path, trianglePoints] = drownPathAndTriangle(taskFrom, taskTo, rowHeight, taskHeight, arrowIndent);
|
|
50
|
+
}
|
|
51
|
+
return /* @__PURE__ */ import_react.default.createElement("g", { className: "arrow" }, /* @__PURE__ */ import_react.default.createElement("path", { strokeWidth: "1.5", d: path, fill: "none" }), /* @__PURE__ */ import_react.default.createElement("polygon", { points: trianglePoints }));
|
|
52
|
+
};
|
|
53
|
+
const drownPathAndTriangle = (taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) => {
|
|
54
|
+
const indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
|
|
55
|
+
const taskToEndPosition = taskTo.y + taskHeight / 2;
|
|
56
|
+
const taskFromEndPosition = taskFrom.x2 + arrowIndent * 2;
|
|
57
|
+
const taskFromHorizontalOffsetValue = taskFromEndPosition < taskTo.x1 ? "" : `H ${taskTo.x1 - arrowIndent}`;
|
|
58
|
+
const taskToHorizontalOffsetValue = taskFromEndPosition > taskTo.x1 ? arrowIndent : taskTo.x1 - taskFrom.x2 - arrowIndent;
|
|
59
|
+
const path = `M ${taskFrom.x2} ${taskFrom.y + taskHeight / 2}
|
|
60
|
+
h ${arrowIndent}
|
|
61
|
+
v ${indexCompare * rowHeight / 2}
|
|
62
|
+
${taskFromHorizontalOffsetValue}
|
|
63
|
+
V ${taskToEndPosition}
|
|
64
|
+
h ${taskToHorizontalOffsetValue}`;
|
|
65
|
+
const trianglePoints = `${taskTo.x1},${taskToEndPosition}
|
|
66
|
+
${taskTo.x1 - 5},${taskToEndPosition - 5}
|
|
67
|
+
${taskTo.x1 - 5},${taskToEndPosition + 5}`;
|
|
68
|
+
return [path, trianglePoints];
|
|
69
|
+
};
|
|
70
|
+
const drownPathAndTriangleRTL = (taskFrom, taskTo, rowHeight, taskHeight, arrowIndent) => {
|
|
71
|
+
const indexCompare = taskFrom.index > taskTo.index ? -1 : 1;
|
|
72
|
+
const taskToEndPosition = taskTo.y + taskHeight / 2;
|
|
73
|
+
const taskFromEndPosition = taskFrom.x1 - arrowIndent * 2;
|
|
74
|
+
const taskFromHorizontalOffsetValue = taskFromEndPosition > taskTo.x2 ? "" : `H ${taskTo.x2 + arrowIndent}`;
|
|
75
|
+
const taskToHorizontalOffsetValue = taskFromEndPosition < taskTo.x2 ? -arrowIndent : taskTo.x2 - taskFrom.x1 + arrowIndent;
|
|
76
|
+
const path = `M ${taskFrom.x1} ${taskFrom.y + taskHeight / 2}
|
|
77
|
+
h ${-arrowIndent}
|
|
78
|
+
v ${indexCompare * rowHeight / 2}
|
|
79
|
+
${taskFromHorizontalOffsetValue}
|
|
80
|
+
V ${taskToEndPosition}
|
|
81
|
+
h ${taskToHorizontalOffsetValue}`;
|
|
82
|
+
const trianglePoints = `${taskTo.x2},${taskToEndPosition}
|
|
83
|
+
${taskTo.x2 + 5},${taskToEndPosition + 5}
|
|
84
|
+
${taskTo.x2 + 5},${taskToEndPosition - 5}`;
|
|
85
|
+
return [path, trianglePoints];
|
|
86
|
+
};
|
|
87
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
88
|
+
0 && (module.exports = {
|
|
89
|
+
Arrow
|
|
90
|
+
});
|
|
@@ -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
|
+
svgWidth: 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,64 @@
|
|
|
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
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var horizontal_scroll_exports = {};
|
|
38
|
+
__export(horizontal_scroll_exports, {
|
|
39
|
+
HorizontalScroll: () => HorizontalScroll
|
|
40
|
+
});
|
|
41
|
+
module.exports = __toCommonJS(horizontal_scroll_exports);
|
|
42
|
+
var import_react = __toESM(require("react"));
|
|
43
|
+
var import_css = require("@emotion/css");
|
|
44
|
+
var import_style = __toESM(require("./style"));
|
|
45
|
+
const HorizontalScroll = (0, import_react.forwardRef)(
|
|
46
|
+
({ svgWidth, rtl, onScroll }, ref) => {
|
|
47
|
+
const { styles } = (0, import_style.default)();
|
|
48
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
dir: "ltr",
|
|
52
|
+
className: (0, import_css.cx)(styles.nbGridOther, styles.scrollWrapper, "gantt-horizontal-scoll"),
|
|
53
|
+
onScroll,
|
|
54
|
+
ref
|
|
55
|
+
},
|
|
56
|
+
/* @__PURE__ */ import_react.default.createElement("div", { style: { width: svgWidth, height: 1 }, className: "horizontalScroll" })
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
HorizontalScroll.displayName = "HorizontalScroll";
|
|
61
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
62
|
+
0 && (module.exports = {
|
|
63
|
+
HorizontalScroll
|
|
64
|
+
});
|
|
@@ -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,125 @@
|
|
|
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
|
+
|
|
10
|
+
var __defProp = Object.defineProperty;
|
|
11
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
12
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
13
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __export = (target, all) => {
|
|
15
|
+
for (var name in all)
|
|
16
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
17
|
+
};
|
|
18
|
+
var __copyProps = (to, from, except, desc) => {
|
|
19
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
20
|
+
for (let key of __getOwnPropNames(from))
|
|
21
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
22
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
23
|
+
}
|
|
24
|
+
return to;
|
|
25
|
+
};
|
|
26
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
27
|
+
var style_exports = {};
|
|
28
|
+
__export(style_exports, {
|
|
29
|
+
default: () => style_default
|
|
30
|
+
});
|
|
31
|
+
module.exports = __toCommonJS(style_exports);
|
|
32
|
+
var import_antd_style = require("antd-style");
|
|
33
|
+
const useStyles = (0, import_antd_style.createStyles)(({ token, css }) => {
|
|
34
|
+
return {
|
|
35
|
+
scrollWrapper: css`
|
|
36
|
+
overflow: auto;
|
|
37
|
+
position: absolute;
|
|
38
|
+
bottom: 0;
|
|
39
|
+
max-width: 100%;
|
|
40
|
+
height: 16px;
|
|
41
|
+
background: ${token.colorSplit};
|
|
42
|
+
scrollbar-color: ${token.colorTextPlaceholder} ${token.colorSplit};
|
|
43
|
+
&::-webkit-scrollbar {
|
|
44
|
+
width: 16px;
|
|
45
|
+
height: 16px;
|
|
46
|
+
}
|
|
47
|
+
&::-webkit-scrollbar-corner {
|
|
48
|
+
background: ${token.colorSplit};
|
|
49
|
+
}
|
|
50
|
+
&::-webkit-scrollbar-track {
|
|
51
|
+
background: ${token.colorSplit};
|
|
52
|
+
}
|
|
53
|
+
&::-webkit-scrollbar-thumb {
|
|
54
|
+
background: ${token.colorTextPlaceholder};
|
|
55
|
+
border-radius: 100px;
|
|
56
|
+
}
|
|
57
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
58
|
+
background: ${token.colorTextHeading};
|
|
59
|
+
}
|
|
60
|
+
`,
|
|
61
|
+
tooltipDefaultContainer: css`
|
|
62
|
+
padding: 12px;
|
|
63
|
+
background-color: ${token.colorBgElevated};
|
|
64
|
+
background-clip: padding-box;
|
|
65
|
+
border-radius: ${token.borderRadius};
|
|
66
|
+
box-shadow: ${token.boxShadow};
|
|
67
|
+
b {
|
|
68
|
+
display: block;
|
|
69
|
+
margin-bottom: ${token.marginXS};
|
|
70
|
+
}
|
|
71
|
+
.tooltipdefaultcontainerparagraph {
|
|
72
|
+
font-size: ${token.fontSizeSM};
|
|
73
|
+
margin-bottom: ${token.marginXS}px;
|
|
74
|
+
color: ${token.colorText};
|
|
75
|
+
}
|
|
76
|
+
`,
|
|
77
|
+
tooltipDetailsContainer: css`
|
|
78
|
+
position: absolute;
|
|
79
|
+
display: flex;
|
|
80
|
+
flex-shrink: 0;
|
|
81
|
+
pointer-events: none;
|
|
82
|
+
-webkit-touch-callout: none;
|
|
83
|
+
-webkit-user-select: none;
|
|
84
|
+
-moz-user-select: none;
|
|
85
|
+
-ms-user-select: none;
|
|
86
|
+
user-select: none;
|
|
87
|
+
`,
|
|
88
|
+
tooltipDetailsContainerHidden: css`
|
|
89
|
+
visibility: hidden;
|
|
90
|
+
position: absolute;
|
|
91
|
+
display: flex;
|
|
92
|
+
pointer-events: none;
|
|
93
|
+
`,
|
|
94
|
+
nbGridOther: css`
|
|
95
|
+
.horizontalScroll {
|
|
96
|
+
height: 1px;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.verticalScroll {
|
|
100
|
+
overflow: hidden auto;
|
|
101
|
+
width: 1rem;
|
|
102
|
+
flex-shrink: 0;
|
|
103
|
+
scrollbar-color: ${token.colorTextPlaceholder} ${token.colorSplit};
|
|
104
|
+
&::-webkit-scrollbar {
|
|
105
|
+
width: 8px;
|
|
106
|
+
height: 8px;
|
|
107
|
+
}
|
|
108
|
+
&::-webkit-scrollbar-corner {
|
|
109
|
+
background: ${token.colorSplit};
|
|
110
|
+
}
|
|
111
|
+
&::-webkit-scrollbar-track {
|
|
112
|
+
background: ${token.colorSplit};
|
|
113
|
+
}
|
|
114
|
+
&::-webkit-scrollbar-thumb {
|
|
115
|
+
background: ${token.colorTextPlaceholder};
|
|
116
|
+
border-radius: 100px;
|
|
117
|
+
}
|
|
118
|
+
&::-webkit-scrollbar-thumb:hover {
|
|
119
|
+
background: ${token.colorTextHeading};
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
`
|
|
123
|
+
};
|
|
124
|
+
});
|
|
125
|
+
var style_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,137 @@
|
|
|
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
|
+
|
|
10
|
+
var __create = Object.create;
|
|
11
|
+
var __defProp = Object.defineProperty;
|
|
12
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
13
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
14
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
15
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
16
|
+
var __export = (target, all) => {
|
|
17
|
+
for (var name in all)
|
|
18
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
19
|
+
};
|
|
20
|
+
var __copyProps = (to, from, except, desc) => {
|
|
21
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
22
|
+
for (let key of __getOwnPropNames(from))
|
|
23
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
24
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
25
|
+
}
|
|
26
|
+
return to;
|
|
27
|
+
};
|
|
28
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
29
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
30
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
31
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
32
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
33
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
34
|
+
mod
|
|
35
|
+
));
|
|
36
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
37
|
+
var tooltip_exports = {};
|
|
38
|
+
__export(tooltip_exports, {
|
|
39
|
+
StandardTooltipContent: () => StandardTooltipContent,
|
|
40
|
+
Tooltip: () => Tooltip
|
|
41
|
+
});
|
|
42
|
+
module.exports = __toCommonJS(tooltip_exports);
|
|
43
|
+
var import_css = require("@emotion/css");
|
|
44
|
+
var import_react = __toESM(require("react"));
|
|
45
|
+
var import_other_helper = require("../../helpers/other-helper");
|
|
46
|
+
var import_style = __toESM(require("./style"));
|
|
47
|
+
const Tooltip = ({
|
|
48
|
+
task,
|
|
49
|
+
rowHeight,
|
|
50
|
+
rtl,
|
|
51
|
+
svgContainerHeight,
|
|
52
|
+
svgContainerWidth,
|
|
53
|
+
scrollX,
|
|
54
|
+
scrollY,
|
|
55
|
+
arrowIndent,
|
|
56
|
+
fontSize,
|
|
57
|
+
fontFamily,
|
|
58
|
+
headerHeight,
|
|
59
|
+
TooltipContent
|
|
60
|
+
}) => {
|
|
61
|
+
const { styles } = (0, import_style.default)();
|
|
62
|
+
const tooltipRef = (0, import_react.useRef)(null);
|
|
63
|
+
const [relatedY, setRelatedY] = (0, import_react.useState)(0);
|
|
64
|
+
const [relatedX, setRelatedX] = (0, import_react.useState)(0);
|
|
65
|
+
(0, import_react.useEffect)(() => {
|
|
66
|
+
if (tooltipRef.current) {
|
|
67
|
+
const tooltipHeight = tooltipRef.current.offsetHeight * 1.1;
|
|
68
|
+
const tooltipWidth = tooltipRef.current.offsetWidth * 1.1;
|
|
69
|
+
let newRelatedY = task.index * rowHeight - scrollY + headerHeight;
|
|
70
|
+
let newRelatedX;
|
|
71
|
+
if (rtl) {
|
|
72
|
+
newRelatedX = task.x1 - arrowIndent * 1.5 - tooltipWidth - scrollX;
|
|
73
|
+
if (newRelatedX < 0) {
|
|
74
|
+
newRelatedX = task.x2 + arrowIndent * 1.5 - scrollX;
|
|
75
|
+
}
|
|
76
|
+
const tooltipLeftmostPoint = tooltipWidth + newRelatedX;
|
|
77
|
+
if (tooltipLeftmostPoint > svgContainerWidth) {
|
|
78
|
+
newRelatedX = svgContainerWidth - tooltipWidth;
|
|
79
|
+
newRelatedY += rowHeight;
|
|
80
|
+
}
|
|
81
|
+
} else {
|
|
82
|
+
newRelatedX = task.x2 + arrowIndent * 1.5 - scrollX;
|
|
83
|
+
const tooltipLeftmostPoint = tooltipWidth + newRelatedX;
|
|
84
|
+
if (tooltipLeftmostPoint > svgContainerWidth) {
|
|
85
|
+
newRelatedX = task.x1 - arrowIndent * 1.5 - scrollX - tooltipWidth;
|
|
86
|
+
}
|
|
87
|
+
if (newRelatedX < 0) {
|
|
88
|
+
newRelatedX = svgContainerWidth - tooltipWidth;
|
|
89
|
+
newRelatedY += rowHeight;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
const tooltipLowerPoint = tooltipHeight + newRelatedY - scrollY;
|
|
93
|
+
if (tooltipLowerPoint > svgContainerHeight - scrollY) {
|
|
94
|
+
newRelatedY = svgContainerHeight - tooltipHeight;
|
|
95
|
+
}
|
|
96
|
+
setRelatedY(newRelatedY);
|
|
97
|
+
setRelatedX(newRelatedX);
|
|
98
|
+
}
|
|
99
|
+
}, [
|
|
100
|
+
tooltipRef,
|
|
101
|
+
task,
|
|
102
|
+
arrowIndent,
|
|
103
|
+
scrollX,
|
|
104
|
+
scrollY,
|
|
105
|
+
headerHeight,
|
|
106
|
+
rowHeight,
|
|
107
|
+
svgContainerHeight,
|
|
108
|
+
svgContainerWidth,
|
|
109
|
+
rtl
|
|
110
|
+
]);
|
|
111
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
112
|
+
"div",
|
|
113
|
+
{
|
|
114
|
+
ref: tooltipRef,
|
|
115
|
+
className: (0, import_css.cx)(
|
|
116
|
+
relatedX ? styles.tooltipDetailsContainer : styles.tooltipDetailsContainerHidden,
|
|
117
|
+
styles.nbGridOther
|
|
118
|
+
),
|
|
119
|
+
style: { left: relatedX, top: relatedY }
|
|
120
|
+
},
|
|
121
|
+
/* @__PURE__ */ import_react.default.createElement(TooltipContent, { task, fontSize, fontFamily })
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
const StandardTooltipContent = ({ task, fontSize, fontFamily }) => {
|
|
125
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
126
|
+
const { styles } = (0, import_style.default)();
|
|
127
|
+
const style = {
|
|
128
|
+
fontSize,
|
|
129
|
+
fontFamily
|
|
130
|
+
};
|
|
131
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_css.cx)(styles.nbGridOther, styles.tooltipDefaultContainer), "aria-label": "nb-gantt-tooltip", style }, /* @__PURE__ */ import_react.default.createElement("b", { style: { fontSize } }, task.name, ": ", (0, import_other_helper.getYmd)(task.start), " ~ ", (0, import_other_helper.getYmd)(task.end)), ((_b = (_a = task.end) == null ? void 0 : _a.getTime) == null ? void 0 : _b.call(_a)) - ((_d = (_c = task.start) == null ? void 0 : _c.getTime) == null ? void 0 : _d.call(_c)) !== 0 && /* @__PURE__ */ import_react.default.createElement("p", { className: "tooltipDefaultContainerParagraph" }, `Duration: ${Math.round((((_f = (_e = task.end) == null ? void 0 : _e.getTime) == null ? void 0 : _f.call(_e)) - ((_h = (_g = task.start) == null ? void 0 : _g.getTime) == null ? void 0 : _h.call(_g))) / (1e3 * 60 * 60 * 24) * 10) / 10 || ""} day(s)`), /* @__PURE__ */ import_react.default.createElement("p", { className: "tooltipDefaultContainerParagraph" }, !!task.progress && `Progress: ${task.progress}%`));
|
|
132
|
+
};
|
|
133
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
134
|
+
0 && (module.exports = {
|
|
135
|
+
StandardTooltipContent,
|
|
136
|
+
Tooltip
|
|
137
|
+
});
|
|
@@ -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
|
+
}>;
|