@fluxhub/fluxhub-lib 19.0.179 → 19.0.181

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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, forwardRef, EventEmitter, Input, Output, ViewChild, Component, Inject, Optional, Pipe, HostListener, Directive, ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef } from '@angular/core';
2
+ import { Injectable, forwardRef, EventEmitter, Input, Output, ViewChild, Component, Inject, Optional, Pipe, HostListener, Directive, ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, HostBinding } from '@angular/core';
3
3
  import * as i1$1 from '@angular/common/http';
4
4
  import { HttpHeaders, HttpEventType, HttpErrorResponse } from '@angular/common/http';
5
5
  import { map, catchError, flatMap, debounceTime, switchMap, filter, take, tap } from 'rxjs/operators';
@@ -10,7 +10,7 @@ import { AES } from 'crypto-ts';
10
10
  import * as i1 from '@angular/platform-browser';
11
11
  import * as i3 from '@ngx-translate/core';
12
12
  import { TranslateModule } from '@ngx-translate/core';
13
- import { Observable, Subject, forkJoin, throwError, BehaviorSubject } from 'rxjs';
13
+ import { Observable, Subject, forkJoin, throwError, BehaviorSubject, of } from 'rxjs';
14
14
  import * as i5$1 from '@angular/forms';
15
15
  import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
16
16
  import * as i5 from '@angular/common';
@@ -81,6 +81,8 @@ import { MatRadioModule } from '@angular/material/radio';
81
81
  import NavigatedViewer from 'bpmn-js/lib/NavigatedViewer';
82
82
  import * as i6$4 from '@angular/material/badge';
83
83
  import { MatBadgeModule } from '@angular/material/badge';
84
+ import { BaseChartDirective } from 'ng2-charts';
85
+ import { Chart, registerables } from 'chart.js';
84
86
 
85
87
  class QParam {
86
88
  sql = '';
@@ -27830,15 +27832,37 @@ class FHWorkflowView {
27830
27832
  // Alert.show("Confermi di voler recuperare il documento "+ wing.tbl_wkf.sRow.codice+" - "+ wing.tbl_wkf.sRow.oggetto+"?", "Conferma operazione", 3, this, okelimc1);
27831
27833
  }
27832
27834
  riassegna_richiesta_step2() {
27833
- let a_let = '';
27835
+ // I lettori correnti vanno RILETTI dal DB e NON presi da sRow.lettori: se la
27836
+ // grid non espone 'lettori' nei _FIELDS, sRow.lettori e' undefined e in JS
27837
+ // (undefined != null) e' false => il seed resta '' e la riassegna riscrive i
27838
+ // lettori col solo nuovo assegnatario, perdendo creatore e lettori precedenti.
27839
+ // SELECT_DOCUMENTS_BY_UIID e' una query standard (ritorna anche 'lettori').
27840
+ let pl = new QParam();
27841
+ pl.sql = 'SELECT_DOCUMENTS_BY_UIID';
27842
+ pl.types = ['string', 'string'];
27843
+ pl.values = [this.get_grid().sRow.id_applicativo, this.get_grid().sRow.uiid];
27844
+ this.m_dataService.doQuery(pl).subscribe((dl) => {
27845
+ let lettori_correnti = '';
27846
+ if (dl != null && dl.result_msg == 'OK' &&
27847
+ dl.result_data != null && dl.result_data.length > 0 &&
27848
+ dl.result_data[0].lettori != null) {
27849
+ lettori_correnti = dl.result_data[0].lettori;
27850
+ }
27851
+ else if (this.get_grid().sRow.lettori != null) {
27852
+ // Fallback al comportamento storico se la query non e' disponibile.
27853
+ lettori_correnti = this.get_grid().sRow.lettori;
27854
+ }
27855
+ this.riassegna_richiesta_step2_exec(lettori_correnti);
27856
+ });
27857
+ }
27858
+ riassegna_richiesta_step2_exec(lettori_correnti) {
27859
+ let a_let = lettori_correnti || '';
27834
27860
  let op = [];
27835
27861
  let app_op = new QParam();
27836
27862
  app_op.sql = 'DELETE_TODO_ALL_BYID';
27837
27863
  app_op.types = ['string', 'string'];
27838
27864
  app_op.values = [this.id_applicativo, this.get_grid().sRow.uiid];
27839
27865
  op.push(this.m_dataService.doQuery(app_op));
27840
- if (this.get_grid().sRow.lettori != null)
27841
- a_let = this.get_grid().sRow.lettori;
27842
27866
  let a_aut = '';
27843
27867
  let a_pers_inti = '';
27844
27868
  let a_utif = '';
@@ -34441,6 +34465,1022 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
34441
34465
  }]
34442
34466
  }], ctorParameters: () => [{ type: i1$1.HttpClient }, { type: i3$1.ToastrService }, { type: AppService }, { type: UtilityService }] });
34443
34467
 
