@esfaenza/core 19.2.80 → 19.2.81
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/components.module.d.ts +5 -3
- package/components/public-api.d.ts +5 -0
- package/components/search/base-search.d.ts +36 -0
- package/components/selector/base/base-selector.component.d.ts +97 -0
- package/components/selector/base/models/BaseSelectorInitialization.d.ts +9 -0
- package/components/selector/form-selector/form-selector.component.d.ts +27 -0
- package/components/selector/form-selector-dialog/form-selector-dialog.component.d.ts +21 -0
- package/fesm2022/esfaenza-core-components.mjs +643 -24
- package/fesm2022/esfaenza-core-components.mjs.map +1 -1
- package/fesm2022/esfaenza-core.mjs +2 -2
- package/fesm2022/esfaenza-core.mjs.map +1 -1
- package/package.json +5 -5
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { HostListener, ViewChild, Input, ViewEncapsulation, Component, EventEmitter, Output, Inject, Injectable, Optional, ChangeDetectionStrategy, NgModule } from '@angular/core';
|
|
2
|
+
import { HostListener, ViewChild, Input, ViewEncapsulation, Component, EventEmitter, Output, Inject, Injectable, Optional, ChangeDetectionStrategy, input, model, NgModule, viewChild, contentChild } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/router';
|
|
4
4
|
import { NavigationEnd, RouterLink, RouterLinkActive, RouterOutlet, ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
5
|
-
import * as
|
|
5
|
+
import * as i2$3 from '@angular/common';
|
|
6
6
|
import { NgIf, NgFor, NgTemplateOutlet, NgClass, Location, CommonModule } from '@angular/common';
|
|
7
7
|
import { filter, map, mergeMap, takeUntil as takeUntil$1 } from 'rxjs/operators';
|
|
8
|
-
import { combineLatest, of, firstValueFrom, ReplaySubject, interval, startWith, takeUntil, takeWhile, debounceTime } from 'rxjs';
|
|
8
|
+
import { combineLatest, of, firstValueFrom, ReplaySubject, interval, startWith, takeUntil, takeWhile, Subject, debounceTime, take, map as map$1 } from 'rxjs';
|
|
9
9
|
import * as i1 from '@esfaenza/core/services';
|
|
10
10
|
import { AppState } from '@esfaenza/core/services';
|
|
11
11
|
import * as i3 from '@angular/platform-browser';
|
|
12
12
|
import * as i2$1 from '@esfaenza/extensions';
|
|
13
|
-
import { AppEmbeddingExtensions, ExtensionsModule } from '@esfaenza/extensions';
|
|
13
|
+
import { AppEmbeddingExtensions, ExtensionsModule, MessageService, ClipboardService, HashingService, UtilityService } from '@esfaenza/extensions';
|
|
14
14
|
import * as i5 from '@angular/forms';
|
|
15
|
-
import { FormsModule } from '@angular/forms';
|
|
15
|
+
import { FormsModule, NgControl } from '@angular/forms';
|
|
16
16
|
import { ANONYMOUS_MODE, MENU_LOCALIZATION, MENU, NAVBAR_EXTENSIONS, LOGIN_URL_LEGACY, REDIRECT_MAP, EMBEDDED_ROUTE, ROUTE, UpdatePasswordDto } from '@esfaenza/core/domain';
|
|
17
17
|
import { EsModalDirective, Draggable, SlimScroll, ComponentHostDirective, DirectivesModule } from '@esfaenza/core/directives';
|
|
18
18
|
import * as i3$1 from '@esfaenza/httpservice';
|
|
19
|
+
import { HTTPService } from '@esfaenza/httpservice';
|
|
19
20
|
import * as i1$1 from '@esfaenza/localizations';
|
|
20
21
|
import { LocalizationService, LocalizationModule } from '@esfaenza/localizations';
|
|
21
22
|
import * as i7 from '@esfaenza/es-table';
|
|
22
|
-
import { EsTableColumnsDefinition, EsTableModule } from '@esfaenza/es-table';
|
|
23
|
+
import { EsTableColumnsDefinition, EsTableModule, ThTdProvider, AppSearch } from '@esfaenza/es-table';
|
|
23
24
|
import * as i5$1 from '@esfaenza/access-control';
|
|
24
|
-
import { AccessControlModule } from '@esfaenza/access-control';
|
|
25
|
+
import { AccessControlModule, AccessControlService } from '@esfaenza/access-control';
|
|
25
26
|
import * as i12 from 'primeng/toggleswitch';
|
|
26
27
|
import { ToggleSwitchModule } from 'primeng/toggleswitch';
|
|
27
28
|
import * as i10 from 'ngx-bootstrap/progressbar';
|
|
@@ -29,10 +30,11 @@ import { ProgressbarModule } from 'ngx-bootstrap/progressbar';
|
|
|
29
30
|
import * as i9 from 'ngx-bootstrap/dropdown';
|
|
30
31
|
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
|
|
31
32
|
import * as i1$2 from '@esfaenza/preferences';
|
|
33
|
+
import { CacheService } from '@esfaenza/preferences';
|
|
32
34
|
import * as i2$2 from '@esfaenza/signalr-notifications';
|
|
33
35
|
import { ModalModule } from 'ngx-bootstrap/modal';
|
|
34
36
|
import { ImageCropperComponent } from 'ngx-image-cropper';
|
|
35
|
-
import * as i2$
|
|
37
|
+
import * as i2$4 from '@esfaenza/forms-and-validations';
|
|
36
38
|
import { AppFile, FormsAndValidationsModule } from '@esfaenza/forms-and-validations';
|
|
37
39
|
import * as i7$1 from 'primeng/tooltip';
|
|
38
40
|
import { TooltipModule } from 'primeng/tooltip';
|
|
@@ -278,11 +280,11 @@ class ErrorPageComponent {
|
|
|
278
280
|
return true;
|
|
279
281
|
}
|
|
280
282
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ErrorPageComponent, deps: [{ token: i2.Router }, { token: i2.ActivatedRoute }, { token: i2$1.MessageService }, { token: i3$1.HTTPService }, { token: i1.TokenService }, { token: i2$1.AppEmbeddingExtensions }, { token: ANONYMOUS_MODE }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
281
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ErrorPageComponent, isStandalone: true, selector: "errorpage", ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-xl-8 col-md-10 col-10 offset-xl-2 offset-xs-1 p-t-10\">\r\n <ng-container *ngIf=\"debugging\">\r\n <div class=\"card\">\r\n <div class=\"card-body text-center\">\r\n\r\n <h1 class=\"display-4\">Qualcosa
|
|
283
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: ErrorPageComponent, isStandalone: true, selector: "errorpage", ngImport: i0, template: "<div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-xl-8 col-md-10 col-10 offset-xl-2 offset-xs-1 p-t-10\">\r\n <ng-container *ngIf=\"debugging\">\r\n <div class=\"card\">\r\n <div class=\"card-body text-center\">\r\n\r\n <h1 class=\"display-4\">Qualcosa \u00E8 andato storto.</h1>\r\n <h6>\r\n <small>\r\n Si \u00E8 verificato un errore interno all'applicazione. Questo non dovrebbe accadere.\r\n Prova a ricaricare la pagina precedente e rieffettuare le stesse operazioni, se il\r\n problema persiste invia una segnalazione allegando una breve descrizione delle\r\n operazioni che stavi eseguendo\r\n </small>\r\n </h6>\r\n <div style=\"max-height: 450px; overflow-x: hidden; overflow-y: scroll; margin-bottom: 10px;\">\r\n <h6 class=\"card-title text-danger app-margin-top-10 text-left\" style=\"word-wrap:break-word\" *ngIf=\"identityInfos\"><em>Logged user: {{identityInfos}}</em></h6>\r\n <h6 class=\"card-title text-danger app-margin-top-10 text-left\" style=\"word-wrap:break-word\" *ngIf=\"errorFrom\"><em>From page: {{errorFrom}}</em></h6>\r\n <h6 class=\"card-title text-danger app-margin-top-10 text-left\" style=\"word-wrap:break-word\" *ngIf=\"errorLastCalls\"><em>Last three calls: {{errorLastCalls}}</em></h6>\r\n \r\n <!-- Errori Angular -->\r\n <ng-container *ngIf=\"errorMessage\">\r\n <h6 class=\"card-title text-danger app-margin-top-10 text-left\" style=\"word-wrap:break-word\" *ngIf=\"errorMessage\"><em>{{errorMessage}}</em></h6>\r\n </ng-container>\r\n\r\n <!-- Errori HTTP -->\r\n <ng-container *ngIf=\"statusCode || statusText\">\r\n <h1 class=\"display-1\" *ngIf=\"!statusCode\"> </h1>\r\n <h1 class=\"display-1\" *ngIf=\"statusCode\">{{statusCode == '4041' ? 'Pagina non trovata' : ''}}</h1>\r\n <h6 class=\"card-title\" *ngIf=\"!statusText\"> </h6>\r\n <h6 class=\"card-title\" style=\"word-wrap:break-word; max-height: 500px; overflow: auto\" *ngIf=\"statusText\">{{statusText}}</h6>\r\n </ng-container>\r\n </div>\r\n <div style=\"display: flex;\" *ngIf=\"!ANONYMOUS_MODE\">\r\n <button type=\"button\" class=\"btn btn-secondary\" yle=\"margin-right: auto;\" (click)=\"goPreviousPage()\">Torna alla pagina precedente</button>\r\n <button [hidden]=\"!canReport\" type=\"button\" class=\"btn btn-warning\" style=\"margin: auto;\" (click)=\"BugReportText = ''; dlgSegnalazione.show()\">Invia segnalazione</button>\r\n <button type=\"button\" class=\"btn btn-primary\" style=\"margin-left: auto;\" (click)=\"goDashboard()\">Vai alla Dashboard</button>\r\n <div class=\"clearfix\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!debugging\">\r\n <div class=\"error-container\">\r\n <div class=\"emoji\">\uD83D\uDE15</div>\r\n <h1>Qualcosa \u00E8 andato storto</h1>\r\n <p>Si \u00E8 verificato un errore imprevisto. Puoi inviare una segnalazione per aiutarci a risolverlo. </p>\r\n\r\n <div class=\"buttons\">\r\n <button class=\"report-btn btn-warning\" (click)=\"BugReportText = ''; dlgSegnalazione.show()\">Invia segnalazione</button>\r\n <button class=\"home-btn btn-primary\" (click)=\"goDashboard()\">Torna alla Dashboard</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<es-modal #dlgSegnalazione [Size]=\"'L'\">\r\n <es-modal-head (Close)=\"dlgSegnalazione.hide();\">\r\n <h5 class=\"modal-title pull-left\">Invio Segnalazione</h5>\r\n </es-modal-head>\r\n <form novalidate #formAddEdit=\"ngForm\" (ngSubmit)=\"formAddEdit.valid && openTicket() && dlgSegnalazione.hide()\">\r\n <div class=\"modal-body\">\r\n <div class=\"card card-info app-padding-10 app-white-text\">\r\n Per inviare una segnalazione, si prega di inserire una descrizione dettagliata delle azioni effettuate.\r\n Non serve allegare nessun tipo di file/screenshot (in teoria...), tutte le informazioni richieste sono state gi\u00E0\r\n raccolte.\r\n </div>\r\n <textarea class=\"bugreport-textarea\" [(ngModel)]=\"BugReportText\" #report=\"ngModel\" name=\"BugReportText\" placeholder=\"Stavo navigando nella pagina e...\" required minlength=\"50\"></textarea>\r\n <div class=\"validation-message\" *ngIf=\"report.invalid && formAddEdit.submitted\">\r\n La descrizione delle azioni effettuate \u00E8 obbligatoria e dev'essere almeno lunga una cinquantina di caratteri.\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary app-margin-right-10\" (click)=\"dlgSegnalazione.hide();\">Annulla</button>\r\n <button type=\"submit\" class=\"btn btn-primary\">Conferma</button>\r\n </div>\r\n </form>\r\n</es-modal>", styles: [".bugreport-textarea{width:100%;min-height:350px;padding:12px 14px;border:1px solid #d1d5db;border-radius:12px;font-size:14px;font-family:inherit;line-height:2;resize:none;transition:all .2s ease-in-out;background-color:#f9fafb;box-shadow:inset 0 1px 2px #0000000d;margin-top:5px}.bugreport-textarea:focus{outline:none;border-color:#3b82f6;background-color:#fff;box-shadow:0 0 0 3px #3b82f633}.error-container{text-align:center;max-width:500px;padding:2rem;background:#fff;border-radius:12px;box-shadow:0 4px 20px #0000001a;margin:0 auto}.error-container .emoji{font-size:4rem;margin-bottom:1rem}.error-container h1{font-size:1.8rem;margin-bottom:.5rem;color:#333}.error-container p{font-size:1rem;color:#666;margin-bottom:2rem}.error-container .buttons{display:flex;justify-content:center;gap:1rem;flex-wrap:wrap}.error-container .buttons button{padding:.75rem 1.5rem;border:none;border-radius:6px;font-size:1rem;cursor:pointer;transition:background-color .2s ease}.error-container .report-btn{background-color:#f39c12;color:#fff}.error-container .report-btn:hover{background-color:#e08e0b}.error-container .home-btn{background-color:#3498db;color:#fff}.error-container .home-btn:hover{background-color:#2980b9}.validation-message{color:#e74c3c;background-color:#fdecea;border:1px solid #f5c6cb;padding:.5rem 1rem;border-radius:6px;font-size:.9rem;margin-top:.5rem}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: EsModalComponent, selector: "es-modal", inputs: ["Size", "IgnoreBackdrop", "Backdrop", "HasOverlap"], outputs: ["onShow", "onHide"] }, { kind: "component", type: EsModalHeadComponent, selector: "es-modal-head", outputs: ["Close"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
282
284
|
}
|
|
283
285
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ErrorPageComponent, decorators: [{
|
|
284
286
|
type: Component,
|
|
285
|
-
args: [{ selector: "errorpage", encapsulation: ViewEncapsulation.None, imports: [NgIf, EsModalComponent, EsModalHeadComponent, FormsModule], template: "<div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-xl-8 col-md-10 col-10 offset-xl-2 offset-xs-1 p-t-10\">\r\n <ng-container *ngIf=\"debugging\">\r\n <div class=\"card\">\r\n <div class=\"card-body text-center\">\r\n\r\n <h1 class=\"display-4\">Qualcosa
|
|
287
|
+
args: [{ selector: "errorpage", encapsulation: ViewEncapsulation.None, imports: [NgIf, EsModalComponent, EsModalHeadComponent, FormsModule], template: "<div class=\"container\">\r\n <div class=\"row\">\r\n <div class=\"col-xl-8 col-md-10 col-10 offset-xl-2 offset-xs-1 p-t-10\">\r\n <ng-container *ngIf=\"debugging\">\r\n <div class=\"card\">\r\n <div class=\"card-body text-center\">\r\n\r\n <h1 class=\"display-4\">Qualcosa \u00E8 andato storto.</h1>\r\n <h6>\r\n <small>\r\n Si \u00E8 verificato un errore interno all'applicazione. Questo non dovrebbe accadere.\r\n Prova a ricaricare la pagina precedente e rieffettuare le stesse operazioni, se il\r\n problema persiste invia una segnalazione allegando una breve descrizione delle\r\n operazioni che stavi eseguendo\r\n </small>\r\n </h6>\r\n <div style=\"max-height: 450px; overflow-x: hidden; overflow-y: scroll; margin-bottom: 10px;\">\r\n <h6 class=\"card-title text-danger app-margin-top-10 text-left\" style=\"word-wrap:break-word\" *ngIf=\"identityInfos\"><em>Logged user: {{identityInfos}}</em></h6>\r\n <h6 class=\"card-title text-danger app-margin-top-10 text-left\" style=\"word-wrap:break-word\" *ngIf=\"errorFrom\"><em>From page: {{errorFrom}}</em></h6>\r\n <h6 class=\"card-title text-danger app-margin-top-10 text-left\" style=\"word-wrap:break-word\" *ngIf=\"errorLastCalls\"><em>Last three calls: {{errorLastCalls}}</em></h6>\r\n \r\n <!-- Errori Angular -->\r\n <ng-container *ngIf=\"errorMessage\">\r\n <h6 class=\"card-title text-danger app-margin-top-10 text-left\" style=\"word-wrap:break-word\" *ngIf=\"errorMessage\"><em>{{errorMessage}}</em></h6>\r\n </ng-container>\r\n\r\n <!-- Errori HTTP -->\r\n <ng-container *ngIf=\"statusCode || statusText\">\r\n <h1 class=\"display-1\" *ngIf=\"!statusCode\"> </h1>\r\n <h1 class=\"display-1\" *ngIf=\"statusCode\">{{statusCode == '4041' ? 'Pagina non trovata' : ''}}</h1>\r\n <h6 class=\"card-title\" *ngIf=\"!statusText\"> </h6>\r\n <h6 class=\"card-title\" style=\"word-wrap:break-word; max-height: 500px; overflow: auto\" *ngIf=\"statusText\">{{statusText}}</h6>\r\n </ng-container>\r\n </div>\r\n <div style=\"display: flex;\" *ngIf=\"!ANONYMOUS_MODE\">\r\n <button type=\"button\" class=\"btn btn-secondary\" yle=\"margin-right: auto;\" (click)=\"goPreviousPage()\">Torna alla pagina precedente</button>\r\n <button [hidden]=\"!canReport\" type=\"button\" class=\"btn btn-warning\" style=\"margin: auto;\" (click)=\"BugReportText = ''; dlgSegnalazione.show()\">Invia segnalazione</button>\r\n <button type=\"button\" class=\"btn btn-primary\" style=\"margin-left: auto;\" (click)=\"goDashboard()\">Vai alla Dashboard</button>\r\n <div class=\"clearfix\"></div>\r\n </div>\r\n </div>\r\n </div>\r\n </ng-container>\r\n <ng-container *ngIf=\"!debugging\">\r\n <div class=\"error-container\">\r\n <div class=\"emoji\">\uD83D\uDE15</div>\r\n <h1>Qualcosa \u00E8 andato storto</h1>\r\n <p>Si \u00E8 verificato un errore imprevisto. Puoi inviare una segnalazione per aiutarci a risolverlo. </p>\r\n\r\n <div class=\"buttons\">\r\n <button class=\"report-btn btn-warning\" (click)=\"BugReportText = ''; dlgSegnalazione.show()\">Invia segnalazione</button>\r\n <button class=\"home-btn btn-primary\" (click)=\"goDashboard()\">Torna alla Dashboard</button>\r\n </div>\r\n </div>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<es-modal #dlgSegnalazione [Size]=\"'L'\">\r\n <es-modal-head (Close)=\"dlgSegnalazione.hide();\">\r\n <h5 class=\"modal-title pull-left\">Invio Segnalazione</h5>\r\n </es-modal-head>\r\n <form novalidate #formAddEdit=\"ngForm\" (ngSubmit)=\"formAddEdit.valid && openTicket() && dlgSegnalazione.hide()\">\r\n <div class=\"modal-body\">\r\n <div class=\"card card-info app-padding-10 app-white-text\">\r\n Per inviare una segnalazione, si prega di inserire una descrizione dettagliata delle azioni effettuate.\r\n Non serve allegare nessun tipo di file/screenshot (in teoria...), tutte le informazioni richieste sono state gi\u00E0\r\n raccolte.\r\n </div>\r\n <textarea class=\"bugreport-textarea\" [(ngModel)]=\"BugReportText\" #report=\"ngModel\" name=\"BugReportText\" placeholder=\"Stavo navigando nella pagina e...\" required minlength=\"50\"></textarea>\r\n <div class=\"validation-message\" *ngIf=\"report.invalid && formAddEdit.submitted\">\r\n La descrizione delle azioni effettuate \u00E8 obbligatoria e dev'essere almeno lunga una cinquantina di caratteri.\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary app-margin-right-10\" (click)=\"dlgSegnalazione.hide();\">Annulla</button>\r\n <button type=\"submit\" class=\"btn btn-primary\">Conferma</button>\r\n </div>\r\n </form>\r\n</es-modal>", styles: [".bugreport-textarea{width:100%;min-height:350px;padding:12px 14px;border:1px solid #d1d5db;border-radius:12px;font-size:14px;font-family:inherit;line-height:2;resize:none;transition:all .2s ease-in-out;background-color:#f9fafb;box-shadow:inset 0 1px 2px #0000000d;margin-top:5px}.bugreport-textarea:focus{outline:none;border-color:#3b82f6;background-color:#fff;box-shadow:0 0 0 3px #3b82f633}.error-container{text-align:center;max-width:500px;padding:2rem;background:#fff;border-radius:12px;box-shadow:0 4px 20px #0000001a;margin:0 auto}.error-container .emoji{font-size:4rem;margin-bottom:1rem}.error-container h1{font-size:1.8rem;margin-bottom:.5rem;color:#333}.error-container p{font-size:1rem;color:#666;margin-bottom:2rem}.error-container .buttons{display:flex;justify-content:center;gap:1rem;flex-wrap:wrap}.error-container .buttons button{padding:.75rem 1.5rem;border:none;border-radius:6px;font-size:1rem;cursor:pointer;transition:background-color .2s ease}.error-container .report-btn{background-color:#f39c12;color:#fff}.error-container .report-btn:hover{background-color:#e08e0b}.error-container .home-btn{background-color:#3498db;color:#fff}.error-container .home-btn:hover{background-color:#2980b9}.validation-message{color:#e74c3c;background-color:#fdecea;border:1px solid #f5c6cb;padding:.5rem 1rem;border-radius:6px;font-size:.9rem;margin-top:.5rem}\n"] }]
|
|
286
288
|
}], ctorParameters: () => [{ type: i2.Router }, { type: i2.ActivatedRoute }, { type: i2$1.MessageService }, { type: i3$1.HTTPService }, { type: i1.TokenService }, { type: i2$1.AppEmbeddingExtensions }, { type: undefined, decorators: [{
|
|
287
289
|
type: Inject,
|
|
288
290
|
args: [ANONYMOUS_MODE]
|
|
@@ -864,13 +866,13 @@ class PagesComponent {
|
|
|
864
866
|
onResize(event) {
|
|
865
867
|
this.getHeight();
|
|
866
868
|
}
|
|
867
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PagesComponent, deps: [{ token: i3.DomSanitizer }, { token: i1.AppState }, { token:
|
|
869
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PagesComponent, deps: [{ token: i3.DomSanitizer }, { token: i1.AppState }, { token: i2$3.Location }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
868
870
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: PagesComponent, isStandalone: true, selector: "pages", host: { listeners: { "window:resize": "onResize($event)" } }, ngImport: i0, template: "<div class=\"pages-container\">\r\n <sidebar></sidebar>\r\n <div style=\"width: 100%;\">\r\n <navbar>\r\n <breadcrumb></breadcrumb>\r\n </navbar>\r\n <div class=\"main-wrapper\" [style.max-height.px]=\"maxHeight\" [ngClass]=\"{'menu-collapsed': isMenuCollapsed}\">\r\n <div class=\"az-overlay\" *ngIf=\"!isMenuCollapsed\" (click)=\"hideMenu()\"></div>\r\n <div class=\"main\">\r\n <router-outlet></router-outlet>\r\n </div>\r\n <back-top [position]=\"200\"></back-top>\r\n </div>\r\n </div>\r\n</div>", styles: [".main-wrapper{padding:20px 40px;position:relative;width:calc(100vw - 230px);height:100%;overflow:auto}.main{height:100%;min-height:650px}.az-overlay{position:fixed;inset:0;z-index:8;background:#242d3a33;width:100%;height:100%;display:none}.pages-container{height:100vh;width:100vw;display:flex}@media (max-width: 544px){.main-wrapper,.main-wrapper.menu-collapsed{margin-left:0;padding:30px 20px}.az-overlay{display:block}.footer .footer-main,.footer .created{float:none}}@media (min-width: 544px) and (max-width: 768px){.az-overlay{display:block}}\n"], dependencies: [{ kind: "component", type: Navbar, selector: "navbar" }, { kind: "component", type: Sidebar, selector: "sidebar" }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: Breadcrumb, selector: "breadcrumb" }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "component", type: BackTop, selector: "back-top", inputs: ["position", "showSpeed", "moveSpeed"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
869
871
|
}
|
|
870
872
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: PagesComponent, decorators: [{
|
|
871
873
|
type: Component,
|
|
872
874
|
args: [{ selector: "pages", encapsulation: ViewEncapsulation.None, imports: [Navbar, Sidebar, NgClass, NgIf, Breadcrumb, RouterOutlet, BackTop], template: "<div class=\"pages-container\">\r\n <sidebar></sidebar>\r\n <div style=\"width: 100%;\">\r\n <navbar>\r\n <breadcrumb></breadcrumb>\r\n </navbar>\r\n <div class=\"main-wrapper\" [style.max-height.px]=\"maxHeight\" [ngClass]=\"{'menu-collapsed': isMenuCollapsed}\">\r\n <div class=\"az-overlay\" *ngIf=\"!isMenuCollapsed\" (click)=\"hideMenu()\"></div>\r\n <div class=\"main\">\r\n <router-outlet></router-outlet>\r\n </div>\r\n <back-top [position]=\"200\"></back-top>\r\n </div>\r\n </div>\r\n</div>", styles: [".main-wrapper{padding:20px 40px;position:relative;width:calc(100vw - 230px);height:100%;overflow:auto}.main{height:100%;min-height:650px}.az-overlay{position:fixed;inset:0;z-index:8;background:#242d3a33;width:100%;height:100%;display:none}.pages-container{height:100vh;width:100vw;display:flex}@media (max-width: 544px){.main-wrapper,.main-wrapper.menu-collapsed{margin-left:0;padding:30px 20px}.az-overlay{display:block}.footer .footer-main,.footer .created{float:none}}@media (min-width: 544px) and (max-width: 768px){.az-overlay{display:block}}\n"] }]
|
|
873
|
-
}], ctorParameters: () => [{ type: i3.DomSanitizer }, { type: i1.AppState }, { type:
|
|
875
|
+
}], ctorParameters: () => [{ type: i3.DomSanitizer }, { type: i1.AppState }, { type: i2$3.Location }, { type: i2.Router }], propDecorators: { onResize: [{
|
|
874
876
|
type: HostListener,
|
|
875
877
|
args: ['window:resize', ['$event']]
|
|
876
878
|
}] } });
|
|
@@ -1248,7 +1250,7 @@ class EsImageCropperComponent {
|
|
|
1248
1250
|
};
|
|
1249
1251
|
}
|
|
1250
1252
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EsImageCropperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1251
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: EsImageCropperComponent, isStandalone: true, selector: "es-image-cropper", inputs: { Height: "Height", Width: "Width" }, ngImport: i0, template: "<div *ngIf=\"ProfileImage?.nativefiles?.length > 0\" [style.width.px]=\"Width\">\r\n <div class=\"d-flex\">\r\n <button (click)=\"onRotateLeft()\" class=\"btn btn-primary\"><i class=\"fa fa-undo\"></i></button>\r\n <button (click)=\"onRotateRight()\" class=\"btn btn-primary\"><i class=\"fa fa-repeat\"></i></button>\r\n <button (click)=\"onFlipHorizontal()\" class=\"btn btn-primary\"><i class=\"fa fa-arrows-h\"></i></button>\r\n <button (click)=\"onFlipVertical()\" class=\"btn btn-primary\"><i class=\"fa fa-arrows-v\"></i></button>\r\n <button (click)=\"onZoomIn()\" class=\"btn btn-primary\"><i class=\"fa fa-search-plus\"></i></button>\r\n <button (click)=\"onZoomOut()\" class=\"btn btn-primary\"><i class=\"fa fa-search-minus\"></i></button>\r\n <button (click)=\"onResetImage()\" class=\"btn btn-danger\" style=\"margin-left: auto; margin-right: 0px;\"><i class=\"fa fa-times\"></i></button>\r\n </div>\r\n</div>\r\n<div class=\"app-margin-top-10\" [style.max-height.px]=\"Height\" [style.width.px]=\"Width\">\r\n <form-file *ngIf=\"!(ProfileImage?.nativefiles?.length > 0)\" [LabelInputRatio]=\"'0 12'\" [FancyMode]=\"true\" [(ngModel)]=\"ProfileImage\" name=\"imageToCrop\"></form-file>\r\n <ng-container *ngIf=\"ProfileImage?.nativefiles?.length > 0\">\r\n <image-cropper style=\"--cropper-outline-color: rgba(0,0,0)\"\r\n [backgroundColor]=\"'#91a3b0'\"\r\n [imageFile]=\"ProfileImage.nativefiles[0]\"\r\n [aspectRatio]=\"4 / 3\"\r\n [maintainAspectRatio]=\"true\"\r\n [containWithinAspectRatio]=\"true\"\r\n [cropperStaticWidth]=\"320\"\r\n [cropperStaticHeight]=\"320\"\r\n [onlyScaleDown]=\"true\"\r\n [roundCropper]=\"true\"\r\n [canvasRotation]=\"canvasRotation\"\r\n [allowMoveImage]=\"true\"\r\n [(transform)]=\"transform\"\r\n (imageCropped)=\"onImageCropped($event)\">\r\n </image-cropper>\r\n </ng-container>\r\n</div>", styles: [".btn{width:40px;margin-right:10px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ImageCropperComponent, selector: "image-cropper", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "imageAltText", "options", "cropperFrameAriaLabel", "output", "format", "autoCrop", "cropper", "transform", "maintainAspectRatio", "aspectRatio", "resetCropOnAspectRatioChange", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "checkImageType", "alignImage", "disabled", "hidden"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange", "cropperChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: FormsAndValidationsModule }, { kind: "component", type: i2$
|
|
1253
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: EsImageCropperComponent, isStandalone: true, selector: "es-image-cropper", inputs: { Height: "Height", Width: "Width" }, ngImport: i0, template: "<div *ngIf=\"ProfileImage?.nativefiles?.length > 0\" [style.width.px]=\"Width\">\r\n <div class=\"d-flex\">\r\n <button (click)=\"onRotateLeft()\" class=\"btn btn-primary\"><i class=\"fa fa-undo\"></i></button>\r\n <button (click)=\"onRotateRight()\" class=\"btn btn-primary\"><i class=\"fa fa-repeat\"></i></button>\r\n <button (click)=\"onFlipHorizontal()\" class=\"btn btn-primary\"><i class=\"fa fa-arrows-h\"></i></button>\r\n <button (click)=\"onFlipVertical()\" class=\"btn btn-primary\"><i class=\"fa fa-arrows-v\"></i></button>\r\n <button (click)=\"onZoomIn()\" class=\"btn btn-primary\"><i class=\"fa fa-search-plus\"></i></button>\r\n <button (click)=\"onZoomOut()\" class=\"btn btn-primary\"><i class=\"fa fa-search-minus\"></i></button>\r\n <button (click)=\"onResetImage()\" class=\"btn btn-danger\" style=\"margin-left: auto; margin-right: 0px;\"><i class=\"fa fa-times\"></i></button>\r\n </div>\r\n</div>\r\n<div class=\"app-margin-top-10\" [style.max-height.px]=\"Height\" [style.width.px]=\"Width\">\r\n <form-file *ngIf=\"!(ProfileImage?.nativefiles?.length > 0)\" [LabelInputRatio]=\"'0 12'\" [FancyMode]=\"true\" [(ngModel)]=\"ProfileImage\" name=\"imageToCrop\"></form-file>\r\n <ng-container *ngIf=\"ProfileImage?.nativefiles?.length > 0\">\r\n <image-cropper style=\"--cropper-outline-color: rgba(0,0,0)\"\r\n [backgroundColor]=\"'#91a3b0'\"\r\n [imageFile]=\"ProfileImage.nativefiles[0]\"\r\n [aspectRatio]=\"4 / 3\"\r\n [maintainAspectRatio]=\"true\"\r\n [containWithinAspectRatio]=\"true\"\r\n [cropperStaticWidth]=\"320\"\r\n [cropperStaticHeight]=\"320\"\r\n [onlyScaleDown]=\"true\"\r\n [roundCropper]=\"true\"\r\n [canvasRotation]=\"canvasRotation\"\r\n [allowMoveImage]=\"true\"\r\n [(transform)]=\"transform\"\r\n (imageCropped)=\"onImageCropped($event)\">\r\n </image-cropper>\r\n </ng-container>\r\n</div>", styles: [".btn{width:40px;margin-right:10px}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ImageCropperComponent, selector: "image-cropper", inputs: ["imageChangedEvent", "imageURL", "imageBase64", "imageFile", "imageAltText", "options", "cropperFrameAriaLabel", "output", "format", "autoCrop", "cropper", "transform", "maintainAspectRatio", "aspectRatio", "resetCropOnAspectRatioChange", "resizeToWidth", "resizeToHeight", "cropperMinWidth", "cropperMinHeight", "cropperMaxHeight", "cropperMaxWidth", "cropperStaticWidth", "cropperStaticHeight", "canvasRotation", "initialStepSize", "roundCropper", "onlyScaleDown", "imageQuality", "backgroundColor", "containWithinAspectRatio", "hideResizeSquares", "allowMoveImage", "checkImageType", "alignImage", "disabled", "hidden"], outputs: ["imageCropped", "startCropImage", "imageLoaded", "cropperReady", "loadImageFailed", "transformChange", "cropperChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: FormsAndValidationsModule }, { kind: "component", type: i2$4.EsFormFileComponent, selector: "form-file", inputs: ["Multiple", "AllowDownload", "MaxSize", "FancyMode", "ReadFile"] }] }); }
|
|
1252
1254
|
}
|
|
1253
1255
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EsImageCropperComponent, decorators: [{
|
|
1254
1256
|
type: Component,
|
|
@@ -1259,6 +1261,96 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1259
1261
|
type: Input
|
|
1260
1262
|
}] } });
|
|
1261
1263
|
|
|
1264
|
+
// Angular
|
|
1265
|
+
class FormSelectorComponent {
|
|
1266
|
+
constructor() {
|
|
1267
|
+
// Validazione
|
|
1268
|
+
this.SetValidationSubject = new Subject();
|
|
1269
|
+
// Presentazione
|
|
1270
|
+
this.ModalOnly = input(false);
|
|
1271
|
+
this.Valid = input(true);
|
|
1272
|
+
this.SelectedLabel = model(null);
|
|
1273
|
+
// Form
|
|
1274
|
+
this.Validation = input();
|
|
1275
|
+
this.Readonly = input();
|
|
1276
|
+
this.Form = input(null);
|
|
1277
|
+
this.Name = input();
|
|
1278
|
+
this.ngModelOptions = input();
|
|
1279
|
+
this.Required = input();
|
|
1280
|
+
this.Placeholder = input();
|
|
1281
|
+
// Navigazione
|
|
1282
|
+
this.HasExternalLink = input();
|
|
1283
|
+
// Eventi
|
|
1284
|
+
this.onChange = new EventEmitter();
|
|
1285
|
+
this.onSearch = new EventEmitter();
|
|
1286
|
+
this.onNavigation = new EventEmitter();
|
|
1287
|
+
this.onClipboardCopy = new EventEmitter();
|
|
1288
|
+
}
|
|
1289
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormSelectorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1290
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.14", type: FormSelectorComponent, isStandalone: true, selector: "form-selector", inputs: { SetValidationSubject: { classPropertyName: "SetValidationSubject", publicName: "SetValidationSubject", isSignal: false, isRequired: false, transformFunction: null }, ModalOnly: { classPropertyName: "ModalOnly", publicName: "ModalOnly", isSignal: true, isRequired: false, transformFunction: null }, Valid: { classPropertyName: "Valid", publicName: "Valid", isSignal: true, isRequired: false, transformFunction: null }, SelectedLabel: { classPropertyName: "SelectedLabel", publicName: "SelectedLabel", isSignal: true, isRequired: false, transformFunction: null }, Validation: { classPropertyName: "Validation", publicName: "Validation", isSignal: true, isRequired: false, transformFunction: null }, Readonly: { classPropertyName: "Readonly", publicName: "Readonly", isSignal: true, isRequired: false, transformFunction: null }, Form: { classPropertyName: "Form", publicName: "Form", isSignal: true, isRequired: false, transformFunction: null }, Name: { classPropertyName: "Name", publicName: "Name", isSignal: true, isRequired: false, transformFunction: null }, ngModelOptions: { classPropertyName: "ngModelOptions", publicName: "ngModelOptions", isSignal: true, isRequired: false, transformFunction: null }, Required: { classPropertyName: "Required", publicName: "Required", isSignal: true, isRequired: false, transformFunction: null }, Placeholder: { classPropertyName: "Placeholder", publicName: "Placeholder", isSignal: true, isRequired: false, transformFunction: null }, HasExternalLink: { classPropertyName: "HasExternalLink", publicName: "HasExternalLink", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { SelectedLabel: "SelectedLabelChange", onChange: "onChange", onSearch: "onSearch", onNavigation: "onNavigation", onClipboardCopy: "onClipboardCopy" }, ngImport: i0, template: "<div class=\"app-pointer app-selector-input-area\" (click)=\"onSearch.emit()\" (contextmenu)=\"onClipboardCopy.emit(); false;\"></div>\r\n\r\n<form-input *ngIf=\"!ModalOnly() && Name()\"\r\n [SetValidationSubject]=\"SetValidationSubject\"\r\n [class.app-selector-input-invalid]=\"!Valid()\"\r\n [class.app-selector-input]=\"!Readonly()\"\r\n [Form]=\"Form()\"\r\n readonly\r\n [FormLayout]=\"false\"\r\n [Validation]=\"Validation()\"\r\n [(ngModel)]=\"SelectedLabel\"\r\n [ngModelOptions]=\"ngModelOptions()\"\r\n [required]=\"Required()\"\r\n [Placeholder]=\"Placeholder()\" \r\n type=\"text\"\r\n (inputChange)=\"onChange.emit()\"\r\n (click)=\"onSearch.emit()\"\r\n (contextmenu)=\"onClipboardCopy.emit(); false;\"\r\n name=\"{{Name()}}\">\r\n\r\n \r\n <ng-template #suffix>\r\n <span class=\"fa fa-search\" (click)=\"onSearch.emit();\"></span>\r\n </ng-template>\r\n</form-input>\r\n<span *ngIf=\"HasExternalLink()\" class=\"fa fa-external-link app-pointer\" style=\"position: absolute; right: 65px; bottom: 12px; z-index: 9999;\" (click)=\"onNavigation.emit()\"></span>", dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsAndValidationsModule }, { kind: "component", type: i2$4.EsFormInputComponent, selector: "form-input", inputs: ["minlength", "maxlength", "pattern", "Password"] }] }); }
|
|
1291
|
+
}
|
|
1292
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormSelectorComponent, decorators: [{
|
|
1293
|
+
type: Component,
|
|
1294
|
+
args: [{ selector: "form-selector", imports: [FormsModule, CommonModule, FormsAndValidationsModule], template: "<div class=\"app-pointer app-selector-input-area\" (click)=\"onSearch.emit()\" (contextmenu)=\"onClipboardCopy.emit(); false;\"></div>\r\n\r\n<form-input *ngIf=\"!ModalOnly() && Name()\"\r\n [SetValidationSubject]=\"SetValidationSubject\"\r\n [class.app-selector-input-invalid]=\"!Valid()\"\r\n [class.app-selector-input]=\"!Readonly()\"\r\n [Form]=\"Form()\"\r\n readonly\r\n [FormLayout]=\"false\"\r\n [Validation]=\"Validation()\"\r\n [(ngModel)]=\"SelectedLabel\"\r\n [ngModelOptions]=\"ngModelOptions()\"\r\n [required]=\"Required()\"\r\n [Placeholder]=\"Placeholder()\" \r\n type=\"text\"\r\n (inputChange)=\"onChange.emit()\"\r\n (click)=\"onSearch.emit()\"\r\n (contextmenu)=\"onClipboardCopy.emit(); false;\"\r\n name=\"{{Name()}}\">\r\n\r\n \r\n <ng-template #suffix>\r\n <span class=\"fa fa-search\" (click)=\"onSearch.emit();\"></span>\r\n </ng-template>\r\n</form-input>\r\n<span *ngIf=\"HasExternalLink()\" class=\"fa fa-external-link app-pointer\" style=\"position: absolute; right: 65px; bottom: 12px; z-index: 9999;\" (click)=\"onNavigation.emit()\"></span>" }]
|
|
1295
|
+
}], propDecorators: { SetValidationSubject: [{
|
|
1296
|
+
type: Input
|
|
1297
|
+
}], onChange: [{
|
|
1298
|
+
type: Output
|
|
1299
|
+
}], onSearch: [{
|
|
1300
|
+
type: Output
|
|
1301
|
+
}], onNavigation: [{
|
|
1302
|
+
type: Output
|
|
1303
|
+
}], onClipboardCopy: [{
|
|
1304
|
+
type: Output
|
|
1305
|
+
}] } });
|
|
1306
|
+
|
|
1307
|
+
// Angular
|
|
1308
|
+
class FormSelectorDialogComponent {
|
|
1309
|
+
constructor() {
|
|
1310
|
+
this.SingleSelection = true;
|
|
1311
|
+
this.onClearValue = new EventEmitter();
|
|
1312
|
+
this.onCloseDialog = new EventEmitter();
|
|
1313
|
+
this.onConfirmSelection = new EventEmitter();
|
|
1314
|
+
this.onSearchRequest = new EventEmitter();
|
|
1315
|
+
this.onDialogVisibilityChange = new EventEmitter();
|
|
1316
|
+
}
|
|
1317
|
+
show() {
|
|
1318
|
+
this.itemSearch.show();
|
|
1319
|
+
}
|
|
1320
|
+
hide() {
|
|
1321
|
+
this.itemSearch.hide();
|
|
1322
|
+
}
|
|
1323
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormSelectorDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1324
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: FormSelectorDialogComponent, isStandalone: true, selector: "form-selector-dialog", inputs: { Subject: "Subject", EsTableTemplate: "EsTableTemplate", TableClasses: "TableClasses", SingleSelection: "SingleSelection", searchView: "searchView" }, outputs: { onClearValue: "onClearValue", onCloseDialog: "onCloseDialog", onConfirmSelection: "onConfirmSelection", onSearchRequest: "onSearchRequest", onDialogVisibilityChange: "onDialogVisibilityChange" }, viewQueries: [{ propertyName: "itemSearch", first: true, predicate: ["itemSearch"], descendants: true }], ngImport: i0, template: "<es-modal #itemSearch [Size]=\"'XL'\" (onShow)=\"onDialogVisibilityChange.emit(true)\" (onHide)=\"onDialogVisibilityChange.emit(false)\">\r\n <es-modal-head (Close)=\"itemSearch.hide();\">\r\n <h5 class=\"modal-title pull-left\">Seleziona {{Subject}}</h5>\r\n </es-modal-head>\r\n <div class=\"modal-body\">\r\n <div class=\"col-md-12 bottom-15\">\r\n <form>\r\n <div class=\"row\">\r\n <div class=\"col-md-11\">\r\n <!--Parte specifica dei filtri-->\r\n <ng-content select=\"[filters]\"></ng-content>\r\n <!----------------------------->\r\n </div>\r\n <div class=\"col-md-1 app-no-padding\">\r\n <button class=\"input-group-addon btn app-btn-search\" (click)=\"onSearchRequest.emit(true)\" type=\"submit\"><i class=\"fa fa-search\"></i></button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n\r\n <es-table [class]=\"TableClasses\" [(ngModel)]=\"searchView\" [Selection]=\"true\" [SingleSelection]=\"SingleSelection\" (onSearchRequest)=\"onSearchRequest.emit($event);\" [EsThTdProvider]=\"EsTableTemplate\"></es-table>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-danger\" style=\"margin-right: auto;\" (click)=\"onClearValue.emit();\">Rimuovi valore</button>\r\n <button type=\"button\" class=\"btn btn-secondary app-margin-right-10\" (click)=\"onCloseDialog.emit();\">Annulla</button>\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"onConfirmSelection.emit();\">Conferma</button>\r\n </div>\r\n</es-modal>", dependencies: [{ kind: "ngmodule", type: EsTableModule }, { kind: "component", type: i7.EsTableComponent, selector: "es-table", inputs: ["globalCheck", "autoUpdate", "seconds", "researchInProgress", "globalColVisCheck", "EsThTdProvider", "CornerMenuOptions", "ColumnsResizable", "ColumnsPinnable", "AutoUpdate", "Height", "EmptySpaceBackgroundColor", "EsTableHandledSearch", "MaxHeight", "ContainerClass", "XLSXExport", "CSVExport", "AllSearch", "HighCellDensity", "Selection", "ShowLoadingOnBootstrap", "Removal", "RemovalCondition", "Export", "ShiftClick", "CountLabel", "HidePaging", "HidePagingCount", "HidePagingButtons", "ContextMenu", "ExportFileName", "TableClass", "ExportFunction", "ExportOnlyVisibleColumns", "HasHeaderGroup", "HasSecondaryHeaderGroup", "HeaderHidden", "BodyHidden", "SelectionDisabled", "SingleSelection", "RowClassAssigner", "OrderByColumn", "MultipleOrderingDirectives", "HiddenColumns", "ColumnsOrdering", "SearchView", "SelectAll", "UseArrayModePaging", "DynamicRowColumnsDefinition", "DynamicOperations", "Hierarchy", "ParentKey", "OwnKey", "StartsExpanded", "SavePreferences", "DefaultAlignment", "PagingStyle", "RowGroupingPagingStyle", "ItemSourceProperty", "UseSelectionCache", "ShowItemGroupsColumns", "Editable", "RangeSelection", "SearchThrottle", "ArraymodeItemsPerPage"], outputs: ["globalCheckChange", "autoUpdateChange", "secondsChange", "researchInProgressChange", "globalColVisCheckChange", "onOrderChanged", "onSearchRequest", "onSelectionChanged", "onRemoval", "onAbortRemoval", "onModelChange", "onOpenContextMenu", "onCornerAction", "onDynamicOperation"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: CommonModule }, { kind: "component", type: EsModalComponent, selector: "es-modal", inputs: ["Size", "IgnoreBackdrop", "Backdrop", "HasOverlap"], outputs: ["onShow", "onHide"] }, { kind: "component", type: EsModalHeadComponent, selector: "es-modal-head", outputs: ["Close"] }] }); }
|
|
1325
|
+
}
|
|
1326
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: FormSelectorDialogComponent, decorators: [{
|
|
1327
|
+
type: Component,
|
|
1328
|
+
args: [{ selector: "form-selector-dialog", imports: [EsTableModule, FormsModule, CommonModule, EsModalComponent, EsModalHeadComponent], template: "<es-modal #itemSearch [Size]=\"'XL'\" (onShow)=\"onDialogVisibilityChange.emit(true)\" (onHide)=\"onDialogVisibilityChange.emit(false)\">\r\n <es-modal-head (Close)=\"itemSearch.hide();\">\r\n <h5 class=\"modal-title pull-left\">Seleziona {{Subject}}</h5>\r\n </es-modal-head>\r\n <div class=\"modal-body\">\r\n <div class=\"col-md-12 bottom-15\">\r\n <form>\r\n <div class=\"row\">\r\n <div class=\"col-md-11\">\r\n <!--Parte specifica dei filtri-->\r\n <ng-content select=\"[filters]\"></ng-content>\r\n <!----------------------------->\r\n </div>\r\n <div class=\"col-md-1 app-no-padding\">\r\n <button class=\"input-group-addon btn app-btn-search\" (click)=\"onSearchRequest.emit(true)\" type=\"submit\"><i class=\"fa fa-search\"></i></button>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n\r\n <es-table [class]=\"TableClasses\" [(ngModel)]=\"searchView\" [Selection]=\"true\" [SingleSelection]=\"SingleSelection\" (onSearchRequest)=\"onSearchRequest.emit($event);\" [EsThTdProvider]=\"EsTableTemplate\"></es-table>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-danger\" style=\"margin-right: auto;\" (click)=\"onClearValue.emit();\">Rimuovi valore</button>\r\n <button type=\"button\" class=\"btn btn-secondary app-margin-right-10\" (click)=\"onCloseDialog.emit();\">Annulla</button>\r\n <button type=\"button\" class=\"btn btn-primary\" (click)=\"onConfirmSelection.emit();\">Conferma</button>\r\n </div>\r\n</es-modal>" }]
|
|
1329
|
+
}], propDecorators: { Subject: [{
|
|
1330
|
+
type: Input
|
|
1331
|
+
}], EsTableTemplate: [{
|
|
1332
|
+
type: Input
|
|
1333
|
+
}], TableClasses: [{
|
|
1334
|
+
type: Input
|
|
1335
|
+
}], SingleSelection: [{
|
|
1336
|
+
type: Input
|
|
1337
|
+
}], searchView: [{
|
|
1338
|
+
type: Input
|
|
1339
|
+
}], onClearValue: [{
|
|
1340
|
+
type: Output
|
|
1341
|
+
}], onCloseDialog: [{
|
|
1342
|
+
type: Output
|
|
1343
|
+
}], onConfirmSelection: [{
|
|
1344
|
+
type: Output
|
|
1345
|
+
}], onSearchRequest: [{
|
|
1346
|
+
type: Output
|
|
1347
|
+
}], onDialogVisibilityChange: [{
|
|
1348
|
+
type: Output
|
|
1349
|
+
}], itemSearch: [{
|
|
1350
|
+
type: ViewChild,
|
|
1351
|
+
args: ["itemSearch"]
|
|
1352
|
+
}] } });
|
|
1353
|
+
|
|
1262
1354
|
// Angular
|
|
1263
1355
|
const COMPONENTS = [
|
|
1264
1356
|
BackTop,
|
|
@@ -1274,11 +1366,13 @@ const COMPONENTS = [
|
|
|
1274
1366
|
EsModalComponent,
|
|
1275
1367
|
EsModalHeadComponent,
|
|
1276
1368
|
LabeledSpanComponent,
|
|
1277
|
-
EsImageCropperComponent
|
|
1369
|
+
EsImageCropperComponent,
|
|
1370
|
+
FormSelectorComponent,
|
|
1371
|
+
FormSelectorDialogComponent
|
|
1278
1372
|
];
|
|
1279
1373
|
class ComponentsModule {
|
|
1280
1374
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1281
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: ComponentsModule, imports: [CommonModule, RouterModule, FormsModule, DirectivesModule, LocalizationModule, ProgressbarModule, BsDropdownModule,
|
|
1375
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.14", ngImport: i0, type: ComponentsModule, imports: [CommonModule, RouterModule, FormsModule, DirectivesModule, LocalizationModule, ProgressbarModule, BsDropdownModule, ModalModule, EsTableModule, BackTop,
|
|
1282
1376
|
Breadcrumb,
|
|
1283
1377
|
ErrorPageComponent,
|
|
1284
1378
|
PagesComponent,
|
|
@@ -1291,7 +1385,9 @@ class ComponentsModule {
|
|
|
1291
1385
|
EsModalComponent,
|
|
1292
1386
|
EsModalHeadComponent,
|
|
1293
1387
|
LabeledSpanComponent,
|
|
1294
|
-
EsImageCropperComponent
|
|
1388
|
+
EsImageCropperComponent,
|
|
1389
|
+
FormSelectorComponent,
|
|
1390
|
+
FormSelectorDialogComponent], exports: [BackTop,
|
|
1295
1391
|
Breadcrumb,
|
|
1296
1392
|
ErrorPageComponent,
|
|
1297
1393
|
PagesComponent,
|
|
@@ -1304,17 +1400,21 @@ class ComponentsModule {
|
|
|
1304
1400
|
EsModalComponent,
|
|
1305
1401
|
EsModalHeadComponent,
|
|
1306
1402
|
LabeledSpanComponent,
|
|
1307
|
-
EsImageCropperComponent
|
|
1308
|
-
|
|
1403
|
+
EsImageCropperComponent,
|
|
1404
|
+
FormSelectorComponent,
|
|
1405
|
+
FormSelectorDialogComponent] }); }
|
|
1406
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ComponentsModule, imports: [CommonModule, RouterModule, FormsModule, DirectivesModule, LocalizationModule, ProgressbarModule, BsDropdownModule, ModalModule, EsTableModule, ErrorPageComponent,
|
|
1309
1407
|
PagesComponent,
|
|
1310
1408
|
Navbar,
|
|
1311
1409
|
Sidebar,
|
|
1312
|
-
EsImageCropperComponent
|
|
1410
|
+
EsImageCropperComponent,
|
|
1411
|
+
FormSelectorComponent,
|
|
1412
|
+
FormSelectorDialogComponent] }); }
|
|
1313
1413
|
}
|
|
1314
1414
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: ComponentsModule, decorators: [{
|
|
1315
1415
|
type: NgModule,
|
|
1316
1416
|
args: [{
|
|
1317
|
-
imports: [CommonModule, RouterModule, FormsModule, DirectivesModule, LocalizationModule, ProgressbarModule, BsDropdownModule,
|
|
1417
|
+
imports: [CommonModule, RouterModule, FormsModule, DirectivesModule, LocalizationModule, ProgressbarModule, BsDropdownModule, ModalModule, EsTableModule, ...COMPONENTS],
|
|
1318
1418
|
exports: [...COMPONENTS]
|
|
1319
1419
|
}]
|
|
1320
1420
|
}] });
|
|
@@ -1371,13 +1471,13 @@ class EmbeddingComponent extends BaseComponent {
|
|
|
1371
1471
|
this.EmbeddingSuccesfull = !!this.Page && !!this.Module && !!this.Localhost;
|
|
1372
1472
|
});
|
|
1373
1473
|
}
|
|
1374
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EmbeddingComponent, deps: [{ token: i0.Injector }, { token: i2$1.AppEmbeddingExtensions }, { token:
|
|
1474
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EmbeddingComponent, deps: [{ token: i0.Injector }, { token: i2$1.AppEmbeddingExtensions }, { token: i2$3.Location }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1375
1475
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: EmbeddingComponent, isStandalone: true, selector: "embedding", usesInheritance: true, ngImport: i0, template: "<jace-resource *ngIf=\"EmbeddingSuccesfull && Page\" [Module]=\"Module\" [Localhost]=\"Localhost\" Page=\"{{Page}}{{Pars}}{{QueryPars}}\"></jace-resource>\r\n<div *ngIf=\"!EmbeddingSuccesfull\">\r\n Errori nell'embeddare risorsa {{Page}};{{Pars}} del modulo {{Module}} (Localhost {{Localhost}})\r\n</div>", dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: JaceResourceComponent, selector: "jace-resource", inputs: ["Module", "ModuleKeyType", "Page", "Localhost", "Params"] }] }); }
|
|
1376
1476
|
}
|
|
1377
1477
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EmbeddingComponent, decorators: [{
|
|
1378
1478
|
type: Component,
|
|
1379
1479
|
args: [{ selector: 'embedding', imports: [NgIf, JaceResourceComponent], template: "<jace-resource *ngIf=\"EmbeddingSuccesfull && Page\" [Module]=\"Module\" [Localhost]=\"Localhost\" Page=\"{{Page}}{{Pars}}{{QueryPars}}\"></jace-resource>\r\n<div *ngIf=\"!EmbeddingSuccesfull\">\r\n Errori nell'embeddare risorsa {{Page}};{{Pars}} del modulo {{Module}} (Localhost {{Localhost}})\r\n</div>" }]
|
|
1380
|
-
}], ctorParameters: () => [{ type: i0.Injector }, { type: i2$1.AppEmbeddingExtensions }, { type:
|
|
1480
|
+
}], ctorParameters: () => [{ type: i0.Injector }, { type: i2$1.AppEmbeddingExtensions }, { type: i2$3.Location }] });
|
|
1381
1481
|
|
|
1382
1482
|
class UserInfoComponentLoc extends LocalizationService {
|
|
1383
1483
|
constructor(injector) {
|
|
@@ -1506,7 +1606,7 @@ class UserInfosComponent extends BaseComponent {
|
|
|
1506
1606
|
}
|
|
1507
1607
|
}
|
|
1508
1608
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserInfosComponent, deps: [{ token: i0.Injector }, { token: i1.TokenService }, { token: i2$1.MessageService }, { token: i2$1.ExportService }, { token: i2$1.UtilityService }, { token: i1$1.LocalizationService }, { token: i1.AppState }, { token: i1.UserPreferencesService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1509
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UserInfosComponent, isStandalone: true, selector: "user-infos", viewQueries: [{ propertyName: "dlgShowAccountRoles", first: true, predicate: ["dlgShowAccountRoles"], descendants: true }, { propertyName: "dlgUpdateProfilePicture", first: true, predicate: ["dlgUpdateProfilePicture"], descendants: true }, { propertyName: "imageCropper", first: true, predicate: ["imageCropper"], descendants: true }, { propertyName: "dlgUpdateRecoverySettings", first: true, predicate: ["dlgUpdateRecoverySettings"], descendants: true }, { propertyName: "dlgUpdatePassword", first: true, predicate: ["dlgUpdatePassword"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div style=\"height: 100%; width: 100%; display: flex;\">\r\n <div style=\"margin: auto;\">\r\n <div class=\"user-img-container\">\r\n <img [src]=\"profile.ProfilePicture\" alt=\"user-img\" class=\"user-img\" />\r\n <div class=\"app-pointer user-img-btn\">\r\n <div class=\"app-opacity user-img-btn-body\" (click)=\"onUpdateProfilePicture();\">\r\n <i class=\"far fa-pen\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"app-margin-top-15\" style=\"position: relative;\" *ngIf=\"AccountDetails\">\r\n <div class=\"card card-body app-no-margin app-padding-15\">\r\n <div class=\"row\">\r\n <div *ac=\"'R:Jace Admin'\" class=\"user-roles-btn\" pTooltip=\"Visualizza Ruoli e Permessi\" matTooltipPosition=\"above\" (click)=\"onShowAccountRoles();\">\r\n <i class=\"far fa-book-user\"></i>\r\n </div>\r\n <div class=\"col-md-6\"><labeled-span [Label]=\"'Utente' | localize : lc\" Display=\"Vertical\">{{AccountDetails.username}}</labeled-span></div>\r\n <div class=\"col-md-6\"><labeled-span [Label]=\"'Tenant' | localize : lc\" Display=\"Vertical\">{{AccountDetails.tenantid}}</labeled-span></div>\r\n <div class=\"col-md-6 app-margin-top-10\"><labeled-span [Label]=\"'Nome' | localize : lc\" Display=\"Vertical\">{{AccountDetails.firstname}}</labeled-span></div>\r\n <div class=\"col-md-6 app-margin-top-10\"><labeled-span [Label]=\"'Cognome' | localize : lc\" Display=\"Vertical\">{{AccountDetails.lastname}}</labeled-span> </div>\r\n <div class=\"col-md-12 app-margin-top-10\"><labeled-span [Label]=\"'Email' | localize : lc\" Display=\"Vertical\">{{AccountDetails.recoveryemail || 'Non disponibile'}}</labeled-span></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"app-margin-top-10 row\">\r\n <div class=\"col-md-6\" style=\"padding-right: 5px;\">\r\n <button type=\"button\" style=\"width: 100%;\" class=\"btn btn-primary\" (click)=\"onUpdatePassword()\">Modifica Password</button>\r\n </div>\r\n <div class=\"col-md-6\" style=\"padding-left: 5px;\">\r\n <button type=\"button\" style=\"width: 100%;\" class=\"btn btn-primary\" (click)=\"onUpdateRecoverySettings()\">Modifica Email</button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!--Update Password-->\r\n<es-modal #dlgUpdatePassword [Size]=\"'L'\">\r\n <es-modal-head (Close)=\"dlgUpdatePassword.hide();\">\r\n <h5 class=\"modal-title pull-left\">Modifica Password</h5>\r\n </es-modal-head>\r\n <form *ngIf=\"UpdatePasswordDTO\" #formUpdatePassword=\"ngForm\" (ngSubmit)=\"formUpdatePassword.valid && doUpdatePassword()\">\r\n <div class=\"modal-body lastfix\">\r\n <form-input [Password]=\"true\" [Label]=\"'Password' | localize: lc\" [(ngModel)]=\"UpdatePasswordDTO.oldpwd\" name=\"oldpw\" required></form-input>\r\n <form-input [Password]=\"true\" [Label]=\"'Nuova Password' | localize: lc\" [(ngModel)]=\"UpdatePasswordDTO.newpwd\" name=\"newpw\" required></form-input>\r\n <form-input [Password]=\"true\" [Label]=\"'Conferma Password' | localize: lc\" [(ngModel)]=\"UpdatePasswordDTO.confirmpwd\" name=\"confpw\" required></form-input>\r\n <!--Validazione Custom-->\r\n <div *ngIf=\"CustomError\" class=\"app-white-text app-margin-top-15 app-margin-bottom-0 card app-padding-10 card-danger\">\r\n <strong>{{'Error' | localize : lc}}: </strong>{{CustomError}}\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary app-margin-right-10\" (click)=\"dlgUpdatePassword.hide();\">{{'Cancel' | localize : lc}}</button>\r\n <button type=\"submit\" class=\"btn btn-primary\">Conferma</button>\r\n </div>\r\n </form>\r\n</es-modal>\r\n\r\n<!--Update Extra Info-->\r\n<es-modal #dlgUpdateRecoverySettings [Size]=\"'L'\">\r\n <es-modal-head (Close)=\"dlgUpdateRecoverySettings.hide();\">\r\n <h5 class=\"modal-title pull-left\">{{'Modifica Email' | localize : lc}}</h5>\r\n </es-modal-head>\r\n <form *ngIf=\"UpdateRecoverySettingsDTO\" #formUpdateInfos=\"ngForm\" (ngSubmit)=\"formUpdateInfos.valid && doUpdateRecoverySettings()\">\r\n <div class=\"modal-body lastfix\">\r\n <form-input [LabelInputRatio]=\"'3 9'\" [Label]=\"'Email' | localize: lc\" [(ngModel)]=\"UpdateRecoverySettingsDTO.email\" name=\"email\"></form-input>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary app-margin-right-10\" (click)=\"dlgUpdateRecoverySettings.hide();\">{{'Cancel' | localize : lc}}</button>\r\n <button type=\"submit\" class=\"btn btn-primary\">Conferma</button>\r\n </div>\r\n </form>\r\n</es-modal>\r\n\r\n<!--Upload Picture-->\r\n<es-modal #dlgUpdateProfilePicture [Size]=\"'XL'\">\r\n <es-modal-head (Close)=\"dlgUpdateProfilePicture.hide();\">\r\n <h5 class=\"modal-title pull-left\">Carica immagine</h5>\r\n </es-modal-head>\r\n <div class=\"modal-body d-flex\">\r\n <div style=\"margin: auto;\">\r\n <es-image-cropper #imageCropper [Height]=\"600\" [Width]=\"800\"></es-image-cropper>\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"dlgUpdateProfilePicture.hide()\">Annulla</button>\r\n <button type=\"submit\" class=\"btn btn-primary\" (click)=\"doUpdateProfilePicture()\">Conferma</button>\r\n </div>\r\n</es-modal>\r\n\r\n<!--Ruoli e Permessi-->\r\n<es-modal #dlgShowAccountRoles [Size]=\"'L'\">\r\n <es-modal-head (Close)=\"dlgShowAccountRoles.hide();\">\r\n <h5 class=\"modal-title pull-left\">{{'Ruoli e Permessi' | localize : lc}}</h5>\r\n </es-modal-head>\r\n <div class=\"modal-body\" style=\"max-height: 600px; overflow-y: auto;\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\" *ngIf=\"AccountRoles\">\r\n <labeled-span [Label]=\"'Ruoli'\" Display=\"Vertical\">\r\n <div *ngFor=\"let r of AccountRoles;\">{{r}}</div>\r\n </labeled-span>\r\n </div>\r\n <div class=\"col-md-6\" *ngIf=\"AccountPermissions\">\r\n <labeled-span [Label]=\"'Permessi'\" Display=\"Vertical\">\r\n <div *ngFor=\"let p of AccountPermissions;\">{{p}}</div>\r\n </labeled-span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"dlgShowAccountRoles.hide();\">{{'Chiudi' | localize : lc}}</button>\r\n </div>\r\n</es-modal>", styles: [".app-wideplus{width:100%;text-align:center;border:1px solid #ccc;border-radius:5px;padding:5px}.btn-outline-main-modified{color:#242d3a;border-color:#242d3a;background:transparent}.btn-outline-main-modified:hover{color:#fff;background:#242d3a;border-color:#242d3a}.user-img-container{position:relative;width:200px;margin:auto}.user-img{object-fit:cover;max-height:200px;min-height:200px;min-width:200px;max-width:200px;border-radius:50%;box-shadow:0 8px 6px #1313130a,0 12px 16px #1313130d}.user-img-btn{position:absolute;right:0;width:40px;height:40px;margin-top:-50px}.user-img-btn-body{background-color:#0056b3;color:#fff;border-radius:50%;text-align:center;height:100%;font-size:1.2rem;line-height:2.5rem}.user-roles-btn{position:absolute;top:0;right:2px;font-size:1.2rem;padding:5px;z-index:1;color:#0056b3;cursor:pointer;width:auto}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsAndValidationsModule }, { kind: "component", type: i2$3.EsFormInputComponent, selector: "form-input", inputs: ["minlength", "maxlength", "pattern", "Password"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: LocalizationModule }, { kind: "pipe", type: i1$1.LocalizePipe, name: "localize" }, { kind: "component", type: EsModalComponent, selector: "es-modal", inputs: ["Size", "IgnoreBackdrop", "Backdrop", "HasOverlap"], outputs: ["onShow", "onHide"] }, { kind: "component", type: EsModalHeadComponent, selector: "es-modal-head", outputs: ["Close"] }, { kind: "component", type: EsImageCropperComponent, selector: "es-image-cropper", inputs: ["Height", "Width"] }, { kind: "component", type: LabeledSpanComponent, selector: "labeled-span", inputs: ["First", "Label", "Display"] }, { kind: "ngmodule", type: ExtensionsModule }, { kind: "ngmodule", type: AccessControlModule }, { kind: "directive", type: i5$1.AccessControlDirective, selector: "[ac]", inputs: ["ac", "acAbsolute"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i7$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }], viewProviders: [{ provide: LocalizationService, useClass: UserInfoComponentLoc }] }); }
|
|
1609
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: UserInfosComponent, isStandalone: true, selector: "user-infos", viewQueries: [{ propertyName: "dlgShowAccountRoles", first: true, predicate: ["dlgShowAccountRoles"], descendants: true }, { propertyName: "dlgUpdateProfilePicture", first: true, predicate: ["dlgUpdateProfilePicture"], descendants: true }, { propertyName: "imageCropper", first: true, predicate: ["imageCropper"], descendants: true }, { propertyName: "dlgUpdateRecoverySettings", first: true, predicate: ["dlgUpdateRecoverySettings"], descendants: true }, { propertyName: "dlgUpdatePassword", first: true, predicate: ["dlgUpdatePassword"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<div style=\"height: 100%; width: 100%; display: flex;\">\r\n <div style=\"margin: auto;\">\r\n <div class=\"user-img-container\">\r\n <img [src]=\"profile.ProfilePicture\" alt=\"user-img\" class=\"user-img\" />\r\n <div class=\"app-pointer user-img-btn\">\r\n <div class=\"app-opacity user-img-btn-body\" (click)=\"onUpdateProfilePicture();\">\r\n <i class=\"far fa-pen\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"app-margin-top-15\" style=\"position: relative;\" *ngIf=\"AccountDetails\">\r\n <div class=\"card card-body app-no-margin app-padding-15\">\r\n <div class=\"row\">\r\n <div *ac=\"'R:Jace Admin'\" class=\"user-roles-btn\" pTooltip=\"Visualizza Ruoli e Permessi\" matTooltipPosition=\"above\" (click)=\"onShowAccountRoles();\">\r\n <i class=\"far fa-book-user\"></i>\r\n </div>\r\n <div class=\"col-md-6\"><labeled-span [Label]=\"'Utente' | localize : lc\" Display=\"Vertical\">{{AccountDetails.username}}</labeled-span></div>\r\n <div class=\"col-md-6\"><labeled-span [Label]=\"'Tenant' | localize : lc\" Display=\"Vertical\">{{AccountDetails.tenantid}}</labeled-span></div>\r\n <div class=\"col-md-6 app-margin-top-10\"><labeled-span [Label]=\"'Nome' | localize : lc\" Display=\"Vertical\">{{AccountDetails.firstname}}</labeled-span></div>\r\n <div class=\"col-md-6 app-margin-top-10\"><labeled-span [Label]=\"'Cognome' | localize : lc\" Display=\"Vertical\">{{AccountDetails.lastname}}</labeled-span> </div>\r\n <div class=\"col-md-12 app-margin-top-10\"><labeled-span [Label]=\"'Email' | localize : lc\" Display=\"Vertical\">{{AccountDetails.recoveryemail || 'Non disponibile'}}</labeled-span></div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"app-margin-top-10 row\">\r\n <div class=\"col-md-6\" style=\"padding-right: 5px;\">\r\n <button type=\"button\" style=\"width: 100%;\" class=\"btn btn-primary\" (click)=\"onUpdatePassword()\">Modifica Password</button>\r\n </div>\r\n <div class=\"col-md-6\" style=\"padding-left: 5px;\">\r\n <button type=\"button\" style=\"width: 100%;\" class=\"btn btn-primary\" (click)=\"onUpdateRecoverySettings()\">Modifica Email</button>\r\n </div>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!--Update Password-->\r\n<es-modal #dlgUpdatePassword [Size]=\"'L'\">\r\n <es-modal-head (Close)=\"dlgUpdatePassword.hide();\">\r\n <h5 class=\"modal-title pull-left\">Modifica Password</h5>\r\n </es-modal-head>\r\n <form *ngIf=\"UpdatePasswordDTO\" #formUpdatePassword=\"ngForm\" (ngSubmit)=\"formUpdatePassword.valid && doUpdatePassword()\">\r\n <div class=\"modal-body lastfix\">\r\n <form-input [Password]=\"true\" [Label]=\"'Password' | localize: lc\" [(ngModel)]=\"UpdatePasswordDTO.oldpwd\" name=\"oldpw\" required></form-input>\r\n <form-input [Password]=\"true\" [Label]=\"'Nuova Password' | localize: lc\" [(ngModel)]=\"UpdatePasswordDTO.newpwd\" name=\"newpw\" required></form-input>\r\n <form-input [Password]=\"true\" [Label]=\"'Conferma Password' | localize: lc\" [(ngModel)]=\"UpdatePasswordDTO.confirmpwd\" name=\"confpw\" required></form-input>\r\n <!--Validazione Custom-->\r\n <div *ngIf=\"CustomError\" class=\"app-white-text app-margin-top-15 app-margin-bottom-0 card app-padding-10 card-danger\">\r\n <strong>{{'Error' | localize : lc}}: </strong>{{CustomError}}\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary app-margin-right-10\" (click)=\"dlgUpdatePassword.hide();\">{{'Cancel' | localize : lc}}</button>\r\n <button type=\"submit\" class=\"btn btn-primary\">Conferma</button>\r\n </div>\r\n </form>\r\n</es-modal>\r\n\r\n<!--Update Extra Info-->\r\n<es-modal #dlgUpdateRecoverySettings [Size]=\"'L'\">\r\n <es-modal-head (Close)=\"dlgUpdateRecoverySettings.hide();\">\r\n <h5 class=\"modal-title pull-left\">{{'Modifica Email' | localize : lc}}</h5>\r\n </es-modal-head>\r\n <form *ngIf=\"UpdateRecoverySettingsDTO\" #formUpdateInfos=\"ngForm\" (ngSubmit)=\"formUpdateInfos.valid && doUpdateRecoverySettings()\">\r\n <div class=\"modal-body lastfix\">\r\n <form-input [LabelInputRatio]=\"'3 9'\" [Label]=\"'Email' | localize: lc\" [(ngModel)]=\"UpdateRecoverySettingsDTO.email\" name=\"email\"></form-input>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary app-margin-right-10\" (click)=\"dlgUpdateRecoverySettings.hide();\">{{'Cancel' | localize : lc}}</button>\r\n <button type=\"submit\" class=\"btn btn-primary\">Conferma</button>\r\n </div>\r\n </form>\r\n</es-modal>\r\n\r\n<!--Upload Picture-->\r\n<es-modal #dlgUpdateProfilePicture [Size]=\"'XL'\">\r\n <es-modal-head (Close)=\"dlgUpdateProfilePicture.hide();\">\r\n <h5 class=\"modal-title pull-left\">Carica immagine</h5>\r\n </es-modal-head>\r\n <div class=\"modal-body d-flex\">\r\n <div style=\"margin: auto;\">\r\n <es-image-cropper #imageCropper [Height]=\"600\" [Width]=\"800\"></es-image-cropper>\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"dlgUpdateProfilePicture.hide()\">Annulla</button>\r\n <button type=\"submit\" class=\"btn btn-primary\" (click)=\"doUpdateProfilePicture()\">Conferma</button>\r\n </div>\r\n</es-modal>\r\n\r\n<!--Ruoli e Permessi-->\r\n<es-modal #dlgShowAccountRoles [Size]=\"'L'\">\r\n <es-modal-head (Close)=\"dlgShowAccountRoles.hide();\">\r\n <h5 class=\"modal-title pull-left\">{{'Ruoli e Permessi' | localize : lc}}</h5>\r\n </es-modal-head>\r\n <div class=\"modal-body\" style=\"max-height: 600px; overflow-y: auto;\">\r\n <div class=\"row\">\r\n <div class=\"col-md-6\" *ngIf=\"AccountRoles\">\r\n <labeled-span [Label]=\"'Ruoli'\" Display=\"Vertical\">\r\n <div *ngFor=\"let r of AccountRoles;\">{{r}}</div>\r\n </labeled-span>\r\n </div>\r\n <div class=\"col-md-6\" *ngIf=\"AccountPermissions\">\r\n <labeled-span [Label]=\"'Permessi'\" Display=\"Vertical\">\r\n <div *ngFor=\"let p of AccountPermissions;\">{{p}}</div>\r\n </labeled-span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary\" (click)=\"dlgShowAccountRoles.hide();\">{{'Chiudi' | localize : lc}}</button>\r\n </div>\r\n</es-modal>", styles: [".app-wideplus{width:100%;text-align:center;border:1px solid #ccc;border-radius:5px;padding:5px}.btn-outline-main-modified{color:#242d3a;border-color:#242d3a;background:transparent}.btn-outline-main-modified:hover{color:#fff;background:#242d3a;border-color:#242d3a}.user-img-container{position:relative;width:200px;margin:auto}.user-img{object-fit:cover;max-height:200px;min-height:200px;min-width:200px;max-width:200px;border-radius:50%;box-shadow:0 8px 6px #1313130a,0 12px 16px #1313130d}.user-img-btn{position:absolute;right:0;width:40px;height:40px;margin-top:-50px}.user-img-btn-body{background-color:#0056b3;color:#fff;border-radius:50%;text-align:center;height:100%;font-size:1.2rem;line-height:2.5rem}.user-roles-btn{position:absolute;top:0;right:2px;font-size:1.2rem;padding:5px;z-index:1;color:#0056b3;cursor:pointer;width:auto}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i5.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i5.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FormsAndValidationsModule }, { kind: "component", type: i2$4.EsFormInputComponent, selector: "form-input", inputs: ["minlength", "maxlength", "pattern", "Password"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: LocalizationModule }, { kind: "pipe", type: i1$1.LocalizePipe, name: "localize" }, { kind: "component", type: EsModalComponent, selector: "es-modal", inputs: ["Size", "IgnoreBackdrop", "Backdrop", "HasOverlap"], outputs: ["onShow", "onHide"] }, { kind: "component", type: EsModalHeadComponent, selector: "es-modal-head", outputs: ["Close"] }, { kind: "component", type: EsImageCropperComponent, selector: "es-image-cropper", inputs: ["Height", "Width"] }, { kind: "component", type: LabeledSpanComponent, selector: "labeled-span", inputs: ["First", "Label", "Display"] }, { kind: "ngmodule", type: ExtensionsModule }, { kind: "ngmodule", type: AccessControlModule }, { kind: "directive", type: i5$1.AccessControlDirective, selector: "[ac]", inputs: ["ac", "acAbsolute"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i7$1.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "appendTo", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions"] }], viewProviders: [{ provide: LocalizationService, useClass: UserInfoComponentLoc }] }); }
|
|
1510
1610
|
}
|
|
1511
1611
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: UserInfosComponent, decorators: [{
|
|
1512
1612
|
type: Component,
|
|
@@ -1541,9 +1641,528 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
|
|
|
1541
1641
|
args: ["dlgUpdatePassword"]
|
|
1542
1642
|
}] } });
|
|
1543
1643
|
|
|
1644
|
+
// Angular
|
|
1645
|
+
const nameof = (name) => name;
|
|
1646
|
+
const dummyCall = "_DUMMY_";
|
|
1647
|
+
// Per poter rendere l'html comune devo per forza tirare fuori un implementazione base con componente reale, che verrà overridata dove serve lato applicativo.
|
|
1648
|
+
// Mi basta collegare tutto in maniera passante
|
|
1649
|
+
class BaseSelectorComponent {
|
|
1650
|
+
registerOnChange(fn) { this.propagateChange = fn; }
|
|
1651
|
+
registerOnTouched(fn) { }
|
|
1652
|
+
applyFilters(firstApplication, onlyEssentials) { }
|
|
1653
|
+
;
|
|
1654
|
+
applyIdFilter(itemid) { }
|
|
1655
|
+
;
|
|
1656
|
+
evaluateLabel(item) {
|
|
1657
|
+
throw "[@esfaenza/core] Missing implementation for evaluateLabel, please register capabilities by doing selector.registerSelectorCapabilities(..., ..., ..., ...);";
|
|
1658
|
+
}
|
|
1659
|
+
loadSearchDictionaries() { }
|
|
1660
|
+
Initialize() {
|
|
1661
|
+
throw "[@esfaenza/core] Missing implementation for Initialize, please register capabilities by doing selector.registerSelectorCapabilities(..., ..., ..., ...);";
|
|
1662
|
+
}
|
|
1663
|
+
;
|
|
1664
|
+
constructor(injector) {
|
|
1665
|
+
this.injector = injector;
|
|
1666
|
+
this.Initialized = new ReplaySubject();
|
|
1667
|
+
// Per richiamare lo "Show" da fuori componente
|
|
1668
|
+
this.itemSearch = viewChild("itemSearch");
|
|
1669
|
+
this.EsTableTemplate = contentChild(ThTdProvider);
|
|
1670
|
+
this.FiltersTemplate = contentChild("filtersTemplate");
|
|
1671
|
+
this.ModalOnly = false;
|
|
1672
|
+
this.EntityName = "";
|
|
1673
|
+
this.inputChange = new EventEmitter();
|
|
1674
|
+
this.firstValueLoaded = new EventEmitter();
|
|
1675
|
+
this.propagateChange = (_) => { };
|
|
1676
|
+
this.DisplayMode = false;
|
|
1677
|
+
this.Readonly = false;
|
|
1678
|
+
this.Form = null;
|
|
1679
|
+
this.SingleSelection = true;
|
|
1680
|
+
this.Required = false;
|
|
1681
|
+
this.Validation = false;
|
|
1682
|
+
this.PageSize = 10;
|
|
1683
|
+
this.Navigation = true;
|
|
1684
|
+
this.EmitStartingValue = false;
|
|
1685
|
+
this.dialogVisible = new EventEmitter();
|
|
1686
|
+
this.dialogHidden = new EventEmitter();
|
|
1687
|
+
this.inputFinalized = new EventEmitter();
|
|
1688
|
+
this.selected = new EventEmitter();
|
|
1689
|
+
this.name = "";
|
|
1690
|
+
this.searchView = null;
|
|
1691
|
+
// Goddamnit
|
|
1692
|
+
this.nameof = nameof;
|
|
1693
|
+
this.firstApplication = true;
|
|
1694
|
+
this.Pristine = true;
|
|
1695
|
+
this.destroyed$ = new Subject();
|
|
1696
|
+
this.router = injector.get(Router);
|
|
1697
|
+
this.lc = injector.get(LocalizationService);
|
|
1698
|
+
this.http = injector.get(HTTPService);
|
|
1699
|
+
this.state = injector.get(AppState);
|
|
1700
|
+
this.msgExts = injector.get(MessageService);
|
|
1701
|
+
this.clipboardService = injector.get(ClipboardService);
|
|
1702
|
+
this.hashingService = injector.get(HashingService);
|
|
1703
|
+
this.redirectMap = injector.get(REDIRECT_MAP, {});
|
|
1704
|
+
// Giusto per non avere un null
|
|
1705
|
+
this.searchView = {};
|
|
1706
|
+
for (let prop in this.redirectMap) {
|
|
1707
|
+
this.routesMap[prop] = { route: null };
|
|
1708
|
+
this.routesMap[prop].route = (param) => {
|
|
1709
|
+
let obj = {};
|
|
1710
|
+
obj[this.redirectMap[prop].params[0]] = param;
|
|
1711
|
+
return ["pages/" + this.redirectMap[prop].url, obj];
|
|
1712
|
+
};
|
|
1713
|
+
}
|
|
1714
|
+
this.Initialized.pipe(take(1)).subscribe(t => {
|
|
1715
|
+
let initialization = this.Initialize();
|
|
1716
|
+
this.subject = initialization.subject;
|
|
1717
|
+
this.searchType = initialization.searchType;
|
|
1718
|
+
this.searchApi = initialization.searchApi;
|
|
1719
|
+
this.navigationEntity = initialization.navigationEntity || "";
|
|
1720
|
+
this.searchIndependantProperties = initialization.searchIndependantProperties || [];
|
|
1721
|
+
this.searchIndependantProperties.push(nameof("ModalOnly"));
|
|
1722
|
+
this.itemIdProperty = initialization.idProperty || 'id';
|
|
1723
|
+
this.ac = this.injector.get(AccessControlService);
|
|
1724
|
+
if (!this.searchApi || !this.searchType || !this.subject)
|
|
1725
|
+
throw "Impossibile utilizzare un selector senza anche solo una di queste 3 proprietà: subject, searchType, searchApi";
|
|
1726
|
+
});
|
|
1727
|
+
}
|
|
1728
|
+
bridge(outer) {
|
|
1729
|
+
this.DisplayMode = outer.DisplayMode;
|
|
1730
|
+
// Bridge degli input da fuori a dentro
|
|
1731
|
+
this.DisplayMode = outer.DisplayMode;
|
|
1732
|
+
this.Readonly = outer.Readonly;
|
|
1733
|
+
this.Form = outer.Form;
|
|
1734
|
+
this.Placeholder = outer.Placeholder;
|
|
1735
|
+
this.ngModelOptions = outer.ngModelOptions;
|
|
1736
|
+
this.SingleSelection = outer.SingleSelection;
|
|
1737
|
+
this.Required = outer.Required;
|
|
1738
|
+
this.Validation = outer.Validation;
|
|
1739
|
+
this.PageSize = outer.PageSize;
|
|
1740
|
+
this.Navigation = outer.Navigation;
|
|
1741
|
+
this.EmitStartingValue = outer.EmitStartingValue;
|
|
1742
|
+
this.name = outer.name;
|
|
1743
|
+
this.ModalOnly = outer.ModalOnly;
|
|
1744
|
+
this.EntityName = outer.EntityName;
|
|
1745
|
+
this.ValidationSubject = outer.ValidationSubject;
|
|
1746
|
+
// Bridge degli output da dentro a fuori
|
|
1747
|
+
outer.dialogVisible = this.dialogVisible;
|
|
1748
|
+
outer.dialogHidden = this.dialogHidden;
|
|
1749
|
+
outer.inputFinalized = this.inputFinalized;
|
|
1750
|
+
outer.selected = this.selected;
|
|
1751
|
+
outer.inputChange = this.inputChange;
|
|
1752
|
+
outer.firstValueLoaded = this.firstValueLoaded;
|
|
1753
|
+
// Bridge funzioni di inizializzazione
|
|
1754
|
+
this.applyFilters = outer.applyFilters.bind(this);
|
|
1755
|
+
this.applyIdFilter = outer.applyIdFilter.bind(this);
|
|
1756
|
+
this.evaluateLabel = outer.evaluateLabel.bind(this);
|
|
1757
|
+
this.loadSearchDictionaries = outer.loadSearchDictionaries.bind(this);
|
|
1758
|
+
this.Initialize = outer.Initialize.bind(this);
|
|
1759
|
+
// Bridge di funzioni che quando chiamate all'esterno deve rispondere il componente interno
|
|
1760
|
+
outer.modalVisible = this.modalVisible.bind(this);
|
|
1761
|
+
outer.resetSearch = this.resetSearch.bind(this);
|
|
1762
|
+
outer.initStartValue = this.initStartValue.bind(this);
|
|
1763
|
+
outer.ensureClosed = this.ensureClosed.bind(this);
|
|
1764
|
+
outer.sendSearch = this.sendSearch.bind(this);
|
|
1765
|
+
outer.cleanSelection = this.cleanSelection.bind(this);
|
|
1766
|
+
outer.writeValue = this.writeValue.bind(this);
|
|
1767
|
+
requestAnimationFrame(() => {
|
|
1768
|
+
this.propagateChange = outer.propagateChange.bind(this);
|
|
1769
|
+
});
|
|
1770
|
+
this.Initialized.next();
|
|
1771
|
+
}
|
|
1772
|
+
async ngOnInit() {
|
|
1773
|
+
await firstValueFrom(this.Initialized);
|
|
1774
|
+
this.ngControl = this.injector.get(NgControl);
|
|
1775
|
+
// Casistica di form detatched, attacco a forza il componente al form
|
|
1776
|
+
if (this.Form)
|
|
1777
|
+
this.Form.addControl(this.ngControl);
|
|
1778
|
+
// ValidationSubject - Qui setta l'errore nel form-selector, nell'HTML setta l'errore nel form-input
|
|
1779
|
+
if (this.ValidationSubject) {
|
|
1780
|
+
this.ValidationSubject.pipe(takeUntil(this.destroyed$)).subscribe(v => {
|
|
1781
|
+
if (v.fieldName == this.name) {
|
|
1782
|
+
this.ngControl.control.setErrors({ forcedtoinvalid: true });
|
|
1783
|
+
this.ngControl.control.markAsTouched();
|
|
1784
|
+
}
|
|
1785
|
+
});
|
|
1786
|
+
}
|
|
1787
|
+
this.loadSearchDictionaries();
|
|
1788
|
+
this.resetSearch();
|
|
1789
|
+
}
|
|
1790
|
+
ngOnDestroy() {
|
|
1791
|
+
this.destroyed$.next();
|
|
1792
|
+
this.destroyed$.complete();
|
|
1793
|
+
// Su distruzione se il form è detatched, ripulisco
|
|
1794
|
+
if (this.Form)
|
|
1795
|
+
this.Form.removeControl(this.ngControl);
|
|
1796
|
+
}
|
|
1797
|
+
async ngOnChanges(changes) {
|
|
1798
|
+
await firstValueFrom(this.Initialized);
|
|
1799
|
+
for (let change in changes) {
|
|
1800
|
+
if (this.searchIndependantProperties.includes(change))
|
|
1801
|
+
continue;
|
|
1802
|
+
if (!changes[change].firstChange) {
|
|
1803
|
+
console.log(`[Selector] Change on ${change}, search will be reset and curret value will be lost`);
|
|
1804
|
+
if (this.CurrentValue) {
|
|
1805
|
+
this.resetSearch();
|
|
1806
|
+
this.initStartValue(this.CurrentValue);
|
|
1807
|
+
}
|
|
1808
|
+
else {
|
|
1809
|
+
this.resetSearch();
|
|
1810
|
+
this.loadSearchDictionaries();
|
|
1811
|
+
this.cleanSelection();
|
|
1812
|
+
}
|
|
1813
|
+
break;
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
resetSearch() {
|
|
1818
|
+
this.firstApplication = true;
|
|
1819
|
+
this.Pristine = true;
|
|
1820
|
+
this.searchView = new this.searchType();
|
|
1821
|
+
this.searchView.itemsperpageoverride = this.PageSize;
|
|
1822
|
+
return true;
|
|
1823
|
+
}
|
|
1824
|
+
initStartValue(valueId) {
|
|
1825
|
+
this.CurrentValue = valueId;
|
|
1826
|
+
// Inizializzare con un valore di partenza, senza valore di partenza, non ha senso
|
|
1827
|
+
if (!valueId)
|
|
1828
|
+
return;
|
|
1829
|
+
this.applyIdFilter(valueId);
|
|
1830
|
+
this.applyFilters(true, true);
|
|
1831
|
+
this.sendSearch(true, true, false);
|
|
1832
|
+
}
|
|
1833
|
+
ensureClosed() {
|
|
1834
|
+
if (this.searchModal.isShown)
|
|
1835
|
+
this.searchModal.hide();
|
|
1836
|
+
}
|
|
1837
|
+
// Solo UI
|
|
1838
|
+
async confirmSelection() {
|
|
1839
|
+
this.SelectedItems = [];
|
|
1840
|
+
this.SelectedObjects = [];
|
|
1841
|
+
let items = await firstValueFrom(this.SelectAll(this.searchView, this.searchApi));
|
|
1842
|
+
for (let i = 0; i < items.length; i++) {
|
|
1843
|
+
this.SelectedObjects.push(items[i]);
|
|
1844
|
+
this.SelectedItems.push(items[i][this.itemIdProperty]);
|
|
1845
|
+
}
|
|
1846
|
+
this.SelectedLabel = this.SelectedObjects?.length > 0 ? this.evaluateLabel(this.SelectedObjects) : "";
|
|
1847
|
+
this.changed();
|
|
1848
|
+
}
|
|
1849
|
+
sendSearch(resetPage = true, selectResults, applyOtherFilters = true) {
|
|
1850
|
+
if (applyOtherFilters) {
|
|
1851
|
+
this.applyFilters(this.firstApplication);
|
|
1852
|
+
this.firstApplication = false;
|
|
1853
|
+
}
|
|
1854
|
+
this.searchView.searchinprogress = true;
|
|
1855
|
+
if (resetPage)
|
|
1856
|
+
this.searchView.page = 1;
|
|
1857
|
+
if (!this.searchView.itemsperpageoverride)
|
|
1858
|
+
this.searchView.itemsperpageoverride = this.PageSize;
|
|
1859
|
+
if (this.searchApi == dummyCall) {
|
|
1860
|
+
setTimeout(() => {
|
|
1861
|
+
this.searchView = AppSearch.newref(this.searchView);
|
|
1862
|
+
this.searchView.items = [{ id: "9999", description: "Emanuele Ghetti" }];
|
|
1863
|
+
this.searchView.searchinprogress = false;
|
|
1864
|
+
this.afterSearch(selectResults);
|
|
1865
|
+
});
|
|
1866
|
+
return true;
|
|
1867
|
+
}
|
|
1868
|
+
this.http.post(this.searchApi, this.searchView).subscribe(t => {
|
|
1869
|
+
this.searchView = t;
|
|
1870
|
+
this.searchView.searchinprogress = false;
|
|
1871
|
+
this.afterSearch(selectResults);
|
|
1872
|
+
});
|
|
1873
|
+
return true;
|
|
1874
|
+
}
|
|
1875
|
+
afterSearch(selectResults) {
|
|
1876
|
+
// La selezione dei risultati viene richiesta all'inizializzazione del selector con un valore già presente
|
|
1877
|
+
// il risultato della ricerca (sempre 1, ma gestito da un for sugli items per prepararsi alla selezione multipla) è la rappresentazione dello stato iniziale del selector
|
|
1878
|
+
if (selectResults) {
|
|
1879
|
+
if (this.searchView.items.length > 0) {
|
|
1880
|
+
this.SelectedItems = [];
|
|
1881
|
+
this.SelectedObjects = [];
|
|
1882
|
+
for (let i = 0; i < this.searchView.items.length; i++) {
|
|
1883
|
+
let target = this.searchView.items[i];
|
|
1884
|
+
this.SelectedItems.push(target[this.itemIdProperty]);
|
|
1885
|
+
this.SelectedObjects.push(target);
|
|
1886
|
+
}
|
|
1887
|
+
this.SelectedLabel = this.evaluateLabel(this.SelectedObjects);
|
|
1888
|
+
// Serve la ripropagazione del valore per aggiornare il validatore
|
|
1889
|
+
this.changed(this.EmitStartingValue);
|
|
1890
|
+
this.firstValueLoaded.emit();
|
|
1891
|
+
this.ngControl.control.updateValueAndValidity();
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
}
|
|
1895
|
+
async writeValue(obj) {
|
|
1896
|
+
await firstValueFrom(this.Initialized);
|
|
1897
|
+
if (obj !== undefined && obj !== null)
|
|
1898
|
+
this.initStartValue(obj);
|
|
1899
|
+
else {
|
|
1900
|
+
this.resetSearch();
|
|
1901
|
+
this.SelectedItems = [];
|
|
1902
|
+
this.SelectedObjects = [];
|
|
1903
|
+
this.SelectedLabel = "";
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
changed(emit = true) {
|
|
1907
|
+
if (this.SingleSelection) {
|
|
1908
|
+
this.CurrentValue = this.SelectedItems.length > 0 ? this.SelectedItems[0] : '';
|
|
1909
|
+
this.propagateChange(this.CurrentValue);
|
|
1910
|
+
if (emit) {
|
|
1911
|
+
this.Pristine = false;
|
|
1912
|
+
this.inputChange.emit(this.SelectedItems.length > 0 ? this.SelectedObjects[0] : null);
|
|
1913
|
+
}
|
|
1914
|
+
}
|
|
1915
|
+
else {
|
|
1916
|
+
this.CurrentValue = JSON.parse(JSON.stringify(this.SelectedItems));
|
|
1917
|
+
this.propagateChange(this.SelectedItems);
|
|
1918
|
+
if (emit) {
|
|
1919
|
+
this.Pristine = false;
|
|
1920
|
+
this.inputChange.emit(this.SelectedObjects);
|
|
1921
|
+
}
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
cleanSelection() {
|
|
1925
|
+
this.SelectedItems = [];
|
|
1926
|
+
this.SelectedObjects = [];
|
|
1927
|
+
this.SelectedLabel = "";
|
|
1928
|
+
this.changed();
|
|
1929
|
+
}
|
|
1930
|
+
modalVisible(visible) {
|
|
1931
|
+
if (visible)
|
|
1932
|
+
this.dialogVisible.emit(true);
|
|
1933
|
+
else
|
|
1934
|
+
this.dialogHidden.emit(true);
|
|
1935
|
+
}
|
|
1936
|
+
// Solo UI
|
|
1937
|
+
copyToClipboard(subjectOverride) {
|
|
1938
|
+
if (this.SelectedItems?.length > 0) {
|
|
1939
|
+
this.clipboardService.copyTextToClipboard(this.SelectedItems.join(','));
|
|
1940
|
+
this.msgExts.simpleInfo(`Codice ${this.subject || subjectOverride} copiato!`, 'toastr');
|
|
1941
|
+
}
|
|
1942
|
+
return false;
|
|
1943
|
+
}
|
|
1944
|
+
// Solo UI
|
|
1945
|
+
navigate() {
|
|
1946
|
+
var item = this.SelectedObjects[0];
|
|
1947
|
+
if (this.navigationEntity && item) {
|
|
1948
|
+
if (!this.routesMap?.[this.navigationEntity]?.route || (this.routesMap[this.navigationEntity].route(item[this.itemIdProperty])?.length || 0) == 0) {
|
|
1949
|
+
this.msgExts.simpleError(`Impossibile navigare all'entità ${this.navigationEntity} con codice ${item[this.itemIdProperty]}`);
|
|
1950
|
+
return;
|
|
1951
|
+
}
|
|
1952
|
+
let urlTree = this.router.createUrlTree(this.routesMap[this.navigationEntity].route(item[this.itemIdProperty]));
|
|
1953
|
+
let url = this.router.serializeUrl(urlTree);
|
|
1954
|
+
window.open("#" + url, '_blank');
|
|
1955
|
+
}
|
|
1956
|
+
}
|
|
1957
|
+
SelectAll(view, api, pars, transaction) {
|
|
1958
|
+
if (api == dummyCall)
|
|
1959
|
+
return of(view.selection.items);
|
|
1960
|
+
if (!view.selection.all)
|
|
1961
|
+
return of(view.selection.items);
|
|
1962
|
+
var jsonView = JSON.parse(JSON.stringify(view));
|
|
1963
|
+
jsonView.page = 1;
|
|
1964
|
+
jsonView.itemsperpageoverride = 999999;
|
|
1965
|
+
return this.http.post(api, jsonView, pars, transaction).pipe(map$1(res => {
|
|
1966
|
+
let items = res.items;
|
|
1967
|
+
items.forEach(t => t.hash = this.hashingService.hashObject(t, null, false));
|
|
1968
|
+
if (res.selection.exclusions?.length > 0)
|
|
1969
|
+
items = items.filter((t) => !res.selection.exclusions.find((e) => this.hashingService.hashObject(e, null, false) == t.hash));
|
|
1970
|
+
return items;
|
|
1971
|
+
}));
|
|
1972
|
+
}
|
|
1973
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseSelectorComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1974
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "19.2.14", type: BaseSelectorComponent, isStandalone: true, selector: "base-selector", inputs: { ModalOnly: "ModalOnly", EntityName: "EntityName", DisplayMode: "DisplayMode", Readonly: "Readonly", Form: "Form", Placeholder: "Placeholder", ngModelOptions: "ngModelOptions", SingleSelection: "SingleSelection", Required: "Required", Validation: "Validation", PageSize: "PageSize", Navigation: "Navigation", EmitStartingValue: "EmitStartingValue", name: "name", ValidationSubject: "ValidationSubject" }, outputs: { inputChange: "inputChange", firstValueLoaded: "firstValueLoaded", dialogVisible: "dialogVisible", dialogHidden: "dialogHidden", inputFinalized: "inputFinalized", selected: "selected" }, queries: [{ propertyName: "EsTableTemplate", first: true, predicate: ThTdProvider, descendants: true, isSignal: true }, { propertyName: "FiltersTemplate", first: true, predicate: ["filtersTemplate"], descendants: true, isSignal: true }], viewQueries: [{ propertyName: "itemSearch", first: true, predicate: ["itemSearch"], descendants: true, isSignal: true }, { propertyName: "searchModal", first: true, predicate: ["searchView"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<form-selector \r\n [SetValidationSubject]=\"ValidationSubject\"\r\n [ModalOnly]=\"ModalOnly\"\r\n [Valid]=\"!((!Pristine || Form?.submitted) && !ngControl?.valid)\"\r\n [SelectedLabel]=\"SelectedLabel\"\r\n [Validation]=\"Validation\"\r\n [Readonly]=\"Readonly\"\r\n [Form]=\"Form\"\r\n [Name]=\"name\"\r\n [ngModelOptions]=\"ngModelOptions\"\r\n [Required]=\"Required\"\r\n [Placeholder]=\"Placeholder\"\r\n [HasExternalLink]=\"Navigation && (SelectedObjects?.length == 1 && !!navigationEntity)\"\r\n (onChange)=\"changed()\"\r\n (onSearch)=\"!Readonly && resetSearch() && sendSearch() && itemSearch.show();\"\r\n (onNavigation)=\"navigate()\"\r\n (onClipboardCopy)=\"copyToClipboard()\">\r\n</form-selector>\r\n\r\n<form-selector-dialog #itemSearch\r\n [Subject]=\"subject\"\r\n [EsTableTemplate]=\"EsTableTemplate()\"\r\n [searchView]=\"searchView\"\r\n (onSearchRequest)=\"sendSearch($event)\"\r\n (onDialogVisibilityChange)=\"modalVisible($event);\"\r\n (onClearValue)=\"cleanSelection(); itemSearch.hide(); resetSearch();\"\r\n (onCloseDialog)=\"itemSearch.hide(); resetSearch();\"\r\n (onConfirmSelection)=\"confirmSelection(); itemSearch.hide(); resetSearch();\">\r\n <ng-container filters *ngIf=\"FiltersTemplate()\">\r\n <ng-container *ngTemplateOutlet=\"FiltersTemplate()\"></ng-container>\r\n </ng-container>\r\n\r\n</form-selector-dialog>", styles: [".app-selector-input .form-control[disabled]{color:#000;cursor:pointer!important}.app-selector-input .mat-form-field-disabled .mat-form-field-wrapper{background-color:#fff!important;cursor:pointer!important}.app-selector-input .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{color:#0000001f!important;cursor:pointer!important}.app-selector-input-invalid .form-control[disabled]{color:#000;cursor:pointer!important}.app-selector-input-invalid .mat-form-field-disabled .mat-form-field-wrapper{background-color:#fff!important;cursor:pointer!important}.app-selector-input-invalid .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{color:#f44336!important;cursor:pointer!important}.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-outline .mat-form-field-outline-start,.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-outline .mat-form-field-outline-end,.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-outline .mat-form-field-outline-gap{border-width:2px!important}.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix button{color:#bf1725!important}.app-selector-input-area{position:absolute;width:calc(100% - 30px);height:100%;margin:0 15px;right:0;top:0;z-index:999}\n"], dependencies: [{ kind: "component", type: FormSelectorComponent, selector: "form-selector", inputs: ["SetValidationSubject", "ModalOnly", "Valid", "SelectedLabel", "Validation", "Readonly", "Form", "Name", "ngModelOptions", "Required", "Placeholder", "HasExternalLink"], outputs: ["SelectedLabelChange", "onChange", "onSearch", "onNavigation", "onClipboardCopy"] }, { kind: "component", type: FormSelectorDialogComponent, selector: "form-selector-dialog", inputs: ["Subject", "EsTableTemplate", "TableClasses", "SingleSelection", "searchView"], outputs: ["onClearValue", "onCloseDialog", "onConfirmSelection", "onSearchRequest", "onDialogVisibilityChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
1975
|
+
}
|
|
1976
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseSelectorComponent, decorators: [{
|
|
1977
|
+
type: Component,
|
|
1978
|
+
args: [{ selector: "base-selector", imports: [FormSelectorComponent, FormSelectorDialogComponent, NgTemplateOutlet, NgIf], template: "<form-selector \r\n [SetValidationSubject]=\"ValidationSubject\"\r\n [ModalOnly]=\"ModalOnly\"\r\n [Valid]=\"!((!Pristine || Form?.submitted) && !ngControl?.valid)\"\r\n [SelectedLabel]=\"SelectedLabel\"\r\n [Validation]=\"Validation\"\r\n [Readonly]=\"Readonly\"\r\n [Form]=\"Form\"\r\n [Name]=\"name\"\r\n [ngModelOptions]=\"ngModelOptions\"\r\n [Required]=\"Required\"\r\n [Placeholder]=\"Placeholder\"\r\n [HasExternalLink]=\"Navigation && (SelectedObjects?.length == 1 && !!navigationEntity)\"\r\n (onChange)=\"changed()\"\r\n (onSearch)=\"!Readonly && resetSearch() && sendSearch() && itemSearch.show();\"\r\n (onNavigation)=\"navigate()\"\r\n (onClipboardCopy)=\"copyToClipboard()\">\r\n</form-selector>\r\n\r\n<form-selector-dialog #itemSearch\r\n [Subject]=\"subject\"\r\n [EsTableTemplate]=\"EsTableTemplate()\"\r\n [searchView]=\"searchView\"\r\n (onSearchRequest)=\"sendSearch($event)\"\r\n (onDialogVisibilityChange)=\"modalVisible($event);\"\r\n (onClearValue)=\"cleanSelection(); itemSearch.hide(); resetSearch();\"\r\n (onCloseDialog)=\"itemSearch.hide(); resetSearch();\"\r\n (onConfirmSelection)=\"confirmSelection(); itemSearch.hide(); resetSearch();\">\r\n <ng-container filters *ngIf=\"FiltersTemplate()\">\r\n <ng-container *ngTemplateOutlet=\"FiltersTemplate()\"></ng-container>\r\n </ng-container>\r\n\r\n</form-selector-dialog>", styles: [".app-selector-input .form-control[disabled]{color:#000;cursor:pointer!important}.app-selector-input .mat-form-field-disabled .mat-form-field-wrapper{background-color:#fff!important;cursor:pointer!important}.app-selector-input .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{color:#0000001f!important;cursor:pointer!important}.app-selector-input-invalid .form-control[disabled]{color:#000;cursor:pointer!important}.app-selector-input-invalid .mat-form-field-disabled .mat-form-field-wrapper{background-color:#fff!important;cursor:pointer!important}.app-selector-input-invalid .mat-form-field-appearance-outline.mat-form-field-disabled .mat-form-field-outline{color:#f44336!important;cursor:pointer!important}.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-outline .mat-form-field-outline-start,.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-outline .mat-form-field-outline-end,.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-outline .mat-form-field-outline-gap{border-width:2px!important}.app-selector-input-invalid .mat-form-field-appearance-outline .mat-form-field-wrapper .mat-form-field-flex .mat-form-field-infix button{color:#bf1725!important}.app-selector-input-area{position:absolute;width:calc(100% - 30px);height:100%;margin:0 15px;right:0;top:0;z-index:999}\n"] }]
|
|
1979
|
+
}], ctorParameters: () => [{ type: i0.Injector }], propDecorators: { ModalOnly: [{
|
|
1980
|
+
type: Input
|
|
1981
|
+
}], EntityName: [{
|
|
1982
|
+
type: Input
|
|
1983
|
+
}], searchModal: [{
|
|
1984
|
+
type: ViewChild,
|
|
1985
|
+
args: ["searchView", { static: false }]
|
|
1986
|
+
}], inputChange: [{
|
|
1987
|
+
type: Output
|
|
1988
|
+
}], firstValueLoaded: [{
|
|
1989
|
+
type: Output
|
|
1990
|
+
}], DisplayMode: [{
|
|
1991
|
+
type: Input
|
|
1992
|
+
}], Readonly: [{
|
|
1993
|
+
type: Input
|
|
1994
|
+
}], Form: [{
|
|
1995
|
+
type: Input
|
|
1996
|
+
}], Placeholder: [{
|
|
1997
|
+
type: Input
|
|
1998
|
+
}], ngModelOptions: [{
|
|
1999
|
+
type: Input
|
|
2000
|
+
}], SingleSelection: [{
|
|
2001
|
+
type: Input
|
|
2002
|
+
}], Required: [{
|
|
2003
|
+
type: Input
|
|
2004
|
+
}], Validation: [{
|
|
2005
|
+
type: Input
|
|
2006
|
+
}], PageSize: [{
|
|
2007
|
+
type: Input
|
|
2008
|
+
}], Navigation: [{
|
|
2009
|
+
type: Input
|
|
2010
|
+
}], EmitStartingValue: [{
|
|
2011
|
+
type: Input
|
|
2012
|
+
}], dialogVisible: [{
|
|
2013
|
+
type: Output
|
|
2014
|
+
}], dialogHidden: [{
|
|
2015
|
+
type: Output
|
|
2016
|
+
}], inputFinalized: [{
|
|
2017
|
+
type: Output
|
|
2018
|
+
}], selected: [{
|
|
2019
|
+
type: Output
|
|
2020
|
+
}], name: [{
|
|
2021
|
+
type: Input
|
|
2022
|
+
}], ValidationSubject: [{
|
|
2023
|
+
type: Input
|
|
2024
|
+
}] } });
|
|
2025
|
+
|
|
2026
|
+
class BaseSelectorInitialization {
|
|
2027
|
+
constructor(subject, searchType, searchApi, navigationEntity, searchIndependantProperties, idProperty) {
|
|
2028
|
+
this.subject = subject;
|
|
2029
|
+
this.searchType = searchType;
|
|
2030
|
+
this.searchApi = searchApi;
|
|
2031
|
+
this.navigationEntity = navigationEntity;
|
|
2032
|
+
this.searchIndependantProperties = searchIndependantProperties;
|
|
2033
|
+
this.idProperty = idProperty;
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
// Angular
|
|
2038
|
+
class BaseSearchComponent extends BaseComponent {
|
|
2039
|
+
constructor(injector) {
|
|
2040
|
+
super(injector);
|
|
2041
|
+
//@ViewChild(EsFiltersComponent, { static: false }) filters: EsFiltersComponent;
|
|
2042
|
+
this.searchView = null;
|
|
2043
|
+
this.location = injector.get(Location);
|
|
2044
|
+
this.lc = injector.get(LocalizationService);
|
|
2045
|
+
this.localStorage = injector.get(CacheService);
|
|
2046
|
+
this.http = injector.get(HTTPService);
|
|
2047
|
+
this.route = injector.get(ActivatedRoute);
|
|
2048
|
+
this.utiExts = injector.get(UtilityService);
|
|
2049
|
+
[this.HotView, this.SearchURL, this.SearchType, this.ItemType] = this.initialize();
|
|
2050
|
+
if (!this.HotView || !this.SearchURL || !this.SearchType || !this.ItemType)
|
|
2051
|
+
throw ("Fallita inizializzazione della pagina di ricerca.");
|
|
2052
|
+
}
|
|
2053
|
+
ngOnInit() {
|
|
2054
|
+
combineLatest([this.route.queryParams, this.route.params]).pipe(takeUntil(this.destroyed$), map$1((res) => ({ querypars: res[0], pars: res[1] }))).subscribe(res => {
|
|
2055
|
+
// Sto cavolo di ignoreStorage mi farà diventare pazzo
|
|
2056
|
+
let tmpIgnoreStorage = res.querypars["ignoreStorage"];
|
|
2057
|
+
let ignoreStorage;
|
|
2058
|
+
if (typeof tmpIgnoreStorage === "string")
|
|
2059
|
+
ignoreStorage = tmpIgnoreStorage == "false" ? false : tmpIgnoreStorage == "true" ? true : false;
|
|
2060
|
+
else if (typeof tmpIgnoreStorage === "boolean")
|
|
2061
|
+
ignoreStorage = tmpIgnoreStorage;
|
|
2062
|
+
else
|
|
2063
|
+
ignoreStorage = false; // ignoreStorage false se non specificato diversamente
|
|
2064
|
+
this.init(ignoreStorage);
|
|
2065
|
+
});
|
|
2066
|
+
}
|
|
2067
|
+
async init(ignoreStorage) {
|
|
2068
|
+
await this.getDictionaries();
|
|
2069
|
+
let item = await firstValueFrom(this.localStorage.getItem(this.HotView));
|
|
2070
|
+
if (!ignoreStorage && item) {
|
|
2071
|
+
item["__proto__"] = new this.SearchType();
|
|
2072
|
+
this.createOrLoadView(item);
|
|
2073
|
+
}
|
|
2074
|
+
else {
|
|
2075
|
+
this.createOrLoadView(null);
|
|
2076
|
+
this.location.replaceState(this.CompletePath);
|
|
2077
|
+
this.route.snapshot.queryParams = [];
|
|
2078
|
+
await firstValueFrom(this.localStorage.removeItem(this.HotView));
|
|
2079
|
+
}
|
|
2080
|
+
}
|
|
2081
|
+
createOrLoadView(HotPotato) {
|
|
2082
|
+
if (HotPotato) {
|
|
2083
|
+
this.searchView = HotPotato;
|
|
2084
|
+
this.afterLoadView(this.searchView);
|
|
2085
|
+
}
|
|
2086
|
+
else {
|
|
2087
|
+
this.searchView = new this.SearchType();
|
|
2088
|
+
this.searchView.firstsearch = false;
|
|
2089
|
+
this.searchView.page = 1;
|
|
2090
|
+
this.afterCreateView(this.searchView);
|
|
2091
|
+
}
|
|
2092
|
+
}
|
|
2093
|
+
sendSearch() {
|
|
2094
|
+
this.RetrieveProto(AppSearch.newref(this.searchView));
|
|
2095
|
+
}
|
|
2096
|
+
// Chiamo onUpdateFiltersBar sia all'inizio che alla fine della chiamata, in quanto l'utente
|
|
2097
|
+
// pi? stronzo potrebbe cancellare il filtro durante il caricamento...
|
|
2098
|
+
onSearchRequest(resetPage = true) {
|
|
2099
|
+
if (!this.canPerformSearch())
|
|
2100
|
+
return;
|
|
2101
|
+
//this.filters.onUpdateFiltersTop();
|
|
2102
|
+
this.searchView.searchinprogress = true;
|
|
2103
|
+
if (resetPage)
|
|
2104
|
+
this.searchView.page = 1;
|
|
2105
|
+
//#region Questo mi serve per testare sul template
|
|
2106
|
+
if (!this.SearchURL) {
|
|
2107
|
+
let ret = this.utiExts.deepClone(this.searchView);
|
|
2108
|
+
ret.items = [
|
|
2109
|
+
{ id: "1", description: "Riga 1" },
|
|
2110
|
+
{ id: "2", description: "Riga 2" },
|
|
2111
|
+
{ id: "3", description: "Riga 3" },
|
|
2112
|
+
];
|
|
2113
|
+
setTimeout(() => {
|
|
2114
|
+
this.RetrieveProto(ret);
|
|
2115
|
+
this.searchView.searchinprogress = false;
|
|
2116
|
+
//this.filters.onUpdateFiltersTop();
|
|
2117
|
+
this.localStorage.setItem(this.HotView, this.searchView).subscribe();
|
|
2118
|
+
}, 1500);
|
|
2119
|
+
}
|
|
2120
|
+
else
|
|
2121
|
+
//#endregion
|
|
2122
|
+
this.http.post(this.SearchURL, this.searchView).subscribe(t => {
|
|
2123
|
+
this.RetrieveProto(t);
|
|
2124
|
+
this.searchView.searchinprogress = false;
|
|
2125
|
+
//this.filters.onUpdateFiltersTop();
|
|
2126
|
+
this.reviewBindings();
|
|
2127
|
+
this.localStorage.setItem(this.HotView, this.searchView).subscribe();
|
|
2128
|
+
});
|
|
2129
|
+
}
|
|
2130
|
+
// Funzione per non perdere il proto dopo che il backend mi restituisce la sua searchView
|
|
2131
|
+
RetrieveProto(res) {
|
|
2132
|
+
let keepProto = this.searchView["__proto__"];
|
|
2133
|
+
this.searchView = res;
|
|
2134
|
+
this.searchView["__proto__"] = keepProto;
|
|
2135
|
+
}
|
|
2136
|
+
prepareExport(callback, limit = -1) {
|
|
2137
|
+
if (limit > 0) {
|
|
2138
|
+
// Check
|
|
2139
|
+
}
|
|
2140
|
+
var view = AppSearch.toSelectAll(this.searchView);
|
|
2141
|
+
this.http.post(this.SearchURL, view).subscribe(t => {
|
|
2142
|
+
callback(t.items, this.ItemType);
|
|
2143
|
+
});
|
|
2144
|
+
}
|
|
2145
|
+
async getDictionaries() { }
|
|
2146
|
+
;
|
|
2147
|
+
afterLoadView(_) { }
|
|
2148
|
+
;
|
|
2149
|
+
afterCreateView(_) { }
|
|
2150
|
+
;
|
|
2151
|
+
reviewBindings() { }
|
|
2152
|
+
;
|
|
2153
|
+
canPerformSearch() { return true; }
|
|
2154
|
+
;
|
|
2155
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseSearchComponent, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2156
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: BaseSearchComponent, isStandalone: true, selector: "ng-component", usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
2157
|
+
}
|
|
2158
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: BaseSearchComponent, decorators: [{
|
|
2159
|
+
type: Component,
|
|
2160
|
+
args: [{ template: '' }]
|
|
2161
|
+
}], ctorParameters: () => [{ type: i0.Injector }] });
|
|
2162
|
+
|
|
1544
2163
|
/**
|
|
1545
2164
|
* Generated bundle index. Do not edit.
|
|
1546
2165
|
*/
|
|
1547
2166
|
|
|
1548
|
-
export { BackTop, BaseComponent, Breadcrumb, BreadcrumbItem, ComponentsModule, EmbeddingComponent, ErrorPageComponent, EsImageCropperComponent, EsModalComponent, EsModalHeadComponent, ExternalPagesComponent, JaceLoginComponent, JaceResourceComponent, LabeledSpanComponent, Navbar, PagesComponent, ReactiveComponent, RedirecterComponent, Sidebar, UserInfosComponent };
|
|
2167
|
+
export { BackTop, BaseComponent, BaseSearchComponent, BaseSelectorComponent, BaseSelectorInitialization, Breadcrumb, BreadcrumbItem, ComponentsModule, EmbeddingComponent, ErrorPageComponent, EsImageCropperComponent, EsModalComponent, EsModalHeadComponent, ExternalPagesComponent, FormSelectorComponent, FormSelectorDialogComponent, JaceLoginComponent, JaceResourceComponent, LabeledSpanComponent, Navbar, PagesComponent, ReactiveComponent, RedirecterComponent, Sidebar, UserInfosComponent };
|
|
1549
2168
|
//# sourceMappingURL=esfaenza-core-components.mjs.map
|