Skip to content

Commit 8c926ed

Browse files
committed
fix: make internal methods callable from sub classes
1 parent 2e18c75 commit 8c926ed

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

projects/angular-calendar/src/modules/day/calendar-day-view.component.ts

+7-7
Original file line numberDiff line numberDiff line change
@@ -434,10 +434,10 @@ export class CalendarDayViewComponent implements OnChanges, OnInit, OnDestroy {
434434
* @hidden
435435
*/
436436
constructor(
437-
private cdr: ChangeDetectorRef,
438-
private utils: CalendarUtils,
437+
protected cdr: ChangeDetectorRef,
438+
protected utils: CalendarUtils,
439439
@Inject(LOCALE_ID) locale: string,
440-
private dateAdapter: DateAdapter
440+
protected dateAdapter: DateAdapter
441441
) {
442442
this.locale = locale;
443443
}
@@ -663,7 +663,7 @@ export class CalendarDayViewComponent implements OnChanges, OnInit, OnDestroy {
663663
}
664664
}
665665

666-
private refreshHourGrid(): void {
666+
protected refreshHourGrid(): void {
667667
this.hours = this.utils.getDayViewHourGrid({
668668
viewDate: this.viewDate,
669669
hourSegments: this.hourSegments,
@@ -678,7 +678,7 @@ export class CalendarDayViewComponent implements OnChanges, OnInit, OnDestroy {
678678
});
679679
}
680680

681-
private refreshView(): void {
681+
protected refreshView(): void {
682682
this.view = this.utils.getDayView({
683683
events: this.events,
684684
viewDate: this.viewDate,
@@ -696,13 +696,13 @@ export class CalendarDayViewComponent implements OnChanges, OnInit, OnDestroy {
696696
});
697697
}
698698

699-
private refreshAll(): void {
699+
protected refreshAll(): void {
700700
this.refreshHourGrid();
701701
this.refreshView();
702702
this.emitBeforeViewRender();
703703
}
704704

705-
private emitBeforeViewRender(): void {
705+
protected emitBeforeViewRender(): void {
706706
if (this.hours && this.view) {
707707
this.beforeViewRender.emit({
708708
body: {

projects/angular-calendar/src/modules/month/calendar-month-view.component.ts

+8-8
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,10 @@ export class CalendarMonthViewComponent
297297
* @hidden
298298
*/
299299
constructor(
300-
private cdr: ChangeDetectorRef,
301-
private utils: CalendarUtils,
300+
protected cdr: ChangeDetectorRef,
301+
protected utils: CalendarUtils,
302302
@Inject(LOCALE_ID) locale: string,
303-
private dateAdapter: DateAdapter
303+
protected dateAdapter: DateAdapter
304304
) {
305305
this.locale = locale;
306306
}
@@ -416,7 +416,7 @@ export class CalendarMonthViewComponent
416416
}
417417
}
418418

419-
private refreshHeader(): void {
419+
protected refreshHeader(): void {
420420
this.columnHeaders = this.utils.getWeekViewHeader({
421421
viewDate: this.viewDate,
422422
weekStartsOn: this.weekStartsOn,
@@ -425,7 +425,7 @@ export class CalendarMonthViewComponent
425425
});
426426
}
427427

428-
private refreshBody(): void {
428+
protected refreshBody(): void {
429429
this.view = this.utils.getMonthView({
430430
events: this.events,
431431
viewDate: this.viewDate,
@@ -435,7 +435,7 @@ export class CalendarMonthViewComponent
435435
});
436436
}
437437

438-
private checkActiveDayIsOpen(): void {
438+
protected checkActiveDayIsOpen(): void {
439439
if (this.activeDayIsOpen === true) {
440440
const activeDay = this.activeDay || this.viewDate;
441441
this.openDay = this.view.days.find(day =>
@@ -451,14 +451,14 @@ export class CalendarMonthViewComponent
451451
}
452452
}
453453

454-
private refreshAll(): void {
454+
protected refreshAll(): void {
455455
this.refreshHeader();
456456
this.refreshBody();
457457
this.emitBeforeViewRender();
458458
this.checkActiveDayIsOpen();
459459
}
460460

461-
private emitBeforeViewRender(): void {
461+
protected emitBeforeViewRender(): void {
462462
if (this.columnHeaders && this.view) {
463463
this.beforeViewRender.emit({
464464
header: this.columnHeaders,

projects/angular-calendar/src/modules/week/calendar-week-view.component.ts

+12-12
Original file line numberDiff line numberDiff line change
@@ -629,10 +629,10 @@ export class CalendarWeekViewComponent implements OnChanges, OnInit, OnDestroy {
629629
* @hidden
630630
*/
631631
constructor(
632-
private cdr: ChangeDetectorRef,
633-
private utils: CalendarUtils,
632+
protected cdr: ChangeDetectorRef,
633+
protected utils: CalendarUtils,
634634
@Inject(LOCALE_ID) locale: string,
635-
private dateAdapter: DateAdapter
635+
protected dateAdapter: DateAdapter
636636
) {
637637
this.locale = locale;
638638
}
@@ -700,7 +700,7 @@ export class CalendarWeekViewComponent implements OnChanges, OnInit, OnDestroy {
700700
}
701701
}
702702

703-
private resizeStarted(eventsContainer: HTMLElement, minWidth?: number) {
703+
protected resizeStarted(eventsContainer: HTMLElement, minWidth?: number) {
704704
this.dayColumnWidth = this.getDayColumnWidth(eventsContainer);
705705
const resizeHelper: CalendarResizeHelper = new CalendarResizeHelper(
706706
eventsContainer,
@@ -988,7 +988,7 @@ export class CalendarWeekViewComponent implements OnChanges, OnInit, OnDestroy {
988988
}
989989
}
990990

991-
private refreshHeader(): void {
991+
protected refreshHeader(): void {
992992
this.days = this.utils.getWeekViewHeader({
993993
viewDate: this.viewDate,
994994
weekStartsOn: this.weekStartsOn,
@@ -1004,17 +1004,17 @@ export class CalendarWeekViewComponent implements OnChanges, OnInit, OnDestroy {
10041004
});
10051005
}
10061006

1007-
private refreshBody(): void {
1007+
protected refreshBody(): void {
10081008
this.view = this.getWeekView(this.events);
10091009
}
10101010

1011-
private refreshAll(): void {
1011+
protected refreshAll(): void {
10121012
this.refreshHeader();
10131013
this.refreshBody();
10141014
this.emitBeforeViewRender();
10151015
}
10161016

1017-
private emitBeforeViewRender(): void {
1017+
protected emitBeforeViewRender(): void {
10181018
if (this.days && this.view) {
10191019
this.beforeViewRender.emit({
10201020
header: this.days,
@@ -1023,7 +1023,7 @@ export class CalendarWeekViewComponent implements OnChanges, OnInit, OnDestroy {
10231023
}
10241024
}
10251025

1026-
private getWeekView(events: CalendarEvent[]) {
1026+
protected getWeekView(events: CalendarEvent[]) {
10271027
return this.utils.getWeekView({
10281028
events,
10291029
viewDate: this.viewDate,
@@ -1052,7 +1052,7 @@ export class CalendarWeekViewComponent implements OnChanges, OnInit, OnDestroy {
10521052
});
10531053
}
10541054

1055-
private getDragMovedEventTimes(
1055+
protected getDragMovedEventTimes(
10561056
weekEvent: WeekViewAllDayEvent | DayViewEvent,
10571057
dragEndEvent: DragEndEvent | DragMoveEvent,
10581058
dayWidth: number,
@@ -1093,7 +1093,7 @@ export class CalendarWeekViewComponent implements OnChanges, OnInit, OnDestroy {
10931093
return { start, end };
10941094
}
10951095

1096-
private restoreOriginalEvents(
1096+
protected restoreOriginalEvents(
10971097
tempEvents: CalendarEvent[],
10981098
adjustedEvents: Map<CalendarEvent, CalendarEvent>
10991099
) {
@@ -1134,7 +1134,7 @@ export class CalendarWeekViewComponent implements OnChanges, OnInit, OnDestroy {
11341134
adjustedEvents.clear();
11351135
}
11361136

1137-
private getTimeEventResizedDates(
1137+
protected getTimeEventResizedDates(
11381138
calendarEvent: CalendarEvent,
11391139
resizeEvent: ResizeEvent
11401140
) {

0 commit comments

Comments
 (0)