34468
+ /**
34469
+ * Elenco applicazioni per la homepage (launcher a colonne "masonry").
34470
+ *
34471
+ * Legge il menu applicativo dell'utente tramite le query standard FluxHub
34472
+ * (SELECT_USER_ACCESS + SELECT_ALL_APPS_USER / SELECT_APPS_USER, in query.ini).
34473
+ * I nomi delle query e l'aspetto sono configurabili via @Input per riuso cross-cliente.
34474
+ *
34475
+ * Uso: <FHHomeLauncher [appVersion]="costanti.VER"></FHHomeLauncher>
34476
+ */
34477
+ class FHHomeLauncherComponent {
34478
+ appService;
34479
+ _service;
34480
+ _dataService;
34481
+ _utility;
34482
+ router;
34483
+ // ---- Tema ----
34484
+ accent = "#63b345";
34485
+ accentDark = "#549a3b";
34486
+ ink = "#161212";
34487
+ get _a() { return this.accent; }
34488
+ get _ad() { return this.accentDark; }
34489
+ get _ink() { return this.ink; }
34490
+ // ---- Layout ----
34491
+ /** Mostra l'indice numerato (01, 02, ...) accanto al titolo categoria. */
34492
+ showIndex = true;
34493
+ /** Larghezza colonna masonry (px). */
34494
+ columnWidth = 270;
34495
+ /** Spazio tra colonne (px). */
34496
+ columnGap = 48;
34497
+ // ---- Query (query.ini) ----
34498
+ sqlUserAccess = "SELECT_USER_ACCESS";
34499
+ sqlAllApps = "SELECT_ALL_APPS_USER";
34500
+ sqlApps = "SELECT_APPS_USER";
34501
+ sqlAccessLog = "INSERT_ACCESS_LOG_2";
34502
+ /** Versione applicativa registrata nel log di accesso (di solito costanti.VER). */
34503
+ appVersion = "";
34504
+ /** Emesso quando l'utente apre un'app (dopo log e navigazione). */
34505
+ appOpen = new EventEmitter();
34506
+ categories = [];
34507
+ is_loaded = false;
34508
+ constructor(appService, _service, _dataService, _utility, router) {
34509
+ this.appService = appService;
34510
+ this._service = _service;
34511
+ this._dataService = _dataService;
34512
+ this._utility = _utility;
34513
+ this.router = router;
34514
+ }
34515
+ ngAfterViewInit() {
34516
+ setTimeout(() => this.bootstrap(), 0);
34517
+ }
34518
+ bootstrap() {
34519
+ if (!this._service.checkCredentials())
34520
+ return;
34521
+ if (!this.appService.user) {
34522
+ setTimeout(() => this.bootstrap(), 200);
34523
+ return;
34524
+ }
34525
+ this.load_user_then_menu();
34526
+ }
34527
+ // Carica l'accesso utente per assicurare che user_isadmin sia aggiornato
34528
+ // prima di scegliere la query del menu.
34529
+ load_user_then_menu() {
34530
+ const p = new QParam();
34531
+ p.sql = this.sqlUserAccess;
34532
+ p.values = [this.appService.user || ""];
34533
+ p.types = ["string"];
34534
+ this._dataService.doQuery(p).subscribe((data) => {
34535
+ if (data && data.result_msg === "OK" && data.result_data?.length > 0) {
34536
+ this.appService.user_isadmin = data.result_data[0].isadmin;
34537
+ this.appService.user_roles = data.result_data[0].roles;
34538
+ }
34539
+ this.build_menu();
34540
+ });
34541
+ }
34542
+ build_menu() {
34543
+ const username = this.appService.user || "";
34544
+ const isadmin = String(this.appService.user_isadmin ?? "") === "1";
34545
+ const p = new QParam();
34546
+ p.sql = isadmin ? this.sqlAllApps : this.sqlApps;
34547
+ p.values = [username];
34548
+ p.types = ["string"];
34549
+ this._dataService.doQuery(p).subscribe((data) => {
34550
+ if (!data || data.result_msg !== "OK") {
34551
+ this.is_loaded = true;
34552
+ return;
34553
+ }
34554
+ const rows = data.result_data || [];
34555
+ const grouped = [];
34556
+ let current = null;
34557
+ for (const r of rows) {
34558
+ const dir = r.dir || "";
34559
+ if (!current || current.title !== dir) {
34560
+ current = {
34561
+ name: dir.toLowerCase().split(" ").join("_"),
34562
+ title: dir,
34563
+ faIcon: r.icon || "",
34564
+ mdIcon: r.mdIcon || "",
34565
+ color: r.color || "",
34566
+ apps: [],
34567
+ };
34568
+ grouped.push(current);
34569
+ }
34570
+ if (r.invisible)
34571
+ continue;
34572
+ current.apps.push({ id: r.id, title: r.name, link: r.url });
34573
+ }
34574
+ this.categories = grouped.filter((c) => c.apps.length > 0);
34575
+ this.is_loaded = true;
34576
+ });
34577
+ }
34578
+ open_app(app) {
34579
+ if (!app || !app.link)
34580
+ return;
34581
+ const log = new QParam();
34582
+ log.sql = this.sqlAccessLog;
34583
+ log.values = [app.title, this.appVersion, this.appService.ip];
34584
+ log.types = ["string", "string", "string"];
34585
+ this._dataService.doQuery(log).subscribe(() => { });
34586
+ this._utility.set_home_title(app.title);
34587
+ if (app.link.indexOf("http") !== -1) {
34588
+ let url = app.link;
34589
+ if (url.indexOf("[crypto_email]") > -1) {
34590
+ url = url.split("[crypto_email]").join(this.appService.user_email || "");
34591
+ }
34592
+ window.open(url);
34593
+ this.appOpen.emit(app);
34594
+ return;
34595
+ }
34596
+ this.router.navigate([app.link]);
34597
+ this.appOpen.emit(app);
34598
+ }
34599
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeLauncherComponent, deps: [{ token: AppService }, { token: AuthenticationService }, { token: QueryService }, { token: UtilityService }, { token: i3$2.Router }], target: i0.ɵɵFactoryTarget.Component });
34600
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: FHHomeLauncherComponent, isStandalone: true, selector: "FHHomeLauncher", inputs: { accent: "accent", accentDark: "accentDark", ink: "ink", showIndex: "showIndex", columnWidth: "columnWidth", columnGap: "columnGap", sqlUserAccess: "sqlUserAccess", sqlAllApps: "sqlAllApps", sqlApps: "sqlApps", sqlAccessLog: "sqlAccessLog", appVersion: "appVersion" }, outputs: { appOpen: "appOpen" }, host: { properties: { "style.--fh-home-accent": "this._a", "style.--fh-home-accent-dark": "this._ad", "style.--fh-home-ink": "this._ink" } }, ngImport: i0, template: `
34601
+ <div class="launcher" *ngIf="is_loaded">
34602
+ <div class="launcher-cols" [style.column-width.px]="columnWidth" [style.column-gap.px]="columnGap">
34603
+ <section class="cat" *ngFor="let cat of categories; let i = index">
34604
+ <header class="cat-head">
34605
+ <span class="cat-index" *ngIf="showIndex">{{ (i + 1).toString().padStart(2, "0") }}</span>
34606
+ <h2 class="cat-title">{{ cat.title }}</h2>
34607
+ </header>
34608
+ <div class="cat-apps">
34609
+ <button
34610
+ *ngFor="let app of cat.apps"
34611
+ type="button"
34612
+ class="cat-app"
34613
+ (click)="open_app(app)"
34614
+ >
34615
+ <span class="cat-app-label">{{ app.title }}</span>
34616
+ <i class="material-symbols-outlined cat-app-arrow">arrow_forward</i>
34617
+ </button>
34618
+ </div>
34619
+ </section>
34620
+ </div>
34621
+ </div>
34622
+ `, isInline: true, styles: [":host{display:block;flex:0 0 auto}.launcher{width:100%;box-sizing:border-box;padding:12px 48px 18px}.launcher-cols{column-width:270px;column-gap:48px}.cat{position:relative;break-inside:avoid;margin-bottom:22px;border-top:2px solid var(--fh-home-ink, #161212);padding-top:10px}.cat:after{content:\"\";position:absolute;top:-2px;left:0;width:30px;height:2px;background-color:var(--fh-home-accent, #63b345)}.cat-head{display:flex;align-items:baseline;gap:10px;margin-bottom:10px}.cat-index{font-family:Plus Jakarta Sans,sans-serif;font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--fh-home-accent-dark, #549a3b)}.cat-title{flex:1 1 auto;margin:0;font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--fh-home-ink, #161212)}.cat-apps{display:flex;flex-direction:column}.cat-app{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 2px 7px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:14px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.cat-app:last-child{border-bottom:none}.cat-app-arrow{font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.cat-app:hover{color:var(--fh-home-accent-dark, #549a3b);padding-left:6px}.cat-app:hover .cat-app-arrow{color:var(--fh-home-accent-dark, #549a3b);transform:translate(2px)}@media (max-width: 768px){.launcher{padding:10px 20px 24px}.launcher-cols{column-width:auto!important;columns:1}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
34623
+ }
34624
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeLauncherComponent, decorators: [{
34625
+ type: Component,
34626
+ args: [{ selector: "FHHomeLauncher", standalone: true, imports: [CommonModule], template: `
34627
+ <div class="launcher" *ngIf="is_loaded">
34628
+ <div class="launcher-cols" [style.column-width.px]="columnWidth" [style.column-gap.px]="columnGap">
34629
+ <section class="cat" *ngFor="let cat of categories; let i = index">
34630
+ <header class="cat-head">
34631
+ <span class="cat-index" *ngIf="showIndex">{{ (i + 1).toString().padStart(2, "0") }}</span>
34632
+ <h2 class="cat-title">{{ cat.title }}</h2>
34633
+ </header>
34634
+ <div class="cat-apps">
34635
+ <button
34636
+ *ngFor="let app of cat.apps"
34637
+ type="button"
34638
+ class="cat-app"
34639
+ (click)="open_app(app)"
34640
+ >
34641
+ <span class="cat-app-label">{{ app.title }}</span>
34642
+ <i class="material-symbols-outlined cat-app-arrow">arrow_forward</i>
34643
+ </button>
34644
+ </div>
34645
+ </section>
34646
+ </div>
34647
+ </div>
34648
+ `, styles: [":host{display:block;flex:0 0 auto}.launcher{width:100%;box-sizing:border-box;padding:12px 48px 18px}.launcher-cols{column-width:270px;column-gap:48px}.cat{position:relative;break-inside:avoid;margin-bottom:22px;border-top:2px solid var(--fh-home-ink, #161212);padding-top:10px}.cat:after{content:\"\";position:absolute;top:-2px;left:0;width:30px;height:2px;background-color:var(--fh-home-accent, #63b345)}.cat-head{display:flex;align-items:baseline;gap:10px;margin-bottom:10px}.cat-index{font-family:Plus Jakarta Sans,sans-serif;font-size:11px;font-weight:700;letter-spacing:.06em;color:var(--fh-home-accent-dark, #549a3b)}.cat-title{flex:1 1 auto;margin:0;font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--fh-home-ink, #161212)}.cat-apps{display:flex;flex-direction:column}.cat-app{width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:7px 2px 7px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:14px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.cat-app:last-child{border-bottom:none}.cat-app-arrow{font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.cat-app:hover{color:var(--fh-home-accent-dark, #549a3b);padding-left:6px}.cat-app:hover .cat-app-arrow{color:var(--fh-home-accent-dark, #549a3b);transform:translate(2px)}@media (max-width: 768px){.launcher{padding:10px 20px 24px}.launcher-cols{column-width:auto!important;columns:1}}\n"] }]
34649
+ }], ctorParameters: () => [{ type: AppService }, { type: AuthenticationService }, { type: QueryService }, { type: UtilityService }, { type: i3$2.Router }], propDecorators: { accent: [{
34650
+ type: Input
34651
+ }], accentDark: [{
34652
+ type: Input
34653
+ }], ink: [{
34654
+ type: Input
34655
+ }], _a: [{
34656
+ type: HostBinding,
34657
+ args: ["style.--fh-home-accent"]
34658
+ }], _ad: [{
34659
+ type: HostBinding,
34660
+ args: ["style.--fh-home-accent-dark"]
34661
+ }], _ink: [{
34662
+ type: HostBinding,
34663
+ args: ["style.--fh-home-ink"]
34664
+ }], showIndex: [{
34665
+ type: Input
34666
+ }], columnWidth: [{
34667
+ type: Input
34668
+ }], columnGap: [{
34669
+ type: Input
34670
+ }], sqlUserAccess: [{
34671
+ type: Input
34672
+ }], sqlAllApps: [{
34673
+ type: Input
34674
+ }], sqlApps: [{
34675
+ type: Input
34676
+ }], sqlAccessLog: [{
34677
+ type: Input
34678
+ }], appVersion: [{
34679
+ type: Input
34680
+ }], appOpen: [{
34681
+ type: Output
34682
+ }] } });
34683
+
34684
+ /**
34685
+ * Pannello "Task / To-Do" della homepage: elenco delle attività dei workflow
34686
+ * assegnate all'utente, con filtro per categoria.
34687
+ *
34688
+ * Le query (in query.ini) e i nomi dei campi restituiti sono configurabili via
34689
+ * @Input, così ogni cliente può usare le proprie senza modificare il componente.
34690
+ *
34691
+ * Campi attesi nella riga task (rinominabili): oggetto, applicazione, data_ultimo_step, link.
34692
+ * Campo categoria atteso: valore.
34693
+ */
34694
+ class FHHomeTodoComponent {
34695
+ _dataService;
34696
+ app_service;
34697
+ // ---- Tema ----
34698
+ accent = "#63b345";
34699
+ accentDark = "#3f7029";
34700
+ get _a() { return this.accent; }
34701
+ get _ad() { return this.accentDark; }
34702
+ // ---- Testi ----
34703
+ title = "To-Do";
34704
+ subtitle = "Le attività dei workflow assegnate a te";
34705
+ tagLabel = "Task";
34706
+ icon = "task_alt";
34707
+ allLabel = "Tutti";
34708
+ emptyTitle = "Nessuna attività in sospeso";
34709
+ emptySub = "Le attività che ti vengono assegnate compariranno qui.";
34710
+ dateFormat = "dd/MM/yyyy";
34711
+ // ---- Comportamento ----
34712
+ showCategoryFilter = true;
34713
+ // ---- Query (query.ini) ----
34714
+ sqlCategories = "SELECT_TODO_CAT";
34715
+ sqlByUser = "SELECT_TODO_BY_USER_D";
34716
+ sqlByUserCat = "SELECT_TODO_BY_USER_CAT_D";
34717
+ // ---- Mappatura campi della riga task ----
34718
+ fieldLabel = "oggetto";
34719
+ fieldMeta = "applicazione";
34720
+ fieldDate = "data_ultimo_step";
34721
+ fieldLink = "link";
34722
+ /** Campo che contiene il nome categoria nella query categorie. */
34723
+ fieldCategory = "valore";
34724
+ /** Emesso quando l'utente apre un task. */
34725
+ todoOpen = new EventEmitter();
34726
+ username;
34727
+ todos;
34728
+ errorMsg = "";
34729
+ categories = [];
34730
+ selectedCat = "";
34731
+ constructor(_dataService, app_service) {
34732
+ this._dataService = _dataService;
34733
+ this.app_service = app_service;
34734
+ }
34735
+ ngAfterViewInit() {
34736
+ this.load_todos();
34737
+ }
34738
+ load_todos() {
34739
+ if (!this.app_service.user) {
34740
+ setTimeout(() => this.load_todos(), 500);
34741
+ return;
34742
+ }
34743
+ this.username = this.app_service.user;
34744
+ if (this.showCategoryFilter) {
34745
+ const cp = new QParam();
34746
+ cp.sql = this.sqlCategories;
34747
+ cp.types = ["string"];
34748
+ cp.values = [this.username];
34749
+ this._dataService.doQuery(cp).subscribe((data) => {
34750
+ if (data?.result_msg === "OK") {
34751
+ this.categories = (data.result_data || []).map((r) => r[this.fieldCategory]);
34752
+ }
34753
+ });
34754
+ }
34755
+ this.fetch_todos("");
34756
+ }
34757
+ fetch_todos(cat) {
34758
+ const p = new QParam();
34759
+ if (cat) {
34760
+ p.sql = this.sqlByUserCat;
34761
+ p.types = ["string", "string"];
34762
+ p.values = [this.username, cat];
34763
+ }
34764
+ else {
34765
+ p.sql = this.sqlByUser;
34766
+ p.types = ["string"];
34767
+ p.values = [this.username];
34768
+ }
34769
+ this._dataService.doQuery(p).subscribe((data) => {
34770
+ if (data?.result_msg === "OK")
34771
+ this.todos = data.result_data;
34772
+ });
34773
+ }
34774
+ select_cat(cat) {
34775
+ this.selectedCat = cat;
34776
+ this.fetch_todos(cat);
34777
+ }
34778
+ open(o) {
34779
+ if (!o)
34780
+ return;
34781
+ window.open(o, "_self");
34782
+ this.todoOpen.emit(o);
34783
+ }
34784
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeTodoComponent, deps: [{ token: QueryService }, { token: AppService }], target: i0.ɵɵFactoryTarget.Component });
34785
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: FHHomeTodoComponent, isStandalone: true, selector: "FHHomeTodo", inputs: { accent: "accent", accentDark: "accentDark", title: "title", subtitle: "subtitle", tagLabel: "tagLabel", icon: "icon", allLabel: "allLabel", emptyTitle: "emptyTitle", emptySub: "emptySub", dateFormat: "dateFormat", showCategoryFilter: "showCategoryFilter", sqlCategories: "sqlCategories", sqlByUser: "sqlByUser", sqlByUserCat: "sqlByUserCat", fieldLabel: "fieldLabel", fieldMeta: "fieldMeta", fieldDate: "fieldDate", fieldLink: "fieldLink", fieldCategory: "fieldCategory" }, outputs: { todoOpen: "todoOpen" }, host: { properties: { "style.--fh-home-accent": "this._a", "style.--fh-home-accent-dark": "this._ad" } }, ngImport: i0, template: `
34786
+ <div class="tool-panel">
34787
+ <div class="panel-head">
34788
+ <div>
34789
+ <div class="panel-title">
34790
+ <i class="material-symbols-outlined">{{ icon }}</i>
34791
+ {{ title }}
34792
+ </div>
34793
+ <div class="panel-sub" *ngIf="subtitle">{{ subtitle }}</div>
34794
+ </div>
34795
+ <span class="tag tag-accent" *ngIf="tagLabel">{{ tagLabel }}</span>
34796
+ </div>
34797
+ <div class="panel-body">
34798
+
34799
+ <div class="cat-tabs" *ngIf="showCategoryFilter && categories.length">
34800
+ <button class="cat-tab" [class.cat-tab-active]="selectedCat === ''" (click)="select_cat('')">{{ allLabel }}</button>
34801
+ <button
34802
+ class="cat-tab"
34803
+ *ngFor="let cat of categories"
34804
+ [class.cat-tab-active]="selectedCat === cat"
34805
+ (click)="select_cat(cat)"
34806
+ >{{ cat }}</button>
34807
+ </div>
34808
+
34809
+ <div class="tool-list">
34810
+ <button
34811
+ type="button"
34812
+ class="tool-row"
34813
+ *ngFor="let todo of todos"
34814
+ (click)="open(todo[fieldLink])"
34815
+ >
34816
+ <span class="tool-row-label">{{ todo[fieldLabel] }}</span>
34817
+ <span class="tool-row-meta">{{ todo[fieldMeta] }}</span>
34818
+ <span class="tool-row-date">{{ todo[fieldDate] | date:dateFormat }}</span>
34819
+ <i class="material-symbols-outlined tool-row-arrow">arrow_forward</i>
34820
+ </button>
34821
+
34822
+ <div class="empty" *ngIf="todos && todos.length === 0">
34823
+ <i class="material-symbols-outlined empty-icon">{{ icon }}</i>
34824
+ <div class="empty-title">{{ emptyTitle }}</div>
34825
+ <div class="empty-sub">{{ emptySub }}</div>
34826
+ </div>
34827
+ </div>
34828
+ </div>
34829
+ </div>
34830
+
34831
+ <p class="tool-error" *ngIf="errorMsg != ''">{{ errorMsg }}</p>
34832
+ `, isInline: true, styles: [":host{display:block;height:100%}.tool-panel{height:100%;box-sizing:border-box;display:flex;flex-direction:column;background:#fff;border:1px solid rgba(22,18,18,.1);border-radius:10px;padding:16px 18px}.panel-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid rgba(22,18,18,.06);margin-bottom:10px}.panel-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#161212;display:flex;align-items:center;gap:8px}.panel-title i{font-size:18px;color:var(--fh-home-accent, #63b345)}.panel-sub{font-family:Inter,sans-serif;font-size:11px;color:#8c8585;margin-top:3px}.tag{display:inline-block;padding:3px 10px;border-radius:999px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.tag-accent{background:var(--fh-home-accent-soft, rgba(99, 179, 69, .12));color:var(--fh-home-accent-dark, #3f7029)}.panel-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.cat-tabs{flex:0 0 auto;display:flex;gap:0;overflow-x:auto;border-bottom:2px solid rgba(22,18,18,.08);margin-bottom:8px;scrollbar-width:none}.cat-tabs::-webkit-scrollbar{display:none}.cat-tab{flex:0 0 auto;padding:5px 14px 7px;border:none;border-bottom:2px solid transparent;margin-bottom:-2px;background:transparent;font-family:Inter,sans-serif;font-size:12px;font-weight:500;color:#8c8585;cursor:pointer;white-space:nowrap;transition:color .15s ease,border-color .15s ease}.cat-tab:hover{color:#443d3d}.cat-tab-active{color:var(--fh-home-accent-dark, #3f7029);font-weight:700;border-bottom-color:var(--fh-home-accent, #63b345)}.tool-list{flex:1 1 auto;min-height:0;height:175px;overflow-y:auto;overflow-x:hidden}.tool-row{width:100%;display:flex;align-items:center;gap:10px;padding:7px 2px 7px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:13px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.tool-row:last-child{border-bottom:none}.tool-row-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool-row-meta{flex:0 0 auto;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#a39b9b}.tool-row-date{flex:0 0 auto;font-size:11px;font-weight:400;color:#a39b9b;white-space:nowrap}.tool-row-arrow{flex:0 0 auto;font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.tool-row:hover{color:var(--fh-home-accent-dark, #3f7029);padding-left:6px}.tool-row:hover .tool-row-arrow{color:var(--fh-home-accent-dark, #3f7029);transform:translate(2px)}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:150px;text-align:center;color:#a39b9b}.empty-icon{font-size:30px;color:var(--fh-home-accent-faint, rgba(99, 179, 69, .45));margin-bottom:4px}.empty-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:700;color:#5c5454}.empty-sub{font-family:Inter,sans-serif;font-size:12px;color:#877d7d}.tool-error{color:#c00;font-size:9px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i5.DatePipe, name: "date" }] });
34833
+ }
34834
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeTodoComponent, decorators: [{
34835
+ type: Component,
34836
+ args: [{ selector: "FHHomeTodo", standalone: true, imports: [CommonModule], template: `
34837
+ <div class="tool-panel">
34838
+ <div class="panel-head">
34839
+ <div>
34840
+ <div class="panel-title">
34841
+ <i class="material-symbols-outlined">{{ icon }}</i>
34842
+ {{ title }}
34843
+ </div>
34844
+ <div class="panel-sub" *ngIf="subtitle">{{ subtitle }}</div>
34845
+ </div>
34846
+ <span class="tag tag-accent" *ngIf="tagLabel">{{ tagLabel }}</span>
34847
+ </div>
34848
+ <div class="panel-body">
34849
+
34850
+ <div class="cat-tabs" *ngIf="showCategoryFilter && categories.length">
34851
+ <button class="cat-tab" [class.cat-tab-active]="selectedCat === ''" (click)="select_cat('')">{{ allLabel }}</button>
34852
+ <button
34853
+ class="cat-tab"
34854
+ *ngFor="let cat of categories"
34855
+ [class.cat-tab-active]="selectedCat === cat"
34856
+ (click)="select_cat(cat)"
34857
+ >{{ cat }}</button>
34858
+ </div>
34859
+
34860
+ <div class="tool-list">
34861
+ <button
34862
+ type="button"
34863
+ class="tool-row"
34864
+ *ngFor="let todo of todos"
34865
+ (click)="open(todo[fieldLink])"
34866
+ >
34867
+ <span class="tool-row-label">{{ todo[fieldLabel] }}</span>
34868
+ <span class="tool-row-meta">{{ todo[fieldMeta] }}</span>
34869
+ <span class="tool-row-date">{{ todo[fieldDate] | date:dateFormat }}</span>
34870
+ <i class="material-symbols-outlined tool-row-arrow">arrow_forward</i>
34871
+ </button>
34872
+
34873
+ <div class="empty" *ngIf="todos && todos.length === 0">
34874
+ <i class="material-symbols-outlined empty-icon">{{ icon }}</i>
34875
+ <div class="empty-title">{{ emptyTitle }}</div>
34876
+ <div class="empty-sub">{{ emptySub }}</div>
34877
+ </div>
34878
+ </div>
34879
+ </div>
34880
+ </div>
34881
+
34882
+ <p class="tool-error" *ngIf="errorMsg != ''">{{ errorMsg }}</p>
34883
+ `, styles: [":host{display:block;height:100%}.tool-panel{height:100%;box-sizing:border-box;display:flex;flex-direction:column;background:#fff;border:1px solid rgba(22,18,18,.1);border-radius:10px;padding:16px 18px}.panel-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid rgba(22,18,18,.06);margin-bottom:10px}.panel-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#161212;display:flex;align-items:center;gap:8px}.panel-title i{font-size:18px;color:var(--fh-home-accent, #63b345)}.panel-sub{font-family:Inter,sans-serif;font-size:11px;color:#8c8585;margin-top:3px}.tag{display:inline-block;padding:3px 10px;border-radius:999px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.tag-accent{background:var(--fh-home-accent-soft, rgba(99, 179, 69, .12));color:var(--fh-home-accent-dark, #3f7029)}.panel-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.cat-tabs{flex:0 0 auto;display:flex;gap:0;overflow-x:auto;border-bottom:2px solid rgba(22,18,18,.08);margin-bottom:8px;scrollbar-width:none}.cat-tabs::-webkit-scrollbar{display:none}.cat-tab{flex:0 0 auto;padding:5px 14px 7px;border:none;border-bottom:2px solid transparent;margin-bottom:-2px;background:transparent;font-family:Inter,sans-serif;font-size:12px;font-weight:500;color:#8c8585;cursor:pointer;white-space:nowrap;transition:color .15s ease,border-color .15s ease}.cat-tab:hover{color:#443d3d}.cat-tab-active{color:var(--fh-home-accent-dark, #3f7029);font-weight:700;border-bottom-color:var(--fh-home-accent, #63b345)}.tool-list{flex:1 1 auto;min-height:0;height:175px;overflow-y:auto;overflow-x:hidden}.tool-row{width:100%;display:flex;align-items:center;gap:10px;padding:7px 2px 7px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:13px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.tool-row:last-child{border-bottom:none}.tool-row-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool-row-meta{flex:0 0 auto;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#a39b9b}.tool-row-date{flex:0 0 auto;font-size:11px;font-weight:400;color:#a39b9b;white-space:nowrap}.tool-row-arrow{flex:0 0 auto;font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.tool-row:hover{color:var(--fh-home-accent-dark, #3f7029);padding-left:6px}.tool-row:hover .tool-row-arrow{color:var(--fh-home-accent-dark, #3f7029);transform:translate(2px)}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:150px;text-align:center;color:#a39b9b}.empty-icon{font-size:30px;color:var(--fh-home-accent-faint, rgba(99, 179, 69, .45));margin-bottom:4px}.empty-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:700;color:#5c5454}.empty-sub{font-family:Inter,sans-serif;font-size:12px;color:#877d7d}.tool-error{color:#c00;font-size:9px}\n"] }]
34884
+ }], ctorParameters: () => [{ type: QueryService }, { type: AppService }], propDecorators: { accent: [{
34885
+ type: Input
34886
+ }], accentDark: [{
34887
+ type: Input
34888
+ }], _a: [{
34889
+ type: HostBinding,
34890
+ args: ["style.--fh-home-accent"]
34891
+ }], _ad: [{
34892
+ type: HostBinding,
34893
+ args: ["style.--fh-home-accent-dark"]
34894
+ }], title: [{
34895
+ type: Input
34896
+ }], subtitle: [{
34897
+ type: Input
34898
+ }], tagLabel: [{
34899
+ type: Input
34900
+ }], icon: [{
34901
+ type: Input
34902
+ }], allLabel: [{
34903
+ type: Input
34904
+ }], emptyTitle: [{
34905
+ type: Input
34906
+ }], emptySub: [{
34907
+ type: Input
34908
+ }], dateFormat: [{
34909
+ type: Input
34910
+ }], showCategoryFilter: [{
34911
+ type: Input
34912
+ }], sqlCategories: [{
34913
+ type: Input
34914
+ }], sqlByUser: [{
34915
+ type: Input
34916
+ }], sqlByUserCat: [{
34917
+ type: Input
34918
+ }], fieldLabel: [{
34919
+ type: Input
34920
+ }], fieldMeta: [{
34921
+ type: Input
34922
+ }], fieldDate: [{
34923
+ type: Input
34924
+ }], fieldLink: [{
34925
+ type: Input
34926
+ }], fieldCategory: [{
34927
+ type: Input
34928
+ }], todoOpen: [{
34929
+ type: Output
34930
+ }] } });
34931
+
34932
+ Chart.register(...registerables);
34933
+ /** Palette di default del doughnut (primo colore = accent). */
34934
+ const DEFAULT_PIE_COLORS = [
34935
+ "#63B345", "#161212", "#B0A6A6", "#C8E3BC", "#3F7029",
34936
+ "#5C5454", "#DCC9B6", "#549A3B", "#C9C2C2", "#443D3D",
34937
+ ];
34938
+ /**
34939
+ * Pannello "La tua attività" della homepage: doughnut delle applicazioni
34940
+ * utilizzate + grafico a linea degli step di workflow eseguiti nel periodo.
34941
+ *
34942
+ * Le due query (in query.ini) e i nomi dei campi sono configurabili via @Input.
34943
+ * - Query app: campi `label`, `value` (rinominabili).
34944
+ * - Query step: campi `giorno` (data ISO), `value` (rinominabili).
34945
+ */
34946
+ class FHHomeStatsComponent {
34947
+ apps;
34948
+ queryService;
34949
+ // ---- Tema ----
34950
+ accent = "#63B345";
34951
+ accentDark = "#3f7029";
34952
+ /** Palette del doughnut; il primo elemento dovrebbe coincidere con l'accent. */
34953
+ pieColors = DEFAULT_PIE_COLORS;
34954
+ get _a() { return this.accent; }
34955
+ get _ad() { return this.accentDark; }
34956
+ // ---- Testi ----
34957
+ appsTitle = "Applicazioni utilizzate";
34958
+ stepsTitle = "Step workflow eseguiti";
34959
+ appsTag = "Attività";
34960
+ stepsTag = "Workflow";
34961
+ appsEmptyTitle = "Nessuna attività nel periodo";
34962
+ appsEmptySub = "Le applicazioni che apri compariranno qui.";
34963
+ stepsEmptyTitle = "Nessuno step nel periodo";
34964
+ stepsEmptySub = "Gli step dei workflow che esegui compariranno qui.";
34965
+ // ---- Periodo ----
34966
+ /** Giorni indietro coperti dai grafici (default 30). */
34967
+ days = 30;
34968
+ // ---- Query (query.ini) ----
34969
+ sqlApps = "SELECT_HOME_STATS_APPS";
34970
+ sqlSteps = "SELECT_HOME_STATS_STEPS";
34971
+ // ---- Mappatura campi ----
34972
+ appLabelField = "label";
34973
+ appValueField = "value";
34974
+ stepDayField = "giorno";
34975
+ stepValueField = "value";
34976
+ stepSeriesLabel = "Step";
34977
+ loading = true;
34978
+ error = false;
34979
+ hasApps = false;
34980
+ hasSteps = false;
34981
+ periodoLabel = "";
34982
+ subtitlePrefix = "";
34983
+ pieLabels = [];
34984
+ pieDatasets = [];
34985
+ pieOptions = {
34986
+ responsive: true,
34987
+ maintainAspectRatio: false,
34988
+ plugins: {
34989
+ legend: { position: "right", align: "center", labels: { font: { size: 11 }, boxWidth: 10, padding: 8 } },
34990
+ tooltip: {
34991
+ callbacks: {
34992
+ label: (ctx) => {
34993
+ const v = ctx.parsed ?? 0;
34994
+ const total = ctx.dataset.data.reduce((a, b) => a + b, 0);
34995
+ const pct = total > 0 ? ((v / total) * 100).toFixed(1) : "0";
34996
+ return `${ctx.label}: ${v} (${pct}%)`;
34997
+ },
34998
+ },
34999
+ },
35000
+ },
35001
+ };
35002
+ lineLabels = [];
35003
+ lineDatasets = [];
35004
+ lineOptions;
35005
+ constructor(apps, queryService) {
35006
+ this.apps = apps;
35007
+ this.queryService = queryService;
35008
+ }
35009
+ ngOnInit() {
35010
+ this.subtitlePrefix = `Workflow · ultimi ${this.days} giorni`;
35011
+ this.lineOptions = {
35012
+ responsive: true,
35013
+ maintainAspectRatio: false,
35014
+ plugins: { legend: { display: false } },
35015
+ scales: {
35016
+ y: { beginAtZero: true, ticks: { precision: 0, font: { size: 10 } } },
35017
+ x: { ticks: { font: { size: 10 }, maxRotation: 0, autoSkip: true } },
35018
+ },
35019
+ elements: {
35020
+ line: { tension: 0.3, borderColor: this.accent, borderWidth: 2, fill: true, backgroundColor: "rgba(99,179,69,0.08)" },
35021
+ point: { radius: 3, backgroundColor: this.accent },
35022
+ },
35023
+ };
35024
+ this.buildPeriodoLabel();
35025
+ this.tryLoad();
35026
+ }
35027
+ buildPeriodoLabel() {
35028
+ const to = new Date();
35029
+ const from = new Date();
35030
+ from.setDate(to.getDate() - this.days);
35031
+ const fmt = (d) => `${String(d.getDate()).padStart(2, "0")}/${String(d.getMonth() + 1).padStart(2, "0")}/${d.getFullYear()}`;
35032
+ this.periodoLabel = `${fmt(from)} – ${fmt(to)}`;
35033
+ }
35034
+ tryLoad(retries = 10) {
35035
+ if (!this.apps.user) {
35036
+ if (retries <= 0) {
35037
+ this.error = true;
35038
+ this.loading = false;
35039
+ return;
35040
+ }
35041
+ setTimeout(() => this.tryLoad(retries - 1), 300);
35042
+ return;
35043
+ }
35044
+ this.load();
35045
+ }
35046
+ load() {
35047
+ const qApps = new QParam();
35048
+ qApps.sql = this.sqlApps;
35049
+ qApps.values = [this.apps.user];
35050
+ qApps.types = ["string"];
35051
+ const qSteps = new QParam();
35052
+ qSteps.sql = this.sqlSteps;
35053
+ qSteps.values = [this.apps.user];
35054
+ qSteps.types = ["string"];
35055
+ forkJoin({
35056
+ apps: this.queryService.doQuery(qApps).pipe(catchError(() => of(null))),
35057
+ steps: this.queryService.doQuery(qSteps).pipe(catchError(() => of(null))),
35058
+ }).subscribe({
35059
+ next: (r) => {
35060
+ if (!r.apps || r.apps.result_msg !== "OK" || !r.steps || r.steps.result_msg !== "OK") {
35061
+ this.error = true;
35062
+ this.loading = false;
35063
+ return;
35064
+ }
35065
+ this.buildPie(r.apps.result_data || []);
35066
+ this.buildLine(r.steps.result_data || []);
35067
+ this.loading = false;
35068
+ },
35069
+ error: () => {
35070
+ this.error = true;
35071
+ this.loading = false;
35072
+ },
35073
+ });
35074
+ }
35075
+ buildPie(rows) {
35076
+ this.hasApps = rows.length > 0;
35077
+ if (!this.hasApps)
35078
+ return;
35079
+ this.pieLabels = rows.map((r) => r[this.appLabelField] || "—");
35080
+ const values = rows.map((r) => Number(r[this.appValueField] || 0));
35081
+ this.pieDatasets = [
35082
+ {
35083
+ data: values,
35084
+ backgroundColor: this.pieColors.slice(0, values.length),
35085
+ borderColor: "#fff",
35086
+ borderWidth: 2,
35087
+ },
35088
+ ];
35089
+ }
35090
+ buildLine(rows) {
35091
+ this.hasSteps = rows.length > 0;
35092
+ if (!this.hasSteps)
35093
+ return;
35094
+ const map = new Map();
35095
+ for (const r of rows) {
35096
+ const key = String(r[this.stepDayField]).substring(0, 10);
35097
+ map.set(key, Number(r[this.stepValueField] || 0));
35098
+ }
35099
+ const labels = [];
35100
+ const values = [];
35101
+ const today = new Date();
35102
+ for (let i = this.days - 1; i >= 0; i--) {
35103
+ const d = new Date(today);
35104
+ d.setDate(today.getDate() - i);
35105
+ const iso = `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")}`;
35106
+ labels.push(`${String(d.getDate()).padStart(2, "0")}/${String(d.getMonth() + 1).padStart(2, "0")}`);
35107
+ values.push(map.get(iso) || 0);
35108
+ }
35109
+ this.lineLabels = labels;
35110
+ this.lineDatasets = [{ data: values, label: this.stepSeriesLabel }];
35111
+ }
35112
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeStatsComponent, deps: [{ token: AppService }, { token: QueryService }], target: i0.ɵɵFactoryTarget.Component });
35113
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: FHHomeStatsComponent, isStandalone: true, selector: "FHHomeStats", inputs: { accent: "accent", accentDark: "accentDark", pieColors: "pieColors", appsTitle: "appsTitle", stepsTitle: "stepsTitle", appsTag: "appsTag", stepsTag: "stepsTag", appsEmptyTitle: "appsEmptyTitle", appsEmptySub: "appsEmptySub", stepsEmptyTitle: "stepsEmptyTitle", stepsEmptySub: "stepsEmptySub", days: "days", sqlApps: "sqlApps", sqlSteps: "sqlSteps", appLabelField: "appLabelField", appValueField: "appValueField", stepDayField: "stepDayField", stepValueField: "stepValueField", stepSeriesLabel: "stepSeriesLabel" }, host: { properties: { "style.--fh-home-accent": "this._a", "style.--fh-home-accent-dark": "this._ad" } }, ngImport: i0, template: `
35114
+ <div class="home-stats" *ngIf="!error">
35115
+
35116
+ <div class="stats-panel">
35117
+ <div class="panel-head">
35118
+ <div>
35119
+ <div class="panel-title">
35120
+ <i class="material-symbols-outlined">apps</i>
35121
+ {{ appsTitle }}
35122
+ </div>
35123
+ <div class="panel-sub">{{ subtitlePrefix }} · {{ periodoLabel }}</div>
35124
+ </div>
35125
+ <span class="tag tag-accent" *ngIf="appsTag">{{ appsTag }}</span>
35126
+ </div>
35127
+ <div class="panel-body">
35128
+ <div class="chart-wrap" *ngIf="!loading && hasApps">
35129
+ <canvas baseChart type="doughnut" [labels]="pieLabels" [datasets]="pieDatasets" [options]="pieOptions"></canvas>
35130
+ </div>
35131
+ <div class="empty" *ngIf="!loading && !hasApps">
35132
+ <i class="material-symbols-outlined empty-icon">apps</i>
35133
+ <div class="empty-title">{{ appsEmptyTitle }}</div>
35134
+ <div class="empty-sub">{{ appsEmptySub }}</div>
35135
+ </div>
35136
+ <div class="sk-chart" *ngIf="loading"></div>
35137
+ </div>
35138
+ </div>
35139
+
35140
+ <div class="stats-panel">
35141
+ <div class="panel-head">
35142
+ <div>
35143
+ <div class="panel-title">
35144
+ <i class="material-symbols-outlined">timeline</i>
35145
+ {{ stepsTitle }}
35146
+ </div>
35147
+ <div class="panel-sub">{{ subtitlePrefix }} · {{ periodoLabel }}</div>
35148
+ </div>
35149
+ <span class="tag tag-neutral" *ngIf="stepsTag">{{ stepsTag }}</span>
35150
+ </div>
35151
+ <div class="panel-body">
35152
+ <div class="chart-wrap" *ngIf="!loading && hasSteps">
35153
+ <canvas baseChart type="line" [labels]="lineLabels" [datasets]="lineDatasets" [options]="lineOptions"></canvas>
35154
+ </div>
35155
+ <div class="empty" *ngIf="!loading && !hasSteps">
35156
+ <i class="material-symbols-outlined empty-icon">route</i>
35157
+ <div class="empty-title">{{ stepsEmptyTitle }}</div>
35158
+ <div class="empty-sub">{{ stepsEmptySub }}</div>
35159
+ </div>
35160
+ <div class="sk-chart" *ngIf="loading"></div>
35161
+ </div>
35162
+ </div>
35163
+
35164
+ </div>
35165
+ `, isInline: true, styles: [".home-stats{margin-bottom:4px;display:flex;flex-direction:row;gap:14px}.stats-panel{flex:1 1 50%;min-width:0;background:#fff;border:1px solid rgba(22,18,18,.1);border-radius:10px;padding:16px 18px}.panel-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid rgba(22,18,18,.06);margin-bottom:10px}.panel-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#161212;display:flex;align-items:center;gap:8px}.panel-title i{font-size:18px;color:var(--fh-home-accent, #63b345)}.panel-sub{font-family:Inter,sans-serif;font-size:11px;color:#8c8585;margin-top:3px}.tag{display:inline-block;padding:3px 10px;border-radius:999px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.tag-accent{background:var(--fh-home-accent-soft, rgba(99, 179, 69, .12));color:var(--fh-home-accent-dark, #3f7029)}.tag-neutral{background:#1612120f;color:#443d3d}.panel-body{padding-top:4px}.chart-wrap{position:relative;height:175px;width:100%}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:175px;text-align:center;color:#a39b9b}.empty-icon{font-size:30px;color:var(--fh-home-accent-faint, rgba(99, 179, 69, .45));margin-bottom:4px}.empty-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:700;color:#5c5454}.empty-sub{font-family:Inter,sans-serif;font-size:12px;color:#877d7d}.sk-chart{height:175px;background:linear-gradient(90deg,#f6f3f3,#ebe6e6,#f6f3f3);background-size:200% 100%;border-radius:6px;animation:sk-shimmer 1.4s ease-in-out infinite}@keyframes sk-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (max-width: 768px){.home-stats{flex-direction:column}}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: BaseChartDirective, selector: "canvas[baseChart]", inputs: ["type", "legend", "data", "options", "plugins", "labels", "datasets"], outputs: ["chartClick", "chartHover"], exportAs: ["base-chart"] }] });
35166
+ }
35167
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeStatsComponent, decorators: [{
35168
+ type: Component,
35169
+ args: [{ selector: "FHHomeStats", standalone: true, imports: [CommonModule, BaseChartDirective], template: `
35170
+ <div class="home-stats" *ngIf="!error">
35171
+
35172
+ <div class="stats-panel">
35173
+ <div class="panel-head">
35174
+ <div>
35175
+ <div class="panel-title">
35176
+ <i class="material-symbols-outlined">apps</i>
35177
+ {{ appsTitle }}
35178
+ </div>
35179
+ <div class="panel-sub">{{ subtitlePrefix }} · {{ periodoLabel }}</div>
35180
+ </div>
35181
+ <span class="tag tag-accent" *ngIf="appsTag">{{ appsTag }}</span>
35182
+ </div>
35183
+ <div class="panel-body">
35184
+ <div class="chart-wrap" *ngIf="!loading && hasApps">
35185
+ <canvas baseChart type="doughnut" [labels]="pieLabels" [datasets]="pieDatasets" [options]="pieOptions"></canvas>
35186
+ </div>
35187
+ <div class="empty" *ngIf="!loading && !hasApps">
35188
+ <i class="material-symbols-outlined empty-icon">apps</i>
35189
+ <div class="empty-title">{{ appsEmptyTitle }}</div>
35190
+ <div class="empty-sub">{{ appsEmptySub }}</div>
35191
+ </div>
35192
+ <div class="sk-chart" *ngIf="loading"></div>
35193
+ </div>
35194
+ </div>
35195
+
35196
+ <div class="stats-panel">
35197
+ <div class="panel-head">
35198
+ <div>
35199
+ <div class="panel-title">
35200
+ <i class="material-symbols-outlined">timeline</i>
35201
+ {{ stepsTitle }}
35202
+ </div>
35203
+ <div class="panel-sub">{{ subtitlePrefix }} · {{ periodoLabel }}</div>
35204
+ </div>
35205
+ <span class="tag tag-neutral" *ngIf="stepsTag">{{ stepsTag }}</span>
35206
+ </div>
35207
+ <div class="panel-body">
35208
+ <div class="chart-wrap" *ngIf="!loading && hasSteps">
35209
+ <canvas baseChart type="line" [labels]="lineLabels" [datasets]="lineDatasets" [options]="lineOptions"></canvas>
35210
+ </div>
35211
+ <div class="empty" *ngIf="!loading && !hasSteps">
35212
+ <i class="material-symbols-outlined empty-icon">route</i>
35213
+ <div class="empty-title">{{ stepsEmptyTitle }}</div>
35214
+ <div class="empty-sub">{{ stepsEmptySub }}</div>
35215
+ </div>
35216
+ <div class="sk-chart" *ngIf="loading"></div>
35217
+ </div>
35218
+ </div>
35219
+
35220
+ </div>
35221
+ `, styles: [".home-stats{margin-bottom:4px;display:flex;flex-direction:row;gap:14px}.stats-panel{flex:1 1 50%;min-width:0;background:#fff;border:1px solid rgba(22,18,18,.1);border-radius:10px;padding:16px 18px}.panel-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid rgba(22,18,18,.06);margin-bottom:10px}.panel-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#161212;display:flex;align-items:center;gap:8px}.panel-title i{font-size:18px;color:var(--fh-home-accent, #63b345)}.panel-sub{font-family:Inter,sans-serif;font-size:11px;color:#8c8585;margin-top:3px}.tag{display:inline-block;padding:3px 10px;border-radius:999px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.tag-accent{background:var(--fh-home-accent-soft, rgba(99, 179, 69, .12));color:var(--fh-home-accent-dark, #3f7029)}.tag-neutral{background:#1612120f;color:#443d3d}.panel-body{padding-top:4px}.chart-wrap{position:relative;height:175px;width:100%}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:175px;text-align:center;color:#a39b9b}.empty-icon{font-size:30px;color:var(--fh-home-accent-faint, rgba(99, 179, 69, .45));margin-bottom:4px}.empty-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:700;color:#5c5454}.empty-sub{font-family:Inter,sans-serif;font-size:12px;color:#877d7d}.sk-chart{height:175px;background:linear-gradient(90deg,#f6f3f3,#ebe6e6,#f6f3f3);background-size:200% 100%;border-radius:6px;animation:sk-shimmer 1.4s ease-in-out infinite}@keyframes sk-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}@media (max-width: 768px){.home-stats{flex-direction:column}}\n"] }]
35222
+ }], ctorParameters: () => [{ type: AppService }, { type: QueryService }], propDecorators: { accent: [{
35223
+ type: Input
35224
+ }], accentDark: [{
35225
+ type: Input
35226
+ }], pieColors: [{
35227
+ type: Input
35228
+ }], _a: [{
35229
+ type: HostBinding,
35230
+ args: ["style.--fh-home-accent"]
35231
+ }], _ad: [{
35232
+ type: HostBinding,
35233
+ args: ["style.--fh-home-accent-dark"]
35234
+ }], appsTitle: [{
35235
+ type: Input
35236
+ }], stepsTitle: [{
35237
+ type: Input
35238
+ }], appsTag: [{
35239
+ type: Input
35240
+ }], stepsTag: [{
35241
+ type: Input
35242
+ }], appsEmptyTitle: [{
35243
+ type: Input
35244
+ }], appsEmptySub: [{
35245
+ type: Input
35246
+ }], stepsEmptyTitle: [{
35247
+ type: Input
35248
+ }], stepsEmptySub: [{
35249
+ type: Input
35250
+ }], days: [{
35251
+ type: Input
35252
+ }], sqlApps: [{
35253
+ type: Input
35254
+ }], sqlSteps: [{
35255
+ type: Input
35256
+ }], appLabelField: [{
35257
+ type: Input
35258
+ }], appValueField: [{
35259
+ type: Input
35260
+ }], stepDayField: [{
35261
+ type: Input
35262
+ }], stepValueField: [{
35263
+ type: Input
35264
+ }], stepSeriesLabel: [{
35265
+ type: Input
35266
+ }] } });
35267
+
35268
+ /**
35269
+ * Pannello "Documenti" della homepage: esplora la cartella documentale condivisa
35270
+ * (navigazione cartelle + download file) tramite FileService.
35271
+ *
35272
+ * Endpoint e percorsi sono configurabili via @Input per riuso cross-cliente.
35273
+ * L'endpoint API NON è obbligatorio: se non passato viene ricavato da
35274
+ * AppService.API_ENDPOINT (lo stesso usato da QueryService/FileService).
35275
+ */
35276
+ class FHHomeDocsComponent {
35277
+ _dataService;
35278
+ appService;
35279
+ // ---- Tema ----
35280
+ accent = "#63b345";
35281
+ accentDark = "#3f7029";
35282
+ get _a() { return this.accent; }
35283
+ get _ad() { return this.accentDark; }
35284
+ // ---- Testi ----
35285
+ title = "Documenti";
35286
+ tagLabel = "Archivio";
35287
+ emptyTitle = "Nessun documento";
35288
+ emptySub = "I documenti condivisi compariranno qui.";
35289
+ // ---- Configurazione storage ----
35290
+ /**
35291
+ * Base URL delle API per costruire l'URL di download (il suffisso "/api" viene rimosso).
35292
+ * Opzionale: se vuoto si usa AppService.API_ENDPOINT.
35293
+ */
35294
+ apiEndpoint = "";
35295
+ /** Comando FileService per elencare i documenti. */
35296
+ command = "list_documents";
35297
+ /** Cartella radice da cui partire. */
35298
+ rootPath = "/";
35299
+ /** Segmento di percorso aggiunto all'endpoint per il download. */
35300
+ downloadSegment = "documenti/";
35301
+ /** Percorso base delle icone tipo file. */
35302
+ iconBasePath = "assets/icons/square-o/";
35303
+ curr_path = "/";
35304
+ last_curr_path = "/";
35305
+ b_loading = false;
35306
+ errorMsg = "";
35307
+ dirs = [];
35308
+ files = [];
35309
+ constructor(_dataService, appService) {
35310
+ this._dataService = _dataService;
35311
+ this.appService = appService;
35312
+ }
35313
+ /** Endpoint effettivo: input esplicito oppure default da AppService. */
35314
+ get effectiveEndpoint() {
35315
+ return this.apiEndpoint || this.appService.API_ENDPOINT || "";
35316
+ }
35317
+ ngOnInit() {
35318
+ this.curr_path = this.rootPath;
35319
+ this.last_curr_path = this.rootPath;
35320
+ this.ref_dirs(this.curr_path);
35321
+ }
35322
+ open_dir(item) {
35323
+ this.ref_dirs(item.full_path.split("\\\\").join("\\"));
35324
+ }
35325
+ download_file(item) {
35326
+ window.open(this.effectiveEndpoint.split("/api").join("") +
35327
+ this.downloadSegment +
35328
+ item.full_path.split("\\\\").join("\\"));
35329
+ }
35330
+ ref_dirs(s) {
35331
+ this.last_curr_path = this.curr_path;
35332
+ const p = new FSInput();
35333
+ p.p1 = s;
35334
+ p.command = this.command;
35335
+ this.curr_path = s;
35336
+ this.b_loading = true;
35337
+ this._dataService.doQuery(p).subscribe((data) => {
35338
+ this.b_loading = false;
35339
+ if (data != null && data.result_msg == "OK") {
35340
+ this.dirs = [];
35341
+ this.files = [];
35342
+ if (this.curr_path != "/") {
35343
+ const sx = this.curr_path.split("\\");
35344
+ let ss = "\\";
35345
+ if (sx.length > 2) {
35346
+ ss = "";
35347
+ for (let i = 0; i < sx.length - 1; i++) {
35348
+ ss = ss + "\\" + sx[i];
35349
+ }
35350
+ }
35351
+ if (s != "\\" && s != "" && s != "/")
35352
+ this.dirs.push({ fn: "..", full_path: ss, icon: "arrowup.png" });
35353
+ }
35354
+ for (let i = 0; i < data.result_data.length; i++) {
35355
+ if (data.result_data[i].t == "D")
35356
+ data.result_data[i].icon = "folder.svg";
35357
+ else {
35358
+ let iconf = "default";
35359
+ const arrf = data.result_data[i].fn.split(".");
35360
+ if (KNOWN_EXT.indexOf(arrf[arrf.length - 1].toLocaleUpperCase()) != -1)
35361
+ iconf = arrf[arrf.length - 1].toLocaleLowerCase();
35362
+ data.result_data[i].icon = iconf + ".svg";
35363
+ }
35364
+ if (data.result_data[i].t == "D")
35365
+ this.dirs.push(data.result_data[i]);
35366
+ else
35367
+ this.files.push(data.result_data[i]);
35368
+ }
35369
+ }
35370
+ });
35371
+ }
35372
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeDocsComponent, deps: [{ token: FileService }, { token: AppService }], target: i0.ɵɵFactoryTarget.Component });
35373
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: FHHomeDocsComponent, isStandalone: true, selector: "FHHomeDocs", inputs: { accent: "accent", accentDark: "accentDark", title: "title", tagLabel: "tagLabel", emptyTitle: "emptyTitle", emptySub: "emptySub", apiEndpoint: "apiEndpoint", command: "command", rootPath: "rootPath", downloadSegment: "downloadSegment", iconBasePath: "iconBasePath" }, host: { properties: { "style.--fh-home-accent": "this._a", "style.--fh-home-accent-dark": "this._ad" } }, ngImport: i0, template: `
35374
+ <div class="tool-panel">
35375
+ <div class="panel-head">
35376
+ <div>
35377
+ <div class="panel-title">
35378
+ <i class="material-symbols-outlined">folder_open</i>
35379
+ {{ title }}
35380
+ </div>
35381
+ <div class="panel-sub">{{ curr_path }}</div>
35382
+ </div>
35383
+ <span class="tag tag-neutral" *ngIf="tagLabel">{{ tagLabel }}</span>
35384
+ </div>
35385
+ <div class="panel-body">
35386
+ <div class="tool-list">
35387
+ <button type="button" class="tool-row" *ngFor="let item of dirs" (click)="open_dir(item)">
35388
+ <img class="tool-row-icon" [src]="iconBasePath + item.icon" alt="" />
35389
+ <span class="tool-row-label">{{ item.fn }}</span>
35390
+ <i class="material-symbols-outlined tool-row-arrow">arrow_forward</i>
35391
+ </button>
35392
+
35393
+ <button type="button" class="tool-row" *ngFor="let item of files" (click)="download_file(item)">
35394
+ <img class="tool-row-icon" [src]="iconBasePath + item.icon" alt="" />
35395
+ <span class="tool-row-label">{{ item.fn }}</span>
35396
+ <span class="tool-row-meta">{{ item.size }}</span>
35397
+ <i class="material-symbols-outlined tool-row-arrow">download</i>
35398
+ </button>
35399
+
35400
+ <div class="empty" *ngIf="!b_loading && dirs.length === 0 && files.length === 0">
35401
+ <i class="material-symbols-outlined empty-icon">folder_open</i>
35402
+ <div class="empty-title">{{ emptyTitle }}</div>
35403
+ <div class="empty-sub">{{ emptySub }}</div>
35404
+ </div>
35405
+ </div>
35406
+ </div>
35407
+ </div>
35408
+
35409
+ <p class="tool-error" *ngIf="errorMsg != ''">{{ errorMsg }}</p>
35410
+ `, isInline: true, styles: [":host{display:block;height:100%}.tool-panel{height:100%;box-sizing:border-box;display:flex;flex-direction:column;background:#fff;border:1px solid rgba(22,18,18,.1);border-radius:10px;padding:16px 18px}.panel-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid rgba(22,18,18,.06);margin-bottom:10px}.panel-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#161212;display:flex;align-items:center;gap:8px}.panel-title i{font-size:18px;color:var(--fh-home-accent, #63b345)}.panel-sub{font-family:Inter,sans-serif;font-size:11px;color:#8c8585;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:320px}.tag{display:inline-block;padding:3px 10px;border-radius:999px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.tag-neutral{background:#1612120f;color:#443d3d}.panel-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.tool-list{flex:1 1 auto;min-height:0;height:175px;overflow-y:auto;overflow-x:hidden}.tool-row{width:100%;display:flex;align-items:center;gap:10px;padding:6px 2px 6px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:13px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.tool-row:last-child{border-bottom:none}.tool-row-icon{flex:0 0 auto;width:22px;height:22px;object-fit:contain}.tool-row-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool-row-meta{flex:0 0 auto;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#a39b9b}.tool-row-arrow{flex:0 0 auto;font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.tool-row:hover{color:var(--fh-home-accent-dark, #3f7029);padding-left:6px}.tool-row:hover .tool-row-arrow{color:var(--fh-home-accent-dark, #3f7029);transform:translate(2px)}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:150px;text-align:center;color:#a39b9b}.empty-icon{font-size:30px;color:var(--fh-home-accent-faint, rgba(99, 179, 69, .45));margin-bottom:4px}.empty-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:700;color:#5c5454}.empty-sub{font-family:Inter,sans-serif;font-size:12px;color:#877d7d}.tool-error{color:#c00;font-size:9px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i5.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
35411
+ }
35412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHHomeDocsComponent, decorators: [{
35413
+ type: Component,
35414
+ args: [{ selector: "FHHomeDocs", standalone: true, imports: [CommonModule], template: `
35415
+ <div class="tool-panel">
35416
+ <div class="panel-head">
35417
+ <div>
35418
+ <div class="panel-title">
35419
+ <i class="material-symbols-outlined">folder_open</i>
35420
+ {{ title }}
35421
+ </div>
35422
+ <div class="panel-sub">{{ curr_path }}</div>
35423
+ </div>
35424
+ <span class="tag tag-neutral" *ngIf="tagLabel">{{ tagLabel }}</span>
35425
+ </div>
35426
+ <div class="panel-body">
35427
+ <div class="tool-list">
35428
+ <button type="button" class="tool-row" *ngFor="let item of dirs" (click)="open_dir(item)">
35429
+ <img class="tool-row-icon" [src]="iconBasePath + item.icon" alt="" />
35430
+ <span class="tool-row-label">{{ item.fn }}</span>
35431
+ <i class="material-symbols-outlined tool-row-arrow">arrow_forward</i>
35432
+ </button>
35433
+
35434
+ <button type="button" class="tool-row" *ngFor="let item of files" (click)="download_file(item)">
35435
+ <img class="tool-row-icon" [src]="iconBasePath + item.icon" alt="" />
35436
+ <span class="tool-row-label">{{ item.fn }}</span>
35437
+ <span class="tool-row-meta">{{ item.size }}</span>
35438
+ <i class="material-symbols-outlined tool-row-arrow">download</i>
35439
+ </button>
35440
+
35441
+ <div class="empty" *ngIf="!b_loading && dirs.length === 0 && files.length === 0">
35442
+ <i class="material-symbols-outlined empty-icon">folder_open</i>
35443
+ <div class="empty-title">{{ emptyTitle }}</div>
35444
+ <div class="empty-sub">{{ emptySub }}</div>
35445
+ </div>
35446
+ </div>
35447
+ </div>
35448
+ </div>
35449
+
35450
+ <p class="tool-error" *ngIf="errorMsg != ''">{{ errorMsg }}</p>
35451
+ `, styles: [":host{display:block;height:100%}.tool-panel{height:100%;box-sizing:border-box;display:flex;flex-direction:column;background:#fff;border:1px solid rgba(22,18,18,.1);border-radius:10px;padding:16px 18px}.panel-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid rgba(22,18,18,.06);margin-bottom:10px}.panel-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#161212;display:flex;align-items:center;gap:8px}.panel-title i{font-size:18px;color:var(--fh-home-accent, #63b345)}.panel-sub{font-family:Inter,sans-serif;font-size:11px;color:#8c8585;margin-top:3px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:320px}.tag{display:inline-block;padding:3px 10px;border-radius:999px;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.03em;white-space:nowrap}.tag-neutral{background:#1612120f;color:#443d3d}.panel-body{flex:1 1 auto;min-height:0;display:flex;flex-direction:column}.tool-list{flex:1 1 auto;min-height:0;height:175px;overflow-y:auto;overflow-x:hidden}.tool-row{width:100%;display:flex;align-items:center;gap:10px;padding:6px 2px 6px 0;border:none;border-bottom:1px solid rgba(22,18,18,.07);background:transparent;cursor:pointer;text-align:left;font-family:Inter,sans-serif;font-size:13px;font-weight:500;color:#443d3d;transition:color .15s ease,padding-left .15s ease}.tool-row:last-child{border-bottom:none}.tool-row-icon{flex:0 0 auto;width:22px;height:22px;object-fit:contain}.tool-row-label{flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tool-row-meta{flex:0 0 auto;font-size:11px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;color:#a39b9b}.tool-row-arrow{flex:0 0 auto;font-size:16px;color:transparent;transition:color .15s ease,transform .15s ease}.tool-row:hover{color:var(--fh-home-accent-dark, #3f7029);padding-left:6px}.tool-row:hover .tool-row-arrow{color:var(--fh-home-accent-dark, #3f7029);transform:translate(2px)}.empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;height:150px;text-align:center;color:#a39b9b}.empty-icon{font-size:30px;color:var(--fh-home-accent-faint, rgba(99, 179, 69, .45));margin-bottom:4px}.empty-title{font-family:Plus Jakarta Sans,sans-serif;font-size:13px;font-weight:700;color:#5c5454}.empty-sub{font-family:Inter,sans-serif;font-size:12px;color:#877d7d}.tool-error{color:#c00;font-size:9px}\n"] }]
35452
+ }], ctorParameters: () => [{ type: FileService }, { type: AppService }], propDecorators: { accent: [{
35453
+ type: Input
35454
+ }], accentDark: [{
35455
+ type: Input
35456
+ }], _a: [{
35457
+ type: HostBinding,
35458
+ args: ["style.--fh-home-accent"]
35459
+ }], _ad: [{
35460
+ type: HostBinding,
35461
+ args: ["style.--fh-home-accent-dark"]
35462
+ }], title: [{
35463
+ type: Input
35464
+ }], tagLabel: [{
35465
+ type: Input
35466
+ }], emptyTitle: [{
35467
+ type: Input
35468
+ }], emptySub: [{
35469
+ type: Input
35470
+ }], apiEndpoint: [{
35471
+ type: Input
35472
+ }], command: [{
35473
+ type: Input
35474
+ }], rootPath: [{
35475
+ type: Input
35476
+ }], downloadSegment: [{
35477
+ type: Input
35478
+ }], iconBasePath: [{
35479
+ type: Input
35480
+ }] } });
35481
+ /** Estensioni con icona dedicata (set "square-o"). */
35482
+ const KNOWN_EXT = "3G2|3GA|3GP|7Z|AA|AAC|AC|ACCDB|ACCDT|ADN|AI|AIF|AIFC|AIFF|AIT|AMR|ANI|APK|APP|APPLESCRIPT|ASAX|ASC|ASCX|ASF|ASH|ASHX|ASMX|ASP|ASPX|ASX|AU|AUP|AVI|AXD|AZE|BAK|BASH|BAT|BIN|BLANK|BMP|BOWERRC|BPG|BROWSER|BZ2|C|CAB|CAD|CAF|CAL|CD|CER|CFG|CFM|CFML|CGI|CLASS|CMD|CODEKIT|COFFEE|COFFEELINTIGNORE|COM|COMPILE|CONF|CONFIG|CPP|CPTX|CR2|CRDOWNLOAD|CRT|CRYPT|CS|CSH|CSON|CSPROJ|CSS|CSV|CUE|DAT|DB|DBF|DEB|DGN|DIST|DIZ|DLL|DMG|DNG|DOC|DOCB|DOCM|DOCX|DOT|DOTM|DOTX|DOWNLOAD|DPJ|DS_STORE|DTD|DWG|DXF|EDITORCONFIG|EL|ENC|EOT|EPS|EPUB|ESLINTIGNORE|EXE|F4V|FAX|FB2|FLA|FLAC|FLV|FOLDER|GADGET|GDP|GEM|GIF|GITATTRIBUTES|GITIGNORE|GO|GPG|GZ|H|HANDLEBARS|HBS|HEIC|HS|HSL|HTM|HTML|IBOOKS|ICNS|ICO|ICS|IDX|IFF|IFO|IMAGE|IMG|IN|INDD|INF|INI|ISO|J2|JAR|JAVA|JPE|JPEG|JPG|JS|JSON|JSP|JSX|KEY|KF8|KMK|KSH|KUP|LESS|LEX|LICX|LISP|LIT|LNK|LOCK|LOG|LUA|M|M2V|M3U|M3U8|M4|M4A|M4R|M4V|MAP|MASTER|MC|MD|MDB|MDF|ME|MI|MID|MIDI|MK|MKV|MM|MO|MOBI|MOD|MOV|MP2|MP3|MP4|MPA|MPD|MPE|MPEG|MPG|MPGA|MPP|MPT|MSI|MSU|NEF|NES|NFO|NIX|NPMIGNORE|ODB|ODS|ODT|OGG|OGV|OST|OTF|OTT|OVA|OVF|P12|P7B|PAGES|PART|PCD|PDB|PDF|PEM|PFX|PGP|PH|PHAR|PHP|PKG|PL|PLIST|PM|PNG|PO|POM|POT|POTX|PPS|PPSX|PPT|PPTM|PPTX|PROP|PS|PS1|PSD|PSP|PST|PUB|PY|PYC|QT|RA|RAM|RAR|RAW|RB|RDF|RESX|RETRY|RM|ROM|RPM|RSA|RSS|RTF|RU|RUB|SASS|SCSS|SDF|SED|SH|SITEMAP|SKIN|SLDM|SLDX|SLN|SOL|SQL|SQLITE|STEP|STL|SVG|SWD|SWF|SWIFT|SYS|TAR|TCSH|TEX|TFIGNORE|TGA|TGZ|TIF|TIFF|TMP|TORRENT|TS|TSV|TTF|TWIG|TXT|UDF|VB|VBPROJ|VBS|VCD|VCS|VDI|VDX|VMDK|VOB|VSCODEIGNORE|VSD|VSS|VST|VSX|VTX|WAR|WAV|WBK|WEBINFO|WEBM|WEBP|WMA|WMF|WMV|WOFF|WOFF2|WPS|WSF|XAML|XCF|XLM|XLS|XLSM|XLSX|XLT|XLTM|XLTX|XML|XPI|XPS|XRB|XSD|XSL|XSPF|XZ|YAML|YML|Z|ZIP|ZSH";
35483
+
34444
35484
  /*
34445
35485
  * Public API Surface of fluxhublib
34446
35486
  */
