@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.
Files changed (146) hide show
  1. package/client-v2.d.ts +2 -0
  2. package/client-v2.js +3 -0
  3. package/dist/client/index.js +1 -1
  4. package/dist/client-v2/143.1a8cf1cd5ce17b64.js +10 -0
  5. package/dist/client-v2/416.b7bb09162520e448.js +10 -0
  6. package/dist/client-v2/617.de3dc437887f3f07.js +10 -0
  7. package/dist/client-v2/872.e640aca77c79d895.js +10 -0
  8. package/dist/client-v2/index.d.ts +10 -0
  9. package/dist/client-v2/index.js +10 -0
  10. package/dist/client-v2/locale.d.ts +78 -0
  11. package/dist/client-v2/models/GanttBlockModel.d.ts +98 -0
  12. package/dist/client-v2/models/GanttBlockModel.helpers.d.ts +31 -0
  13. package/dist/client-v2/models/GanttBlockModel.settings.d.ts +9 -0
  14. package/dist/client-v2/models/actions/GanttActionModels.d.ts +33 -0
  15. package/dist/client-v2/models/actions/GanttPopupModels.d.ts +26 -0
  16. package/dist/client-v2/models/components/GanttBlock.d.ts +13 -0
  17. package/dist/client-v2/models/components/GanttBlock.helpers.d.ts +22 -0
  18. package/dist/client-v2/models/components/GanttBlock.styles.d.ts +22 -0
  19. package/dist/client-v2/models/components/GanttBlock.tree.d.ts +46 -0
  20. package/dist/client-v2/models/components/getLabelFormatValue.d.ts +11 -0
  21. package/dist/client-v2/models/index.d.ts +11 -0
  22. package/dist/client-v2/plugin.d.ts +13 -0
  23. package/dist/externalVersion.js +7 -6
  24. package/dist/locale/de-DE.json +2 -0
  25. package/dist/locale/en-US.json +25 -1
  26. package/dist/locale/es-ES.json +2 -0
  27. package/dist/locale/fr-FR.json +2 -0
  28. package/dist/locale/hu-HU.json +2 -0
  29. package/dist/locale/id-ID.json +2 -0
  30. package/dist/locale/it-IT.json +2 -0
  31. package/dist/locale/ja-JP.json +2 -0
  32. package/dist/locale/ko-KR.json +2 -0
  33. package/dist/locale/nl-NL.json +2 -0
  34. package/dist/locale/pt-BR.json +2 -0
  35. package/dist/locale/ru-RU.json +2 -0
  36. package/dist/locale/tr-TR.json +2 -0
  37. package/dist/locale/uk-UA.json +2 -0
  38. package/dist/locale/vi-VN.json +2 -0
  39. package/dist/locale/zh-CN.json +25 -1
  40. package/dist/locale/zh-TW.json +4 -0
  41. package/dist/node_modules/@ctrl/tinycolor/LICENSE +7 -0
  42. package/dist/node_modules/@ctrl/tinycolor/dist/bundles/tinycolor.umd.min.js +2 -0
  43. package/dist/node_modules/@ctrl/tinycolor/dist/conversion.d.ts +61 -0
  44. package/dist/node_modules/@ctrl/tinycolor/dist/conversion.js +250 -0
  45. package/dist/node_modules/@ctrl/tinycolor/dist/css-color-names.d.ts +4 -0
  46. package/dist/node_modules/@ctrl/tinycolor/dist/css-color-names.js +157 -0
  47. package/dist/node_modules/@ctrl/tinycolor/dist/format-input.d.ts +37 -0
  48. package/dist/node_modules/@ctrl/tinycolor/dist/format-input.js +189 -0
  49. package/dist/node_modules/@ctrl/tinycolor/dist/from-ratio.d.ts +14 -0
  50. package/dist/node_modules/@ctrl/tinycolor/dist/from-ratio.js +30 -0
  51. package/dist/node_modules/@ctrl/tinycolor/dist/index.d.ts +207 -0
  52. package/dist/node_modules/@ctrl/tinycolor/dist/index.js +512 -0
  53. package/dist/node_modules/@ctrl/tinycolor/dist/interfaces.d.ts +46 -0
  54. package/dist/node_modules/@ctrl/tinycolor/dist/interfaces.js +2 -0
  55. package/dist/node_modules/@ctrl/tinycolor/dist/module/conversion.js +235 -0
  56. package/dist/node_modules/@ctrl/tinycolor/dist/module/css-color-names.js +154 -0
  57. package/dist/node_modules/@ctrl/tinycolor/dist/module/format-input.js +183 -0
  58. package/dist/node_modules/@ctrl/tinycolor/dist/module/from-ratio.js +25 -0
  59. package/dist/node_modules/@ctrl/tinycolor/dist/module/index.js +508 -0
  60. package/dist/node_modules/@ctrl/tinycolor/dist/module/interfaces.js +1 -0
  61. package/dist/node_modules/@ctrl/tinycolor/dist/module/public_api.js +12 -0
  62. package/dist/node_modules/@ctrl/tinycolor/dist/module/random.js +278 -0
  63. package/dist/node_modules/@ctrl/tinycolor/dist/module/readability.js +80 -0
  64. package/dist/node_modules/@ctrl/tinycolor/dist/module/to-ms-filter.js +16 -0
  65. package/dist/node_modules/@ctrl/tinycolor/dist/module/umd_api.js +20 -0
  66. package/dist/node_modules/@ctrl/tinycolor/dist/module/util.js +82 -0
  67. package/dist/node_modules/@ctrl/tinycolor/dist/public_api.d.ts +11 -0
  68. package/dist/node_modules/@ctrl/tinycolor/dist/public_api.js +1 -0
  69. package/dist/node_modules/@ctrl/tinycolor/dist/random.d.ts +24 -0
  70. package/dist/node_modules/@ctrl/tinycolor/dist/random.js +282 -0
  71. package/dist/node_modules/@ctrl/tinycolor/dist/readability.d.ts +46 -0
  72. package/dist/node_modules/@ctrl/tinycolor/dist/readability.js +86 -0
  73. package/dist/node_modules/@ctrl/tinycolor/dist/to-ms-filter.d.ts +5 -0
  74. package/dist/node_modules/@ctrl/tinycolor/dist/to-ms-filter.js +20 -0
  75. package/dist/node_modules/@ctrl/tinycolor/dist/umd_api.d.ts +23 -0
  76. package/dist/node_modules/@ctrl/tinycolor/dist/umd_api.js +22 -0
  77. package/dist/node_modules/@ctrl/tinycolor/dist/util.d.ts +36 -0
  78. package/dist/node_modules/@ctrl/tinycolor/dist/util.js +92 -0
  79. package/dist/node_modules/@ctrl/tinycolor/package.json +1 -0
  80. package/dist/shared/components/calendar/calendar.d.ts +22 -0
  81. package/dist/shared/components/calendar/calendar.js +417 -0
  82. package/dist/shared/components/calendar/style.d.ts +14 -0
  83. package/dist/shared/components/calendar/style.js +79 -0
  84. package/dist/shared/components/calendar/top-part-of-calendar.d.ts +19 -0
  85. package/dist/shared/components/calendar/top-part-of-calendar.js +57 -0
  86. package/dist/shared/components/gantt/style.d.ts +14 -0
  87. package/dist/shared/components/gantt/style.js +74 -0
  88. package/dist/shared/components/gantt/task-gantt-content.d.ts +35 -0
  89. package/dist/shared/components/gantt/task-gantt-content.js +337 -0
  90. package/dist/shared/components/gantt/task-gantt.d.ts +24 -0
  91. package/dist/shared/components/gantt/task-gantt.js +128 -0
  92. package/dist/shared/components/grid/grid-body.d.ts +21 -0
  93. package/dist/shared/components/grid/grid-body.js +114 -0
  94. package/dist/shared/components/grid/grid.d.ts +12 -0
  95. package/dist/shared/components/grid/grid.js +50 -0
  96. package/dist/shared/components/grid/style.d.ts +14 -0
  97. package/dist/shared/components/grid/style.js +54 -0
  98. package/dist/shared/components/other/arrow.d.ts +20 -0
  99. package/dist/shared/components/other/arrow.js +90 -0
  100. package/dist/shared/components/other/horizontal-scroll.d.ts +16 -0
  101. package/dist/shared/components/other/horizontal-scroll.js +64 -0
  102. package/dist/shared/components/other/style.d.ts +16 -0
  103. package/dist/shared/components/other/style.js +125 -0
  104. package/dist/shared/components/other/tooltip.d.ts +36 -0
  105. package/dist/shared/components/other/tooltip.js +137 -0
  106. package/dist/shared/components/other/vertical-scroll.d.ts +17 -0
  107. package/dist/shared/components/other/vertical-scroll.js +74 -0
  108. package/dist/shared/components/task-item/bar/bar-date-handle.d.ts +19 -0
  109. package/dist/shared/components/task-item/bar/bar-date-handle.js +62 -0
  110. package/dist/shared/components/task-item/bar/bar-display.d.ts +29 -0
  111. package/dist/shared/components/task-item/bar/bar-display.js +98 -0
  112. package/dist/shared/components/task-item/bar/bar-progress-handle.d.ts +15 -0
  113. package/dist/shared/components/task-item/bar/bar-progress-handle.js +49 -0
  114. package/dist/shared/components/task-item/bar/bar-small.d.ts +11 -0
  115. package/dist/shared/components/task-item/bar/bar-small.js +85 -0
  116. package/dist/shared/components/task-item/bar/bar.d.ts +11 -0
  117. package/dist/shared/components/task-item/bar/bar.js +113 -0
  118. package/dist/shared/components/task-item/bar/style.d.ts +10 -0
  119. package/dist/shared/components/task-item/bar/style.js +58 -0
  120. package/dist/shared/components/task-item/milestone/milestone.d.ts +11 -0
  121. package/dist/shared/components/task-item/milestone/milestone.js +72 -0
  122. package/dist/shared/components/task-item/milestone/style.d.ts +10 -0
  123. package/dist/shared/components/task-item/milestone/style.js +45 -0
  124. package/dist/shared/components/task-item/project/project.d.ts +11 -0
  125. package/dist/shared/components/task-item/project/project.js +77 -0
  126. package/dist/shared/components/task-item/project/style.d.ts +11 -0
  127. package/dist/shared/components/task-item/project/style.js +51 -0
  128. package/dist/shared/components/task-item/style.d.ts +12 -0
  129. package/dist/shared/components/task-item/style.js +74 -0
  130. package/dist/shared/components/task-item/task-item.d.ts +23 -0
  131. package/dist/shared/components/task-item/task-item.js +132 -0
  132. package/dist/shared/helpers/bar-helper.d.ts +22 -0
  133. package/dist/shared/helpers/bar-helper.js +415 -0
  134. package/dist/shared/helpers/date-helper.d.ts +27 -0
  135. package/dist/shared/helpers/date-helper.js +231 -0
  136. package/dist/shared/helpers/other-helper.d.ts +17 -0
  137. package/dist/shared/helpers/other-helper.js +97 -0
  138. package/dist/shared/types/bar-task.d.ts +30 -0
  139. package/dist/shared/types/bar-task.js +24 -0
  140. package/dist/shared/types/date-setup.d.ts +13 -0
  141. package/dist/shared/types/date-setup.js +24 -0
  142. package/dist/shared/types/gantt-task-actions.d.ts +16 -0
  143. package/dist/shared/types/gantt-task-actions.js +24 -0
  144. package/dist/shared/types/public-types.d.ts +145 -0
  145. package/dist/shared/types/public-types.js +46 -0
  146. package/package.json +2 -2
