@nocobase/plugin-gantt 2.1.0-beta.38 → 2.1.0-beta.41

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.
Files changed (118) hide show
  1. package/dist/client/index.js +1 -1
  2. package/dist/client-v2/793.629d4cd39664b681.js +10 -0
  3. package/dist/client-v2/index.js +1 -1
  4. package/dist/client-v2/locale.d.ts +6 -0
  5. package/dist/client-v2/models/GanttBlockModel.d.ts +1 -1
  6. package/dist/client-v2/models/components/GanttBlock.helpers.d.ts +8 -0
  7. package/dist/client-v2/models/components/GanttBlock.styles.d.ts +2 -1
  8. package/dist/client-v2/models/components/GanttBlock.tree.d.ts +9 -6
  9. package/dist/{shared → client-v2/shared}/components/grid/style.d.ts +4 -3
  10. package/dist/{shared → client-v2/shared}/components/other/horizontal-scroll.d.ts +1 -1
  11. package/dist/externalVersion.js +6 -6
  12. package/dist/locale/en-US.json +4 -1
  13. package/dist/locale/zh-CN.json +4 -1
  14. package/package.json +2 -2
  15. package/dist/client-v2/143.1a8cf1cd5ce17b64.js +0 -10
  16. package/dist/node_modules/@ctrl/tinycolor/LICENSE +0 -7
  17. package/dist/node_modules/@ctrl/tinycolor/dist/bundles/tinycolor.umd.min.js +0 -2
  18. package/dist/node_modules/@ctrl/tinycolor/dist/conversion.d.ts +0 -61
  19. package/dist/node_modules/@ctrl/tinycolor/dist/conversion.js +0 -250
  20. package/dist/node_modules/@ctrl/tinycolor/dist/css-color-names.d.ts +0 -4
  21. package/dist/node_modules/@ctrl/tinycolor/dist/css-color-names.js +0 -157
  22. package/dist/node_modules/@ctrl/tinycolor/dist/format-input.d.ts +0 -37
  23. package/dist/node_modules/@ctrl/tinycolor/dist/format-input.js +0 -189
  24. package/dist/node_modules/@ctrl/tinycolor/dist/from-ratio.d.ts +0 -14
  25. package/dist/node_modules/@ctrl/tinycolor/dist/from-ratio.js +0 -30
  26. package/dist/node_modules/@ctrl/tinycolor/dist/index.d.ts +0 -207
  27. package/dist/node_modules/@ctrl/tinycolor/dist/index.js +0 -512
  28. package/dist/node_modules/@ctrl/tinycolor/dist/interfaces.d.ts +0 -46
  29. package/dist/node_modules/@ctrl/tinycolor/dist/interfaces.js +0 -2
  30. package/dist/node_modules/@ctrl/tinycolor/dist/module/conversion.js +0 -235
  31. package/dist/node_modules/@ctrl/tinycolor/dist/module/css-color-names.js +0 -154
  32. package/dist/node_modules/@ctrl/tinycolor/dist/module/format-input.js +0 -183
  33. package/dist/node_modules/@ctrl/tinycolor/dist/module/from-ratio.js +0 -25
  34. package/dist/node_modules/@ctrl/tinycolor/dist/module/index.js +0 -508
  35. package/dist/node_modules/@ctrl/tinycolor/dist/module/interfaces.js +0 -1
  36. package/dist/node_modules/@ctrl/tinycolor/dist/module/public_api.js +0 -12
  37. package/dist/node_modules/@ctrl/tinycolor/dist/module/random.js +0 -278
  38. package/dist/node_modules/@ctrl/tinycolor/dist/module/readability.js +0 -80
  39. package/dist/node_modules/@ctrl/tinycolor/dist/module/to-ms-filter.js +0 -16
  40. package/dist/node_modules/@ctrl/tinycolor/dist/module/umd_api.js +0 -20
  41. package/dist/node_modules/@ctrl/tinycolor/dist/module/util.js +0 -82
  42. package/dist/node_modules/@ctrl/tinycolor/dist/public_api.d.ts +0 -11
  43. package/dist/node_modules/@ctrl/tinycolor/dist/public_api.js +0 -1
  44. package/dist/node_modules/@ctrl/tinycolor/dist/random.d.ts +0 -24
  45. package/dist/node_modules/@ctrl/tinycolor/dist/random.js +0 -282
  46. package/dist/node_modules/@ctrl/tinycolor/dist/readability.d.ts +0 -46
  47. package/dist/node_modules/@ctrl/tinycolor/dist/readability.js +0 -86
  48. package/dist/node_modules/@ctrl/tinycolor/dist/to-ms-filter.d.ts +0 -5
  49. package/dist/node_modules/@ctrl/tinycolor/dist/to-ms-filter.js +0 -20
  50. package/dist/node_modules/@ctrl/tinycolor/dist/umd_api.d.ts +0 -23
  51. package/dist/node_modules/@ctrl/tinycolor/dist/umd_api.js +0 -22
  52. package/dist/node_modules/@ctrl/tinycolor/dist/util.d.ts +0 -36
  53. package/dist/node_modules/@ctrl/tinycolor/dist/util.js +0 -92
  54. package/dist/node_modules/@ctrl/tinycolor/package.json +0 -1
  55. package/dist/shared/components/calendar/calendar.js +0 -417
  56. package/dist/shared/components/calendar/style.js +0 -79
  57. package/dist/shared/components/calendar/top-part-of-calendar.js +0 -57
  58. package/dist/shared/components/gantt/style.js +0 -74
  59. package/dist/shared/components/gantt/task-gantt-content.js +0 -337
  60. package/dist/shared/components/gantt/task-gantt.js +0 -128
  61. package/dist/shared/components/grid/grid-body.js +0 -114
  62. package/dist/shared/components/grid/grid.js +0 -50
  63. package/dist/shared/components/grid/style.js +0 -54
  64. package/dist/shared/components/other/arrow.js +0 -90
  65. package/dist/shared/components/other/horizontal-scroll.js +0 -64
  66. package/dist/shared/components/other/style.js +0 -125
  67. package/dist/shared/components/other/tooltip.js +0 -137
  68. package/dist/shared/components/other/vertical-scroll.js +0 -74
  69. package/dist/shared/components/task-item/bar/bar-date-handle.js +0 -62
  70. package/dist/shared/components/task-item/bar/bar-display.js +0 -98
  71. package/dist/shared/components/task-item/bar/bar-progress-handle.js +0 -49
  72. package/dist/shared/components/task-item/bar/bar-small.js +0 -85
  73. package/dist/shared/components/task-item/bar/bar.js +0 -113
  74. package/dist/shared/components/task-item/bar/style.js +0 -58
  75. package/dist/shared/components/task-item/milestone/milestone.js +0 -72
  76. package/dist/shared/components/task-item/milestone/style.js +0 -45
  77. package/dist/shared/components/task-item/project/project.js +0 -77
  78. package/dist/shared/components/task-item/project/style.js +0 -51
  79. package/dist/shared/components/task-item/style.js +0 -74
  80. package/dist/shared/components/task-item/task-item.js +0 -132
  81. package/dist/shared/helpers/bar-helper.js +0 -415
  82. package/dist/shared/helpers/date-helper.js +0 -231
  83. package/dist/shared/helpers/other-helper.js +0 -97
  84. package/dist/shared/types/bar-task.js +0 -24
  85. package/dist/shared/types/date-setup.js +0 -24
  86. package/dist/shared/types/gantt-task-actions.js +0 -24
  87. package/dist/shared/types/public-types.js +0 -46
  88. /package/dist/{shared → client-v2/shared}/components/calendar/calendar.d.ts +0 -0
  89. /package/dist/{shared → client-v2/shared}/components/calendar/style.d.ts +0 -0
  90. /package/dist/{shared → client-v2/shared}/components/calendar/top-part-of-calendar.d.ts +0 -0
  91. /package/dist/{shared → client-v2/shared}/components/gantt/style.d.ts +0 -0
  92. /package/dist/{shared → client-v2/shared}/components/gantt/task-gantt-content.d.ts +0 -0
  93. /package/dist/{shared → client-v2/shared}/components/gantt/task-gantt.d.ts +0 -0
  94. /package/dist/{shared → client-v2/shared}/components/grid/grid-body.d.ts +0 -0
  95. /package/dist/{shared → client-v2/shared}/components/grid/grid.d.ts +0 -0
  96. /package/dist/{shared → client-v2/shared}/components/other/arrow.d.ts +0 -0
  97. /package/dist/{shared → client-v2/shared}/components/other/style.d.ts +0 -0
  98. /package/dist/{shared → client-v2/shared}/components/other/tooltip.d.ts +0 -0
  99. /package/dist/{shared → client-v2/shared}/components/other/vertical-scroll.d.ts +0 -0
  100. /package/dist/{shared → client-v2/shared}/components/task-item/bar/bar-date-handle.d.ts +0 -0
  101. /package/dist/{shared → client-v2/shared}/components/task-item/bar/bar-display.d.ts +0 -0
  102. /package/dist/{shared → client-v2/shared}/components/task-item/bar/bar-progress-handle.d.ts +0 -0
  103. /package/dist/{shared → client-v2/shared}/components/task-item/bar/bar-small.d.ts +0 -0
  104. /package/dist/{shared → client-v2/shared}/components/task-item/bar/bar.d.ts +0 -0
  105. /package/dist/{shared → client-v2/shared}/components/task-item/bar/style.d.ts +0 -0
  106. /package/dist/{shared → client-v2/shared}/components/task-item/milestone/milestone.d.ts +0 -0
  107. /package/dist/{shared → client-v2/shared}/components/task-item/milestone/style.d.ts +0 -0
  108. /package/dist/{shared → client-v2/shared}/components/task-item/project/project.d.ts +0 -0
  109. /package/dist/{shared → client-v2/shared}/components/task-item/project/style.d.ts +0 -0
  110. /package/dist/{shared → client-v2/shared}/components/task-item/style.d.ts +0 -0
  111. /package/dist/{shared → client-v2/shared}/components/task-item/task-item.d.ts +0 -0
  112. /package/dist/{shared → client-v2/shared}/helpers/bar-helper.d.ts +0 -0
  113. /package/dist/{shared → client-v2/shared}/helpers/date-helper.d.ts +0 -0
  114. /package/dist/{shared → client-v2/shared}/helpers/other-helper.d.ts +0 -0
  115. /package/dist/{shared → client-v2/shared}/types/bar-task.d.ts +0 -0
  116. /package/dist/{shared → client-v2/shared}/types/date-setup.d.ts +0 -0
  117. /package/dist/{shared → client-v2/shared}/types/gantt-task-actions.d.ts +0 -0
  118. /package/dist/{shared → client-v2/shared}/types/public-types.d.ts +0 -0
