forty-cdk 0.35.0 → 0.37.0
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/accordion/README.md +8 -8
- package/calendar/README.md +15 -12
- package/checkbox/README.md +4 -0
- package/combobox/README.md +30 -7
- package/context-menu/README.md +9 -3
- package/date-field/README.md +23 -14
- package/date-picker/README.md +47 -28
- package/dialog/README.md +1 -1
- package/drawer/README.md +1 -1
- package/dropdown-menu/README.md +6 -1
- package/fesm2022/forty-cdk-calendar.mjs +96 -39
- package/fesm2022/forty-cdk-calendar.mjs.map +1 -1
- package/fesm2022/forty-cdk-combobox.mjs +54 -27
- package/fesm2022/forty-cdk-combobox.mjs.map +1 -1
- package/fesm2022/forty-cdk-context-menu.mjs +58 -12
- package/fesm2022/forty-cdk-context-menu.mjs.map +1 -1
- package/fesm2022/forty-cdk-core-overlay.mjs +164 -56
- package/fesm2022/forty-cdk-core-overlay.mjs.map +1 -1
- package/fesm2022/forty-cdk-core.mjs +123 -17
- package/fesm2022/forty-cdk-core.mjs.map +1 -1
- package/fesm2022/forty-cdk-date-field.mjs.map +1 -1
- package/fesm2022/forty-cdk-date-picker.mjs +6 -4
- package/fesm2022/forty-cdk-date-picker.mjs.map +1 -1
- package/fesm2022/forty-cdk-dialog.mjs +1 -1
- package/fesm2022/forty-cdk-dialog.mjs.map +1 -1
- package/fesm2022/forty-cdk-drawer.mjs +1 -1
- package/fesm2022/forty-cdk-drawer.mjs.map +1 -1
- package/fesm2022/forty-cdk-hover-card.mjs +5 -2
- package/fesm2022/forty-cdk-hover-card.mjs.map +1 -1
- package/fesm2022/forty-cdk-listbox.mjs +62 -18
- package/fesm2022/forty-cdk-listbox.mjs.map +1 -1
- package/fesm2022/forty-cdk-menu.mjs +23 -2
- package/fesm2022/forty-cdk-menu.mjs.map +1 -1
- package/fesm2022/forty-cdk-popover.mjs.map +1 -1
- package/fesm2022/forty-cdk-search.mjs +16 -1
- package/fesm2022/forty-cdk-search.mjs.map +1 -1
- package/fesm2022/forty-cdk-select.mjs +6 -4
- package/fesm2022/forty-cdk-select.mjs.map +1 -1
- package/fesm2022/forty-cdk-table-virtualization.mjs +29 -9
- package/fesm2022/forty-cdk-table-virtualization.mjs.map +1 -1
- package/fesm2022/forty-cdk-table.mjs +89 -25
- package/fesm2022/forty-cdk-table.mjs.map +1 -1
- package/fesm2022/forty-cdk-time-field.mjs.map +1 -1
- package/fesm2022/forty-cdk-time-picker.mjs +43 -26
- package/fesm2022/forty-cdk-time-picker.mjs.map +1 -1
- package/fesm2022/forty-cdk-toast.mjs +26 -19
- package/fesm2022/forty-cdk-toast.mjs.map +1 -1
- package/fesm2022/forty-cdk-tooltip.mjs +12 -4
- package/fesm2022/forty-cdk-tooltip.mjs.map +1 -1
- package/fesm2022/forty-cdk-tree.mjs +51 -36
- package/fesm2022/forty-cdk-tree.mjs.map +1 -1
- package/fesm2022/forty-cdk-virtual-reorder.mjs +2 -16
- package/fesm2022/forty-cdk-virtual-reorder.mjs.map +1 -1
- package/fesm2022/forty-cdk-virtualization.mjs +7 -4
- package/fesm2022/forty-cdk-virtualization.mjs.map +1 -1
- package/hover-card/README.md +40 -13
- package/listbox/README.md +21 -13
- package/menu/README.md +7 -5
- package/menubar/README.md +6 -6
- package/navigation-menu/README.md +1 -1
- package/package.json +1 -1
- package/pane-resizer/README.md +1 -1
- package/popover/README.md +34 -31
- package/radio-group/README.md +5 -1
- package/scroll-area/README.md +1 -1
- package/search/README.md +12 -6
- package/select/README.md +24 -4
- package/table/README.md +24 -16
- package/table-virtualization/README.md +3 -1
- package/time-field/README.md +23 -14
- package/time-picker/README.md +54 -36
- package/toast/README.md +10 -8
- package/toggle/README.md +2 -2
- package/toolbar/README.md +1 -1
- package/tooltip/README.md +48 -22
- package/tree/README.md +2 -0
- package/types/forty-cdk-calendar.d.ts +90 -28
- package/types/forty-cdk-combobox.d.ts +40 -24
- package/types/forty-cdk-context-menu.d.ts +14 -1
- package/types/forty-cdk-core-overlay.d.ts +83 -33
- package/types/forty-cdk-core.d.ts +27 -9
- package/types/forty-cdk-date-field.d.ts +6 -4
- package/types/forty-cdk-date-picker.d.ts +8 -6
- package/types/forty-cdk-dialog.d.ts +12 -3
- package/types/forty-cdk-drawer.d.ts +12 -4
- package/types/forty-cdk-hover-card.d.ts +8 -0
- package/types/forty-cdk-listbox.d.ts +43 -15
- package/types/forty-cdk-menu.d.ts +3 -0
- package/types/forty-cdk-popover.d.ts +3 -3
- package/types/forty-cdk-search.d.ts +8 -1
- package/types/forty-cdk-select.d.ts +1 -0
- package/types/forty-cdk-table-virtualization.d.ts +4 -3
- package/types/forty-cdk-table.d.ts +89 -32
- package/types/forty-cdk-time-field.d.ts +6 -5
- package/types/forty-cdk-time-picker.d.ts +19 -4
- package/types/forty-cdk-toast.d.ts +17 -7
- package/types/forty-cdk-tooltip.d.ts +40 -23
- package/types/forty-cdk-virtualization.d.ts +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { Directive, ElementRef, InjectionToken, Injector, afterNextRender, booleanAttribute, computed, effect, inject, input, linkedSignal, model, numberAttribute, signal } from "@angular/core";
|
|
3
|
-
import { Collection, FOR_PICKER_SOURCE_HOST, IdGenerator, LiveAnnouncer, adoptHostId, assertInputBound, clampToBounds, compareDateOf, hostAriaLabel, hostButtonType, hostLabelledBy, injectDateAdapter, injectTextDirection, isUnset, orphanContextError, registerHandle, unsetInput } from "forty-cdk/core";
|
|
3
|
+
import { Collection, FOR_PICKER_SOURCE_HOST, IdGenerator, LiveAnnouncer, adoptHostId, assertInputBound, assertRootContext, clampToBounds, compareDateOf, hostAriaLabel, hostButtonType, hostLabelledBy, injectDateAdapter, injectTextDirection, isUnset, orphanContextError, registerHandle, unsetInput } from "forty-cdk/core";
|
|
4
4
|
import { FOR_CALENDAR_DEFAULTS, FOR_CALENDAR_DEFAULTS as FOR_CALENDAR_DEFAULTS$1, provideForCalendarDefaults } from "forty-cdk/defaults";
|
|
5
5
|
import { NativeDateAdapter, provideNativeDateAdapter } from "forty-cdk/date-adapter";
|
|
6
6
|
var CalendarBounds = class {
|
|
@@ -41,6 +41,9 @@ var CalendarBounds = class {
|
|
|
41
41
|
if (max !== null && compareDateOf(adapter, date, max) > 0) return true;
|
|
42
42
|
return this.#host.isDateUnavailable()(date);
|
|
43
43
|
}
|
|
44
|
+
contains(date) {
|
|
45
|
+
return !this.#outOfBounds(date, date);
|
|
46
|
+
}
|
|
44
47
|
clamp(date) {
|
|
45
48
|
const adapter = this.#host.adapter;
|
|
46
49
|
return clampToBounds(adapter, date, this.#host.min(), this.#host.max(), (a, b) => compareDateOf(adapter, a, b));
|
|
@@ -63,7 +66,15 @@ function injectCalendarContext(piece) {
|
|
|
63
66
|
root: "[forCalendar]",
|
|
64
67
|
token: "FOR_CALENDAR_CONTEXT"
|
|
65
68
|
});
|
|
66
|
-
|
|
69
|
+
const widened = ctx;
|
|
70
|
+
assertRootContext({
|
|
71
|
+
entryPoint: "calendar",
|
|
72
|
+
token: "FOR_CALENDAR_CONTEXT",
|
|
73
|
+
root: "[forCalendar]",
|
|
74
|
+
piece,
|
|
75
|
+
probe: () => widened.activateDate
|
|
76
|
+
});
|
|
77
|
+
return widened;
|
|
67
78
|
}
|
|
68
79
|
function buildMonthMatrix(adapter, monthAnchor, firstDayOfWeek) {
|
|
69
80
|
const firstOfMonth = adapter.createDate(adapter.getYear(monthAnchor), adapter.getMonth(monthAnchor), 1);
|
|
@@ -92,6 +103,13 @@ function resolveCalendarGridMove(event, rtl, moves) {
|
|
|
92
103
|
default: return null;
|
|
93
104
|
}
|
|
94
105
|
}
|
|
106
|
+
function calendarGridRowBounds(position, first, last, columns) {
|
|
107
|
+
const start = position - (position - first) % columns;
|
|
108
|
+
return {
|
|
109
|
+
start,
|
|
110
|
+
end: Math.min(start + columns - 1, last)
|
|
111
|
+
};
|
|
112
|
+
}
|
|
95
113
|
function isCalendarActivationKey(event) {
|
|
96
114
|
return event.key === "Enter" || event.key === " " || event.key === "Spacebar";
|
|
97
115
|
}
|
|
@@ -254,7 +272,7 @@ var CalendarMonthNavigator = class {
|
|
|
254
272
|
const target = this.#resolveMove(event, fromMonth);
|
|
255
273
|
if (target === null) return;
|
|
256
274
|
event.preventDefault();
|
|
257
|
-
this.#host.
|
|
275
|
+
this.#host.moveFocusedDate(this.#host.dateInMonth(target.year, target.month));
|
|
258
276
|
this.#host.scheduleFocus(() => this.focusCell(this.#host.visibleMonthNumber()));
|
|
259
277
|
}
|
|
260
278
|
register(handle) {
|
|
@@ -272,11 +290,12 @@ var CalendarMonthNavigator = class {
|
|
|
272
290
|
#resolveMove(event, fromMonth) {
|
|
273
291
|
const year = this.#host.visibleYear();
|
|
274
292
|
const base = year * 12 + (fromMonth - 1);
|
|
293
|
+
const row = calendarGridRowBounds(base, year * 12, year * 12 + 11, GRID_COLUMNS$1);
|
|
275
294
|
const index = resolveCalendarGridMove(event, this.#host.dir() === "rtl", {
|
|
276
295
|
horizontal: (step) => base + step,
|
|
277
296
|
vertical: (step) => base + step * GRID_COLUMNS$1,
|
|
278
|
-
lineStart: () =>
|
|
279
|
-
lineEnd: () =>
|
|
297
|
+
lineStart: () => row.start,
|
|
298
|
+
lineEnd: () => row.end,
|
|
280
299
|
pageBackward: () => base - 12,
|
|
281
300
|
pageForward: () => base + 12
|
|
282
301
|
});
|
|
@@ -320,17 +339,12 @@ var CalendarNavigation = class {
|
|
|
320
339
|
this.#cursor = new IntendedDayCursor(host.adapter, seed);
|
|
321
340
|
}
|
|
322
341
|
selectDate(date) {
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
this.#host.focusedDate.set(date);
|
|
328
|
-
this.#host.focusDayCell(date);
|
|
329
|
-
}
|
|
330
|
-
return;
|
|
331
|
-
}
|
|
342
|
+
this.#select(date);
|
|
343
|
+
}
|
|
344
|
+
activateDate(date) {
|
|
345
|
+
if (this.#host.disabled() || this.#select(date)) return;
|
|
332
346
|
this.#cursor.setFocusedDay(date);
|
|
333
|
-
this.#
|
|
347
|
+
this.#setFocusedDate(date);
|
|
334
348
|
this.#host.focusDayCell(date);
|
|
335
349
|
}
|
|
336
350
|
pageMonths(delta) {
|
|
@@ -345,7 +359,7 @@ var CalendarNavigation = class {
|
|
|
345
359
|
this.#pageTo(this.#host.adapter.createDate(year, month, 1));
|
|
346
360
|
}
|
|
347
361
|
applyDayKeyMove(target, isPaging) {
|
|
348
|
-
const
|
|
362
|
+
const previousPeriod = this.#host.periodLabel();
|
|
349
363
|
let next;
|
|
350
364
|
if (isPaging) {
|
|
351
365
|
this.#cursor.sync(this.#host.focusedDate());
|
|
@@ -355,9 +369,14 @@ var CalendarNavigation = class {
|
|
|
355
369
|
next = this.#host.bounds.clamp(target);
|
|
356
370
|
this.#cursor.setFocusedDay(next);
|
|
357
371
|
}
|
|
358
|
-
this.#
|
|
372
|
+
this.#setFocusedDate(next);
|
|
359
373
|
this.#host.focusDayCell(next);
|
|
360
|
-
this.#
|
|
374
|
+
this.#announcePeriodChange(previousPeriod);
|
|
375
|
+
}
|
|
376
|
+
moveFocusedDate(target) {
|
|
377
|
+
const previousPeriod = this.#host.periodLabel();
|
|
378
|
+
this.#setFocusedDate(this.#host.bounds.clamp(target));
|
|
379
|
+
this.#announcePeriodChange(previousPeriod);
|
|
361
380
|
}
|
|
362
381
|
dateInMonth(year, month) {
|
|
363
382
|
const adapter = this.#host.adapter;
|
|
@@ -365,16 +384,35 @@ var CalendarNavigation = class {
|
|
|
365
384
|
const day = Math.min(adapter.getDate(this.#host.focusedDate()), daysInMonth);
|
|
366
385
|
return adapter.createDate(year, month, day);
|
|
367
386
|
}
|
|
387
|
+
#select(date) {
|
|
388
|
+
if (this.#host.disabled() || this.#host.readonly() || this.#host.bounds.isUnavailable(date)) return false;
|
|
389
|
+
if (this.#host.selectionMode() === "range") {
|
|
390
|
+
if (!this.#host.range.select(date)) return false;
|
|
391
|
+
this.#cursor.setFocusedDay(date);
|
|
392
|
+
this.#setFocusedDate(date);
|
|
393
|
+
this.#host.focusDayCell(date);
|
|
394
|
+
return true;
|
|
395
|
+
}
|
|
396
|
+
this.#cursor.setFocusedDay(date);
|
|
397
|
+
this.#host.value.set(this.#withPreservedTime(date));
|
|
398
|
+
this.#host.focusDayCell(date);
|
|
399
|
+
return true;
|
|
400
|
+
}
|
|
401
|
+
#setFocusedDate(next) {
|
|
402
|
+
this.#host.range.clearHover();
|
|
403
|
+
this.#host.focusedDate.set(next);
|
|
404
|
+
}
|
|
368
405
|
#pageTo(target) {
|
|
369
|
-
const
|
|
406
|
+
const previousPeriod = this.#host.periodLabel();
|
|
370
407
|
this.#cursor.sync(this.#host.focusedDate());
|
|
371
408
|
const next = this.#host.bounds.clamp(this.#cursor.apply(target));
|
|
372
|
-
this.#
|
|
409
|
+
this.#setFocusedDate(next);
|
|
373
410
|
this.#cursor.markPaged(next);
|
|
374
|
-
this.#
|
|
411
|
+
this.#announcePeriodChange(previousPeriod);
|
|
375
412
|
}
|
|
376
|
-
#
|
|
377
|
-
|
|
413
|
+
#announcePeriodChange(previousPeriod) {
|
|
414
|
+
const period = this.#host.periodLabel();
|
|
415
|
+
if (period !== previousPeriod) this.#host.announce(period);
|
|
378
416
|
}
|
|
379
417
|
#withPreservedTime(date) {
|
|
380
418
|
const adapter = this.#host.adapter;
|
|
@@ -433,6 +471,9 @@ var CalendarRangeSelection = class {
|
|
|
433
471
|
if (!this.#host.active()) return;
|
|
434
472
|
this.#hovered.set(date);
|
|
435
473
|
}
|
|
474
|
+
clearHover() {
|
|
475
|
+
this.#hovered.set(null);
|
|
476
|
+
}
|
|
436
477
|
select(date) {
|
|
437
478
|
const adapter = this.#host.adapter;
|
|
438
479
|
const anchor = this.#anchor();
|
|
@@ -529,7 +570,7 @@ var CalendarYearNavigator = class {
|
|
|
529
570
|
const target = this.#resolveMove(event, fromYear);
|
|
530
571
|
if (target === null) return;
|
|
531
572
|
event.preventDefault();
|
|
532
|
-
this.#host.
|
|
573
|
+
this.#host.moveFocusedDate(this.#host.dateInMonth(target, this.#host.visibleMonthNumber()));
|
|
533
574
|
this.#host.scheduleFocus(() => this.focusCell(this.#host.visibleYear()));
|
|
534
575
|
}
|
|
535
576
|
register(handle) {
|
|
@@ -547,11 +588,12 @@ var CalendarYearNavigator = class {
|
|
|
547
588
|
#resolveMove(event, fromYear) {
|
|
548
589
|
const size = this.#host.yearBlockSize();
|
|
549
590
|
const start = this.#host.yearBlockStart();
|
|
591
|
+
const row = calendarGridRowBounds(fromYear, start, start + size - 1, GRID_COLUMNS);
|
|
550
592
|
return resolveCalendarGridMove(event, this.#host.dir() === "rtl", {
|
|
551
593
|
horizontal: (step) => fromYear + step,
|
|
552
594
|
vertical: (step) => fromYear + step * GRID_COLUMNS,
|
|
553
|
-
lineStart: () => start,
|
|
554
|
-
lineEnd: () =>
|
|
595
|
+
lineStart: () => row.start,
|
|
596
|
+
lineEnd: () => row.end,
|
|
555
597
|
pageBackward: () => fromYear - size,
|
|
556
598
|
pageForward: () => fromYear + size
|
|
557
599
|
});
|
|
@@ -606,7 +648,19 @@ var ForCalendar = class ForCalendar {
|
|
|
606
648
|
dir = injectTextDirection(this._dirInput);
|
|
607
649
|
locale = input(null, ...ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []);
|
|
608
650
|
#initialToday = this.adapter.today();
|
|
609
|
-
focusedDate = linkedSignal(
|
|
651
|
+
focusedDate = linkedSignal({
|
|
652
|
+
...ngDevMode ? { debugName: "focusedDate" } : /* istanbul ignore next */ {},
|
|
653
|
+
source: () => ({
|
|
654
|
+
value: this.value(),
|
|
655
|
+
range: this.range(),
|
|
656
|
+
min: this.min(),
|
|
657
|
+
max: this.max()
|
|
658
|
+
}),
|
|
659
|
+
computation: (source, previous) => {
|
|
660
|
+
if (previous !== void 0 && source.value === previous.source.value && source.range === previous.source.range && this.#bounds.contains(previous.value)) return previous.value;
|
|
661
|
+
return this.#seedDate();
|
|
662
|
+
}
|
|
663
|
+
});
|
|
610
664
|
#bounds = new CalendarBounds({
|
|
611
665
|
adapter: this.adapter,
|
|
612
666
|
min: this.min,
|
|
@@ -630,8 +684,7 @@ var ForCalendar = class ForCalendar {
|
|
|
630
684
|
selectionMode: this.selectionMode,
|
|
631
685
|
focusedDate: this.focusedDate,
|
|
632
686
|
value: this.value,
|
|
633
|
-
|
|
634
|
-
visibleMonthLabel: () => this.visibleMonthLabel(),
|
|
687
|
+
periodLabel: () => this.viewTriggerLabel(),
|
|
635
688
|
visibleYear: () => this.visibleYear(),
|
|
636
689
|
visibleMonthNumber: () => this.visibleMonthNumber(),
|
|
637
690
|
bounds: this.#bounds,
|
|
@@ -685,7 +738,6 @@ var ForCalendar = class ForCalendar {
|
|
|
685
738
|
isPreviousMonthDisabled: this.#bounds.isPreviousMonthDisabled,
|
|
686
739
|
isNextMonthDisabled: this.#bounds.isNextMonthDisabled,
|
|
687
740
|
isYearDisabled: (year) => this.#bounds.isYearDisabled(year),
|
|
688
|
-
clamp: (date) => this.#bounds.clamp(date),
|
|
689
741
|
today: () => this.adapter.today()
|
|
690
742
|
};
|
|
691
743
|
}
|
|
@@ -693,7 +745,7 @@ var ForCalendar = class ForCalendar {
|
|
|
693
745
|
return {
|
|
694
746
|
value: () => this.value(),
|
|
695
747
|
pageByYears: (step) => this.#nav.pageByYears(step),
|
|
696
|
-
|
|
748
|
+
moveFocusedDate: (date) => this.#nav.moveFocusedDate(date),
|
|
697
749
|
dateInMonth: (year, month) => this.#nav.dateInMonth(year, month),
|
|
698
750
|
scheduleFocus: (fn) => this.#scheduleFocus(fn)
|
|
699
751
|
};
|
|
@@ -804,6 +856,9 @@ var ForCalendar = class ForCalendar {
|
|
|
804
856
|
selectDate(date) {
|
|
805
857
|
this.#nav.selectDate(date);
|
|
806
858
|
}
|
|
859
|
+
activateDate(date) {
|
|
860
|
+
this.#nav.activateDate(date);
|
|
861
|
+
}
|
|
807
862
|
pageMonths(delta) {
|
|
808
863
|
this.#nav.pageMonths(delta);
|
|
809
864
|
}
|
|
@@ -831,12 +886,12 @@ var ForCalendar = class ForCalendar {
|
|
|
831
886
|
if (next) this.view.set(next);
|
|
832
887
|
}
|
|
833
888
|
selectMonth(month) {
|
|
834
|
-
if (this.disabled() || this.
|
|
889
|
+
if (this.disabled() || this.isMonthDisabled(month)) return;
|
|
835
890
|
this.goToMonth(month);
|
|
836
891
|
this.view.set("day");
|
|
837
892
|
}
|
|
838
893
|
selectYear(year) {
|
|
839
|
-
if (this.disabled() || this.
|
|
894
|
+
if (this.disabled() || this.isYearDisabled(year)) return;
|
|
840
895
|
this.goToYear(year);
|
|
841
896
|
this.view.set("month");
|
|
842
897
|
}
|
|
@@ -1217,7 +1272,8 @@ var ForCalendarGrid = class ForCalendarGrid {
|
|
|
1217
1272
|
attributes: { "role": "grid" },
|
|
1218
1273
|
properties: {
|
|
1219
1274
|
"attr.aria-disabled": "ctx.disabled() ? \"true\" : null",
|
|
1220
|
-
"attr.aria-readonly": "ctx.readonly() ? \"true\" : null"
|
|
1275
|
+
"attr.aria-readonly": "ctx.readonly() ? \"true\" : null",
|
|
1276
|
+
"attr.aria-multiselectable": "ctx.selectionMode() === \"range\" ? \"true\" : null"
|
|
1221
1277
|
}
|
|
1222
1278
|
},
|
|
1223
1279
|
exportAs: ["forCalendarGrid"],
|
|
@@ -1237,7 +1293,8 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1237
1293
|
host: {
|
|
1238
1294
|
role: "grid",
|
|
1239
1295
|
"[attr.aria-disabled]": "ctx.disabled() ? \"true\" : null",
|
|
1240
|
-
"[attr.aria-readonly]": "ctx.readonly() ? \"true\" : null"
|
|
1296
|
+
"[attr.aria-readonly]": "ctx.readonly() ? \"true\" : null",
|
|
1297
|
+
"[attr.aria-multiselectable]": "ctx.selectionMode() === \"range\" ? \"true\" : null"
|
|
1241
1298
|
}
|
|
1242
1299
|
}]
|
|
1243
1300
|
}]
|
|
@@ -1306,7 +1363,7 @@ var ForCalendarCell = class ForCalendarCell {
|
|
|
1306
1363
|
}
|
|
1307
1364
|
onClick() {
|
|
1308
1365
|
const date = this.date();
|
|
1309
|
-
if (!isUnset(date)) this.ctx.
|
|
1366
|
+
if (!isUnset(date)) this.ctx.activateDate(date);
|
|
1310
1367
|
}
|
|
1311
1368
|
onKeyDown(event) {
|
|
1312
1369
|
const date = this.date();
|
|
@@ -1411,7 +1468,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
1411
1468
|
});
|
|
1412
1469
|
var ForCalendarHeading = class ForCalendarHeading {
|
|
1413
1470
|
ctx = injectCalendarContext("ForCalendarHeading");
|
|
1414
|
-
label = this.ctx.
|
|
1471
|
+
label = this.ctx.viewTriggerLabel;
|
|
1415
1472
|
constructor() {
|
|
1416
1473
|
this.ctx.adoptHeadingId(inject(ElementRef).nativeElement);
|
|
1417
1474
|
}
|
|
@@ -1649,7 +1706,7 @@ var ForCalendarMonthCell = class ForCalendarMonthCell {
|
|
|
1649
1706
|
selected = computed(() => this.#bound((v) => this.ctx.isMonthSelected(v)), ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
|
|
1650
1707
|
today = computed(() => this.#bound((v) => this.ctx.isMonthToday(v)), ...ngDevMode ? [{ debugName: "today" }] : /* istanbul ignore next */ []);
|
|
1651
1708
|
focused = computed(() => this.#bound((v) => this.ctx.isMonthFocused(v)), ...ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []);
|
|
1652
|
-
disabled = computed(() => this.#bound((v) => this.ctx.isMonthDisabled(v)), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
1709
|
+
disabled = computed(() => this.ctx.disabled() || this.#bound((v) => this.ctx.isMonthDisabled(v)), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
1653
1710
|
constructor() {
|
|
1654
1711
|
assertInputBound(this.month, "calendar", "[forCalendarMonthCell]", "month");
|
|
1655
1712
|
const handle = {
|
|
@@ -1801,7 +1858,7 @@ var ForCalendarYearCell = class ForCalendarYearCell {
|
|
|
1801
1858
|
selected = computed(() => this.#bound((v) => this.ctx.isYearSelected(v)), ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
|
|
1802
1859
|
today = computed(() => this.#bound((v) => this.ctx.isYearToday(v)), ...ngDevMode ? [{ debugName: "today" }] : /* istanbul ignore next */ []);
|
|
1803
1860
|
focused = computed(() => this.#bound((v) => this.ctx.isYearFocused(v)), ...ngDevMode ? [{ debugName: "focused" }] : /* istanbul ignore next */ []);
|
|
1804
|
-
disabled = computed(() => this.#bound((v) => this.ctx.isYearDisabled(v)), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
1861
|
+
disabled = computed(() => this.ctx.disabled() || this.#bound((v) => this.ctx.isYearDisabled(v)), ...ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []);
|
|
1805
1862
|
constructor() {
|
|
1806
1863
|
assertInputBound(this.year, "calendar", "[forCalendarYearCell]", "year");
|
|
1807
1864
|
const handle = {
|