@worktile/gantt 16.1.0-next.1 → 18.0.0-next.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.
Files changed (98) hide show
  1. package/class/date-point.d.ts +2 -2
  2. package/class/event.d.ts +1 -0
  3. package/class/item.d.ts +7 -8
  4. package/class/view-type.d.ts +2 -1
  5. package/components/bar/bar-drag.d.ts +4 -3
  6. package/components/bar/bar.component.d.ts +1 -1
  7. package/components/bar/bar.component.scss +3 -0
  8. package/components/baseline/baseline.component.d.ts +1 -1
  9. package/components/calendar/calendar.scss +0 -1
  10. package/components/calendar/grid/calendar-grid.component.d.ts +1 -2
  11. package/components/calendar/header/calendar-header.component.d.ts +2 -2
  12. package/components/drag-backdrop/drag-backdrop.component.d.ts +4 -1
  13. package/components/drag-backdrop/drag-backdrop.component.scss +0 -1
  14. package/components/icon/icon.component.d.ts +1 -1
  15. package/components/links/links.component.d.ts +1 -1
  16. package/components/links/links.component.scss +0 -1
  17. package/components/loader/loader.component.d.ts +1 -1
  18. package/components/main/gantt-main.component.d.ts +1 -1
  19. package/components/range/range.component.d.ts +1 -1
  20. package/components/table/body/gantt-table-body.component.d.ts +1 -1
  21. package/components/table/gantt-table.scss +4 -3
  22. package/components/table/header/gantt-table-header.component.d.ts +3 -1
  23. package/components/toolbar/toolbar.component.d.ts +2 -1
  24. package/esm2022/class/date-point.mjs +1 -1
  25. package/esm2022/class/event.mjs +1 -1
  26. package/esm2022/class/item.mjs +13 -15
  27. package/esm2022/class/view-type.mjs +2 -1
  28. package/esm2022/components/bar/bar-drag.mjs +49 -48
  29. package/esm2022/components/bar/bar.component.mjs +9 -9
  30. package/esm2022/components/baseline/baseline.component.mjs +9 -9
  31. package/esm2022/components/calendar/grid/calendar-grid.component.mjs +10 -11
  32. package/esm2022/components/calendar/header/calendar-header.component.mjs +18 -12
  33. package/esm2022/components/drag-backdrop/drag-backdrop.component.mjs +15 -7
  34. package/esm2022/components/icon/icon.component.mjs +7 -6
  35. package/esm2022/components/links/lines/curve.mjs +1 -1
  36. package/esm2022/components/links/lines/factory.mjs +1 -1
  37. package/esm2022/components/links/lines/line.mjs +1 -1
  38. package/esm2022/components/links/lines/straight.mjs +1 -1
  39. package/esm2022/components/links/links.component.mjs +9 -9
  40. package/esm2022/components/loader/loader.component.mjs +6 -5
  41. package/esm2022/components/main/gantt-main.component.mjs +26 -14
  42. package/esm2022/components/range/range.component.mjs +9 -9
  43. package/esm2022/components/table/body/gantt-table-body.component.mjs +13 -15
  44. package/esm2022/components/table/header/gantt-table-header.component.mjs +21 -9
  45. package/esm2022/components/toolbar/toolbar.component.mjs +15 -9
  46. package/esm2022/gantt-abstract.mjs +1 -1
  47. package/esm2022/gantt-dom.service.mjs +6 -6
  48. package/esm2022/gantt-drag-container.mjs +6 -6
  49. package/esm2022/gantt-item-upper.mjs +6 -6
  50. package/esm2022/gantt-print.service.mjs +5 -5
  51. package/esm2022/gantt-upper.mjs +12 -15
  52. package/esm2022/gantt.component.mjs +40 -25
  53. package/esm2022/gantt.config.mjs +9 -2
  54. package/esm2022/gantt.module.mjs +60 -40
  55. package/esm2022/gantt.pipe.mjs +16 -13
  56. package/esm2022/gantt.styles.mjs +1 -6
  57. package/esm2022/root.component.mjs +21 -14
  58. package/esm2022/table/gantt-column.component.mjs +8 -7
  59. package/esm2022/table/gantt-table.component.mjs +6 -5
  60. package/esm2022/utils/date.mjs +16 -4
  61. package/esm2022/utils/drag-scroll.mjs +1 -1
  62. package/esm2022/utils/helpers.mjs +1 -1
  63. package/esm2022/utils/passive-listeners.mjs +1 -1
  64. package/esm2022/utils/set-style-with-vendor-prefix.mjs +1 -1
  65. package/esm2022/views/day.mjs +12 -13
  66. package/esm2022/views/factory.mjs +3 -1
  67. package/esm2022/views/hour.mjs +87 -0
  68. package/esm2022/views/month.mjs +5 -6
  69. package/esm2022/views/quarter.mjs +5 -6
  70. package/esm2022/views/view.mjs +77 -37
  71. package/esm2022/views/week.mjs +10 -11
  72. package/esm2022/views/year.mjs +5 -6
  73. package/fesm2022/worktile-gantt.mjs +2478 -2259
  74. package/fesm2022/worktile-gantt.mjs.map +1 -1
  75. package/gantt-abstract.d.ts +2 -2
  76. package/gantt-upper.d.ts +3 -5
  77. package/gantt.component.d.ts +6 -6
  78. package/gantt.component.scss +0 -5
  79. package/gantt.config.d.ts +16 -16
  80. package/gantt.module.d.ts +25 -23
  81. package/gantt.pipe.d.ts +6 -6
  82. package/gantt.styles.d.ts +0 -6
  83. package/package.json +6 -4
  84. package/root.component.d.ts +1 -1
  85. package/styles/index.scss +0 -2
  86. package/styles/variables.scss +4 -2
  87. package/table/gantt-column.component.d.ts +1 -1
  88. package/table/gantt-table.component.d.ts +1 -1
  89. package/utils/date.d.ts +5 -1
  90. package/utils/helpers.d.ts +2 -2
  91. package/views/day.d.ts +5 -5
  92. package/views/factory.d.ts +2 -1
  93. package/views/hour.d.ts +20 -0
  94. package/views/month.d.ts +2 -2
  95. package/views/quarter.d.ts +2 -2
  96. package/views/view.d.ts +24 -9
  97. package/views/week.d.ts +2 -2
  98. package/views/year.d.ts +2 -2
