uni-manager 0.1.23 → 0.1.24
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,6 @@
|
|
|
1
1
|
import { distinctUntilChanged, map, BehaviorSubject } from 'rxjs';
|
|
2
2
|
|
|
3
|
+
/* eslint-disable unicorn/prefer-ternary */
|
|
3
4
|
class UniErrorManager {
|
|
4
5
|
/* ------------------------------------------------------------------------------- */
|
|
5
6
|
/* --------------------------------- Metodi: get --------------------------------- */
|
|
@@ -27,11 +28,13 @@ class UniErrorManager {
|
|
|
27
28
|
}), map((storeMap) => {
|
|
28
29
|
const visibleErrors = [];
|
|
29
30
|
for (const [id, item] of storeMap) {
|
|
30
|
-
if (!item.isVisible)
|
|
31
|
-
continue;
|
|
32
31
|
visibleErrors.push({ ...item, id });
|
|
33
32
|
}
|
|
34
|
-
return visibleErrors
|
|
33
|
+
return visibleErrors.toSorted((a, b) => {
|
|
34
|
+
const lastTimestampA = a.historyItems.at(-1)?.timestamp ?? 0;
|
|
35
|
+
const lastTimestampB = b.historyItems.at(-1)?.timestamp ?? 0;
|
|
36
|
+
return lastTimestampB - lastTimestampA;
|
|
37
|
+
});
|
|
35
38
|
}));
|
|
36
39
|
}
|
|
37
40
|
/** Restituisce se lo store ha errori visibili o meno */
|
|
@@ -41,7 +44,6 @@ class UniErrorManager {
|
|
|
41
44
|
/* ------------------------------------------------------------------------------- */
|
|
42
45
|
/* ------------------------------------ Store ------------------------------------ */
|
|
43
46
|
/* ------------------------------------------------------------------------------- */
|
|
44
|
-
/* ------------------------------------------------------------------------------- */
|
|
45
47
|
/** Store privato (Subject) */
|
|
46
48
|
static { this.store = new BehaviorSubject(new Map()); }
|
|
47
49
|
/** Store pubblico (Observable) */
|
|
@@ -61,18 +63,33 @@ class UniErrorManager {
|
|
|
61
63
|
const oldMap = this.currentValue;
|
|
62
64
|
// Tenta di recuperare l'oggetto corrente
|
|
63
65
|
const oldItem = oldMap.get(id);
|
|
64
|
-
//
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
66
|
+
// Variabile d'appoggio per il nuovo item da salvare
|
|
67
|
+
let newItem;
|
|
68
|
+
// Crea il nuovo oggetto aggiornando isVisible e la history
|
|
69
|
+
if (oldItem) {
|
|
70
|
+
newItem = {
|
|
71
|
+
...oldItem,
|
|
72
|
+
uniError: error,
|
|
73
|
+
historyItems: [
|
|
74
|
+
...oldItem.historyItems,
|
|
75
|
+
{ message: error.exception.message, timestamp: Date.now() },
|
|
76
|
+
],
|
|
77
|
+
isVisible: true,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
newItem = {
|
|
82
|
+
uniError: error,
|
|
83
|
+
historyItems: [{ message: error.exception.message, timestamp: Date.now() }],
|
|
84
|
+
isVisible: true,
|
|
85
|
+
isOpen: false,
|
|
86
|
+
isCopied: false,
|
|
87
|
+
isSaved: false,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
73
90
|
// Crea una nuova istanza della Map
|
|
74
91
|
const newMap = new Map(oldMap);
|
|
75
|
-
newMap.set(id,
|
|
92
|
+
newMap.set(id, newItem);
|
|
76
93
|
// Aggiorna il nuovo stato notificando l'observer
|
|
77
94
|
this.store.next(newMap);
|
|
78
95
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uni-manager-error.mjs","sources":["../../../projects/uni-manager/error/manager.ts","../../../projects/uni-manager/error/uni-manager-error.ts"],"sourcesContent":["import { BehaviorSubject, distinctUntilChanged, map, Observable } from 'rxjs';\r\nimport type { ErrorStore, IUniFeError, IUniHttpError } from 'uni-model-type/type';\r\n\r\nexport class UniErrorManager {\r\n /* ------------------------------------------------------------------------------- */\r\n /* --------------------------------- Metodi: get --------------------------------- */\r\n /* ------------------------------------------------------------------------------- */\r\n /** Restituisce la lista degli errori visibili */\r\n public static get errorStoreItems$(): Observable<({ id: string } & ErrorStore)[]> {\r\n return this.store$.pipe(\r\n distinctUntilChanged((prev, curr) => {\r\n // Se la dimensione differisce, le mappe sono strutturalmente diverse\r\n if (prev.size !== curr.size) return false;\r\n\r\n // Verifica puntuale dello stato di ciascun elemento per evitare la conversione in array\r\n for (const [id, prevItem] of prev) {\r\n const currItem = curr.get(id);\r\n\r\n // Se l'elemento non esiste nella nuova mappa, viene rilevato un cambiamento\r\n if (!currItem) return false;\r\n\r\n // Se varia lo stato di visibilità o il numero di eventi in cronologia, viene rilevato un cambiamento\r\n if (prevItem.isVisible !== currItem.isVisible) return false;\r\n if (prevItem.historyItems.length !== currItem.historyItems.length) return false;\r\n }\r\n\r\n // Nessuna variazione rilevata tra le due mappe\r\n return true;\r\n }),\r\n map((storeMap) => {\r\n const visibleErrors: ({ id: string } & ErrorStore)[] = [];\r\n for (const [id, item] of storeMap) {\r\n if (!item.isVisible) continue;\r\n visibleErrors.push({ ...item, id });\r\n }\r\n return visibleErrors;\r\n }),\r\n );\r\n }\r\n\r\n /** Restituisce se lo store ha errori visibili o meno */\r\n public static get hasErrors$(): Observable<boolean> {\r\n return this.errorStoreItems$.pipe(\r\n map((errorsList) => errorsList.length > 0),\r\n distinctUntilChanged(),\r\n );\r\n }\r\n\r\n /* ------------------------------------------------------------------------------- */\r\n /* ------------------------------------ Store ------------------------------------ */\r\n /* ------------------------------------------------------------------------------- */\r\n /* ------------------------------------------------------------------------------- */\r\n /** Store privato (Subject) */\r\n private static store = new BehaviorSubject<Map<string, ErrorStore>>(new Map());\r\n\r\n /** Store pubblico (Observable) */\r\n public static store$: Observable<Map<string, ErrorStore>> = this.store.asObservable();\r\n\r\n /** Ottiene lo stato attuale della Map senza dover sottoscrivere l'observable */\r\n public static get currentValue(): Map<string, ErrorStore> {\r\n return this.store.getValue();\r\n }\r\n\r\n /* ------------------------------------------------------------------------------- */\r\n /* -------------------------------- Metodi: store -------------------------------- */\r\n /* ------------------------------------------------------------------------------- */\r\n /**\r\n * Aggiunge o aggiorna un errore nello store (lo rende automaticamente visibile).\r\n */\r\n public static add(id: string, error: IUniHttpError | IUniFeError): void {\r\n // Recupera l'ultimo stato (Map)\r\n const oldMap = this.currentValue;\r\n\r\n // Tenta di recuperare l'oggetto corrente\r\n const oldItem = oldMap.get(id);\r\n\r\n // Crea il nuovo oggetto aggiornando isVisibile\r\n const store: ErrorStore = {\r\n error,\r\n historyItems: [\r\n ...(oldItem?.historyItems ?? []),\r\n { message: error.exception?.message ?? 'Unknown error', timestamp: Date.now() },\r\n ],\r\n isVisible: true, // Quando viene aggiunto o si ripete, torna visibile\r\n };\r\n\r\n // Crea una nuova istanza della Map\r\n const newMap = new Map(oldMap);\r\n newMap.set(id, store);\r\n\r\n // Aggiorna il nuovo stato notificando l'observer\r\n this.store.next(newMap);\r\n }\r\n\r\n /**\r\n * Nasconde un errore tramite ID senza eliminarlo dallo store (soft-delete)\r\n */\r\n public static hide(id: string): void {\r\n // Recupera l'ultimo stato (Map)\r\n const oldMap = this.currentValue;\r\n\r\n // Tenta di recuperare l'oggetto corrente\r\n const oldItem = oldMap.get(id);\r\n\r\n // Controllo: se non è presente l'item allora termina\r\n if (!oldItem) return;\r\n\r\n // Crea una nuova istanza della Map\r\n const newMap = new Map(oldMap);\r\n newMap.set(id, { ...oldItem, isVisible: false });\r\n\r\n // Aggiorna il nuovo stato notificando l'observer\r\n this.store.next(newMap);\r\n }\r\n\r\n /**\r\n * Nasconde tutti gli errori attualmente presenti nello store\r\n */\r\n public static hideAll(): void {\r\n // Recupera l'ultimo stato (Map)\r\n const oldMap = this.currentValue;\r\n\r\n // Controllo: se lo store è vuoto allora termina\r\n if (oldMap.size === 0) return;\r\n\r\n // Crea una nuova istanza della Map\r\n const newMap = new Map<string, ErrorStore>();\r\n for (const [key, value] of oldMap) {\r\n newMap.set(key, { ...value, isVisible: false });\r\n }\r\n\r\n // Aggiorna il nuovo stato notificando l'observer\r\n this.store.next(newMap);\r\n }\r\n\r\n /**\r\n * Rimuove definitivamente un errore tramite ID dallo store\r\n */\r\n public static remove(id: string): void {\r\n // Recupera l'ultimo stato (Map)\r\n const oldMap = this.currentValue;\r\n\r\n // Controllo: se non è presente l'item allora termina\r\n if (!oldMap.has(id)) return;\r\n\r\n // Crea una nuova istanza della Map\r\n const newMap = new Map(oldMap);\r\n newMap.delete(id);\r\n\r\n // Aggiorna il nuovo stato notificando l'observer\r\n this.store.next(newMap);\r\n }\r\n\r\n /**\r\n * Svuota completamente il map degli errori (hard-delete)\r\n */\r\n public static removeAll(): void {\r\n // Crea una nuova istanza della Map\r\n const newMap = new Map();\r\n\r\n // Aggiorna il nuovo stato notificando l'observer\r\n this.store.next(newMap);\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;MAGa,eAAe,CAAA;;;;;AAKnB,IAAA,WAAW,gBAAgB,GAAA;AAChC,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CACrB,oBAAoB,CAAC,CAAC,IAAI,EAAE,IAAI,KAAI;;AAElC,YAAA,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI;AAAE,gBAAA,OAAO,KAAK;;YAGzC,KAAK,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,IAAI,EAAE;gBACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;;AAG7B,gBAAA,IAAI,CAAC,QAAQ;AAAE,oBAAA,OAAO,KAAK;;AAG3B,gBAAA,IAAI,QAAQ,CAAC,SAAS,KAAK,QAAQ,CAAC,SAAS;AAAE,oBAAA,OAAO,KAAK;gBAC3D,IAAI,QAAQ,CAAC,YAAY,CAAC,MAAM,KAAK,QAAQ,CAAC,YAAY,CAAC,MAAM;AAAE,oBAAA,OAAO,KAAK;YACjF;;AAGA,YAAA,OAAO,IAAI;AACb,QAAA,CAAC,CAAC,EACF,GAAG,CAAC,CAAC,QAAQ,KAA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IAAI,GAAG,CAAC,MAAM,CAAC;AAC9B,QAAA,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC;;AAGjB,QAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;IACzB;AAEA;;AAEG;AACI,IAAA,OAAO,SAAS,GAAA;;AAErB,QAAA,MAAM,MAAM,GAAG,IAAI,GAAG,EAAE;;AAGxB,QAAA,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;IACzB;;;AClKF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"uni-manager-error.mjs","sources":["../../../projects/uni-manager/error/manager.ts","../../../projects/uni-manager/error/uni-manager-error.ts"],"sourcesContent":["/* eslint-disable unicorn/prefer-ternary */\r\nimport { BehaviorSubject, distinctUntilChanged, map, Observable } from 'rxjs';\r\nimport type { ErrorStore, IUniFeError, IUniHttpError } from 'uni-model-type/type';\r\n\r\nexport class UniErrorManager {\r\n /* ------------------------------------------------------------------------------- */\r\n /* --------------------------------- Metodi: get --------------------------------- */\r\n /* ------------------------------------------------------------------------------- */\r\n /** Restituisce la lista degli errori visibili */\r\n public static get errorStoreItems$(): Observable<({ id: string } & ErrorStore)[]> {\r\n return this.store$.pipe(\r\n distinctUntilChanged((prev, curr) => {\r\n // Se la dimensione differisce, le mappe sono strutturalmente diverse\r\n if (prev.size !== curr.size) return false;\r\n\r\n // Verifica puntuale dello stato di ciascun elemento per evitare la conversione in array\r\n for (const [id, prevItem] of prev) {\r\n const currItem = curr.get(id);\r\n\r\n // Se l'elemento non esiste nella nuova mappa, viene rilevato un cambiamento\r\n if (!currItem) return false;\r\n\r\n // Se varia lo stato di visibilità o il numero di eventi in cronologia, viene rilevato un cambiamento\r\n if (prevItem.isVisible !== currItem.isVisible) return false;\r\n if (prevItem.historyItems.length !== currItem.historyItems.length) return false;\r\n }\r\n\r\n // Nessuna variazione rilevata tra le due mappe\r\n return true;\r\n }),\r\n map((storeMap) => {\r\n const visibleErrors: ({ id: string } & ErrorStore)[] = [];\r\n for (const [id, item] of storeMap) {\r\n visibleErrors.push({ ...item, id });\r\n }\r\n return visibleErrors.toSorted((a, b) => {\r\n const lastTimestampA = a.historyItems.at(-1)?.timestamp ?? 0;\r\n const lastTimestampB = b.historyItems.at(-1)?.timestamp ?? 0;\r\n return lastTimestampB - lastTimestampA;\r\n });\r\n }),\r\n );\r\n }\r\n\r\n /** Restituisce se lo store ha errori visibili o meno */\r\n public static get hasErrors$(): Observable<boolean> {\r\n return this.errorStoreItems$.pipe(\r\n map((errorsList) => errorsList.length > 0),\r\n distinctUntilChanged(),\r\n );\r\n }\r\n\r\n /* ------------------------------------------------------------------------------- */\r\n /* ------------------------------------ Store ------------------------------------ */\r\n /* ------------------------------------------------------------------------------- */\r\n /** Store privato (Subject) */\r\n private static store = new BehaviorSubject<Map<string, ErrorStore>>(new Map());\r\n\r\n /** Store pubblico (Observable) */\r\n public static store$: Observable<Map<string, ErrorStore>> = this.store.asObservable();\r\n\r\n /** Ottiene lo stato attuale della Map senza dover sottoscrivere l'observable */\r\n public static get currentValue(): Map<string, ErrorStore> {\r\n return this.store.getValue();\r\n }\r\n\r\n /* ------------------------------------------------------------------------------- */\r\n /* -------------------------------- Metodi: store -------------------------------- */\r\n /* ------------------------------------------------------------------------------- */\r\n /**\r\n * Aggiunge o aggiorna un errore nello store (lo rende automaticamente visibile).\r\n */\r\n public static add(id: string, error: IUniHttpError | IUniFeError): void {\r\n // Recupera l'ultimo stato (Map)\r\n const oldMap = this.currentValue;\r\n\r\n // Tenta di recuperare l'oggetto corrente\r\n const oldItem = oldMap.get(id);\r\n\r\n // Variabile d'appoggio per il nuovo item da salvare\r\n let newItem: ErrorStore;\r\n\r\n // Crea il nuovo oggetto aggiornando isVisible e la history\r\n if (oldItem) {\r\n newItem = {\r\n ...oldItem,\r\n uniError: error,\r\n historyItems: [\r\n ...oldItem.historyItems,\r\n { message: error.exception.message, timestamp: Date.now() },\r\n ],\r\n isVisible: true,\r\n };\r\n } else {\r\n newItem = {\r\n uniError: error,\r\n historyItems: [{ message: error.exception.message, timestamp: Date.now() }],\r\n isVisible: true,\r\n isOpen: false,\r\n isCopied: false,\r\n isSaved: false,\r\n };\r\n }\r\n\r\n // Crea una nuova istanza della Map\r\n const newMap = new Map(oldMap);\r\n newMap.set(id, newItem);\r\n\r\n // Aggiorna il nuovo stato notificando l'observer\r\n this.store.next(newMap);\r\n }\r\n\r\n /**\r\n * Nasconde un errore tramite ID senza eliminarlo dallo store (soft-delete)\r\n */\r\n public static hide(id: string): void {\r\n // Recupera l'ultimo stato (Map)\r\n const oldMap = this.currentValue;\r\n\r\n // Tenta di recuperare l'oggetto corrente\r\n const oldItem = oldMap.get(id);\r\n\r\n // Controllo: se non è presente l'item allora termina\r\n if (!oldItem) return;\r\n\r\n // Crea una nuova istanza della Map\r\n const newMap = new Map(oldMap);\r\n newMap.set(id, { ...oldItem, isVisible: false });\r\n\r\n // Aggiorna il nuovo stato notificando l'observer\r\n this.store.next(newMap);\r\n }\r\n\r\n /**\r\n * Nasconde tutti gli errori attualmente presenti nello store\r\n */\r\n public static hideAll(): void {\r\n // Recupera l'ultimo stato (Map)\r\n const oldMap = this.currentValue;\r\n\r\n // Controllo: se lo store è vuoto allora termina\r\n if (oldMap.size === 0) return;\r\n\r\n // Crea una nuova istanza della Map\r\n const newMap = new Map<string, ErrorStore>();\r\n for (const [key, value] of oldMap) {\r\n newMap.set(key, { ...value, isVisible: false });\r\n }\r\n\r\n // Aggiorna il nuovo stato notificando l'observer\r\n this.store.next(newMap);\r\n }\r\n\r\n /**\r\n * Rimuove definitivamente un errore tramite ID dallo store\r\n */\r\n public static remove(id: string): void {\r\n // Recupera l'ultimo stato (Map)\r\n const oldMap = this.currentValue;\r\n\r\n // Controllo: se non è presente l'item allora termina\r\n if (!oldMap.has(id)) return;\r\n\r\n // Crea una nuova istanza della Map\r\n const newMap = new Map(oldMap);\r\n newMap.delete(id);\r\n\r\n // Aggiorna il nuovo stato notificando l'observer\r\n this.store.next(newMap);\r\n }\r\n\r\n /**\r\n * Svuota completamente il map degli errori (hard-delete)\r\n */\r\n public static removeAll(): void {\r\n // Crea una nuova istanza della Map\r\n const newMap = new Map<string, ErrorStore>();\r\n\r\n // Aggiorna il nuovo stato notificando l'observer\r\n this.store.next(newMap);\r\n }\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;AAAA;MAIa,eAAe,CAAA;;;;;AAKnB,IAAA,WAAW,gBAAgB,GAAA;AAChC,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CACrB,oBAAoB,CAAC,CAAC,IAAI,EAAE,IAAI,KAAI;;AAElC,YAAA,IAAI,IAAI,CAAC,IAAI,KAAK,IAAI,CAAC,IAAI;AAAE,gBAAA,OAAO,KAAK;;YAGzC,KAAK,MAAM,CAAC,EAAE,EAAE,QAAQ,CAAC,IAAI,IAAI,EAAE;gBACjC,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;;AAG7B,gBAAA,IAAI,CAAC,QAAQ;AAAE,oBAAA,OAAO,KAAK;;AAG3B,gBAAA,IAAI,QAAQ,CAAC,SAAS,KAAK,QAAQ,CAAC,SAAS;AAAE,oBAAA,OAAO,KAAK;gBAC3D,IAAI,QAAQ,CAAC,YAAY,CAAC,MAAM,KAAK,QAAQ,CAAC,YAAY,CAAC,MAAM;AAAE,oBAAA,OAAO,KAAK;YACjF;;AAGA,YAAA,OAAO,IAAI;AACb,QAAA,CAAC,CAAC,EACF,GAAG,CAAC,CAAC,QAAQ,KAAI;YACf,MAAM,aAAa,GAAoC,EAAE;YACzD,KAAK,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,IAAI,QAAQ,EAAE;gBACjC,aAAa,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,CAAC;YACrC;YACA,OAAO,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,KA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