@@ -34449,5 +35489,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
34449
35489
  * Generated bundle index. Do not edit.
34450
35490
  */
34451
35491
 
34452
- export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, BpmnEditorComponent, CheckboxEditorComponent, ComboBoxEditorComponent, CurrencyComponent, DialogBaseComponent, FHAutoCompleteComponent, FHCheckBoxComponent, FHColorPickerComponent, FHComboboxComponent, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHDateRangePickerComponent, FHFieldPickListComponent, FHFilterComboboxComponent, FHFormBuilderComponent, FHFormExecuterComponent, FHFormToolBarComponent, FHGridComponent, FHGridJSONComponent, FHGridToolBarComponent, FHGuard, FHHelpButtonComponent, FHImageViewerComponent, FHListComponent, FHLogPanelComponent, FHMultiComboboxComponent, FHNotesPanelComponent, FHNumericFieldComponent, FHPickFieldComponent, FHPickUsersComponent, FHRichTextComponent, FHRoleManagerComponent, FHTableManagerComponent, FHTextAreaComponent, FHTextInputComponent, FHTimePickerComponent, FHToolBarCustomAction, FHToolbarCommandType, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FHWinAppLogsComponent, FHWinAskBigTextComponent, FHWinAskButtonsComponent, FHWinAskNumberComponent, FHWinAskRichTextComponent, FHWinAskTextComponent, FHWinAutoComplete, FHWinComboComponent, FHWinConfirmComponent, FHWinErrorComponent, FHWinGridSelection, FHWinInfoComponent, FHWinListComponent, FHWinMappaComponent, FHWinOutputComponent, FHWinPicklistComponent, FHWinSalvaAnnulla, FHWinSelectByGridComponent, FHWinShowEmail, FHWinShowEmailS3, FHWinShowImage, FHWinShowLog, FHWinShowLogDett, FHWinTimeSlider, FHWinUploadComponent, FHWinUserInfo, FHWinUserPickerComponent, FHWinWaitComponent, FHWorkflowForm, FHWorkflowHeaderBar, FHWorkflowView, FSInput, FSResult, FileService, GridService, LocalDBService, MonthYearPickerComponent, NumericEditorComponent, OdbcService, OfficeAutomatorService, OfficeOperation, OfficeResult, QGParam, QGResult, QParam, QResult, QueryOpenService, QueryService, RegistrationService, ReplaceLineBreaks, SafePipe, TextAreaEditorComponent, UtilityService, WkfService, YearPickerComponent, createButtonCommand, createCheckboxCommand, createSpacerCommand, createTableManagerCommand, fh_win_translate };
35492
+ export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, BpmnEditorComponent, CheckboxEditorComponent, ComboBoxEditorComponent, CurrencyComponent, DialogBaseComponent, FHAutoCompleteComponent, FHCheckBoxComponent, FHColorPickerComponent, FHComboboxComponent, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHDateRangePickerComponent, FHFieldPickListComponent, FHFilterComboboxComponent, FHFormBuilderComponent, FHFormExecuterComponent, FHFormToolBarComponent, FHGridComponent, FHGridJSONComponent, FHGridToolBarComponent, FHGuard, FHHelpButtonComponent, FHHomeDocsComponent, FHHomeLauncherComponent, FHHomeStatsComponent, FHHomeTodoComponent, FHImageViewerComponent, FHListComponent, FHLogPanelComponent, FHMultiComboboxComponent, FHNotesPanelComponent, FHNumericFieldComponent, FHPickFieldComponent, FHPickUsersComponent, FHRichTextComponent, FHRoleManagerComponent, FHTableManagerComponent, FHTextAreaComponent, FHTextInputComponent, FHTimePickerComponent, FHToolBarCustomAction, FHToolbarCommandType, FHUploadComponent, FHUploadPanelComponent, FHUploadPanelS3Component, FHUploadS3Component, FHUserFieldComponent, FHWinAppLogsComponent, FHWinAskBigTextComponent, FHWinAskButtonsComponent, FHWinAskNumberComponent, FHWinAskRichTextComponent, FHWinAskTextComponent, FHWinAutoComplete, FHWinComboComponent, FHWinConfirmComponent, FHWinErrorComponent, FHWinGridSelection, FHWinInfoComponent, FHWinListComponent, FHWinMappaComponent, FHWinOutputComponent, FHWinPicklistComponent, FHWinSalvaAnnulla, FHWinSelectByGridComponent, FHWinShowEmail, FHWinShowEmailS3, FHWinShowImage, FHWinShowLog, FHWinShowLogDett, FHWinTimeSlider, FHWinUploadComponent, FHWinUserInfo, FHWinUserPickerComponent, FHWinWaitComponent, FHWorkflowForm, FHWorkflowHeaderBar, FHWorkflowView, FSInput, FSResult, FileService, GridService, LocalDBService, MonthYearPickerComponent, NumericEditorComponent, OdbcService, OfficeAutomatorService, OfficeOperation, OfficeResult, QGParam, QGResult, QParam, QResult, QueryOpenService, QueryService, RegistrationService, ReplaceLineBreaks, SafePipe, TextAreaEditorComponent, UtilityService, WkfService, YearPickerComponent, createButtonCommand, createCheckboxCommand, createSpacerCommand, createTableManagerCommand, fh_win_translate };
34453
35493
  //# sourceMappingURL=fluxhub-fluxhub-lib.mjs.map