@progress/kendo-angular-gantt 13.2.0-develop.2 → 13.2.0-develop.4

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.
@@ -10,8 +10,10 @@ import * as i0 from "@angular/core";
10
10
  export declare class OptionChangesService {
11
11
  readonly viewChanges: EventEmitter<any>;
12
12
  readonly columnChanges: EventEmitter<any>;
13
+ readonly dateFormatChanges: EventEmitter<any>;
13
14
  notifyColumnChanges(): void;
14
15
  notifyViewChanges(): void;
16
+ notifyDateFormatChanges(): void;
15
17
  static ɵfac: i0.ɵɵFactoryDeclaration<OptionChangesService, never>;
16
18
  static ɵprov: i0.ɵɵInjectableDeclaration<OptionChangesService>;
17
19
  }
@@ -11,6 +11,7 @@ export class OptionChangesService {
11
11
  constructor() {
12
12
  this.viewChanges = new EventEmitter();
13
13
  this.columnChanges = new EventEmitter();
14
+ this.dateFormatChanges = new EventEmitter();
14
15
  }
15
16
  notifyColumnChanges() {
16
17
  this.columnChanges.emit();
@@ -18,6 +19,9 @@ export class OptionChangesService {
18
19
  notifyViewChanges() {
19
20
  this.viewChanges.emit();
20
21
  }
22
+ notifyDateFormatChanges() {
23
+ this.dateFormatChanges.emit();
24
+ }
21
25
  }
22
26
  OptionChangesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: OptionChangesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
23
27
  OptionChangesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: OptionChangesService });
