@arsedizioni/ars-utils 22.6.86 → 22.6.88

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.
Files changed (79) hide show
  1. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +3158 -3344
  2. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
  3. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +7616 -4772
  4. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
  5. package/fesm2022/arsedizioni-ars-utils-core.date.mjs +321 -702
  6. package/fesm2022/arsedizioni-ars-utils-core.date.mjs.map +1 -1
  7. package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs +445 -590
  8. package/fesm2022/arsedizioni-ars-utils-core.markdown.mjs.map +1 -1
  9. package/fesm2022/arsedizioni-ars-utils-core.mjs +1735 -2370
  10. package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
  11. package/fesm2022/arsedizioni-ars-utils-core.validators.mjs +1280 -1470
  12. package/fesm2022/arsedizioni-ars-utils-core.validators.mjs.map +1 -1
  13. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +1097 -1528
  14. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
  15. package/fesm2022/arsedizioni-ars-utils-support.common.mjs +198 -294
  16. package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
  17. package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs +115 -117
  18. package/fesm2022/arsedizioni-ars-utils-ui.controls.date.mjs.map +1 -1
  19. package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs +1607 -613
  20. package/fesm2022/arsedizioni-ars-utils-ui.controls.mjs.map +1 -1
  21. package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs +840 -367
  22. package/fesm2022/arsedizioni-ars-utils-ui.controls.tree.mjs.map +1 -1
  23. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs +1634 -651
  24. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.auth.mjs.map +1 -1
  25. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs +1255 -792
  26. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.mjs.map +1 -1
  27. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs +1410 -357
  28. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.prompt.mjs.map +1 -1
  29. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs +2401 -944
  30. package/fesm2022/arsedizioni-ars-utils-ui.dialogs.select.mjs.map +1 -1
  31. package/fesm2022/arsedizioni-ars-utils-ui.files.mjs +1553 -741
  32. package/fesm2022/arsedizioni-ars-utils-ui.files.mjs.map +1 -1
  33. package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs +901 -430
  34. package/fesm2022/arsedizioni-ars-utils-ui.filters.mjs.map +1 -1
  35. package/fesm2022/arsedizioni-ars-utils-ui.help.mjs +737 -530
  36. package/fesm2022/arsedizioni-ars-utils-ui.help.mjs.map +1 -1
  37. package/fesm2022/arsedizioni-ars-utils-ui.mjs +6638 -1755
  38. package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
  39. package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs +1479 -1207
  40. package/fesm2022/arsedizioni-ars-utils-ui.navigation.mjs.map +1 -1
  41. package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs +1003 -270
  42. package/fesm2022/arsedizioni-ars-utils-ui.notifications.mjs.map +1 -1
  43. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +497 -278
  44. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
  45. package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs +48 -52
  46. package/fesm2022/arsedizioni-ars-utils-ui.paginator.mjs.map +1 -1
  47. package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs +464 -704
  48. package/fesm2022/arsedizioni-ars-utils-ui.shell.mjs.map +1 -1
  49. package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs +724 -657
  50. package/fesm2022/arsedizioni-ars-utils-ui.tinymce.mjs.map +1 -1
  51. package/fesm2022/arsedizioni-ars-utils.mjs +3 -19
  52. package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
  53. package/package.json +1 -1
  54. package/types/arsedizioni-ars-utils-clipper.common.d.ts +1151 -1163
  55. package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1588 -1426
  56. package/types/arsedizioni-ars-utils-core.d.ts +1169 -1172
  57. package/types/arsedizioni-ars-utils-core.date.d.ts +204 -208
  58. package/types/arsedizioni-ars-utils-core.markdown.d.ts +128 -126
  59. package/types/arsedizioni-ars-utils-core.validators.d.ts +270 -236
  60. package/types/arsedizioni-ars-utils-evolution.common.d.ts +1054 -1067
  61. package/types/arsedizioni-ars-utils-support.common.d.ts +225 -234
  62. package/types/arsedizioni-ars-utils-ui.controls.d.ts +440 -278
  63. package/types/arsedizioni-ars-utils-ui.controls.date.d.ts +24 -28
  64. package/types/arsedizioni-ars-utils-ui.controls.tree.d.ts +172 -136
  65. package/types/arsedizioni-ars-utils-ui.d.ts +2035 -821
  66. package/types/arsedizioni-ars-utils-ui.dialogs.auth.d.ts +327 -322
  67. package/types/arsedizioni-ars-utils-ui.dialogs.d.ts +343 -347
  68. package/types/arsedizioni-ars-utils-ui.dialogs.prompt.d.ts +167 -167
  69. package/types/arsedizioni-ars-utils-ui.dialogs.select.d.ts +373 -367
  70. package/types/arsedizioni-ars-utils-ui.files.d.ts +335 -283
  71. package/types/arsedizioni-ars-utils-ui.filters.d.ts +232 -160
  72. package/types/arsedizioni-ars-utils-ui.help.d.ts +204 -211
  73. package/types/arsedizioni-ars-utils-ui.navigation.d.ts +811 -646
  74. package/types/arsedizioni-ars-utils-ui.notifications.d.ts +74 -78
  75. package/types/arsedizioni-ars-utils-ui.oauth.d.ts +102 -62
  76. package/types/arsedizioni-ars-utils-ui.paginator.d.ts +19 -22
  77. package/types/arsedizioni-ars-utils-ui.shell.d.ts +376 -382
  78. package/types/arsedizioni-ars-utils-ui.tinymce.d.ts +244 -231
  79. package/types/arsedizioni-ars-utils.d.ts +1 -3
@@ -1,301 +1,205 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import * as i0 from '@angular/core';
3
- import { signal, Service, inject, DestroyRef } from '@angular/core';
4
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
- import { BroadcastService } from '@arsedizioni/ars-utils/core';
6
-
1
+ import { HttpClient } from "@angular/common/http";
2
+ import * as i0 from "@angular/core";
3
+ import { DestroyRef, Service, inject, signal } from "@angular/core";
4
+ import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
5
+ import { BroadcastService } from "@arsedizioni/ars-utils/core";
7
6
  const SupportMessages = {
8
- /**
9
- * Messages
10
- */
11
- // Error
12
- ERROR: '§support-error',
13
- /**
14
- * The API is not answering.
15
- *
16
- * Nothing in this library emits it: Support has no interceptor of its own — its services reach
17
- * `HttpClient` directly — so the condition is detected by the host application, where its
18
- * requests are made. The constant lives here so that the three modules name the same event the
19
- * same way and one handler can serve them all.
20
- */
21
- ERROR_UNAVAILABLE: '§support-error-unavailable',
22
- // Login
23
- LOGIN_CHANGED: '§support-login-changed',
24
- LOGIN_COMPLETED: '§support-login-completed',
25
- LOGOUT_COMPLETED: '§support-logout-completed',
26
- LOGIN_PENDING: '§support-login-pending',
27
- LOGIN_FAILED: '§support-login-failed',
28
- LOGOUT: '§support-logout',
29
- // Notifications
30
- NOTIFICATION_READ: '§support-notification-read',
7
+ ERROR: "§support-error",
8
+ ERROR_UNAVAILABLE: "§support-error-unavailable",
9
+ LOGIN_CHANGED: "§support-login-changed",
10
+ LOGIN_COMPLETED: "§support-login-completed",
11
+ LOGOUT_COMPLETED: "§support-logout-completed",
12
+ LOGIN_PENDING: "§support-login-pending",
13
+ LOGIN_FAILED: "§support-login-failed",
14
+ LOGOUT: "§support-logout",
15
+ NOTIFICATION_READ: "§support-notification-read"
31
16
  };
