@acorex/components 7.1.10 → 7.1.11
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/calendar/src/calendar.class.d.ts +19 -38
- package/calendar/src/calendar.component.d.ts +9 -7
- package/esm2022/calendar/src/calendar-range.component.mjs +14 -14
- package/esm2022/calendar/src/calendar.class.mjs +63 -114
- package/esm2022/calendar/src/calendar.component.mjs +208 -159
- package/esm2022/common/src/components/value-component.class.mjs +2 -1
- package/esm2022/date-picker/src/datepicker.component.mjs +1 -1
- package/fesm2022/acorex-components-calendar.mjs +282 -283
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-common.mjs +1 -0
- package/fesm2022/acorex-components-common.mjs.map +1 -1
- package/fesm2022/acorex-components-date-picker.mjs +1 -1
- package/fesm2022/acorex-components-date-picker.mjs.map +1 -1
- package/package.json +1 -1
@@ -2,7 +2,6 @@ import { AXConfig } from '@acorex/core/config';
|
|
2
2
|
import * as i0 from '@angular/core';
|
3
3
|
import { EventEmitter, Injectable, Input, Output, Component, ViewEncapsulation, ChangeDetectionStrategy, HostBinding, ViewChild, NgModule } from '@angular/core';
|
4
4
|
import { AXRangeChangedEvent, AXItemClickEvent, MXBaseComponent, MXValueComponent, MXInteractiveComponent } from '@acorex/components/common';
|
5
|
-
import { AXBaseComponent } from '@acorex/components/mixin';
|
6
5
|
import { classes } from 'polytype';
|
7
6
|
import { AXDateTimeRange, AXDateTime, AXDateTimeModule } from '@acorex/core/dateTime';
|
8
7
|
import * as i1 from '@angular/common';
|
@@ -20,15 +19,73 @@ class AXCalendarNavigateEvent extends AXRangeChangedEvent {
|
|
20
19
|
*/
|
21
20
|
class AXCalendarSlotClick extends AXItemClickEvent {
|
22
21
|
}
|
22
|
+
// export class AXCalendarView {
|
23
|
+
// private _range: AXDateTimeRange;
|
24
|
+
// private _slots: AXCalendarViewSlot[] = [];
|
25
|
+
// get range(): AXDateTimeRange {
|
26
|
+
// return this.range;
|
27
|
+
// }
|
28
|
+
// get slots(): AXCalendarViewSlot[] {
|
29
|
+
// return this._slots;
|
30
|
+
// }
|
31
|
+
// constructor(
|
32
|
+
// private readonly startDate: AXDateTime,
|
33
|
+
// private readonly view: AXCalendarViewType
|
34
|
+
// ) {
|
35
|
+
// const current = this.startDate;
|
36
|
+
// let textFormat = 'YYYY';
|
37
|
+
// let tooltipFormat = 'YYYY';
|
38
|
+
// switch (this.view) {
|
39
|
+
// case 'year':
|
40
|
+
// let y = current.startOf('year').year;
|
41
|
+
// let min = y - (y % 10);
|
42
|
+
// let max = min + 9;
|
43
|
+
// this._range = new AXDateTimeRange(
|
44
|
+
// AXDateTime.from({
|
45
|
+
// year: min,
|
46
|
+
// month: 1,
|
47
|
+
// date: 1,
|
48
|
+
// calendar: this.startDate.calendar.name(),
|
49
|
+
// }),
|
50
|
+
// AXDateTime.from({
|
51
|
+
// year: max,
|
52
|
+
// month: 12,
|
53
|
+
// date: 28,
|
54
|
+
// calendar: this.startDate.calendar.name(),
|
55
|
+
// })
|
56
|
+
// );
|
57
|
+
// break;
|
58
|
+
// case 'month':
|
59
|
+
// textFormat = 'MMM';
|
60
|
+
// tooltipFormat = 'MMMM YYYY';
|
61
|
+
// this._range = new AXDateTimeRange(
|
62
|
+
// current.startOf('year'),
|
63
|
+
// current.endOf('year').add('day', -1)
|
64
|
+
// );
|
65
|
+
// break;
|
66
|
+
// default:
|
67
|
+
// this._range = new AXDateTimeRange(
|
68
|
+
// current.startOf('month'),
|
69
|
+
// current.endOf('month')
|
70
|
+
// );
|
71
|
+
// }
|
72
|
+
// //
|
73
|
+
// this._slots = this.range.enumurate(view).map(r => ({
|
74
|
+
// date: r.date,
|
75
|
+
// tooltip: r.format()
|
76
|
+
// }));
|
77
|
+
// }
|
78
|
+
// }
|
23
79
|
class MXCalendarBaseComponent extends classes(MXBaseComponent) {
|
24
80
|
interface = 'calendar';
|
25
81
|
cellTemplate;
|
26
82
|
cellClass;
|
27
83
|
showNavigation = true;
|
84
|
+
count = 1;
|
28
85
|
onSlotClick = new EventEmitter();
|
29
86
|
onNavigate = new EventEmitter();
|
30
87
|
activeViewChange = new EventEmitter();
|
31
|
-
_activeView = '
|
88
|
+
_activeView = 'day';
|
32
89
|
get activeView() {
|
33
90
|
return this._activeView;
|
34
91
|
}
|
@@ -56,7 +113,7 @@ class MXCalendarBaseComponent extends classes(MXBaseComponent) {
|
|
56
113
|
});
|
57
114
|
}
|
58
115
|
depthChange = new EventEmitter();
|
59
|
-
_depth = '
|
116
|
+
_depth = 'day';
|
60
117
|
get depth() {
|
61
118
|
return this._depth;
|
62
119
|
}
|
@@ -129,116 +186,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImpor
|
|
129
186
|
type: Input
|
130
187
|
}], showNavigation: [{
|
131
188
|
type: Input
|
132
|
-
}],
|
133
|
-
type: Output
|
134
|
-
}], onNavigate: [{
|
135
|
-
type: Output
|
136
|
-
}], activeViewChange: [{
|
137
|
-
type: Output
|
138
|
-
}], activeView: [{
|
139
|
-
type: Input
|
140
|
-
}], typeChange: [{
|
141
|
-
type: Output
|
142
|
-
}], type: [{
|
143
|
-
type: Input
|
144
|
-
}], depthChange: [{
|
145
|
-
type: Output
|
146
|
-
}], depth: [{
|
147
|
-
type: Input
|
148
|
-
}], minChange: [{
|
149
|
-
type: Output
|
150
|
-
}], min: [{
|
151
|
-
type: Input
|
152
|
-
}], maxChange: [{
|
153
|
-
type: Output
|
154
|
-
}], max: [{
|
155
|
-
type: Input
|
156
|
-
}], disabledDatesChange: [{
|
157
|
-
type: Output
|
158
|
-
}], disabledDates: [{
|
159
|
-
type: Input
|
160
|
-
}], holidayDatesChange: [{
|
161
|
-
type: Output
|
162
|
-
}], holidayDates: [{
|
189
|
+
}], count: [{
|
163
190
|
type: Input
|
164
|
-
}]
|
165
|
-
class AXCalendarBaseComponent extends AXBaseComponent {
|
166
|
-
constructor(elementRef, cdr) {
|
167
|
-
super(elementRef, cdr);
|
168
|
-
}
|
169
|
-
onSlotClick = new EventEmitter();
|
170
|
-
onNavigate = new EventEmitter();
|
171
|
-
activeViewChange = new EventEmitter();
|
172
|
-
_activeView = 'days';
|
173
|
-
get activeView() {
|
174
|
-
return this._activeView;
|
175
|
-
}
|
176
|
-
set activeView(v) {
|
177
|
-
this._setOption({ name: 'activeView', value: v });
|
178
|
-
}
|
179
|
-
typeChange = new EventEmitter();
|
180
|
-
_type = AXConfig.get(`dateTime.calendar`);
|
181
|
-
get type() {
|
182
|
-
return this._type || AXConfig.get(`dateTime.calendar`);
|
183
|
-
}
|
184
|
-
set type(v) {
|
185
|
-
this._setOption({
|
186
|
-
name: 'type',
|
187
|
-
value: v
|
188
|
-
});
|
189
|
-
}
|
190
|
-
depthChange = new EventEmitter();
|
191
|
-
_depth = 'days';
|
192
|
-
get depth() {
|
193
|
-
return this._depth;
|
194
|
-
}
|
195
|
-
set depth(v) {
|
196
|
-
this._setOption({
|
197
|
-
name: 'depth',
|
198
|
-
value: v,
|
199
|
-
beforeCallback: () => {
|
200
|
-
this._activeView = v;
|
201
|
-
}
|
202
|
-
});
|
203
|
-
}
|
204
|
-
minChange = new EventEmitter();
|
205
|
-
_min;
|
206
|
-
get min() {
|
207
|
-
return this._min;
|
208
|
-
}
|
209
|
-
set min(v) {
|
210
|
-
this._setOption({ name: 'min', value: v });
|
211
|
-
}
|
212
|
-
maxChange = new EventEmitter();
|
213
|
-
_max;
|
214
|
-
get max() {
|
215
|
-
return this._max;
|
216
|
-
}
|
217
|
-
set max(v) {
|
218
|
-
this._setOption({ name: 'max', value: v });
|
219
|
-
}
|
220
|
-
disabledDatesChange = new EventEmitter();
|
221
|
-
_disabledDates;
|
222
|
-
get disabledDates() {
|
223
|
-
return this._disabledDates;
|
224
|
-
}
|
225
|
-
set disabledDates(v) {
|
226
|
-
this._setOption({ name: 'disabledDates', value: v });
|
227
|
-
}
|
228
|
-
holidayDatesChange = new EventEmitter();
|
229
|
-
_holidayDates;
|
230
|
-
get holidayDates() {
|
231
|
-
return this._holidayDates;
|
232
|
-
}
|
233
|
-
set holidayDates(v) {
|
234
|
-
this._setOption({ name: 'holidayDates', value: v });
|
235
|
-
}
|
236
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AXCalendarBaseComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Injectable });
|
237
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AXCalendarBaseComponent });
|
238
|
-
}
|
239
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AXCalendarBaseComponent, decorators: [{
|
240
|
-
type: Injectable
|
241
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { onSlotClick: [{
|
191
|
+
}], onSlotClick: [{
|
242
192
|
type: Output
|
243
193
|
}], onNavigate: [{
|
244
194
|
type: Output
|
@@ -284,12 +234,11 @@ const CALENDAR_OUTPUTS = ['depthChange', 'typeChange', 'disabledDatesChange', 'h
|
|
284
234
|
|
285
235
|
class AXCalendarComponent extends classes((MXValueComponent), MXInteractiveComponent, MXCalendarBaseComponent) {
|
286
236
|
get displayRange() {
|
287
|
-
|
237
|
+
return new AXDateTimeRange(this.views[0].range.startTime, this.views[this.views.length - 1].range.endTime);
|
238
|
+
}
|
239
|
+
_setDisplayRange(current) {
|
288
240
|
switch (this.activeView) {
|
289
|
-
case '
|
290
|
-
// let y = current.startOf('year').year;
|
291
|
-
// let min = y - 3;
|
292
|
-
// let max = min + 11;
|
241
|
+
case 'year':
|
293
242
|
let y = current.startOf('year').year;
|
294
243
|
let min = y - (y % 10);
|
295
244
|
let max = min + 9;
|
@@ -304,7 +253,7 @@ class AXCalendarComponent extends classes((MXValueComponent), MXInteractiveCompo
|
|
304
253
|
date: 28,
|
305
254
|
calendar: this._viewStartDate.calendar.name(),
|
306
255
|
}));
|
307
|
-
case '
|
256
|
+
case 'month':
|
308
257
|
return new AXDateTimeRange(current.startOf('year'), current.endOf('year').add('day', -1));
|
309
258
|
default:
|
310
259
|
return new AXDateTimeRange(current.startOf('month'), current.endOf('month'));
|
@@ -312,9 +261,12 @@ class AXCalendarComponent extends classes((MXValueComponent), MXInteractiveCompo
|
|
312
261
|
}
|
313
262
|
_today = new AXDateTime(new Date(), this.type);
|
314
263
|
_viewStartDate;
|
315
|
-
|
316
|
-
|
317
|
-
|
264
|
+
_footPrint = {
|
265
|
+
year: null,
|
266
|
+
month: null,
|
267
|
+
day: null,
|
268
|
+
};
|
269
|
+
views = [];
|
318
270
|
_dayNames = [];
|
319
271
|
_initValues() {
|
320
272
|
this._today = new AXDateTime(new Date(), this.type);
|
@@ -324,18 +276,23 @@ class AXCalendarComponent extends classes((MXValueComponent), MXInteractiveCompo
|
|
324
276
|
this._initValues();
|
325
277
|
this.navTo(this.value || this._today);
|
326
278
|
}
|
327
|
-
|
328
|
-
super
|
279
|
+
constructor() {
|
280
|
+
super();
|
329
281
|
this.onValueChanged.subscribe(this._handleOnValueChanged.bind(this));
|
330
282
|
this.onOptionChanged.subscribe(this._handleOnOptionChanged.bind(this));
|
283
|
+
}
|
284
|
+
ngOnInit() {
|
285
|
+
super.ngOnInit();
|
331
286
|
this._initValues();
|
332
|
-
|
287
|
+
}
|
288
|
+
ngAfterViewInit() {
|
289
|
+
if (!this.value) {
|
333
290
|
this.goToday();
|
291
|
+
}
|
334
292
|
}
|
335
293
|
render() {
|
336
294
|
if (!this._viewStartDate)
|
337
295
|
return;
|
338
|
-
const vr = this.displayRange;
|
339
296
|
const applyCellClass = (slot, cellClass = this.cellClass) => {
|
340
297
|
switch (typeof cellClass) {
|
341
298
|
case 'string':
|
@@ -349,116 +306,143 @@ class AXCalendarComponent extends classes((MXValueComponent), MXInteractiveCompo
|
|
349
306
|
break;
|
350
307
|
}
|
351
308
|
};
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
|
381
|
-
|
382
|
-
};
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
};
|
413
|
-
}
|
414
|
-
else {
|
415
|
-
r.cssClass = {
|
416
|
-
'ax-state-today': r.today,
|
417
|
-
'ax-state-selected': r.selected,
|
418
|
-
'ax-state-other': d.year != this._viewStartDate.year,
|
419
|
-
};
|
420
|
-
}
|
421
|
-
applyCellClass(r);
|
422
|
-
return r;
|
423
|
-
});
|
424
|
-
this._navText = this._viewStartDate.format('YYYY');
|
425
|
-
this._todayText = this._today.format('MMMM YYYY');
|
426
|
-
}
|
427
|
-
// day view
|
428
|
-
else {
|
429
|
-
const a = vr.enumurate('day');
|
430
|
-
this._slots = a.map((d, i) => {
|
431
|
-
const r = {};
|
432
|
-
r.date = d.date;
|
433
|
-
r.text = d.dayOfMonth;
|
434
|
-
r.tooltip = d.format();
|
435
|
-
r.today = d.equal(this._today, 'day');
|
436
|
-
r.selected = this.value && d.equal(this.value, 'day');
|
437
|
-
r.holiday = this.isHoliday(d) || this.isWeekend(d);
|
438
|
-
r.disabled =
|
439
|
-
(this.min && d.compare(this.min, 'day') == -1) ||
|
440
|
-
(this.max && d.compare(this.max, 'day') == 1) ||
|
441
|
-
this.isDisabled(d);
|
442
|
-
//
|
443
|
-
if (r.disabled) {
|
444
|
-
r.cssClass = {
|
445
|
-
'ax-state-disabled': true,
|
446
|
-
};
|
447
|
-
}
|
448
|
-
else {
|
449
|
-
r.cssClass = {
|
450
|
-
'ax-state-today': r.today,
|
451
|
-
'ax-state-selected': r.selected,
|
452
|
-
'ax-state-holiday': r.holiday
|
453
|
-
};
|
454
|
-
}
|
455
|
-
r.cssClass[`ax-col-start-${vr.startTime.dayOfWeek}`] = i == 0;
|
456
|
-
if (this.cellClass)
|
309
|
+
debugger;
|
310
|
+
this.views = [];
|
311
|
+
for (let i = 0; i < this.count; i++) {
|
312
|
+
let unit = 'month';
|
313
|
+
let value = i;
|
314
|
+
//
|
315
|
+
if (this.activeView == 'day') {
|
316
|
+
unit = 'month';
|
317
|
+
value = i;
|
318
|
+
}
|
319
|
+
else if (this.activeView == 'month') {
|
320
|
+
unit = 'year';
|
321
|
+
value = i;
|
322
|
+
}
|
323
|
+
else {
|
324
|
+
unit = 'year';
|
325
|
+
value = i * 10;
|
326
|
+
}
|
327
|
+
//
|
328
|
+
const current = this._viewStartDate.add(unit, value);
|
329
|
+
const view = {
|
330
|
+
range: this._setDisplayRange(current),
|
331
|
+
slots: []
|
332
|
+
};
|
333
|
+
this.views.push(view);
|
334
|
+
//
|
335
|
+
// year view
|
336
|
+
if (this.activeView == 'year') {
|
337
|
+
const a = view.range.enumurate('year');
|
338
|
+
view.slots = a.map((d, i) => {
|
339
|
+
const r = {};
|
340
|
+
r.date = d.date;
|
341
|
+
//
|
342
|
+
r.text = d.format('YYYY');
|
343
|
+
r.tooltip = d.format('YYYY');
|
344
|
+
//
|
345
|
+
r.today = d.equal(this._today, 'year');
|
346
|
+
//
|
347
|
+
r.selected =
|
348
|
+
this.value && this.depth == 'year' &&
|
349
|
+
d.equal(this.value, 'year');
|
350
|
+
//
|
351
|
+
const focused = d.year == this._footPrint.year;
|
352
|
+
//
|
353
|
+
r.disabled =
|
354
|
+
(this.min && d.compare(this.min, 'year') == -1) ||
|
355
|
+
(this.max && d.compare(this.max, 'year') == 1);
|
356
|
+
//
|
357
|
+
if (r.disabled) {
|
358
|
+
r.cssClass = {
|
359
|
+
'ax-state-disabled': r.disabled,
|
360
|
+
};
|
361
|
+
}
|
362
|
+
else {
|
363
|
+
r.cssClass = {
|
364
|
+
'ax-state-today': r.today,
|
365
|
+
'ax-state-selected': r.selected,
|
366
|
+
'ax-state-focused': focused,
|
367
|
+
};
|
368
|
+
}
|
457
369
|
applyCellClass(r);
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
370
|
+
return r;
|
371
|
+
});
|
372
|
+
}
|
373
|
+
// month view
|
374
|
+
else if (this.activeView == 'month') {
|
375
|
+
const a = view.range.enumurate('month');
|
376
|
+
view.slots = a.map((d, i) => {
|
377
|
+
const r = {};
|
378
|
+
r.date = d.date;
|
379
|
+
r.text = d.format('MMM');
|
380
|
+
r.tooltip = d.format('MMMM YYYY');
|
381
|
+
r.today = d.equal(this._today, 'month');
|
382
|
+
//
|
383
|
+
r.disabled =
|
384
|
+
(this.min && d.compare(this.min, 'month') == -1) ||
|
385
|
+
(this.max && d.compare(this.max, 'month') == 1);
|
386
|
+
//
|
387
|
+
r.selected =
|
388
|
+
this.value && this.depth == 'month' &&
|
389
|
+
d.equal(this.value, 'month');
|
390
|
+
//
|
391
|
+
const focused = d.monthOfYear == this._footPrint.month && d.year == this._footPrint.year;
|
392
|
+
//
|
393
|
+
if (r.disabled) {
|
394
|
+
r.cssClass = {
|
395
|
+
'ax-state-disabled': r.disabled,
|
396
|
+
};
|
397
|
+
}
|
398
|
+
else {
|
399
|
+
r.cssClass = {
|
400
|
+
'ax-state-today': r.today,
|
401
|
+
'ax-state-selected': r.selected,
|
402
|
+
'ax-state-focused': focused,
|
403
|
+
};
|
404
|
+
}
|
405
|
+
applyCellClass(r);
|
406
|
+
return r;
|
407
|
+
});
|
408
|
+
}
|
409
|
+
// day view
|
410
|
+
else {
|
411
|
+
const a = view.range.enumurate('day');
|
412
|
+
view.slots = a.map((d, i) => {
|
413
|
+
const r = {};
|
414
|
+
r.date = d.date;
|
415
|
+
r.text = d.dayOfMonth;
|
416
|
+
r.tooltip = d.format();
|
417
|
+
r.today = d.equal(this._today, 'day');
|
418
|
+
r.selected = this.value && d.equal(this.value, 'day');
|
419
|
+
r.holiday = this.isHoliday(d) || this.isWeekend(d);
|
420
|
+
r.disabled =
|
421
|
+
(this.min && d.compare(this.min, 'day') == -1) ||
|
422
|
+
(this.max && d.compare(this.max, 'day') == 1) ||
|
423
|
+
this.isDisabled(d);
|
424
|
+
//
|
425
|
+
const focused = d.dayOfMonth == this._footPrint.day && d.monthOfYear == this._footPrint.month && d.year == this._footPrint.year;
|
426
|
+
//
|
427
|
+
if (r.disabled) {
|
428
|
+
r.cssClass = {
|
429
|
+
'ax-state-disabled': true,
|
430
|
+
};
|
431
|
+
}
|
432
|
+
else {
|
433
|
+
r.cssClass = {
|
434
|
+
'ax-state-today': r.today,
|
435
|
+
'ax-state-selected': r.selected,
|
436
|
+
'ax-state-holiday': r.holiday,
|
437
|
+
'ax-state-focused': focused,
|
438
|
+
};
|
439
|
+
}
|
440
|
+
r.cssClass[`ax-col-start-${view.range.startTime.dayOfWeek}`] = i == 0;
|
441
|
+
if (this.cellClass)
|
442
|
+
applyCellClass(r);
|
443
|
+
return r;
|
444
|
+
});
|
445
|
+
}
|
462
446
|
}
|
463
447
|
this.cdr.markForCheck();
|
464
448
|
}
|
@@ -483,35 +467,38 @@ class AXCalendarComponent extends classes((MXValueComponent), MXInteractiveCompo
|
|
483
467
|
nativeEvent: e,
|
484
468
|
});
|
485
469
|
//
|
486
|
-
|
470
|
+
const val = new AXDateTime(slot.date, this.type);
|
471
|
+
if (this.activeView == 'day') {
|
487
472
|
this._setDate(slot.date);
|
488
473
|
}
|
489
|
-
else if (this.activeView == '
|
490
|
-
this.activeView = '
|
474
|
+
else if (this.activeView == 'month' && this.depth == 'day') {
|
475
|
+
this.activeView = 'day';
|
476
|
+
this._footPrint.month = val.monthOfYear;
|
491
477
|
this.navTo(slot.date);
|
492
478
|
}
|
493
|
-
else if (this.activeView == '
|
479
|
+
else if (this.activeView == 'month' && this.depth == 'month') {
|
494
480
|
this._setDate(slot.date);
|
495
481
|
}
|
496
|
-
else if (this.activeView == '
|
497
|
-
(this.depth == '
|
498
|
-
this.activeView = '
|
482
|
+
else if (this.activeView == 'year' &&
|
483
|
+
(this.depth == 'day' || this.depth == 'month')) {
|
484
|
+
this.activeView = 'month';
|
485
|
+
this._footPrint.year = val.year;
|
499
486
|
this.navTo(slot.date);
|
500
487
|
}
|
501
|
-
else if (this.activeView == '
|
488
|
+
else if (this.activeView == 'year' && this.depth == 'year') {
|
502
489
|
this._setDate(slot.date);
|
503
490
|
}
|
504
491
|
}
|
505
|
-
_handleNavClick(e) {
|
492
|
+
_handleNavClick(e, view) {
|
506
493
|
this.isUserInteraction = true;
|
507
|
-
this.
|
494
|
+
this.activeView = view;
|
508
495
|
this.isUserInteraction = false;
|
509
496
|
}
|
510
497
|
toggleView() {
|
511
|
-
if (this.activeView == '
|
512
|
-
this.activeView = '
|
513
|
-
else if (this.activeView == '
|
514
|
-
this.activeView = '
|
498
|
+
if (this.activeView == 'day')
|
499
|
+
this.activeView = 'month';
|
500
|
+
else if (this.activeView == 'month')
|
501
|
+
this.activeView = 'year';
|
515
502
|
}
|
516
503
|
_handleOnOptionChanged(e) {
|
517
504
|
if (e.name == 'depth' ||
|
@@ -525,7 +512,13 @@ class AXCalendarComponent extends classes((MXValueComponent), MXInteractiveCompo
|
|
525
512
|
}
|
526
513
|
}
|
527
514
|
_handleOnValueChanged(e) {
|
528
|
-
|
515
|
+
const val = new AXDateTime(e.value, this.type);
|
516
|
+
if (!this._viewStartDate || val.compare(this.displayRange.startTime, this.activeView) == -1 || val.compare(this.displayRange.endTime, this.activeView) == 1) {
|
517
|
+
this._viewStartDate = new AXDateTime(e.value, this.type);
|
518
|
+
}
|
519
|
+
this._footPrint.year = val.year;
|
520
|
+
this._footPrint.month = val.monthOfYear;
|
521
|
+
this._footPrint.day = val.dayOfMonth;
|
529
522
|
this.render();
|
530
523
|
}
|
531
524
|
_handleGoToday() {
|
@@ -548,27 +541,31 @@ class AXCalendarComponent extends classes((MXValueComponent), MXInteractiveCompo
|
|
548
541
|
}
|
549
542
|
_navNextPrev(prev) {
|
550
543
|
const sign = prev ? -1 : 1;
|
551
|
-
if (this.activeView == '
|
552
|
-
this.navTo(this._viewStartDate.add('month', sign * 1));
|
553
|
-
else if (this.activeView == '
|
554
|
-
this.navTo(this._viewStartDate.add('year', sign * 1));
|
544
|
+
if (this.activeView == 'day')
|
545
|
+
this.navTo(this._viewStartDate.add('month', sign * 1 * this.count));
|
546
|
+
else if (this.activeView == 'month')
|
547
|
+
this.navTo(this._viewStartDate.add('year', sign * 1 * this.count));
|
555
548
|
else
|
556
|
-
this.navTo(this._viewStartDate.add('year', sign * 10));
|
549
|
+
this.navTo(this._viewStartDate.add('year', sign * 10 * this.count));
|
557
550
|
}
|
558
551
|
goToday() {
|
559
552
|
this.navTo(this._today);
|
560
553
|
}
|
561
554
|
navTo(date) {
|
562
|
-
|
563
|
-
|
555
|
+
const val = AXDateTime.convert(date, this._today.calendar.name());
|
556
|
+
this._viewStartDate = val.startOf();
|
564
557
|
this.render();
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
558
|
+
//to make sure its rendred and displayRange is not null
|
559
|
+
if (this.views.length > 0) {
|
560
|
+
const vr = this.displayRange;
|
561
|
+
this.onNavigate.emit({
|
562
|
+
component: this,
|
563
|
+
isUserInteraction: this.isUserInteraction,
|
564
|
+
start: vr.startTime?.date,
|
565
|
+
end: vr.endTime?.date,
|
566
|
+
htmlElement: this.getHostElement(),
|
567
|
+
});
|
568
|
+
}
|
572
569
|
}
|
573
570
|
get __hostClass() {
|
574
571
|
const _classes = {
|
@@ -606,8 +603,8 @@ class AXCalendarComponent extends classes((MXValueComponent), MXInteractiveCompo
|
|
606
603
|
const weekend = AXConfig.get(`dateTime.calendars.${this.type}.weekend`);
|
607
604
|
return weekend.includes(date.dayOfWeek);
|
608
605
|
}
|
609
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AXCalendarComponent, deps:
|
610
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: AXCalendarComponent, selector: "ax-calendar", inputs: { rtl: "rtl", readonly: "readonly", value: "value", name: "name", disabled: "disabled", depth: "depth", activeView: "activeView", min: "min", max: "max", disabledDates: "disabledDates", holidayDates: "holidayDates", type: "type", cellTemplate: "cellTemplate", cellClass: "cellClass", showNavigation: "showNavigation" }, outputs: { onOptionChanged: "onOptionChanged", valueChange: "valueChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", depthChange: "depthChange", typeChange: "typeChange", activeViewChange: "activeViewChange", disabledDatesChange: "disabledDatesChange", holidayDatesChange: "holidayDatesChange", onNavigate: "onNavigate", onSlotClick: "onSlotClick" }, host: { properties: { "class": "this.__hostClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"interface === 'calendar'; else pickerTemplate\">\n <ng-container *ngIf=\"showNavigation\">\n <ng-content select=\"ax-header\"></ng-content>\n <div class=\"ax-calendar-header\">\n <div class=\"ax-calendar-header-info\">\n <ng-container *ngIf=\"activeView == 'days'; else elseTemplate\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button\" (click)=\"_handleNavClick($event)\">\n {{ _navText.split(' ')[1] }}\n </button>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button\" (click)=\"_handleNavClick($event)\">\n {{ _navText.split(' ')[0] }}\n </button>\n </ng-container>\n <ng-template #elseTemplate>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button\" (click)=\"_handleNavClick($event)\">\n {{ _navText }}\n </button>\n </ng-template>\n </div>\n <div class=\"ax-calendar-header-buttons\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handlePrevClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': !rtl,\n 'ax-icon-chevron-right': rtl\n }\"></i>\n </button>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handleNextClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': rtl,\n 'ax-icon-chevron-right': !rtl\n }\"></i>\n </button>\n </div>\n </div>\n </ng-container>\n <div class=\"ax-calendar-body\">\n <div [ngSwitch]=\"activeView\">\n <ng-container *ngSwitchCase=\"'years'\">\n <div class=\"ax-calendar-slots ax-calendar-slots-year\" [ngClass]=\"{'ax-default':!cellTemplate}\">\n <div tabindex=\"0\" *ngFor=\"let slot of _slots\" class=\"ax-calendar-slot\" [ngClass]=\"slot.cssClass\"\n (click)=\"_handleSlotClick($event, slot)\">\n <ng-container *ngIf=\"cellTemplate; else yearTpl\">\n <div >\n <ng-container *ngTemplateOutlet=\"cellTemplate;context: { $implicit: {slot:slot} }\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #yearTpl>\n <div [title]=\"slot.tooltip\" >\n {{ slot.text }}\n </div>\n </ng-template>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'months'\">\n <div class=\"ax-calendar-slots ax-calendar-slots-month\" [ngClass]=\"{'ax-default':!cellTemplate}\">\n <div tabindex=\"0\" *ngFor=\"let slot of _slots\" class=\"ax-calendar-slot\"\n [ngClass]=\"slot.cssClass\" (click)=\"_handleSlotClick($event, slot)\">\n <ng-container *ngIf=\"cellTemplate; else monthTpl\">\n <div >\n <ng-container *ngTemplateOutlet=\"cellTemplate;context: { $implicit: {slot:slot} }\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #monthTpl>\n <div [title]=\"slot.tooltip\" >\n {{ slot.text }}\n </div>\n </ng-template>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <div class=\"ax-calendar-week\">\n <div *ngFor=\"let d of _dayNames\">{{ d }}</div>\n </div>\n <div class=\"ax-calendar-slots ax-calendar-slots-day\" [ngClass]=\"{'ax-default':!cellTemplate}\">\n <ng-container *ngFor=\"let slot of _slots\">\n <div tabindex=\"0\" class=\"ax-calendar-slot\" [ngClass]=\"slot.cssClass\" \n (click)=\"_handleSlotClick($event, slot)\">\n <ng-container *ngIf=\"cellTemplate; else dayTpl\">\n <div >\n <ng-container *ngTemplateOutlet=\"cellTemplate;context: { $implicit: {slot:slot} }\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #dayTpl>\n <div [title]=\"slot.tooltip\" >\n {{ slot.text }}\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n <ng-content select=\"ax-footer\"></ng-content>\n</ng-container>\n<ng-template #pickerTemplate>\n <div class=\"ax-calendar-picker\">//TODO: picker</div>\n</ng-template>", styles: [".ax-dark ax-calendar{background:rgba(var(--ax-color-on-surface))}ax-calendar{display:block;background:rgba(var(--ax-color-surface));color:rgba(var(--ax-color-text-default));padding:.5rem;width:19rem}@media (max-width: 599px){ax-calendar{width:100%}}@media (min-width: 600px){ax-calendar{width:20rem}}@media (min-width: 1200px){ax-calendar{width:19rem}}@media (min-width: 1800px){ax-calendar{width:21rem}}ax-calendar.ax-state-disabled .ax-calendar-slots{opacity:.5;cursor:default}ax-calendar .ax-calendar-header{display:flex;justify-content:space-between;padding-top:.25rem;padding-left:.25rem;padding-right:.25rem}ax-calendar .ax-calendar-header .ax-calendar-header-info{font-weight:500}ax-calendar .ax-calendar-header .ax-calendar-header-buttons{display:flex}ax-calendar .ax-calendar-body{margin:.5rem}ax-calendar .ax-calendar-body .ax-calendar-slots{display:grid;gap:.25rem}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot{position:relative;display:flex;align-items:center;justify-content:center;text-align:center;font-size:.875rem;color:rgba(var(--ax-color-text-default));border-radius:var(--ax-rounded-border-default);cursor:pointer}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:before{content:\"\";padding-top:100%;float:left}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:after{content:\"\";display:block;clear:both}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:hover:not(ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:hover.ax-state-disabled,ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:hover.ax-state-selected,ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:hover.ax-state-today){background-color:rgba(var(--ax-color-primary-300));color:rgba(var(--ax-color-primary-fore))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:focus-visible:not(ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:focus-visible.ax-state-disabled,ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:focus-visible.ax-state-today){outline-width:2px;outline-style:solid;outline-color:rgba(var(--ax-color-primary-500))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:focus-visible.ax-state-disabled{outline-width:2px;outline-style:dashed}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-1{grid-column-start:1}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-2{grid-column-start:2}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-3{grid-column-start:3}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-4{grid-column-start:4}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-5{grid-column-start:5}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-6{grid-column-start:6}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-7{grid-column-start:7}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-other{opacity:.5}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-today{border-width:2px;border-style:solid;border-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-500))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-today:focus-visible{border-style:dashed;outline-color:transparent}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-selected{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-holiday{color:rgba(var(--ax-color-danger-500))}ax-calendar .ax-calendar-body .ax-calendar-slots.ax-calendar-slots-day{grid-template-columns:repeat(7,minmax(0,1fr))}ax-calendar .ax-calendar-body .ax-calendar-slots.ax-calendar-slots-year,ax-calendar .ax-calendar-body .ax-calendar-slots.ax-calendar-slots-month{grid-template-columns:repeat(4,minmax(0,1fr))}ax-calendar .ax-calendar-body .ax-calendar-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));margin-top:.5rem;margin-bottom:.5rem}ax-calendar .ax-calendar-body .ax-calendar-week>div{font-size:.875rem;text-align:center;position:relative;display:flex;align-items:center;justify-content:center;cursor:text;margin:.125rem}ax-calendar .ax-calendar-footer{display:flex;justify-content:center;align-items:center;margin-top:1.125rem}ax-calendar .ax-calendar-footer .ax-today-button{width:100%;height:var(--ax-size-default);padding:0 1rem;font-size:.875rem;text-align:center;display:block;background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore));border-radius:var(--ax-rounded-border-default);cursor:pointer}ax-calendar .ax-calendar-footer .ax-today-button.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-calendar .ax-calendar-footer .ax-today-button:is(ax-calendar .ax-calendar-footer .ax-today-button:hover):not(.ax-state-disabled){background-color:rgba(var(--ax-color-primary-400))}ax-calendar .ax-calendar-footer .ax-today-button:is(ax-calendar .ax-calendar-footer .ax-today-button:focus,ax-calendar .ax-calendar-footer .ax-today-button:focus-visible):not(.ax-state-disabled){outline-color:rgba(var(--ax-color-primary-600))}.ax-calendar-picker{display:flex;width:100%}.ax-calendar-picker ax-picker{flex:1 1 0%}.ax-overlay-pane ax-calendar{border-style:none}\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: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
606
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AXCalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
607
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: AXCalendarComponent, selector: "ax-calendar", inputs: { rtl: "rtl", readonly: "readonly", value: "value", name: "name", disabled: "disabled", depth: "depth", activeView: "activeView", min: "min", max: "max", disabledDates: "disabledDates", holidayDates: "holidayDates", type: "type", cellTemplate: "cellTemplate", cellClass: "cellClass", showNavigation: "showNavigation", count: "count" }, outputs: { onOptionChanged: "onOptionChanged", valueChange: "valueChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", depthChange: "depthChange", typeChange: "typeChange", activeViewChange: "activeViewChange", disabledDatesChange: "disabledDatesChange", holidayDatesChange: "holidayDatesChange", onNavigate: "onNavigate", onSlotClick: "onSlotClick", countChange: "countChange" }, host: { properties: { "class": "this.__hostClass" } }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"interface === 'calendar'; else pickerTemplate\">\n <ng-content select=\"ax-header\"></ng-content>\n <div class=\"ax-calendar-body\">\n <ng-container *ngFor=\"let v of views;let first = first;let last = last;\">\n <div [ngSwitch]=\"activeView\">\n <ng-container *ngSwitchCase=\"'year'\">\n <div class=\"ax-calendar-view-header\">\n <div class=\"ax-calendar-header-info\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-state-disabled\" (click)=\"_handleNavClick($event,'year')\">\n {{ v.range.startTime.format('YYYY') }} - {{ v.range.endTime.format('YYYY') }}\n </button>\n </div>\n <div class=\"ax-calendar-header-buttons\" *ngIf=\"last\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handlePrevClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': !rtl,\n 'ax-icon-chevron-right': rtl\n }\"></i>\n </button>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handleNextClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': rtl,\n 'ax-icon-chevron-right': !rtl\n }\"></i>\n </button>\n </div>\n </div>\n <div class=\"ax-calendar-slots ax-calendar-slots-year\" [ngClass]=\"{'ax-default':!cellTemplate}\">\n <div tabindex=\"0\" *ngFor=\"let slot of v.slots\" class=\"ax-calendar-slot\" [ngClass]=\"slot.cssClass\"\n (click)=\"_handleSlotClick($event, slot)\">\n <ng-container *ngIf=\"cellTemplate; else yearTpl\">\n <div>\n <ng-container *ngTemplateOutlet=\"cellTemplate;context: { $implicit: {slot:slot} }\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #yearTpl>\n <div [title]=\"slot.tooltip\">\n {{ slot.text }}\n </div>\n </ng-template>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'month'\">\n <div class=\"ax-calendar-view-header\">\n <div class=\"ax-calendar-header-info\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button\" (click)=\"_handleNavClick($event,'year')\">\n {{ v.range.startTime.format('YYYY') }}\n </button>\n </div>\n <div class=\"ax-calendar-header-buttons\" *ngIf=\"last\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handlePrevClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': !rtl,\n 'ax-icon-chevron-right': rtl\n }\"></i>\n </button>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handleNextClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': rtl,\n 'ax-icon-chevron-right': !rtl\n }\"></i>\n </button>\n </div>\n </div>\n <div class=\"ax-calendar-slots ax-calendar-slots-month\" [ngClass]=\"{'ax-default':!cellTemplate}\">\n <div tabindex=\"0\" *ngFor=\"let slot of v.slots\" class=\"ax-calendar-slot\" [ngClass]=\"slot.cssClass\"\n (click)=\"_handleSlotClick($event, slot)\">\n <ng-container *ngIf=\"cellTemplate; else monthTpl\">\n <div>\n <ng-container *ngTemplateOutlet=\"cellTemplate;context: { $implicit: {slot:slot} }\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #monthTpl>\n <div [title]=\"slot.tooltip\">\n {{ slot.text }}\n </div>\n </ng-template>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <div class=\"ax-calendar-view-header\">\n <div class=\"ax-calendar-header-info\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button\" (click)=\"_handleNavClick($event,'year')\">\n {{ v.range.startTime.format('YYYY') }}\n </button>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button\" (click)=\"_handleNavClick($event,'month')\">\n {{ v.range.startTime.format('MMM') }}\n </button>\n </div>\n <div class=\"ax-calendar-header-buttons\" *ngIf=\"last\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handlePrevClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': !rtl,\n 'ax-icon-chevron-right': rtl\n }\"></i>\n </button>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handleNextClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': rtl,\n 'ax-icon-chevron-right': !rtl\n }\"></i>\n </button>\n </div>\n </div>\n <div class=\"ax-calendar-week\">\n <div *ngFor=\"let d of _dayNames\">{{ d }}</div>\n </div>\n <div class=\"ax-calendar-slots ax-calendar-slots-day\" [ngClass]=\"{'ax-default':!cellTemplate}\">\n <ng-container *ngFor=\"let slot of v.slots\">\n <div tabindex=\"0\" class=\"ax-calendar-slot\" [ngClass]=\"slot.cssClass\"\n (click)=\"_handleSlotClick($event, slot)\">\n <ng-container *ngIf=\"cellTemplate; else dayTpl\">\n <div>\n <ng-container *ngTemplateOutlet=\"cellTemplate;context: { $implicit: {slot:slot} }\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #dayTpl>\n <div [title]=\"slot.tooltip\">\n {{ slot.text }}\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n <ng-content select=\"ax-footer\"></ng-content>\n</ng-container>\n<ng-template #pickerTemplate>\n <div class=\"ax-calendar-picker\">//TODO: picker</div>\n</ng-template>", styles: [".ax-dark ax-calendar{background:rgba(var(--ax-color-on-surface))}ax-calendar{display:block;background:rgba(var(--ax-color-surface));color:rgba(var(--ax-color-text-default));width:max-content}@media (max-width: 599px){ax-calendar{width:100%}}ax-calendar.ax-state-disabled .ax-calendar-slots{opacity:.5;cursor:default}ax-calendar .ax-calendar-header{display:flex;justify-content:space-between;padding-top:.25rem;padding-left:.25rem;padding-right:.25rem}ax-calendar .ax-calendar-header .ax-calendar-header-info{font-weight:500}ax-calendar .ax-calendar-header .ax-calendar-header-buttons{display:flex}ax-calendar .ax-calendar-body{display:flex;flex-direction:row}ax-calendar .ax-calendar-body>div{flex:1}@media (max-width: 599px){ax-calendar .ax-calendar-body>div{width:100%}}@media (min-width: 600px){ax-calendar .ax-calendar-body>div{width:20rem}}@media (min-width: 1200px){ax-calendar .ax-calendar-body>div{width:19rem}}@media (min-width: 1800px){ax-calendar .ax-calendar-body>div{width:21rem}}ax-calendar .ax-calendar-body .ax-calendar-view-header{display:flex;justify-content:space-between;padding:.5rem;border-bottom:1px solid;border-bottom-color:rgba(var(--ax-color-border-default))}ax-calendar .ax-calendar-body .ax-calendar-view-header .ax-calendar-header-info{font-weight:500}ax-calendar .ax-calendar-body .ax-calendar-view-header .ax-calendar-header-buttons{display:flex}ax-calendar .ax-calendar-body .ax-calendar-slots{display:grid;gap:.25rem;padding:.5rem}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot{position:relative;display:flex;align-items:center;justify-content:center;text-align:center;font-size:.875rem;color:rgba(var(--ax-color-text-default));border-radius:var(--ax-rounded-border-default);cursor:pointer}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:before{content:\"\";padding-top:100%;float:left}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:after{content:\"\";display:block;clear:both}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:hover:not(ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:hover.ax-state-disabled,ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:hover.ax-state-selected){background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:focus-visible:not(ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:focus-visible.ax-state-disabled){outline-width:2px;outline-style:solid;outline-color:rgba(var(--ax-color-primary-500))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:focus-visible.ax-state-disabled{outline-width:2px;outline-style:dashed}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-1{grid-column-start:1}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-2{grid-column-start:2}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-3{grid-column-start:3}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-4{grid-column-start:4}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-5{grid-column-start:5}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-6{grid-column-start:6}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-7{grid-column-start:7}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-other{opacity:.5}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-today{color:rgba(var(--ax-color-primary-500));border-width:1px;border-style:solid;border-color:rgba(var(--ax-color-primary-200))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-focused{border-width:1px;border-style:solid;border-color:rgba(var(--ax-color-border-default))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-selected{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-holiday{color:rgba(var(--ax-color-danger-500))}ax-calendar .ax-calendar-body .ax-calendar-slots.ax-calendar-slots-day{grid-template-columns:repeat(7,minmax(0,1fr))}ax-calendar .ax-calendar-body .ax-calendar-slots.ax-calendar-slots-year,ax-calendar .ax-calendar-body .ax-calendar-slots.ax-calendar-slots-month{grid-template-columns:repeat(4,minmax(0,1fr))}ax-calendar .ax-calendar-body .ax-calendar-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));padding:.5rem}ax-calendar .ax-calendar-body .ax-calendar-week>div{font-size:.875rem;text-align:center;position:relative;display:flex;align-items:center;justify-content:center;cursor:text;margin:.125rem}@media (max-width: 599px){ax-calendar .ax-calendar-body{flex-direction:column}}@media (min-width: 600px){ax-calendar .ax-calendar-body{flex-direction:column}}@media (min-width: 1200px){ax-calendar .ax-calendar-body{flex-direction:row}}@media (min-width: 1800px){ax-calendar .ax-calendar-body{flex-direction:row}}ax-calendar .ax-calendar-footer{display:flex;justify-content:center;align-items:center;margin-top:1.125rem}ax-calendar .ax-calendar-footer .ax-today-button{width:100%;height:var(--ax-size-default);padding:0 1rem;font-size:.875rem;text-align:center;display:block;background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore));border-radius:var(--ax-rounded-border-default);cursor:pointer}ax-calendar .ax-calendar-footer .ax-today-button.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-calendar .ax-calendar-footer .ax-today-button:is(ax-calendar .ax-calendar-footer .ax-today-button:hover):not(.ax-state-disabled){background-color:rgba(var(--ax-color-primary-400))}ax-calendar .ax-calendar-footer .ax-today-button:is(ax-calendar .ax-calendar-footer .ax-today-button:focus,ax-calendar .ax-calendar-footer .ax-today-button:focus-visible):not(.ax-state-disabled){outline-color:rgba(var(--ax-color-primary-600))}.ax-calendar-picker{display:flex;width:100%}.ax-calendar-picker ax-picker{flex:1 1 0%}.ax-overlay-pane ax-calendar{border-style:none}\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: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
611
608
|
}
|
612
609
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AXCalendarComponent, decorators: [{
|
613
610
|
type: Component,
|
@@ -626,7 +623,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImpor
|
|
626
623
|
'type',
|
627
624
|
'cellTemplate',
|
628
625
|
'cellClass',
|
629
|
-
'showNavigation'
|
626
|
+
'showNavigation',
|
627
|
+
'count'
|
630
628
|
], outputs: [
|
631
629
|
'onOptionChanged',
|
632
630
|
'valueChange',
|
@@ -639,9 +637,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImpor
|
|
639
637
|
'disabledDatesChange',
|
640
638
|
'holidayDatesChange',
|
641
639
|
'onNavigate',
|
642
|
-
'onSlotClick'
|
643
|
-
], template: "<ng-container *ngIf=\"interface === 'calendar'; else pickerTemplate\">\n <ng-container *ngIf=\"showNavigation\">\n <ng-content select=\"ax-header\"></ng-content>\n <div class=\"ax-calendar-header\">\n <div class=\"ax-calendar-header-info\">\n <ng-container *ngIf=\"activeView == 'days'; else elseTemplate\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button\" (click)=\"_handleNavClick($event)\">\n {{ _navText.split(' ')[1] }}\n </button>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button\" (click)=\"_handleNavClick($event)\">\n {{ _navText.split(' ')[0] }}\n </button>\n </ng-container>\n <ng-template #elseTemplate>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button\" (click)=\"_handleNavClick($event)\">\n {{ _navText }}\n </button>\n </ng-template>\n </div>\n <div class=\"ax-calendar-header-buttons\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handlePrevClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': !rtl,\n 'ax-icon-chevron-right': rtl\n }\"></i>\n </button>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handleNextClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': rtl,\n 'ax-icon-chevron-right': !rtl\n }\"></i>\n </button>\n </div>\n </div>\n </ng-container>\n <div class=\"ax-calendar-body\">\n <div [ngSwitch]=\"activeView\">\n <ng-container *ngSwitchCase=\"'years'\">\n <div class=\"ax-calendar-slots ax-calendar-slots-year\" [ngClass]=\"{'ax-default':!cellTemplate}\">\n <div tabindex=\"0\" *ngFor=\"let slot of _slots\" class=\"ax-calendar-slot\" [ngClass]=\"slot.cssClass\"\n (click)=\"_handleSlotClick($event, slot)\">\n <ng-container *ngIf=\"cellTemplate; else yearTpl\">\n <div >\n <ng-container *ngTemplateOutlet=\"cellTemplate;context: { $implicit: {slot:slot} }\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #yearTpl>\n <div [title]=\"slot.tooltip\" >\n {{ slot.text }}\n </div>\n </ng-template>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'months'\">\n <div class=\"ax-calendar-slots ax-calendar-slots-month\" [ngClass]=\"{'ax-default':!cellTemplate}\">\n <div tabindex=\"0\" *ngFor=\"let slot of _slots\" class=\"ax-calendar-slot\"\n [ngClass]=\"slot.cssClass\" (click)=\"_handleSlotClick($event, slot)\">\n <ng-container *ngIf=\"cellTemplate; else monthTpl\">\n <div >\n <ng-container *ngTemplateOutlet=\"cellTemplate;context: { $implicit: {slot:slot} }\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #monthTpl>\n <div [title]=\"slot.tooltip\" >\n {{ slot.text }}\n </div>\n </ng-template>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <div class=\"ax-calendar-week\">\n <div *ngFor=\"let d of _dayNames\">{{ d }}</div>\n </div>\n <div class=\"ax-calendar-slots ax-calendar-slots-day\" [ngClass]=\"{'ax-default':!cellTemplate}\">\n <ng-container *ngFor=\"let slot of _slots\">\n <div tabindex=\"0\" class=\"ax-calendar-slot\" [ngClass]=\"slot.cssClass\" \n (click)=\"_handleSlotClick($event, slot)\">\n <ng-container *ngIf=\"cellTemplate; else dayTpl\">\n <div >\n <ng-container *ngTemplateOutlet=\"cellTemplate;context: { $implicit: {slot:slot} }\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #dayTpl>\n <div [title]=\"slot.tooltip\" >\n {{ slot.text }}\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </div>\n <ng-content select=\"ax-footer\"></ng-content>\n</ng-container>\n<ng-template #pickerTemplate>\n <div class=\"ax-calendar-picker\">//TODO: picker</div>\n</ng-template>", styles: [".ax-dark ax-calendar{background:rgba(var(--ax-color-on-surface))}ax-calendar{display:block;background:rgba(var(--ax-color-surface));color:rgba(var(--ax-color-text-default));padding:.5rem;width:19rem}@media (max-width: 599px){ax-calendar{width:100%}}@media (min-width: 600px){ax-calendar{width:20rem}}@media (min-width: 1200px){ax-calendar{width:19rem}}@media (min-width: 1800px){ax-calendar{width:21rem}}ax-calendar.ax-state-disabled .ax-calendar-slots{opacity:.5;cursor:default}ax-calendar .ax-calendar-header{display:flex;justify-content:space-between;padding-top:.25rem;padding-left:.25rem;padding-right:.25rem}ax-calendar .ax-calendar-header .ax-calendar-header-info{font-weight:500}ax-calendar .ax-calendar-header .ax-calendar-header-buttons{display:flex}ax-calendar .ax-calendar-body{margin:.5rem}ax-calendar .ax-calendar-body .ax-calendar-slots{display:grid;gap:.25rem}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot{position:relative;display:flex;align-items:center;justify-content:center;text-align:center;font-size:.875rem;color:rgba(var(--ax-color-text-default));border-radius:var(--ax-rounded-border-default);cursor:pointer}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:before{content:\"\";padding-top:100%;float:left}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:after{content:\"\";display:block;clear:both}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:hover:not(ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:hover.ax-state-disabled,ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:hover.ax-state-selected,ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:hover.ax-state-today){background-color:rgba(var(--ax-color-primary-300));color:rgba(var(--ax-color-primary-fore))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:focus-visible:not(ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:focus-visible.ax-state-disabled,ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:focus-visible.ax-state-today){outline-width:2px;outline-style:solid;outline-color:rgba(var(--ax-color-primary-500))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:focus-visible.ax-state-disabled{outline-width:2px;outline-style:dashed}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-1{grid-column-start:1}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-2{grid-column-start:2}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-3{grid-column-start:3}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-4{grid-column-start:4}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-5{grid-column-start:5}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-6{grid-column-start:6}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-7{grid-column-start:7}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-other{opacity:.5}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-today{border-width:2px;border-style:solid;border-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-500))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-today:focus-visible{border-style:dashed;outline-color:transparent}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-selected{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-holiday{color:rgba(var(--ax-color-danger-500))}ax-calendar .ax-calendar-body .ax-calendar-slots.ax-calendar-slots-day{grid-template-columns:repeat(7,minmax(0,1fr))}ax-calendar .ax-calendar-body .ax-calendar-slots.ax-calendar-slots-year,ax-calendar .ax-calendar-body .ax-calendar-slots.ax-calendar-slots-month{grid-template-columns:repeat(4,minmax(0,1fr))}ax-calendar .ax-calendar-body .ax-calendar-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));margin-top:.5rem;margin-bottom:.5rem}ax-calendar .ax-calendar-body .ax-calendar-week>div{font-size:.875rem;text-align:center;position:relative;display:flex;align-items:center;justify-content:center;cursor:text;margin:.125rem}ax-calendar .ax-calendar-footer{display:flex;justify-content:center;align-items:center;margin-top:1.125rem}ax-calendar .ax-calendar-footer .ax-today-button{width:100%;height:var(--ax-size-default);padding:0 1rem;font-size:.875rem;text-align:center;display:block;background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore));border-radius:var(--ax-rounded-border-default);cursor:pointer}ax-calendar .ax-calendar-footer .ax-today-button.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-calendar .ax-calendar-footer .ax-today-button:is(ax-calendar .ax-calendar-footer .ax-today-button:hover):not(.ax-state-disabled){background-color:rgba(var(--ax-color-primary-400))}ax-calendar .ax-calendar-footer .ax-today-button:is(ax-calendar .ax-calendar-footer .ax-today-button:focus,ax-calendar .ax-calendar-footer .ax-today-button:focus-visible):not(.ax-state-disabled){outline-color:rgba(var(--ax-color-primary-600))}.ax-calendar-picker{display:flex;width:100%}.ax-calendar-picker ax-picker{flex:1 1 0%}.ax-overlay-pane ax-calendar{border-style:none}\n"] }]
|
644
|
-
}], propDecorators: { __hostClass: [{
|
640
|
+
'onSlotClick',
|
641
|
+
'countChange'
|
642
|
+
], template: "<ng-container *ngIf=\"interface === 'calendar'; else pickerTemplate\">\n <ng-content select=\"ax-header\"></ng-content>\n <div class=\"ax-calendar-body\">\n <ng-container *ngFor=\"let v of views;let first = first;let last = last;\">\n <div [ngSwitch]=\"activeView\">\n <ng-container *ngSwitchCase=\"'year'\">\n <div class=\"ax-calendar-view-header\">\n <div class=\"ax-calendar-header-info\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-state-disabled\" (click)=\"_handleNavClick($event,'year')\">\n {{ v.range.startTime.format('YYYY') }} - {{ v.range.endTime.format('YYYY') }}\n </button>\n </div>\n <div class=\"ax-calendar-header-buttons\" *ngIf=\"last\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handlePrevClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': !rtl,\n 'ax-icon-chevron-right': rtl\n }\"></i>\n </button>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handleNextClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': rtl,\n 'ax-icon-chevron-right': !rtl\n }\"></i>\n </button>\n </div>\n </div>\n <div class=\"ax-calendar-slots ax-calendar-slots-year\" [ngClass]=\"{'ax-default':!cellTemplate}\">\n <div tabindex=\"0\" *ngFor=\"let slot of v.slots\" class=\"ax-calendar-slot\" [ngClass]=\"slot.cssClass\"\n (click)=\"_handleSlotClick($event, slot)\">\n <ng-container *ngIf=\"cellTemplate; else yearTpl\">\n <div>\n <ng-container *ngTemplateOutlet=\"cellTemplate;context: { $implicit: {slot:slot} }\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #yearTpl>\n <div [title]=\"slot.tooltip\">\n {{ slot.text }}\n </div>\n </ng-template>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchCase=\"'month'\">\n <div class=\"ax-calendar-view-header\">\n <div class=\"ax-calendar-header-info\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button\" (click)=\"_handleNavClick($event,'year')\">\n {{ v.range.startTime.format('YYYY') }}\n </button>\n </div>\n <div class=\"ax-calendar-header-buttons\" *ngIf=\"last\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handlePrevClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': !rtl,\n 'ax-icon-chevron-right': rtl\n }\"></i>\n </button>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handleNextClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': rtl,\n 'ax-icon-chevron-right': !rtl\n }\"></i>\n </button>\n </div>\n </div>\n <div class=\"ax-calendar-slots ax-calendar-slots-month\" [ngClass]=\"{'ax-default':!cellTemplate}\">\n <div tabindex=\"0\" *ngFor=\"let slot of v.slots\" class=\"ax-calendar-slot\" [ngClass]=\"slot.cssClass\"\n (click)=\"_handleSlotClick($event, slot)\">\n <ng-container *ngIf=\"cellTemplate; else monthTpl\">\n <div>\n <ng-container *ngTemplateOutlet=\"cellTemplate;context: { $implicit: {slot:slot} }\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #monthTpl>\n <div [title]=\"slot.tooltip\">\n {{ slot.text }}\n </div>\n </ng-template>\n </div>\n </div>\n </ng-container>\n <ng-container *ngSwitchDefault>\n <div class=\"ax-calendar-view-header\">\n <div class=\"ax-calendar-header-info\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button\" (click)=\"_handleNavClick($event,'year')\">\n {{ v.range.startTime.format('YYYY') }}\n </button>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button\" (click)=\"_handleNavClick($event,'month')\">\n {{ v.range.startTime.format('MMM') }}\n </button>\n </div>\n <div class=\"ax-calendar-header-buttons\" *ngIf=\"last\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handlePrevClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': !rtl,\n 'ax-icon-chevron-right': rtl\n }\"></i>\n </button>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"_handleNextClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': rtl,\n 'ax-icon-chevron-right': !rtl\n }\"></i>\n </button>\n </div>\n </div>\n <div class=\"ax-calendar-week\">\n <div *ngFor=\"let d of _dayNames\">{{ d }}</div>\n </div>\n <div class=\"ax-calendar-slots ax-calendar-slots-day\" [ngClass]=\"{'ax-default':!cellTemplate}\">\n <ng-container *ngFor=\"let slot of v.slots\">\n <div tabindex=\"0\" class=\"ax-calendar-slot\" [ngClass]=\"slot.cssClass\"\n (click)=\"_handleSlotClick($event, slot)\">\n <ng-container *ngIf=\"cellTemplate; else dayTpl\">\n <div>\n <ng-container *ngTemplateOutlet=\"cellTemplate;context: { $implicit: {slot:slot} }\">\n </ng-container>\n </div>\n </ng-container>\n <ng-template #dayTpl>\n <div [title]=\"slot.tooltip\">\n {{ slot.text }}\n </div>\n </ng-template>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n </ng-container>\n </div>\n <ng-content select=\"ax-footer\"></ng-content>\n</ng-container>\n<ng-template #pickerTemplate>\n <div class=\"ax-calendar-picker\">//TODO: picker</div>\n</ng-template>", styles: [".ax-dark ax-calendar{background:rgba(var(--ax-color-on-surface))}ax-calendar{display:block;background:rgba(var(--ax-color-surface));color:rgba(var(--ax-color-text-default));width:max-content}@media (max-width: 599px){ax-calendar{width:100%}}ax-calendar.ax-state-disabled .ax-calendar-slots{opacity:.5;cursor:default}ax-calendar .ax-calendar-header{display:flex;justify-content:space-between;padding-top:.25rem;padding-left:.25rem;padding-right:.25rem}ax-calendar .ax-calendar-header .ax-calendar-header-info{font-weight:500}ax-calendar .ax-calendar-header .ax-calendar-header-buttons{display:flex}ax-calendar .ax-calendar-body{display:flex;flex-direction:row}ax-calendar .ax-calendar-body>div{flex:1}@media (max-width: 599px){ax-calendar .ax-calendar-body>div{width:100%}}@media (min-width: 600px){ax-calendar .ax-calendar-body>div{width:20rem}}@media (min-width: 1200px){ax-calendar .ax-calendar-body>div{width:19rem}}@media (min-width: 1800px){ax-calendar .ax-calendar-body>div{width:21rem}}ax-calendar .ax-calendar-body .ax-calendar-view-header{display:flex;justify-content:space-between;padding:.5rem;border-bottom:1px solid;border-bottom-color:rgba(var(--ax-color-border-default))}ax-calendar .ax-calendar-body .ax-calendar-view-header .ax-calendar-header-info{font-weight:500}ax-calendar .ax-calendar-body .ax-calendar-view-header .ax-calendar-header-buttons{display:flex}ax-calendar .ax-calendar-body .ax-calendar-slots{display:grid;gap:.25rem;padding:.5rem}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot{position:relative;display:flex;align-items:center;justify-content:center;text-align:center;font-size:.875rem;color:rgba(var(--ax-color-text-default));border-radius:var(--ax-rounded-border-default);cursor:pointer}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:before{content:\"\";padding-top:100%;float:left}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:after{content:\"\";display:block;clear:both}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:hover:not(ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:hover.ax-state-disabled,ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:hover.ax-state-selected){background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:focus-visible:not(ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:focus-visible.ax-state-disabled){outline-width:2px;outline-style:solid;outline-color:rgba(var(--ax-color-primary-500))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot:focus-visible.ax-state-disabled{outline-width:2px;outline-style:dashed}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-disabled{cursor:not-allowed;opacity:.5}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-1{grid-column-start:1}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-2{grid-column-start:2}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-3{grid-column-start:3}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-4{grid-column-start:4}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-5{grid-column-start:5}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-6{grid-column-start:6}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-col-start-7{grid-column-start:7}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-other{opacity:.5}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-today{color:rgba(var(--ax-color-primary-500));border-width:1px;border-style:solid;border-color:rgba(var(--ax-color-primary-200))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-focused{border-width:1px;border-style:solid;border-color:rgba(var(--ax-color-border-default))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-selected{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-state-holiday{color:rgba(var(--ax-color-danger-500))}ax-calendar .ax-calendar-body .ax-calendar-slots.ax-calendar-slots-day{grid-template-columns:repeat(7,minmax(0,1fr))}ax-calendar .ax-calendar-body .ax-calendar-slots.ax-calendar-slots-year,ax-calendar .ax-calendar-body .ax-calendar-slots.ax-calendar-slots-month{grid-template-columns:repeat(4,minmax(0,1fr))}ax-calendar .ax-calendar-body .ax-calendar-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));padding:.5rem}ax-calendar .ax-calendar-body .ax-calendar-week>div{font-size:.875rem;text-align:center;position:relative;display:flex;align-items:center;justify-content:center;cursor:text;margin:.125rem}@media (max-width: 599px){ax-calendar .ax-calendar-body{flex-direction:column}}@media (min-width: 600px){ax-calendar .ax-calendar-body{flex-direction:column}}@media (min-width: 1200px){ax-calendar .ax-calendar-body{flex-direction:row}}@media (min-width: 1800px){ax-calendar .ax-calendar-body{flex-direction:row}}ax-calendar .ax-calendar-footer{display:flex;justify-content:center;align-items:center;margin-top:1.125rem}ax-calendar .ax-calendar-footer .ax-today-button{width:100%;height:var(--ax-size-default);padding:0 1rem;font-size:.875rem;text-align:center;display:block;background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore));border-radius:var(--ax-rounded-border-default);cursor:pointer}ax-calendar .ax-calendar-footer .ax-today-button.ax-state-disabled{opacity:.5;cursor:not-allowed}ax-calendar .ax-calendar-footer .ax-today-button:is(ax-calendar .ax-calendar-footer .ax-today-button:hover):not(.ax-state-disabled){background-color:rgba(var(--ax-color-primary-400))}ax-calendar .ax-calendar-footer .ax-today-button:is(ax-calendar .ax-calendar-footer .ax-today-button:focus,ax-calendar .ax-calendar-footer .ax-today-button:focus-visible):not(.ax-state-disabled){outline-color:rgba(var(--ax-color-primary-600))}.ax-calendar-picker{display:flex;width:100%}.ax-calendar-picker ax-picker{flex:1 1 0%}.ax-overlay-pane ax-calendar{border-style:none}\n"] }]
|
643
|
+
}], ctorParameters: function () { return []; }, propDecorators: { __hostClass: [{
|
645
644
|
type: HostBinding,
|
646
645
|
args: ['class']
|
647
646
|
}] } });
|
@@ -697,20 +696,20 @@ class AXCalendarRangeComponent extends classes((MXValueComponent), MXInteractive
|
|
697
696
|
handlePrevClick() {
|
698
697
|
const view = this._c1.activeView;
|
699
698
|
const d1 = this._c1.displayRange.startTime;
|
700
|
-
if (view == '
|
699
|
+
if (view == 'day' || view == 'month') {
|
701
700
|
this._c1.prev();
|
702
701
|
}
|
703
|
-
else if (view == '
|
702
|
+
else if (view == 'year') {
|
704
703
|
this._c1.navTo(d1.add('year', -20));
|
705
704
|
}
|
706
705
|
}
|
707
706
|
handleNextClick() {
|
708
707
|
const view = this._c1.activeView;
|
709
708
|
const d1 = this._c1.displayRange.startTime;
|
710
|
-
if (view == '
|
709
|
+
if (view == 'day' || view == 'month') {
|
711
710
|
this._c1.next();
|
712
711
|
}
|
713
|
-
else if (view == '
|
712
|
+
else if (view == 'year') {
|
714
713
|
this._c1.navTo(d1.add('year', 20));
|
715
714
|
}
|
716
715
|
}
|
@@ -720,15 +719,15 @@ class AXCalendarRangeComponent extends classes((MXValueComponent), MXInteractive
|
|
720
719
|
_syncNavText() {
|
721
720
|
const view = this._c1.activeView;
|
722
721
|
const d1 = this._c1.displayRange.startTime;
|
723
|
-
if (view == '
|
722
|
+
if (view == 'day') {
|
724
723
|
const d2 = this._c2.displayRange.endTime;
|
725
724
|
this._navText = `${d1.format('MMM yyyy')} - ${d2.format('MMM yyyy')}`;
|
726
725
|
}
|
727
|
-
else if (view == '
|
726
|
+
else if (view == 'month') {
|
728
727
|
const d2 = this._c2.displayRange.endTime;
|
729
728
|
this._navText = `${d1.format('yyyy')} - ${d2.format('yyyy')}`;
|
730
729
|
}
|
731
|
-
else if (view == '
|
730
|
+
else if (view == 'year') {
|
732
731
|
const d2 = this._c2.displayRange.endTime;
|
733
732
|
this._navText = `${d1.format('yyyy')} - ${d2.format('yyyy')}`;
|
734
733
|
}
|
@@ -748,28 +747,28 @@ class AXCalendarRangeComponent extends classes((MXValueComponent), MXInteractive
|
|
748
747
|
_syncNav1() {
|
749
748
|
const view = (this._c2.activeView = this._c1.activeView);
|
750
749
|
const range = this._c1.displayRange;
|
751
|
-
if (view == '
|
750
|
+
if (view == 'day') {
|
752
751
|
this._c2.navTo(range.startTime.add('month', 1));
|
753
752
|
}
|
754
|
-
else if (view == '
|
753
|
+
else if (view == 'month') {
|
755
754
|
this._c2.navTo(range.startTime.add('year', 1));
|
756
755
|
}
|
757
|
-
else if (view == '
|
756
|
+
else if (view == 'year') {
|
758
757
|
this._c2.navTo(range.endTime.add('year', 4));
|
759
758
|
}
|
760
759
|
this._syncNavText();
|
761
760
|
}
|
762
761
|
_syncNav2(e) {
|
763
762
|
const view = this._c2.activeView;
|
764
|
-
if (view == '
|
763
|
+
if (view == 'month') {
|
765
764
|
this._c1.navTo(e.add('month', -1));
|
766
765
|
}
|
767
|
-
else if (view == '
|
766
|
+
else if (view == 'year') {
|
768
767
|
this._c1.navTo(e.startOf('year'));
|
769
768
|
}
|
770
769
|
}
|
771
770
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AXCalendarRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
772
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: AXCalendarRangeComponent, selector: "ax-calendar-range", inputs: { rtl: "rtl", readonly: "readonly", value: "value", name: "name", disabled: "disabled", depth: "depth", activeView: "activeView", min: "min", max: "max", disabledDates: "disabledDates", holidayDates: "holidayDates", type: "type", cellTemplate: "cellTemplate", cellClass: "cellClass", showNavigation: "showNavigation" }, outputs: { onOptionChanged: "onOptionChanged", valueChange: "valueChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", depthChange: "depthChange", typeChange: "typeChange", activeViewChange: "activeViewChange", disabledDatesChange: "disabledDatesChange", holidayDatesChange: "holidayDatesChange", onNavigate: "onNavigate", onSlotClick: "onSlotClick" }, viewQueries: [{ propertyName: "_c1", first: true, predicate: ["c1"], descendants: true, static: true }, { propertyName: "_c2", first: true, predicate: ["c2"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-calendar-range-header\">\n <ng-content></ng-content>\n <div class=\"ax-calendar-header-range-info\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button\" (click)=\"handleNavClick()\">\n {{ _navText }}\n </button>\n </div>\n <div class=\"ax-calendar-header-range-buttons\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"handlePrevClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': !rtl,\n 'ax-icon-chevron-right': rtl\n }\"></i>\n </button>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"handleNextClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': rtl,\n 'ax-icon-chevron-right': !rtl\n }\"></i>\n </button>\n </div>\n</div>\n<div class=\"ax-calendar-range-body\">\n <ax-calendar #c1 style=\"width: 50%;\" [showNavigation]=\"false\" [cellClass]=\"getCellClass\" [type]=\"type\"\n [cellTemplate]=\"cellTemplate\" [min]=\"min\" [max]=\"max\" [readonly]=\"true\" [depth]=\"depth\" (onSlotClick)=\"handleSlotClick($event)\"\n (onNavigate)=\"handleNavigate()\" (activeViewChange)=\"handleActiveViewChange1()\">\n </ax-calendar>\n <ax-calendar #c2 style=\"width: 50%;\" [showNavigation]=\"false\" [cellClass]=\"getCellClass\" [type]=\"type\"\n [cellTemplate]=\"cellTemplate\" [min]=\"min\" [max]=\"max\" [readonly]=\"true\" [depth]=\"depth\" (onSlotClick)=\"handleSlotClick($event)\"\n (activeViewChange)=\"handleActiveViewChange2()\">\n </ax-calendar>\n</div>", styles: [".ax-dark ax-calendar-range{background:rgba(var(--ax-color-on-surface))}.ax-dark ax-calendar-range ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-range-between{background-color:rgba(var(--ax-color-primary-800));color:rgba(var(--ax-color-primary-fore))}ax-calendar-range{background:rgba(var(--ax-color-surface));color:rgba(var(--ax-color-text-default));padding:.5rem}ax-calendar-range .ax-calendar-range-header{display:flex;justify-content:space-between;padding-top:.25rem;padding-left:.25rem;padding-right:.25rem}ax-calendar-range .ax-calendar-range-header .ax-calendar-header-range-info{font-weight:500}ax-calendar-range .ax-calendar-range-header .ax-calendar-header-range-buttons{display:flex}ax-calendar-range .ax-calendar-range-body{display:flex;flex-direction:row}ax-calendar-range ax-calendar{margin:0;padding:0}ax-calendar-range ax-calendar .ax-calendar-body{margin-top:0;padding-top:0}ax-calendar-range ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-range-between{background-color:rgba(var(--ax-color-primary-100));color:rgba(var(--ax-color-primary-500))}ax-calendar-range ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-range-start,ax-calendar-range ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-range-end{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AXCalendarComponent, selector: "ax-calendar", inputs: ["rtl", "readonly", "value", "name", "disabled", "depth", "activeView", "min", "max", "disabledDates", "holidayDates", "type", "cellTemplate", "cellClass", "showNavigation"], outputs: ["onOptionChanged", "valueChange", "onValueChanged", "onBlur", "onFocus", "depthChange", "typeChange", "activeViewChange", "disabledDatesChange", "holidayDatesChange", "onNavigate", "onSlotClick"] }], encapsulation: i0.ViewEncapsulation.None });
|
771
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.1", type: AXCalendarRangeComponent, selector: "ax-calendar-range", inputs: { rtl: "rtl", readonly: "readonly", value: "value", name: "name", disabled: "disabled", depth: "depth", activeView: "activeView", min: "min", max: "max", disabledDates: "disabledDates", holidayDates: "holidayDates", type: "type", cellTemplate: "cellTemplate", cellClass: "cellClass", showNavigation: "showNavigation" }, outputs: { onOptionChanged: "onOptionChanged", valueChange: "valueChange", onValueChanged: "onValueChanged", onBlur: "onBlur", onFocus: "onFocus", depthChange: "depthChange", typeChange: "typeChange", activeViewChange: "activeViewChange", disabledDatesChange: "disabledDatesChange", holidayDatesChange: "holidayDatesChange", onNavigate: "onNavigate", onSlotClick: "onSlotClick" }, viewQueries: [{ propertyName: "_c1", first: true, predicate: ["c1"], descendants: true, static: true }, { propertyName: "_c2", first: true, predicate: ["c2"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"ax-calendar-range-header\">\n <ng-content></ng-content>\n <div class=\"ax-calendar-header-range-info\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button\" (click)=\"handleNavClick()\">\n {{ _navText }}\n </button>\n </div>\n <div class=\"ax-calendar-header-range-buttons\">\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"handlePrevClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': !rtl,\n 'ax-icon-chevron-right': rtl\n }\"></i>\n </button>\n <button [attr.disabled]=\"disabled ? '' : null\" class=\"ax-general-button ax-button-icon\"\n (click)=\"handleNextClick()\">\n <i class=\"ax-icon\" [ngClass]=\"{\n 'ax-icon-chevron-left': rtl,\n 'ax-icon-chevron-right': !rtl\n }\"></i>\n </button>\n </div>\n</div>\n<div class=\"ax-calendar-range-body\">\n <ax-calendar #c1 style=\"width: 50%;\" [showNavigation]=\"false\" [cellClass]=\"getCellClass\" [type]=\"type\"\n [cellTemplate]=\"cellTemplate\" [min]=\"min\" [max]=\"max\" [readonly]=\"true\" [depth]=\"depth\" (onSlotClick)=\"handleSlotClick($event)\"\n (onNavigate)=\"handleNavigate()\" (activeViewChange)=\"handleActiveViewChange1()\">\n </ax-calendar>\n <ax-calendar #c2 style=\"width: 50%;\" [showNavigation]=\"false\" [cellClass]=\"getCellClass\" [type]=\"type\"\n [cellTemplate]=\"cellTemplate\" [min]=\"min\" [max]=\"max\" [readonly]=\"true\" [depth]=\"depth\" (onSlotClick)=\"handleSlotClick($event)\"\n (activeViewChange)=\"handleActiveViewChange2()\">\n </ax-calendar>\n</div>", styles: [".ax-dark ax-calendar-range{background:rgba(var(--ax-color-on-surface))}.ax-dark ax-calendar-range ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-range-between{background-color:rgba(var(--ax-color-primary-800));color:rgba(var(--ax-color-primary-fore))}ax-calendar-range{background:rgba(var(--ax-color-surface));color:rgba(var(--ax-color-text-default));padding:.5rem}ax-calendar-range .ax-calendar-range-header{display:flex;justify-content:space-between;padding-top:.25rem;padding-left:.25rem;padding-right:.25rem}ax-calendar-range .ax-calendar-range-header .ax-calendar-header-range-info{font-weight:500}ax-calendar-range .ax-calendar-range-header .ax-calendar-header-range-buttons{display:flex}ax-calendar-range .ax-calendar-range-body{display:flex;flex-direction:row}ax-calendar-range ax-calendar{margin:0;padding:0}ax-calendar-range ax-calendar .ax-calendar-body{margin-top:0;padding-top:0}ax-calendar-range ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-range-between{background-color:rgba(var(--ax-color-primary-100));color:rgba(var(--ax-color-primary-500))}ax-calendar-range ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-range-start,ax-calendar-range ax-calendar .ax-calendar-body .ax-calendar-slots .ax-calendar-slot.ax-range-end{background-color:rgba(var(--ax-color-primary-500));color:rgba(var(--ax-color-primary-fore))}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: AXCalendarComponent, selector: "ax-calendar", inputs: ["rtl", "readonly", "value", "name", "disabled", "depth", "activeView", "min", "max", "disabledDates", "holidayDates", "type", "cellTemplate", "cellClass", "showNavigation", "count"], outputs: ["onOptionChanged", "valueChange", "onValueChanged", "onBlur", "onFocus", "depthChange", "typeChange", "activeViewChange", "disabledDatesChange", "holidayDatesChange", "onNavigate", "onSlotClick", "countChange"] }], encapsulation: i0.ViewEncapsulation.None });
|
773
772
|
}
|
774
773
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImport: i0, type: AXCalendarRangeComponent, decorators: [{
|
775
774
|
type: Component,
|
@@ -832,5 +831,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.1", ngImpor
|
|
832
831
|
* Generated bundle index. Do not edit.
|
833
832
|
*/
|
834
833
|
|
835
|
-
export {
|
834
|
+
export { AXCalendarComponent, AXCalendarModule, AXCalendarNavigateEvent, AXCalendarRangeComponent, AXCalendarSlotClick, CALENDAR_INPUTS, CALENDAR_OUTPUTS, MXCalendarBaseComponent };
|
836
835
|
//# sourceMappingURL=acorex-components-calendar.mjs.map
|