@arsedizioni/ars-utils 18.2.365 → 18.2.371

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 (118) hide show
  1. package/clipper.common/common/services/clipper.service.d.ts +1 -1
  2. package/clipper.ui/ui/document-menu/document-menu.component.d.ts +1 -1
  3. package/esm2022/clipper.common/common/common.module.mjs +4 -4
  4. package/esm2022/clipper.common/common/definitions.mjs +11 -11
  5. package/esm2022/clipper.common/common/interceptors/auth.interceptor.mjs +3 -3
  6. package/esm2022/clipper.common/common/services/clipper.service.mjs +24 -18
  7. package/esm2022/clipper.ui/ui/browser-dialog/browser-dialog.component.mjs +5 -5
  8. package/esm2022/clipper.ui/ui/document/document.component.mjs +3 -3
  9. package/esm2022/clipper.ui/ui/document-index/document-index.component.mjs +3 -3
  10. package/esm2022/clipper.ui/ui/document-manager/document-manager.mjs +3 -3
  11. package/esm2022/clipper.ui/ui/document-menu/document-menu.component.mjs +3 -3
  12. package/esm2022/clipper.ui/ui/references/references.component.mjs +5 -5
  13. package/esm2022/clipper.ui/ui/search-calendar/search-calendar.component.mjs +3 -3
  14. package/esm2022/clipper.ui/ui/search-dialog/search-dialog.component.mjs +5 -5
  15. package/esm2022/clipper.ui/ui/search-facets/search-facets.component.mjs +3 -3
  16. package/esm2022/clipper.ui/ui/search-free-text-help/search-free-text-help.component.mjs +3 -3
  17. package/esm2022/clipper.ui/ui/search-free-text-query-builder/search-free-text-query-builder.component.mjs +3 -3
  18. package/esm2022/clipper.ui/ui/search-result-item/search-result-item.component.mjs +4 -4
  19. package/esm2022/clipper.ui/ui/search-result-manager/search-result-manager.mjs +3 -3
  20. package/esm2022/core/core.module.mjs +8 -8
  21. package/esm2022/core/dateFnsAdapter.mjs +3 -3
  22. package/esm2022/core/directives/autoFocusDirective.mjs +3 -3
  23. package/esm2022/core/directives/changeDateIntervalDirective.mjs +3 -3
  24. package/esm2022/core/directives/copyClipboardDirective.mjs +4 -4
  25. package/esm2022/core/directives/validators.mjs +33 -33
  26. package/esm2022/core/pipes/format.pipe.mjs +4 -4
  27. package/esm2022/core/pipes/replace.pipe.mjs +4 -4
  28. package/esm2022/core/pipes/safe-html.pipe.mjs +4 -4
  29. package/esm2022/core/pipes/safe-url.pipe.mjs +4 -4
  30. package/esm2022/core/pipes/search-callback.pipe.mjs +3 -3
  31. package/esm2022/core/pipes/search-filter.pipe.mjs +4 -4
  32. package/esm2022/core/services/broadcast.service.mjs +3 -3
  33. package/esm2022/core/services/environment.service.mjs +3 -3
  34. package/esm2022/core/services/screen.service.mjs +3 -3
  35. package/esm2022/core/services/theme.service.mjs +3 -3
  36. package/esm2022/evolution.common/arsedizioni-ars-utils-evolution.common.mjs +5 -0
  37. package/esm2022/evolution.common/common/common.module.mjs +16 -0
  38. package/esm2022/evolution.common/common/definitions.mjs +358 -0
  39. package/esm2022/evolution.common/common/interceptors/auth.interceptor.mjs +83 -0
  40. package/esm2022/evolution.common/common/messages.mjs +8 -0
  41. package/esm2022/evolution.common/common/services/evolution.service.mjs +357 -0
  42. package/esm2022/evolution.common/public_api.mjs +5 -0
  43. package/esm2022/help/components/help-viewer/help-viewer.component.mjs +7 -7
  44. package/esm2022/help/help.module.mjs +4 -4
  45. package/esm2022/help/services/help.service.mjs +3 -3
  46. package/esm2022/public_api.mjs +2 -1
  47. package/esm2022/support.common/common/common.module.mjs +4 -4
  48. package/esm2022/support.common/common/interceptors/auth.interceptor.mjs +41 -35
  49. package/esm2022/support.common/common/messages.mjs +2 -1
  50. package/esm2022/support.common/common/services/support.service.mjs +37 -70
  51. package/esm2022/support.ui/ui/notifications-browser/notification/notification.component.mjs +3 -3
  52. package/esm2022/support.ui/ui/notifications-browser/notifications-browser.component.mjs +4 -4
  53. package/esm2022/tinymce/full-screen-editor/full-screen-editor.component.mjs +3 -3
  54. package/esm2022/tinymce/tinymce.module.mjs +4 -4
  55. package/esm2022/ui/ui/dialogs/busy/busy-dialog.component.mjs +3 -3
  56. package/esm2022/ui/ui/dialogs/confirm/confirm-dialog.component.mjs +4 -4
  57. package/esm2022/ui/ui/dialogs/credentials/credentials-dialog.component.mjs +4 -4
  58. package/esm2022/ui/ui/dialogs/info/info-dialog.component.mjs +3 -3
  59. package/esm2022/ui/ui/dialogs/recover-password/recover-password-dialog.component.mjs +3 -3
  60. package/esm2022/ui/ui/dialogs/reset-password/reset-password-dialog.component.mjs +3 -3
  61. package/esm2022/ui/ui/dialogs/toast/toast.component.mjs +3 -3
  62. package/esm2022/ui/ui/paginatorIntl.mjs +3 -3
  63. package/esm2022/ui/ui/services/dialog.service.mjs +3 -3
  64. package/esm2022/ui/ui/services/ui.service.mjs +3 -3
  65. package/esm2022/ui/ui/ui.module.mjs +4 -4
  66. package/esm2022/ui.application/ui/components/button-selector/button-selector.component.mjs +3 -3
  67. package/esm2022/ui.application/ui/components/button-toggle/button-toggle.component.mjs +3 -3
  68. package/esm2022/ui.application/ui/components/calendar-empty-header/calendar-empy-header.component.mjs +3 -3
  69. package/esm2022/ui.application/ui/components/chips-selector/chips-selector.component.mjs +3 -3
  70. package/esm2022/ui.application/ui/components/file-input/file-input.component.mjs +3 -3
  71. package/esm2022/ui.application/ui/components/file-preview/file-preview.component.mjs +3 -3
  72. package/esm2022/ui.application/ui/components/filter-bar/filter-bar.component.mjs +3 -3
  73. package/esm2022/ui.application/ui/dialogs/prompt/prompt-dialog.component.mjs +4 -4
  74. package/esm2022/ui.application/ui/dialogs/prompt-date/prompt-date-dialog.component.mjs +4 -4
  75. package/esm2022/ui.application/ui/dialogs/prompt-time/prompt-time-dialog.component.mjs +3 -3
  76. package/esm2022/ui.application/ui/dialogs/select/select-dialog.component.mjs +4 -4
  77. package/esm2022/ui.application/ui/dialogs/select-file/select-file-dialog.component.mjs +4 -4
  78. package/esm2022/ui.application/ui/dialogs/select-picture/select-picture-dialog.component.mjs +4 -4
  79. package/esm2022/ui.application/ui/dialogs/select-tree/select-tree-dialog.component.mjs +7 -7
  80. package/esm2022/ui.application/ui/dialogs/send-to/send-to-dialog.component.mjs +4 -4
  81. package/esm2022/ui.application/ui/directives/resize-table-column.directive.mjs +3 -3
  82. package/esm2022/ui.application/ui/services/applicationDialog.service.mjs +3 -3
  83. package/esm2022/ui.application/ui/ui.module.mjs +4 -4
  84. package/esm2022/ui.oauth/ui/components/login/login-oauth.component.mjs +3 -3
  85. package/esm2022/ui.oauth/ui/ui.module.mjs +4 -4
  86. package/evolution.common/common/common.module.d.ts +10 -0
  87. package/evolution.common/common/definitions.d.ts +166 -0
  88. package/evolution.common/common/interceptors/auth.interceptor.d.ts +24 -0
  89. package/evolution.common/common/messages.d.ts +6 -0
  90. package/evolution.common/common/services/evolution.service.d.ts +123 -0
  91. package/evolution.common/index.d.ts +5 -0
  92. package/evolution.common/public_api.d.ts +1 -0
  93. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +40 -34
  94. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
  95. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +42 -42
  96. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
  97. package/fesm2022/arsedizioni-ars-utils-core.mjs +89 -89
  98. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +817 -0
  99. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -0
  100. package/fesm2022/arsedizioni-ars-utils-help.mjs +13 -13
  101. package/fesm2022/arsedizioni-ars-utils-help.mjs.map +1 -1
  102. package/fesm2022/arsedizioni-ars-utils-support.common.mjs +78 -107
  103. package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
  104. package/fesm2022/arsedizioni-ars-utils-support.ui.mjs +6 -6
  105. package/fesm2022/arsedizioni-ars-utils-support.ui.mjs.map +1 -1
  106. package/fesm2022/arsedizioni-ars-utils-tinymce.mjs +7 -7
  107. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +58 -58
  108. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
  109. package/fesm2022/arsedizioni-ars-utils-ui.mjs +34 -34
  110. package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
  111. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +7 -7
  112. package/fesm2022/arsedizioni-ars-utils.mjs +1 -0
  113. package/fesm2022/arsedizioni-ars-utils.mjs.map +1 -1
  114. package/package.json +18 -12
  115. package/public_api.d.ts +1 -0
  116. package/support.common/common/interceptors/auth.interceptor.d.ts +8 -0
  117. package/support.common/common/messages.d.ts +1 -0
  118. package/support.common/common/services/support.service.d.ts +15 -26