32
-
33
17
  var SupportProduct;
34
- (function (SupportProduct) {
35
- SupportProduct[SupportProduct["None"] = 0] = "None";
36
- SupportProduct[SupportProduct["Clipper"] = 1] = "Clipper";
37
- SupportProduct[SupportProduct["Evolution"] = 2] = "Evolution";
38
- SupportProduct[SupportProduct["DGInfo"] = 4] = "DGInfo";
18
+ (function(SupportProduct) {
19
+ SupportProduct[SupportProduct["None"] = 0] = "None";
20
+ SupportProduct[SupportProduct["Clipper"] = 1] = "Clipper";
21
+ SupportProduct[SupportProduct["Evolution"] = 2] = "Evolution";
22
+ SupportProduct[SupportProduct["DGInfo"] = 4] = "DGInfo";
39
23
  })(SupportProduct || (SupportProduct = {}));
40
24
  var SupportProductModule;
41
- (function (SupportProductModule) {
42
- SupportProductModule[SupportProductModule["None"] = 0] = "None";
43
- SupportProductModule[SupportProductModule["EvoFormazione"] = 1] = "EvoFormazione";
44
- SupportProductModule[SupportProductModule["EvoDPI"] = 2] = "EvoDPI";
45
- SupportProductModule[SupportProductModule["EvoSorveglianzaSanitaria"] = 4] = "EvoSorveglianzaSanitaria";
46
- SupportProductModule[SupportProductModule["EvoRegistroEScadenzario"] = 8] = "EvoRegistroEScadenzario";
47
- SupportProductModule[SupportProductModule["EvoAttrezzatureEImpianti"] = 16] = "EvoAttrezzatureEImpianti";
48
- SupportProductModule[SupportProductModule["EvoMonitoraggio"] = 32] = "EvoMonitoraggio";
49
- SupportProductModule[SupportProductModule["EvoBollettino"] = 64] = "EvoBollettino";
50
- SupportProductModule[SupportProductModule["DgiADR"] = 128] = "DgiADR";
51
- SupportProductModule[SupportProductModule["DgiRID"] = 256] = "DgiRID";
52
- SupportProductModule[SupportProductModule["DgiIMDG"] = 512] = "DgiIMDG";
53
- SupportProductModule[SupportProductModule["DgiCLP"] = 1024] = "DgiCLP";
25
+ (function(SupportProductModule) {
26
+ SupportProductModule[SupportProductModule["None"] = 0] = "None";
27
+ SupportProductModule[SupportProductModule["EvoFormazione"] = 1] = "EvoFormazione";
28
+ SupportProductModule[SupportProductModule["EvoDPI"] = 2] = "EvoDPI";
29
+ SupportProductModule[SupportProductModule["EvoSorveglianzaSanitaria"] = 4] = "EvoSorveglianzaSanitaria";
30
+ SupportProductModule[SupportProductModule["EvoRegistroEScadenzario"] = 8] = "EvoRegistroEScadenzario";
31
+ SupportProductModule[SupportProductModule["EvoAttrezzatureEImpianti"] = 16] = "EvoAttrezzatureEImpianti";
32
+ SupportProductModule[SupportProductModule["EvoMonitoraggio"] = 32] = "EvoMonitoraggio";
33
+ SupportProductModule[SupportProductModule["EvoBollettino"] = 64] = "EvoBollettino";
34
+ SupportProductModule[SupportProductModule["DgiADR"] = 128] = "DgiADR";
35
+ SupportProductModule[SupportProductModule["DgiRID"] = 256] = "DgiRID";
36
+ SupportProductModule[SupportProductModule["DgiIMDG"] = 512] = "DgiIMDG";
37
+ SupportProductModule[SupportProductModule["DgiCLP"] = 1024] = "DgiCLP";
54
38
  })(SupportProductModule || (SupportProductModule = {}));
55
-
56
- /**
57
- * @internal
58
- * Private state container for the Support module.
59
- *
60
- * Intentionally NOT exported from the barrel: it must never be injected by
61
- * application code. Its state is re-published through {@link SupportService};
62
- * {@link NotificationsService} injects it to read the config and update the
63
- * unread-count signal.
64
- */
65
- class CoreService {
66
- constructor() {
67
- this._products = SupportProduct.None;
68
- this._productModules = SupportProductModule.None;
69
- /** Number of unread notifications, or `undefined` when there are none. */
70
- this.unreadNotifications = signal(undefined, /* @ts-ignore */
71
- ...(ngDevMode ? [{ debugName: "unreadNotifications" }] : /* istanbul ignore next */ []));
72
- }
73
- /**
74
- * Gets the base URI of the Support back-end service.
75
- * @returns The configured service URI, or undefined before initialize().
76
- */
77
- get serviceUri() {
78
- return this._serviceUri;
79
- }
80
- /**
81
- * Sets the base URI of the Support back-end service.
82
- * @param uri - The base URL.
83
- * @returns void
84
- */
85
- setServiceUri(uri) {
86
- this._serviceUri = uri;
87
- }
88
- /**
89
- * Gets the products bitmask used to scope notifications.
90
- * @returns The active {@link SupportProduct} bitmask.
91
- */
92
- get products() {
93
- return this._products;
94
- }
95
- /**
96
- * Sets the products bitmask used to scope notifications.
97
- * @param products - The products bitmask.
98
- * @returns void
99
- */
100
- setProducts(products) {
101
- this._products = products;
102
- }
103
- /**
104
- * Gets the product-modules bitmask used to scope notifications.
105
- * @returns The active {@link SupportProductModule} bitmask.
106
- */
107
- get productModules() {
108
- return this._productModules;
109
- }
110
- /**
111
- * Sets the product-modules bitmask used to scope notifications.
112
- * @param productModules - The product-modules bitmask.
113
- * @returns void
114
- */
115
- setProductModules(productModules) {
116
- this._productModules = productModules;
117
- }
118
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CoreService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
119
- static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.7", ngImport: i0, type: CoreService }); }
120
- }
121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: CoreService, decorators: [{
122
- type: Service
123
- }] });
124
-
125
- /**
126
- * Notifications service for the Support module: the unread-count tracking,
127
- * the notification queries and document download, plus the session bootstrap
128
- * (the `NOTIFICATION_READ` broadcast subscription). State lives in the
129
- * private {@link CoreService}.
130
- */
131
- class NotificationsService {
132
- constructor() {
133
- this.httpClient = inject(HttpClient);
134
- this.broadcastService = inject(BroadcastService);
135
- this.destroyRef = inject(DestroyRef);
136
- this.core = inject(CoreService);
137
- this.broadcastInitialized = false;
138
- }
139
- /**
140
- * Initialises the service with the back-end URI and the products/modules it should track.
141
- * Must be called once during application bootstrap before any other method.
142
- * @param serviceUri - Base URL of the support service.
143
- * @param products - Bitmask of `SupportProduct` values to scope notifications (default: `None`).
144
- * @param productModules - Bitmask of `SupportProductModule` values to scope notifications (default: `None`).
145
- * @returns void
146
- */
147
- initialize(serviceUri, products = SupportProduct.None, productModules = SupportProductModule.None) {
148
- this.core.setServiceUri(serviceUri);
149
- this.core.setProducts(products);
150
- this.core.setProductModules(productModules);
151
- if (!this.broadcastInitialized) {
152
- this.broadcastInitialized = true;
153
- this.broadcastService
154
- .getMessage()
155
- .pipe(takeUntilDestroyed(this.destroyRef))
156
- .subscribe((message) => {
157
- if (message.id === SupportMessages.NOTIFICATION_READ) {
158
- this.countUnreadNotifications();
159
- }
160
- });
161
- }
162
- }
163
- /**
164
- * Fetches the count of unread notifications from the server and updates
165
- * the `unreadNotifications` signal. Sets `undefined` when the count is zero.
166
- * @returns void
167
- */
168
- countUnreadNotifications() {
169
- this.httpClient
170
- .get(this.core.serviceUri +
171
- '/notifications/unread/?products=' + (this.core.products ?? 0) +
172
- '&modules=' + (this.core.productModules ?? 0))
173
- .subscribe((r) => {
174
- if (r.success) {
175
- this.core.unreadNotifications.set(r.value > 0 ? r.value : undefined);
176
- }
177
- });
178
- }
179
- /**
180
- * Queries the notification list using the supplied filter parameters.
181
- * The `products` and `productModules` fields are automatically populated
182
- * from the service configuration before the request is sent.
183
- * @param params - Search parameters for the notification query.
184
- * @returns An observable that emits `ApiResult<SupportNotificationsSearchResult>`.
185
- */
186
- queryNotifications(params) {
187
- params.products = this.core.products ?? 0;
188
- params.productModules = this.core.productModules ?? 0;
189
- return this.httpClient.post(this.core.serviceUri + '/notifications', params);
190
- }
191
- /**
192
- * Retrieves a single notification by id.
193
- * @param id - The notification id.
194
- * @returns An observable that emits `ApiResult<SupportNotificationInfo>`.
195
- */
196
- getNotification(id) {
197
- return this.httpClient.get(this.core.serviceUri + '/notifications/' + id);
198
- }
199
- /**
200
- * Marks one or more notifications as read.
201
- * @param params - Parameters identifying the notifications to mark.
202
- * @returns An observable that emits `ApiResult<boolean>`.
203
- */
204
- markNotifications(params) {
205
- return this.httpClient.post(this.core.serviceUri + '/notifications/mark', params);
206
- }
207
- /**
208
- * Downloads a notification attachment as a binary blob.
209
- * @param documentId - The id of the document to download.
210
- * @returns An observable that emits the binary blob response.
211
- */
212
- downloadNotificationDocument(documentId) {
213
- return this.httpClient.get(this.core.serviceUri + '/documents/download/' + documentId, { responseType: 'blob' });
214
- }
215
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NotificationsService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
216
- static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.7", ngImport: i0, type: NotificationsService }); }
217
- }
218
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: NotificationsService, decorators: [{
219
- type: Service
220
- }] });
221
-
222
- /**
223
- * Public entry point for the Support module.
224
- *
225
- * The private {@link CoreService} is never exposed; its state is re-published
226
- * here. All operations are reached through the namespaced sub-service:
227
- * - `support.notifications` — unread count, queries, mark, document download
228
- *
229
- * The facade itself exposes ONLY the re-published core state plus `initialize`
230
- * — it intentionally does NOT flatten the sub-service methods.
231
- */
232
- class SupportService {
233
- constructor() {
234
- /** Private: never exposed to consumers. */
235
- this.core = inject(CoreService);
236
- /** Notifications sub-service (unread count, queries, mark, downloads). */
237
- this.notifications = inject(NotificationsService);
238
- }
239
- // ── Re-published core state ─────────────────────────────────────────────────
240
- /**
241
- * Gets the base URI of the Support back-end service.
242
- * @returns The configured service URI, or undefined before initialize().
243
- */
244
- get serviceUri() { return this.core.serviceUri; }
245
- /**
246
- * Gets the products bitmask used to scope notifications.
247
- * @returns The active {@link SupportProduct} bitmask.
248
- */
249
- get products() { return this.core.products; }
250
- /**
251
- * Gets the product-modules bitmask used to scope notifications.
252
- * @returns The active {@link SupportProductModule} bitmask.
253
- */
254
- get productModules() { return this.core.productModules; }
255
- /** Number of unread notifications, or `undefined` when there are none. */
256
- get unreadNotifications() { return this.core.unreadNotifications; }
257
- // ── Lifecycle (the only flattened sub-service method) ───────────────────────
258
- /**
259
- * Initialises the service with the back-end URI and the products/modules to track.
260
- * @param serviceUri - Base URL of the support service.
261
- * @param products - Bitmask of `SupportProduct` values (default: `None`).
262
- * @param productModules - Bitmask of `SupportProductModule` values (default: `None`).
263
- * @returns void
264
- */
265
- initialize(serviceUri, products = SupportProduct.None, productModules = SupportProductModule.None) {
266
- this.notifications.initialize(serviceUri, products, productModules);
267
- }
268
- /**
269
- * Updates the unread notifications count by fetching it from the server and setting the `unreadNotifications` signal. Sets `undefined` when the count is zero.
270
- * @param products - Bitmask of `SupportProduct` values to scope the count (default: current value).
271
- * @param productModules - Bitmask of `SupportProductModule` values to scope the count (default: current value).
272
- * @returns void
273
- */
274
- setProducts(products, productModules) {
275
- this.core.setProducts(products);
276
- this.core.setProductModules(productModules);
277
- }
278
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SupportService, deps: [], target: i0.ɵɵFactoryTarget.Service }); }
279
- static { this.ɵprov = i0.ɵɵngDeclareService({ minVersion: "22.0.0", version: "22.1.7", ngImport: i0, type: SupportService }); }
280
- }
281
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.7", ngImport: i0, type: SupportService, decorators: [{
282
- type: Service
283
- }] });
284
-
285
- // Public barrel for the Support services.
286
- //
287
- // CoreService is intentionally NOT exported: it is private/internal and must
288
- // never be injected directly. Consumers use SupportService (the facade, with
289
- // the namespaced `notifications` sub-service and the re-published core state)
290
- // or the NotificationsService directly in size-sensitive code.
291
-
292
- /*
293
- * Public API Surface of @arsedizioni/ars-utils/support.common
294
- */
295
-
296
- /**
297
- * Generated bundle index. Do not edit.
298
- */
299
-
39
+ var CoreService = class CoreService {
40
+ constructor() {
41
+ this._products = SupportProduct.None;
42
+ this._productModules = SupportProductModule.None;
43
+ this.unreadNotifications = signal(void 0, ...ngDevMode ? [{ debugName: "unreadNotifications" }] : /* istanbul ignore next */ []);
44
+ }
45
+ get serviceUri() {
46
+ return this._serviceUri;
47
+ }
48
+ setServiceUri(uri) {
49
+ this._serviceUri = uri;
50
+ }
51
+ get products() {
52
+ return this._products;
53
+ }
54
+ setProducts(products) {
55
+ this._products = products;
56
+ }
57
+ get productModules() {
58
+ return this._productModules;
59
+ }
60
+ setProductModules(productModules) {
61
+ this._productModules = productModules;
62
+ }
63
+ static {
64
+ this.ɵfac = i0.ɵɵngDeclareFactory({
65
+ minVersion: "12.0.0",
66
+ version: "22.2.1",
67
+ ngImport: i0,
68
+ type: CoreService,
69
+ deps: [],
70
+ target: i0.ɵɵFactoryTarget.Service
71
+ });
72
+ }
73
+ static {
74
+ this.ɵprov = i0.ɵɵngDeclareService({
75
+ minVersion: "22.0.0",
76
+ version: "22.2.1",
77
+ ngImport: i0,
78
+ type: CoreService
79
+ });
80
+ }
81
+ };
82
+ i0.ɵɵngDeclareClassMetadata({
83
+ minVersion: "12.0.0",
84
+ version: "22.2.1",
85
+ ngImport: i0,
86
+ type: CoreService,
87
+ decorators: [{ type: Service }]
88
+ });
89
+ var NotificationsService = class NotificationsService {
90
+ constructor() {
91
+ this.httpClient = inject(HttpClient);
92
+ this.broadcastService = inject(BroadcastService);
93
+ this.destroyRef = inject(DestroyRef);
94
+ this.core = inject(CoreService);
95
+ this.broadcastInitialized = false;
96
+ }
97
+ initialize(serviceUri, products = SupportProduct.None, productModules = SupportProductModule.None) {
98
+ this.core.setServiceUri(serviceUri);
99
+ this.core.setProducts(products);
100
+ this.core.setProductModules(productModules);
101
+ if (!this.broadcastInitialized) {
102
+ this.broadcastInitialized = true;
103
+ this.broadcastService.getMessage().pipe(takeUntilDestroyed(this.destroyRef)).subscribe((message) => {
104
+ if (message.id === SupportMessages.NOTIFICATION_READ) this.countUnreadNotifications();
105
+ });
106
+ }
107
+ }
108
+ countUnreadNotifications() {
109
+ this.httpClient.get(this.core.serviceUri + "/notifications/unread/?products=" + (this.core.products ?? 0) + "&modules=" + (this.core.productModules ?? 0)).subscribe((r) => {
110
+ if (r.success) this.core.unreadNotifications.set(r.value > 0 ? r.value : void 0);
111
+ });
112
+ }
113
+ queryNotifications(params) {
114
+ params.products = this.core.products ?? 0;
115
+ params.productModules = this.core.productModules ?? 0;
116
+ return this.httpClient.post(this.core.serviceUri + "/notifications", params);
117
+ }
118
+ getNotification(id) {
119
+ return this.httpClient.get(this.core.serviceUri + "/notifications/" + id);
120
+ }
121
+ markNotifications(params) {
122
+ return this.httpClient.post(this.core.serviceUri + "/notifications/mark", params);
123
+ }
124
+ downloadNotificationDocument(documentId) {
125
+ return this.httpClient.get(this.core.serviceUri + "/documents/download/" + documentId, { responseType: "blob" });
126
+ }
127
+ static {
128
+ this.ɵfac = i0.ɵɵngDeclareFactory({
129
+ minVersion: "12.0.0",
130
+ version: "22.2.1",
131
+ ngImport: i0,
132
+ type: NotificationsService,
133
+ deps: [],
134
+ target: i0.ɵɵFactoryTarget.Service
135
+ });
136
+ }
137
+ static {
138
+ this.ɵprov = i0.ɵɵngDeclareService({
139
+ minVersion: "22.0.0",
140
+ version: "22.2.1",
141
+ ngImport: i0,
142
+ type: NotificationsService
143
+ });
144
+ }
145
+ };
146
+ i0.ɵɵngDeclareClassMetadata({
147
+ minVersion: "12.0.0",
148
+ version: "22.2.1",
149
+ ngImport: i0,
150
+ type: NotificationsService,
151
+ decorators: [{ type: Service }]
152
+ });
153
+ var SupportService = class SupportService {
154
+ constructor() {
155
+ this.core = inject(CoreService);
156
+ this.notifications = inject(NotificationsService);
157
+ }
158
+ get serviceUri() {
159
+ return this.core.serviceUri;
160
+ }
161
+ get products() {
162
+ return this.core.products;
163
+ }
164
+ get productModules() {
165
+ return this.core.productModules;
166
+ }
167
+ get unreadNotifications() {
168
+ return this.core.unreadNotifications;
169
+ }
170
+ initialize(serviceUri, products = SupportProduct.None, productModules = SupportProductModule.None) {
171
+ this.notifications.initialize(serviceUri, products, productModules);
172
+ }
173
+ setProducts(products, productModules) {
174
+ this.core.setProducts(products);
175
+ this.core.setProductModules(productModules);
176
+ }
177
+ static {
178
+ this.ɵfac = i0.ɵɵngDeclareFactory({
179
+ minVersion: "12.0.0",
180
+ version: "22.2.1",
181
+ ngImport: i0,
182
+ type: SupportService,
183
+ deps: [],
184
+ target: i0.ɵɵFactoryTarget.Service
185
+ });
186
+ }
187
+ static {
188
+ this.ɵprov = i0.ɵɵngDeclareService({
189
+ minVersion: "22.0.0",
190
+ version: "22.2.1",
191
+ ngImport: i0,
192
+ type: SupportService
193
+ });
194
+ }
195
+ };
196
+ i0.ɵɵngDeclareClassMetadata({
197
+ minVersion: "12.0.0",
198
+ version: "22.2.1",
199
+ ngImport: i0,
200
+ type: SupportService,
201
+ decorators: [{ type: Service }]
202
+ });
300
203
  export { NotificationsService, SupportMessages, SupportProduct, SupportProductModule, SupportService };
