@truenas/ui-components 0.4.4 → 0.4.6
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.
|
@@ -2,7 +2,7 @@ import * as _truenas_ui_components from '@truenas/ui-components';
|
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { Signal, InjectionToken, Renderer2, OnDestroy, ElementRef, AfterViewInit, OnInit, TemplateRef, AfterContentInit, Provider, ChangeDetectorRef, TrackByFunction, OnChanges, DoCheck, SimpleChanges, PipeTransform, ViewContainerRef, AfterViewChecked, ComponentRef } from '@angular/core';
|
|
4
4
|
import { ControlValueAccessor, NgControl, AbstractControl } from '@angular/forms';
|
|
5
|
-
import { ComponentHarness, BaseHarnessFilters, HarnessPredicate, TestKey, HarnessLoader } from '@angular/cdk/testing';
|
|
5
|
+
import { ComponentHarness, BaseHarnessFilters, HarnessPredicate, TestKey, HarnessLoader, ModifierKeys as ModifierKeys$1 } from '@angular/cdk/testing';
|
|
6
6
|
import { SafeHtml, SafeResourceUrl, DomSanitizer } from '@angular/platform-browser';
|
|
7
7
|
import { ComponentFixture } from '@angular/core/testing';
|
|
8
8
|
import { SelectionModel, DataSource, CollectionViewer } from '@angular/cdk/collections';
|
|
@@ -1254,6 +1254,11 @@ declare class TnButtonComponent implements AfterViewInit {
|
|
|
1254
1254
|
*/
|
|
1255
1255
|
iconPosition: _angular_core.InputSignal<"left" | "right">;
|
|
1256
1256
|
disabled: _angular_core.InputSignal<boolean>;
|
|
1257
|
+
/**
|
|
1258
|
+
* Stretches the button to the full width of its container instead of
|
|
1259
|
+
* shrink-wrapping the label. Use for buttons that head or foot a form column.
|
|
1260
|
+
*/
|
|
1261
|
+
fullWidth: _angular_core.InputSignal<boolean>;
|
|
1257
1262
|
/**
|
|
1258
1263
|
* Native `type` of the rendered `<button>`. Defaults to `button` so stray
|
|
1259
1264
|
* clicks never submit an enclosing form. Set to `submit` for a form's save
|
|
@@ -1298,7 +1303,7 @@ declare class TnButtonComponent implements AfterViewInit {
|
|
|
1298
1303
|
private innerRef;
|
|
1299
1304
|
ngAfterViewInit(): void;
|
|
1300
1305
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnButtonComponent, never>;
|
|
1301
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnButtonComponent, "tn-button", never, { "primary": { "alias": "primary"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "routerLink": { "alias": "routerLink"; "required": false; "isSignal": true; }; "queryParams": { "alias": "queryParams"; "required": false; "isSignal": true; }; "fragment": { "alias": "fragment"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "rel": { "alias": "rel"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "onClick": "onClick"; }, never, never, true, never>;
|
|
1306
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnButtonComponent, "tn-button", never, { "primary": { "alias": "primary"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "routerLink": { "alias": "routerLink"; "required": false; "isSignal": true; }; "queryParams": { "alias": "queryParams"; "required": false; "isSignal": true; }; "fragment": { "alias": "fragment"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "rel": { "alias": "rel"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "onClick": "onClick"; }, never, never, true, never>;
|
|
1302
1307
|
}
|
|
1303
1308
|
|
|
1304
1309
|
/**
|
|
@@ -3791,6 +3796,12 @@ declare class TnSlideToggleComponent implements AfterViewInit, OnDestroy, Contro
|
|
|
3791
3796
|
toggleEl: _angular_core.Signal<ElementRef<HTMLInputElement>>;
|
|
3792
3797
|
labelPosition: _angular_core.InputSignal<"before" | "after">;
|
|
3793
3798
|
label: _angular_core.InputSignal<string | undefined>;
|
|
3799
|
+
/**
|
|
3800
|
+
* Stretches the toggle to the full width of its container and pushes the label
|
|
3801
|
+
* and the track to opposite ends of the row, instead of shrink-wrapping them
|
|
3802
|
+
* side by side. Use for settings rows and option lists.
|
|
3803
|
+
*/
|
|
3804
|
+
fullWidth: _angular_core.InputSignal<boolean>;
|
|
3794
3805
|
disabled: _angular_core.InputSignal<boolean>;
|
|
3795
3806
|
required: _angular_core.InputSignal<boolean>;
|
|
3796
3807
|
color: _angular_core.InputSignal<SlideToggleColor>;
|
|
@@ -3821,7 +3832,7 @@ declare class TnSlideToggleComponent implements AfterViewInit, OnDestroy, Contro
|
|
|
3821
3832
|
classes: _angular_core.Signal<string[]>;
|
|
3822
3833
|
effectiveAriaLabel: _angular_core.Signal<string | undefined>;
|
|
3823
3834
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnSlideToggleComponent, never>;
|
|
3824
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnSlideToggleComponent, "tn-slide-toggle", never, { "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; }, { "change": "change"; "toggleChange": "toggleChange"; }, never, never, true, never>;
|
|
3835
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnSlideToggleComponent, "tn-slide-toggle", never, { "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; }, { "change": "change"; "toggleChange": "toggleChange"; }, never, never, true, never>;
|
|
3825
3836
|
}
|
|
3826
3837
|
|
|
3827
3838
|
/**
|
|
@@ -5728,22 +5739,56 @@ declare class TnListComponent {
|
|
|
5728
5739
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnListComponent, "tn-list", never, { "dense": { "alias": "dense"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
5729
5740
|
}
|
|
5730
5741
|
|
|
5731
|
-
|
|
5742
|
+
/**
|
|
5743
|
+
* A single row of a `tn-list`.
|
|
5744
|
+
*
|
|
5745
|
+
* **The content directives must be imported by the component that declares the
|
|
5746
|
+
* row.** Every slot but the primary text is rendered only when a matching
|
|
5747
|
+
* directive *instance* is found, and directives apply only in the template that
|
|
5748
|
+
* declares them — importing `TnListItemComponent` alone does not bring them
|
|
5749
|
+
* into scope. Write `<span tnListIcon>` without `TnListIconDirective` in that
|
|
5750
|
+
* component's `imports` and the attribute is inert: no instance, so the leading
|
|
5751
|
+
* slot never renders and the icon silently disappears. The same holds for
|
|
5752
|
+
* `[tnListAvatar]`, `[tnListItemLine]`, `[tnListItemSecondary]` and
|
|
5753
|
+
* `[tnListItemTrailing]`. Import them alongside the component:
|
|
5754
|
+
*
|
|
5755
|
+
* ```ts
|
|
5756
|
+
* import {
|
|
5757
|
+
* TnListItemComponent,
|
|
5758
|
+
* TnListIconDirective,
|
|
5759
|
+
* TnListItemLineDirective,
|
|
5760
|
+
* TnListItemTrailingDirective,
|
|
5761
|
+
* } from '@truenas/ui-components';
|
|
5762
|
+
* ```
|
|
5763
|
+
*
|
|
5764
|
+
* The primary-text slot is the deliberate exception — it has no gate, so
|
|
5765
|
+
* `[tnListItemTitle]` and `[tnListItemPrimary]` render either way. See the
|
|
5766
|
+
* comment in `list-item.component.html` for why the asymmetry is there.
|
|
5767
|
+
*/
|
|
5768
|
+
declare class TnListItemComponent {
|
|
5732
5769
|
disabled: _angular_core.InputSignal<boolean>;
|
|
5733
5770
|
clickable: _angular_core.InputSignal<boolean>;
|
|
5771
|
+
/** Compact row: smaller minimum height and tighter vertical padding. */
|
|
5772
|
+
dense: _angular_core.InputSignal<boolean>;
|
|
5773
|
+
/**
|
|
5774
|
+
* Lets the primary and secondary text wrap onto multiple lines instead of
|
|
5775
|
+
* being truncated with an ellipsis. Use for rows whose content is a path, a
|
|
5776
|
+
* sentence, or anything else that should stay fully readable.
|
|
5777
|
+
*/
|
|
5778
|
+
wrap: _angular_core.InputSignal<boolean>;
|
|
5734
5779
|
itemClick: _angular_core.OutputEmitterRef<Event>;
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
private
|
|
5740
|
-
|
|
5741
|
-
|
|
5780
|
+
private leadingIcons;
|
|
5781
|
+
private leadingAvatars;
|
|
5782
|
+
private secondaryLines;
|
|
5783
|
+
private secondaryTexts;
|
|
5784
|
+
private trailing;
|
|
5785
|
+
protected hasLeadingContent: _angular_core.Signal<boolean>;
|
|
5786
|
+
protected hasTrailingContent: _angular_core.Signal<boolean>;
|
|
5742
5787
|
hasSecondaryText: _angular_core.Signal<boolean>;
|
|
5743
5788
|
hasThirdText: _angular_core.Signal<boolean>;
|
|
5744
5789
|
onClick(event: Event): void;
|
|
5745
5790
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListItemComponent, never>;
|
|
5746
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnListItemComponent, "tn-list-item", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; },
|
|
5791
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnListItemComponent, "tn-list-item", never, { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; "dense": { "alias": "dense"; "required": false; "isSignal": true; }; "wrap": { "alias": "wrap"; "required": false; "isSignal": true; }; }, { "itemClick": "itemClick"; }, ["leadingIcons", "leadingAvatars", "secondaryLines", "secondaryTexts", "trailing"], ["[tnListIcon], [tnListAvatar]", "[tnListItemTitle], [tnListItemPrimary]", "*", "[tnListItemLine], [tnListItemSecondary]", "[tnListItemTrailing]"], true, never>;
|
|
5747
5792
|
}
|
|
5748
5793
|
|
|
5749
5794
|
declare class TnListSubheaderComponent {
|
|
@@ -5752,30 +5797,66 @@ declare class TnListSubheaderComponent {
|
|
|
5752
5797
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnListSubheaderComponent, "tn-list-subheader", never, { "inset": { "alias": "inset"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
5753
5798
|
}
|
|
5754
5799
|
|
|
5800
|
+
/**
|
|
5801
|
+
* Leading icon of a list row.
|
|
5802
|
+
*
|
|
5803
|
+
* Requires importing `TnListIconDirective`, or the leading slot never renders.
|
|
5804
|
+
*/
|
|
5755
5805
|
declare class TnListIconDirective {
|
|
5756
5806
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListIconDirective, never>;
|
|
5757
5807
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnListIconDirective, "[tnListIcon]", never, {}, {}, never, never, true, never>;
|
|
5758
5808
|
}
|
|
5809
|
+
/**
|
|
5810
|
+
* Leading avatar of a list row.
|
|
5811
|
+
*
|
|
5812
|
+
* Requires importing `TnListAvatarDirective`, or the leading slot never renders.
|
|
5813
|
+
*/
|
|
5759
5814
|
declare class TnListAvatarDirective {
|
|
5760
5815
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListAvatarDirective, never>;
|
|
5761
5816
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnListAvatarDirective, "[tnListAvatar]", never, {}, {}, never, never, true, never>;
|
|
5762
5817
|
}
|
|
5818
|
+
/**
|
|
5819
|
+
* Primary text of a list row. Projects whether or not this directive is
|
|
5820
|
+
* imported — the primary slot is ungated — but import it for the styling.
|
|
5821
|
+
*/
|
|
5763
5822
|
declare class TnListItemTitleDirective {
|
|
5764
5823
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListItemTitleDirective, never>;
|
|
5765
5824
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnListItemTitleDirective, "[tnListItemTitle]", never, {}, {}, never, never, true, never>;
|
|
5766
5825
|
}
|
|
5826
|
+
/**
|
|
5827
|
+
* Secondary line of a list row. Two or more make the row three-line.
|
|
5828
|
+
*
|
|
5829
|
+
* Requires importing `TnListItemLineDirective`, or the secondary slot never
|
|
5830
|
+
* renders and the row is not marked as multi-line.
|
|
5831
|
+
*/
|
|
5767
5832
|
declare class TnListItemLineDirective {
|
|
5768
5833
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListItemLineDirective, never>;
|
|
5769
5834
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnListItemLineDirective, "[tnListItemLine]", never, {}, {}, never, never, true, never>;
|
|
5770
5835
|
}
|
|
5836
|
+
/**
|
|
5837
|
+
* Primary text of a list row. Projects whether or not this directive is
|
|
5838
|
+
* imported — the primary slot is ungated — but import it for the styling.
|
|
5839
|
+
*/
|
|
5771
5840
|
declare class TnListItemPrimaryDirective {
|
|
5772
5841
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListItemPrimaryDirective, never>;
|
|
5773
5842
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnListItemPrimaryDirective, "[tnListItemPrimary]", never, {}, {}, never, never, true, never>;
|
|
5774
5843
|
}
|
|
5844
|
+
/**
|
|
5845
|
+
* Secondary text of a list row.
|
|
5846
|
+
*
|
|
5847
|
+
* Requires importing `TnListItemSecondaryDirective`, or the secondary slot
|
|
5848
|
+
* never renders and the row is not marked as multi-line.
|
|
5849
|
+
*/
|
|
5775
5850
|
declare class TnListItemSecondaryDirective {
|
|
5776
5851
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListItemSecondaryDirective, never>;
|
|
5777
5852
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnListItemSecondaryDirective, "[tnListItemSecondary]", never, {}, {}, never, never, true, never>;
|
|
5778
5853
|
}
|
|
5854
|
+
/**
|
|
5855
|
+
* Trailing content of a list row — a control, a badge, a chevron.
|
|
5856
|
+
*
|
|
5857
|
+
* Requires importing `TnListItemTrailingDirective`, or the trailing slot never
|
|
5858
|
+
* renders.
|
|
5859
|
+
*/
|
|
5779
5860
|
declare class TnListItemTrailingDirective {
|
|
5780
5861
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnListItemTrailingDirective, never>;
|
|
5781
5862
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TnListItemTrailingDirective, "[tnListItemTrailing]", never, {}, {}, never, never, true, never>;
|
|
@@ -7601,9 +7682,7 @@ declare class TnDateRangeInputComponent implements ControlValueAccessor, OnInit,
|
|
|
7601
7682
|
endDayRef: _angular_core.Signal<ElementRef<HTMLInputElement>>;
|
|
7602
7683
|
endYearRef: _angular_core.Signal<ElementRef<HTMLInputElement>>;
|
|
7603
7684
|
calendarTemplate: _angular_core.Signal<TemplateRef<unknown>>;
|
|
7604
|
-
calendar: _angular_core.Signal<TnCalendarComponent>;
|
|
7605
7685
|
wrapperEl: _angular_core.Signal<ElementRef<HTMLDivElement>>;
|
|
7606
|
-
private destroy$;
|
|
7607
7686
|
private overlayRef?;
|
|
7608
7687
|
private portal?;
|
|
7609
7688
|
isOpen: _angular_core.WritableSignal<boolean>;
|
|
@@ -7617,9 +7696,9 @@ declare class TnDateRangeInputComponent implements ControlValueAccessor, OnInit,
|
|
|
7617
7696
|
endDay: _angular_core.WritableSignal<string>;
|
|
7618
7697
|
endYear: _angular_core.WritableSignal<string>;
|
|
7619
7698
|
private currentFocus;
|
|
7620
|
-
initialRange: _angular_core.Signal<DateRange>;
|
|
7621
7699
|
private overlay;
|
|
7622
7700
|
private viewContainerRef;
|
|
7701
|
+
private injector;
|
|
7623
7702
|
ngOnInit(): void;
|
|
7624
7703
|
ngOnDestroy(): void;
|
|
7625
7704
|
writeValue(value: DateRange): void;
|
|
@@ -7649,60 +7728,473 @@ declare class TnCalendarComponent implements OnInit {
|
|
|
7649
7728
|
minDate: _angular_core.InputSignal<Date | undefined>;
|
|
7650
7729
|
maxDate: _angular_core.InputSignal<Date | undefined>;
|
|
7651
7730
|
dateFilter: _angular_core.InputSignal<((date: Date) => boolean) | undefined>;
|
|
7731
|
+
/**
|
|
7732
|
+
* Dates to flag as noteworthy — days a task runs, days with events, and the like.
|
|
7733
|
+
* Order and time-of-day are ignored; only the calendar day is compared. The
|
|
7734
|
+
* calendar owns how a marked day looks, so callers pass dates rather than styles.
|
|
7735
|
+
* Marking is independent of `selected`/`selectedRange`, which stay authoritative
|
|
7736
|
+
* where they overlap.
|
|
7737
|
+
*/
|
|
7738
|
+
markedDates: _angular_core.InputSignal<Date[] | undefined>;
|
|
7739
|
+
/**
|
|
7740
|
+
* Which month — or which page of years, in the year view — is on screen.
|
|
7741
|
+
*
|
|
7742
|
+
* Optional. Left unbound, the calendar opens on the month the bound value lives in and
|
|
7743
|
+
* drives navigation itself. Bind it, alongside `activeDateChange`, to drive the view
|
|
7744
|
+
* from outside: useful for a calendar that stays mounted while its value jumps to
|
|
7745
|
+
* another month, which the open-on-init behaviour alone won't follow.
|
|
7746
|
+
*
|
|
7747
|
+
* Unlike `selected`, this isn't strictly controlled — the calendar still navigates on
|
|
7748
|
+
* its own when the user pages or arrows around, so binding a constant here won't
|
|
7749
|
+
* freeze the view. Changing what you bind always wins.
|
|
7750
|
+
*/
|
|
7751
|
+
activeDate: _angular_core.InputSignal<Date | undefined>;
|
|
7752
|
+
/**
|
|
7753
|
+
* Locale for dates, month and weekday names, and which day the week starts on.
|
|
7754
|
+
*
|
|
7755
|
+
* Defaults to the app's `LOCALE_ID`, which is where an Angular app already declares
|
|
7756
|
+
* its locale — so a `ng build --localize` app is right without touching this. Bind it
|
|
7757
|
+
* only when one calendar needs a different locale from the rest of the app.
|
|
7758
|
+
*
|
|
7759
|
+
* Nothing here reads the browser's language on its own: doing so would quietly
|
|
7760
|
+
* disagree with `DatePipe` and every other locale-aware part of the app. An app that
|
|
7761
|
+
* wants that behaviour opts into it once, at bootstrap:
|
|
7762
|
+
* `{ provide: LOCALE_ID, useValue: navigator.language }`.
|
|
7763
|
+
*
|
|
7764
|
+
* Wording that isn't a date — "(marked)", the header button labels — comes from
|
|
7765
|
+
* `TN_CALENDAR_INTL` instead.
|
|
7766
|
+
*/
|
|
7767
|
+
locale: _angular_core.InputSignal<string | undefined>;
|
|
7768
|
+
private appLocale;
|
|
7769
|
+
private host;
|
|
7770
|
+
private injector;
|
|
7771
|
+
/** The locale actually in force: the input when bound, the app's otherwise. */
|
|
7772
|
+
protected resolvedLocale: _angular_core.Signal<string>;
|
|
7652
7773
|
rangeMode: _angular_core.InputSignal<boolean>;
|
|
7653
7774
|
selectedRange: _angular_core.InputSignal<DateRange | undefined>;
|
|
7654
7775
|
selectedChange: _angular_core.OutputEmitterRef<Date>;
|
|
7776
|
+
/**
|
|
7777
|
+
* The date the calendar is now sitting on — the month it shows, and the day holding
|
|
7778
|
+
* the grid's roving tabindex.
|
|
7779
|
+
*
|
|
7780
|
+
* This is navigation, not selection: it fires on paging, on arrow keys, and on
|
|
7781
|
+
* clicking a day (a click moves the active cell as well as choosing the date, so the
|
|
7782
|
+
* two never drift apart). Treat it as "the view moved", not "the user picked a date" —
|
|
7783
|
+
* `selectedChange` is the one that means a choice was made.
|
|
7784
|
+
*/
|
|
7655
7785
|
activeDateChange: _angular_core.OutputEmitterRef<Date>;
|
|
7656
7786
|
viewChanged: _angular_core.OutputEmitterRef<"month" | "year">;
|
|
7657
7787
|
selectedRangeChange: _angular_core.OutputEmitterRef<DateRange>;
|
|
7788
|
+
/**
|
|
7789
|
+
* Which month/year grid is on screen. Navigation state, not selection state.
|
|
7790
|
+
*
|
|
7791
|
+
* Follows the `activeDate` input whenever the caller changes it, but stays writable so
|
|
7792
|
+
* paging and arrow keys keep working with no echo back from the caller.
|
|
7793
|
+
*/
|
|
7658
7794
|
currentDate: _angular_core.WritableSignal<Date>;
|
|
7659
7795
|
currentView: _angular_core.WritableSignal<"month" | "year">;
|
|
7660
|
-
rangeState: _angular_core.WritableSignal<{
|
|
7661
|
-
start: Date | null;
|
|
7662
|
-
end: Date | null;
|
|
7663
|
-
selecting: "start" | "end";
|
|
7664
|
-
}>;
|
|
7665
|
-
private userHasInteracted;
|
|
7666
|
-
constructor();
|
|
7667
7796
|
ngOnInit(): void;
|
|
7668
|
-
private initializeRangeState;
|
|
7669
|
-
onMonthSelected(month: number): void;
|
|
7670
|
-
onYearSelected(year: number): void;
|
|
7671
7797
|
onViewChanged(view: 'month' | 'year'): void;
|
|
7672
7798
|
onPreviousClicked(): void;
|
|
7673
7799
|
onNextClicked(): void;
|
|
7800
|
+
/**
|
|
7801
|
+
* Steps the view one page in `direction`: a month in the day view, a page of years in
|
|
7802
|
+
* the year view — the same spans `PageUp`/`PageDown` move, and the same the header
|
|
7803
|
+
* labels.
|
|
7804
|
+
*
|
|
7805
|
+
* Carries the day across, clamped, rather than dropping to the 1st. The keyboard has
|
|
7806
|
+
* always done this, so resetting here left the roving tabindex somewhere different
|
|
7807
|
+
* depending on whether the user clicked the arrow or pressed the key.
|
|
7808
|
+
*/
|
|
7809
|
+
private page;
|
|
7674
7810
|
onSelectedChange(date: Date): void;
|
|
7811
|
+
/**
|
|
7812
|
+
* Works out the next range from the one the caller currently owns and emits it. The
|
|
7813
|
+
* calendar keeps no copy — what it renders next is whatever the caller binds back.
|
|
7814
|
+
*/
|
|
7675
7815
|
private handleRangeSelection;
|
|
7676
7816
|
onActiveDateChange(date: Date): void;
|
|
7677
|
-
onYearSelectedFromView(date: Date): void;
|
|
7678
7817
|
/**
|
|
7679
|
-
*
|
|
7818
|
+
* A year picked in the year grid moves the view to that year and returns to the day
|
|
7819
|
+
* grid. It is navigation, not selection — no `selectedChange` — so the user lands on
|
|
7820
|
+
* the month they asked for and picks a day from there.
|
|
7680
7821
|
*/
|
|
7681
|
-
|
|
7822
|
+
onYearSelectedFromView(date: Date): void;
|
|
7682
7823
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnCalendarComponent, never>;
|
|
7683
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnCalendarComponent, "tn-calendar", never, { "startView": { "alias": "startView"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "rangeMode": { "alias": "rangeMode"; "required": false; "isSignal": true; }; "selectedRange": { "alias": "selectedRange"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "activeDateChange": "activeDateChange"; "viewChanged": "viewChanged"; "selectedRangeChange": "selectedRangeChange"; }, never, never, true, [{ directive: typeof TnTestIdDirective; inputs: { "tnTestId": "testId"; }; outputs: {}; }]>;
|
|
7824
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnCalendarComponent, "tn-calendar", never, { "startView": { "alias": "startView"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "markedDates": { "alias": "markedDates"; "required": false; "isSignal": true; }; "activeDate": { "alias": "activeDate"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "rangeMode": { "alias": "rangeMode"; "required": false; "isSignal": true; }; "selectedRange": { "alias": "selectedRange"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "activeDateChange": "activeDateChange"; "viewChanged": "viewChanged"; "selectedRangeChange": "selectedRangeChange"; }, never, never, true, [{ directive: typeof TnTestIdDirective; inputs: { "tnTestId": "testId"; }; outputs: {}; }]>;
|
|
7825
|
+
}
|
|
7826
|
+
|
|
7827
|
+
/** The views `tn-calendar` can show. */
|
|
7828
|
+
type TnCalendarView = 'month' | 'year';
|
|
7829
|
+
/** A set of criteria that can be used to filter a list of calendar instances. */
|
|
7830
|
+
type CalendarHarnessFilters = BaseHarnessFilters;
|
|
7831
|
+
/** A set of criteria that can be used to filter a list of calendar cell instances. */
|
|
7832
|
+
interface CalendarCellHarnessFilters extends BaseHarnessFilters {
|
|
7833
|
+
/**
|
|
7834
|
+
* Filters based on the text of the cell — as rendered, so formatted for the app's
|
|
7835
|
+
* locale right down to the numerals. `'14'` finds nothing in a calendar showing
|
|
7836
|
+
* `١٤`. Prefer `date` (or `year`) unless the rendered text is what you mean to assert.
|
|
7837
|
+
*/
|
|
7838
|
+
text?: string | RegExp;
|
|
7839
|
+
/**
|
|
7840
|
+
* Filters day cells by the calendar day they represent, whatever the locale renders.
|
|
7841
|
+
* Time of day is ignored.
|
|
7842
|
+
*/
|
|
7843
|
+
date?: Date;
|
|
7844
|
+
/** Filters year cells by the year they represent, whatever the locale renders. */
|
|
7845
|
+
year?: number;
|
|
7846
|
+
/** Filters based on whether the cell is selected. */
|
|
7847
|
+
selected?: boolean;
|
|
7848
|
+
/** Filters based on whether the cell is activated using keyboard navigation. */
|
|
7849
|
+
active?: boolean;
|
|
7850
|
+
/** Filters based on whether the cell is disabled. */
|
|
7851
|
+
disabled?: boolean;
|
|
7852
|
+
/** Filters based on whether the cell represents today's date. */
|
|
7853
|
+
today?: boolean;
|
|
7854
|
+
/** Filters based on whether the cell is inside of the selected range. */
|
|
7855
|
+
inRange?: boolean;
|
|
7856
|
+
/** Filters based on whether the cell was flagged through `markedDates`. */
|
|
7857
|
+
marked?: boolean;
|
|
7858
|
+
}
|
|
7859
|
+
/**
|
|
7860
|
+
* Harness for interacting with a single day (or year) cell inside `tn-calendar`.
|
|
7861
|
+
*
|
|
7862
|
+
* Modelled on Angular Material's `MatCalendarCellHarness` so specs can move across
|
|
7863
|
+
* with the method names intact. Three differences worth knowing:
|
|
7864
|
+
*
|
|
7865
|
+
* - `isMarked()` is new — it reports the `markedDates` state, which Material has no
|
|
7866
|
+
* equivalent for.
|
|
7867
|
+
* - `getDate()` and the `date` filter are new, and are the reliable way to name a cell:
|
|
7868
|
+
* the text is formatted for the app's locale, so `'14'` misses a calendar rendering
|
|
7869
|
+
* `١٤`.
|
|
7870
|
+
* - There are no comparison-range or preview-range methods (`isComparisonRangeStart()`
|
|
7871
|
+
* and friends); `tn-calendar` has no comparison range to report.
|
|
7872
|
+
*
|
|
7873
|
+
* @example
|
|
7874
|
+
* ```typescript
|
|
7875
|
+
* const calendar = await loader.getHarness(TnCalendarHarness);
|
|
7876
|
+
* const [first] = await calendar.getCells({ date: new Date(2031, 4, 14) });
|
|
7877
|
+
* await first.select();
|
|
7878
|
+
* expect(await first.isSelected()).toBe(true);
|
|
7879
|
+
* ```
|
|
7880
|
+
*/
|
|
7881
|
+
declare class TnCalendarCellHarness extends ComponentHarness {
|
|
7882
|
+
/** The selector for a calendar cell. Padding cells render no button, so only real days match. */
|
|
7883
|
+
static hostSelector: string;
|
|
7884
|
+
private _content;
|
|
7885
|
+
/**
|
|
7886
|
+
* Gets a `HarnessPredicate` that can be used to search for a cell with specific attributes.
|
|
7887
|
+
*
|
|
7888
|
+
* @param options Options for filtering which cell instances are considered a match.
|
|
7889
|
+
* @returns A `HarnessPredicate` configured with the given options.
|
|
7890
|
+
*
|
|
7891
|
+
* @example
|
|
7892
|
+
* ```typescript
|
|
7893
|
+
* // Every day the schedule runs on
|
|
7894
|
+
* const runDays = await calendar.getCells({ marked: true });
|
|
7895
|
+
*
|
|
7896
|
+
* // The disabled days before minDate
|
|
7897
|
+
* const blocked = await calendar.getCells({ disabled: true });
|
|
7898
|
+
* ```
|
|
7899
|
+
*/
|
|
7900
|
+
static with(options?: CalendarCellHarnessFilters): HarnessPredicate<TnCalendarCellHarness>;
|
|
7901
|
+
/** Gets the text of the calendar cell. */
|
|
7902
|
+
getText(): Promise<string>;
|
|
7903
|
+
/** Gets the aria-label of the calendar cell. */
|
|
7904
|
+
getAriaLabel(): Promise<string>;
|
|
7905
|
+
/**
|
|
7906
|
+
* Gets the calendar day this cell represents, independent of how it is rendered —
|
|
7907
|
+
* `getText()` is formatted for the locale, so it reads `١٤` in Arabic while this still
|
|
7908
|
+
* answers the 14th. Midnight local time. `null` on a year cell, which has no day.
|
|
7909
|
+
*/
|
|
7910
|
+
getDate(): Promise<Date | null>;
|
|
7911
|
+
/**
|
|
7912
|
+
* Gets the year this cell represents, independent of how it is rendered. Works on year
|
|
7913
|
+
* cells; `null` on a day cell.
|
|
7914
|
+
*/
|
|
7915
|
+
getYear(): Promise<number | null>;
|
|
7916
|
+
/** The raw `YYYY-MM-DD` stamp, for comparing without rebuilding a `Date`. */
|
|
7917
|
+
protected getDateStamp(): Promise<string | null>;
|
|
7918
|
+
/** Whether the cell is selected. */
|
|
7919
|
+
isSelected(): Promise<boolean>;
|
|
7920
|
+
/** Whether the cell is disabled. */
|
|
7921
|
+
isDisabled(): Promise<boolean>;
|
|
7922
|
+
/**
|
|
7923
|
+
* Whether the cell holds the grid's roving tabindex — the one cell reachable with Tab,
|
|
7924
|
+
* which the arrow keys move. Independent of selection: arrowing around changes which
|
|
7925
|
+
* cell is active without selecting anything.
|
|
7926
|
+
*/
|
|
7927
|
+
isActive(): Promise<boolean>;
|
|
7928
|
+
/** Whether the cell represents today's date. */
|
|
7929
|
+
isToday(): Promise<boolean>;
|
|
7930
|
+
/** Whether the cell was flagged through the calendar's `markedDates` input. */
|
|
7931
|
+
isMarked(): Promise<boolean>;
|
|
7932
|
+
/** Whether the cell is the start of the selected range. */
|
|
7933
|
+
isRangeStart(): Promise<boolean>;
|
|
7934
|
+
/** Whether the cell is the end of the selected range. */
|
|
7935
|
+
isRangeEnd(): Promise<boolean>;
|
|
7936
|
+
/**
|
|
7937
|
+
* Whether the cell is part of the selected range, ends included — matching Material's
|
|
7938
|
+
* `isInRange()`. Use `isRangeStart()`/`isRangeEnd()` to single out the ends.
|
|
7939
|
+
*/
|
|
7940
|
+
isInRange(): Promise<boolean>;
|
|
7941
|
+
/** Selects the calendar cell. Won't do anything if the cell is disabled. */
|
|
7942
|
+
select(): Promise<void>;
|
|
7943
|
+
/**
|
|
7944
|
+
* Presses a key on the cell. The grid handles its keys on the cells themselves, so
|
|
7945
|
+
* this is how the roving tabindex is driven — arrows, Home/End and PageUp/PageDown
|
|
7946
|
+
* move the active cell, while Enter and Space select.
|
|
7947
|
+
*
|
|
7948
|
+
* @param key The key to press, e.g. `TestKey.RIGHT_ARROW`.
|
|
7949
|
+
* @param modifiers Modifier keys held while pressing, e.g. `{ shift: true }`.
|
|
7950
|
+
*
|
|
7951
|
+
* @example
|
|
7952
|
+
* ```typescript
|
|
7953
|
+
* const [cell] = await calendar.getCells({ active: true });
|
|
7954
|
+
* await cell.press(TestKey.PAGE_DOWN, { shift: true }); // a year on
|
|
7955
|
+
* ```
|
|
7956
|
+
*/
|
|
7957
|
+
press(key: TestKey | string, modifiers?: ModifierKeys$1): Promise<void>;
|
|
7958
|
+
/** Hovers over the calendar cell. */
|
|
7959
|
+
hover(): Promise<void>;
|
|
7960
|
+
/** Moves the mouse away from the calendar cell. */
|
|
7961
|
+
mouseAway(): Promise<void>;
|
|
7962
|
+
/** Focuses the calendar cell. */
|
|
7963
|
+
focus(): Promise<void>;
|
|
7964
|
+
/** Removes focus from the calendar cell. */
|
|
7965
|
+
blur(): Promise<void>;
|
|
7966
|
+
}
|
|
7967
|
+
/**
|
|
7968
|
+
* Harness for interacting with `tn-calendar` in tests.
|
|
7969
|
+
*
|
|
7970
|
+
* The method names mirror Angular Material's `MatCalendarHarness`, so a spec written
|
|
7971
|
+
* against the Material calendar moves over unchanged. Differences to know:
|
|
7972
|
+
*
|
|
7973
|
+
* - `getCurrentView()` resolves to `'month' | 'year'`. `tn-calendar` has no separate
|
|
7974
|
+
* multi-year view — its year view *is* the multi-year grid.
|
|
7975
|
+
* - Cell filters gain `marked` for the `markedDates` state and `date`/`year` for naming
|
|
7976
|
+
* a cell without going through its rendered text, and drop Material's
|
|
7977
|
+
* `inComparisonRange`, which has no equivalent here.
|
|
7978
|
+
*
|
|
7979
|
+
* @example
|
|
7980
|
+
* ```typescript
|
|
7981
|
+
* const calendar = await loader.getHarness(TnCalendarHarness);
|
|
7982
|
+
*
|
|
7983
|
+
* // Which days does the schedule run on this month?
|
|
7984
|
+
* const marked = await calendar.getCells({ marked: true });
|
|
7985
|
+
* expect(await parallel(() => marked.map((cell) => cell.getText()))).toEqual(['24', '25']);
|
|
7986
|
+
*
|
|
7987
|
+
* // Page forward a month
|
|
7988
|
+
* await calendar.next();
|
|
7989
|
+
* expect(await calendar.getCurrentViewLabel()).toBe('MAR 2022');
|
|
7990
|
+
*
|
|
7991
|
+
* // Pick a day
|
|
7992
|
+
* await calendar.selectCell({ date: new Date(2022, 2, 14) });
|
|
7993
|
+
* ```
|
|
7994
|
+
*/
|
|
7995
|
+
declare class TnCalendarHarness extends ComponentHarness {
|
|
7996
|
+
/** The selector for the host element of a `TnCalendarComponent` instance. */
|
|
7997
|
+
static hostSelector: string;
|
|
7998
|
+
private _periodButton;
|
|
7999
|
+
private _previousButton;
|
|
8000
|
+
private _nextButton;
|
|
8001
|
+
private _monthView;
|
|
8002
|
+
/**
|
|
8003
|
+
* Gets a `HarnessPredicate` that can be used to search for a calendar with specific
|
|
8004
|
+
* attributes.
|
|
8005
|
+
*
|
|
8006
|
+
* @param options Options for filtering which calendar instances are considered a match.
|
|
8007
|
+
* @returns A `HarnessPredicate` configured with the given options.
|
|
8008
|
+
*/
|
|
8009
|
+
static with(options?: CalendarHarnessFilters): HarnessPredicate<TnCalendarHarness>;
|
|
8010
|
+
/**
|
|
8011
|
+
* Gets a list of cells inside the calendar. Padding cells for days outside the month
|
|
8012
|
+
* are not included.
|
|
8013
|
+
*
|
|
8014
|
+
* @param filter Optionally filters which cells are included.
|
|
8015
|
+
*/
|
|
8016
|
+
getCells(filter?: CalendarCellHarnessFilters): Promise<TnCalendarCellHarness[]>;
|
|
8017
|
+
/** Gets the current view that is being shown inside the calendar. */
|
|
8018
|
+
getCurrentView(): Promise<TnCalendarView>;
|
|
8019
|
+
/** Gets the label of the current calendar view, e.g. `'MAR 2022'`. */
|
|
8020
|
+
getCurrentViewLabel(): Promise<string>;
|
|
8021
|
+
/** Changes the calendar view by clicking on the view toggle button. */
|
|
8022
|
+
changeView(): Promise<void>;
|
|
8023
|
+
/** Goes to the next page of the current view (e.g. next month when inside the month view). */
|
|
8024
|
+
next(): Promise<void>;
|
|
8025
|
+
/** Goes to the previous page of the current view (e.g. previous month in the month view). */
|
|
8026
|
+
previous(): Promise<void>;
|
|
8027
|
+
/**
|
|
8028
|
+
* Selects a cell in the current calendar view.
|
|
8029
|
+
*
|
|
8030
|
+
* @param filter An optional filter to apply to the cells. The first cell matching the
|
|
8031
|
+
* filter will be selected.
|
|
8032
|
+
*/
|
|
8033
|
+
selectCell(filter?: CalendarCellHarnessFilters): Promise<void>;
|
|
8034
|
+
/**
|
|
8035
|
+
* Gets the cell holding the grid's roving tabindex — the one cell Tab reaches, and the
|
|
8036
|
+
* one the arrow keys move.
|
|
8037
|
+
*
|
|
8038
|
+
* `null` only when every cell in the view is disabled, where there is nothing to focus.
|
|
8039
|
+
*/
|
|
8040
|
+
getActiveCell(): Promise<TnCalendarCellHarness | null>;
|
|
8041
|
+
/**
|
|
8042
|
+
* Moves the grid's roving tabindex with the keyboard, without going through the DOM.
|
|
8043
|
+
*
|
|
8044
|
+
* Arrows move by a day or a week (a year or a row of years); Home and End reach the
|
|
8045
|
+
* ends of the month or year page; PageUp and PageDown page, shifted by a year. Moving
|
|
8046
|
+
* never changes the selection — use `selectCell()` or `TnCalendarCellHarness.select()`
|
|
8047
|
+
* for that.
|
|
8048
|
+
*
|
|
8049
|
+
* @param key The key to press, e.g. `TestKey.RIGHT_ARROW`.
|
|
8050
|
+
* @param modifiers Modifier keys held while pressing, e.g. `{ shift: true }`.
|
|
8051
|
+
*
|
|
8052
|
+
* @example
|
|
8053
|
+
* ```typescript
|
|
8054
|
+
* await calendar.moveActiveCell(TestKey.DOWN_ARROW);
|
|
8055
|
+
* expect(await (await calendar.getActiveCell())!.getText()).toBe('17');
|
|
8056
|
+
* ```
|
|
8057
|
+
*/
|
|
8058
|
+
moveActiveCell(key: TestKey | string, modifiers?: ModifierKeys$1): Promise<void>;
|
|
7684
8059
|
}
|
|
7685
8060
|
|
|
8061
|
+
/**
|
|
8062
|
+
* The calendar's user-facing wording.
|
|
8063
|
+
*
|
|
8064
|
+
* Dates, month and weekday names and the first day of the week all come from the
|
|
8065
|
+
* locale, so they need no translation here — `Intl` already knows them. What is left is
|
|
8066
|
+
* prose: the state suffixes screen readers read out, and the names of the header
|
|
8067
|
+
* buttons. Those are the strings this carries.
|
|
8068
|
+
*/
|
|
8069
|
+
interface TnCalendarIntl {
|
|
8070
|
+
/** Appended to a day flagged through `markedDates`. */
|
|
8071
|
+
marked: string;
|
|
8072
|
+
/** Appended to the first day of the selected range. */
|
|
8073
|
+
rangeStart: string;
|
|
8074
|
+
/** Appended to the last day of the selected range. */
|
|
8075
|
+
rangeEnd: string;
|
|
8076
|
+
/** Appended to the days between the ends of the selected range. */
|
|
8077
|
+
inRange: string;
|
|
8078
|
+
/** Appended to the year cell for the current year. */
|
|
8079
|
+
currentYear: string;
|
|
8080
|
+
/** Accessible name for the day grid, given the month and year already formatted. */
|
|
8081
|
+
monthGridLabel: (period: string) => string;
|
|
8082
|
+
/** Accessible name for the year grid, given the span of years it shows. */
|
|
8083
|
+
yearGridLabel: (startYear: number, endYear: number) => string;
|
|
8084
|
+
/** Accessible name for the button that switches between the day and year grids. */
|
|
8085
|
+
chooseMonthAndYear: string;
|
|
8086
|
+
/** Accessible name for the back button in the day grid. */
|
|
8087
|
+
previousMonth: string;
|
|
8088
|
+
/** Accessible name for the forward button in the day grid. */
|
|
8089
|
+
nextMonth: string;
|
|
8090
|
+
/** Accessible name for the back button in the year grid. */
|
|
8091
|
+
previousYears: string;
|
|
8092
|
+
/** Accessible name for the forward button in the year grid. */
|
|
8093
|
+
nextYears: string;
|
|
8094
|
+
}
|
|
8095
|
+
/** The wording used when an app provides none of its own. */
|
|
8096
|
+
declare const TN_CALENDAR_INTL_DEFAULTS: TnCalendarIntl;
|
|
8097
|
+
/**
|
|
8098
|
+
* What an app may provide for {@link TN_CALENDAR_INTL}: the wording itself, or a signal
|
|
8099
|
+
* carrying it. Provide the signal form when the language can change while the app is
|
|
8100
|
+
* running — a plain object is read once and never again, so every open calendar would
|
|
8101
|
+
* keep the wording it was built with.
|
|
8102
|
+
*/
|
|
8103
|
+
type TnCalendarIntlInput = Partial<TnCalendarIntl> | Signal<Partial<TnCalendarIntl>>;
|
|
8104
|
+
/**
|
|
8105
|
+
* Injection token for the calendar's wording.
|
|
8106
|
+
*
|
|
8107
|
+
* Because the library ships no localized strings, this is the recommended hook for
|
|
8108
|
+
* wiring a translation service so every `tn-calendar` reads the same way. Anything left
|
|
8109
|
+
* out falls back to {@link TN_CALENDAR_INTL_DEFAULTS}, so an app can translate one
|
|
8110
|
+
* string without restating the rest.
|
|
8111
|
+
*
|
|
8112
|
+
* Dates themselves are not here — they follow `LOCALE_ID`, or the calendar's `locale`
|
|
8113
|
+
* input. See `TnCalendarComponent.locale`.
|
|
8114
|
+
*
|
|
8115
|
+
* @example
|
|
8116
|
+
* ```ts
|
|
8117
|
+
* // Fixed for the lifetime of the app — the language is chosen at build or bootstrap.
|
|
8118
|
+
* providers: [
|
|
8119
|
+
* {
|
|
8120
|
+
* provide: TN_CALENDAR_INTL,
|
|
8121
|
+
* useFactory: (translate: TranslateService): TnCalendarIntlInput => ({
|
|
8122
|
+
* marked: translate.instant('calendar.marked'),
|
|
8123
|
+
* previousMonth: translate.instant('calendar.previousMonth'),
|
|
8124
|
+
* yearGridLabel: (from, to) => translate.instant('calendar.years', { from, to }),
|
|
8125
|
+
* }),
|
|
8126
|
+
* deps: [TranslateService],
|
|
8127
|
+
* },
|
|
8128
|
+
* ];
|
|
8129
|
+
* ```
|
|
8130
|
+
*
|
|
8131
|
+
* @example
|
|
8132
|
+
* ```ts
|
|
8133
|
+
* // Switchable at runtime: a signal, so calendars already on screen follow along.
|
|
8134
|
+
* providers: [
|
|
8135
|
+
* {
|
|
8136
|
+
* provide: TN_CALENDAR_INTL,
|
|
8137
|
+
* useFactory: (): TnCalendarIntlInput => {
|
|
8138
|
+
* const translate = inject(TranslateService);
|
|
8139
|
+
* const lang = toSignal(translate.onLangChange, { initialValue: null });
|
|
8140
|
+
* return computed(() => {
|
|
8141
|
+
* lang(); // Re-read every string when the language changes.
|
|
8142
|
+
* return { marked: translate.instant('calendar.marked') };
|
|
8143
|
+
* });
|
|
8144
|
+
* },
|
|
8145
|
+
* },
|
|
8146
|
+
* ];
|
|
8147
|
+
* ```
|
|
8148
|
+
*/
|
|
8149
|
+
declare const TN_CALENDAR_INTL: InjectionToken<TnCalendarIntlInput>;
|
|
8150
|
+
/**
|
|
8151
|
+
* Resolves the wording for a calendar component: whatever the app provided, laid over
|
|
8152
|
+
* the built-in defaults.
|
|
8153
|
+
*
|
|
8154
|
+
* Returns a signal rather than a plain object so a language switch reaches calendars that
|
|
8155
|
+
* are already on screen. Read it inside a `computed` — as every caller here does — and
|
|
8156
|
+
* the labels recompute on their own.
|
|
8157
|
+
*/
|
|
8158
|
+
declare function injectTnCalendarIntl(): Signal<TnCalendarIntl>;
|
|
8159
|
+
|
|
7686
8160
|
declare class TnCalendarHeaderComponent {
|
|
7687
8161
|
currentDate: _angular_core.InputSignal<Date>;
|
|
7688
8162
|
currentView: _angular_core.InputSignal<"month" | "year">;
|
|
7689
|
-
|
|
7690
|
-
|
|
8163
|
+
/**
|
|
8164
|
+
* Locale for the month abbreviation. Falls back to the app's `LOCALE_ID`;
|
|
8165
|
+
* `tn-calendar` binds it from its own `locale` input.
|
|
8166
|
+
*/
|
|
8167
|
+
locale: _angular_core.InputSignal<string | undefined>;
|
|
7691
8168
|
viewChanged: _angular_core.OutputEmitterRef<"month" | "year">;
|
|
7692
8169
|
previousClicked: _angular_core.OutputEmitterRef<void>;
|
|
7693
8170
|
nextClicked: _angular_core.OutputEmitterRef<void>;
|
|
7694
|
-
private
|
|
8171
|
+
private appLocale;
|
|
8172
|
+
private intl;
|
|
8173
|
+
private resolvedLocale;
|
|
8174
|
+
/**
|
|
8175
|
+
* Ties the period button to its live region through `aria-describedby`. Counted rather
|
|
8176
|
+
* than drawn at random: two calendars on one page — a start and an end picker, say —
|
|
8177
|
+
* had a real chance of minting the same id out of only 10,000, and a duplicate id
|
|
8178
|
+
* silently unhooks the association with nothing to show for it.
|
|
8179
|
+
*/
|
|
7695
8180
|
periodLabelId: string;
|
|
7696
8181
|
periodLabel: _angular_core.Signal<string>;
|
|
7697
|
-
previousLabel: _angular_core.Signal<
|
|
7698
|
-
nextLabel: _angular_core.Signal<
|
|
8182
|
+
previousLabel: _angular_core.Signal<string>;
|
|
8183
|
+
nextLabel: _angular_core.Signal<string>;
|
|
8184
|
+
periodButtonLabel: _angular_core.Signal<string>;
|
|
7699
8185
|
toggleView(): void;
|
|
7700
8186
|
onPreviousClick(): void;
|
|
7701
8187
|
onNextClick(): void;
|
|
7702
8188
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnCalendarHeaderComponent, never>;
|
|
7703
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnCalendarHeaderComponent, "tn-calendar-header", never, { "currentDate": { "alias": "currentDate"; "required": false; "isSignal": true; }; "currentView": { "alias": "currentView"; "required": false; "isSignal": true; };
|
|
8189
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnCalendarHeaderComponent, "tn-calendar-header", never, { "currentDate": { "alias": "currentDate"; "required": false; "isSignal": true; }; "currentView": { "alias": "currentView"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; }, { "viewChanged": "viewChanged"; "previousClicked": "previousClicked"; "nextClicked": "nextClicked"; }, never, never, true, never>;
|
|
7704
8190
|
}
|
|
7705
8191
|
|
|
8192
|
+
/**
|
|
8193
|
+
* Which background the day indicator paints. Resolved to a single value per cell so
|
|
8194
|
+
* the precedence is stated once, in one place, rather than emerging from the relative
|
|
8195
|
+
* specificity of a handful of CSS rules.
|
|
8196
|
+
*/
|
|
8197
|
+
type CalendarCellFill = 'primary' | 'marked' | 'none';
|
|
7706
8198
|
interface CalendarCell {
|
|
7707
8199
|
value: number;
|
|
7708
8200
|
date: Date;
|
|
@@ -7711,8 +8203,26 @@ interface CalendarCell {
|
|
|
7711
8203
|
enabled: boolean;
|
|
7712
8204
|
selected: boolean;
|
|
7713
8205
|
today: boolean;
|
|
7714
|
-
|
|
7715
|
-
|
|
8206
|
+
/**
|
|
8207
|
+
* `YYYY-MM-DD` for this day, rendered as `data-tn-date`. A handle that survives
|
|
8208
|
+
* translation, for tests that would otherwise match on locale-formatted cell text.
|
|
8209
|
+
*/
|
|
8210
|
+
isoDate: string;
|
|
8211
|
+
/** Whether the date was listed in `markedDates`. */
|
|
8212
|
+
marked: boolean;
|
|
8213
|
+
/**
|
|
8214
|
+
* Whether the day is part of what the caller has chosen — the selected date in
|
|
8215
|
+
* single-date mode, or anywhere from the start to the end of the range in range mode.
|
|
8216
|
+
* Drives `aria-pressed`, which otherwise had nothing to report in range mode.
|
|
8217
|
+
*/
|
|
8218
|
+
inSelection: boolean;
|
|
8219
|
+
/** Background for the day indicator: selection and range caps outrank marking. */
|
|
8220
|
+
fill: CalendarCellFill;
|
|
8221
|
+
/**
|
|
8222
|
+
* Whether the indicator draws the today outline. Suppressed under a primary fill,
|
|
8223
|
+
* where a primary border and primary text would disappear into the fill.
|
|
8224
|
+
*/
|
|
8225
|
+
todayOutline: boolean;
|
|
7716
8226
|
rangeStart?: boolean;
|
|
7717
8227
|
rangeEnd?: boolean;
|
|
7718
8228
|
inRange?: boolean;
|
|
@@ -7723,33 +8233,114 @@ declare class TnMonthViewComponent {
|
|
|
7723
8233
|
minDate: _angular_core.InputSignal<Date | undefined>;
|
|
7724
8234
|
maxDate: _angular_core.InputSignal<Date | undefined>;
|
|
7725
8235
|
dateFilter: _angular_core.InputSignal<((date: Date) => boolean) | undefined>;
|
|
8236
|
+
/**
|
|
8237
|
+
* Dates to flag as noteworthy — days a task runs, days with events, and the like.
|
|
8238
|
+
* Order and time-of-day are ignored; only the calendar day is compared. The
|
|
8239
|
+
* calendar owns how a marked day looks, so callers pass dates rather than styles.
|
|
8240
|
+
*/
|
|
8241
|
+
markedDates: _angular_core.InputSignal<Date[] | undefined>;
|
|
7726
8242
|
rangeMode: _angular_core.InputSignal<boolean>;
|
|
7727
|
-
selectedRange: _angular_core.InputSignal<
|
|
7728
|
-
start: Date | null;
|
|
7729
|
-
end: Date | null;
|
|
7730
|
-
selecting: "start" | "end";
|
|
7731
|
-
} | undefined>;
|
|
8243
|
+
selectedRange: _angular_core.InputSignal<DateRange | undefined>;
|
|
7732
8244
|
selectedChange: _angular_core.OutputEmitterRef<Date>;
|
|
7733
8245
|
activeDateChange: _angular_core.OutputEmitterRef<Date>;
|
|
7734
|
-
|
|
8246
|
+
/**
|
|
8247
|
+
* Locale for dates, weekday names and the first day of the week. Falls back to the
|
|
8248
|
+
* app's `LOCALE_ID`; `tn-calendar` binds it from its own `locale` input.
|
|
8249
|
+
*/
|
|
8250
|
+
locale: _angular_core.InputSignal<string | undefined>;
|
|
8251
|
+
private host;
|
|
8252
|
+
private injector;
|
|
8253
|
+
private appLocale;
|
|
8254
|
+
private intl;
|
|
8255
|
+
private resolvedLocale;
|
|
8256
|
+
/**
|
|
8257
|
+
* Which day the week starts on in this locale, as a `Date.getDay()` index. Everything
|
|
8258
|
+
* about the grid's shape hangs off it: the order of the headings and how many blank
|
|
8259
|
+
* cells precede the 1st.
|
|
8260
|
+
*/
|
|
8261
|
+
private weekStart;
|
|
8262
|
+
/** Day numbers in the locale's own numerals, without a thousands separator. */
|
|
8263
|
+
private dayFormat;
|
|
8264
|
+
/**
|
|
8265
|
+
* Column headings, named and ordered by the locale — Sunday first in the US, Monday
|
|
8266
|
+
* across most of Europe. The dates are an arbitrary week, used only to name the days.
|
|
8267
|
+
*/
|
|
8268
|
+
readonly weekdays: _angular_core.Signal<{
|
|
7735
8269
|
long: string;
|
|
7736
8270
|
short: string;
|
|
7737
|
-
}[]
|
|
8271
|
+
}[]>;
|
|
8272
|
+
private markedDateKeys;
|
|
8273
|
+
/**
|
|
8274
|
+
* Names the grid after the month it shows. Without it a screen-reader user arrowing
|
|
8275
|
+
* around hears each day but never which month they are in — the period only appears in
|
|
8276
|
+
* the header, outside the grid.
|
|
8277
|
+
*/
|
|
8278
|
+
gridLabel: _angular_core.Signal<string>;
|
|
8279
|
+
/**
|
|
8280
|
+
* The day of the month that carries `tabindex="0"` — the grid's single keyboard entry
|
|
8281
|
+
* point, per the roving tabindex pattern.
|
|
8282
|
+
*
|
|
8283
|
+
* It follows `activeDate`, but falls back to the nearest enabled day when that day
|
|
8284
|
+
* can't take focus. Without the fallback a month whose active day is disabled (say,
|
|
8285
|
+
* anything before `minDate`) would have no tabbable cell at all, leaving the grid
|
|
8286
|
+
* unreachable by keyboard. `null` only when the whole month is disabled, where there
|
|
8287
|
+
* is nothing worth focusing anyway.
|
|
8288
|
+
*
|
|
8289
|
+
* Derived from the month rather than from `calendarRows()`, which would be circular.
|
|
8290
|
+
*/
|
|
8291
|
+
activeDay: _angular_core.Signal<number | null>;
|
|
8292
|
+
private activeCellDate;
|
|
7738
8293
|
calendarRows: _angular_core.Signal<CalendarCell[][]>;
|
|
7739
8294
|
private createCell;
|
|
7740
8295
|
private createEmptyCell;
|
|
7741
8296
|
private isDateEnabled;
|
|
7742
|
-
|
|
8297
|
+
/**
|
|
8298
|
+
* Spells out the state a day is in, but only the parts no ARIA attribute already
|
|
8299
|
+
* carries. Selection lives on the button's `aria-pressed` and today on `aria-current`,
|
|
8300
|
+
* so repeating them here had screen readers announce each one twice. Marking and the
|
|
8301
|
+
* range positions have no attribute equivalent, and would otherwise be conveyed by
|
|
8302
|
+
* background colour alone.
|
|
8303
|
+
*/
|
|
7743
8304
|
private formatAriaLabel;
|
|
7744
8305
|
trackByDate(index: number, cell: CalendarCell): string;
|
|
7745
8306
|
trackByRow(index: number): number;
|
|
7746
8307
|
onCellClicked(cell: CalendarCell): void;
|
|
8308
|
+
/**
|
|
8309
|
+
* Moves the roving tabindex. Selection stays on click/Enter/Space, which the cells
|
|
8310
|
+
* are already buttons for, so this only ever changes which day is active.
|
|
8311
|
+
*
|
|
8312
|
+
* Moves that leave the displayed month emit an `activeDateChange` like any other
|
|
8313
|
+
* navigation; the grid re-renders on the new month with the target day active.
|
|
8314
|
+
*/
|
|
8315
|
+
onKeydown(event: KeyboardEvent): void;
|
|
8316
|
+
/**
|
|
8317
|
+
* The day a key aims at, and which way to look from there when that day is disabled.
|
|
8318
|
+
*
|
|
8319
|
+
* The search direction belongs to the key, not to where the target happens to fall
|
|
8320
|
+
* relative to the current day. Home and End mean "the ends of *this* month", so they
|
|
8321
|
+
* search inward: looking outward would step straight into the neighbouring month over
|
|
8322
|
+
* a single filtered-out boundary day and page the view, which is not what either key
|
|
8323
|
+
* promises. The arrows and the paging keys keep travelling the way they were already
|
|
8324
|
+
* headed, and crossing into the next month is the point of those.
|
|
8325
|
+
*/
|
|
8326
|
+
private targetForKey;
|
|
8327
|
+
/**
|
|
8328
|
+
* Steps past days the caller has disabled, so a gap in `dateFilter` or the far side of
|
|
8329
|
+
* `minDate`/`maxDate` doesn't park focus somewhere unusable.
|
|
8330
|
+
*
|
|
8331
|
+
* Searches the way the key asked for (see `targetForKey`), then doubles back if that
|
|
8332
|
+
* finds nothing. The fallback is for the ends of the allowed range: arrowing right at
|
|
8333
|
+
* `maxDate` finds nothing ahead, doubles back onto the day we started from, and the
|
|
8334
|
+
* caller reads that as "don't move".
|
|
8335
|
+
*/
|
|
8336
|
+
private nearestEnabled;
|
|
8337
|
+
/** Bounded, so an everything-disabled filter stops the move instead of spinning. */
|
|
8338
|
+
private scanForEnabled;
|
|
7747
8339
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnMonthViewComponent, never>;
|
|
7748
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnMonthViewComponent, "tn-month-view", never, { "activeDate": { "alias": "activeDate"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "rangeMode": { "alias": "rangeMode"; "required": false; "isSignal": true; }; "selectedRange": { "alias": "selectedRange"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
|
|
8340
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnMonthViewComponent, "tn-month-view", never, { "activeDate": { "alias": "activeDate"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "markedDates": { "alias": "markedDates"; "required": false; "isSignal": true; }; "rangeMode": { "alias": "rangeMode"; "required": false; "isSignal": true; }; "selectedRange": { "alias": "selectedRange"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
|
|
7749
8341
|
}
|
|
7750
8342
|
|
|
7751
8343
|
interface YearCell {
|
|
7752
|
-
value: number;
|
|
7753
8344
|
year: number;
|
|
7754
8345
|
label: string;
|
|
7755
8346
|
ariaLabel: string;
|
|
@@ -7763,25 +8354,86 @@ declare class TnMultiYearViewComponent {
|
|
|
7763
8354
|
minDate: _angular_core.InputSignal<Date | undefined>;
|
|
7764
8355
|
maxDate: _angular_core.InputSignal<Date | undefined>;
|
|
7765
8356
|
dateFilter: _angular_core.InputSignal<((date: Date) => boolean) | undefined>;
|
|
8357
|
+
/**
|
|
8358
|
+
* Locale for the year numerals — Arabic-Indic digits in `ar`, Western in `en`. Falls
|
|
8359
|
+
* back to the app's `LOCALE_ID`; `tn-calendar` binds it from its own `locale` input.
|
|
8360
|
+
*/
|
|
8361
|
+
locale: _angular_core.InputSignal<string | undefined>;
|
|
7766
8362
|
selectedChange: _angular_core.OutputEmitterRef<Date>;
|
|
7767
8363
|
activeDateChange: _angular_core.OutputEmitterRef<Date>;
|
|
7768
|
-
|
|
7769
|
-
|
|
8364
|
+
private host;
|
|
8365
|
+
private injector;
|
|
8366
|
+
private appLocale;
|
|
8367
|
+
private intl;
|
|
8368
|
+
/** Years read out in the locale's own numerals, without a thousands separator. */
|
|
8369
|
+
private yearFormat;
|
|
7770
8370
|
readonly yearsPerRow = 4;
|
|
7771
|
-
readonly yearRowCount
|
|
8371
|
+
readonly yearRowCount: number;
|
|
8372
|
+
/**
|
|
8373
|
+
* The page of years on screen. Pages are fixed blocks, so the active year sits
|
|
8374
|
+
* wherever it falls within one rather than in the middle — see `yearPageStart`.
|
|
8375
|
+
*/
|
|
7772
8376
|
yearRange: _angular_core.Signal<{
|
|
7773
8377
|
start: number;
|
|
7774
8378
|
end: number;
|
|
7775
8379
|
}>;
|
|
8380
|
+
/**
|
|
8381
|
+
* Names the grid after the span of years it shows, so a screen-reader user arrowing
|
|
8382
|
+
* around knows which page they are on rather than just hearing bare years.
|
|
8383
|
+
*/
|
|
8384
|
+
gridLabel: _angular_core.Signal<string>;
|
|
7776
8385
|
yearRows: _angular_core.Signal<YearCell[][]>;
|
|
8386
|
+
/**
|
|
8387
|
+
* The year that carries `tabindex="0"` — the grid's single keyboard entry point, per
|
|
8388
|
+
* the roving tabindex pattern. Follows `activeDate`, falling back to the nearest
|
|
8389
|
+
* enabled year in the page so a range whose active year is disabled still has a
|
|
8390
|
+
* tabbable cell. `null` only when every year on the page is disabled.
|
|
8391
|
+
*/
|
|
8392
|
+
activeYear: _angular_core.Signal<number | null>;
|
|
7777
8393
|
private createYearCell;
|
|
7778
8394
|
private isYearEnabled;
|
|
8395
|
+
/**
|
|
8396
|
+
* Selection is carried by the button's `aria-pressed`, so it is deliberately not
|
|
8397
|
+
* repeated here. "Current year" stays: `aria-current="date"` on a year cell is vague
|
|
8398
|
+
* enough that spelling it out earns its place.
|
|
8399
|
+
*/
|
|
7779
8400
|
private formatYearAriaLabel;
|
|
7780
8401
|
trackByYear(index: number, cell: YearCell): number;
|
|
7781
8402
|
trackByRow(index: number, row: YearCell[]): string;
|
|
7782
8403
|
onYearClicked(cell: YearCell): void;
|
|
8404
|
+
/**
|
|
8405
|
+
* Moves the roving tabindex across the year grid. Picking a year stays on
|
|
8406
|
+
* click/Enter/Space, which the cells are already buttons for.
|
|
8407
|
+
*
|
|
8408
|
+
* Moves past either end of the 24-year page emit an `activeDateChange` like the
|
|
8409
|
+
* header's paging buttons do, and the grid re-renders on the neighbouring page.
|
|
8410
|
+
*/
|
|
8411
|
+
onKeydown(event: KeyboardEvent): void;
|
|
8412
|
+
/**
|
|
8413
|
+
* The year a key aims at, and which way to look from there when that year is disabled.
|
|
8414
|
+
*
|
|
8415
|
+
* The search direction belongs to the key, not to where the target happens to fall
|
|
8416
|
+
* relative to the current year. Home and End mean "the ends of *this* page", so they
|
|
8417
|
+
* search inward: looking outward would step onto the neighbouring 24-year page over a
|
|
8418
|
+
* single ruled-out boundary year and turn the page, which is not what either key
|
|
8419
|
+
* promises. The arrows and the paging keys keep travelling the way they were already
|
|
8420
|
+
* headed, and moving onto the next page is the point of those.
|
|
8421
|
+
*/
|
|
8422
|
+
private targetForKey;
|
|
8423
|
+
/**
|
|
8424
|
+
* Steps past years the caller has disabled, so `minDate`/`maxDate` don't park focus
|
|
8425
|
+
* somewhere unusable.
|
|
8426
|
+
*
|
|
8427
|
+
* Searches the way the key asked for (see `targetForKey`), then doubles back if that
|
|
8428
|
+
* finds nothing. The fallback is for the ends of the allowed range: arrowing right at
|
|
8429
|
+
* `maxDate` finds nothing ahead, doubles back onto the year we started from, and the
|
|
8430
|
+
* caller reads that as "don't move".
|
|
8431
|
+
*/
|
|
8432
|
+
private nearestEnabledYear;
|
|
8433
|
+
/** Bounded, so an everything-disabled range stops the move instead of spinning. */
|
|
8434
|
+
private scanForEnabledYear;
|
|
7783
8435
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TnMultiYearViewComponent, never>;
|
|
7784
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnMultiYearViewComponent, "tn-multi-year-view", never, { "activeDate": { "alias": "activeDate"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
|
|
8436
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TnMultiYearViewComponent, "tn-multi-year-view", never, { "activeDate": { "alias": "activeDate"; "required": false; "isSignal": true; }; "selected": { "alias": "selected"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "activeDateChange": "activeDateChange"; }, never, never, true, never>;
|
|
7785
8437
|
}
|
|
7786
8438
|
|
|
7787
8439
|
declare class TnDateInputComponent implements ControlValueAccessor, OnInit, OnDestroy {
|
|
@@ -7803,9 +8455,7 @@ declare class TnDateInputComponent implements ControlValueAccessor, OnInit, OnDe
|
|
|
7803
8455
|
dayRef: _angular_core.Signal<ElementRef<HTMLInputElement>>;
|
|
7804
8456
|
yearRef: _angular_core.Signal<ElementRef<HTMLInputElement>>;
|
|
7805
8457
|
calendarTemplate: _angular_core.Signal<TemplateRef<unknown>>;
|
|
7806
|
-
calendar: _angular_core.Signal<TnCalendarComponent>;
|
|
7807
8458
|
wrapperEl: _angular_core.Signal<ElementRef<HTMLDivElement>>;
|
|
7808
|
-
private destroy$;
|
|
7809
8459
|
private overlayRef?;
|
|
7810
8460
|
private portal?;
|
|
7811
8461
|
isOpen: _angular_core.WritableSignal<boolean>;
|
|
@@ -10289,5 +10939,5 @@ declare const TN_THEME_DEFINITIONS: readonly TnThemeDefinition[];
|
|
|
10289
10939
|
*/
|
|
10290
10940
|
declare const THEME_MAP: Map<TnTheme, TnThemeDefinition>;
|
|
10291
10941
|
|
|
10292
|
-
export { CommonShortcuts, DEFAULT_THEME, DiskIconComponent, DiskType, FileSizePipe, InputType, LIGHT_THEME, LabelMarkupPipe, LabelTextPipe, LinuxModifierKeys, LinuxShortcuts, ModifierKeys, QuickShortcuts, ShortcutBuilder, THEME_MAP, THEME_STORAGE_KEY, TN_FORM_FIELD_CONTEXT, TN_FORM_FIELD_ERRORS, TN_TABLE_PAGER_DEFAULT_LABELS, TN_TABLE_PAGER_LABELS, TN_TEST_ATTR, TN_THEME_DEFINITIONS, TnAutocompleteComponent, TnAutocompleteHarness, TnBannerActionDirective, TnBannerComponent, TnBannerHarness, TnBrandedSpinnerComponent, TnButtonComponent, TnButtonHarness, TnButtonToggleComponent, TnButtonToggleGroupComponent, TnButtonToggleGroupHarness, TnButtonToggleHarness, TnCalendarComponent, TnCalendarHeaderComponent, TnCardComponent, TnCardFooterActionsDirective, TnCardHeaderActionsDirective, TnCardHeaderDirective, TnCellDefDirective, TnCheckboxComponent, TnCheckboxHarness, TnCheckboxLabelDirective, TnChipComponent, TnChipHarness, TnChipInputComponent, TnChipInputHarness, TnConfirmDialogComponent, TnDateInputComponent, TnDateInputHarness, TnDateRangeInputComponent, TnDateRangeInputHarness, TnDetailRowDefDirective, TnDialog, TnDialogHarness, TnDialogShellComponent, TnDialogTesting, TnDividerComponent, TnDividerDirective, TnDrawerComponent, TnDrawerContainerComponent, TnDrawerContainerHarness, TnDrawerContentComponent, TnDrawerHarness, TnEmptyComponent, TnEmptyHarness, TnExpansionPanelComponent, TnExpansionPanelHarness, TnFileInputComponent, TnFileInputHarness, TnFilePickerComponent, TnFilePickerHarness, TnFilePickerPopupComponent, TnFormFieldComponent, TnFormFieldHarness, TnFormSectionComponent, TnFormSectionHarness, TnHeaderCellDefDirective, TnIconButtonComponent, TnIconButtonHarness, TnIconComponent, TnIconHarness, TnIconRegistryService, TnIconTesting, TnInputComponent, TnInputDirective, TnInputHarness, TnKeyboardShortcutComponent, TnKeyboardShortcutService, TnListAvatarDirective, TnListComponent, TnListIconDirective, TnListItemComponent, TnListItemLineDirective, TnListItemPrimaryDirective, TnListItemSecondaryDirective, TnListItemTitleDirective, TnListItemTrailingDirective, TnListOptionComponent, TnListSubheaderComponent, TnMenuActivateHoverDirective, TnMenuComponent, TnMenuHarness, TnMenuItemComponent, TnMenuTesting, TnMenuTriggerDirective, TnMonthViewComponent, TnMultiYearViewComponent, TnNestedTreeDataSource, TnNestedTreeNodeComponent, TnParticleProgressBarComponent, TnProgressBarComponent, TnRadioComponent, TnRadioHarness, TnSelectComponent, TnSelectHarness, TnSelectionListComponent, TnSidePanelActionDirective, TnSidePanelComponent, TnSidePanelHarness, TnSidePanelHeaderActionDirective, TnSlideToggleComponent, TnSlideToggleHarness, TnSliderComponent, TnSliderThumbDirective, TnSliderWithLabelDirective, TnSpinnerComponent, TnSpriteLoaderService, TnStepComponent, TnStepperComponent, TnStepperHarness, TnStepperNextDirective, TnStepperPreviousDirective, TnTabComponent, TnTabHarness, TnTabPanelComponent, TnTabPanelHarness, TnTableColumnDirective, TnTableComponent, TnTableHarness, TnTablePagerComponent, TnTablePagerHarness, TnTabsComponent, TnTabsHarness, TnTestIdDirective, TnTheme, TnThemeService, TnTimeInputComponent, TnToastComponent, TnToastMock, TnToastPosition, TnToastRef, TnToastService, TnToastTesting, TnToastType, TnTooltipComponent, TnTooltipDirective, TnTreeComponent, TnTreeFlatDataSource, TnTreeFlattener, TnTreeHarness, TnTreeNodeComponent, TnTreeNodeHarness, TnTreeNodeOutletDirective, TnTreeVirtualScrollNodeOutletDirective, TnTreeVirtualScrollViewComponent, TnTreeVirtualScrollViewHarness, TruncatePathPipe, WindowsModifierKeys, WindowsShortcuts, allowsCurrentDirectorySelection, composeTestId, controlTestId, createFlatTreeControl, createLucideLibrary, createNestedTreeControl, createShortcut, defaultSpriteBasePath, defaultSpriteConfigPath, defaultTreeItemSize, formatSize, getSelectableTypes, injectTnFormFieldAria, isPathWithinRoot, kebabTestSegment, labelMarkupToHtml, labelMarkupToText, libIconMarker, normalizeRootPath, optionTestId, parseLabelMarkup, parseSize, registerLucideIcons, scopeTestId, setupLucideIntegration, tnIconMarker, writeTestId };
|
|
10293
|
-
export type { AutocompleteHarnessFilters, BannerHarnessFilters, ButtonHarnessFilters, ButtonToggleHarnessFilters, CalendarCell, CheckboxHarnessFilters, ChipColor, ChipHarnessFilters, DateInputHarnessFilters, DateRange, DateRangeInputHarnessFilters, DialogHarnessFilters, EmptyHarnessFilters, ExpansionPanelHarnessFilters, FileInputHarnessFilters, FilePickerCallbacks, FilePickerCreateAction, FilePickerCreateActionEvent, FilePickerError, FilePickerHarnessFilters, FilePickerMode, FileSystemItem, FileSystemItemType, FlatTreeControlOptions, FormFieldHarnessFilters, FormSectionHarnessFilters, IconButtonHarnessFilters, IconHarnessFilters, IconLibrary, IconLibraryType, IconResult, IconSize, IconSource, IconTestingMockOverrides, InputHarnessFilters, KeyCombination, LabelMarkupSegment, LabelMarkupSegmentType, LabelType, LucideIconOptions, MenuHarnessFilters, MockIconRegistry, MockSpriteLoader, NestedTreeControlOptions, PathSegment, PlatformType, ProgressBarMode, RadioHarnessFilters, ResolvedIcon, SelectHarnessFilters, ShortcutHandler, SidePanelHarnessFilters, SizeStandard, SlideToggleColor, SlideToggleHarnessFilters, SpinnerMode, SpriteConfig, StepperHarnessFilters, SubscriptSizing, TabChangeEvent, TabHarnessFilters, TabPanelHarnessFilters, TabsHarnessFilters, TnAutocompleteOption, TnBannerType, TnButtonToggleType, TnCardAction, TnCardControl, TnCardFooterLink, TnCardHeaderStatus, TnChipInputHarnessFilters, TnChipInputOption, TnConfirmDialogData, TnDialogDefaults, TnDialogOpenTarget, TnDrawerMode, TnDrawerPosition, TnEmptySize, TnFlatTreeNode, TnFormFieldAriaBindings, TnFormFieldContext, TnFormFieldErrorMessage, TnFormFieldErrorMessages, TnFormFieldErrorResolver, TnMenuItem, TnOptionTestIdSource, TnSelectOption, TnSelectOptionGroup, TnSelectionChange, TnSortEvent, TnTableDataProvider, TnTableDataSource, TnTableHarnessFilters, TnTablePagerHarnessFilters, TnTablePagerLabels, TnTablePagination, TnTestAttrName, TnTestIdValue, TnThemeDefinition, TnToastCall, TnToastConfig, TnTreeExpansion, TnTreeHarnessFilters, TnTreeNodeHarnessFilters, TnTreeVirtualNodeData, TnTreeVirtualScrollViewHarnessFilters, TooltipPosition, YearCell };
|
|
10942
|
+
export { CommonShortcuts, DEFAULT_THEME, DiskIconComponent, DiskType, FileSizePipe, InputType, LIGHT_THEME, LabelMarkupPipe, LabelTextPipe, LinuxModifierKeys, LinuxShortcuts, ModifierKeys, QuickShortcuts, ShortcutBuilder, THEME_MAP, THEME_STORAGE_KEY, TN_CALENDAR_INTL, TN_CALENDAR_INTL_DEFAULTS, TN_FORM_FIELD_CONTEXT, TN_FORM_FIELD_ERRORS, TN_TABLE_PAGER_DEFAULT_LABELS, TN_TABLE_PAGER_LABELS, TN_TEST_ATTR, TN_THEME_DEFINITIONS, TnAutocompleteComponent, TnAutocompleteHarness, TnBannerActionDirective, TnBannerComponent, TnBannerHarness, TnBrandedSpinnerComponent, TnButtonComponent, TnButtonHarness, TnButtonToggleComponent, TnButtonToggleGroupComponent, TnButtonToggleGroupHarness, TnButtonToggleHarness, TnCalendarCellHarness, TnCalendarComponent, TnCalendarHarness, TnCalendarHeaderComponent, TnCardComponent, TnCardFooterActionsDirective, TnCardHeaderActionsDirective, TnCardHeaderDirective, TnCellDefDirective, TnCheckboxComponent, TnCheckboxHarness, TnCheckboxLabelDirective, TnChipComponent, TnChipHarness, TnChipInputComponent, TnChipInputHarness, TnConfirmDialogComponent, TnDateInputComponent, TnDateInputHarness, TnDateRangeInputComponent, TnDateRangeInputHarness, TnDetailRowDefDirective, TnDialog, TnDialogHarness, TnDialogShellComponent, TnDialogTesting, TnDividerComponent, TnDividerDirective, TnDrawerComponent, TnDrawerContainerComponent, TnDrawerContainerHarness, TnDrawerContentComponent, TnDrawerHarness, TnEmptyComponent, TnEmptyHarness, TnExpansionPanelComponent, TnExpansionPanelHarness, TnFileInputComponent, TnFileInputHarness, TnFilePickerComponent, TnFilePickerHarness, TnFilePickerPopupComponent, TnFormFieldComponent, TnFormFieldHarness, TnFormSectionComponent, TnFormSectionHarness, TnHeaderCellDefDirective, TnIconButtonComponent, TnIconButtonHarness, TnIconComponent, TnIconHarness, TnIconRegistryService, TnIconTesting, TnInputComponent, TnInputDirective, TnInputHarness, TnKeyboardShortcutComponent, TnKeyboardShortcutService, TnListAvatarDirective, TnListComponent, TnListIconDirective, TnListItemComponent, TnListItemLineDirective, TnListItemPrimaryDirective, TnListItemSecondaryDirective, TnListItemTitleDirective, TnListItemTrailingDirective, TnListOptionComponent, TnListSubheaderComponent, TnMenuActivateHoverDirective, TnMenuComponent, TnMenuHarness, TnMenuItemComponent, TnMenuTesting, TnMenuTriggerDirective, TnMonthViewComponent, TnMultiYearViewComponent, TnNestedTreeDataSource, TnNestedTreeNodeComponent, TnParticleProgressBarComponent, TnProgressBarComponent, TnRadioComponent, TnRadioHarness, TnSelectComponent, TnSelectHarness, TnSelectionListComponent, TnSidePanelActionDirective, TnSidePanelComponent, TnSidePanelHarness, TnSidePanelHeaderActionDirective, TnSlideToggleComponent, TnSlideToggleHarness, TnSliderComponent, TnSliderThumbDirective, TnSliderWithLabelDirective, TnSpinnerComponent, TnSpriteLoaderService, TnStepComponent, TnStepperComponent, TnStepperHarness, TnStepperNextDirective, TnStepperPreviousDirective, TnTabComponent, TnTabHarness, TnTabPanelComponent, TnTabPanelHarness, TnTableColumnDirective, TnTableComponent, TnTableHarness, TnTablePagerComponent, TnTablePagerHarness, TnTabsComponent, TnTabsHarness, TnTestIdDirective, TnTheme, TnThemeService, TnTimeInputComponent, TnToastComponent, TnToastMock, TnToastPosition, TnToastRef, TnToastService, TnToastTesting, TnToastType, TnTooltipComponent, TnTooltipDirective, TnTreeComponent, TnTreeFlatDataSource, TnTreeFlattener, TnTreeHarness, TnTreeNodeComponent, TnTreeNodeHarness, TnTreeNodeOutletDirective, TnTreeVirtualScrollNodeOutletDirective, TnTreeVirtualScrollViewComponent, TnTreeVirtualScrollViewHarness, TruncatePathPipe, WindowsModifierKeys, WindowsShortcuts, allowsCurrentDirectorySelection, composeTestId, controlTestId, createFlatTreeControl, createLucideLibrary, createNestedTreeControl, createShortcut, defaultSpriteBasePath, defaultSpriteConfigPath, defaultTreeItemSize, formatSize, getSelectableTypes, injectTnCalendarIntl, injectTnFormFieldAria, isPathWithinRoot, kebabTestSegment, labelMarkupToHtml, labelMarkupToText, libIconMarker, normalizeRootPath, optionTestId, parseLabelMarkup, parseSize, registerLucideIcons, scopeTestId, setupLucideIntegration, tnIconMarker, writeTestId };
|
|
10943
|
+
export type { AutocompleteHarnessFilters, BannerHarnessFilters, ButtonHarnessFilters, ButtonToggleHarnessFilters, CalendarCell, CalendarCellFill, CalendarCellHarnessFilters, CalendarHarnessFilters, CheckboxHarnessFilters, ChipColor, ChipHarnessFilters, DateInputHarnessFilters, DateRange, DateRangeInputHarnessFilters, DialogHarnessFilters, EmptyHarnessFilters, ExpansionPanelHarnessFilters, FileInputHarnessFilters, FilePickerCallbacks, FilePickerCreateAction, FilePickerCreateActionEvent, FilePickerError, FilePickerHarnessFilters, FilePickerMode, FileSystemItem, FileSystemItemType, FlatTreeControlOptions, FormFieldHarnessFilters, FormSectionHarnessFilters, IconButtonHarnessFilters, IconHarnessFilters, IconLibrary, IconLibraryType, IconResult, IconSize, IconSource, IconTestingMockOverrides, InputHarnessFilters, KeyCombination, LabelMarkupSegment, LabelMarkupSegmentType, LabelType, LucideIconOptions, MenuHarnessFilters, MockIconRegistry, MockSpriteLoader, NestedTreeControlOptions, PathSegment, PlatformType, ProgressBarMode, RadioHarnessFilters, ResolvedIcon, SelectHarnessFilters, ShortcutHandler, SidePanelHarnessFilters, SizeStandard, SlideToggleColor, SlideToggleHarnessFilters, SpinnerMode, SpriteConfig, StepperHarnessFilters, SubscriptSizing, TabChangeEvent, TabHarnessFilters, TabPanelHarnessFilters, TabsHarnessFilters, TnAutocompleteOption, TnBannerType, TnButtonToggleType, TnCalendarIntl, TnCalendarIntlInput, TnCalendarView, TnCardAction, TnCardControl, TnCardFooterLink, TnCardHeaderStatus, TnChipInputHarnessFilters, TnChipInputOption, TnConfirmDialogData, TnDialogDefaults, TnDialogOpenTarget, TnDrawerMode, TnDrawerPosition, TnEmptySize, TnFlatTreeNode, TnFormFieldAriaBindings, TnFormFieldContext, TnFormFieldErrorMessage, TnFormFieldErrorMessages, TnFormFieldErrorResolver, TnMenuItem, TnOptionTestIdSource, TnSelectOption, TnSelectOptionGroup, TnSelectionChange, TnSortEvent, TnTableDataProvider, TnTableDataSource, TnTableHarnessFilters, TnTablePagerHarnessFilters, TnTablePagerLabels, TnTablePagination, TnTestAttrName, TnTestIdValue, TnThemeDefinition, TnToastCall, TnToastConfig, TnTreeExpansion, TnTreeHarnessFilters, TnTreeNodeHarnessFilters, TnTreeVirtualNodeData, TnTreeVirtualScrollViewHarnessFilters, TooltipPosition, YearCell };
|