gantt-task-react-v 1.0.57 → 1.1.0
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/dist/gantt-task-react.es.js +16 -16
- package/dist/gantt-task-react.umd.js +16 -16
- package/package.json +15 -11
|
@@ -10901,6 +10901,12 @@ const TaskListInner = ({
|
|
|
10901
10901
|
] });
|
|
10902
10902
|
};
|
|
10903
10903
|
const TaskList = memo(TaskListInner);
|
|
10904
|
+
const ganttToday = "_ganttToday_1oyhk_1";
|
|
10905
|
+
const ganttTodayCircle = "_ganttTodayCircle_1oyhk_9";
|
|
10906
|
+
const styles$c = {
|
|
10907
|
+
ganttToday,
|
|
10908
|
+
ganttTodayCircle
|
|
10909
|
+
};
|
|
10904
10910
|
const getDateByOffset = (startDate, offset2, viewMode) => {
|
|
10905
10911
|
switch (viewMode) {
|
|
10906
10912
|
case ViewMode.Day:
|
|
@@ -11099,12 +11105,6 @@ const handleTaskBySVGMouseEventForMilestone = (action, selectedTask, initialCoor
|
|
|
11099
11105
|
}
|
|
11100
11106
|
return { isChanged, changedTask };
|
|
11101
11107
|
};
|
|
11102
|
-
const ganttToday = "_ganttToday_1oyhk_1";
|
|
11103
|
-
const ganttTodayCircle = "_ganttTodayCircle_1oyhk_9";
|
|
11104
|
-
const styles$c = {
|
|
11105
|
-
ganttToday,
|
|
11106
|
-
ganttTodayCircle
|
|
11107
|
-
};
|
|
11108
11108
|
const GanttTodayInner = ({
|
|
11109
11109
|
additionalLeftSpace,
|
|
11110
11110
|
distances: { columnWidth },
|
|
@@ -11126,14 +11126,14 @@ const GanttTodayInner = ({
|
|
|
11126
11126
|
return null;
|
|
11127
11127
|
}
|
|
11128
11128
|
const today = /* @__PURE__ */ new Date();
|
|
11129
|
-
const
|
|
11130
|
-
const
|
|
11129
|
+
const x = taskXCoordinate(today, startDate, viewMode, columnWidth);
|
|
11130
|
+
const adjustedX = rtl ? x + columnWidth : x;
|
|
11131
11131
|
const color = todayColor || "var(--gantt-calendar-today-color)";
|
|
11132
11132
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11133
11133
|
/* @__PURE__ */ jsx(
|
|
11134
11134
|
"rect",
|
|
11135
11135
|
{
|
|
11136
|
-
x: additionalLeftSpace +
|
|
11136
|
+
x: additionalLeftSpace + adjustedX,
|
|
11137
11137
|
y: 0,
|
|
11138
11138
|
width: 2,
|
|
11139
11139
|
height: ganttFullHeight,
|
|
@@ -11144,7 +11144,7 @@ const GanttTodayInner = ({
|
|
|
11144
11144
|
"circle",
|
|
11145
11145
|
{
|
|
11146
11146
|
className: styles$c.ganttTodayCircle,
|
|
11147
|
-
cx:
|
|
11147
|
+
cx: adjustedX + 1,
|
|
11148
11148
|
cy: 6,
|
|
11149
11149
|
r: 6,
|
|
11150
11150
|
fill: color
|
|
@@ -11153,7 +11153,7 @@ const GanttTodayInner = ({
|
|
|
11153
11153
|
/* @__PURE__ */ jsx(
|
|
11154
11154
|
"text",
|
|
11155
11155
|
{
|
|
11156
|
-
x: additionalLeftSpace +
|
|
11156
|
+
x: additionalLeftSpace + adjustedX + 8,
|
|
11157
11157
|
y: 10,
|
|
11158
11158
|
fill: color,
|
|
11159
11159
|
fontSize: 12,
|
|
@@ -11178,14 +11178,14 @@ const GanttTodayInner = ({
|
|
|
11178
11178
|
if (!showDataDateLine || !dataDate) {
|
|
11179
11179
|
return null;
|
|
11180
11180
|
}
|
|
11181
|
-
const
|
|
11182
|
-
const
|
|
11181
|
+
const x = taskXCoordinate(dataDate, startDate, viewMode, columnWidth);
|
|
11182
|
+
const adjustedX = rtl ? x + columnWidth : x;
|
|
11183
11183
|
const color = dataDateColor || "var(--gantt-calendar-today-color)";
|
|
11184
11184
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11185
11185
|
/* @__PURE__ */ jsx(
|
|
11186
11186
|
"rect",
|
|
11187
11187
|
{
|
|
11188
|
-
x: additionalLeftSpace +
|
|
11188
|
+
x: additionalLeftSpace + adjustedX,
|
|
11189
11189
|
y: 0,
|
|
11190
11190
|
width: 2,
|
|
11191
11191
|
height: ganttFullHeight,
|
|
@@ -11197,7 +11197,7 @@ const GanttTodayInner = ({
|
|
|
11197
11197
|
"circle",
|
|
11198
11198
|
{
|
|
11199
11199
|
className: styles$c.ganttTodayCircle,
|
|
11200
|
-
cx:
|
|
11200
|
+
cx: adjustedX + 1,
|
|
11201
11201
|
cy: 6,
|
|
11202
11202
|
r: 6,
|
|
11203
11203
|
fill: color
|
|
@@ -11206,7 +11206,7 @@ const GanttTodayInner = ({
|
|
|
11206
11206
|
/* @__PURE__ */ jsx(
|
|
11207
11207
|
"text",
|
|
11208
11208
|
{
|
|
11209
|
-
x: additionalLeftSpace +
|
|
11209
|
+
x: additionalLeftSpace + adjustedX + 8,
|
|
11210
11210
|
y: 10,
|
|
11211
11211
|
fill: color,
|
|
11212
11212
|
fontSize: 12,
|
|
@@ -10918,6 +10918,12 @@
|
|
|
10918
10918
|
] });
|
|
10919
10919
|
};
|
|
10920
10920
|
const TaskList = React.memo(TaskListInner);
|
|
10921
|
+
const ganttToday = "_ganttToday_1oyhk_1";
|
|
10922
|
+
const ganttTodayCircle = "_ganttTodayCircle_1oyhk_9";
|
|
10923
|
+
const styles$c = {
|
|
10924
|
+
ganttToday,
|
|
10925
|
+
ganttTodayCircle
|
|
10926
|
+
};
|
|
10921
10927
|
const getDateByOffset = (startDate, offset2, viewMode) => {
|
|
10922
10928
|
switch (viewMode) {
|
|
10923
10929
|
case ViewMode.Day:
|
|
@@ -11116,12 +11122,6 @@
|
|
|
11116
11122
|
}
|
|
11117
11123
|
return { isChanged, changedTask };
|
|
11118
11124
|
};
|
|
11119
|
-
const ganttToday = "_ganttToday_1oyhk_1";
|
|
11120
|
-
const ganttTodayCircle = "_ganttTodayCircle_1oyhk_9";
|
|
11121
|
-
const styles$c = {
|
|
11122
|
-
ganttToday,
|
|
11123
|
-
ganttTodayCircle
|
|
11124
|
-
};
|
|
11125
11125
|
const GanttTodayInner = ({
|
|
11126
11126
|
additionalLeftSpace,
|
|
11127
11127
|
distances: { columnWidth },
|
|
@@ -11143,14 +11143,14 @@
|
|
|
11143
11143
|
return null;
|
|
11144
11144
|
}
|
|
11145
11145
|
const today = /* @__PURE__ */ new Date();
|
|
11146
|
-
const
|
|
11147
|
-
const
|
|
11146
|
+
const x = taskXCoordinate(today, startDate, viewMode, columnWidth);
|
|
11147
|
+
const adjustedX = rtl ? x + columnWidth : x;
|
|
11148
11148
|
const color = todayColor || "var(--gantt-calendar-today-color)";
|
|
11149
11149
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11150
11150
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11151
11151
|
"rect",
|
|
11152
11152
|
{
|
|
11153
|
-
x: additionalLeftSpace +
|
|
11153
|
+
x: additionalLeftSpace + adjustedX,
|
|
11154
11154
|
y: 0,
|
|
11155
11155
|
width: 2,
|
|
11156
11156
|
height: ganttFullHeight,
|
|
@@ -11161,7 +11161,7 @@
|
|
|
11161
11161
|
"circle",
|
|
11162
11162
|
{
|
|
11163
11163
|
className: styles$c.ganttTodayCircle,
|
|
11164
|
-
cx:
|
|
11164
|
+
cx: adjustedX + 1,
|
|
11165
11165
|
cy: 6,
|
|
11166
11166
|
r: 6,
|
|
11167
11167
|
fill: color
|
|
@@ -11170,7 +11170,7 @@
|
|
|
11170
11170
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11171
11171
|
"text",
|
|
11172
11172
|
{
|
|
11173
|
-
x: additionalLeftSpace +
|
|
11173
|
+
x: additionalLeftSpace + adjustedX + 8,
|
|
11174
11174
|
y: 10,
|
|
11175
11175
|
fill: color,
|
|
11176
11176
|
fontSize: 12,
|
|
@@ -11195,14 +11195,14 @@
|
|
|
11195
11195
|
if (!showDataDateLine || !dataDate) {
|
|
11196
11196
|
return null;
|
|
11197
11197
|
}
|
|
11198
|
-
const
|
|
11199
|
-
const
|
|
11198
|
+
const x = taskXCoordinate(dataDate, startDate, viewMode, columnWidth);
|
|
11199
|
+
const adjustedX = rtl ? x + columnWidth : x;
|
|
11200
11200
|
const color = dataDateColor || "var(--gantt-calendar-today-color)";
|
|
11201
11201
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
11202
11202
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11203
11203
|
"rect",
|
|
11204
11204
|
{
|
|
11205
|
-
x: additionalLeftSpace +
|
|
11205
|
+
x: additionalLeftSpace + adjustedX,
|
|
11206
11206
|
y: 0,
|
|
11207
11207
|
width: 2,
|
|
11208
11208
|
height: ganttFullHeight,
|
|
@@ -11214,7 +11214,7 @@
|
|
|
11214
11214
|
"circle",
|
|
11215
11215
|
{
|
|
11216
11216
|
className: styles$c.ganttTodayCircle,
|
|
11217
|
-
cx:
|
|
11217
|
+
cx: adjustedX + 1,
|
|
11218
11218
|
cy: 6,
|
|
11219
11219
|
r: 6,
|
|
11220
11220
|
fill: color
|
|
@@ -11223,7 +11223,7 @@
|
|
|
11223
11223
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11224
11224
|
"text",
|
|
11225
11225
|
{
|
|
11226
|
-
x: additionalLeftSpace +
|
|
11226
|
+
x: additionalLeftSpace + adjustedX + 8,
|
|
11227
11227
|
y: 10,
|
|
11228
11228
|
fill: color,
|
|
11229
11229
|
fontSize: 12,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gantt-task-react-v",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Interactive Gantt Chart for React with TypeScript.",
|
|
5
5
|
"author": "aguilanbon",
|
|
6
6
|
"homepage": "https://github.com/aguilanbon/gantt-task-react-v",
|
|
@@ -55,15 +55,19 @@
|
|
|
55
55
|
"@babel/types": "^7.20.7",
|
|
56
56
|
"@chromatic-com/storybook": "^1.3.1",
|
|
57
57
|
"@rollup/plugin-image": "3.0.3",
|
|
58
|
-
"@storybook/addon-essentials": "
|
|
59
|
-
"@storybook/addon-interactions": "
|
|
60
|
-
"@storybook/addon-links": "
|
|
61
|
-
"@storybook/addon-onboarding": "
|
|
62
|
-
"@storybook/blocks": "
|
|
63
|
-
"@storybook/cli": "
|
|
64
|
-
"@storybook/react": "
|
|
65
|
-
"@storybook/react-vite": "
|
|
66
|
-
"@storybook/test": "
|
|
58
|
+
"@storybook/addon-essentials": "8.2.10",
|
|
59
|
+
"@storybook/addon-interactions": "8.2.10",
|
|
60
|
+
"@storybook/addon-links": "8.2.10",
|
|
61
|
+
"@storybook/addon-onboarding": "8.2.10",
|
|
62
|
+
"@storybook/blocks": "8.2.10",
|
|
63
|
+
"@storybook/cli": "8.2.10",
|
|
64
|
+
"@storybook/react": "8.2.10",
|
|
65
|
+
"@storybook/react-vite": "8.2.10",
|
|
66
|
+
"@storybook/test": "8.2.10",
|
|
67
|
+
"@storybook/core-server": "8.2.10",
|
|
68
|
+
"@storybook/jest": "0.2.3",
|
|
69
|
+
"@storybook/test-runner": "0.23.0",
|
|
70
|
+
"@storybook/testing-library": "^0.2.2",
|
|
67
71
|
"@testing-library/jest-dom": "^6.4.2",
|
|
68
72
|
"@testing-library/react": "^14.2.2",
|
|
69
73
|
"@testing-library/user-event": "^14.2.1",
|
|
@@ -93,7 +97,7 @@
|
|
|
93
97
|
"react": "^18.2.0",
|
|
94
98
|
"react-dom": "^18.2.0",
|
|
95
99
|
"rollup-plugin-peer-deps-external": "2.2.4",
|
|
96
|
-
"storybook": "
|
|
100
|
+
"storybook": "8.2.10",
|
|
97
101
|
"typescript": "^5.1.6",
|
|
98
102
|
"vite": "5.2.8",
|
|
99
103
|
"vite-plugin-turbosnap": "^1.0.3",
|