301
- //# sourceMappingURL=arsedizioni-ars-utils-support.common.mjs.map
204
+
205
+ //# sourceMappingURL=arsedizioni-ars-utils-support.common.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"arsedizioni-ars-utils-support.common.mjs","sources":["../../../projects/ars-utils/support.common/messages.ts","../../../projects/ars-utils/support.common/definitions.ts","../../../projects/ars-utils/support.common/services/core.service.ts","../../../projects/ars-utils/support.common/services/notifications.service.ts","../../../projects/ars-utils/support.common/services/support.service.ts","../../../projects/ars-utils/support.common/services/index.ts","../../../projects/ars-utils/support.common/public_api.ts","../../../projects/ars-utils/support.common/arsedizioni-ars-utils-support.common.ts"],"sourcesContent":["export const SupportMessages = {\n /**\n * Messages\n */\n // Error\n ERROR: '§support-error',\n\n /**\n * The API is not answering.\n *\n * Nothing in this library emits it: Support has no interceptor of its own — its services reach\n * `HttpClient` directly — so the condition is detected by the host application, where its\n * requests are made. The constant lives here so that the three modules name the same event the\n * same way and one handler can serve them all.\n */\n ERROR_UNAVAILABLE: '§support-error-unavailable',\n\n // Login\n LOGIN_CHANGED: '§support-login-changed',\n LOGIN_COMPLETED: '§support-login-completed',\n LOGOUT_COMPLETED: '§support-logout-completed',\n LOGIN_PENDING: '§support-login-pending',\n LOGIN_FAILED: '§support-login-failed', \n LOGOUT: '§support-logout',\n\n // Notifications\n NOTIFICATION_READ: '§support-notification-read',\n};\n","import { LoginOAuthType, LoginResult } from '@arsedizioni/ars-utils/core';\n\n\n\nexport interface SupportUserInfo {\n id: number;\n groups?: number;\n groupNames?: string;\n displayName?: string;\n dashboard?: string;\n sessionId?: string;\n email?: string;\n customerId?: number;\n companyName?: string;\n role: number;\n scopes?: string[];\n sla: number;\n isCommercial?: boolean;\n isAdministrator: boolean;\n isGuest: boolean;\n isUser: boolean;\n isOperator: boolean;\n isTemporary: boolean;\n}\n\n\nexport interface SupportLoginResult extends LoginResult<SupportUserInfo> {\n}\n\nexport interface SupportLoginInfo {\n context: SupportUserInfo;\n oauth?: LoginOAuthType;\n remember?: boolean;\n}\n\nexport interface SupportNotificationsSearchParams {\n any?: string;\n products?: number;\n productModules?: number;\n first?: number;\n count?: number;\n}\n\nexport interface SupportNotificationsSearchResult {\n interval?: string;\n items?: SupportNotificationInfo[];\n total?: number;\n}\n\nexport interface Notification {\n id: number;\n products: number;\n productModules?: number;\n publishingDate?: Date;\n title: string;\n text: string;\n state: number;\n created: Date;\n createdBy: string;\n lastUpdated?: Date;\n lastUpdatedBy?: string;\n productNames?: string;\n productModuleNames?: string;\n isPublished: boolean;\n isInternal: boolean;\n stateName: string;\n documents?: SupportDocumentInfo[];\n isRead: boolean;\n totalRead: number;\n}\n\nexport interface SupportDocumentInfo {\n id?: number;\n origin?: number;\n ownerId?: number;\n name?: string;\n description?: string;\n size?: number;\n binaryId?: number;\n url?: string;\n customerId?: number;\n created?: Date;\n createdBy?: string;\n lastUpdated?: Date;\n lastUpdatedBy?: string;\n isBinary?: boolean;\n}\n\nexport interface SupportNotificationInfo {\n id: number;\n products?: number;\n productModules?: number;\n publishingDate?: Date;\n title: string;\n text: string;\n state: number;\n created: Date;\n createdBy: string;\n lastUpdated?: Date;\n lastUpdatedBy?: string;\n productNames?: string;\n productModuleNames?: string;\n isPublished: boolean;\n isInternal: boolean;\n stateName: string;\n documents?: SupportDocumentInfo[];\n isRead: boolean;\n totalRead: number;\n isMenuOpen?: boolean;\n isOver?: boolean;\n\n}\n\nexport interface SupportNotificationsMarkParams {\n ids: number[];\n unmark: boolean;\n}\n\nexport enum SupportProduct {\n None = 0,\n Clipper = 1,\n Evolution = 1 << 1,\n DGInfo = 1 << 2\n}\n\nexport enum SupportProductModule {\n None = 0,\n EvoFormazione = 1,\n EvoDPI = 1 << 1,\n EvoSorveglianzaSanitaria = 1 << 2,\n EvoRegistroEScadenzario = 1 << 3,\n EvoAttrezzatureEImpianti = 1 << 4,\n EvoMonitoraggio = 1 << 5,\n EvoBollettino = 1 << 6,\n DgiADR = 1 << 7,\n DgiRID = 1 << 8,\n DgiIMDG = 1 << 9,\n DgiCLP = 1 << 10,\n}\n","import { Service, WritableSignal, signal } from '@angular/core';\nimport { SupportProduct, SupportProductModule } from '../definitions';\n\n/**\n * @internal\n * Private state container for the Support module.\n *\n * Intentionally NOT exported from the barrel: it must never be injected by\n * application code. Its state is re-published through {@link SupportService};\n * {@link NotificationsService} injects it to read the config and update the\n * unread-count signal.\n */\n@Service()\nexport class CoreService {\n\n private _serviceUri: string | undefined;\n /**\n * Gets the base URI of the Support back-end service.\n * @returns The configured service URI, or undefined before initialize().\n */\n get serviceUri(): string | undefined {\n return this._serviceUri;\n }\n /**\n * Sets the base URI of the Support back-end service.\n * @param uri - The base URL.\n * @returns void\n */\n setServiceUri(uri: string): void {\n this._serviceUri = uri;\n }\n\n private _products: SupportProduct = SupportProduct.None;\n /**\n * Gets the products bitmask used to scope notifications.\n * @returns The active {@link SupportProduct} bitmask.\n */\n get products(): SupportProduct {\n return this._products;\n }\n /**\n * Sets the products bitmask used to scope notifications.\n * @param products - The products bitmask.\n * @returns void\n */\n setProducts(products: SupportProduct): void {\n this._products = products;\n }\n\n private _productModules: SupportProductModule = SupportProductModule.None;\n /**\n * Gets the product-modules bitmask used to scope notifications.\n * @returns The active {@link SupportProductModule} bitmask.\n */\n get productModules(): SupportProductModule {\n return this._productModules;\n }\n /**\n * Sets the product-modules bitmask used to scope notifications.\n * @param productModules - The product-modules bitmask.\n * @returns void\n */\n setProductModules(productModules: SupportProductModule): void {\n this._productModules = productModules;\n }\n\n /** Number of unread notifications, or `undefined` when there are none. */\n public readonly unreadNotifications: WritableSignal<number | undefined> = signal<number | undefined>(undefined);\n}\n","import { HttpClient } from '@angular/common/http';\nimport { DestroyRef, Service, inject } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ApiResult, BroadcastMessageInfo, BroadcastService } from '@arsedizioni/ars-utils/core';\nimport { SupportMessages } from '../messages';\nimport {\n SupportNotificationInfo, SupportNotificationsMarkParams, SupportNotificationsSearchParams,\n SupportNotificationsSearchResult, SupportProduct, SupportProductModule\n} from '../definitions';\nimport { CoreService } from './core.service';\n\n/**\n * Notifications service for the Support module: the unread-count tracking,\n * the notification queries and document download, plus the session bootstrap\n * (the `NOTIFICATION_READ` broadcast subscription). State lives in the\n * private {@link CoreService}.\n */\n@Service()\nexport class NotificationsService {\n\n private readonly httpClient = inject(HttpClient);\n private readonly broadcastService = inject(BroadcastService);\n private readonly destroyRef = inject(DestroyRef);\n private readonly core = inject(CoreService);\n\n private broadcastInitialized = false;\n\n /**\n * Initialises the service with the back-end URI and the products/modules it should track.\n * Must be called once during application bootstrap before any other method.\n * @param serviceUri - Base URL of the support service.\n * @param products - Bitmask of `SupportProduct` values to scope notifications (default: `None`).\n * @param productModules - Bitmask of `SupportProductModule` values to scope notifications (default: `None`).\n * @returns void\n */\n initialize(\n serviceUri: string,\n products: SupportProduct = SupportProduct.None,\n productModules: SupportProductModule = SupportProductModule.None\n ): void {\n this.core.setServiceUri(serviceUri);\n this.core.setProducts(products);\n this.core.setProductModules(productModules);\n\n if (!this.broadcastInitialized) {\n this.broadcastInitialized = true;\n this.broadcastService\n .getMessage()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((message: BroadcastMessageInfo) => {\n if (message.id === SupportMessages.NOTIFICATION_READ) {\n this.countUnreadNotifications();\n }\n });\n }\n }\n\n /**\n * Fetches the count of unread notifications from the server and updates\n * the `unreadNotifications` signal. Sets `undefined` when the count is zero.\n * @returns void\n */\n countUnreadNotifications(): void {\n this.httpClient\n .get<ApiResult<number>>(\n this.core.serviceUri +\n '/notifications/unread/?products=' + (this.core.products ?? 0) +\n '&modules=' + (this.core.productModules ?? 0)\n )\n .subscribe((r: ApiResult<number>) => {\n if (r.success) {\n this.core.unreadNotifications.set(r.value > 0 ? r.value : undefined);\n }\n });\n }\n\n /**\n * Queries the notification list using the supplied filter parameters.\n * The `products` and `productModules` fields are automatically populated\n * from the service configuration before the request is sent.\n * @param params - Search parameters for the notification query.\n * @returns An observable that emits `ApiResult<SupportNotificationsSearchResult>`.\n */\n queryNotifications(params: SupportNotificationsSearchParams) {\n params.products = this.core.products ?? 0;\n params.productModules = this.core.productModules ?? 0;\n return this.httpClient.post<ApiResult<SupportNotificationsSearchResult>>(\n this.core.serviceUri + '/notifications',\n params\n );\n }\n\n /**\n * Retrieves a single notification by id.\n * @param id - The notification id.\n * @returns An observable that emits `ApiResult<SupportNotificationInfo>`.\n */\n getNotification(id: number) {\n return this.httpClient.get<ApiResult<SupportNotificationInfo>>(\n this.core.serviceUri + '/notifications/' + id\n );\n }\n\n /**\n * Marks one or more notifications as read.\n * @param params - Parameters identifying the notifications to mark.\n * @returns An observable that emits `ApiResult<boolean>`.\n */\n markNotifications(params: SupportNotificationsMarkParams) {\n return this.httpClient.post<ApiResult<boolean>>(\n this.core.serviceUri + '/notifications/mark',\n params\n );\n }\n\n /**\n * Downloads a notification attachment as a binary blob.\n * @param documentId - The id of the document to download.\n * @returns An observable that emits the binary blob response.\n */\n downloadNotificationDocument(documentId: number) {\n return this.httpClient.get(\n this.core.serviceUri + '/documents/download/' + documentId,\n { responseType: 'blob' }\n );\n }\n}\n","import { Service, Signal, inject } from '@angular/core';\nimport { SupportProduct, SupportProductModule } from '../definitions';\nimport { CoreService } from './core.service';\nimport { NotificationsService } from './notifications.service';\n\n/**\n * Public entry point for the Support module.\n *\n * The private {@link CoreService} is never exposed; its state is re-published\n * here. All operations are reached through the namespaced sub-service:\n * - `support.notifications` — unread count, queries, mark, document download\n *\n * The facade itself exposes ONLY the re-published core state plus `initialize`\n * — it intentionally does NOT flatten the sub-service methods.\n */\n@Service()\nexport class SupportService {\n\n /** Private: never exposed to consumers. */\n private readonly core = inject(CoreService);\n\n /** Notifications sub-service (unread count, queries, mark, downloads). */\n readonly notifications = inject(NotificationsService);\n\n // ── Re-published core state ─────────────────────────────────────────────────\n\n /**\n * Gets the base URI of the Support back-end service.\n * @returns The configured service URI, or undefined before initialize().\n */\n get serviceUri(): string | undefined { return this.core.serviceUri; }\n\n /**\n * Gets the products bitmask used to scope notifications.\n * @returns The active {@link SupportProduct} bitmask.\n */\n get products(): SupportProduct { return this.core.products; }\n\n /**\n * Gets the product-modules bitmask used to scope notifications.\n * @returns The active {@link SupportProductModule} bitmask.\n */\n get productModules(): SupportProductModule { return this.core.productModules; }\n\n /** Number of unread notifications, or `undefined` when there are none. */\n get unreadNotifications(): Signal<number | undefined> { return this.core.unreadNotifications; }\n\n // ── Lifecycle (the only flattened sub-service method) ───────────────────────\n\n /**\n * Initialises the service with the back-end URI and the products/modules to track.\n * @param serviceUri - Base URL of the support service.\n * @param products - Bitmask of `SupportProduct` values (default: `None`).\n * @param productModules - Bitmask of `SupportProductModule` values (default: `None`).\n * @returns void\n */\n initialize(\n serviceUri: string,\n products: SupportProduct = SupportProduct.None,\n productModules: SupportProductModule = SupportProductModule.None\n ): void {\n this.notifications.initialize(serviceUri, products, productModules);\n }\n\n /**\n * Updates the unread notifications count by fetching it from the server and setting the `unreadNotifications` signal. Sets `undefined` when the count is zero.\n * @param products - Bitmask of `SupportProduct` values to scope the count (default: current value).\n * @param productModules - Bitmask of `SupportProductModule` values to scope the count (default: current value).\n * @returns void\n */\n setProducts(products: SupportProduct, productModules: SupportProductModule): void {\n this.core.setProducts(products);\n this.core.setProductModules(productModules);\n }\n}\n","// Public barrel for the Support services.\n//\n// CoreService is intentionally NOT exported: it is private/internal and must\n// never be injected directly. Consumers use SupportService (the facade, with\n// the namespaced `notifications` sub-service and the re-published core state)\n// or the NotificationsService directly in size-sensitive code.\nexport * from './notifications.service';\nexport * from './support.service';\n","/*\n * Public API Surface of @arsedizioni/ars-utils/support.common\n */\nexport * from './messages';\nexport * from './definitions';\nexport * from './services/index';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAAO,MAAM,eAAe,GAAG;AAC7B;;AAEG;;AAEH,IAAA,KAAK,EAAE,gBAAgB;AAEvB;;;;;;;AAOG;AACH,IAAA,iBAAiB,EAAE,4BAA4B;;AAG/C,IAAA,aAAa,EAAE,wBAAwB;AACvC,IAAA,eAAe,EAAE,0BAA0B;AAC3C,IAAA,gBAAgB,EAAE,2BAA2B;AAC7C,IAAA,aAAa,EAAE,wBAAwB;AACvC,IAAA,YAAY,EAAE,uBAAuB;AACrC,IAAA,MAAM,EAAE,iBAAiB;;AAGzB,IAAA,iBAAiB,EAAE,4BAA4B;;;IC4FrC;AAAZ,CAAA,UAAY,cAAc,EAAA;AACtB,IAAA,cAAA,CAAA,cAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;AACR,IAAA,cAAA,CAAA,cAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAW;AACX,IAAA,cAAA,CAAA,cAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAkB;AAClB,IAAA,cAAA,CAAA,cAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAe;AACnB,CAAC,EALW,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;IAOd;AAAZ,CAAA,UAAY,oBAAoB,EAAA;AAC5B,IAAA,oBAAA,CAAA,oBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;AACR,IAAA,oBAAA,CAAA,oBAAA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QAAQ,CAAC,CAAC;AAE5D;;;AAGG;IACH,IAAI,cAAc,GAAA,EAA2B,OAAO,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;;IAG9E,IAAI,mBAAmB,GAAA,EAAiC,OAAO,IAAI,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;;AAI9F;;;;;;AAMG;IACH,UAAU,CACR,UAAkB,EAClB,QAAA,GAA2B,cAAc,CAAC,IAAI,EAC9C,cAAA,GAAuC,oBAAoB,CAAC,IAAI,EAAA;QAEhE,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,UAAU,EAAE,QAAQ,EAAE,cAAc,CAAC;IACrE;AAEA;;;;;AAKG;IACH,WAAW,CAAC,QAAwB,EAAE,cAAoC,EAAA;AACxE,QAAA,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC;AAC/B,QAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,CAAC,cAAc,CAAC;IAC7C;8GAzDW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,OAAA,EAAA,CAAA,CAAA;+GAAd,cAAc,EAAA,CAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B;;;ACfD;AACA;AACA;AACA;AACA;AACA;;ACLA;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"arsedizioni-ars-utils-support.common.mjs","names":[],"sources":["../../../projects/ars-utils/support.common/messages.ts","../../../projects/ars-utils/support.common/definitions.ts","../../../projects/ars-utils/support.common/services/core.service.ts","../../../projects/ars-utils/support.common/services/notifications.service.ts","../../../projects/ars-utils/support.common/services/support.service.ts"],"sourcesContent":["export const SupportMessages = {\n /**\n * Messages\n */\n // Error\n ERROR: '§support-error',\n\n /**\n * The API is not answering.\n *\n * Nothing in this library emits it: Support has no interceptor of its own — its services reach\n * `HttpClient` directly — so the condition is detected by the host application, where its\n * requests are made. The constant lives here so that the three modules name the same event the\n * same way and one handler can serve them all.\n */\n ERROR_UNAVAILABLE: '§support-error-unavailable',\n\n // Login\n LOGIN_CHANGED: '§support-login-changed',\n LOGIN_COMPLETED: '§support-login-completed',\n LOGOUT_COMPLETED: '§support-logout-completed',\n LOGIN_PENDING: '§support-login-pending',\n LOGIN_FAILED: '§support-login-failed', \n LOGOUT: '§support-logout',\n\n // Notifications\n NOTIFICATION_READ: '§support-notification-read',\n};\n","import { LoginOAuthType, LoginResult } from '@arsedizioni/ars-utils/core';\n\n\n\nexport interface SupportUserInfo {\n id: number;\n groups?: number;\n groupNames?: string;\n displayName?: string;\n dashboard?: string;\n sessionId?: string;\n email?: string;\n customerId?: number;\n companyName?: string;\n role: number;\n scopes?: string[];\n sla: number;\n isCommercial?: boolean;\n isAdministrator: boolean;\n isGuest: boolean;\n isUser: boolean;\n isOperator: boolean;\n isTemporary: boolean;\n}\n\n\nexport interface SupportLoginResult extends LoginResult<SupportUserInfo> {\n}\n\nexport interface SupportLoginInfo {\n context: SupportUserInfo;\n oauth?: LoginOAuthType;\n remember?: boolean;\n}\n\nexport interface SupportNotificationsSearchParams {\n any?: string;\n products?: number;\n productModules?: number;\n first?: number;\n count?: number;\n}\n\nexport interface SupportNotificationsSearchResult {\n interval?: string;\n items?: SupportNotificationInfo[];\n total?: number;\n}\n\nexport interface Notification {\n id: number;\n products: number;\n productModules?: number;\n publishingDate?: Date;\n title: string;\n text: string;\n state: number;\n created: Date;\n createdBy: string;\n lastUpdated?: Date;\n lastUpdatedBy?: string;\n productNames?: string;\n productModuleNames?: string;\n isPublished: boolean;\n isInternal: boolean;\n stateName: string;\n documents?: SupportDocumentInfo[];\n isRead: boolean;\n totalRead: number;\n}\n\nexport interface SupportDocumentInfo {\n id?: number;\n origin?: number;\n ownerId?: number;\n name?: string;\n description?: string;\n size?: number;\n binaryId?: number;\n url?: string;\n customerId?: number;\n created?: Date;\n createdBy?: string;\n lastUpdated?: Date;\n lastUpdatedBy?: string;\n isBinary?: boolean;\n}\n\nexport interface SupportNotificationInfo {\n id: number;\n products?: number;\n productModules?: number;\n publishingDate?: Date;\n title: string;\n text: string;\n state: number;\n created: Date;\n createdBy: string;\n lastUpdated?: Date;\n lastUpdatedBy?: string;\n productNames?: string;\n productModuleNames?: string;\n isPublished: boolean;\n isInternal: boolean;\n stateName: string;\n documents?: SupportDocumentInfo[];\n isRead: boolean;\n totalRead: number;\n isMenuOpen?: boolean;\n isOver?: boolean;\n\n}\n\nexport interface SupportNotificationsMarkParams {\n ids: number[];\n unmark: boolean;\n}\n\nexport enum SupportProduct {\n None = 0,\n Clipper = 1,\n Evolution = 1 << 1,\n DGInfo = 1 << 2\n}\n\nexport enum SupportProductModule {\n None = 0,\n EvoFormazione = 1,\n EvoDPI = 1 << 1,\n EvoSorveglianzaSanitaria = 1 << 2,\n EvoRegistroEScadenzario = 1 << 3,\n EvoAttrezzatureEImpianti = 1 << 4,\n EvoMonitoraggio = 1 << 5,\n EvoBollettino = 1 << 6,\n DgiADR = 1 << 7,\n DgiRID = 1 << 8,\n DgiIMDG = 1 << 9,\n DgiCLP = 1 << 10,\n}\n","import { Service, WritableSignal, signal } from '@angular/core';\nimport { SupportProduct, SupportProductModule } from '../definitions';\n\n/**\n * @internal\n * Private state container for the Support module.\n *\n * Intentionally NOT exported from the barrel: it must never be injected by\n * application code. Its state is re-published through {@link SupportService};\n * {@link NotificationsService} injects it to read the config and update the\n * unread-count signal.\n */\n@Service()\nexport class CoreService {\n\n private _serviceUri: string | undefined;\n /**\n * Gets the base URI of the Support back-end service.\n * @returns The configured service URI, or undefined before initialize().\n */\n get serviceUri(): string | undefined {\n return this._serviceUri;\n }\n /**\n * Sets the base URI of the Support back-end service.\n * @param uri - The base URL.\n * @returns void\n */\n setServiceUri(uri: string): void {\n this._serviceUri = uri;\n }\n\n private _products: SupportProduct = SupportProduct.None;\n /**\n * Gets the products bitmask used to scope notifications.\n * @returns The active {@link SupportProduct} bitmask.\n */\n get products(): SupportProduct {\n return this._products;\n }\n /**\n * Sets the products bitmask used to scope notifications.\n * @param products - The products bitmask.\n * @returns void\n */\n setProducts(products: SupportProduct): void {\n this._products = products;\n }\n\n private _productModules: SupportProductModule = SupportProductModule.None;\n /**\n * Gets the product-modules bitmask used to scope notifications.\n * @returns The active {@link SupportProductModule} bitmask.\n */\n get productModules(): SupportProductModule {\n return this._productModules;\n }\n /**\n * Sets the product-modules bitmask used to scope notifications.\n * @param productModules - The product-modules bitmask.\n * @returns void\n */\n setProductModules(productModules: SupportProductModule): void {\n this._productModules = productModules;\n }\n\n /** Number of unread notifications, or `undefined` when there are none. */\n public readonly unreadNotifications: WritableSignal<number | undefined> = signal<number | undefined>(undefined);\n}\n","import { HttpClient } from '@angular/common/http';\nimport { DestroyRef, Service, inject } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ApiResult, BroadcastMessageInfo, BroadcastService } from '@arsedizioni/ars-utils/core';\nimport { SupportMessages } from '../messages';\nimport {\n SupportNotificationInfo, SupportNotificationsMarkParams, SupportNotificationsSearchParams,\n SupportNotificationsSearchResult, SupportProduct, SupportProductModule\n} from '../definitions';\nimport { CoreService } from './core.service';\n\n/**\n * Notifications service for the Support module: the unread-count tracking,\n * the notification queries and document download, plus the session bootstrap\n * (the `NOTIFICATION_READ` broadcast subscription). State lives in the\n * private {@link CoreService}.\n */\n@Service()\nexport class NotificationsService {\n\n private readonly httpClient = inject(HttpClient);\n private readonly broadcastService = inject(BroadcastService);\n private readonly destroyRef = inject(DestroyRef);\n private readonly core = inject(CoreService);\n\n private broadcastInitialized = false;\n\n /**\n * Initialises the service with the back-end URI and the products/modules it should track.\n * Must be called once during application bootstrap before any other method.\n * @param serviceUri - Base URL of the support service.\n * @param products - Bitmask of `SupportProduct` values to scope notifications (default: `None`).\n * @param productModules - Bitmask of `SupportProductModule` values to scope notifications (default: `None`).\n * @returns void\n */\n initialize(\n serviceUri: string,\n products: SupportProduct = SupportProduct.None,\n productModules: SupportProductModule = SupportProductModule.None\n ): void {\n this.core.setServiceUri(serviceUri);\n this.core.setProducts(products);\n this.core.setProductModules(productModules);\n\n if (!this.broadcastInitialized) {\n this.broadcastInitialized = true;\n this.broadcastService\n .getMessage()\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe((message: BroadcastMessageInfo) => {\n if (message.id === SupportMessages.NOTIFICATION_READ) {\n this.countUnreadNotifications();\n }\n });\n }\n }\n\n /**\n * Fetches the count of unread notifications from the server and updates\n * the `unreadNotifications` signal. Sets `undefined` when the count is zero.\n * @returns void\n */\n countUnreadNotifications(): void {\n this.httpClient\n .get<ApiResult<number>>(\n this.core.serviceUri +\n '/notifications/unread/?products=' + (this.core.products ?? 0) +\n '&modules=' + (this.core.productModules ?? 0)\n )\n .subscribe((r: ApiResult<number>) => {\n if (r.success) {\n this.core.unreadNotifications.set(r.value > 0 ? r.value : undefined);\n }\n });\n }\n\n /**\n * Queries the notification list using the supplied filter parameters.\n * The `products` and `productModules` fields are automatically populated\n * from the service configuration before the request is sent.\n * @param params - Search parameters for the notification query.\n * @returns An observable that emits `ApiResult<SupportNotificationsSearchResult>`.\n */\n queryNotifications(params: SupportNotificationsSearchParams) {\n params.products = this.core.products ?? 0;\n params.productModules = this.core.productModules ?? 0;\n return this.httpClient.post<ApiResult<SupportNotificationsSearchResult>>(\n this.core.serviceUri + '/notifications',\n params\n );\n }\n\n /**\n * Retrieves a single notification by id.\n * @param id - The notification id.\n * @returns An observable that emits `ApiResult<SupportNotificationInfo>`.\n */\n getNotification(id: number) {\n return this.httpClient.get<ApiResult<SupportNotificationInfo>>(\n this.core.serviceUri + '/notifications/' + id\n );\n }\n\n /**\n * Marks one or more notifications as read.\n * @param params - Parameters identifying the notifications to mark.\n * @returns An observable that emits `ApiResult<boolean>`.\n */\n markNotifications(params: SupportNotificationsMarkParams) {\n return this.httpClient.post<ApiResult<boolean>>(\n this.core.serviceUri + '/notifications/mark',\n params\n );\n }\n\n /**\n * Downloads a notification attachment as a binary blob.\n * @param documentId - The id of the document to download.\n * @returns An observable that emits the binary blob response.\n */\n downloadNotificationDocument(documentId: number) {\n return this.httpClient.get(\n this.core.serviceUri + '/documents/download/' + documentId,\n { responseType: 'blob' }\n );\n }\n}\n","import { Service, Signal, inject } from '@angular/core';\nimport { SupportProduct, SupportProductModule } from '../definitions';\nimport { CoreService } from './core.service';\nimport { NotificationsService } from './notifications.service';\n\n/**\n * Public entry point for the Support module.\n *\n * The private {@link CoreService} is never exposed; its state is re-published\n * here. All operations are reached through the namespaced sub-service:\n * - `support.notifications` — unread count, queries, mark, document download\n *\n * The facade itself exposes ONLY the re-published core state plus `initialize`\n * — it intentionally does NOT flatten the sub-service methods.\n */\n@Service()\nexport class SupportService {\n\n /** Private: never exposed to consumers. */\n private readonly core = inject(CoreService);\n\n /** Notifications sub-service (unread count, queries, mark, downloads). */\n readonly notifications = inject(NotificationsService);\n\n // ── Re-published core state ─────────────────────────────────────────────────\n\n /**\n * Gets the base URI of the Support back-end service.\n * @returns The configured service URI, or undefined before initialize().\n */\n get serviceUri(): string | undefined { return this.core.serviceUri; }\n\n /**\n * Gets the products bitmask used to scope notifications.\n * @returns The active {@link SupportProduct} bitmask.\n */\n get products(): SupportProduct { return this.core.products; }\n\n /**\n * Gets the product-modules bitmask used to scope notifications.\n * @returns The active {@link SupportProductModule} bitmask.\n */\n get productModules(): SupportProductModule { return this.core.productModules; }\n\n /** Number of unread notifications, or `undefined` when there are none. */\n get unreadNotifications(): Signal<number | undefined> { return this.core.unreadNotifications; }\n\n // ── Lifecycle (the only flattened sub-service method) ───────────────────────\n\n /**\n * Initialises the service with the back-end URI and the products/modules to track.\n * @param serviceUri - Base URL of the support service.\n * @param products - Bitmask of `SupportProduct` values (default: `None`).\n * @param productModules - Bitmask of `SupportProductModule` values (default: `None`).\n * @returns void\n */\n initialize(\n serviceUri: string,\n products: SupportProduct = SupportProduct.None,\n productModules: SupportProductModule = SupportProductModule.None\n ): void {\n this.notifications.initialize(serviceUri, products, productModules);\n }\n\n /**\n * Updates the unread notifications count by fetching it from the server and setting the `unreadNotifications` signal. Sets `undefined` when the count is zero.\n * @param products - Bitmask of `SupportProduct` values to scope the count (default: current value).\n * @param productModules - Bitmask of `SupportProductModule` values to scope the count (default: current value).\n * @returns void\n */\n setProducts(products: SupportProduct, productModules: SupportProductModule): void {\n this.core.setProducts(products);\n this.core.setProductModules(productModules);\n }\n}\n"],"mappings":";;;;;AAAA,MAAa,kBAAkB;CAK7B,OAAO;CAUP,mBAAmB;CAGnB,eAAe;CACf,iBAAiB;CACjB,kBAAkB;CAClB,eAAe;CACf,cAAc;CACd,QAAQ;CAGR,mBAAmB;AACpB;AC2FD,IAAY;CAAZ,SAAY,gBAAc;CACtB,eAAA,eAAA,UAAA,KAAA;CACA,eAAA,eAAA,aAAA,KAAA;CACA,eAAA,eAAA,eAAA,KAAA;CACA,eAAA,eAAA,YAAA,KAAA;AACJ,EAAA,CALY,mBAAA,iBAAc,CAAA,EAAA;AAO1B,IAAY;CAAZ,SAAY,sBAAoB;CAC5B,qBAAA,qBAAA,UAAA,KAAA;CACA,qBAAA,qBAAA,mBAAA,KAAA;CACA,qBAAA,qBAAA,YAAA,KAAA;CACA,qBAAA,qBAAA,8BAAA,KAAA;CACA,qBAAA,qBAAA,6BAAA,KAAA;CACA,qBAAA,qBAAA,8BAAA,MAAA;CACA,qBAAA,qBAAA,qBAAA,MAAA;CACA,qBAAA,qBAAA,mBAAA,MAAA;CACA,qBAAA,qBAAA,YAAA,OAAA;CACA,qBAAA,qBAAA,YAAA,OAAA;CACA,qBAAA,qBAAA,aAAA,OAAA;CACA,qBAAA,qBAAA,YAAA,QAAA;AACJ,EAAA,CAbY,yBAAA,uBAAoB,CAAA,EAAA;AChHhC,IAAa,cAAb,MAAa,YAAW;CADxB,cAAA;EAoBU,KAAA,YAA4B,eAAe;EAiB3C,KAAA,kBAAwC,qBAAqB;EAkBrD,KAAA,sBAA0D,OAA2B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,sBAAA,C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