@thepocman/gantt-task-react 1.0.28 → 1.0.29

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.
@@ -5006,8 +5006,6 @@ const GridBodyInner = ({
5006
5006
  startColumnIndex
5007
5007
  )) {
5008
5008
  const x3 = additionalLeftSpace + columnWidth * i2;
5009
- console.log("debugging x:", x3);
5010
- console.log("divider color", dividerColor);
5011
5009
  dividers.push(
5012
5010
  /* @__PURE__ */ jsx(
5013
5011
  "line",
@@ -5037,7 +5035,6 @@ const GridBodyInner = ({
5037
5035
  getDate,
5038
5036
  dividerColor
5039
5037
  ]);
5040
- console.log("verticalDividers :>> ", verticalDividers);
5041
5038
  return /* @__PURE__ */ jsxs("g", { className: "gridBody", children: [
5042
5039
  /* @__PURE__ */ jsx("g", { className: "today", children: today }),
5043
5040
  /* @__PURE__ */ jsx("g", { className: "verticalDividers", children: verticalDividers })
@@ -10553,6 +10550,28 @@ const defaultRoundStartDate = (date, viewMode) => {
10553
10550
  }
10554
10551
  return addMonths(start, 1);
10555
10552
  }
10553
+ case ViewMode.QuarterYear: {
10554
+ const start = startOfYear(date);
10555
+ const diff = differenceInMonths(date, start);
10556
+ if (diff < 3)
10557
+ return start;
10558
+ if (diff < 6)
10559
+ return addMonths(start, 3);
10560
+ if (diff < 9)
10561
+ return addMonths(start, 6);
10562
+ if (diff < 12)
10563
+ return addMonths(start, 9);
10564
+ return addYears(start, 1);
10565
+ }
10566
+ case ViewMode.HalfYear: {
10567
+ const start = startOfYear(date);
10568
+ const diff = differenceInMonths(date, start);
10569
+ if (diff < 6)
10570
+ return start;
10571
+ if (diff < 12)
10572
+ return addMonths(start, 6);
10573
+ return addYears(start, 1);
10574
+ }
10556
10575
  case ViewMode.Year: {
10557
10576
  const start = startOfYear(date);
10558
10577
  const diff = differenceInMonths(date, start);
@@ -11720,6 +11739,7 @@ const defaultDateFormats = {
11720
11739
  };
11721
11740
  const defaultDistances = {
11722
11741
  actionColumnWidth: 40,
11742
+ ganttHeight: 0,
11723
11743
  arrowIndent: 20,
11724
11744
  taskHeight: 24,
11725
11745
  barCornerRadius: 3,
@@ -5019,8 +5019,6 @@
5019
5019
  startColumnIndex
5020
5020
  )) {
5021
5021
  const x2 = additionalLeftSpace + columnWidth * i;
5022
- console.log("debugging x:", x2);
5023
- console.log("divider color", dividerColor);
5024
5022
  dividers.push(
5025
5023
  /* @__PURE__ */ jsxRuntime.jsx(
5026
5024
  "line",
@@ -5050,7 +5048,6 @@
5050
5048
  getDate,
5051
5049
  dividerColor
5052
5050
  ]);
5053
- console.log("verticalDividers :>> ", verticalDividers);
5054
5051
  return /* @__PURE__ */ jsxRuntime.jsxs("g", { className: "gridBody", children: [
5055
5052
  /* @__PURE__ */ jsxRuntime.jsx("g", { className: "today", children: today }),
5056
5053
  /* @__PURE__ */ jsxRuntime.jsx("g", { className: "verticalDividers", children: verticalDividers })
@@ -10566,6 +10563,28 @@
10566
10563
  }
10567
10564
  return addMonths(start, 1);
10568
10565
  }
10566
+ case ViewMode.QuarterYear: {
10567
+ const start = startOfYear(date);
10568
+ const diff = differenceInMonths(date, start);
10569
+ if (diff < 3)
10570
+ return start;
10571
+ if (diff < 6)
10572
+ return addMonths(start, 3);
10573
+ if (diff < 9)
10574
+ return addMonths(start, 6);
10575
+ if (diff < 12)
10576
+ return addMonths(start, 9);
10577
+ return addYears(start, 1);
10578
+ }
10579
+ case ViewMode.HalfYear: {
10580
+ const start = startOfYear(date);
10581
+ const diff = differenceInMonths(date, start);
10582
+ if (diff < 6)
10583
+ return start;
10584
+ if (diff < 12)
10585
+ return addMonths(start, 6);
10586
+ return addYears(start, 1);
10587
+ }
10569
10588
  case ViewMode.Year: {
10570
10589
  const start = startOfYear(date);
10571
10590
  const diff = differenceInMonths(date, start);
@@ -11733,6 +11752,7 @@
11733
11752
  };
11734
11753
  const defaultDistances = {
11735
11754
  actionColumnWidth: 40,
11755
+ ganttHeight: 0,
11736
11756
  arrowIndent: 20,
11737
11757
  taskHeight: 24,
11738
11758
  barCornerRadius: 3,
@@ -114,6 +114,7 @@ export interface Distances {
114
114
  * From 0 to 100
115
115
  */
116
116
  barFill: number;
117
+ ganttHeight: number;
117
118
  columnWidth: number;
118
119
  contextMenuIconWidth: number;
119
120
  contextMenuOptionHeight: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thepocman/gantt-task-react",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "Fork of gantt-task-react with support for grouped tasks on a single row when collapsed",
5
5
  "author": "Adrian Bueno <adrianlbueno@users.noreply.github.com>",
6
6
  "homepage": "https://github.com/adrianlbueno/gantt-task-react#readme",