@wkly/datetime-picker 18.0.0 → 20.0.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/index.d.ts CHANGED
@@ -1,5 +1,335 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="@wkly/datetime-picker" />
5
- export * from './public-api';
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, InputSignal, InputSignalWithTransform, OutputEmitterRef, OnInit, AfterViewInit, OnDestroy, ElementRef, ChangeDetectorRef, ComponentRef, EnvironmentInjector, ApplicationRef, Injector, OnChanges, EventEmitter } from '@angular/core';
3
+ import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
4
+ import { WklyWeekOffset } from '@wkly/core';
5
+ import { WklyClock, WklyConfiguration, WklyPickerInputs as WklyPickerInputs$1, WklyPickerOutputs, WklyPickerInputsPropertyKeys, WklyPickerOutputsPropertyKeys, WklyCloseReason, WklyViewportChange, WklyWeekRow, WklyDraft, WklyStrings, WklyTranslations, WklyJumpOptions } from '@wkly/presentation';
6
+ export * from '@wkly/presentation';
7
+ import { WklySelectionMode, WklyPickerValue, WklyCalendarAdapter, WklyViewportPreset, WklyHourCycle, WklyDisabledDatePredicate, WklyDisabledTimePredicate, WklyRangeValidator, WklyWeekLabelMode, WklyWeekLabelFormatter, WklyValidationError, WklyCalendarDate } from '@wkly/adapters';
8
+ export { WklyDisabledDatePredicate, WklyDisabledTimePredicate, WklyEndpoint, WklyHourCycle, WklyIsoString, WklyPickerValue, WklyRangeValidator, WklyRangeValue, WklySelectionMode, WklyValidationError, WklyValidationErrorCode, WklyViewportPreset, WklyWeekLabelFormatter, WklyWeekLabelMode } from '@wkly/adapters';
9
+ import * as i4 from '@angular/common';
10
+
11
+ declare const WKLY_CLOCK: InjectionToken<WklyClock>;
12
+ declare const WKLY_CONFIG: InjectionToken<WklyConfiguration>;
13
+ declare const WKLY_LOCALIZATION: InjectionToken<Readonly<Record<string, string>>>;
14
+ declare const WKLY_TRANSLATIONS: InjectionToken<Readonly<Record<string, Readonly<Record<string, string>>>>>;
15
+ /** Shared public inputs/outputs inherited by the picker and both trigger directives. */
16
+ type WklyPickerSignalInputs<T> = {
17
+ [K in keyof T]: InputSignal<T[K]> | InputSignalWithTransform<T[K], unknown>;
18
+ };
19
+ type WklyPickerSignalOutputs<T> = {
20
+ [K in keyof T]: OutputEmitterRef<T[K]>;
21
+ };
22
+ type WklyPickerSignalInputsAndOutputs<T, U> = WklyPickerSignalInputs<T> & WklyPickerSignalOutputs<U>;
23
+ declare abstract class WklyPickerInputs implements WklyPickerSignalInputsAndOutputs<WklyPickerInputs$1, WklyPickerOutputs> {
24
+ protected readonly modeInput: InputSignal<WklySelectionMode>;
25
+ protected readonly valueInput: InputSignal<WklyPickerValue>;
26
+ protected readonly calendarAdapterInput: InputSignal<WklyCalendarAdapter>;
27
+ protected readonly localeInput: InputSignal<string>;
28
+ protected readonly weekOffsetInput: InputSignal<WklyWeekOffset | null>;
29
+ protected readonly viewportPresetInput: InputSignal<WklyViewportPreset>;
30
+ protected readonly hourCycleInput: InputSignal<WklyHourCycle>;
31
+ protected readonly showSecondsInput: InputSignalWithTransform<boolean, unknown>;
32
+ protected readonly minuteStepInput: InputSignal<number>;
33
+ protected readonly secondStepInput: InputSignal<number>;
34
+ protected readonly minInput: InputSignal<string | null>;
35
+ protected readonly maxInput: InputSignal<string | null>;
36
+ protected readonly isDateDisabledInput: InputSignal<WklyDisabledDatePredicate | null>;
37
+ protected readonly isTimeDisabledInput: InputSignal<WklyDisabledTimePredicate | null>;
38
+ protected readonly rangeValidatorInput: InputSignal<WklyRangeValidator | null>;
39
+ protected readonly allowRangeAcrossDisabledInput: InputSignalWithTransform<boolean, unknown>;
40
+ protected readonly requiredInput: InputSignalWithTransform<boolean, unknown>;
41
+ protected readonly disabledInput: InputSignalWithTransform<boolean, unknown>;
42
+ protected readonly weekLabelModeInput: InputSignal<WklyWeekLabelMode>;
43
+ protected readonly weekLabelFormatterInput: InputSignal<WklyWeekLabelFormatter | null>;
44
+ protected readonly weekCacheSizeInput: InputSignal<number>;
45
+ protected readonly overscanWeeksInput: InputSignal<number>;
46
+ protected readonly ariaLabelInput: InputSignal<string | null>;
47
+ protected readonly ariaDescribedByInput: InputSignal<string | null>;
48
+ protected readonly initialEpochDayInput: InputSignal<number | null>;
49
+ protected readonly closeOnBackdropInput: InputSignalWithTransform<boolean, unknown>;
50
+ protected readonly validatorsInput: InputSignal<readonly ((value: WklyPickerValue) => WklyValidationError | null)[]>;
51
+ protected readonly translationsInput: InputSignal<Readonly<Record<string, Readonly<Record<string, string>>>> | null>;
52
+ readonly [WklyPickerInputsPropertyKeys.Mode]: InputSignal<WklySelectionMode>;
53
+ readonly [WklyPickerInputsPropertyKeys.Value]: InputSignal<WklyPickerValue>;
54
+ readonly [WklyPickerInputsPropertyKeys.CalendarAdapter]: InputSignal<WklyCalendarAdapter>;
55
+ readonly [WklyPickerInputsPropertyKeys.Locale]: InputSignal<string>;
56
+ readonly [WklyPickerInputsPropertyKeys.WeekOffset]: InputSignal<WklyWeekOffset | null>;
57
+ readonly [WklyPickerInputsPropertyKeys.ViewportPreset]: InputSignal<WklyViewportPreset>;
58
+ readonly [WklyPickerInputsPropertyKeys.HourCycle]: InputSignal<WklyHourCycle>;
59
+ readonly [WklyPickerInputsPropertyKeys.ShowSeconds]: InputSignalWithTransform<boolean, unknown>;
60
+ readonly [WklyPickerInputsPropertyKeys.MinuteStep]: InputSignal<number>;
61
+ readonly [WklyPickerInputsPropertyKeys.SecondStep]: InputSignal<number>;
62
+ readonly [WklyPickerInputsPropertyKeys.Min]: InputSignal<string | null>;
63
+ readonly [WklyPickerInputsPropertyKeys.Max]: InputSignal<string | null>;
64
+ readonly [WklyPickerInputsPropertyKeys.IsDateDisabled]: InputSignal<WklyDisabledDatePredicate | null>;
65
+ readonly [WklyPickerInputsPropertyKeys.IsTimeDisabled]: InputSignal<WklyDisabledTimePredicate | null>;
66
+ readonly [WklyPickerInputsPropertyKeys.RangeValidator]: InputSignal<WklyRangeValidator | null>;
67
+ readonly [WklyPickerInputsPropertyKeys.AllowRangeAcrossDisabled]: InputSignalWithTransform<boolean, unknown>;
68
+ readonly [WklyPickerInputsPropertyKeys.Required]: InputSignalWithTransform<boolean, unknown>;
69
+ readonly [WklyPickerInputsPropertyKeys.Disabled]: InputSignalWithTransform<boolean, unknown>;
70
+ readonly [WklyPickerInputsPropertyKeys.WeekLabelMode]: InputSignal<WklyWeekLabelMode>;
71
+ readonly [WklyPickerInputsPropertyKeys.WeekLabelFormatter]: InputSignal<WklyWeekLabelFormatter | null>;
72
+ readonly [WklyPickerInputsPropertyKeys.WeekCacheSize]: InputSignal<number>;
73
+ readonly [WklyPickerInputsPropertyKeys.OverscanWeeks]: InputSignal<number>;
74
+ readonly [WklyPickerInputsPropertyKeys.AriaLabel]: InputSignal<string | null>;
75
+ readonly [WklyPickerInputsPropertyKeys.AriaDescribedBy]: InputSignal<string | null>;
76
+ readonly [WklyPickerInputsPropertyKeys.InitialEpochDay]: InputSignal<number | null>;
77
+ readonly [WklyPickerInputsPropertyKeys.CloseOnBackdrop]: InputSignalWithTransform<boolean, unknown>;
78
+ readonly [WklyPickerInputsPropertyKeys.Validators]: InputSignal<readonly ((value: WklyPickerValue) => WklyValidationError | null)[]>;
79
+ readonly [WklyPickerInputsPropertyKeys.Translations]: InputSignal<Readonly<Record<string, Readonly<Record<string, string>>>> | null>;
80
+ readonly [WklyPickerOutputsPropertyKeys.ValueChange]: OutputEmitterRef<WklyPickerValue>;
81
+ readonly [WklyPickerOutputsPropertyKeys.ValidationChange]: OutputEmitterRef<readonly WklyValidationError[]>;
82
+ readonly [WklyPickerOutputsPropertyKeys.Opened]: OutputEmitterRef<void>;
83
+ readonly [WklyPickerOutputsPropertyKeys.Closed]: OutputEmitterRef<WklyCloseReason>;
84
+ readonly [WklyPickerOutputsPropertyKeys.ViewportChange]: OutputEmitterRef<WklyViewportChange>;
85
+ readonly [WklyPickerOutputsPropertyKeys.ViewModeChange]: OutputEmitterRef<"calendar" | "manual">;
86
+ static ɵfac: i0.ɵɵFactoryDeclaration<WklyPickerInputs, never>;
87
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WklyPickerInputs, never, never, { "modeInput": { "alias": "mode"; "required": false; "isSignal": true; }; "valueInput": { "alias": "value"; "required": false; "isSignal": true; }; "calendarAdapterInput": { "alias": "calendarAdapter"; "required": false; "isSignal": true; }; "localeInput": { "alias": "locale"; "required": false; "isSignal": true; }; "weekOffsetInput": { "alias": "weekOffset"; "required": false; "isSignal": true; }; "viewportPresetInput": { "alias": "viewportPreset"; "required": false; "isSignal": true; }; "hourCycleInput": { "alias": "hourCycle"; "required": false; "isSignal": true; }; "showSecondsInput": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "minuteStepInput": { "alias": "minuteStep"; "required": false; "isSignal": true; }; "secondStepInput": { "alias": "secondStep"; "required": false; "isSignal": true; }; "minInput": { "alias": "min"; "required": false; "isSignal": true; }; "maxInput": { "alias": "max"; "required": false; "isSignal": true; }; "isDateDisabledInput": { "alias": "isDateDisabled"; "required": false; "isSignal": true; }; "isTimeDisabledInput": { "alias": "isTimeDisabled"; "required": false; "isSignal": true; }; "rangeValidatorInput": { "alias": "rangeValidator"; "required": false; "isSignal": true; }; "allowRangeAcrossDisabledInput": { "alias": "allowRangeAcrossDisabled"; "required": false; "isSignal": true; }; "requiredInput": { "alias": "required"; "required": false; "isSignal": true; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; "weekLabelModeInput": { "alias": "weekLabelMode"; "required": false; "isSignal": true; }; "weekLabelFormatterInput": { "alias": "weekLabelFormatter"; "required": false; "isSignal": true; }; "weekCacheSizeInput": { "alias": "weekCacheSize"; "required": false; "isSignal": true; }; "overscanWeeksInput": { "alias": "overscanWeeks"; "required": false; "isSignal": true; }; "ariaLabelInput": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaDescribedByInput": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; "initialEpochDayInput": { "alias": "initialEpochDay"; "required": false; "isSignal": true; }; "closeOnBackdropInput": { "alias": "closeOnBackdrop"; "required": false; "isSignal": true; }; "validatorsInput": { "alias": "validators"; "required": false; "isSignal": true; }; "translationsInput": { "alias": "translations"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "validationChange": "validationChange"; "opened": "opened"; "closed": "closed"; "viewportChange": "viewportChange"; "viewModeChange": "viewModeChange"; }, never, never, true, never>;
88
+ }
89
+ declare function unwrapWklyPickerSignalInputs<T extends WklyPickerInputs$1>(source: WklyPickerSignalInputs<T>): T;
90
+
91
+ declare class WklyDateTimePickerComponent extends WklyPickerInputs implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor, Validator {
92
+ private defaultLocale;
93
+ private defaults;
94
+ private clock;
95
+ private strings;
96
+ private defaultTranslations;
97
+ private host;
98
+ private changeDetector;
99
+ scroller?: ElementRef<HTMLElement>;
100
+ presentation: "inline" | "transient";
101
+ viewMode: "calendar" | "manual";
102
+ endView: "date" | "days";
103
+ adapter: WklyCalendarAdapter;
104
+ effectiveLocale: string;
105
+ effectiveOffset: WklyWeekOffset;
106
+ effectiveHourCycle: "h12" | "h24";
107
+ direction: string;
108
+ rows: WklyWeekRow[];
109
+ weekdays: string[];
110
+ drafts: WklyDraft[];
111
+ errors: readonly WklyValidationError[];
112
+ today: number;
113
+ focused: number;
114
+ anchorWeek: number;
115
+ firstWeek: number;
116
+ visibleCount: number;
117
+ rowHeight: number;
118
+ scrollHeight: number;
119
+ paddingTop: number;
120
+ initialized: boolean;
121
+ compact: boolean;
122
+ readonly WklyPickerInputsPropertyKeys: typeof WklyPickerInputsPropertyKeys;
123
+ private baseWeek;
124
+ private firstSupportedDay;
125
+ private lastSupportedDay;
126
+ private firstSupportedWeek;
127
+ private lastSupportedWeek;
128
+ private generator;
129
+ private initialMonth;
130
+ private clipMonth;
131
+ private browser;
132
+ private observer?;
133
+ private destroyed;
134
+ private scrollEndTimer?;
135
+ private snapPending;
136
+ private onChange;
137
+ private onTouched;
138
+ private validatorChanged;
139
+ private configErrors;
140
+ private pendingValue;
141
+ private emittedValue;
142
+ private manualDateEndpoint;
143
+ private readonly formValue;
144
+ private readonly formDisabled;
145
+ private previousInputs?;
146
+ currentValue(): WklyPickerValue;
147
+ isDisabled(): boolean;
148
+ constructor(defaultLocale: string, defaults: WklyConfiguration, clock: WklyClock, strings: WklyStrings, defaultTranslations: WklyTranslations, platform: Object, host: ElementRef<HTMLElement>, changeDetector: ChangeDetectorRef);
149
+ ngOnInit(): void;
150
+ initialize(): void;
151
+ configure(): void;
152
+ private setSupportedScrollRange;
153
+ private clampFirstWeek;
154
+ ngAfterViewInit(): void;
155
+ ngOnDestroy(): void;
156
+ t(key: string): string;
157
+ get isRange(): boolean;
158
+ get hasDate(): boolean;
159
+ get hasTime(): boolean;
160
+ get submitVisible(): boolean;
161
+ get title(): string;
162
+ get canSubmit(): boolean;
163
+ private blank;
164
+ load(value: WklyPickerValue): void;
165
+ writeValue(value: WklyPickerValue): void;
166
+ registerOnChange(fn: (value: WklyPickerValue) => void): void;
167
+ registerOnTouched(fn: () => void): void;
168
+ setDisabledState(disabled: boolean): void;
169
+ validate(_control: AbstractControl): ValidationErrors | null;
170
+ registerOnValidatorChange(fn: () => void): void;
171
+ touched(): void;
172
+ private report;
173
+ check(): void;
174
+ trackDraft(index: number): number;
175
+ private orderDrafts;
176
+ finish(): void;
177
+ private commit;
178
+ submit(reason?: WklyCloseReason): void;
179
+ cancel(reason?: WklyCloseReason): void;
180
+ now(): void;
181
+ private clockDraft;
182
+ private initializeManualRange;
183
+ toggleView(): void;
184
+ private positionOnManualDate;
185
+ months(draft: WklyDraft): readonly string[];
186
+ monthCount(draft: WklyDraft): number;
187
+ get inDays(): number | null;
188
+ get inDaysLabel(): string;
189
+ get resultingEndDate(): string;
190
+ toggleEndView(view: "date" | "days"): void;
191
+ days(value: number | null): void;
192
+ field(index: number, field: string, value: number | null): void;
193
+ displayHour(draft: WklyDraft): number | null;
194
+ period(index: number, period: "am" | "pm" | "24"): void;
195
+ selected(day: number): boolean;
196
+ inRange(day: number): boolean;
197
+ dayDisabled(day: number): boolean;
198
+ select(day: number): void;
199
+ key(event: KeyboardEvent, day: number): void;
200
+ private position;
201
+ private resetScroll;
202
+ scroll(event: Event): void;
203
+ private scheduleSnap;
204
+ snapWeek(): void;
205
+ private showFirstWeek;
206
+ canMoveWeek(delta: number): boolean;
207
+ moveWeek(delta: number): void;
208
+ private renderRows;
209
+ trackCell(_i: number, cell: {
210
+ epochDay: number;
211
+ }): number;
212
+ trackRow(_i: number, row: WklyWeekRow): number;
213
+ scrollToEpochDay(day: number, options?: WklyJumpOptions): void;
214
+ scrollToAbsoluteWeek(week: number, options?: WklyJumpOptions): void;
215
+ scrollToCalendarDate(date: WklyCalendarDate, options?: WklyJumpOptions): void;
216
+ scrollToValue(value: string, options?: WklyJumpOptions): void;
217
+ focusDay(): void;
218
+ static ɵfac: i0.ɵɵFactoryDeclaration<WklyDateTimePickerComponent, never>;
219
+ static ɵcmp: i0.ɵɵComponentDeclaration<WklyDateTimePickerComponent, "wkly-datetime-picker", never, {}, {}, never, never, false, never>;
220
+ }
221
+
222
+ interface WklyPresentationRef {
223
+ readonly component: ComponentRef<WklyDateTimePickerComponent>;
224
+ destroy(): void;
225
+ }
226
+ /** Native-dialog factory. Browser resources are allocated only by open(). */
227
+ declare class WklyDateTimePickerDialogService {
228
+ private environmentInjector;
229
+ private app;
230
+ private document;
231
+ private platform;
232
+ constructor(environmentInjector: EnvironmentInjector, app: ApplicationRef, document: Document, platform: Object);
233
+ open(trigger: HTMLElement, onCancel: (reason: WklyCloseReason) => void, backdrop?: boolean, injector?: Injector): WklyPresentationRef;
234
+ static ɵfac: i0.ɵɵFactoryDeclaration<WklyDateTimePickerDialogService, never>;
235
+ static ɵprov: i0.ɵɵInjectableDeclaration<WklyDateTimePickerDialogService>;
236
+ }
237
+ /** Shared trigger lifecycle; optional presentation packages extend this class. */
238
+ declare abstract class WklyTriggerBase extends WklyPickerInputs implements ControlValueAccessor, Validator, OnDestroy {
239
+ protected element: ElementRef<HTMLElement>;
240
+ protected ref: WklyPresentationRef | null;
241
+ protected subscriptions: {
242
+ unsubscribe(): void;
243
+ }[];
244
+ private errors;
245
+ private change;
246
+ private touched;
247
+ private validation;
248
+ private readonly formValue;
249
+ private readonly formDisabled;
250
+ private previousInputs?;
251
+ private currentValue;
252
+ private isDisabled;
253
+ constructor(element: ElementRef<HTMLElement>);
254
+ protected abstract create(): WklyPresentationRef;
255
+ open(): void;
256
+ key(event: KeyboardEvent): void;
257
+ blur(): void;
258
+ close(reason?: WklyCloseReason): void;
259
+ ngOnDestroy(): void;
260
+ private copy;
261
+ private display;
262
+ private checkValue;
263
+ writeValue(value: WklyPickerValue): void;
264
+ registerOnChange(fn: (value: WklyPickerValue) => void): void;
265
+ registerOnTouched(fn: () => void): void;
266
+ setDisabledState(value: boolean): void;
267
+ validate(): ValidationErrors | null;
268
+ registerOnValidatorChange(fn: () => void): void;
269
+ scrollToEpochDay(day: number, options?: WklyJumpOptions): void;
270
+ scrollToAbsoluteWeek(week: number, options?: WklyJumpOptions): void;
271
+ scrollToCalendarDate(date: WklyCalendarDate, options?: WklyJumpOptions): void;
272
+ scrollToValue(value: string, options?: WklyJumpOptions): void;
273
+ static ɵfac: i0.ɵɵFactoryDeclaration<WklyTriggerBase, never>;
274
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WklyTriggerBase, never, never, {}, {}, never, never, true, never>;
275
+ }
276
+ declare class WklyDateTimePickerDialogDirective extends WklyTriggerBase {
277
+ private service;
278
+ private triggerInjector;
279
+ constructor(element: ElementRef<HTMLElement>, service: WklyDateTimePickerDialogService, triggerInjector: Injector);
280
+ protected create(): WklyPresentationRef;
281
+ static ɵfac: i0.ɵɵFactoryDeclaration<WklyDateTimePickerDialogDirective, never>;
282
+ static ɵdir: i0.ɵɵDirectiveDeclaration<WklyDateTimePickerDialogDirective, "[wklyDateTimePickerDialog]", ["wklyDialog"], {}, {}, never, never, false, never>;
283
+ }
284
+
285
+ declare class WklyFieldComponent implements OnChanges, OnDestroy {
286
+ value: number | null;
287
+ label: string;
288
+ hideLabel: boolean;
289
+ previousLabel: string;
290
+ nextLabel: string;
291
+ min: number;
292
+ max: number;
293
+ step: number;
294
+ locale: string;
295
+ disabled: boolean;
296
+ invalid: boolean;
297
+ labels: readonly string[] | null;
298
+ valueChange: EventEmitter<number | null>;
299
+ complete: EventEmitter<void>;
300
+ private before;
301
+ private touchY;
302
+ private touchSteps;
303
+ private touchChanged;
304
+ private typed;
305
+ private inputTimer;
306
+ private wheelTimer;
307
+ get display(): string;
308
+ ngOnChanges(changes: any): void;
309
+ ngOnDestroy(): void;
310
+ next(delta: number): number;
311
+ neighbor(delta: number): string;
312
+ stepBy(delta: number): void;
313
+ begin(event: FocusEvent): void;
314
+ type(event: Event): void;
315
+ key(event: KeyboardEvent): void;
316
+ finish(): void;
317
+ wheel(event: WheelEvent): void;
318
+ touchStart(event: TouchEvent): void;
319
+ touchMove(event: TouchEvent): void;
320
+ touchEnd(event: TouchEvent): void;
321
+ private cancelInput;
322
+ private scrollBy;
323
+ private applyTouchY;
324
+ static ɵfac: i0.ɵɵFactoryDeclaration<WklyFieldComponent, never>;
325
+ static ɵcmp: i0.ɵɵComponentDeclaration<WklyFieldComponent, "wkly-field", never, { "value": { "alias": "value"; "required": false; }; "label": { "alias": "label"; "required": false; }; "hideLabel": { "alias": "hideLabel"; "required": false; }; "previousLabel": { "alias": "previousLabel"; "required": false; }; "nextLabel": { "alias": "nextLabel"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "step": { "alias": "step"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "invalid": { "alias": "invalid"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; }, { "valueChange": "valueChange"; "complete": "complete"; }, never, never, false, never>;
326
+ }
327
+
328
+ declare class WklyDateTimePickerModule {
329
+ static ɵfac: i0.ɵɵFactoryDeclaration<WklyDateTimePickerModule, never>;
330
+ static ɵmod: i0.ɵɵNgModuleDeclaration<WklyDateTimePickerModule, [typeof WklyDateTimePickerComponent, typeof WklyDateTimePickerDialogDirective, typeof WklyFieldComponent], [typeof i4.CommonModule], [typeof WklyDateTimePickerComponent, typeof WklyDateTimePickerDialogDirective]>;
331
+ static ɵinj: i0.ɵɵInjectorDeclaration<WklyDateTimePickerModule>;
332
+ }
333
+
334
+ export { WKLY_CLOCK, WKLY_CONFIG, WKLY_LOCALIZATION, WKLY_TRANSLATIONS, WklyDateTimePickerComponent, WklyDateTimePickerDialogDirective, WklyDateTimePickerDialogService, WklyDateTimePickerModule, WklyFieldComponent, WklyPickerInputs, WklyTriggerBase, unwrapWklyPickerSignalInputs };
335
+ export type { WklyPickerSignalInputs, WklyPickerSignalInputsAndOutputs, WklyPickerSignalOutputs, WklyPresentationRef };
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@wkly/datetime-picker",
3
- "version": "18.0.0",
4
- "description": "Angular 18 integration for WKLY date and time picker",
3
+ "version": "20.0.0",
4
+ "description": "Angular 20 integration for WKLY date and time picker",
5
5
  "license": "MIT",
6
6
  "sideEffects": false,
7
7
  "peerDependencies": {
8
- "@angular/core": ">=18 <19",
9
- "@angular/common": ">=18 <19",
10
- "@angular/forms": ">=18 <19",
11
- "@angular/cdk": ">=18 <19",
8
+ "@angular/core": ">=20 <21",
9
+ "@angular/common": ">=20 <21",
10
+ "@angular/forms": ">=20 <21",
11
+ "@angular/cdk": ">=20 <21",
12
12
  "rxjs": "^6.5.3 || ^7.4.0"
13
13
  },
14
14
  "peerDependenciesMeta": {
@@ -25,7 +25,7 @@
25
25
  "repository": {
26
26
  "type": "git",
27
27
  "url": "git+https://github.com/cokkto/wkly-datetime-picker.git",
28
- "directory": "projects/wkly-datetime-picker.18"
28
+ "directory": "projects/wkly-datetime-picker.20"
29
29
  },
30
30
  "homepage": "https://github.com/cokkto/wkly-datetime-picker#readme",
31
31
  "bugs": {
@@ -43,14 +43,10 @@
43
43
  },
44
44
  ".": {
45
45
  "types": "./index.d.ts",
46
- "esm2022": "./esm2022/wkly-datetime-picker.mjs",
47
- "esm": "./esm2022/wkly-datetime-picker.mjs",
48
46
  "default": "./fesm2022/wkly-datetime-picker.mjs"
49
47
  },
50
48
  "./cdk-overlay": {
51
49
  "types": "./cdk-overlay/index.d.ts",
52
- "esm2022": "./esm2022/cdk-overlay/wkly-datetime-picker-cdk-overlay.mjs",
53
- "esm": "./esm2022/cdk-overlay/wkly-datetime-picker-cdk-overlay.mjs",
54
50
  "default": "./fesm2022/wkly-datetime-picker-cdk-overlay.mjs"
55
51
  }
56
52
  }
@@ -1,29 +0,0 @@
1
- import { ElementRef, Injector } from "@angular/core";
2
- import { Overlay } from "@angular/cdk/overlay";
3
- import { FocusTrapFactory } from "@angular/cdk/a11y";
4
- import { WklyCloseReason, WklyPresentationRef, WklyTriggerBase } from "@wkly/datetime-picker";
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "@angular/cdk/overlay";
7
- import * as i2 from "@wkly/datetime-picker";
8
- export declare class WklyDateTimePickerOverlayService {
9
- private overlay;
10
- private injector;
11
- private traps;
12
- constructor(overlay: Overlay, injector: Injector, traps: FocusTrapFactory);
13
- open(trigger: HTMLElement, onCancel: (reason: WklyCloseReason) => void, backdrop?: boolean, injector?: Injector): WklyPresentationRef;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<WklyDateTimePickerOverlayService, never>;
15
- static ɵprov: i0.ɵɵInjectableDeclaration<WklyDateTimePickerOverlayService>;
16
- }
17
- export declare class WklyDateTimePickerOverlayDirective extends WklyTriggerBase {
18
- private service;
19
- private triggerInjector;
20
- constructor(element: ElementRef<HTMLElement>, service: WklyDateTimePickerOverlayService, triggerInjector: Injector);
21
- protected create(): WklyPresentationRef;
22
- static ɵfac: i0.ɵɵFactoryDeclaration<WklyDateTimePickerOverlayDirective, never>;
23
- static ɵdir: i0.ɵɵDirectiveDeclaration<WklyDateTimePickerOverlayDirective, "[wklyDateTimePickerOverlay]", ["wklyOverlay"], {}, {}, never, never, false, never>;
24
- }
25
- export declare class WklyDateTimePickerOverlayModule {
26
- static ɵfac: i0.ɵɵFactoryDeclaration<WklyDateTimePickerOverlayModule, never>;
27
- static ɵmod: i0.ɵɵNgModuleDeclaration<WklyDateTimePickerOverlayModule, [typeof WklyDateTimePickerOverlayDirective], [typeof i1.OverlayModule, typeof i2.WklyDateTimePickerModule], [typeof WklyDateTimePickerOverlayDirective]>;
28
- static ɵinj: i0.ɵɵInjectorDeclaration<WklyDateTimePickerOverlayModule>;
29
- }
package/config.d.ts DELETED
@@ -1,85 +0,0 @@
1
- import { InjectionToken, InputSignal, InputSignalWithTransform, OutputEmitterRef } from "@angular/core";
2
- import { WklyWeekOffset } from "@wkly/core";
3
- import { WklyCalendarAdapter, WklyDisabledDatePredicate, WklyDisabledTimePredicate, WklyHourCycle, WklyPickerValue, WklyRangeValidator, WklySelectionMode, WklyValidationError, WklyViewportPreset, WklyWeekLabelFormatter, WklyWeekLabelMode } from "@wkly/adapters";
4
- import { WklyClock, WklyConfiguration, WklyCloseReason, WklyPickerInputs as WklyPickerInputsContract, WklyPickerOutputs as WklyPickerOutputsContract, WklyViewportChange, WklyPickerInputsPropertyKeys, WklyPickerOutputsPropertyKeys } from "@wkly/presentation";
5
- import * as i0 from "@angular/core";
6
- export * from "@wkly/presentation";
7
- export declare const WKLY_CLOCK: InjectionToken<WklyClock>;
8
- export declare const WKLY_CONFIG: InjectionToken<WklyConfiguration>;
9
- export declare const WKLY_LOCALIZATION: InjectionToken<Readonly<Record<string, string>>>;
10
- export declare const WKLY_TRANSLATIONS: InjectionToken<Readonly<Record<string, Readonly<Record<string, string>>>>>;
11
- /** Shared public inputs/outputs inherited by the picker and both trigger directives. */
12
- export type WklyPickerSignalInputs<T> = {
13
- [K in keyof T]: InputSignal<T[K]> | InputSignalWithTransform<T[K], unknown>;
14
- };
15
- export type WklyPickerSignalOutputs<T> = {
16
- [K in keyof T]: OutputEmitterRef<T[K]>;
17
- };
18
- export type WklyPickerSignalInputsAndOutputs<T, U> = WklyPickerSignalInputs<T> & WklyPickerSignalOutputs<U>;
19
- export declare abstract class WklyPickerInputs implements WklyPickerSignalInputsAndOutputs<WklyPickerInputsContract, WklyPickerOutputsContract> {
20
- protected readonly modeInput: InputSignal<WklySelectionMode>;
21
- protected readonly valueInput: InputSignal<WklyPickerValue>;
22
- protected readonly calendarAdapterInput: InputSignal<WklyCalendarAdapter>;
23
- protected readonly localeInput: InputSignal<string>;
24
- protected readonly weekOffsetInput: InputSignal<WklyWeekOffset | null>;
25
- protected readonly viewportPresetInput: InputSignal<WklyViewportPreset>;
26
- protected readonly hourCycleInput: InputSignal<WklyHourCycle>;
27
- protected readonly showSecondsInput: InputSignalWithTransform<boolean, unknown>;
28
- protected readonly minuteStepInput: InputSignal<number>;
29
- protected readonly secondStepInput: InputSignal<number>;
30
- protected readonly minInput: InputSignal<string | null>;
31
- protected readonly maxInput: InputSignal<string | null>;
32
- protected readonly isDateDisabledInput: InputSignal<WklyDisabledDatePredicate | null>;
33
- protected readonly isTimeDisabledInput: InputSignal<WklyDisabledTimePredicate | null>;
34
- protected readonly rangeValidatorInput: InputSignal<WklyRangeValidator | null>;
35
- protected readonly allowRangeAcrossDisabledInput: InputSignalWithTransform<boolean, unknown>;
36
- protected readonly requiredInput: InputSignalWithTransform<boolean, unknown>;
37
- protected readonly disabledInput: InputSignalWithTransform<boolean, unknown>;
38
- protected readonly weekLabelModeInput: InputSignal<WklyWeekLabelMode>;
39
- protected readonly weekLabelFormatterInput: InputSignal<WklyWeekLabelFormatter | null>;
40
- protected readonly weekCacheSizeInput: InputSignal<number>;
41
- protected readonly overscanWeeksInput: InputSignal<number>;
42
- protected readonly ariaLabelInput: InputSignal<string | null>;
43
- protected readonly ariaDescribedByInput: InputSignal<string | null>;
44
- protected readonly initialEpochDayInput: InputSignal<number | null>;
45
- protected readonly closeOnBackdropInput: InputSignalWithTransform<boolean, unknown>;
46
- protected readonly validatorsInput: InputSignal<readonly ((value: WklyPickerValue) => WklyValidationError | null)[]>;
47
- protected readonly translationsInput: InputSignal<Readonly<Record<string, Readonly<Record<string, string>>>> | null>;
48
- readonly [WklyPickerInputsPropertyKeys.Mode]: InputSignal<WklySelectionMode>;
49
- readonly [WklyPickerInputsPropertyKeys.Value]: InputSignal<WklyPickerValue>;
50
- readonly [WklyPickerInputsPropertyKeys.CalendarAdapter]: InputSignal<WklyCalendarAdapter>;
51
- readonly [WklyPickerInputsPropertyKeys.Locale]: InputSignal<string>;
52
- readonly [WklyPickerInputsPropertyKeys.WeekOffset]: InputSignal<WklyWeekOffset | null>;
53
- readonly [WklyPickerInputsPropertyKeys.ViewportPreset]: InputSignal<WklyViewportPreset>;
54
- readonly [WklyPickerInputsPropertyKeys.HourCycle]: InputSignal<WklyHourCycle>;
55
- readonly [WklyPickerInputsPropertyKeys.ShowSeconds]: InputSignalWithTransform<boolean, unknown>;
56
- readonly [WklyPickerInputsPropertyKeys.MinuteStep]: InputSignal<number>;
57
- readonly [WklyPickerInputsPropertyKeys.SecondStep]: InputSignal<number>;
58
- readonly [WklyPickerInputsPropertyKeys.Min]: InputSignal<string | null>;
59
- readonly [WklyPickerInputsPropertyKeys.Max]: InputSignal<string | null>;
60
- readonly [WklyPickerInputsPropertyKeys.IsDateDisabled]: InputSignal<WklyDisabledDatePredicate | null>;
61
- readonly [WklyPickerInputsPropertyKeys.IsTimeDisabled]: InputSignal<WklyDisabledTimePredicate | null>;
62
- readonly [WklyPickerInputsPropertyKeys.RangeValidator]: InputSignal<WklyRangeValidator | null>;
63
- readonly [WklyPickerInputsPropertyKeys.AllowRangeAcrossDisabled]: InputSignalWithTransform<boolean, unknown>;
64
- readonly [WklyPickerInputsPropertyKeys.Required]: InputSignalWithTransform<boolean, unknown>;
65
- readonly [WklyPickerInputsPropertyKeys.Disabled]: InputSignalWithTransform<boolean, unknown>;
66
- readonly [WklyPickerInputsPropertyKeys.WeekLabelMode]: InputSignal<WklyWeekLabelMode>;
67
- readonly [WklyPickerInputsPropertyKeys.WeekLabelFormatter]: InputSignal<WklyWeekLabelFormatter | null>;
68
- readonly [WklyPickerInputsPropertyKeys.WeekCacheSize]: InputSignal<number>;
69
- readonly [WklyPickerInputsPropertyKeys.OverscanWeeks]: InputSignal<number>;
70
- readonly [WklyPickerInputsPropertyKeys.AriaLabel]: InputSignal<string | null>;
71
- readonly [WklyPickerInputsPropertyKeys.AriaDescribedBy]: InputSignal<string | null>;
72
- readonly [WklyPickerInputsPropertyKeys.InitialEpochDay]: InputSignal<number | null>;
73
- readonly [WklyPickerInputsPropertyKeys.CloseOnBackdrop]: InputSignalWithTransform<boolean, unknown>;
74
- readonly [WklyPickerInputsPropertyKeys.Validators]: InputSignal<readonly ((value: WklyPickerValue) => WklyValidationError | null)[]>;
75
- readonly [WklyPickerInputsPropertyKeys.Translations]: InputSignal<Readonly<Record<string, Readonly<Record<string, string>>>> | null>;
76
- readonly [WklyPickerOutputsPropertyKeys.ValueChange]: OutputEmitterRef<WklyPickerValue>;
77
- readonly [WklyPickerOutputsPropertyKeys.ValidationChange]: OutputEmitterRef<readonly WklyValidationError[]>;
78
- readonly [WklyPickerOutputsPropertyKeys.Opened]: OutputEmitterRef<void>;
79
- readonly [WklyPickerOutputsPropertyKeys.Closed]: OutputEmitterRef<WklyCloseReason>;
80
- readonly [WklyPickerOutputsPropertyKeys.ViewportChange]: OutputEmitterRef<WklyViewportChange>;
81
- readonly [WklyPickerOutputsPropertyKeys.ViewModeChange]: OutputEmitterRef<"calendar" | "manual">;
82
- static ɵfac: i0.ɵɵFactoryDeclaration<WklyPickerInputs, never>;
83
- static ɵdir: i0.ɵɵDirectiveDeclaration<WklyPickerInputs, never, never, { "modeInput": { "alias": "mode"; "required": false; "isSignal": true; }; "valueInput": { "alias": "value"; "required": false; "isSignal": true; }; "calendarAdapterInput": { "alias": "calendarAdapter"; "required": false; "isSignal": true; }; "localeInput": { "alias": "locale"; "required": false; "isSignal": true; }; "weekOffsetInput": { "alias": "weekOffset"; "required": false; "isSignal": true; }; "viewportPresetInput": { "alias": "viewportPreset"; "required": false; "isSignal": true; }; "hourCycleInput": { "alias": "hourCycle"; "required": false; "isSignal": true; }; "showSecondsInput": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "minuteStepInput": { "alias": "minuteStep"; "required": false; "isSignal": true; }; "secondStepInput": { "alias": "secondStep"; "required": false; "isSignal": true; }; "minInput": { "alias": "min"; "required": false; "isSignal": true; }; "maxInput": { "alias": "max"; "required": false; "isSignal": true; }; "isDateDisabledInput": { "alias": "isDateDisabled"; "required": false; "isSignal": true; }; "isTimeDisabledInput": { "alias": "isTimeDisabled"; "required": false; "isSignal": true; }; "rangeValidatorInput": { "alias": "rangeValidator"; "required": false; "isSignal": true; }; "allowRangeAcrossDisabledInput": { "alias": "allowRangeAcrossDisabled"; "required": false; "isSignal": true; }; "requiredInput": { "alias": "required"; "required": false; "isSignal": true; }; "disabledInput": { "alias": "disabled"; "required": false; "isSignal": true; }; "weekLabelModeInput": { "alias": "weekLabelMode"; "required": false; "isSignal": true; }; "weekLabelFormatterInput": { "alias": "weekLabelFormatter"; "required": false; "isSignal": true; }; "weekCacheSizeInput": { "alias": "weekCacheSize"; "required": false; "isSignal": true; }; "overscanWeeksInput": { "alias": "overscanWeeks"; "required": false; "isSignal": true; }; "ariaLabelInput": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaDescribedByInput": { "alias": "ariaDescribedBy"; "required": false; "isSignal": true; }; "initialEpochDayInput": { "alias": "initialEpochDay"; "required": false; "isSignal": true; }; "closeOnBackdropInput": { "alias": "closeOnBackdrop"; "required": false; "isSignal": true; }; "validatorsInput": { "alias": "validators"; "required": false; "isSignal": true; }; "translationsInput": { "alias": "translations"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "validationChange": "validationChange"; "opened": "opened"; "closed": "closed"; "viewportChange": "viewportChange"; "viewModeChange": "viewModeChange"; }, never, never, false, never>;
84
- }
85
- export declare function unwrapWklyPickerSignalInputs<T extends WklyPickerInputsContract>(source: WklyPickerSignalInputs<T>): T;