@@ -1,10 +1,10 @@
1
1
  import { InjectionToken, ChangeDetectorRef } from '@angular/core';
2
2
  import { GanttGroupInternal, GanttItemInternal } from './class';
3
- import { GanttStyles } from './gantt.styles';
4
3
  import { NgxGanttTableComponent } from './table/gantt-table.component';
4
+ import { GanttStyleOptions } from './gantt.config';
5
5
  export interface GanttAbstractComponent {
6
6
  table: NgxGanttTableComponent;
7
- styles: GanttStyles;
7
+ styles: GanttStyleOptions;
8
8
  maxLevel: number;
9
9
  async: boolean;
10
10
  cdr: ChangeDetectorRef;
package/gantt-upper.d.ts CHANGED
@@ -2,10 +2,9 @@ import { TemplateRef, EventEmitter, ElementRef, ChangeDetectorRef, NgZone, Simpl
2
2
  import { Subject } from 'rxjs';
3
3
  import { GanttItem, GanttGroup, GanttViewType, GanttLoadOnScrollEvent, GanttDragEvent, GanttGroupInternal, GanttItemInternal, GanttBarClickEvent, GanttLinkDragEvent, GanttToolbarOptions } from './class';
4
4
  import { GanttView, GanttViewOptions } from './views/view';
5
- import { GanttStyles } from './gantt.styles';
6
5
  import { Dictionary } from './utils/helpers';
7
6
  import { GanttDragContainer } from './gantt-drag-container';
8
- import { GanttGlobalConfig } from './gantt.config';
7
+ import { GanttGlobalConfig, GanttStyleOptions } from './gantt.config';
9
8
  import { GanttLinkOptions } from './class/link';
10
9
  import { SelectionModel } from '@angular/cdk/collections';
11
10
  import { BooleanInput } from '@angular/cdk/coercion';
@@ -25,9 +24,8 @@ export declare abstract class GanttUpper implements OnChanges, OnInit, OnDestroy
25
24
  end: number;
26
25
  showTodayLine: boolean;
27
26
  draggable: boolean;
28
- styles: GanttStyles;
27
+ styles: GanttStyleOptions;
29
28
  showToolbar: boolean;
30
- restrictToBounds: boolean;
31
29
  toolbarOptions: GanttToolbarOptions;
32
30
  viewOptions: GanttViewOptions;
33
31
  set linkOptions(options: GanttLinkOptions);
@@ -95,6 +93,6 @@ export declare abstract class GanttUpper implements OnChanges, OnInit, OnDestroy
95
93
  changeView(type: GanttViewType): void;
96
94
  rerenderView(): void;
97
95
  static ɵfac: i0.ɵɵFactoryDeclaration<GanttUpper, never>;
98
- static ɵdir: i0.ɵɵDirectiveDeclaration<GanttUpper, never, never, { "originItems": { "alias": "items"; "required": false; }; "originGroups": { "alias": "groups"; "required": false; }; "originBaselineItems": { "alias": "baselineItems"; "required": false; }; "viewType": { "alias": "viewType"; "required": false; }; "start": { "alias": "start"; "required": false; }; "end": { "alias": "end"; "required": false; }; "showTodayLine": { "alias": "showTodayLine"; "required": false; }; "draggable": { "alias": "draggable"; "required": false; }; "styles": { "alias": "styles"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "restrictToBounds": { "alias": "restrictToBounds"; "required": false; }; "toolbarOptions": { "alias": "toolbarOptions"; "required": false; }; "viewOptions": { "alias": "viewOptions"; "required": false; }; "linkOptions": { "alias": "linkOptions"; "required": false; }; "disabledLoadOnScroll": { "alias": "disabledLoadOnScroll"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; }, { "loadOnScroll": "loadOnScroll"; "dragStarted": "dragStarted"; "dragMoved": "dragMoved"; "dragEnded": "dragEnded"; "barClick": "barClick"; "viewChange": "viewChange"; "expandChange": "expandChange"; }, ["barTemplate", "rangeTemplate", "itemTemplate", "baselineTemplate", "groupTemplate", "groupHeaderTemplate", "toolbarTemplate"], never, false, never>;
96
+ static ɵdir: i0.ɵɵDirectiveDeclaration<GanttUpper, never, never, { "originItems": { "alias": "items"; "required": false; }; "originGroups": { "alias": "groups"; "required": false; }; "originBaselineItems": { "alias": "baselineItems"; "required": false; }; "viewType": { "alias": "viewType"; "required": false; }; "start": { "alias": "start"; "required": false; }; "end": { "alias": "end"; "required": false; }; "showTodayLine": { "alias": "showTodayLine"; "required": false; }; "draggable": { "alias": "draggable"; "required": false; }; "styles": { "alias": "styles"; "required": false; }; "showToolbar": { "alias": "showToolbar"; "required": false; }; "toolbarOptions": { "alias": "toolbarOptions"; "required": false; }; "viewOptions": { "alias": "viewOptions"; "required": false; }; "linkOptions": { "alias": "linkOptions"; "required": false; }; "disabledLoadOnScroll": { "alias": "disabledLoadOnScroll"; "required": false; }; "selectable": { "alias": "selectable"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; }, { "loadOnScroll": "loadOnScroll"; "dragStarted": "dragStarted"; "dragMoved": "dragMoved"; "dragEnded": "dragEnded"; "barClick": "barClick"; "viewChange": "viewChange"; "expandChange": "expandChange"; }, ["barTemplate", "rangeTemplate", "itemTemplate", "baselineTemplate", "groupTemplate", "groupHeaderTemplate", "toolbarTemplate"], never, false, never>;
99
97
  }
100
98
  export declare const GANTT_UPPER_TOKEN: InjectionToken<GanttUpper>;
@@ -1,13 +1,13 @@
1
- import { OnInit, ElementRef, EventEmitter, ChangeDetectorRef, NgZone, QueryList, AfterViewInit, TemplateRef, OnChanges, SimpleChanges, AfterViewChecked } from '@angular/core';
1
+ import { CdkVirtualScrollViewport, ViewportRuler } from '@angular/cdk/scrolling';
2
+ import { AfterViewChecked, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnChanges, OnInit, QueryList, SimpleChanges, TemplateRef } from '@angular/core';
2
3
  import { Observable } from 'rxjs';
4
+ import { GanttGroupInternal, GanttItem, GanttItemInternal, GanttLineClickEvent, GanttLinkDragEvent, GanttSelectedEvent, GanttTableDragEndedEvent, GanttTableDragStartedEvent, GanttVirtualScrolledIndexChangeEvent } from './class';
3
5
  import { GanttUpper } from './gantt-upper';
4
- import { GanttLinkDragEvent, GanttLineClickEvent, GanttItemInternal, GanttItem, GanttSelectedEvent, GanttGroupInternal, GanttVirtualScrolledIndexChangeEvent, GanttTableDragStartedEvent, GanttTableDragEndedEvent } from './class';
5
- import { NgxGanttTableColumnComponent } from './table/gantt-column.component';
6
- import { NgxGanttTableComponent } from './table/gantt-table.component';
7
6
  import { GanttGlobalConfig } from './gantt.config';
8
7
  import { NgxGanttRootComponent } from './root.component';
8
+ import { NgxGanttTableColumnComponent } from './table/gantt-column.component';
9
+ import { NgxGanttTableComponent } from './table/gantt-table.component';
9
10
  import { GanttDate } from './utils/date';
10
- import { CdkVirtualScrollViewport, ViewportRuler } from '@angular/cdk/scrolling';
11
11
  import * as i0 from "@angular/core";
12
12
  export declare class NgxGanttComponent extends GanttUpper implements OnInit, OnChanges, AfterViewInit, AfterViewChecked {
13
13
  private viewportRuler;
@@ -57,5 +57,5 @@ export declare class NgxGanttComponent extends GanttUpper implements OnInit, OnC
57
57
  itemDragStarted(event: GanttTableDragStartedEvent): void;
58
58
  itemDragEnded(event: GanttTableDragEndedEvent): void;
59
59
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxGanttComponent, never>;
60
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxGanttComponent, "ngx-gantt", never, { "maxLevel": { "alias": "maxLevel"; "required": false; }; "async": { "alias": "async"; "required": false; }; "childrenResolve": { "alias": "childrenResolve"; "required": false; }; "linkable": { "alias": "linkable"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "virtualScrollEnabled": { "alias": "virtualScrollEnabled"; "required": false; }; "loadingDelay": { "alias": "loadingDelay"; "required": false; }; }, { "linkDragStarted": "linkDragStarted"; "linkDragEnded": "linkDragEnded"; "lineClick": "lineClick"; "selectedChange": "selectedChange"; "virtualScrolledIndexChange": "virtualScrolledIndexChange"; }, ["table", "tableEmptyTemplate", "footerTemplate", "columns"], never, false, never>;
60
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxGanttComponent, "ngx-gantt", never, { "maxLevel": { "alias": "maxLevel"; "required": false; }; "async": { "alias": "async"; "required": false; }; "childrenResolve": { "alias": "childrenResolve"; "required": false; }; "linkable": { "alias": "linkable"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "virtualScrollEnabled": { "alias": "virtualScrollEnabled"; "required": false; }; "loadingDelay": { "alias": "loadingDelay"; "required": false; }; }, { "linkDragStarted": "linkDragStarted"; "linkDragEnded": "linkDragEnded"; "lineClick": "lineClick"; "selectedChange": "selectedChange"; "virtualScrolledIndexChange": "virtualScrolledIndexChange"; }, ["table", "tableEmptyTemplate", "footerTemplate", "columns"], never, true, never>;
61
61
  }
@@ -22,7 +22,6 @@
22
22
 
23
23
  .gantt-side-header {
24
24
  box-sizing: border-box;
25
- height: variables.$gantt-header-height;
26
25
  }
27
26
 
28
27
  .gantt-side-container {
@@ -69,10 +68,8 @@
69
68
 
70
69
  .gantt-main-container {
71
70
  width: 100%;
72
- height: calc(100% - #{variables.$gantt-header-height});
73
71
  flex: 1;
74
72
  position: absolute;
75
- top: variables.$gantt-header-height;
76
73
  bottom: 0;
77
74
  left: 0;
78
75
  right: 0;
@@ -86,7 +83,6 @@
86
83
  }
87
84
 
88
85
  .gantt-group {
89
- height: variables.$gantt-group-height;
90
86
  background: variables.$gantt-group-background-color;
91
87
  border-bottom: 1px solid variables.$gantt-border-color;
92
88
  box-sizing: border-box;
@@ -110,7 +106,6 @@
110
106
  .gantt-virtual-scroll-viewport {
111
107
  position: absolute;
112
108
  left: 0;
113
- top: variables.$gantt-header-height;
114
109
  right: 0;
115
110
  bottom: 0;
116
111
  z-index: 2;
package/gantt.config.d.ts CHANGED
@@ -1,6 +1,9 @@
1
- import { GanttLinkType, GanttLinkOptions, GanttLinkLineType } from './class/link';
2
1
  import { InjectionToken } from '@angular/core';
2
+ import { Locale } from 'date-fns';
3
+ import { GanttLinkOptions } from './class/link';
3
4
  export interface GanttDateFormat {
5
+ hour?: string;
6
+ day?: string;
4
7
  week?: string;
5
8
  month?: string;
6
9
  quarter?: string;
@@ -8,23 +11,20 @@ export interface GanttDateFormat {
8
11
  yearMonth?: string;
9
12
  yearQuarter?: string;
10
13
  }
14
+ export interface GanttDateOptions {
15
+ locale?: Locale;
16
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
17
+ }
18
+ export interface GanttStyleOptions {
19
+ headerHeight?: number;
20
+ lineHeight?: number;
21
+ barHeight?: number;
22
+ }
11
23
  export interface GanttGlobalConfig {
12
24
  dateFormat?: GanttDateFormat;
25
+ dateOptions?: GanttDateOptions;
13
26
  linkOptions?: GanttLinkOptions;
27
+ styleOptions?: GanttStyleOptions;
14
28
  }
15
- export declare const defaultConfig: {
16
- dateFormat: {
17
- week: string;
18
- month: string;
19
- quarter: string;
20
- year: string;
21
- yearMonth: string;
22
- yearQuarter: string;
23
- };
24
- linkOptions: {
25
- dependencyTypes: GanttLinkType[];
26
- showArrow: boolean;
27
- lineType: GanttLinkLineType;
28
- };
29
- };
29
+ export declare const defaultConfig: GanttGlobalConfig;
30
30
  export declare const GANTT_GLOBAL_CONFIG: InjectionToken<GanttGlobalConfig>;
package/gantt.module.d.ts CHANGED
@@ -1,27 +1,29 @@
1
+ import { GanttGlobalConfig } from './gantt.config';
1
2
  import * as i0 from "@angular/core";
2
- import * as i1 from "./gantt.component";
3
- import * as i2 from "./table/gantt-table.component";
4
- import * as i3 from "./table/gantt-column.component";
5
- import * as i4 from "./components/table/header/gantt-table-header.component";
6
- import * as i5 from "./components/table/body/gantt-table-body.component";
7
- import * as i6 from "./components/main/gantt-main.component";
8
- import * as i7 from "./components/calendar/header/calendar-header.component";
9
- import * as i8 from "./components/calendar/grid/calendar-grid.component";
10
- import * as i9 from "./components/links/links.component";
11
- import * as i10 from "./components/loader/loader.component";
12
- import * as i11 from "./components/bar/bar.component";
13
- import * as i12 from "./components/icon/icon.component";
14
- import * as i13 from "./components/drag-backdrop/drag-backdrop.component";
15
- import * as i14 from "./components/range/range.component";
16
- import * as i15 from "./root.component";
17
- import * as i16 from "./components/baseline/baseline.component";
18
- import * as i17 from "./components/toolbar/toolbar.component";
19
- import * as i18 from "./gantt.pipe";
20
- import * as i19 from "@angular/common";
21
- import * as i20 from "@angular/cdk/drag-drop";
22
- import * as i21 from "@angular/cdk/scrolling";
3
+ import * as i1 from "@angular/common";
4
+ import * as i2 from "@angular/cdk/drag-drop";
5
+ import * as i3 from "@angular/cdk/scrolling";
6
+ import * as i4 from "./gantt.component";
7
+ import * as i5 from "./table/gantt-table.component";
8
+ import * as i6 from "./table/gantt-column.component";
9
+ import * as i7 from "./components/table/header/gantt-table-header.component";
10
+ import * as i8 from "./components/table/body/gantt-table-body.component";
11
+ import * as i9 from "./components/main/gantt-main.component";
12
+ import * as i10 from "./components/calendar/header/calendar-header.component";
13
+ import * as i11 from "./components/calendar/grid/calendar-grid.component";
14
+ import * as i12 from "./components/links/links.component";
15
+ import * as i13 from "./components/loader/loader.component";
16
+ import * as i14 from "./components/bar/bar.component";
17
+ import * as i15 from "./components/icon/icon.component";
18
+ import * as i16 from "./components/drag-backdrop/drag-backdrop.component";
19
+ import * as i17 from "./components/range/range.component";
20
+ import * as i18 from "./root.component";
21
+ import * as i19 from "./components/baseline/baseline.component";
22
+ import * as i20 from "./components/toolbar/toolbar.component";
23
+ import * as i21 from "./gantt.pipe";
23
24
  export declare class NgxGanttModule {
24
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxGanttModule, never>;
25
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxGanttModule, [typeof i1.NgxGanttComponent, typeof i2.NgxGanttTableComponent, typeof i3.NgxGanttTableColumnComponent, typeof i4.GanttTableHeaderComponent, typeof i5.GanttTableBodyComponent, typeof i6.GanttMainComponent, typeof i7.GanttCalendarHeaderComponent, typeof i8.GanttCalendarGridComponent, typeof i9.GanttLinksComponent, typeof i10.GanttLoaderComponent, typeof i11.NgxGanttBarComponent, typeof i12.GanttIconComponent, typeof i13.GanttDragBackdropComponent, typeof i14.NgxGanttRangeComponent, typeof i15.NgxGanttRootComponent, typeof i16.NgxGanttBaselineComponent, typeof i17.NgxGanttToolbarComponent, typeof i18.IsGanttRangeItemPipe, typeof i18.IsGanttBarItemPipe, typeof i18.IsGanttCustomItemPipe], [typeof i19.CommonModule, typeof i20.DragDropModule, typeof i21.ScrollingModule], [typeof i1.NgxGanttComponent, typeof i2.NgxGanttTableComponent, typeof i3.NgxGanttTableColumnComponent, typeof i15.NgxGanttRootComponent, typeof i11.NgxGanttBarComponent, typeof i14.NgxGanttRangeComponent, typeof i16.NgxGanttBaselineComponent, typeof i17.NgxGanttToolbarComponent, typeof i7.GanttCalendarHeaderComponent, typeof i8.GanttCalendarGridComponent, typeof i13.GanttDragBackdropComponent]>;
25
+ constructor(ganttGlobalConfig: GanttGlobalConfig);
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<NgxGanttModule, [{ optional: true; }]>;
27
+ static ɵmod: i0.ɵɵNgModuleDeclaration<NgxGanttModule, never, [typeof i1.CommonModule, typeof i2.DragDropModule, typeof i3.ScrollingModule, typeof i4.NgxGanttComponent, typeof i5.NgxGanttTableComponent, typeof i6.NgxGanttTableColumnComponent, typeof i7.GanttTableHeaderComponent, typeof i8.GanttTableBodyComponent, typeof i9.GanttMainComponent, typeof i10.GanttCalendarHeaderComponent, typeof i11.GanttCalendarGridComponent, typeof i12.GanttLinksComponent, typeof i13.GanttLoaderComponent, typeof i14.NgxGanttBarComponent, typeof i15.GanttIconComponent, typeof i16.GanttDragBackdropComponent, typeof i17.NgxGanttRangeComponent, typeof i18.NgxGanttRootComponent, typeof i19.NgxGanttBaselineComponent, typeof i20.NgxGanttToolbarComponent, typeof i21.IsGanttRangeItemPipe, typeof i21.IsGanttBarItemPipe, typeof i21.IsGanttCustomItemPipe], [typeof i4.NgxGanttComponent, typeof i5.NgxGanttTableComponent, typeof i6.NgxGanttTableColumnComponent, typeof i18.NgxGanttRootComponent, typeof i14.NgxGanttBarComponent, typeof i17.NgxGanttRangeComponent, typeof i19.NgxGanttBaselineComponent, typeof i20.NgxGanttToolbarComponent, typeof i10.GanttCalendarHeaderComponent, typeof i11.GanttCalendarGridComponent, typeof i16.GanttDragBackdropComponent]>;
26
28
  static ɵinj: i0.ɵɵInjectorDeclaration<NgxGanttModule>;
27
29
  }
package/gantt.pipe.d.ts CHANGED
@@ -2,17 +2,17 @@ import { PipeTransform } from '@angular/core';
2
2
  import { GanttItemType } from './class';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class IsGanttRangeItemPipe implements PipeTransform {
5
- transform(value: GanttItemType): boolean;
5
+ transform(value: GanttItemType): value is GanttItemType.range;
6
6
  static ɵfac: i0.ɵɵFactoryDeclaration<IsGanttRangeItemPipe, never>;
7
- static ɵpipe: i0.ɵɵPipeDeclaration<IsGanttRangeItemPipe, "isGanttRangeItem", false>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<IsGanttRangeItemPipe, "isGanttRangeItem", true>;
8
8
  }
9
9
  export declare class IsGanttBarItemPipe implements PipeTransform {
10
- transform(value: GanttItemType): boolean;
10
+ transform(value: GanttItemType): value is GanttItemType.bar;
11
11
  static ɵfac: i0.ɵɵFactoryDeclaration<IsGanttBarItemPipe, never>;
12
- static ɵpipe: i0.ɵɵPipeDeclaration<IsGanttBarItemPipe, "isGanttBarItem", false>;
12
+ static ɵpipe: i0.ɵɵPipeDeclaration<IsGanttBarItemPipe, "isGanttBarItem", true>;
13
13
  }
14
14
  export declare class IsGanttCustomItemPipe implements PipeTransform {
15
- transform(value: GanttItemType): boolean;
15
+ transform(value: GanttItemType): value is GanttItemType.custom;
16
16
  static ɵfac: i0.ɵɵFactoryDeclaration<IsGanttCustomItemPipe, never>;
17
- static ɵpipe: i0.ɵɵPipeDeclaration<IsGanttCustomItemPipe, "isGanttCustomItem", false>;
17
+ static ɵpipe: i0.ɵɵPipeDeclaration<IsGanttCustomItemPipe, "isGanttCustomItem", true>;
18
18
  }
package/gantt.styles.d.ts CHANGED
@@ -1,9 +1,3 @@
1
- export declare const defaultStyles: {
2
- lineHeight: number;
3
- barHeight: number;
4
- };
5
- export declare const headerHeight = 44;
6
- export type GanttStyles = typeof defaultStyles;
7
1
  export declare const sideWidth = 400;
8
2
  export declare const sideMiddleWidth = 500;
9
3
  export declare const sideMaxWidth = 600;
package/package.json CHANGED
@@ -1,7 +1,9 @@
1
1
  {
2
2
  "name": "@worktile/gantt",
3
- "version": "16.1.0-next.1",
3
+ "version": "18.0.0-next.0",
4
4
  "schematics": "./schematics/collection.json",
5
+ "author": "walkerkay001",
6
+ "license": "MIT",
5
7
  "exports": {
6
8
  ".": {
7
9
  "sass": "./styles/index.scss",
@@ -24,9 +26,9 @@
24
26
  }
25
27
  },
26
28
  "peerDependencies": {
27
- "@angular/common": ">=16.0.0",
28
- "@angular/core": ">=16.0.0",
29
- "@angular/cdk": ">=16.0.0",
29
+ "@angular/common": ">=17.0.0",
30
+ "@angular/core": ">=17.0.0",
31
+ "@angular/cdk": ">=17.0.0",
30
32
  "rxjs": "^6.5.0 || ^7.0.0",
31
33
  "date-fns": ">=2.0.0"
32
34
  },
@@ -32,5 +32,5 @@ export declare class NgxGanttRootComponent implements OnInit, OnDestroy {
32
32
  scrollToToday(): void;
33
33
  scrollToDate(date: number | GanttDate): void;
34
34
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxGanttRootComponent, [null, null, null, null, null, { optional: true; }]>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxGanttRootComponent, "ngx-gantt-root", never, { "sideWidth": { "alias": "sideWidth"; "required": false; }; }, {}, ["sideTemplate", "mainTemplate"], ["*"], false, never>;
35
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxGanttRootComponent, "ngx-gantt-root", never, { "sideWidth": { "alias": "sideWidth"; "required": false; }; }, {}, ["sideTemplate", "mainTemplate"], ["*"], true, never>;
36
36
  }
package/styles/index.scss CHANGED
@@ -1,7 +1,5 @@
1
1
  @use './variables.scss';
2
2
  @use '../gantt.component.scss';
3
- // @use '../components/table/gantt-table.component.scss';
4
- // @use '../components/calendar/calendar.component.scss';
5
3
  @use '../components/table/gantt-table.scss';
6
4
  @use '../components/calendar/calendar.scss';
7
5
  @use '../components/drag-backdrop/drag-backdrop.component.scss';
@@ -6,12 +6,10 @@ $gantt-border-color: #eee !default;
6
6
  $gantt-bg-color: #fff !default;
7
7
  $gantt-side-shadow: 12px 0 16px -10px rgba(0, 0, 0, 0.15) !default;
8
8
  $gantt-container-background-color: #fafafa !default;
9
- $gantt-item-height: 44px !default;
10
9
  $gantt-group-background-color: rgba(
11
10
  $color: #f3f3f3,
12
11
  $alpha: 0.5
13
12
  ) !default;
14
- $gantt-group-height: 44px !default;
15
13
  $gantt-table-td-padding: 0 15px !default;
16
14
 
17
15
  // calendar
@@ -59,3 +57,7 @@ $gantt-loader-loading-color: $gantt-primary-color !default;
59
57
 
60
58
  // footer
61
59
  $gantt-footer-height: 44px !default;
60
+
61
+ // @deprecated, please use global config `GANTT_GLOBAL_CONFIG` set custom height
62
+ $gantt-item-height: none;
63
+ $gantt-group-height: none;
@@ -13,5 +13,5 @@ export declare class NgxGanttTableColumnComponent {
13
13
  constructor(ganttUpper: GanttUpper, elementRef: ElementRef);
14
14
  get classList(): DOMTokenList;
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxGanttTableColumnComponent, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxGanttTableColumnComponent, "ngx-gantt-column", never, { "width": { "alias": "width"; "required": false; }; "name": { "alias": "name"; "required": false; }; "showExpandIcon": { "alias": "showExpandIcon"; "required": false; }; }, {}, ["templateRef", "headerTemplateRef"], never, false, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxGanttTableColumnComponent, "ngx-gantt-column", never, { "width": { "alias": "width"; "required": false; }; "name": { "alias": "name"; "required": false; }; "showExpandIcon": { "alias": "showExpandIcon"; "required": false; }; }, {}, ["templateRef", "headerTemplateRef"], never, true, never>;
17
17
  }
@@ -13,5 +13,5 @@ export declare class NgxGanttTableComponent {
13
13
  tableEmptyTemplate: TemplateRef<any>;
14
14
  tableFooterTemplate: TemplateRef<any>;
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxGanttTableComponent, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxGanttTableComponent, "ngx-gantt-table", never, { "draggable": { "alias": "draggable"; "required": false; }; "dropEnterPredicate": { "alias": "dropEnterPredicate"; "required": false; }; }, { "dragDropped": "dragDropped"; "dragStarted": "dragStarted"; "dragEnded": "dragEnded"; "columnChanges": "columnChanges"; }, ["rowBeforeTemplate", "rowAfterTemplate", "tableEmptyTemplate", "tableFooterTemplate"], never, false, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxGanttTableComponent, "ngx-gantt-table", never, { "draggable": { "alias": "draggable"; "required": false; }; "dropEnterPredicate": { "alias": "dropEnterPredicate"; "required": false; }; }, { "dragDropped": "dragDropped"; "dragStarted": "dragStarted"; "dragEnded": "dragEnded"; "columnChanges": "columnChanges"; }, ["rowBeforeTemplate", "rowAfterTemplate", "tableEmptyTemplate", "tableFooterTemplate"], never, true, never>;
17
17
  }
package/utils/date.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { addYears, addMonths, addDays, addWeeks, addQuarters, getUnixTime, startOfDay, startOfWeek, startOfMonth, startOfQuarter, startOfYear, endOfDay, endOfWeek, endOfMonth, endOfQuarter, endOfYear, format, fromUnixTime, getDaysInMonth, addSeconds, setDate, addMinutes, addHours, differenceInCalendarDays, isWeekend, getWeek, isToday, differenceInDays, differenceInCalendarQuarters, eachMonthOfInterval, eachWeekOfInterval, eachDayOfInterval } from 'date-fns';
1
+ export { Locale, addDays, addHours, addMinutes, addMonths, addQuarters, addSeconds, addWeeks, addYears, differenceInCalendarDays, differenceInCalendarQuarters, differenceInDays, eachDayOfInterval, eachMonthOfInterval, eachWeekOfInterval, endOfDay, endOfMonth, endOfQuarter, endOfWeek, endOfYear, format, fromUnixTime, getDaysInMonth, getUnixTime, getWeek, isToday, isWeekend, setDate, startOfDay, startOfMonth, startOfQuarter, startOfWeek, startOfYear, startOfMinute, startOfHour, endOfMinute, endOfHour, differenceInMinutes, eachHourOfInterval } from 'date-fns';
2
2
  export type GanttDateUtil = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
3
3
  export declare class GanttDate {
4
4
  value: Date;
@@ -30,6 +30,8 @@ export declare class GanttDate {
30
30
  addMonths(amount: number): GanttDate;
31
31
  addQuarters(amount: number): GanttDate;
32
32
  addYears(amount: number): GanttDate;
33
+ startOfMinute(): GanttDate;
34
+ startOfHour(): GanttDate;
33
35
  startOfDay(): GanttDate;
34
36
  startOfWeek(options?: {
35
37
  locale?: Locale;
@@ -38,6 +40,8 @@ export declare class GanttDate {
38
40
  startOfMonth(): GanttDate;
39
41
  startOfQuarter(): GanttDate;
40
42
  startOfYear(): GanttDate;
43
+ endOfMinute(): GanttDate;
44
+ endOfHour(): GanttDate;
41
45
  endOfDay(): GanttDate;
42
46
  endOfWeek(options?: {
43
47
  locale?: Locale;
@@ -2,8 +2,8 @@ import { GanttItem, GanttItemInternal } from '../class/item';
2
2
  export interface Dictionary<T = unknown> {
3
3
  [key: string]: T;
4
4
  }
5
- export declare function isNumber(value: any): boolean;
6
- export declare function isString(value: any): boolean;
5
+ export declare function isNumber(value: any): value is number;
6
+ export declare function isString(value: any): value is string;
7
7
  export declare function isUndefined(value: any): boolean;
8
8
  export declare function hexToRgb(color: string, opacity?: number): string;
9
9
  export declare function uniqBy<T = unknown>(array: T[], key: keyof T): any[];
package/views/day.d.ts CHANGED
@@ -1,14 +1,14 @@
1
- import { GanttView, GanttViewOptions, GanttViewDate } from './view';
2
- import { GanttDate } from '../utils/date';
3
- import { GanttDatePoint } from '../class/date-point';
4
1
  import { GanttViewType } from '../class';
2
+ import { GanttDatePoint } from '../class/date-point';
3
+ import { GanttDate } from '../utils/date';
4
+ import { GanttView, GanttViewDate, GanttViewOptions } from './view';
5
5
  export declare class GanttViewDay extends GanttView {
6
6
  showWeekBackdrop: boolean;
7
7
  showTimeline: boolean;
8
8
  viewType: GanttViewType;
9
9
  constructor(start: GanttViewDate, end: GanttViewDate, options?: GanttViewOptions);
10
- startOf(date: GanttDate): GanttDate;
11
- endOf(date: GanttDate): GanttDate;
10
+ viewStartOf(date: GanttDate): GanttDate;
11
+ viewEndOf(date: GanttDate): GanttDate;
12
12
  getPrimaryWidth(): number;
13
13
  getDayOccupancyWidth(): number;
14
14
  getPrimaryDatePoints(): GanttDatePoint[];
@@ -5,5 +5,6 @@ import { GanttViewQuarter } from './quarter';
5
5
  import { GanttViewDay } from './day';
6
6
  import { GanttViewWeek } from './week';
7
7
  import { GanttViewYear } from './year';
8
+ import { GanttViewHour } from './hour';
8
9
  export declare function registerView<T extends typeof GanttView>(type: string, view: T): void;
9
- export declare function createViewFactory(type: GanttViewType, start: GanttViewDate, end: GanttViewDate, options?: GanttViewOptions): GanttViewMonth | GanttViewQuarter | GanttViewDay | GanttViewWeek | GanttViewYear;
10
+ export declare function createViewFactory(type: GanttViewType, start: GanttViewDate, end: GanttViewDate, options?: GanttViewOptions): GanttViewMonth | GanttViewQuarter | GanttViewDay | GanttViewWeek | GanttViewYear | GanttViewHour;
@@ -0,0 +1,20 @@
1
+ import { GanttViewType } from '../class';
2
+ import { GanttDatePoint } from '../class/date-point';
3
+ import { GanttDate } from '../utils/date';
4
+ import { GanttView, GanttViewDate, GanttViewOptions } from './view';
5
+ export declare class GanttViewHour extends GanttView {
6
+ showWeekBackdrop: boolean;
7
+ showTimeline: boolean;
8
+ viewType: GanttViewType;
9
+ constructor(start: GanttViewDate, end: GanttViewDate, options?: GanttViewOptions);
10
+ viewStartOf(date: GanttDate): GanttDate;
11
+ viewEndOf(date: GanttDate): GanttDate;
12
+ getPrimaryWidth(): number;
13
+ getDayOccupancyWidth(): number;
14
+ private getHourOccupancyWidth;
15
+ getPrimaryDatePoints(): GanttDatePoint[];
16
+ getSecondaryDatePoints(): GanttDatePoint[];
17
+ getTodayXPoint(): number;
18
+ getDateIntervalWidth(start: GanttDate, end: GanttDate): number;
19
+ getDateByXPoint(x: number): GanttDate;
20
+ }
package/views/month.d.ts CHANGED
@@ -5,8 +5,8 @@ import { GanttViewType } from '../class';
5
5
  export declare class GanttViewMonth extends GanttView {
6
6
  viewType: GanttViewType;
7
7
  constructor(start: GanttViewDate, end: GanttViewDate, options?: GanttViewOptions);
8
- startOf(date: GanttDate): GanttDate;
9
- endOf(date: GanttDate): GanttDate;
8
+ viewStartOf(date: GanttDate): GanttDate;
9
+ viewEndOf(date: GanttDate): GanttDate;
10
10
  getPrimaryWidth(): number;
11
11
  getDayOccupancyWidth(date: GanttDate): number;
12
12
  getPrimaryDatePoints(): GanttDatePoint[];
@@ -5,8 +5,8 @@ import { GanttViewType } from '../class';
5
5
  export declare class GanttViewQuarter extends GanttView {
6
6
  viewType: GanttViewType;
7
7
  constructor(start: GanttViewDate, end: GanttViewDate, options?: GanttViewOptions);
8
- startOf(date: GanttDate): GanttDate;
9
- endOf(date: GanttDate): GanttDate;
8
+ viewStartOf(date: GanttDate): GanttDate;
9
+ viewEndOf(date: GanttDate): GanttDate;
10
10
  getPrimaryWidth(): number;
11
11
  getDayOccupancyWidth(date: GanttDate): number;
12
12
  getPrimaryDatePoints(): GanttDatePoint[];
package/views/view.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { GanttDate, GanttDateUtil } from '../utils/date';
2
- import { GanttDatePoint } from '../class/date-point';
3
1
  import { BehaviorSubject } from 'rxjs';
4
- import { GanttDateFormat } from '../gantt.config';
5
2
  import { GanttViewType } from '../class';
6
- export declare const primaryDatePointTop = 18;
7
- export declare const secondaryDatePointTop = 36;
3
+ import { GanttDatePoint } from '../class/date-point';
4
+ import { GanttDateFormat } from '../gantt.config';
5
+ import { GanttDate, GanttDateUtil } from '../utils/date';
6
+ export declare const primaryDatePointTop = "40%";
7
+ export declare const secondaryDatePointTop = "80%";
8
8
  export interface GanttViewDate {
9
9
  date: GanttDate;
10
10
  isCustom?: boolean;
@@ -18,7 +18,8 @@ export interface GanttViewOptions {
18
18
  addAmount?: number;
19
19
  addUnit?: GanttDateUtil;
20
20
  dateFormat?: GanttDateFormat;
21
- fillDays?: number;
21
+ datePrecisionUnit?: 'day' | 'hour' | 'minute';
22
+ dragPreviewDateFormat?: string;
22
23
  [key: string]: any;
23
24
  }
24
25
  export declare abstract class GanttView {
@@ -36,13 +37,26 @@ export declare abstract class GanttView {
36
37
  showWeekBackdrop: boolean;
37
38
  options: GanttViewOptions;
38
39
  constructor(start: GanttViewDate, end: GanttViewDate, options: GanttViewOptions);
39
- abstract startOf(date: GanttDate): GanttDate;
40
- abstract endOf(date: GanttDate): GanttDate;
40
+ abstract viewStartOf(date: GanttDate): GanttDate;
41
+ abstract viewEndOf(date: GanttDate): GanttDate;
42
+ /**
43
+ * deprecated, please use viewStartOf()
44
+ * @deprecated
45
+ */
46
+ startOf(date: GanttDate): GanttDate;
47
+ /**
48
+ * deprecated, please use viewEndOf()
49
+ * @deprecated
50
+ */
51
+ endOf(date: GanttDate): GanttDate;
41
52
  abstract getPrimaryWidth(): number;
42
53
  abstract getDayOccupancyWidth(date: GanttDate): number;
43
54
  abstract getPrimaryDatePoints(): GanttDatePoint[];
44
55
  abstract getSecondaryDatePoints(): GanttDatePoint[];
45
- protected getDateIntervalWidth(start: GanttDate, end: GanttDate): number;
56
+ startOfPrecision(date: GanttDate): GanttDate;
57
+ endOfPrecision(date: GanttDate): GanttDate;
58
+ differenceByPrecisionUnit(dateLeft: GanttDate, dateRight: GanttDate): number;
59
+ getDateIntervalWidth(start: GanttDate, end: GanttDate): number;
46
60
  protected initialize(): void;
47
61
  addStartDate(): {
48
62
  start: GanttDate;
@@ -59,4 +73,5 @@ export declare abstract class GanttView {
59
73
  getXPointByDate(date: GanttDate): number;
60
74
  getDateByXPoint(x: number): GanttDate;
61
75
  getDateRangeWidth(start: GanttDate, end: GanttDate): number;
76
+ getMinRangeWidthByPrecisionUnit(date: GanttDate): number;
62
77
  }
package/views/week.d.ts CHANGED
@@ -5,8 +5,8 @@ import { GanttView, GanttViewDate, GanttViewOptions } from './view';
5
5
  export declare class GanttViewWeek extends GanttView {
6
6
  viewType: GanttViewType;
7
7
  constructor(start: GanttViewDate, end: GanttViewDate, options?: GanttViewOptions);
8
- startOf(date: GanttDate): GanttDate;
9
- endOf(date: GanttDate): GanttDate;
8
+ viewStartOf(date: GanttDate): GanttDate;
9
+ viewEndOf(date: GanttDate): GanttDate;
10
10
  getPrimaryWidth(): number;
11
11
  getDayOccupancyWidth(): number;
12
12
  getPrimaryDatePoints(): GanttDatePoint[];
package/views/year.d.ts CHANGED
@@ -5,8 +5,8 @@ import { GanttViewType } from '../class';
5
5
  export declare class GanttViewYear extends GanttView {
6
6
  viewType: GanttViewType;
7
7
  constructor(start: GanttViewDate, end: GanttViewDate, options?: GanttViewOptions);
8
- startOf(date: GanttDate): GanttDate;
9
- endOf(date: GanttDate): GanttDate;
8
+ viewStartOf(date: GanttDate): GanttDate;
9
+ viewEndOf(date: GanttDate): GanttDate;
10
10
  getPrimaryWidth(): number;
11
11
  getDayOccupancyWidth(date: GanttDate): number;
12
12
  getPrimaryDatePoints(): GanttDatePoint[];