@@ -1,90 +0,0 @@
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
- });
@@ -1,64 +0,0 @@
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
- });
@@ -1,125 +0,0 @@
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;
@@ -1,137 +0,0 @@
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
- });
@@ -1,74 +0,0 @@
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 vertical_scroll_exports = {};
38
- __export(vertical_scroll_exports, {
39
- VerticalScroll: () => VerticalScroll
40
- });
41
- module.exports = __toCommonJS(vertical_scroll_exports);
42
- var import_css = require("@emotion/css");
43
- var import_react = __toESM(require("react"));
44
- var import_style = __toESM(require("./style"));
45
- const VerticalScroll = ({ scroll, ganttHeight, ganttFullHeight, headerHeight, rtl, onScroll }) => {
46
- const { styles } = (0, import_style.default)();
47
- const scrollRef = (0, import_react.useRef)(null);
48
- (0, import_react.useEffect)(() => {
49
- if (scrollRef.current) {
50
- scrollRef.current.scrollTop = scroll;
51
- }
52
- }, [scroll]);
53
- return /* @__PURE__ */ import_react.default.createElement(
54
- "div",
55
- {
56
- style: {
57
- position: "absolute",
58
- top: headerHeight,
59
- bottom: 0,
60
- right: rtl ? void 0 : 0,
61
- left: rtl ? 0 : void 0,
62
- maxHeight: ganttHeight
63
- },
64
- className: (0, import_css.cx)(styles.nbGridOther, "verticalScroll"),
65
- onScroll,
66
- ref: scrollRef
67
- },
68
- /* @__PURE__ */ import_react.default.createElement("div", { style: { height: ganttFullHeight, width: 1 } })
69
- );
70
- };
71
- // Annotate the CommonJS export names for ESM import in node:
72
- 0 && (module.exports = {
73
- VerticalScroll
74
- });
@@ -1,62 +0,0 @@
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 bar_date_handle_exports = {};
38
- __export(bar_date_handle_exports, {
39
- BarDateHandle: () => BarDateHandle
40
- });
41
- module.exports = __toCommonJS(bar_date_handle_exports);
42
- var import_react = __toESM(require("react"));
43
- const BarDateHandle = ({ x, y, width, height, barCornerRadius, onMouseDown }) => {
44
- return /* @__PURE__ */ import_react.default.createElement(
45
- "rect",
46
- {
47
- x,
48
- y,
49
- width,
50
- height,
51
- className: "barHandle",
52
- role: "button",
53
- ry: barCornerRadius,
54
- rx: barCornerRadius,
55
- onMouseDown
56
- }
57
- );
58
- };
59
- // Annotate the CommonJS export names for ESM import in node:
60
- 0 && (module.exports = {
61
- BarDateHandle
62
- });
@@ -1,98 +0,0 @@
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 bar_display_exports = {};
38
- __export(bar_display_exports, {
39
- BarDisplay: () => BarDisplay
40
- });
41
- module.exports = __toCommonJS(bar_display_exports);
42
- var import_css = require("@emotion/css");
43
- var import_react = __toESM(require("react"));
44
- var import_style = require("./style");
45
- const BarDisplay = ({
46
- x,
47
- y,
48
- color,
49
- width,
50
- height,
51
- isSelected,
52
- progressX,
53
- progressWidth,
54
- barCornerRadius,
55
- styles,
56
- onMouseDown
57
- }) => {
58
- const getProcessColor = () => {
59
- if (color) {
60
- return color;
61
- }
62
- return isSelected ? styles.progressSelectedColor : styles.progressColor;
63
- };
64
- const getBarColor = () => {
65
- if (color) {
66
- return color;
67
- }
68
- return isSelected ? styles.backgroundSelectedColor : styles.backgroundColor;
69
- };
70
- return /* @__PURE__ */ import_react.default.createElement("g", { onMouseDown }, /* @__PURE__ */ import_react.default.createElement(
71
- "rect",
72
- {
73
- x,
74
- width,
75
- y,
76
- height,
77
- ry: barCornerRadius,
78
- rx: barCornerRadius,
79
- fill: getBarColor(),
80
- className: (0, import_css.cx)(import_style.barBackground)
81
- }
82
- ), /* @__PURE__ */ import_react.default.createElement(
83
- "rect",
84
- {
85
- x: progressX,
86
- width: progressWidth,
87
- y,
88
- height,
89
- ry: barCornerRadius,
90
- rx: barCornerRadius,
91
- fill: getProcessColor()
92
- }
93
- ));
94
- };
95
- // Annotate the CommonJS export names for ESM import in node:
96
- 0 && (module.exports = {
97
- BarDisplay
98
- });