ngx-core-components 0.3.18 → 0.3.20
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/charts/adjacency-matrix/adjacency-matrix.component.d.ts +51 -0
- package/charts/bar-chart/bar-chart.component.d.ts +16 -2
- package/charts/biplot/biplot.component.d.ts +67 -0
- package/charts/bullet-chart/bullet-chart.component.d.ts +37 -0
- package/charts/chord-diagram/chord-diagram.component.d.ts +56 -0
- package/charts/dependency-wheel/dependency-wheel.component.d.ts +56 -0
- package/charts/dumbbell-chart/dumbbell-chart.component.d.ts +61 -0
- package/charts/kagi-chart/kagi-chart.component.d.ts +59 -0
- package/charts/line-chart/line-chart.component.d.ts +17 -2
- package/charts/lollipop-chart/lollipop-chart.component.d.ts +46 -0
- package/charts/marimekko-chart/marimekko-chart.component.d.ts +61 -0
- package/charts/pareto-chart/pareto-chart.component.d.ts +52 -0
- package/charts/point-figure-chart/point-figure-chart.component.d.ts +56 -0
- package/charts/polar-area-chart/polar-area-chart.component.d.ts +67 -0
- package/charts/public-api.d.ts +33 -0
- package/charts/renko-chart/renko-chart.component.d.ts +58 -0
- package/charts/ridgeline-chart/ridgeline-chart.component.d.ts +59 -0
- package/charts/sankey-chart/sankey-chart.component.d.ts +74 -0
- package/charts/slope-chart/slope-chart.component.d.ts +52 -0
- package/charts/violin-plot/violin-plot.component.d.ts +64 -0
- package/charts/wind-rose/wind-rose.component.d.ts +68 -0
- package/fesm2022/ngx-core-components-charts.mjs +7787 -42
- package/fesm2022/ngx-core-components-charts.mjs.map +1 -1
- package/fesm2022/ngx-core-components-inputs.mjs +7 -2
- package/fesm2022/ngx-core-components-inputs.mjs.map +1 -1
- package/fesm2022/ngx-core-components-views.mjs +531 -201
- package/fesm2022/ngx-core-components-views.mjs.map +1 -1
- package/fesm2022/ngx-core-components.mjs +1 -1
- package/fesm2022/ngx-core-components.mjs.map +1 -1
- package/inputs/tag-input/tag-input.component.d.ts +2 -0
- package/package.json +1 -1
- package/public-api.d.ts +33 -0
- package/views/calendar/calendar.component.d.ts +28 -1
|
@@ -3726,18 +3726,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
3726
3726
|
|
|
3727
3727
|
class CalendarComponent {
|
|
3728
3728
|
value = model(null);
|
|
3729
|
+
rangeStart = model(null);
|
|
3730
|
+
rangeEnd = model(null);
|
|
3729
3731
|
events = input([]);
|
|
3730
3732
|
readonly = input(false);
|
|
3733
|
+
selectionMode = input('single');
|
|
3734
|
+
min = input(null);
|
|
3735
|
+
max = input(null);
|
|
3731
3736
|
// Content Projection for custom cell
|
|
3732
3737
|
dayTemplateSignal;
|
|
3733
3738
|
dayTemplate = computed(() => this.dayTemplateSignal);
|
|
3734
3739
|
activeMonthDate = signal(new Date());
|
|
3735
3740
|
focusedDate = signal(new Date());
|
|
3741
|
+
currentView = signal('month');
|
|
3742
|
+
yearPickerStart = signal(new Date().getFullYear() - 5);
|
|
3736
3743
|
dateSelect = output();
|
|
3744
|
+
rangeSelect = output();
|
|
3737
3745
|
monthChange = output();
|
|
3746
|
+
eventClick = output();
|
|
3738
3747
|
weekDays = signal([
|
|
3739
3748
|
'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'
|
|
3740
3749
|
]);
|
|
3750
|
+
monthsList = signal([
|
|
3751
|
+
'January', 'February', 'March', 'April', 'May', 'June',
|
|
3752
|
+
'July', 'August', 'September', 'October', 'November', 'December'
|
|
3753
|
+
]);
|
|
3741
3754
|
cellElements;
|
|
3742
3755
|
monthLabel = computed(() => {
|
|
3743
3756
|
return this.activeMonthDate().toLocaleDateString('en-US', {
|
|
@@ -3745,6 +3758,10 @@ class CalendarComponent {
|
|
|
3745
3758
|
year: 'numeric'
|
|
3746
3759
|
});
|
|
3747
3760
|
});
|
|
3761
|
+
yearPickerYears = computed(() => {
|
|
3762
|
+
const start = this.yearPickerStart();
|
|
3763
|
+
return Array.from({ length: 12 }, (_, i) => start + i);
|
|
3764
|
+
});
|
|
3748
3765
|
// Flat 42 cell list computed signal
|
|
3749
3766
|
gridCells = computed(() => {
|
|
3750
3767
|
const activeDate = this.activeMonthDate();
|
|
@@ -3757,22 +3774,24 @@ class CalendarComponent {
|
|
|
3757
3774
|
const cells = [];
|
|
3758
3775
|
const selectedVal = this.value();
|
|
3759
3776
|
const focusedVal = this.focusedDate();
|
|
3777
|
+
const rangeStartVal = this.rangeStart();
|
|
3778
|
+
const rangeEndVal = this.rangeEnd();
|
|
3760
3779
|
// Previous month cells
|
|
3761
3780
|
for (let i = startDayOfWeek - 1; i >= 0; i--) {
|
|
3762
3781
|
const day = prevMonthTotalDays - i;
|
|
3763
3782
|
const date = new Date(year, month - 1, day);
|
|
3764
|
-
cells.push(this.createCellObj(date, day, false, selectedVal, focusedVal));
|
|
3783
|
+
cells.push(this.createCellObj(date, day, false, selectedVal, focusedVal, rangeStartVal, rangeEndVal));
|
|
3765
3784
|
}
|
|
3766
3785
|
// Current month cells
|
|
3767
3786
|
for (let day = 1; day <= totalDays; day++) {
|
|
3768
3787
|
const date = new Date(year, month, day);
|
|
3769
|
-
cells.push(this.createCellObj(date, day, true, selectedVal, focusedVal));
|
|
3788
|
+
cells.push(this.createCellObj(date, day, true, selectedVal, focusedVal, rangeStartVal, rangeEndVal));
|
|
3770
3789
|
}
|
|
3771
3790
|
// Next month cells
|
|
3772
3791
|
const remainingCells = 42 - cells.length;
|
|
3773
3792
|
for (let day = 1; day <= remainingCells; day++) {
|
|
3774
3793
|
const date = new Date(year, month + 1, day);
|
|
3775
|
-
cells.push(this.createCellObj(date, day, false, selectedVal, focusedVal));
|
|
3794
|
+
cells.push(this.createCellObj(date, day, false, selectedVal, focusedVal, rangeStartVal, rangeEndVal));
|
|
3776
3795
|
}
|
|
3777
3796
|
return cells;
|
|
3778
3797
|
});
|
|
@@ -3785,15 +3804,25 @@ class CalendarComponent {
|
|
|
3785
3804
|
}
|
|
3786
3805
|
return rows;
|
|
3787
3806
|
});
|
|
3788
|
-
createCellObj(date, dayNumber, isCurrentMonth, selectedVal, focusedVal) {
|
|
3807
|
+
createCellObj(date, dayNumber, isCurrentMonth, selectedVal, focusedVal, rangeStartVal, rangeEndVal) {
|
|
3808
|
+
const isRangeStart = rangeStartVal ? this.isSameDay(date, rangeStartVal) : false;
|
|
3809
|
+
const isRangeEnd = rangeEndVal ? this.isSameDay(date, rangeEndVal) : false;
|
|
3810
|
+
const isInRange = rangeStartVal && rangeEndVal && date >= rangeStartVal && date <= rangeEndVal;
|
|
3811
|
+
const isDisabled = this.isDateDisabled(date);
|
|
3789
3812
|
return {
|
|
3790
3813
|
date,
|
|
3791
3814
|
dayNumber,
|
|
3792
3815
|
isCurrentMonth,
|
|
3793
3816
|
isToday: this.isSameDay(date, new Date()),
|
|
3794
|
-
isSelected:
|
|
3817
|
+
isSelected: this.selectionMode() === 'range'
|
|
3818
|
+
? (isRangeStart || isRangeEnd)
|
|
3819
|
+
: (selectedVal ? this.isSameDay(date, selectedVal) : false),
|
|
3795
3820
|
isFocused: this.isSameDay(date, focusedVal),
|
|
3796
|
-
events: this.getEventsForDate(date)
|
|
3821
|
+
events: this.getEventsForDate(date),
|
|
3822
|
+
isRangeStart,
|
|
3823
|
+
isRangeEnd,
|
|
3824
|
+
isInRange: !!isInRange,
|
|
3825
|
+
isDisabled
|
|
3797
3826
|
};
|
|
3798
3827
|
}
|
|
3799
3828
|
isSameDay(d1, d2) {
|
|
@@ -3801,6 +3830,25 @@ class CalendarComponent {
|
|
|
3801
3830
|
d1.getMonth() === d2.getMonth() &&
|
|
3802
3831
|
d1.getDate() === d2.getDate());
|
|
3803
3832
|
}
|
|
3833
|
+
isDateDisabled(date) {
|
|
3834
|
+
const minVal = this.min();
|
|
3835
|
+
const maxVal = this.max();
|
|
3836
|
+
// Reset times for exact day comparisons
|
|
3837
|
+
const checkDate = new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
3838
|
+
if (minVal) {
|
|
3839
|
+
const minDate = typeof minVal === 'string' ? new Date(minVal) : minVal;
|
|
3840
|
+
const minCheck = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate());
|
|
3841
|
+
if (checkDate < minCheck)
|
|
3842
|
+
return true;
|
|
3843
|
+
}
|
|
3844
|
+
if (maxVal) {
|
|
3845
|
+
const maxDate = typeof maxVal === 'string' ? new Date(maxVal) : maxVal;
|
|
3846
|
+
const maxCheck = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate());
|
|
3847
|
+
if (checkDate > maxCheck)
|
|
3848
|
+
return true;
|
|
3849
|
+
}
|
|
3850
|
+
return false;
|
|
3851
|
+
}
|
|
3804
3852
|
getEventsForDate(date) {
|
|
3805
3853
|
return this.events().filter(e => {
|
|
3806
3854
|
const eDate = typeof e.date === 'string' ? new Date(e.date) : e.date;
|
|
@@ -3830,11 +3878,34 @@ class CalendarComponent {
|
|
|
3830
3878
|
this.emitMonthChange();
|
|
3831
3879
|
}
|
|
3832
3880
|
selectCell(cell) {
|
|
3833
|
-
if (this.readonly())
|
|
3881
|
+
if (this.readonly() || cell.isDisabled)
|
|
3834
3882
|
return;
|
|
3835
|
-
this.
|
|
3883
|
+
if (this.selectionMode() === 'range') {
|
|
3884
|
+
const clickedDate = cell.date;
|
|
3885
|
+
const start = this.rangeStart();
|
|
3886
|
+
const end = this.rangeEnd();
|
|
3887
|
+
if (!start || (start && end)) {
|
|
3888
|
+
this.rangeStart.set(clickedDate);
|
|
3889
|
+
this.rangeEnd.set(null);
|
|
3890
|
+
this.rangeSelect.emit({ start: clickedDate, end: null });
|
|
3891
|
+
}
|
|
3892
|
+
else {
|
|
3893
|
+
if (clickedDate < start) {
|
|
3894
|
+
this.rangeStart.set(clickedDate);
|
|
3895
|
+
this.rangeEnd.set(start);
|
|
3896
|
+
this.rangeSelect.emit({ start: clickedDate, end: start });
|
|
3897
|
+
}
|
|
3898
|
+
else {
|
|
3899
|
+
this.rangeEnd.set(clickedDate);
|
|
3900
|
+
this.rangeSelect.emit({ start, end: clickedDate });
|
|
3901
|
+
}
|
|
3902
|
+
}
|
|
3903
|
+
}
|
|
3904
|
+
else {
|
|
3905
|
+
this.value.set(cell.date);
|
|
3906
|
+
this.dateSelect.emit(cell.date);
|
|
3907
|
+
}
|
|
3836
3908
|
this.focusedDate.set(cell.date);
|
|
3837
|
-
this.dateSelect.emit(cell.date);
|
|
3838
3909
|
// If clicked other month day, snap page view
|
|
3839
3910
|
if (!cell.isCurrentMonth) {
|
|
3840
3911
|
this.activeMonthDate.set(new Date(cell.date.getFullYear(), cell.date.getMonth(), 1));
|
|
@@ -3848,9 +3919,54 @@ class CalendarComponent {
|
|
|
3848
3919
|
month: active.getMonth()
|
|
3849
3920
|
});
|
|
3850
3921
|
}
|
|
3922
|
+
setView(view) {
|
|
3923
|
+
this.currentView.set(view);
|
|
3924
|
+
if (view === 'year-picker') {
|
|
3925
|
+
const year = this.activeMonthDate().getFullYear();
|
|
3926
|
+
this.yearPickerStart.set(year - 5);
|
|
3927
|
+
}
|
|
3928
|
+
}
|
|
3929
|
+
isCurrentActiveMonth(monthIdx) {
|
|
3930
|
+
return this.activeMonthDate().getMonth() === monthIdx;
|
|
3931
|
+
}
|
|
3932
|
+
isCurrentActiveYear(year) {
|
|
3933
|
+
return this.activeMonthDate().getFullYear() === year;
|
|
3934
|
+
}
|
|
3935
|
+
selectMonth(monthIdx) {
|
|
3936
|
+
const current = this.activeMonthDate();
|
|
3937
|
+
const updated = new Date(current.getFullYear(), monthIdx, 1);
|
|
3938
|
+
this.activeMonthDate.set(updated);
|
|
3939
|
+
this.focusedDate.set(updated);
|
|
3940
|
+
this.setView('month');
|
|
3941
|
+
this.emitMonthChange();
|
|
3942
|
+
}
|
|
3943
|
+
selectYear(year) {
|
|
3944
|
+
const current = this.activeMonthDate();
|
|
3945
|
+
const updated = new Date(year, current.getMonth(), 1);
|
|
3946
|
+
this.activeMonthDate.set(updated);
|
|
3947
|
+
this.focusedDate.set(updated);
|
|
3948
|
+
this.setView('month-picker');
|
|
3949
|
+
this.emitMonthChange();
|
|
3950
|
+
}
|
|
3951
|
+
changeYear(delta) {
|
|
3952
|
+
const current = this.activeMonthDate();
|
|
3953
|
+
const updated = new Date(current.getFullYear() + delta, current.getMonth(), 1);
|
|
3954
|
+
this.activeMonthDate.set(updated);
|
|
3955
|
+
this.focusedDate.set(updated);
|
|
3956
|
+
this.emitMonthChange();
|
|
3957
|
+
}
|
|
3958
|
+
changeYearRange(delta) {
|
|
3959
|
+
this.yearPickerStart.update(start => start + delta);
|
|
3960
|
+
}
|
|
3961
|
+
onEventClick(event, calEvent) {
|
|
3962
|
+
event.stopPropagation();
|
|
3963
|
+
if (this.readonly())
|
|
3964
|
+
return;
|
|
3965
|
+
this.eventClick.emit(calEvent);
|
|
3966
|
+
}
|
|
3851
3967
|
// Keyboard navigation
|
|
3852
3968
|
onCellKeyDown(event, cell) {
|
|
3853
|
-
if (this.readonly())
|
|
3969
|
+
if (this.readonly() || cell.isDisabled)
|
|
3854
3970
|
return;
|
|
3855
3971
|
let handled = false;
|
|
3856
3972
|
const currentFocus = new Date(this.focusedDate());
|
|
@@ -3879,6 +3995,10 @@ class CalendarComponent {
|
|
|
3879
3995
|
}
|
|
3880
3996
|
if (handled) {
|
|
3881
3997
|
event.preventDefault();
|
|
3998
|
+
// Prevent moving focus to a disabled date
|
|
3999
|
+
if (this.isDateDisabled(currentFocus)) {
|
|
4000
|
+
return;
|
|
4001
|
+
}
|
|
3882
4002
|
this.focusedDate.set(currentFocus);
|
|
3883
4003
|
// Check if we navigated to a date outside the current active month, and auto-snap activeMonth
|
|
3884
4004
|
const active = this.activeMonthDate();
|
|
@@ -3897,7 +4017,7 @@ class CalendarComponent {
|
|
|
3897
4017
|
}
|
|
3898
4018
|
}
|
|
3899
4019
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
3900
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: CalendarComponent, isStandalone: true, selector: "ngx-calendar", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, events: { classPropertyName: "events", publicName: "events", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", dateSelect: "dateSelect", monthChange: "monthChange" }, queries: [{ propertyName: "dayTemplateSignal", first: true, predicate: ["dayTemplate"], descendants: true }], viewQueries: [{ propertyName: "cellElements", predicate: ["cellEl"], descendants: true }], ngImport: i0, template: `
|
|
4020
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.20", type: CalendarComponent, isStandalone: true, selector: "ngx-calendar", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, rangeStart: { classPropertyName: "rangeStart", publicName: "rangeStart", isSignal: true, isRequired: false, transformFunction: null }, rangeEnd: { classPropertyName: "rangeEnd", publicName: "rangeEnd", isSignal: true, isRequired: false, transformFunction: null }, events: { classPropertyName: "events", publicName: "events", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, selectionMode: { classPropertyName: "selectionMode", publicName: "selectionMode", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", rangeStart: "rangeStartChange", rangeEnd: "rangeEndChange", dateSelect: "dateSelect", rangeSelect: "rangeSelect", monthChange: "monthChange", eventClick: "eventClick" }, queries: [{ propertyName: "dayTemplateSignal", first: true, predicate: ["dayTemplate"], descendants: true }], viewQueries: [{ propertyName: "cellElements", predicate: ["cellEl"], descendants: true }], ngImport: i0, template: `
|
|
3901
4021
|
<div
|
|
3902
4022
|
class="ngx-calendar-container"
|
|
3903
4023
|
role="application"
|
|
@@ -3906,115 +4026,220 @@ class CalendarComponent {
|
|
|
3906
4026
|
<!-- HEADER -->
|
|
3907
4027
|
<div class="ngx-calendar-header">
|
|
3908
4028
|
<h2 class="ngx-calendar-title" aria-live="polite">
|
|
3909
|
-
|
|
4029
|
+
@if (currentView() === 'month') {
|
|
4030
|
+
<button class="ngx-calendar-title-link" (click)="setView('month-picker')" type="button">
|
|
4031
|
+
{{ monthLabel() }}
|
|
4032
|
+
</button>
|
|
4033
|
+
} @else if (currentView() === 'month-picker') {
|
|
4034
|
+
<button class="ngx-calendar-title-link" (click)="setView('year-picker')" type="button">
|
|
4035
|
+
{{ activeMonthDate().getFullYear() }}
|
|
4036
|
+
</button>
|
|
4037
|
+
} @else {
|
|
4038
|
+
<span class="ngx-calendar-title-static">
|
|
4039
|
+
Select Year
|
|
4040
|
+
</span>
|
|
4041
|
+
}
|
|
3910
4042
|
</h2>
|
|
3911
4043
|
<div class="ngx-calendar-actions">
|
|
3912
|
-
|
|
3913
|
-
|
|
3914
|
-
|
|
3915
|
-
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
‹
|
|
3919
|
-
</button>
|
|
3920
|
-
<button
|
|
3921
|
-
class="ngx-cal-btn today-btn"
|
|
3922
|
-
(click)="goToToday()"
|
|
3923
|
-
type="button"
|
|
3924
|
-
aria-label="Go to Today"
|
|
3925
|
-
>
|
|
3926
|
-
Today
|
|
3927
|
-
</button>
|
|
3928
|
-
<button
|
|
3929
|
-
class="ngx-cal-btn next-btn"
|
|
3930
|
-
(click)="nextMonth()"
|
|
3931
|
-
type="button"
|
|
3932
|
-
aria-label="Next Month"
|
|
3933
|
-
>
|
|
3934
|
-
›
|
|
3935
|
-
</button>
|
|
3936
|
-
</div>
|
|
3937
|
-
</div>
|
|
3938
|
-
|
|
3939
|
-
<!-- GRID -->
|
|
3940
|
-
<div
|
|
3941
|
-
class="ngx-calendar-grid"
|
|
3942
|
-
role="grid"
|
|
3943
|
-
[attr.aria-label]="monthLabel()"
|
|
3944
|
-
>
|
|
3945
|
-
<!-- WEEKDAYS HEADER -->
|
|
3946
|
-
<div class="ngx-calendar-row weekdays-row" role="row">
|
|
3947
|
-
@for (day of weekDays(); track day) {
|
|
3948
|
-
<div
|
|
3949
|
-
class="ngx-calendar-weekday"
|
|
3950
|
-
role="columnheader"
|
|
3951
|
-
[attr.aria-label]="day"
|
|
4044
|
+
@if (currentView() === 'month') {
|
|
4045
|
+
<button
|
|
4046
|
+
class="ngx-cal-btn prev-btn"
|
|
4047
|
+
(click)="prevMonth()"
|
|
4048
|
+
type="button"
|
|
4049
|
+
aria-label="Previous Month"
|
|
3952
4050
|
>
|
|
3953
|
-
|
|
3954
|
-
</
|
|
4051
|
+
‹
|
|
4052
|
+
</button>
|
|
4053
|
+
<button
|
|
4054
|
+
class="ngx-cal-btn today-btn"
|
|
4055
|
+
(click)="goToToday()"
|
|
4056
|
+
type="button"
|
|
4057
|
+
aria-label="Go to Today"
|
|
4058
|
+
>
|
|
4059
|
+
Today
|
|
4060
|
+
</button>
|
|
4061
|
+
<button
|
|
4062
|
+
class="ngx-cal-btn next-btn"
|
|
4063
|
+
(click)="nextMonth()"
|
|
4064
|
+
type="button"
|
|
4065
|
+
aria-label="Next Month"
|
|
4066
|
+
>
|
|
4067
|
+
›
|
|
4068
|
+
</button>
|
|
4069
|
+
} @else if (currentView() === 'month-picker') {
|
|
4070
|
+
<button
|
|
4071
|
+
class="ngx-cal-btn prev-btn"
|
|
4072
|
+
(click)="changeYear(-1)"
|
|
4073
|
+
type="button"
|
|
4074
|
+
aria-label="Previous Year"
|
|
4075
|
+
>
|
|
4076
|
+
‹
|
|
4077
|
+
</button>
|
|
4078
|
+
<button
|
|
4079
|
+
class="ngx-cal-btn back-btn"
|
|
4080
|
+
(click)="setView('month')"
|
|
4081
|
+
type="button"
|
|
4082
|
+
>
|
|
4083
|
+
Back
|
|
4084
|
+
</button>
|
|
4085
|
+
<button
|
|
4086
|
+
class="ngx-cal-btn next-btn"
|
|
4087
|
+
(click)="changeYear(1)"
|
|
4088
|
+
type="button"
|
|
4089
|
+
aria-label="Next Year"
|
|
4090
|
+
>
|
|
4091
|
+
›
|
|
4092
|
+
</button>
|
|
4093
|
+
} @else {
|
|
4094
|
+
<button
|
|
4095
|
+
class="ngx-cal-btn prev-btn"
|
|
4096
|
+
(click)="changeYearRange(-12)"
|
|
4097
|
+
type="button"
|
|
4098
|
+
aria-label="Previous Years"
|
|
4099
|
+
>
|
|
4100
|
+
‹
|
|
4101
|
+
</button>
|
|
4102
|
+
<button
|
|
4103
|
+
class="ngx-cal-btn back-btn"
|
|
4104
|
+
(click)="setView('month-picker')"
|
|
4105
|
+
type="button"
|
|
4106
|
+
>
|
|
4107
|
+
Back
|
|
4108
|
+
</button>
|
|
4109
|
+
<button
|
|
4110
|
+
class="ngx-cal-btn next-btn"
|
|
4111
|
+
(click)="changeYearRange(12)"
|
|
4112
|
+
type="button"
|
|
4113
|
+
aria-label="Next Years"
|
|
4114
|
+
>
|
|
4115
|
+
›
|
|
4116
|
+
</button>
|
|
3955
4117
|
}
|
|
3956
4118
|
</div>
|
|
4119
|
+
</div>
|
|
3957
4120
|
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
|
|
3961
|
-
|
|
3962
|
-
|
|
4121
|
+
<!-- MAIN VIEW AREA -->
|
|
4122
|
+
<div class="ngx-calendar-view-area">
|
|
4123
|
+
<!-- MONTH VIEW (GRID) -->
|
|
4124
|
+
@if (currentView() === 'month') {
|
|
4125
|
+
<div
|
|
4126
|
+
class="ngx-calendar-grid"
|
|
4127
|
+
role="grid"
|
|
4128
|
+
[attr.aria-label]="monthLabel()"
|
|
4129
|
+
>
|
|
4130
|
+
<!-- WEEKDAYS HEADER -->
|
|
4131
|
+
<div class="ngx-calendar-row weekdays-row" role="row">
|
|
4132
|
+
@for (day of weekDays(); track day) {
|
|
3963
4133
|
<div
|
|
3964
|
-
|
|
3965
|
-
|
|
3966
|
-
[
|
|
3967
|
-
[class.other-month]="!cell.isCurrentMonth"
|
|
3968
|
-
[class.today]="cell.isToday"
|
|
3969
|
-
[class.selected]="cell.isSelected"
|
|
3970
|
-
[class.focused]="cell.isFocused"
|
|
3971
|
-
[class.has-events]="cell.events.length > 0"
|
|
3972
|
-
role="gridcell"
|
|
3973
|
-
[attr.aria-selected]="cell.isSelected"
|
|
3974
|
-
[attr.aria-label]="cell.date | date:'longDate'"
|
|
3975
|
-
[attr.tabindex]="cell.isFocused && !readonly() ? '0' : '-1'"
|
|
3976
|
-
(click)="selectCell(cell)"
|
|
3977
|
-
(keydown)="onCellKeyDown($event, cell)"
|
|
4134
|
+
class="ngx-calendar-weekday"
|
|
4135
|
+
role="columnheader"
|
|
4136
|
+
[attr.aria-label]="day"
|
|
3978
4137
|
>
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
<span class="today-indicator" aria-hidden="true"></span>
|
|
3984
|
-
}
|
|
3985
|
-
</div>
|
|
4138
|
+
{{ day.slice(0, 3) }}
|
|
4139
|
+
</div>
|
|
4140
|
+
}
|
|
4141
|
+
</div>
|
|
3986
4142
|
|
|
3987
|
-
|
|
3988
|
-
|
|
3989
|
-
|
|
3990
|
-
|
|
3991
|
-
|
|
3992
|
-
|
|
3993
|
-
|
|
3994
|
-
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4143
|
+
<!-- DAYS GRID -->
|
|
4144
|
+
<div class="ngx-calendar-body">
|
|
4145
|
+
@for (row of gridRows(); track $index) {
|
|
4146
|
+
<div class="ngx-calendar-row" role="row">
|
|
4147
|
+
@for (cell of row; track cell.date.getTime()) {
|
|
4148
|
+
<div
|
|
4149
|
+
#cellEl
|
|
4150
|
+
class="ngx-calendar-cell"
|
|
4151
|
+
[class.current-month]="cell.isCurrentMonth"
|
|
4152
|
+
[class.other-month]="!cell.isCurrentMonth"
|
|
4153
|
+
[class.today]="cell.isToday"
|
|
4154
|
+
[class.selected]="cell.isSelected"
|
|
4155
|
+
[class.focused]="cell.isFocused"
|
|
4156
|
+
[class.has-events]="cell.events.length > 0"
|
|
4157
|
+
[class.range-start]="cell.isRangeStart"
|
|
4158
|
+
[class.range-end]="cell.isRangeEnd"
|
|
4159
|
+
[class.in-range]="cell.isInRange"
|
|
4160
|
+
[class.disabled]="cell.isDisabled"
|
|
4161
|
+
role="gridcell"
|
|
4162
|
+
[attr.aria-selected]="cell.isSelected"
|
|
4163
|
+
[attr.aria-disabled]="cell.isDisabled"
|
|
4164
|
+
[attr.aria-label]="cell.date | date:'longDate'"
|
|
4165
|
+
[attr.tabindex]="cell.isFocused && !readonly() && !cell.isDisabled ? '0' : '-1'"
|
|
4166
|
+
(click)="selectCell(cell)"
|
|
4167
|
+
(keydown)="onCellKeyDown($event, cell)"
|
|
4168
|
+
>
|
|
4169
|
+
<!-- Cell Header (Day Number) -->
|
|
4170
|
+
<div class="cell-header">
|
|
4171
|
+
<span class="day-number">{{ cell.dayNumber }}</span>
|
|
4172
|
+
@if (cell.isToday) {
|
|
4173
|
+
<span class="today-indicator" aria-hidden="true"></span>
|
|
4174
|
+
}
|
|
4175
|
+
</div>
|
|
4176
|
+
|
|
4177
|
+
<!-- Events List or Custom Day Template -->
|
|
4178
|
+
<div class="cell-content">
|
|
4179
|
+
@if (dayTemplate()) {
|
|
4180
|
+
<ng-container
|
|
4181
|
+
*ngTemplateOutlet="dayTemplate()!; context: { $implicit: cell.date, events: cell.events }"
|
|
4182
|
+
></ng-container>
|
|
4183
|
+
} @else {
|
|
4184
|
+
@for (event of cell.events.slice(0, 3); track event.title) {
|
|
4185
|
+
<div
|
|
4186
|
+
class="calendar-event-pill"
|
|
4187
|
+
[style.border-left-color]="event.color || '#4f46e5'"
|
|
4188
|
+
[attr.title]="event.title + (event.description ? ': ' + event.description : '')"
|
|
4189
|
+
(click)="onEventClick($event, event)"
|
|
4190
|
+
>
|
|
4191
|
+
{{ event.title }}
|
|
4192
|
+
</div>
|
|
4193
|
+
}
|
|
4194
|
+
@if (cell.events.length > 3) {
|
|
4195
|
+
<div class="events-overflow-indicator">
|
|
4196
|
+
+{{ cell.events.length - 3 }} more
|
|
4197
|
+
</div>
|
|
4198
|
+
}
|
|
4199
|
+
}
|
|
4200
|
+
</div>
|
|
4201
|
+
</div>
|
|
4202
|
+
}
|
|
4010
4203
|
</div>
|
|
4011
4204
|
}
|
|
4012
4205
|
</div>
|
|
4013
|
-
|
|
4014
|
-
|
|
4206
|
+
</div>
|
|
4207
|
+
}
|
|
4208
|
+
|
|
4209
|
+
<!-- MONTH PICKER GRID -->
|
|
4210
|
+
@if (currentView() === 'month-picker') {
|
|
4211
|
+
<div class="ngx-calendar-picker-grid month-picker-grid">
|
|
4212
|
+
@for (month of monthsList(); track $index) {
|
|
4213
|
+
<button
|
|
4214
|
+
class="ngx-picker-item"
|
|
4215
|
+
[class.active]="isCurrentActiveMonth($index)"
|
|
4216
|
+
(click)="selectMonth($index)"
|
|
4217
|
+
type="button"
|
|
4218
|
+
>
|
|
4219
|
+
{{ month.slice(0, 3) }}
|
|
4220
|
+
</button>
|
|
4221
|
+
}
|
|
4222
|
+
</div>
|
|
4223
|
+
}
|
|
4224
|
+
|
|
4225
|
+
<!-- YEAR PICKER GRID -->
|
|
4226
|
+
@if (currentView() === 'year-picker') {
|
|
4227
|
+
<div class="ngx-calendar-picker-grid year-picker-grid">
|
|
4228
|
+
@for (year of yearPickerYears(); track year) {
|
|
4229
|
+
<button
|
|
4230
|
+
class="ngx-picker-item"
|
|
4231
|
+
[class.active]="isCurrentActiveYear(year)"
|
|
4232
|
+
(click)="selectYear(year)"
|
|
4233
|
+
type="button"
|
|
4234
|
+
>
|
|
4235
|
+
{{ year }}
|
|
4236
|
+
</button>
|
|
4237
|
+
}
|
|
4238
|
+
</div>
|
|
4239
|
+
}
|
|
4015
4240
|
</div>
|
|
4016
4241
|
</div>
|
|
4017
|
-
`, isInline: true, styles: [":host{display:block;width:100%;--ngx-calendar-border: #cbd5e1;--ngx-calendar-bg: #ffffff;--ngx-calendar-header-bg: #f8fafc;--ngx-calendar-text: #0f172a;--ngx-calendar-text-muted: #64748b;--ngx-calendar-cell-other-bg: #f8fafc;--ngx-calendar-hover-bg: #f1f5f9;--ngx-calendar-focus-shadow: 0 0 0 3px rgba(79, 70, 229, .2);--ngx-calendar-active-color: #4f46e5;--ngx-calendar-selected-bg: rgba(79, 70, 229, .05);--ngx-calendar-selected-border: #4f46e5;--event-pill-bg: #f1f5f9;--event-pill-text: #334155}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-calendar-border: #334155;--ngx-calendar-bg: #0f172a;--ngx-calendar-header-bg: #1e293b;--ngx-calendar-text: #f8fafc;--ngx-calendar-text-muted: #94a3b8;--ngx-calendar-cell-other-bg: #0b0f19;--ngx-calendar-hover-bg: #1e293b;--ngx-calendar-focus-shadow: 0 0 0 3px rgba(129, 140, 248, .25);--ngx-calendar-active-color: #818cf8;--ngx-calendar-selected-bg: rgba(129, 140, 248, .08);--ngx-calendar-selected-border: #818cf8;--event-pill-bg: #1e293b;--event-pill-text: #cbd5e1}.ngx-calendar-container{display:flex;flex-direction:column;border:1px solid var(--ngx-calendar-border);border-radius:12px;background:var(--ngx-calendar-bg);color:var(--ngx-calendar-text);font-family:inherit;overflow:hidden;box-shadow:0 4px 20px -2px #0000000d;transition:all .3s cubic-bezier(.4,0,.2,1)}.ngx-calendar-header{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;background:var(--ngx-calendar-header-bg);border-bottom:1px solid var(--ngx-calendar-border)}.ngx-calendar-title{margin:0;font-size:18px;font-weight:700;letter-spacing:-.3px}.ngx-calendar-actions{display:flex;align-items:center;gap:6px}.ngx-cal-btn{background:var(--ngx-calendar-bg);border:1px solid var(--ngx-calendar-border);border-radius:8px;color:var(--ngx-calendar-text);font-size:13px;font-weight:600;padding:6px 12px;cursor:pointer;font-family:inherit;transition:all .2s ease;display:inline-flex;align-items:center;justify-content:center}.ngx-cal-btn:hover{background:var(--ngx-calendar-hover-bg);border-color:var(--ngx-calendar-active-color);color:var(--ngx-calendar-active-color)}.prev-btn,.next-btn{font-size:16px;width:32px;height:32px;padding:0}.ngx-calendar-grid{display:flex;flex-direction:column;width:100%}.ngx-calendar-row{display:grid;grid-template-columns:repeat(7,1fr);width:100%}.weekdays-row{border-bottom:1px solid var(--ngx-calendar-border);background:var(--ngx-calendar-header-bg)}.ngx-calendar-weekday{padding:12px 6px;text-align:center;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--ngx-calendar-text-muted)}.ngx-calendar-body{display:flex;flex-direction:column}.ngx-calendar-cell{min-height:100px;border-right:1px solid var(--ngx-calendar-border);border-bottom:1px solid var(--ngx-calendar-border);padding:8px;display:flex;flex-direction:column;gap:6px;transition:all .2s cubic-bezier(.4,0,.2,1);position:relative;outline:none;background:var(--ngx-calendar-bg)}.ngx-calendar-row .ngx-calendar-cell:last-child{border-right:none}.ngx-calendar-body .ngx-calendar-row:last-child .ngx-calendar-cell{border-bottom:none}.ngx-calendar-cell.other-month{background:var(--ngx-calendar-cell-other-bg)}.ngx-calendar-cell.other-month .day-number{color:var(--ngx-calendar-text-muted);opacity:.6}.ngx-calendar-cell:not(.selected):hover{background:var(--ngx-calendar-hover-bg);cursor:pointer}.ngx-calendar-cell.selected{background:var(--ngx-calendar-selected-bg)}.ngx-calendar-cell.selected:after{content:\"\";position:absolute;inset:0;border:2px solid var(--ngx-calendar-selected-border);border-radius:4px;pointer-events:none;animation:select-pulse .25s ease-out}.ngx-calendar-cell.focused{z-index:2}.ngx-calendar-cell.focused:focus-visible{box-shadow:var(--ngx-calendar-focus-shadow);border-color:var(--ngx-calendar-active-color)}.cell-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.day-number{font-size:13px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;transition:all .2s ease}.today .day-number{background:var(--ngx-calendar-active-color);color:#fff!important;box-shadow:0 2px 8px #4f46e54d}.today-indicator{width:5px;height:5px;border-radius:50%;background:var(--ngx-calendar-active-color);margin-right:4px}.cell-content{flex:1;display:flex;flex-direction:column;gap:3px;overflow:hidden}.calendar-event-pill{font-size:11px;font-weight:550;padding:3px 6px;border-radius:4px;border-left:3px solid #4f46e5;background:var(--event-pill-bg);color:var(--event-pill-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transition:transform .15s ease,background-color .15s ease}.calendar-event-pill:hover{transform:translate(2px);background:var(--ngx-calendar-hover-bg)}.events-overflow-indicator{font-size:10px;font-weight:700;color:var(--ngx-calendar-active-color);padding-left:6px;margin-top:2px}@keyframes select-pulse{0%{transform:scale(.98);opacity:.7}to{transform:scale(1);opacity:1}}@media (max-width: 768px){.ngx-calendar-cell{min-height:70px;padding:4px}.calendar-event-pill{display:none}.ngx-calendar-cell.has-events:after{content:\"\\2022\";position:absolute;bottom:2px;left:50%;transform:translate(-50%);color:var(--ngx-calendar-active-color);font-size:16px}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4242
|
+
`, isInline: true, styles: [":host{display:block;width:100%;--ngx-calendar-border: #cbd5e1;--ngx-calendar-bg: #ffffff;--ngx-calendar-header-bg: #f8fafc;--ngx-calendar-text: #0f172a;--ngx-calendar-text-muted: #64748b;--ngx-calendar-cell-other-bg: #f8fafc;--ngx-calendar-hover-bg: #f1f5f9;--ngx-calendar-focus-shadow: 0 0 0 3px rgba(79, 70, 229, .2);--ngx-calendar-active-color: #4f46e5;--ngx-calendar-selected-bg: rgba(79, 70, 229, .05);--ngx-calendar-selected-border: #4f46e5;--event-pill-bg: #f1f5f9;--event-pill-text: #334155}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-calendar-border: #334155;--ngx-calendar-bg: #0f172a;--ngx-calendar-header-bg: #1e293b;--ngx-calendar-text: #f8fafc;--ngx-calendar-text-muted: #94a3b8;--ngx-calendar-cell-other-bg: #0b0f19;--ngx-calendar-hover-bg: #1e293b;--ngx-calendar-focus-shadow: 0 0 0 3px rgba(129, 140, 248, .25);--ngx-calendar-active-color: #818cf8;--ngx-calendar-selected-bg: rgba(129, 140, 248, .08);--ngx-calendar-selected-border: #818cf8;--event-pill-bg: #1e293b;--event-pill-text: #cbd5e1}.ngx-calendar-container{display:flex;flex-direction:column;border:1px solid var(--ngx-calendar-border);border-radius:12px;background:var(--ngx-calendar-bg);color:var(--ngx-calendar-text);font-family:inherit;overflow:hidden;box-shadow:0 4px 20px -2px #0000000d;transition:all .3s cubic-bezier(.4,0,.2,1)}.ngx-calendar-header{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;background:var(--ngx-calendar-header-bg);border-bottom:1px solid var(--ngx-calendar-border)}.ngx-calendar-title{margin:0;font-size:18px;font-weight:700;letter-spacing:-.3px}.ngx-calendar-title-link{background:none;border:none;font-size:inherit;font-weight:inherit;color:inherit;cursor:pointer;padding:0;font-family:inherit;transition:color .2s ease;display:inline-flex;align-items:center}.ngx-calendar-title-link:hover{color:var(--ngx-calendar-active-color)}.ngx-calendar-title-static{font-size:inherit;font-weight:inherit;color:inherit}.ngx-calendar-actions{display:flex;align-items:center;gap:6px}.ngx-cal-btn{background:var(--ngx-calendar-bg);border:1px solid var(--ngx-calendar-border);border-radius:8px;color:var(--ngx-calendar-text);font-size:13px;font-weight:600;padding:6px 12px;cursor:pointer;font-family:inherit;transition:all .2s ease;display:inline-flex;align-items:center;justify-content:center}.ngx-cal-btn:hover{background:var(--ngx-calendar-hover-bg);border-color:var(--ngx-calendar-active-color);color:var(--ngx-calendar-active-color)}.prev-btn,.next-btn{font-size:16px;width:32px;height:32px;padding:0}.ngx-calendar-view-area{position:relative;width:100%;background:var(--ngx-calendar-bg)}.ngx-calendar-grid{display:flex;flex-direction:column;width:100%}.ngx-calendar-row{display:grid;grid-template-columns:repeat(7,1fr);width:100%}.weekdays-row{border-bottom:1px solid var(--ngx-calendar-border);background:var(--ngx-calendar-header-bg)}.ngx-calendar-weekday{padding:12px 6px;text-align:center;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--ngx-calendar-text-muted)}.ngx-calendar-body{display:flex;flex-direction:column}.ngx-calendar-cell{min-height:100px;border-right:1px solid var(--ngx-calendar-border);border-bottom:1px solid var(--ngx-calendar-border);padding:8px;display:flex;flex-direction:column;gap:6px;transition:all .2s cubic-bezier(.4,0,.2,1);position:relative;outline:none;background:var(--ngx-calendar-bg)}.ngx-calendar-row .ngx-calendar-cell:last-child{border-right:none}.ngx-calendar-body .ngx-calendar-row:last-child .ngx-calendar-cell{border-bottom:none}.ngx-calendar-cell.other-month{background:var(--ngx-calendar-cell-other-bg)}.ngx-calendar-cell.other-month .day-number{color:var(--ngx-calendar-text-muted);opacity:.6}.ngx-calendar-cell:not(.selected):not(.disabled):hover{background:var(--ngx-calendar-hover-bg);cursor:pointer}.ngx-calendar-cell.selected{background:var(--ngx-calendar-selected-bg)}.ngx-calendar-cell.selected:after{content:\"\";position:absolute;inset:0;border:2px solid var(--ngx-calendar-selected-border);border-radius:4px;pointer-events:none;animation:select-pulse .25s ease-out}.ngx-calendar-cell.focused{z-index:2}.ngx-calendar-cell.focused:focus-visible{box-shadow:var(--ngx-calendar-focus-shadow);border-color:var(--ngx-calendar-active-color)}.ngx-calendar-cell.in-range{background:var(--ngx-calendar-selected-bg)!important}.ngx-calendar-cell.range-start{border-top-left-radius:8px;border-bottom-left-radius:8px;background:var(--ngx-calendar-selected-bg)!important}.ngx-calendar-cell.range-end{border-top-right-radius:8px;border-bottom-right-radius:8px;background:var(--ngx-calendar-selected-bg)!important}.ngx-calendar-cell.range-start:after{content:\"\";position:absolute;inset:0;border:2px solid var(--ngx-calendar-selected-border);border-radius:8px 0 0 8px;pointer-events:none}.ngx-calendar-cell.range-end:after{content:\"\";position:absolute;inset:0;border:2px solid var(--ngx-calendar-selected-border);border-radius:0 8px 8px 0;pointer-events:none}.ngx-calendar-cell.disabled{opacity:.35;pointer-events:none;background:var(--ngx-calendar-cell-other-bg);cursor:not-allowed}.ngx-calendar-cell.disabled .day-number{text-decoration:line-through;color:var(--ngx-calendar-text-muted)}.cell-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.day-number{font-size:13px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;transition:all .2s ease}.today .day-number{background:var(--ngx-calendar-active-color);color:#fff!important;box-shadow:0 2px 8px #4f46e54d}.today-indicator{width:5px;height:5px;border-radius:50%;background:var(--ngx-calendar-active-color);margin-right:4px}.cell-content{flex:1;display:flex;flex-direction:column;gap:3px;overflow:hidden}.calendar-event-pill{font-size:11px;font-weight:550;padding:3px 6px;border-radius:4px;border-left:3px solid #4f46e5;background:var(--event-pill-bg);color:var(--event-pill-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transition:transform .15s ease,background-color .15s ease}.calendar-event-pill:hover{transform:translate(2px);background:var(--ngx-calendar-hover-bg)}.events-overflow-indicator{font-size:10px;font-weight:700;color:var(--ngx-calendar-active-color);padding-left:6px;margin-top:2px}.ngx-calendar-picker-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;padding:24px;background:var(--ngx-calendar-bg);animation:view-fade-in .25s cubic-bezier(.4,0,.2,1)}@keyframes view-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}.ngx-picker-item{background:var(--ngx-calendar-bg);border:1px solid var(--ngx-calendar-border);border-radius:8px;color:var(--ngx-calendar-text);padding:16px 8px;font-size:14px;font-weight:600;cursor:pointer;text-align:center;font-family:inherit;transition:all .2s cubic-bezier(.4,0,.2,1)}.ngx-picker-item:hover{background:var(--ngx-calendar-hover-bg);border-color:var(--ngx-calendar-active-color);color:var(--ngx-calendar-active-color);transform:translateY(-1px)}.ngx-picker-item.active{background:var(--ngx-calendar-active-color);color:#fff;border-color:var(--ngx-calendar-active-color);box-shadow:0 4px 12px #4f46e540}@keyframes select-pulse{0%{transform:scale(.98);opacity:.7}to{transform:scale(1);opacity:1}}@media (max-width: 768px){.ngx-calendar-cell{min-height:70px;padding:4px}.calendar-event-pill{display:none}.ngx-calendar-cell.has-events:after{content:\"\\2022\";position:absolute;bottom:2px;left:50%;transform:translate(-50%);color:var(--ngx-calendar-active-color);font-size:16px}.ngx-calendar-picker-grid{grid-template-columns:repeat(3,1fr)}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: i1.DatePipe, name: "date" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4018
4243
|
}
|
|
4019
4244
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
4020
4245
|
type: Component,
|
|
@@ -4027,115 +4252,220 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImpo
|
|
|
4027
4252
|
<!-- HEADER -->
|
|
4028
4253
|
<div class="ngx-calendar-header">
|
|
4029
4254
|
<h2 class="ngx-calendar-title" aria-live="polite">
|
|
4030
|
-
|
|
4255
|
+
@if (currentView() === 'month') {
|
|
4256
|
+
<button class="ngx-calendar-title-link" (click)="setView('month-picker')" type="button">
|
|
4257
|
+
{{ monthLabel() }}
|
|
4258
|
+
</button>
|
|
4259
|
+
} @else if (currentView() === 'month-picker') {
|
|
4260
|
+
<button class="ngx-calendar-title-link" (click)="setView('year-picker')" type="button">
|
|
4261
|
+
{{ activeMonthDate().getFullYear() }}
|
|
4262
|
+
</button>
|
|
4263
|
+
} @else {
|
|
4264
|
+
<span class="ngx-calendar-title-static">
|
|
4265
|
+
Select Year
|
|
4266
|
+
</span>
|
|
4267
|
+
}
|
|
4031
4268
|
</h2>
|
|
4032
4269
|
<div class="ngx-calendar-actions">
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
‹
|
|
4040
|
-
</button>
|
|
4041
|
-
<button
|
|
4042
|
-
class="ngx-cal-btn today-btn"
|
|
4043
|
-
(click)="goToToday()"
|
|
4044
|
-
type="button"
|
|
4045
|
-
aria-label="Go to Today"
|
|
4046
|
-
>
|
|
4047
|
-
Today
|
|
4048
|
-
</button>
|
|
4049
|
-
<button
|
|
4050
|
-
class="ngx-cal-btn next-btn"
|
|
4051
|
-
(click)="nextMonth()"
|
|
4052
|
-
type="button"
|
|
4053
|
-
aria-label="Next Month"
|
|
4054
|
-
>
|
|
4055
|
-
›
|
|
4056
|
-
</button>
|
|
4057
|
-
</div>
|
|
4058
|
-
</div>
|
|
4059
|
-
|
|
4060
|
-
<!-- GRID -->
|
|
4061
|
-
<div
|
|
4062
|
-
class="ngx-calendar-grid"
|
|
4063
|
-
role="grid"
|
|
4064
|
-
[attr.aria-label]="monthLabel()"
|
|
4065
|
-
>
|
|
4066
|
-
<!-- WEEKDAYS HEADER -->
|
|
4067
|
-
<div class="ngx-calendar-row weekdays-row" role="row">
|
|
4068
|
-
@for (day of weekDays(); track day) {
|
|
4069
|
-
<div
|
|
4070
|
-
class="ngx-calendar-weekday"
|
|
4071
|
-
role="columnheader"
|
|
4072
|
-
[attr.aria-label]="day"
|
|
4270
|
+
@if (currentView() === 'month') {
|
|
4271
|
+
<button
|
|
4272
|
+
class="ngx-cal-btn prev-btn"
|
|
4273
|
+
(click)="prevMonth()"
|
|
4274
|
+
type="button"
|
|
4275
|
+
aria-label="Previous Month"
|
|
4073
4276
|
>
|
|
4074
|
-
|
|
4075
|
-
</
|
|
4277
|
+
‹
|
|
4278
|
+
</button>
|
|
4279
|
+
<button
|
|
4280
|
+
class="ngx-cal-btn today-btn"
|
|
4281
|
+
(click)="goToToday()"
|
|
4282
|
+
type="button"
|
|
4283
|
+
aria-label="Go to Today"
|
|
4284
|
+
>
|
|
4285
|
+
Today
|
|
4286
|
+
</button>
|
|
4287
|
+
<button
|
|
4288
|
+
class="ngx-cal-btn next-btn"
|
|
4289
|
+
(click)="nextMonth()"
|
|
4290
|
+
type="button"
|
|
4291
|
+
aria-label="Next Month"
|
|
4292
|
+
>
|
|
4293
|
+
›
|
|
4294
|
+
</button>
|
|
4295
|
+
} @else if (currentView() === 'month-picker') {
|
|
4296
|
+
<button
|
|
4297
|
+
class="ngx-cal-btn prev-btn"
|
|
4298
|
+
(click)="changeYear(-1)"
|
|
4299
|
+
type="button"
|
|
4300
|
+
aria-label="Previous Year"
|
|
4301
|
+
>
|
|
4302
|
+
‹
|
|
4303
|
+
</button>
|
|
4304
|
+
<button
|
|
4305
|
+
class="ngx-cal-btn back-btn"
|
|
4306
|
+
(click)="setView('month')"
|
|
4307
|
+
type="button"
|
|
4308
|
+
>
|
|
4309
|
+
Back
|
|
4310
|
+
</button>
|
|
4311
|
+
<button
|
|
4312
|
+
class="ngx-cal-btn next-btn"
|
|
4313
|
+
(click)="changeYear(1)"
|
|
4314
|
+
type="button"
|
|
4315
|
+
aria-label="Next Year"
|
|
4316
|
+
>
|
|
4317
|
+
›
|
|
4318
|
+
</button>
|
|
4319
|
+
} @else {
|
|
4320
|
+
<button
|
|
4321
|
+
class="ngx-cal-btn prev-btn"
|
|
4322
|
+
(click)="changeYearRange(-12)"
|
|
4323
|
+
type="button"
|
|
4324
|
+
aria-label="Previous Years"
|
|
4325
|
+
>
|
|
4326
|
+
‹
|
|
4327
|
+
</button>
|
|
4328
|
+
<button
|
|
4329
|
+
class="ngx-cal-btn back-btn"
|
|
4330
|
+
(click)="setView('month-picker')"
|
|
4331
|
+
type="button"
|
|
4332
|
+
>
|
|
4333
|
+
Back
|
|
4334
|
+
</button>
|
|
4335
|
+
<button
|
|
4336
|
+
class="ngx-cal-btn next-btn"
|
|
4337
|
+
(click)="changeYearRange(12)"
|
|
4338
|
+
type="button"
|
|
4339
|
+
aria-label="Next Years"
|
|
4340
|
+
>
|
|
4341
|
+
›
|
|
4342
|
+
</button>
|
|
4076
4343
|
}
|
|
4077
4344
|
</div>
|
|
4345
|
+
</div>
|
|
4078
4346
|
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4347
|
+
<!-- MAIN VIEW AREA -->
|
|
4348
|
+
<div class="ngx-calendar-view-area">
|
|
4349
|
+
<!-- MONTH VIEW (GRID) -->
|
|
4350
|
+
@if (currentView() === 'month') {
|
|
4351
|
+
<div
|
|
4352
|
+
class="ngx-calendar-grid"
|
|
4353
|
+
role="grid"
|
|
4354
|
+
[attr.aria-label]="monthLabel()"
|
|
4355
|
+
>
|
|
4356
|
+
<!-- WEEKDAYS HEADER -->
|
|
4357
|
+
<div class="ngx-calendar-row weekdays-row" role="row">
|
|
4358
|
+
@for (day of weekDays(); track day) {
|
|
4084
4359
|
<div
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
[
|
|
4088
|
-
[class.other-month]="!cell.isCurrentMonth"
|
|
4089
|
-
[class.today]="cell.isToday"
|
|
4090
|
-
[class.selected]="cell.isSelected"
|
|
4091
|
-
[class.focused]="cell.isFocused"
|
|
4092
|
-
[class.has-events]="cell.events.length > 0"
|
|
4093
|
-
role="gridcell"
|
|
4094
|
-
[attr.aria-selected]="cell.isSelected"
|
|
4095
|
-
[attr.aria-label]="cell.date | date:'longDate'"
|
|
4096
|
-
[attr.tabindex]="cell.isFocused && !readonly() ? '0' : '-1'"
|
|
4097
|
-
(click)="selectCell(cell)"
|
|
4098
|
-
(keydown)="onCellKeyDown($event, cell)"
|
|
4360
|
+
class="ngx-calendar-weekday"
|
|
4361
|
+
role="columnheader"
|
|
4362
|
+
[attr.aria-label]="day"
|
|
4099
4363
|
>
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
<span class="today-indicator" aria-hidden="true"></span>
|
|
4105
|
-
}
|
|
4106
|
-
</div>
|
|
4364
|
+
{{ day.slice(0, 3) }}
|
|
4365
|
+
</div>
|
|
4366
|
+
}
|
|
4367
|
+
</div>
|
|
4107
4368
|
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4369
|
+
<!-- DAYS GRID -->
|
|
4370
|
+
<div class="ngx-calendar-body">
|
|
4371
|
+
@for (row of gridRows(); track $index) {
|
|
4372
|
+
<div class="ngx-calendar-row" role="row">
|
|
4373
|
+
@for (cell of row; track cell.date.getTime()) {
|
|
4374
|
+
<div
|
|
4375
|
+
#cellEl
|
|
4376
|
+
class="ngx-calendar-cell"
|
|
4377
|
+
[class.current-month]="cell.isCurrentMonth"
|
|
4378
|
+
[class.other-month]="!cell.isCurrentMonth"
|
|
4379
|
+
[class.today]="cell.isToday"
|
|
4380
|
+
[class.selected]="cell.isSelected"
|
|
4381
|
+
[class.focused]="cell.isFocused"
|
|
4382
|
+
[class.has-events]="cell.events.length > 0"
|
|
4383
|
+
[class.range-start]="cell.isRangeStart"
|
|
4384
|
+
[class.range-end]="cell.isRangeEnd"
|
|
4385
|
+
[class.in-range]="cell.isInRange"
|
|
4386
|
+
[class.disabled]="cell.isDisabled"
|
|
4387
|
+
role="gridcell"
|
|
4388
|
+
[attr.aria-selected]="cell.isSelected"
|
|
4389
|
+
[attr.aria-disabled]="cell.isDisabled"
|
|
4390
|
+
[attr.aria-label]="cell.date | date:'longDate'"
|
|
4391
|
+
[attr.tabindex]="cell.isFocused && !readonly() && !cell.isDisabled ? '0' : '-1'"
|
|
4392
|
+
(click)="selectCell(cell)"
|
|
4393
|
+
(keydown)="onCellKeyDown($event, cell)"
|
|
4394
|
+
>
|
|
4395
|
+
<!-- Cell Header (Day Number) -->
|
|
4396
|
+
<div class="cell-header">
|
|
4397
|
+
<span class="day-number">{{ cell.dayNumber }}</span>
|
|
4398
|
+
@if (cell.isToday) {
|
|
4399
|
+
<span class="today-indicator" aria-hidden="true"></span>
|
|
4400
|
+
}
|
|
4401
|
+
</div>
|
|
4402
|
+
|
|
4403
|
+
<!-- Events List or Custom Day Template -->
|
|
4404
|
+
<div class="cell-content">
|
|
4405
|
+
@if (dayTemplate()) {
|
|
4406
|
+
<ng-container
|
|
4407
|
+
*ngTemplateOutlet="dayTemplate()!; context: { $implicit: cell.date, events: cell.events }"
|
|
4408
|
+
></ng-container>
|
|
4409
|
+
} @else {
|
|
4410
|
+
@for (event of cell.events.slice(0, 3); track event.title) {
|
|
4411
|
+
<div
|
|
4412
|
+
class="calendar-event-pill"
|
|
4413
|
+
[style.border-left-color]="event.color || '#4f46e5'"
|
|
4414
|
+
[attr.title]="event.title + (event.description ? ': ' + event.description : '')"
|
|
4415
|
+
(click)="onEventClick($event, event)"
|
|
4416
|
+
>
|
|
4417
|
+
{{ event.title }}
|
|
4418
|
+
</div>
|
|
4419
|
+
}
|
|
4420
|
+
@if (cell.events.length > 3) {
|
|
4421
|
+
<div class="events-overflow-indicator">
|
|
4422
|
+
+{{ cell.events.length - 3 }} more
|
|
4423
|
+
</div>
|
|
4424
|
+
}
|
|
4425
|
+
}
|
|
4426
|
+
</div>
|
|
4427
|
+
</div>
|
|
4428
|
+
}
|
|
4131
4429
|
</div>
|
|
4132
4430
|
}
|
|
4133
4431
|
</div>
|
|
4134
|
-
|
|
4135
|
-
|
|
4432
|
+
</div>
|
|
4433
|
+
}
|
|
4434
|
+
|
|
4435
|
+
<!-- MONTH PICKER GRID -->
|
|
4436
|
+
@if (currentView() === 'month-picker') {
|
|
4437
|
+
<div class="ngx-calendar-picker-grid month-picker-grid">
|
|
4438
|
+
@for (month of monthsList(); track $index) {
|
|
4439
|
+
<button
|
|
4440
|
+
class="ngx-picker-item"
|
|
4441
|
+
[class.active]="isCurrentActiveMonth($index)"
|
|
4442
|
+
(click)="selectMonth($index)"
|
|
4443
|
+
type="button"
|
|
4444
|
+
>
|
|
4445
|
+
{{ month.slice(0, 3) }}
|
|
4446
|
+
</button>
|
|
4447
|
+
}
|
|
4448
|
+
</div>
|
|
4449
|
+
}
|
|
4450
|
+
|
|
4451
|
+
<!-- YEAR PICKER GRID -->
|
|
4452
|
+
@if (currentView() === 'year-picker') {
|
|
4453
|
+
<div class="ngx-calendar-picker-grid year-picker-grid">
|
|
4454
|
+
@for (year of yearPickerYears(); track year) {
|
|
4455
|
+
<button
|
|
4456
|
+
class="ngx-picker-item"
|
|
4457
|
+
[class.active]="isCurrentActiveYear(year)"
|
|
4458
|
+
(click)="selectYear(year)"
|
|
4459
|
+
type="button"
|
|
4460
|
+
>
|
|
4461
|
+
{{ year }}
|
|
4462
|
+
</button>
|
|
4463
|
+
}
|
|
4464
|
+
</div>
|
|
4465
|
+
}
|
|
4136
4466
|
</div>
|
|
4137
4467
|
</div>
|
|
4138
|
-
`, styles: [":host{display:block;width:100%;--ngx-calendar-border: #cbd5e1;--ngx-calendar-bg: #ffffff;--ngx-calendar-header-bg: #f8fafc;--ngx-calendar-text: #0f172a;--ngx-calendar-text-muted: #64748b;--ngx-calendar-cell-other-bg: #f8fafc;--ngx-calendar-hover-bg: #f1f5f9;--ngx-calendar-focus-shadow: 0 0 0 3px rgba(79, 70, 229, .2);--ngx-calendar-active-color: #4f46e5;--ngx-calendar-selected-bg: rgba(79, 70, 229, .05);--ngx-calendar-selected-border: #4f46e5;--event-pill-bg: #f1f5f9;--event-pill-text: #334155}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-calendar-border: #334155;--ngx-calendar-bg: #0f172a;--ngx-calendar-header-bg: #1e293b;--ngx-calendar-text: #f8fafc;--ngx-calendar-text-muted: #94a3b8;--ngx-calendar-cell-other-bg: #0b0f19;--ngx-calendar-hover-bg: #1e293b;--ngx-calendar-focus-shadow: 0 0 0 3px rgba(129, 140, 248, .25);--ngx-calendar-active-color: #818cf8;--ngx-calendar-selected-bg: rgba(129, 140, 248, .08);--ngx-calendar-selected-border: #818cf8;--event-pill-bg: #1e293b;--event-pill-text: #cbd5e1}.ngx-calendar-container{display:flex;flex-direction:column;border:1px solid var(--ngx-calendar-border);border-radius:12px;background:var(--ngx-calendar-bg);color:var(--ngx-calendar-text);font-family:inherit;overflow:hidden;box-shadow:0 4px 20px -2px #0000000d;transition:all .3s cubic-bezier(.4,0,.2,1)}.ngx-calendar-header{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;background:var(--ngx-calendar-header-bg);border-bottom:1px solid var(--ngx-calendar-border)}.ngx-calendar-title{margin:0;font-size:18px;font-weight:700;letter-spacing:-.3px}.ngx-calendar-actions{display:flex;align-items:center;gap:6px}.ngx-cal-btn{background:var(--ngx-calendar-bg);border:1px solid var(--ngx-calendar-border);border-radius:8px;color:var(--ngx-calendar-text);font-size:13px;font-weight:600;padding:6px 12px;cursor:pointer;font-family:inherit;transition:all .2s ease;display:inline-flex;align-items:center;justify-content:center}.ngx-cal-btn:hover{background:var(--ngx-calendar-hover-bg);border-color:var(--ngx-calendar-active-color);color:var(--ngx-calendar-active-color)}.prev-btn,.next-btn{font-size:16px;width:32px;height:32px;padding:0}.ngx-calendar-grid{display:flex;flex-direction:column;width:100%}.ngx-calendar-row{display:grid;grid-template-columns:repeat(7,1fr);width:100%}.weekdays-row{border-bottom:1px solid var(--ngx-calendar-border);background:var(--ngx-calendar-header-bg)}.ngx-calendar-weekday{padding:12px 6px;text-align:center;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--ngx-calendar-text-muted)}.ngx-calendar-body{display:flex;flex-direction:column}.ngx-calendar-cell{min-height:100px;border-right:1px solid var(--ngx-calendar-border);border-bottom:1px solid var(--ngx-calendar-border);padding:8px;display:flex;flex-direction:column;gap:6px;transition:all .2s cubic-bezier(.4,0,.2,1);position:relative;outline:none;background:var(--ngx-calendar-bg)}.ngx-calendar-row .ngx-calendar-cell:last-child{border-right:none}.ngx-calendar-body .ngx-calendar-row:last-child .ngx-calendar-cell{border-bottom:none}.ngx-calendar-cell.other-month{background:var(--ngx-calendar-cell-other-bg)}.ngx-calendar-cell.other-month .day-number{color:var(--ngx-calendar-text-muted);opacity:.6}.ngx-calendar-cell:not(.selected):hover{background:var(--ngx-calendar-hover-bg);cursor:pointer}.ngx-calendar-cell.selected{background:var(--ngx-calendar-selected-bg)}.ngx-calendar-cell.selected:after{content:\"\";position:absolute;inset:0;border:2px solid var(--ngx-calendar-selected-border);border-radius:4px;pointer-events:none;animation:select-pulse .25s ease-out}.ngx-calendar-cell.focused{z-index:2}.ngx-calendar-cell.focused:focus-visible{box-shadow:var(--ngx-calendar-focus-shadow);border-color:var(--ngx-calendar-active-color)}.cell-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.day-number{font-size:13px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;transition:all .2s ease}.today .day-number{background:var(--ngx-calendar-active-color);color:#fff!important;box-shadow:0 2px 8px #4f46e54d}.today-indicator{width:5px;height:5px;border-radius:50%;background:var(--ngx-calendar-active-color);margin-right:4px}.cell-content{flex:1;display:flex;flex-direction:column;gap:3px;overflow:hidden}.calendar-event-pill{font-size:11px;font-weight:550;padding:3px 6px;border-radius:4px;border-left:3px solid #4f46e5;background:var(--event-pill-bg);color:var(--event-pill-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transition:transform .15s ease,background-color .15s ease}.calendar-event-pill:hover{transform:translate(2px);background:var(--ngx-calendar-hover-bg)}.events-overflow-indicator{font-size:10px;font-weight:700;color:var(--ngx-calendar-active-color);padding-left:6px;margin-top:2px}@keyframes select-pulse{0%{transform:scale(.98);opacity:.7}to{transform:scale(1);opacity:1}}@media (max-width: 768px){.ngx-calendar-cell{min-height:70px;padding:4px}.calendar-event-pill{display:none}.ngx-calendar-cell.has-events:after{content:\"\\2022\";position:absolute;bottom:2px;left:50%;transform:translate(-50%);color:var(--ngx-calendar-active-color);font-size:16px}}\n"] }]
|
|
4468
|
+
`, styles: [":host{display:block;width:100%;--ngx-calendar-border: #cbd5e1;--ngx-calendar-bg: #ffffff;--ngx-calendar-header-bg: #f8fafc;--ngx-calendar-text: #0f172a;--ngx-calendar-text-muted: #64748b;--ngx-calendar-cell-other-bg: #f8fafc;--ngx-calendar-hover-bg: #f1f5f9;--ngx-calendar-focus-shadow: 0 0 0 3px rgba(79, 70, 229, .2);--ngx-calendar-active-color: #4f46e5;--ngx-calendar-selected-bg: rgba(79, 70, 229, .05);--ngx-calendar-selected-border: #4f46e5;--event-pill-bg: #f1f5f9;--event-pill-text: #334155}:host-context(body.dark),:host-context(.dark),:host-context(.dark-theme){--ngx-calendar-border: #334155;--ngx-calendar-bg: #0f172a;--ngx-calendar-header-bg: #1e293b;--ngx-calendar-text: #f8fafc;--ngx-calendar-text-muted: #94a3b8;--ngx-calendar-cell-other-bg: #0b0f19;--ngx-calendar-hover-bg: #1e293b;--ngx-calendar-focus-shadow: 0 0 0 3px rgba(129, 140, 248, .25);--ngx-calendar-active-color: #818cf8;--ngx-calendar-selected-bg: rgba(129, 140, 248, .08);--ngx-calendar-selected-border: #818cf8;--event-pill-bg: #1e293b;--event-pill-text: #cbd5e1}.ngx-calendar-container{display:flex;flex-direction:column;border:1px solid var(--ngx-calendar-border);border-radius:12px;background:var(--ngx-calendar-bg);color:var(--ngx-calendar-text);font-family:inherit;overflow:hidden;box-shadow:0 4px 20px -2px #0000000d;transition:all .3s cubic-bezier(.4,0,.2,1)}.ngx-calendar-header{display:flex;align-items:center;justify-content:space-between;padding:16px 24px;background:var(--ngx-calendar-header-bg);border-bottom:1px solid var(--ngx-calendar-border)}.ngx-calendar-title{margin:0;font-size:18px;font-weight:700;letter-spacing:-.3px}.ngx-calendar-title-link{background:none;border:none;font-size:inherit;font-weight:inherit;color:inherit;cursor:pointer;padding:0;font-family:inherit;transition:color .2s ease;display:inline-flex;align-items:center}.ngx-calendar-title-link:hover{color:var(--ngx-calendar-active-color)}.ngx-calendar-title-static{font-size:inherit;font-weight:inherit;color:inherit}.ngx-calendar-actions{display:flex;align-items:center;gap:6px}.ngx-cal-btn{background:var(--ngx-calendar-bg);border:1px solid var(--ngx-calendar-border);border-radius:8px;color:var(--ngx-calendar-text);font-size:13px;font-weight:600;padding:6px 12px;cursor:pointer;font-family:inherit;transition:all .2s ease;display:inline-flex;align-items:center;justify-content:center}.ngx-cal-btn:hover{background:var(--ngx-calendar-hover-bg);border-color:var(--ngx-calendar-active-color);color:var(--ngx-calendar-active-color)}.prev-btn,.next-btn{font-size:16px;width:32px;height:32px;padding:0}.ngx-calendar-view-area{position:relative;width:100%;background:var(--ngx-calendar-bg)}.ngx-calendar-grid{display:flex;flex-direction:column;width:100%}.ngx-calendar-row{display:grid;grid-template-columns:repeat(7,1fr);width:100%}.weekdays-row{border-bottom:1px solid var(--ngx-calendar-border);background:var(--ngx-calendar-header-bg)}.ngx-calendar-weekday{padding:12px 6px;text-align:center;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;color:var(--ngx-calendar-text-muted)}.ngx-calendar-body{display:flex;flex-direction:column}.ngx-calendar-cell{min-height:100px;border-right:1px solid var(--ngx-calendar-border);border-bottom:1px solid var(--ngx-calendar-border);padding:8px;display:flex;flex-direction:column;gap:6px;transition:all .2s cubic-bezier(.4,0,.2,1);position:relative;outline:none;background:var(--ngx-calendar-bg)}.ngx-calendar-row .ngx-calendar-cell:last-child{border-right:none}.ngx-calendar-body .ngx-calendar-row:last-child .ngx-calendar-cell{border-bottom:none}.ngx-calendar-cell.other-month{background:var(--ngx-calendar-cell-other-bg)}.ngx-calendar-cell.other-month .day-number{color:var(--ngx-calendar-text-muted);opacity:.6}.ngx-calendar-cell:not(.selected):not(.disabled):hover{background:var(--ngx-calendar-hover-bg);cursor:pointer}.ngx-calendar-cell.selected{background:var(--ngx-calendar-selected-bg)}.ngx-calendar-cell.selected:after{content:\"\";position:absolute;inset:0;border:2px solid var(--ngx-calendar-selected-border);border-radius:4px;pointer-events:none;animation:select-pulse .25s ease-out}.ngx-calendar-cell.focused{z-index:2}.ngx-calendar-cell.focused:focus-visible{box-shadow:var(--ngx-calendar-focus-shadow);border-color:var(--ngx-calendar-active-color)}.ngx-calendar-cell.in-range{background:var(--ngx-calendar-selected-bg)!important}.ngx-calendar-cell.range-start{border-top-left-radius:8px;border-bottom-left-radius:8px;background:var(--ngx-calendar-selected-bg)!important}.ngx-calendar-cell.range-end{border-top-right-radius:8px;border-bottom-right-radius:8px;background:var(--ngx-calendar-selected-bg)!important}.ngx-calendar-cell.range-start:after{content:\"\";position:absolute;inset:0;border:2px solid var(--ngx-calendar-selected-border);border-radius:8px 0 0 8px;pointer-events:none}.ngx-calendar-cell.range-end:after{content:\"\";position:absolute;inset:0;border:2px solid var(--ngx-calendar-selected-border);border-radius:0 8px 8px 0;pointer-events:none}.ngx-calendar-cell.disabled{opacity:.35;pointer-events:none;background:var(--ngx-calendar-cell-other-bg);cursor:not-allowed}.ngx-calendar-cell.disabled .day-number{text-decoration:line-through;color:var(--ngx-calendar-text-muted)}.cell-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.day-number{font-size:13px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;transition:all .2s ease}.today .day-number{background:var(--ngx-calendar-active-color);color:#fff!important;box-shadow:0 2px 8px #4f46e54d}.today-indicator{width:5px;height:5px;border-radius:50%;background:var(--ngx-calendar-active-color);margin-right:4px}.cell-content{flex:1;display:flex;flex-direction:column;gap:3px;overflow:hidden}.calendar-event-pill{font-size:11px;font-weight:550;padding:3px 6px;border-radius:4px;border-left:3px solid #4f46e5;background:var(--event-pill-bg);color:var(--event-pill-text);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;transition:transform .15s ease,background-color .15s ease}.calendar-event-pill:hover{transform:translate(2px);background:var(--ngx-calendar-hover-bg)}.events-overflow-indicator{font-size:10px;font-weight:700;color:var(--ngx-calendar-active-color);padding-left:6px;margin-top:2px}.ngx-calendar-picker-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;padding:24px;background:var(--ngx-calendar-bg);animation:view-fade-in .25s cubic-bezier(.4,0,.2,1)}@keyframes view-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}.ngx-picker-item{background:var(--ngx-calendar-bg);border:1px solid var(--ngx-calendar-border);border-radius:8px;color:var(--ngx-calendar-text);padding:16px 8px;font-size:14px;font-weight:600;cursor:pointer;text-align:center;font-family:inherit;transition:all .2s cubic-bezier(.4,0,.2,1)}.ngx-picker-item:hover{background:var(--ngx-calendar-hover-bg);border-color:var(--ngx-calendar-active-color);color:var(--ngx-calendar-active-color);transform:translateY(-1px)}.ngx-picker-item.active{background:var(--ngx-calendar-active-color);color:#fff;border-color:var(--ngx-calendar-active-color);box-shadow:0 4px 12px #4f46e540}@keyframes select-pulse{0%{transform:scale(.98);opacity:.7}to{transform:scale(1);opacity:1}}@media (max-width: 768px){.ngx-calendar-cell{min-height:70px;padding:4px}.calendar-event-pill{display:none}.ngx-calendar-cell.has-events:after{content:\"\\2022\";position:absolute;bottom:2px;left:50%;transform:translate(-50%);color:var(--ngx-calendar-active-color);font-size:16px}.ngx-calendar-picker-grid{grid-template-columns:repeat(3,1fr)}}\n"] }]
|
|
4139
4469
|
}], propDecorators: { dayTemplateSignal: [{
|
|
4140
4470
|
type: ContentChild,
|
|
4141
4471
|
args: ['dayTemplate']
|