@cdevhub/ngx-tw 0.5.0 → 0.6.1
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/README.md +78 -15
- package/fesm2022/cdevhub-ngx-tw-accordion.mjs +16 -5
- package/fesm2022/cdevhub-ngx-tw-accordion.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-avatar.mjs +26 -15
- package/fesm2022/cdevhub-ngx-tw-avatar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-badge.mjs +17 -5
- package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs +27 -6
- package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-button.mjs +23 -11
- package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs +5 -5
- package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs +3 -3
- package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs +427 -122
- package/fesm2022/cdevhub-ngx-tw-calendar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-card.mjs +21 -11
- package/fesm2022/cdevhub-ngx-tw-card.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs +215 -96
- package/fesm2022/cdevhub-ngx-tw-carousel.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs +108 -64
- package/fesm2022/cdevhub-ngx-tw-checkbox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs +18 -6
- package/fesm2022/cdevhub-ngx-tw-code-block.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs +55 -30
- package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-combobox-testing.mjs +218 -0
- package/fesm2022/cdevhub-ngx-tw-combobox-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs +236 -211
- package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-command-palette-testing.mjs +200 -0
- package/fesm2022/cdevhub-ngx-tw-command-palette-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs +34 -7
- package/fesm2022/cdevhub-ngx-tw-command-palette.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-core.mjs +135 -15
- package/fesm2022/cdevhub-ngx-tw-core.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-picker-testing.mjs +203 -0
- package/fesm2022/cdevhub-ngx-tw-date-picker-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +160 -102
- package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-date-range-picker-testing.mjs +209 -0
- package/fesm2022/cdevhub-ngx-tw-date-range-picker-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs +182 -107
- package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-dialog-testing.mjs +122 -0
- package/fesm2022/cdevhub-ngx-tw-dialog-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs +11 -2
- package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-empty-state.mjs +1 -1
- package/fesm2022/cdevhub-ngx-tw-empty-state.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-file-upload-testing.mjs +149 -0
- package/fesm2022/cdevhub-ngx-tw-file-upload-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-file-upload.mjs +57 -67
- package/fesm2022/cdevhub-ngx-tw-file-upload.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-flip-card.mjs +42 -24
- package/fesm2022/cdevhub-ngx-tw-flip-card.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs +114 -21
- package/fesm2022/cdevhub-ngx-tw-form-field.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-icon.mjs +16 -6
- package/fesm2022/cdevhub-ngx-tw-icon.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-input.mjs +52 -61
- package/fesm2022/cdevhub-ngx-tw-input.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-item.mjs +28 -4
- package/fesm2022/cdevhub-ngx-tw-item.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-menu-testing.mjs +168 -0
- package/fesm2022/cdevhub-ngx-tw-menu-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-menu.mjs +58 -21
- package/fesm2022/cdevhub-ngx-tw-menu.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-number-input.mjs +34 -1
- package/fesm2022/cdevhub-ngx-tw-number-input.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs +95 -45
- package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-popover.mjs +81 -32
- package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs +1 -1
- package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-radio.mjs +131 -98
- package/fesm2022/cdevhub-ngx-tw-radio.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs +207 -42
- package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-select-testing.mjs +165 -0
- package/fesm2022/cdevhub-ngx-tw-select-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-select.mjs +386 -210
- package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -1
- package/fesm2022/{cdevhub-ngx-tw-sheet-sheet-renderer-ByyNluUd.mjs → cdevhub-ngx-tw-sheet-sheet-renderer-CqVJwgmp.mjs} +3 -3
- package/fesm2022/cdevhub-ngx-tw-sheet-sheet-renderer-CqVJwgmp.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-sheet-testing.mjs +129 -0
- package/fesm2022/cdevhub-ngx-tw-sheet-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs +23 -7
- package/fesm2022/cdevhub-ngx-tw-sheet.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-slider.mjs +89 -54
- package/fesm2022/cdevhub-ngx-tw-slider.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-sort.mjs +122 -17
- package/fesm2022/cdevhub-ngx-tw-sort.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-split.mjs +72 -19
- package/fesm2022/cdevhub-ngx-tw-split.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-stat.mjs +63 -25
- package/fesm2022/cdevhub-ngx-tw-stat.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs +35 -8
- package/fesm2022/cdevhub-ngx-tw-stepper.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-switch.mjs +54 -48
- package/fesm2022/cdevhub-ngx-tw-switch.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs +12 -15
- package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-table.mjs +74 -13
- package/fesm2022/cdevhub-ngx-tw-table.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs +84 -30
- package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tags-input-testing.mjs +172 -0
- package/fesm2022/cdevhub-ngx-tw-tags-input-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-tags-input.mjs +107 -71
- package/fesm2022/cdevhub-ngx-tw-tags-input.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs +41 -9
- package/fesm2022/cdevhub-ngx-tw-textarea.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-theme.mjs +257 -45
- package/fesm2022/cdevhub-ngx-tw-theme.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-time-picker-testing.mjs +201 -0
- package/fesm2022/cdevhub-ngx-tw-time-picker-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs +184 -77
- package/fesm2022/cdevhub-ngx-tw-time-picker.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-timeline.mjs +110 -27
- package/fesm2022/cdevhub-ngx-tw-timeline.mjs.map +1 -1
- package/fesm2022/{cdevhub-ngx-tw-toast-toast-renderer-DSu4YoTy.mjs → cdevhub-ngx-tw-toast-toast-renderer-BlDxemsU.mjs} +107 -19
- package/fesm2022/cdevhub-ngx-tw-toast-toast-renderer-BlDxemsU.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-toast.mjs +21 -13
- package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tooltip.mjs +102 -15
- package/fesm2022/cdevhub-ngx-tw-tooltip.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-transfer-testing.mjs +219 -0
- package/fesm2022/cdevhub-ngx-tw-transfer-testing.mjs.map +1 -0
- package/fesm2022/cdevhub-ngx-tw-transfer.mjs +88 -69
- package/fesm2022/cdevhub-ngx-tw-transfer.mjs.map +1 -1
- package/fesm2022/cdevhub-ngx-tw-tree.mjs +68 -19
- package/fesm2022/cdevhub-ngx-tw-tree.mjs.map +1 -1
- package/index.json +1 -1
- package/package.json +63 -2
- package/theme/_base.css +13 -0
- package/theme/_dark.css +111 -36
- package/theme/_high-contrast-dark.css +367 -0
- package/theme/_high-contrast.css +13 -2
- package/theme/_light.css +332 -0
- package/theme/_semantic.css +60 -26
- package/theme/_typography.css +17 -0
- package/theme/index.css +86 -7
- package/types/cdevhub-ngx-tw-accordion.d.ts +12 -4
- package/types/cdevhub-ngx-tw-avatar.d.ts +10 -3
- package/types/cdevhub-ngx-tw-button.d.ts +1 -0
- package/types/cdevhub-ngx-tw-calendar-luxon.d.ts +2 -2
- package/types/cdevhub-ngx-tw-calendar-testing.d.ts +1 -1
- package/types/cdevhub-ngx-tw-calendar.d.ts +179 -73
- package/types/cdevhub-ngx-tw-card.d.ts +11 -3
- package/types/cdevhub-ngx-tw-carousel.d.ts +89 -20
- package/types/cdevhub-ngx-tw-checkbox.d.ts +40 -12
- package/types/cdevhub-ngx-tw-code-block.d.ts +11 -2
- package/types/cdevhub-ngx-tw-collapsible.d.ts +32 -5
- package/types/cdevhub-ngx-tw-combobox-testing.d.ts +157 -0
- package/types/cdevhub-ngx-tw-combobox.d.ts +94 -53
- package/types/cdevhub-ngx-tw-command-palette-testing.d.ts +136 -0
- package/types/cdevhub-ngx-tw-command-palette.d.ts +33 -5
- package/types/cdevhub-ngx-tw-core.d.ts +152 -21
- package/types/cdevhub-ngx-tw-date-picker-testing.d.ts +141 -0
- package/types/cdevhub-ngx-tw-date-picker.d.ts +37 -29
- package/types/cdevhub-ngx-tw-date-range-picker-testing.d.ts +148 -0
- package/types/cdevhub-ngx-tw-date-range-picker.d.ts +36 -29
- package/types/cdevhub-ngx-tw-dialog-testing.d.ts +98 -0
- package/types/cdevhub-ngx-tw-dialog.d.ts +12 -3
- package/types/cdevhub-ngx-tw-file-upload-testing.d.ts +120 -0
- package/types/cdevhub-ngx-tw-file-upload.d.ts +8 -10
- package/types/cdevhub-ngx-tw-flip-card.d.ts +18 -11
- package/types/cdevhub-ngx-tw-form-field.d.ts +19 -2
- package/types/cdevhub-ngx-tw-icon.d.ts +3 -3
- package/types/cdevhub-ngx-tw-input.d.ts +5 -8
- package/types/cdevhub-ngx-tw-item.d.ts +2 -0
- package/types/cdevhub-ngx-tw-menu-testing.d.ts +131 -0
- package/types/cdevhub-ngx-tw-menu.d.ts +2 -2
- package/types/cdevhub-ngx-tw-number-input.d.ts +20 -0
- package/types/cdevhub-ngx-tw-paginator.d.ts +58 -24
- package/types/cdevhub-ngx-tw-popover.d.ts +41 -10
- package/types/cdevhub-ngx-tw-progress-bar.d.ts +1 -1
- package/types/cdevhub-ngx-tw-radio.d.ts +68 -25
- package/types/cdevhub-ngx-tw-segmented-control.d.ts +79 -16
- package/types/cdevhub-ngx-tw-select-testing.d.ts +114 -0
- package/types/cdevhub-ngx-tw-select.d.ts +104 -33
- package/types/cdevhub-ngx-tw-sheet-testing.d.ts +104 -0
- package/types/cdevhub-ngx-tw-sheet.d.ts +19 -3
- package/types/cdevhub-ngx-tw-slider.d.ts +79 -25
- package/types/cdevhub-ngx-tw-sort.d.ts +45 -4
- package/types/cdevhub-ngx-tw-split.d.ts +32 -2
- package/types/cdevhub-ngx-tw-stat.d.ts +14 -4
- package/types/cdevhub-ngx-tw-stepper.d.ts +16 -2
- package/types/cdevhub-ngx-tw-switch.d.ts +35 -13
- package/types/cdevhub-ngx-tw-tab-nav.d.ts +7 -6
- package/types/cdevhub-ngx-tw-table.d.ts +53 -10
- package/types/cdevhub-ngx-tw-tabs.d.ts +41 -10
- package/types/cdevhub-ngx-tw-tags-input-testing.d.ts +135 -0
- package/types/cdevhub-ngx-tw-tags-input.d.ts +26 -11
- package/types/cdevhub-ngx-tw-textarea.d.ts +3 -2
- package/types/cdevhub-ngx-tw-theme.d.ts +245 -39
- package/types/cdevhub-ngx-tw-time-picker-testing.d.ts +129 -0
- package/types/cdevhub-ngx-tw-time-picker.d.ts +76 -19
- package/types/cdevhub-ngx-tw-timeline.d.ts +36 -12
- package/types/cdevhub-ngx-tw-toast.d.ts +20 -6
- package/types/cdevhub-ngx-tw-tooltip.d.ts +28 -6
- package/types/cdevhub-ngx-tw-transfer-testing.d.ts +152 -0
- package/types/cdevhub-ngx-tw-transfer.d.ts +21 -8
- package/types/cdevhub-ngx-tw-tree.d.ts +6 -1
- package/fesm2022/cdevhub-ngx-tw-sheet-sheet-renderer-ByyNluUd.mjs.map +0 -1
- package/fesm2022/cdevhub-ngx-tw-toast-toast-renderer-DSu4YoTy.mjs.map +0 -1
|
@@ -17,6 +17,13 @@ interface AvatarAppearance {
|
|
|
17
17
|
* Injection token used by `AvatarGroupComponent` to propagate its size
|
|
18
18
|
* to child avatars. When present, overrides the individual avatar's `size` input.
|
|
19
19
|
*/
|
|
20
|
+
declare const TW_AVATAR_GROUP_SIZE: InjectionToken<() => TwSize>;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Renamed to {@link TW_AVATAR_GROUP_SIZE} for consistency with every
|
|
23
|
+
* other ngx-tw injection token. This is the *same token instance*, not a copy —
|
|
24
|
+
* providing under either name and injecting under the other resolves — so the
|
|
25
|
+
* rename is safe to adopt incrementally. Removed in the next major.
|
|
26
|
+
*/
|
|
20
27
|
declare const AVATAR_GROUP_SIZE: InjectionToken<() => TwSize>;
|
|
21
28
|
declare class AvatarComponent {
|
|
22
29
|
/** URL of the avatar image. When set, renders an `<img>`. Falls back to initials or projected content on load error. Defaults to `null`. */
|
|
@@ -64,7 +71,7 @@ declare class AvatarGroupComponent {
|
|
|
64
71
|
readonly size: _angular_core.InputSignal<TwSize>;
|
|
65
72
|
/** Maximum number of avatars to display. Remaining count is shown as a "+N" overflow indicator. Defaults to `null` (show all). */
|
|
66
73
|
readonly max: _angular_core.InputSignal<number | null>;
|
|
67
|
-
/** Accessible label for the avatar group
|
|
74
|
+
/** Accessible label for the avatar group, mirrored to `aria-label`. Defaults to `'Avatar group'` (English) — override for localisation. */
|
|
68
75
|
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
69
76
|
private readonly avatars;
|
|
70
77
|
readonly overflowCount: _angular_core.Signal<number>;
|
|
@@ -72,8 +79,8 @@ declare class AvatarGroupComponent {
|
|
|
72
79
|
readonly overflowClasses: _angular_core.Signal<string>;
|
|
73
80
|
private readonly visibilityEffect;
|
|
74
81
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AvatarGroupComponent, never>;
|
|
75
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvatarGroupComponent, "tw-avatar-group", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "
|
|
82
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AvatarGroupComponent, "tw-avatar-group", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; }, {}, ["avatars"], ["*"], true, never>;
|
|
76
83
|
}
|
|
77
84
|
|
|
78
|
-
export { AVATAR_GROUP_SIZE, AvatarComponent, AvatarGroupComponent };
|
|
85
|
+
export { AVATAR_GROUP_SIZE, AvatarComponent, AvatarGroupComponent, TW_AVATAR_GROUP_SIZE };
|
|
79
86
|
export type { AvatarAppearance, AvatarRounded, AvatarStatus };
|
|
@@ -49,6 +49,7 @@ declare class ButtonDirective implements OnInit {
|
|
|
49
49
|
readonly isNativeButton: _angular_core.Signal<boolean>;
|
|
50
50
|
readonly classes: _angular_core.Signal<string>;
|
|
51
51
|
ngOnInit(): void;
|
|
52
|
+
/** @internal Swallows clicks while the button is disabled or loading, so neither navigation nor consumer handlers run. */
|
|
52
53
|
handleClick(event: MouseEvent): void;
|
|
53
54
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonDirective, never>;
|
|
54
55
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ButtonDirective, "[twButton]", ["twButton"], { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -20,7 +20,7 @@ interface TwLuxonDateFormat {
|
|
|
20
20
|
readonly preset?: Intl.DateTimeFormatOptions;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* Luxon-backed `DateAdapter`. Honors the calendar's `
|
|
23
|
+
* Luxon-backed `DateAdapter`. Honors the calendar's `TW_TZ_OVERRIDE` injection
|
|
24
24
|
* token so `today()` resolves against the consumer-configured timezone, and
|
|
25
25
|
* implements the §20.2 TZ-aware virtuals (`getTimezone`, `withTimezone`,
|
|
26
26
|
* `isDST`, `resolveAmbiguous`).
|
|
@@ -45,7 +45,7 @@ declare class LuxonDateAdapter extends DateAdapter<DateTime> {
|
|
|
45
45
|
private get locale();
|
|
46
46
|
/**
|
|
47
47
|
* Returns the configured timezone for new dates. Precedence: per-instance
|
|
48
|
-
* `
|
|
48
|
+
* `TW_TZ_OVERRIDE` → Luxon's `Settings.defaultZone` → `'local'`.
|
|
49
49
|
*/
|
|
50
50
|
private get zone();
|
|
51
51
|
/** Builds a `DateTime` in the adapter's configured zone + locale. */
|
|
@@ -19,7 +19,7 @@ declare class CalendarCellHarness extends ComponentHarness {
|
|
|
19
19
|
getText(): Promise<string>;
|
|
20
20
|
/** The cell's `aria-label`. */
|
|
21
21
|
getAriaLabel(): Promise<string | null>;
|
|
22
|
-
/** Whether the cell carries `aria-selected="true"`. */
|
|
22
|
+
/** Whether the cell carries `aria-selected="true"`. Read from the `role="gridcell"` host, which is the element that carries selection state — a `<button>`'s implicit role does not support `aria-selected`. */
|
|
23
23
|
isSelected(): Promise<boolean>;
|
|
24
24
|
/** Whether the cell is disabled — true if the button has `disabled` or carries `aria-disabled="true"`. */
|
|
25
25
|
isDisabled(): Promise<boolean>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Provider, InjectionToken, Type, OnInit, InputSignal, WritableSignal, TemplateRef, OutputEmitterRef,
|
|
2
|
+
import { Provider, InjectionToken, Type, OnInit, InputSignal, WritableSignal, Signal, TemplateRef, OutputEmitterRef, ModelSignal, EnvironmentProviders } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';
|
|
4
4
|
import { RangeBehaviorConfig } from '@cdevhub/ngx-tw/core';
|
|
5
5
|
import { FormValueControl, ValidationError, WithOptionalFieldTree, DisabledReason } from '@angular/forms/signals';
|
|
@@ -132,6 +132,18 @@ declare class CalendarIntl {
|
|
|
132
132
|
* Provides a custom `CalendarIntl` instance. Place at any injector level —
|
|
133
133
|
* the calendar resolves the closest one and merges any per-instance `intl`
|
|
134
134
|
* input on top of it (§19.4 per-field merge semantics).
|
|
135
|
+
*
|
|
136
|
+
* Keys explicitly set to `undefined` are dropped before merging. Root
|
|
137
|
+
* `tsconfig.json` does not set `exactOptionalPropertyTypes`, so
|
|
138
|
+
* `provideCalendarIntl({ monthViewLabel: bundle['calendar.monthView'] })`
|
|
139
|
+
* type-checks even when the lookup misses — and a plain `Object.assign` would
|
|
140
|
+
* then copy that `undefined` over a field `CalendarIntl` types as `string`.
|
|
141
|
+
* Because this is a bootstrap-level provider, one missing key in an i18n
|
|
142
|
+
* bundle broke *every* calendar in the app, and the failure surfaced far from
|
|
143
|
+
* the call site: `viewSwitched()` calls `.replace()` on the label directly, so
|
|
144
|
+
* the first drill-up threw `Cannot read properties of undefined (reading
|
|
145
|
+
* 'replace')`. Filtering here makes a missing key fall back to the English
|
|
146
|
+
* default instead.
|
|
135
147
|
*/
|
|
136
148
|
declare function provideCalendarIntl(custom: Partial<CalendarIntl>): Provider;
|
|
137
149
|
|
|
@@ -363,7 +375,7 @@ interface SelectionResult<D, S> {
|
|
|
363
375
|
readonly preview?: DateRange<D> | null;
|
|
364
376
|
}
|
|
365
377
|
/**
|
|
366
|
-
* Pluggable selection behaviour. Provide via `
|
|
378
|
+
* Pluggable selection behaviour. Provide via `TW_CALENDAR_SELECTION_STRATEGY` to
|
|
367
379
|
* customise how clicks mutate the calendar's `selected` value.
|
|
368
380
|
*
|
|
369
381
|
* `D` is the date type understood by the active `DateAdapter`.
|
|
@@ -385,6 +397,14 @@ declare abstract class CalendarSelectionStrategy<D, S = unknown> {
|
|
|
385
397
|
abstract isRangeMiddle(date: D, current: S): boolean;
|
|
386
398
|
}
|
|
387
399
|
/** Injection token for the active selection strategy. */
|
|
400
|
+
declare const TW_CALENDAR_SELECTION_STRATEGY: InjectionToken<CalendarSelectionStrategy<unknown, unknown>>;
|
|
401
|
+
/**
|
|
402
|
+
* @deprecated Renamed to {@link TW_CALENDAR_SELECTION_STRATEGY} for consistency
|
|
403
|
+
* with every other ngx-tw injection token. This is the *same token instance*,
|
|
404
|
+
* not a copy — providing under either name and injecting under the other
|
|
405
|
+
* resolves — so the rename is safe to adopt incrementally. Removed in the next
|
|
406
|
+
* major.
|
|
407
|
+
*/
|
|
388
408
|
declare const CALENDAR_SELECTION_STRATEGY: InjectionToken<CalendarSelectionStrategy<unknown, unknown>>;
|
|
389
409
|
|
|
390
410
|
/**
|
|
@@ -517,35 +537,37 @@ declare class CalendarComponent<M extends CalendarMode = 'single', D = Date, TOu
|
|
|
517
537
|
private readonly monthViews;
|
|
518
538
|
/**
|
|
519
539
|
* Built-in strategies instantiated lazily in the host's injection context so
|
|
520
|
-
* `inject(
|
|
540
|
+
* `inject(TW_DATE_ADAPTER)` calls inside each strategy resolve. Range state will
|
|
521
541
|
* migrate into the orchestrator in Phase 6; single / multiple stay here as
|
|
522
542
|
* internals (not exported) via the spec's mode union.
|
|
523
543
|
*/
|
|
524
544
|
private readonly localStrategies;
|
|
525
|
-
/** Selection mode (§5)
|
|
545
|
+
/** Selection mode (§5), bound as `mode`. Changing this at runtime clears the value and emits `modeChange`. Defaults to `'single'`. */
|
|
526
546
|
readonly modeInput: InputSignal<CalendarMode>;
|
|
527
547
|
readonly mode: WritableSignal<CalendarMode>;
|
|
528
548
|
/**
|
|
529
|
-
* Consumer-bound value
|
|
530
|
-
* `D[]` for multiple, `{ start; end }` for range.
|
|
549
|
+
* Consumer-bound value, bound as `value`. Shape narrows by `M`: `D | null` for
|
|
550
|
+
* single, `D[]` for multiple, `{ start; end }` for range. Defaults to `null`,
|
|
551
|
+
* which reads as the empty selection in every mode.
|
|
531
552
|
*/
|
|
532
553
|
readonly valueInput: InputSignal<CalendarValue<M, D>>;
|
|
533
554
|
readonly value: WritableSignal<CalendarValue<M, D>>;
|
|
534
555
|
/** Anchor date for the displayed view. Defaults to today on mount. */
|
|
535
556
|
readonly startAt: InputSignal<D | null>;
|
|
536
|
-
/** Minimum selectable date. */
|
|
557
|
+
/** Minimum selectable date. Defaults to `null` (no lower bound). */
|
|
537
558
|
readonly minDate: InputSignal<D | null>;
|
|
538
|
-
/** Maximum selectable date. */
|
|
559
|
+
/** Maximum selectable date. Defaults to `null` (no upper bound). */
|
|
539
560
|
readonly maxDate: InputSignal<D | null>;
|
|
540
|
-
/** Per-date predicate — return `false` to disable. */
|
|
561
|
+
/** Per-date predicate — return `false` to disable. Defaults to `null` (every date passes). */
|
|
541
562
|
readonly dateFilter: InputSignal<DateFilterFn<D> | null>;
|
|
542
563
|
/**
|
|
543
564
|
* Explicitly disabled dates (§10.1). Either an array (each entry compared via
|
|
544
565
|
* `adapter.sameDate`) or a predicate returning `true` for disabled dates.
|
|
545
566
|
* OR-combined with `dateFilter`, `disabledDaysOfWeek`, and `[minDate, maxDate]`.
|
|
567
|
+
* Defaults to `null` (no explicitly disabled dates).
|
|
546
568
|
*/
|
|
547
569
|
readonly disabledDates: InputSignal<DisabledDates<D> | null>;
|
|
548
|
-
/** Days of the week to disable (0=Sun … 6=Sat).
|
|
570
|
+
/** Days of the week to disable (0=Sun … 6=Sat). Defaults to `[]` — no day-of-week disabling. */
|
|
549
571
|
readonly disabledDaysOfWeek: InputSignal<readonly number[]>;
|
|
550
572
|
/**
|
|
551
573
|
* Bundle of date constraints (§10.1). Lets a consumer pass `minDate`, `maxDate`,
|
|
@@ -553,14 +575,14 @@ declare class CalendarComponent<M extends CalendarMode = 'single', D = Date, TOu
|
|
|
553
575
|
* useful for sharing a constraint preset across multiple calendars. Each field is
|
|
554
576
|
* optional. Individual inputs (`minDate`, `maxDate`, `disabledDates`,
|
|
555
577
|
* `disabledDaysOfWeek`, `dateFilter`) take precedence over fields here when both
|
|
556
|
-
* are set non-null.
|
|
578
|
+
* are set non-null. Defaults to `null` (no bundle; use the individual inputs).
|
|
557
579
|
*/
|
|
558
580
|
readonly constraints: InputSignal<CalendarConstraints<D> | null>;
|
|
559
|
-
/** Minimum range length in days, inclusive (`mode: 'range'` only). `null`
|
|
581
|
+
/** Minimum range length in days, inclusive (`mode: 'range'` only). Defaults to `null` — no minimum. */
|
|
560
582
|
readonly minRangeLength: InputSignal<number | null>;
|
|
561
|
-
/** Maximum range length in days, inclusive (`mode: 'range'` only). `null`
|
|
583
|
+
/** Maximum range length in days, inclusive (`mode: 'range'` only). Defaults to `null` — no maximum. */
|
|
562
584
|
readonly maxRangeLength: InputSignal<number | null>;
|
|
563
|
-
/** Maximum number of selections in `mode: 'multiple'`. `null`
|
|
585
|
+
/** Maximum number of selections in `mode: 'multiple'`. Defaults to `null` — unlimited. */
|
|
564
586
|
readonly maxSelections: InputSignal<number | null>;
|
|
565
587
|
/**
|
|
566
588
|
* What happens when the user tries to select past `maxSelections` (§10.1).
|
|
@@ -571,9 +593,30 @@ declare class CalendarComponent<M extends CalendarMode = 'single', D = Date, TOu
|
|
|
571
593
|
/**
|
|
572
594
|
* IDREF list for the form-error live region (§28.3). When set, the calendar
|
|
573
595
|
* root carries `aria-describedby="<value>"` so screen readers read consumer-
|
|
574
|
-
* rendered error messages alongside the focused cell announcement.
|
|
596
|
+
* rendered error messages alongside the focused cell announcement. Defaults to
|
|
597
|
+
* `null` (no error ids are contributed).
|
|
598
|
+
*
|
|
599
|
+
* @deprecated Superseded by the plain `aria-describedby` attribute, which now
|
|
600
|
+
* feeds {@link ariaDescribedby}. Both are merged — error ids first — so an
|
|
601
|
+
* existing `[errorAriaDescribedBy]` binding keeps working; it will be removed
|
|
602
|
+
* in a future major.
|
|
575
603
|
*/
|
|
576
604
|
readonly errorAriaDescribedBy: InputSignal<string | null>;
|
|
605
|
+
/**
|
|
606
|
+
* ID of an external element that describes the calendar, supplied as the plain
|
|
607
|
+
* `aria-describedby` attribute. Merged with {@link errorAriaDescribedBy} —
|
|
608
|
+
* error ids are listed first so assistive tech announces them before the
|
|
609
|
+
* general description. Defaults to `null`.
|
|
610
|
+
*/
|
|
611
|
+
readonly ariaDescribedby: InputSignal<string | null>;
|
|
612
|
+
/**
|
|
613
|
+
* Merged `aria-describedby` IDREF list: error ids from
|
|
614
|
+
* {@link errorAriaDescribedBy} first, then the consumer's `aria-describedby`.
|
|
615
|
+
* Mirrors `checkbox`'s `effectiveAriaDescribedby()`.
|
|
616
|
+
*
|
|
617
|
+
* @internal
|
|
618
|
+
*/
|
|
619
|
+
readonly effectiveAriaDescribedby: Signal<string | undefined>;
|
|
577
620
|
/**
|
|
578
621
|
* How `mode: 'range'` reacts to a click after a complete range (§21.2):
|
|
579
622
|
* - `'restart'` (default): start a new range with the clicked cell, emit `selectionRestart`.
|
|
@@ -587,30 +630,30 @@ declare class CalendarComponent<M extends CalendarMode = 'single', D = Date, TOu
|
|
|
587
630
|
* `{ allowSingleDayRange: true, persistPartialRange: true, allowBackwardRange: false, disableRangesCrossingDisabledDates: false }`.
|
|
588
631
|
*/
|
|
589
632
|
readonly rangeBehavior: InputSignal<Partial<RangeBehaviorConfig>>;
|
|
590
|
-
/** Function producing per-cell CSS classes. */
|
|
633
|
+
/** Function producing per-cell CSS classes, appended to the cell button. Defaults to `null` (no extra classes). */
|
|
591
634
|
readonly dateClass: InputSignal<DateClassFn<D> | null>;
|
|
592
|
-
/** When `true`, the calendar renders with a border and a soft shadow. */
|
|
635
|
+
/** When `true`, the calendar renders with a border and a soft shadow. Defaults to `true` — an embedded calendar reads as a bordered panel; the special case is the borderless variant. */
|
|
593
636
|
readonly bordered: InputSignal<boolean>;
|
|
594
637
|
/** Which view opens first. Defaults to `'day'`. Phase 8 will derive the default from `rangeGranularity`. */
|
|
595
638
|
readonly startView: InputSignal<CalendarViewState>;
|
|
596
|
-
/** Override first day of week (0=Sun, 1=Mon).
|
|
639
|
+
/** Override first day of week (0=Sun, 1=Mon). Defaults to `null` — falls back to the adapter's locale default. */
|
|
597
640
|
readonly firstDayOfWeek: InputSignal<number | null>;
|
|
598
641
|
/**
|
|
599
642
|
* Number of months to display side-by-side (1 or 2). Phase 9 replaces this with a
|
|
600
|
-
* full `numberOfMonths: 1..12+` surface (§23).
|
|
643
|
+
* full `numberOfMonths: 1..12+` surface (§23). Defaults to `1`.
|
|
601
644
|
*/
|
|
602
645
|
readonly monthColumns: InputSignal<number>;
|
|
603
|
-
/** Disabled state. Merged with any `setDisabledState` call from a bound form control via `effectiveDisabled`. */
|
|
646
|
+
/** Disabled state. Merged with any `setDisabledState` call from a bound form control via `effectiveDisabled`. Defaults to `false`. */
|
|
604
647
|
readonly disabled: InputSignal<boolean>;
|
|
605
|
-
/** Read-only state (§33.1). When `true`, focus and keyboard navigation still work but selections cannot be committed. */
|
|
648
|
+
/** Read-only state (§33.1). When `true`, focus and keyboard navigation still work but selections cannot be committed. Defaults to `false`. */
|
|
606
649
|
readonly readonly: InputSignal<boolean>;
|
|
607
650
|
/** How a form reset restores internal state (§6.5). `'full'` (default) also restores view + active-date; `'value-only'` clears the draft but leaves navigation where the user left it. */
|
|
608
651
|
readonly resetBehavior: InputSignal<ResetBehavior>;
|
|
609
|
-
/** Optional cell-content template. */
|
|
652
|
+
/** Optional cell-content template, rendered inside each cell button with `{ $implicit: CalendarCell<D> }`. Defaults to `null` (cells render their own display value). */
|
|
610
653
|
readonly cellTemplate: InputSignal<TemplateRef<{
|
|
611
654
|
$implicit: CalendarCell<D>;
|
|
612
655
|
}> | null>;
|
|
613
|
-
/** Per-instance locale override.
|
|
656
|
+
/** Per-instance locale override. Defaults to `null` — falls back to Angular's `LOCALE_ID` (§19.1). */
|
|
614
657
|
readonly locale: InputSignal<string | null>;
|
|
615
658
|
/**
|
|
616
659
|
* Per-instance `CalendarIntl` override (§19.4). Per-field merge — unspecified
|
|
@@ -748,7 +791,8 @@ declare class CalendarComponent<M extends CalendarMode = 'single', D = Date, TOu
|
|
|
748
791
|
/**
|
|
749
792
|
* Effective `CalendarIntl` resolved per-field over the DI default (§19.4).
|
|
750
793
|
* The injected default is the base; the `intl` input overrides individual
|
|
751
|
-
* fields. Unspecified fields fall through to English defaults
|
|
794
|
+
* fields. Unspecified fields fall through to English defaults — and so do
|
|
795
|
+
* fields the consumer set explicitly to `undefined`.
|
|
752
796
|
*/
|
|
753
797
|
readonly effectiveIntl: Signal<CalendarIntl>;
|
|
754
798
|
/** Effective locale — `locale` input wins, otherwise Angular `LOCALE_ID`. */
|
|
@@ -948,7 +992,7 @@ declare class CalendarComponent<M extends CalendarMode = 'single', D = Date, TOu
|
|
|
948
992
|
/** Locale-aware long-form date format used in announcements (e.g. "Wednesday, April 15, 2026"). */
|
|
949
993
|
private formatDate;
|
|
950
994
|
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarComponent<any, any, any>, never>;
|
|
951
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent<any, any, any>, "tw-calendar", never, { "modeInput": { "alias": "mode"; "required": false; "isSignal": true; }; "valueInput": { "alias": "value"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "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; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "disabledDaysOfWeek": { "alias": "disabledDaysOfWeek"; "required": false; "isSignal": true; }; "constraints": { "alias": "constraints"; "required": false; "isSignal": true; }; "minRangeLength": { "alias": "minRangeLength"; "required": false; "isSignal": true; }; "maxRangeLength": { "alias": "maxRangeLength"; "required": false; "isSignal": true; }; "maxSelections": { "alias": "maxSelections"; "required": false; "isSignal": true; }; "maxSelectionBehavior": { "alias": "maxSelectionBehavior"; "required": false; "isSignal": true; }; "errorAriaDescribedBy": { "alias": "errorAriaDescribedBy"; "required": false; "isSignal": true; }; "rangeClickBehavior": { "alias": "rangeClickBehavior"; "required": false; "isSignal": true; }; "rangeBehavior": { "alias": "rangeBehavior"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; "bordered": { "alias": "bordered"; "required": false; "isSignal": true; }; "startView": { "alias": "startView"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "monthColumns": { "alias": "monthColumns"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "resetBehavior": { "alias": "resetBehavior"; "required": false; "isSignal": true; }; "cellTemplate": { "alias": "cellTemplate"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "intl": { "alias": "intl"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "selectionStart": "selectionStart"; "rangePreview": "rangePreview"; "selectionComplete": "selectionComplete"; "selectionRestart": "selectionRestart"; "selectionCleared": "selectionCleared"; "selectionLimitReached": "selectionLimitReached"; "presetChange": "presetChange"; "viewChange": "viewChange"; "activeDateChange": "activeDateChange"; "monthChange": "monthChange"; "yearChange": "yearChange"; "cellClick": "cellClick"; "cellHover": "cellHover"; "modeChange": "modeChange"; }, never, ["[twCalendarPresets]"], true, never>;
|
|
995
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CalendarComponent<any, any, any>, "tw-calendar", never, { "modeInput": { "alias": "mode"; "required": false; "isSignal": true; }; "valueInput": { "alias": "value"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "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; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "disabledDaysOfWeek": { "alias": "disabledDaysOfWeek"; "required": false; "isSignal": true; }; "constraints": { "alias": "constraints"; "required": false; "isSignal": true; }; "minRangeLength": { "alias": "minRangeLength"; "required": false; "isSignal": true; }; "maxRangeLength": { "alias": "maxRangeLength"; "required": false; "isSignal": true; }; "maxSelections": { "alias": "maxSelections"; "required": false; "isSignal": true; }; "maxSelectionBehavior": { "alias": "maxSelectionBehavior"; "required": false; "isSignal": true; }; "errorAriaDescribedBy": { "alias": "errorAriaDescribedBy"; "required": false; "isSignal": true; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "rangeClickBehavior": { "alias": "rangeClickBehavior"; "required": false; "isSignal": true; }; "rangeBehavior": { "alias": "rangeBehavior"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; "bordered": { "alias": "bordered"; "required": false; "isSignal": true; }; "startView": { "alias": "startView"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "monthColumns": { "alias": "monthColumns"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "resetBehavior": { "alias": "resetBehavior"; "required": false; "isSignal": true; }; "cellTemplate": { "alias": "cellTemplate"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "intl": { "alias": "intl"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "selectionStart": "selectionStart"; "rangePreview": "rangePreview"; "selectionComplete": "selectionComplete"; "selectionRestart": "selectionRestart"; "selectionCleared": "selectionCleared"; "selectionLimitReached": "selectionLimitReached"; "presetChange": "presetChange"; "viewChange": "viewChange"; "activeDateChange": "activeDateChange"; "monthChange": "monthChange"; "yearChange": "yearChange"; "cellClick": "cellClick"; "cellHover": "cellHover"; "modeChange": "modeChange"; }, never, ["[twCalendarPresets]"], true, never>;
|
|
952
996
|
}
|
|
953
997
|
|
|
954
998
|
/**
|
|
@@ -988,21 +1032,21 @@ declare class CalendarSingleDirective<D = Date, TOut = D | null> implements Form
|
|
|
988
1032
|
private readonly host;
|
|
989
1033
|
/** Two-way value, forwarded to the hosting `CalendarComponent`. Signal Forms `Field` binds against this. */
|
|
990
1034
|
readonly value: ModelSignal<TOut>;
|
|
991
|
-
/** Mirrors the bound field's disabled flag
|
|
1035
|
+
/** Mirrors the bound field's disabled flag; Signal Forms writes it, and the host calendar disables itself when it is `true`. Defaults to `false`. */
|
|
992
1036
|
readonly disabled: InputSignal<boolean>;
|
|
993
|
-
/** Mirrors the bound field's readonly flag
|
|
1037
|
+
/** Mirrors the bound field's readonly flag; the host calendar renders its grids read-only when it is `true`. Defaults to `false`. */
|
|
994
1038
|
readonly readonly: InputSignal<boolean>;
|
|
995
|
-
/** Mirrors the bound field's required flag. */
|
|
1039
|
+
/** Mirrors the bound field's required flag. Defaults to `false`. */
|
|
996
1040
|
readonly required: InputSignal<boolean>;
|
|
997
|
-
/** Mirrors the bound field's invalid flag. */
|
|
1041
|
+
/** Mirrors the bound field's invalid flag. Defaults to `false`. */
|
|
998
1042
|
readonly invalid: InputSignal<boolean>;
|
|
999
|
-
/** Mirrors the bound field's hidden flag. */
|
|
1043
|
+
/** Mirrors the bound field's hidden flag. Defaults to `false`. */
|
|
1000
1044
|
readonly hidden: InputSignal<boolean>;
|
|
1001
|
-
/** Mirrors the bound field's errors. */
|
|
1045
|
+
/** Mirrors the bound field's errors. Defaults to `[]` (no errors). */
|
|
1002
1046
|
readonly errors: InputSignal<readonly ValidationError.WithOptionalFieldTree[]>;
|
|
1003
|
-
/** Mirrors the bound field's disablement reasons. */
|
|
1047
|
+
/** Mirrors the bound field's disablement reasons. Defaults to `[]` (none). */
|
|
1004
1048
|
readonly disabledReasons: InputSignal<readonly WithOptionalFieldTree<DisabledReason>[]>;
|
|
1005
|
-
/** Two-way `touched` flag — drives and reflects the field's touched state. */
|
|
1049
|
+
/** Two-way `touched` flag — drives and reflects the field's touched state, flipping to `true` when the calendar loses focus after an interaction. Defaults to `false`. */
|
|
1006
1050
|
readonly touched: ModelSignal<boolean>;
|
|
1007
1051
|
constructor();
|
|
1008
1052
|
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarSingleDirective<any, any>, never>;
|
|
@@ -1016,21 +1060,21 @@ declare class CalendarMultipleDirective<D = Date, TOut = D[]> implements FormVal
|
|
|
1016
1060
|
private readonly host;
|
|
1017
1061
|
/** Two-way value, forwarded to the hosting `CalendarComponent`. Signal Forms `Field` binds against this. */
|
|
1018
1062
|
readonly value: ModelSignal<TOut>;
|
|
1019
|
-
/** Mirrors the bound field's disabled flag
|
|
1063
|
+
/** Mirrors the bound field's disabled flag; Signal Forms writes it, and the host calendar disables itself when it is `true`. Defaults to `false`. */
|
|
1020
1064
|
readonly disabled: InputSignal<boolean>;
|
|
1021
|
-
/** Mirrors the bound field's readonly flag
|
|
1065
|
+
/** Mirrors the bound field's readonly flag; the host calendar renders its grids read-only when it is `true`. Defaults to `false`. */
|
|
1022
1066
|
readonly readonly: InputSignal<boolean>;
|
|
1023
|
-
/** Mirrors the bound field's required flag. */
|
|
1067
|
+
/** Mirrors the bound field's required flag. Defaults to `false`. */
|
|
1024
1068
|
readonly required: InputSignal<boolean>;
|
|
1025
|
-
/** Mirrors the bound field's invalid flag. */
|
|
1069
|
+
/** Mirrors the bound field's invalid flag. Defaults to `false`. */
|
|
1026
1070
|
readonly invalid: InputSignal<boolean>;
|
|
1027
|
-
/** Mirrors the bound field's hidden flag. */
|
|
1071
|
+
/** Mirrors the bound field's hidden flag. Defaults to `false`. */
|
|
1028
1072
|
readonly hidden: InputSignal<boolean>;
|
|
1029
|
-
/** Mirrors the bound field's errors. */
|
|
1073
|
+
/** Mirrors the bound field's errors. Defaults to `[]` (no errors). */
|
|
1030
1074
|
readonly errors: InputSignal<readonly ValidationError.WithOptionalFieldTree[]>;
|
|
1031
|
-
/** Mirrors the bound field's disablement reasons. */
|
|
1075
|
+
/** Mirrors the bound field's disablement reasons. Defaults to `[]` (none). */
|
|
1032
1076
|
readonly disabledReasons: InputSignal<readonly WithOptionalFieldTree<DisabledReason>[]>;
|
|
1033
|
-
/** Two-way `touched` flag — drives and reflects the field's touched state. */
|
|
1077
|
+
/** Two-way `touched` flag — drives and reflects the field's touched state, flipping to `true` when the calendar loses focus after an interaction. Defaults to `false`. */
|
|
1034
1078
|
readonly touched: ModelSignal<boolean>;
|
|
1035
1079
|
constructor();
|
|
1036
1080
|
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarMultipleDirective<any, any>, never>;
|
|
@@ -1044,21 +1088,21 @@ declare class CalendarRangeDirective<D = Date, TOut = CalendarRangeValue<D>> imp
|
|
|
1044
1088
|
private readonly host;
|
|
1045
1089
|
/** Two-way value, forwarded to the hosting `CalendarComponent`. Signal Forms `Field` binds against this. */
|
|
1046
1090
|
readonly value: ModelSignal<TOut>;
|
|
1047
|
-
/** Mirrors the bound field's disabled flag
|
|
1091
|
+
/** Mirrors the bound field's disabled flag; Signal Forms writes it, and the host calendar disables itself when it is `true`. Defaults to `false`. */
|
|
1048
1092
|
readonly disabled: InputSignal<boolean>;
|
|
1049
|
-
/** Mirrors the bound field's readonly flag
|
|
1093
|
+
/** Mirrors the bound field's readonly flag; the host calendar renders its grids read-only when it is `true`. Defaults to `false`. */
|
|
1050
1094
|
readonly readonly: InputSignal<boolean>;
|
|
1051
|
-
/** Mirrors the bound field's required flag. */
|
|
1095
|
+
/** Mirrors the bound field's required flag. Defaults to `false`. */
|
|
1052
1096
|
readonly required: InputSignal<boolean>;
|
|
1053
|
-
/** Mirrors the bound field's invalid flag. */
|
|
1097
|
+
/** Mirrors the bound field's invalid flag. Defaults to `false`. */
|
|
1054
1098
|
readonly invalid: InputSignal<boolean>;
|
|
1055
|
-
/** Mirrors the bound field's hidden flag. */
|
|
1099
|
+
/** Mirrors the bound field's hidden flag. Defaults to `false`. */
|
|
1056
1100
|
readonly hidden: InputSignal<boolean>;
|
|
1057
|
-
/** Mirrors the bound field's errors. */
|
|
1101
|
+
/** Mirrors the bound field's errors. Defaults to `[]` (no errors). */
|
|
1058
1102
|
readonly errors: InputSignal<readonly ValidationError.WithOptionalFieldTree[]>;
|
|
1059
|
-
/** Mirrors the bound field's disablement reasons. */
|
|
1103
|
+
/** Mirrors the bound field's disablement reasons. Defaults to `[]` (none). */
|
|
1060
1104
|
readonly disabledReasons: InputSignal<readonly WithOptionalFieldTree<DisabledReason>[]>;
|
|
1061
|
-
/** Two-way `touched` flag — drives and reflects the field's touched state. */
|
|
1105
|
+
/** Two-way `touched` flag — drives and reflects the field's touched state, flipping to `true` when the calendar loses focus after an interaction. Defaults to `false`. */
|
|
1062
1106
|
readonly touched: ModelSignal<boolean>;
|
|
1063
1107
|
constructor();
|
|
1064
1108
|
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarRangeDirective<any, any>, never>;
|
|
@@ -1072,6 +1116,13 @@ type TwDateNameStyle = 'long' | 'short' | 'narrow';
|
|
|
1072
1116
|
* When set, TZ-aware adapters resolve `today()` and date-range math against
|
|
1073
1117
|
* the supplied IANA timezone. Floating (naive) adapters ignore the token.
|
|
1074
1118
|
*/
|
|
1119
|
+
declare const TW_TZ_OVERRIDE: InjectionToken<string>;
|
|
1120
|
+
/**
|
|
1121
|
+
* @deprecated Renamed to {@link TW_TZ_OVERRIDE} for consistency with every other
|
|
1122
|
+
* ngx-tw injection token. This is the *same token instance*, not a copy —
|
|
1123
|
+
* providing under either name and injecting under the other resolves — so the
|
|
1124
|
+
* rename is safe to adopt incrementally. Removed in the next major.
|
|
1125
|
+
*/
|
|
1075
1126
|
declare const TZ_OVERRIDE: InjectionToken<string>;
|
|
1076
1127
|
/**
|
|
1077
1128
|
* Injection token for the default value transformer (§7.4, §7.6). Phase 14 wires
|
|
@@ -1079,6 +1130,13 @@ declare const TZ_OVERRIDE: InjectionToken<string>;
|
|
|
1079
1130
|
* Shipped as a token shell now so later phases can bind against it without a
|
|
1080
1131
|
* breaking change.
|
|
1081
1132
|
*/
|
|
1133
|
+
declare const TW_DATE_SERIALIZATION: InjectionToken<unknown>;
|
|
1134
|
+
/**
|
|
1135
|
+
* @deprecated Renamed to {@link TW_DATE_SERIALIZATION} for consistency with
|
|
1136
|
+
* every other ngx-tw injection token. This is the *same token instance*, not a
|
|
1137
|
+
* copy — providing under either name and injecting under the other resolves —
|
|
1138
|
+
* so the rename is safe to adopt incrementally. Removed in the next major.
|
|
1139
|
+
*/
|
|
1082
1140
|
declare const DATE_SERIALIZATION: InjectionToken<unknown>;
|
|
1083
1141
|
/**
|
|
1084
1142
|
* Format definitions consumed by the calendar header, views, and text-input
|
|
@@ -1111,6 +1169,13 @@ interface DateFormats {
|
|
|
1111
1169
|
readonly yearViewMonthA11yLabel?: unknown;
|
|
1112
1170
|
}
|
|
1113
1171
|
/** DI token carrying the default `DateFormats`. The calendar's `dateFormats` input overrides. */
|
|
1172
|
+
declare const TW_DATE_FORMATS: InjectionToken<DateFormats>;
|
|
1173
|
+
/**
|
|
1174
|
+
* @deprecated Renamed to {@link TW_DATE_FORMATS} for consistency with every
|
|
1175
|
+
* other ngx-tw injection token. This is the *same token instance*, not a copy —
|
|
1176
|
+
* providing under either name and injecting under the other resolves — so the
|
|
1177
|
+
* rename is safe to adopt incrementally. Removed in the next major.
|
|
1178
|
+
*/
|
|
1114
1179
|
declare const DATE_FORMATS: InjectionToken<DateFormats>;
|
|
1115
1180
|
/**
|
|
1116
1181
|
* Abstract date adapter. Ship a subclass to swap the underlying date library
|
|
@@ -1227,6 +1292,14 @@ declare abstract class DateAdapter<D> {
|
|
|
1227
1292
|
* Injection token for the calendar's `DateAdapter`. Prefer `provideNativeDateAdapter()`
|
|
1228
1293
|
* or `provideTwCalendar({ adapter })` over binding this token directly.
|
|
1229
1294
|
*/
|
|
1295
|
+
declare const TW_DATE_ADAPTER: InjectionToken<DateAdapter<unknown>>;
|
|
1296
|
+
/**
|
|
1297
|
+
* @deprecated Renamed to {@link TW_DATE_ADAPTER} for consistency with every
|
|
1298
|
+
* other ngx-tw injection token. This is the *same token instance*, not a copy —
|
|
1299
|
+
* providing under either name and injecting under the other resolves, so an app
|
|
1300
|
+
* that provides `DATE_ADAPTER` keeps working against a library that injects
|
|
1301
|
+
* `TW_DATE_ADAPTER`. Removed in the next major.
|
|
1302
|
+
*/
|
|
1230
1303
|
declare const DATE_ADAPTER: InjectionToken<DateAdapter<unknown>>;
|
|
1231
1304
|
|
|
1232
1305
|
/**
|
|
@@ -1307,11 +1380,11 @@ declare class CalendarHeaderComponent {
|
|
|
1307
1380
|
readonly prevAriaLabel: InputSignal<string>;
|
|
1308
1381
|
/** Accessible label for the next button. */
|
|
1309
1382
|
readonly nextAriaLabel: InputSignal<string>;
|
|
1310
|
-
/** Disables the previous button. */
|
|
1383
|
+
/** Disables the previous button — set by the orchestrator when `minDate` blocks backward navigation. Defaults to `false`. */
|
|
1311
1384
|
readonly prevDisabled: InputSignal<boolean>;
|
|
1312
|
-
/** Disables the next button. */
|
|
1385
|
+
/** Disables the next button — set by the orchestrator when `maxDate` blocks forward navigation. Defaults to `false`. */
|
|
1313
1386
|
readonly nextDisabled: InputSignal<boolean>;
|
|
1314
|
-
/** When false, the period button is disabled (e.g. when already at the top view). */
|
|
1387
|
+
/** When false, the period button is disabled (e.g. when already at the top view). Defaults to `true` — the period button is the header's primary drill-up affordance; the special case is the top view, where there is nowhere to drill up to. */
|
|
1315
1388
|
readonly canSwitchView: InputSignal<boolean>;
|
|
1316
1389
|
/** Fires on previous button click. */
|
|
1317
1390
|
readonly prevClicked: OutputEmitterRef<void>;
|
|
@@ -1385,13 +1458,13 @@ declare class CalendarCellComponent<D> {
|
|
|
1385
1458
|
private readonly buttonRef;
|
|
1386
1459
|
/** The cell data object to render. */
|
|
1387
1460
|
readonly cell: InputSignal<CalendarCell<D>>;
|
|
1388
|
-
/** The active calendar view — drives cell
|
|
1461
|
+
/** The active calendar view — drives cell width and radius. Defaults to `'day'`. */
|
|
1389
1462
|
readonly view: InputSignal<CalendarViewState>;
|
|
1390
|
-
/** `true` when the cell's date is outside the currently displayed month. */
|
|
1463
|
+
/** `true` when the cell's date is outside the currently displayed month, which mutes its text. Defaults to `false`. */
|
|
1391
1464
|
readonly outside: InputSignal<boolean>;
|
|
1392
|
-
/** Tab index for roving focus (`0` for the active cell, `-1` otherwise). */
|
|
1465
|
+
/** Tab index for roving focus (`0` for the active cell, `-1` otherwise). Defaults to `-1`. */
|
|
1393
1466
|
readonly tabindex: InputSignal<number>;
|
|
1394
|
-
/** Optional template rendered inside the button — receives `{ $implicit: CalendarCell<D> }`. */
|
|
1467
|
+
/** Optional template rendered inside the button — receives `{ $implicit: CalendarCell<D> }`. Defaults to `null` (the cell renders its own display value). */
|
|
1395
1468
|
readonly cellTemplate: InputSignal<TemplateRef<{
|
|
1396
1469
|
$implicit: CalendarCell<D>;
|
|
1397
1470
|
}> | null>;
|
|
@@ -1428,31 +1501,45 @@ declare abstract class CalendarViewBase<D> {
|
|
|
1428
1501
|
protected readonly dateAdapter: DateAdapter<D>;
|
|
1429
1502
|
/** The date that anchors the grid being rendered. */
|
|
1430
1503
|
readonly activeDate: InputSignal<D>;
|
|
1431
|
-
/** Current selection — scalar, array (multi), or range. */
|
|
1504
|
+
/** Current selection — scalar, array (multi), or range. Defaults to `null` (nothing selected). */
|
|
1432
1505
|
readonly selected: InputSignal<D | D[] | DateRange<D> | null>;
|
|
1433
|
-
/** Minimum selectable date. */
|
|
1506
|
+
/** Minimum selectable date. Defaults to `null` (no lower bound). */
|
|
1434
1507
|
readonly minDate: InputSignal<D | null>;
|
|
1435
|
-
/** Maximum selectable date. */
|
|
1508
|
+
/** Maximum selectable date. Defaults to `null` (no upper bound). */
|
|
1436
1509
|
readonly maxDate: InputSignal<D | null>;
|
|
1437
|
-
/** Per-date predicate — return `false` to disable. */
|
|
1510
|
+
/** Per-date predicate — return `false` to disable. Defaults to `null` (every date passes). */
|
|
1438
1511
|
readonly dateFilter: InputSignal<DateFilterFn<D> | null>;
|
|
1439
|
-
/** Explicitly disabled dates — array (compared via `adapter.sameDate`) or predicate (returns `true` for disabled). */
|
|
1512
|
+
/** Explicitly disabled dates — array (compared via `adapter.sameDate`) or predicate (returns `true` for disabled). Defaults to `null` (none). */
|
|
1440
1513
|
readonly disabledDates: InputSignal<DisabledDates<D> | null>;
|
|
1441
|
-
/** Days of the week to disable (0=Sun … 6=Sat).
|
|
1514
|
+
/** Days of the week to disable (0=Sun … 6=Sat). Defaults to `[]` — no day-of-week disabling. */
|
|
1442
1515
|
readonly disabledDaysOfWeek: InputSignal<readonly number[]>;
|
|
1443
|
-
/** Per-cell class override. */
|
|
1516
|
+
/** Per-cell class override — returns extra classes appended to the cell button. Defaults to `null` (no extra classes). */
|
|
1444
1517
|
readonly dateClass: InputSignal<DateClassFn<D> | null>;
|
|
1445
|
-
/** Hover-preview start (set while user is mid-range pick). */
|
|
1518
|
+
/** Hover-preview start (set while user is mid-range pick). Defaults to `null` (no preview). */
|
|
1446
1519
|
readonly previewStart: InputSignal<D | null>;
|
|
1447
|
-
/** Hover-preview end. */
|
|
1520
|
+
/** Hover-preview end. Defaults to `null` (no preview). */
|
|
1448
1521
|
readonly previewEnd: InputSignal<D | null>;
|
|
1449
|
-
/** Phase 6 — date that briefly flashes as invalid (rejected commit). Cleared by the orchestrator. */
|
|
1522
|
+
/** Phase 6 — date that briefly flashes as invalid (rejected commit). Cleared by the orchestrator. Defaults to `null` (no flash). */
|
|
1450
1523
|
readonly invalidFlashDate: InputSignal<D | null>;
|
|
1451
|
-
/** `true` when the parent calendar allows more than one cell to be selected at once. Drives `aria-multiselectable` on the grid host. */
|
|
1524
|
+
/** `true` when the parent calendar allows more than one cell to be selected at once. Drives `aria-multiselectable` on the grid host. Defaults to `false`. */
|
|
1452
1525
|
readonly multiSelectable: InputSignal<boolean>;
|
|
1453
|
-
/** `true` when the parent calendar is in read-only mode. Drives `aria-readonly` on the grid host. */
|
|
1526
|
+
/** `true` when the parent calendar is in read-only mode. Drives `aria-readonly` on the grid host. Defaults to `false`. */
|
|
1454
1527
|
readonly readonlyGrid: InputSignal<boolean>;
|
|
1455
|
-
/**
|
|
1528
|
+
/**
|
|
1529
|
+
* `true` when the parent calendar is disabled (the `disabled` input, or a
|
|
1530
|
+
* bound form control's `setDisabledState`). Every cell then reports
|
|
1531
|
+
* `aria-disabled` and refuses activation. Defaults to `false`.
|
|
1532
|
+
*
|
|
1533
|
+
* Distinct from `readonlyGrid`: read-only keeps cells *selectable-looking*
|
|
1534
|
+
* and only blocks the commit in the orchestrator, whereas disabled removes
|
|
1535
|
+
* the affordance itself. Both leave the grid focusable and arrow-navigable —
|
|
1536
|
+
* per WAI-ARIA APG, a focusable disabled element stays "operable to the
|
|
1537
|
+
* extent of allowing the user to read its state", and `rovingCellValue`
|
|
1538
|
+
* guarantees exactly one tabbable cell so the grid never drops out of the
|
|
1539
|
+
* tab order.
|
|
1540
|
+
*/
|
|
1541
|
+
readonly disabledGrid: InputSignal<boolean>;
|
|
1542
|
+
/** Optional cell-content override, rendered inside each cell button with `{ $implicit: CalendarCell<D> }`. Defaults to `null` (the cell renders its own display value). */
|
|
1456
1543
|
readonly cellTemplate: InputSignal<TemplateRef<{
|
|
1457
1544
|
$implicit: CalendarCell<D>;
|
|
1458
1545
|
}> | null>;
|
|
@@ -1497,6 +1584,25 @@ declare abstract class CalendarViewBase<D> {
|
|
|
1497
1584
|
direction: string;
|
|
1498
1585
|
cell: CalendarCell<D>;
|
|
1499
1586
|
}): void;
|
|
1587
|
+
/**
|
|
1588
|
+
* `compareValue` of the cell that owns the roving tabindex, resolved against
|
|
1589
|
+
* the cells actually rendered right now.
|
|
1590
|
+
*
|
|
1591
|
+
* `focusedCellValue` is written only by `focusCell()` and nothing ever resets
|
|
1592
|
+
* it, so it goes stale the moment the displayed period changes by any route
|
|
1593
|
+
* that does not itself call `focusCell()` — the header's prev/next buttons,
|
|
1594
|
+
* a programmatic `activeDate` assignment, a view switch. A stale value
|
|
1595
|
+
* matches no rendered cell, `isActiveCell` then answered `false` for every
|
|
1596
|
+
* one of them, and the grid left the tab order entirely: zero cells with
|
|
1597
|
+
* `tabindex="0"`, nothing to Tab into, keyboard users locked out (SC 2.1.1).
|
|
1598
|
+
*
|
|
1599
|
+
* Resolving here rather than resetting the signal keeps this a pure read —
|
|
1600
|
+
* no effect, no write, no cycle — and the three fallbacks guarantee the
|
|
1601
|
+
* invariant the defect broke: a non-empty grid always has exactly one
|
|
1602
|
+
* tabbable cell.
|
|
1603
|
+
*/
|
|
1604
|
+
protected readonly rovingCellValue: Signal<number | null>;
|
|
1605
|
+
private gridHasValue;
|
|
1500
1606
|
/** Returns `true` when the cell owns the roving cursor. */
|
|
1501
1607
|
isActiveCell(cell: CalendarCell<D>): boolean;
|
|
1502
1608
|
/** Compare value of the currently active date (subclass-specific). */
|
|
@@ -1506,7 +1612,7 @@ declare abstract class CalendarViewBase<D> {
|
|
|
1506
1612
|
/** Focuses the cell that currently owns the roving cursor. */
|
|
1507
1613
|
focusActiveCell(): void;
|
|
1508
1614
|
static ɵfac: i0.ɵɵFactoryDeclaration<CalendarViewBase<any>, never>;
|
|
1509
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<CalendarViewBase<any>, never, never, { "activeDate": { "alias": "activeDate"; "required": true; "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; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "disabledDaysOfWeek": { "alias": "disabledDaysOfWeek"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; "previewStart": { "alias": "previewStart"; "required": false; "isSignal": true; }; "previewEnd": { "alias": "previewEnd"; "required": false; "isSignal": true; }; "invalidFlashDate": { "alias": "invalidFlashDate"; "required": false; "isSignal": true; }; "multiSelectable": { "alias": "multiSelectable"; "required": false; "isSignal": true; }; "readonlyGrid": { "alias": "readonlyGrid"; "required": false; "isSignal": true; }; "cellTemplate": { "alias": "cellTemplate"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "activeDateChange": "activeDateChange"; "previewChange": "previewChange"; }, never, never, true, never>;
|
|
1615
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<CalendarViewBase<any>, never, never, { "activeDate": { "alias": "activeDate"; "required": true; "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; }; "disabledDates": { "alias": "disabledDates"; "required": false; "isSignal": true; }; "disabledDaysOfWeek": { "alias": "disabledDaysOfWeek"; "required": false; "isSignal": true; }; "dateClass": { "alias": "dateClass"; "required": false; "isSignal": true; }; "previewStart": { "alias": "previewStart"; "required": false; "isSignal": true; }; "previewEnd": { "alias": "previewEnd"; "required": false; "isSignal": true; }; "invalidFlashDate": { "alias": "invalidFlashDate"; "required": false; "isSignal": true; }; "multiSelectable": { "alias": "multiSelectable"; "required": false; "isSignal": true; }; "readonlyGrid": { "alias": "readonlyGrid"; "required": false; "isSignal": true; }; "disabledGrid": { "alias": "disabledGrid"; "required": false; "isSignal": true; }; "cellTemplate": { "alias": "cellTemplate"; "required": false; "isSignal": true; }; }, { "selectedChange": "selectedChange"; "activeDateChange": "activeDateChange"; "previewChange": "previewChange"; }, never, never, true, never>;
|
|
1510
1616
|
}
|
|
1511
1617
|
|
|
1512
1618
|
/** Arranges a flat array of items into a 2D grid with `columns` items per row. */
|
|
@@ -1546,9 +1652,9 @@ declare function getFirstDayOfMonth<D>(date: D, adapter: DateAdapter<D>): D;
|
|
|
1546
1652
|
declare class MonthViewComponent<D> extends CalendarViewBase<D> {
|
|
1547
1653
|
protected readonly view: CalendarViewState;
|
|
1548
1654
|
protected readonly cellComponents: Signal<readonly CalendarCellComponent<D>[]>;
|
|
1549
|
-
/** Override first day of week (0=Sun, 1=Mon). */
|
|
1655
|
+
/** Override first day of week (0=Sun, 1=Mon). Defaults to `0` (Sunday). */
|
|
1550
1656
|
readonly firstDayOfWeek: InputSignal<number>;
|
|
1551
|
-
/** Index within a multi-month row (0=left, 1+=right) — used by the orchestrator to disambiguate focus. */
|
|
1657
|
+
/** Index within a multi-month row (0=left, 1+=right) — used by the orchestrator to disambiguate focus. Defaults to `0`. */
|
|
1552
1658
|
readonly gridIndex: InputSignal<number>;
|
|
1553
1659
|
readonly weekdayHeaders: Signal<WeekdayHeader[]>;
|
|
1554
1660
|
readonly displayMonth: Signal<number>;
|
|
@@ -1731,5 +1837,5 @@ type TwDateRangeInput<D> = TwDateRange<D> | {
|
|
|
1731
1837
|
/** @internal Normalises any range-shaped value into a `TwDateRange` instance. */
|
|
1732
1838
|
declare function toTwDateRange<D>(value: TwDateRangeInput<D>): TwDateRange<D> | null;
|
|
1733
1839
|
|
|
1734
|
-
export { CALENDAR_SELECTION_STRATEGY, CalendarCellComponent, CalendarComponent, CalendarHeaderComponent, CalendarIntl, CalendarMultipleDirective, CalendarPresetsDirective, CalendarRangeDirective, CalendarSelectionStrategy, CalendarSingleDirective, CalendarViewBase, DATE_ADAPTER, DATE_FORMATS, DATE_SERIALIZATION, DAYS_PER_WEEK, DateAdapter, MONTHS_PER_ROW, MonthViewComponent, MultiSelectionStrategy, NativeDateAdapter, RangeSelectionStrategy, SingleSelectionStrategy, TZ_OVERRIDE, TwDateRange, WEEKS_PER_MONTH, WeekSelectionStrategy, YEARS_PER_PAGE, YEARS_PER_ROW, YearViewComponent, YearsViewComponent, calendarRequiredValidator, calendarValidator, createCalendarCell, createDateRange, createGrid, de, emptyCalendarValue, es, fr, getFirstDayOfMonth, getMultiYearStartingYear, getWeekdayHeaders, isCalendarValueEmpty, isDateDisabled, isDateInRange, isMonthDisabled, isYearDisabled, ja, navigateGrid, provideCalendarIntl, provideCalendarSelectionStrategy, provideMultiSelectionStrategy, provideNativeDateAdapter, provideRangeSelectionStrategy, provideSingleSelectionStrategy, provideTwCalendar, provideWeekSelectionStrategy, pt, serializeCalendarValue, toTwDateRange, yearsPerPage };
|
|
1840
|
+
export { CALENDAR_SELECTION_STRATEGY, CalendarCellComponent, CalendarComponent, CalendarHeaderComponent, CalendarIntl, CalendarMultipleDirective, CalendarPresetsDirective, CalendarRangeDirective, CalendarSelectionStrategy, CalendarSingleDirective, CalendarViewBase, DATE_ADAPTER, DATE_FORMATS, DATE_SERIALIZATION, DAYS_PER_WEEK, DateAdapter, MONTHS_PER_ROW, MonthViewComponent, MultiSelectionStrategy, NativeDateAdapter, RangeSelectionStrategy, SingleSelectionStrategy, TW_CALENDAR_SELECTION_STRATEGY, TW_DATE_ADAPTER, TW_DATE_FORMATS, TW_DATE_SERIALIZATION, TW_TZ_OVERRIDE, TZ_OVERRIDE, TwDateRange, WEEKS_PER_MONTH, WeekSelectionStrategy, YEARS_PER_PAGE, YEARS_PER_ROW, YearViewComponent, YearsViewComponent, calendarRequiredValidator, calendarValidator, createCalendarCell, createDateRange, createGrid, de, emptyCalendarValue, es, fr, getFirstDayOfMonth, getMultiYearStartingYear, getWeekdayHeaders, isCalendarValueEmpty, isDateDisabled, isDateInRange, isMonthDisabled, isYearDisabled, ja, navigateGrid, provideCalendarIntl, provideCalendarSelectionStrategy, provideMultiSelectionStrategy, provideNativeDateAdapter, provideRangeSelectionStrategy, provideSingleSelectionStrategy, provideTwCalendar, provideWeekSelectionStrategy, pt, serializeCalendarValue, toTwDateRange, yearsPerPage };
|
|
1735
1841
|
export type { CalendarCell, CalendarCellAccessibleNameContext, CalendarCellConfig, CalendarCellKeyNavEvent, CalendarCellState, CalendarConstraints, CalendarErrorCode, CalendarMode, CalendarMultipleValue, CalendarOverlayState, CalendarRangeValue, CalendarSelectionState, CalendarSingleValue, CalendarValidationErrors, CalendarValidatorContext, CalendarValue, CalendarViewState, DateClassFn, DateFilterFn, DateFormats, DateRange, DisabledDates, MaxSelectionBehavior, MobileMode, ModeChangeEvent, NameStyle, RangeClickBehavior, RangeGranularity, RangePreviewEvent, ResetBehavior, SelectionClearedEvent, SelectionCompleteEvent, SelectionResult, TwDateNameStyle, TwDateRangeInput, TwNativeDateFormat, ViewChangeEvent, WeekdayHeader };
|