@@ -0,0 +1,74 @@
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
+ });
@@ -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 BarDateHandleProps = {
11
+ x: number;
12
+ y: number;
13
+ width: number;
14
+ height: number;
15
+ barCornerRadius: number;
16
+ onMouseDown: (event: React.MouseEvent<SVGRectElement, MouseEvent>) => void;
17
+ };
18
+ export declare const BarDateHandle: React.FC<BarDateHandleProps>;
19
+ export {};
@@ -0,0 +1,62 @@
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
+ });
@@ -0,0 +1,29 @@
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 BarDisplayProps = {
11
+ x: number;
12
+ y: number;
13
+ color?: string;
14
+ width: number;
15
+ height: number;
16
+ isSelected: boolean;
17
+ progressX: number;
18
+ progressWidth: number;
19
+ barCornerRadius: number;
20
+ styles: {
21
+ backgroundColor: string;
22
+ backgroundSelectedColor: string;
23
+ progressColor: string;
24
+ progressSelectedColor: string;
25
+ };
26
+ onMouseDown: (event: React.MouseEvent<SVGPolygonElement, MouseEvent>) => void;
27
+ };
28
+ export declare const BarDisplay: React.FC<BarDisplayProps>;
29
+ export {};
@@ -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
+
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
+ });
@@ -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
+ import React from 'react';
10
+ type BarProgressHandleProps = {
11
+ progressPoint: string;
12
+ onMouseDown: (event: React.MouseEvent<SVGPolygonElement, MouseEvent>) => void;
13
+ };
14
+ export declare const BarProgressHandle: React.FC<BarProgressHandleProps>;
15
+ export {};
@@ -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
+
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_progress_handle_exports = {};
38
+ __export(bar_progress_handle_exports, {
39
+ BarProgressHandle: () => BarProgressHandle
40
+ });
41
+ module.exports = __toCommonJS(bar_progress_handle_exports);
42
+ var import_react = __toESM(require("react"));
43
+ const BarProgressHandle = ({ progressPoint, onMouseDown }) => {
44
+ return /* @__PURE__ */ import_react.default.createElement("polygon", { className: "barHandle barProgressHandle", points: progressPoint, onMouseDown });
45
+ };
46
+ // Annotate the CommonJS export names for ESM import in node:
47
+ 0 && (module.exports = {
48
+ BarProgressHandle
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
+ import React from 'react';
10
+ import { TaskItemProps } from '../task-item';
11
+ export declare const BarSmall: React.FC<TaskItemProps>;
@@ -0,0 +1,85 @@
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_small_exports = {};
38
+ __export(bar_small_exports, {
39
+ BarSmall: () => BarSmall
40
+ });
41
+ module.exports = __toCommonJS(bar_small_exports);
42
+ var import_css = require("@emotion/css");
43
+ var import_react = __toESM(require("react"));
44
+ var import_bar_helper = require("../../../helpers/bar-helper");
45
+ var import_bar_display = require("./bar-display");
46
+ var import_bar_progress_handle = require("./bar-progress-handle");
47
+ var import_style = require("./style");
48
+ const BarSmall = ({
49
+ task,
50
+ isProgressChangeable,
51
+ isDateChangeable,
52
+ onEventStart,
53
+ isSelected
54
+ }) => {
55
+ const progressPoint = (0, import_bar_helper.getProgressPoint)(task.progressWidth + task.x1 + 10, task.y, task.height);
56
+ return /* @__PURE__ */ import_react.default.createElement("g", { className: (0, import_css.cx)(import_style.barWrapper), tabIndex: 0 }, /* @__PURE__ */ import_react.default.createElement(
57
+ import_bar_display.BarDisplay,
58
+ {
59
+ x: task.x1,
60
+ y: task.y,
61
+ width: task.x2 - task.x1,
62
+ height: task.height,
63
+ progressX: task.progressX,
64
+ progressWidth: task.progressWidth,
65
+ barCornerRadius: task.barCornerRadius,
66
+ styles: task.styles,
67
+ isSelected,
68
+ onMouseDown: (e) => {
69
+ isDateChangeable && onEventStart("move", task, e);
70
+ }
71
+ }
72
+ ), /* @__PURE__ */ import_react.default.createElement("g", { className: "handleGroup" }, isProgressChangeable && /* @__PURE__ */ import_react.default.createElement(
73
+ import_bar_progress_handle.BarProgressHandle,
74
+ {
75
+ progressPoint,
76
+ onMouseDown: (e) => {
77
+ onEventStart("progress", task, e);
78
+ }
79
+ }
80
+ )));
81
+ };
82
+ // Annotate the CommonJS export names for ESM import in node:
83
+ 0 && (module.exports = {
84
+ BarSmall
85
+ });
@@ -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
+ import React from 'react';
10
+ import { TaskItemProps } from '../task-item';
11
+ export declare const Bar: React.FC<TaskItemProps>;
@@ -0,0 +1,113 @@
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_exports = {};
38
+ __export(bar_exports, {
39
+ Bar: () => Bar
40
+ });
41
+ module.exports = __toCommonJS(bar_exports);
42
+ var import_css = require("@emotion/css");
43
+ var import_react = __toESM(require("react"));
44
+ var import_bar_helper = require("../../../helpers/bar-helper");
45
+ var import_bar_date_handle = require("./bar-date-handle");
46
+ var import_bar_display = require("./bar-display");
47
+ var import_bar_progress_handle = require("./bar-progress-handle");
48
+ var import_style = require("./style");
49
+ const Bar = ({
50
+ task,
51
+ isProgressChangeable,
52
+ isDateChangeable,
53
+ rtl,
54
+ onEventStart,
55
+ isSelected
56
+ }) => {
57
+ const progressPoint = (0, import_bar_helper.getProgressPoint)(+!rtl * task.progressWidth + task.progressX, task.y, task.height);
58
+ const handleHeight = task.height - 2;
59
+ return /* @__PURE__ */ import_react.default.createElement("g", { className: (0, import_css.cx)(import_style.barWrapper), "aria-label": "task-bar", tabIndex: 0 }, /* @__PURE__ */ import_react.default.createElement(
60
+ import_bar_display.BarDisplay,
61
+ {
62
+ x: task.x1,
63
+ y: task.y,
64
+ color: task.color,
65
+ width: task.x2 - task.x1,
66
+ height: task.height,
67
+ progressX: task.progressX,
68
+ progressWidth: task.progressWidth,
69
+ barCornerRadius: task.barCornerRadius,
70
+ styles: task.styles,
71
+ isSelected,
72
+ onMouseDown: (e) => {
73
+ isDateChangeable && onEventStart("move", task, e);
74
+ }
75
+ }
76
+ ), /* @__PURE__ */ import_react.default.createElement("g", { className: "handleGroup" }, isDateChangeable && /* @__PURE__ */ import_react.default.createElement("g", null, /* @__PURE__ */ import_react.default.createElement(
77
+ import_bar_date_handle.BarDateHandle,
78
+ {
79
+ x: task.x1 + 1,
80
+ y: task.y + 1,
81
+ width: task.handleWidth,
82
+ height: handleHeight,
83
+ barCornerRadius: task.barCornerRadius,
84
+ onMouseDown: (e) => {
85
+ onEventStart("start", task, e);
86
+ }
87
+ }
88
+ ), /* @__PURE__ */ import_react.default.createElement(
89
+ import_bar_date_handle.BarDateHandle,
90
+ {
91
+ x: task.x2 - task.handleWidth - 1,
92
+ y: task.y + 1,
93
+ width: task.handleWidth,
94
+ height: handleHeight,
95
+ barCornerRadius: task.barCornerRadius,
96
+ onMouseDown: (e) => {
97
+ onEventStart("end", task, e);
98
+ }
99
+ }
100
+ )), isProgressChangeable && /* @__PURE__ */ import_react.default.createElement(
101
+ import_bar_progress_handle.BarProgressHandle,
102
+ {
103
+ progressPoint,
104
+ onMouseDown: (e) => {
105
+ onEventStart("progress", task, e);
106
+ }
107
+ }
108
+ )));
109
+ };
110
+ // Annotate the CommonJS export names for ESM import in node:
111
+ 0 && (module.exports = {
112
+ Bar
113
+ });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ export declare const barWrapper: string;
10
+ export declare const barBackground: string;
@@ -0,0 +1,58 @@
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
+ barBackground: () => barBackground,
30
+ barWrapper: () => barWrapper
31
+ });
32
+ module.exports = __toCommonJS(style_exports);
33
+ var import_css = require("@emotion/css");
34
+ const barWrapper = import_css.css`
35
+ cursor: pointer;
36
+ outline: none;
37
+ .barHandle {
38
+ fill: #ddd;
39
+ cursor: ew-resize;
40
+ opacity: 0;
41
+ }
42
+ &:hover .barHandle {
43
+ opacity: 1;
44
+ }
45
+ &:hover .barProgressHandle {
46
+ opacity: 1;
47
+ }
48
+ `;
49
+ const barBackground = import_css.css`
50
+ user-select: none;
51
+ stroke-width: 0;
52
+ opacity: 0.6;
53
+ `;
54
+ // Annotate the CommonJS export names for ESM import in node:
55
+ 0 && (module.exports = {
56
+ barBackground,
57
+ barWrapper
58
+ });
@@ -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
+ import React from 'react';
10
+ import { TaskItemProps } from '../task-item';
11
+ export declare const Milestone: React.FC<TaskItemProps>;