@fluxhub/fluxhub-lib 19.0.183 → 19.0.185
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/fluxhub-fluxhub-lib.mjs +1574 -2
- package/fesm2022/fluxhub-fluxhub-lib.mjs.map +1 -1
- package/lib/ai-components/fh-ai-assistant/fh-ai-assistant.component.d.ts +48 -0
- package/lib/ai-components/fh-ai-chat/fh-ai-chat.component.d.ts +77 -0
- package/lib/ai-components/fh-ai.service.d.ts +47 -0
- package/lib/ai-components/models/fh-ai.models.d.ts +67 -0
- package/lib/controls/fh-icon-picker/fa-free-icons.d.ts +16 -0
- package/lib/controls/fh-icon-picker/fh-icon-picker.d.ts +138 -0
- package/package.json +1 -1
- package/public-api.d.ts +5 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { OnInit } from "@angular/core";
|
|
2
|
+
import { FHAiContext } from "../models/fh-ai.models";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Launcher AI flottante ("drop-anywhere") di FluxHub: un FAB in basso a destra che
|
|
6
|
+
* apre/chiude un pannello con dentro <FHAiChat>. Si inserisce in qualunque pagina
|
|
7
|
+
* del portale per dare accesso all'assistente senza occupare layout.
|
|
8
|
+
*
|
|
9
|
+
* Inoltra al chat gli @Input principali (endpoint, contesto, tema, testi).
|
|
10
|
+
*
|
|
11
|
+
* Esempio:
|
|
12
|
+
* <FHAiAssistant [context]="{azienda:'COEM', ruolo:'manager'}"
|
|
13
|
+
* [accent]="'#16afc7'"
|
|
14
|
+
* welcomeTitle="Assistente COEM"></FHAiAssistant>
|
|
15
|
+
*/
|
|
16
|
+
export declare class FHAiAssistantComponent implements OnInit {
|
|
17
|
+
accent: string;
|
|
18
|
+
accentDark: string;
|
|
19
|
+
get _a(): string;
|
|
20
|
+
get _ad(): string;
|
|
21
|
+
icon: string;
|
|
22
|
+
openLabel: string;
|
|
23
|
+
showLabel: boolean;
|
|
24
|
+
/** 'floating' = popover ancorato al FAB; 'right' = drawer a tutta altezza. */
|
|
25
|
+
dock: "floating" | "right";
|
|
26
|
+
/** Apre il pannello all'avvio. */
|
|
27
|
+
startOpen: boolean;
|
|
28
|
+
title: string;
|
|
29
|
+
subtitle: string;
|
|
30
|
+
tagLabel: string;
|
|
31
|
+
welcomeTitle: string;
|
|
32
|
+
welcomeSubtitle: string;
|
|
33
|
+
suggestions: string[];
|
|
34
|
+
placeholder: string;
|
|
35
|
+
endpoint: string;
|
|
36
|
+
path: string;
|
|
37
|
+
model: string;
|
|
38
|
+
stream: boolean;
|
|
39
|
+
apiKey: string;
|
|
40
|
+
forwardAuth: boolean;
|
|
41
|
+
context: FHAiContext | null;
|
|
42
|
+
systemPrompt: string;
|
|
43
|
+
open: boolean;
|
|
44
|
+
ngOnInit(): void;
|
|
45
|
+
toggle(): void;
|
|
46
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FHAiAssistantComponent, never>;
|
|
47
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FHAiAssistantComponent, "FHAiAssistant", never, { "accent": { "alias": "accent"; "required": false; }; "accentDark": { "alias": "accentDark"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "openLabel": { "alias": "openLabel"; "required": false; }; "showLabel": { "alias": "showLabel"; "required": false; }; "dock": { "alias": "dock"; "required": false; }; "startOpen": { "alias": "startOpen"; "required": false; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "tagLabel": { "alias": "tagLabel"; "required": false; }; "welcomeTitle": { "alias": "welcomeTitle"; "required": false; }; "welcomeSubtitle": { "alias": "welcomeSubtitle"; "required": false; }; "suggestions": { "alias": "suggestions"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "endpoint": { "alias": "endpoint"; "required": false; }; "path": { "alias": "path"; "required": false; }; "model": { "alias": "model"; "required": false; }; "stream": { "alias": "stream"; "required": false; }; "apiKey": { "alias": "apiKey"; "required": false; }; "forwardAuth": { "alias": "forwardAuth"; "required": false; }; "context": { "alias": "context"; "required": false; }; "systemPrompt": { "alias": "systemPrompt"; "required": false; }; }, {}, never, never, true, never>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, OnDestroy } from "@angular/core";
|
|
2
|
+
import { DomSanitizer, SafeHtml } from "@angular/platform-browser";
|
|
3
|
+
import { FHAiService } from "../fh-ai.service";
|
|
4
|
+
import { FHAiContext, FHAiMessage } from "../models/fh-ai.models";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* Pannello chat AI riusabile di FluxHub.
|
|
8
|
+
*
|
|
9
|
+
* Conversazione con un backend OpenAI-compatible (proxy Prologika -> Cheshire Cat ->
|
|
10
|
+
* Gemma) via FHAiService. Renderizza testo markdown, citazioni RAG, ha schermata di
|
|
11
|
+
* benvenuto con suggerimenti e supporta streaming token-by-token.
|
|
12
|
+
*
|
|
13
|
+
* Tutto configurabile via @Input (endpoint, contesto azienda/ruolo, testi, tema) per
|
|
14
|
+
* riuso cross-cliente, in linea con gli altri componenti standard della libreria.
|
|
15
|
+
*
|
|
16
|
+
* Esempio:
|
|
17
|
+
* <FHAiChat [context]="{azienda:'Bormioli', ruolo:'sales'}"
|
|
18
|
+
* [accent]="'#16afc7'"
|
|
19
|
+
* welcomeTitle="Assistente Bormioli"></FHAiChat>
|
|
20
|
+
*/
|
|
21
|
+
export declare class FHAiChatComponent implements OnDestroy {
|
|
22
|
+
private ai;
|
|
23
|
+
private sanitizer;
|
|
24
|
+
accent: string;
|
|
25
|
+
accentDark: string;
|
|
26
|
+
get _a(): string;
|
|
27
|
+
get _ad(): string;
|
|
28
|
+
showHeader: boolean;
|
|
29
|
+
title: string;
|
|
30
|
+
subtitle: string;
|
|
31
|
+
tagLabel: string;
|
|
32
|
+
welcomeTitle: string;
|
|
33
|
+
welcomeSubtitle: string;
|
|
34
|
+
suggestions: string[];
|
|
35
|
+
placeholder: string;
|
|
36
|
+
showHint: boolean;
|
|
37
|
+
/** URL completo dell'endpoint AI. Se vuoto: AppService.API_ENDPOINT + path. */
|
|
38
|
+
endpoint: string;
|
|
39
|
+
/** Path relativo all'API_ENDPOINT (default route AI sul backend FluxHub). */
|
|
40
|
+
path: string;
|
|
41
|
+
/** Modello da richiedere (di norma deciso lato server). */
|
|
42
|
+
model: string;
|
|
43
|
+
/** Abilita lo streaming token-by-token (SSE). */
|
|
44
|
+
stream: boolean;
|
|
45
|
+
/** API key del servizio AI (di norma NON serve lato browser). */
|
|
46
|
+
apiKey: string;
|
|
47
|
+
/** Inoltra il JWT FluxHub come Authorization Bearer. */
|
|
48
|
+
forwardAuth: boolean;
|
|
49
|
+
/** Contesto di scoping {azienda, ruolo, persona} (informativo + metadata). */
|
|
50
|
+
context: FHAiContext | null;
|
|
51
|
+
/** Messaggio di sistema iniziale opzionale (di norma lo costruisce il backend). */
|
|
52
|
+
systemPrompt: string;
|
|
53
|
+
messageSent: EventEmitter<string>;
|
|
54
|
+
responseReceived: EventEmitter<FHAiMessage>;
|
|
55
|
+
errored: EventEmitter<string>;
|
|
56
|
+
scroller?: ElementRef<HTMLDivElement>;
|
|
57
|
+
messages: FHAiMessage[];
|
|
58
|
+
userInput: string;
|
|
59
|
+
busy: boolean;
|
|
60
|
+
errorMsg: string;
|
|
61
|
+
private sub?;
|
|
62
|
+
constructor(ai: FHAiService, sanitizer: DomSanitizer);
|
|
63
|
+
ngOnDestroy(): void;
|
|
64
|
+
onKeyDown(ev: KeyboardEvent): void;
|
|
65
|
+
autoGrow(ta: HTMLTextAreaElement): void;
|
|
66
|
+
sendSuggestion(text: string): void;
|
|
67
|
+
send(): void;
|
|
68
|
+
stop(): void;
|
|
69
|
+
clear(): void;
|
|
70
|
+
private finish;
|
|
71
|
+
private fail;
|
|
72
|
+
private scrollSoon;
|
|
73
|
+
/** Rende il markdown (sottoinsieme) in HTML sicuro: escape -> formattazione. */
|
|
74
|
+
render(content: string): SafeHtml;
|
|
75
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FHAiChatComponent, never>;
|
|
76
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FHAiChatComponent, "FHAiChat", never, { "accent": { "alias": "accent"; "required": false; }; "accentDark": { "alias": "accentDark"; "required": false; }; "showHeader": { "alias": "showHeader"; "required": false; }; "title": { "alias": "title"; "required": false; }; "subtitle": { "alias": "subtitle"; "required": false; }; "tagLabel": { "alias": "tagLabel"; "required": false; }; "welcomeTitle": { "alias": "welcomeTitle"; "required": false; }; "welcomeSubtitle": { "alias": "welcomeSubtitle"; "required": false; }; "suggestions": { "alias": "suggestions"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "showHint": { "alias": "showHint"; "required": false; }; "endpoint": { "alias": "endpoint"; "required": false; }; "path": { "alias": "path"; "required": false; }; "model": { "alias": "model"; "required": false; }; "stream": { "alias": "stream"; "required": false; }; "apiKey": { "alias": "apiKey"; "required": false; }; "forwardAuth": { "alias": "forwardAuth"; "required": false; }; "context": { "alias": "context"; "required": false; }; "systemPrompt": { "alias": "systemPrompt"; "required": false; }; }, { "messageSent": "messageSent"; "responseReceived": "responseReceived"; "errored": "errored"; }, never, never, true, never>;
|
|
77
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { AppService } from "../services/app.service";
|
|
3
|
+
import { FHAiChunk, FHAiMessage, FHAiRequestOptions, FHAiSource } from "./models/fh-ai.models";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Client del layer AI di FluxHub.
|
|
7
|
+
*
|
|
8
|
+
* Parla con un backend OpenAI-compatible (/v1/chat/completions o una route FluxHub
|
|
9
|
+
* che fa da proxy verso il Cheshire Cat / Gemma). Supporta streaming SSE e risposta
|
|
10
|
+
* singola. L'identita' utente viene inoltrata col JWT FluxHub: scoping e retrieval
|
|
11
|
+
* sono enforced server-side (vedi architettura, sez. 10-11).
|
|
12
|
+
*
|
|
13
|
+
* Usa fetch() invece di HttpClient per gestire nativamente lo streaming SSE e per
|
|
14
|
+
* avere pieno controllo sugli header (la chiamata AI puo' usare una chiave dedicata).
|
|
15
|
+
*/
|
|
16
|
+
export declare class FHAiService {
|
|
17
|
+
private appService;
|
|
18
|
+
/** Path di default (relativo ad API_ENDPOINT) della route AI sul backend FluxHub. */
|
|
19
|
+
defaultPath: string;
|
|
20
|
+
constructor(appService: AppService);
|
|
21
|
+
/** Costruisce l'URL effettivo dell'endpoint. */
|
|
22
|
+
private resolveUrl;
|
|
23
|
+
/** Costruisce gli header (Content-Type, JWT FluxHub, API key AI, custom). */
|
|
24
|
+
private buildHeaders;
|
|
25
|
+
/** Corpo della richiesta (OpenAI-compatible). */
|
|
26
|
+
private buildBody;
|
|
27
|
+
/**
|
|
28
|
+
* Conversazione in streaming. Emette un FHAiChunk per ogni delta di testo;
|
|
29
|
+
* l'ultimo ha done=true ed eventuali sources.
|
|
30
|
+
*/
|
|
31
|
+
chatStream(messages: FHAiMessage[], opts?: FHAiRequestOptions): Observable<FHAiChunk>;
|
|
32
|
+
/**
|
|
33
|
+
* Conversazione non-streaming: risolve con il testo completo e le sorgenti.
|
|
34
|
+
*/
|
|
35
|
+
chatOnce(messages: FHAiMessage[], opts?: FHAiRequestOptions): Observable<{
|
|
36
|
+
content: string;
|
|
37
|
+
sources?: FHAiSource[];
|
|
38
|
+
}>;
|
|
39
|
+
/** Estrae il delta di testo da un evento SSE (OpenAI: choices[].delta.content). */
|
|
40
|
+
private extractDelta;
|
|
41
|
+
/** Estrae il testo completo dalla risposta non-streaming. */
|
|
42
|
+
private extractContent;
|
|
43
|
+
/** Estrae le sorgenti RAG (Cheshire Cat: why.memory.declarative; o sources/citations). */
|
|
44
|
+
private extractSources;
|
|
45
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FHAiService, never>;
|
|
46
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FHAiService>;
|
|
47
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/** Ruolo di un messaggio nella conversazione (formato OpenAI-compatible). */
|
|
2
|
+
export type FHAiRole = "user" | "assistant" | "system";
|
|
3
|
+
/** Sorgente RAG citata dal modello (chunk recuperato da Qdrant via Cheshire Cat). */
|
|
4
|
+
export interface FHAiSource {
|
|
5
|
+
/** Titolo/nome documento o riferimento mostrabile. */
|
|
6
|
+
title: string;
|
|
7
|
+
/** Estratto del chunk (snippet). */
|
|
8
|
+
snippet?: string;
|
|
9
|
+
/** Punteggio di similarita' (0..1) se fornito dal backend. */
|
|
10
|
+
score?: number;
|
|
11
|
+
/** Eventuale URL/percorso del documento sorgente. */
|
|
12
|
+
url?: string;
|
|
13
|
+
}
|
|
14
|
+
/** Singolo messaggio della conversazione. */
|
|
15
|
+
export interface FHAiMessage {
|
|
16
|
+
role: FHAiRole;
|
|
17
|
+
content: string;
|
|
18
|
+
/** True mentre il messaggio assistant e' in streaming/caricamento. */
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
/** Sorgenti RAG associate alla risposta (citazioni). */
|
|
21
|
+
sources?: FHAiSource[];
|
|
22
|
+
/** Timestamp di creazione (ms). */
|
|
23
|
+
ts?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Contesto di scoping {azienda, ruolo, persona}.
|
|
27
|
+
* NB: e' informativo/di visualizzazione lato client (es. per il titolo).
|
|
28
|
+
* L'enforcement di sicurezza avviene server-side dall'identita' autenticata.
|
|
29
|
+
*/
|
|
30
|
+
export interface FHAiContext {
|
|
31
|
+
azienda?: string;
|
|
32
|
+
ruolo?: string;
|
|
33
|
+
persona?: string;
|
|
34
|
+
/** Id conversazione per continuita' lato backend. */
|
|
35
|
+
conversationId?: string;
|
|
36
|
+
}
|
|
37
|
+
/** Opzioni della singola chiamata al backend AI. */
|
|
38
|
+
export interface FHAiRequestOptions {
|
|
39
|
+
/** URL completo dell'endpoint chat. Se assente: AppService.API_ENDPOINT + path. */
|
|
40
|
+
endpoint?: string;
|
|
41
|
+
/** Path relativo all'API_ENDPOINT quando non si passa un endpoint completo. */
|
|
42
|
+
path?: string;
|
|
43
|
+
/** Modello da richiedere (override; di norma deciso dal backend). */
|
|
44
|
+
model?: string;
|
|
45
|
+
/** Abilita lo streaming SSE (default true). */
|
|
46
|
+
stream?: boolean;
|
|
47
|
+
/** API key del servizio AI (header x-api-key). Di norma NON serve lato browser:
|
|
48
|
+
* la chiave sta sul backend FluxHub che fa da proxy. */
|
|
49
|
+
apiKey?: string;
|
|
50
|
+
/** Header aggiuntivi. */
|
|
51
|
+
headers?: Record<string, string>;
|
|
52
|
+
/** Inoltra il JWT FluxHub come Authorization: Bearer (default true). */
|
|
53
|
+
forwardAuth?: boolean;
|
|
54
|
+
/** Contesto di scoping (inviato come metadata, non autoritativo). */
|
|
55
|
+
context?: FHAiContext;
|
|
56
|
+
}
|
|
57
|
+
/** Frammento emesso durante lo streaming. */
|
|
58
|
+
export interface FHAiChunk {
|
|
59
|
+
/** Delta di testo (token). */
|
|
60
|
+
delta: string;
|
|
61
|
+
/** Testo accumulato finora. */
|
|
62
|
+
text: string;
|
|
63
|
+
/** True sull'ultimo frammento. */
|
|
64
|
+
done: boolean;
|
|
65
|
+
/** Sorgenti, se arrivate (di norma a fine risposta). */
|
|
66
|
+
sources?: FHAiSource[];
|
|
67
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Elenco curato di icone FontAwesome FREE (versione 6).
|
|
3
|
+
* Sono incluse SOLO icone disponibili nel set gratuito:
|
|
4
|
+
* - stile "solid" -> classe `fa-solid fa-<name>`
|
|
5
|
+
* - stile "brands" -> classe `fa-brands fa-<name>`
|
|
6
|
+
*
|
|
7
|
+
* L'app consumante deve avere il CSS di FontAwesome caricato (CDN o pacchetto),
|
|
8
|
+
* esattamente come per le altre icone usate nel portale.
|
|
9
|
+
*
|
|
10
|
+
* Per estendere la lista basta aggiungere il nome (senza prefisso `fa-`)
|
|
11
|
+
* all'array corretto.
|
|
12
|
+
*/
|
|
13
|
+
/** Icone "solid" free (nome senza prefisso). */
|
|
14
|
+
export declare const FA_SOLID_ICONS: string[];
|
|
15
|
+
/** Icone "brands" free (loghi, nome senza prefisso). */
|
|
16
|
+
export declare const FA_BRAND_ICONS: string[];
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
import { EventEmitter, ElementRef, QueryList, ChangeDetectorRef, OnInit } from "@angular/core";
|
|
2
|
+
import { ControlValueAccessor } from "@angular/forms";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare const FH_ICON_PICKER_VALUE_ACCESSOR: any;
|
|
5
|
+
type IconStyle = 'all' | 'solid' | 'brands';
|
|
6
|
+
/** Formato del valore emesso (ngModel / change). */
|
|
7
|
+
type ValueFormat = 'name' | 'plain' | 'class';
|
|
8
|
+
interface IconEntry {
|
|
9
|
+
name: string;
|
|
10
|
+
cls: string;
|
|
11
|
+
style: 'solid' | 'brands';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* FHIconPicker — selettore di icone FontAwesome (solo set FREE).
|
|
15
|
+
*
|
|
16
|
+
* Ispirato a https://github.com/tech-advantage/ngx-icon-picker ma:
|
|
17
|
+
* - standalone, ControlValueAccessor (usabile con [(ngModel)])
|
|
18
|
+
* - nessuna dipendenza npm aggiuntiva: rende le icone via classi CSS,
|
|
19
|
+
* quindi richiede che l'app abbia caricato il CSS di FontAwesome 6.
|
|
20
|
+
* - popup di selezione via CDK Overlay con ricerca, tab Tutte/Solid/Brands,
|
|
21
|
+
* navigazione da tastiera (frecce / Invio / Esc) e icone recenti.
|
|
22
|
+
*
|
|
23
|
+
* VALORE EMESSO (ngModel / change): per default è il **nome testuale** dell'icona,
|
|
24
|
+
* es. "fa-bookmark" (formato 'name'). Configurabile con [valueFormat]:
|
|
25
|
+
* - 'name' -> "fa-bookmark" (default)
|
|
26
|
+
* - 'plain' -> "bookmark"
|
|
27
|
+
* - 'class' -> "fa-solid fa-bookmark" (classe CSS completa)
|
|
28
|
+
*
|
|
29
|
+
* In input accetta tutti i formati (nome, nome con prefisso, sintassi FA5
|
|
30
|
+
* "fas fa-x"/"fa fa-x", classe completa) e li normalizza internamente.
|
|
31
|
+
*
|
|
32
|
+
* Esempio:
|
|
33
|
+
* <FHIconPicker [(ngModel)]="obj.icona" [label]="'Icona'" [enabled]="canEdit"
|
|
34
|
+
* (change)="onIconChange($event)"></FHIconPicker>
|
|
35
|
+
*/
|
|
36
|
+
export declare class FHIconPickerComponent implements OnInit, ControlValueAccessor {
|
|
37
|
+
private cdr;
|
|
38
|
+
label: string;
|
|
39
|
+
placeholder: string;
|
|
40
|
+
enabled: boolean;
|
|
41
|
+
hidden: boolean;
|
|
42
|
+
required: boolean;
|
|
43
|
+
error: string;
|
|
44
|
+
/** Mostra il pulsante per azzerare la selezione. */
|
|
45
|
+
allowClear: boolean;
|
|
46
|
+
/** Tab attiva all'apertura: 'all' | 'solid' | 'brands'. */
|
|
47
|
+
defaultStyle: IconStyle;
|
|
48
|
+
/** Vista iniziale del popup: 'grid' | 'list'. */
|
|
49
|
+
defaultView: 'grid' | 'list';
|
|
50
|
+
/** Formato del valore emesso: 'name' (fa-bookmark) | 'plain' (bookmark) | 'class'. */
|
|
51
|
+
valueFormat: ValueFormat;
|
|
52
|
+
/** Quante icone recenti memorizzare (0 = disattiva). */
|
|
53
|
+
recentCount: number;
|
|
54
|
+
/** Emette il nome dell'icona nel formato configurato (valueFormat). */
|
|
55
|
+
change: EventEmitter<string>;
|
|
56
|
+
/** Banana-in-a-box: supporto a [(icon)] oltre a [(ngModel)]. */
|
|
57
|
+
iconChange: EventEmitter<string>;
|
|
58
|
+
searchBox?: ElementRef<HTMLInputElement>;
|
|
59
|
+
triggerRef?: ElementRef<HTMLElement>;
|
|
60
|
+
gridRef?: ElementRef<HTMLElement>;
|
|
61
|
+
cells?: QueryList<ElementRef<HTMLElement>>;
|
|
62
|
+
private static readonly RECENT_KEY;
|
|
63
|
+
/** Classe CSS completa dell'icona selezionata (uso interno per il rendering). */
|
|
64
|
+
_value: string;
|
|
65
|
+
/** Valore "di output" (nel formato configurato) mostrato nel trigger. */
|
|
66
|
+
outValue: string;
|
|
67
|
+
panelOpen: boolean;
|
|
68
|
+
panelWidth: number;
|
|
69
|
+
search: string;
|
|
70
|
+
activeStyle: IconStyle;
|
|
71
|
+
view: 'grid' | 'list';
|
|
72
|
+
highlightIndex: number;
|
|
73
|
+
private allSolid;
|
|
74
|
+
private allBrands;
|
|
75
|
+
private allIcons;
|
|
76
|
+
private styleByName;
|
|
77
|
+
filtered: IconEntry[];
|
|
78
|
+
recent: string[];
|
|
79
|
+
overlayPositions: ({
|
|
80
|
+
readonly originX: "start";
|
|
81
|
+
readonly originY: "bottom";
|
|
82
|
+
readonly overlayX: "start";
|
|
83
|
+
readonly overlayY: "top";
|
|
84
|
+
readonly offsetY: 6;
|
|
85
|
+
} | {
|
|
86
|
+
readonly originX: "start";
|
|
87
|
+
readonly originY: "top";
|
|
88
|
+
readonly overlayX: "start";
|
|
89
|
+
readonly overlayY: "bottom";
|
|
90
|
+
readonly offsetY: -6;
|
|
91
|
+
})[];
|
|
92
|
+
constructor(cdr: ChangeDetectorRef);
|
|
93
|
+
ngOnInit(): void;
|
|
94
|
+
private get currentSet();
|
|
95
|
+
togglePanel(): void;
|
|
96
|
+
openPanel(): void;
|
|
97
|
+
closePanel(): void;
|
|
98
|
+
setStyle(style: IconStyle): void;
|
|
99
|
+
setView(v: 'grid' | 'list'): void;
|
|
100
|
+
applyFilter(): void;
|
|
101
|
+
selectIcon(cls: string): void;
|
|
102
|
+
clear(ev?: Event): void;
|
|
103
|
+
private setVal;
|
|
104
|
+
/** Nome di output per una classe completa (usato per i tooltip dei recenti). */
|
|
105
|
+
outOf(cls: string): string;
|
|
106
|
+
trackByIcon(_: number, item: IconEntry): string;
|
|
107
|
+
onPanelKeydown(ev: KeyboardEvent): void;
|
|
108
|
+
private computeColumns;
|
|
109
|
+
private scrollHighlightIntoView;
|
|
110
|
+
private loadRecent;
|
|
111
|
+
private pushRecent;
|
|
112
|
+
/** Ritorna il valore nel formato configurato (es. "fa-bookmark"). */
|
|
113
|
+
getValue(): string;
|
|
114
|
+
/** Ritorna SEMPRE la classe CSS completa (es. "fa-solid fa-bookmark"). */
|
|
115
|
+
getCssClass(): string;
|
|
116
|
+
/** Imposta l'icona da qualsiasi formato (nome, fa-name, fas fa-name, classe completa). */
|
|
117
|
+
setValue(value: string): void;
|
|
118
|
+
/** Azzera la selezione. */
|
|
119
|
+
reset(): void;
|
|
120
|
+
writeValue(value: any): void;
|
|
121
|
+
/**
|
|
122
|
+
* Estrae nome + stile da una stringa in qualsiasi formato:
|
|
123
|
+
* "fa-solid fa-house", "fas fa-house", "fa fa-house", "fa-house", "house".
|
|
124
|
+
*/
|
|
125
|
+
private parse;
|
|
126
|
+
/** Normalizza un valore in classe CSS completa per il rendering. */
|
|
127
|
+
private toFullClass;
|
|
128
|
+
/** Converte una classe completa nel formato di output configurato. */
|
|
129
|
+
private toOutput;
|
|
130
|
+
onChange: (_: any) => void;
|
|
131
|
+
onTouched: () => void;
|
|
132
|
+
registerOnChange(fn: (_: any) => void): void;
|
|
133
|
+
registerOnTouched(fn: () => void): void;
|
|
134
|
+
setDisabledState(isDisabled: boolean): void;
|
|
135
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FHIconPickerComponent, never>;
|
|
136
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FHIconPickerComponent, "FHIconPicker", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; "required": { "alias": "required"; "required": false; }; "error": { "alias": "error"; "required": false; }; "allowClear": { "alias": "allowClear"; "required": false; }; "defaultStyle": { "alias": "defaultStyle"; "required": false; }; "defaultView": { "alias": "defaultView"; "required": false; }; "valueFormat": { "alias": "valueFormat"; "required": false; }; "recentCount": { "alias": "recentCount"; "required": false; }; }, { "change": "change"; "iconChange": "iconChange"; }, never, never, true, never>;
|
|
137
|
+
}
|
|
138
|
+
export {};
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ export { FHMultiComboboxComponent } from './lib/controls/fh-multi-combobox';
|
|
|
24
24
|
export { FHNumericFieldComponent } from './lib/controls/fh-numeric';
|
|
25
25
|
export { FHPickFieldComponent } from './lib/controls/fh-pickfield';
|
|
26
26
|
export { FHColorPickerComponent } from './lib/controls/fh-color-picker';
|
|
27
|
+
export { FHIconPickerComponent } from './lib/controls/fh-icon-picker/fh-icon-picker';
|
|
27
28
|
export { FHNotesPanelComponent } from './lib/controls/fh-notes-panel';
|
|
28
29
|
export { FHFilterComboboxComponent } from './lib/controls/grid_editors/fh-combobox-filter';
|
|
29
30
|
export { FHGridToolBarComponent } from './lib/controls/fh-grid-toolbar';
|
|
@@ -109,3 +110,7 @@ export { FHHomeLauncherComponent, FHLauncherApp, FHLauncherCategory } from './li
|
|
|
109
110
|
export { FHHomeTodoComponent } from './lib/home-components/fh-home-todo/fh-home-todo.component';
|
|
110
111
|
export { FHHomeStatsComponent } from './lib/home-components/fh-home-stats/fh-home-stats.component';
|
|
111
112
|
export { FHHomeDocsComponent } from './lib/home-components/fh-home-docs/fh-home-docs.component';
|
|
113
|
+
export { FHAiService } from './lib/ai-components/fh-ai.service';
|
|
114
|
+
export { FHAiChatComponent } from './lib/ai-components/fh-ai-chat/fh-ai-chat.component';
|
|
115
|
+
export { FHAiAssistantComponent } from './lib/ai-components/fh-ai-assistant/fh-ai-assistant.component';
|
|
116
|
+
export { FHAiRole, FHAiSource, FHAiMessage, FHAiContext, FHAiRequestOptions, FHAiChunk, } from './lib/ai-components/models/fh-ai.models';
|