@worktile/gantt 18.0.5 → 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/item.d.ts +2 -2
- package/class/view-type.d.ts +0 -4
- package/components/toolbar/toolbar.component.d.ts +1 -6
- 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/toolbar/toolbar.component.mjs +6 -7
- package/esm2022/gantt-upper.mjs +17 -15
- package/esm2022/gantt.component.mjs +1 -1
- 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 +2 -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 +449 -102
- package/fesm2022/worktile-gantt.mjs.map +1 -1
- package/gantt-upper.d.ts +5 -3
- package/gantt.component.d.ts +1 -1
- 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/utils/date.d.ts +3 -1
- package/views/view.d.ts +9 -0
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[];
|
|
@@ -50,6 +50,7 @@ export declare abstract class GanttUpper implements OnChanges, OnInit, OnDestroy
|
|
|
50
50
|
groupTemplate: TemplateRef<any>;
|
|
51
51
|
groupHeaderTemplate: TemplateRef<any>;
|
|
52
52
|
toolbarTemplate: TemplateRef<any>;
|
|
53
|
+
configService: GanttConfigService;
|
|
53
54
|
linkable: boolean;
|
|
54
55
|
computeAllRefs: boolean;
|
|
55
56
|
linkDragEnded: EventEmitter<GanttLinkDragEvent<unknown>>;
|
|
@@ -69,7 +70,8 @@ export declare abstract class GanttUpper implements OnChanges, OnInit, OnDestroy
|
|
|
69
70
|
private _multiple;
|
|
70
71
|
private _linkOptions;
|
|
71
72
|
ganttClass: boolean;
|
|
72
|
-
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);
|
|
73
75
|
private createView;
|
|
74
76
|
private setupGroups;
|
|
75
77
|
private setupItems;
|
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.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
|
}
|
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;
|