@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,795 +1,1258 @@
1
- import { PlatformLocation } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { output, inject, signal, ChangeDetectionStrategy, Component, Service } from '@angular/core';
4
- import { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogClose, MatDialogActions, MatDialog } from '@angular/material/dialog';
5
- import { MAT_SNACK_BAR_DATA, MatSnackBar } from '@angular/material/snack-bar';
6
- import { SafeHtmlPipe, SystemUtils } from '@arsedizioni/ars-utils/core';
7
- import * as i1 from '@arsedizioni/ars-utils/ui';
8
- import { FlexLayoutModule, UIService, PromptDialogType } from '@arsedizioni/ars-utils/ui';
9
- import { ShellService } from '@arsedizioni/ars-utils/ui.shell';
10
- import { first } from 'rxjs/operators';
11
- import * as i3 from '@angular/material/button';
12
- import { MatButtonModule } from '@angular/material/button';
13
- import * as i2 from '@angular/material/checkbox';
14
- import { MatCheckboxModule } from '@angular/material/checkbox';
15
- import { form, validate, required, FormField, FormRoot } from '@angular/forms/signals';
16
- import { SignalsUtils } from '@arsedizioni/ars-utils/core.validators';
17
- import * as i4 from '@angular/material/form-field';
18
- import { MatFormFieldModule } from '@angular/material/form-field';
19
- import * as i5 from '@angular/material/input';
20
- import { MatInputModule } from '@angular/material/input';
21
- import * as i2$1 from '@angular/material/icon';
22
- import { MatIconModule } from '@angular/material/icon';
23
-
24
- class ConfirmDialogComponent {
25
- constructor() {
26
- /** Emitted when the user makes a choice. Carries the selected result and any option state. */
27
- this.choosen = output();
28
- this.dialogRef = inject((MatDialogRef));
29
- /** Dialog configuration, with sensible defaults applied at construction time. */
30
- this.dialogData = signal({
31
- title: 'Conferma',
32
- okCaption: 'Si',
33
- cancelCaption: 'No',
34
- message: '',
35
- ...(inject(MAT_DIALOG_DATA) ?? {}),
36
- }, /* @ts-ignore */
37
- ...(ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []));
38
- // Ensure optional captions always have a value even when the caller omits them
39
- this.dialogData.update(d => ({
40
- ...d,
41
- title: d.title ?? 'Conferma',
42
- okCaption: d.okCaption ?? 'Si',
43
- cancelCaption: d.cancelCaption ?? 'No',
44
- }));
45
- }
46
- /**
47
- * Confirms the dialog, emitting `'ok'` together with the current option selections.
48
- */
49
- ok() {
50
- this.choosen.emit({ result: 'ok', options: this.dialogData().options });
51
- this.dialogRef.close();
52
- }
53
- /**
54
- * Cancels the dialog, emitting `'cancel'`.
55
- */
56
- cancel() {
57
- this.choosen.emit({ result: 'cancel' });
58
- this.dialogRef.close();
59
- }
60
- /**
61
- * Triggers the tertiary action, emitting `'other'`.
62
- */
63
- other() {
64
- this.choosen.emit({ result: 'other' });
65
- this.dialogRef.close();
66
- }
67
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ConfirmDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
68
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ConfirmDialogComponent, isStandalone: true, selector: "ng-component", outputs: { choosen: "choosen" }, ngImport: i0, template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxFill>\r\n <div fxFlex=\"*\">\r\n @if (dialogData().message) {\r\n <div [innerHtml]=\"dialogData().message | safeHtml\"></div>\r\n }\r\n </div>\r\n @if (dialogData().details) {\r\n <div class=\"details-box\">\r\n <p class=\"x-small uppercase secondary\">Dettaglio:</p>\r\n <div class=\"small details\">\r\n <div [innerHtml]=\"dialogData().details | safeHtml\"></div>\r\n </div>\r\n </div>\r\n }\r\n @if (dialogData().options) {\r\n <div style=\"padding-bottom: 24px;\">\r\n @for (o of dialogData().options; track o; let i = $index) {\r\n <div>\r\n <mat-checkbox (change)=\"o.selected = $event.checked\" [checked]=\"o.selected === true\" name=\"opt_{{i}}\" >\r\n {{o.description}}\r\n </mat-checkbox>\r\n </div>\r\n }\r\n </div>\r\n } \r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start center\" fxFill>\r\n <div fxFlex=\"30\">\r\n @if (dialogData().otherCaption) {\r\n <button mat-flat-button (click)=\"other()\"\r\n [mat-dialog-close]=\"true\">{{dialogData().otherCaption}}</button>\r\n }\r\n </div>\r\n <div fxFlex=\"70\" fxLayoutAlign=\"end\">\r\n <button mat-flat-button (click)=\"ok()\"\r\n [mat-dialog-close]=\"true\">{{dialogData().okCaption}}</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" (click)=\"cancel()\">{{dialogData().cancelCaption}}</button>\r\n </div>\r\n </div>\r\n</mat-dialog-actions>", styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}.details-box{border-top:1px solid var(--ars-color-divider, #757d87)}.details{background-color:var(--ars-item-hover-background-color, #eaecef);border-radius:5px;max-height:350px;padding:8px 12px;overflow:auto}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1.FxLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1.FxFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i1.FxLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1.FxLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1.FxFlexFillDirective, selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ", inputs: ["fxFlexFill", "fxFill", "fxFlexFill.xs", "fxFlexFill.sm", "fxFlexFill.md", "fxFlexFill.lg", "fxFlexFill.xl", "fxFlexFill.lt-sm", "fxFlexFill.lt-md", "fxFlexFill.lt-lg", "fxFlexFill.lt-xl", "fxFlexFill.gt-xs", "fxFlexFill.gt-sm", "fxFlexFill.gt-md", "fxFlexFill.gt-lg"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
69
- }
70
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
71
- type: Component,
72
- args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatDialogTitle, MatDialogContent, MatDialogClose, FlexLayoutModule, MatCheckboxModule,
73
- MatDialogActions, MatButtonModule, SafeHtmlPipe], template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxFill>\r\n <div fxFlex=\"*\">\r\n @if (dialogData().message) {\r\n <div [innerHtml]=\"dialogData().message | safeHtml\"></div>\r\n }\r\n </div>\r\n @if (dialogData().details) {\r\n <div class=\"details-box\">\r\n <p class=\"x-small uppercase secondary\">Dettaglio:</p>\r\n <div class=\"small details\">\r\n <div [innerHtml]=\"dialogData().details | safeHtml\"></div>\r\n </div>\r\n </div>\r\n }\r\n @if (dialogData().options) {\r\n <div style=\"padding-bottom: 24px;\">\r\n @for (o of dialogData().options; track o; let i = $index) {\r\n <div>\r\n <mat-checkbox (change)=\"o.selected = $event.checked\" [checked]=\"o.selected === true\" name=\"opt_{{i}}\" >\r\n {{o.description}}\r\n </mat-checkbox>\r\n </div>\r\n }\r\n </div>\r\n } \r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start center\" fxFill>\r\n <div fxFlex=\"30\">\r\n @if (dialogData().otherCaption) {\r\n <button mat-flat-button (click)=\"other()\"\r\n [mat-dialog-close]=\"true\">{{dialogData().otherCaption}}</button>\r\n }\r\n </div>\r\n <div fxFlex=\"70\" fxLayoutAlign=\"end\">\r\n <button mat-flat-button (click)=\"ok()\"\r\n [mat-dialog-close]=\"true\">{{dialogData().okCaption}}</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" (click)=\"cancel()\">{{dialogData().cancelCaption}}</button>\r\n </div>\r\n </div>\r\n</mat-dialog-actions>", styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}.details-box{border-top:1px solid var(--ars-color-divider, #757d87)}.details{background-color:var(--ars-item-hover-background-color, #eaecef);border-radius:5px;max-height:350px;padding:8px 12px;overflow:auto}\n"] }]
74
- }], ctorParameters: () => [], propDecorators: { choosen: [{ type: i0.Output, args: ["choosen"] }] } });
75
-
1
+ import { PlatformLocation } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, Service, inject, output, signal } from "@angular/core";
4
+ import { MAT_DIALOG_DATA, MatDialog, MatDialogActions, MatDialogClose, MatDialogContent, MatDialogRef, MatDialogTitle } from "@angular/material/dialog";
5
+ import { MAT_SNACK_BAR_DATA, MatSnackBar } from "@angular/material/snack-bar";
6
+ import { SafeHtmlPipe, SystemUtils } from "@arsedizioni/ars-utils/core";
7
+ import * as i1 from "@arsedizioni/ars-utils/ui";
8
+ import { FlexLayoutModule, PromptDialogType, UIService } from "@arsedizioni/ars-utils/ui";
9
+ import { ShellService } from "@arsedizioni/ars-utils/ui.shell";
10
+ import { first } from "rxjs/operators";
11
+ import * as i3 from "@angular/material/button";
12
+ import { MatButtonModule } from "@angular/material/button";
13
+ import * as i2$1 from "@angular/material/checkbox";
14
+ import { MatCheckboxModule } from "@angular/material/checkbox";
15
+ import { FormField, FormRoot, form, required, validate } from "@angular/forms/signals";
16
+ import { SignalsUtils } from "@arsedizioni/ars-utils/core.validators";
17
+ import * as i4 from "@angular/material/form-field";
18
+ import { MatFormFieldModule } from "@angular/material/form-field";
19
+ import * as i5 from "@angular/material/input";
20
+ import { MatInputModule } from "@angular/material/input";
21
+ import * as i2 from "@angular/material/icon";
22
+ import { MatIconModule } from "@angular/material/icon";
23
+ var ConfirmDialogComponent = class ConfirmDialogComponent {
24
+ constructor() {
25
+ this.choosen = output();
26
+ this.dialogRef = inject(MatDialogRef);
27
+ this.dialogData = signal({
28
+ title: "Conferma",
29
+ okCaption: "Si",
30
+ cancelCaption: "No",
31
+ message: "",
32
+ ...inject(MAT_DIALOG_DATA) ?? {}
33
+ }, ...ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []);
34
+ this.dialogData.update((d) => ({
35
+ ...d,
36
+ title: d.title ?? "Conferma",
37
+ okCaption: d.okCaption ?? "Si",
38
+ cancelCaption: d.cancelCaption ?? "No"
39
+ }));
40
+ }
41
+ ok() {
42
+ this.choosen.emit({
43
+ result: "ok",
44
+ options: this.dialogData().options
45
+ });
46
+ this.dialogRef.close();
47
+ }
48
+ cancel() {
49
+ this.choosen.emit({ result: "cancel" });
50
+ this.dialogRef.close();
51
+ }
52
+ other() {
53
+ this.choosen.emit({ result: "other" });
54
+ this.dialogRef.close();
55
+ }
56
+ static {
57
+ this.ɵfac = i0.ɵɵngDeclareFactory({
58
+ minVersion: "12.0.0",
59
+ version: "22.2.1",
60
+ ngImport: i0,
61
+ type: ConfirmDialogComponent,
62
+ deps: [],
63
+ target: i0.ɵɵFactoryTarget.Component
64
+ });
65
+ }
66
+ static {
67
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
68
+ minVersion: "17.0.0",
69
+ version: "22.2.1",
70
+ type: ConfirmDialogComponent,
71
+ isStandalone: true,
72
+ selector: "ng-component",
73
+ outputs: { choosen: "choosen" },
74
+ ngImport: i0,
75
+ template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxFill>\r\n <div fxFlex=\"*\">\r\n @if (dialogData().message) {\r\n <div [innerHtml]=\"dialogData().message | safeHtml\"></div>\r\n }\r\n </div>\r\n @if (dialogData().details) {\r\n <div class=\"details-box\">\r\n <p class=\"x-small uppercase secondary\">Dettaglio:</p>\r\n <div class=\"small details\">\r\n <div [innerHtml]=\"dialogData().details | safeHtml\"></div>\r\n </div>\r\n </div>\r\n }\r\n @if (dialogData().options) {\r\n <div style=\"padding-bottom: 24px;\">\r\n @for (o of dialogData().options; track o; let i = $index) {\r\n <div>\r\n <mat-checkbox (change)=\"o.selected = $event.checked\" [checked]=\"o.selected === true\" name=\"opt_{{i}}\" >\r\n {{o.description}}\r\n </mat-checkbox>\r\n </div>\r\n }\r\n </div>\r\n } \r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start center\" fxFill>\r\n <div fxFlex=\"30\">\r\n @if (dialogData().otherCaption) {\r\n <button mat-flat-button (click)=\"other()\"\r\n [mat-dialog-close]=\"true\">{{dialogData().otherCaption}}</button>\r\n }\r\n </div>\r\n <div fxFlex=\"70\" fxLayoutAlign=\"end\">\r\n <button mat-flat-button (click)=\"ok()\"\r\n [mat-dialog-close]=\"true\">{{dialogData().okCaption}}</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" (click)=\"cancel()\">{{dialogData().cancelCaption}}</button>\r\n </div>\r\n </div>\r\n</mat-dialog-actions>",
76
+ styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}.details-box{border-top:1px solid var(--ars-color-divider, #757d87)}.details{background-color:var(--ars-item-hover-background-color, #eaecef);border-radius:5px;max-height:350px;padding:8px 12px;overflow:auto}\n"],
77
+ dependencies: [
78
+ {
79
+ kind: "directive",
80
+ type: MatDialogTitle,
81
+ selector: "[mat-dialog-title], [matDialogTitle]",
82
+ inputs: ["id"],
83
+ exportAs: ["matDialogTitle"]
84
+ },
85
+ {
86
+ kind: "directive",
87
+ type: MatDialogContent,
88
+ selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]"
89
+ },
90
+ {
91
+ kind: "directive",
92
+ type: MatDialogClose,
93
+ selector: "[mat-dialog-close], [matDialogClose]",
94
+ inputs: [
95
+ "aria-label",
96
+ "type",
97
+ "mat-dialog-close",
98
+ "matDialogClose"
99
+ ],
100
+ exportAs: ["matDialogClose"]
101
+ },
102
+ {
103
+ kind: "ngmodule",
104
+ type: FlexLayoutModule
105
+ },
106
+ {
107
+ kind: "directive",
108
+ type: i1.FxLayoutDirective,
109
+ selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ",
110
+ inputs: [
111
+ "fxLayout",
112
+ "fxLayout.xs",
113
+ "fxLayout.sm",
114
+ "fxLayout.md",
115
+ "fxLayout.lg",
116
+ "fxLayout.xl",
117
+ "fxLayout.lt-sm",
118
+ "fxLayout.lt-md",
119
+ "fxLayout.lt-lg",
120
+ "fxLayout.lt-xl",
121
+ "fxLayout.gt-xs",
122
+ "fxLayout.gt-sm",
123
+ "fxLayout.gt-md",
124
+ "fxLayout.gt-lg"
125
+ ]
126
+ },
127
+ {
128
+ kind: "directive",
129
+ type: i1.FxFlexDirective,
130
+ selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ",
131
+ inputs: [
132
+ "fxFlex",
133
+ "fxFlex.xs",
134
+ "fxFlex.sm",
135
+ "fxFlex.md",
136
+ "fxFlex.lg",
137
+ "fxFlex.xl",
138
+ "fxFlex.lt-sm",
139
+ "fxFlex.lt-md",
140
+ "fxFlex.lt-lg",
141
+ "fxFlex.lt-xl",
142
+ "fxFlex.gt-xs",
143
+ "fxFlex.gt-sm",
144
+ "fxFlex.gt-md",
145
+ "fxFlex.gt-lg"
146
+ ]
147
+ },
148
+ {
149
+ kind: "directive",
150
+ type: i1.FxLayoutAlignDirective,
151
+ selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ",
152
+ inputs: [
153
+ "fxLayoutAlign",
154
+ "fxLayoutAlign.xs",
155
+ "fxLayoutAlign.sm",
156
+ "fxLayoutAlign.md",
157
+ "fxLayoutAlign.lg",
158
+ "fxLayoutAlign.xl",
159
+ "fxLayoutAlign.lt-sm",
160
+ "fxLayoutAlign.lt-md",
161
+ "fxLayoutAlign.lt-lg",
162
+ "fxLayoutAlign.lt-xl",
163
+ "fxLayoutAlign.gt-xs",
164
+ "fxLayoutAlign.gt-sm",
165
+ "fxLayoutAlign.gt-md",
166
+ "fxLayoutAlign.gt-lg"
167
+ ]
168
+ },
169
+ {
170
+ kind: "directive",
171
+ type: i1.FxLayoutGapDirective,
172
+ selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ",
173
+ inputs: [
174
+ "fxLayoutGap",
175
+ "fxLayoutGap.xs",
176
+ "fxLayoutGap.sm",
177
+ "fxLayoutGap.md",
178
+ "fxLayoutGap.lg",
179
+ "fxLayoutGap.xl",
180
+ "fxLayoutGap.lt-sm",
181
+ "fxLayoutGap.lt-md",
182
+ "fxLayoutGap.lt-lg",
183
+ "fxLayoutGap.lt-xl",
184
+ "fxLayoutGap.gt-xs",
185
+ "fxLayoutGap.gt-sm",
186
+ "fxLayoutGap.gt-md",
187
+ "fxLayoutGap.gt-lg"
188
+ ]
189
+ },
190
+ {
191
+ kind: "directive",
192
+ type: i1.FxFlexFillDirective,
193
+ selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ",
194
+ inputs: [
195
+ "fxFlexFill",
196
+ "fxFill",
197
+ "fxFlexFill.xs",
198
+ "fxFlexFill.sm",
199
+ "fxFlexFill.md",
200
+ "fxFlexFill.lg",
201
+ "fxFlexFill.xl",
202
+ "fxFlexFill.lt-sm",
203
+ "fxFlexFill.lt-md",
204
+ "fxFlexFill.lt-lg",
205
+ "fxFlexFill.lt-xl",
206
+ "fxFlexFill.gt-xs",
207
+ "fxFlexFill.gt-sm",
208
+ "fxFlexFill.gt-md",
209
+ "fxFlexFill.gt-lg"
210
+ ]
211
+ },
212
+ {
213
+ kind: "ngmodule",
214
+ type: MatCheckboxModule
215
+ },
216
+ {
217
+ kind: "component",
218
+ type: i2$1.MatCheckbox,
219
+ selector: "mat-checkbox",
220
+ inputs: [
221
+ "aria-label",
222
+ "aria-labelledby",
223
+ "aria-describedby",
224
+ "aria-expanded",
225
+ "aria-controls",
226
+ "aria-owns",
227
+ "id",
228
+ "required",
229
+ "labelPosition",
230
+ "name",
231
+ "value",
232
+ "disableRipple",
233
+ "tabIndex",
234
+ "color",
235
+ "disabledInteractive",
236
+ "checked",
237
+ "disabled",
238
+ "indeterminate"
239
+ ],
240
+ outputs: ["change", "indeterminateChange"],
241
+ exportAs: ["matCheckbox"]
242
+ },
243
+ {
244
+ kind: "directive",
245
+ type: MatDialogActions,
246
+ selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",
247
+ inputs: ["align"]
248
+ },
249
+ {
250
+ kind: "ngmodule",
251
+ type: MatButtonModule
252
+ },
253
+ {
254
+ kind: "component",
255
+ type: i3.MatButton,
256
+ selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
257
+ inputs: ["matButton"],
258
+ exportAs: ["matButton", "matAnchor"]
259
+ },
260
+ {
261
+ kind: "pipe",
262
+ type: SafeHtmlPipe,
263
+ name: "safeHtml"
264
+ }
265
+ ],
266
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
267
+ });
268
+ }
269
+ };
270
+ i0.ɵɵngDeclareClassMetadata({
271
+ minVersion: "12.0.0",
272
+ version: "22.2.1",
273
+ ngImport: i0,
274
+ type: ConfirmDialogComponent,
275
+ decorators: [{
276
+ type: Component,
277
+ args: [{
278
+ standalone: true,
279
+ changeDetection: ChangeDetectionStrategy.OnPush,
280
+ imports: [
281
+ MatDialogTitle,
282
+ MatDialogContent,
283
+ MatDialogClose,
284
+ FlexLayoutModule,
285
+ MatCheckboxModule,
286
+ MatDialogActions,
287
+ MatButtonModule,
288
+ SafeHtmlPipe
289
+ ],
290
+ template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxFill>\r\n <div fxFlex=\"*\">\r\n @if (dialogData().message) {\r\n <div [innerHtml]=\"dialogData().message | safeHtml\"></div>\r\n }\r\n </div>\r\n @if (dialogData().details) {\r\n <div class=\"details-box\">\r\n <p class=\"x-small uppercase secondary\">Dettaglio:</p>\r\n <div class=\"small details\">\r\n <div [innerHtml]=\"dialogData().details | safeHtml\"></div>\r\n </div>\r\n </div>\r\n }\r\n @if (dialogData().options) {\r\n <div style=\"padding-bottom: 24px;\">\r\n @for (o of dialogData().options; track o; let i = $index) {\r\n <div>\r\n <mat-checkbox (change)=\"o.selected = $event.checked\" [checked]=\"o.selected === true\" name=\"opt_{{i}}\" >\r\n {{o.description}}\r\n </mat-checkbox>\r\n </div>\r\n }\r\n </div>\r\n } \r\n </div>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start center\" fxFill>\r\n <div fxFlex=\"30\">\r\n @if (dialogData().otherCaption) {\r\n <button mat-flat-button (click)=\"other()\"\r\n [mat-dialog-close]=\"true\">{{dialogData().otherCaption}}</button>\r\n }\r\n </div>\r\n <div fxFlex=\"70\" fxLayoutAlign=\"end\">\r\n <button mat-flat-button (click)=\"ok()\"\r\n [mat-dialog-close]=\"true\">{{dialogData().okCaption}}</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\" (click)=\"cancel()\">{{dialogData().cancelCaption}}</button>\r\n </div>\r\n </div>\r\n</mat-dialog-actions>",
291
+ styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}.details-box{border-top:1px solid var(--ars-color-divider, #757d87)}.details{background-color:var(--ars-item-hover-background-color, #eaecef);border-radius:5px;max-height:350px;padding:8px 12px;overflow:auto}\n"]
292
+ }]
293
+ }],
294
+ ctorParameters: () => [],
295
+ propDecorators: { choosen: [{
296
+ type: i0.Output,
297
+ args: ["choosen"]
298
+ }] }
299
+ });
76
300
  var DeleteDialogConfirmMode;
77
- (function (DeleteDialogConfirmMode) {
78
- DeleteDialogConfirmMode[DeleteDialogConfirmMode["None"] = 0] = "None";
79
- DeleteDialogConfirmMode[DeleteDialogConfirmMode["Simple"] = 1] = "Simple";
80
- DeleteDialogConfirmMode[DeleteDialogConfirmMode["Strong"] = 2] = "Strong";
301
+ (function(DeleteDialogConfirmMode) {
302
+ DeleteDialogConfirmMode[DeleteDialogConfirmMode["None"] = 0] = "None";
303
+ DeleteDialogConfirmMode[DeleteDialogConfirmMode["Simple"] = 1] = "Simple";
304
+ DeleteDialogConfirmMode[DeleteDialogConfirmMode["Strong"] = 2] = "Strong";
81
305
  })(DeleteDialogConfirmMode || (DeleteDialogConfirmMode = {}));
82
- class DeleteDialogComponent {
83
- constructor() {
84
- /** Error text of a field: the message declared in the schema, or the shared fallback. */
85
- this.getErrorMessage = SignalsUtils.getFieldErrorMessage;
86
- /** Emitted when the user makes a choice. Carries the selected result. */
87
- this.choosen = output();
88
- this.dialogRef = inject((MatDialogRef));
89
- /** Dialog configuration with defaults applied at construction time. */
90
- this.dialogData = signal((() => {
91
- const raw = inject(MAT_DIALOG_DATA) ?? {};
92
- return {
93
- title: 'Attenzione',
94
- okCaption: 'Si',
95
- cancelCaption: 'No',
96
- confirmMode: DeleteDialogConfirmMode.None,
97
- message: '',
98
- ...raw,
99
- };
100
- })(), /* @ts-ignore */
101
- ...(ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []));
102
- /**
103
- * Model backing the signal form: `confirmed` starts as `true` for all modes
104
- * except `Simple`, which requires explicit checkbox confirmation, and
105
- * `confirmValue` is the strong-confirmation text.
106
- */
107
- this.model = signal({
108
- confirmed: this.dialogData().confirmMode !== DeleteDialogConfirmMode.Simple,
109
- confirmValue: '',
110
- }, /* @ts-ignore */
111
- ...(ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []));
112
- /**
113
- * Signal form for the confirmation. In `Simple` mode the checkbox must be
114
- * checked; in `Strong` mode the text must be exactly the word "elimina".
115
- */
116
- this.form = form(this.model, p => {
117
- validate(p.confirmed, ({ value }) => this.dialogData().confirmMode !== DeleteDialogConfirmMode.Simple || value()
118
- ? undefined
119
- : { kind: 'confirmed', message: 'Confermo la cancellazione' });
120
- required(p.confirmValue, {
121
- message: 'Digita la parola "elimina"',
122
- when: () => this.dialogData().confirmMode === DeleteDialogConfirmMode.Strong,
123
- });
124
- validate(p.confirmValue, ({ value }) => this.dialogData().confirmMode !== DeleteDialogConfirmMode.Strong
125
- || !value()
126
- || value().toLowerCase() === 'elimina'
127
- ? undefined
128
- : { kind: 'confirmValue', message: 'Digita la parola "elimina"' });
129
- });
130
- }
131
- /**
132
- * Confirms the deletion, emitting `'ok'` and closing the dialog.
133
- */
134
- ok() {
135
- this.choosen.emit({ result: 'ok' });
136
- this.dialogRef.close();
137
- }
138
- /**
139
- * Cancels the operation, emitting `'cancel'` and closing the dialog.
140
- */
141
- cancel() {
142
- this.choosen.emit({ result: 'cancel' });
143
- this.dialogRef.close();
144
- }
145
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DeleteDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
146
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: DeleteDialogComponent, isStandalone: true, selector: "ng-component", outputs: { choosen: "choosen" }, ngImport: i0, template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n <form [formRoot]=\"form\" novalidate>\r\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxFill>\r\n <div fxFlex=\"*\">\r\n @if (dialogData().message) {\r\n <div [innerHtml]=\"dialogData().message | safeHtml\"></div>\r\n }\r\n </div>\r\n @if (dialogData().details) {\r\n <div class=\"details-box\">\r\n <p class=\"x-small uppercase secondary\">Dettaglio:</p>\r\n <div class=\"small details\">\r\n <div [innerHtml]=\"dialogData().details | safeHtml\"></div>\r\n </div>\r\n </div>\r\n }\r\n @if (dialogData().confirmMode === 1) {\r\n <div>\r\n <mat-checkbox [formField]=\"form.confirmed\">\r\n Confermo la cancellazione\r\n </mat-checkbox>\r\n </div>\r\n } @else if (dialogData().confirmMode === 2) {\r\n <p>Per confermare la cancellazione digita la parola <i><b>elimina</b></i>.</p>\r\n <mat-form-field style=\"width: 200px\" [appearance]=\"dialogData().appearance\">\r\n <mat-label>Conferma</mat-label>\r\n <input matInput [formField]=\"form.confirmValue\"\r\n [attr.aria-label]=\"'Digita la parola -elimina-'\">\r\n @if (form.confirmValue().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.confirmValue().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n }\r\n <br>\r\n </div>\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"end center\" fxFill>\r\n <button mat-flat-button (click)=\"ok()\" [disabled]=\"form().invalid()\"\r\n [mat-dialog-close]=\"true\">{{dialogData().okCaption}}</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\"\r\n (click)=\"cancel()\">{{dialogData().cancelCaption}}</button>\r\n </div>\r\n</mat-dialog-actions>\r\n", styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}.details-box{border-top:1px solid var(--ars-color-divider, #757d87)}.details{background-color:var(--ars-item-hover-background-color, #eaecef);border-radius:5px;max-height:350px;padding:8px 12px;overflow:auto}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1.FxLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1.FxFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i1.FxLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1.FxLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1.FxFlexFillDirective, selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ", inputs: ["fxFlexFill", "fxFill", "fxFlexFill.xs", "fxFlexFill.sm", "fxFlexFill.md", "fxFlexFill.lg", "fxFlexFill.xl", "fxFlexFill.lt-sm", "fxFlexFill.lt-md", "fxFlexFill.lt-lg", "fxFlexFill.lt-xl", "fxFlexFill.gt-xs", "fxFlexFill.gt-sm", "fxFlexFill.gt-md", "fxFlexFill.gt-lg"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "directive", type: FormField, selector: "[formField]", inputs: ["formField"], exportAs: ["formField"] }, { kind: "directive", type: FormRoot, selector: "form[formRoot]", inputs: ["formRoot"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
147
- }
148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DeleteDialogComponent, decorators: [{
149
- type: Component,
150
- args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatDialogTitle, MatDialogContent, MatDialogClose, FlexLayoutModule, MatCheckboxModule, FormField, FormRoot,
151
- MatDialogActions, MatButtonModule, MatFormFieldModule, MatInputModule, SafeHtmlPipe], template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n <form [formRoot]=\"form\" novalidate>\r\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxFill>\r\n <div fxFlex=\"*\">\r\n @if (dialogData().message) {\r\n <div [innerHtml]=\"dialogData().message | safeHtml\"></div>\r\n }\r\n </div>\r\n @if (dialogData().details) {\r\n <div class=\"details-box\">\r\n <p class=\"x-small uppercase secondary\">Dettaglio:</p>\r\n <div class=\"small details\">\r\n <div [innerHtml]=\"dialogData().details | safeHtml\"></div>\r\n </div>\r\n </div>\r\n }\r\n @if (dialogData().confirmMode === 1) {\r\n <div>\r\n <mat-checkbox [formField]=\"form.confirmed\">\r\n Confermo la cancellazione\r\n </mat-checkbox>\r\n </div>\r\n } @else if (dialogData().confirmMode === 2) {\r\n <p>Per confermare la cancellazione digita la parola <i><b>elimina</b></i>.</p>\r\n <mat-form-field style=\"width: 200px\" [appearance]=\"dialogData().appearance\">\r\n <mat-label>Conferma</mat-label>\r\n <input matInput [formField]=\"form.confirmValue\"\r\n [attr.aria-label]=\"'Digita la parola -elimina-'\">\r\n @if (form.confirmValue().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.confirmValue().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n }\r\n <br>\r\n </div>\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"end center\" fxFill>\r\n <button mat-flat-button (click)=\"ok()\" [disabled]=\"form().invalid()\"\r\n [mat-dialog-close]=\"true\">{{dialogData().okCaption}}</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\"\r\n (click)=\"cancel()\">{{dialogData().cancelCaption}}</button>\r\n </div>\r\n</mat-dialog-actions>\r\n", styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}.details-box{border-top:1px solid var(--ars-color-divider, #757d87)}.details{background-color:var(--ars-item-hover-background-color, #eaecef);border-radius:5px;max-height:350px;padding:8px 12px;overflow:auto}\n"] }]
152
- }], propDecorators: { choosen: [{ type: i0.Output, args: ["choosen"] }] } });
153
-
154
- class ToastComponent {
155
- constructor() {
156
- /** Emitted when the user clicks the optional action button. */
157
- this.action = output();
158
- /** Snack-bar payload with a safe fallback to an empty message when no data is injected. */
159
- this.dialogData = signal(inject(MAT_SNACK_BAR_DATA) ?? { message: '' }, /* @ts-ignore */
160
- ...(ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []));
161
- }
162
- /**
163
- * Emits the `action` event to notify the caller that the action button was clicked.
164
- */
165
- do() {
166
- this.action.emit();
167
- }
168
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ToastComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
169
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.7", type: ToastComponent, isStandalone: true, selector: "ng-component", outputs: { action: "action" }, ngImport: i0, template: "<div fxLayout=\"row\" fxLayoutGap=\"10px\">\r\n @if (dialogData().icon) {\r\n <div fxFlex='30px' fxLayoutAlign=\"start\" fxFlexAlign=\"center\">\r\n <mat-icon>{{dialogData().icon}}</mat-icon>\r\n </div>\r\n }\r\n <div fxFlex='*' fxLayoutAlign=\"start\" fxFlexAlign=\"center\">\r\n @if (dialogData().message) {\r\n <span [innerHTML]=\"dialogData().message | safeHtml\"></span>\r\n }\r\n </div>\r\n @if (dialogData().actionCaption) {\r\n <div fxLayoutAlign=\"end\" fxFlexAlign=\"center\">\r\n <div style=\"padding-left: 20px;\">\r\n <button type=\"button\" mat-flat-button (click)=\"do()\"\r\n [innerHTML]=\"dialogData().actionCaption\"></button>\r\n </div>\r\n </div>\r\n }\r\n</div>", styles: [""], dependencies: [{ kind: "ngmodule", type: FlexLayoutModule }, { kind: "directive", type: i1.FxLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1.FxFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i1.FxLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1.FxLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i1.FxFlexAlignDirective, selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg] ", inputs: ["fxFlexAlign", "fxFlexAlign.xs", "fxFlexAlign.sm", "fxFlexAlign.md", "fxFlexAlign.lg", "fxFlexAlign.xl", "fxFlexAlign.lt-sm", "fxFlexAlign.lt-md", "fxFlexAlign.lt-lg", "fxFlexAlign.lt-xl", "fxFlexAlign.gt-xs", "fxFlexAlign.gt-sm", "fxFlexAlign.gt-md", "fxFlexAlign.gt-lg"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: SafeHtmlPipe, name: "safeHtml" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
170
- }
171
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: ToastComponent, decorators: [{
172
- type: Component,
173
- args: [{ standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, imports: [FlexLayoutModule, MatIconModule, MatButtonModule, SafeHtmlPipe], template: "<div fxLayout=\"row\" fxLayoutGap=\"10px\">\r\n @if (dialogData().icon) {\r\n <div fxFlex='30px' fxLayoutAlign=\"start\" fxFlexAlign=\"center\">\r\n <mat-icon>{{dialogData().icon}}</mat-icon>\r\n </div>\r\n }\r\n <div fxFlex='*' fxLayoutAlign=\"start\" fxFlexAlign=\"center\">\r\n @if (dialogData().message) {\r\n <span [innerHTML]=\"dialogData().message | safeHtml\"></span>\r\n }\r\n </div>\r\n @if (dialogData().actionCaption) {\r\n <div fxLayoutAlign=\"end\" fxFlexAlign=\"center\">\r\n <div style=\"padding-left: 20px;\">\r\n <button type=\"button\" mat-flat-button (click)=\"do()\"\r\n [innerHTML]=\"dialogData().actionCaption\"></button>\r\n </div>\r\n </div>\r\n }\r\n</div>" }]
174
- }], propDecorators: { action: [{ type: i0.Output, args: ["action"] }] } });
175
-
176
- class DialogService extends ShellService {
177
- /**
178
- * Updates the global form-field appearance.
179
- * @param value - The new appearance value. Falls back to `'fill'` when `undefined` is passed.
180
- * @returns void
181
- */
182
- setAppearance(value) {
183
- this.uiService.setAppearance(value);
184
- }
185
- constructor() {
186
- super();
187
- this.uiService = inject(UIService);
188
- /**
189
- * Shares the SAME `appearance` signal instance as the root `UIService`:
190
- * `uiService.setAppearance('outline')` is immediately visible here and in
191
- * every dialog opened by this service.
192
- *
193
- * Held by delegation and no longer by inheritance: this service now extends `ShellService`,
194
- * which knows nothing about Material and must not, so the two members every caller uses of
195
- * `UIService` are re-exposed here.
196
- */
197
- this.appearance = this.uiService.appearance;
198
- this.dialog = inject(MatDialog);
199
- this.snackBar = inject(MatSnackBar);
200
- this.location = inject(PlatformLocation);
201
- this.popHistory = [];
202
- this.popState = true;
203
- this.poppingState = false;
204
- // Handle dialog close when back button is clicked
205
- this.location.onPopState(() => {
206
- if (!this.poppingState) {
207
- const count = this.dialog.openDialogs.length;
208
- if (count > 0) {
209
- // Disable pop state if needed
210
- this.popState = false;
211
- // Close dialog
212
- this.dialog.openDialogs[count - 1].close();
213
- }
214
- }
215
- else {
216
- this.poppingState = false;
217
- }
218
- });
219
- }
220
- /**
221
- * Lets the next `popstate` through without closing the topmost dialog.
222
- *
223
- * Back closing the dialog on top is the rule of this service, and its listener is registered in
224
- * the constructor — so nothing attached later can get in front of it. A caller that owns a
225
- * dismissable state of its own INSIDE a dialog (a full-screen editor, a picker covering the
226
- * dialog, a wizard step) needs Back to unwind that state first, and this is the only way to ask
227
- * for it: push a history entry, call this, and handle the pop.
228
- *
229
- * The suspension lasts exactly one `popstate` and is consumed whether or not the caller pushed
230
- * an entry, so it can not leave the service permanently deaf to the Back button.
231
- */
232
- suspendBackClose() {
233
- this.poppingState = true;
234
- }
235
- /**
236
- * Removes trailing `#` characters from the current URL (e.g. after a page reload).
237
- * @param resetPoppingState - When `true`, resets the internal popping-state flag.
238
- */
239
- clearUrl(resetPoppingState = false) {
240
- const url = location.href;
241
- let l = url.length;
242
- while (l >= 0 && url[l - 1] === '#')
243
- l--;
244
- if (l < url.length)
245
- history.replaceState({}, '', url.substring(0, l));
246
- if (resetPoppingState)
247
- this.poppingState = false;
248
- }
249
- /**
250
- * Close all dialogs
251
- */
252
- closeAll() {
253
- this.dialog.closeAll();
254
- }
255
- /**
256
- * Opens a Material dialog. Returns `null` when not running in a browser.
257
- * @param component - The component to open as a dialog.
258
- * @param config - The dialog configuration.
259
- * @returns The dialog reference, or `null` outside the browser.
260
- */
261
- open(component, config) {
262
- if (!SystemUtils.isBrowser())
263
- return null;
264
- // Immediately, not with the grace period: the dialog is about to be drawn under an overlay
265
- // that sits above it by z-index, and half a second of it covering a fresh dialog would show.
266
- this.clearBusy(true);
267
- return this.openDialog(component, config);
268
- }
269
- /**
270
- * Internal helper that wraps `MatDialog.open`, subscribes to lifecycle hooks
271
- * and manages browser-history push/pop entries.
272
- * @param component - The component to open.
273
- * @param config - The dialog configuration.
274
- * @returns The dialog reference.
275
- */
276
- openDialog(component, config) {
277
- // We will take care of navigation
278
- config.closeOnNavigation = false;
279
- const d = this.dialog.open(component, config);
280
- d.afterOpened().pipe(first()).subscribe(() => {
281
- this.pushDialog(d.id);
282
- // The dialog has just entered the top layer, and the top layer orders by promotion: an
283
- // error the user has not dismissed yet would end up underneath it.
284
- this.raiseMessage();
285
- });
286
- d.beforeClosed().pipe(first()).subscribe(() => this.popDialog(d.id));
287
- return d;
288
- }
289
- /**
290
- * Returns the element height including margins
291
- * @param element - element
292
- * @returns the height
293
- */
294
- outerHeight(element) {
295
- if (!SystemUtils.isBrowser())
296
- return 0;
297
- const height = element.offsetHeight;
298
- const style = window.getComputedStyle(element);
299
- return ['top', 'bottom']
300
- .map(side => parseInt(style.getPropertyValue(`margin-${side}`), 10))
301
- .reduce((total, margin) => total + margin, height);
302
- }
303
- /**
304
- * Return current dialog height
305
- */
306
- getCurrentDialogHeight() {
307
- if (!SystemUtils.isBrowser())
308
- return 0;
309
- const count = this.popHistory.length;
310
- if (count > 0) {
311
- let id = this.popHistory[count - 1].id;
312
- let elem = document.getElementById(id);
313
- if (elem && elem.clientHeight > 0)
314
- return elem.clientHeight;
315
- }
316
- return 0;
317
- }
318
- /**
319
- * Returns the scrollable content area height for the topmost open dialog.
320
- * @param fixedPartsClassName - CSS class names of fixed (non-scrollable) elements whose heights are subtracted.
321
- * @param minimalHeight - Minimum height floor to use when the dialog height is smaller.
322
- * @returns The computed scrollable height in pixels.
323
- */
324
- getCurrentDialogScrollableHeight(fixedPartsClassName, minimalHeight) {
325
- if (!SystemUtils.isBrowser())
326
- return 0;
327
- let h = Math.max(this.getCurrentDialogHeight(), minimalHeight);
328
- if (fixedPartsClassName) {
329
- fixedPartsClassName.forEach(n => {
330
- const elems = document.getElementsByClassName(n);
331
- if (elems) {
332
- for (let i = 0; i < elems.length; i++) {
333
- h -= this.outerHeight(elems[i]);
334
- }
335
- }
336
- });
337
- }
338
- return h;
339
- }
340
- /**
341
- * Push a dialog into the browser history
342
- */
343
- pushDialog(id) {
344
- if (!SystemUtils.isBrowser())
345
- return;
346
- const index = history.length;
347
- history.pushState({ index }, '', location.href + '#');
348
- this.popHistory.push({ id, value: index });
349
- }
350
- /**
351
- * Pop a dialog from the history
352
- */
353
- popDialog(id) {
354
- if (!SystemUtils.isBrowser())
355
- return;
356
- if (this.popState) {
357
- this.poppingState = true;
358
- let popped = 1;
359
- if (id) {
360
- const p = this.popHistory.findIndex(n => n.id === id);
361
- if (p !== -1) {
362
- popped = this.popHistory[p].value - (history.state?.index ?? 0);
363
- popped = popped ? popped + 1 : 1;
364
- this.popHistory.splice(p, 1);
365
- }
366
- const url = location.href;
367
- let l = url.length;
368
- while (l >= 0 && url[l - 1] === '#' && popped > 0) {
369
- l--;
370
- popped--;
371
- }
372
- if (l < url.length)
373
- history.replaceState({}, '', url.substring(0, l));
374
- }
375
- }
376
- this.popState = true;
377
- }
378
- /**
379
- * Shows a snack-bar toast notification.
380
- * @param message - HTML message to display.
381
- * @param duration - Visible duration in milliseconds. Defaults to `2000`.
382
- * @param icon - Material icon name shown beside the message. Defaults to `'check'`.
383
- * @param actionCaption - Optional label for the action button.
384
- * @returns The snack-bar reference.
385
- */
386
- toast(message, duration = 2000, icon = 'check', actionCaption) {
387
- this.clearBusy();
388
- if (duration === -1)
389
- duration = 2000; // default
390
- const toastRef = this.snackBar.openFromComponent(ToastComponent, {
391
- duration,
392
- data: { message, icon, actionCaption }
393
- });
394
- toastRef.instance.action.subscribe(() => toastRef.dismiss());
395
- return toastRef;
396
- }
397
- /**
398
- * Opens a confirmation dialog.
399
- * @param message - HTML message to display.
400
- * @param title - Dialog title. Defaults to `'Conferma'`.
401
- * @param okCaption - Primary action button label. Defaults to `'Si'`.
402
- * @param cancelCaption - Cancel button label. Defaults to `'No'`.
403
- * @param otherCaption - Optional tertiary action button label.
404
- * @param options - Optional list of checkbox options shown to the user.
405
- * @param width - Maximum dialog width in pixels. Defaults to `500`.
406
- * @param details - Optional secondary details text.
407
- * @returns The dialog reference, or `null` outside the browser.
408
- */
409
- confirm(message, title = 'Conferma', okCaption = 'Si', cancelCaption = 'No', otherCaption, options, width = 500, details) {
410
- return this.open(ConfirmDialogComponent, {
411
- ariaLabel: 'conferma',
412
- autoFocus: 'dialog',
413
- restoreFocus: false,
414
- data: {
415
- message,
416
- title,
417
- okCaption,
418
- cancelCaption,
419
- otherCaption,
420
- options,
421
- details,
422
- appearance: this.appearance()
423
- },
424
- closeOnNavigation: false,
425
- disableClose: true,
426
- minWidth: '375px',
427
- maxWidth: `${width}px`,
428
- width: '100%'
429
- });
430
- }
431
- /**
432
- * Opens a deletion-confirmation dialog.
433
- * @param message - HTML message to display.
434
- * @param title - Dialog title. Defaults to `'Attenzione'`.
435
- * @param confirmMode - Confirmation mode (none / checkbox / type-to-confirm). Defaults to `None`.
436
- * @param okCaption - Primary action button label. Defaults to `'Si'`.
437
- * @param cancelCaption - Cancel button label. Defaults to `'No'`.
438
- * @param width - Maximum dialog width in pixels. Defaults to `500`.
439
- * @param details - Optional secondary details text.
440
- * @returns The dialog reference, or `null` outside the browser.
441
- */
442
- delete(message, title = 'Attenzione', confirmMode = DeleteDialogConfirmMode.None, okCaption = 'Si', cancelCaption = 'No', width = 500, details) {
443
- return this.open(DeleteDialogComponent, {
444
- ariaLabel: 'attenzione',
445
- autoFocus: 'dialog',
446
- restoreFocus: false,
447
- data: {
448
- message,
449
- title,
450
- confirmMode,
451
- okCaption,
452
- cancelCaption,
453
- details,
454
- appearance: this.appearance()
455
- },
456
- closeOnNavigation: false,
457
- disableClose: true,
458
- minWidth: '375px',
459
- maxWidth: `${width}px`,
460
- width: '100%'
461
- });
462
- }
463
- ////
464
- // LAZY DIALOGS
465
- ////
466
- //
467
- // The heavy dialogs are opened from here but live in their own entry points, and the `import()`
468
- // below is what keeps them out of the initial bundle: an import between entry points survives
469
- // the build, while one inside the same entry point is inlined by ng-packagr.
470
- //
471
- // These used to be `ApplicationDialogService` in `ui.application`, an entry point whose whole
472
- // reason to exist was holding these nine lines. It could be dissolved into here once the lazy
473
- // dialogs stopped injecting `DialogService` for `error()` and `busy()` — those live in
474
- // `ShellService`, which they now inject directly. That broke the static edge back to this entry
475
- // point, and with it the circular dependency ng-packagr refuses to build.
476
- //
477
- // Do NOT import `DialogService` from `ui.dialogs.{prompt,select,auth}` or `ui.files` again:
478
- // the build stops with "circular dependency" the moment anyone does.
479
- /**
480
- * Open a send-to-email dialog.
481
- * @param title - Dialog title.
482
- * @param text - Pre-filled message body.
483
- * @param subject - Pre-filled subject line.
484
- * @param canPopulate - Whether the populate-recipients action is available.
485
- * @param count - Number of documents being sent.
486
- * @param options - Checkable option list.
487
- * @param width - Maximum dialog width in pixels.
488
- * @returns The opened dialog reference.
489
- */
490
- async sendTo(title = 'Invia per email', text, subject, canPopulate = false, count, options, width = 600) {
491
- const { SendToDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.select');
492
- return this.open(SendToDialogComponent, {
493
- ariaLabel: 'invia per email',
494
- autoFocus: 'dialog',
495
- restoreFocus: false,
496
- data: {
497
- title,
498
- count,
499
- canPopulate,
500
- appearance: this.appearance(),
501
- text,
502
- subject,
503
- options
504
- },
505
- closeOnNavigation: false,
506
- minWidth: '375px',
507
- maxWidth: `${width}px`,
508
- width: '100%'
509
- });
510
- }
511
- /**
512
- * Open a tree-node selection dialog.
513
- * @param nodes - The tree nodes to display.
514
- * @param title - Dialog title.
515
- * @param description - Optional description shown below the title.
516
- * @param initialFilter - Pre-applied filter text.
517
- * @param width - Maximum dialog width in pixels.
518
- * @param okCaption - Label for the confirm button.
519
- * @param canAppend - Whether the append-node action is available.
520
- * @returns The opened dialog reference.
521
- */
522
- async selectTree(nodes, title = 'Seleziona un elemento', description, initialFilter, width = 800, okCaption = 'Ok', canAppend = false) {
523
- const { SelectTreeDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.select');
524
- return this.open(SelectTreeDialogComponent, {
525
- ariaLabel: 'seleziona un elemento',
526
- autoFocus: 'dialog',
527
- restoreFocus: false,
528
- data: {
529
- title,
530
- description,
531
- initialFilter,
532
- okCaption,
533
- nodes,
534
- appearance: 'outline',
535
- canAppend
536
- },
537
- closeOnNavigation: false,
538
- minWidth: '375px',
539
- maxWidth: `${width}px`,
540
- width: '100%'
541
- });
542
- }
543
- /**
544
- * Open a picture-selection dialog.
545
- * @param title - Dialog title.
546
- * @param description - Brief description shown in the dialog.
547
- * @param okCaption - Label for the confirm button.
548
- * @param options - Checkable option list.
549
- * @param width - Maximum dialog width in pixels.
550
- * @param maxSize - Maximum accepted file size in MB.
551
- * @param maxPictureWidth - Maximum accepted picture width in pixels.
552
- * @param maxPictureHeight - Maximum accepted picture height in pixels.
553
- * @returns The opened dialog reference.
554
- */
555
- async selectPicture(title = 'Seleziona immagine', description, okCaption = 'Ok', options, width = 600, maxSize, maxPictureWidth, maxPictureHeight) {
556
- const { SelectPictureDialogComponent } = await import('@arsedizioni/ars-utils/ui.files');
557
- return this.open(SelectPictureDialogComponent, {
558
- ariaLabel: 'seleziona immagine',
559
- autoFocus: 'dialog',
560
- restoreFocus: false,
561
- data: {
562
- title,
563
- description,
564
- okCaption,
565
- options,
566
- appearance: this.appearance(),
567
- maxSize,
568
- maxWidth: maxPictureWidth,
569
- maxHeight: maxPictureHeight
570
- },
571
- closeOnNavigation: false,
572
- disableClose: true,
573
- minWidth: '375px',
574
- maxWidth: `${width}px`,
575
- width: '100%'
576
- });
577
- }
578
- /**
579
- * Open a file-selection dialog.
580
- * @param title - Dialog title.
581
- * @param description - Brief description shown in the dialog.
582
- * @param okCaption - Label for the confirm button.
583
- * @param helpLink - URL for the help link.
584
- * @param helpCaption - Display text for the help link.
585
- * @param options - Checkable option list.
586
- * @param width - Maximum dialog width in pixels.
587
- * @param maxSize - Maximum accepted file size in MB.
588
- * @param accept - Accepted file extensions (e.g. `.pdf,.docx`).
589
- * @returns The opened dialog reference.
590
- */
591
- async selectFile(title = 'Seleziona file', description, okCaption = 'Ok', helpLink, helpCaption, options, width = 600, maxSize, accept) {
592
- const { SelectFileDialogComponent } = await import('@arsedizioni/ars-utils/ui.files');
593
- return this.open(SelectFileDialogComponent, {
594
- ariaLabel: 'seleziona file',
595
- autoFocus: 'dialog',
596
- restoreFocus: false,
597
- data: {
598
- title,
599
- description,
600
- okCaption,
601
- helpLink,
602
- helpCaption,
603
- options,
604
- appearance: this.appearance(),
605
- maxSize,
606
- accept
607
- },
608
- closeOnNavigation: false,
609
- disableClose: true,
610
- minWidth: '375px',
611
- maxWidth: `${width}px`,
612
- width: '100%'
613
- });
614
- }
615
- /**
616
- * Open a multipurpose selection and CRUD dialog.
617
- * @param data - The dialog configuration model.
618
- * @param disableClose - Whether the dialog can be closed by clicking outside.
619
- * @param closeOnNavigation - Whether the dialog closes on route navigation.
620
- * @returns The opened dialog reference.
621
- */
622
- async select(data, disableClose = true, closeOnNavigation = true) {
623
- const { SelectDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.select');
624
- const dialogData = { ...data, appearance: data.appearance ?? 'outline' };
625
- return this.open(SelectDialogComponent, {
626
- ariaLabel: 'seleziona',
627
- autoFocus: 'dialog',
628
- restoreFocus: false,
629
- data: dialogData,
630
- closeOnNavigation: closeOnNavigation,
631
- disableClose: disableClose,
632
- minWidth: '375px',
633
- maxWidth: `${data.width ?? 800}px`,
634
- width: '100%'
635
- });
636
- }
637
- /**
638
- * Prompt the user to enter a value.
639
- * @param title - Dialog title.
640
- * @param type - The input type (default, text, number, etc.).
641
- * @param description - Placeholder or description text.
642
- * @param initialValue - Pre-filled value.
643
- * @param okCaption - Label for the confirm button.
644
- * @param cancelCaption - Label for the cancel button.
645
- * @param options - Checkable option list.
646
- * @param width - Maximum dialog width in pixels.
647
- * @param required - Whether the input is required.
648
- * @returns The opened dialog reference.
649
- */
650
- async prompt(title, type = PromptDialogType.Default, description, initialValue, okCaption = 'Ok', cancelCaption = 'Annulla', options, width = 500, required) {
651
- const { PromptDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.prompt');
652
- return this.open(PromptDialogComponent, {
653
- ariaLabel: 'inserisci valore',
654
- autoFocus: 'dialog',
655
- restoreFocus: false,
656
- data: {
657
- title,
658
- type,
659
- description,
660
- initialValue,
661
- okCaption,
662
- cancelCaption,
663
- appearance: this.appearance(),
664
- required,
665
- options
666
- },
667
- closeOnNavigation: false,
668
- disableClose: true,
669
- minWidth: '375px',
670
- maxWidth: `${width}px`,
671
- width: '100%'
672
- });
673
- }
674
- /**
675
- * Prompt the user to enter a date or date interval.
676
- * @param title - Dialog title.
677
- * @param type - Date or DateInterval.
678
- * @param description - Placeholder or description text.
679
- * @param initialValue - Pre-filled value.
680
- * @param okCaption - Label for the confirm button.
681
- * @param cancelCaption - Label for the cancel button.
682
- * @param options - Checkable option list.
683
- * @param width - Maximum dialog width in pixels.
684
- * @param required - Whether the input is required.
685
- * @returns The opened dialog reference.
686
- */
687
- async promptDate(title, type = PromptDialogType.Date, description, initialValue, okCaption = 'Ok', cancelCaption = 'Annulla', options, width = 500, required) {
688
- const { PromptDateDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.prompt');
689
- return this.open(PromptDateDialogComponent, {
690
- ariaLabel: 'inserisci data',
691
- autoFocus: 'dialog',
692
- restoreFocus: false,
693
- data: {
694
- title,
695
- type,
696
- description,
697
- initialValue,
698
- okCaption,
699
- cancelCaption,
700
- appearance: this.appearance(),
701
- required,
702
- options
703
- },
704
- closeOnNavigation: false,
705
- disableClose: true,
706
- minWidth: '375px',
707
- maxWidth: `${width}px`,
708
- width: '100%'
709
- });
710
- }
711
- /**
712
- * Prompt the user to enter a time value.
713
- * @param title - Dialog title.
714
- * @param description - Placeholder or description text.
715
- * @param slots - Optional time slots string.
716
- * @param initialValue - Pre-filled value.
717
- * @param okCaption - Label for the confirm button.
718
- * @param cancelCaption - Label for the cancel button.
719
- * @param options - Checkable option list.
720
- * @param width - Maximum dialog width in pixels.
721
- * @param required - Whether the input is required.
722
- * @returns The opened dialog reference.
723
- */
724
- async promptTime(title, description, slots, initialValue, okCaption = 'Ok', cancelCaption = 'Annulla', options, width = 500, required) {
725
- const { PromptTimeDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.prompt');
726
- return this.open(PromptTimeDialogComponent, {
727
- ariaLabel: 'inserisci orario',
728
- autoFocus: 'dialog',
729
- restoreFocus: false,
730
- data: {
731
- title,
732
- type: PromptDialogType.Time,
733
- description,
734
- slots,
735
- initialValue,
736
- okCaption,
737
- cancelCaption,
738
- appearance: this.appearance(),
739
- required,
740
- options
741
- },
742
- closeOnNavigation: false,
743
- disableClose: true,
744
- minWidth: '375px',
745
- maxWidth: `${width}px`,
746
- width: '100%'
747
- });
748
- }
749
- /**
750
- * Prompt the user to enter an OTP code.
751
- * @param title - Dialog title.
752
- * @param description - Description text shown in the dialog.
753
- * @param okCaption - Label for the confirm button.
754
- * @param cancelCaption - Label for the cancel button.
755
- * @param width - Maximum dialog width in pixels.
756
- * @returns The opened dialog reference.
757
- */
758
- async promptOtp(title = 'Conferma la tua identità', description, okCaption = 'Ok', cancelCaption = 'Annulla', width = 500) {
759
- const { PromptOtpDialogComponent } = await import('@arsedizioni/ars-utils/ui.dialogs.auth');
760
- return this.open(PromptOtpDialogComponent, {
761
- ariaLabel: 'inserisci codice OTP',
762
- autoFocus: 'dialog',
763
- restoreFocus: false,
764
- data: {
765
- title,
766
- type: PromptDialogType.Default,
767
- description,
768
- okCaption,
769
- cancelCaption,
770
- appearance: this.appearance(),
771
- },
772
- closeOnNavigation: false,
773
- disableClose: true,
774
- minWidth: '375px',
775
- maxWidth: `${width}px`,
776
- width: '100%'
777
- });
778
- }
779
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DialogService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
780
- static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.7", ngImport: i0, type: DialogService }); }
781
- }
782
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: DialogService, decorators: [{
783
- type: Service
784
- }], ctorParameters: () => [] });
785
-
786
- /*
787
- * Public API Surface of @arsedizioni/ars-utils/ui.dialogs
788
- */
789
-
790
- /**
791
- * Generated bundle index. Do not edit.
792
- */
793
-
306
+ var DeleteDialogComponent = class DeleteDialogComponent {
307
+ constructor() {
308
+ this.getErrorMessage = SignalsUtils.getFieldErrorMessage;
309
+ this.choosen = output();
310
+ this.dialogRef = inject(MatDialogRef);
311
+ this.dialogData = signal((() => {
312
+ const raw = inject(MAT_DIALOG_DATA) ?? {};
313
+ return {
314
+ title: "Attenzione",
315
+ okCaption: "Si",
316
+ cancelCaption: "No",
317
+ confirmMode: DeleteDialogConfirmMode.None,
318
+ message: "",
319
+ ...raw
320
+ };
321
+ })(), ...ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []);
322
+ this.model = signal({
323
+ confirmed: this.dialogData().confirmMode !== DeleteDialogConfirmMode.Simple,
324
+ confirmValue: ""
325
+ }, ...ngDevMode ? [{ debugName: "model" }] : /* istanbul ignore next */ []);
326
+ this.form = form(this.model, (p) => {
327
+ validate(p.confirmed, ({ value }) => this.dialogData().confirmMode !== DeleteDialogConfirmMode.Simple || value() ? void 0 : {
328
+ kind: "confirmed",
329
+ message: "Confermo la cancellazione"
330
+ });
331
+ required(p.confirmValue, {
332
+ message: "Digita la parola \"elimina\"",
333
+ when: () => this.dialogData().confirmMode === DeleteDialogConfirmMode.Strong
334
+ });
335
+ validate(p.confirmValue, ({ value }) => this.dialogData().confirmMode !== DeleteDialogConfirmMode.Strong || !value() || value().toLowerCase() === "elimina" ? void 0 : {
336
+ kind: "confirmValue",
337
+ message: "Digita la parola \"elimina\""
338
+ });
339
+ });
340
+ }
341
+ ok() {
342
+ this.choosen.emit({ result: "ok" });
343
+ this.dialogRef.close();
344
+ }
345
+ cancel() {
346
+ this.choosen.emit({ result: "cancel" });
347
+ this.dialogRef.close();
348
+ }
349
+ static {
350
+ this.ɵfac = i0.ɵɵngDeclareFactory({
351
+ minVersion: "12.0.0",
352
+ version: "22.2.1",
353
+ ngImport: i0,
354
+ type: DeleteDialogComponent,
355
+ deps: [],
356
+ target: i0.ɵɵFactoryTarget.Component
357
+ });
358
+ }
359
+ static {
360
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
361
+ minVersion: "17.0.0",
362
+ version: "22.2.1",
363
+ type: DeleteDialogComponent,
364
+ isStandalone: true,
365
+ selector: "ng-component",
366
+ outputs: { choosen: "choosen" },
367
+ ngImport: i0,
368
+ template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n <form [formRoot]=\"form\" novalidate>\r\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxFill>\r\n <div fxFlex=\"*\">\r\n @if (dialogData().message) {\r\n <div [innerHtml]=\"dialogData().message | safeHtml\"></div>\r\n }\r\n </div>\r\n @if (dialogData().details) {\r\n <div class=\"details-box\">\r\n <p class=\"x-small uppercase secondary\">Dettaglio:</p>\r\n <div class=\"small details\">\r\n <div [innerHtml]=\"dialogData().details | safeHtml\"></div>\r\n </div>\r\n </div>\r\n }\r\n @if (dialogData().confirmMode === 1) {\r\n <div>\r\n <mat-checkbox [formField]=\"form.confirmed\">\r\n Confermo la cancellazione\r\n </mat-checkbox>\r\n </div>\r\n } @else if (dialogData().confirmMode === 2) {\r\n <p>Per confermare la cancellazione digita la parola <i><b>elimina</b></i>.</p>\r\n <mat-form-field style=\"width: 200px\" [appearance]=\"dialogData().appearance\">\r\n <mat-label>Conferma</mat-label>\r\n <input matInput [formField]=\"form.confirmValue\"\r\n [attr.aria-label]=\"'Digita la parola -elimina-'\">\r\n @if (form.confirmValue().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.confirmValue().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n }\r\n <br>\r\n </div>\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"end center\" fxFill>\r\n <button mat-flat-button (click)=\"ok()\" [disabled]=\"form().invalid()\"\r\n [mat-dialog-close]=\"true\">{{dialogData().okCaption}}</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\"\r\n (click)=\"cancel()\">{{dialogData().cancelCaption}}</button>\r\n </div>\r\n</mat-dialog-actions>\r\n",
369
+ styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}.details-box{border-top:1px solid var(--ars-color-divider, #757d87)}.details{background-color:var(--ars-item-hover-background-color, #eaecef);border-radius:5px;max-height:350px;padding:8px 12px;overflow:auto}\n"],
370
+ dependencies: [
371
+ {
372
+ kind: "directive",
373
+ type: MatDialogTitle,
374
+ selector: "[mat-dialog-title], [matDialogTitle]",
375
+ inputs: ["id"],
376
+ exportAs: ["matDialogTitle"]
377
+ },
378
+ {
379
+ kind: "directive",
380
+ type: MatDialogContent,
381
+ selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]"
382
+ },
383
+ {
384
+ kind: "directive",
385
+ type: MatDialogClose,
386
+ selector: "[mat-dialog-close], [matDialogClose]",
387
+ inputs: [
388
+ "aria-label",
389
+ "type",
390
+ "mat-dialog-close",
391
+ "matDialogClose"
392
+ ],
393
+ exportAs: ["matDialogClose"]
394
+ },
395
+ {
396
+ kind: "ngmodule",
397
+ type: FlexLayoutModule
398
+ },
399
+ {
400
+ kind: "directive",
401
+ type: i1.FxLayoutDirective,
402
+ selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ",
403
+ inputs: [
404
+ "fxLayout",
405
+ "fxLayout.xs",
406
+ "fxLayout.sm",
407
+ "fxLayout.md",
408
+ "fxLayout.lg",
409
+ "fxLayout.xl",
410
+ "fxLayout.lt-sm",
411
+ "fxLayout.lt-md",
412
+ "fxLayout.lt-lg",
413
+ "fxLayout.lt-xl",
414
+ "fxLayout.gt-xs",
415
+ "fxLayout.gt-sm",
416
+ "fxLayout.gt-md",
417
+ "fxLayout.gt-lg"
418
+ ]
419
+ },
420
+ {
421
+ kind: "directive",
422
+ type: i1.FxFlexDirective,
423
+ selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ",
424
+ inputs: [
425
+ "fxFlex",
426
+ "fxFlex.xs",
427
+ "fxFlex.sm",
428
+ "fxFlex.md",
429
+ "fxFlex.lg",
430
+ "fxFlex.xl",
431
+ "fxFlex.lt-sm",
432
+ "fxFlex.lt-md",
433
+ "fxFlex.lt-lg",
434
+ "fxFlex.lt-xl",
435
+ "fxFlex.gt-xs",
436
+ "fxFlex.gt-sm",
437
+ "fxFlex.gt-md",
438
+ "fxFlex.gt-lg"
439
+ ]
440
+ },
441
+ {
442
+ kind: "directive",
443
+ type: i1.FxLayoutAlignDirective,
444
+ selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ",
445
+ inputs: [
446
+ "fxLayoutAlign",
447
+ "fxLayoutAlign.xs",
448
+ "fxLayoutAlign.sm",
449
+ "fxLayoutAlign.md",
450
+ "fxLayoutAlign.lg",
451
+ "fxLayoutAlign.xl",
452
+ "fxLayoutAlign.lt-sm",
453
+ "fxLayoutAlign.lt-md",
454
+ "fxLayoutAlign.lt-lg",
455
+ "fxLayoutAlign.lt-xl",
456
+ "fxLayoutAlign.gt-xs",
457
+ "fxLayoutAlign.gt-sm",
458
+ "fxLayoutAlign.gt-md",
459
+ "fxLayoutAlign.gt-lg"
460
+ ]
461
+ },
462
+ {
463
+ kind: "directive",
464
+ type: i1.FxLayoutGapDirective,
465
+ selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ",
466
+ inputs: [
467
+ "fxLayoutGap",
468
+ "fxLayoutGap.xs",
469
+ "fxLayoutGap.sm",
470
+ "fxLayoutGap.md",
471
+ "fxLayoutGap.lg",
472
+ "fxLayoutGap.xl",
473
+ "fxLayoutGap.lt-sm",
474
+ "fxLayoutGap.lt-md",
475
+ "fxLayoutGap.lt-lg",
476
+ "fxLayoutGap.lt-xl",
477
+ "fxLayoutGap.gt-xs",
478
+ "fxLayoutGap.gt-sm",
479
+ "fxLayoutGap.gt-md",
480
+ "fxLayoutGap.gt-lg"
481
+ ]
482
+ },
483
+ {
484
+ kind: "directive",
485
+ type: i1.FxFlexFillDirective,
486
+ selector: " [fxFlexFill], [fxFill], [fxFlexFill.xs], [fxFlexFill.sm], [fxFlexFill.md], [fxFlexFill.lg], [fxFlexFill.xl], [fxFlexFill.lt-sm], [fxFlexFill.lt-md], [fxFlexFill.lt-lg], [fxFlexFill.lt-xl], [fxFlexFill.gt-xs], [fxFlexFill.gt-sm], [fxFlexFill.gt-md], [fxFlexFill.gt-lg] ",
487
+ inputs: [
488
+ "fxFlexFill",
489
+ "fxFill",
490
+ "fxFlexFill.xs",
491
+ "fxFlexFill.sm",
492
+ "fxFlexFill.md",
493
+ "fxFlexFill.lg",
494
+ "fxFlexFill.xl",
495
+ "fxFlexFill.lt-sm",
496
+ "fxFlexFill.lt-md",
497
+ "fxFlexFill.lt-lg",
498
+ "fxFlexFill.lt-xl",
499
+ "fxFlexFill.gt-xs",
500
+ "fxFlexFill.gt-sm",
501
+ "fxFlexFill.gt-md",
502
+ "fxFlexFill.gt-lg"
503
+ ]
504
+ },
505
+ {
506
+ kind: "ngmodule",
507
+ type: MatCheckboxModule
508
+ },
509
+ {
510
+ kind: "component",
511
+ type: i2$1.MatCheckbox,
512
+ selector: "mat-checkbox",
513
+ inputs: [
514
+ "aria-label",
515
+ "aria-labelledby",
516
+ "aria-describedby",
517
+ "aria-expanded",
518
+ "aria-controls",
519
+ "aria-owns",
520
+ "id",
521
+ "required",
522
+ "labelPosition",
523
+ "name",
524
+ "value",
525
+ "disableRipple",
526
+ "tabIndex",
527
+ "color",
528
+ "disabledInteractive",
529
+ "checked",
530
+ "disabled",
531
+ "indeterminate"
532
+ ],
533
+ outputs: ["change", "indeterminateChange"],
534
+ exportAs: ["matCheckbox"]
535
+ },
536
+ {
537
+ kind: "directive",
538
+ type: FormField,
539
+ selector: "[formField]",
540
+ inputs: ["formField"],
541
+ exportAs: ["formField"]
542
+ },
543
+ {
544
+ kind: "directive",
545
+ type: FormRoot,
546
+ selector: "form[formRoot]",
547
+ inputs: ["formRoot"]
548
+ },
549
+ {
550
+ kind: "directive",
551
+ type: MatDialogActions,
552
+ selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",
553
+ inputs: ["align"]
554
+ },
555
+ {
556
+ kind: "ngmodule",
557
+ type: MatButtonModule
558
+ },
559
+ {
560
+ kind: "component",
561
+ type: i3.MatButton,
562
+ selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
563
+ inputs: ["matButton"],
564
+ exportAs: ["matButton", "matAnchor"]
565
+ },
566
+ {
567
+ kind: "ngmodule",
568
+ type: MatFormFieldModule
569
+ },
570
+ {
571
+ kind: "component",
572
+ type: i4.MatFormField,
573
+ selector: "mat-form-field",
574
+ inputs: [
575
+ "hideRequiredMarker",
576
+ "color",
577
+ "floatLabel",
578
+ "appearance",
579
+ "subscriptSizing",
580
+ "hintLabel"
581
+ ],
582
+ exportAs: ["matFormField"]
583
+ },
584
+ {
585
+ kind: "directive",
586
+ type: i4.MatLabel,
587
+ selector: "mat-label"
588
+ },
589
+ {
590
+ kind: "directive",
591
+ type: i4.MatError,
592
+ selector: "mat-error, [matError]",
593
+ inputs: ["id"]
594
+ },
595
+ {
596
+ kind: "ngmodule",
597
+ type: MatInputModule
598
+ },
599
+ {
600
+ kind: "directive",
601
+ type: i5.MatInput,
602
+ selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]",
603
+ inputs: [
604
+ "disabled",
605
+ "id",
606
+ "placeholder",
607
+ "name",
608
+ "required",
609
+ "type",
610
+ "errorStateMatcher",
611
+ "aria-describedby",
612
+ "value",
613
+ "readonly",
614
+ "disabledInteractive"
615
+ ],
616
+ exportAs: ["matInput"]
617
+ },
618
+ {
619
+ kind: "pipe",
620
+ type: SafeHtmlPipe,
621
+ name: "safeHtml"
622
+ }
623
+ ],
624
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
625
+ });
626
+ }
627
+ };
628
+ i0.ɵɵngDeclareClassMetadata({
629
+ minVersion: "12.0.0",
630
+ version: "22.2.1",
631
+ ngImport: i0,
632
+ type: DeleteDialogComponent,
633
+ decorators: [{
634
+ type: Component,
635
+ args: [{
636
+ standalone: true,
637
+ changeDetection: ChangeDetectionStrategy.OnPush,
638
+ imports: [
639
+ MatDialogTitle,
640
+ MatDialogContent,
641
+ MatDialogClose,
642
+ FlexLayoutModule,
643
+ MatCheckboxModule,
644
+ FormField,
645
+ FormRoot,
646
+ MatDialogActions,
647
+ MatButtonModule,
648
+ MatFormFieldModule,
649
+ MatInputModule,
650
+ SafeHtmlPipe
651
+ ],
652
+ template: "<div mat-dialog-title [innerHTML]=\"dialogData().title | safeHtml\"></div>\r\n<mat-dialog-content class=\"dialog-content\">\r\n <form [formRoot]=\"form\" novalidate>\r\n <div fxLayout=\"column\" fxLayoutGap=\"24px\" fxFill>\r\n <div fxFlex=\"*\">\r\n @if (dialogData().message) {\r\n <div [innerHtml]=\"dialogData().message | safeHtml\"></div>\r\n }\r\n </div>\r\n @if (dialogData().details) {\r\n <div class=\"details-box\">\r\n <p class=\"x-small uppercase secondary\">Dettaglio:</p>\r\n <div class=\"small details\">\r\n <div [innerHtml]=\"dialogData().details | safeHtml\"></div>\r\n </div>\r\n </div>\r\n }\r\n @if (dialogData().confirmMode === 1) {\r\n <div>\r\n <mat-checkbox [formField]=\"form.confirmed\">\r\n Confermo la cancellazione\r\n </mat-checkbox>\r\n </div>\r\n } @else if (dialogData().confirmMode === 2) {\r\n <p>Per confermare la cancellazione digita la parola <i><b>elimina</b></i>.</p>\r\n <mat-form-field style=\"width: 200px\" [appearance]=\"dialogData().appearance\">\r\n <mat-label>Conferma</mat-label>\r\n <input matInput [formField]=\"form.confirmValue\"\r\n [attr.aria-label]=\"'Digita la parola -elimina-'\">\r\n @if (form.confirmValue().invalid()) {\r\n <mat-error>{{ getErrorMessage(form.confirmValue().errors()) }}</mat-error>\r\n }\r\n </mat-form-field>\r\n }\r\n <br>\r\n </div>\r\n </form>\r\n</mat-dialog-content>\r\n<mat-dialog-actions>\r\n <div fxLayout=\"row\" fxLayoutGap=\"10px\" fxLayoutAlign=\"end center\" fxFill>\r\n <button mat-flat-button (click)=\"ok()\" [disabled]=\"form().invalid()\"\r\n [mat-dialog-close]=\"true\">{{dialogData().okCaption}}</button>\r\n <button mat-stroked-button [mat-dialog-close]=\"true\"\r\n (click)=\"cancel()\">{{dialogData().cancelCaption}}</button>\r\n </div>\r\n</mat-dialog-actions>\r\n",
653
+ styles: [".fill,.wide{min-width:100%!important;max-width:100%!important;width:100%!important}.dialog-info{font-size:x-small;font-weight:700;text-align:right;padding:10px}.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #388E3C)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #a80710)}.dialog-header{padding-bottom:20px}.dialog-toolbar{padding:0 5px 0 24px;height:48px;min-height:48px}.dialog-close{margin-right:5px;margin-top:0}.dialog-menu{margin-left:10px;margin-top:10px}.dialog-title{padding:0 24px}.section-title{font-size:large;font-weight:600;padding-top:10px;padding-bottom:8px}.center{text-align:center}.fill{min-height:100%!important;max-height:100%!important;height:100%!important}.scroll-auto{overflow:auto;height:100%}.scroll-hidden{overflow:hidden;height:100%}b{font-weight:700}.large{font-size:large!important;line-height:1.2!important}.smaller{font-size:smaller!important;line-height:1.2!important}.small{font-size:small!important;line-height:1.2!important}.small-icon-button{width:1.5rem!important;height:1.5rem!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center}.small-icon-button .mat-mdc-button-touch-target{width:1.5rem!important;height:1.5rem!important}.x-small{font-size:x-small!important;line-height:1.2!important}.bold{font-weight:700}.uppercase{text-transform:uppercase!important}.lowercase{text-transform:lowercase!important}.truncated{min-width:0;max-width:100%}@supports (-webkit-line-clamp: 2){.truncated{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.truncated span,.truncated div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}@supports (-webkit-line-clamp: 2){.truncated span,.truncated div{overflow:hidden;text-overflow:ellipsis;white-space:initial;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}}.clipped{min-width:0;max-width:100%}.clipped span,.clipped div{white-space:nowrap;overflow:hidden;text-overflow:clip}.accent{color:var(--ars-color-accent, #7894ae)!important}.primary{color:var(--ars-color-primary, #00a293)!important}.secondary{color:var(--ars-color-secondary, #4a635f)!important}.error{color:var(--ars-color-error, #ff5449)!important}.success{color:var(--ars-color-ok, #388E3C)!important}.warning{color:var(--ars-color-warning, #FFC107)!important}.text{color:var(--ars-color-text, #191c1b)!important}.overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;background-color:var(--ars-color-overlay, rgba(255, 255, 255, .75))}.drawer-content{padding-top:10px}.drawer .title-container,.drawer .title-container-with-loader,.drawer-small .title-container,.drawer-small .title-container-with-loader{padding-right:5px;padding-bottom:20px;padding-left:0}.drawer .title-container,.drawer-small .title-container{padding-top:20px}.drawer .title-container-with-loader,.drawer-small .title-container-with-loader{padding-top:14px}.drawer .title,.drawer-small .title{font-size:19.2px!important;font-weight:600;padding-left:15px;min-width:150px;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drawer .accordion-panel,.drawer-small .accordion-panel{background-color:transparent!important}.drawer .accordion-header,.drawer-small .accordion-header{padding-left:10px;padding-right:10px;border-radius:var(--mat-expansion-container-shape)}.drawer .mat-expansion-panel-body,.drawer-small .mat-expansion-panel-body{padding-left:10px!important;padding-right:10px!important;padding-bottom:20px!important}@media screen and (min-width:0px)and (max-width:430px){.drawer,.drawer-small{border-radius:0!important;min-width:100%!important;max-width:100%!important}}@media screen and (min-width:431px){.drawer{min-width:420px!important;max-width:420px!important}.drawer .title{min-width:200px}.drawer .mat-expansion-panel-body{padding-left:15px!important;padding-right:15px!important;padding-bottom:20px!important}.drawer-small{min-width:360px!important;max-width:360px!important}}.drawer-with-loader{padding-top:0!important}.drawer-transparent{background-color:transparent}.fade-in{animation:fadein .5s linear}@keyframes fadein{0%{opacity:0}to{opacity:1}}.bright{filter:brightness(.7)!important}@media(prefers-color-scheme:dark){.dialog-info-green,.dialog-info-ok{color:var(--ars-color-ok, #4CAF50)}.dialog-info-red,.dialog-info-error{color:var(--mat-form-field-error-text-color, #ff5449)}b,.bold{font-weight:600}.bright{filter:brightness(1.5)!important}}.dialog-content{padding:0 24px 24px!important}.details-box{border-top:1px solid var(--ars-color-divider, #757d87)}.details{background-color:var(--ars-item-hover-background-color, #eaecef);border-radius:5px;max-height:350px;padding:8px 12px;overflow:auto}\n"]
654
+ }]
655
+ }],
656
+ propDecorators: { choosen: [{
657
+ type: i0.Output,
658
+ args: ["choosen"]
659
+ }] }
660
+ });
661
+ var ToastComponent = class ToastComponent {
662
+ constructor() {
663
+ this.action = output();
664
+ this.dialogData = signal(inject(MAT_SNACK_BAR_DATA) ?? { message: "" }, ...ngDevMode ? [{ debugName: "dialogData" }] : /* istanbul ignore next */ []);
665
+ }
666
+ do() {
667
+ this.action.emit();
668
+ }
669
+ static {
670
+ this.ɵfac = i0.ɵɵngDeclareFactory({
671
+ minVersion: "12.0.0",
672
+ version: "22.2.1",
673
+ ngImport: i0,
674
+ type: ToastComponent,
675
+ deps: [],
676
+ target: i0.ɵɵFactoryTarget.Component
677
+ });
678
+ }
679
+ static {
680
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
681
+ minVersion: "17.0.0",
682
+ version: "22.2.1",
683
+ type: ToastComponent,
684
+ isStandalone: true,
685
+ selector: "ng-component",
686
+ outputs: { action: "action" },
687
+ ngImport: i0,
688
+ template: "<div fxLayout=\"row\" fxLayoutGap=\"10px\">\r\n @if (dialogData().icon) {\r\n <div fxFlex='30px' fxLayoutAlign=\"start\" fxFlexAlign=\"center\">\r\n <mat-icon>{{dialogData().icon}}</mat-icon>\r\n </div>\r\n }\r\n <div fxFlex='*' fxLayoutAlign=\"start\" fxFlexAlign=\"center\">\r\n @if (dialogData().message) {\r\n <span [innerHTML]=\"dialogData().message | safeHtml\"></span>\r\n }\r\n </div>\r\n @if (dialogData().actionCaption) {\r\n <div fxLayoutAlign=\"end\" fxFlexAlign=\"center\">\r\n <div style=\"padding-left: 20px;\">\r\n <button type=\"button\" mat-flat-button (click)=\"do()\"\r\n [innerHTML]=\"dialogData().actionCaption\"></button>\r\n </div>\r\n </div>\r\n }\r\n</div>",
689
+ styles: [""],
690
+ dependencies: [
691
+ {
692
+ kind: "ngmodule",
693
+ type: FlexLayoutModule
694
+ },
695
+ {
696
+ kind: "directive",
697
+ type: i1.FxLayoutDirective,
698
+ selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg] ",
699
+ inputs: [
700
+ "fxLayout",
701
+ "fxLayout.xs",
702
+ "fxLayout.sm",
703
+ "fxLayout.md",
704
+ "fxLayout.lg",
705
+ "fxLayout.xl",
706
+ "fxLayout.lt-sm",
707
+ "fxLayout.lt-md",
708
+ "fxLayout.lt-lg",
709
+ "fxLayout.lt-xl",
710
+ "fxLayout.gt-xs",
711
+ "fxLayout.gt-sm",
712
+ "fxLayout.gt-md",
713
+ "fxLayout.gt-lg"
714
+ ]
715
+ },
716
+ {
717
+ kind: "directive",
718
+ type: i1.FxFlexDirective,
719
+ selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg] ",
720
+ inputs: [
721
+ "fxFlex",
722
+ "fxFlex.xs",
723
+ "fxFlex.sm",
724
+ "fxFlex.md",
725
+ "fxFlex.lg",
726
+ "fxFlex.xl",
727
+ "fxFlex.lt-sm",
728
+ "fxFlex.lt-md",
729
+ "fxFlex.lt-lg",
730
+ "fxFlex.lt-xl",
731
+ "fxFlex.gt-xs",
732
+ "fxFlex.gt-sm",
733
+ "fxFlex.gt-md",
734
+ "fxFlex.gt-lg"
735
+ ]
736
+ },
737
+ {
738
+ kind: "directive",
739
+ type: i1.FxLayoutAlignDirective,
740
+ selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg] ",
741
+ inputs: [
742
+ "fxLayoutAlign",
743
+ "fxLayoutAlign.xs",
744
+ "fxLayoutAlign.sm",
745
+ "fxLayoutAlign.md",
746
+ "fxLayoutAlign.lg",
747
+ "fxLayoutAlign.xl",
748
+ "fxLayoutAlign.lt-sm",
749
+ "fxLayoutAlign.lt-md",
750
+ "fxLayoutAlign.lt-lg",
751
+ "fxLayoutAlign.lt-xl",
752
+ "fxLayoutAlign.gt-xs",
753
+ "fxLayoutAlign.gt-sm",
754
+ "fxLayoutAlign.gt-md",
755
+ "fxLayoutAlign.gt-lg"
756
+ ]
757
+ },
758
+ {
759
+ kind: "directive",
760
+ type: i1.FxLayoutGapDirective,
761
+ selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg] ",
762
+ inputs: [
763
+ "fxLayoutGap",
764
+ "fxLayoutGap.xs",
765
+ "fxLayoutGap.sm",
766
+ "fxLayoutGap.md",
767
+ "fxLayoutGap.lg",
768
+ "fxLayoutGap.xl",
769
+ "fxLayoutGap.lt-sm",
770
+ "fxLayoutGap.lt-md",
771
+ "fxLayoutGap.lt-lg",
772
+ "fxLayoutGap.lt-xl",
773
+ "fxLayoutGap.gt-xs",
774
+ "fxLayoutGap.gt-sm",
775
+ "fxLayoutGap.gt-md",
776
+ "fxLayoutGap.gt-lg"
777
+ ]
778
+ },
779
+ {
780
+ kind: "directive",
781
+ type: i1.FxFlexAlignDirective,
782
+ selector: " [fxFlexAlign], [fxFlexAlign.xs], [fxFlexAlign.sm], [fxFlexAlign.md], [fxFlexAlign.lg], [fxFlexAlign.xl], [fxFlexAlign.lt-sm], [fxFlexAlign.lt-md], [fxFlexAlign.lt-lg], [fxFlexAlign.lt-xl], [fxFlexAlign.gt-xs], [fxFlexAlign.gt-sm], [fxFlexAlign.gt-md], [fxFlexAlign.gt-lg] ",
783
+ inputs: [
784
+ "fxFlexAlign",
785
+ "fxFlexAlign.xs",
786
+ "fxFlexAlign.sm",
787
+ "fxFlexAlign.md",
788
+ "fxFlexAlign.lg",
789
+ "fxFlexAlign.xl",
790
+ "fxFlexAlign.lt-sm",
791
+ "fxFlexAlign.lt-md",
792
+ "fxFlexAlign.lt-lg",
793
+ "fxFlexAlign.lt-xl",
794
+ "fxFlexAlign.gt-xs",
795
+ "fxFlexAlign.gt-sm",
796
+ "fxFlexAlign.gt-md",
797
+ "fxFlexAlign.gt-lg"
798
+ ]
799
+ },
800
+ {
801
+ kind: "ngmodule",
802
+ type: MatIconModule
803
+ },
804
+ {
805
+ kind: "component",
806
+ type: i2.MatIcon,
807
+ selector: "mat-icon",
808
+ inputs: [
809
+ "color",
810
+ "inline",
811
+ "svgIcon",
812
+ "fontSet",
813
+ "fontIcon"
814
+ ],
815
+ exportAs: ["matIcon"]
816
+ },
817
+ {
818
+ kind: "ngmodule",
819
+ type: MatButtonModule
820
+ },
821
+ {
822
+ kind: "component",
823
+ type: i3.MatButton,
824
+ selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
825
+ inputs: ["matButton"],
826
+ exportAs: ["matButton", "matAnchor"]
827
+ },
828
+ {
829
+ kind: "pipe",
830
+ type: SafeHtmlPipe,
831
+ name: "safeHtml"
832
+ }
833
+ ],
834
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
835
+ });
836
+ }
837
+ };
838
+ i0.ɵɵngDeclareClassMetadata({
839
+ minVersion: "12.0.0",
840
+ version: "22.2.1",
841
+ ngImport: i0,
842
+ type: ToastComponent,
843
+ decorators: [{
844
+ type: Component,
845
+ args: [{
846
+ standalone: true,
847
+ changeDetection: ChangeDetectionStrategy.OnPush,
848
+ imports: [
849
+ FlexLayoutModule,
850
+ MatIconModule,
851
+ MatButtonModule,
852
+ SafeHtmlPipe
853
+ ],
854
+ template: "<div fxLayout=\"row\" fxLayoutGap=\"10px\">\r\n @if (dialogData().icon) {\r\n <div fxFlex='30px' fxLayoutAlign=\"start\" fxFlexAlign=\"center\">\r\n <mat-icon>{{dialogData().icon}}</mat-icon>\r\n </div>\r\n }\r\n <div fxFlex='*' fxLayoutAlign=\"start\" fxFlexAlign=\"center\">\r\n @if (dialogData().message) {\r\n <span [innerHTML]=\"dialogData().message | safeHtml\"></span>\r\n }\r\n </div>\r\n @if (dialogData().actionCaption) {\r\n <div fxLayoutAlign=\"end\" fxFlexAlign=\"center\">\r\n <div style=\"padding-left: 20px;\">\r\n <button type=\"button\" mat-flat-button (click)=\"do()\"\r\n [innerHTML]=\"dialogData().actionCaption\"></button>\r\n </div>\r\n </div>\r\n }\r\n</div>"
855
+ }]
856
+ }],
857
+ propDecorators: { action: [{
858
+ type: i0.Output,
859
+ args: ["action"]
860
+ }] }
861
+ });
862
+ var DialogService = class DialogService extends ShellService {
863
+ setAppearance(value) {
864
+ this.uiService.setAppearance(value);
865
+ }
866
+ constructor() {
867
+ super();
868
+ this.uiService = inject(UIService);
869
+ this.appearance = this.uiService.appearance;
870
+ this.dialog = inject(MatDialog);
871
+ this.snackBar = inject(MatSnackBar);
872
+ this.location = inject(PlatformLocation);
873
+ this.popHistory = [];
874
+ this.popState = true;
875
+ this.poppingState = false;
876
+ this.location.onPopState(() => {
877
+ if (!this.poppingState) {
878
+ const count = this.dialog.openDialogs.length;
879
+ if (count > 0) {
880
+ this.popState = false;
881
+ this.dialog.openDialogs[count - 1].close();
882
+ }
883
+ } else this.poppingState = false;
884
+ });
885
+ }
886
+ suspendBackClose() {
887
+ this.poppingState = true;
888
+ }
889
+ clearUrl(resetPoppingState = false) {
890
+ const url = location.href;
891
+ let l = url.length;
892
+ while (l >= 0 && url[l - 1] === "#") l--;
893
+ if (l < url.length) history.replaceState({}, "", url.substring(0, l));
894
+ if (resetPoppingState) this.poppingState = false;
895
+ }
896
+ closeAll() {
897
+ this.dialog.closeAll();
898
+ }
899
+ open(component, config) {
900
+ if (!SystemUtils.isBrowser()) return null;
901
+ this.clearBusy(true);
902
+ return this.openDialog(component, config);
903
+ }
904
+ openDialog(component, config) {
905
+ config.closeOnNavigation = false;
906
+ const d = this.dialog.open(component, config);
907
+ d.afterOpened().pipe(first()).subscribe(() => {
908
+ this.pushDialog(d.id);
909
+ this.raiseMessage();
910
+ });
911
+ d.beforeClosed().pipe(first()).subscribe(() => this.popDialog(d.id));
912
+ return d;
913
+ }
914
+ outerHeight(element) {
915
+ if (!SystemUtils.isBrowser()) return 0;
916
+ const height = element.offsetHeight;
917
+ const style = window.getComputedStyle(element);
918
+ return ["top", "bottom"].map((side) => parseInt(style.getPropertyValue(`margin-${side}`), 10)).reduce((total, margin) => total + margin, height);
919
+ }
920
+ getCurrentDialogHeight() {
921
+ if (!SystemUtils.isBrowser()) return 0;
922
+ const count = this.popHistory.length;
923
+ if (count > 0) {
924
+ let id = this.popHistory[count - 1].id;
925
+ let elem = document.getElementById(id);
926
+ if (elem && elem.clientHeight > 0) return elem.clientHeight;
927
+ }
928
+ return 0;
929
+ }
930
+ getCurrentDialogScrollableHeight(fixedPartsClassName, minimalHeight) {
931
+ if (!SystemUtils.isBrowser()) return 0;
932
+ let h = Math.max(this.getCurrentDialogHeight(), minimalHeight);
933
+ if (fixedPartsClassName) fixedPartsClassName.forEach((n) => {
934
+ const elems = document.getElementsByClassName(n);
935
+ if (elems) for (let i = 0; i < elems.length; i++) h -= this.outerHeight(elems[i]);
936
+ });
937
+ return h;
938
+ }
939
+ pushDialog(id) {
940
+ if (!SystemUtils.isBrowser()) return;
941
+ const index = history.length;
942
+ history.pushState({ index }, "", location.href + "#");
943
+ this.popHistory.push({
944
+ id,
945
+ value: index
946
+ });
947
+ }
948
+ popDialog(id) {
949
+ if (!SystemUtils.isBrowser()) return;
950
+ if (this.popState) {
951
+ this.poppingState = true;
952
+ let popped = 1;
953
+ if (id) {
954
+ const p = this.popHistory.findIndex((n) => n.id === id);
955
+ if (p !== -1) {
956
+ popped = this.popHistory[p].value - (history.state?.index ?? 0);
957
+ popped = popped ? popped + 1 : 1;
958
+ this.popHistory.splice(p, 1);
959
+ }
960
+ const url = location.href;
961
+ let l = url.length;
962
+ while (l >= 0 && url[l - 1] === "#" && popped > 0) {
963
+ l--;
964
+ popped--;
965
+ }
966
+ if (l < url.length) history.replaceState({}, "", url.substring(0, l));
967
+ }
968
+ }
969
+ this.popState = true;
970
+ }
971
+ toast(message, duration = 2e3, icon = "check", actionCaption) {
972
+ this.clearBusy();
973
+ if (duration === -1) duration = 2e3;
974
+ const toastRef = this.snackBar.openFromComponent(ToastComponent, {
975
+ duration,
976
+ data: {
977
+ message,
978
+ icon,
979
+ actionCaption
980
+ }
981
+ });
982
+ toastRef.instance.action.subscribe(() => toastRef.dismiss());
983
+ return toastRef;
984
+ }
985
+ confirm(message, title = "Conferma", okCaption = "Si", cancelCaption = "No", otherCaption, options, width = 500, details) {
986
+ return this.open(ConfirmDialogComponent, {
987
+ ariaLabel: "conferma",
988
+ autoFocus: "dialog",
989
+ restoreFocus: false,
990
+ data: {
991
+ message,
992
+ title,
993
+ okCaption,
994
+ cancelCaption,
995
+ otherCaption,
996
+ options,
997
+ details,
998
+ appearance: this.appearance()
999
+ },
1000
+ closeOnNavigation: false,
1001
+ disableClose: true,
1002
+ minWidth: "375px",
1003
+ maxWidth: `${width}px`,
1004
+ width: "100%"
1005
+ });
1006
+ }
1007
+ delete(message, title = "Attenzione", confirmMode = DeleteDialogConfirmMode.None, okCaption = "Si", cancelCaption = "No", width = 500, details) {
1008
+ return this.open(DeleteDialogComponent, {
1009
+ ariaLabel: "attenzione",
1010
+ autoFocus: "dialog",
1011
+ restoreFocus: false,
1012
+ data: {
1013
+ message,
1014
+ title,
1015
+ confirmMode,
1016
+ okCaption,
1017
+ cancelCaption,
1018
+ details,
1019
+ appearance: this.appearance()
1020
+ },
1021
+ closeOnNavigation: false,
1022
+ disableClose: true,
1023
+ minWidth: "375px",
1024
+ maxWidth: `${width}px`,
1025
+ width: "100%"
1026
+ });
1027
+ }
1028
+ async sendTo(title = "Invia per email", text, subject, canPopulate = false, count, options, width = 600) {
1029
+ const { SendToDialogComponent } = await import("@arsedizioni/ars-utils/ui.dialogs.select");
1030
+ return this.open(SendToDialogComponent, {
1031
+ ariaLabel: "invia per email",
1032
+ autoFocus: "dialog",
1033
+ restoreFocus: false,
1034
+ data: {
1035
+ title,
1036
+ count,
1037
+ canPopulate,
1038
+ appearance: this.appearance(),
1039
+ text,
1040
+ subject,
1041
+ options
1042
+ },
1043
+ closeOnNavigation: false,
1044
+ minWidth: "375px",
1045
+ maxWidth: `${width}px`,
1046
+ width: "100%"
1047
+ });
1048
+ }
1049
+ async selectTree(nodes, title = "Seleziona un elemento", description, initialFilter, width = 800, okCaption = "Ok", canAppend = false) {
1050
+ const { SelectTreeDialogComponent } = await import("@arsedizioni/ars-utils/ui.dialogs.select");
1051
+ return this.open(SelectTreeDialogComponent, {
1052
+ ariaLabel: "seleziona un elemento",
1053
+ autoFocus: "dialog",
1054
+ restoreFocus: false,
1055
+ data: {
1056
+ title,
1057
+ description,
1058
+ initialFilter,
1059
+ okCaption,
1060
+ nodes,
1061
+ appearance: "outline",
1062
+ canAppend
1063
+ },
1064
+ closeOnNavigation: false,
1065
+ minWidth: "375px",
1066
+ maxWidth: `${width}px`,
1067
+ width: "100%"
1068
+ });
1069
+ }
1070
+ async selectPicture(title = "Seleziona immagine", description, okCaption = "Ok", options, width = 600, maxSize, maxPictureWidth, maxPictureHeight) {
1071
+ const { SelectPictureDialogComponent } = await import("@arsedizioni/ars-utils/ui.files");
1072
+ return this.open(SelectPictureDialogComponent, {
1073
+ ariaLabel: "seleziona immagine",
1074
+ autoFocus: "dialog",
1075
+ restoreFocus: false,
1076
+ data: {
1077
+ title,
1078
+ description,
1079
+ okCaption,
1080
+ options,
1081
+ appearance: this.appearance(),
1082
+ maxSize,
1083
+ maxWidth: maxPictureWidth,
1084
+ maxHeight: maxPictureHeight
1085
+ },
1086
+ closeOnNavigation: false,
1087
+ disableClose: true,
1088
+ minWidth: "375px",
1089
+ maxWidth: `${width}px`,
1090
+ width: "100%"
1091
+ });
1092
+ }
1093
+ async selectFile(title = "Seleziona file", description, okCaption = "Ok", helpLink, helpCaption, options, width = 600, maxSize, accept) {
1094
+ const { SelectFileDialogComponent } = await import("@arsedizioni/ars-utils/ui.files");
1095
+ return this.open(SelectFileDialogComponent, {
1096
+ ariaLabel: "seleziona file",
1097
+ autoFocus: "dialog",
1098
+ restoreFocus: false,
1099
+ data: {
1100
+ title,
1101
+ description,
1102
+ okCaption,
1103
+ helpLink,
1104
+ helpCaption,
1105
+ options,
1106
+ appearance: this.appearance(),
1107
+ maxSize,
1108
+ accept
1109
+ },
1110
+ closeOnNavigation: false,
1111
+ disableClose: true,
1112
+ minWidth: "375px",
1113
+ maxWidth: `${width}px`,
1114
+ width: "100%"
1115
+ });
1116
+ }
1117
+ async select(data, disableClose = true, closeOnNavigation = true) {
1118
+ const { SelectDialogComponent } = await import("@arsedizioni/ars-utils/ui.dialogs.select");
1119
+ const dialogData = {
1120
+ ...data,
1121
+ appearance: data.appearance ?? "outline"
1122
+ };
1123
+ return this.open(SelectDialogComponent, {
1124
+ ariaLabel: "seleziona",
1125
+ autoFocus: "dialog",
1126
+ restoreFocus: false,
1127
+ data: dialogData,
1128
+ closeOnNavigation,
1129
+ disableClose,
1130
+ minWidth: "375px",
1131
+ maxWidth: `${data.width ?? 800}px`,
1132
+ width: "100%"
1133
+ });
1134
+ }
1135
+ async prompt(title, type = PromptDialogType.Default, description, initialValue, okCaption = "Ok", cancelCaption = "Annulla", options, width = 500, required) {
1136
+ const { PromptDialogComponent } = await import("@arsedizioni/ars-utils/ui.dialogs.prompt");
1137
+ return this.open(PromptDialogComponent, {
1138
+ ariaLabel: "inserisci valore",
1139
+ autoFocus: "dialog",
1140
+ restoreFocus: false,
1141
+ data: {
1142
+ title,
1143
+ type,
1144
+ description,
1145
+ initialValue,
1146
+ okCaption,
1147
+ cancelCaption,
1148
+ appearance: this.appearance(),
1149
+ required,
1150
+ options
1151
+ },
1152
+ closeOnNavigation: false,
1153
+ disableClose: true,
1154
+ minWidth: "375px",
1155
+ maxWidth: `${width}px`,
1156
+ width: "100%"
1157
+ });
1158
+ }
1159
+ async promptDate(title, type = PromptDialogType.Date, description, initialValue, okCaption = "Ok", cancelCaption = "Annulla", options, width = 500, required) {
1160
+ const { PromptDateDialogComponent } = await import("@arsedizioni/ars-utils/ui.dialogs.prompt");
1161
+ return this.open(PromptDateDialogComponent, {
1162
+ ariaLabel: "inserisci data",
1163
+ autoFocus: "dialog",
1164
+ restoreFocus: false,
1165
+ data: {
1166
+ title,
1167
+ type,
1168
+ description,
1169
+ initialValue,
1170
+ okCaption,
1171
+ cancelCaption,
1172
+ appearance: this.appearance(),
1173
+ required,
1174
+ options
1175
+ },
1176
+ closeOnNavigation: false,
1177
+ disableClose: true,
1178
+ minWidth: "375px",
1179
+ maxWidth: `${width}px`,
1180
+ width: "100%"
1181
+ });
1182
+ }
1183
+ async promptTime(title, description, slots, initialValue, okCaption = "Ok", cancelCaption = "Annulla", options, width = 500, required) {
1184
+ const { PromptTimeDialogComponent } = await import("@arsedizioni/ars-utils/ui.dialogs.prompt");
1185
+ return this.open(PromptTimeDialogComponent, {
1186
+ ariaLabel: "inserisci orario",
1187
+ autoFocus: "dialog",
1188
+ restoreFocus: false,
1189
+ data: {
1190
+ title,
1191
+ type: PromptDialogType.Time,
1192
+ description,
1193
+ slots,
1194
+ initialValue,
1195
+ okCaption,
1196
+ cancelCaption,
1197
+ appearance: this.appearance(),
1198
+ required,
1199
+ options
1200
+ },
1201
+ closeOnNavigation: false,
1202
+ disableClose: true,
1203
+ minWidth: "375px",
1204
+ maxWidth: `${width}px`,
1205
+ width: "100%"
1206
+ });
1207
+ }
1208
+ async promptOtp(title = "Conferma la tua identità", description, okCaption = "Ok", cancelCaption = "Annulla", width = 500) {
1209
+ const { PromptOtpDialogComponent } = await import("@arsedizioni/ars-utils/ui.dialogs.auth");
1210
+ return this.open(PromptOtpDialogComponent, {
1211
+ ariaLabel: "inserisci codice OTP",
1212
+ autoFocus: "dialog",
1213
+ restoreFocus: false,
1214
+ data: {
1215
+ title,
1216
+ type: PromptDialogType.Default,
1217
+ description,
1218
+ okCaption,
1219
+ cancelCaption,
1220
+ appearance: this.appearance()
1221
+ },
1222
+ closeOnNavigation: false,
1223
+ disableClose: true,
1224
+ minWidth: "375px",
1225
+ maxWidth: `${width}px`,
1226
+ width: "100%"
1227
+ });
1228
+ }
1229
+ static {
1230
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1231
+ minVersion: "12.0.0",
1232
+ version: "22.2.1",
1233
+ ngImport: i0,
1234
+ type: DialogService,
1235
+ deps: [],
1236
+ target: i0.ɵɵFactoryTarget.Service
1237
+ });
1238
+ }
1239
+ static {
1240
+ this.ɵprov = i0.ɵɵngDeclareService({
1241
+ minVersion: "22.0.0",
1242
+ version: "22.2.1",
1243
+ ngImport: i0,
1244
+ type: DialogService
1245
+ });
1246
+ }
1247
+ };
1248
+ i0.ɵɵngDeclareClassMetadata({
1249
+ minVersion: "12.0.0",
1250
+ version: "22.2.1",
1251
+ ngImport: i0,
1252
+ type: DialogService,
1253
+ decorators: [{ type: Service }],
1254
+ ctorParameters: () => []
1255
+ });
794
1256
  export { ConfirmDialogComponent, DeleteDialogComponent, DeleteDialogConfirmMode, DialogService, ToastComponent };
795
- //# sourceMappingURL=arsedizioni-ars-utils-ui.dialogs.mjs.map
1257
+
1258
+ //# sourceMappingURL=arsedizioni-ars-utils-ui.dialogs.mjs.map