@smart-solutions-tech/smart-angular-calendar 0.0.1 → 0.0.3
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/esm2020/lib/components/calendar/calendar.component.mjs +223 -0
- package/esm2020/lib/components/calendar-event/calendar-event.component.mjs +21 -0
- package/esm2020/lib/components/month-selector/month-selector.component.mjs +82 -0
- package/esm2020/lib/components/more-events-modal/more-events-modal.component.mjs +38 -0
- package/esm2020/lib/components/smart-calendar/smart-calendar.component.mjs +19 -0
- package/esm2020/lib/pipes/translate-month.pipe.mjs +22 -0
- package/esm2020/lib/pipes/translate.pipe.mjs +20 -0
- package/esm2020/lib/services/translation.service.mjs +29 -0
- package/esm2020/lib/smart-angular-calendar.module.mjs +28 -7
- package/esm2020/lib/translations.mjs +66 -0
- package/esm2020/lib/types.mjs +2 -0
- package/esm2020/lib/utils/colors.mjs +13 -0
- package/esm2020/public-api.mjs +2 -2
- package/fesm2015/smart-solutions-tech-smart-angular-calendar.mjs +515 -21
- package/fesm2015/smart-solutions-tech-smart-angular-calendar.mjs.map +1 -1
- package/fesm2020/smart-solutions-tech-smart-angular-calendar.mjs +514 -21
- package/fesm2020/smart-solutions-tech-smart-angular-calendar.mjs.map +1 -1
- package/lib/components/calendar/calendar.component.d.ts +58 -0
- package/lib/components/calendar-event/calendar-event.component.d.ts +11 -0
- package/lib/components/month-selector/month-selector.component.d.ts +30 -0
- package/lib/components/more-events-modal/more-events-modal.component.d.ts +16 -0
- package/lib/components/smart-calendar/smart-calendar.component.d.ts +10 -0
- package/lib/pipes/translate-month.pipe.d.ts +10 -0
- package/lib/pipes/translate.pipe.d.ts +13 -0
- package/lib/services/translation.service.d.ts +12 -0
- package/lib/smart-angular-calendar.module.d.ts +9 -2
- package/lib/translations.d.ts +17 -0
- package/lib/types.d.ts +42 -0
- package/lib/utils/colors.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -1
- package/esm2020/lib/smart-angular-calendar.component.mjs +0 -22
- package/lib/smart-angular-calendar.component.d.ts +0 -8
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Component, NgModule } from '@angular/core';
|
|
2
|
+
import { Injectable, Component, Input, Pipe, EventEmitter, Output, ViewChild, HostListener, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
3
5
|
|
|
4
6
|
class SmartAngularCalendarService {
|
|
5
7
|
constructor() { }
|
|
@@ -13,40 +15,531 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
13
15
|
}]
|
|
14
16
|
}], ctorParameters: function () { return []; } });
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
+
const isDarkColor = (hexColor, threshold = 0.5) => {
|
|
19
|
+
const hex = hexColor.replace('#', '');
|
|
20
|
+
const r = parseInt(hex.substring(0, 2), 16);
|
|
21
|
+
const g = parseInt(hex.substring(2, 4), 16);
|
|
22
|
+
const b = parseInt(hex.substring(4, 6), 16);
|
|
23
|
+
const [rs, gs, bs] = [r, g, b].map((c) => {
|
|
24
|
+
const cs = c / 255;
|
|
25
|
+
return cs <= 0.03928 ? cs / 12.92 : Math.pow((cs + 0.055) / 1.055, 2.4);
|
|
26
|
+
});
|
|
27
|
+
const luminance = 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;
|
|
28
|
+
return luminance < threshold;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
class CalendarEventComponent {
|
|
32
|
+
constructor() {
|
|
33
|
+
this.isDarkColor = false;
|
|
34
|
+
}
|
|
18
35
|
ngOnInit() {
|
|
36
|
+
this.isDarkColor = isDarkColor(this.event.color || '#000000');
|
|
19
37
|
}
|
|
20
38
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
smart-angular-calendar works!
|
|
25
|
-
</p>
|
|
26
|
-
`, isInline: true });
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartAngularCalendarComponent, decorators: [{
|
|
39
|
+
CalendarEventComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CalendarEventComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
40
|
+
CalendarEventComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CalendarEventComponent, selector: "lib-calendar-event", inputs: { event: "event" }, ngImport: i0, template: "<div class=\"calendar-event-component\" style=\"--color: {{ event.color }};\" [ngClass]=\"{'dark-color': isDarkColor}\"\r\n [title]=\"event.title\">\r\n <div class=\"event-title\">{{ event.title }}</div>\r\n</div>", styles: [".calendar-event-component{position:relative;z-index:1;background-color:var(--color, rgba(0, 0, 0, .05));border-radius:4px;padding:2px 8px;cursor:pointer;-webkit-user-select:none;user-select:none;color:#212121}.calendar-event-component.dark-color{color:#fafafa}.event-title{font-size:12px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CalendarEventComponent, decorators: [{
|
|
28
42
|
type: Component,
|
|
29
|
-
args: [{ selector: 'lib-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
43
|
+
args: [{ selector: 'lib-calendar-event', template: "<div class=\"calendar-event-component\" style=\"--color: {{ event.color }};\" [ngClass]=\"{'dark-color': isDarkColor}\"\r\n [title]=\"event.title\">\r\n <div class=\"event-title\">{{ event.title }}</div>\r\n</div>", styles: [".calendar-event-component{position:relative;z-index:1;background-color:var(--color, rgba(0, 0, 0, .05));border-radius:4px;padding:2px 8px;cursor:pointer;-webkit-user-select:none;user-select:none;color:#212121}.calendar-event-component.dark-color{color:#fafafa}.event-title{font-size:12px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}\n"] }]
|
|
44
|
+
}], ctorParameters: function () { return []; }, propDecorators: { event: [{
|
|
45
|
+
type: Input
|
|
46
|
+
}] } });
|
|
47
|
+
|
|
48
|
+
const TRANSLATIONS = {
|
|
49
|
+
en: {
|
|
50
|
+
sun: 'Sunday',
|
|
51
|
+
mon: 'Monday',
|
|
52
|
+
tue: 'Tuesday',
|
|
53
|
+
wed: 'Wednesday',
|
|
54
|
+
thu: 'Thursday',
|
|
55
|
+
fri: 'Friday',
|
|
56
|
+
sat: 'Saturday',
|
|
57
|
+
today: 'Today',
|
|
58
|
+
january: 'January',
|
|
59
|
+
february: 'February',
|
|
60
|
+
march: 'March',
|
|
61
|
+
april: 'April',
|
|
62
|
+
may: 'May',
|
|
63
|
+
june: 'June',
|
|
64
|
+
july: 'July',
|
|
65
|
+
august: 'August',
|
|
66
|
+
september: 'September',
|
|
67
|
+
october: 'October',
|
|
68
|
+
november: 'November',
|
|
69
|
+
december: 'December',
|
|
70
|
+
moreEvents: 'More events',
|
|
71
|
+
nMoreEvents: '{{n}} More events'
|
|
72
|
+
},
|
|
73
|
+
es: {
|
|
74
|
+
sun: 'Domingo',
|
|
75
|
+
mon: 'Lunes',
|
|
76
|
+
tue: 'Martes',
|
|
77
|
+
wed: 'Miércoles',
|
|
78
|
+
thu: 'Jueves',
|
|
79
|
+
fri: 'Viernes',
|
|
80
|
+
sat: 'Sábado',
|
|
81
|
+
today: 'Hoy',
|
|
82
|
+
january: 'Enero',
|
|
83
|
+
february: 'Febrero',
|
|
84
|
+
march: 'Marzo',
|
|
85
|
+
april: 'Abril',
|
|
86
|
+
may: 'Mayo',
|
|
87
|
+
june: 'Junio',
|
|
88
|
+
july: 'Julio',
|
|
89
|
+
august: 'Agosto',
|
|
90
|
+
september: 'Septiembre',
|
|
91
|
+
october: 'Octubre',
|
|
92
|
+
november: 'Noviembre',
|
|
93
|
+
december: 'Diciembre',
|
|
94
|
+
moreEvents: 'Más eventos',
|
|
95
|
+
nMoreEvents: '{{n}} Eventos más'
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
const MONTHS = {
|
|
99
|
+
1: 'january',
|
|
100
|
+
2: 'february',
|
|
101
|
+
3: 'march',
|
|
102
|
+
4: 'april',
|
|
103
|
+
5: 'may',
|
|
104
|
+
6: 'june',
|
|
105
|
+
7: 'july',
|
|
106
|
+
8: 'august',
|
|
107
|
+
9: 'september',
|
|
108
|
+
10: 'october',
|
|
109
|
+
11: 'november',
|
|
110
|
+
12: 'december'
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
class TranslationService {
|
|
114
|
+
constructor() {
|
|
115
|
+
this.currentLanguage = 'en';
|
|
116
|
+
}
|
|
117
|
+
translate(tag, args) {
|
|
118
|
+
if (tag === 'nMoreEvents' && args) {
|
|
119
|
+
const n = args['n'];
|
|
120
|
+
return TRANSLATIONS[this.currentLanguage][tag].replace('{{n}}', n);
|
|
121
|
+
}
|
|
122
|
+
return TRANSLATIONS[this.currentLanguage][tag];
|
|
123
|
+
}
|
|
124
|
+
setLanguage(lang) {
|
|
125
|
+
if (TRANSLATIONS[lang]) {
|
|
126
|
+
this.currentLanguage = lang;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
TranslationService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TranslationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
131
|
+
TranslationService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TranslationService, providedIn: 'root' });
|
|
132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TranslationService, decorators: [{
|
|
133
|
+
type: Injectable,
|
|
134
|
+
args: [{
|
|
135
|
+
providedIn: 'root'
|
|
136
|
+
}]
|
|
34
137
|
}], ctorParameters: function () { return []; } });
|
|
35
138
|
|
|
139
|
+
class TranslatePipe {
|
|
140
|
+
constructor(translationService) {
|
|
141
|
+
this.translationService = translationService;
|
|
142
|
+
}
|
|
143
|
+
transform(tag, args) {
|
|
144
|
+
return this.translationService.translate(tag, args);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
TranslatePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TranslatePipe, deps: [{ token: TranslationService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
148
|
+
TranslatePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: TranslatePipe, name: "translate" });
|
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TranslatePipe, decorators: [{
|
|
150
|
+
type: Pipe,
|
|
151
|
+
args: [{
|
|
152
|
+
name: 'translate'
|
|
153
|
+
}]
|
|
154
|
+
}], ctorParameters: function () { return [{ type: TranslationService }]; } });
|
|
155
|
+
|
|
156
|
+
class MoreEventsModalComponent {
|
|
157
|
+
constructor() {
|
|
158
|
+
this.events = [];
|
|
159
|
+
this.close = new EventEmitter();
|
|
160
|
+
this.eventClick = new EventEmitter();
|
|
161
|
+
}
|
|
162
|
+
ngOnInit() {
|
|
163
|
+
}
|
|
164
|
+
isDarkColor(color) {
|
|
165
|
+
return isDarkColor(color || '#ffffff');
|
|
166
|
+
}
|
|
167
|
+
onClose() {
|
|
168
|
+
this.close.emit();
|
|
169
|
+
}
|
|
170
|
+
onEventClick(event) {
|
|
171
|
+
this.eventClick.emit(event);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
MoreEventsModalComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MoreEventsModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
175
|
+
MoreEventsModalComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: MoreEventsModalComponent, selector: "lib-more-events-modal", inputs: { events: "events", date: "date" }, outputs: { close: "close", eventClick: "eventClick" }, ngImport: i0, template: "<div class=\"more-events-modal-component\">\n <div class=\"backdrop\" (click)=\"onClose()\"></div>\n\n <div class=\"modal\">\n <div class=\"header\">\n <div class=\"title\">{{'moreEvents' | translate}}</div>\n <div class=\"subtitle\">{{date.toLocaleDateString()}}</div>\n\n <button class=\"btn-close\" (click)=\"onClose()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n class=\"feather feather-x\" fill=\"yellow\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n\n <div class=\"events-list\">\n <div class=\"event-item\" *ngFor=\"let event of events\" style=\"--color: {{event.color}};\"\n [ngClass]=\"{'is-dark':isDarkColor(event.color)}\" (click)=\"onEventClick(event)\">\n <div class=\"event-title\">{{ event.title }}</div>\n </div>\n </div>\n </div>\n</div>", styles: [".more-events-modal-component{position:absolute;top:0;left:0;z-index:1;display:flex;align-items:center;justify-content:center;width:100%;height:100%;box-shadow:0 2px 8px #00000026}.more-events-modal-component .backdrop{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;background-color:#00000080;cursor:pointer}.modal{z-index:2;display:flex;flex-direction:column;max-width:400px;width:100%;max-height:80%;margin:24px;background-color:#fff;border-radius:8px}.header{position:relative;display:flex;flex-direction:column;padding:16px 64px 16px 16px}.title{font-size:18px;font-weight:700}.subtitle{font-size:13px;color:#666}.btn-close{position:absolute;top:8px;right:8px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;background:none;border:none;border-radius:50%;cursor:pointer}.btn-close:hover{background-color:#f0f0f0}.events-list{flex:1 1 auto;display:flex;flex-direction:column;gap:4px;padding:0 16px 16px;overflow-y:auto}.events-list .event-item{display:flex;padding:8px;background-color:var(--color, #e2e2e2);border-radius:4px;color:#212121;cursor:pointer;-webkit-user-select:none;user-select:none}.events-list .event-item.is-dark{color:#fafafa}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }] });
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MoreEventsModalComponent, decorators: [{
|
|
177
|
+
type: Component,
|
|
178
|
+
args: [{ selector: 'lib-more-events-modal', template: "<div class=\"more-events-modal-component\">\n <div class=\"backdrop\" (click)=\"onClose()\"></div>\n\n <div class=\"modal\">\n <div class=\"header\">\n <div class=\"title\">{{'moreEvents' | translate}}</div>\n <div class=\"subtitle\">{{date.toLocaleDateString()}}</div>\n\n <button class=\"btn-close\" (click)=\"onClose()\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\"\n stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n class=\"feather feather-x\" fill=\"yellow\">\n <line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\"></line>\n <line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\"></line>\n </svg>\n </button>\n </div>\n\n <div class=\"events-list\">\n <div class=\"event-item\" *ngFor=\"let event of events\" style=\"--color: {{event.color}};\"\n [ngClass]=\"{'is-dark':isDarkColor(event.color)}\" (click)=\"onEventClick(event)\">\n <div class=\"event-title\">{{ event.title }}</div>\n </div>\n </div>\n </div>\n</div>", styles: [".more-events-modal-component{position:absolute;top:0;left:0;z-index:1;display:flex;align-items:center;justify-content:center;width:100%;height:100%;box-shadow:0 2px 8px #00000026}.more-events-modal-component .backdrop{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;background-color:#00000080;cursor:pointer}.modal{z-index:2;display:flex;flex-direction:column;max-width:400px;width:100%;max-height:80%;margin:24px;background-color:#fff;border-radius:8px}.header{position:relative;display:flex;flex-direction:column;padding:16px 64px 16px 16px}.title{font-size:18px;font-weight:700}.subtitle{font-size:13px;color:#666}.btn-close{position:absolute;top:8px;right:8px;display:flex;align-items:center;justify-content:center;width:36px;height:36px;background:none;border:none;border-radius:50%;cursor:pointer}.btn-close:hover{background-color:#f0f0f0}.events-list{flex:1 1 auto;display:flex;flex-direction:column;gap:4px;padding:0 16px 16px;overflow-y:auto}.events-list .event-item{display:flex;padding:8px;background-color:var(--color, #e2e2e2);border-radius:4px;color:#212121;cursor:pointer;-webkit-user-select:none;user-select:none}.events-list .event-item.is-dark{color:#fafafa}\n"] }]
|
|
179
|
+
}], ctorParameters: function () { return []; }, propDecorators: { events: [{
|
|
180
|
+
type: Input
|
|
181
|
+
}], date: [{
|
|
182
|
+
type: Input
|
|
183
|
+
}], close: [{
|
|
184
|
+
type: Output
|
|
185
|
+
}], eventClick: [{
|
|
186
|
+
type: Output
|
|
187
|
+
}] } });
|
|
188
|
+
|
|
189
|
+
class TranslateMonthPipe {
|
|
190
|
+
constructor(translationService) {
|
|
191
|
+
this.translationService = translationService;
|
|
192
|
+
}
|
|
193
|
+
transform(value) {
|
|
194
|
+
const monthTag = MONTHS[value];
|
|
195
|
+
return this.translationService.translate(monthTag);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
TranslateMonthPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TranslateMonthPipe, deps: [{ token: TranslationService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
199
|
+
TranslateMonthPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: TranslateMonthPipe, name: "translateMonth" });
|
|
200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: TranslateMonthPipe, decorators: [{
|
|
201
|
+
type: Pipe,
|
|
202
|
+
args: [{
|
|
203
|
+
name: 'translateMonth'
|
|
204
|
+
}]
|
|
205
|
+
}], ctorParameters: function () { return [{ type: TranslationService }]; } });
|
|
206
|
+
|
|
207
|
+
class MonthSelectorComponent {
|
|
208
|
+
constructor() {
|
|
209
|
+
this.monthSelected = new EventEmitter();
|
|
210
|
+
this.mode = 'decade';
|
|
211
|
+
this.currentYear = new Date().getFullYear();
|
|
212
|
+
this.currentMonth = new Date().getMonth() + 1;
|
|
213
|
+
this.selectedMonth = { year: new Date().getFullYear(), month: new Date().getMonth() + 1 };
|
|
214
|
+
this.selectedYear = new Date().getFullYear();
|
|
215
|
+
this.currentDecadeStart = Math.floor(this.selectedYear / 10) * 10;
|
|
216
|
+
this.years = [];
|
|
217
|
+
this.months = Object.keys(MONTHS).map(key => Number(key));
|
|
218
|
+
}
|
|
219
|
+
ngOnInit() {
|
|
220
|
+
setTimeout(() => {
|
|
221
|
+
this.selectedYear = this.selectedMonth.year;
|
|
222
|
+
this.selectDecadeByYear(this.selectedYear);
|
|
223
|
+
this.setYears();
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
toggleMode(event) {
|
|
227
|
+
event.stopPropagation();
|
|
228
|
+
this.mode = this.mode === 'year' ? 'decade' : 'year';
|
|
229
|
+
}
|
|
230
|
+
setYears() {
|
|
231
|
+
this.years = [];
|
|
232
|
+
for (let i = this.currentDecadeStart; i < this.currentDecadeStart + 10; i++) {
|
|
233
|
+
this.years.push(i);
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
;
|
|
237
|
+
next(event) {
|
|
238
|
+
event.stopPropagation();
|
|
239
|
+
if (this.mode === 'year') {
|
|
240
|
+
this.selectedYear++;
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
this.currentDecadeStart += 10;
|
|
244
|
+
this.setYears();
|
|
245
|
+
this.selectedYear = this.currentDecadeStart;
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
previous(event) {
|
|
249
|
+
event.stopPropagation();
|
|
250
|
+
if (this.mode === 'year') {
|
|
251
|
+
this.selectedYear--;
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
this.currentDecadeStart -= 10;
|
|
255
|
+
this.setYears();
|
|
256
|
+
this.selectedYear = this.currentDecadeStart;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
selectYear(event, year) {
|
|
260
|
+
event.stopPropagation();
|
|
261
|
+
this.selectedYear = year;
|
|
262
|
+
this.mode = 'year';
|
|
263
|
+
}
|
|
264
|
+
selectDecadeByYear(year) {
|
|
265
|
+
this.currentDecadeStart = Math.floor(year / 10) * 10;
|
|
266
|
+
this.setYears();
|
|
267
|
+
this.mode = 'decade';
|
|
268
|
+
}
|
|
269
|
+
selectMonth(month) {
|
|
270
|
+
this.monthSelected.emit({ year: this.selectedYear, month });
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
MonthSelectorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MonthSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
274
|
+
MonthSelectorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: MonthSelectorComponent, selector: "lib-month-selector", inputs: { selectedMonth: "selectedMonth" }, outputs: { monthSelected: "monthSelected" }, ngImport: i0, template: "<div class=\"month-selector-component\">\n <div class=\"header\">\n <button class=\"btn-range\" *ngIf=\"mode === 'decade'\" (click)=\"toggleMode($event)\">\n <span>{{currentDecadeStart}} - {{currentDecadeStart + 9}}</span>\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\n fill=\"currentColor\">\n <path d=\"M480-360 280-560h400L480-360Z\" />\n </svg>\n </button>\n\n <button class=\"btn-range\" *ngIf=\"mode === 'year'\" (click)=\"toggleMode($event)\">\n <span>{{selectedYear}}</span>\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" style=\"transform: rotate(180deg);\" height=\"24px\"\n viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"currentColor\">\n <path d=\"M480-360 280-560h400L480-360Z\" />\n </svg>\n </button>\n\n <div class=\"nav-controls\">\n <button class=\"btn-prev\" (click)=\"previous($event)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\n fill=\"currentColor\">\n <path d=\"M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z\" />\n </svg>\n </button>\n\n <button class=\"btn-next\" (click)=\"next($event)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\n fill=\"currentColor\">\n <path d=\"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z\" />\n </svg>\n </button>\n </div>\n </div>\n\n <div class=\"years-grid\" *ngIf=\"mode === 'decade'\">\n <button class=\"btn-year\" *ngFor=\"let year of years\"\n [ngClass]=\"{selected: year === selectedYear, current: year === currentYear }\"\n (click)=\"selectYear($event, year)\">\n {{ year }}\n </button>\n </div>\n\n <div class=\"months-grid\" *ngIf=\"mode === 'year'\">\n <button class=\"btn-month\" *ngFor=\"let month of months\"\n [ngClass]=\"{selected: month === selectedMonth.month && selectedYear === selectedMonth.year, current: currentYear === selectedYear && month === currentMonth}\"\n (click)=\"selectMonth(month)\">\n {{ month | translateMonth | slice:0:3 }}\n </button>\n </div>\n</div>", styles: [".month-selector-component{display:flex;flex-direction:column;width:280px;-webkit-user-select:none;user-select:none}.header{display:flex;align-items:center;justify-content:space-between;padding:8px 16px}.btn-range{display:flex;align-items:center;height:32px;padding:0 4px 0 12px;background:none;border:none;border-radius:50px;cursor:pointer;font-weight:600}.btn-range:hover{background-color:#0000000a}.btn-range span{white-space:nowrap}.nav-controls{display:flex;align-items:center}.btn-prev,.btn-next{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:none;border:none;border-radius:50%;cursor:pointer}.btn-prev:hover,.btn-next:hover{background-color:#0000000a}.years-grid,.months-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:0 16px 16px}.btn-month,.btn-year{display:flex;align-items:center;justify-content:center;padding:6px 12px;border:none;background:none;border-radius:50px;font-size:14px;cursor:pointer}.btn-month:hover,.btn-year:hover{background-color:#0000000a}.btn-month.selected,.btn-year.selected{border:1px solid rgba(0,0,0,.12)}.btn-month.current,.btn-year.current{background-color:#0000001f}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: TranslateMonthPipe, name: "translateMonth" }] });
|
|
275
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: MonthSelectorComponent, decorators: [{
|
|
276
|
+
type: Component,
|
|
277
|
+
args: [{ selector: 'lib-month-selector', template: "<div class=\"month-selector-component\">\n <div class=\"header\">\n <button class=\"btn-range\" *ngIf=\"mode === 'decade'\" (click)=\"toggleMode($event)\">\n <span>{{currentDecadeStart}} - {{currentDecadeStart + 9}}</span>\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\n fill=\"currentColor\">\n <path d=\"M480-360 280-560h400L480-360Z\" />\n </svg>\n </button>\n\n <button class=\"btn-range\" *ngIf=\"mode === 'year'\" (click)=\"toggleMode($event)\">\n <span>{{selectedYear}}</span>\n\n <svg xmlns=\"http://www.w3.org/2000/svg\" style=\"transform: rotate(180deg);\" height=\"24px\"\n viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"currentColor\">\n <path d=\"M480-360 280-560h400L480-360Z\" />\n </svg>\n </button>\n\n <div class=\"nav-controls\">\n <button class=\"btn-prev\" (click)=\"previous($event)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\n fill=\"currentColor\">\n <path d=\"M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z\" />\n </svg>\n </button>\n\n <button class=\"btn-next\" (click)=\"next($event)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\n fill=\"currentColor\">\n <path d=\"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z\" />\n </svg>\n </button>\n </div>\n </div>\n\n <div class=\"years-grid\" *ngIf=\"mode === 'decade'\">\n <button class=\"btn-year\" *ngFor=\"let year of years\"\n [ngClass]=\"{selected: year === selectedYear, current: year === currentYear }\"\n (click)=\"selectYear($event, year)\">\n {{ year }}\n </button>\n </div>\n\n <div class=\"months-grid\" *ngIf=\"mode === 'year'\">\n <button class=\"btn-month\" *ngFor=\"let month of months\"\n [ngClass]=\"{selected: month === selectedMonth.month && selectedYear === selectedMonth.year, current: currentYear === selectedYear && month === currentMonth}\"\n (click)=\"selectMonth(month)\">\n {{ month | translateMonth | slice:0:3 }}\n </button>\n </div>\n</div>", styles: [".month-selector-component{display:flex;flex-direction:column;width:280px;-webkit-user-select:none;user-select:none}.header{display:flex;align-items:center;justify-content:space-between;padding:8px 16px}.btn-range{display:flex;align-items:center;height:32px;padding:0 4px 0 12px;background:none;border:none;border-radius:50px;cursor:pointer;font-weight:600}.btn-range:hover{background-color:#0000000a}.btn-range span{white-space:nowrap}.nav-controls{display:flex;align-items:center}.btn-prev,.btn-next{display:flex;align-items:center;justify-content:center;width:32px;height:32px;background:none;border:none;border-radius:50%;cursor:pointer}.btn-prev:hover,.btn-next:hover{background-color:#0000000a}.years-grid,.months-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;padding:0 16px 16px}.btn-month,.btn-year{display:flex;align-items:center;justify-content:center;padding:6px 12px;border:none;background:none;border-radius:50px;font-size:14px;cursor:pointer}.btn-month:hover,.btn-year:hover{background-color:#0000000a}.btn-month.selected,.btn-year.selected{border:1px solid rgba(0,0,0,.12)}.btn-month.current,.btn-year.current{background-color:#0000001f}\n"] }]
|
|
278
|
+
}], ctorParameters: function () { return []; }, propDecorators: { monthSelected: [{
|
|
279
|
+
type: Output
|
|
280
|
+
}], selectedMonth: [{
|
|
281
|
+
type: Input
|
|
282
|
+
}] } });
|
|
283
|
+
|
|
284
|
+
class CalendarComponent {
|
|
285
|
+
constructor() {
|
|
286
|
+
this.currentMonth = {
|
|
287
|
+
year: new Date().getFullYear(),
|
|
288
|
+
month: new Date().getMonth() + 1
|
|
289
|
+
};
|
|
290
|
+
this.events = [];
|
|
291
|
+
this.startAt = 'sunday';
|
|
292
|
+
this.monthChange = new EventEmitter();
|
|
293
|
+
this.dayCells = [];
|
|
294
|
+
this.weekDays = [
|
|
295
|
+
{ tag: 'sun' },
|
|
296
|
+
{ tag: 'mon' },
|
|
297
|
+
{ tag: 'tue' },
|
|
298
|
+
{ tag: 'wed' },
|
|
299
|
+
{ tag: 'thu' },
|
|
300
|
+
{ tag: 'fri' },
|
|
301
|
+
{ tag: 'sat' },
|
|
302
|
+
];
|
|
303
|
+
this.showMoreEventsModal = false;
|
|
304
|
+
this.moreEventsModalEvents = [];
|
|
305
|
+
this.currentMonthTitle = ``;
|
|
306
|
+
this.showDateSelector = false;
|
|
307
|
+
this.resizeListener = () => {
|
|
308
|
+
this.setCalendarBodyHeight();
|
|
309
|
+
this.setMaxEventsInDayCell();
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
onDocumentClick(event) {
|
|
313
|
+
if (!this.showDateSelector)
|
|
314
|
+
return;
|
|
315
|
+
const dropdown = this.dateSelectorDropdown?.nativeElement;
|
|
316
|
+
const button = document.querySelector('.btn-date-selector');
|
|
317
|
+
if (dropdown && !dropdown.contains(event.target) && button && !button.contains(event.target)) {
|
|
318
|
+
this.showDateSelector = false;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
isToday(date) {
|
|
322
|
+
const today = new Date();
|
|
323
|
+
return date.getDate() === today.getDate() &&
|
|
324
|
+
date.getMonth() === today.getMonth() &&
|
|
325
|
+
date.getFullYear() === today.getFullYear();
|
|
326
|
+
}
|
|
327
|
+
getEventsForDay(date) {
|
|
328
|
+
return this.events.filter(event => {
|
|
329
|
+
const eventStart = new Date(event.start);
|
|
330
|
+
const eventEnd = event.end ? new Date(event.end) : eventStart;
|
|
331
|
+
return date >= new Date(eventStart.getFullYear(), eventStart.getMonth(), eventStart.getDate()) &&
|
|
332
|
+
date <= new Date(eventEnd.getFullYear(), eventEnd.getMonth(), eventEnd.getDate());
|
|
333
|
+
});
|
|
334
|
+
}
|
|
335
|
+
initDaysCells() {
|
|
336
|
+
const daysInMonth = new Date(this.currentMonth.year, this.currentMonth.month, 0).getDate();
|
|
337
|
+
const firstDayOfWeek = new Date(this.currentMonth.year, this.currentMonth.month - 1, 1).getDay();
|
|
338
|
+
const prevDaysCount = this.startAt === 'monday' ? (firstDayOfWeek === 0 ? 6 : firstDayOfWeek - 1) : firstDayOfWeek;
|
|
339
|
+
// const nextDaysCount = (7 - ((prevDaysCount + daysInMonth) % 7)) % 7;
|
|
340
|
+
const nextDaysCount = 42 - (prevDaysCount + daysInMonth); // Always show 6 weeks
|
|
341
|
+
this.dayCells = [];
|
|
342
|
+
for (let i = 0; i < prevDaysCount; i++) {
|
|
343
|
+
const date = new Date(this.currentMonth.year, this.currentMonth.month - 1, i - prevDaysCount + 1);
|
|
344
|
+
const _events = this.getEventsForDay(date);
|
|
345
|
+
this.dayCells.push({
|
|
346
|
+
date,
|
|
347
|
+
events: _events,
|
|
348
|
+
isOutsideMonth: true,
|
|
349
|
+
isToday: this.isToday(date)
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
for (let day = 1; day <= daysInMonth; day++) {
|
|
353
|
+
const date = new Date(this.currentMonth.year, this.currentMonth.month - 1, day);
|
|
354
|
+
const _events = this.getEventsForDay(date);
|
|
355
|
+
this.dayCells.push({
|
|
356
|
+
date,
|
|
357
|
+
events: _events,
|
|
358
|
+
isToday: this.isToday(date)
|
|
359
|
+
});
|
|
360
|
+
}
|
|
361
|
+
for (let i = 1; i <= nextDaysCount; i++) {
|
|
362
|
+
const date = new Date(this.currentMonth.year, this.currentMonth.month - 1, daysInMonth + i);
|
|
363
|
+
const _events = this.getEventsForDay(date);
|
|
364
|
+
this.dayCells.push({
|
|
365
|
+
date,
|
|
366
|
+
events: _events,
|
|
367
|
+
isOutsideMonth: true,
|
|
368
|
+
isToday: this.isToday(date)
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
setCalendarBodyHeight() {
|
|
373
|
+
this.calendarBodyHeight = this.calendarBodyRef.nativeElement.clientHeight;
|
|
374
|
+
}
|
|
375
|
+
setMaxEventsInDayCell() {
|
|
376
|
+
const element = document.getElementsByClassName('events-list')[0];
|
|
377
|
+
console.log(element);
|
|
378
|
+
if (element) {
|
|
379
|
+
const eventItemHeight = 22;
|
|
380
|
+
this.maxEventsInDayCell = Math.floor(element.clientHeight / eventItemHeight) - 1;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
openMoreEventsModal(date, events) {
|
|
384
|
+
this.moreEventsModalDate = date;
|
|
385
|
+
this.moreEventsModalEvents = events;
|
|
386
|
+
this.showMoreEventsModal = true;
|
|
387
|
+
}
|
|
388
|
+
closeMoreEventsModal() {
|
|
389
|
+
this.showMoreEventsModal = false;
|
|
390
|
+
this.moreEventsModalDate = undefined;
|
|
391
|
+
this.moreEventsModalEvents = [];
|
|
392
|
+
}
|
|
393
|
+
nextMonth() {
|
|
394
|
+
const oldMonth = { ...this.currentMonth };
|
|
395
|
+
if (this.currentMonth.month === 12) {
|
|
396
|
+
this.currentMonth.month = 1;
|
|
397
|
+
this.currentMonth.year += 1;
|
|
398
|
+
}
|
|
399
|
+
else {
|
|
400
|
+
this.currentMonth.month += 1;
|
|
401
|
+
}
|
|
402
|
+
this.initDaysCells();
|
|
403
|
+
this.monthChange.emit({
|
|
404
|
+
newMonth: { ...this.currentMonth },
|
|
405
|
+
oldMonth
|
|
406
|
+
});
|
|
407
|
+
}
|
|
408
|
+
prevMonth() {
|
|
409
|
+
const oldMonth = { ...this.currentMonth };
|
|
410
|
+
if (this.currentMonth.month === 1) {
|
|
411
|
+
this.currentMonth.month = 12;
|
|
412
|
+
this.currentMonth.year -= 1;
|
|
413
|
+
}
|
|
414
|
+
else {
|
|
415
|
+
this.currentMonth.month -= 1;
|
|
416
|
+
}
|
|
417
|
+
this.initDaysCells();
|
|
418
|
+
this.monthChange.emit({
|
|
419
|
+
newMonth: { ...this.currentMonth },
|
|
420
|
+
oldMonth
|
|
421
|
+
});
|
|
422
|
+
}
|
|
423
|
+
goToToday() {
|
|
424
|
+
const today = new Date();
|
|
425
|
+
const oldMonth = { ...this.currentMonth };
|
|
426
|
+
this.currentMonth.year = today.getFullYear();
|
|
427
|
+
this.currentMonth.month = today.getMonth() + 1;
|
|
428
|
+
this.initDaysCells();
|
|
429
|
+
this.monthChange.emit({
|
|
430
|
+
newMonth: { ...this.currentMonth },
|
|
431
|
+
oldMonth
|
|
432
|
+
});
|
|
433
|
+
}
|
|
434
|
+
toggleDateSelector() {
|
|
435
|
+
this.showDateSelector = !this.showDateSelector;
|
|
436
|
+
}
|
|
437
|
+
onMonthSelected(newMonth) {
|
|
438
|
+
const oldMonth = { ...this.currentMonth };
|
|
439
|
+
this.currentMonth = newMonth;
|
|
440
|
+
this.initDaysCells();
|
|
441
|
+
this.monthChange.emit({
|
|
442
|
+
newMonth: { ...this.currentMonth },
|
|
443
|
+
oldMonth
|
|
444
|
+
});
|
|
445
|
+
this.showDateSelector = false;
|
|
446
|
+
}
|
|
447
|
+
ngOnInit() {
|
|
448
|
+
if (this.startAt === 'monday') {
|
|
449
|
+
this.weekDays = [
|
|
450
|
+
{ tag: 'mon' },
|
|
451
|
+
{ tag: 'tue' },
|
|
452
|
+
{ tag: 'wed' },
|
|
453
|
+
{ tag: 'thu' },
|
|
454
|
+
{ tag: 'fri' },
|
|
455
|
+
{ tag: 'sat' },
|
|
456
|
+
{ tag: 'sun' },
|
|
457
|
+
];
|
|
458
|
+
}
|
|
459
|
+
this.initDaysCells();
|
|
460
|
+
}
|
|
461
|
+
ngAfterViewInit() {
|
|
462
|
+
window.addEventListener('resize', this.resizeListener);
|
|
463
|
+
setTimeout(() => {
|
|
464
|
+
this.setCalendarBodyHeight();
|
|
465
|
+
this.setMaxEventsInDayCell();
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
onDestroy() {
|
|
469
|
+
window.removeEventListener('resize', this.resizeListener);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
CalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
473
|
+
CalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: CalendarComponent, selector: "lib-calendar", inputs: { currentMonth: "currentMonth", events: "events", startAt: "startAt" }, outputs: { monthChange: "monthChange" }, host: { listeners: { "document:click": "onDocumentClick($event)" } }, viewQueries: [{ propertyName: "calendarRef", first: true, predicate: ["calendar"], descendants: true }, { propertyName: "calendarBodyRef", first: true, predicate: ["calendarBody"], descendants: true }, { propertyName: "dateSelectorDropdown", first: true, predicate: ["dateSelectorDropdown"], descendants: true }], ngImport: i0, template: "<div class=\"calendar-component\">\r\n <div class=\"header\">\r\n <div class=\"nav-controls\">\r\n <button class=\"btn-prev\" (click)=\"prevMonth()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\r\n fill=\"currentColor\">\r\n <path d=\"M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z\" />\r\n </svg>\r\n </button>\r\n\r\n <button class=\"btn-today\" (click)=\"goToToday()\">{{'today' | translate}}</button>\r\n\r\n <button class=\"btn-next\" (click)=\"nextMonth()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\r\n fill=\"currentColor\">\r\n <path d=\"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <div class=\"spacer\"></div>\r\n\r\n <div class=\"date-selector-container\">\r\n <button class=\"btn-date-selector\" (click)=\"toggleDateSelector()\">\r\n <span>{{ currentMonth.month | translateMonth}} - {{ currentMonth.year }}</span>\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\r\n fill=\"currentColor\">\r\n <path d=\"M480-360 280-560h400L480-360Z\" />\r\n </svg>\r\n </button>\r\n\r\n <div class=\"date-selector-dropdown\" *ngIf=\"showDateSelector\" #dateSelectorDropdown>\r\n <lib-month-selector [selectedMonth]=\"currentMonth\"\r\n (monthSelected)=\"onMonthSelected($event)\"></lib-month-selector>\r\n </div>\r\n </div>\r\n\r\n <div class=\"spacer\"></div>\r\n\r\n <div class=\"view-selector\">\r\n <button class=\"btn-view active\">\r\n <!-- month view -->\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\r\n fill=\"currentColor\">\r\n <path\r\n d=\"M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Zm0-480h560v-80H200v80Zm0 0v-80 80Zm280 240q-17 0-28.5-11.5T440-440q0-17 11.5-28.5T480-480q17 0 28.5 11.5T520-440q0 17-11.5 28.5T480-400Zm-160 0q-17 0-28.5-11.5T280-440q0-17 11.5-28.5T320-480q17 0 28.5 11.5T360-440q0 17-11.5 28.5T320-400Zm320 0q-17 0-28.5-11.5T600-440q0-17 11.5-28.5T640-480q17 0 28.5 11.5T680-440q0 17-11.5 28.5T640-400ZM480-240q-17 0-28.5-11.5T440-280q0-17 11.5-28.5T480-320q17 0 28.5 11.5T520-280q0 17-11.5 28.5T480-240Zm-160 0q-17 0-28.5-11.5T280-280q0-17 11.5-28.5T320-320q17 0 28.5 11.5T360-280q0 17-11.5 28.5T320-240Zm320 0q-17 0-28.5-11.5T600-280q0-17 11.5-28.5T640-320q17 0 28.5 11.5T680-280q0 17-11.5 28.5T640-240Z\" />\r\n </svg>\r\n </button>\r\n\r\n <button class=\"btn-view\">\r\n <!-- week view -->\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\r\n fill=\"currentColor\">\r\n <path\r\n d=\"M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm360-80h100v-480H520v480Zm-180 0h100v-480H340v480Zm-180 0h100v-480H160v480Zm540 0h100v-480H700v480Z\" />\r\n </svg>\r\n </button>\r\n\r\n <button class=\"btn-view\">\r\n <!-- day view -->\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\r\n fill=\"currentColor\">\r\n <path\r\n d=\"M120-160v-80h720v80H120Zm0-560v-80h720v80H120Zm80 400q-33 0-56.5-23.5T120-400v-160q0-33 23.5-56.5T200-640h560q33 0 56.5 23.5T840-560v160q0 33-23.5 56.5T760-320H200Zm0-80h560v-160H200v160Zm0-160v160-160Z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"body\" #calendarBody>\r\n <div class=\"week-days\">\r\n <div class=\"week-day\" *ngFor=\"let day of weekDays\">\r\n {{ day.tag | translate | slice:0:3 }}\r\n </div>\r\n </div>\r\n\r\n <div class=\"days-grid\">\r\n <div class=\"day-cell\" *ngFor=\"let day of dayCells; let i = index\"\r\n [ngClass]=\"{'outside-month': day.isOutsideMonth, 'is-today': day.isToday}\">\r\n <div class=\"day-number\">\r\n {{ day.date.getDate() }}\r\n </div>\r\n\r\n <div class=\"events-list\">\r\n <lib-calendar-event *ngFor=\"let event of day.events | slice:0:maxEventsInDayCell\"\r\n [event]=\"event\"></lib-calendar-event>\r\n\r\n <div class=\"more-events\" *ngIf=\"day.events.length > (maxEventsInDayCell || 0)\"\r\n (click)=\"openMoreEventsModal(day.date, day.events)\">\r\n {{'nMoreEvents' | translate: {n:(day.events.length - (maxEventsInDayCell || 0))} }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"footer\">\r\n Footer\r\n </div>\r\n\r\n <lib-more-events-modal *ngIf=\"showMoreEventsModal && moreEventsModalDate\" [events]=\"moreEventsModalEvents\"\r\n [date]=\"moreEventsModalDate\" (close)=\"closeMoreEventsModal()\"\r\n (eventClick)=\"closeMoreEventsModal()\"></lib-more-events-modal>\r\n</div>", styles: ["*{box-sizing:border-box;margin:0;padding:0}.calendar-component{display:flex;flex-direction:column;width:100%;height:100%}.header{flex-shrink:0;display:flex;align-items:center;gap:16px;padding:2px 16px}.header .spacer{flex:1 1 auto}.header .nav-controls{display:flex;align-items:center}.header .nav-controls .btn-prev,.header .nav-controls .btn-next{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border:none;background:none;border-radius:50%;cursor:pointer;-webkit-user-select:none;user-select:none}.header .nav-controls .btn-prev:hover,.header .nav-controls .btn-next:hover{background-color:#eee}.header .nav-controls .btn-today{display:flex;align-items:center;height:30px;padding:0 12px;border:none;background:none;border-radius:50px;cursor:pointer;font-weight:600;-webkit-user-select:none;user-select:none}.header .nav-controls .btn-today:hover{background-color:#eee}.header .view-selector{display:flex;align-items:center}.header .view-selector .btn-view{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border:1px solid #cccccc;background:none;cursor:pointer;-webkit-user-select:none;user-select:none}.header .view-selector .btn-view:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px;border-right:none}.header .view-selector .btn-view:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px;border-left:none}.header .view-selector .btn-view:hover{background-color:#eee}.header .view-selector .btn-view svg{width:22px;height:22px}.header .view-selector .btn-view.active{background-color:#0000001a}.header .date-selector-container{position:relative}.header .date-selector-container .date-selector-dropdown{position:absolute;top:100%;left:50%;transform:translate(-50%);background-color:#fff;border-radius:4px;box-shadow:0 2px 24px #0000004d;z-index:3}.header .date-selector-container .date-selector-dropdown:before{content:\"\";position:absolute;top:-6px;left:50%;transform:translate(-50%) rotate(45deg);width:12px;height:12px;background-color:#fff;border-radius:2px}.header .btn-date-selector{display:flex;align-items:center;gap:8px;height:30px;padding:0 8px 0 12px;border:none;background:none;border-radius:50px;cursor:pointer;font-weight:600;-webkit-user-select:none;user-select:none}.header .btn-date-selector:hover{background-color:#eee}.body{flex:1 1 0;display:flex;flex-direction:column;width:100%;min-height:0;height:100%}.week-days{flex-shrink:0;display:grid;grid-template-columns:repeat(7,1fr);width:100%;background-color:#f4f4f4}.week-day{display:flex;align-items:center;justify-content:center;padding:4px;background-color:#fff;font-size:14px;color:#00000080}.days-grid{flex:1 1 0;display:grid;grid-template-columns:repeat(7,1fr);gap:1px;grid-auto-rows:1fr;width:100%;padding:1px;background-color:#f4f4f4;min-height:0;height:100%}.day-cell{display:flex;flex-direction:column;gap:4px;padding:4px;background-color:#fff;overflow:hidden}.day-cell .day-number{display:flex;align-items:center;justify-content:center;width:fit-content;aspect-ratio:1;padding:2px;border-radius:50%;font-size:12px;line-height:16px;font-weight:600;-webkit-user-select:none;user-select:none}.day-cell.outside-month{background-color:#f8f8f8}.day-cell.is-today .day-number{background-color:#007bff;color:#fff}.day-cell .events-list{flex:1 1 auto;display:flex;flex-direction:column;gap:2px;overflow:hidden;min-height:0;max-height:100%}.day-cell .events-list .more-events{padding:2px 8px;border-radius:4px;font-size:12px;color:#555;cursor:pointer}.day-cell .events-list .more-events:hover{background-color:#eee}.footer{flex-shrink:0;background-color:#add8e6}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CalendarEventComponent, selector: "lib-calendar-event", inputs: ["event"] }, { kind: "component", type: MoreEventsModalComponent, selector: "lib-more-events-modal", inputs: ["events", "date"], outputs: ["close", "eventClick"] }, { kind: "component", type: MonthSelectorComponent, selector: "lib-month-selector", inputs: ["selectedMonth"], outputs: ["monthSelected"] }, { kind: "pipe", type: i1.SlicePipe, name: "slice" }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "pipe", type: TranslateMonthPipe, name: "translateMonth" }] });
|
|
474
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
475
|
+
type: Component,
|
|
476
|
+
args: [{ selector: 'lib-calendar', template: "<div class=\"calendar-component\">\r\n <div class=\"header\">\r\n <div class=\"nav-controls\">\r\n <button class=\"btn-prev\" (click)=\"prevMonth()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\r\n fill=\"currentColor\">\r\n <path d=\"M560-240 320-480l240-240 56 56-184 184 184 184-56 56Z\" />\r\n </svg>\r\n </button>\r\n\r\n <button class=\"btn-today\" (click)=\"goToToday()\">{{'today' | translate}}</button>\r\n\r\n <button class=\"btn-next\" (click)=\"nextMonth()\">\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\r\n fill=\"currentColor\">\r\n <path d=\"M504-480 320-664l56-56 240 240-240 240-56-56 184-184Z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n\r\n <div class=\"spacer\"></div>\r\n\r\n <div class=\"date-selector-container\">\r\n <button class=\"btn-date-selector\" (click)=\"toggleDateSelector()\">\r\n <span>{{ currentMonth.month | translateMonth}} - {{ currentMonth.year }}</span>\r\n\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\r\n fill=\"currentColor\">\r\n <path d=\"M480-360 280-560h400L480-360Z\" />\r\n </svg>\r\n </button>\r\n\r\n <div class=\"date-selector-dropdown\" *ngIf=\"showDateSelector\" #dateSelectorDropdown>\r\n <lib-month-selector [selectedMonth]=\"currentMonth\"\r\n (monthSelected)=\"onMonthSelected($event)\"></lib-month-selector>\r\n </div>\r\n </div>\r\n\r\n <div class=\"spacer\"></div>\r\n\r\n <div class=\"view-selector\">\r\n <button class=\"btn-view active\">\r\n <!-- month view -->\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\r\n fill=\"currentColor\">\r\n <path\r\n d=\"M200-80q-33 0-56.5-23.5T120-160v-560q0-33 23.5-56.5T200-800h40v-80h80v80h320v-80h80v80h40q33 0 56.5 23.5T840-720v560q0 33-23.5 56.5T760-80H200Zm0-80h560v-400H200v400Zm0-480h560v-80H200v80Zm0 0v-80 80Zm280 240q-17 0-28.5-11.5T440-440q0-17 11.5-28.5T480-480q17 0 28.5 11.5T520-440q0 17-11.5 28.5T480-400Zm-160 0q-17 0-28.5-11.5T280-440q0-17 11.5-28.5T320-480q17 0 28.5 11.5T360-440q0 17-11.5 28.5T320-400Zm320 0q-17 0-28.5-11.5T600-440q0-17 11.5-28.5T640-480q17 0 28.5 11.5T680-440q0 17-11.5 28.5T640-400ZM480-240q-17 0-28.5-11.5T440-280q0-17 11.5-28.5T480-320q17 0 28.5 11.5T520-280q0 17-11.5 28.5T480-240Zm-160 0q-17 0-28.5-11.5T280-280q0-17 11.5-28.5T320-320q17 0 28.5 11.5T360-280q0 17-11.5 28.5T320-240Zm320 0q-17 0-28.5-11.5T600-280q0-17 11.5-28.5T640-320q17 0 28.5 11.5T680-280q0 17-11.5 28.5T640-240Z\" />\r\n </svg>\r\n </button>\r\n\r\n <button class=\"btn-view\">\r\n <!-- week view -->\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\r\n fill=\"currentColor\">\r\n <path\r\n d=\"M160-160q-33 0-56.5-23.5T80-240v-480q0-33 23.5-56.5T160-800h640q33 0 56.5 23.5T880-720v480q0 33-23.5 56.5T800-160H160Zm360-80h100v-480H520v480Zm-180 0h100v-480H340v480Zm-180 0h100v-480H160v480Zm540 0h100v-480H700v480Z\" />\r\n </svg>\r\n </button>\r\n\r\n <button class=\"btn-view\">\r\n <!-- day view -->\r\n <svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\"\r\n fill=\"currentColor\">\r\n <path\r\n d=\"M120-160v-80h720v80H120Zm0-560v-80h720v80H120Zm80 400q-33 0-56.5-23.5T120-400v-160q0-33 23.5-56.5T200-640h560q33 0 56.5 23.5T840-560v160q0 33-23.5 56.5T760-320H200Zm0-80h560v-160H200v160Zm0-160v160-160Z\" />\r\n </svg>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n <div class=\"body\" #calendarBody>\r\n <div class=\"week-days\">\r\n <div class=\"week-day\" *ngFor=\"let day of weekDays\">\r\n {{ day.tag | translate | slice:0:3 }}\r\n </div>\r\n </div>\r\n\r\n <div class=\"days-grid\">\r\n <div class=\"day-cell\" *ngFor=\"let day of dayCells; let i = index\"\r\n [ngClass]=\"{'outside-month': day.isOutsideMonth, 'is-today': day.isToday}\">\r\n <div class=\"day-number\">\r\n {{ day.date.getDate() }}\r\n </div>\r\n\r\n <div class=\"events-list\">\r\n <lib-calendar-event *ngFor=\"let event of day.events | slice:0:maxEventsInDayCell\"\r\n [event]=\"event\"></lib-calendar-event>\r\n\r\n <div class=\"more-events\" *ngIf=\"day.events.length > (maxEventsInDayCell || 0)\"\r\n (click)=\"openMoreEventsModal(day.date, day.events)\">\r\n {{'nMoreEvents' | translate: {n:(day.events.length - (maxEventsInDayCell || 0))} }}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <div class=\"footer\">\r\n Footer\r\n </div>\r\n\r\n <lib-more-events-modal *ngIf=\"showMoreEventsModal && moreEventsModalDate\" [events]=\"moreEventsModalEvents\"\r\n [date]=\"moreEventsModalDate\" (close)=\"closeMoreEventsModal()\"\r\n (eventClick)=\"closeMoreEventsModal()\"></lib-more-events-modal>\r\n</div>", styles: ["*{box-sizing:border-box;margin:0;padding:0}.calendar-component{display:flex;flex-direction:column;width:100%;height:100%}.header{flex-shrink:0;display:flex;align-items:center;gap:16px;padding:2px 16px}.header .spacer{flex:1 1 auto}.header .nav-controls{display:flex;align-items:center}.header .nav-controls .btn-prev,.header .nav-controls .btn-next{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border:none;background:none;border-radius:50%;cursor:pointer;-webkit-user-select:none;user-select:none}.header .nav-controls .btn-prev:hover,.header .nav-controls .btn-next:hover{background-color:#eee}.header .nav-controls .btn-today{display:flex;align-items:center;height:30px;padding:0 12px;border:none;background:none;border-radius:50px;cursor:pointer;font-weight:600;-webkit-user-select:none;user-select:none}.header .nav-controls .btn-today:hover{background-color:#eee}.header .view-selector{display:flex;align-items:center}.header .view-selector .btn-view{display:flex;align-items:center;justify-content:center;width:30px;height:30px;border:1px solid #cccccc;background:none;cursor:pointer;-webkit-user-select:none;user-select:none}.header .view-selector .btn-view:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px;border-right:none}.header .view-selector .btn-view:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px;border-left:none}.header .view-selector .btn-view:hover{background-color:#eee}.header .view-selector .btn-view svg{width:22px;height:22px}.header .view-selector .btn-view.active{background-color:#0000001a}.header .date-selector-container{position:relative}.header .date-selector-container .date-selector-dropdown{position:absolute;top:100%;left:50%;transform:translate(-50%);background-color:#fff;border-radius:4px;box-shadow:0 2px 24px #0000004d;z-index:3}.header .date-selector-container .date-selector-dropdown:before{content:\"\";position:absolute;top:-6px;left:50%;transform:translate(-50%) rotate(45deg);width:12px;height:12px;background-color:#fff;border-radius:2px}.header .btn-date-selector{display:flex;align-items:center;gap:8px;height:30px;padding:0 8px 0 12px;border:none;background:none;border-radius:50px;cursor:pointer;font-weight:600;-webkit-user-select:none;user-select:none}.header .btn-date-selector:hover{background-color:#eee}.body{flex:1 1 0;display:flex;flex-direction:column;width:100%;min-height:0;height:100%}.week-days{flex-shrink:0;display:grid;grid-template-columns:repeat(7,1fr);width:100%;background-color:#f4f4f4}.week-day{display:flex;align-items:center;justify-content:center;padding:4px;background-color:#fff;font-size:14px;color:#00000080}.days-grid{flex:1 1 0;display:grid;grid-template-columns:repeat(7,1fr);gap:1px;grid-auto-rows:1fr;width:100%;padding:1px;background-color:#f4f4f4;min-height:0;height:100%}.day-cell{display:flex;flex-direction:column;gap:4px;padding:4px;background-color:#fff;overflow:hidden}.day-cell .day-number{display:flex;align-items:center;justify-content:center;width:fit-content;aspect-ratio:1;padding:2px;border-radius:50%;font-size:12px;line-height:16px;font-weight:600;-webkit-user-select:none;user-select:none}.day-cell.outside-month{background-color:#f8f8f8}.day-cell.is-today .day-number{background-color:#007bff;color:#fff}.day-cell .events-list{flex:1 1 auto;display:flex;flex-direction:column;gap:2px;overflow:hidden;min-height:0;max-height:100%}.day-cell .events-list .more-events{padding:2px 8px;border-radius:4px;font-size:12px;color:#555;cursor:pointer}.day-cell .events-list .more-events:hover{background-color:#eee}.footer{flex-shrink:0;background-color:#add8e6}\n"] }]
|
|
477
|
+
}], ctorParameters: function () { return []; }, propDecorators: { currentMonth: [{
|
|
478
|
+
type: Input
|
|
479
|
+
}], events: [{
|
|
480
|
+
type: Input
|
|
481
|
+
}], startAt: [{
|
|
482
|
+
type: Input
|
|
483
|
+
}], monthChange: [{
|
|
484
|
+
type: Output
|
|
485
|
+
}], calendarRef: [{
|
|
486
|
+
type: ViewChild,
|
|
487
|
+
args: ['calendar']
|
|
488
|
+
}], calendarBodyRef: [{
|
|
489
|
+
type: ViewChild,
|
|
490
|
+
args: ['calendarBody']
|
|
491
|
+
}], dateSelectorDropdown: [{
|
|
492
|
+
type: ViewChild,
|
|
493
|
+
args: ['dateSelectorDropdown', { static: false }]
|
|
494
|
+
}], onDocumentClick: [{
|
|
495
|
+
type: HostListener,
|
|
496
|
+
args: ['document:click', ['$event']]
|
|
497
|
+
}] } });
|
|
498
|
+
|
|
499
|
+
class SmartCalendarComponent {
|
|
500
|
+
constructor() {
|
|
501
|
+
this.events = [];
|
|
502
|
+
}
|
|
503
|
+
ngOnInit() {
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
SmartCalendarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
507
|
+
SmartCalendarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: SmartCalendarComponent, selector: "smart-calendar", inputs: { events: "events" }, ngImport: i0, template: "<div class=\"smart-calendar-component\">\n <lib-calendar [events]=\"events\"></lib-calendar>\n</div>", styles: [".smart-calendar-component{width:100%;height:100%;background-color:#fff;border:1px solid #dddddd}\n"], dependencies: [{ kind: "component", type: CalendarComponent, selector: "lib-calendar", inputs: ["currentMonth", "events", "startAt"], outputs: ["monthChange"] }] });
|
|
508
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartCalendarComponent, decorators: [{
|
|
509
|
+
type: Component,
|
|
510
|
+
args: [{ selector: 'smart-calendar', template: "<div class=\"smart-calendar-component\">\n <lib-calendar [events]=\"events\"></lib-calendar>\n</div>", styles: [".smart-calendar-component{width:100%;height:100%;background-color:#fff;border:1px solid #dddddd}\n"] }]
|
|
511
|
+
}], ctorParameters: function () { return []; }, propDecorators: { events: [{
|
|
512
|
+
type: Input
|
|
513
|
+
}] } });
|
|
514
|
+
|
|
36
515
|
class SmartAngularCalendarModule {
|
|
37
516
|
}
|
|
38
517
|
SmartAngularCalendarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartAngularCalendarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
39
|
-
SmartAngularCalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SmartAngularCalendarModule, declarations: [
|
|
40
|
-
|
|
518
|
+
SmartAngularCalendarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: SmartAngularCalendarModule, declarations: [SmartCalendarComponent,
|
|
519
|
+
CalendarComponent,
|
|
520
|
+
TranslatePipe,
|
|
521
|
+
CalendarEventComponent,
|
|
522
|
+
MoreEventsModalComponent,
|
|
523
|
+
TranslateMonthPipe,
|
|
524
|
+
MonthSelectorComponent], imports: [CommonModule], exports: [SmartCalendarComponent] });
|
|
525
|
+
SmartAngularCalendarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartAngularCalendarModule, imports: [CommonModule] });
|
|
41
526
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: SmartAngularCalendarModule, decorators: [{
|
|
42
527
|
type: NgModule,
|
|
43
528
|
args: [{
|
|
44
529
|
declarations: [
|
|
45
|
-
|
|
530
|
+
SmartCalendarComponent,
|
|
531
|
+
CalendarComponent,
|
|
532
|
+
TranslatePipe,
|
|
533
|
+
CalendarEventComponent,
|
|
534
|
+
MoreEventsModalComponent,
|
|
535
|
+
TranslateMonthPipe,
|
|
536
|
+
MonthSelectorComponent
|
|
537
|
+
],
|
|
538
|
+
imports: [
|
|
539
|
+
CommonModule
|
|
46
540
|
],
|
|
47
|
-
imports: [],
|
|
48
541
|
exports: [
|
|
49
|
-
|
|
542
|
+
SmartCalendarComponent
|
|
50
543
|
]
|
|
51
544
|
}]
|
|
52
545
|
}] });
|
|
@@ -59,5 +552,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
59
552
|
* Generated bundle index. Do not edit.
|
|
60
553
|
*/
|
|
61
554
|
|
|
62
|
-
export {
|
|
555
|
+
export { SmartAngularCalendarModule, SmartAngularCalendarService, SmartCalendarComponent };
|
|
63
556
|
//# sourceMappingURL=smart-solutions-tech-smart-angular-calendar.mjs.map
|