@worktile/gantt 18.0.4 → 18.1.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.
- package/class/event.d.ts +3 -1
- package/class/item.d.ts +2 -2
- package/class/view-type.d.ts +0 -4
- package/components/icon/icons.d.ts +2 -0
- package/components/main/gantt-main.component.d.ts +14 -4
- package/components/toolbar/toolbar.component.d.ts +1 -6
- package/esm2022/class/event.mjs +4 -2
- package/esm2022/class/item.mjs +1 -1
- package/esm2022/class/view-type.mjs +1 -23
- package/esm2022/components/bar/bar-drag.mjs +3 -3
- package/esm2022/components/icon/icons.mjs +6 -2
- package/esm2022/components/main/gantt-main.component.mjs +39 -9
- package/esm2022/components/table/body/gantt-table-body.component.mjs +3 -3
- package/esm2022/components/toolbar/toolbar.component.mjs +6 -7
- package/esm2022/gantt-dom.service.mjs +18 -2
- package/esm2022/gantt-upper.mjs +21 -16
- package/esm2022/gantt.component.mjs +10 -5
- package/esm2022/gantt.config.mjs +48 -12
- package/esm2022/gantt.module.mjs +27 -20
- package/esm2022/gantt.pipe.mjs +16 -1
- package/esm2022/i18n/i18n.mjs +12 -0
- package/esm2022/i18n/index.mjs +18 -0
- package/esm2022/i18n/locales/de-de.mjs +51 -0
- package/esm2022/i18n/locales/en-us.mjs +49 -0
- package/esm2022/i18n/locales/ja-jp.mjs +49 -0
- package/esm2022/i18n/locales/ru-ru.mjs +51 -0
- package/esm2022/i18n/locales/zh-hans.mjs +49 -0
- package/esm2022/i18n/locales/zh-hant.mjs +49 -0
- package/esm2022/public-api.mjs +2 -1
- package/esm2022/root.component.mjs +3 -3
- package/esm2022/table/gantt-table.component.mjs +5 -2
- package/esm2022/utils/date.mjs +9 -4
- package/esm2022/views/day.mjs +6 -4
- package/esm2022/views/hour.mjs +5 -3
- package/esm2022/views/month.mjs +6 -4
- package/esm2022/views/quarter.mjs +6 -4
- package/esm2022/views/view.mjs +2 -3
- package/esm2022/views/week.mjs +6 -4
- package/esm2022/views/year.mjs +5 -3
- package/fesm2022/worktile-gantt.mjs +526 -119
- package/fesm2022/worktile-gantt.mjs.map +1 -1
- package/gantt-dom.service.d.ts +7 -1
- package/gantt-upper.d.ts +7 -4
- package/gantt.component.d.ts +1 -1
- package/gantt.component.scss +53 -0
- package/gantt.config.d.ts +19 -0
- package/gantt.module.d.ts +3 -4
- package/gantt.pipe.d.ts +5 -0
- package/i18n/i18n.d.ts +23 -0
- package/i18n/index.d.ts +10 -0
- package/i18n/locales/de-de.d.ts +49 -0
- package/i18n/locales/en-us.d.ts +48 -0
- package/i18n/locales/ja-jp.d.ts +48 -0
- package/i18n/locales/ru-ru.d.ts +49 -0
- package/i18n/locales/zh-hans.d.ts +48 -0
- package/i18n/locales/zh-hant.d.ts +48 -0
- package/package.json +3 -2
- package/public-api.d.ts +1 -0
- package/root.component.d.ts +1 -1
- package/table/gantt-table.component.d.ts +3 -2
- package/utils/date.d.ts +3 -1
- package/views/view.d.ts +9 -0
package/gantt-dom.service.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementRef, OnDestroy, NgZone } from '@angular/core';
|
|
1
|
+
import { ElementRef, OnDestroy, NgZone, WritableSignal } from '@angular/core';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare enum ScrollDirection {
|
|
@@ -23,6 +23,10 @@ export declare class GanttDomService implements OnDestroy {
|
|
|
23
23
|
mainItems: Element;
|
|
24
24
|
calendarOverlay: Element;
|
|
25
25
|
linksOverlay: Element;
|
|
26
|
+
visibleRangeX: WritableSignal<{
|
|
27
|
+
min: number;
|
|
28
|
+
max: number;
|
|
29
|
+
}>;
|
|
26
30
|
private mainFooter;
|
|
27
31
|
private mainScrollbar;
|
|
28
32
|
private unsubscribe$;
|
|
@@ -37,7 +41,9 @@ export declare class GanttDomService implements OnDestroy {
|
|
|
37
41
|
*/
|
|
38
42
|
getViewerScroll(options?: AddEventListenerOptions): Observable<ScrollEvent>;
|
|
39
43
|
getResize(): Observable<Event>;
|
|
44
|
+
getResizeByElement(element: Element): Observable<unknown>;
|
|
40
45
|
scrollMainContainer(left: number): void;
|
|
46
|
+
setVisibleRangeX(): void;
|
|
41
47
|
ngOnDestroy(): void;
|
|
42
48
|
static ɵfac: i0.ɵɵFactoryDeclaration<GanttDomService, never>;
|
|
43
49
|
static ɵprov: i0.ɵɵInjectableDeclaration<GanttDomService>;
|
package/gantt-upper.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { GanttItem, GanttGroup, GanttViewType, GanttLoadOnScrollEvent, GanttDrag
|
|
|
4
4
|
import { GanttView, GanttViewOptions } from './views/view';
|
|
5
5
|
import { Dictionary } from './utils/helpers';
|
|
6
6
|
import { GanttDragContainer } from './gantt-drag-container';
|
|
7
|
-
import { GanttGlobalConfig, GanttStyleOptions } from './gantt.config';
|
|
7
|
+
import { GanttConfigService, GanttGlobalConfig, GanttStyleOptions } from './gantt.config';
|
|
8
8
|
import { GanttLinkOptions } from './class/link';
|
|
9
9
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
10
10
|
import { BooleanInput } from '@angular/cdk/coercion';
|
|
@@ -15,7 +15,7 @@ export declare abstract class GanttUpper implements OnChanges, OnInit, OnDestroy
|
|
|
15
15
|
protected elementRef: ElementRef<HTMLElement>;
|
|
16
16
|
protected cdr: ChangeDetectorRef;
|
|
17
17
|
protected ngZone: NgZone;
|
|
18
|
-
config: GanttGlobalConfig;
|
|
18
|
+
protected config: GanttGlobalConfig;
|
|
19
19
|
originItems: GanttItem[];
|
|
20
20
|
originGroups: GanttGroup[];
|
|
21
21
|
originBaselineItems: GanttBaselineItem[];
|
|
@@ -35,6 +35,7 @@ export declare abstract class GanttUpper implements OnChanges, OnInit, OnDestroy
|
|
|
35
35
|
get selectable(): boolean;
|
|
36
36
|
set multiple(value: BooleanInput);
|
|
37
37
|
get multiple(): boolean;
|
|
38
|
+
quickTimeFocus: boolean;
|
|
38
39
|
loadOnScroll: EventEmitter<GanttLoadOnScrollEvent>;
|
|
39
40
|
dragStarted: EventEmitter<GanttDragEvent<unknown>>;
|
|
40
41
|
dragMoved: EventEmitter<GanttDragEvent<unknown>>;
|
|
@@ -49,6 +50,7 @@ export declare abstract class GanttUpper implements OnChanges, OnInit, OnDestroy
|
|
|
49
50
|
groupTemplate: TemplateRef<any>;
|
|
50
51
|
groupHeaderTemplate: TemplateRef<any>;
|
|
51
52
|
toolbarTemplate: TemplateRef<any>;
|
|
53
|
+
configService: GanttConfigService;
|
|
52
54
|
linkable: boolean;
|
|
53
55
|
computeAllRefs: boolean;
|
|
54
56
|
linkDragEnded: EventEmitter<GanttLinkDragEvent<unknown>>;
|
|
@@ -68,7 +70,8 @@ export declare abstract class GanttUpper implements OnChanges, OnInit, OnDestroy
|
|
|
68
70
|
private _multiple;
|
|
69
71
|
private _linkOptions;
|
|
70
72
|
ganttClass: boolean;
|
|
71
|
-
constructor(elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef, ngZone: NgZone, config: GanttGlobalConfig
|
|
73
|
+
constructor(elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef, ngZone: NgZone, // @Inject(GANTT_GLOBAL_CONFIG) public config: GanttGlobalConfig
|
|
74
|
+
config: GanttGlobalConfig);
|
|
72
75
|
private createView;
|
|
73
76
|
private setupGroups;
|
|
74
77
|
private setupItems;
|
|
@@ -93,6 +96,6 @@ export declare abstract class GanttUpper implements OnChanges, OnInit, OnDestroy
|
|
|
93
96
|
changeView(type: GanttViewType): void;
|
|
94
97
|
rerenderView(): void;
|
|
95
98
|
static ɵfac: i0.ɵɵFactoryDeclaration<GanttUpper, 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
|
+
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; }; "quickTimeFocus": { "alias": "quickTimeFocus"; "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>;
|
|
97
100
|
}
|
|
98
101
|
export declare const GANTT_UPPER_TOKEN: InjectionToken<GanttUpper>;
|
package/gantt.component.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export declare class NgxGanttComponent extends GanttUpper implements OnInit, OnC
|
|
|
50
50
|
expandChildren(item: GanttItemInternal): void;
|
|
51
51
|
selectItem(selectEvent: GanttSelectedEvent): void;
|
|
52
52
|
scrollToToday(): void;
|
|
53
|
-
scrollToDate(date: number | GanttDate): void;
|
|
53
|
+
scrollToDate(date: number | Date | GanttDate): void;
|
|
54
54
|
scrolledIndexChange(index: number): void;
|
|
55
55
|
expandGroups(expanded: boolean): void;
|
|
56
56
|
expandGroup(group: GanttGroupInternal): void;
|
package/gantt.component.scss
CHANGED
|
@@ -110,6 +110,59 @@
|
|
|
110
110
|
background-color: rgba($color: variables.$gantt-table-header-drag-line-color, $alpha: 0.1);
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
+
|
|
114
|
+
.gantt-quick-time-focus-container {
|
|
115
|
+
position: absolute;
|
|
116
|
+
left: 0;
|
|
117
|
+
top: 0;
|
|
118
|
+
.gantt-quick-time-focus {
|
|
119
|
+
position: sticky;
|
|
120
|
+
left: 0;
|
|
121
|
+
width: 0px;
|
|
122
|
+
z-index: 3;
|
|
123
|
+
pointer-events: none;
|
|
124
|
+
|
|
125
|
+
&-item {
|
|
126
|
+
display: flex;
|
|
127
|
+
justify-content: space-between;
|
|
128
|
+
align-items: center;
|
|
129
|
+
span {
|
|
130
|
+
width: 24px;
|
|
131
|
+
height: 24px;
|
|
132
|
+
display: flex;
|
|
133
|
+
justify-content: center;
|
|
134
|
+
align-items: center;
|
|
135
|
+
margin-bottom: 2px;
|
|
136
|
+
pointer-events: all;
|
|
137
|
+
&:hover {
|
|
138
|
+
.gantt-quick-time-focus-item-arrow {
|
|
139
|
+
border: 1px solid rgba(variables.$gantt-primary-color, 1);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&-arrow {
|
|
145
|
+
width: 20px;
|
|
146
|
+
height: 20px;
|
|
147
|
+
display: flex;
|
|
148
|
+
justify-content: center;
|
|
149
|
+
align-items: center;
|
|
150
|
+
cursor: pointer;
|
|
151
|
+
background-color: variables.$gantt-bar-bg;
|
|
152
|
+
border: 1px solid variables.$gantt-border-color;
|
|
153
|
+
border-radius: 4px;
|
|
154
|
+
box-shadow: 0 4px 7px 1px rgba(0, 0, 0, 0.05);
|
|
155
|
+
.gantt-icon {
|
|
156
|
+
display: inline-block;
|
|
157
|
+
svg {
|
|
158
|
+
width: 14px;
|
|
159
|
+
height: 14px;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
113
166
|
}
|
|
114
167
|
|
|
115
168
|
.gantt-normal-viewport {
|
package/gantt.config.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { Locale } from 'date-fns';
|
|
3
3
|
import { GanttLinkOptions } from './class/link';
|
|
4
|
+
import { GanttI18nLocale } from './i18n/i18n';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
4
6
|
export interface GanttDateFormat {
|
|
5
7
|
hour?: string;
|
|
6
8
|
day?: string;
|
|
@@ -12,7 +14,12 @@ export interface GanttDateFormat {
|
|
|
12
14
|
yearQuarter?: string;
|
|
13
15
|
}
|
|
14
16
|
export interface GanttDateOptions {
|
|
17
|
+
/**
|
|
18
|
+
* @deprecated dateOptions is deprecated, use i18n locale setting instead
|
|
19
|
+
* http://gantt.ngnice.com/guides/configuration/i18n
|
|
20
|
+
*/
|
|
15
21
|
locale?: Locale;
|
|
22
|
+
timeZone?: string;
|
|
16
23
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
17
24
|
}
|
|
18
25
|
export interface GanttStyleOptions {
|
|
@@ -21,6 +28,8 @@ export interface GanttStyleOptions {
|
|
|
21
28
|
barHeight?: number;
|
|
22
29
|
}
|
|
23
30
|
export interface GanttGlobalConfig {
|
|
31
|
+
locale?: GanttI18nLocale | string;
|
|
32
|
+
/** @deprecated dateFormat is deprecated, please configure through i18n. http://gantt.ngnice.com/guides/configuration/i18n */
|
|
24
33
|
dateFormat?: GanttDateFormat;
|
|
25
34
|
dateOptions?: GanttDateOptions;
|
|
26
35
|
linkOptions?: GanttLinkOptions;
|
|
@@ -28,3 +37,13 @@ export interface GanttGlobalConfig {
|
|
|
28
37
|
}
|
|
29
38
|
export declare const defaultConfig: GanttGlobalConfig;
|
|
30
39
|
export declare const GANTT_GLOBAL_CONFIG: InjectionToken<GanttGlobalConfig>;
|
|
40
|
+
export declare class GanttConfigService {
|
|
41
|
+
config: GanttGlobalConfig;
|
|
42
|
+
private i18nLocales;
|
|
43
|
+
constructor(globalConfig: GanttGlobalConfig);
|
|
44
|
+
private getLocaleConfig;
|
|
45
|
+
getViewsLocale(): any;
|
|
46
|
+
getDateLocal(): any;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GanttConfigService, never>;
|
|
48
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GanttConfigService>;
|
|
49
|
+
}
|
package/gantt.module.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { GanttGlobalConfig } from './gantt.config';
|
|
2
1
|
import * as i0 from "@angular/core";
|
|
3
2
|
import * as i1 from "@angular/common";
|
|
4
3
|
import * as i2 from "@angular/cdk/drag-drop";
|
|
@@ -23,8 +22,8 @@ import * as i20 from "./components/toolbar/toolbar.component";
|
|
|
23
22
|
import * as i21 from "./components/scrollbar/scrollbar.component";
|
|
24
23
|
import * as i22 from "./gantt.pipe";
|
|
25
24
|
export declare class NgxGanttModule {
|
|
26
|
-
constructor(
|
|
27
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxGanttModule,
|
|
28
|
-
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.GanttScrollbarComponent, typeof i22.IsGanttRangeItemPipe, typeof i22.IsGanttBarItemPipe, typeof i22.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, typeof i21.GanttScrollbarComponent]>;
|
|
25
|
+
constructor();
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxGanttModule, never>;
|
|
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.GanttScrollbarComponent, typeof i22.IsGanttRangeItemPipe, typeof i22.IsGanttBarItemPipe, typeof i22.IsGanttCustomItemPipe, typeof i22.GanttDateFormatPipe], [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, typeof i21.GanttScrollbarComponent, typeof i22.GanttDateFormatPipe]>;
|
|
29
28
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxGanttModule>;
|
|
30
29
|
}
|
package/gantt.pipe.d.ts
CHANGED
|
@@ -16,3 +16,8 @@ export declare class IsGanttCustomItemPipe implements PipeTransform {
|
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<IsGanttCustomItemPipe, never>;
|
|
17
17
|
static ɵpipe: i0.ɵɵPipeDeclaration<IsGanttCustomItemPipe, "isGanttCustomItem", true>;
|
|
18
18
|
}
|
|
19
|
+
export declare class GanttDateFormatPipe implements PipeTransform {
|
|
20
|
+
transform(value: number | string, format: string): string;
|
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GanttDateFormatPipe, never>;
|
|
22
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<GanttDateFormatPipe, "dateFormat", true>;
|
|
23
|
+
}
|
package/i18n/i18n.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
import { Locale as DateFnsLocale } from 'date-fns';
|
|
3
|
+
import { GanttViewType } from '../class';
|
|
4
|
+
export declare enum GanttI18nLocale {
|
|
5
|
+
zhHans = "zh-hans",
|
|
6
|
+
zhHant = "zh-hant",
|
|
7
|
+
enUs = "en-us",
|
|
8
|
+
deDe = "de-de",
|
|
9
|
+
jaJp = "ja-jp",
|
|
10
|
+
ruRu = "ru-ru"
|
|
11
|
+
}
|
|
12
|
+
export type GanttI18nLocaleConfig = {
|
|
13
|
+
id: GanttI18nLocale | string;
|
|
14
|
+
dateLocale?: DateFnsLocale;
|
|
15
|
+
views: Record<GanttViewType, {
|
|
16
|
+
label: string;
|
|
17
|
+
dateFormats: {
|
|
18
|
+
primary?: string;
|
|
19
|
+
secondary?: string;
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
22
|
+
};
|
|
23
|
+
export declare const GANTT_I18N_LOCALE_TOKEN: InjectionToken<GanttI18nLocaleConfig[]>;
|
package/i18n/index.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as zhHansLocale } from './locales/zh-hans';
|
|
2
|
+
import { default as zhHantLocale } from './locales/zh-hant';
|
|
3
|
+
import { default as enUsLocale } from './locales/en-us';
|
|
4
|
+
import { default as jaJpLocale } from './locales/ja-jp';
|
|
5
|
+
import { default as deDeLocale } from './locales/de-de';
|
|
6
|
+
import { default as ruRuLocale } from './locales/ru-ru';
|
|
7
|
+
import { Provider } from '@angular/core';
|
|
8
|
+
export * from './i18n';
|
|
9
|
+
export { zhHansLocale, zhHantLocale, enUsLocale, jaJpLocale, deDeLocale, ruRuLocale };
|
|
10
|
+
export declare const i18nLocaleProvides: Provider[];
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { GanttI18nLocale } from '../i18n';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: GanttI18nLocale;
|
|
4
|
+
dateLocale: import("date-fns/locale").Locale;
|
|
5
|
+
views: {
|
|
6
|
+
hour: {
|
|
7
|
+
label: string;
|
|
8
|
+
dateFormats: {
|
|
9
|
+
primary: string;
|
|
10
|
+
secondary: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
day: {
|
|
14
|
+
label: string;
|
|
15
|
+
dateFormats: {
|
|
16
|
+
primary: string;
|
|
17
|
+
secondary: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
week: {
|
|
21
|
+
label: string;
|
|
22
|
+
dateFormats: {
|
|
23
|
+
primary: string;
|
|
24
|
+
secondary: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
month: {
|
|
28
|
+
label: string;
|
|
29
|
+
dateFormats: {
|
|
30
|
+
primary: string;
|
|
31
|
+
secondary: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
quarter: {
|
|
35
|
+
label: string;
|
|
36
|
+
dateFormats: {
|
|
37
|
+
primary: string;
|
|
38
|
+
secondary: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
year: {
|
|
42
|
+
label: string;
|
|
43
|
+
dateFormats: {
|
|
44
|
+
secondary: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { GanttI18nLocale } from '../i18n';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: GanttI18nLocale;
|
|
4
|
+
views: {
|
|
5
|
+
hour: {
|
|
6
|
+
label: string;
|
|
7
|
+
dateFormats: {
|
|
8
|
+
primary: string;
|
|
9
|
+
secondary: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
day: {
|
|
13
|
+
label: string;
|
|
14
|
+
dateFormats: {
|
|
15
|
+
primary: string;
|
|
16
|
+
secondary: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
week: {
|
|
20
|
+
label: string;
|
|
21
|
+
dateFormats: {
|
|
22
|
+
primary: string;
|
|
23
|
+
secondary: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
month: {
|
|
27
|
+
label: string;
|
|
28
|
+
dateFormats: {
|
|
29
|
+
primary: string;
|
|
30
|
+
secondary: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
quarter: {
|
|
34
|
+
label: string;
|
|
35
|
+
dateFormats: {
|
|
36
|
+
primary: string;
|
|
37
|
+
secondary: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
year: {
|
|
41
|
+
label: string;
|
|
42
|
+
dateFormats: {
|
|
43
|
+
secondary: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { GanttI18nLocale } from '../i18n';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: GanttI18nLocale;
|
|
4
|
+
views: {
|
|
5
|
+
hour: {
|
|
6
|
+
label: string;
|
|
7
|
+
dateFormats: {
|
|
8
|
+
primary: string;
|
|
9
|
+
secondary: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
day: {
|
|
13
|
+
label: string;
|
|
14
|
+
dateFormats: {
|
|
15
|
+
primary: string;
|
|
16
|
+
secondary: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
week: {
|
|
20
|
+
label: string;
|
|
21
|
+
dateFormats: {
|
|
22
|
+
primary: string;
|
|
23
|
+
secondary: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
month: {
|
|
27
|
+
label: string;
|
|
28
|
+
dateFormats: {
|
|
29
|
+
primary: string;
|
|
30
|
+
secondary: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
quarter: {
|
|
34
|
+
label: string;
|
|
35
|
+
dateFormats: {
|
|
36
|
+
primary: string;
|
|
37
|
+
secondary: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
year: {
|
|
41
|
+
label: string;
|
|
42
|
+
dateFormats: {
|
|
43
|
+
secondary: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { GanttI18nLocale } from '../i18n';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: GanttI18nLocale;
|
|
4
|
+
dateLocale: import("date-fns/locale").Locale;
|
|
5
|
+
views: {
|
|
6
|
+
hour: {
|
|
7
|
+
label: string;
|
|
8
|
+
dateFormats: {
|
|
9
|
+
primary: string;
|
|
10
|
+
secondary: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
day: {
|
|
14
|
+
label: string;
|
|
15
|
+
dateFormats: {
|
|
16
|
+
primary: string;
|
|
17
|
+
secondary: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
week: {
|
|
21
|
+
label: string;
|
|
22
|
+
dateFormats: {
|
|
23
|
+
primary: string;
|
|
24
|
+
secondary: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
month: {
|
|
28
|
+
label: string;
|
|
29
|
+
dateFormats: {
|
|
30
|
+
primary: string;
|
|
31
|
+
secondary: string;
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
quarter: {
|
|
35
|
+
label: string;
|
|
36
|
+
dateFormats: {
|
|
37
|
+
primary: string;
|
|
38
|
+
secondary: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
year: {
|
|
42
|
+
label: string;
|
|
43
|
+
dateFormats: {
|
|
44
|
+
secondary: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { GanttI18nLocale } from '../i18n';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: GanttI18nLocale;
|
|
4
|
+
views: {
|
|
5
|
+
hour: {
|
|
6
|
+
label: string;
|
|
7
|
+
dateFormats: {
|
|
8
|
+
primary: string;
|
|
9
|
+
secondary: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
day: {
|
|
13
|
+
label: string;
|
|
14
|
+
dateFormats: {
|
|
15
|
+
primary: string;
|
|
16
|
+
secondary: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
week: {
|
|
20
|
+
label: string;
|
|
21
|
+
dateFormats: {
|
|
22
|
+
primary: string;
|
|
23
|
+
secondary: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
month: {
|
|
27
|
+
label: string;
|
|
28
|
+
dateFormats: {
|
|
29
|
+
primary: string;
|
|
30
|
+
secondary: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
quarter: {
|
|
34
|
+
label: string;
|
|
35
|
+
dateFormats: {
|
|
36
|
+
primary: string;
|
|
37
|
+
secondary: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
year: {
|
|
41
|
+
label: string;
|
|
42
|
+
dateFormats: {
|
|
43
|
+
secondary: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export default _default;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { GanttI18nLocale } from '../i18n';
|
|
2
|
+
declare const _default: {
|
|
3
|
+
id: GanttI18nLocale;
|
|
4
|
+
views: {
|
|
5
|
+
hour: {
|
|
6
|
+
label: string;
|
|
7
|
+
dateFormats: {
|
|
8
|
+
primary: string;
|
|
9
|
+
secondary: string;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
day: {
|
|
13
|
+
label: string;
|
|
14
|
+
dateFormats: {
|
|
15
|
+
primary: string;
|
|
16
|
+
secondary: string;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
week: {
|
|
20
|
+
label: string;
|
|
21
|
+
dateFormats: {
|
|
22
|
+
primary: string;
|
|
23
|
+
secondary: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
month: {
|
|
27
|
+
label: string;
|
|
28
|
+
dateFormats: {
|
|
29
|
+
primary: string;
|
|
30
|
+
secondary: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
quarter: {
|
|
34
|
+
label: string;
|
|
35
|
+
dateFormats: {
|
|
36
|
+
primary: string;
|
|
37
|
+
secondary: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
year: {
|
|
41
|
+
label: string;
|
|
42
|
+
dateFormats: {
|
|
43
|
+
secondary: string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export default _default;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worktile/gantt",
|
|
3
|
-
"version": "18.0.
|
|
3
|
+
"version": "18.1.0-next.0",
|
|
4
4
|
"schematics": "./schematics/collection.json",
|
|
5
5
|
"author": "walkerkay001",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,8 @@
|
|
|
30
30
|
"@angular/core": ">=17.0.0",
|
|
31
31
|
"@angular/cdk": ">=17.0.0",
|
|
32
32
|
"rxjs": "^6.5.0 || ^7.0.0",
|
|
33
|
-
"date-fns": ">=
|
|
33
|
+
"date-fns": ">=4.0.0",
|
|
34
|
+
"@date-fns/tz": ">=1.0.0"
|
|
34
35
|
},
|
|
35
36
|
"module": "fesm2022/worktile-gantt.mjs",
|
|
36
37
|
"typings": "index.d.ts",
|
package/public-api.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export * from './components/loader/loader.component';
|
|
|
12
12
|
export * from './utils/date';
|
|
13
13
|
export * from './class';
|
|
14
14
|
export * from './views/view';
|
|
15
|
+
export { GanttI18nLocaleConfig, GanttI18nLocale, GANTT_I18N_LOCALE_TOKEN, zhHansLocale, zhHantLocale, enUsLocale, jaJpLocale, deDeLocale, ruRuLocale } from './i18n';
|
|
15
16
|
export { registerView } from './views/factory';
|
|
16
17
|
export * from './gantt-item-upper';
|
|
17
18
|
export * from './gantt.pipe';
|
package/root.component.d.ts
CHANGED
|
@@ -30,7 +30,7 @@ export declare class NgxGanttRootComponent implements OnInit, OnDestroy {
|
|
|
30
30
|
private setupResize;
|
|
31
31
|
private setupScrollClass;
|
|
32
32
|
scrollToToday(): void;
|
|
33
|
-
scrollToDate(date: number | GanttDate): void;
|
|
33
|
+
scrollToDate(date: number | Date | GanttDate): void;
|
|
34
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<NgxGanttRootComponent, [null, null, null, null, null, { optional: true; }]>;
|
|
35
35
|
static ɵcmp: i0.ɵɵComponentDeclaration<NgxGanttRootComponent, "ngx-gantt-root", never, { "sideWidth": { "alias": "sideWidth"; "required": false; }; }, {}, ["sideTemplate", "mainTemplate"], ["*"], true, never>;
|
|
36
36
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter, TemplateRef } from '@angular/core';
|
|
2
|
-
import { GanttTableDragEnterPredicateContext, GanttTableDragDroppedEvent, GanttTableEvent, GanttTableDragStartedEvent, GanttTableDragEndedEvent } from '../class';
|
|
2
|
+
import { GanttTableDragEnterPredicateContext, GanttTableDragDroppedEvent, GanttTableEvent, GanttTableDragStartedEvent, GanttTableDragEndedEvent, GanttTableItemClickEvent } from '../class';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class NgxGanttTableComponent {
|
|
5
5
|
draggable: boolean;
|
|
@@ -8,10 +8,11 @@ export declare class NgxGanttTableComponent {
|
|
|
8
8
|
dragStarted: EventEmitter<GanttTableDragStartedEvent<unknown>>;
|
|
9
9
|
dragEnded: EventEmitter<GanttTableDragEndedEvent<unknown>>;
|
|
10
10
|
columnChanges: EventEmitter<GanttTableEvent>;
|
|
11
|
+
itemClick: EventEmitter<GanttTableItemClickEvent<unknown>>;
|
|
11
12
|
rowBeforeTemplate: TemplateRef<any>;
|
|
12
13
|
rowAfterTemplate: TemplateRef<any>;
|
|
13
14
|
tableEmptyTemplate: TemplateRef<any>;
|
|
14
15
|
tableFooterTemplate: TemplateRef<any>;
|
|
15
16
|
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, true, never>;
|
|
17
|
+
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"; "itemClick": "itemClick"; }, ["rowBeforeTemplate", "rowAfterTemplate", "tableEmptyTemplate", "tableFooterTemplate"], never, true, never>;
|
|
17
18
|
}
|
package/utils/date.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { Locale, FirstWeekContainsDate } from 'date-fns';
|
|
1
2
|
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
3
|
export type GanttDateUtil = 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
4
|
+
export declare function setDefaultTimeZone(zone: string): void;
|
|
3
5
|
export declare class GanttDate {
|
|
4
6
|
value: Date;
|
|
5
7
|
constructor(date?: Date | string | number);
|
|
@@ -54,7 +56,7 @@ export declare class GanttDate {
|
|
|
54
56
|
format(mat: string, options?: {
|
|
55
57
|
locale?: Locale;
|
|
56
58
|
weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
57
|
-
firstWeekContainsDate?:
|
|
59
|
+
firstWeekContainsDate?: FirstWeekContainsDate;
|
|
58
60
|
useAdditionalWeekYearTokens?: boolean;
|
|
59
61
|
useAdditionalDayOfYearTokens?: boolean;
|
|
60
62
|
}): string;
|
package/views/view.d.ts
CHANGED
|
@@ -17,7 +17,12 @@ export interface GanttViewOptions {
|
|
|
17
17
|
cellWidth?: number;
|
|
18
18
|
addAmount?: number;
|
|
19
19
|
addUnit?: GanttDateUtil;
|
|
20
|
+
/** @deprecated dateFormat is deprecated, please use dateDisplayFormats or setting i18n locale */
|
|
20
21
|
dateFormat?: GanttDateFormat;
|
|
22
|
+
dateDisplayFormats?: {
|
|
23
|
+
primary?: string;
|
|
24
|
+
secondary?: string;
|
|
25
|
+
};
|
|
21
26
|
datePrecisionUnit?: 'day' | 'hour' | 'minute';
|
|
22
27
|
dragPreviewDateFormat?: string;
|
|
23
28
|
[key: string]: any;
|
|
@@ -36,6 +41,10 @@ export declare abstract class GanttView {
|
|
|
36
41
|
showTimeline: boolean;
|
|
37
42
|
showWeekBackdrop: boolean;
|
|
38
43
|
options: GanttViewOptions;
|
|
44
|
+
dateFormats: {
|
|
45
|
+
primary?: string;
|
|
46
|
+
secondary?: string;
|
|
47
|
+
};
|
|
39
48
|
constructor(start: GanttViewDate, end: GanttViewDate, options: GanttViewOptions);
|
|
40
49
|
abstract viewStartOf(date: GanttDate): GanttDate;
|
|
41
50
|
abstract viewEndOf(date: GanttDate): GanttDate;
|