@arsedizioni/ars-utils 22.5.30 → 22.5.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -12
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +4 -5
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +118 -2
- package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +12 -12
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +320 -4
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +13 -13
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +3 -3
- package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +7 -7
- package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -1
- package/package.json +1 -5
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +3 -3
- package/types/arsedizioni-ars-utils-core.validators.d.ts +52 -1
- package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +3 -3
- package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +117 -2
- package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +3 -3
- package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +1 -1
- package/types/arsedizioni-ars-utils-ui.files.d.ts +1 -1
- package/ui.application/package.json +4 -0
|
@@ -5,7 +5,7 @@ import { MatDialogRef, MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDia
|
|
|
5
5
|
import { MAT_SNACK_BAR_DATA, MatSnackBar } from '@angular/material/snack-bar';
|
|
6
6
|
import { SafeHtmlPipe, SystemUtils } from '@arsedizioni/ars-utils/core';
|
|
7
7
|
import * as i1 from '@arsedizioni/ars-utils/ui';
|
|
8
|
-
import { FlexLayoutModule, UIService } from '@arsedizioni/ars-utils/ui';
|
|
8
|
+
import { FlexLayoutModule, UIService, PromptDialogType } from '@arsedizioni/ars-utils/ui';
|
|
9
9
|
import { ShellService } from '@arsedizioni/ars-utils/ui.shell';
|
|
10
10
|
import { first } from 'rxjs/operators';
|
|
11
11
|
import * as i3 from '@angular/material/button';
|
|
@@ -82,7 +82,7 @@ var DeleteDialogConfirmMode;
|
|
|
82
82
|
class DeleteDialogComponent {
|
|
83
83
|
constructor() {
|
|
84
84
|
/** Error text of a field: the message declared in the schema, or the shared fallback. */
|
|
85
|
-
this.
|
|
85
|
+
this.getErrorMessage = SignalsUtils.getFieldErrorMessage;
|
|
86
86
|
/** Emitted when the user makes a choice. Carries the selected result. */
|
|
87
87
|
this.choosen = output();
|
|
88
88
|
this.dialogRef = inject((MatDialogRef));
|
|
@@ -143,12 +143,12 @@ class DeleteDialogComponent {
|
|
|
143
143
|
this.dialogRef.close();
|
|
144
144
|
}
|
|
145
145
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DeleteDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
146
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", 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>{{ getFieldErrorMessage(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 }); }
|
|
146
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", 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
147
|
}
|
|
148
148
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DeleteDialogComponent, decorators: [{
|
|
149
149
|
type: Component,
|
|
150
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>{{
|
|
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
152
|
}], propDecorators: { choosen: [{ type: i0.Output, args: ["choosen"] }] } });
|
|
153
153
|
|
|
154
154
|
class ToastComponent {
|
|
@@ -460,6 +460,322 @@ class DialogService extends ShellService {
|
|
|
460
460
|
width: '100%'
|
|
461
461
|
});
|
|
462
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
|
+
}
|
|
463
779
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: DialogService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
|
|
464
780
|
static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.3", ngImport: i0, type: DialogService }); }
|
|
465
781
|
}
|