nxt-pick-datetime 19.0.4 → 21.0.0-alpha.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.
Files changed (49) hide show
  1. package/README.md +11 -14
  2. package/assets/picker.scss +23 -23
  3. package/fesm2022/nxt-pick-datetime-moment-adapter.mjs +19 -27
  4. package/fesm2022/nxt-pick-datetime-moment-adapter.mjs.map +1 -1
  5. package/fesm2022/nxt-pick-datetime-native-adapter.mjs +19 -22
  6. package/fesm2022/nxt-pick-datetime-native-adapter.mjs.map +1 -1
  7. package/fesm2022/nxt-pick-datetime.mjs +1862 -2637
  8. package/fesm2022/nxt-pick-datetime.mjs.map +1 -1
  9. package/package.json +16 -13
  10. package/types/nxt-pick-datetime-moment-adapter.d.ts +25 -0
  11. package/types/nxt-pick-datetime-native-adapter.d.ts +13 -0
  12. package/types/nxt-pick-datetime.d.ts +1200 -0
  13. package/index.d.ts +0 -5
  14. package/lib/class/date-time-adapter.class.d.ts +0 -176
  15. package/lib/class/date-time-format.class.d.ts +0 -12
  16. package/lib/class/date-time.class.d.ts +0 -76
  17. package/lib/class/dialog-config.class.d.ts +0 -90
  18. package/lib/class/dialog-ref.class.d.ts +0 -50
  19. package/lib/date-time/calendar/calendar.component.d.ts +0 -147
  20. package/lib/date-time/calendar-body/calendar-body.component.d.ts +0 -79
  21. package/lib/date-time/calendar-month-view/calendar-month-view.component.d.ts +0 -139
  22. package/lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component.d.ts +0 -115
  23. package/lib/date-time/calendar-year-view/calendar-year-view.component.d.ts +0 -123
  24. package/lib/date-time/date-time-inline/date-time-inline.component.d.ts +0 -106
  25. package/lib/date-time/date-time-picker/date-time-picker.component.d.ts +0 -172
  26. package/lib/date-time/date-time-picker-container/date-time-picker-container.animations.d.ts +0 -6
  27. package/lib/date-time/date-time-picker-container/date-time-picker-container.component.d.ts +0 -129
  28. package/lib/date-time/date-time-picker-input.directive.d.ts +0 -167
  29. package/lib/date-time/date-time-picker-intl.service.d.ts +0 -51
  30. package/lib/date-time/date-time-picker-trigger.directive.d.ts +0 -22
  31. package/lib/date-time/date-time.module.d.ts +0 -23
  32. package/lib/date-time/number-fixed-len.pipe.d.ts +0 -8
  33. package/lib/date-time/timer/timer.component.d.ts +0 -131
  34. package/lib/date-time/timer-box/timer-box.component.d.ts +0 -37
  35. package/lib/dialog/dialog-container/dialog-container.component.d.ts +0 -69
  36. package/lib/dialog/dialog.module.d.ts +0 -12
  37. package/lib/dialog/dialog.service.d.ts +0 -78
  38. package/lib/utils/object.d.ts +0 -9
  39. package/moment-adapter/date-time-adapter.class.d.ts +0 -64
  40. package/moment-adapter/date-time-format.class.d.ts +0 -5
  41. package/moment-adapter/index.d.ts +0 -5
  42. package/moment-adapter/moment-adapter.module.d.ts +0 -8
  43. package/moment-adapter/public-api.d.ts +0 -2
  44. package/native-adapter/date-time-adapter.class.d.ts +0 -72
  45. package/native-adapter/date-time-format.class.d.ts +0 -5
  46. package/native-adapter/index.d.ts +0 -5
  47. package/native-adapter/native-adapter.module.d.ts +0 -9
  48. package/native-adapter/public-api.d.ts +0 -1
  49. package/public-api.d.ts +0 -14
