@tzslot/angular 0.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +152 -0
- package/fesm2022/tzslot-angular.mjs +875 -0
- package/fesm2022/tzslot-angular.mjs.map +1 -0
- package/package.json +47 -0
- package/types/tzslot-angular.d.ts +370 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, AfterViewInit, OnDestroy } from '@angular/core';
|
|
3
|
+
import * as temporal_spec from 'temporal-spec';
|
|
4
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
5
|
+
import { Slot, Instant, Weekday, ValueShape, PlainDate, DateLike, DailyWindowsSummary } from '@tzslot/core';
|
|
6
|
+
import { SlotChoice, TzslotMessages, CalendarView, RenderCell, CalendarButton, YearMonth, FieldMode, DateRangeValue, DateTimeRangeValue, DailyRangeValue } from '@tzslot/dom';
|
|
7
|
+
export { CalendarButton, CalendarView, CellRender, DailyRangeValue, DateRangeValue, DateTimeRangeValue, DayCellInfo, EN, FR, FieldMode, RenderCell, SlotChoice, TzslotMessages } from '@tzslot/dom';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* `<tz-time-slots>` — the slot list from @tzslot/dom, spoken in Angular.
|
|
11
|
+
*
|
|
12
|
+
* What it selects is an `Instant`, never a wall time. A wall time is what a
|
|
13
|
+
* clock shows; an instant is when it happened. Only one of those can be stored.
|
|
14
|
+
*/
|
|
15
|
+
declare class TimeSlotPicker implements ControlValueAccessor {
|
|
16
|
+
/** The day to list, as a PlainDate or an ISO date string. */
|
|
17
|
+
readonly date: _angular_core.InputSignal<string | temporal_spec.Temporal.PlainDate>;
|
|
18
|
+
/** An IANA identifier — 'Europe/Paris', not an offset. Offsets change twice a year. */
|
|
19
|
+
readonly timeZone: _angular_core.InputSignal<string>;
|
|
20
|
+
readonly stepMinutes: _angular_core.InputSignal<number>;
|
|
21
|
+
/** The working day. Slots outside these bounds are not produced at all. */
|
|
22
|
+
readonly minTime: _angular_core.InputSignal<string | undefined>;
|
|
23
|
+
readonly maxTime: _angular_core.InputSignal<string | undefined>;
|
|
24
|
+
/** Rules out individual slots while still showing them: booked, over capacity. */
|
|
25
|
+
readonly isDisabled: _angular_core.InputSignal<((slot: Omit<Slot, "disabled">) => boolean) | undefined>;
|
|
26
|
+
/** Leave out the times that cannot happen, rather than showing them struck through. */
|
|
27
|
+
readonly skipNonExistent: _angular_core.InputSignal<boolean>;
|
|
28
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
29
|
+
/** What is selected, as a moment. Two-way: `[(value)]`. */
|
|
30
|
+
readonly value: _angular_core.ModelSignal<temporal_spec.Temporal.Instant | null>;
|
|
31
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
32
|
+
readonly missingLabel: _angular_core.InputSignal<string | undefined>;
|
|
33
|
+
readonly emptyLabel: _angular_core.InputSignal<string | undefined>;
|
|
34
|
+
/** The rows listed, one per selectable moment: an ambiguous time gives two. */
|
|
35
|
+
readonly choices: _angular_core.Signal<SlotChoice[]>;
|
|
36
|
+
protected readonly formDisabled: _angular_core.WritableSignal<boolean>;
|
|
37
|
+
private readonly messages;
|
|
38
|
+
private readonly settings;
|
|
39
|
+
/**
|
|
40
|
+
* Created empty: `date` and `timeZone` are required inputs, which cannot be
|
|
41
|
+
* read before they are bound. The first change detection fills it in.
|
|
42
|
+
*/
|
|
43
|
+
private readonly slots;
|
|
44
|
+
constructor();
|
|
45
|
+
/** Clears the selection and tells any form control about it. */
|
|
46
|
+
clear(): void;
|
|
47
|
+
private onChange;
|
|
48
|
+
private onTouched;
|
|
49
|
+
writeValue(value: Instant | null): void;
|
|
50
|
+
registerOnChange(fn: (value: Instant | null) => void): void;
|
|
51
|
+
registerOnTouched(fn: () => void): void;
|
|
52
|
+
setDisabledState(isDisabled: boolean): void;
|
|
53
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TimeSlotPicker, never>;
|
|
54
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TimeSlotPicker, "tz-time-slots", never, { "date": { "alias": "date"; "required": true; "isSignal": true; }; "timeZone": { "alias": "timeZone"; "required": true; "isSignal": true; }; "stepMinutes": { "alias": "stepMinutes"; "required": false; "isSignal": true; }; "minTime": { "alias": "minTime"; "required": false; "isSignal": true; }; "maxTime": { "alias": "maxTime"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "skipNonExistent": { "alias": "skipNonExistent"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "missingLabel": { "alias": "missingLabel"; "required": false; "isSignal": true; }; "emptyLabel": { "alias": "emptyLabel"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare const TZSLOT_MESSAGES: InjectionToken<TzslotMessages>;
|
|
58
|
+
/** `providers: [provideTzslotMessages(FR)]` */
|
|
59
|
+
declare function provideTzslotMessages(messages: TzslotMessages): {
|
|
60
|
+
provide: InjectionToken<TzslotMessages>;
|
|
61
|
+
useValue: TzslotMessages;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* `<tz-calendar>` — the calendar from @tzslot/dom, spoken in Angular.
|
|
66
|
+
*
|
|
67
|
+
* Everything the user sees and does is drawn by `createCalendar`. This class
|
|
68
|
+
* only translates: inputs and models into `update()`, the calendar's callbacks
|
|
69
|
+
* into `valueChange` and form notifications, projected content into icons.
|
|
70
|
+
*/
|
|
71
|
+
declare class Calendar implements ControlValueAccessor, AfterViewInit, OnDestroy {
|
|
72
|
+
/** The selected day. Two-way: `[(value)]`. */
|
|
73
|
+
readonly value: _angular_core.ModelSignal<temporal_spec.Temporal.PlainDate | null>;
|
|
74
|
+
/** Monday by default, as ISO-8601 numbers the week. */
|
|
75
|
+
readonly firstDayOfWeek: _angular_core.InputSignal<Weekday>;
|
|
76
|
+
/** A BCP-47 tag for the month and weekday names. Defaults to the browser's. */
|
|
77
|
+
readonly locale: _angular_core.InputSignal<string | undefined>;
|
|
78
|
+
readonly min: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate | null>;
|
|
79
|
+
readonly max: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate | null>;
|
|
80
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
81
|
+
/**
|
|
82
|
+
* What the form control holds. 'temporal' by default; 'date' lets an
|
|
83
|
+
* existing FormControl<Date> keep working untouched, which is the whole of a
|
|
84
|
+
* flatpickr migration on most screens.
|
|
85
|
+
*/
|
|
86
|
+
readonly valueAs: _angular_core.InputSignal<ValueShape>;
|
|
87
|
+
/**
|
|
88
|
+
* The zone used to turn a Date into a calendar day and back. Only consulted
|
|
89
|
+
* when valueAs is 'date': which day an instant falls on depends on where you
|
|
90
|
+
* are standing, so it is explicit rather than guessed.
|
|
91
|
+
*/
|
|
92
|
+
readonly valueTimeZone: _angular_core.InputSignal<string>;
|
|
93
|
+
/** Rules out individual days inside the range: closures, weekends, full days. */
|
|
94
|
+
readonly isDateDisabled: _angular_core.InputSignal<((date: PlainDate) => boolean) | undefined>;
|
|
95
|
+
/** Today, injectable so a test does not depend on the day it runs. */
|
|
96
|
+
readonly today: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate>;
|
|
97
|
+
/**
|
|
98
|
+
* Which level the grid is choosing between. A model, so a consumer can open
|
|
99
|
+
* straight on years — a birthdate picker should not start on this month.
|
|
100
|
+
*/
|
|
101
|
+
readonly view: _angular_core.ModelSignal<CalendarView>;
|
|
102
|
+
/** 'months' turns this into a month picker, 'years' into a year picker. */
|
|
103
|
+
readonly minView: _angular_core.InputSignal<CalendarView>;
|
|
104
|
+
/** Adds to each day: a price, places left, a class, a reason to rule it out. */
|
|
105
|
+
readonly renderCell: _angular_core.InputSignal<RenderCell | undefined>;
|
|
106
|
+
/** Buttons under the grid: `['today', 'clear']`. None by default. */
|
|
107
|
+
readonly buttons: _angular_core.InputSignal<readonly CalendarButton[]>;
|
|
108
|
+
private readonly host;
|
|
109
|
+
private readonly messages;
|
|
110
|
+
private readonly prevSlot;
|
|
111
|
+
private readonly nextSlot;
|
|
112
|
+
protected readonly formDisabled: _angular_core.WritableSignal<boolean>;
|
|
113
|
+
private readonly settings;
|
|
114
|
+
/**
|
|
115
|
+
* Drawn at construction, so the cells exist as soon as the component does —
|
|
116
|
+
* as they did when this was a template. Inputs are not bound yet at this
|
|
117
|
+
* point; the effect below brings them in on the first change detection.
|
|
118
|
+
*/
|
|
119
|
+
private readonly calendar;
|
|
120
|
+
constructor();
|
|
121
|
+
/** Projected content only exists once the view does. */
|
|
122
|
+
ngAfterViewInit(): void;
|
|
123
|
+
ngOnDestroy(): void;
|
|
124
|
+
/** Moves the grid without selecting anything — flatpickr's setViewDate. */
|
|
125
|
+
goTo(date: PlainDate | YearMonth): void;
|
|
126
|
+
/** Clears the selection and tells any form control about it. */
|
|
127
|
+
clear(): void;
|
|
128
|
+
/** Whatever was projected into a slot, or undefined so the default chevron stays. */
|
|
129
|
+
private projected;
|
|
130
|
+
private onChange;
|
|
131
|
+
private onTouched;
|
|
132
|
+
writeValue(value: DateLike | null): void;
|
|
133
|
+
registerOnChange(fn: (value: unknown) => void): void;
|
|
134
|
+
registerOnTouched(fn: () => void): void;
|
|
135
|
+
setDisabledState(isDisabled: boolean): void;
|
|
136
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<Calendar, never>;
|
|
137
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<Calendar, "tz-calendar", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "valueAs": { "alias": "valueAs"; "required": false; "isSignal": true; }; "valueTimeZone": { "alias": "valueTimeZone"; "required": false; "isSignal": true; }; "isDateDisabled": { "alias": "isDateDisabled"; "required": false; "isSignal": true; }; "today": { "alias": "today"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "minView": { "alias": "minView"; "required": false; "isSignal": true; }; "renderCell": { "alias": "renderCell"; "required": false; "isSignal": true; }; "buttons": { "alias": "buttons"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "view": "viewChange"; }, never, ["[tzPrev]", "[tzNext]"], true, never>;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* `<tz-date-field>` — the field from @tzslot/dom, spoken in Angular.
|
|
142
|
+
*
|
|
143
|
+
* The trigger, the panel, its position, focus and theme are all drawn by
|
|
144
|
+
* `createDateField`. This class maps inputs to `update()`, callbacks to
|
|
145
|
+
* `valueChange`, `opened`, `closed` and form notifications, and a projected
|
|
146
|
+
* `[tzIcon]` to the field's icon.
|
|
147
|
+
*/
|
|
148
|
+
declare class DateField implements ControlValueAccessor, AfterViewInit {
|
|
149
|
+
readonly value: _angular_core.ModelSignal<temporal_spec.Temporal.PlainDate | null>;
|
|
150
|
+
readonly mode: _angular_core.InputSignal<FieldMode>;
|
|
151
|
+
readonly placeholder: _angular_core.InputSignal<string | undefined>;
|
|
152
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
153
|
+
readonly locale: _angular_core.InputSignal<string | undefined>;
|
|
154
|
+
readonly firstDayOfWeek: _angular_core.InputSignal<Weekday>;
|
|
155
|
+
readonly min: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate | null>;
|
|
156
|
+
readonly max: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate | null>;
|
|
157
|
+
readonly isDateDisabled: _angular_core.InputSignal<((date: PlainDate) => boolean) | undefined>;
|
|
158
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
159
|
+
/**
|
|
160
|
+
* What the form control holds. 'temporal' by default; 'date' lets an
|
|
161
|
+
* existing FormControl<Date> keep working untouched, which is the whole of a
|
|
162
|
+
* flatpickr migration on most screens.
|
|
163
|
+
*/
|
|
164
|
+
readonly valueAs: _angular_core.InputSignal<ValueShape>;
|
|
165
|
+
/**
|
|
166
|
+
* The zone used to turn a Date into a calendar day and back. Only consulted
|
|
167
|
+
* when valueAs is 'date': which day an instant falls on depends on where you
|
|
168
|
+
* are standing, so it is explicit rather than guessed.
|
|
169
|
+
*/
|
|
170
|
+
readonly valueTimeZone: _angular_core.InputSignal<string>;
|
|
171
|
+
/** How the chosen date is written in the field. Defaults to the locale's medium form. */
|
|
172
|
+
readonly displayWith: _angular_core.InputSignal<((date: PlainDate) => string) | undefined>;
|
|
173
|
+
/** Passed to the calendar in the panel. */
|
|
174
|
+
readonly renderCell: _angular_core.InputSignal<RenderCell | undefined>;
|
|
175
|
+
/** Under the panel's grid: `['today', 'clear']`. Choosing either closes it. */
|
|
176
|
+
readonly buttons: _angular_core.InputSignal<readonly CalendarButton[]>;
|
|
177
|
+
readonly opened: _angular_core.OutputEmitterRef<void>;
|
|
178
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
179
|
+
/** Whether the panel is showing. Readable from a ViewChild. */
|
|
180
|
+
readonly isOpen: _angular_core.WritableSignal<boolean>;
|
|
181
|
+
protected readonly formDisabled: _angular_core.WritableSignal<boolean>;
|
|
182
|
+
private readonly host;
|
|
183
|
+
private readonly messages;
|
|
184
|
+
private readonly iconSlot;
|
|
185
|
+
private readonly settings;
|
|
186
|
+
private readonly field;
|
|
187
|
+
constructor();
|
|
188
|
+
ngAfterViewInit(): void;
|
|
189
|
+
/**
|
|
190
|
+
* Opening and closing are public so a ViewChild can drive the field — a
|
|
191
|
+
* button elsewhere on the page, a wizard step, a keyboard shortcut.
|
|
192
|
+
*/
|
|
193
|
+
toggle(): void;
|
|
194
|
+
/** No-op when already open. */
|
|
195
|
+
open(): void;
|
|
196
|
+
close(): void;
|
|
197
|
+
/** Clears the selection and tells any form control about it. */
|
|
198
|
+
clear(): void;
|
|
199
|
+
private onChange;
|
|
200
|
+
private onTouched;
|
|
201
|
+
writeValue(value: DateLike | null): void;
|
|
202
|
+
registerOnChange(fn: (value: unknown) => void): void;
|
|
203
|
+
registerOnTouched(fn: () => void): void;
|
|
204
|
+
setDisabledState(isDisabled: boolean): void;
|
|
205
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DateField, never>;
|
|
206
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DateField, "tz-date-field", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "isDateDisabled": { "alias": "isDateDisabled"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "valueAs": { "alias": "valueAs"; "required": false; "isSignal": true; }; "valueTimeZone": { "alias": "valueTimeZone"; "required": false; "isSignal": true; }; "displayWith": { "alias": "displayWith"; "required": false; "isSignal": true; }; "renderCell": { "alias": "renderCell"; "required": false; "isSignal": true; }; "buttons": { "alias": "buttons"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "opened": "opened"; "closed": "closed"; }, never, ["[tzIcon]"], true, never>;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/** `<tz-date-range>` — the range from @tzslot/dom, spoken in Angular. */
|
|
210
|
+
declare class DateRange implements ControlValueAccessor, AfterViewInit {
|
|
211
|
+
readonly value: _angular_core.ModelSignal<DateRangeValue>;
|
|
212
|
+
readonly firstDayOfWeek: _angular_core.InputSignal<Weekday>;
|
|
213
|
+
readonly locale: _angular_core.InputSignal<string | undefined>;
|
|
214
|
+
readonly min: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate | null>;
|
|
215
|
+
readonly max: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate | null>;
|
|
216
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
217
|
+
readonly isDateDisabled: _angular_core.InputSignal<((date: PlainDate) => boolean) | undefined>;
|
|
218
|
+
readonly today: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate>;
|
|
219
|
+
/** Refuse a range that steps over a day isDateDisabled rules out. On by default. */
|
|
220
|
+
readonly blockAcrossDisabled: _angular_core.InputSignal<boolean>;
|
|
221
|
+
/** Adds to each day: a price per night, places left, a class of your own. */
|
|
222
|
+
readonly renderCell: _angular_core.InputSignal<RenderCell | undefined>;
|
|
223
|
+
/** Overrides the bundle for this one instance. */
|
|
224
|
+
readonly rangeSpansBlockedMessage: _angular_core.InputSignal<string | undefined>;
|
|
225
|
+
protected readonly formDisabled: _angular_core.WritableSignal<boolean>;
|
|
226
|
+
private readonly host;
|
|
227
|
+
private readonly messages;
|
|
228
|
+
private readonly prevSlot;
|
|
229
|
+
private readonly nextSlot;
|
|
230
|
+
private readonly settings;
|
|
231
|
+
private readonly range;
|
|
232
|
+
constructor();
|
|
233
|
+
ngAfterViewInit(): void;
|
|
234
|
+
/** Clears the selection and tells any form control about it. */
|
|
235
|
+
clear(): void;
|
|
236
|
+
private onChange;
|
|
237
|
+
private onTouched;
|
|
238
|
+
writeValue(value: DateRangeValue | null): void;
|
|
239
|
+
registerOnChange(fn: (value: DateRangeValue) => void): void;
|
|
240
|
+
registerOnTouched(fn: () => void): void;
|
|
241
|
+
setDisabledState(isDisabled: boolean): void;
|
|
242
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DateRange, never>;
|
|
243
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DateRange, "tz-date-range", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "isDateDisabled": { "alias": "isDateDisabled"; "required": false; "isSignal": true; }; "today": { "alias": "today"; "required": false; "isSignal": true; }; "blockAcrossDisabled": { "alias": "blockAcrossDisabled"; "required": false; "isSignal": true; }; "renderCell": { "alias": "renderCell"; "required": false; "isSignal": true; }; "rangeSpansBlockedMessage": { "alias": "rangeSpansBlockedMessage"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, ["[tzPrev]", "[tzNext]"], true, never>;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* `<tz-datetime-range>` — the interval from @tzslot/dom, spoken in Angular.
|
|
248
|
+
*
|
|
249
|
+
* The duration shown is the measured one, and when it disagrees with the clock
|
|
250
|
+
* faces the widget says so in words.
|
|
251
|
+
*/
|
|
252
|
+
declare class DateTimeRange implements ControlValueAccessor {
|
|
253
|
+
readonly value: _angular_core.ModelSignal<DateTimeRangeValue>;
|
|
254
|
+
readonly timeZone: _angular_core.InputSignal<string>;
|
|
255
|
+
readonly stepMinutes: _angular_core.InputSignal<number>;
|
|
256
|
+
readonly minTime: _angular_core.InputSignal<string | undefined>;
|
|
257
|
+
readonly maxTime: _angular_core.InputSignal<string | undefined>;
|
|
258
|
+
readonly isSlotDisabled: _angular_core.InputSignal<((slot: Omit<Slot, "disabled">) => boolean) | undefined>;
|
|
259
|
+
readonly min: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate | null>;
|
|
260
|
+
readonly max: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate | null>;
|
|
261
|
+
readonly locale: _angular_core.InputSignal<string | undefined>;
|
|
262
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
263
|
+
readonly startLabel: _angular_core.InputSignal<string | undefined>;
|
|
264
|
+
readonly endLabel: _angular_core.InputSignal<string | undefined>;
|
|
265
|
+
readonly endBeforeStartMessage: _angular_core.InputSignal<string | undefined>;
|
|
266
|
+
protected readonly formDisabled: _angular_core.WritableSignal<boolean>;
|
|
267
|
+
private readonly messages;
|
|
268
|
+
private readonly settings;
|
|
269
|
+
/** Created before the required timeZone is bound; the first change detection fills it in. */
|
|
270
|
+
private readonly range;
|
|
271
|
+
constructor();
|
|
272
|
+
/** Clears the selection and tells any form control about it. */
|
|
273
|
+
clear(): void;
|
|
274
|
+
private onChange;
|
|
275
|
+
private onTouched;
|
|
276
|
+
writeValue(value: DateTimeRangeValue | null): void;
|
|
277
|
+
registerOnChange(fn: (value: DateTimeRangeValue) => void): void;
|
|
278
|
+
registerOnTouched(fn: () => void): void;
|
|
279
|
+
setDisabledState(isDisabled: boolean): void;
|
|
280
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DateTimeRange, never>;
|
|
281
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DateTimeRange, "tz-datetime-range", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "timeZone": { "alias": "timeZone"; "required": true; "isSignal": true; }; "stepMinutes": { "alias": "stepMinutes"; "required": false; "isSignal": true; }; "minTime": { "alias": "minTime"; "required": false; "isSignal": true; }; "maxTime": { "alias": "maxTime"; "required": false; "isSignal": true; }; "isSlotDisabled": { "alias": "isSlotDisabled"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "startLabel": { "alias": "startLabel"; "required": false; "isSignal": true; }; "endLabel": { "alias": "endLabel"; "required": false; "isSignal": true; }; "endBeforeStartMessage": { "alias": "endBeforeStartMessage"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
/**
|
|
285
|
+
* `<tz-daily-range>` — a range of days with the same hours on each, from
|
|
286
|
+
* @tzslot/dom, spoken in Angular. "The 3rd to the 7th, 09:00 to 17:00."
|
|
287
|
+
*/
|
|
288
|
+
declare class DailyRange implements ControlValueAccessor {
|
|
289
|
+
readonly value: _angular_core.ModelSignal<DailyRangeValue>;
|
|
290
|
+
/** An IANA identifier. The hours are read on the clocks of this zone. */
|
|
291
|
+
readonly timeZone: _angular_core.InputSignal<string>;
|
|
292
|
+
readonly stepMinutes: _angular_core.InputSignal<number>;
|
|
293
|
+
/** The first and last times offered. */
|
|
294
|
+
readonly minTime: _angular_core.InputSignal<string | undefined>;
|
|
295
|
+
readonly maxTime: _angular_core.InputSignal<string | undefined>;
|
|
296
|
+
readonly firstDayOfWeek: _angular_core.InputSignal<Weekday>;
|
|
297
|
+
readonly locale: _angular_core.InputSignal<string | undefined>;
|
|
298
|
+
readonly min: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate | null>;
|
|
299
|
+
readonly max: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate | null>;
|
|
300
|
+
readonly isDateDisabled: _angular_core.InputSignal<((date: PlainDate) => boolean) | undefined>;
|
|
301
|
+
readonly renderCell: _angular_core.InputSignal<RenderCell | undefined>;
|
|
302
|
+
readonly today: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate>;
|
|
303
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
304
|
+
/** Every day's window and the real total, once all four parts are chosen. */
|
|
305
|
+
readonly summary: _angular_core.WritableSignal<DailyWindowsSummary | null>;
|
|
306
|
+
protected readonly formDisabled: _angular_core.WritableSignal<boolean>;
|
|
307
|
+
private readonly messages;
|
|
308
|
+
private readonly settings;
|
|
309
|
+
/** Created before the required timeZone is bound; the first change detection fills it in. */
|
|
310
|
+
private readonly range;
|
|
311
|
+
constructor();
|
|
312
|
+
/** Clears all four parts and tells any form control about it. */
|
|
313
|
+
clear(): void;
|
|
314
|
+
private onChange;
|
|
315
|
+
private onTouched;
|
|
316
|
+
writeValue(value: DailyRangeValue | null): void;
|
|
317
|
+
registerOnChange(fn: (value: DailyRangeValue) => void): void;
|
|
318
|
+
registerOnTouched(fn: () => void): void;
|
|
319
|
+
setDisabledState(isDisabled: boolean): void;
|
|
320
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DailyRange, never>;
|
|
321
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DailyRange, "tz-daily-range", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "timeZone": { "alias": "timeZone"; "required": true; "isSignal": true; }; "stepMinutes": { "alias": "stepMinutes"; "required": false; "isSignal": true; }; "minTime": { "alias": "minTime"; "required": false; "isSignal": true; }; "maxTime": { "alias": "maxTime"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "isDateDisabled": { "alias": "isDateDisabled"; "required": false; "isSignal": true; }; "renderCell": { "alias": "renderCell"; "required": false; "isSignal": true; }; "today": { "alias": "today"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* `<tz-multi-date>` — several days, not necessarily next to each other, from
|
|
326
|
+
* @tzslot/dom, spoken in Angular. The value is always in date order.
|
|
327
|
+
*/
|
|
328
|
+
declare class MultiDate implements ControlValueAccessor, AfterViewInit {
|
|
329
|
+
/** The chosen days, in date order. Two-way: `[(value)]`. */
|
|
330
|
+
readonly value: _angular_core.ModelSignal<readonly temporal_spec.Temporal.PlainDate[]>;
|
|
331
|
+
/** Once this many are chosen, the other days stop taking clicks. */
|
|
332
|
+
readonly maxDates: _angular_core.InputSignal<number | undefined>;
|
|
333
|
+
readonly firstDayOfWeek: _angular_core.InputSignal<Weekday>;
|
|
334
|
+
readonly locale: _angular_core.InputSignal<string | undefined>;
|
|
335
|
+
readonly min: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate | null>;
|
|
336
|
+
readonly max: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate | null>;
|
|
337
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
338
|
+
readonly isDateDisabled: _angular_core.InputSignal<((date: PlainDate) => boolean) | undefined>;
|
|
339
|
+
readonly today: _angular_core.InputSignal<temporal_spec.Temporal.PlainDate>;
|
|
340
|
+
readonly view: _angular_core.ModelSignal<CalendarView>;
|
|
341
|
+
readonly renderCell: _angular_core.InputSignal<RenderCell | undefined>;
|
|
342
|
+
readonly buttons: _angular_core.InputSignal<readonly CalendarButton[]>;
|
|
343
|
+
/** What the form control holds, each day as a Temporal date, a Date, or an ISO string. */
|
|
344
|
+
readonly valueAs: _angular_core.InputSignal<ValueShape>;
|
|
345
|
+
/** The zone a Date is read in. Only consulted when valueAs is 'date'. */
|
|
346
|
+
readonly valueTimeZone: _angular_core.InputSignal<string>;
|
|
347
|
+
protected readonly formDisabled: _angular_core.WritableSignal<boolean>;
|
|
348
|
+
private readonly host;
|
|
349
|
+
private readonly messages;
|
|
350
|
+
private readonly prevSlot;
|
|
351
|
+
private readonly nextSlot;
|
|
352
|
+
private readonly settings;
|
|
353
|
+
private readonly calendar;
|
|
354
|
+
constructor();
|
|
355
|
+
ngAfterViewInit(): void;
|
|
356
|
+
/** Moves the grid without choosing anything. */
|
|
357
|
+
goTo(date: PlainDate | YearMonth): void;
|
|
358
|
+
/** Empties the selection and tells any form control about it. */
|
|
359
|
+
clear(): void;
|
|
360
|
+
private onChange;
|
|
361
|
+
private onTouched;
|
|
362
|
+
writeValue(value: readonly DateLike[] | null): void;
|
|
363
|
+
registerOnChange(fn: (value: unknown) => void): void;
|
|
364
|
+
registerOnTouched(fn: () => void): void;
|
|
365
|
+
setDisabledState(isDisabled: boolean): void;
|
|
366
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<MultiDate, never>;
|
|
367
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<MultiDate, "tz-multi-date", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "maxDates": { "alias": "maxDates"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "locale": { "alias": "locale"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "isDateDisabled": { "alias": "isDateDisabled"; "required": false; "isSignal": true; }; "today": { "alias": "today"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "renderCell": { "alias": "renderCell"; "required": false; "isSignal": true; }; "buttons": { "alias": "buttons"; "required": false; "isSignal": true; }; "valueAs": { "alias": "valueAs"; "required": false; "isSignal": true; }; "valueTimeZone": { "alias": "valueTimeZone"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "view": "viewChange"; }, never, ["[tzPrev]", "[tzNext]"], true, never>;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
export { Calendar, DailyRange, DateField, DateRange, DateTimeRange, MultiDate, TZSLOT_MESSAGES, TimeSlotPicker, provideTzslotMessages };
|