@arsedizioni/ars-utils 22.6.86 → 22.6.88

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +3158 -3344
  2. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
  3. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +7616 -4772
  4. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
  5. package/fesm2022/arsedizioni-ars-utils-core.date.mjs +321 -702
  6. package/fesm2022/arsedizioni-ars-utils-core.date.mjs.map +1 -1
  7. package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +445 -590
  8. package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs.map +1 -1
  9. package/fesm2022/arsedizioni-ars-utils-core.mjs +1735 -2370
  10. package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
  11. package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +1280 -1470
  12. package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
  13. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1097 -1528
  14. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
  15. package/fesm2022/arsedizioni-ars-utils-support.common.mjs +198 -294
  16. package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
  17. package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs +115 -117
  18. package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs.map +1 -1
  19. package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +1607 -613
  20. package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -1
  21. package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs +840 -367
  22. package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs.map +1 -1
  23. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +1634 -651
  24. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -1
  25. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +1255 -792
  26. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -1
  27. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +1410 -357
  28. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
  29. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +2401 -944
  30. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -1
  31. package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +1553 -741
  32. package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -1
  33. package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +901 -430
  34. package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -1
  35. package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +737 -530
  36. package/fesm2022/arsedizioni-ars-utils-ui.help.mjs.map +1 -1
  37. package/fesm2022/arsedizioni-ars-utils-ui.mjs +6638 -1755
  38. package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
  39. package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +1479 -1207
  40. package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -1
  41. package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +1003 -270
  42. package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -1
  43. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +497 -278
  44. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
  45. package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +48 -52
  46. package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs.map +1 -1
  47. package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +464 -704
  48. package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -1
  49. package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +724 -657
  50. package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -1
  51. package/fesm2022/arsedizioni-ars-utils.mjs +3 -19
  52. package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
  53. package/package.json +1 -1
  54. package/types/arsedizioni-ars-utils-clipper.common.d.ts +1151 -1163
  55. package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1588 -1426
  56. package/types/arsedizioni-ars-utils-core.d.ts +1169 -1172
  57. package/types/arsedizioni-ars-utils-core.date.d.ts +204 -208
  58. package/types/arsedizioni-ars-utils-core.markdown.d.ts +128 -126
  59. package/types/arsedizioni-ars-utils-core.validators.d.ts +270 -236
  60. package/types/arsedizioni-ars-utils-evolution.common.d.ts +1054 -1067
  61. package/types/arsedizioni-ars-utils-support.common.d.ts +225 -234
  62. package/types/arsedizioni-ars-utils-ui.controls.d.ts +440 -278
  63. package/types/arsedizioni-ars-utils-ui.controls.date.d.ts +24 -28
  64. package/types/arsedizioni-ars-utils-ui.controls.tree.d.ts +172 -136
  65. package/types/arsedizioni-ars-utils-ui.d.ts +2035 -821
  66. package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +327 -322
  67. package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +343 -347
  68. package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +167 -167
  69. package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +373 -367
  70. package/types/arsedizioni-ars-utils-ui.files.d.ts +335 -283
  71. package/types/arsedizioni-ars-utils-ui.filters.d.ts +232 -160
  72. package/types/arsedizioni-ars-utils-ui.help.d.ts +204 -211
  73. package/types/arsedizioni-ars-utils-ui.navigation.d.ts +811 -646
  74. package/types/arsedizioni-ars-utils-ui.notifications.d.ts +74 -78
  75. package/types/arsedizioni-ars-utils-ui.oauth.d.ts +102 -62
  76. package/types/arsedizioni-ars-utils-ui.paginator.d.ts +19 -22
  77. package/types/arsedizioni-ars-utils-ui.shell.d.ts +376 -382
  78. package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +244 -231
  79. package/types/arsedizioni-ars-utils.d.ts +1 -3
