quang 19.3.16-2 → 19.4.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/components/date/date.component.d.ts +8 -1
- package/components/shared/quang-base-component.directive.d.ts +1 -1
- package/fesm2022/quang-components-date.mjs +221 -127
- package/fesm2022/quang-components-date.mjs.map +1 -1
- package/fesm2022/quang-components-shared.mjs +2 -2
- package/fesm2022/quang-components-shared.mjs.map +1 -1
- package/package.json +33 -33
|
@@ -9,6 +9,10 @@ export interface DateRange {
|
|
|
9
9
|
}
|
|
10
10
|
export type QuangDatepickerOptions = AirDatepickerOptions;
|
|
11
11
|
export declare class QuangDateComponent extends QuangBaseComponent<string | DateRange | null> {
|
|
12
|
+
private readonly _ngZone;
|
|
13
|
+
private readonly _cdr;
|
|
14
|
+
private readonly _appRef;
|
|
15
|
+
private _tickScheduled;
|
|
12
16
|
/**
|
|
13
17
|
* Format to use to show on the input field.
|
|
14
18
|
* The format is based on the standard {@link https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table}
|
|
@@ -57,6 +61,7 @@ export declare class QuangDateComponent extends QuangBaseComponent<string | Date
|
|
|
57
61
|
rangeSelection: import("@angular/core").InputSignal<boolean>;
|
|
58
62
|
_activeLanguage: import("@angular/core").Signal<string | null | undefined>;
|
|
59
63
|
_airDatepickerInstance: import("@angular/core").WritableSignal<AirDatepicker<HTMLInputElement> | undefined>;
|
|
64
|
+
private readonly _airDatepickerInlineMode;
|
|
60
65
|
searchTextDebounce: import("@angular/core").InputSignal<number>;
|
|
61
66
|
targetPosition: import("@angular/core").WritableSignal<AirDatepickerPosition>;
|
|
62
67
|
_generateAirDatepickerEffect: import("@angular/core").EffectRef;
|
|
@@ -72,6 +77,9 @@ export declare class QuangDateComponent extends QuangBaseComponent<string | Date
|
|
|
72
77
|
onBlurHandler(): void;
|
|
73
78
|
setupInputStringToDate(value: string): Date;
|
|
74
79
|
onChangedHandler(value: string | DateRange | null): void;
|
|
80
|
+
private propagateValueToControl;
|
|
81
|
+
private requestRender;
|
|
82
|
+
private syncValueFromDatepickerSelection;
|
|
75
83
|
onHideCalendar(): void;
|
|
76
84
|
formatDate(val: string | DateRange | null): string;
|
|
77
85
|
openDatePicker(): void;
|
|
@@ -80,7 +88,6 @@ export declare class QuangDateComponent extends QuangBaseComponent<string | Date
|
|
|
80
88
|
getLocale(): AirDatepickerLocale;
|
|
81
89
|
onCancel(): void;
|
|
82
90
|
private dateToUtc;
|
|
83
|
-
private dateToLocal;
|
|
84
91
|
private setCalendarPosition;
|
|
85
92
|
private setupTimepicker;
|
|
86
93
|
checkDateMatch(date: string): boolean;
|
|
@@ -37,7 +37,7 @@ export declare abstract class QuangBaseComponent<T = any> implements ControlValu
|
|
|
37
37
|
destroyRef: DestroyRef;
|
|
38
38
|
constructor();
|
|
39
39
|
registerOnChange(fn: (value: T) => void): void;
|
|
40
|
-
writeValue(
|
|
40
|
+
writeValue(value: T): void;
|
|
41
41
|
registerOnTouched(fn: () => void): void;
|
|
42
42
|
onChangedEventHandler($event: Event): void;
|
|
43
43
|
onChangedHandler(value: T): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NgClass } from '@angular/common';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { input, viewChild, computed, signal,
|
|
3
|
+
import { inject, NgZone, ChangeDetectorRef, ApplicationRef, input, viewChild, computed, signal, effect, forwardRef, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
4
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
5
5
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
6
|
import { TranslocoPipe } from '@jsverse/transloco';
|
|
@@ -28,6 +28,10 @@ import { QuangBaseComponent } from 'quang/components/shared';
|
|
|
28
28
|
class QuangDateComponent extends QuangBaseComponent {
|
|
29
29
|
constructor() {
|
|
30
30
|
super();
|
|
31
|
+
this._ngZone = inject(NgZone);
|
|
32
|
+
this._cdr = inject(ChangeDetectorRef);
|
|
33
|
+
this._appRef = inject(ApplicationRef);
|
|
34
|
+
this._tickScheduled = false;
|
|
31
35
|
/**
|
|
32
36
|
* Format to use to show on the input field.
|
|
33
37
|
* The format is based on the standard {@link https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table}
|
|
@@ -84,6 +88,9 @@ class QuangDateComponent extends QuangBaseComponent {
|
|
|
84
88
|
return navigator.language;
|
|
85
89
|
});
|
|
86
90
|
this._airDatepickerInstance = signal(undefined);
|
|
91
|
+
// AirDatepicker doesn't reliably support toggling `inline` at runtime via `update()`.
|
|
92
|
+
// Track the mode used to create the current instance and recreate when it changes.
|
|
93
|
+
this._airDatepickerInlineMode = signal(null);
|
|
87
94
|
this.searchTextDebounce = input(500);
|
|
88
95
|
this.targetPosition = signal('bottom left');
|
|
89
96
|
this._generateAirDatepickerEffect = effect(() => {
|
|
@@ -106,112 +113,146 @@ class QuangDateComponent extends QuangBaseComponent {
|
|
|
106
113
|
});
|
|
107
114
|
}
|
|
108
115
|
setupCalendar() {
|
|
109
|
-
if (this._inputForDate()?.nativeElement)
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
if (!this._inputForDate()?.nativeElement)
|
|
117
|
+
return;
|
|
118
|
+
const desiredInlineMode = this.showInline();
|
|
119
|
+
const existingInstance = this._airDatepickerInstance();
|
|
120
|
+
const existingInlineMode = this._airDatepickerInlineMode();
|
|
121
|
+
if (existingInstance && existingInlineMode !== null && existingInlineMode !== desiredInlineMode) {
|
|
122
|
+
const maybeDestroy = existingInstance;
|
|
123
|
+
maybeDestroy.destroy?.();
|
|
124
|
+
this._airDatepickerInstance.set(undefined);
|
|
125
|
+
}
|
|
126
|
+
let currentValue = this._value();
|
|
127
|
+
let targetDate;
|
|
128
|
+
if (currentValue && typeof currentValue === 'string') {
|
|
129
|
+
if (!this.showTimepicker()) {
|
|
130
|
+
currentValue = currentValue.split('T')[0];
|
|
117
131
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
targetDate.push(targetDateTo);
|
|
133
|
-
}
|
|
132
|
+
targetDate = [currentValue];
|
|
133
|
+
}
|
|
134
|
+
else if (currentValue && typeof currentValue === 'object') {
|
|
135
|
+
targetDate = [];
|
|
136
|
+
if (currentValue.dateFrom) {
|
|
137
|
+
const targetDateFrom = this.showTimepicker()
|
|
138
|
+
? currentValue.dateFrom
|
|
139
|
+
: currentValue.dateFrom.split('T')[0];
|
|
140
|
+
targetDate.push(targetDateFrom);
|
|
141
|
+
}
|
|
142
|
+
if (currentValue.dateTo) {
|
|
143
|
+
const targetDateTo = this.showTimepicker() ? currentValue.dateTo : currentValue.dateTo.split('T')[0];
|
|
144
|
+
targetDate.push(targetDateTo);
|
|
134
145
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
146
|
+
}
|
|
147
|
+
this.setCalendarPosition();
|
|
148
|
+
const userDatepickerOptions = this.datepickerOptions() ?? {};
|
|
149
|
+
const userOnSelect = userDatepickerOptions.onSelect;
|
|
150
|
+
const userOnHide = userDatepickerOptions.onHide;
|
|
151
|
+
const userOnShow = userDatepickerOptions.onShow;
|
|
152
|
+
const airDatepickerOpts = {
|
|
153
|
+
...userDatepickerOptions,
|
|
154
|
+
autoClose: !this.showInline(),
|
|
155
|
+
showEvent: 'click',
|
|
156
|
+
classes: this.calendarClasses(),
|
|
157
|
+
dateFormat: this.dateFormat(),
|
|
158
|
+
inline: this.showInline(),
|
|
159
|
+
isMobile: false,
|
|
160
|
+
multipleDatesSeparator: this.multipleDatesSeparator(),
|
|
161
|
+
range: this.rangeSelection(),
|
|
162
|
+
timepicker: this.showTimepicker(),
|
|
163
|
+
onlyTimepicker: this.showOnlyTimepicker(),
|
|
164
|
+
timeFormat: this.timeFormat(),
|
|
165
|
+
minHours: this.minHour(),
|
|
166
|
+
maxHours: this.maxHour(),
|
|
167
|
+
minMinutes: this.minMinute(),
|
|
168
|
+
maxMinutes: this.maxMinute(),
|
|
169
|
+
minDate: this.minDate(),
|
|
170
|
+
maxDate: this.maxDate(),
|
|
171
|
+
toggleSelected: false,
|
|
172
|
+
multipleDates: false,
|
|
173
|
+
selectedDates: targetDate,
|
|
174
|
+
position: this.targetPosition(),
|
|
175
|
+
locale: this.getLocale(),
|
|
176
|
+
onSelect: (args) => {
|
|
177
|
+
const { date } = args;
|
|
178
|
+
// AirDatepicker callbacks may fire outside Angular's zone in some app setups.
|
|
179
|
+
// Ensure CVA propagation happens inside the zone so the connected FormControl updates reliably.
|
|
180
|
+
this._ngZone.run(() => {
|
|
160
181
|
this._shouldRefocusInputOnHide.set(true);
|
|
161
|
-
if (
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
182
|
+
if (Array.isArray(date)) {
|
|
183
|
+
// Range selection: AirDatepicker emits partial selections too (only start date).
|
|
184
|
+
// Committing `_value` for partial selections can trigger `setupCalendar()` re-sync and
|
|
185
|
+
// break the second click. Only commit once the range is complete.
|
|
186
|
+
const [from, to] = date;
|
|
187
|
+
if (!from || !to) {
|
|
188
|
+
return;
|
|
165
189
|
}
|
|
190
|
+
const value = {
|
|
191
|
+
dateFrom: (this.showTimepicker() ? from : this.dateToUtc(from)).toISOString(),
|
|
192
|
+
dateTo: (this.showTimepicker() ? to : this.dateToUtc(to)).toISOString(),
|
|
193
|
+
};
|
|
194
|
+
this.onChangedHandler(value);
|
|
195
|
+
}
|
|
196
|
+
else if (date) {
|
|
197
|
+
const selectTargetDate = this.showTimepicker() ? date : this.dateToUtc(date);
|
|
166
198
|
this.onChangedHandler(selectTargetDate.toISOString());
|
|
167
199
|
}
|
|
168
200
|
if (this.showInline()) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
onHide: (isAnimationComplete) => {
|
|
173
|
-
if (isAnimationComplete) {
|
|
174
|
-
this.onHideCalendar();
|
|
175
|
-
}
|
|
176
|
-
},
|
|
177
|
-
...(this.datepickerOptions() ?? {}),
|
|
178
|
-
onShow: (isAnimationComplete) => {
|
|
179
|
-
const datepicker = this._airDatepickerInstance()?.$datepicker;
|
|
180
|
-
if (datepicker) {
|
|
181
|
-
datepicker.onmouseenter = () => {
|
|
182
|
-
this.isMouseInsideCalendar.set(true);
|
|
183
|
-
};
|
|
184
|
-
datepicker.onmouseleave = () => {
|
|
185
|
-
this.isMouseInsideCalendar.set(false);
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
if (isAnimationComplete || !this.showTimepicker()) {
|
|
189
|
-
return;
|
|
201
|
+
// Inline mode should update the connected control immediately.
|
|
202
|
+
// Do not rely on `onHideCalendar()` because inline never hides and the input may be visually hidden.
|
|
203
|
+
this.propagateValueToControl();
|
|
190
204
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
if (
|
|
196
|
-
this.
|
|
205
|
+
});
|
|
206
|
+
userOnSelect?.(args);
|
|
207
|
+
},
|
|
208
|
+
onHide: (isAnimationComplete) => {
|
|
209
|
+
if (isAnimationComplete) {
|
|
210
|
+
this.onHideCalendar();
|
|
197
211
|
}
|
|
198
|
-
|
|
199
|
-
|
|
212
|
+
userOnHide?.(isAnimationComplete);
|
|
213
|
+
},
|
|
214
|
+
onShow: (isAnimationComplete) => {
|
|
215
|
+
const datepicker = this._airDatepickerInstance()?.$datepicker;
|
|
216
|
+
if (datepicker) {
|
|
217
|
+
datepicker.onmouseenter = () => {
|
|
218
|
+
this.isMouseInsideCalendar.set(true);
|
|
219
|
+
};
|
|
220
|
+
datepicker.onmouseleave = () => {
|
|
221
|
+
this.isMouseInsideCalendar.set(false);
|
|
222
|
+
};
|
|
200
223
|
}
|
|
201
|
-
if (!
|
|
202
|
-
|
|
203
|
-
this._airDatepickerInstance()?.clear({ silent: true });
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
this._airDatepickerInstance()?.selectDate(targetDate, { updateTime: true });
|
|
224
|
+
if (isAnimationComplete || !this.showTimepicker()) {
|
|
225
|
+
return;
|
|
207
226
|
}
|
|
227
|
+
this.setupTimepicker();
|
|
228
|
+
userOnShow?.(isAnimationComplete);
|
|
229
|
+
},
|
|
230
|
+
};
|
|
231
|
+
if (this._airDatepickerInstance()) {
|
|
232
|
+
if (this._airDatepickerInstance()?.visible) {
|
|
233
|
+
this._airDatepickerInstance()?.update(airDatepickerOpts);
|
|
208
234
|
}
|
|
209
235
|
else {
|
|
210
|
-
this._airDatepickerInstance
|
|
236
|
+
this._airDatepickerInstance()?.update(airDatepickerOpts, { silent: true });
|
|
211
237
|
}
|
|
212
|
-
if (
|
|
213
|
-
this.
|
|
238
|
+
if (targetDate) {
|
|
239
|
+
this._airDatepickerInstance()?.selectDate(targetDate, { updateTime: true, silent: true });
|
|
214
240
|
}
|
|
241
|
+
else {
|
|
242
|
+
this._airDatepickerInstance()?.setFocusDate(false);
|
|
243
|
+
this._airDatepickerInstance()?.clear({ silent: true });
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
else {
|
|
247
|
+
this._airDatepickerInstance.set(new AirDatepicker(this._inputForDate()?.nativeElement, airDatepickerOpts));
|
|
248
|
+
}
|
|
249
|
+
this._airDatepickerInlineMode.set(desiredInlineMode);
|
|
250
|
+
if (desiredInlineMode) {
|
|
251
|
+
// Ensure inline calendar is visible after re-creation/update.
|
|
252
|
+
this._airDatepickerInstance()?.show?.();
|
|
253
|
+
}
|
|
254
|
+
if (this.showInline()) {
|
|
255
|
+
this.setupTimepicker();
|
|
215
256
|
}
|
|
216
257
|
}
|
|
217
258
|
onChangeText($event) {
|
|
@@ -220,14 +261,23 @@ class QuangDateComponent extends QuangBaseComponent {
|
|
|
220
261
|
// TODO: check format for DateRange
|
|
221
262
|
if (value.length === this.valueFormat().length && isMatch(value, this.valueFormat())) {
|
|
222
263
|
this.onChangedHandler(this.setupInputStringToDate(value).toISOString());
|
|
264
|
+
if (this.showInline()) {
|
|
265
|
+
this.propagateValueToControl();
|
|
266
|
+
}
|
|
223
267
|
}
|
|
224
268
|
}
|
|
225
269
|
else {
|
|
226
270
|
this.onChangedHandler(value);
|
|
271
|
+
if (this.showInline()) {
|
|
272
|
+
this.propagateValueToControl();
|
|
273
|
+
}
|
|
227
274
|
}
|
|
228
275
|
}
|
|
229
276
|
onBlurHandler() {
|
|
230
277
|
super.onBlurHandler();
|
|
278
|
+
if (this.showInline()) {
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
231
281
|
if (this.isMouseOutsideCalendar() && this._airDatepickerInstance()?.visible) {
|
|
232
282
|
this._airDatepickerInstance()?.hide();
|
|
233
283
|
}
|
|
@@ -237,9 +287,9 @@ class QuangDateComponent extends QuangBaseComponent {
|
|
|
237
287
|
if (value.length !== targetValueFormat.length) {
|
|
238
288
|
targetValueFormat = targetValueFormat.replace('yyyy', 'yy');
|
|
239
289
|
}
|
|
240
|
-
|
|
290
|
+
const targetDate = parse(value, targetValueFormat, new Date());
|
|
241
291
|
if (!this.showTimepicker()) {
|
|
242
|
-
|
|
292
|
+
return this.dateToUtc(targetDate);
|
|
243
293
|
}
|
|
244
294
|
return targetDate;
|
|
245
295
|
}
|
|
@@ -278,6 +328,42 @@ class QuangDateComponent extends QuangBaseComponent {
|
|
|
278
328
|
}
|
|
279
329
|
this._value.set(targetDate);
|
|
280
330
|
}
|
|
331
|
+
propagateValueToControl() {
|
|
332
|
+
if (this.formControl()?.getRawValue() !== this._value()) {
|
|
333
|
+
super.onChangedHandler(this._value());
|
|
334
|
+
}
|
|
335
|
+
else if (this.onTouched) {
|
|
336
|
+
this.onTouched();
|
|
337
|
+
}
|
|
338
|
+
this.requestRender();
|
|
339
|
+
}
|
|
340
|
+
requestRender() {
|
|
341
|
+
// Inline datepicker interactions can happen outside Angular-managed events.
|
|
342
|
+
// Marking the view dirty is not always enough in zoneless/event-coalesced setups,
|
|
343
|
+
// so we coalesce a manual tick.
|
|
344
|
+
this._cdr.markForCheck();
|
|
345
|
+
if (this._tickScheduled) {
|
|
346
|
+
return;
|
|
347
|
+
}
|
|
348
|
+
this._tickScheduled = true;
|
|
349
|
+
queueMicrotask(() => {
|
|
350
|
+
this._tickScheduled = false;
|
|
351
|
+
this._appRef.tick();
|
|
352
|
+
});
|
|
353
|
+
}
|
|
354
|
+
syncValueFromDatepickerSelection() {
|
|
355
|
+
if (!this.showInline()) {
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
const datepickerInstance = this._airDatepickerInstance();
|
|
359
|
+
const selectedDate = datepickerInstance?.selectedDates?.[0];
|
|
360
|
+
if (!(selectedDate instanceof Date)) {
|
|
361
|
+
return;
|
|
362
|
+
}
|
|
363
|
+
const targetDate = this.showTimepicker() ? selectedDate : this.dateToUtc(selectedDate);
|
|
364
|
+
this.onChangedHandler(targetDate.toISOString());
|
|
365
|
+
this.propagateValueToControl();
|
|
366
|
+
}
|
|
281
367
|
onHideCalendar() {
|
|
282
368
|
const valueInput = this._inputForDate()?.nativeElement.value;
|
|
283
369
|
let value = valueInput;
|
|
@@ -286,18 +372,14 @@ class QuangDateComponent extends QuangBaseComponent {
|
|
|
286
372
|
const [dateFrom, dateTo] = valueInput.split(this.multipleDatesSeparator());
|
|
287
373
|
value.dateFrom = dateFrom ?? '';
|
|
288
374
|
value.dateTo = dateTo ?? '';
|
|
289
|
-
|
|
290
|
-
value.dateFrom
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
}
|
|
298
|
-
else {
|
|
299
|
-
value.dateTo = this.setupInputStringToDate(value.dateTo).toISOString();
|
|
300
|
-
}
|
|
375
|
+
value.dateFrom =
|
|
376
|
+
!value.dateFrom || !this.checkDateMatch(value.dateFrom)
|
|
377
|
+
? null
|
|
378
|
+
: this.setupInputStringToDate(value.dateFrom).toISOString();
|
|
379
|
+
value.dateTo =
|
|
380
|
+
!value.dateTo || !this.checkDateMatch(value.dateTo)
|
|
381
|
+
? null
|
|
382
|
+
: this.setupInputStringToDate(value.dateTo).toISOString();
|
|
301
383
|
this.onChangedHandler(value);
|
|
302
384
|
}
|
|
303
385
|
else if (this.checkDateMatch(value)) {
|
|
@@ -306,11 +388,9 @@ class QuangDateComponent extends QuangBaseComponent {
|
|
|
306
388
|
else {
|
|
307
389
|
this.onChangedHandler(null);
|
|
308
390
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
else if (this.onTouched) {
|
|
313
|
-
this.onTouched();
|
|
391
|
+
this.propagateValueToControl();
|
|
392
|
+
if (this.showInline()) {
|
|
393
|
+
return;
|
|
314
394
|
}
|
|
315
395
|
// Only focus the input when the user actually interacted with the calendar.
|
|
316
396
|
// Avoids infinite focus loop when tabbing between multiple datepickers.
|
|
@@ -330,6 +410,9 @@ class QuangDateComponent extends QuangBaseComponent {
|
|
|
330
410
|
return format(val, this.valueFormat());
|
|
331
411
|
}
|
|
332
412
|
if (val && typeof val === 'object') {
|
|
413
|
+
if (!val.dateFrom && !val.dateTo) {
|
|
414
|
+
return '';
|
|
415
|
+
}
|
|
333
416
|
let dateFromFormat = '';
|
|
334
417
|
let dateToFormat = '';
|
|
335
418
|
if (val.dateFrom) {
|
|
@@ -357,10 +440,10 @@ class QuangDateComponent extends QuangBaseComponent {
|
|
|
357
440
|
if (this._isDisabled()) {
|
|
358
441
|
return;
|
|
359
442
|
}
|
|
360
|
-
const
|
|
361
|
-
if (event.key === 'Escape' &&
|
|
443
|
+
const datepickerInstance = this._airDatepickerInstance();
|
|
444
|
+
if (event.key === 'Escape' && datepickerInstance?.visible) {
|
|
362
445
|
event.preventDefault();
|
|
363
|
-
|
|
446
|
+
datepickerInstance.hide();
|
|
364
447
|
return;
|
|
365
448
|
}
|
|
366
449
|
if (event.key === 'Enter' || event.key === 'ArrowDown') {
|
|
@@ -378,13 +461,13 @@ class QuangDateComponent extends QuangBaseComponent {
|
|
|
378
461
|
getLocale() {
|
|
379
462
|
switch (this._activeLanguage()?.toLowerCase()) {
|
|
380
463
|
case 'en':
|
|
381
|
-
return en.default
|
|
464
|
+
return en.default ?? en;
|
|
382
465
|
case 'it':
|
|
383
|
-
return it.default
|
|
466
|
+
return it.default ?? it;
|
|
384
467
|
case 'fr':
|
|
385
|
-
return fr.default
|
|
468
|
+
return fr.default ?? fr;
|
|
386
469
|
default:
|
|
387
|
-
return en.default
|
|
470
|
+
return en.default ?? en;
|
|
388
471
|
}
|
|
389
472
|
}
|
|
390
473
|
onCancel() {
|
|
@@ -394,10 +477,6 @@ class QuangDateComponent extends QuangBaseComponent {
|
|
|
394
477
|
// convert to UTC time removing the timezone
|
|
395
478
|
return new Date(date.getTime() - date.getTimezoneOffset() * 60000);
|
|
396
479
|
}
|
|
397
|
-
dateToLocal(date) {
|
|
398
|
-
// convert to local time adding the timezone
|
|
399
|
-
return new Date(date.getTime() + date.getTimezoneOffset() * 60000);
|
|
400
|
-
}
|
|
401
480
|
setCalendarPosition() {
|
|
402
481
|
const windowInnerHeight = window.innerHeight;
|
|
403
482
|
const inputBoundingClientRect = this._inputForDate()?.nativeElement.getBoundingClientRect();
|
|
@@ -410,8 +489,23 @@ class QuangDateComponent extends QuangBaseComponent {
|
|
|
410
489
|
}
|
|
411
490
|
}
|
|
412
491
|
setupTimepicker() {
|
|
413
|
-
const
|
|
414
|
-
if (
|
|
492
|
+
const datepickerRoot = this._airDatepickerInstance()?.$datepicker;
|
|
493
|
+
if (!datepickerRoot) {
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
// AirDatepicker may re-render time inputs; use delegated listeners so we don't lose handlers.
|
|
497
|
+
if (!datepickerRoot.dataset['quangTimepickerListeners']) {
|
|
498
|
+
datepickerRoot.dataset['quangTimepickerListeners'] = 'true';
|
|
499
|
+
datepickerRoot.addEventListener('input', () => {
|
|
500
|
+
if (!this.showInline()) {
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
// Let AirDatepicker update its internal selection first.
|
|
504
|
+
setTimeout(() => this._ngZone.run(() => this.syncValueFromDatepickerSelection()), 0);
|
|
505
|
+
}, { capture: true });
|
|
506
|
+
}
|
|
507
|
+
const timepickers = datepickerRoot.getElementsByClassName('air-datepicker-time');
|
|
508
|
+
for (const timepicker of Array.from(timepickers)) {
|
|
415
509
|
const inputs = timepicker.getElementsByTagName('input');
|
|
416
510
|
for (const input of Array.from(inputs)) {
|
|
417
511
|
input.setAttribute('type', 'number');
|
|
@@ -421,7 +515,7 @@ class QuangDateComponent extends QuangBaseComponent {
|
|
|
421
515
|
evt.stopImmediatePropagation();
|
|
422
516
|
};
|
|
423
517
|
input.onblur = () => {
|
|
424
|
-
if (this.isMouseOutsideCalendar()) {
|
|
518
|
+
if (!this.showInline() && this.isMouseOutsideCalendar()) {
|
|
425
519
|
this._airDatepickerInstance()?.hide();
|
|
426
520
|
}
|
|
427
521
|
};
|
|
@@ -432,11 +526,11 @@ class QuangDateComponent extends QuangBaseComponent {
|
|
|
432
526
|
return isMatch(date, this.valueFormat()) || isMatch(date, this.valueFormat().replace('yyyy', 'yy'));
|
|
433
527
|
}
|
|
434
528
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: QuangDateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
435
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: QuangDateComponent, isStandalone: true, selector: "quang-date", inputs: { dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, timeFormat: { classPropertyName: "timeFormat", publicName: "timeFormat", isSignal: true, isRequired: false, transformFunction: null }, activeLanguageOverride: { classPropertyName: "activeLanguageOverride", publicName: "activeLanguageOverride", isSignal: true, isRequired: false, transformFunction: null }, timepicker: { classPropertyName: "timepicker", publicName: "timepicker", isSignal: true, isRequired: false, transformFunction: null }, invalidDateMessage: { classPropertyName: "invalidDateMessage", publicName: "invalidDateMessage", isSignal: true, isRequired: false, transformFunction: null }, showOnlyTimepicker: { classPropertyName: "showOnlyTimepicker", publicName: "showOnlyTimepicker", isSignal: true, isRequired: false, transformFunction: null }, minHour: { classPropertyName: "minHour", publicName: "minHour", isSignal: true, isRequired: false, transformFunction: null }, maxHour: { classPropertyName: "maxHour", publicName: "maxHour", isSignal: true, isRequired: false, transformFunction: null }, minMinute: { classPropertyName: "minMinute", publicName: "minMinute", isSignal: true, isRequired: false, transformFunction: null }, maxMinute: { classPropertyName: "maxMinute", publicName: "maxMinute", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, showInline: { classPropertyName: "showInline", publicName: "showInline", isSignal: true, isRequired: false, transformFunction: null }, calendarClasses: { classPropertyName: "calendarClasses", publicName: "calendarClasses", isSignal: true, isRequired: false, transformFunction: null }, buttonClass: { classPropertyName: "buttonClass", publicName: "buttonClass", isSignal: true, isRequired: false, transformFunction: null }, datepickerOptions: { classPropertyName: "datepickerOptions", publicName: "datepickerOptions", isSignal: true, isRequired: false, transformFunction: null }, multipleDatesSeparator: { classPropertyName: "multipleDatesSeparator", publicName: "multipleDatesSeparator", isSignal: true, isRequired: false, transformFunction: null }, rangeSelection: { classPropertyName: "rangeSelection", publicName: "rangeSelection", isSignal: true, isRequired: false, transformFunction: null }, searchTextDebounce: { classPropertyName: "searchTextDebounce", publicName: "searchTextDebounce", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => QuangDateComponent), multi: true }], viewQueries: [{ propertyName: "_inputForDate", first: true, predicate: ["inputForDate"], descendants: true, isSignal: true }, { propertyName: "contentTemplate", first: true, predicate: ["calendarButton"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mb-3\">\n @if (componentLabel()) {\n <label\n [htmlFor]=\"componentId()\"\n class=\"form-label\"\n >\n {{ componentLabel() | transloco }}\n <span [hidden]=\"!_isRequired()\">*</span>\n </label>\n }\n <div\n [class.is-invalid]=\"_showErrors()\"\n [class.is-valid]=\"_showSuccess()\"\n class=\"input-date-container\"\n >\n <input\n [attr.required]=\"getIsRequiredControl()\"\n [autocomplete]=\"'off'\"\n [class.is-invalid]=\"_showErrors()\"\n [class.is-valid]=\"_showSuccess()\"\n [class.
|
|
529
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: QuangDateComponent, isStandalone: true, selector: "quang-date", inputs: { dateFormat: { classPropertyName: "dateFormat", publicName: "dateFormat", isSignal: true, isRequired: false, transformFunction: null }, timeFormat: { classPropertyName: "timeFormat", publicName: "timeFormat", isSignal: true, isRequired: false, transformFunction: null }, activeLanguageOverride: { classPropertyName: "activeLanguageOverride", publicName: "activeLanguageOverride", isSignal: true, isRequired: false, transformFunction: null }, timepicker: { classPropertyName: "timepicker", publicName: "timepicker", isSignal: true, isRequired: false, transformFunction: null }, invalidDateMessage: { classPropertyName: "invalidDateMessage", publicName: "invalidDateMessage", isSignal: true, isRequired: false, transformFunction: null }, showOnlyTimepicker: { classPropertyName: "showOnlyTimepicker", publicName: "showOnlyTimepicker", isSignal: true, isRequired: false, transformFunction: null }, minHour: { classPropertyName: "minHour", publicName: "minHour", isSignal: true, isRequired: false, transformFunction: null }, maxHour: { classPropertyName: "maxHour", publicName: "maxHour", isSignal: true, isRequired: false, transformFunction: null }, minMinute: { classPropertyName: "minMinute", publicName: "minMinute", isSignal: true, isRequired: false, transformFunction: null }, maxMinute: { classPropertyName: "maxMinute", publicName: "maxMinute", isSignal: true, isRequired: false, transformFunction: null }, minDate: { classPropertyName: "minDate", publicName: "minDate", isSignal: true, isRequired: false, transformFunction: null }, maxDate: { classPropertyName: "maxDate", publicName: "maxDate", isSignal: true, isRequired: false, transformFunction: null }, showInline: { classPropertyName: "showInline", publicName: "showInline", isSignal: true, isRequired: false, transformFunction: null }, calendarClasses: { classPropertyName: "calendarClasses", publicName: "calendarClasses", isSignal: true, isRequired: false, transformFunction: null }, buttonClass: { classPropertyName: "buttonClass", publicName: "buttonClass", isSignal: true, isRequired: false, transformFunction: null }, datepickerOptions: { classPropertyName: "datepickerOptions", publicName: "datepickerOptions", isSignal: true, isRequired: false, transformFunction: null }, multipleDatesSeparator: { classPropertyName: "multipleDatesSeparator", publicName: "multipleDatesSeparator", isSignal: true, isRequired: false, transformFunction: null }, rangeSelection: { classPropertyName: "rangeSelection", publicName: "rangeSelection", isSignal: true, isRequired: false, transformFunction: null }, searchTextDebounce: { classPropertyName: "searchTextDebounce", publicName: "searchTextDebounce", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => QuangDateComponent), multi: true }], viewQueries: [{ propertyName: "_inputForDate", first: true, predicate: ["inputForDate"], descendants: true, isSignal: true }, { propertyName: "contentTemplate", first: true, predicate: ["calendarButton"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"mb-3\">\n @if (componentLabel()) {\n <label\n [htmlFor]=\"componentId()\"\n class=\"form-label\"\n >\n {{ componentLabel() | transloco }}\n <span [hidden]=\"!_isRequired()\">*</span>\n </label>\n }\n <div\n [class.is-invalid]=\"_showErrors()\"\n [class.is-valid]=\"_showSuccess()\"\n class=\"input-date-container\"\n >\n <input\n [attr.aria-hidden]=\"showInline() ? 'true' : null\"\n [attr.required]=\"getIsRequiredControl()\"\n [autocomplete]=\"'off'\"\n [class.is-invalid]=\"_showErrors()\"\n [class.is-valid]=\"_showSuccess()\"\n [class.quang-date-inline-hidden]=\"showInline()\"\n [class.with-button-calendar]=\"!hasNoContent()\"\n [disabled]=\"_isDisabled()\"\n [id]=\"componentId()\"\n [ngClass]=\"componentClass()\"\n [placeholder]=\"componentPlaceholder() | transloco\"\n [readOnly]=\"isReadonly()\"\n [tabIndex]=\"componentTabIndex()\"\n [value]=\"inputValueString()\"\n (blur)=\"onBlurHandler()\"\n (focus)=\"interceptInputInteraction($event)\"\n (input)=\"onChangeText($event)\"\n (keydown)=\"onInputKeydown($event)\"\n (mouseenter)=\"isMouseInsideCalendar.set(true)\"\n (mouseleave)=\"isMouseInsideCalendar.set(false)\"\n (search)=\"onCancel()\"\n #inputForDate\n class=\"form-control\"\n type=\"search\"\n />\n <button\n [attr.aria-hidden]=\"showInline() ? 'true' : null\"\n [attr.required]=\"getIsRequiredControl()\"\n [class.border-danger]=\"_showErrors()\"\n [class.border-success]=\"_showSuccess()\"\n [class.quang-date-inline-hidden]=\"showInline()\"\n [hidden]=\"hasNoContent() || _isDisabled()\"\n [ngClass]=\"buttonClass()\"\n (click)=\"_ngControl()?.disabled ? null : openDatePicker()\"\n #calendarButton\n aria-label=\"calendar-button\"\n class=\"btn btn-outline-secondary btn-outline-calendar\"\n type=\"button\"\n >\n <ng-content></ng-content>\n </button>\n </div>\n <div class=\"valid-feedback\">\n {{ successMessage() | transloco }}\n </div>\n <div class=\"invalid-feedback\">\n {{ _currentErrorMessage() | transloco: _currentErrorMessageExtraData() }}\n </div>\n @if (helpMessage()) {\n <small\n [hidden]=\"_showSuccess() || _showErrors()\"\n aria-live=\"assertive\"\n class=\"form-text text-muted\"\n >\n {{ helpMessage() | transloco }}\n </small>\n }\n</div>\n", styles: ["input::-webkit-search-cancel-button{-webkit-appearance:none;height:.75rem;width:.75rem;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 3 1024 1024' width='12' height='12' fill='currentColor'%3E%3Cpath d='M9 1018q5 4 10.5 6.5 5.5 2.5 11.5 2.5 6 0 11.5-2.5 5.5-2.5 10.5-6.5l459-459 459 459q5 4 10.5 6.5 5.5 2.5 11.5 2.5 6 0 11.5-2.5 5.5-2.5 10.5-6.5 9-9 9-22 0-13-9-22l-459-459 459-459q9-9 9-22 0-13-9-22-9-9-22-9-13 0-22 9l-459 459-459-459q-9-9-22-9-13 0-22 9-9 9-9 22 0 13 9 22l459 459-459 459q-9 9-9 22 0 13 9 22l0 0z'/%3E%3C/svg%3E%0A\");cursor:pointer}::ng-deep .air-datepicker{z-index:99999}::ng-deep .air-datepicker.-inline-{z-index:unset}::ng-deep .air-datepicker .air-datepicker--pointer{display:none}::ng-deep .air-datepicker .air-datepicker-time{display:block}::ng-deep .air-datepicker .air-datepicker-time .air-datepicker-time--current{display:none}::ng-deep .air-datepicker .air-datepicker-time .air-datepicker-time--sliders{display:flex;justify-content:center;padding-top:.25rem;gap:1rem}::ng-deep .air-datepicker .air-datepicker-time .air-datepicker-time--sliders .air-datepicker-time--row{width:100%;position:relative}::ng-deep .air-datepicker .air-datepicker-time .air-datepicker-time--sliders .air-datepicker-time--row:first-child:after{content:\":\";display:inline;font-size:1rem;position:absolute;right:-.65rem}::ng-deep .air-datepicker .air-datepicker-time .air-datepicker-time--sliders .air-datepicker-time--row input{width:100%;text-align:center;padding:0;padding-left:1rem;border-color:var(--bs-border-color)}::ng-deep .air-datepicker .air-datepicker-time .air-datepicker-time--sliders .air-datepicker-time--row .form-control:focus{box-shadow:unset!important}::ng-deep .air-datepicker.-inline-.-only-timepicker-{border:0;padding:0!important}::ng-deep .air-datepicker.-inline-.-only-timepicker- .air-datepicker--time{border:0;padding:0!important}::ng-deep .air-datepicker.-inline-.-only-timepicker- .air-datepicker-time{padding:0!important}:host{display:block}:host .quang-date-inline-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:0!important;border:0!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important;white-space:nowrap!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important}:host .input-date-container{display:flex}:host input{flex:1}:host input.with-button-calendar{border-top-right-radius:0;border-bottom-right-radius:0}:host input:disabled{border-radius:var(--bs-border-radius)}:host .btn-outline-calendar{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0;min-width:unset;display:flex;border-color:var(--bs-border-color)}:host .border-danger{border-color:var(--bs-form-invalid-border-color)}:host .border-success{border-color:var(--bs-form-valid-border-color)}\n"], dependencies: [{ kind: "pipe", type: TranslocoPipe, name: "transloco" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
436
530
|
}
|
|
437
531
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: QuangDateComponent, decorators: [{
|
|
438
532
|
type: Component,
|
|
439
|
-
args: [{ selector: 'quang-date', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => QuangDateComponent), multi: true }], imports: [TranslocoPipe, NgClass], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mb-3\">\n @if (componentLabel()) {\n <label\n [htmlFor]=\"componentId()\"\n class=\"form-label\"\n >\n {{ componentLabel() | transloco }}\n <span [hidden]=\"!_isRequired()\">*</span>\n </label>\n }\n <div\n [class.is-invalid]=\"_showErrors()\"\n [class.is-valid]=\"_showSuccess()\"\n class=\"input-date-container\"\n >\n <input\n [attr.required]=\"getIsRequiredControl()\"\n [autocomplete]=\"'off'\"\n [class.is-invalid]=\"_showErrors()\"\n [class.is-valid]=\"_showSuccess()\"\n [class.
|
|
533
|
+
args: [{ selector: 'quang-date', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => QuangDateComponent), multi: true }], imports: [TranslocoPipe, NgClass], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"mb-3\">\n @if (componentLabel()) {\n <label\n [htmlFor]=\"componentId()\"\n class=\"form-label\"\n >\n {{ componentLabel() | transloco }}\n <span [hidden]=\"!_isRequired()\">*</span>\n </label>\n }\n <div\n [class.is-invalid]=\"_showErrors()\"\n [class.is-valid]=\"_showSuccess()\"\n class=\"input-date-container\"\n >\n <input\n [attr.aria-hidden]=\"showInline() ? 'true' : null\"\n [attr.required]=\"getIsRequiredControl()\"\n [autocomplete]=\"'off'\"\n [class.is-invalid]=\"_showErrors()\"\n [class.is-valid]=\"_showSuccess()\"\n [class.quang-date-inline-hidden]=\"showInline()\"\n [class.with-button-calendar]=\"!hasNoContent()\"\n [disabled]=\"_isDisabled()\"\n [id]=\"componentId()\"\n [ngClass]=\"componentClass()\"\n [placeholder]=\"componentPlaceholder() | transloco\"\n [readOnly]=\"isReadonly()\"\n [tabIndex]=\"componentTabIndex()\"\n [value]=\"inputValueString()\"\n (blur)=\"onBlurHandler()\"\n (focus)=\"interceptInputInteraction($event)\"\n (input)=\"onChangeText($event)\"\n (keydown)=\"onInputKeydown($event)\"\n (mouseenter)=\"isMouseInsideCalendar.set(true)\"\n (mouseleave)=\"isMouseInsideCalendar.set(false)\"\n (search)=\"onCancel()\"\n #inputForDate\n class=\"form-control\"\n type=\"search\"\n />\n <button\n [attr.aria-hidden]=\"showInline() ? 'true' : null\"\n [attr.required]=\"getIsRequiredControl()\"\n [class.border-danger]=\"_showErrors()\"\n [class.border-success]=\"_showSuccess()\"\n [class.quang-date-inline-hidden]=\"showInline()\"\n [hidden]=\"hasNoContent() || _isDisabled()\"\n [ngClass]=\"buttonClass()\"\n (click)=\"_ngControl()?.disabled ? null : openDatePicker()\"\n #calendarButton\n aria-label=\"calendar-button\"\n class=\"btn btn-outline-secondary btn-outline-calendar\"\n type=\"button\"\n >\n <ng-content></ng-content>\n </button>\n </div>\n <div class=\"valid-feedback\">\n {{ successMessage() | transloco }}\n </div>\n <div class=\"invalid-feedback\">\n {{ _currentErrorMessage() | transloco: _currentErrorMessageExtraData() }}\n </div>\n @if (helpMessage()) {\n <small\n [hidden]=\"_showSuccess() || _showErrors()\"\n aria-live=\"assertive\"\n class=\"form-text text-muted\"\n >\n {{ helpMessage() | transloco }}\n </small>\n }\n</div>\n", styles: ["input::-webkit-search-cancel-button{-webkit-appearance:none;height:.75rem;width:.75rem;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 3 1024 1024' width='12' height='12' fill='currentColor'%3E%3Cpath d='M9 1018q5 4 10.5 6.5 5.5 2.5 11.5 2.5 6 0 11.5-2.5 5.5-2.5 10.5-6.5l459-459 459 459q5 4 10.5 6.5 5.5 2.5 11.5 2.5 6 0 11.5-2.5 5.5-2.5 10.5-6.5 9-9 9-22 0-13-9-22l-459-459 459-459q9-9 9-22 0-13-9-22-9-9-22-9-13 0-22 9l-459 459-459-459q-9-9-22-9-13 0-22 9-9 9-9 22 0 13 9 22l459 459-459 459q-9 9-9 22 0 13 9 22l0 0z'/%3E%3C/svg%3E%0A\");cursor:pointer}::ng-deep .air-datepicker{z-index:99999}::ng-deep .air-datepicker.-inline-{z-index:unset}::ng-deep .air-datepicker .air-datepicker--pointer{display:none}::ng-deep .air-datepicker .air-datepicker-time{display:block}::ng-deep .air-datepicker .air-datepicker-time .air-datepicker-time--current{display:none}::ng-deep .air-datepicker .air-datepicker-time .air-datepicker-time--sliders{display:flex;justify-content:center;padding-top:.25rem;gap:1rem}::ng-deep .air-datepicker .air-datepicker-time .air-datepicker-time--sliders .air-datepicker-time--row{width:100%;position:relative}::ng-deep .air-datepicker .air-datepicker-time .air-datepicker-time--sliders .air-datepicker-time--row:first-child:after{content:\":\";display:inline;font-size:1rem;position:absolute;right:-.65rem}::ng-deep .air-datepicker .air-datepicker-time .air-datepicker-time--sliders .air-datepicker-time--row input{width:100%;text-align:center;padding:0;padding-left:1rem;border-color:var(--bs-border-color)}::ng-deep .air-datepicker .air-datepicker-time .air-datepicker-time--sliders .air-datepicker-time--row .form-control:focus{box-shadow:unset!important}::ng-deep .air-datepicker.-inline-.-only-timepicker-{border:0;padding:0!important}::ng-deep .air-datepicker.-inline-.-only-timepicker- .air-datepicker--time{border:0;padding:0!important}::ng-deep .air-datepicker.-inline-.-only-timepicker- .air-datepicker-time{padding:0!important}:host{display:block}:host .quang-date-inline-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:0!important;border:0!important;opacity:0!important;pointer-events:none!important;overflow:hidden!important;white-space:nowrap!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important}:host .input-date-container{display:flex}:host input{flex:1}:host input.with-button-calendar{border-top-right-radius:0;border-bottom-right-radius:0}:host input:disabled{border-radius:var(--bs-border-radius)}:host .btn-outline-calendar{border-left:0;border-top-left-radius:0;border-bottom-left-radius:0;min-width:unset;display:flex;border-color:var(--bs-border-color)}:host .border-danger{border-color:var(--bs-form-invalid-border-color)}:host .border-success{border-color:var(--bs-form-valid-border-color)}\n"] }]
|
|
440
534
|
}], ctorParameters: () => [] });
|
|
441
535
|
|
|
442
536
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quang-components-date.mjs","sources":["../../../projects/quang/components/date/date.component.ts","../../../projects/quang/components/date/date.component.html","../../../projects/quang/components/date/quang-components-date.ts"],"sourcesContent":["import { NgClass } from '@angular/common'\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport { NG_VALUE_ACCESSOR } from '@angular/forms'\n\nimport { TranslocoPipe } from '@jsverse/transloco'\nimport AirDatepicker, {\n AirDatepickerDate,\n AirDatepickerLocale,\n AirDatepickerOptions,\n AirDatepickerPosition,\n} from 'air-datepicker'\nimport en from 'air-datepicker/locale/en'\nimport fr from 'air-datepicker/locale/fr'\nimport it from 'air-datepicker/locale/it'\nimport { format, isMatch, parse } from 'date-fns'\nimport { QuangTranslationService } from 'quang/translation'\nimport { debounceTime, fromEvent } from 'rxjs'\n\nimport { QuangBaseComponent } from 'quang/components/shared'\n\nexport interface DateRange {\n dateFrom: string | null\n dateTo: string | null\n}\n\nexport type QuangDatepickerOptions = AirDatepickerOptions\n\n@Component({\n selector: 'quang-date',\n templateUrl: './date.component.html',\n styleUrl: './date.component.scss',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => QuangDateComponent), multi: true }],\n imports: [TranslocoPipe, NgClass],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n/**\n * Datepicker component based on {@link https://air-datepicker.com/docs}.\n *\n * @usageNotes\n * 1. It can be used to only display the `timepicker` component by setting\n * `[showOnlyTimepicker]=\"true\"`\n *\n * 2. `datepickerOptions` can be used to override the default options of the component to get full access to all the\n * possible customizations that Air Datepicker provides. See {@link https://air-datepicker.com/examples}\n * Please note that overriding the `container` and `locale` properties and the `onSelect` and `onHide`\n * events might cause the component to malfunction.\n */\nexport class QuangDateComponent extends QuangBaseComponent<string | DateRange | null> {\n /**\n * Format to use to show on the input field.\n * The format is based on the standard {@link https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table}\n * Default: dd/MM/yyyy\n * @default dd/MM/yyyy\n */\n dateFormat = input<string>('dd/MM/yyyy')\n\n /**\n * Format to use to show on the time inside the input field.\n * The format is based on the standard {@link https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table}\n * Default: HH:mm\n * @default HH:mm\n */\n timeFormat = input<string>('HH:mm')\n\n /**\n * Calendar locale, if not provided the component will try to use the one provided in {@link QuangTranslationService}\n * if the language is not set in {@link QuangTranslationService} it will use the browser language\n * Use this parameter only to override default behavior\n */\n activeLanguageOverride = input<string | undefined>(undefined)\n\n /**\n * If true enable the timepicker inside the calendar\n */\n timepicker = input<boolean>(false)\n\n /**\n * The message to show inside the input if the date is invalid\n */\n invalidDateMessage = input<string>('')\n\n showOnlyTimepicker = input<boolean>(false)\n\n minHour = input<number>(0)\n\n maxHour = input<number>(24)\n\n minMinute = input<number>(0)\n\n maxMinute = input<number>(59)\n\n minDate = input<Date | undefined>(undefined)\n\n maxDate = input<Date | undefined>(undefined)\n\n showInline = input<boolean>(false)\n\n calendarClasses = input<string>('')\n\n buttonClass = input<string>('')\n\n datepickerOptions = input<QuangDatepickerOptions | undefined>(undefined)\n\n _inputForDate = viewChild<ElementRef>('inputForDate')\n\n contentTemplate = viewChild.required<ElementRef>('calendarButton')\n\n hasNoContent = computed(() => this.contentTemplate()?.nativeElement.children.length === 0)\n\n _quangTranslationService = signal<QuangTranslationService | undefined>(\n inject(QuangTranslationService, { optional: true }) ?? undefined\n )\n\n _quangTranslationActiveLang = computed(() => this._quangTranslationService()?.activeLang() ?? null)\n\n multipleDatesSeparator = input<string>(' - ')\n\n rangeSelection = input(false)\n\n _activeLanguage = computed(() => {\n if (this.activeLanguageOverride()) {\n return this.activeLanguageOverride()\n }\n if (this._quangTranslationService()) {\n return this._quangTranslationActiveLang()\n }\n return navigator.language\n })\n\n _airDatepickerInstance = signal<AirDatepicker | undefined>(undefined)\n\n searchTextDebounce = input<number>(500)\n\n targetPosition = signal<AirDatepickerPosition>('bottom left')\n\n _generateAirDatepickerEffect = effect(() => {\n this.setupCalendar()\n })\n\n valueFormat = computed(() =>\n this.showOnlyTimepicker()\n ? this.timeFormat()\n : this.dateFormat() + (this.showTimepicker() ? ` ${this.timeFormat()}` : '')\n )\n\n inputValueString = computed(() => this.formatDate(this._value()))\n\n constructor() {\n super()\n\n fromEvent(document, 'scroll', { capture: true })\n .pipe(takeUntilDestroyed(), debounceTime(250))\n .subscribe(() => {\n if (this._airDatepickerInstance()?.visible) {\n this.setupCalendar()\n }\n })\n }\n\n showTimepicker = computed(() => !this.rangeSelection() && (this.timepicker() || this.showOnlyTimepicker()))\n\n isMouseInsideCalendar = signal(false)\n\n isMouseOutsideCalendar = computed(() => !this.isMouseInsideCalendar())\n\n private _shouldRefocusInputOnHide = signal(false)\n\n setupCalendar() {\n if (this._inputForDate()?.nativeElement) {\n let currentValue = this._value()\n let targetDate: AirDatepickerDate[] | undefined\n if (currentValue && typeof currentValue === 'string') {\n if (!this.showTimepicker()) {\n currentValue = currentValue.split('T')[0]\n }\n targetDate = [currentValue]\n } else if (currentValue && typeof currentValue === 'object') {\n targetDate = []\n if (currentValue.dateFrom) {\n let targetDateFrom: string = currentValue.dateFrom\n if (!this.showTimepicker()) {\n targetDateFrom = currentValue.dateFrom.split('T')[0]\n }\n targetDate.push(targetDateFrom)\n }\n if (currentValue.dateTo) {\n let targetDateTo: string = currentValue.dateTo\n if (!this.showTimepicker()) {\n targetDateTo = currentValue.dateTo.split('T')[0]\n }\n targetDate.push(targetDateTo)\n }\n }\n this.setCalendarPosition()\n const airDatepickerOpts: QuangDatepickerOptions = {\n autoClose: true,\n showEvent: 'click',\n classes: this.calendarClasses(),\n dateFormat: this.dateFormat(),\n inline: this.showInline(),\n isMobile: false,\n multipleDatesSeparator: this.multipleDatesSeparator(),\n range: this.rangeSelection(),\n timepicker: this.showTimepicker(),\n onlyTimepicker: this.showOnlyTimepicker(),\n timeFormat: this.timeFormat(),\n minHours: this.minHour(),\n maxHours: this.maxHour(),\n minMinutes: this.minMinute(),\n maxMinutes: this.maxMinute(),\n minDate: this.minDate(),\n maxDate: this.maxDate(),\n toggleSelected: false,\n multipleDates: false,\n selectedDates: targetDate,\n position: this.targetPosition(),\n locale: this.getLocale(),\n\n onSelect: ({ date }) => {\n this._shouldRefocusInputOnHide.set(true)\n if (!Array.isArray(date)) {\n let selectTargetDate = date\n if (!this.showTimepicker()) {\n selectTargetDate = this.dateToUtc(date)\n }\n this.onChangedHandler(selectTargetDate.toISOString())\n }\n if (this.showInline()) {\n this.onHideCalendar()\n }\n },\n onHide: (isAnimationComplete: boolean) => {\n if (isAnimationComplete) {\n this.onHideCalendar()\n }\n },\n ...(this.datepickerOptions() ?? {}),\n onShow: (isAnimationComplete) => {\n const datepicker = this._airDatepickerInstance()?.$datepicker\n if (datepicker) {\n datepicker.onmouseenter = () => {\n this.isMouseInsideCalendar.set(true)\n }\n datepicker.onmouseleave = () => {\n this.isMouseInsideCalendar.set(false)\n }\n }\n if (isAnimationComplete || !this.showTimepicker()) {\n return\n }\n this.setupTimepicker()\n },\n }\n\n if (this._airDatepickerInstance()) {\n if (this._airDatepickerInstance()?.visible) {\n this._airDatepickerInstance()?.update(airDatepickerOpts)\n } else {\n this._airDatepickerInstance()?.update(airDatepickerOpts, { silent: true })\n }\n\n if (!targetDate) {\n this._airDatepickerInstance()?.setFocusDate(false)\n this._airDatepickerInstance()?.clear({ silent: true })\n } else {\n this._airDatepickerInstance()?.selectDate(targetDate, { updateTime: true })\n }\n } else {\n this._airDatepickerInstance.set(new AirDatepicker(this._inputForDate()?.nativeElement, airDatepickerOpts))\n }\n\n if (this.showInline()) {\n this.setupTimepicker()\n }\n }\n }\n\n onChangeText($event: Event): void {\n const value = ($event.target as HTMLInputElement)?.value\n if (value) {\n // TODO: check format for DateRange\n if (value.length === this.valueFormat().length && isMatch(value, this.valueFormat())) {\n this.onChangedHandler(this.setupInputStringToDate(value).toISOString())\n }\n } else {\n this.onChangedHandler(value)\n }\n }\n\n override onBlurHandler() {\n super.onBlurHandler()\n\n if (this.isMouseOutsideCalendar() && this._airDatepickerInstance()?.visible) {\n this._airDatepickerInstance()?.hide()\n }\n }\n\n setupInputStringToDate(value: string) {\n let targetValueFormat = this.valueFormat()\n if (value.length !== targetValueFormat.length) {\n targetValueFormat = targetValueFormat.replace('yyyy', 'yy')\n }\n let targetDate = parse(value, targetValueFormat, new Date())\n if (!this.showTimepicker()) {\n targetDate = this.dateToUtc(targetDate)\n }\n return targetDate\n }\n\n override onChangedHandler(value: string | DateRange | null): void {\n let targetDate = value\n const currentValue = this._value()\n if (typeof targetDate === 'string' && (!currentValue || typeof currentValue === 'string')) {\n if (!this.showTimepicker() && targetDate) {\n // remove time from date\n targetDate = `${targetDate.split('T')[0]}T00:00:00.000Z`\n } else if (this.showOnlyTimepicker() && currentValue && targetDate) {\n targetDate = `${currentValue.split('T')[0]}T${targetDate.split('T')[1]}`\n }\n } else if (\n this.rangeSelection() &&\n typeof targetDate === 'object' &&\n (currentValue === null || typeof currentValue === 'object')\n ) {\n if (!this.showTimepicker() && targetDate?.dateFrom) {\n // remove time from date\n targetDate.dateFrom = `${targetDate.dateFrom.split('T')[0]}T00:00:00.000Z`\n } else if (this.showOnlyTimepicker() && currentValue?.dateFrom && targetDate?.dateFrom) {\n targetDate.dateFrom = `${currentValue?.dateFrom.split('T')[0]}T${targetDate.dateFrom.split('T')[1]}`\n }\n if (!this.showTimepicker() && targetDate?.dateTo) {\n // remove time from date\n targetDate.dateTo = `${targetDate.dateTo.split('T')[0]}T00:00:00.000Z`\n } else if (this.showOnlyTimepicker() && currentValue?.dateTo && targetDate?.dateTo) {\n targetDate.dateTo = `${currentValue?.dateTo.split('T')[0]}T${targetDate.dateTo.split('T')[1]}`\n }\n }\n\n if (JSON.stringify(currentValue) === JSON.stringify(targetDate)) {\n return\n }\n\n this._value.set(targetDate)\n }\n\n onHideCalendar(): void {\n const valueInput: string = this._inputForDate()?.nativeElement.value\n let value: string | DateRange = valueInput\n if (this.rangeSelection()) {\n value = { dateFrom: '', dateTo: '' }\n const [dateFrom, dateTo] = valueInput.split(this.multipleDatesSeparator())\n value.dateFrom = dateFrom ?? ''\n value.dateTo = dateTo ?? ''\n if (!value.dateFrom || !this.checkDateMatch(value.dateFrom)) {\n value.dateFrom = null\n } else {\n value.dateFrom = this.setupInputStringToDate(value.dateFrom).toISOString()\n }\n if (!value.dateTo || !this.checkDateMatch(value.dateTo)) {\n value.dateTo = null\n } else {\n value.dateTo = this.setupInputStringToDate(value.dateTo).toISOString()\n }\n this.onChangedHandler(value)\n } else if (this.checkDateMatch(value)) {\n this.onChangedHandler(this.setupInputStringToDate(value).toISOString())\n } else {\n this.onChangedHandler(null)\n }\n\n if (this.formControl()?.getRawValue() !== this._value()) {\n super.onChangedHandler(this._value())\n } else if (this.onTouched) {\n this.onTouched()\n }\n\n // Only focus the input when the user actually interacted with the calendar.\n // Avoids infinite focus loop when tabbing between multiple datepickers.\n const activeElement = document.activeElement\n const calendarElement = this._airDatepickerInstance()?.$datepicker\n const inputElement = this._inputForDate()?.nativeElement\n const isCalendarFocused = calendarElement?.contains(activeElement)\n\n const shouldRefocus = this._shouldRefocusInputOnHide() || isCalendarFocused || this.isMouseInsideCalendar()\n this._shouldRefocusInputOnHide.set(false)\n\n if (shouldRefocus) {\n inputElement?.focus()\n }\n\n this.onBlurHandler()\n }\n\n formatDate(val: string | DateRange | null): string {\n if (val && typeof val === 'string') {\n return format(val, this.valueFormat())\n }\n if (val && typeof val === 'object') {\n let dateFromFormat = ''\n let dateToFormat = ''\n if (val.dateFrom) {\n dateFromFormat = format(val.dateFrom, this.valueFormat())\n }\n if (val.dateTo) {\n dateToFormat = format(val.dateTo, this.valueFormat())\n }\n return `${dateFromFormat}${this.multipleDatesSeparator()}${dateToFormat}`\n }\n return ''\n }\n\n openDatePicker() {\n const inputEl = this._inputForDate()?.nativeElement\n if (!inputEl || this._isDisabled()) {\n return\n }\n\n inputEl.focus()\n\n if (!this._airDatepickerInstance()) {\n this.setupCalendar()\n }\n\n this._airDatepickerInstance()?.show()\n }\n\n onInputKeydown(event: KeyboardEvent) {\n if (this._isDisabled()) {\n return\n }\n\n const dp = this._airDatepickerInstance()\n if (event.key === 'Escape' && dp?.visible) {\n event.preventDefault()\n dp.hide()\n return\n }\n\n if (event.key === 'Enter' || event.key === 'ArrowDown') {\n event.preventDefault()\n this.openDatePicker()\n }\n }\n\n interceptInputInteraction($event: Event) {\n if (!this.isReadonly()) return\n\n $event.stopPropagation()\n $event.stopImmediatePropagation()\n $event.preventDefault()\n }\n\n getLocale(): AirDatepickerLocale {\n switch (this._activeLanguage()?.toLowerCase()) {\n case 'en':\n return (en as any).default || en\n case 'it':\n return (it as any).default || it\n case 'fr':\n return (fr as any).default || fr\n default:\n return (en as any).default || en\n }\n }\n\n onCancel(): void {\n this._inputForDate()?.nativeElement.blur()\n }\n\n private dateToUtc(date: Date): Date {\n // convert to UTC time removing the timezone\n return new Date(date.getTime() - date.getTimezoneOffset() * 60000)\n }\n\n private dateToLocal(date: Date): Date {\n // convert to local time adding the timezone\n return new Date(date.getTime() + date.getTimezoneOffset() * 60000)\n }\n\n private setCalendarPosition() {\n const windowInnerHeight = window.innerHeight\n const inputBoundingClientRect = this._inputForDate()?.nativeElement.getBoundingClientRect()\n const diff = windowInnerHeight - inputBoundingClientRect.height - inputBoundingClientRect.top - 239\n if (diff >= 0) {\n this.targetPosition.set('bottom left')\n } else {\n this.targetPosition.set('top left')\n }\n }\n\n private setupTimepicker() {\n const timepicker = document.getElementsByClassName('air-datepicker-time')?.[0]\n if (timepicker) {\n const inputs = timepicker.getElementsByTagName('input')\n for (const input of Array.from(inputs)) {\n input.setAttribute('type', 'number')\n input.setAttribute('maxLength', '2')\n input.className = 'form-control'\n input.onmouseup = (evt) => {\n evt.stopImmediatePropagation()\n }\n input.onblur = () => {\n if (this.isMouseOutsideCalendar()) {\n this._airDatepickerInstance()?.hide()\n }\n }\n }\n }\n }\n\n checkDateMatch(date: string): boolean {\n return isMatch(date, this.valueFormat()) || isMatch(date, this.valueFormat().replace('yyyy', 'yy'))\n }\n}\n","<div class=\"mb-3\">\n @if (componentLabel()) {\n <label\n [htmlFor]=\"componentId()\"\n class=\"form-label\"\n >\n {{ componentLabel() | transloco }}\n <span [hidden]=\"!_isRequired()\">*</span>\n </label>\n }\n <div\n [class.is-invalid]=\"_showErrors()\"\n [class.is-valid]=\"_showSuccess()\"\n class=\"input-date-container\"\n >\n <input\n [attr.required]=\"getIsRequiredControl()\"\n [autocomplete]=\"'off'\"\n [class.is-invalid]=\"_showErrors()\"\n [class.is-valid]=\"_showSuccess()\"\n [class.with-button-calendar]=\"!hasNoContent()\"\n [disabled]=\"_isDisabled()\"\n [hidden]=\"showInline()\"\n [id]=\"componentId()\"\n [ngClass]=\"componentClass()\"\n [placeholder]=\"componentPlaceholder() | transloco\"\n [readOnly]=\"isReadonly()\"\n [tabIndex]=\"componentTabIndex()\"\n [value]=\"inputValueString()\"\n (blur)=\"onBlurHandler()\"\n (focus)=\"interceptInputInteraction($event)\"\n (input)=\"onChangeText($event)\"\n (keydown)=\"onInputKeydown($event)\"\n (mouseenter)=\"isMouseInsideCalendar.set(true)\"\n (mouseleave)=\"isMouseInsideCalendar.set(false)\"\n (search)=\"onCancel()\"\n #inputForDate\n class=\"form-control\"\n type=\"search\"\n />\n <button\n [attr.required]=\"getIsRequiredControl()\"\n [class.border-danger]=\"_showErrors()\"\n [class.border-success]=\"_showSuccess()\"\n [hidden]=\"showInline() || hasNoContent() || _isDisabled()\"\n [ngClass]=\"buttonClass()\"\n (click)=\"_ngControl()?.disabled ? null : openDatePicker()\"\n #calendarButton\n aria-label=\"calendar-button\"\n class=\"btn btn-outline-secondary btn-outline-calendar\"\n type=\"button\"\n >\n <ng-content></ng-content>\n </button>\n </div>\n <div class=\"valid-feedback\">\n {{ successMessage() | transloco }}\n </div>\n <div class=\"invalid-feedback\">\n {{ _currentErrorMessage() | transloco: _currentErrorMessageExtraData() }}\n </div>\n @if (helpMessage()) {\n <small\n [hidden]=\"_showSuccess() || _showErrors()\"\n aria-live=\"assertive\"\n class=\"form-text text-muted\"\n >\n {{ helpMessage() | transloco }}\n </small>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA+CA;;;;;;;;;;;AAWG;AACG,MAAO,kBAAmB,SAAQ,kBAA6C,CAAA;AAoGnF,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AApGT;;;;;AAKG;AACH,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAS,YAAY,CAAC;AAExC;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QAAA,EC3C7G,kwEAuEA,EAAA,MAAA,EAAA,CAAA,o2EAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,ED3BY,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,OAAO,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAerB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBApB9B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,EAGX,SAAA,EAAA,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,MAAwB,kBAAA,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAClG,OAAA,EAAA,CAAC,aAAa,EAAE,OAAO,CAAC,EAChB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,kwEAAA,EAAA,MAAA,EAAA,CAAA,o2EAAA,CAAA,EAAA;;;AE7CjD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"quang-components-date.mjs","sources":["../../../projects/quang/components/date/date.component.ts","../../../projects/quang/components/date/date.component.html","../../../projects/quang/components/date/quang-components-date.ts"],"sourcesContent":["import { NgClass } from '@angular/common'\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n computed,\n effect,\n forwardRef,\n inject,\n input,\n signal,\n viewChild,\n} from '@angular/core'\nimport { NgZone } from '@angular/core'\nimport { ApplicationRef } from '@angular/core'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport { NG_VALUE_ACCESSOR } from '@angular/forms'\n\nimport { TranslocoPipe } from '@jsverse/transloco'\nimport AirDatepicker, {\n AirDatepickerDate,\n AirDatepickerLocale,\n AirDatepickerOptions,\n AirDatepickerPosition,\n} from 'air-datepicker'\nimport en from 'air-datepicker/locale/en'\nimport fr from 'air-datepicker/locale/fr'\nimport it from 'air-datepicker/locale/it'\nimport { format, isMatch, parse } from 'date-fns'\nimport { QuangTranslationService } from 'quang/translation'\nimport { debounceTime, fromEvent } from 'rxjs'\n\nimport { QuangBaseComponent } from 'quang/components/shared'\n\nexport interface DateRange {\n dateFrom: string | null\n dateTo: string | null\n}\n\nexport type QuangDatepickerOptions = AirDatepickerOptions\n\n@Component({\n selector: 'quang-date',\n templateUrl: './date.component.html',\n styleUrl: './date.component.scss',\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => QuangDateComponent), multi: true }],\n imports: [TranslocoPipe, NgClass],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\n/**\n * Datepicker component based on {@link https://air-datepicker.com/docs}.\n *\n * @usageNotes\n * 1. It can be used to only display the `timepicker` component by setting\n * `[showOnlyTimepicker]=\"true\"`\n *\n * 2. `datepickerOptions` can be used to override the default options of the component to get full access to all the\n * possible customizations that Air Datepicker provides. See {@link https://air-datepicker.com/examples}\n * Please note that overriding the `container` and `locale` properties and the `onSelect` and `onHide`\n * events might cause the component to malfunction.\n */\nexport class QuangDateComponent extends QuangBaseComponent<string | DateRange | null> {\n private readonly _ngZone = inject(NgZone)\n private readonly _cdr = inject(ChangeDetectorRef)\n private readonly _appRef = inject(ApplicationRef)\n private _tickScheduled = false\n\n /**\n * Format to use to show on the input field.\n * The format is based on the standard {@link https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table}\n * Default: dd/MM/yyyy\n * @default dd/MM/yyyy\n */\n dateFormat = input<string>('dd/MM/yyyy')\n\n /**\n * Format to use to show on the time inside the input field.\n * The format is based on the standard {@link https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table}\n * Default: HH:mm\n * @default HH:mm\n */\n timeFormat = input<string>('HH:mm')\n\n /**\n * Calendar locale, if not provided the component will try to use the one provided in {@link QuangTranslationService}\n * if the language is not set in {@link QuangTranslationService} it will use the browser language\n * Use this parameter only to override default behavior\n */\n activeLanguageOverride = input<string | undefined>(undefined)\n\n /**\n * If true enable the timepicker inside the calendar\n */\n timepicker = input<boolean>(false)\n\n /**\n * The message to show inside the input if the date is invalid\n */\n invalidDateMessage = input<string>('')\n\n showOnlyTimepicker = input<boolean>(false)\n\n minHour = input<number>(0)\n\n maxHour = input<number>(24)\n\n minMinute = input<number>(0)\n\n maxMinute = input<number>(59)\n\n minDate = input<Date | undefined>(undefined)\n\n maxDate = input<Date | undefined>(undefined)\n\n showInline = input<boolean>(false)\n\n calendarClasses = input<string>('')\n\n buttonClass = input<string>('')\n\n datepickerOptions = input<QuangDatepickerOptions | undefined>(undefined)\n\n _inputForDate = viewChild<ElementRef>('inputForDate')\n\n contentTemplate = viewChild.required<ElementRef>('calendarButton')\n\n hasNoContent = computed(() => this.contentTemplate()?.nativeElement.children.length === 0)\n\n _quangTranslationService = signal<QuangTranslationService | undefined>(\n inject(QuangTranslationService, { optional: true }) ?? undefined\n )\n\n _quangTranslationActiveLang = computed(() => this._quangTranslationService()?.activeLang() ?? null)\n\n multipleDatesSeparator = input<string>(' - ')\n\n rangeSelection = input(false)\n\n _activeLanguage = computed(() => {\n if (this.activeLanguageOverride()) {\n return this.activeLanguageOverride()\n }\n if (this._quangTranslationService()) {\n return this._quangTranslationActiveLang()\n }\n return navigator.language\n })\n\n _airDatepickerInstance = signal<AirDatepicker | undefined>(undefined)\n\n // AirDatepicker doesn't reliably support toggling `inline` at runtime via `update()`.\n // Track the mode used to create the current instance and recreate when it changes.\n private readonly _airDatepickerInlineMode = signal<boolean | null>(null)\n\n searchTextDebounce = input<number>(500)\n\n targetPosition = signal<AirDatepickerPosition>('bottom left')\n\n _generateAirDatepickerEffect = effect(() => {\n this.setupCalendar()\n })\n\n valueFormat = computed(() =>\n this.showOnlyTimepicker()\n ? this.timeFormat()\n : this.dateFormat() + (this.showTimepicker() ? ` ${this.timeFormat()}` : '')\n )\n\n inputValueString = computed(() => this.formatDate(this._value()))\n\n constructor() {\n super()\n\n fromEvent(document, 'scroll', { capture: true })\n .pipe(takeUntilDestroyed(), debounceTime(250))\n .subscribe(() => {\n if (this._airDatepickerInstance()?.visible) {\n this.setupCalendar()\n }\n })\n }\n\n showTimepicker = computed(() => !this.rangeSelection() && (this.timepicker() || this.showOnlyTimepicker()))\n\n isMouseInsideCalendar = signal(false)\n\n isMouseOutsideCalendar = computed(() => !this.isMouseInsideCalendar())\n\n private _shouldRefocusInputOnHide = signal(false)\n\n setupCalendar() {\n if (!this._inputForDate()?.nativeElement) return\n\n const desiredInlineMode = this.showInline()\n\n const existingInstance = this._airDatepickerInstance()\n const existingInlineMode = this._airDatepickerInlineMode()\n\n if (existingInstance && existingInlineMode !== null && existingInlineMode !== desiredInlineMode) {\n const maybeDestroy = existingInstance as unknown as { destroy?: () => void }\n maybeDestroy.destroy?.()\n this._airDatepickerInstance.set(undefined)\n }\n\n let currentValue = this._value()\n let targetDate: AirDatepickerDate[] | undefined\n if (currentValue && typeof currentValue === 'string') {\n if (!this.showTimepicker()) {\n currentValue = currentValue.split('T')[0]\n }\n targetDate = [currentValue]\n } else if (currentValue && typeof currentValue === 'object') {\n targetDate = []\n if (currentValue.dateFrom) {\n const targetDateFrom: string = this.showTimepicker()\n ? currentValue.dateFrom\n : currentValue.dateFrom.split('T')[0]\n targetDate.push(targetDateFrom)\n }\n if (currentValue.dateTo) {\n const targetDateTo: string = this.showTimepicker() ? currentValue.dateTo : currentValue.dateTo.split('T')[0]\n targetDate.push(targetDateTo)\n }\n }\n\n this.setCalendarPosition()\n\n const userDatepickerOptions = this.datepickerOptions() ?? {}\n const userOnSelect = userDatepickerOptions.onSelect\n const userOnHide = userDatepickerOptions.onHide\n const userOnShow = userDatepickerOptions.onShow\n\n const airDatepickerOpts: QuangDatepickerOptions = {\n ...userDatepickerOptions,\n autoClose: !this.showInline(),\n showEvent: 'click',\n classes: this.calendarClasses(),\n dateFormat: this.dateFormat(),\n inline: this.showInline(),\n isMobile: false,\n multipleDatesSeparator: this.multipleDatesSeparator(),\n range: this.rangeSelection(),\n timepicker: this.showTimepicker(),\n onlyTimepicker: this.showOnlyTimepicker(),\n timeFormat: this.timeFormat(),\n minHours: this.minHour(),\n maxHours: this.maxHour(),\n minMinutes: this.minMinute(),\n maxMinutes: this.maxMinute(),\n minDate: this.minDate(),\n maxDate: this.maxDate(),\n toggleSelected: false,\n multipleDates: false,\n selectedDates: targetDate,\n position: this.targetPosition(),\n locale: this.getLocale(),\n\n onSelect: (args) => {\n const { date } = args\n // AirDatepicker callbacks may fire outside Angular's zone in some app setups.\n // Ensure CVA propagation happens inside the zone so the connected FormControl updates reliably.\n this._ngZone.run(() => {\n this._shouldRefocusInputOnHide.set(true)\n\n if (Array.isArray(date)) {\n // Range selection: AirDatepicker emits partial selections too (only start date).\n // Committing `_value` for partial selections can trigger `setupCalendar()` re-sync and\n // break the second click. Only commit once the range is complete.\n const [from, to] = date\n if (!from || !to) {\n return\n }\n\n const value: DateRange = {\n dateFrom: (this.showTimepicker() ? from : this.dateToUtc(from)).toISOString(),\n dateTo: (this.showTimepicker() ? to : this.dateToUtc(to)).toISOString(),\n }\n this.onChangedHandler(value)\n } else if (date) {\n const selectTargetDate = this.showTimepicker() ? date : this.dateToUtc(date)\n this.onChangedHandler(selectTargetDate.toISOString())\n }\n\n if (this.showInline()) {\n // Inline mode should update the connected control immediately.\n // Do not rely on `onHideCalendar()` because inline never hides and the input may be visually hidden.\n this.propagateValueToControl()\n }\n })\n\n userOnSelect?.(args)\n },\n onHide: (isAnimationComplete: boolean) => {\n if (isAnimationComplete) {\n this.onHideCalendar()\n }\n\n userOnHide?.(isAnimationComplete)\n },\n onShow: (isAnimationComplete) => {\n const datepicker = this._airDatepickerInstance()?.$datepicker\n if (datepicker) {\n datepicker.onmouseenter = () => {\n this.isMouseInsideCalendar.set(true)\n }\n datepicker.onmouseleave = () => {\n this.isMouseInsideCalendar.set(false)\n }\n }\n if (isAnimationComplete || !this.showTimepicker()) {\n return\n }\n this.setupTimepicker()\n\n userOnShow?.(isAnimationComplete)\n },\n }\n\n if (this._airDatepickerInstance()) {\n if (this._airDatepickerInstance()?.visible) {\n this._airDatepickerInstance()?.update(airDatepickerOpts)\n } else {\n this._airDatepickerInstance()?.update(airDatepickerOpts, { silent: true })\n }\n\n if (targetDate) {\n this._airDatepickerInstance()?.selectDate(targetDate, { updateTime: true, silent: true })\n } else {\n this._airDatepickerInstance()?.setFocusDate(false)\n this._airDatepickerInstance()?.clear({ silent: true })\n }\n } else {\n this._airDatepickerInstance.set(new AirDatepicker(this._inputForDate()?.nativeElement, airDatepickerOpts))\n }\n\n this._airDatepickerInlineMode.set(desiredInlineMode)\n\n if (desiredInlineMode) {\n // Ensure inline calendar is visible after re-creation/update.\n this._airDatepickerInstance()?.show?.()\n }\n\n if (this.showInline()) {\n this.setupTimepicker()\n }\n }\n\n onChangeText($event: Event): void {\n const value = ($event.target as HTMLInputElement)?.value\n if (value) {\n // TODO: check format for DateRange\n if (value.length === this.valueFormat().length && isMatch(value, this.valueFormat())) {\n this.onChangedHandler(this.setupInputStringToDate(value).toISOString())\n\n if (this.showInline()) {\n this.propagateValueToControl()\n }\n }\n } else {\n this.onChangedHandler(value)\n\n if (this.showInline()) {\n this.propagateValueToControl()\n }\n }\n }\n\n override onBlurHandler() {\n super.onBlurHandler()\n\n if (this.showInline()) {\n return\n }\n\n if (this.isMouseOutsideCalendar() && this._airDatepickerInstance()?.visible) {\n this._airDatepickerInstance()?.hide()\n }\n }\n\n setupInputStringToDate(value: string) {\n let targetValueFormat = this.valueFormat()\n if (value.length !== targetValueFormat.length) {\n targetValueFormat = targetValueFormat.replace('yyyy', 'yy')\n }\n const targetDate = parse(value, targetValueFormat, new Date())\n if (!this.showTimepicker()) {\n return this.dateToUtc(targetDate)\n }\n return targetDate\n }\n\n override onChangedHandler(value: string | DateRange | null): void {\n let targetDate = value\n const currentValue = this._value()\n if (typeof targetDate === 'string' && (!currentValue || typeof currentValue === 'string')) {\n if (!this.showTimepicker() && targetDate) {\n // remove time from date\n targetDate = `${targetDate.split('T')[0]}T00:00:00.000Z`\n } else if (this.showOnlyTimepicker() && currentValue && targetDate) {\n targetDate = `${currentValue.split('T')[0]}T${targetDate.split('T')[1]}`\n }\n } else if (\n this.rangeSelection() &&\n typeof targetDate === 'object' &&\n (currentValue === null || typeof currentValue === 'object')\n ) {\n if (!this.showTimepicker() && targetDate?.dateFrom) {\n // remove time from date\n targetDate.dateFrom = `${targetDate.dateFrom.split('T')[0]}T00:00:00.000Z`\n } else if (this.showOnlyTimepicker() && currentValue?.dateFrom && targetDate?.dateFrom) {\n targetDate.dateFrom = `${currentValue?.dateFrom.split('T')[0]}T${targetDate.dateFrom.split('T')[1]}`\n }\n if (!this.showTimepicker() && targetDate?.dateTo) {\n // remove time from date\n targetDate.dateTo = `${targetDate.dateTo.split('T')[0]}T00:00:00.000Z`\n } else if (this.showOnlyTimepicker() && currentValue?.dateTo && targetDate?.dateTo) {\n targetDate.dateTo = `${currentValue?.dateTo.split('T')[0]}T${targetDate.dateTo.split('T')[1]}`\n }\n }\n\n if (JSON.stringify(currentValue) === JSON.stringify(targetDate)) {\n return\n }\n\n this._value.set(targetDate)\n }\n\n private propagateValueToControl(): void {\n if (this.formControl()?.getRawValue() !== this._value()) {\n super.onChangedHandler(this._value())\n } else if (this.onTouched) {\n this.onTouched()\n }\n\n this.requestRender()\n }\n\n private requestRender(): void {\n // Inline datepicker interactions can happen outside Angular-managed events.\n // Marking the view dirty is not always enough in zoneless/event-coalesced setups,\n // so we coalesce a manual tick.\n this._cdr.markForCheck()\n\n if (this._tickScheduled) {\n return\n }\n\n this._tickScheduled = true\n queueMicrotask(() => {\n this._tickScheduled = false\n this._appRef.tick()\n })\n }\n\n private syncValueFromDatepickerSelection(): void {\n if (!this.showInline()) {\n return\n }\n\n const datepickerInstance = this._airDatepickerInstance() as unknown as { selectedDates?: Date[] } | undefined\n const selectedDate = datepickerInstance?.selectedDates?.[0]\n if (!(selectedDate instanceof Date)) {\n return\n }\n\n const targetDate = this.showTimepicker() ? selectedDate : this.dateToUtc(selectedDate)\n this.onChangedHandler(targetDate.toISOString())\n this.propagateValueToControl()\n }\n\n onHideCalendar(): void {\n const valueInput: string = this._inputForDate()?.nativeElement.value\n let value: string | DateRange = valueInput\n if (this.rangeSelection()) {\n value = { dateFrom: '', dateTo: '' }\n const [dateFrom, dateTo] = valueInput.split(this.multipleDatesSeparator())\n value.dateFrom = dateFrom ?? ''\n value.dateTo = dateTo ?? ''\n value.dateFrom =\n !value.dateFrom || !this.checkDateMatch(value.dateFrom)\n ? null\n : this.setupInputStringToDate(value.dateFrom).toISOString()\n value.dateTo =\n !value.dateTo || !this.checkDateMatch(value.dateTo)\n ? null\n : this.setupInputStringToDate(value.dateTo).toISOString()\n this.onChangedHandler(value)\n } else if (this.checkDateMatch(value)) {\n this.onChangedHandler(this.setupInputStringToDate(value).toISOString())\n } else {\n this.onChangedHandler(null)\n }\n\n this.propagateValueToControl()\n\n if (this.showInline()) {\n return\n }\n\n // Only focus the input when the user actually interacted with the calendar.\n // Avoids infinite focus loop when tabbing between multiple datepickers.\n const activeElement = document.activeElement\n const calendarElement = this._airDatepickerInstance()?.$datepicker\n const inputElement = this._inputForDate()?.nativeElement\n const isCalendarFocused = calendarElement?.contains(activeElement)\n\n const shouldRefocus = this._shouldRefocusInputOnHide() || isCalendarFocused || this.isMouseInsideCalendar()\n this._shouldRefocusInputOnHide.set(false)\n\n if (shouldRefocus) {\n inputElement?.focus()\n }\n\n this.onBlurHandler()\n }\n\n formatDate(val: string | DateRange | null): string {\n if (val && typeof val === 'string') {\n return format(val, this.valueFormat())\n }\n if (val && typeof val === 'object') {\n if (!val.dateFrom && !val.dateTo) {\n return ''\n }\n let dateFromFormat = ''\n let dateToFormat = ''\n if (val.dateFrom) {\n dateFromFormat = format(val.dateFrom, this.valueFormat())\n }\n if (val.dateTo) {\n dateToFormat = format(val.dateTo, this.valueFormat())\n }\n return `${dateFromFormat}${this.multipleDatesSeparator()}${dateToFormat}`\n }\n return ''\n }\n\n openDatePicker() {\n const inputEl = this._inputForDate()?.nativeElement\n if (!inputEl || this._isDisabled()) {\n return\n }\n\n inputEl.focus()\n\n if (!this._airDatepickerInstance()) {\n this.setupCalendar()\n }\n\n this._airDatepickerInstance()?.show()\n }\n\n onInputKeydown(event: KeyboardEvent) {\n if (this._isDisabled()) {\n return\n }\n\n const datepickerInstance = this._airDatepickerInstance()\n if (event.key === 'Escape' && datepickerInstance?.visible) {\n event.preventDefault()\n datepickerInstance.hide()\n return\n }\n\n if (event.key === 'Enter' || event.key === 'ArrowDown') {\n event.preventDefault()\n this.openDatePicker()\n }\n }\n\n interceptInputInteraction($event: Event) {\n if (!this.isReadonly()) return\n\n $event.stopPropagation()\n $event.stopImmediatePropagation()\n $event.preventDefault()\n }\n\n getLocale(): AirDatepickerLocale {\n switch (this._activeLanguage()?.toLowerCase()) {\n case 'en':\n return (en as unknown as { default?: AirDatepickerLocale }).default ?? (en as unknown as AirDatepickerLocale)\n case 'it':\n return (it as unknown as { default?: AirDatepickerLocale }).default ?? (it as unknown as AirDatepickerLocale)\n case 'fr':\n return (fr as unknown as { default?: AirDatepickerLocale }).default ?? (fr as unknown as AirDatepickerLocale)\n default:\n return (en as unknown as { default?: AirDatepickerLocale }).default ?? (en as unknown as AirDatepickerLocale)\n }\n }\n\n onCancel(): void {\n this._inputForDate()?.nativeElement.blur()\n }\n\n private dateToUtc(date: Date): Date {\n // convert to UTC time removing the timezone\n return new Date(date.getTime() - date.getTimezoneOffset() * 60000)\n }\n\n private setCalendarPosition() {\n const windowInnerHeight = window.innerHeight\n const inputBoundingClientRect = this._inputForDate()?.nativeElement.getBoundingClientRect()\n const diff = windowInnerHeight - inputBoundingClientRect.height - inputBoundingClientRect.top - 239\n if (diff >= 0) {\n this.targetPosition.set('bottom left')\n } else {\n this.targetPosition.set('top left')\n }\n }\n\n private setupTimepicker() {\n const datepickerRoot = this._airDatepickerInstance()?.$datepicker as HTMLElement | undefined\n if (!datepickerRoot) {\n return\n }\n\n // AirDatepicker may re-render time inputs; use delegated listeners so we don't lose handlers.\n if (!datepickerRoot.dataset['quangTimepickerListeners']) {\n datepickerRoot.dataset['quangTimepickerListeners'] = 'true'\n\n datepickerRoot.addEventListener(\n 'input',\n () => {\n if (!this.showInline()) {\n return\n }\n // Let AirDatepicker update its internal selection first.\n setTimeout(() => this._ngZone.run(() => this.syncValueFromDatepickerSelection()), 0)\n },\n { capture: true }\n )\n }\n\n const timepickers = datepickerRoot.getElementsByClassName('air-datepicker-time')\n for (const timepicker of Array.from(timepickers)) {\n const inputs = timepicker.getElementsByTagName('input')\n for (const input of Array.from(inputs)) {\n input.setAttribute('type', 'number')\n input.setAttribute('maxLength', '2')\n input.className = 'form-control'\n input.onmouseup = (evt) => {\n evt.stopImmediatePropagation()\n }\n input.onblur = () => {\n if (!this.showInline() && this.isMouseOutsideCalendar()) {\n this._airDatepickerInstance()?.hide()\n }\n }\n }\n }\n }\n\n checkDateMatch(date: string): boolean {\n return isMatch(date, this.valueFormat()) || isMatch(date, this.valueFormat().replace('yyyy', 'yy'))\n }\n}\n","<div class=\"mb-3\">\n @if (componentLabel()) {\n <label\n [htmlFor]=\"componentId()\"\n class=\"form-label\"\n >\n {{ componentLabel() | transloco }}\n <span [hidden]=\"!_isRequired()\">*</span>\n </label>\n }\n <div\n [class.is-invalid]=\"_showErrors()\"\n [class.is-valid]=\"_showSuccess()\"\n class=\"input-date-container\"\n >\n <input\n [attr.aria-hidden]=\"showInline() ? 'true' : null\"\n [attr.required]=\"getIsRequiredControl()\"\n [autocomplete]=\"'off'\"\n [class.is-invalid]=\"_showErrors()\"\n [class.is-valid]=\"_showSuccess()\"\n [class.quang-date-inline-hidden]=\"showInline()\"\n [class.with-button-calendar]=\"!hasNoContent()\"\n [disabled]=\"_isDisabled()\"\n [id]=\"componentId()\"\n [ngClass]=\"componentClass()\"\n [placeholder]=\"componentPlaceholder() | transloco\"\n [readOnly]=\"isReadonly()\"\n [tabIndex]=\"componentTabIndex()\"\n [value]=\"inputValueString()\"\n (blur)=\"onBlurHandler()\"\n (focus)=\"interceptInputInteraction($event)\"\n (input)=\"onChangeText($event)\"\n (keydown)=\"onInputKeydown($event)\"\n (mouseenter)=\"isMouseInsideCalendar.set(true)\"\n (mouseleave)=\"isMouseInsideCalendar.set(false)\"\n (search)=\"onCancel()\"\n #inputForDate\n class=\"form-control\"\n type=\"search\"\n />\n <button\n [attr.aria-hidden]=\"showInline() ? 'true' : null\"\n [attr.required]=\"getIsRequiredControl()\"\n [class.border-danger]=\"_showErrors()\"\n [class.border-success]=\"_showSuccess()\"\n [class.quang-date-inline-hidden]=\"showInline()\"\n [hidden]=\"hasNoContent() || _isDisabled()\"\n [ngClass]=\"buttonClass()\"\n (click)=\"_ngControl()?.disabled ? null : openDatePicker()\"\n #calendarButton\n aria-label=\"calendar-button\"\n class=\"btn btn-outline-secondary btn-outline-calendar\"\n type=\"button\"\n >\n <ng-content></ng-content>\n </button>\n </div>\n <div class=\"valid-feedback\">\n {{ successMessage() | transloco }}\n </div>\n <div class=\"invalid-feedback\">\n {{ _currentErrorMessage() | transloco: _currentErrorMessageExtraData() }}\n </div>\n @if (helpMessage()) {\n <small\n [hidden]=\"_showSuccess() || _showErrors()\"\n aria-live=\"assertive\"\n class=\"form-text text-muted\"\n >\n {{ helpMessage() | transloco }}\n </small>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAkDA;;;;;;;;;;;AAWG;AACG,MAAO,kBAAmB,SAAQ,kBAA6C,CAAA;AA6GnF,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AA7GQ,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC;AACxB,QAAA,IAAA,CAAA,IAAI,G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AAiB,EAAE,WAAW,EAAE,UAAU,CAAC,MAAwB,kBAAA,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAClG,OAAA,EAAA,CAAC,aAAa,EAAE,OAAO,CAAC,EAChB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,y7EAAA,EAAA,MAAA,EAAA,CAAA,8yFAAA,CAAA,EAAA;;;AEhDjD;;AAEG;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quang-components-shared.mjs","sources":["../../../projects/quang/components/shared/makeId.ts","../../../projects/quang/components/shared/quang-base-component.directive.ts","../../../projects/quang/components/shared/option-list/option-list.component.ts","../../../projects/quang/components/shared/option-list/option-list.component.html","../../../projects/quang/components/shared/quang-components-shared.ts"],"sourcesContent":["export const makeId = (length: number) => {\n let result = ''\n const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'\n const charactersLength = characters.length\n for (let i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength))\n }\n return result\n}\n","import { AfterViewInit, DestroyRef, Directive, Injector, computed, inject, input, output, signal } from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\nimport { ControlValueAccessor, FormControl, NgControl, Validators } from '@angular/forms'\n\nimport { Subscription } from 'rxjs'\n\nimport { ErrorData } from './ErrorData'\nimport { makeId } from './makeId'\n\n@Directive()\nexport abstract class QuangBaseComponent<T = any> implements ControlValueAccessor, AfterViewInit {\n componentId = input<string>(makeId(10))\n\n isReadonly = input<boolean>(false)\n\n isReadonly$ = toObservable(this.isReadonly)\n\n componentTabIndex = input<number>(0)\n\n componentClass = input<string | string[]>('')\n\n componentLabel = input<string>('')\n\n componentPlaceholder = input<string>('')\n\n errorMap = input<ErrorData[]>([])\n\n _errorMessagesByKey = computed(\n () => new Map((this.errorMap() ?? []).map((errorData) => [errorData.error, errorData.message]))\n )\n\n successMessage = input<string>('')\n\n helpMessage = input<string>('')\n\n formControl = input<FormControl>()\n\n componentBlur = output<void>()\n\n _value = signal<T | null>(null)\n\n _isRequired = signal<boolean>(false)\n\n _isDisabled = signal<boolean>(false)\n\n _isTouched = signal<boolean>(false)\n\n _isValid = signal<boolean>(false)\n\n _showSuccess = computed(() => this.successMessage() && this._isValid() && this._isTouched() && !this._isDisabled())\n\n _showErrors = computed(\n () => this.errorMap()?.length > 0 && !this._isValid() && this._isTouched() && !this._isDisabled()\n )\n\n _currentErrorMessage = signal<string>('')\n\n _currentErrorMessageExtraData = signal<Record<string, any>>({})\n\n _ngControl = signal<NgControl | null>(null)\n\n _injector = signal<Injector>(inject(Injector))\n\n _statusChange$?: Subscription\n\n _valueChange$?: Subscription\n\n _eventsChange$?: Subscription\n\n getIsRequiredControl = computed(() => {\n const control = this._ngControl()?.control\n if (!control) {\n return false\n }\n\n return control.hasValidator(Validators.required) || control.hasValidator(Validators.requiredTrue)\n })\n\n onChange?: (value: T) => void\n\n onTouched?: () => void\n\n destroyRef = inject(DestroyRef)\n\n constructor() {\n toObservable(this.formControl)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((form) => {\n if (form) {\n this.setupFormControl()\n }\n })\n }\n\n registerOnChange(fn: (value: T) => void): void {\n this.onChange = fn\n }\n\n writeValue(val: T): void {\n this._value.set(val)\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = () => {\n this._isTouched.set(true)\n fn()\n }\n }\n\n onChangedEventHandler($event: Event) {\n const inputElement = $event.target as HTMLInputElement\n this.onChangedHandler(inputElement.value as T)\n }\n\n onChangedHandler(value: T) {\n this._value.set(value)\n if (this.onChange) {\n this.onChange(value)\n }\n\n if (this.onTouched) {\n this.onTouched()\n }\n }\n\n onBlurHandler() {\n if (this.onTouched) {\n this.onTouched()\n }\n this.componentBlur.emit()\n }\n\n setupFormControl() {\n if (this._statusChange$) {\n this._statusChange$.unsubscribe()\n this._statusChange$ = undefined\n }\n\n if (this._valueChange$) {\n this._valueChange$.unsubscribe()\n this._valueChange$ = undefined\n }\n\n if (this._eventsChange$) {\n this._eventsChange$.unsubscribe()\n this._eventsChange$ = undefined\n }\n\n this._ngControl.set(this._injector().get(NgControl))\n\n const control = this._ngControl()?.control\n\n this._statusChange$ = control?.statusChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.checkFormErrors()\n })\n\n this._valueChange$ = control?.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.checkFormErrors()\n })\n\n // `markAllAsTouched()` updates the control's `touched` state without emitting `statusChanges`.\n // Angular exposes an `events` stream that includes touched/pristine changes.\n this._eventsChange$ = (control as any)?.events?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.checkFormErrors()\n })\n\n this._isTouched.set(!!(control?.touched || control?.dirty))\n this._isDisabled.set(this.isReadonly() || control?.disabled || false)\n this.checkFormErrors()\n }\n\n onChangeIsReadonly = this.isReadonly$.pipe(takeUntilDestroyed()).subscribe((isReadonly: boolean) => {\n this._isDisabled.set(isReadonly || this._ngControl()?.disabled || false)\n })\n\n setDisabledState(isDisabled: boolean) {\n this._isDisabled.set(isDisabled)\n }\n\n checkFormErrors() {\n const control = this._ngControl()?.control\n this._isValid.set(control?.valid ?? false)\n this._isTouched.set(!!(control?.touched || control?.dirty))\n\n this._isRequired.set(\n !!control && (control.hasValidator(Validators.required) || control.hasValidator(Validators.requiredTrue))\n )\n\n const validationErrors = control?.errors\n\n let errorName = ''\n let errorMessage = ''\n let errorData = true\n\n for (const [validationErrorName, validationErrorData] of Object.entries(validationErrors ?? {})) {\n const relatedErrorMessage = this._errorMessagesByKey().get(validationErrorName)\n if (relatedErrorMessage) {\n errorName = validationErrorName\n errorMessage = relatedErrorMessage\n errorData = validationErrorData\n }\n }\n\n this._currentErrorMessage.set(errorMessage)\n this._currentErrorMessageExtraData.set({ [errorName]: errorData })\n }\n\n ngAfterViewInit(): void {\n this.setupFormControl()\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { NgClass, NgStyle, NgTemplateOutlet } from '@angular/common'\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n HostListener,\n type TemplateRef,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\n\nimport { TranslocoPipe } from '@jsverse/transloco'\nimport { QUANG_LOGGING_BEHAVIOR } from 'quang'\nimport { Subscription, fromEvent } from 'rxjs'\n\nexport interface QuangSelectOptionTemplateContext {\n $implicit: SelectOption\n selected: boolean\n index: number\n}\n\nexport interface SelectOption {\n label: string\n value: string | number | null\n renderer?: TemplateRef<QuangSelectOptionTemplateContext>\n}\n\nexport enum OptionListParentType {\n SELECT = 'select',\n AUTOCOMPLETE = 'autocomplete',\n}\n\n@Component({\n selector: 'quang-option-list',\n imports: [NgStyle, NgClass, NgTemplateOutlet, TranslocoPipe],\n templateUrl: './option-list.component.html',\n styleUrl: './option-list.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class QuangOptionListComponent {\n logLevel = inject(QUANG_LOGGING_BEHAVIOR, { optional: true })\n\n selectionMode = input<'single' | 'multiple'>('single')\n\n optionListMaxHeight = input<string>('201px')\n\n selectOptions = input<SelectOption[]>([])\n\n selectButtonRef = input.required<HTMLButtonElement | HTMLInputElement | HTMLDivElement>()\n\n _value = input<any>()\n\n _isDisabled = input<boolean>()\n\n componentClass = input<string | string[]>('')\n\n componentLabel = input<string>('')\n\n componentTabIndex = input<number>(0)\n\n translateValue = input<boolean>(false)\n\n nullOption = input<boolean>(true)\n\n elementWidth = signal<string>('0px')\n\n elementTop = signal<string>('0px')\n\n elementBottom = signal<string>('0px')\n\n scrollBehaviorOnOpen = input<ScrollBehavior>('smooth')\n\n changedHandler = output<any>()\n\n blurHandler = output<any>()\n\n /** Emitted when user presses Escape - parent should close dropdown and return focus to trigger */\n escapePressed = output<void>()\n\n /** Emitted when user presses Tab - parent should handle focus transition */\n tabPressed = output<{ shiftKey: boolean }>()\n\n optionListContainer = viewChild<ElementRef<HTMLDivElement>>('optionListContainer')\n\n destroyRef = inject(DestroyRef)\n\n parentType = input.required<OptionListParentType>()\n\n parentID = input<string>('')\n\n searchString = signal<string>('')\n\n searchResetTimer: ReturnType<typeof setTimeout> | null = null\n\n selectButtonRef$ = toObservable(this.selectButtonRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.getOptionListWidth()\n this.getOptionListTop()\n this.getScrollParent(this.selectButtonRef())?.addEventListener('scroll', () => {\n this.getOptionListWidth()\n this.getOptionListTop()\n })\n })\n\n selectOptionsList = computed(() => {\n if (this.nullOption() && this.selectionMode() === 'single') {\n return [\n {\n label: '',\n value: null,\n },\n ...this.selectOptions(),\n ]\n }\n return [...this.selectOptions()]\n })\n\n onKeyDown: Subscription | null = null\n\n selectedElementIndex = computed<number>(\n () => this.selectOptionsList()?.findIndex((x) => x?.value === this._value()) ?? 0\n )\n\n /** Signal to track currently focused item index for aria-activedescendant */\n focusedItemIndex = signal<number>(-1)\n\n /**\n * Returns the ID of the currently focused item for aria-activedescendant\n */\n getActiveDescendantId(): string | null {\n const index = this.focusedItemIndex()\n if (index >= 0 && index < this.selectOptionsList().length) {\n return `item-${index}`\n }\n return null\n }\n\n optionList$ = effect(() => {\n const optionListContainer = this.optionListContainer()\n const parentType = this.parentType()\n\n // Focus the option list container when opened (only for SELECT)\n if (optionListContainer && parentType === OptionListParentType.SELECT) {\n optionListContainer?.nativeElement.focus()\n }\n\n const ul = optionListContainer?.nativeElement?.children[0] as HTMLUListElement | undefined\n const listItems = (ul?.children ?? []) as HTMLLIElement[]\n let currentIndex = this.selectedElementIndex()\n listItems?.[currentIndex]?.classList.add('selected')\n // Initialize focusedItemIndex with current selection\n this.focusedItemIndex.set(currentIndex)\n\n // Scroll to selected item when option list opens\n const listItem = listItems[currentIndex]\n if (listItem) {\n setTimeout(() => {\n listItem.scrollIntoView({ behavior: this.scrollBehaviorOnOpen(), block: 'nearest' })\n }, 0)\n }\n\n if (this.onKeyDown) {\n this.onKeyDown.unsubscribe()\n }\n\n this.onKeyDown = fromEvent(document, 'keydown', {\n capture: true,\n })\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((event) => {\n switch ((event as KeyboardEvent).key) {\n case 'ArrowDown': {\n if (this.parentType() === OptionListParentType.AUTOCOMPLETE) optionListContainer?.nativeElement.focus()\n if (currentIndex !== this.selectedElementIndex()) listItems[currentIndex]?.classList.remove('selected')\n if (currentIndex === listItems.length - 1) {\n currentIndex = listItems.length - 1\n } else {\n currentIndex += 1\n }\n event.preventDefault()\n\n listItems[currentIndex]?.classList.add('selected')\n // Scroll item into view if not visible\n listItems[currentIndex]?.scrollIntoView({ behavior: 'smooth', block: 'nearest' })\n // Update focusedItemIndex for aria-activedescendant\n this.focusedItemIndex.set(currentIndex)\n break\n }\n case 'ArrowUp': {\n if (this.parentType() === OptionListParentType.AUTOCOMPLETE) optionListContainer?.nativeElement.focus()\n if (currentIndex !== this.selectedElementIndex()) listItems[currentIndex]?.classList.remove('selected')\n if (currentIndex !== 0) currentIndex -= 1\n event.preventDefault()\n\n listItems[currentIndex]?.classList.add('selected')\n // Scroll item into view if not visible\n listItems[currentIndex]?.scrollIntoView({ behavior: 'smooth', block: 'nearest' })\n // Update focusedItemIndex for aria-activedescendant\n this.focusedItemIndex.set(currentIndex)\n break\n }\n case 'Enter': {\n event.preventDefault()\n this.onSelectItem(this.selectOptionsList()[currentIndex])\n break\n }\n case 'Escape': {\n event.preventDefault()\n this.escapePressed.emit()\n break\n }\n case 'Tab': {\n // Only handle Tab when focus is on the option list itself\n // If focus is on the parent input, let the input's blur handler deal with it\n if (document.activeElement?.id === optionListContainer?.nativeElement?.id) {\n // Allow Tab to close dropdown and move focus naturally\n // Emit event so parent can handle focus transition\n this.tabPressed.emit({ shiftKey: (event as KeyboardEvent).shiftKey })\n }\n break\n }\n default: {\n if (\n ((event as KeyboardEvent)?.key?.length === 1 || (event as KeyboardEvent)?.key === 'Backspace') &&\n this.parentType() === OptionListParentType.AUTOCOMPLETE &&\n document.activeElement?.id === optionListContainer?.nativeElement?.id\n ) {\n currentIndex = 0\n document.getElementById(this.parentID())?.focus()\n document.getElementById(this.parentID())?.click()\n } else if (\n (event as KeyboardEvent)?.key?.length === 1 &&\n this.parentType() === OptionListParentType.SELECT\n ) {\n const key = (event as KeyboardEvent).key\n currentIndex = this.handleSearch(key, listItems, currentIndex)\n event.preventDefault()\n }\n break\n }\n }\n })\n })\n\n handleSearch(key: string, listItems: HTMLLIElement[], currentIndex: number): number {\n if (this.searchResetTimer) {\n clearTimeout(this.searchResetTimer)\n }\n\n this.searchString.update((current) => current + key)\n\n this.searchResetTimer = setTimeout(() => {\n this.searchString.set('')\n this.searchResetTimer = null\n }, 500)\n\n const searchStr = this.searchString().toLowerCase()\n const matchIndex = this.selectOptionsList().findIndex((option) => option.label.toLowerCase().includes(searchStr))\n\n if (matchIndex !== -1 && matchIndex !== currentIndex) {\n listItems[currentIndex]?.classList.remove('selected')\n listItems[matchIndex]?.classList.add('selected')\n listItems[matchIndex]?.scrollIntoView({ behavior: this.scrollBehaviorOnOpen() })\n return matchIndex\n }\n\n return currentIndex\n }\n\n @HostListener('window:scroll') changePosition() {\n this.getOptionListWidth()\n this.getOptionListTop()\n }\n\n isScrollable(ele: Element): boolean {\n if (!ele) return false\n\n let result = false\n\n try {\n const hasScrollableContent = ele.scrollHeight > ele.clientHeight\n\n const overflowYStyle = window.getComputedStyle(ele).overflowY\n const isOverflowHidden = overflowYStyle.includes('hidden')\n\n result = hasScrollableContent && !isOverflowHidden\n } catch (_error) {\n if (this.logLevel === 'verbose') console.error('captured error isScrollable', _error)\n }\n\n return result\n }\n\n getScrollParent(node: unknown): Element {\n if (!node || node === document.body || !(node instanceof Element)) return document.body\n return this.isScrollable(node) ? node : this.getScrollParent(node.parentNode)\n }\n\n onSelectItem(item: SelectOption | null): void {\n if (this.selectionMode() === 'single') {\n this.changedHandler.emit(item?.value ?? null)\n } else {\n let targetValue = this._value()\n if (!Array.isArray(targetValue) && targetValue) {\n targetValue = [targetValue]\n }\n const values: string[] | number[] | null = targetValue as string[] | number[] | null\n if (values) {\n if (values.some((x) => x === item?.value)) {\n this.changedHandler.emit(values.filter((x) => x !== item?.value) as string[] | number[])\n } else if (item) {\n this.changedHandler.emit([...values, item.value] as string[] | number[])\n } else {\n this.changedHandler.emit([...values] as string[] | number[])\n }\n } else if (item?.value) {\n this.changedHandler.emit([item.value] as string[] | number[])\n } else {\n this.changedHandler.emit(null)\n }\n }\n this.getOptionListTop()\n }\n\n getSelected(item: SelectOption): boolean {\n if (this.selectionMode() === 'single' || !Array.isArray(this._value())) {\n return this._value() === item.value\n }\n return this._value()?.some((x: number | string | null) => x === item?.value)\n }\n\n onBlurHandler(e: Event): void {\n this.blurHandler.emit(e)\n }\n\n getOptionListWidth() {\n this.elementWidth.set(`${this.selectButtonRef()?.offsetWidth}px`)\n }\n\n getOptionListTop() {\n const nativeElement = this.optionListContainer()?.nativeElement\n const diff =\n window.innerHeight -\n (nativeElement?.getBoundingClientRect()?.height ?? 0) -\n (this.selectButtonRef()?.getBoundingClientRect()?.top ?? 0) -\n (this.selectButtonRef()?.getBoundingClientRect()?.height ?? 0)\n let topValue = 'unset'\n let bottomValue = 'unset'\n const isTop = diff >= 0\n if (isTop) {\n topValue = `${(this.selectButtonRef()?.getBoundingClientRect()?.top ?? 0) + (this.selectButtonRef()?.getBoundingClientRect()?.height ?? 0)}px`\n } else {\n bottomValue = `${window.innerHeight - (this.selectButtonRef()?.getBoundingClientRect()?.bottom ?? 0) + (this.selectButtonRef()?.getBoundingClientRect()?.height ?? 0)}px`\n }\n nativeElement?.classList.toggle('option-list-top', !isTop)\n this.elementTop.set(topValue)\n this.elementBottom.set(bottomValue)\n setTimeout(() => {\n this.getOptionListTop()\n })\n }\n}\n","<div\n [attr.aria-activedescendant]=\"getActiveDescendantId()\"\n [attr.aria-label]=\"componentLabel()\"\n [ngStyle]=\"{\n 'max-height': optionListMaxHeight(),\n '--option-list-width': elementWidth(),\n '--option-list-top': elementTop(),\n '--option-list-bottom': elementBottom(),\n }\"\n (blur)=\"onBlurHandler($event)\"\n #optionListContainer\n aria-orientation=\"vertical\"\n class=\"option-list\"\n id=\"optionList\"\n role=\"listbox\"\n tabindex=\"0\"\n>\n <ul role=\"presentation\">\n @for (\n item of selectOptionsList();\n track (item.value ?? '') + (item.label ?? '');\n let i = $index;\n let last = $last\n ) {\n <li\n [attr.aria-selected]=\"getSelected(item)\"\n [class.m-0]=\"last\"\n [class.selected]=\"selectionMode() === 'single' ? getSelected(item) : null\"\n [id]=\"'item-' + i\"\n (mousedown)=\"$event.stopImmediatePropagation(); onSelectItem(item)\"\n class=\"item\"\n role=\"option\"\n >\n <input\n [checked]=\"getSelected(item)\"\n [class.d-none]=\"selectionMode() === 'single' || !item?.value\"\n [disabled]=\"true\"\n [id]=\"i + '-' + item.value + '-checkbox'\"\n [name]=\"i + '-' + item.value + '-checkbox'\"\n [ngClass]=\"componentClass()\"\n [value]=\"getSelected(item)\"\n (blur)=\"onBlurHandler($event)\"\n #inputCheckbox\n aria-hidden=\"true\"\n class=\"form-check-input opacity-100\"\n tabindex=\"-1\"\n type=\"checkbox\"\n />\n <label\n [class.ms-3]=\"selectionMode() === 'multiple' && item?.value\"\n [for]=\"i + '-' + item.value + '-checkbox'\"\n class=\"form-check-label checkbox-label w-100 opacity-100\"\n >\n @if (!item.renderer) {\n {{ translateValue() ? (item.label | transloco) : item.label }}\n }\n <ng-container\n [ngTemplateOutlet]=\"item.renderer ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: item, selected: getSelected(item), index: i }\"\n ></ng-container>\n </label>\n </li>\n }\n </ul>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAa,MAAA,MAAM,GAAG,CAAC,MAAc,KAAI;I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BAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAKhD,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAPpC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,mBAAmB,EACpB,OAAA,EAAA,CAAC,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,aAAa,CAAC,EAG3C,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAAA,QAAA,EAAA,2qEAAA,EAAA,MAAA,EAAA,CAAA,k5CAAA,CAAA,EAAA;8BAyOhB,cAAc,EAAA,CAAA;sBAA5C,YAAY;uBAAC,eAAe;;;AEtR/B;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"quang-components-shared.mjs","sources":["../../../projects/quang/components/shared/makeId.ts","../../../projects/quang/components/shared/quang-base-component.directive.ts","../../../projects/quang/components/shared/option-list/option-list.component.ts","../../../projects/quang/components/shared/option-list/option-list.component.html","../../../projects/quang/components/shared/quang-components-shared.ts"],"sourcesContent":["export const makeId = (length: number) => {\n let result = ''\n const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'\n const charactersLength = characters.length\n for (let i = 0; i < length; i++) {\n result += characters.charAt(Math.floor(Math.random() * charactersLength))\n }\n return result\n}\n","import { AfterViewInit, DestroyRef, Directive, Injector, computed, inject, input, output, signal } from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\nimport { ControlValueAccessor, FormControl, NgControl, Validators } from '@angular/forms'\n\nimport { Subscription } from 'rxjs'\n\nimport { ErrorData } from './ErrorData'\nimport { makeId } from './makeId'\n\n@Directive()\nexport abstract class QuangBaseComponent<T = any> implements ControlValueAccessor, AfterViewInit {\n componentId = input<string>(makeId(10))\n\n isReadonly = input<boolean>(false)\n\n isReadonly$ = toObservable(this.isReadonly)\n\n componentTabIndex = input<number>(0)\n\n componentClass = input<string | string[]>('')\n\n componentLabel = input<string>('')\n\n componentPlaceholder = input<string>('')\n\n errorMap = input<ErrorData[]>([])\n\n _errorMessagesByKey = computed(\n () => new Map((this.errorMap() ?? []).map((errorData) => [errorData.error, errorData.message]))\n )\n\n successMessage = input<string>('')\n\n helpMessage = input<string>('')\n\n formControl = input<FormControl>()\n\n componentBlur = output<void>()\n\n _value = signal<T | null>(null)\n\n _isRequired = signal<boolean>(false)\n\n _isDisabled = signal<boolean>(false)\n\n _isTouched = signal<boolean>(false)\n\n _isValid = signal<boolean>(false)\n\n _showSuccess = computed(() => this.successMessage() && this._isValid() && this._isTouched() && !this._isDisabled())\n\n _showErrors = computed(\n () => this.errorMap()?.length > 0 && !this._isValid() && this._isTouched() && !this._isDisabled()\n )\n\n _currentErrorMessage = signal<string>('')\n\n _currentErrorMessageExtraData = signal<Record<string, any>>({})\n\n _ngControl = signal<NgControl | null>(null)\n\n _injector = signal<Injector>(inject(Injector))\n\n _statusChange$?: Subscription\n\n _valueChange$?: Subscription\n\n _eventsChange$?: Subscription\n\n getIsRequiredControl = computed(() => {\n const control = this._ngControl()?.control\n if (!control) {\n return false\n }\n\n return control.hasValidator(Validators.required) || control.hasValidator(Validators.requiredTrue)\n })\n\n onChange?: (value: T) => void\n\n onTouched?: () => void\n\n destroyRef = inject(DestroyRef)\n\n constructor() {\n toObservable(this.formControl)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((form) => {\n if (form) {\n this.setupFormControl()\n }\n })\n }\n\n registerOnChange(fn: (value: T) => void): void {\n this.onChange = fn\n }\n\n writeValue(value: T): void {\n this._value.set(value)\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = () => {\n this._isTouched.set(true)\n fn()\n }\n }\n\n onChangedEventHandler($event: Event) {\n const inputElement = $event.target as HTMLInputElement\n this.onChangedHandler(inputElement.value as T)\n }\n\n onChangedHandler(value: T) {\n this._value.set(value)\n if (this.onChange) {\n this.onChange(value)\n }\n\n if (this.onTouched) {\n this.onTouched()\n }\n }\n\n onBlurHandler() {\n if (this.onTouched) {\n this.onTouched()\n }\n this.componentBlur.emit()\n }\n\n setupFormControl() {\n if (this._statusChange$) {\n this._statusChange$.unsubscribe()\n this._statusChange$ = undefined\n }\n\n if (this._valueChange$) {\n this._valueChange$.unsubscribe()\n this._valueChange$ = undefined\n }\n\n if (this._eventsChange$) {\n this._eventsChange$.unsubscribe()\n this._eventsChange$ = undefined\n }\n\n this._ngControl.set(this._injector().get(NgControl))\n\n const control = this._ngControl()?.control\n\n this._statusChange$ = control?.statusChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.checkFormErrors()\n })\n\n this._valueChange$ = control?.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.checkFormErrors()\n })\n\n // `markAllAsTouched()` updates the control's `touched` state without emitting `statusChanges`.\n // Angular exposes an `events` stream that includes touched/pristine changes.\n this._eventsChange$ = (control as any)?.events?.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n this.checkFormErrors()\n })\n\n this._isTouched.set(!!(control?.touched || control?.dirty))\n this._isDisabled.set(this.isReadonly() || control?.disabled || false)\n this.checkFormErrors()\n }\n\n onChangeIsReadonly = this.isReadonly$.pipe(takeUntilDestroyed()).subscribe((isReadonly: boolean) => {\n this._isDisabled.set(isReadonly || this._ngControl()?.disabled || false)\n })\n\n setDisabledState(isDisabled: boolean) {\n this._isDisabled.set(isDisabled)\n }\n\n checkFormErrors() {\n const control = this._ngControl()?.control\n this._isValid.set(control?.valid ?? false)\n this._isTouched.set(!!(control?.touched || control?.dirty))\n\n this._isRequired.set(\n !!control && (control.hasValidator(Validators.required) || control.hasValidator(Validators.requiredTrue))\n )\n\n const validationErrors = control?.errors\n\n let errorName = ''\n let errorMessage = ''\n let errorData = true\n\n for (const [validationErrorName, validationErrorData] of Object.entries(validationErrors ?? {})) {\n const relatedErrorMessage = this._errorMessagesByKey().get(validationErrorName)\n if (relatedErrorMessage) {\n errorName = validationErrorName\n errorMessage = relatedErrorMessage\n errorData = validationErrorData\n }\n }\n\n this._currentErrorMessage.set(errorMessage)\n this._currentErrorMessageExtraData.set({ [errorName]: errorData })\n }\n\n ngAfterViewInit(): void {\n this.setupFormControl()\n }\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { NgClass, NgStyle, NgTemplateOutlet } from '@angular/common'\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n HostListener,\n type TemplateRef,\n computed,\n effect,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core'\nimport { takeUntilDestroyed, toObservable } from '@angular/core/rxjs-interop'\n\nimport { TranslocoPipe } from '@jsverse/transloco'\nimport { QUANG_LOGGING_BEHAVIOR } from 'quang'\nimport { Subscription, fromEvent } from 'rxjs'\n\nexport interface QuangSelectOptionTemplateContext {\n $implicit: SelectOption\n selected: boolean\n index: number\n}\n\nexport interface SelectOption {\n label: string\n value: string | number | null\n renderer?: TemplateRef<QuangSelectOptionTemplateContext>\n}\n\nexport enum OptionListParentType {\n SELECT = 'select',\n AUTOCOMPLETE = 'autocomplete',\n}\n\n@Component({\n selector: 'quang-option-list',\n imports: [NgStyle, NgClass, NgTemplateOutlet, TranslocoPipe],\n templateUrl: './option-list.component.html',\n styleUrl: './option-list.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class QuangOptionListComponent {\n logLevel = inject(QUANG_LOGGING_BEHAVIOR, { optional: true })\n\n selectionMode = input<'single' | 'multiple'>('single')\n\n optionListMaxHeight = input<string>('201px')\n\n selectOptions = input<SelectOption[]>([])\n\n selectButtonRef = input.required<HTMLButtonElement | HTMLInputElement | HTMLDivElement>()\n\n _value = input<any>()\n\n _isDisabled = input<boolean>()\n\n componentClass = input<string | string[]>('')\n\n componentLabel = input<string>('')\n\n componentTabIndex = input<number>(0)\n\n translateValue = input<boolean>(false)\n\n nullOption = input<boolean>(true)\n\n elementWidth = signal<string>('0px')\n\n elementTop = signal<string>('0px')\n\n elementBottom = signal<string>('0px')\n\n scrollBehaviorOnOpen = input<ScrollBehavior>('smooth')\n\n changedHandler = output<any>()\n\n blurHandler = output<any>()\n\n /** Emitted when user presses Escape - parent should close dropdown and return focus to trigger */\n escapePressed = output<void>()\n\n /** Emitted when user presses Tab - parent should handle focus transition */\n tabPressed = output<{ shiftKey: boolean }>()\n\n optionListContainer = viewChild<ElementRef<HTMLDivElement>>('optionListContainer')\n\n destroyRef = inject(DestroyRef)\n\n parentType = input.required<OptionListParentType>()\n\n parentID = input<string>('')\n\n searchString = signal<string>('')\n\n searchResetTimer: ReturnType<typeof setTimeout> | null = null\n\n selectButtonRef$ = toObservable(this.selectButtonRef)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(() => {\n this.getOptionListWidth()\n this.getOptionListTop()\n this.getScrollParent(this.selectButtonRef())?.addEventListener('scroll', () => {\n this.getOptionListWidth()\n this.getOptionListTop()\n })\n })\n\n selectOptionsList = computed(() => {\n if (this.nullOption() && this.selectionMode() === 'single') {\n return [\n {\n label: '',\n value: null,\n },\n ...this.selectOptions(),\n ]\n }\n return [...this.selectOptions()]\n })\n\n onKeyDown: Subscription | null = null\n\n selectedElementIndex = computed<number>(\n () => this.selectOptionsList()?.findIndex((x) => x?.value === this._value()) ?? 0\n )\n\n /** Signal to track currently focused item index for aria-activedescendant */\n focusedItemIndex = signal<number>(-1)\n\n /**\n * Returns the ID of the currently focused item for aria-activedescendant\n */\n getActiveDescendantId(): string | null {\n const index = this.focusedItemIndex()\n if (index >= 0 && index < this.selectOptionsList().length) {\n return `item-${index}`\n }\n return null\n }\n\n optionList$ = effect(() => {\n const optionListContainer = this.optionListContainer()\n const parentType = this.parentType()\n\n // Focus the option list container when opened (only for SELECT)\n if (optionListContainer && parentType === OptionListParentType.SELECT) {\n optionListContainer?.nativeElement.focus()\n }\n\n const ul = optionListContainer?.nativeElement?.children[0] as HTMLUListElement | undefined\n const listItems = (ul?.children ?? []) as HTMLLIElement[]\n let currentIndex = this.selectedElementIndex()\n listItems?.[currentIndex]?.classList.add('selected')\n // Initialize focusedItemIndex with current selection\n this.focusedItemIndex.set(currentIndex)\n\n // Scroll to selected item when option list opens\n const listItem = listItems[currentIndex]\n if (listItem) {\n setTimeout(() => {\n listItem.scrollIntoView({ behavior: this.scrollBehaviorOnOpen(), block: 'nearest' })\n }, 0)\n }\n\n if (this.onKeyDown) {\n this.onKeyDown.unsubscribe()\n }\n\n this.onKeyDown = fromEvent(document, 'keydown', {\n capture: true,\n })\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((event) => {\n switch ((event as KeyboardEvent).key) {\n case 'ArrowDown': {\n if (this.parentType() === OptionListParentType.AUTOCOMPLETE) optionListContainer?.nativeElement.focus()\n if (currentIndex !== this.selectedElementIndex()) listItems[currentIndex]?.classList.remove('selected')\n if (currentIndex === listItems.length - 1) {\n currentIndex = listItems.length - 1\n } else {\n currentIndex += 1\n }\n event.preventDefault()\n\n listItems[currentIndex]?.classList.add('selected')\n // Scroll item into view if not visible\n listItems[currentIndex]?.scrollIntoView({ behavior: 'smooth', block: 'nearest' })\n // Update focusedItemIndex for aria-activedescendant\n this.focusedItemIndex.set(currentIndex)\n break\n }\n case 'ArrowUp': {\n if (this.parentType() === OptionListParentType.AUTOCOMPLETE) optionListContainer?.nativeElement.focus()\n if (currentIndex !== this.selectedElementIndex()) listItems[currentIndex]?.classList.remove('selected')\n if (currentIndex !== 0) currentIndex -= 1\n event.preventDefault()\n\n listItems[currentIndex]?.classList.add('selected')\n // Scroll item into view if not visible\n listItems[currentIndex]?.scrollIntoView({ behavior: 'smooth', block: 'nearest' })\n // Update focusedItemIndex for aria-activedescendant\n this.focusedItemIndex.set(currentIndex)\n break\n }\n case 'Enter': {\n event.preventDefault()\n this.onSelectItem(this.selectOptionsList()[currentIndex])\n break\n }\n case 'Escape': {\n event.preventDefault()\n this.escapePressed.emit()\n break\n }\n case 'Tab': {\n // Only handle Tab when focus is on the option list itself\n // If focus is on the parent input, let the input's blur handler deal with it\n if (document.activeElement?.id === optionListContainer?.nativeElement?.id) {\n // Allow Tab to close dropdown and move focus naturally\n // Emit event so parent can handle focus transition\n this.tabPressed.emit({ shiftKey: (event as KeyboardEvent).shiftKey })\n }\n break\n }\n default: {\n if (\n ((event as KeyboardEvent)?.key?.length === 1 || (event as KeyboardEvent)?.key === 'Backspace') &&\n this.parentType() === OptionListParentType.AUTOCOMPLETE &&\n document.activeElement?.id === optionListContainer?.nativeElement?.id\n ) {\n currentIndex = 0\n document.getElementById(this.parentID())?.focus()\n document.getElementById(this.parentID())?.click()\n } else if (\n (event as KeyboardEvent)?.key?.length === 1 &&\n this.parentType() === OptionListParentType.SELECT\n ) {\n const key = (event as KeyboardEvent).key\n currentIndex = this.handleSearch(key, listItems, currentIndex)\n event.preventDefault()\n }\n break\n }\n }\n })\n })\n\n handleSearch(key: string, listItems: HTMLLIElement[], currentIndex: number): number {\n if (this.searchResetTimer) {\n clearTimeout(this.searchResetTimer)\n }\n\n this.searchString.update((current) => current + key)\n\n this.searchResetTimer = setTimeout(() => {\n this.searchString.set('')\n this.searchResetTimer = null\n }, 500)\n\n const searchStr = this.searchString().toLowerCase()\n const matchIndex = this.selectOptionsList().findIndex((option) => option.label.toLowerCase().includes(searchStr))\n\n if (matchIndex !== -1 && matchIndex !== currentIndex) {\n listItems[currentIndex]?.classList.remove('selected')\n listItems[matchIndex]?.classList.add('selected')\n listItems[matchIndex]?.scrollIntoView({ behavior: this.scrollBehaviorOnOpen() })\n return matchIndex\n }\n\n return currentIndex\n }\n\n @HostListener('window:scroll') changePosition() {\n this.getOptionListWidth()\n this.getOptionListTop()\n }\n\n isScrollable(ele: Element): boolean {\n if (!ele) return false\n\n let result = false\n\n try {\n const hasScrollableContent = ele.scrollHeight > ele.clientHeight\n\n const overflowYStyle = window.getComputedStyle(ele).overflowY\n const isOverflowHidden = overflowYStyle.includes('hidden')\n\n result = hasScrollableContent && !isOverflowHidden\n } catch (_error) {\n if (this.logLevel === 'verbose') console.error('captured error isScrollable', _error)\n }\n\n return result\n }\n\n getScrollParent(node: unknown): Element {\n if (!node || node === document.body || !(node instanceof Element)) return document.body\n return this.isScrollable(node) ? node : this.getScrollParent(node.parentNode)\n }\n\n onSelectItem(item: SelectOption | null): void {\n if (this.selectionMode() === 'single') {\n this.changedHandler.emit(item?.value ?? null)\n } else {\n let targetValue = this._value()\n if (!Array.isArray(targetValue) && targetValue) {\n targetValue = [targetValue]\n }\n const values: string[] | number[] | null = targetValue as string[] | number[] | null\n if (values) {\n if (values.some((x) => x === item?.value)) {\n this.changedHandler.emit(values.filter((x) => x !== item?.value) as string[] | number[])\n } else if (item) {\n this.changedHandler.emit([...values, item.value] as string[] | number[])\n } else {\n this.changedHandler.emit([...values] as string[] | number[])\n }\n } else if (item?.value) {\n this.changedHandler.emit([item.value] as string[] | number[])\n } else {\n this.changedHandler.emit(null)\n }\n }\n this.getOptionListTop()\n }\n\n getSelected(item: SelectOption): boolean {\n if (this.selectionMode() === 'single' || !Array.isArray(this._value())) {\n return this._value() === item.value\n }\n return this._value()?.some((x: number | string | null) => x === item?.value)\n }\n\n onBlurHandler(e: Event): void {\n this.blurHandler.emit(e)\n }\n\n getOptionListWidth() {\n this.elementWidth.set(`${this.selectButtonRef()?.offsetWidth}px`)\n }\n\n getOptionListTop() {\n const nativeElement = this.optionListContainer()?.nativeElement\n const diff =\n window.innerHeight -\n (nativeElement?.getBoundingClientRect()?.height ?? 0) -\n (this.selectButtonRef()?.getBoundingClientRect()?.top ?? 0) -\n (this.selectButtonRef()?.getBoundingClientRect()?.height ?? 0)\n let topValue = 'unset'\n let bottomValue = 'unset'\n const isTop = diff >= 0\n if (isTop) {\n topValue = `${(this.selectButtonRef()?.getBoundingClientRect()?.top ?? 0) + (this.selectButtonRef()?.getBoundingClientRect()?.height ?? 0)}px`\n } else {\n bottomValue = `${window.innerHeight - (this.selectButtonRef()?.getBoundingClientRect()?.bottom ?? 0) + (this.selectButtonRef()?.getBoundingClientRect()?.height ?? 0)}px`\n }\n nativeElement?.classList.toggle('option-list-top', !isTop)\n this.elementTop.set(topValue)\n this.elementBottom.set(bottomValue)\n setTimeout(() => {\n this.getOptionListTop()\n })\n }\n}\n","<div\n [attr.aria-activedescendant]=\"getActiveDescendantId()\"\n [attr.aria-label]=\"componentLabel()\"\n [ngStyle]=\"{\n 'max-height': optionListMaxHeight(),\n '--option-list-width': elementWidth(),\n '--option-list-top': elementTop(),\n '--option-list-bottom': elementBottom(),\n }\"\n (blur)=\"onBlurHandler($event)\"\n #optionListContainer\n aria-orientation=\"vertical\"\n class=\"option-list\"\n id=\"optionList\"\n role=\"listbox\"\n tabindex=\"0\"\n>\n <ul role=\"presentation\">\n @for (\n item of selectOptionsList();\n track (item.value ?? '') + (item.label ?? '');\n let i = $index;\n let last = $last\n ) {\n <li\n [attr.aria-selected]=\"getSelected(item)\"\n [class.m-0]=\"last\"\n [class.selected]=\"selectionMode() === 'single' ? getSelected(item) : null\"\n [id]=\"'item-' + i\"\n (mousedown)=\"$event.stopImmediatePropagation(); onSelectItem(item)\"\n class=\"item\"\n role=\"option\"\n >\n <input\n [checked]=\"getSelected(item)\"\n [class.d-none]=\"selectionMode() === 'single' || !item?.value\"\n [disabled]=\"true\"\n [id]=\"i + '-' + item.value + '-checkbox'\"\n [name]=\"i + '-' + item.value + '-checkbox'\"\n [ngClass]=\"componentClass()\"\n [value]=\"getSelected(item)\"\n (blur)=\"onBlurHandler($event)\"\n #inputCheckbox\n aria-hidden=\"true\"\n class=\"form-check-input opacity-100\"\n tabindex=\"-1\"\n type=\"checkbox\"\n />\n <label\n [class.ms-3]=\"selectionMode() === 'multiple' && item?.value\"\n [for]=\"i + '-' + item.value + '-checkbox'\"\n class=\"form-check-label checkbox-label w-100 opacity-100\"\n >\n @if (!item.renderer) {\n {{ translateValue() ? (item.label | transloco) : item.label }}\n }\n <ng-container\n [ngTemplateOutlet]=\"item.renderer ?? null\"\n [ngTemplateOutletContext]=\"{ $implicit: item, selected: getSelected(item), index: i }\"\n ></ng-container>\n </label>\n </li>\n }\n </ul>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAAa,MAAA,MAAM,GAAG,CAAC,MAAc,KAAI;IACvC,IAAI,MAAM,GAAG,EAAE;IACf,MAAM,UAAU,GAAG,gEAAgE;AACnF,IAAA,MAAM,gBAAgB,GAAG,UAAU,CAAC,MAAM;AAC1C,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE;AAC/B,QAAA,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,gBAAgB,CAAC,CAAC;;AAE3E,IAAA,OAAO,MAAM;AACf;;MCEsB,kBAAkB,CAAA;AA0EtC,IAAA,WAAA,GAAA;QAzEA,IAAW,CAAA,WAAA,GAAG,KAAK,CAAS,MAAM,CAAC,EAAE,CAAC,CAAC;AAEvC,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAU,KAAK,CAAC;AAElC,QAAA,IAAA,CAAA,WAAW,GAAG,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC;AAE3C,QAAA,IAAA,CAAA,iBAAiB,GAAG,KAAK,CAAS,CAAC,CAAC;AAEpC,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAoB,EAAE,CAAC;AAE7C,QAAA,IAAA,CAAA,cAAc,GAAG,KAAK,CAAS,EAAE,CAAC;AAElC,QAAA,IAAA,CAAA,oBAAoB,GAAG,KAAK,CAAS,EAAE,CAAC;AAExC,QAAA,IAAA,CAAA,QAA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types": "./auth/index.d.ts",
|
|
68
68
|
"default": "./fesm2022/quang-auth.mjs"
|
|
69
69
|
},
|
|
70
|
+
"./data-handling": {
|
|
71
|
+
"types": "./data-handling/index.d.ts",
|
|
72
|
+
"default": "./fesm2022/quang-data-handling.mjs"
|
|
73
|
+
},
|
|
70
74
|
"./forms": {
|
|
71
75
|
"types": "./forms/index.d.ts",
|
|
72
76
|
"default": "./fesm2022/quang-forms.mjs"
|
|
@@ -75,10 +79,6 @@
|
|
|
75
79
|
"types": "./device/index.d.ts",
|
|
76
80
|
"default": "./fesm2022/quang-device.mjs"
|
|
77
81
|
},
|
|
78
|
-
"./data-handling": {
|
|
79
|
-
"types": "./data-handling/index.d.ts",
|
|
80
|
-
"default": "./fesm2022/quang-data-handling.mjs"
|
|
81
|
-
},
|
|
82
82
|
"./loader": {
|
|
83
83
|
"types": "./loader/index.d.ts",
|
|
84
84
|
"default": "./fesm2022/quang-loader.mjs"
|
|
@@ -87,29 +87,37 @@
|
|
|
87
87
|
"types": "./shared/index.d.ts",
|
|
88
88
|
"default": "./fesm2022/quang-shared.mjs"
|
|
89
89
|
},
|
|
90
|
-
"./translation": {
|
|
91
|
-
"types": "./translation/index.d.ts",
|
|
92
|
-
"default": "./fesm2022/quang-translation.mjs"
|
|
93
|
-
},
|
|
94
90
|
"./auth/mobile": {
|
|
95
91
|
"types": "./auth/mobile/index.d.ts",
|
|
96
92
|
"default": "./fesm2022/quang-auth-mobile.mjs"
|
|
97
93
|
},
|
|
94
|
+
"./translation": {
|
|
95
|
+
"types": "./translation/index.d.ts",
|
|
96
|
+
"default": "./fesm2022/quang-translation.mjs"
|
|
97
|
+
},
|
|
98
98
|
"./components/autocomplete": {
|
|
99
99
|
"types": "./components/autocomplete/index.d.ts",
|
|
100
100
|
"default": "./fesm2022/quang-components-autocomplete.mjs"
|
|
101
101
|
},
|
|
102
|
-
"./components/
|
|
103
|
-
"types": "./components/
|
|
104
|
-
"default": "./fesm2022/quang-components-
|
|
102
|
+
"./components/input": {
|
|
103
|
+
"types": "./components/input/index.d.ts",
|
|
104
|
+
"default": "./fesm2022/quang-components-input.mjs"
|
|
105
105
|
},
|
|
106
106
|
"./components/date": {
|
|
107
107
|
"types": "./components/date/index.d.ts",
|
|
108
108
|
"default": "./fesm2022/quang-components-date.mjs"
|
|
109
109
|
},
|
|
110
|
-
"./components/
|
|
111
|
-
"types": "./components/
|
|
112
|
-
"default": "./fesm2022/quang-components-
|
|
110
|
+
"./components/radio-group": {
|
|
111
|
+
"types": "./components/radio-group/index.d.ts",
|
|
112
|
+
"default": "./fesm2022/quang-components-radio-group.mjs"
|
|
113
|
+
},
|
|
114
|
+
"./components/shared": {
|
|
115
|
+
"types": "./components/shared/index.d.ts",
|
|
116
|
+
"default": "./fesm2022/quang-components-shared.mjs"
|
|
117
|
+
},
|
|
118
|
+
"./components/checkbox": {
|
|
119
|
+
"types": "./components/checkbox/index.d.ts",
|
|
120
|
+
"default": "./fesm2022/quang-components-checkbox.mjs"
|
|
113
121
|
},
|
|
114
122
|
"./components/paginator": {
|
|
115
123
|
"types": "./components/paginator/index.d.ts",
|
|
@@ -123,37 +131,29 @@
|
|
|
123
131
|
"types": "./components/table/index.d.ts",
|
|
124
132
|
"default": "./fesm2022/quang-components-table.mjs"
|
|
125
133
|
},
|
|
126
|
-
"./components/shared": {
|
|
127
|
-
"types": "./components/shared/index.d.ts",
|
|
128
|
-
"default": "./fesm2022/quang-components-shared.mjs"
|
|
129
|
-
},
|
|
130
134
|
"./components/wysiwyg": {
|
|
131
135
|
"types": "./components/wysiwyg/index.d.ts",
|
|
132
136
|
"default": "./fesm2022/quang-components-wysiwyg.mjs"
|
|
133
137
|
},
|
|
134
|
-
"./overlay/
|
|
135
|
-
"types": "./overlay/
|
|
136
|
-
"default": "./fesm2022/quang-overlay-
|
|
137
|
-
},
|
|
138
|
-
"./components/radio-group": {
|
|
139
|
-
"types": "./components/radio-group/index.d.ts",
|
|
140
|
-
"default": "./fesm2022/quang-components-radio-group.mjs"
|
|
138
|
+
"./overlay/shared": {
|
|
139
|
+
"types": "./overlay/shared/index.d.ts",
|
|
140
|
+
"default": "./fesm2022/quang-overlay-shared.mjs"
|
|
141
141
|
},
|
|
142
142
|
"./overlay/popover": {
|
|
143
143
|
"types": "./overlay/popover/index.d.ts",
|
|
144
144
|
"default": "./fesm2022/quang-overlay-popover.mjs"
|
|
145
145
|
},
|
|
146
|
-
"./overlay/
|
|
147
|
-
"types": "./overlay/
|
|
148
|
-
"default": "./fesm2022/quang-overlay-
|
|
149
|
-
},
|
|
150
|
-
"./overlay/toast": {
|
|
151
|
-
"types": "./overlay/toast/index.d.ts",
|
|
152
|
-
"default": "./fesm2022/quang-overlay-toast.mjs"
|
|
146
|
+
"./overlay/modal": {
|
|
147
|
+
"types": "./overlay/modal/index.d.ts",
|
|
148
|
+
"default": "./fesm2022/quang-overlay-modal.mjs"
|
|
153
149
|
},
|
|
154
150
|
"./overlay/tooltip": {
|
|
155
151
|
"types": "./overlay/tooltip/index.d.ts",
|
|
156
152
|
"default": "./fesm2022/quang-overlay-tooltip.mjs"
|
|
153
|
+
},
|
|
154
|
+
"./overlay/toast": {
|
|
155
|
+
"types": "./overlay/toast/index.d.ts",
|
|
156
|
+
"default": "./fesm2022/quang-overlay-toast.mjs"
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
}
|