@@ -1,78 +0,0 @@
1
- import { Overlay, OverlayContainer, ScrollStrategy } from '@angular/cdk/overlay';
2
- import { ComponentType } from '@angular/cdk/portal';
3
- import { Location } from '@angular/common';
4
- import { InjectionToken, Injector, TemplateRef } from '@angular/core';
5
- import { Subject } from 'rxjs';
6
- import { DialogConfig } from '../class/dialog-config.class';
7
- import { DialogRef } from '../class/dialog-ref.class';
8
- import * as i0 from "@angular/core";
9
- /** @internal */
10
- export declare const NXT_DIALOG_DATA: InjectionToken<any>;
11
- /**
12
- * Injection token that determines the scroll handling while the dialog is open.
13
- *
14
- * @internal
15
- */
16
- export declare const NXT_DIALOG_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;
17
- /** @internal */
18
- export declare function NXT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY(overlay: Overlay): () => ScrollStrategy;
19
- /** @internal */
20
- export declare const NXT_DIALOG_SCROLL_STRATEGY_PROVIDER: {
21
- provide: InjectionToken<() => ScrollStrategy>;
22
- deps: (typeof Overlay)[];
23
- useFactory: typeof NXT_DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY;
24
- };
25
- /**
26
- * Injection token that can be used to specify default dialog options.
27
- *
28
- * @internal
29
- */
30
- export declare const NXT_DIALOG_DEFAULT_OPTIONS: InjectionToken<DialogConfig>;
31
- /** @internal */
32
- export declare class DialogService {
33
- private readonly overlay;
34
- private readonly injector;
35
- private readonly location;
36
- private readonly defaultOptions;
37
- private readonly parentDialog;
38
- private readonly overlayContainer;
39
- private readonly ariaHiddenElements;
40
- private readonly _openDialogsAtThisLevel;
41
- private readonly _afterOpenAtThisLevel;
42
- private readonly _afterAllClosedAtThisLevel;
43
- /** Keeps track of the currently-open dialogs */
44
- get openDialogs(): Array<DialogRef<any>>;
45
- /** Stream that emits when a dialog has been isOpen */
46
- get afterOpen(): Subject<DialogRef<any>>;
47
- get _afterAllClosed(): Subject<void>;
48
- /**
49
- * Stream that emits when all open dialog have finished closing.
50
- * Will emit on subscribe if there are no open dialogs to begin with.
51
- */
52
- readonly afterAllClosed: import("rxjs").Observable<void | undefined>;
53
- private scrollStrategy;
54
- constructor(overlay: Overlay, injector: Injector, location: Location | undefined, scrollStrategy: () => ScrollStrategy, defaultOptions: DialogConfig | undefined, parentDialog: DialogService | undefined, overlayContainer: OverlayContainer);
55
- open<T>(componentOrTemplateRef: ComponentType<T> | TemplateRef<T>, config?: DialogConfig): DialogRef<any>;
56
- /**
57
- * Closes all of the currently-open dialogs.
58
- */
59
- closeAll(): void;
60
- /**
61
- * Finds an open dialog by its id.
62
- *
63
- * @param id ID to use when looking up the dialog.
64
- */
65
- getDialogById(id: string): DialogRef<any> | undefined;
66
- private attachDialogContent;
67
- private createInjector;
68
- private createOverlay;
69
- private attachDialogContainer;
70
- private getOverlayConfig;
71
- private removeOpenDialog;
72
- /**
73
- * Hides all of the content that isn't an overlay from assistive technology.
74
- */
75
- private hideNonDialogContentFromAssistiveTechnology;
76
- static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, [null, null, { optional: true; }, null, { optional: true; }, { optional: true; skipSelf: true; }, null]>;
77
- static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
78
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * Extends an object with the *enumerable* and *own* properties of one or more source objects,
3
- * similar to Object.assign.
4
- *
5
- * @param dest The object which will have properties copied to it.
6
- * @param sources The source objects from which properties will be copied.
7
- * @internal
8
- */
9
- export declare function extendObject(dest: any, ...sources: any[]): any;
@@ -1,64 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- import { Moment } from 'moment';
3
- import { DateTimeAdapter } from 'nxt-pick-datetime';
4
- import * as i0 from "@angular/core";
5
- /** Configurable options for {@see MomentDateAdapter} */
6
- export interface MomentDateTimeAdapterOptions {
7
- /**
8
- * Turns the use of utc dates on or off.
9
- * Changing this will change how the DateTimePicker output value.
10
- * {@default false}
11
- */
12
- useUtc: boolean;
13
- }
14
- /** InjectionToken for moment date adapter to configure options */
15
- export declare const NXT_MOMENT_DATE_TIME_ADAPTER_OPTIONS: InjectionToken<MomentDateTimeAdapterOptions>;
16
- /** @internal */
17
- export declare function NXT_MOMENT_DATE_TIME_ADAPTER_OPTIONS_FACTORY(): MomentDateTimeAdapterOptions;
18
- export declare class MomentDateTimeAdapter extends DateTimeAdapter<Moment> {
19
- private readonly options?;
20
- private _localeData;
21
- constructor(dateTimeLocale?: string, options?: MomentDateTimeAdapterOptions | undefined);
22
- setLocale(locale: string): void;
23
- getYear(date: Moment): number;
24
- getMonth(date: Moment): number;
25
- getDay(date: Moment): number;
26
- getDate(date: Moment): number;
27
- getHours(date: Moment): number;
28
- getMinutes(date: Moment): number;
29
- getSeconds(date: Moment): number;
30
- getTime(date: Moment): number;
31
- getNumDaysInMonth(date: Moment): number;
32
- differenceInCalendarDays(dateLeft: Moment, dateRight: Moment): number;
33
- getYearName(date: Moment): string;
34
- getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
35
- getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
36
- getDateNames(): string[];
37
- toIso8601(date: Moment): string;
38
- isEqual(dateLeft: Moment, dateRight: Moment): boolean;
39
- isSameDay(dateLeft: Moment, dateRight: Moment): boolean;
40
- isValid(date: Moment): boolean;
41
- invalid(): Moment;
42
- isDateInstance(obj: any): boolean;
43
- addCalendarYears(date: Moment, amount: number): Moment;
44
- addCalendarMonths(date: Moment, amount: number): Moment;
45
- addCalendarDays(date: Moment, amount: number): Moment;
46
- setHours(date: Moment, amount: number): Moment;
47
- setMinutes(date: Moment, amount: number): Moment;
48
- setSeconds(date: Moment, amount: number): Moment;
49
- createDate(year: number, month: number, date: number): Moment;
50
- clone(date: Moment): Moment;
51
- now(): Moment;
52
- format(date: Moment, displayFormat: any): string;
53
- parse(value: any, parseFormat: any): Moment | undefined;
54
- /**
55
- * Returns the given value if given a valid Moment or undefined. Deserializes valid ISO 8601 strings
56
- * (https://www.ietf.org/rfc/rfc3339.txt) and valid Date objects into valid Moments and empty
57
- * string into undefined. Returns an invalid date for all other values.
58
- */
59
- deserialize(value: any): Moment | undefined;
60
- /** Creates a Moment instance while respecting the current UTC settings */
61
- private createMoment;
62
- static ɵfac: i0.ɵɵFactoryDeclaration<MomentDateTimeAdapter, [{ optional: true; }, { optional: true; }]>;
63
- static ɵprov: i0.ɵɵInjectableDeclaration<MomentDateTimeAdapter>;
64
- }
@@ -1,5 +0,0 @@
1
- import { DateTimeFormats } from 'nxt-pick-datetime';
2
- /**
3
- * @internal
4
- */
5
- export declare const NXT_MOMENT_DATE_TIME_FORMATS: DateTimeFormats;
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="nxt-pick-datetime/moment-adapter" />
5
- export * from './public-api';
@@ -1,8 +0,0 @@
1
- import { Provider } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare function provideMomentDateTimeAdapter(): Provider[];
4
- export declare class MomentDateTimeModule {
5
- static ɵfac: i0.ɵɵFactoryDeclaration<MomentDateTimeModule, never>;
6
- static ɵmod: i0.ɵɵNgModuleDeclaration<MomentDateTimeModule, never, never, never>;
7
- static ɵinj: i0.ɵɵInjectorDeclaration<MomentDateTimeModule>;
8
- }
@@ -1,2 +0,0 @@
1
- export { MomentDateTimeAdapterOptions, NXT_MOMENT_DATE_TIME_ADAPTER_OPTIONS } from './date-time-adapter.class';
2
- export { MomentDateTimeModule, provideMomentDateTimeAdapter } from './moment-adapter.module';
@@ -1,72 +0,0 @@
1
- import { Platform } from '@angular/cdk/platform';
2
- import { DateTimeAdapter } from 'nxt-pick-datetime';
3
- import * as i0 from "@angular/core";
4
- export declare class NativeDateTimeAdapter extends DateTimeAdapter<Date> {
5
- /** Whether to clamp the date between 1 and 9999 to avoid IE and Edge errors */
6
- private readonly _clampDate;
7
- /**
8
- * Whether to use `timeZone: 'utc'` with `Intl.DateTimeFormat` when formatting dates.
9
- * Without this `Intl.DateTimeFormat` sometimes chooses the wrong timeZone, which can throw off
10
- * the result. (e.g. in the en-US locale `new Date(1800, 7, 14).toLocaleDateString()`
11
- * will produce `'8/13/1800'`.
12
- */
13
- useUtcForDisplay: boolean;
14
- constructor(platform: Platform, dateTimeLocale?: string);
15
- getYear(date: Date): number;
16
- getMonth(date: Date): number;
17
- getDay(date: Date): number;
18
- getDate(date: Date): number;
19
- getHours(date: Date): number;
20
- getMinutes(date: Date): number;
21
- getSeconds(date: Date): number;
22
- getTime(date: Date): number;
23
- getNumDaysInMonth(date: Date): number;
24
- differenceInCalendarDays(dateLeft: Date, dateRight: Date): number | undefined;
25
- getYearName(date: Date): string;
26
- getMonthNames(style: 'long' | 'short' | 'narrow'): string[];
27
- getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[];
28
- getDateNames(): string[];
29
- toIso8601(date: Date): string;
30
- isEqual(dateLeft: Date, dateRight: Date): boolean;
31
- isSameDay(dateLeft: Date, dateRight: Date): boolean;
32
- isValid(date: Date): boolean;
33
- invalid(): Date;
34
- isDateInstance(obj: any): boolean;
35
- addCalendarYears(date: Date, amount: number): Date;
36
- addCalendarMonths(date: Date, amount: number): Date;
37
- addCalendarDays(date: Date, amount: number): Date;
38
- setHours(date: Date, amount: number): Date;
39
- setMinutes(date: Date, amount: number): Date;
40
- setSeconds(date: Date, amount: number): Date;
41
- createDate(year: number, month: number, date: number, hours?: number, minutes?: number, seconds?: number): Date;
42
- clone(date: Date): Date;
43
- now(): Date;
44
- format(date: Date, displayFormat: any): string;
45
- parse(value: any, _parseFormat: any): Date | undefined;
46
- /**
47
- * Returns the given value if given a valid Date or undefined. Deserializes valid ISO 8601 strings
48
- * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into undefined. Returns an
49
- * invalid date for all other values.
50
- */
51
- deserialize(value: any): Date | undefined;
52
- /**
53
- * Creates a date but allows the month and date to overflow.
54
- */
55
- private createDateWithOverflow;
56
- /**
57
- * Strip out unicode LTR and RTL characters. Edge and IE insert these into formatted dates while
58
- * other browsers do not. We remove them to make output consistent and because they interfere with
59
- * date parsing.
60
- */
61
- private stripDirectionalityCharacters;
62
- /**
63
- * When converting Date object to string, javascript built-in functions may return wrong
64
- * results because it applies its internal DST rules. The DST rules around the world change
65
- * very frequently, and the current valid rule is not always valid in previous years though.
66
- * We work around this problem building a new Date object which has its internal UTC
67
- * representation with the local date and time.
68
- */
69
- private _format;
70
- static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateTimeAdapter, [null, { optional: true; }]>;
71
- static ɵprov: i0.ɵɵInjectableDeclaration<NativeDateTimeAdapter>;
72
- }
@@ -1,5 +0,0 @@
1
- import { DateTimeFormats } from 'nxt-pick-datetime';
2
- /**
3
- * @internal
4
- */
5
- export declare const NXT_NATIVE_DATE_TIME_FORMATS: DateTimeFormats;
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- /// <amd-module name="nxt-pick-datetime/native-adapter" />
5
- export * from './public-api';
@@ -1,9 +0,0 @@
1
- import { Provider } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@angular/cdk/platform";
4
- export declare function provideNativeDateTimeAdapter(): Provider[];
5
- export declare class NativeDateTimeModule {
6
- static ɵfac: i0.ɵɵFactoryDeclaration<NativeDateTimeModule, never>;
7
- static ɵmod: i0.ɵɵNgModuleDeclaration<NativeDateTimeModule, never, [typeof i1.PlatformModule], never>;
8
- static ɵinj: i0.ɵɵInjectorDeclaration<NativeDateTimeModule>;
9
- }
@@ -1 +0,0 @@
1
- export { NativeDateTimeModule, provideNativeDateTimeAdapter } from './native-adapter.module';
package/public-api.d.ts DELETED
@@ -1,14 +0,0 @@
1
- export { DateTimeAdapter } from './lib/class/date-time-adapter.class';
2
- export { DateTimeFormats, NXT_DATE_TIME_FORMATS } from './lib/class/date-time-format.class';
3
- export { DateFilter, PickerMode, PickerType, RenderItem, SelectMode, ViewType } from './lib/class/date-time.class';
4
- export { MonthViewComponent } from './lib/date-time/calendar-month-view/calendar-month-view.component';
5
- export { MultiYearViewComponent } from './lib/date-time/calendar-multi-year-view/calendar-multi-year-view.component';
6
- export { YearViewComponent } from './lib/date-time/calendar-year-view/calendar-year-view.component';
7
- export { CalendarComponent } from './lib/date-time/calendar/calendar.component';
8
- export { DateTimeInlineComponent } from './lib/date-time/date-time-inline/date-time-inline.component';
9
- export { DateTimeInputDirective, DateTimeInputEvent } from './lib/date-time/date-time-picker-input.directive';
10
- export { DateTimeIntl } from './lib/date-time/date-time-picker-intl.service';
11
- export { DateTimeTriggerDirective } from './lib/date-time/date-time-picker-trigger.directive';
12
- export { DateTimeComponent } from './lib/date-time/date-time-picker/date-time-picker.component';
13
- export { DateTimeModule } from './lib/date-time/date-time.module';
14
- export { TimerComponent } from './lib/date-time/timer/timer.component';