@fluxhub/fluxhub-lib 19.0.184 → 19.0.186

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, HostBinding } from '@angular/core';
2
+ import { Injectable, forwardRef, EventEmitter, Input, Output, ViewChild, Component, Inject, Optional, Pipe, HostListener, Directive, ChangeDetectionStrategy, ViewEncapsulation, ViewContainerRef, ElementRef, ViewChildren, 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';
@@ -65,6 +65,8 @@ import { MatMenuModule } from '@angular/material/menu';
65
65
  import { ModuleRegistry, themeQuartz } from 'ag-grid-community';
66
66
  import * as i8$3 from '@angular/cdk/clipboard';
67
67
  import { ColorPickerDirective } from 'ngx-color-picker';
68
+ import * as i3$4 from '@angular/cdk/overlay';
69
+ import { OverlayModule } from '@angular/cdk/overlay';
68
70
  import * as i4$3 from 'ngx-quill';
69
71
  import { QuillModule, QuillEditorComponent, QuillViewComponent } from 'ngx-quill';
70
72
  import Quill from 'quill';
@@ -14992,6 +14994,751 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
14992
14994
  type: Output
14993
14995
  }] } });
14994
14996
 
14997
+ /**
14998
+ * Elenco curato di icone FontAwesome FREE (versione 6).
14999
+ * Sono incluse SOLO icone disponibili nel set gratuito:
15000
+ * - stile "solid" -> classe `fa-solid fa-<name>`
15001
+ * - stile "brands" -> classe `fa-brands fa-<name>`
15002
+ *
15003
+ * L'app consumante deve avere il CSS di FontAwesome caricato (CDN o pacchetto),
15004
+ * esattamente come per le altre icone usate nel portale.
15005
+ *
15006
+ * Per estendere la lista basta aggiungere il nome (senza prefisso `fa-`)
15007
+ * all'array corretto.
15008
+ */
15009
+ /** Icone "solid" free (nome senza prefisso). */
15010
+ const FA_SOLID_ICONS = [
15011
+ // Generali / UI
15012
+ 'house', 'house-chimney', 'home', 'user', 'users', 'user-plus', 'user-minus',
15013
+ 'user-gear', 'user-check', 'user-xmark', 'user-tie', 'user-group', 'user-clock',
15014
+ 'address-book', 'address-card', 'id-card', 'id-badge', 'circle-user',
15015
+ 'gear', 'gears', 'sliders', 'wrench', 'screwdriver-wrench', 'toolbox', 'hammer',
15016
+ 'magnifying-glass', 'magnifying-glass-plus', 'magnifying-glass-minus',
15017
+ 'filter', 'filter-circle-xmark', 'sort', 'sort-up', 'sort-down',
15018
+ 'bars', 'bars-staggered', 'ellipsis', 'ellipsis-vertical', 'grip', 'grip-vertical',
15019
+ 'list', 'list-ul', 'list-ol', 'list-check', 'table', 'table-list', 'table-cells',
15020
+ 'table-columns', 'border-all', 'th', 'th-large', 'th-list',
15021
+ // Azioni
15022
+ 'plus', 'minus', 'xmark', 'check', 'check-double', 'ban', 'circle-plus',
15023
+ 'circle-minus', 'circle-xmark', 'circle-check', 'square-plus', 'square-minus',
15024
+ 'square-check', 'pen', 'pen-to-square', 'pencil', 'eraser', 'trash', 'trash-can',
15025
+ 'copy', 'paste', 'scissors', 'clone', 'save', 'floppy-disk', 'print',
15026
+ 'download', 'upload', 'cloud-arrow-down', 'cloud-arrow-up', 'file-export',
15027
+ 'file-import', 'share', 'share-nodes', 'reply', 'reply-all', 'forward',
15028
+ 'rotate', 'rotate-left', 'rotate-right', 'arrows-rotate', 'repeat', 'shuffle',
15029
+ 'lock', 'lock-open', 'unlock', 'key', 'shield', 'shield-halved', 'fingerprint',
15030
+ 'eye', 'eye-slash', 'thumbtack', 'bookmark', 'star', 'star-half', 'heart',
15031
+ 'flag', 'flag-checkered', 'bell', 'bell-slash', 'bullhorn', 'comment',
15032
+ 'comments', 'comment-dots', 'message', 'envelope', 'envelope-open',
15033
+ 'paper-plane', 'inbox', 'at', 'reply', 'phone', 'phone-slash', 'mobile',
15034
+ 'mobile-screen', 'fax', 'headset', 'voicemail',
15035
+ // Frecce / navigazione
15036
+ 'arrow-up', 'arrow-down', 'arrow-left', 'arrow-right', 'arrow-up-right-from-square',
15037
+ 'up-down', 'left-right', 'arrows-up-down-left-right', 'angle-up', 'angle-down',
15038
+ 'angle-left', 'angle-right', 'angles-up', 'angles-down', 'angles-left',
15039
+ 'angles-right', 'chevron-up', 'chevron-down', 'chevron-left', 'chevron-right',
15040
+ 'caret-up', 'caret-down', 'caret-left', 'caret-right', 'location-dot',
15041
+ 'location-arrow', 'location-crosshairs', 'map', 'map-pin', 'map-location-dot',
15042
+ 'compass', 'route', 'signs-post', 'diamond-turn-right',
15043
+ // File / documenti
15044
+ 'file', 'file-lines', 'file-pdf', 'file-word', 'file-excel', 'file-powerpoint',
15045
+ 'file-image', 'file-video', 'file-audio', 'file-zipper', 'file-code',
15046
+ 'file-csv', 'file-invoice', 'file-invoice-dollar', 'file-contract',
15047
+ 'file-signature', 'file-circle-check', 'file-circle-xmark', 'folder',
15048
+ 'folder-open', 'folder-plus', 'folder-tree', 'paperclip', 'book', 'book-open',
15049
+ 'newspaper', 'clipboard', 'clipboard-list', 'clipboard-check', 'note-sticky',
15050
+ // Business / commerce
15051
+ 'briefcase', 'building', 'building-columns', 'industry', 'warehouse', 'store',
15052
+ 'shop', 'cart-shopping', 'cart-plus', 'basket-shopping', 'bag-shopping',
15053
+ 'credit-card', 'money-bill', 'money-bill-wave', 'money-check', 'money-check-dollar',
15054
+ 'wallet', 'sack-dollar', 'coins', 'cash-register', 'receipt', 'tag', 'tags',
15055
+ 'percent', 'dollar-sign', 'euro-sign', 'sterling-sign', 'chart-line',
15056
+ 'chart-bar', 'chart-column', 'chart-pie', 'chart-area', 'chart-simple',
15057
+ 'arrow-trend-up', 'arrow-trend-down', 'scale-balanced', 'handshake', 'gem',
15058
+ 'crown', 'award', 'trophy', 'medal', 'ribbon', 'certificate',
15059
+ // Tempo / calendario
15060
+ 'calendar', 'calendar-days', 'calendar-check', 'calendar-xmark', 'calendar-plus',
15061
+ 'calendar-week', 'clock', 'clock-rotate-left', 'hourglass', 'hourglass-half',
15062
+ 'stopwatch', 'business-time', 'history',
15063
+ // Multimedia
15064
+ 'play', 'pause', 'stop', 'forward-step', 'backward-step', 'forward-fast',
15065
+ 'backward-fast', 'circle-play', 'circle-pause', 'circle-stop', 'volume-high',
15066
+ 'volume-low', 'volume-xmark', 'music', 'image', 'images', 'camera', 'video',
15067
+ 'film', 'photo-film', 'microphone', 'microphone-slash', 'podcast',
15068
+ // Tech / dispositivi
15069
+ 'desktop', 'laptop', 'tablet', 'keyboard', 'mouse', 'computer', 'server',
15070
+ 'database', 'hard-drive', 'memory', 'microchip', 'sim-card', 'plug', 'battery-full',
15071
+ 'battery-half', 'battery-empty', 'wifi', 'signal', 'tower-broadcast', 'satellite-dish',
15072
+ 'cloud', 'network-wired', 'sitemap', 'code', 'code-branch', 'code-compare',
15073
+ 'terminal', 'bug', 'robot', 'qrcode', 'barcode',
15074
+ // Persone / stati
15075
+ 'circle-info', 'info', 'circle-question', 'question', 'circle-exclamation',
15076
+ 'triangle-exclamation', 'exclamation', 'lightbulb', 'fire', 'bolt', 'snowflake',
15077
+ 'sun', 'moon', 'cloud-sun', 'cloud-moon', 'umbrella', 'temperature-half',
15078
+ // Trasporti / luoghi
15079
+ 'car', 'truck', 'truck-fast', 'van-shuttle', 'bus', 'train', 'plane',
15080
+ 'plane-departure', 'plane-arrival', 'ship', 'bicycle', 'motorcycle', 'taxi',
15081
+ 'gas-pump', 'road', 'traffic-light', 'anchor', 'globe', 'earth-europe',
15082
+ 'earth-americas', 'flag-usa', 'mountain', 'tree', 'leaf', 'seedling',
15083
+ // Salute / scienza
15084
+ 'heart-pulse', 'stethoscope', 'user-doctor', 'hospital', 'pills', 'capsules',
15085
+ 'syringe', 'notes-medical', 'kit-medical', 'flask', 'vial', 'microscope',
15086
+ 'dna', 'atom', 'brain', 'tooth', 'bone',
15087
+ // Cibo / vario
15088
+ 'utensils', 'mug-hot', 'mug-saucer', 'wine-glass', 'martini-glass', 'beer-mug-empty',
15089
+ 'pizza-slice', 'burger', 'cake-candles', 'cookie', 'ice-cream', 'apple-whole',
15090
+ 'gift', 'gifts', 'box', 'boxes-stacked', 'box-open', 'pallet', 'dolly',
15091
+ // Simboli / misc
15092
+ 'circle', 'square', 'check-circle', 'circle-half-stroke', 'asterisk', 'hashtag',
15093
+ 'infinity', 'palette', 'paint-roller', 'paintbrush', 'fill-drip', 'eye-dropper',
15094
+ 'wand-magic-sparkles', 'puzzle-piece', 'cubes', 'cube', 'layer-group', 'clone',
15095
+ 'object-group', 'crop', 'expand', 'compress', 'maximize', 'minimize',
15096
+ 'arrows-left-right-to-line', 'up-right-and-down-left-from-center', 'language',
15097
+ 'spell-check', 'font', 'bold', 'italic', 'underline', 'align-left', 'align-center',
15098
+ 'align-right', 'align-justify', 'indent', 'outdent', 'quote-left', 'quote-right',
15099
+ 'link', 'link-slash', 'power-off', 'right-to-bracket', 'right-from-bracket',
15100
+ 'arrow-right-to-bracket', 'arrow-right-from-bracket', 'door-open', 'door-closed',
15101
+ 'circle-notch', 'spinner', 'gauge', 'gauge-high', 'tachograph-digital',
15102
+ 'temperature-high', 'toggle-on', 'toggle-off', 'wrench', 'broom', 'recycle',
15103
+ 'arrows-spin', 'graduation-cap', 'school', 'chalkboard', 'chalkboard-user',
15104
+ 'person', 'person-walking', 'person-running', 'child', 'baby', 'wheelchair',
15105
+ 'hand', 'hand-point-up', 'hand-point-right', 'thumbs-up', 'thumbs-down',
15106
+ 'face-smile', 'face-frown', 'face-meh', 'smile', 'frown'
15107
+ ];
15108
+ /** Icone "brands" free (loghi, nome senza prefisso). */
15109
+ const FA_BRAND_ICONS = [
15110
+ 'angular', 'react', 'vuejs', 'node-js', 'js', 'html5', 'css3', 'css3-alt',
15111
+ 'sass', 'less', 'bootstrap', 'npm', 'yarn', 'docker', 'git', 'git-alt',
15112
+ 'github', 'gitlab', 'bitbucket', 'jenkins', 'java', 'python', 'php', 'laravel',
15113
+ 'symfony', 'wordpress', 'wordpress-simple', 'drupal', 'joomla', 'shopify',
15114
+ 'magento', 'stripe', 'paypal', 'cc-visa', 'cc-mastercard', 'cc-amex',
15115
+ 'cc-paypal', 'cc-stripe', 'amazon', 'aws', 'google', 'google-drive',
15116
+ 'google-play', 'microsoft', 'windows', 'apple', 'android', 'linux', 'ubuntu',
15117
+ 'redhat', 'centos', 'fedora', 'suse',
15118
+ 'facebook', 'facebook-f', 'facebook-messenger', 'instagram', 'twitter',
15119
+ 'x-twitter', 'linkedin', 'linkedin-in', 'youtube', 'whatsapp', 'telegram',
15120
+ 'tiktok', 'pinterest', 'reddit', 'tumblr', 'snapchat', 'discord', 'slack',
15121
+ 'skype', 'twitch', 'vimeo', 'spotify', 'soundcloud', 'figma', 'sketch',
15122
+ 'invision', 'dribbble', 'behance', 'medium', 'dev', 'stack-overflow',
15123
+ 'stack-exchange', 'codepen', 'jsfiddle', 'free-code-camp', 'trello', 'jira',
15124
+ 'confluence', 'atlassian', 'salesforce', 'hubspot', 'mailchimp', 'wix',
15125
+ 'squarespace', 'cloudflare', 'digital-ocean', 'firefox', 'chrome', 'edge',
15126
+ 'safari', 'opera', 'internet-explorer', 'app-store', 'app-store-ios',
15127
+ 'steam', 'playstation', 'xbox', 'unity', 'cc-discover', 'bitcoin', 'ethereum'
15128
+ ];
15129
+
15130
+ const FH_ICON_PICKER_VALUE_ACCESSOR = {
15131
+ provide: NG_VALUE_ACCESSOR,
15132
+ useExisting: forwardRef(() => FHIconPickerComponent),
15133
+ multi: true,
15134
+ };
15135
+ /**
15136
+ * FHIconPicker — selettore di icone FontAwesome (solo set FREE).
15137
+ *
15138
+ * Ispirato a https://github.com/tech-advantage/ngx-icon-picker ma:
15139
+ * - standalone, ControlValueAccessor (usabile con [(ngModel)])
15140
+ * - nessuna dipendenza npm aggiuntiva: rende le icone via classi CSS,
15141
+ * quindi richiede che l'app abbia caricato il CSS di FontAwesome 6.
15142
+ * - popup di selezione via CDK Overlay con ricerca, tab Tutte/Solid/Brands,
15143
+ * navigazione da tastiera (frecce / Invio / Esc) e icone recenti.
15144
+ *
15145
+ * VALORE EMESSO (ngModel / change): per default è il **nome testuale** dell'icona,
15146
+ * es. "fa-bookmark" (formato 'name'). Configurabile con [valueFormat]:
15147
+ * - 'name' -> "fa-bookmark" (default)
15148
+ * - 'plain' -> "bookmark"
15149
+ * - 'class' -> "fa-solid fa-bookmark" (classe CSS completa)
15150
+ *
15151
+ * In input accetta tutti i formati (nome, nome con prefisso, sintassi FA5
15152
+ * "fas fa-x"/"fa fa-x", classe completa) e li normalizza internamente.
15153
+ *
15154
+ * Esempio:
15155
+ * <FHIconPicker [(ngModel)]="obj.icona" [label]="'Icona'" [enabled]="canEdit"
15156
+ * (change)="onIconChange($event)"></FHIconPicker>
15157
+ */
15158
+ class FHIconPickerComponent {
15159
+ cdr;
15160
+ label = '';
15161
+ placeholder = 'Seleziona icona';
15162
+ enabled = true;
15163
+ hidden = false;
15164
+ required = false;
15165
+ error = '';
15166
+ /** Mostra il pulsante per azzerare la selezione. */
15167
+ allowClear = true;
15168
+ /** Tab attiva all'apertura: 'all' | 'solid' | 'brands'. */
15169
+ defaultStyle = 'all';
15170
+ /** Vista iniziale del popup: 'grid' | 'list'. */
15171
+ defaultView = 'grid';
15172
+ /** Formato del valore emesso: 'name' (fa-bookmark) | 'plain' (bookmark) | 'class'. */
15173
+ valueFormat = 'name';
15174
+ /** Quante icone recenti memorizzare (0 = disattiva). */
15175
+ recentCount = 12;
15176
+ /** Emette il nome dell'icona nel formato configurato (valueFormat). */
15177
+ change = new EventEmitter();
15178
+ /** Banana-in-a-box: supporto a [(icon)] oltre a [(ngModel)]. */
15179
+ iconChange = new EventEmitter();
15180
+ searchBox;
15181
+ triggerRef;
15182
+ gridRef;
15183
+ cells;
15184
+ static RECENT_KEY = 'fh_icon_picker_recent';
15185
+ /** Classe CSS completa dell'icona selezionata (uso interno per il rendering). */
15186
+ _value = '';
15187
+ /** Valore "di output" (nel formato configurato) mostrato nel trigger. */
15188
+ outValue = '';
15189
+ panelOpen = false;
15190
+ panelWidth = 380;
15191
+ search = '';
15192
+ activeStyle = 'all';
15193
+ view = 'grid';
15194
+ highlightIndex = -1;
15195
+ allSolid = [];
15196
+ allBrands = [];
15197
+ allIcons = [];
15198
+ styleByName = new Map();
15199
+ filtered = [];
15200
+ recent = [];
15201
+ overlayPositions = [
15202
+ { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top', offsetY: 6 },
15203
+ { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom', offsetY: -6 },
15204
+ ];
15205
+ constructor(cdr) {
15206
+ this.cdr = cdr;
15207
+ }
15208
+ ngOnInit() {
15209
+ this.allSolid = FA_SOLID_ICONS.map(n => ({ name: n, cls: `fa-solid fa-${n}`, style: 'solid' }));
15210
+ this.allBrands = FA_BRAND_ICONS.map(n => ({ name: n, cls: `fa-brands fa-${n}`, style: 'brands' }));
15211
+ this.allIcons = [...this.allSolid, ...this.allBrands];
15212
+ // mappa nome -> stile (brands prevale sui nomi propri dei loghi)
15213
+ this.allSolid.forEach(i => this.styleByName.set(i.name, 'solid'));
15214
+ this.allBrands.forEach(i => this.styleByName.set(i.name, 'brands'));
15215
+ this.activeStyle = this.defaultStyle;
15216
+ this.view = this.defaultView;
15217
+ this.loadRecent();
15218
+ this.applyFilter();
15219
+ }
15220
+ get currentSet() {
15221
+ if (this.activeStyle === 'brands')
15222
+ return this.allBrands;
15223
+ if (this.activeStyle === 'solid')
15224
+ return this.allSolid;
15225
+ return this.allIcons;
15226
+ }
15227
+ // ---- apertura / chiusura popup ----
15228
+ togglePanel() {
15229
+ if (!this.enabled)
15230
+ return;
15231
+ this.panelOpen ? this.closePanel() : this.openPanel();
15232
+ }
15233
+ openPanel() {
15234
+ if (this._value?.includes('fa-brands'))
15235
+ this.activeStyle = 'brands';
15236
+ else if (this._value?.includes('fa-solid') && this.activeStyle === 'brands')
15237
+ this.activeStyle = 'all';
15238
+ this.panelWidth = Math.max(340, this.triggerRef?.nativeElement?.offsetWidth || 380);
15239
+ this.search = '';
15240
+ this.applyFilter();
15241
+ this.highlightIndex = this.filtered.findIndex(i => i.cls === this._value);
15242
+ this.panelOpen = true;
15243
+ this.cdr.detectChanges();
15244
+ setTimeout(() => {
15245
+ this.searchBox?.nativeElement?.focus();
15246
+ this.scrollHighlightIntoView();
15247
+ }, 50);
15248
+ }
15249
+ closePanel() {
15250
+ if (!this.panelOpen)
15251
+ return;
15252
+ this.panelOpen = false;
15253
+ this.onTouched();
15254
+ this.cdr.detectChanges();
15255
+ }
15256
+ setStyle(style) {
15257
+ this.activeStyle = style;
15258
+ this.applyFilter();
15259
+ this.highlightIndex = this.filtered.length ? 0 : -1;
15260
+ }
15261
+ setView(v) {
15262
+ this.view = v;
15263
+ this.cdr.detectChanges();
15264
+ setTimeout(() => this.scrollHighlightIntoView(), 0);
15265
+ }
15266
+ applyFilter() {
15267
+ const q = (this.search || '').trim().toLowerCase();
15268
+ const base = this.currentSet;
15269
+ this.filtered = !q ? base : base.filter(i => i.name.indexOf(q) !== -1);
15270
+ if (this.highlightIndex >= this.filtered.length)
15271
+ this.highlightIndex = this.filtered.length - 1;
15272
+ }
15273
+ selectIcon(cls) {
15274
+ this.setVal(cls);
15275
+ this.pushRecent(cls);
15276
+ this.closePanel();
15277
+ }
15278
+ clear(ev) {
15279
+ ev?.stopPropagation();
15280
+ this.setVal('');
15281
+ }
15282
+ setVal(cls) {
15283
+ this._value = cls;
15284
+ this.outValue = this.toOutput(cls);
15285
+ this.onChange(this.outValue);
15286
+ this.change.emit(this.outValue);
15287
+ this.iconChange.emit(this.outValue);
15288
+ }
15289
+ /** Nome di output per una classe completa (usato per i tooltip dei recenti). */
15290
+ outOf(cls) { return this.toOutput(cls); }
15291
+ trackByIcon(_, item) { return item.cls; }
15292
+ // ---- navigazione da tastiera ----
15293
+ onPanelKeydown(ev) {
15294
+ const step = this.view === 'list' ? 1 : this.computeColumns();
15295
+ let idx = this.highlightIndex;
15296
+ switch (ev.key) {
15297
+ case 'Escape':
15298
+ ev.preventDefault();
15299
+ this.closePanel();
15300
+ return;
15301
+ case 'ArrowRight':
15302
+ idx = Math.min(this.filtered.length - 1, idx + 1);
15303
+ break;
15304
+ case 'ArrowLeft':
15305
+ idx = Math.max(0, idx - 1);
15306
+ break;
15307
+ case 'ArrowDown':
15308
+ idx = Math.min(this.filtered.length - 1, idx + step);
15309
+ break;
15310
+ case 'ArrowUp':
15311
+ idx = idx - step;
15312
+ if (idx < 0)
15313
+ idx = this.highlightIndex;
15314
+ break;
15315
+ case 'Enter':
15316
+ if (this.highlightIndex >= 0 && this.filtered[this.highlightIndex]) {
15317
+ ev.preventDefault();
15318
+ this.selectIcon(this.filtered[this.highlightIndex].cls);
15319
+ }
15320
+ return;
15321
+ default: return;
15322
+ }
15323
+ ev.preventDefault();
15324
+ if (idx < 0)
15325
+ idx = 0;
15326
+ this.highlightIndex = idx;
15327
+ this.scrollHighlightIntoView();
15328
+ }
15329
+ computeColumns() {
15330
+ const grid = this.gridRef?.nativeElement;
15331
+ if (!grid)
15332
+ return 4;
15333
+ const w = grid.clientWidth - 20;
15334
+ return Math.max(1, Math.floor(w / 88));
15335
+ }
15336
+ scrollHighlightIntoView() {
15337
+ setTimeout(() => {
15338
+ const arr = this.cells?.toArray();
15339
+ if (arr && arr[this.highlightIndex]) {
15340
+ arr[this.highlightIndex].nativeElement.scrollIntoView({ block: 'nearest' });
15341
+ }
15342
+ }, 0);
15343
+ }
15344
+ // ---- recenti ----
15345
+ loadRecent() {
15346
+ if (this.recentCount <= 0) {
15347
+ this.recent = [];
15348
+ return;
15349
+ }
15350
+ try {
15351
+ const raw = localStorage.getItem(FHIconPickerComponent.RECENT_KEY);
15352
+ this.recent = raw ? JSON.parse(raw).slice(0, this.recentCount) : [];
15353
+ }
15354
+ catch {
15355
+ this.recent = [];
15356
+ }
15357
+ }
15358
+ pushRecent(cls) {
15359
+ if (this.recentCount <= 0 || !cls)
15360
+ return;
15361
+ this.recent = [cls, ...this.recent.filter(r => r !== cls)].slice(0, this.recentCount);
15362
+ try {
15363
+ localStorage.setItem(FHIconPickerComponent.RECENT_KEY, JSON.stringify(this.recent));
15364
+ }
15365
+ catch { /* ignore */ }
15366
+ }
15367
+ // ---- API pubblica ----
15368
+ /** Ritorna il valore nel formato configurato (es. "fa-bookmark"). */
15369
+ getValue() { return this.outValue; }
15370
+ /** Ritorna SEMPRE la classe CSS completa (es. "fa-solid fa-bookmark"). */
15371
+ getCssClass() { return this._value; }
15372
+ /** Imposta l'icona da qualsiasi formato (nome, fa-name, fas fa-name, classe completa). */
15373
+ setValue(value) {
15374
+ this._value = this.toFullClass(value);
15375
+ this.outValue = this.toOutput(this._value);
15376
+ this.cdr.detectChanges();
15377
+ }
15378
+ /** Azzera la selezione. */
15379
+ reset() { this._value = ''; this.outValue = ''; this.cdr.detectChanges(); }
15380
+ // ---- ControlValueAccessor ----
15381
+ writeValue(value) {
15382
+ this._value = this.toFullClass(value);
15383
+ this.outValue = this.toOutput(this._value);
15384
+ this.cdr.detectChanges();
15385
+ }
15386
+ /**
15387
+ * Estrae nome + stile da una stringa in qualsiasi formato:
15388
+ * "fa-solid fa-house", "fas fa-house", "fa fa-house", "fa-house", "house".
15389
+ */
15390
+ parse(value) {
15391
+ let name = '';
15392
+ let style = null;
15393
+ if (value && typeof value === 'string') {
15394
+ const tokens = value.trim().toLowerCase().split(/\s+/).filter(Boolean);
15395
+ for (const t of tokens) {
15396
+ if (t === 'fas')
15397
+ style = 'solid';
15398
+ else if (t === 'fab')
15399
+ style = 'brands';
15400
+ else if (t === 'far')
15401
+ style = 'regular';
15402
+ else if (t === 'fal')
15403
+ style = 'light';
15404
+ else if (t === 'fa') { /* generico FA4/5 */ }
15405
+ else if (/^fa-(solid|regular|brands|light|thin|duotone)$/.test(t))
15406
+ style = t.slice(3);
15407
+ else if (t.indexOf('fa-') === 0)
15408
+ name = t.slice(3);
15409
+ else if (/^[a-z0-9-]+$/.test(t))
15410
+ name = t;
15411
+ }
15412
+ }
15413
+ if (!style)
15414
+ style = this.styleByName.get(name) || 'solid';
15415
+ return { name, style };
15416
+ }
15417
+ /** Normalizza un valore in classe CSS completa per il rendering. */
15418
+ toFullClass(value) {
15419
+ const { name, style } = this.parse(value);
15420
+ return name ? `fa-${style} fa-${name}` : '';
15421
+ }
15422
+ /** Converte una classe completa nel formato di output configurato. */
15423
+ toOutput(fullClass) {
15424
+ if (!fullClass)
15425
+ return '';
15426
+ if (this.valueFormat === 'class')
15427
+ return fullClass;
15428
+ const { name } = this.parse(fullClass);
15429
+ if (!name)
15430
+ return '';
15431
+ return this.valueFormat === 'plain' ? name : `fa-${name}`;
15432
+ }
15433
+ onChange = (_) => { };
15434
+ onTouched = () => { };
15435
+ registerOnChange(fn) { this.onChange = fn; }
15436
+ registerOnTouched(fn) { this.onTouched = fn; }
15437
+ setDisabledState(isDisabled) { this.enabled = !isDisabled; }
15438
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHIconPickerComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
15439
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: FHIconPickerComponent, isStandalone: true, selector: "FHIconPicker", inputs: { label: "label", placeholder: "placeholder", enabled: "enabled", hidden: "hidden", required: "required", error: "error", allowClear: "allowClear", defaultStyle: "defaultStyle", defaultView: "defaultView", valueFormat: "valueFormat", recentCount: "recentCount" }, outputs: { change: "change", iconChange: "iconChange" }, providers: [FH_ICON_PICKER_VALUE_ACCESSOR], viewQueries: [{ propertyName: "searchBox", first: true, predicate: ["searchBox"], descendants: true }, { propertyName: "triggerRef", first: true, predicate: ["trigger"], descendants: true, read: ElementRef }, { propertyName: "gridRef", first: true, predicate: ["grid"], descendants: true }, { propertyName: "cells", predicate: ["cell"], descendants: true }], ngImport: i0, template: `
15440
+ <div class="fh-icon-picker" *ngIf="!hidden">
15441
+ <label *ngIf="label" class="fh-ip-label">
15442
+ {{ label | translate }}<span *ngIf="required" class="fh-ip-req"> *</span>
15443
+ </label>
15444
+
15445
+ <div class="fh-ip-trigger-row">
15446
+ <button type="button" class="fh-ip-trigger"
15447
+ [class.disabled]="!enabled"
15448
+ [class.error]="!!error"
15449
+ [class.open]="panelOpen"
15450
+ [disabled]="!enabled"
15451
+ #trigger
15452
+ (click)="togglePanel()">
15453
+ <span class="fh-ip-preview" [class.empty]="!_value">
15454
+ <i *ngIf="_value" [class]="_value"></i>
15455
+ <i *ngIf="!_value" class="fa-regular fa-image fh-ip-placeholder-icon"></i>
15456
+ </span>
15457
+ <span class="fh-ip-text" [class.muted]="!_value">
15458
+ {{ _value ? outValue : (placeholder | translate) }}
15459
+ </span>
15460
+ <i class="fa-solid fa-caret-down fh-ip-caret"></i>
15461
+ </button>
15462
+
15463
+ <button type="button" class="fh-ip-clear" *ngIf="_value && enabled && allowClear"
15464
+ [title]="'ANNULLA' | translate"
15465
+ (click)="clear($event)">
15466
+ <i class="fa-solid fa-xmark"></i>
15467
+ </button>
15468
+ </div>
15469
+
15470
+ <div class="fh-ip-error" *ngIf="error">{{ error | translate }}</div>
15471
+
15472
+ <!-- Popup di selezione (dentro lo stesso scope di #trigger) -->
15473
+ <ng-template
15474
+ cdkConnectedOverlay
15475
+ [cdkConnectedOverlayOrigin]="trigger"
15476
+ [cdkConnectedOverlayOpen]="panelOpen"
15477
+ [cdkConnectedOverlayHasBackdrop]="true"
15478
+ cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop"
15479
+ [cdkConnectedOverlayPositions]="overlayPositions"
15480
+ (backdropClick)="closePanel()"
15481
+ (detach)="closePanel()">
15482
+
15483
+ <div class="fh-ip-panel" [style.width.px]="panelWidth" (keydown)="onPanelKeydown($event)">
15484
+ <div class="fh-ip-toolbar">
15485
+ <div class="fh-ip-search">
15486
+ <i class="fa-solid fa-magnifying-glass"></i>
15487
+ <input #searchBox type="text" [(ngModel)]="search"
15488
+ (ngModelChange)="applyFilter()"
15489
+ [placeholder]="('CERCA' | translate) + '...'">
15490
+ <i class="fa-solid fa-xmark fh-ip-search-clear" *ngIf="search"
15491
+ (click)="search=''; applyFilter()"></i>
15492
+ </div>
15493
+ <div class="fh-ip-tabs">
15494
+ <button type="button" [class.active]="activeStyle==='all'"
15495
+ (click)="setStyle('all')">{{ 'Tutte' }}</button>
15496
+ <button type="button" [class.active]="activeStyle==='solid'"
15497
+ (click)="setStyle('solid')">{{ 'Solid' }}</button>
15498
+ <button type="button" [class.active]="activeStyle==='brands'"
15499
+ (click)="setStyle('brands')">{{ 'Brands' }}</button>
15500
+ </div>
15501
+ <div class="fh-ip-view">
15502
+ <button type="button" [class.active]="view==='grid'" [title]="'Griglia'"
15503
+ (click)="setView('grid')"><i class="fa-solid fa-table-cells-large"></i></button>
15504
+ <button type="button" [class.active]="view==='list'" [title]="'Elenco'"
15505
+ (click)="setView('list')"><i class="fa-solid fa-list"></i></button>
15506
+ </div>
15507
+ </div>
15508
+
15509
+ <!-- Recenti -->
15510
+ <div class="fh-ip-recent" *ngIf="!search && recent.length">
15511
+ <span class="fh-ip-section-lbl">{{ 'Recenti' }}</span>
15512
+ <div class="fh-ip-recent-row">
15513
+ <button type="button" class="fh-ip-recent-cell"
15514
+ *ngFor="let r of recent"
15515
+ [class.selected]="r === _value"
15516
+ [title]="outOf(r)"
15517
+ (click)="selectIcon(r)">
15518
+ <i [class]="r"></i>
15519
+ </button>
15520
+ </div>
15521
+ </div>
15522
+
15523
+ <!-- GRIGLIA -->
15524
+ <div class="fh-ip-grid" #grid *ngIf="view==='grid'">
15525
+ <button type="button" class="fh-ip-cell" #cell
15526
+ *ngFor="let ic of filtered; let i = index; trackBy: trackByIcon"
15527
+ [class.selected]="ic.cls === _value"
15528
+ [class.highlight]="i === highlightIndex"
15529
+ [title]="'fa-' + ic.name"
15530
+ (mouseenter)="highlightIndex = i"
15531
+ (click)="selectIcon(ic.cls)">
15532
+ <i [class]="ic.cls"></i>
15533
+ <span class="fh-ip-cell-name">fa-{{ ic.name }}</span>
15534
+ </button>
15535
+
15536
+ <div class="fh-ip-empty" *ngIf="filtered.length === 0">
15537
+ <i class="fa-regular fa-face-frown"></i>
15538
+ <span>{{ 'Nessuna icona trovata' }}</span>
15539
+ </div>
15540
+ </div>
15541
+
15542
+ <!-- ELENCO -->
15543
+ <div class="fh-ip-list" #grid *ngIf="view==='list'">
15544
+ <button type="button" class="fh-ip-row" #cell
15545
+ *ngFor="let ic of filtered; let i = index; trackBy: trackByIcon"
15546
+ [class.selected]="ic.cls === _value"
15547
+ [class.highlight]="i === highlightIndex"
15548
+ (mouseenter)="highlightIndex = i"
15549
+ (click)="selectIcon(ic.cls)">
15550
+ <span class="fh-ip-row-ico"><i [class]="ic.cls"></i></span>
15551
+ <span class="fh-ip-row-name">fa-{{ ic.name }}</span>
15552
+ <i class="fa-solid fa-check fh-ip-row-check" *ngIf="ic.cls === _value"></i>
15553
+ </button>
15554
+
15555
+ <div class="fh-ip-empty" *ngIf="filtered.length === 0">
15556
+ <i class="fa-regular fa-face-frown"></i>
15557
+ <span>{{ 'Nessuna icona trovata' }}</span>
15558
+ </div>
15559
+ </div>
15560
+
15561
+ <div class="fh-ip-footer">
15562
+ <span class="fh-ip-count">{{ filtered.length }} {{ 'icone' }}</span>
15563
+ <span class="fh-ip-hint"><kbd>↑↓←→</kbd> {{ 'naviga' }} · <kbd>↵</kbd> {{ 'scegli' }} · <kbd>esc</kbd> {{ 'chiudi' }}</span>
15564
+ </div>
15565
+ </div>
15566
+ </ng-template>
15567
+ </div>
15568
+ `, isInline: true, styles: [":host{display:block}.fh-icon-picker{display:flex;flex-direction:column;gap:4px}.fh-ip-label{font-size:12px;font-weight:600;color:#5b6168}.fh-ip-req{color:#d32f2f}.fh-ip-trigger-row{display:flex;align-items:stretch;gap:6px}.fh-ip-trigger{flex:1 1 auto;display:flex;align-items:center;gap:10px;min-height:40px;padding:6px 12px;cursor:pointer;background:#fff;border:1.5px solid #d7dbe0;border-radius:8px;text-align:left;transition:border-color .15s ease,box-shadow .15s ease;font-size:14px;color:#161212;overflow:hidden}.fh-ip-trigger:hover:not(.disabled){border-color:#9aa1a9}.fh-ip-trigger.open,.fh-ip-trigger:focus-visible{outline:none;border-color:#2196f3;box-shadow:0 0 0 3px #2196f326}.fh-ip-trigger.open .fh-ip-caret{transform:rotate(180deg)}.fh-ip-trigger.disabled{background:#f4f5f6;color:#9aa1a9;cursor:not-allowed;opacity:.8}.fh-ip-trigger.error{border-color:#d32f2f}.fh-ip-preview{flex:0 0 auto;width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:6px;background:#eef2f6;font-size:16px;color:#2196f3}.fh-ip-preview.empty{color:#b6bcc3;background:#f4f5f6}.fh-ip-placeholder-icon{font-size:14px}.fh-ip-text{flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:monospace;font-size:13px}.fh-ip-text.muted{color:#9aa1a9;font-family:inherit;font-style:italic}.fh-ip-caret{flex:0 0 auto;color:#9aa1a9;font-size:12px;transition:transform .2s ease}.fh-ip-clear{flex:0 0 auto;width:40px;border:1.5px solid #d7dbe0;border-radius:8px;background:#fff;cursor:pointer;color:#6b7178;transition:all .15s ease}.fh-ip-clear:hover{border-color:#d32f2f;color:#d32f2f;background:#fff5f5}.fh-ip-error{font-size:12px;color:#d32f2f}.fh-ip-panel{background:#fff;border:1px solid #e0e3e7;border-radius:12px;box-shadow:0 12px 32px #0000002e;overflow:hidden;display:flex;flex-direction:column;max-height:460px}.fh-ip-toolbar{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #eef0f2;flex:0 0 auto;flex-wrap:wrap}.fh-ip-search{flex:1 1 150px;display:flex;align-items:center;gap:8px;background:#f4f5f6;border-radius:8px;padding:6px 10px;color:#6b7178}.fh-ip-search input{flex:1 1 auto;border:none;background:transparent;outline:none;font-size:14px;color:#161212;min-width:0}.fh-ip-search-clear{cursor:pointer}.fh-ip-search-clear:hover{color:#d32f2f}.fh-ip-tabs{display:flex;gap:4px;flex:0 0 auto}.fh-ip-tabs button{border:1px solid #d7dbe0;background:#fff;color:#5b6168;padding:6px 11px;border-radius:8px;cursor:pointer;font-size:12px;font-weight:600;transition:all .15s ease}.fh-ip-tabs button:hover{border-color:#9aa1a9}.fh-ip-tabs button.active{background:#2196f3;border-color:#2196f3;color:#fff}.fh-ip-view{display:flex;gap:2px;flex:0 0 auto}.fh-ip-view button{width:32px;height:32px;border:1px solid #d7dbe0;background:#fff;color:#8a9098;cursor:pointer;border-radius:8px;transition:all .15s ease}.fh-ip-view button:hover{border-color:#9aa1a9;color:#5b6168}.fh-ip-view button.active{background:#eef6fe;border-color:#2196f3;color:#2196f3}.fh-ip-recent{padding:8px 12px 4px;border-bottom:1px dashed #eef0f2;flex:0 0 auto}.fh-ip-section-lbl{font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#9aa1a9}.fh-ip-recent-row{display:flex;gap:4px;margin-top:6px;flex-wrap:wrap}.fh-ip-recent-cell{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:8px;background:#f4f5f6;cursor:pointer;color:#3a3f45;font-size:16px;transition:all .12s ease;line-height:1;box-sizing:border-box}.fh-ip-recent-cell i{line-height:1}.fh-ip-recent-cell:hover{background:#eef6fe;border-color:#bfe0fb}.fh-ip-recent-cell.selected{background:#e3f2fd;border-color:#2196f3;color:#1565c0}.fh-ip-grid{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:10px;display:grid;grid-template-columns:repeat(auto-fill,minmax(82px,1fr));gap:6px;align-content:start;scroll-behavior:smooth}.fh-ip-cell{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 4px 8px;border:1px solid transparent;border-radius:8px;background:transparent;cursor:pointer;transition:all .12s ease;color:#3a3f45;overflow:hidden;min-height:66px;line-height:normal;box-sizing:border-box}.fh-ip-cell i{font-size:22px;line-height:1;height:28px;width:100%;display:flex;align-items:center;justify-content:center;flex:0 0 auto}.fh-ip-cell:hover,.fh-ip-cell.highlight{background:#eef6fe;border-color:#bfe0fb}.fh-ip-cell.selected{background:#e3f2fd;border-color:#2196f3;color:#1565c0}.fh-ip-cell.highlight{box-shadow:0 0 0 2px #2196f340}.fh-ip-cell-name{font-size:10px;color:#8a9098;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fh-ip-cell.selected .fh-ip-cell-name{color:#1976d2}.fh-ip-list{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:6px;display:flex;flex-direction:column;scroll-behavior:smooth}.fh-ip-row{display:flex;align-items:center;gap:12px;width:100%;padding:8px 12px;border:1px solid transparent;border-radius:8px;background:transparent;cursor:pointer;transition:all .1s ease;color:#3a3f45;text-align:left}.fh-ip-row-ico{flex:0 0 auto;width:26px;height:24px;font-size:18px;color:#5b6168;display:flex;align-items:center;justify-content:center;line-height:1}.fh-ip-row-name{flex:1 1 auto;font-family:monospace;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fh-ip-row-check{flex:0 0 auto;color:#2196f3}.fh-ip-row:hover,.fh-ip-row.highlight{background:#eef6fe}.fh-ip-row.selected{background:#e3f2fd;color:#1565c0}.fh-ip-row.selected .fh-ip-row-ico{color:#1565c0}.fh-ip-empty{grid-column:1 / -1;display:flex;flex-direction:column;align-items:center;gap:10px;padding:36px 0;color:#9aa1a9}.fh-ip-empty i{font-size:30px}.fh-ip-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-top:1px solid #eef0f2;font-size:11px;color:#9aa1a9;flex:0 0 auto}.fh-ip-count{font-weight:600}.fh-ip-hint{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fh-ip-hint kbd{background:#f0f1f3;border:1px solid #dcdfe3;border-radius:4px;padding:0 4px;font-family:monospace;font-size:10px;color:#6b7178}\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: "ngmodule", type: FormsModule }, { kind: "directive", type: i5$1.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$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: OverlayModule }, { kind: "directive", type: i3$4.CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }] });
15569
+ }
15570
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: FHIconPickerComponent, decorators: [{
15571
+ type: Component,
15572
+ args: [{ standalone: true, imports: [CommonModule, FormsModule, OverlayModule, TranslateModule], selector: "FHIconPicker", providers: [FH_ICON_PICKER_VALUE_ACCESSOR], template: `
15573
+ <div class="fh-icon-picker" *ngIf="!hidden">
15574
+ <label *ngIf="label" class="fh-ip-label">
15575
+ {{ label | translate }}<span *ngIf="required" class="fh-ip-req"> *</span>
15576
+ </label>
15577
+
15578
+ <div class="fh-ip-trigger-row">
15579
+ <button type="button" class="fh-ip-trigger"
15580
+ [class.disabled]="!enabled"
15581
+ [class.error]="!!error"
15582
+ [class.open]="panelOpen"
15583
+ [disabled]="!enabled"
15584
+ #trigger
15585
+ (click)="togglePanel()">
15586
+ <span class="fh-ip-preview" [class.empty]="!_value">
15587
+ <i *ngIf="_value" [class]="_value"></i>
15588
+ <i *ngIf="!_value" class="fa-regular fa-image fh-ip-placeholder-icon"></i>
15589
+ </span>
15590
+ <span class="fh-ip-text" [class.muted]="!_value">
15591
+ {{ _value ? outValue : (placeholder | translate) }}
15592
+ </span>
15593
+ <i class="fa-solid fa-caret-down fh-ip-caret"></i>
15594
+ </button>
15595
+
15596
+ <button type="button" class="fh-ip-clear" *ngIf="_value && enabled && allowClear"
15597
+ [title]="'ANNULLA' | translate"
15598
+ (click)="clear($event)">
15599
+ <i class="fa-solid fa-xmark"></i>
15600
+ </button>
15601
+ </div>
15602
+
15603
+ <div class="fh-ip-error" *ngIf="error">{{ error | translate }}</div>
15604
+
15605
+ <!-- Popup di selezione (dentro lo stesso scope di #trigger) -->
15606
+ <ng-template
15607
+ cdkConnectedOverlay
15608
+ [cdkConnectedOverlayOrigin]="trigger"
15609
+ [cdkConnectedOverlayOpen]="panelOpen"
15610
+ [cdkConnectedOverlayHasBackdrop]="true"
15611
+ cdkConnectedOverlayBackdropClass="cdk-overlay-transparent-backdrop"
15612
+ [cdkConnectedOverlayPositions]="overlayPositions"
15613
+ (backdropClick)="closePanel()"
15614
+ (detach)="closePanel()">
15615
+
15616
+ <div class="fh-ip-panel" [style.width.px]="panelWidth" (keydown)="onPanelKeydown($event)">
15617
+ <div class="fh-ip-toolbar">
15618
+ <div class="fh-ip-search">
15619
+ <i class="fa-solid fa-magnifying-glass"></i>
15620
+ <input #searchBox type="text" [(ngModel)]="search"
15621
+ (ngModelChange)="applyFilter()"
15622
+ [placeholder]="('CERCA' | translate) + '...'">
15623
+ <i class="fa-solid fa-xmark fh-ip-search-clear" *ngIf="search"
15624
+ (click)="search=''; applyFilter()"></i>
15625
+ </div>
15626
+ <div class="fh-ip-tabs">
15627
+ <button type="button" [class.active]="activeStyle==='all'"
15628
+ (click)="setStyle('all')">{{ 'Tutte' }}</button>
15629
+ <button type="button" [class.active]="activeStyle==='solid'"
15630
+ (click)="setStyle('solid')">{{ 'Solid' }}</button>
15631
+ <button type="button" [class.active]="activeStyle==='brands'"
15632
+ (click)="setStyle('brands')">{{ 'Brands' }}</button>
15633
+ </div>
15634
+ <div class="fh-ip-view">
15635
+ <button type="button" [class.active]="view==='grid'" [title]="'Griglia'"
15636
+ (click)="setView('grid')"><i class="fa-solid fa-table-cells-large"></i></button>
15637
+ <button type="button" [class.active]="view==='list'" [title]="'Elenco'"
15638
+ (click)="setView('list')"><i class="fa-solid fa-list"></i></button>
15639
+ </div>
15640
+ </div>
15641
+
15642
+ <!-- Recenti -->
15643
+ <div class="fh-ip-recent" *ngIf="!search && recent.length">
15644
+ <span class="fh-ip-section-lbl">{{ 'Recenti' }}</span>
15645
+ <div class="fh-ip-recent-row">
15646
+ <button type="button" class="fh-ip-recent-cell"
15647
+ *ngFor="let r of recent"
15648
+ [class.selected]="r === _value"
15649
+ [title]="outOf(r)"
15650
+ (click)="selectIcon(r)">
15651
+ <i [class]="r"></i>
15652
+ </button>
15653
+ </div>
15654
+ </div>
15655
+
15656
+ <!-- GRIGLIA -->
15657
+ <div class="fh-ip-grid" #grid *ngIf="view==='grid'">
15658
+ <button type="button" class="fh-ip-cell" #cell
15659
+ *ngFor="let ic of filtered; let i = index; trackBy: trackByIcon"
15660
+ [class.selected]="ic.cls === _value"
15661
+ [class.highlight]="i === highlightIndex"
15662
+ [title]="'fa-' + ic.name"
15663
+ (mouseenter)="highlightIndex = i"
15664
+ (click)="selectIcon(ic.cls)">
15665
+ <i [class]="ic.cls"></i>
15666
+ <span class="fh-ip-cell-name">fa-{{ ic.name }}</span>
15667
+ </button>
15668
+
15669
+ <div class="fh-ip-empty" *ngIf="filtered.length === 0">
15670
+ <i class="fa-regular fa-face-frown"></i>
15671
+ <span>{{ 'Nessuna icona trovata' }}</span>
15672
+ </div>
15673
+ </div>
15674
+
15675
+ <!-- ELENCO -->
15676
+ <div class="fh-ip-list" #grid *ngIf="view==='list'">
15677
+ <button type="button" class="fh-ip-row" #cell
15678
+ *ngFor="let ic of filtered; let i = index; trackBy: trackByIcon"
15679
+ [class.selected]="ic.cls === _value"
15680
+ [class.highlight]="i === highlightIndex"
15681
+ (mouseenter)="highlightIndex = i"
15682
+ (click)="selectIcon(ic.cls)">
15683
+ <span class="fh-ip-row-ico"><i [class]="ic.cls"></i></span>
15684
+ <span class="fh-ip-row-name">fa-{{ ic.name }}</span>
15685
+ <i class="fa-solid fa-check fh-ip-row-check" *ngIf="ic.cls === _value"></i>
15686
+ </button>
15687
+
15688
+ <div class="fh-ip-empty" *ngIf="filtered.length === 0">
15689
+ <i class="fa-regular fa-face-frown"></i>
15690
+ <span>{{ 'Nessuna icona trovata' }}</span>
15691
+ </div>
15692
+ </div>
15693
+
15694
+ <div class="fh-ip-footer">
15695
+ <span class="fh-ip-count">{{ filtered.length }} {{ 'icone' }}</span>
15696
+ <span class="fh-ip-hint"><kbd>↑↓←→</kbd> {{ 'naviga' }} · <kbd>↵</kbd> {{ 'scegli' }} · <kbd>esc</kbd> {{ 'chiudi' }}</span>
15697
+ </div>
15698
+ </div>
15699
+ </ng-template>
15700
+ </div>
15701
+ `, styles: [":host{display:block}.fh-icon-picker{display:flex;flex-direction:column;gap:4px}.fh-ip-label{font-size:12px;font-weight:600;color:#5b6168}.fh-ip-req{color:#d32f2f}.fh-ip-trigger-row{display:flex;align-items:stretch;gap:6px}.fh-ip-trigger{flex:1 1 auto;display:flex;align-items:center;gap:10px;min-height:40px;padding:6px 12px;cursor:pointer;background:#fff;border:1.5px solid #d7dbe0;border-radius:8px;text-align:left;transition:border-color .15s ease,box-shadow .15s ease;font-size:14px;color:#161212;overflow:hidden}.fh-ip-trigger:hover:not(.disabled){border-color:#9aa1a9}.fh-ip-trigger.open,.fh-ip-trigger:focus-visible{outline:none;border-color:#2196f3;box-shadow:0 0 0 3px #2196f326}.fh-ip-trigger.open .fh-ip-caret{transform:rotate(180deg)}.fh-ip-trigger.disabled{background:#f4f5f6;color:#9aa1a9;cursor:not-allowed;opacity:.8}.fh-ip-trigger.error{border-color:#d32f2f}.fh-ip-preview{flex:0 0 auto;width:28px;height:28px;display:flex;align-items:center;justify-content:center;border-radius:6px;background:#eef2f6;font-size:16px;color:#2196f3}.fh-ip-preview.empty{color:#b6bcc3;background:#f4f5f6}.fh-ip-placeholder-icon{font-size:14px}.fh-ip-text{flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:monospace;font-size:13px}.fh-ip-text.muted{color:#9aa1a9;font-family:inherit;font-style:italic}.fh-ip-caret{flex:0 0 auto;color:#9aa1a9;font-size:12px;transition:transform .2s ease}.fh-ip-clear{flex:0 0 auto;width:40px;border:1.5px solid #d7dbe0;border-radius:8px;background:#fff;cursor:pointer;color:#6b7178;transition:all .15s ease}.fh-ip-clear:hover{border-color:#d32f2f;color:#d32f2f;background:#fff5f5}.fh-ip-error{font-size:12px;color:#d32f2f}.fh-ip-panel{background:#fff;border:1px solid #e0e3e7;border-radius:12px;box-shadow:0 12px 32px #0000002e;overflow:hidden;display:flex;flex-direction:column;max-height:460px}.fh-ip-toolbar{display:flex;align-items:center;gap:8px;padding:10px 12px;border-bottom:1px solid #eef0f2;flex:0 0 auto;flex-wrap:wrap}.fh-ip-search{flex:1 1 150px;display:flex;align-items:center;gap:8px;background:#f4f5f6;border-radius:8px;padding:6px 10px;color:#6b7178}.fh-ip-search input{flex:1 1 auto;border:none;background:transparent;outline:none;font-size:14px;color:#161212;min-width:0}.fh-ip-search-clear{cursor:pointer}.fh-ip-search-clear:hover{color:#d32f2f}.fh-ip-tabs{display:flex;gap:4px;flex:0 0 auto}.fh-ip-tabs button{border:1px solid #d7dbe0;background:#fff;color:#5b6168;padding:6px 11px;border-radius:8px;cursor:pointer;font-size:12px;font-weight:600;transition:all .15s ease}.fh-ip-tabs button:hover{border-color:#9aa1a9}.fh-ip-tabs button.active{background:#2196f3;border-color:#2196f3;color:#fff}.fh-ip-view{display:flex;gap:2px;flex:0 0 auto}.fh-ip-view button{width:32px;height:32px;border:1px solid #d7dbe0;background:#fff;color:#8a9098;cursor:pointer;border-radius:8px;transition:all .15s ease}.fh-ip-view button:hover{border-color:#9aa1a9;color:#5b6168}.fh-ip-view button.active{background:#eef6fe;border-color:#2196f3;color:#2196f3}.fh-ip-recent{padding:8px 12px 4px;border-bottom:1px dashed #eef0f2;flex:0 0 auto}.fh-ip-section-lbl{font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#9aa1a9}.fh-ip-recent-row{display:flex;gap:4px;margin-top:6px;flex-wrap:wrap}.fh-ip-recent-cell{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;border-radius:8px;background:#f4f5f6;cursor:pointer;color:#3a3f45;font-size:16px;transition:all .12s ease;line-height:1;box-sizing:border-box}.fh-ip-recent-cell i{line-height:1}.fh-ip-recent-cell:hover{background:#eef6fe;border-color:#bfe0fb}.fh-ip-recent-cell.selected{background:#e3f2fd;border-color:#2196f3;color:#1565c0}.fh-ip-grid{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:10px;display:grid;grid-template-columns:repeat(auto-fill,minmax(82px,1fr));gap:6px;align-content:start;scroll-behavior:smooth}.fh-ip-cell{display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 4px 8px;border:1px solid transparent;border-radius:8px;background:transparent;cursor:pointer;transition:all .12s ease;color:#3a3f45;overflow:hidden;min-height:66px;line-height:normal;box-sizing:border-box}.fh-ip-cell i{font-size:22px;line-height:1;height:28px;width:100%;display:flex;align-items:center;justify-content:center;flex:0 0 auto}.fh-ip-cell:hover,.fh-ip-cell.highlight{background:#eef6fe;border-color:#bfe0fb}.fh-ip-cell.selected{background:#e3f2fd;border-color:#2196f3;color:#1565c0}.fh-ip-cell.highlight{box-shadow:0 0 0 2px #2196f340}.fh-ip-cell-name{font-size:10px;color:#8a9098;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fh-ip-cell.selected .fh-ip-cell-name{color:#1976d2}.fh-ip-list{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;padding:6px;display:flex;flex-direction:column;scroll-behavior:smooth}.fh-ip-row{display:flex;align-items:center;gap:12px;width:100%;padding:8px 12px;border:1px solid transparent;border-radius:8px;background:transparent;cursor:pointer;transition:all .1s ease;color:#3a3f45;text-align:left}.fh-ip-row-ico{flex:0 0 auto;width:26px;height:24px;font-size:18px;color:#5b6168;display:flex;align-items:center;justify-content:center;line-height:1}.fh-ip-row-name{flex:1 1 auto;font-family:monospace;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fh-ip-row-check{flex:0 0 auto;color:#2196f3}.fh-ip-row:hover,.fh-ip-row.highlight{background:#eef6fe}.fh-ip-row.selected{background:#e3f2fd;color:#1565c0}.fh-ip-row.selected .fh-ip-row-ico{color:#1565c0}.fh-ip-empty{grid-column:1 / -1;display:flex;flex-direction:column;align-items:center;gap:10px;padding:36px 0;color:#9aa1a9}.fh-ip-empty i{font-size:30px}.fh-ip-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;border-top:1px solid #eef0f2;font-size:11px;color:#9aa1a9;flex:0 0 auto}.fh-ip-count{font-weight:600}.fh-ip-hint{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fh-ip-hint kbd{background:#f0f1f3;border:1px solid #dcdfe3;border-radius:4px;padding:0 4px;font-family:monospace;font-size:10px;color:#6b7178}\n"] }]
15702
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { label: [{
15703
+ type: Input
15704
+ }], placeholder: [{
15705
+ type: Input
15706
+ }], enabled: [{
15707
+ type: Input
15708
+ }], hidden: [{
15709
+ type: Input
15710
+ }], required: [{
15711
+ type: Input
15712
+ }], error: [{
15713
+ type: Input
15714
+ }], allowClear: [{
15715
+ type: Input
15716
+ }], defaultStyle: [{
15717
+ type: Input
15718
+ }], defaultView: [{
15719
+ type: Input
15720
+ }], valueFormat: [{
15721
+ type: Input
15722
+ }], recentCount: [{
15723
+ type: Input
15724
+ }], change: [{
15725
+ type: Output
15726
+ }], iconChange: [{
15727
+ type: Output
15728
+ }], searchBox: [{
15729
+ type: ViewChild,
15730
+ args: ['searchBox']
15731
+ }], triggerRef: [{
15732
+ type: ViewChild,
15733
+ args: ['trigger', { read: ElementRef }]
15734
+ }], gridRef: [{
15735
+ type: ViewChild,
15736
+ args: ['grid']
15737
+ }], cells: [{
15738
+ type: ViewChildren,
15739
+ args: ['cell']
15740
+ }] } });
15741
+
14995
15742
  class WkfService {
14996
15743
  http;
14997
15744
  app_s;
@@ -36314,5 +37061,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImpo
36314
37061
  * Generated bundle index. Do not edit.
36315
37062
  */
36316
37063
 
36317
- export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, BpmnEditorComponent, CheckboxEditorComponent, ComboBoxEditorComponent, CurrencyComponent, DialogBaseComponent, FHAiAssistantComponent, FHAiChatComponent, FHAiService, 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 };
37064
+ export { AppMakerService, AppService, ApprovaGridComponent, AuthHttpRequestInterceptor, AuthenticationService, BpmnEditorComponent, CheckboxEditorComponent, ComboBoxEditorComponent, CurrencyComponent, DialogBaseComponent, FHAiAssistantComponent, FHAiChatComponent, FHAiService, FHAutoCompleteComponent, FHCheckBoxComponent, FHColorPickerComponent, FHComboboxComponent, FHConfirmValues, FHCurrencyFormatterDirective, FHCurrencyPipe, FHDatePickerComponent, FHDateRangePickerComponent, FHFieldPickListComponent, FHFilterComboboxComponent, FHFormBuilderComponent, FHFormExecuterComponent, FHFormToolBarComponent, FHGridComponent, FHGridJSONComponent, FHGridToolBarComponent, FHGuard, FHHelpButtonComponent, FHHomeDocsComponent, FHHomeLauncherComponent, FHHomeStatsComponent, FHHomeTodoComponent, FHIconPickerComponent, 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 };
36318
37065
  //# sourceMappingURL=fluxhub-fluxhub-lib.mjs.map