@@ -412,6 +412,9 @@ export class GanttComponent {
412
412
  this.optionChangesSubscriptions.add(this.optionChangesService.viewChanges.subscribe(() => {
413
413
  this.loadTimelineData();
414
414
  }));
415
+ this.optionChangesSubscriptions.add(this.optionChangesService.dateFormatChanges.subscribe(() => {
416
+ this.loadTimelineData();
417
+ }));
415
418
  this.optionChangesSubscriptions.add(this.optionChangesService.columnChanges.subscribe(() => {
416
419
  this.treeList.columns.notifyOnChanges();
417
420
  }));
@@ -0,0 +1,5 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ export {};
@@ -9,7 +9,7 @@ export const packageMetadata = {
9
9
  name: '@progress/kendo-angular-gantt',
10
10
  productName: 'Kendo UI for Angular',
11
11
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
12
- publishDate: 1688401408,
13
- version: '13.2.0-develop.2',
12
+ publishDate: 1688648456,
13
+ version: '13.2.0-develop.4',
14
14
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
15
15
  };
@@ -21,6 +21,10 @@ export const HOUR_FORMAT = 'HH:mm aa';
21
21
  * @hidden
22
22
  */
23
23
  export const MONTH_FORMAT = 'MMM';
24
+ /**
25
+ * @hidden
26
+ */
27
+ export const YEAR_FORMAT = 'yyyy';
24
28
  /**
25
29
  * @hidden
26
30
  */
@@ -61,13 +65,14 @@ let TimelineBaseViewService = class TimelineBaseViewService {
61
65
  * @param end - The tasks' range end date
62
66
  * @returns {Array<Object>} - A collection containing the hour slots
63
67
  */
64
- getHours(start, end) {
68
+ getHours(start, end, customDateFormat) {
65
69
  const slots = [];
66
70
  const workDayStart = this.intlService.parseDate(this.options.workDayStart).getHours();
67
71
  const workDayEnd = this.intlService.parseDate(this.options.workDayEnd).getHours();
68
72
  // TODO: retrieve from option?
69
73
  const hourSpan = 1;
70
74
  let startDate = new Date(start);
75
+ const hoursFormat = customDateFormat ? customDateFormat : HOUR_FORMAT;
71
76
  const endDate = new Date(end);
72
77
  while (startDate < endDate) {
73
78
  const slotEnd = new Date(startDate);
@@ -77,7 +82,7 @@ let TimelineBaseViewService = class TimelineBaseViewService {
77
82
  start: startDate,
78
83
  end: slotEnd,
79
84
  isWorking: isWorkSlot,
80
- text: this.intlService.formatDate(startDate, HOUR_FORMAT, this.localeId),
85
+ text: this.intlService.formatDate(startDate, hoursFormat, this.localeId),
81
86
  span: 1,
82
87
  slotWidth: this.options.slotWidth
83
88
  });
@@ -91,9 +96,10 @@ let TimelineBaseViewService = class TimelineBaseViewService {
91
96
  * @param end - The tasks' range end date
92
97
  * @returns {Array<Object>} - A collection containing the day slots
93
98
  */
94
- getDays(start, end) {
99
+ getDays(start, end, customDateFormat) {
95
100
  const slots = [];
96
101
  let startDay = new Date(start);
102
+ const dayFormat = customDateFormat ? customDateFormat : DAY_FORMAT;
97
103
  const endDay = new Date(end);
98
104
  while (startDay <= endDay) {
99
105
  // Get the days with cleared time values (except for start and end day)
@@ -105,7 +111,7 @@ let TimelineBaseViewService = class TimelineBaseViewService {
105
111
  start: startDay,
106
112
  end: slotEnd,
107
113
  isWorking: isWorking,
108
- text: this.intlService.formatDate(startDay, DAY_FORMAT, this.localeId),
114
+ text: this.intlService.formatDate(startDay, dayFormat, this.localeId),
109
115
  span: 1,
110
116
  slotWidth: this.options.slotWidth
111
117
  });
@@ -113,18 +119,19 @@ let TimelineBaseViewService = class TimelineBaseViewService {
113
119
  }
114
120
  return slots;
115
121
  }
116
- getWeeks(start, end) {
122
+ getWeeks(start, end, customDateFormat) {
117
123
  const weekStart = this.intlService.firstDay();
118
124
  const slots = [];
119
125
  let startDay = new Date(start);
126
+ const dayFormat = customDateFormat ? customDateFormat : DAY_FORMAT;
120
127
  const endDay = new Date(end);
121
128
  while (startDay <= endDay) {
122
129
  const lastWeekDay = lastDayOfWeek(startDay, weekStart);
123
130
  const slotEnd = lastWeekDay > endDay ? endDay : lastWeekDay;
124
131
  const daySlots = this.getDays(startDay, slotEnd);
125
132
  const span = daySlots.length;
126
- const firstDay = this.intlService.formatDate(firstDayInWeek(getDate(startDay), weekStart), DAY_FORMAT, this.localeId);
127
- const lastDay = this.intlService.formatDate(slotEnd, DAY_FORMAT, this.localeId);
133
+ const firstDay = this.intlService.formatDate(firstDayInWeek(getDate(startDay), weekStart), dayFormat, this.localeId);
134
+ const lastDay = this.intlService.formatDate(slotEnd, dayFormat, this.localeId);
128
135
  if (span > 0) {
129
136
  slots.push({
130
137
  start: daySlots[0].start,
@@ -138,9 +145,10 @@ let TimelineBaseViewService = class TimelineBaseViewService {
138
145
  }
139
146
  return slots;
140
147
  }
141
- getMonths(start, end, isMainViewType) {
148
+ getMonths(start, end, isMainViewType, customDateFormat) {
142
149
  const slots = [];
143
150
  let startDay = new Date(start);
151
+ const monthFormat = customDateFormat ? customDateFormat : MONTH_FORMAT;
144
152
  const endDay = new Date(end);
145
153
  while (startDay < endDay) {
146
154
  const endMonth = lastDayOfMonth(startDay);
@@ -149,7 +157,7 @@ let TimelineBaseViewService = class TimelineBaseViewService {
149
157
  const weekSlots = this.getWeeks(startDay, slotEnd);
150
158
  const span = isMainViewType ? daySlots.length : weekSlots.length;
151
159
  const monthStart = firstDayOfMonth(getDate(startDay));
152
- const shortText = this.intlService.formatDate(monthStart, MONTH_FORMAT, this.localeId);
160
+ const shortText = this.intlService.formatDate(monthStart, monthFormat, this.localeId);
153
161
  if (span > 0) {
154
162
  slots.push({
155
163
  start: isMainViewType ? daySlots[0].start : weekSlots[0].start,
@@ -163,10 +171,11 @@ let TimelineBaseViewService = class TimelineBaseViewService {
163
171
  }
164
172
  return slots;
165
173
  }
166
- getYears(start, end) {
174
+ getYears(start, end, customDateFormat) {
167
175
  const slots = [];
168
176
  let startDay = new Date(start);
169
177
  const endDay = new Date(end);
178
+ const yearFormat = customDateFormat ? customDateFormat : YEAR_FORMAT;
170
179
  while (startDay < endDay) {
171
180
  const yearEnd = lastDayOfMonth(lastMonthOfYear(startDay));
172
181
  const slotEnd = endDay < yearEnd ? endDay : yearEnd;
@@ -177,7 +186,7 @@ let TimelineBaseViewService = class TimelineBaseViewService {
177
186
  start: monthSlots[0].start,
178
187
  end: monthSlots[span - 1].end,
179
188
  span: span,
180
- text: slotEnd.getFullYear(),
189
+ text: this.intlService.formatDate(slotEnd, yearFormat),
181
190
  slotWidth: this.options.slotWidth
182
191
  });
183
192
  }
@@ -50,11 +50,11 @@ export class TimelineDayViewService extends TimelineBaseViewService {
50
50
  // will return the header rows slots
51
51
  const slots = [];
52
52
  const { start, end } = this.getRange(tasks);
53
- const daySlots = this.getDays(start, end);
53
+ const daySlots = this.getDays(start, end, this.options.timelineHeadersDateFormat?.groupHeaderDateFormat);
54
54
  const hourSlots = [];
55
55
  for (let i = 0; i < daySlots.length; i++) {
56
56
  const daySlot = daySlots[i];
57
- const hours = this.getHours(daySlot.start, daySlot.end);
57
+ const hours = this.getHours(daySlot.start, daySlot.end, this.options.timelineHeadersDateFormat?.columnHeaderDateFormat);
58
58
  daySlot.span = hours.length;
59
59
  hourSlots.push(...hours);
60
60
  }
@@ -54,8 +54,8 @@ export class TimelineMonthViewService extends TimelineBaseViewService {
54
54
  // will return the header rows slots
55
55
  const slots = [];
56
56
  const { start, end } = this.getRange(tasks);
57
- const months = this.getMonths(start, end, true);
58
- const weeks = this.getWeeks(start, end);
57
+ const months = this.getMonths(start, end, true, this.options.timelineHeadersDateFormat?.groupHeaderDateFormat);
58
+ const weeks = this.getWeeks(start, end, this.options.timelineHeadersDateFormat?.columnHeaderDateFormat);
59
59
  slots.push(months, weeks);
60
60
  return slots;
61
61
  }
@@ -50,8 +50,8 @@ export class TimelineWeekViewService extends TimelineBaseViewService {
50
50
  // will return the header rows slots
51
51
  const slots = [];
52
52
  const { start, end } = this.getRange(tasks);
53
- const weeks = this.getWeeks(start, end);
54
- const days = this.getDays(start, end);
53
+ const weeks = this.getWeeks(start, end, this.options.timelineHeadersDateFormat?.groupHeaderDateFormat);
54
+ const days = this.getDays(start, end, this.options.timelineHeadersDateFormat?.columnHeaderDateFormat);
55
55
  slots.push(weeks, days);
56
56
  return slots;
57
57
  }
@@ -45,8 +45,8 @@ export class TimeLineYearViewService extends TimelineBaseViewService {
45
45
  // will return the header rows slots
46
46
  const slots = [];
47
47
  const { start, end } = this.getRange(tasks);
48
- const years = this.getYears(start, end);
49
- const months = this.getMonths(start, end);
48
+ const years = this.getYears(start, end, this.options.timelineHeadersDateFormat?.groupHeaderDateFormat);
49
+ const months = this.getMonths(start, end, false, this.options.timelineHeadersDateFormat?.columnHeaderDateFormat);
50
50
  slots.push(years, months);
51
51
  return slots;
52
52
  }
@@ -32,10 +32,13 @@ export class ViewBase {
32
32
  this.optionChangesService.notifyColumnChanges();
33
33
  this.dependencyDomService.notifyChanges();
34
34
  }
35
+ if (anyChanged(['timelineHeadersDateFormat'], changes)) {
36
+ this.optionChangesService.notifyDateFormatChanges();
37
+ }
35
38
  }
36
39
  }
37
40
  ViewBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ViewBase, deps: [{ token: i1.OptionChangesService }, { token: i2.DependencyDomService }], target: i0.ɵɵFactoryTarget.Directive });
38
- ViewBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: ViewBase, selector: "kendo-gantt-view-base", inputs: { slotWidth: "slotWidth" }, usesOnChanges: true, ngImport: i0 });
41
+ ViewBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: ViewBase, selector: "kendo-gantt-view-base", inputs: { slotWidth: "slotWidth", timelineHeadersDateFormat: "timelineHeadersDateFormat" }, usesOnChanges: true, ngImport: i0 });
39
42
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ViewBase, decorators: [{
40
43
  type: Directive,
41
44
  args: [{
@@ -44,4 +47,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
44
47
  }]
45
48
  }], ctorParameters: function () { return [{ type: i1.OptionChangesService }, { type: i2.DependencyDomService }]; }, propDecorators: { slotWidth: [{
46
49
  type: Input
50
+ }], timelineHeadersDateFormat: [{
51
+ type: Input
47
52
  }] } });
@@ -52,8 +52,8 @@ const packageMetadata = {
52
52
  name: '@progress/kendo-angular-gantt',
53
53
  productName: 'Kendo UI for Angular',
54
54
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
55
- publishDate: 1688401408,
56
- version: '13.2.0-develop.2',
55
+ publishDate: 1688648456,
56
+ version: '13.2.0-develop.4',
57
57
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
58
58
  };
59
59
 
@@ -716,6 +716,10 @@ const HOUR_FORMAT = 'HH:mm aa';
716
716
  * @hidden
717
717
  */
718
718
  const MONTH_FORMAT = 'MMM';
719
+ /**
720
+ * @hidden
721
+ */
722
+ const YEAR_FORMAT = 'yyyy';
719
723
  /**
720
724
  * @hidden
721
725
  */
@@ -756,13 +760,14 @@ let TimelineBaseViewService = class TimelineBaseViewService {
756
760
  * @param end - The tasks' range end date
757
761
  * @returns {Array<Object>} - A collection containing the hour slots
758
762
  */
759
- getHours(start, end) {
763
+ getHours(start, end, customDateFormat) {
760
764
  const slots = [];
761
765
  const workDayStart = this.intlService.parseDate(this.options.workDayStart).getHours();
762
766
  const workDayEnd = this.intlService.parseDate(this.options.workDayEnd).getHours();
763
767
  // TODO: retrieve from option?
764
768
  const hourSpan = 1;
765
769
  let startDate = new Date(start);
770
+ const hoursFormat = customDateFormat ? customDateFormat : HOUR_FORMAT;
766
771
  const endDate = new Date(end);
767
772
  while (startDate < endDate) {
768
773
  const slotEnd = new Date(startDate);
@@ -772,7 +777,7 @@ let TimelineBaseViewService = class TimelineBaseViewService {
772
777
  start: startDate,
773
778
  end: slotEnd,
774
779
  isWorking: isWorkSlot,
775
- text: this.intlService.formatDate(startDate, HOUR_FORMAT, this.localeId),
780
+ text: this.intlService.formatDate(startDate, hoursFormat, this.localeId),
776
781
  span: 1,
777
782
  slotWidth: this.options.slotWidth
778
783
  });
@@ -786,9 +791,10 @@ let TimelineBaseViewService = class TimelineBaseViewService {
786
791
  * @param end - The tasks' range end date
787
792
  * @returns {Array<Object>} - A collection containing the day slots
788
793
  */
789
- getDays(start, end) {
794
+ getDays(start, end, customDateFormat) {
790
795
  const slots = [];
791
796
  let startDay = new Date(start);
797
+ const dayFormat = customDateFormat ? customDateFormat : DAY_FORMAT;
792
798
  const endDay = new Date(end);
793
799
  while (startDay <= endDay) {
794
800
  // Get the days with cleared time values (except for start and end day)
@@ -800,7 +806,7 @@ let TimelineBaseViewService = class TimelineBaseViewService {
800
806
  start: startDay,
801
807
  end: slotEnd,
802
808
  isWorking: isWorking,
803
- text: this.intlService.formatDate(startDay, DAY_FORMAT, this.localeId),
809
+ text: this.intlService.formatDate(startDay, dayFormat, this.localeId),
804
810
  span: 1,
805
811
  slotWidth: this.options.slotWidth
806
812
  });
@@ -808,18 +814,19 @@ let TimelineBaseViewService = class TimelineBaseViewService {
808
814
  }
809
815
  return slots;
810
816
  }
811
- getWeeks(start, end) {
817
+ getWeeks(start, end, customDateFormat) {
812
818
  const weekStart = this.intlService.firstDay();
813
819
  const slots = [];
814
820
  let startDay = new Date(start);
821
+ const dayFormat = customDateFormat ? customDateFormat : DAY_FORMAT;
815
822
  const endDay = new Date(end);
816
823
  while (startDay <= endDay) {
817
824
  const lastWeekDay = lastDayOfWeek(startDay, weekStart);
818
825
  const slotEnd = lastWeekDay > endDay ? endDay : lastWeekDay;
819
826
  const daySlots = this.getDays(startDay, slotEnd);
820
827
  const span = daySlots.length;
821
- const firstDay = this.intlService.formatDate(firstDayInWeek(getDate(startDay), weekStart), DAY_FORMAT, this.localeId);
822
- const lastDay = this.intlService.formatDate(slotEnd, DAY_FORMAT, this.localeId);
828
+ const firstDay = this.intlService.formatDate(firstDayInWeek(getDate(startDay), weekStart), dayFormat, this.localeId);
829
+ const lastDay = this.intlService.formatDate(slotEnd, dayFormat, this.localeId);
823
830
  if (span > 0) {
824
831
  slots.push({
825
832
  start: daySlots[0].start,
@@ -833,9 +840,10 @@ let TimelineBaseViewService = class TimelineBaseViewService {
833
840
  }
834
841
  return slots;
835
842
  }
836
- getMonths(start, end, isMainViewType) {
843
+ getMonths(start, end, isMainViewType, customDateFormat) {
837
844
  const slots = [];
838
845
  let startDay = new Date(start);
846
+ const monthFormat = customDateFormat ? customDateFormat : MONTH_FORMAT;
839
847
  const endDay = new Date(end);
840
848
  while (startDay < endDay) {
841
849
  const endMonth = lastDayOfMonth(startDay);
@@ -844,7 +852,7 @@ let TimelineBaseViewService = class TimelineBaseViewService {
844
852
  const weekSlots = this.getWeeks(startDay, slotEnd);
845
853
  const span = isMainViewType ? daySlots.length : weekSlots.length;
846
854
  const monthStart = firstDayOfMonth(getDate(startDay));
847
- const shortText = this.intlService.formatDate(monthStart, MONTH_FORMAT, this.localeId);
855
+ const shortText = this.intlService.formatDate(monthStart, monthFormat, this.localeId);
848
856
  if (span > 0) {
849
857
  slots.push({
850
858
  start: isMainViewType ? daySlots[0].start : weekSlots[0].start,
@@ -858,10 +866,11 @@ let TimelineBaseViewService = class TimelineBaseViewService {
858
866
  }
859
867
  return slots;
860
868
  }
861
- getYears(start, end) {
869
+ getYears(start, end, customDateFormat) {
862
870
  const slots = [];
863
871
  let startDay = new Date(start);
864
872
  const endDay = new Date(end);
873
+ const yearFormat = customDateFormat ? customDateFormat : YEAR_FORMAT;
865
874
  while (startDay < endDay) {
866
875
  const yearEnd = lastDayOfMonth(lastMonthOfYear(startDay));
867
876
  const slotEnd = endDay < yearEnd ? endDay : yearEnd;
@@ -872,7 +881,7 @@ let TimelineBaseViewService = class TimelineBaseViewService {
872
881
  start: monthSlots[0].start,
873
882
  end: monthSlots[span - 1].end,
874
883
  span: span,
875
- text: slotEnd.getFullYear(),
884
+ text: this.intlService.formatDate(slotEnd, yearFormat),
876
885
  slotWidth: this.options.slotWidth
877
886
  });
878
887
  }
@@ -924,14 +933,15 @@ class TimelineDayViewService extends TimelineBaseViewService {
924
933
  * Used to render the number of columns and the header
925
934
  */
926
935
  getSlots(tasks) {
936
+ var _a, _b;
927
937
  // will return the header rows slots
928
938
  const slots = [];
929
939
  const { start, end } = this.getRange(tasks);
930
- const daySlots = this.getDays(start, end);
940
+ const daySlots = this.getDays(start, end, (_a = this.options.timelineHeadersDateFormat) === null || _a === void 0 ? void 0 : _a.groupHeaderDateFormat);
931
941
  const hourSlots = [];
932
942
  for (let i = 0; i < daySlots.length; i++) {
933
943
  const daySlot = daySlots[i];
934
- const hours = this.getHours(daySlot.start, daySlot.end);
944
+ const hours = this.getHours(daySlot.start, daySlot.end, (_b = this.options.timelineHeadersDateFormat) === null || _b === void 0 ? void 0 : _b.columnHeaderDateFormat);
935
945
  daySlot.span = hours.length;
936
946
  hourSlots.push(...hours);
937
947
  }
@@ -991,11 +1001,12 @@ class TimelineMonthViewService extends TimelineBaseViewService {
991
1001
  * Used to render the number of columns and the header
992
1002
  */
993
1003
  getSlots(tasks) {
1004
+ var _a, _b;
994
1005
  // will return the header rows slots
995
1006
  const slots = [];
996
1007
  const { start, end } = this.getRange(tasks);
997
- const months = this.getMonths(start, end, true);
998
- const weeks = this.getWeeks(start, end);
1008
+ const months = this.getMonths(start, end, true, (_a = this.options.timelineHeadersDateFormat) === null || _a === void 0 ? void 0 : _a.groupHeaderDateFormat);
1009
+ const weeks = this.getWeeks(start, end, (_b = this.options.timelineHeadersDateFormat) === null || _b === void 0 ? void 0 : _b.columnHeaderDateFormat);
999
1010
  slots.push(months, weeks);
1000
1011
  return slots;
1001
1012
  }
@@ -1048,11 +1059,12 @@ class TimelineWeekViewService extends TimelineBaseViewService {
1048
1059
  * Used to render the number of columns and the header
1049
1060
  */
1050
1061
  getSlots(tasks) {
1062
+ var _a, _b;
1051
1063
  // will return the header rows slots
1052
1064
  const slots = [];
1053
1065
  const { start, end } = this.getRange(tasks);
1054
- const weeks = this.getWeeks(start, end);
1055
- const days = this.getDays(start, end);
1066
+ const weeks = this.getWeeks(start, end, (_a = this.options.timelineHeadersDateFormat) === null || _a === void 0 ? void 0 : _a.groupHeaderDateFormat);
1067
+ const days = this.getDays(start, end, (_b = this.options.timelineHeadersDateFormat) === null || _b === void 0 ? void 0 : _b.columnHeaderDateFormat);
1056
1068
  slots.push(weeks, days);
1057
1069
  return slots;
1058
1070
  }
@@ -1100,11 +1112,12 @@ class TimeLineYearViewService extends TimelineBaseViewService {
1100
1112
  * Used to render the number of columns and the header
1101
1113
  */
1102
1114
  getSlots(tasks) {
1115
+ var _a, _b;
1103
1116
  // will return the header rows slots
1104
1117
  const slots = [];
1105
1118
  const { start, end } = this.getRange(tasks);
1106
- const years = this.getYears(start, end);
1107
- const months = this.getMonths(start, end);
1119
+ const years = this.getYears(start, end, (_a = this.options.timelineHeadersDateFormat) === null || _a === void 0 ? void 0 : _a.groupHeaderDateFormat);
1120
+ const months = this.getMonths(start, end, false, (_b = this.options.timelineHeadersDateFormat) === null || _b === void 0 ? void 0 : _b.columnHeaderDateFormat);
1108
1121
  slots.push(years, months);
1109
1122
  return slots;
1110
1123
  }
@@ -1155,6 +1168,7 @@ class OptionChangesService {
1155
1168
  constructor() {
1156
1169
  this.viewChanges = new EventEmitter();
1157
1170
  this.columnChanges = new EventEmitter();
1171
+ this.dateFormatChanges = new EventEmitter();
1158
1172
  }
1159
1173
  notifyColumnChanges() {
1160
1174
  this.columnChanges.emit();
@@ -1162,6 +1176,9 @@ class OptionChangesService {
1162
1176
  notifyViewChanges() {
1163
1177
  this.viewChanges.emit();
1164
1178
  }
1179
+ notifyDateFormatChanges() {
1180
+ this.dateFormatChanges.emit();
1181
+ }
1165
1182
  }
1166
1183
  OptionChangesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: OptionChangesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1167
1184
  OptionChangesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: OptionChangesService });
@@ -3935,10 +3952,13 @@ class ViewBase {
3935
3952
  this.optionChangesService.notifyColumnChanges();
3936
3953
  this.dependencyDomService.notifyChanges();
3937
3954
  }
3955
+ if (anyChanged(['timelineHeadersDateFormat'], changes)) {
3956
+ this.optionChangesService.notifyDateFormatChanges();
3957
+ }
3938
3958
  }
3939
3959
  }
3940
3960
  ViewBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ViewBase, deps: [{ token: OptionChangesService }, { token: DependencyDomService }], target: i0.ɵɵFactoryTarget.Directive });
3941
- ViewBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: ViewBase, selector: "kendo-gantt-view-base", inputs: { slotWidth: "slotWidth" }, usesOnChanges: true, ngImport: i0 });
3961
+ ViewBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: ViewBase, selector: "kendo-gantt-view-base", inputs: { slotWidth: "slotWidth", timelineHeadersDateFormat: "timelineHeadersDateFormat" }, usesOnChanges: true, ngImport: i0 });
3942
3962
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ViewBase, decorators: [{
3943
3963
  type: Directive,
3944
3964
  args: [{
@@ -3947,6 +3967,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3947
3967
  }]
3948
3968
  }], ctorParameters: function () { return [{ type: OptionChangesService }, { type: DependencyDomService }]; }, propDecorators: { slotWidth: [{
3949
3969
  type: Input
3970
+ }], timelineHeadersDateFormat: [{
3971
+ type: Input
3950
3972
  }] } });
3951
3973
 
3952
3974
  /**
@@ -5349,6 +5371,9 @@ class GanttComponent {
5349
5371
  this.optionChangesSubscriptions.add(this.optionChangesService.viewChanges.subscribe(() => {
5350
5372
  this.loadTimelineData();
5351
5373
  }));
5374
+ this.optionChangesSubscriptions.add(this.optionChangesService.dateFormatChanges.subscribe(() => {
5375
+ this.loadTimelineData();
5376
+ }));
5352
5377
  this.optionChangesSubscriptions.add(this.optionChangesService.columnChanges.subscribe(() => {
5353
5378
  this.treeList.columns.notifyOnChanges();
5354
5379
  }));
@@ -52,8 +52,8 @@ const packageMetadata = {
52
52
  name: '@progress/kendo-angular-gantt',
53
53
  productName: 'Kendo UI for Angular',
54
54
  productCodes: ['KENDOUIANGULAR', 'KENDOUICOMPLETE'],
55
- publishDate: 1688401408,
56
- version: '13.2.0-develop.2',
55
+ publishDate: 1688648456,
56
+ version: '13.2.0-develop.4',
57
57
  licensingDocsUrl: 'https://www.telerik.com/kendo-angular-ui/my-license/?utm_medium=product&utm_source=kendoangular&utm_campaign=kendo-ui-angular-purchase-license-keys-warning'
58
58
  };
59
59
 
@@ -968,6 +968,7 @@ class OptionChangesService {
968
968
  constructor() {
969
969
  this.viewChanges = new EventEmitter();
970
970
  this.columnChanges = new EventEmitter();
971
+ this.dateFormatChanges = new EventEmitter();
971
972
  }
972
973
  notifyColumnChanges() {
973
974
  this.columnChanges.emit();
@@ -975,6 +976,9 @@ class OptionChangesService {
975
976
  notifyViewChanges() {
976
977
  this.viewChanges.emit();
977
978
  }
979
+ notifyDateFormatChanges() {
980
+ this.dateFormatChanges.emit();
981
+ }
978
982
  }
979
983
  OptionChangesService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: OptionChangesService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
980
984
  OptionChangesService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: OptionChangesService });
@@ -994,6 +998,10 @@ const HOUR_FORMAT = 'HH:mm aa';
994
998
  * @hidden
995
999
  */
996
1000
  const MONTH_FORMAT = 'MMM';
1001
+ /**
1002
+ * @hidden
1003
+ */
1004
+ const YEAR_FORMAT = 'yyyy';
997
1005
  /**
998
1006
  * @hidden
999
1007
  */
@@ -1034,13 +1042,14 @@ let TimelineBaseViewService = class TimelineBaseViewService {
1034
1042
  * @param end - The tasks' range end date
1035
1043
  * @returns {Array<Object>} - A collection containing the hour slots
1036
1044
  */
1037
- getHours(start, end) {
1045
+ getHours(start, end, customDateFormat) {
1038
1046
  const slots = [];
1039
1047
  const workDayStart = this.intlService.parseDate(this.options.workDayStart).getHours();
1040
1048
  const workDayEnd = this.intlService.parseDate(this.options.workDayEnd).getHours();
1041
1049
  // TODO: retrieve from option?
1042
1050
  const hourSpan = 1;
1043
1051
  let startDate = new Date(start);
1052
+ const hoursFormat = customDateFormat ? customDateFormat : HOUR_FORMAT;
1044
1053
  const endDate = new Date(end);
1045
1054
  while (startDate < endDate) {
1046
1055
  const slotEnd = new Date(startDate);
@@ -1050,7 +1059,7 @@ let TimelineBaseViewService = class TimelineBaseViewService {
1050
1059
  start: startDate,
1051
1060
  end: slotEnd,
1052
1061
  isWorking: isWorkSlot,
1053
- text: this.intlService.formatDate(startDate, HOUR_FORMAT, this.localeId),
1062
+ text: this.intlService.formatDate(startDate, hoursFormat, this.localeId),
1054
1063
  span: 1,
1055
1064
  slotWidth: this.options.slotWidth
1056
1065
  });
@@ -1064,9 +1073,10 @@ let TimelineBaseViewService = class TimelineBaseViewService {
1064
1073
  * @param end - The tasks' range end date
1065
1074
  * @returns {Array<Object>} - A collection containing the day slots
1066
1075
  */
1067
- getDays(start, end) {
1076
+ getDays(start, end, customDateFormat) {
1068
1077
  const slots = [];
1069
1078
  let startDay = new Date(start);
1079
+ const dayFormat = customDateFormat ? customDateFormat : DAY_FORMAT;
1070
1080
  const endDay = new Date(end);
1071
1081
  while (startDay <= endDay) {
1072
1082
  // Get the days with cleared time values (except for start and end day)
@@ -1078,7 +1088,7 @@ let TimelineBaseViewService = class TimelineBaseViewService {
1078
1088
  start: startDay,
1079
1089
  end: slotEnd,
1080
1090
  isWorking: isWorking,
1081
- text: this.intlService.formatDate(startDay, DAY_FORMAT, this.localeId),
1091
+ text: this.intlService.formatDate(startDay, dayFormat, this.localeId),
1082
1092
  span: 1,
1083
1093
  slotWidth: this.options.slotWidth
1084
1094
  });
@@ -1086,18 +1096,19 @@ let TimelineBaseViewService = class TimelineBaseViewService {
1086
1096
  }
1087
1097
  return slots;
1088
1098
  }
1089
- getWeeks(start, end) {
1099
+ getWeeks(start, end, customDateFormat) {
1090
1100
  const weekStart = this.intlService.firstDay();
1091
1101
  const slots = [];
1092
1102
  let startDay = new Date(start);
1103
+ const dayFormat = customDateFormat ? customDateFormat : DAY_FORMAT;
1093
1104
  const endDay = new Date(end);
1094
1105
  while (startDay <= endDay) {
1095
1106
  const lastWeekDay = lastDayOfWeek(startDay, weekStart);
1096
1107
  const slotEnd = lastWeekDay > endDay ? endDay : lastWeekDay;
1097
1108
  const daySlots = this.getDays(startDay, slotEnd);
1098
1109
  const span = daySlots.length;
1099
- const firstDay = this.intlService.formatDate(firstDayInWeek(getDate(startDay), weekStart), DAY_FORMAT, this.localeId);
1100
- const lastDay = this.intlService.formatDate(slotEnd, DAY_FORMAT, this.localeId);
1110
+ const firstDay = this.intlService.formatDate(firstDayInWeek(getDate(startDay), weekStart), dayFormat, this.localeId);
1111
+ const lastDay = this.intlService.formatDate(slotEnd, dayFormat, this.localeId);
1101
1112
  if (span > 0) {
1102
1113
  slots.push({
1103
1114
  start: daySlots[0].start,
@@ -1111,9 +1122,10 @@ let TimelineBaseViewService = class TimelineBaseViewService {
1111
1122
  }
1112
1123
  return slots;
1113
1124
  }
1114
- getMonths(start, end, isMainViewType) {
1125
+ getMonths(start, end, isMainViewType, customDateFormat) {
1115
1126
  const slots = [];
1116
1127
  let startDay = new Date(start);
1128
+ const monthFormat = customDateFormat ? customDateFormat : MONTH_FORMAT;
1117
1129
  const endDay = new Date(end);
1118
1130
  while (startDay < endDay) {
1119
1131
  const endMonth = lastDayOfMonth(startDay);
@@ -1122,7 +1134,7 @@ let TimelineBaseViewService = class TimelineBaseViewService {
1122
1134
  const weekSlots = this.getWeeks(startDay, slotEnd);
1123
1135
  const span = isMainViewType ? daySlots.length : weekSlots.length;
1124
1136
  const monthStart = firstDayOfMonth(getDate(startDay));
1125
- const shortText = this.intlService.formatDate(monthStart, MONTH_FORMAT, this.localeId);
1137
+ const shortText = this.intlService.formatDate(monthStart, monthFormat, this.localeId);
1126
1138
  if (span > 0) {
1127
1139
  slots.push({
1128
1140
  start: isMainViewType ? daySlots[0].start : weekSlots[0].start,
@@ -1136,10 +1148,11 @@ let TimelineBaseViewService = class TimelineBaseViewService {
1136
1148
  }
1137
1149
  return slots;
1138
1150
  }
1139
- getYears(start, end) {
1151
+ getYears(start, end, customDateFormat) {
1140
1152
  const slots = [];
1141
1153
  let startDay = new Date(start);
1142
1154
  const endDay = new Date(end);
1155
+ const yearFormat = customDateFormat ? customDateFormat : YEAR_FORMAT;
1143
1156
  while (startDay < endDay) {
1144
1157
  const yearEnd = lastDayOfMonth(lastMonthOfYear(startDay));
1145
1158
  const slotEnd = endDay < yearEnd ? endDay : yearEnd;
@@ -1150,7 +1163,7 @@ let TimelineBaseViewService = class TimelineBaseViewService {
1150
1163
  start: monthSlots[0].start,
1151
1164
  end: monthSlots[span - 1].end,
1152
1165
  span: span,
1153
- text: slotEnd.getFullYear(),
1166
+ text: this.intlService.formatDate(slotEnd, yearFormat),
1154
1167
  slotWidth: this.options.slotWidth
1155
1168
  });
1156
1169
  }
@@ -1205,11 +1218,11 @@ class TimelineDayViewService extends TimelineBaseViewService {
1205
1218
  // will return the header rows slots
1206
1219
  const slots = [];
1207
1220
  const { start, end } = this.getRange(tasks);
1208
- const daySlots = this.getDays(start, end);
1221
+ const daySlots = this.getDays(start, end, this.options.timelineHeadersDateFormat?.groupHeaderDateFormat);
1209
1222
  const hourSlots = [];
1210
1223
  for (let i = 0; i < daySlots.length; i++) {
1211
1224
  const daySlot = daySlots[i];
1212
- const hours = this.getHours(daySlot.start, daySlot.end);
1225
+ const hours = this.getHours(daySlot.start, daySlot.end, this.options.timelineHeadersDateFormat?.columnHeaderDateFormat);
1213
1226
  daySlot.span = hours.length;
1214
1227
  hourSlots.push(...hours);
1215
1228
  }
@@ -1270,8 +1283,8 @@ class TimelineMonthViewService extends TimelineBaseViewService {
1270
1283
  // will return the header rows slots
1271
1284
  const slots = [];
1272
1285
  const { start, end } = this.getRange(tasks);
1273
- const months = this.getMonths(start, end, true);
1274
- const weeks = this.getWeeks(start, end);
1286
+ const months = this.getMonths(start, end, true, this.options.timelineHeadersDateFormat?.groupHeaderDateFormat);
1287
+ const weeks = this.getWeeks(start, end, this.options.timelineHeadersDateFormat?.columnHeaderDateFormat);
1275
1288
  slots.push(months, weeks);
1276
1289
  return slots;
1277
1290
  }
@@ -1325,8 +1338,8 @@ class TimelineWeekViewService extends TimelineBaseViewService {
1325
1338
  // will return the header rows slots
1326
1339
  const slots = [];
1327
1340
  const { start, end } = this.getRange(tasks);
1328
- const weeks = this.getWeeks(start, end);
1329
- const days = this.getDays(start, end);
1341
+ const weeks = this.getWeeks(start, end, this.options.timelineHeadersDateFormat?.groupHeaderDateFormat);
1342
+ const days = this.getDays(start, end, this.options.timelineHeadersDateFormat?.columnHeaderDateFormat);
1330
1343
  slots.push(weeks, days);
1331
1344
  return slots;
1332
1345
  }
@@ -1375,8 +1388,8 @@ class TimeLineYearViewService extends TimelineBaseViewService {
1375
1388
  // will return the header rows slots
1376
1389
  const slots = [];
1377
1390
  const { start, end } = this.getRange(tasks);
1378
- const years = this.getYears(start, end);
1379
- const months = this.getMonths(start, end);
1391
+ const years = this.getYears(start, end, this.options.timelineHeadersDateFormat?.groupHeaderDateFormat);
1392
+ const months = this.getMonths(start, end, false, this.options.timelineHeadersDateFormat?.columnHeaderDateFormat);
1380
1393
  slots.push(years, months);
1381
1394
  return slots;
1382
1395
  }
@@ -3893,10 +3906,13 @@ class ViewBase {
3893
3906
  this.optionChangesService.notifyColumnChanges();
3894
3907
  this.dependencyDomService.notifyChanges();
3895
3908
  }
3909
+ if (anyChanged(['timelineHeadersDateFormat'], changes)) {
3910
+ this.optionChangesService.notifyDateFormatChanges();
3911
+ }
3896
3912
  }
3897
3913
  }
3898
3914
  ViewBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ViewBase, deps: [{ token: OptionChangesService }, { token: DependencyDomService }], target: i0.ɵɵFactoryTarget.Directive });
3899
- ViewBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: ViewBase, selector: "kendo-gantt-view-base", inputs: { slotWidth: "slotWidth" }, usesOnChanges: true, ngImport: i0 });
3915
+ ViewBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.12", type: ViewBase, selector: "kendo-gantt-view-base", inputs: { slotWidth: "slotWidth", timelineHeadersDateFormat: "timelineHeadersDateFormat" }, usesOnChanges: true, ngImport: i0 });
3900
3916
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: ViewBase, decorators: [{
3901
3917
  type: Directive,
3902
3918
  args: [{
@@ -3905,6 +3921,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
3905
3921
  }]
3906
3922
  }], ctorParameters: function () { return [{ type: OptionChangesService }, { type: DependencyDomService }]; }, propDecorators: { slotWidth: [{
3907
3923
  type: Input
3924
+ }], timelineHeadersDateFormat: [{
3925
+ type: Input
3908
3926
  }] } });
3909
3927
 
3910
3928
  /**
@@ -5307,6 +5325,9 @@ class GanttComponent {
5307
5325
  this.optionChangesSubscriptions.add(this.optionChangesService.viewChanges.subscribe(() => {
5308
5326
  this.loadTimelineData();
5309
5327
  }));
5328
+ this.optionChangesSubscriptions.add(this.optionChangesService.dateFormatChanges.subscribe(() => {
5329
+ this.loadTimelineData();
5330
+ }));
5310
5331
  this.optionChangesSubscriptions.add(this.optionChangesService.columnChanges.subscribe(() => {
5311
5332
  this.treeList.columns.notifyOnChanges();
5312
5333
  }));
@@ -35,6 +35,7 @@ export { EditEventDependencies } from './events/task-edit-event.interface';
35
35
  export { DependencyAddEvent } from './events/dependency-add-event.interface';
36
36
  export { DragScrollSettings } from '../scrolling/drag-scroll-settings';
37
37
  export { TaskDeleteEvent } from './events/task-delete-event.interface';
38
+ export { TimelineHeaderDateFormat } from './timeline-header-date-format';
38
39
  export { ColumnLockedChangeEvent } from './events/column-locked-change-event.interface';
39
40
  export { ColumnReorderEvent } from './events/column-reorder-event.interface';
40
41
  export { ColumnResizeEvent } from './events/column-resize-event.interface';
@@ -0,0 +1,18 @@
1
+ /**-----------------------------------------------------------------------------------------
2
+ * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
+ * Licensed under commercial license. See LICENSE.md in the project root for more information
4
+ *-------------------------------------------------------------------------------------------*/
5
+ import { DateFormatOptions } from "@progress/kendo-intl";
6
+ /**
7
+ * Represents the options for formatting the Group Headers and Column Headers in each individual Timeline Header.
8
+ */
9
+ export interface TimelineHeaderDateFormat {
10
+ /**
11
+ * Specifies the date format for the group header in the Timeline Header.
12
+ */
13
+ groupHeaderDateFormat?: string | DateFormatOptions;
14
+ /**
15
+ * Specifies the date format for the column header in the Timeline Header.
16
+ */
17
+ columnHeaderDateFormat?: string | DateFormatOptions;
18
+ }
@@ -4,6 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { Day } from "@progress/kendo-date-math";
6
6
  import { TimelineViewType } from "./timeline-view";
7
+ import { TimelineHeaderDateFormat } from "./timeline-header-date-format";
7
8
  /**
8
9
  * @hidden
9
10
  *
@@ -38,4 +39,8 @@ export interface TimelineOptions {
38
39
  * The end of the work week (index based).
39
40
  */
40
41
  workWeekEnd?: Day;
42
+ /**
43
+ * The options for formatting the Group Headers and Column Headers in each individual Timeline Header.
44
+ */
45
+ timelineHeadersDateFormat?: TimelineHeaderDateFormat;
41
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-angular-gantt",
3
- "version": "13.2.0-develop.2",
3
+ "version": "13.2.0-develop.4",
4
4
  "description": "Kendo UI Angular Gantt",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Progress",
@@ -24,22 +24,22 @@
24
24
  "@angular/platform-browser": "13 - 16",
25
25
  "@progress/kendo-data-query": "^1.5.5",
26
26
  "@progress/kendo-licensing": "^1.0.2",
27
- "@progress/kendo-angular-buttons": "13.2.0-develop.2",
28
- "@progress/kendo-angular-common": "13.2.0-develop.2",
29
- "@progress/kendo-angular-dialog": "13.2.0-develop.2",
30
- "@progress/kendo-angular-dropdowns": "13.2.0-develop.2",
31
- "@progress/kendo-angular-grid": "13.2.0-develop.2",
32
- "@progress/kendo-angular-icons": "13.2.0-develop.2",
33
- "@progress/kendo-angular-intl": "13.2.0-develop.2",
34
- "@progress/kendo-angular-l10n": "13.2.0-develop.2",
35
- "@progress/kendo-angular-layout": "13.2.0-develop.2",
36
- "@progress/kendo-angular-popup": "13.2.0-develop.2",
37
- "@progress/kendo-angular-treelist": "13.2.0-develop.2",
27
+ "@progress/kendo-angular-buttons": "13.2.0-develop.4",
28
+ "@progress/kendo-angular-common": "13.2.0-develop.4",
29
+ "@progress/kendo-angular-dialog": "13.2.0-develop.4",
30
+ "@progress/kendo-angular-dropdowns": "13.2.0-develop.4",
31
+ "@progress/kendo-angular-grid": "13.2.0-develop.4",
32
+ "@progress/kendo-angular-icons": "13.2.0-develop.4",
33
+ "@progress/kendo-angular-intl": "13.2.0-develop.4",
34
+ "@progress/kendo-angular-l10n": "13.2.0-develop.4",
35
+ "@progress/kendo-angular-layout": "13.2.0-develop.4",
36
+ "@progress/kendo-angular-popup": "13.2.0-develop.4",
37
+ "@progress/kendo-angular-treelist": "13.2.0-develop.4",
38
38
  "rxjs": "^6.5.3 || ^7.0.0"
39
39
  },
40
40
  "dependencies": {
41
41
  "tslib": "^2.3.1",
42
- "@progress/kendo-angular-schematics": "13.2.0-develop.2",
42
+ "@progress/kendo-angular-schematics": "13.2.0-develop.4",
43
43
  "@progress/kendo-common": "^0.2.1",
44
44
  "@progress/kendo-date-math": "^1.5.2",
45
45
  "@progress/kendo-draggable": "^3.0.0"
@@ -7,20 +7,20 @@ function default_1(options) {
7
7
  // See https://github.com/telerik/kendo-schematics/issues/28
8
8
  peerDependencies: {
9
9
  // peer deps of the treelist
10
- '@progress/kendo-angular-dateinputs': '13.2.0-develop.2',
11
- '@progress/kendo-angular-dropdowns': '13.2.0-develop.2',
12
- '@progress/kendo-angular-excel-export': '13.2.0-develop.2',
13
- '@progress/kendo-angular-inputs': '13.2.0-develop.2',
14
- '@progress/kendo-angular-l10n': '13.2.0-develop.2',
15
- '@progress/kendo-angular-label': '13.2.0-develop.2',
16
- '@progress/kendo-angular-pdf-export': '13.2.0-develop.2',
17
- '@progress/kendo-angular-popup': '13.2.0-develop.2',
18
- '@progress/kendo-angular-utils': '13.2.0-develop.2',
10
+ '@progress/kendo-angular-dateinputs': '13.2.0-develop.4',
11
+ '@progress/kendo-angular-dropdowns': '13.2.0-develop.4',
12
+ '@progress/kendo-angular-excel-export': '13.2.0-develop.4',
13
+ '@progress/kendo-angular-inputs': '13.2.0-develop.4',
14
+ '@progress/kendo-angular-l10n': '13.2.0-develop.4',
15
+ '@progress/kendo-angular-label': '13.2.0-develop.4',
16
+ '@progress/kendo-angular-pdf-export': '13.2.0-develop.4',
17
+ '@progress/kendo-angular-popup': '13.2.0-develop.4',
18
+ '@progress/kendo-angular-utils': '13.2.0-develop.4',
19
19
  '@progress/kendo-drawing': '^1.0.0',
20
20
  // peer dep of the dropdowns
21
- '@progress/kendo-angular-treeview': '13.2.0-develop.2',
21
+ '@progress/kendo-angular-treeview': '13.2.0-develop.4',
22
22
  // peer dep of the layout
23
- '@progress/kendo-angular-progressbar': '13.2.0-develop.2',
23
+ '@progress/kendo-angular-progressbar': '13.2.0-develop.4',
24
24
  // peer dep of the icons
25
25
  '@progress/kendo-svg-icons': '^1.0.0'
26
26
  } });
@@ -2,7 +2,7 @@
2
2
  * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the project root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
- import { IntlService } from '@progress/kendo-angular-intl';
5
+ import { DateFormatOptions, IntlService } from '@progress/kendo-angular-intl';
6
6
  import { MappingService } from '../common/mapping.service';
7
7
  import { TimelineOptions } from '../models/timeline-options.interface';
8
8
  import { DateRange } from '../models/date-range.interface';
@@ -19,6 +19,10 @@ export declare const HOUR_FORMAT = "HH:mm aa";
19
19
  * @hidden
20
20
  */
21
21
  export declare const MONTH_FORMAT = "MMM";
22
+ /**
23
+ * @hidden
24
+ */
25
+ export declare const YEAR_FORMAT = "yyyy";
22
26
  /**
23
27
  * @hidden
24
28
  */
@@ -65,15 +69,15 @@ export declare abstract class TimelineBaseViewService {
65
69
  * @param end - The tasks' range end date
66
70
  * @returns {Array<Object>} - A collection containing the hour slots
67
71
  */
68
- protected getHours(start: any, end: any): Array<Slot>;
72
+ protected getHours(start: any, end: any, customDateFormat?: string | DateFormatOptions): Array<Slot>;
69
73
  /**
70
74
  *
71
75
  * @param start - The tasks' range start date
72
76
  * @param end - The tasks' range end date
73
77
  * @returns {Array<Object>} - A collection containing the day slots
74
78
  */
75
- protected getDays(start: any, end: any): Array<Slot>;
76
- protected getWeeks(start: any, end: any): Array<Slot>;
77
- protected getMonths(start: any, end: any, isMainViewType?: boolean): Array<Slot>;
78
- protected getYears(start: any, end: any): Array<Slot>;
79
+ protected getDays(start: any, end: any, customDateFormat?: string | DateFormatOptions): Array<Slot>;
80
+ protected getWeeks(start: any, end: any, customDateFormat?: string | DateFormatOptions): Array<Slot>;
81
+ protected getMonths(start: any, end: any, isMainViewType?: boolean, customDateFormat?: string | DateFormatOptions): Array<Slot>;
82
+ protected getYears(start: any, end: any, customDateFormat?: any): Array<Slot>;
79
83
  }
@@ -6,6 +6,7 @@ import { OnChanges, SimpleChanges } from '@angular/core';
6
6
  import { DependencyDomService } from '../dependencies/dependency-dom.service';
7
7
  import { TimelineViewType } from '../models/timeline-view';
8
8
  import { OptionChangesService } from '../common/option-changes.service';
9
+ import { TimelineHeaderDateFormat } from '../models/timeline-header-date-format';
9
10
  import * as i0 from "@angular/core";
10
11
  /**
11
12
  * The base class for the column components of the Gantt.
@@ -19,6 +20,10 @@ export declare abstract class ViewBase implements OnChanges {
19
20
  * @default 100
20
21
  */
21
22
  slotWidth: number;
23
+ /**
24
+ * Sets the date format for the Grouped and Column headers.
25
+ */
26
+ timelineHeadersDateFormat: TimelineHeaderDateFormat;
22
27
  /**
23
28
  * The type for the view (`day`, `week`, `month` or `year`).
24
29
  */
@@ -30,5 +35,5 @@ export declare abstract class ViewBase implements OnChanges {
30
35
  constructor(optionChangesService: OptionChangesService, dependencyDomService: DependencyDomService);
31
36
  ngOnChanges(changes: SimpleChanges): void;
32
37
  static ɵfac: i0.ɵɵFactoryDeclaration<ViewBase, never>;
33
- static ɵdir: i0.ɵɵDirectiveDeclaration<ViewBase, "kendo-gantt-view-base", never, { "slotWidth": "slotWidth"; }, {}, never>;
38
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ViewBase, "kendo-gantt-view-base", never, { "slotWidth": "slotWidth"; "timelineHeadersDateFormat": "timelineHeadersDateFormat"; }, {}, never>;
34
39
  }