@koobiq/angular-luxon-adapter 20.2.0 → 20.3.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/adapter/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken } from '@angular/core';
|
|
3
3
|
import * as i1 from '@koobiq/components/core';
|
|
4
|
+
import * as _koobiq_date_adapter from '@koobiq/date-adapter';
|
|
5
|
+
import { DateUnit } from '@koobiq/date-adapter';
|
|
4
6
|
import { LuxonDateAdapterOptions, LuxonDateAdapter as LuxonDateAdapter$1 } from '@koobiq/luxon-date-adapter';
|
|
7
|
+
import { DateTime } from 'luxon';
|
|
5
8
|
import { Observable } from 'rxjs';
|
|
6
|
-
import * as _koobiq_date_adapter from '@koobiq/date-adapter';
|
|
7
9
|
|
|
8
10
|
/** Configurable options for {@see LuxonDateAdapter}. */
|
|
9
11
|
type KbqLuxonDateAdapterOptions = LuxonDateAdapterOptions;
|
|
@@ -14,11 +16,51 @@ declare function KBQ_LUXON_DATE_ADAPTER_OPTIONS_FACTORY(): KbqLuxonDateAdapterOp
|
|
|
14
16
|
declare class LuxonDateAdapter extends LuxonDateAdapter$1 {
|
|
15
17
|
protected readonly options?: LuxonDateAdapterOptions;
|
|
16
18
|
private localeService;
|
|
19
|
+
private readonly timezoneService;
|
|
20
|
+
/** Time zone {@link resolvedZone} was built from, so an unchanged zone is not resolved twice. */
|
|
21
|
+
private appliedTimezone;
|
|
22
|
+
private resolvedZone;
|
|
17
23
|
/** A stream that emits when the locale changes. */
|
|
18
24
|
get localeChanges(): Observable<any>;
|
|
19
25
|
private _localeChanges;
|
|
20
26
|
constructor();
|
|
21
27
|
setLocale: (locale: string) => void;
|
|
28
|
+
today(): DateTime;
|
|
29
|
+
format(date: DateTime, displayFormat: string): string;
|
|
30
|
+
startOf(date: DateTime, unit: DateUnit): DateTime;
|
|
31
|
+
deserialize(value: any): DateTime | null;
|
|
32
|
+
parse(value: any, parseFormat?: string): DateTime | null;
|
|
33
|
+
createDate(year: number, month?: number, day?: number): DateTime;
|
|
34
|
+
/**
|
|
35
|
+
* Brings `dateTimeOptions.zone` — the field the base class reconfigures every date it creates, parses
|
|
36
|
+
* and formats with — up to date with {@link KbqDateTimezoneService}.
|
|
37
|
+
*
|
|
38
|
+
* Called from every entry point rather than from an `effect()`: a pipe reading the same signal must
|
|
39
|
+
* not have to rely on the order effects happen to flush in to see the new zone.
|
|
40
|
+
*/
|
|
41
|
+
private syncTimezone;
|
|
42
|
+
/**
|
|
43
|
+
* The zone dates are built in when one is configured, `undefined` while {@link KBQ_DATE_TIMEZONE} is
|
|
44
|
+
* left at `'system'`.
|
|
45
|
+
*
|
|
46
|
+
* Distinct from {@link syncTimezone}, which also reports the `'UTC'` the `useUtc` option renders in:
|
|
47
|
+
* that option only ever converted instants, so it must not switch `createDate`/`parse` over to the
|
|
48
|
+
* wall-clock semantics the token brings.
|
|
49
|
+
*/
|
|
50
|
+
private activeZone;
|
|
51
|
+
private toLuxonZone;
|
|
52
|
+
/**
|
|
53
|
+
* Builds a date directly in the active zone.
|
|
54
|
+
*
|
|
55
|
+
* Calendar components name a wall-clock date: `createDate(2026, 2, 5)` is "5 March", and rendering it
|
|
56
|
+
* in another zone must not turn it into 4 March, which is what converting the instant does.
|
|
57
|
+
*
|
|
58
|
+
* The zone is applied through `Settings.defaultZone` rather than by moving the finished date, because
|
|
59
|
+
* the base builds with `DateTime.fromObject`/`fromFormat` and no zone of its own: a wall clock that
|
|
60
|
+
* does not exist in the host zone — a DST start at midnight, as in `America/Santiago` — would be
|
|
61
|
+
* shifted an hour before there was anything to move.
|
|
62
|
+
*/
|
|
63
|
+
private inActiveZone;
|
|
22
64
|
static ɵfac: i0.ɵɵFactoryDeclaration<LuxonDateAdapter, never>;
|
|
23
65
|
static ɵprov: i0.ɵɵInjectableDeclaration<LuxonDateAdapter>;
|
|
24
66
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { InjectionToken, inject, Injectable, NgModule } from '@angular/core';
|
|
3
|
-
import { KBQ_DATE_LOCALE, KBQ_LOCALE_SERVICE, KBQ_DEFAULT_LOCALE_ID, DateAdapter, KbqLocaleServiceModule, KBQ_DATE_FORMATS } from '@koobiq/components/core';
|
|
3
|
+
import { KBQ_DATE_LOCALE, KBQ_LOCALE_SERVICE, KbqDateTimezoneService, KBQ_DEFAULT_LOCALE_ID, kbqResolveTimezoneOffset, DateAdapter, KbqLocaleServiceModule, KBQ_DATE_FORMATS } from '@koobiq/components/core';
|
|
4
4
|
import { getLocaleFirstDayOfWeek } from '@angular/common';
|
|
5
5
|
import { LuxonDateAdapter as LuxonDateAdapter$1, LUXON_DATE_FORMATS } from '@koobiq/luxon-date-adapter';
|
|
6
|
-
import { Info } from 'luxon';
|
|
6
|
+
import { Info, FixedOffsetZone, Settings } from 'luxon';
|
|
7
7
|
import { BehaviorSubject } from 'rxjs';
|
|
8
8
|
|
|
9
|
+
/** An ISO date with no time and no offset: it names a calendar day, not an instant. */
|
|
10
|
+
const DATE_ONLY_ISO_PATTERN = /^\d{4}-\d{2}-\d{2}$/;
|
|
9
11
|
/** InjectionToken for moment date adapter to configure options. */
|
|
10
12
|
const KBQ_LUXON_DATE_ADAPTER_OPTIONS = new InjectionToken('KBQ_MOMENT_DATE_ADAPTER_OPTIONS', {
|
|
11
13
|
providedIn: 'root',
|
|
@@ -25,6 +27,9 @@ class LuxonDateAdapter extends LuxonDateAdapter$1 {
|
|
|
25
27
|
const options = inject(KBQ_LUXON_DATE_ADAPTER_OPTIONS, { optional: true }) ?? undefined;
|
|
26
28
|
super(dateLocale, options);
|
|
27
29
|
this.localeService = inject(KBQ_LOCALE_SERVICE, { optional: true });
|
|
30
|
+
this.timezoneService = inject(KbqDateTimezoneService);
|
|
31
|
+
/** Time zone {@link resolvedZone} was built from, so an unchanged zone is not resolved twice. */
|
|
32
|
+
this.appliedTimezone = null;
|
|
28
33
|
this._localeChanges = new BehaviorSubject(KBQ_DEFAULT_LOCALE_ID);
|
|
29
34
|
this.setLocale = (locale) => {
|
|
30
35
|
super.setLocale(locale);
|
|
@@ -48,26 +53,136 @@ class LuxonDateAdapter extends LuxonDateAdapter$1 {
|
|
|
48
53
|
this.setLocale(this.localeService?.id || dateLocale);
|
|
49
54
|
this.localeService?.changes.subscribe(this.setLocale);
|
|
50
55
|
}
|
|
51
|
-
|
|
52
|
-
|
|
56
|
+
today() {
|
|
57
|
+
this.syncTimezone();
|
|
58
|
+
return super.today();
|
|
59
|
+
}
|
|
60
|
+
format(date, displayFormat) {
|
|
61
|
+
this.syncTimezone();
|
|
62
|
+
return super.format(date, displayFormat);
|
|
63
|
+
}
|
|
64
|
+
startOf(date, unit) {
|
|
65
|
+
const zone = this.activeZone();
|
|
66
|
+
// Zoned first, truncated second: the base truncates in the date's own zone and converts only
|
|
67
|
+
// afterwards, which lands on an arbitrary time whenever the two zones differ.
|
|
68
|
+
return super.startOf(zone ? date.setZone(zone) : date, unit);
|
|
69
|
+
}
|
|
70
|
+
deserialize(value) {
|
|
71
|
+
const zone = this.activeZone();
|
|
72
|
+
const date = super.deserialize(value);
|
|
73
|
+
// The base implementation hands a `DateTime` input back in its own zone (it only sets the locale),
|
|
74
|
+
// so a date the application built elsewhere would keep that zone, and `format()` — which does
|
|
75
|
+
// reconfigure — would then disagree with `getHours()` and `daysFromToday()`, which do not.
|
|
76
|
+
return date && zone ? date.setZone(zone) : date;
|
|
77
|
+
}
|
|
78
|
+
parse(value, parseFormat) {
|
|
79
|
+
// A value parsed against a display format is user input, and a date-only ISO string names a
|
|
80
|
+
// calendar day: both name wall-clock components in the active zone. Everything else (a full ISO
|
|
81
|
+
// timestamp, millis, Date) names an instant and must not be shifted.
|
|
82
|
+
if (typeof value === 'string' && (parseFormat || DATE_ONLY_ISO_PATTERN.test(value))) {
|
|
83
|
+
return this.inActiveZone(() => super.parse(value, parseFormat));
|
|
84
|
+
}
|
|
85
|
+
this.syncTimezone();
|
|
86
|
+
return super.parse(value, parseFormat);
|
|
87
|
+
}
|
|
88
|
+
// `createDateTime()` is left to the base class: it builds on this method and sets the time components
|
|
89
|
+
// on the result, which by then is already in the active zone.
|
|
90
|
+
createDate(year, month, day) {
|
|
91
|
+
return this.inActiveZone(() => super.createDate(year, month, day));
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Brings `dateTimeOptions.zone` — the field the base class reconfigures every date it creates, parses
|
|
95
|
+
* and formats with — up to date with {@link KbqDateTimezoneService}.
|
|
96
|
+
*
|
|
97
|
+
* Called from every entry point rather than from an `effect()`: a pipe reading the same signal must
|
|
98
|
+
* not have to rely on the order effects happen to flush in to see the new zone.
|
|
99
|
+
*/
|
|
100
|
+
syncTimezone() {
|
|
101
|
+
// The base constructor builds locale data through `createDate()` before the fields of this class
|
|
102
|
+
// exist, so the very first calls run without a service and are left in whatever the base set up.
|
|
103
|
+
if (!this.timezoneService)
|
|
104
|
+
return this.dateTimeOptions?.zone;
|
|
105
|
+
const timezone = this.timezoneService.timezone();
|
|
106
|
+
if (timezone !== this.appliedTimezone) {
|
|
107
|
+
this.appliedTimezone = timezone;
|
|
108
|
+
this.resolvedZone = this.toLuxonZone(timezone);
|
|
109
|
+
}
|
|
110
|
+
// Assigned on every call, not only when the zone changes: `setLocale()` replaces the whole
|
|
111
|
+
// `dateTimeOptions` object, which would otherwise silently drop the zone applied before it.
|
|
112
|
+
this.dateTimeOptions.zone = this.resolvedZone;
|
|
113
|
+
return this.resolvedZone;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* The zone dates are built in when one is configured, `undefined` while {@link KBQ_DATE_TIMEZONE} is
|
|
117
|
+
* left at `'system'`.
|
|
118
|
+
*
|
|
119
|
+
* Distinct from {@link syncTimezone}, which also reports the `'UTC'` the `useUtc` option renders in:
|
|
120
|
+
* that option only ever converted instants, so it must not switch `createDate`/`parse` over to the
|
|
121
|
+
* wall-clock semantics the token brings.
|
|
122
|
+
*/
|
|
123
|
+
activeZone() {
|
|
124
|
+
const zone = this.syncTimezone();
|
|
125
|
+
return this.timezoneService?.timezone() === 'system' ? undefined : zone;
|
|
126
|
+
}
|
|
127
|
+
toLuxonZone(timezone) {
|
|
128
|
+
const hostZone = this.options?.useUtc ? 'UTC' : undefined;
|
|
129
|
+
if (timezone === 'system')
|
|
130
|
+
return hostZone;
|
|
131
|
+
// Luxon resolves IANA names and most fixed specifiers itself, which keeps DST handling with luxon.
|
|
132
|
+
if (typeof timezone === 'string') {
|
|
133
|
+
const zone = Info.normalizeZone(timezone);
|
|
134
|
+
if (zone.isValid)
|
|
135
|
+
return zone;
|
|
136
|
+
}
|
|
137
|
+
// A numeric offset, and the specifiers luxon rejects (GMT+05:30 and the like), go through the core
|
|
138
|
+
// parser, which bounds and rounds them, and come back as a fixed zone.
|
|
139
|
+
const offset = kbqResolveTimezoneOffset(timezone, Date.now());
|
|
140
|
+
return offset === null ? hostZone : FixedOffsetZone.instance(offset);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Builds a date directly in the active zone.
|
|
144
|
+
*
|
|
145
|
+
* Calendar components name a wall-clock date: `createDate(2026, 2, 5)` is "5 March", and rendering it
|
|
146
|
+
* in another zone must not turn it into 4 March, which is what converting the instant does.
|
|
147
|
+
*
|
|
148
|
+
* The zone is applied through `Settings.defaultZone` rather than by moving the finished date, because
|
|
149
|
+
* the base builds with `DateTime.fromObject`/`fromFormat` and no zone of its own: a wall clock that
|
|
150
|
+
* does not exist in the host zone — a DST start at midnight, as in `America/Santiago` — would be
|
|
151
|
+
* shifted an hour before there was anything to move.
|
|
152
|
+
*/
|
|
153
|
+
inActiveZone(build) {
|
|
154
|
+
const zone = this.activeZone();
|
|
155
|
+
if (!zone)
|
|
156
|
+
return build();
|
|
157
|
+
const { defaultZone } = Settings;
|
|
158
|
+
Settings.defaultZone = zone;
|
|
159
|
+
try {
|
|
160
|
+
return build();
|
|
161
|
+
}
|
|
162
|
+
finally {
|
|
163
|
+
Settings.defaultZone = defaultZone;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: LuxonDateAdapter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
167
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: LuxonDateAdapter }); }
|
|
53
168
|
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: LuxonDateAdapter, decorators: [{
|
|
55
170
|
type: Injectable
|
|
56
171
|
}], ctorParameters: () => [] });
|
|
57
172
|
|
|
58
173
|
const KBQ_LUXON_DATE_FORMATS = LUXON_DATE_FORMATS;
|
|
59
174
|
|
|
60
175
|
class LuxonDateModule {
|
|
61
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
62
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
63
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
176
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: LuxonDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
177
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: LuxonDateModule }); }
|
|
178
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: LuxonDateModule, providers: [
|
|
64
179
|
{
|
|
65
180
|
provide: DateAdapter,
|
|
66
181
|
useClass: LuxonDateAdapter
|
|
67
182
|
}
|
|
68
183
|
] }); }
|
|
69
184
|
}
|
|
70
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: LuxonDateModule, decorators: [{
|
|
71
186
|
type: NgModule,
|
|
72
187
|
args: [{
|
|
73
188
|
providers: [
|
|
@@ -79,9 +194,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImpo
|
|
|
79
194
|
}]
|
|
80
195
|
}] });
|
|
81
196
|
class KbqLuxonDateModule {
|
|
82
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
83
|
-
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.
|
|
84
|
-
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.
|
|
197
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqLuxonDateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
198
|
+
/** @nocollapse */ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.30", ngImport: i0, type: KbqLuxonDateModule, imports: [LuxonDateModule, KbqLocaleServiceModule] }); }
|
|
199
|
+
/** @nocollapse */ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqLuxonDateModule, providers: [
|
|
85
200
|
{
|
|
86
201
|
// todo после добавления KbqLocaleServiceModule возможно уже неактуально
|
|
87
202
|
provide: KBQ_DATE_FORMATS,
|
|
@@ -89,7 +204,7 @@ class KbqLuxonDateModule {
|
|
|
89
204
|
}
|
|
90
205
|
], imports: [LuxonDateModule, KbqLocaleServiceModule] }); }
|
|
91
206
|
}
|
|
92
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.30", ngImport: i0, type: KbqLuxonDateModule, decorators: [{
|
|
93
208
|
type: NgModule,
|
|
94
209
|
args: [{
|
|
95
210
|
imports: [LuxonDateModule, KbqLocaleServiceModule],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koobiq-angular-luxon-adapter-adapter.mjs","sources":["../../../packages/angular-luxon-adapter/adapter/date-adapter.ts","../../../packages/angular-luxon-adapter/adapter/date-formats.ts","../../../packages/angular-luxon-adapter/adapter/index.ts","../../../packages/angular-luxon-adapter/adapter/koobiq-angular-luxon-adapter-adapter.ts"],"sourcesContent":["import { getLocaleFirstDayOfWeek } from '@angular/common';\nimport { Injectable, InjectionToken, inject } from '@angular/core';\nimport { KBQ_DATE_LOCALE, KBQ_DEFAULT_LOCALE_ID, KBQ_LOCALE_SERVICE, KbqLocaleService } from '@koobiq/components/core';\nimport { LuxonDateAdapter as BaseLuxonDateAdapter, LuxonDateAdapterOptions } from '@koobiq/luxon-date-adapter';\nimport { Info } from 'luxon';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\n/** Configurable options for {@see LuxonDateAdapter}. */\nexport type KbqLuxonDateAdapterOptions = LuxonDateAdapterOptions;\n\n/** InjectionToken for moment date adapter to configure options. */\nexport const KBQ_LUXON_DATE_ADAPTER_OPTIONS = new InjectionToken<KbqLuxonDateAdapterOptions>(\n 'KBQ_MOMENT_DATE_ADAPTER_OPTIONS',\n {\n providedIn: 'root',\n factory: KBQ_LUXON_DATE_ADAPTER_OPTIONS_FACTORY\n }\n);\n\n/** @docs-private */\nexport function KBQ_LUXON_DATE_ADAPTER_OPTIONS_FACTORY(): KbqLuxonDateAdapterOptions {\n return { useUtc: false };\n}\n\n@Injectable()\nexport class LuxonDateAdapter extends BaseLuxonDateAdapter {\n protected readonly options?: LuxonDateAdapterOptions;\n private localeService = inject<KbqLocaleService>(KBQ_LOCALE_SERVICE, { optional: true });\n /** A stream that emits when the locale changes. */\n get localeChanges(): Observable<any> {\n return this._localeChanges;\n }\n\n private _localeChanges = new BehaviorSubject<string>(KBQ_DEFAULT_LOCALE_ID);\n\n constructor() {\n const dateLocale = inject(KBQ_DATE_LOCALE);\n const options =\n inject<LuxonDateAdapterOptions>(KBQ_LUXON_DATE_ADAPTER_OPTIONS, { optional: true }) ?? undefined;\n\n super(dateLocale, options);\n this.options = options;\n\n this.setLocale(this.localeService?.id || dateLocale);\n\n this.localeService?.changes.subscribe(this.setLocale);\n }\n\n setLocale = (locale: string): void => {\n super.setLocale(locale);\n\n // try to find locale using angular core utilities\n if (Object.keys(this.localeData).length <= 1) {\n const options = { locale };\n const localeData = {\n ...this.localeData,\n firstDayOfWeek: getLocaleFirstDayOfWeek(locale),\n longMonths: Info.monthsFormat('long', options),\n shortMonths: Info.monthsFormat('short', options),\n narrowDaysOfWeek: Info.weekdaysFormat('narrow', options),\n shortDaysOfWeek: Info.weekdaysFormat('short', options),\n longDaysOfWeek: Info.weekdaysFormat('long', options)\n };\n\n this.updateLocaleData(localeData);\n }\n\n this._localeChanges.next(locale);\n };\n}\n","import { LUXON_DATE_FORMATS } from '@koobiq/luxon-date-adapter';\n\nexport const KBQ_LUXON_DATE_FORMATS = LUXON_DATE_FORMATS;\n","import { NgModule } from '@angular/core';\nimport { DateAdapter, KBQ_DATE_FORMATS, KbqLocaleServiceModule } from '@koobiq/components/core';\nimport { LuxonDateAdapter } from './date-adapter';\n\nexport * from './date-adapter';\nexport * from './date-formats';\n\n@NgModule({\n providers: [\n {\n provide: DateAdapter,\n useClass: LuxonDateAdapter\n }\n ]\n})\nexport class LuxonDateModule {}\n\n@NgModule({\n imports: [LuxonDateModule, KbqLocaleServiceModule],\n providers: [\n {\n // todo после добавления KbqLocaleServiceModule возможно уже неактуально\n provide: KBQ_DATE_FORMATS,\n useValue: null\n }\n ]\n})\nexport class KbqLuxonDateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["BaseLuxonDateAdapter"],"mappings":";;;;;;;;AAUA;MACa,8BAA8B,GAAG,IAAI,cAAc,CAC5D,iCAAiC,EACjC;AACI,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE;AACZ,CAAA;AAGL;SACgB,sCAAsC,GAAA;AAClD,IAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;AAC5B;AAGM,MAAO,gBAAiB,SAAQA,kBAAoB,CAAA;;AAItD,IAAA,IAAI,aAAa,GAAA;QACb,OAAO,IAAI,CAAC,cAAc;IAC9B;AAIA,IAAA,WAAA,GAAA;AACI,QAAA,MAAM,UAAU,GAAG,MAAM,CAAC,eAAe,CAAC;AAC1C,QAAA,MAAM,OAAO,GACT,MAAM,CAA0B,8BAA8B,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,SAAS;AAEpG,QAAA,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC;QAbtB,IAAA,CAAA,aAAa,GAAG,MAAM,CAAmB,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAMhF,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,eAAe,CAAS,qBAAqB,CAAC;AAe3E,QAAA,IAAA,CAAA,SAAS,GAAG,CAAC,MAAc,KAAU;AACjC,YAAA,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC;;AAGvB,YAAA,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,IAAI,CAAC,EAAE;AAC1C,gBAAA,MAAM,OAAO,GAAG,EAAE,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EAAE;AACb;AACJ;AACJ,iBAAA;;;AC1BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"koobiq-angular-luxon-adapter-adapter.mjs","sources":["../../../packages/angular-luxon-adapter/adapter/date-adapter.ts","../../../packages/angular-luxon-adapter/adapter/date-formats.ts","../../../packages/angular-luxon-adapter/adapter/index.ts","../../../packages/angular-luxon-adapter/adapter/koobiq-angular-luxon-adapter-adapter.ts"],"sourcesContent":["import { getLocaleFirstDayOfWeek } from '@angular/common';\nimport { Injectable, InjectionToken, inject } from '@angular/core';\nimport {\n KBQ_DATE_LOCALE,\n KBQ_DEFAULT_LOCALE_ID,\n KBQ_LOCALE_SERVICE,\n KbqDateTimezoneService,\n KbqLocaleService,\n KbqTimezoneLike,\n kbqResolveTimezoneOffset\n} from '@koobiq/components/core';\nimport { DateUnit } from '@koobiq/date-adapter';\nimport { LuxonDateAdapter as BaseLuxonDateAdapter, LuxonDateAdapterOptions } from '@koobiq/luxon-date-adapter';\nimport { DateTime, FixedOffsetZone, Info, Settings, Zone } from 'luxon';\nimport { BehaviorSubject, Observable } from 'rxjs';\n\n/** Configurable options for {@see LuxonDateAdapter}. */\nexport type KbqLuxonDateAdapterOptions = LuxonDateAdapterOptions;\n\n/** An ISO date with no time and no offset: it names a calendar day, not an instant. */\nconst DATE_ONLY_ISO_PATTERN = /^\\d{4}-\\d{2}-\\d{2}$/;\n\n/** InjectionToken for moment date adapter to configure options. */\nexport const KBQ_LUXON_DATE_ADAPTER_OPTIONS = new InjectionToken<KbqLuxonDateAdapterOptions>(\n 'KBQ_MOMENT_DATE_ADAPTER_OPTIONS',\n {\n providedIn: 'root',\n factory: KBQ_LUXON_DATE_ADAPTER_OPTIONS_FACTORY\n }\n);\n\n/** @docs-private */\nexport function KBQ_LUXON_DATE_ADAPTER_OPTIONS_FACTORY(): KbqLuxonDateAdapterOptions {\n return { useUtc: false };\n}\n\n@Injectable()\nexport class LuxonDateAdapter extends BaseLuxonDateAdapter {\n protected readonly options?: LuxonDateAdapterOptions;\n private localeService = inject<KbqLocaleService>(KBQ_LOCALE_SERVICE, { optional: true });\n private readonly timezoneService = inject(KbqDateTimezoneService);\n\n /** Time zone {@link resolvedZone} was built from, so an unchanged zone is not resolved twice. */\n private appliedTimezone: KbqTimezoneLike | null = null;\n private resolvedZone: Zone | string | undefined;\n\n /** A stream that emits when the locale changes. */\n get localeChanges(): Observable<any> {\n return this._localeChanges;\n }\n\n private _localeChanges = new BehaviorSubject<string>(KBQ_DEFAULT_LOCALE_ID);\n\n constructor() {\n const dateLocale = inject(KBQ_DATE_LOCALE);\n const options =\n inject<LuxonDateAdapterOptions>(KBQ_LUXON_DATE_ADAPTER_OPTIONS, { optional: true }) ?? undefined;\n\n super(dateLocale, options);\n this.options = options;\n\n this.setLocale(this.localeService?.id || dateLocale);\n\n this.localeService?.changes.subscribe(this.setLocale);\n }\n\n setLocale = (locale: string): void => {\n super.setLocale(locale);\n\n // try to find locale using angular core utilities\n if (Object.keys(this.localeData).length <= 1) {\n const options = { locale };\n const localeData = {\n ...this.localeData,\n firstDayOfWeek: getLocaleFirstDayOfWeek(locale),\n longMonths: Info.monthsFormat('long', options),\n shortMonths: Info.monthsFormat('short', options),\n narrowDaysOfWeek: Info.weekdaysFormat('narrow', options),\n shortDaysOfWeek: Info.weekdaysFormat('short', options),\n longDaysOfWeek: Info.weekdaysFormat('long', options)\n };\n\n this.updateLocaleData(localeData);\n }\n\n this._localeChanges.next(locale);\n };\n\n override today(): DateTime {\n this.syncTimezone();\n\n return super.today();\n }\n\n override format(date: DateTime, displayFormat: string): string {\n this.syncTimezone();\n\n return super.format(date, displayFormat);\n }\n\n override startOf(date: DateTime, unit: DateUnit): DateTime {\n const zone = this.activeZone();\n\n // Zoned first, truncated second: the base truncates in the date's own zone and converts only\n // afterwards, which lands on an arbitrary time whenever the two zones differ.\n return super.startOf(zone ? date.setZone(zone) : date, unit);\n }\n\n override deserialize(value: any): DateTime | null {\n const zone = this.activeZone();\n const date = super.deserialize(value);\n\n // The base implementation hands a `DateTime` input back in its own zone (it only sets the locale),\n // so a date the application built elsewhere would keep that zone, and `format()` — which does\n // reconfigure — would then disagree with `getHours()` and `daysFromToday()`, which do not.\n return date && zone ? date.setZone(zone) : date;\n }\n\n override parse(value: any, parseFormat?: string): DateTime | null {\n // A value parsed against a display format is user input, and a date-only ISO string names a\n // calendar day: both name wall-clock components in the active zone. Everything else (a full ISO\n // timestamp, millis, Date) names an instant and must not be shifted.\n if (typeof value === 'string' && (parseFormat || DATE_ONLY_ISO_PATTERN.test(value))) {\n return this.inActiveZone(() => super.parse(value, parseFormat));\n }\n\n this.syncTimezone();\n\n return super.parse(value, parseFormat);\n }\n\n // `createDateTime()` is left to the base class: it builds on this method and sets the time components\n // on the result, which by then is already in the active zone.\n override createDate(year: number, month?: number, day?: number): DateTime {\n return this.inActiveZone(() => super.createDate(year, month, day));\n }\n\n /**\n * Brings `dateTimeOptions.zone` — the field the base class reconfigures every date it creates, parses\n * and formats with — up to date with {@link KbqDateTimezoneService}.\n *\n * Called from every entry point rather than from an `effect()`: a pipe reading the same signal must\n * not have to rely on the order effects happen to flush in to see the new zone.\n */\n private syncTimezone(): Zone | string | undefined {\n // The base constructor builds locale data through `createDate()` before the fields of this class\n // exist, so the very first calls run without a service and are left in whatever the base set up.\n if (!this.timezoneService) return this.dateTimeOptions?.zone;\n\n const timezone = this.timezoneService.timezone();\n\n if (timezone !== this.appliedTimezone) {\n this.appliedTimezone = timezone;\n this.resolvedZone = this.toLuxonZone(timezone);\n }\n\n // Assigned on every call, not only when the zone changes: `setLocale()` replaces the whole\n // `dateTimeOptions` object, which would otherwise silently drop the zone applied before it.\n this.dateTimeOptions.zone = this.resolvedZone;\n\n return this.resolvedZone;\n }\n\n /**\n * The zone dates are built in when one is configured, `undefined` while {@link KBQ_DATE_TIMEZONE} is\n * left at `'system'`.\n *\n * Distinct from {@link syncTimezone}, which also reports the `'UTC'` the `useUtc` option renders in:\n * that option only ever converted instants, so it must not switch `createDate`/`parse` over to the\n * wall-clock semantics the token brings.\n */\n private activeZone(): Zone | string | undefined {\n const zone = this.syncTimezone();\n\n return this.timezoneService?.timezone() === 'system' ? undefined : zone;\n }\n\n private toLuxonZone(timezone: KbqTimezoneLike): Zone | string | undefined {\n const hostZone = this.options?.useUtc ? 'UTC' : undefined;\n\n if (timezone === 'system') return hostZone;\n\n // Luxon resolves IANA names and most fixed specifiers itself, which keeps DST handling with luxon.\n if (typeof timezone === 'string') {\n const zone = Info.normalizeZone(timezone);\n\n if (zone.isValid) return zone;\n }\n\n // A numeric offset, and the specifiers luxon rejects (GMT+05:30 and the like), go through the core\n // parser, which bounds and rounds them, and come back as a fixed zone.\n const offset = kbqResolveTimezoneOffset(timezone, Date.now());\n\n return offset === null ? hostZone : FixedOffsetZone.instance(offset);\n }\n\n /**\n * Builds a date directly in the active zone.\n *\n * Calendar components name a wall-clock date: `createDate(2026, 2, 5)` is \"5 March\", and rendering it\n * in another zone must not turn it into 4 March, which is what converting the instant does.\n *\n * The zone is applied through `Settings.defaultZone` rather than by moving the finished date, because\n * the base builds with `DateTime.fromObject`/`fromFormat` and no zone of its own: a wall clock that\n * does not exist in the host zone — a DST start at midnight, as in `America/Santiago` — would be\n * shifted an hour before there was anything to move.\n */\n private inActiveZone<T extends DateTime | null>(build: () => T): T {\n const zone = this.activeZone();\n\n if (!zone) return build();\n\n const { defaultZone } = Settings;\n\n Settings.defaultZone = zone;\n\n try {\n return build();\n } finally {\n Settings.defaultZone = defaultZone;\n }\n }\n}\n","import { LUXON_DATE_FORMATS } from '@koobiq/luxon-date-adapter';\n\nexport const KBQ_LUXON_DATE_FORMATS = LUXON_DATE_FORMATS;\n","import { NgModule } from '@angular/core';\nimport { DateAdapter, KBQ_DATE_FORMATS, KbqLocaleServiceModule } from '@koobiq/components/core';\nimport { LuxonDateAdapter } from './date-adapter';\n\nexport * from './date-adapter';\nexport * from './date-formats';\n\n@NgModule({\n providers: [\n {\n provide: DateAdapter,\n useClass: LuxonDateAdapter\n }\n ]\n})\nexport class LuxonDateModule {}\n\n@NgModule({\n imports: [LuxonDateModule, KbqLocaleServiceModule],\n providers: [\n {\n // todo после добавления KbqLocaleServiceModule возможно уже неактуально\n provide: KBQ_DATE_FORMATS,\n useValue: null\n }\n ]\n})\nexport class KbqLuxonDateModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["BaseLuxonDateAdapter"],"mappings":";;;;;;;;AAmBA;AACA,MAAM,qBAAqB,GAAG,qBAAqB;AAEnD;MACa,8BAA8B,GAAG,IAAI,cAAc,CAC5D,iCAAiC,EACjC;AACI,IAAA,UAAU,EAAE,MAAM;AAClB,IAAA,OAAO,EAAE;AACZ,CAAA;AAGL;SACgB,sCAAsC,GAAA;AAClD,IAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;AAC5B;AAGM,MAAO,gBAAiB,SAAQA,kBAAoB,CAAA;;AAUtD,IAAA,IAAI,aAAa,GAAA;QACb,OAAO,IAAI,CAAC,cAAc;IAC9B;AAIA,IAAA,WAAA,GAAA;AACI,QAAA,MAAM,UAAU,GAAG,MAAM,CAAC,eAAe,CAAC;AAC1C,QAAA,MAAM,OAAO,GACT,MAAM,CAA0B,8BAA8B,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,SAAS;AAEpG,QAAA,KAAK,CAAC,UAAU,EAAE,OAAO,CAAC;QAnBtB,IAAA,CAAA,aAAa,GAAG,MAAM,CAAmB,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACvE,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,sBAAsB,CAAC;;QAGzD,IAAA,CAAA,eAAe,GAA2B,IAAI;AAQ9C,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,eAAe,CAAS,qBAAqB,CAAC;AAe3E,QAAA,IAAA,CAAA,SAAS,GAAG,CAAC,MAAc,KAAU;AACjC,YAAA,KAAK,CAAC,SAAS,CAAC,MA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AAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EAAA,SAAA,EARhB;AACP,YAAA;;AAEI,gBAAA,OAAO,EAAE,gBAAgB;AACzB,gBAAA,QAAQ,EAAE;AACb;SACJ,EAAA,OAAA,EAAA,CAPS,eAAe,EAAE,sBAAsB,CAAA,EAAA,CAAA,CAAA;;4FASxC,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAV9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,eAAe,EAAE,sBAAsB,CAAC;AAClD,oBAAA,SAAS,EAAE;AACP,wBAAA;;AAEI,4BAAA,OAAO,EAAE,gBAAgB;AACzB,4BAAA,QAAQ,EAAE;AACb;AACJ;AACJ,iBAAA;;;AC1BD;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koobiq/angular-luxon-adapter",
|
|
3
|
-
"version": "20.
|
|
3
|
+
"version": "20.3.0",
|
|
4
4
|
"description": "Koobiq Luxon Adapter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@koobiq/luxon-date-adapter": "^3.1.4",
|
|
17
|
-
"@koobiq/
|
|
17
|
+
"@koobiq/date-adapter": "^3.0.0",
|
|
18
|
+
"@koobiq/components": "20.3.0"
|
|
18
19
|
},
|
|
19
20
|
"dependencies": {
|
|
20
21
|
"tslib": "^2.6.2"
|