@@ -0,0 +1,166 @@
1
+ import { LoginResult } from '@arsedizioni/ars-utils/core';
2
+ import { LoginOAuthType } from '@arsedizioni/ars-utils/ui.oauth';
3
+ export declare enum ERPComplianceLawsSelectionType {
4
+ Analysis = 1,
5
+ Activity = 2
6
+ }
7
+ export declare enum ERPComplianceProfileRole {
8
+ None = 0,
9
+ Analyst = 1,
10
+ Planner = 2,
11
+ Validator = 4,
12
+ Executor = 8,
13
+ Observer = 16
14
+ }
15
+ export declare enum ERPComplianceProfileFlags {
16
+ OverrideNotificationRegisterSettings = 16
17
+ }
18
+ export declare enum ERPComplianceScope {
19
+ None = 0,
20
+ Environment = 1,
21
+ Safety = 2,
22
+ FoodSafety = 4,
23
+ Energy = 8,
24
+ Health = 16,
25
+ Maintenance = 32,
26
+ Quality = 64,
27
+ Organization = 128,
28
+ Logistics = 256,
29
+ Facility = 512,
30
+ Security = 1024
31
+ }
32
+ export declare enum ERPComplianceNotificationLimit {
33
+ None = 0,
34
+ PlannerOnly = 1,
35
+ ExecutorOnly = 2,
36
+ Both = 3
37
+ }
38
+ export declare enum ERPComplianceRegisterNotificationType {
39
+ None = 0,
40
+ NewAnalysis = 1,
41
+ AnalysisCompleted = 2,
42
+ AnalysisNoticePeriodStarted = 4,
43
+ AnalysisPeriodExpired = 8,
44
+ AnalysisLawChanged = 16384,
45
+ NewPlanning = 8192,
46
+ PlanningCompleted = 16,
47
+ PlanningNoticePeriodStarted = 32,
48
+ PlanningPeriodExpired = 64,
49
+ NewValidation = 32768,
50
+ ValidationCompleted = 128,
51
+ ValidationNoticePeriodStarted = 256,
52
+ ValidationPeriodExpired = 512,
53
+ NewDeadline = 65536,
54
+ DeadlineNoticePeriodStarted = 1024,
55
+ DeadlineExpired = 2048,
56
+ ActivityCompleted = 4096,
57
+ LawChanged = 2097152
58
+ }
59
+ export declare enum ERPComplianceRegisterSiteImportOptions {
60
+ CopyAttachments = 1,
61
+ KeepOriginalDates = 2,
62
+ DuplicateLaws = 4,
63
+ DiscardNotApplicables = 8
64
+ }
65
+ export declare const ProfileRoles: {
66
+ name: string;
67
+ value: ERPComplianceProfileRole;
68
+ }[];
69
+ export declare const ProfileFlags: ({
70
+ name: string;
71
+ divider: boolean;
72
+ value?: undefined;
73
+ } | {
74
+ name: string;
75
+ value: ERPComplianceProfileFlags;
76
+ divider?: undefined;
77
+ })[];
78
+ export declare const Scopes: {
79
+ name: string;
80
+ value: ERPComplianceScope;
81
+ }[];
82
+ export declare const NotificationLimits: {
83
+ name: string;
84
+ value: ERPComplianceNotificationLimit;
85
+ }[];
86
+ export declare const Notifications: ({
87
+ name: string;
88
+ divider: boolean;
89
+ value?: undefined;
90
+ } | {
91
+ name: string;
92
+ value: ERPComplianceRegisterNotificationType;
93
+ divider?: undefined;
94
+ })[];
95
+ export declare enum ERPComplianceLawState {
96
+ ApplicableOrAknowledged = 1,
97
+ NotApplicable = 2,
98
+ NotAnalyzed = 3,
99
+ ExpiredAnalysis = 4,
100
+ UpdatedLaws = 5,
101
+ Analyzed = 6,
102
+ Abrogated = 7,
103
+ Applicable = 8,
104
+ Aknowledged = 9
105
+ }
106
+ export declare enum ERPComplianceLawOrigin {
107
+ National = 1,
108
+ EU = 2,
109
+ Regional = 3,
110
+ Local = 4,
111
+ Technical = 5,
112
+ Voulontary = 6,
113
+ Internal = 7,
114
+ Other = 8
115
+ }
116
+ export declare const LawStates: {
117
+ name: string;
118
+ value: ERPComplianceLawState;
119
+ }[];
120
+ export declare const LawOrigins: {
121
+ name: string;
122
+ value: ERPComplianceLawOrigin;
123
+ }[];
124
+ export declare const LawChangeStates: {
125
+ name: string;
126
+ value: number;
127
+ }[];
128
+ export declare enum ERPComplianceActivityState {
129
+ NotPlanned = 128,
130
+ Closed = 4,
131
+ Expired = 8,
132
+ Planned = 256,
133
+ Cancelled = 512,
134
+ UpdatedLaws = 1024,
135
+ AlreadyManaged = 2048
136
+ }
137
+ export declare const ActivityStates: {
138
+ name: string;
139
+ value: ERPComplianceActivityState;
140
+ }[];
141
+ export declare const ObligationTypes: {
142
+ name: string;
143
+ value: number;
144
+ }[];
145
+ export declare const ObligationAuthorities: {
146
+ name: string;
147
+ value: number;
148
+ }[];
149
+ export declare enum ERPRecurrenceFrequencyType {
150
+ Day = 1,
151
+ Month = 2,
152
+ Year = 3
153
+ }
154
+ export declare const RecurrenceFrequencyTypes: {
155
+ name: string;
156
+ value: ERPRecurrenceFrequencyType;
157
+ }[];
158
+ export interface EvolutionLoginResult extends LoginResult<EvolutionLoginInfo> {
159
+ }
160
+ export interface EvolutionLoginInfo {
161
+ context: any;
162
+ complianceContext?: any | null;
163
+ userCredentials?: string | null;
164
+ userId?: number | null;
165
+ OAUTH?: LoginOAuthType | null;
166
+ }
@@ -0,0 +1,24 @@
1
+ import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare class EvolutionAuthInterceptor implements HttpInterceptor {
5
+ private evolutionService;
6
+ private broadcastService;
7
+ private dialogService;
8
+ private lastErrorTime;
9
+ intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
10
+ /**
11
+ * Handle 401 error
12
+ * @param request : the request
13
+ * @param next : the http handler
14
+ */
15
+ private handle401Error;
16
+ /**
17
+ * Add token to request
18
+ * @param request : the request
19
+ * @param token: the token or null to use curre3nt
20
+ */
21
+ private addTokenToRequest;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<EvolutionAuthInterceptor, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<EvolutionAuthInterceptor>;
24
+ }
@@ -0,0 +1,6 @@
1
+ export declare const EvolutionMessages: {
2
+ LOGIN_CHANGED: string;
3
+ LOGIN_COMPLETED: string;
4
+ LOGOUT_COMPLETED: string;
5
+ LOGOUT: string;
6
+ };
@@ -0,0 +1,123 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import { ApiResult, INode } from '@arsedizioni/ars-utils/core';
3
+ import { EvolutionLoginInfo, EvolutionLoginResult } from '../definitions';
4
+ import { LoginOAuthType } from '@arsedizioni/ars-utils/ui.oauth';
5
+ import * as i0 from "@angular/core";
6
+ export declare class EvolutionService implements OnDestroy {
7
+ private httpClient;
8
+ private broadcastService;
9
+ private broadcastServiceSubscription?;
10
+ private dialogService;
11
+ private _serviceUri;
12
+ get serviceUri(): string | null;
13
+ private _loginInfo;
14
+ get loginInfo(): EvolutionLoginInfo | null;
15
+ readonly loggedIn: import("@angular/core").WritableSignal<boolean>;
16
+ readonly loggingIn: import("@angular/core").WritableSignal<boolean>;
17
+ ngOnDestroy(): void;
18
+ /**
19
+ * Initialize service
20
+ * @param serviceUri : the service uri
21
+ */
22
+ initialize(serviceUri: string): void;
23
+ /**
24
+ * Set JWT token
25
+ * @param value : the login result
26
+ */
27
+ private setToken;
28
+ /**
29
+ * Return current JWT token
30
+ * @param refresh: true to get the refresh token. Default is false.
31
+ */
32
+ getToken(refresh?: boolean): string;
33
+ /**
34
+ * Perform login
35
+ * @param email: the optioanl email if using OAuth2
36
+ * @parma password: the optional password if using OAuth2
37
+ * @param remember: remember credentials
38
+ * @param oauth: the optional open authentication supported
39
+ * @param oauthAccessToken: the optional OAuth2 access token
40
+ * @returns: the login result
41
+ */
42
+ login(email?: string | null | undefined, password?: string | null | undefined, remember?: boolean | null | undefined, oauth?: LoginOAuthType | null | undefined, oauthAccessToken?: string | null | undefined): import("rxjs").Observable<ApiResult<EvolutionLoginResult>>;
43
+ /**
44
+ * Perform logout
45
+ */
46
+ logout(): import("rxjs").Observable<any>;
47
+ /**
48
+ * Switch the current login to a new one with the same credentials except role possibly (context change)
49
+ * @param id : new user id
50
+ */
51
+ loginSwitch(id: number): import("rxjs").Observable<ApiResult<EvolutionLoginResult>>;
52
+ /**
53
+ * Handle login error
54
+ */
55
+ private handleLoginError;
56
+ /**
57
+ * Reset login refresh timer and login state
58
+ */
59
+ reset(): void;
60
+ /**
61
+ * Clear login data
62
+ */
63
+ clear(): void;
64
+ /**
65
+ * Perform token refresh
66
+ */
67
+ refresh(): import("rxjs").Observable<void>;
68
+ /**
69
+ * Convert folders in a tree of Node object.
70
+ * @param folders : the subfolders group or null to root
71
+ */
72
+ toNodes(folders: INode[]): INode[];
73
+ /**
74
+ * Convert folders in a tree of Node object.
75
+ * @param folders : the children group or null to root
76
+ */
77
+ private _toNodes;
78
+ /**
79
+ * Retrieve the taxonomy
80
+ */
81
+ getTaxonomy(): import("rxjs").Observable<ApiResult<any>>;
82
+ /**
83
+ * Retrieve authorities
84
+ */
85
+ getAuthorities(): import("rxjs").Observable<ApiResult<any>>;
86
+ /**
87
+ * Change context
88
+ */
89
+ changeContext(params: any): import("rxjs").Observable<ApiResult<any>>;
90
+ /**
91
+ * Retrieve a register
92
+ * @param id the register id
93
+ */
94
+ getRegister(id: number): import("rxjs").Observable<ApiResult<any>>;
95
+ /**
96
+ * Collect register profiles
97
+ * @param params parameters
98
+ */
99
+ collectRegisterProfiles(params: any): import("rxjs").Observable<ApiResult<any>>;
100
+ /**
101
+ * Add one or more laws
102
+ * @param params parameters
103
+ */
104
+ addLaws(params: any): import("rxjs").Observable<ApiResult<any>>;
105
+ /**
106
+ * Retrieve activity groups
107
+ * @param group the group number
108
+ * @param site the site id
109
+ */
110
+ getGroups(group?: number, site?: number): import("rxjs").Observable<ApiResult<any>>;
111
+ /**
112
+ * Add one or more activities
113
+ * @param params parameters
114
+ */
115
+ addActivities(params: any): import("rxjs").Observable<ApiResult<any>>;
116
+ /**
117
+ * Export laws
118
+ * @param params parameters
119
+ */
120
+ exportLaws(params: any): import("rxjs").Observable<Blob>;
121
+ static ɵfac: i0.ɵɵFactoryDeclaration<EvolutionService, never>;
122
+ static ɵprov: i0.ɵɵInjectableDeclaration<EvolutionService>;
123
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@arsedizioni/ars-utils/evolution.common" />
5
+ export * from './public_api';
@@ -0,0 +1 @@
1
+ export * from './common/common.module';
@@ -1593,17 +1593,17 @@ class ClipperDashboard {
1593
1593
  this.unreadItems = computed(() => {
1594
1594
  const states = [];
1595
1595
  let totalUnread = 0;
1596
- this.items().filter(x => x.id == ClipperModule.News
1596
+ this.items().filter((x) => x.id == ClipperModule.News
1597
1597
  || x.id === ClipperModule.Approfondimenti
1598
- || x.id === ClipperModule.Giurisprudenza).forEach(x => {
1598
+ || x.id === ClipperModule.Giurisprudenza).forEach((x) => {
1599
1599
  totalUnread += x.unreadItems ?? 0;
1600
1600
  });
1601
1601
  states.push([ClipperModule.News, totalUnread]);
1602
- states.push([ClipperModule.GazzetteBollettiniEFontiDiverse, this.items().find(x => x.id == ClipperModule.GazzetteBollettiniEFontiDiverse)?.unreadItems ?? 0]);
1603
- states.push([ClipperModule.Giurisprudenza, this.items().find(x => x.id == ClipperModule.Giurisprudenza)?.unreadItems ?? 0]);
1604
- states.push([ClipperModule.ModificheAbrogazioniERinvii, this.items().find(x => x.id == ClipperModule.ModificheAbrogazioniERinvii)?.unreadItems ?? 0]);
1605
- states.push([ClipperModule.AllerteAlimentari, this.items().find(x => x.id == ClipperModule.AllerteAlimentari)?.unreadItems ?? 0]);
1606
- states.push([ClipperModule.QuesitiECasiRisolti, this.items().find(x => x.id == ClipperModule.QuesitiECasiRisolti)?.unreadItems ?? 0]);
1602
+ states.push([ClipperModule.GazzetteBollettiniEFontiDiverse, this.items().find((x) => x.id == ClipperModule.GazzetteBollettiniEFontiDiverse)?.unreadItems ?? 0]);
1603
+ states.push([ClipperModule.Giurisprudenza, this.items().find((x) => x.id == ClipperModule.Giurisprudenza)?.unreadItems ?? 0]);
1604
+ states.push([ClipperModule.ModificheAbrogazioniERinvii, this.items().find((x) => x.id == ClipperModule.ModificheAbrogazioniERinvii)?.unreadItems ?? 0]);
1605
+ states.push([ClipperModule.AllerteAlimentari, this.items().find((x) => x.id == ClipperModule.AllerteAlimentari)?.unreadItems ?? 0]);
1606
+ states.push([ClipperModule.QuesitiECasiRisolti, this.items().find((x) => x.id == ClipperModule.QuesitiECasiRisolti)?.unreadItems ?? 0]);
1607
1607
  return states;
1608
1608
  });
1609
1609
  }
@@ -1613,10 +1613,10 @@ class ClipperDashboard {
1613
1613
  * @param increment : the increment (can be negative)
1614
1614
  */
1615
1615
  updateUnreadItems(module, increment) {
1616
- let item = this.items()?.find(x => x.id == module);
1616
+ let item = this.items()?.find((x) => x.id == module);
1617
1617
  if (item) {
1618
1618
  item.unreadItems += increment;
1619
- this.items.update(values => [...values]);
1619
+ this.items.update((values) => [...values]);
1620
1620
  }
1621
1621
  }
1622
1622
  /***
@@ -1625,7 +1625,7 @@ class ClipperDashboard {
1625
1625
  * @returns the module unread items
1626
1626
  */
1627
1627
  getUnreadItems(module) {
1628
- return this.unreadItems()?.find(x => x[0] === module)?.[1];
1628
+ return this.unreadItems()?.find((x) => x[0] === module)?.[1];
1629
1629
  }
1630
1630
  }
1631
1631
  class ClipperUtils {
@@ -1906,10 +1906,10 @@ class ClipperService {
1906
1906
  this._serviceUri = serviceUri;
1907
1907
  // React to message broadcasting
1908
1908
  if (!this.broadcastServiceSubscription) {
1909
- this.broadcastServiceSubscription = this.broadcastService.getMessage().subscribe(message => {
1909
+ this.broadcastServiceSubscription = this.broadcastService.getMessage().subscribe((message) => {
1910
1910
  if (message.id === ClipperMessages.LOGIN_CHANGED) {
1911
1911
  setTimeout(() => {
1912
- this.login(message.data.email, message.data.password, true, message.data.oauth, message.data.oauthAccessToken).subscribe(r => {
1912
+ this.login(message.data.email, message.data.password, true, message.data.oauth, message.data.oauthAccessToken).subscribe((r) => {
1913
1913
  if (!r.success)
1914
1914
  this.dialogService.error(r.message, null, "Errore di Clipper");
1915
1915
  else {
@@ -1923,7 +1923,7 @@ class ClipperService {
1923
1923
  else if (message.id === ClipperMessages.LOGOUT_COMPLETED ||
1924
1924
  message.id === ClipperMessages.LOGIN_DISCONNECTED) {
1925
1925
  if (this.loggedIn()) {
1926
- this.logout().subscribe(r => {
1926
+ this.logout().subscribe((r) => {
1927
1927
  if (!r.success) {
1928
1928
  this.dialogService.error("<p>" + r.message + "</p><br><br><hr><p class='small'><i>Per eliminare la configurazione di Clipper accedere a:<br><b>menu > personalizza > collegamenti</b></i></p>", null, "Errore di Clipper");
1929
1929
  }
@@ -1941,6 +1941,8 @@ class ClipperService {
1941
1941
  if (!this.loggedIn() && this.getToken()) {
1942
1942
  // Auto login
1943
1943
  this.loggedIn.set(true);
1944
+ // Notify
1945
+ this.broadcastService.sendMessage(ClipperMessages.LOGIN_COMPLETED);
1944
1946
  }
1945
1947
  }
1946
1948
  /**
@@ -1949,7 +1951,7 @@ class ClipperService {
1949
1951
  */
1950
1952
  setToken(value) {
1951
1953
  sessionStorage.setItem('clipper_jwt', value.token);
1952
- sessionStorage.setItem('clipper_jwt_refresh', value.refreshToken);
1954
+ sessionStorage.setItem('clipper_jwt_refresh', value.refreshToken ?? '');
1953
1955
  }
1954
1956
  /**
1955
1957
  * Return current JWT token
@@ -1990,7 +1992,7 @@ class ClipperService {
1990
1992
  this.loggingIn.set(false);
1991
1993
  localStorage.removeItem('clipper_login');
1992
1994
  return throwError(() => err);
1993
- }), map(r => {
1995
+ }), map((r) => {
1994
1996
  this.loggingIn.set(false);
1995
1997
  if (r.success) {
1996
1998
  // Store access token
@@ -2012,6 +2014,8 @@ class ClipperService {
2012
2014
  localStorage.setItem('clipper_login', JSON.stringify(loginInfo));
2013
2015
  this._loginInfo = loginInfo;
2014
2016
  this.loggedIn.set(true);
2017
+ // Notify
2018
+ this.broadcastService.sendMessage(ClipperMessages.LOGIN_COMPLETED);
2015
2019
  }
2016
2020
  return r;
2017
2021
  }));
@@ -2036,6 +2040,8 @@ class ClipperService {
2036
2040
  this._loginInfo = null;
2037
2041
  // Logged out
2038
2042
  this.loggedIn.set(false);
2043
+ // Notify
2044
+ this.broadcastService.sendMessage(ClipperMessages.LOGOUT_COMPLETED);
2039
2045
  }
2040
2046
  /**
2041
2047
  * Clear login data
@@ -2053,7 +2059,7 @@ class ClipperService {
2053
2059
  * Perform token refresh
2054
2060
  */
2055
2061
  refresh() {
2056
- return this.httpClient.get(this._serviceUri + '/refresh2/?token=' + this.getToken(true)).pipe(map(r => {
2062
+ return this.httpClient.get(this._serviceUri + '/refresh2/?token=' + this.getToken(true)).pipe(map((r) => {
2057
2063
  // Update token
2058
2064
  this.setToken(r.value);
2059
2065
  }));
@@ -2220,7 +2226,7 @@ class ClipperService {
2220
2226
  */
2221
2227
  loadDashboard() {
2222
2228
  this.httpClient
2223
- .post(this._serviceUri + '/account/dashboard', { refreshing: true }).subscribe(r => {
2229
+ .post(this._serviceUri + '/account/dashboard', { refreshing: true }).subscribe((r) => {
2224
2230
  if (r.success) {
2225
2231
  this.dashboard.documentUpdates = r.value.documentUpdates;
2226
2232
  this.dashboard.expiredDeadlines = r.value.expiredDeadlines;
@@ -2267,7 +2273,7 @@ class ClipperService {
2267
2273
  loadBag() {
2268
2274
  return this.httpClient
2269
2275
  .get(this.serviceUri + '/documents/working')
2270
- .subscribe(r => {
2276
+ .subscribe((r) => {
2271
2277
  if (!r.success) {
2272
2278
  this.dialogService.error(r.message);
2273
2279
  }
@@ -2298,7 +2304,7 @@ class ClipperService {
2298
2304
  addToBag(documentIds) {
2299
2305
  return this.httpClient
2300
2306
  .post(this.serviceUri + '/documents/working/add', { documentIds: documentIds })
2301
- .subscribe(r => {
2307
+ .subscribe((r) => {
2302
2308
  if (!r.success) {
2303
2309
  this.dialogService.error(r.message);
2304
2310
  }
@@ -2318,7 +2324,7 @@ class ClipperService {
2318
2324
  }
2319
2325
  });
2320
2326
  if (newItems.length > 0) {
2321
- this.bag.update(values => [...values, ...newItems]);
2327
+ this.bag.update((values) => [...values, ...newItems]);
2322
2328
  }
2323
2329
  this.dialogService.toast('Operazione completata con successo.');
2324
2330
  }
@@ -2332,14 +2338,14 @@ class ClipperService {
2332
2338
  removeFromBag(documentId) {
2333
2339
  return this.httpClient
2334
2340
  .post(this.serviceUri + '/documents/working/delete', { documentIds: [documentId] })
2335
- .subscribe(r => {
2341
+ .subscribe((r) => {
2336
2342
  if (!r.success) {
2337
2343
  this.dialogService.error(r.message);
2338
2344
  }
2339
2345
  else {
2340
- const p = this.bag().findIndex(n => n.documentId === documentId);
2346
+ const p = this.bag().findIndex((n) => n.documentId === documentId);
2341
2347
  if (p !== -1) {
2342
- this.bag.update(values => {
2348
+ this.bag.update((values) => {
2343
2349
  values.splice(p, 1);
2344
2350
  return [...values];
2345
2351
  });
@@ -2354,7 +2360,7 @@ class ClipperService {
2354
2360
  clearBag() {
2355
2361
  return this.httpClient
2356
2362
  .post(this.serviceUri + '/documents/working/delete', { deleteAll: true })
2357
- .subscribe(r => {
2363
+ .subscribe((r) => {
2358
2364
  if (!r.success) {
2359
2365
  this.dialogService.error(r.message);
2360
2366
  }
@@ -2391,10 +2397,10 @@ class ClipperService {
2391
2397
  return this.httpClient
2392
2398
  .post(this.serviceUri + '/documents/searches/delete', { id: id });
2393
2399
  }
2394
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: ClipperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2395
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: ClipperService, providedIn: 'root' }); }
2400
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: ClipperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2401
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: ClipperService, providedIn: 'root' }); }
2396
2402
  }
2397
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: ClipperService, decorators: [{
2403
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: ClipperService, decorators: [{
2398
2404
  type: Injectable,
2399
2405
  args: [{
2400
2406
  providedIn: 'root',
@@ -2469,19 +2475,19 @@ class ClipperAuthInterceptor {
2469
2475
  }
2470
2476
  return request;
2471
2477
  }
2472
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: ClipperAuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2473
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: ClipperAuthInterceptor }); }
2478
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: ClipperAuthInterceptor, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2479
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: ClipperAuthInterceptor }); }
2474
2480
  }
2475
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: ClipperAuthInterceptor, decorators: [{
2481
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: ClipperAuthInterceptor, decorators: [{
2476
2482
  type: Injectable
2477
2483
  }] });
2478
2484
 
2479
2485
  class ArsClipperCommonModule {
2480
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: ArsClipperCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2481
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.1.4", ngImport: i0, type: ArsClipperCommonModule }); }
2482
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: ArsClipperCommonModule }); }
2486
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: ArsClipperCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2487
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.1", ngImport: i0, type: ArsClipperCommonModule }); }
2488
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: ArsClipperCommonModule }); }
2483
2489
  }
2484
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.1.4", ngImport: i0, type: ArsClipperCommonModule, decorators: [{
2490
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImport: i0, type: ArsClipperCommonModule, decorators: [{
2485
2491
  type: NgModule
2486
2492
  }] });
2487
2493