@arsedizioni/ars-utils 22.5.38 → 22.5.39
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/README.md +185 -179
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +15 -15
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +44 -43
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.date.mjs +6 -6
- package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +3 -3
- package/fesm2022/arsedizioni-ars-utils-core.mjs +48 -48
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +42 -42
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +15 -15
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +9 -9
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs +118 -0
- package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +17 -448
- package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs +368 -0
- package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs.map +1 -0
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +18 -18
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +12 -12
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +10 -10
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +12 -12
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +12 -12
- package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +3 -3
- package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +9 -9
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +61 -61
- package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +3 -3
- package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +6 -6
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +6 -6
- package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +3 -3
- package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +9 -9
- package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +9 -9
- package/package.json +9 -1
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +3 -2
- package/types/arsedizioni-ars-utils-ui.controls.d.ts +3 -180
- package/types/arsedizioni-ars-utils-ui.controls.date.d.ts +49 -0
- package/types/arsedizioni-ars-utils-ui.controls.tree.d.ts +136 -0
- package/types/arsedizioni-ars-utils-ui.navigation.d.ts +1 -1
|
@@ -851,10 +851,10 @@ class CoreService {
|
|
|
851
851
|
sessionStorage.removeItem('evolution_client_id');
|
|
852
852
|
this.reset();
|
|
853
853
|
}
|
|
854
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
855
|
-
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.
|
|
854
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CoreService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
|
|
855
|
+
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.4", ngImport: i0, type: CoreService }); }
|
|
856
856
|
}
|
|
857
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
857
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CoreService, decorators: [{
|
|
858
858
|
type: Service
|
|
859
859
|
}] });
|
|
860
860
|
|
|
@@ -1219,10 +1219,10 @@ class LoginService {
|
|
|
1219
1219
|
this.broadcastService.sendMessage(EvolutionMessages.LOGIN_COMPLETED);
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
1223
|
-
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.
|
|
1222
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: LoginService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
|
|
1223
|
+
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.4", ngImport: i0, type: LoginService }); }
|
|
1224
1224
|
}
|
|
1225
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
1225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: LoginService, decorators: [{
|
|
1226
1226
|
type: Service
|
|
1227
1227
|
}] });
|
|
1228
1228
|
|
|
@@ -1310,10 +1310,10 @@ class ComplianceService {
|
|
|
1310
1310
|
addActivities(params) {
|
|
1311
1311
|
return this.httpClient.post(this.core.serviceUri + '/compliance/activities/add', params);
|
|
1312
1312
|
}
|
|
1313
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
1314
|
-
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.
|
|
1313
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ComplianceService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
|
|
1314
|
+
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.4", ngImport: i0, type: ComplianceService }); }
|
|
1315
1315
|
}
|
|
1316
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
1316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: ComplianceService, decorators: [{
|
|
1317
1317
|
type: Service
|
|
1318
1318
|
}] });
|
|
1319
1319
|
|
|
@@ -1383,10 +1383,10 @@ class AccountService {
|
|
|
1383
1383
|
refreshLicence() {
|
|
1384
1384
|
return this.httpClient.get(this.core.serviceUri + '/account/licenses/refresh/' + (this.core.user?.userId ?? -1));
|
|
1385
1385
|
}
|
|
1386
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
1387
|
-
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.
|
|
1386
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: AccountService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
|
|
1387
|
+
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.4", ngImport: i0, type: AccountService }); }
|
|
1388
1388
|
}
|
|
1389
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
1389
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: AccountService, decorators: [{
|
|
1390
1390
|
type: Service
|
|
1391
1391
|
}] });
|
|
1392
1392
|
|
|
@@ -1460,10 +1460,10 @@ class EvolutionService {
|
|
|
1460
1460
|
* @returns void
|
|
1461
1461
|
*/
|
|
1462
1462
|
ping() { this.session.ping(); }
|
|
1463
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
1464
|
-
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.
|
|
1463
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: EvolutionService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
|
|
1464
|
+
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.4", ngImport: i0, type: EvolutionService }); }
|
|
1465
1465
|
}
|
|
1466
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
1466
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: EvolutionService, decorators: [{
|
|
1467
1467
|
type: Service
|
|
1468
1468
|
}] });
|
|
1469
1469
|
|
|
@@ -106,10 +106,10 @@ class CoreService {
|
|
|
106
106
|
setProductModules(productModules) {
|
|
107
107
|
this._productModules = productModules;
|
|
108
108
|
}
|
|
109
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
110
|
-
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.
|
|
109
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CoreService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
|
|
110
|
+
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.4", ngImport: i0, type: CoreService }); }
|
|
111
111
|
}
|
|
112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CoreService, decorators: [{
|
|
113
113
|
type: Service
|
|
114
114
|
}] });
|
|
115
115
|
|
|
@@ -203,10 +203,10 @@ class NotificationsService {
|
|
|
203
203
|
downloadNotificationDocument(documentId) {
|
|
204
204
|
return this.httpClient.get(this.core.serviceUri + '/documents/download/' + documentId, { responseType: 'blob' });
|
|
205
205
|
}
|
|
206
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
207
|
-
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.
|
|
206
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NotificationsService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
|
|
207
|
+
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.4", ngImport: i0, type: NotificationsService }); }
|
|
208
208
|
}
|
|
209
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
209
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: NotificationsService, decorators: [{
|
|
210
210
|
type: Service
|
|
211
211
|
}] });
|
|
212
212
|
|
|
@@ -266,10 +266,10 @@ class SupportService {
|
|
|
266
266
|
this.core.setProducts(products);
|
|
267
267
|
this.core.setProductModules(productModules);
|
|
268
268
|
}
|
|
269
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.
|
|
270
|
-
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.
|
|
269
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: SupportService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
|
|
270
|
+
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.4", ngImport: i0, type: SupportService }); }
|
|
271
271
|
}
|
|
272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.
|
|
272
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: SupportService, decorators: [{
|
|
273
273
|
type: Service
|
|
274
274
|
}] });
|
|
275
275
|
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, DestroyRef, ChangeDetectorRef, ChangeDetectionStrategy, Component, HostListener, Directive } from '@angular/core';
|
|
3
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { MatCalendar, MatDatepickerInput, MatStartDate, MatEndDate } from '@angular/material/datepicker';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A blank calendar header that hides the month/year navigation controls.
|
|
8
|
+
* Used when an inline calendar should render without any navigation UI.
|
|
9
|
+
*/
|
|
10
|
+
class CalendarEmptyHeader {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.destroyRef = inject(DestroyRef);
|
|
13
|
+
this.calendar = inject((MatCalendar));
|
|
14
|
+
this.changeDetector = inject(ChangeDetectorRef);
|
|
15
|
+
// Re-run change detection whenever the calendar's internal state changes
|
|
16
|
+
// (e.g. active date, selected date) so the blank header stays in sync.
|
|
17
|
+
this.calendar.stateChanges
|
|
18
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
19
|
+
.subscribe(() => this.changeDetector.markForCheck());
|
|
20
|
+
}
|
|
21
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CalendarEmptyHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
22
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.4", type: CalendarEmptyHeader, isStandalone: true, selector: "ng-component", ngImport: i0, template: '<div></div>', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
23
|
+
}
|
|
24
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: CalendarEmptyHeader, decorators: [{
|
|
25
|
+
type: Component,
|
|
26
|
+
args: [{
|
|
27
|
+
template: '<div></div>',
|
|
28
|
+
standalone: true,
|
|
29
|
+
changeDetection: ChangeDetectionStrategy.OnPush
|
|
30
|
+
}]
|
|
31
|
+
}], ctorParameters: () => [] });
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Works around a MatDatepicker/Signal Forms interop bug.
|
|
35
|
+
*
|
|
36
|
+
* `MatDatepickerInputBase._onInput()` only notifies its registered validator-change
|
|
37
|
+
* callback from the branch it does not take when the parsed date is null. Signal
|
|
38
|
+
* Forms recomputes CVA parse errors from that callback or from a model value
|
|
39
|
+
* change, and neither happens while the user erases an unparseable date one
|
|
40
|
+
* character at a time (the model is already `null`, so the signal write is a
|
|
41
|
+
* no-op). The stale `matDatepickerParse` error therefore survives on an empty
|
|
42
|
+
* field. Notifying on every keystroke re-runs the datepicker validators.
|
|
43
|
+
*/
|
|
44
|
+
class MatDatepickerParseErrorFixDirective {
|
|
45
|
+
constructor() {
|
|
46
|
+
this.singleDate = inject(MatDatepickerInput, {
|
|
47
|
+
optional: true,
|
|
48
|
+
self: true,
|
|
49
|
+
});
|
|
50
|
+
this.startDate = inject(MatStartDate, {
|
|
51
|
+
optional: true,
|
|
52
|
+
self: true,
|
|
53
|
+
});
|
|
54
|
+
this.endDate = inject(MatEndDate, {
|
|
55
|
+
optional: true,
|
|
56
|
+
self: true,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Re-runs the datepicker validators after Material has updated its internal
|
|
61
|
+
* parse flag.
|
|
62
|
+
*
|
|
63
|
+
* @returns Nothing.
|
|
64
|
+
*/
|
|
65
|
+
onInput() {
|
|
66
|
+
// Deferred: Material updates `_lastValueValid` in its own `input` host
|
|
67
|
+
// listener, and host listener order across directives is not guaranteed.
|
|
68
|
+
queueMicrotask(() => this.revalidate());
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Notifies the validator-change callback of this input and, for range parts,
|
|
72
|
+
* of the sibling input as well.
|
|
73
|
+
*
|
|
74
|
+
* @returns Nothing.
|
|
75
|
+
*/
|
|
76
|
+
revalidate() {
|
|
77
|
+
const host = this.singleDate ?? this.startDate ?? this.endDate;
|
|
78
|
+
if (!host) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
host._validatorOnChange();
|
|
82
|
+
const rangePart = this.startDate ?? this.endDate;
|
|
83
|
+
if (!rangePart) {
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
const rangeInput = rangePart._rangeInput;
|
|
87
|
+
const sibling = this.startDate ? rangeInput._endInput : rangeInput._startInput;
|
|
88
|
+
sibling?._validatorOnChange();
|
|
89
|
+
}
|
|
90
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: MatDatepickerParseErrorFixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
91
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.4", type: MatDatepickerParseErrorFixDirective, isStandalone: true, selector: "input[matDatepicker], input[matStartDate], input[matEndDate]", host: { listeners: { "input": "onInput()" } }, ngImport: i0 }); }
|
|
92
|
+
}
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.4", ngImport: i0, type: MatDatepickerParseErrorFixDirective, decorators: [{
|
|
94
|
+
type: Directive,
|
|
95
|
+
args: [{
|
|
96
|
+
selector: 'input[matDatepicker], input[matStartDate], input[matEndDate]',
|
|
97
|
+
}]
|
|
98
|
+
}], propDecorators: { onInput: [{
|
|
99
|
+
type: HostListener,
|
|
100
|
+
args: ['input']
|
|
101
|
+
}] } });
|
|
102
|
+
|
|
103
|
+
/*
|
|
104
|
+
* Public API Surface of @arsedizioni/ars-utils/ui.controls.date
|
|
105
|
+
*
|
|
106
|
+
* Everything that touches `@angular/material/datepicker`. Kept OUT of `ui.controls` on purpose:
|
|
107
|
+
* `MatDatepickerParseErrorFixDirective` is twenty lines, but `ui.controls` is a single file in the
|
|
108
|
+
* published bundle, so any of its symbols that survives tree-shaking shares the chunk placement of
|
|
109
|
+
* all the others. `ui.dialogs.prompt` needs only this directive, and must not link the file that
|
|
110
|
+
* carries `mat-chips` with it.
|
|
111
|
+
*/
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Generated bundle index. Do not edit.
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
export { CalendarEmptyHeader, MatDatepickerParseErrorFixDirective };
|
|
118
|
+
//# sourceMappingURL=arsedizioni-ars-utils-ui.controls.date.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"arsedizioni-ars-utils-ui.controls.date.mjs","sources":["../../../projects/ars-utils/ui.controls.date/calendar-empty-header/calendar-empy-header.component.ts","../../../projects/ars-utils/ui.controls.date/date-picker/datepicker-fix.directive.ts","../../../projects/ars-utils/ui.controls.date/public_api.ts","../../../projects/ars-utils/ui.controls.date/arsedizioni-ars-utils-ui.controls.date.ts"],"sourcesContent":["import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, inject } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { MatCalendar } from '@angular/material/datepicker';\r\n\r\n/**\r\n * A blank calendar header that hides the month/year navigation controls.\r\n * Used when an inline calendar should render without any navigation UI.\r\n */\r\n@Component({\r\n template: '<div></div>',\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush\r\n})\r\nexport class CalendarEmptyHeader<D> {\r\n private readonly destroyRef = inject(DestroyRef);\r\n private readonly calendar = inject(MatCalendar<D>);\r\n private readonly changeDetector = inject(ChangeDetectorRef);\r\n\r\n constructor() {\r\n // Re-run change detection whenever the calendar's internal state changes\r\n // (e.g. active date, selected date) so the blank header stays in sync.\r\n this.calendar.stateChanges\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe(() => this.changeDetector.markForCheck());\r\n }\r\n}\r\n","import { Directive, HostListener, inject } from '@angular/core';\r\nimport { MatDatepickerInput, MatEndDate, MatStartDate } from '@angular/material/datepicker';\r\n\r\n/** Callback Material date inputs expose so their validators can be re-run on demand. */\r\ninterface RevalidatableDateInput {\r\n _validatorOnChange: () => void;\r\n}\r\n\r\n/**\r\n * Works around a MatDatepicker/Signal Forms interop bug.\r\n *\r\n * `MatDatepickerInputBase._onInput()` only notifies its registered validator-change\r\n * callback from the branch it does not take when the parsed date is null. Signal\r\n * Forms recomputes CVA parse errors from that callback or from a model value\r\n * change, and neither happens while the user erases an unparseable date one\r\n * character at a time (the model is already `null`, so the signal write is a\r\n * no-op). The stale `matDatepickerParse` error therefore survives on an empty\r\n * field. Notifying on every keystroke re-runs the datepicker validators.\r\n */\r\n@Directive({\r\n selector: 'input[matDatepicker], input[matStartDate], input[matEndDate]',\r\n})\r\nexport class MatDatepickerParseErrorFixDirective {\r\n private readonly singleDate = inject<MatDatepickerInput<unknown>>(MatDatepickerInput, {\r\n optional: true,\r\n self: true,\r\n });\r\n private readonly startDate = inject<MatStartDate<unknown>>(MatStartDate, {\r\n optional: true,\r\n self: true,\r\n });\r\n private readonly endDate = inject<MatEndDate<unknown>>(MatEndDate, {\r\n optional: true,\r\n self: true,\r\n });\r\n\r\n /**\r\n * Re-runs the datepicker validators after Material has updated its internal\r\n * parse flag.\r\n *\r\n * @returns Nothing.\r\n */\r\n @HostListener('input')\r\n protected onInput(): void {\r\n // Deferred: Material updates `_lastValueValid` in its own `input` host\r\n // listener, and host listener order across directives is not guaranteed.\r\n queueMicrotask(() => this.revalidate());\r\n }\r\n\r\n /**\r\n * Notifies the validator-change callback of this input and, for range parts,\r\n * of the sibling input as well.\r\n *\r\n * @returns Nothing.\r\n */\r\n private revalidate(): void {\r\n const host = this.singleDate ?? this.startDate ?? this.endDate;\r\n if (!host) {\r\n return;\r\n }\r\n (host as unknown as RevalidatableDateInput)._validatorOnChange();\r\n\r\n const rangePart = this.startDate ?? this.endDate;\r\n if (!rangePart) {\r\n return;\r\n }\r\n const rangeInput = rangePart._rangeInput;\r\n const sibling = this.startDate ? rangeInput._endInput : rangeInput._startInput;\r\n (sibling as unknown as RevalidatableDateInput | undefined)?._validatorOnChange();\r\n }\r\n}","/*\n * Public API Surface of @arsedizioni/ars-utils/ui.controls.date\n *\n * Everything that touches `@angular/material/datepicker`. Kept OUT of `ui.controls` on purpose:\n * `MatDatepickerParseErrorFixDirective` is twenty lines, but `ui.controls` is a single file in the\n * published bundle, so any of its symbols that survives tree-shaking shares the chunk placement of\n * all the others. `ui.dialogs.prompt` needs only this directive, and must not link the file that\n * carries `mat-chips` with it.\n */\nexport * from './calendar-empty-header/calendar-empy-header.component';\nexport * from './date-picker/datepicker-fix.directive';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAIA;;;AAGG;MAMU,mBAAmB,CAAA;AAK9B,IAAA,WAAA,GAAA;AAJiB,QAAA,IAAA,CAAA,UAAU,GAAO,MAAM,CAAC,UAAU,CAAC;AACnC,QAAA,IAAA,CAAA,QAAQ,GAAS,MAAM,EAAC,WAAc,EAAC;AACvC,QAAA,IAAA,CAAA,cAAc,GAAG,MAAM,CAAC,iBAAiB,CAAC;;;QAKzD,IAAI,CAAC,QAAQ,CAAC;AACX,aAAA,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,UAAU,CAAC;aACxC,SAAS,CAAC,MAAM,IAAI,CAAC,cAAc,CAAC,YAAY,EAAE,CAAC;IACxD;8GAXW,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,wEAJlB,aAAa,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAId,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,SAAS;AAAC,YA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