@esfaenza/extensions 13.3.6 → 13.3.7

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,37 +1,23 @@
1
1
  /**
2
2
  * Classe che rappresenta una risposta ricevuta da un Backend
3
3
  */
4
- export declare class CallResult {
5
- /**
6
- * Tempo impiegato perché la chiamata terminasse
7
- */
4
+ export declare class CallResult<T = never> {
5
+ /** Tempo impiegato perché la chiamata terminasse */
8
6
  elapsedtime: string;
9
- /**
10
- * **true** se tutto è andato bene, **false** altrimenti
11
- */
7
+ /** **true** se tutto è andato bene, **false** altrimenti */
12
8
  success: boolean;
13
- /**
14
- * Indica se ci sono errori
15
- */
9
+ /** Indica se ci sono errori */
16
10
  haserror: boolean;
17
- /**
18
- * Codice dell'eventuale errore restituito
19
- */
11
+ /** Codice dell'eventuale errore restituito */
20
12
  errorcode: string;
21
- /**
22
- * Log dell'eventuale errore restituito
23
- */
13
+ /** Log dell'eventuale errore restituito */
24
14
  error: string;
25
- /**
26
- * ID dell'eventuale entità relativa a questa risposta
27
- */
15
+ /** ID dell'eventuale entità relativa a questa risposta */
28
16
  entityid: any;
29
- /**
30
- * Indica se ci sono warning
31
- */
17
+ /** Indica se ci sono warning */
32
18
  haswarning: boolean;
33
- /**
34
- * Log dell'eventuale warning restituito
35
- */
19
+ /** Log dell'eventuale warning restituito */
36
20
  warning: string;
21
+ /** Entità collegata a questo CallResult */
22
+ entity: T;
37
23
  }
@@ -14,6 +14,10 @@ export declare class CsvHeaders {
14
14
  * Ordine della colonna
15
15
  */
16
16
  order: number;
17
+ /**
18
+ * Nome della chiave della proprietà lato es-table
19
+ */
20
+ propKey: string;
17
21
  /**
18
22
  * Tipo della colonna (per eventuali formattazioni se si scarica in Excel)
19
23
  */
@@ -15,6 +15,10 @@ export declare const csvVisPrefix: string;
15
15
  * Suffisso della proprietà da generare in cui salvare il nome della colonna in cui salvare questa proprietà
16
16
  */
17
17
  export declare const csvHdrPrefix: string;
18
+ /**
19
+ * Suffisso della proprietà da generare in cui salvare il codice del th a cui si riferisce questo campo
20
+ */
21
+ export declare const csvPropKey: string;
18
22
  /**
19
23
  * Suffisso della proprietà da generare in cui salvare il valore da prendere per una proprietà di tipo Lista
20
24
  */
@@ -39,3 +43,7 @@ export declare const dictionaryCsvHdrPrefix: string;
39
43
  * Suffisso della proprietà da generare in cui salvare il formato della proprietà che si sta esportando
40
44
  */
41
45
  export declare const csvFormatPrefix: string;
46
+ /**
47
+ * Nome della proprietà che contiene tutti i nomi di tutte le proprietà da esportare
48
+ */
49
+ export declare const exportList: string;
@@ -24,6 +24,8 @@ export declare class ClipboardService {
24
24
  * @param {Function} valueFoundCallback Callback che questa funzione chiamerà una volta ottenuto i valori richiesti dalla clipboard
25
25
  */
26
26
  getClipboard(style: 'array' | 'matrix', valueFoundCallback: (values: string[] | string[][]) => void): void;
27
+ /** @ignore */
28
+ private doClipboardDataGet;
27
29
  /**
28
30
  * Ottiene il contenuto della clipboard diviso per righe (separate da newline)
29
31
  *
@@ -27,7 +27,7 @@ import * as i0 from "@angular/core";
27
27
  * @param {string} header Titolo della colonna nel file CSV esportato
28
28
  * @param {string} format Formato di esportazione. Può essere un formato data per i campi data o 'F' per i campi floating point
29
29
  */
30
- export declare const Export: (order: number, header: string, format?: string) => (target: Object, propertyKey: string) => void;
30
+ export declare const Export: (order: number, header: string, format?: string, tableid?: string) => (target: Object, propertyKey: string) => void;
31
31
  /**
32
32
  * Decoratore di esportazione utilizzabile su un oggetto.
33
33
  * Per ogni proprietà dell'oggetto verranno generate 3 proprietà che gestiranno l'esportazione: (prop, prop_csvvis, prop_csvhdr).
@@ -112,7 +112,7 @@ export declare class ExportService {
112
112
  *
113
113
  * @returns {CsvHeaders[]} Header di esportazione già ordinati correttamente
114
114
  */
115
- setupForExport(objs: any[]): CsvHeaders[];
115
+ setupForExport(objs: any[], columns?: string[]): CsvHeaders[];
116
116
  /**
117
117
  * Data una lista di oggetti generici genera gli header per l'esportazione e integra ogni oggetto con le proprietà esportabili dalla libreria **@ctrl/ngx-csv**
118
118
  *
@@ -1,4 +1,4 @@
1
- import { ToastrService } from "ngx-toastr";
1
+ import { Injector } from "@angular/core";
2
2
  import { Observable } from "rxjs";
3
3
  import { CallResult } from "../models/CallResult";
4
4
  import * as i0 from "@angular/core";
@@ -6,7 +6,7 @@ import * as i0 from "@angular/core";
6
6
  * Service che fornisce funzionalità di alert nei tipi fondamentali: success, info, warning e danger
7
7
  */
8
8
  export declare class MessageService {
9
- private toastr;
9
+ private injector;
10
10
  private FANCY_ALERTS;
11
11
  private LOCALE;
12
12
  /**
@@ -17,6 +17,10 @@ export declare class MessageService {
17
17
  * Template di un warning con richiesta di conferma
18
18
  */
19
19
  private warningSwalWithCancel;
20
+ /**
21
+ * Template di un warning con richiesta di conferma
22
+ */
23
+ private successSwalWithCancel;
20
24
  /**
21
25
  * Template di un errore
22
26
  */
@@ -37,12 +41,13 @@ export declare class MessageService {
37
41
  * Template di un warning per la sessione scaduta
38
42
  */
39
43
  private expiredSessionSwal;
44
+ private get toastr();
40
45
  /**
41
46
  * Costruttore
42
47
  *
43
48
  * @ignore
44
49
  */
45
- constructor(toastr: ToastrService, FANCY_ALERTS: boolean, LOCALE: string);
50
+ constructor(injector: Injector, FANCY_ALERTS: boolean, LOCALE: string);
46
51
  /**
47
52
  * Presentazione di un semplice messaggio di successo
48
53
  *
@@ -52,7 +57,7 @@ export declare class MessageService {
52
57
  * @param {string} text Testo da mostrare
53
58
  * @param {"toastr" | "swal" | null} secondaryNotificationType Qualora sia una notifica secondaria, ne indica il tipo
54
59
  */
55
- simpleSuccess(text: string, secondaryNotificationType?: "toastr" | "swal" | null): void;
60
+ simpleSuccess(text: string, secondaryNotificationType?: "toastr" | "swal" | null, secondaryNotificationTimeout?: number): void;
56
61
  /**
57
62
  * Presentazione di un semplice messaggio di informazione
58
63
  *
@@ -62,7 +67,7 @@ export declare class MessageService {
62
67
  * @param {string} text Testo da mostrare
63
68
  * @param {"toastr" | "swal" | null} secondaryNotificationType Qualora sia una notifica secondaria, ne indica il tipo
64
69
  */
65
- simpleInfo(text: string, secondaryNotificationType?: "toastr" | "swal" | null): void;
70
+ simpleInfo(text: string, secondaryNotificationType?: "toastr" | "swal" | null, secondaryNotificationTimeout?: number): void;
66
71
  /**
67
72
  * Presentazione di un semplice messaggio di errore
68
73
  *
@@ -72,7 +77,7 @@ export declare class MessageService {
72
77
  * @param {string} text Testo da mostrare
73
78
  * @param {"toastr" | "swal" | null} secondaryNotificationType Qualora sia una notifica secondaria, ne indica il tipo
74
79
  */
75
- simpleError(text: string, secondaryNotificationType?: "toastr" | "swal" | null): void;
80
+ simpleError(text: string, secondaryNotificationType?: "toastr" | "swal" | null, secondaryNotificationTimeout?: number): void;
76
81
  /**
77
82
  * Presentazione di un semplice messaggio di avviso
78
83
  *
@@ -82,7 +87,7 @@ export declare class MessageService {
82
87
  * @param {string} text Testo da mostrare
83
88
  * @param {"toastr" | "swal" | null} secondaryNotificationType Qualora sia una notifica secondaria, ne indica il tipo
84
89
  */
85
- simpleWarning(text: string, secondaryNotificationType?: "toastr" | "swal" | null): void;
90
+ simpleWarning(text: string, secondaryNotificationType?: "toastr" | "swal" | null, secondaryNotificationTimeout?: number): void;
86
91
  /**
87
92
  * Ripulisce tutti i messaggi presenti in un dato momento sullo schermo
88
93
  */
@@ -113,6 +118,17 @@ export declare class MessageService {
113
118
  * @param {Function} onerror Callback da chimare su errori
114
119
  */
115
120
  simpleWarningWithChoice(title: string, text: string, onsuccess?: Function, onerror?: Function): void;
121
+ /**
122
+ * Mostra un messaggio di success con richiesta di conferma e gestisce il risultato chiamato i callback **onconfirm** o **onabort**
123
+ *
124
+ * @param {string} title Titolo del messaggio
125
+ * @param {string} text Contenuto del messaggio
126
+ * @param {Function} onconfirm Callback da chimare su conferma
127
+ * @param {Function} onabort Callback da chimare su annullamento
128
+ * @param {string} confirmtext Testo del pulsante di azione
129
+ * @param {string} aborttext Testo del pulsante di annullamento
130
+ */
131
+ simpleSuccessWithChoice(title: string, text: string, onconfirm?: Function, onabort?: Function, confirmtext?: string, aborttext?: string): void;
116
132
  /**
117
133
  * Mostra un messaggio di avviso con richiesta di conferma e gestisce il risultato chiamato i callback **onsuccess** o **onerror**
118
134
  *
@@ -81,6 +81,21 @@ export declare class UtilityService {
81
81
  * @returns {"boolean" | "number" | "string" | "date"} Tipo Typescript corrispondente
82
82
  */
83
83
  getJsTypeFromTypeCode(type: TypeCode): "boolean" | "number" | "string" | "date";
84
+ /**
85
+ * Effettua la clonazione profonda di un oggetto in maniera molto più performante che JSON.parse(JSON.stringify()).
86
+ *
87
+ * Usare solo per oggetti puri e quantomeno semplici per evitare complicazioni derivanti dalle semplificazioni che questo metodo assume
88
+ *
89
+ * @param {any} source Oggetto da clonare
90
+ *
91
+ * @return {any} Clone dell'oggetto passato
92
+ */
93
+ deepClone(source: any): any;
94
+ /**
95
+ * @ignore
96
+ * Step ricorsivo per la clonatura degli oggetti. Vedere **deepClone**
97
+ */
98
+ private recursiveStep;
84
99
  static ɵfac: i0.ɵɵFactoryDeclaration<UtilityService, never>;
85
100
  static ɵprov: i0.ɵɵInjectableDeclaration<UtilityService>;
86
101
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@esfaenza/extensions",
3
- "version": "13.3.6",
3
+ "version": "13.3.7",
4
4
  "dependencies": {
5
5
  "tslib": "^2.0.0"
6
6
  },