@@ -1,118 +1,116 @@
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.7", ngImport: i0, type: CalendarEmptyHeader, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
22
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "22.1.7", 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.7", 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.7", ngImport: i0, type: MatDatepickerParseErrorFixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
91
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.1.7", 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.7", 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
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, Directive, HostListener, inject } from "@angular/core";
3
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
4
+ import { MatCalendar, MatDatepickerInput, MatEndDate, MatStartDate } from "@angular/material/datepicker";
5
+ var CalendarEmptyHeader = class CalendarEmptyHeader {
6
+ constructor() {
7
+ this.destroyRef = inject(DestroyRef);
8
+ this.calendar = inject(MatCalendar);
9
+ this.changeDetector = inject(ChangeDetectorRef);
10
+ this.calendar.stateChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => this.changeDetector.markForCheck());
11
+ }
12
+ static {
13
+ this.ɵfac = i0.ɵɵngDeclareFactory({
14
+ minVersion: "12.0.0",
15
+ version: "22.2.1",
16
+ ngImport: i0,
17
+ type: CalendarEmptyHeader,
18
+ deps: [],
19
+ target: i0.ɵɵFactoryTarget.Component
20
+ });
21
+ }
22
+ static {
23
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
24
+ minVersion: "14.0.0",
25
+ version: "22.2.1",
26
+ type: CalendarEmptyHeader,
27
+ isStandalone: true,
28
+ selector: "ng-component",
29
+ ngImport: i0,
30
+ template: "<div></div>",
31
+ isInline: true,
32
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
33
+ });
34
+ }
35
+ };
36
+ i0.ɵɵngDeclareClassMetadata({
37
+ minVersion: "12.0.0",
38
+ version: "22.2.1",
39
+ ngImport: i0,
40
+ type: CalendarEmptyHeader,
41
+ decorators: [{
42
+ type: Component,
43
+ args: [{
44
+ template: "<div></div>",
45
+ standalone: true,
46
+ changeDetection: ChangeDetectionStrategy.OnPush
47
+ }]
48
+ }],
49
+ ctorParameters: () => []
50
+ });
51
+ var MatDatepickerParseErrorFixDirective = class MatDatepickerParseErrorFixDirective {
52
+ constructor() {
53
+ this.singleDate = inject(MatDatepickerInput, {
54
+ optional: true,
55
+ self: true
56
+ });
57
+ this.startDate = inject(MatStartDate, {
58
+ optional: true,
59
+ self: true
60
+ });
61
+ this.endDate = inject(MatEndDate, {
62
+ optional: true,
63
+ self: true
64
+ });
65
+ }
66
+ onInput() {
67
+ queueMicrotask(() => this.revalidate());
68
+ }
69
+ revalidate() {
70
+ const host = this.singleDate ?? this.startDate ?? this.endDate;
71
+ if (!host) return;
72
+ host._validatorOnChange();
73
+ const rangePart = this.startDate ?? this.endDate;
74
+ if (!rangePart) return;
75
+ const rangeInput = rangePart._rangeInput;
76
+ (this.startDate ? rangeInput._endInput : rangeInput._startInput)?._validatorOnChange();
77
+ }
78
+ static {
79
+ this.ɵfac = i0.ɵɵngDeclareFactory({
80
+ minVersion: "12.0.0",
81
+ version: "22.2.1",
82
+ ngImport: i0,
83
+ type: MatDatepickerParseErrorFixDirective,
84
+ deps: [],
85
+ target: i0.ɵɵFactoryTarget.Directive
86
+ });
87
+ }
88
+ static {
89
+ this.ɵdir = i0.ɵɵngDeclareDirective({
90
+ minVersion: "14.0.0",
91
+ version: "22.2.1",
92
+ type: MatDatepickerParseErrorFixDirective,
93
+ isStandalone: true,
94
+ selector: "input[matDatepicker], input[matStartDate], input[matEndDate]",
95
+ host: { listeners: { "input": "onInput()" } },
96
+ ngImport: i0
97
+ });
98
+ }
99
+ };
100
+ i0.ɵɵngDeclareClassMetadata({
101
+ minVersion: "12.0.0",
102
+ version: "22.2.1",
103
+ ngImport: i0,
104
+ type: MatDatepickerParseErrorFixDirective,
105
+ decorators: [{
106
+ type: Directive,
107
+ args: [{ selector: "input[matDatepicker], input[matStartDate], input[matEndDate]" }]
108
+ }],
109
+ propDecorators: { onInput: [{
110
+ type: HostListener,
111
+ args: ["input"]
112
+ }] }
113
+ });
117
114
  export { CalendarEmptyHeader, MatDatepickerParseErrorFixDirective };
118
- //# sourceMappingURL=arsedizioni-ars-utils-ui.controls.date.mjs.map
115
+
116
+ //# sourceMappingURL=arsedizioni-ars-utils-ui.controls.date.mjs.map
@@ -1 +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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hE,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,OAAO;QAChD,IAAI,CAAC,SAAS,EAAE;YACd;QACF;AACA,QAAA,MAAM,UAAU,GAAG,SAAS,CAAC,WAAW;AACxC,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC,SAAS,GAAG,UAAU,CAAC,WAAW;QAC7E,OAAyD,EAAE,kBAAkB,EAAE;IAClF;8GA/CW,mCAAmC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAnC,mCAAmC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,8DAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAnC,mCAAmC,EAAA,UAAA,EAAA,CAAA;kBAH/C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,8DAA8D;AACzE,iBAAA;;sBAqBE,YAAY;uBAAC,OAAO;;;AC1CvB;;;;;;;;AAQG;;ACRH;;AAEG;;;;"}
1
+ {"version":3,"file":"arsedizioni-ars-utils-ui.controls.date.mjs","names":[],"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"],"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}"],"mappings":";;;;AAaA,IAAa,sBAAb,MAAa,oBAAmB;CAK9B,cAAA;EAJiB,KAAA,aAAiB,OAAO,UAAU;EAClC,KAAA,WAAiB,OAAO,WAAc;EACtC,KAAA,iBAAiB,OAAO,iBAAiB;EAKxD,KAAK,SAAS,aACX,KAAK,mBAAmB,KAAK,UAAU,CAAC,CAAC,CACzC,gBAAgB,KAAK,eAAe,aAAY,CAAE;CACvD;CAXW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAmB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAnB;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAmB,cAAA;GAAA,UAAA;GAAA,UAAA;GAAA,UAJlB;GAAa,UAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAId,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAmB,YAAA,CAAA;EAL/B,MAAA;EAAU,MAAA,CAAA;GACP,UAAU;GACV,YAAY;GACZ,iBAAiB,wBAAwB;EAC5C,CAAA;;;;ACUD,IAAa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