@arsedizioni/ars-utils 18.2.380 → 18.2.382
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/clipper.common/common/definitions.d.ts +4 -0
- package/clipper.common/common/services/clipper.service.d.ts +6 -3
- package/clipper.ui/ui/document-menu/document-menu.component.d.ts +1 -1
- package/esm2022/clipper.common/common/definitions.mjs +6 -1
- package/esm2022/clipper.common/common/interceptors/auth.interceptor.mjs +15 -11
- package/esm2022/clipper.common/common/services/clipper.service.mjs +10 -4
- package/esm2022/evolution.common/common/definitions.mjs +6 -1
- package/esm2022/evolution.common/common/interceptors/auth.interceptor.mjs +14 -10
- package/esm2022/evolution.common/common/services/evolution.service.mjs +9 -2
- package/esm2022/support.common/common/definitions.mjs +6 -1
- package/esm2022/support.common/common/interceptors/auth.interceptor.mjs +14 -10
- package/esm2022/support.common/common/services/support.service.mjs +10 -4
- package/evolution.common/common/definitions.d.ts +4 -0
- package/evolution.common/common/services/evolution.service.d.ts +5 -2
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +26 -12
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +25 -11
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +26 -12
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/package.json +7 -7
- package/support.common/common/definitions.d.ts +4 -0
- package/support.common/common/services/support.service.d.ts +6 -3
- package/ui.application/ui/components/chips-selector/chips-selector.component.d.ts +1 -1
|
@@ -41,6 +41,11 @@ const ClipperMessages = {
|
|
|
41
41
|
UPDATE_RELOAD: '§update-reload',
|
|
42
42
|
};
|
|
43
43
|
|
|
44
|
+
var ClipperServiceFlags;
|
|
45
|
+
(function (ClipperServiceFlags) {
|
|
46
|
+
ClipperServiceFlags[ClipperServiceFlags["None"] = 0] = "None";
|
|
47
|
+
ClipperServiceFlags[ClipperServiceFlags["Notify500Errors"] = 1] = "Notify500Errors";
|
|
48
|
+
})(ClipperServiceFlags || (ClipperServiceFlags = {}));
|
|
44
49
|
var ClipperSelectionMode;
|
|
45
50
|
(function (ClipperSelectionMode) {
|
|
46
51
|
ClipperSelectionMode[ClipperSelectionMode["Single"] = 1] = "Single";
|
|
@@ -1863,10 +1868,12 @@ class ClipperService {
|
|
|
1863
1868
|
this.broadcastService = inject(BroadcastService);
|
|
1864
1869
|
this.dialogService = inject(DialogService);
|
|
1865
1870
|
this._serviceUri = null;
|
|
1871
|
+
this._flags = ClipperServiceFlags.None;
|
|
1866
1872
|
this._loginInfo = null;
|
|
1867
1873
|
this.loggedIn = signal(false);
|
|
1868
1874
|
this.loggingIn = signal(false);
|
|
1869
1875
|
this.snapshot = signal(null);
|
|
1876
|
+
this.supportsRS = signal(false);
|
|
1870
1877
|
this.referencesSnapshot = signal(null);
|
|
1871
1878
|
this.dashboard = new ClipperDashboard();
|
|
1872
1879
|
this.bag = signal([]);
|
|
@@ -1874,11 +1881,13 @@ class ClipperService {
|
|
|
1874
1881
|
return this.bag().length;
|
|
1875
1882
|
});
|
|
1876
1883
|
this.visible = signal(false);
|
|
1877
|
-
this.supportsRS = signal(false);
|
|
1878
1884
|
}
|
|
1879
1885
|
get serviceUri() {
|
|
1880
1886
|
return this._serviceUri;
|
|
1881
1887
|
}
|
|
1888
|
+
get flags() {
|
|
1889
|
+
return this._flags;
|
|
1890
|
+
}
|
|
1882
1891
|
get loginInfo() {
|
|
1883
1892
|
if (!this._loginInfo) {
|
|
1884
1893
|
const loginInfo = localStorage.getItem('clipper_login');
|
|
@@ -1899,14 +1908,16 @@ class ClipperService {
|
|
|
1899
1908
|
/**
|
|
1900
1909
|
* Initialize service
|
|
1901
1910
|
* @param serviceUri : the service uri
|
|
1911
|
+
* @param flags: the service flags. Default is none.
|
|
1902
1912
|
*/
|
|
1903
|
-
initialize(serviceUri) {
|
|
1913
|
+
initialize(serviceUri, flags = ClipperServiceFlags.None) {
|
|
1904
1914
|
// Create unique client id
|
|
1905
1915
|
if (!localStorage.getItem('clipper_client_id')) {
|
|
1906
1916
|
localStorage.setItem('clipper_client_id', SystemUtils.generateUUID());
|
|
1907
1917
|
}
|
|
1908
1918
|
// Initialize
|
|
1909
1919
|
this._serviceUri = serviceUri;
|
|
1920
|
+
this._flags = flags;
|
|
1910
1921
|
// React to message broadcasting
|
|
1911
1922
|
if (!this.broadcastServiceSubscription) {
|
|
1912
1923
|
this.broadcastServiceSubscription = this.broadcastService.getMessage().subscribe((message) => {
|
|
@@ -2534,15 +2545,18 @@ class ClipperAuthInterceptor {
|
|
|
2534
2545
|
error.status === 401) {
|
|
2535
2546
|
return this.handle401Error(request, next);
|
|
2536
2547
|
}
|
|
2537
|
-
const
|
|
2538
|
-
if (
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2548
|
+
const errorStatus = parseInt(error.status ?? "0");
|
|
2549
|
+
if (errorStatus < 500 || (this.clipperService.flags & ClipperServiceFlags.Notify500Errors) > 0) {
|
|
2550
|
+
const errorTime = new Date().getTime();
|
|
2551
|
+
if (errorTime - this.lastErrorTime > 5000) {
|
|
2552
|
+
this.lastErrorTime = errorTime;
|
|
2553
|
+
const invalidSession = errorStatus === 403;
|
|
2554
|
+
this.dialogService.error("<p>" + (error.error?.message ?? error.message ?? "Impossibile eseguire l'operazione richiesta.").replaceAll("\r\n", "</p><p>") + "</p>", null, "Errore in Clipper", undefined, undefined, invalidSession ? 5000 : 15000).afterClosed().subscribe(() => {
|
|
2555
|
+
if (invalidSession) {
|
|
2556
|
+
this.broadcastService.sendMessage(ClipperMessages.LOGOUT);
|
|
2557
|
+
}
|
|
2558
|
+
});
|
|
2559
|
+
}
|
|
2546
2560
|
}
|
|
2547
2561
|
return throwError(() => error);
|
|
2548
2562
|
}));
|
|
@@ -2608,5 +2622,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.1", ngImpor
|
|
|
2608
2622
|
* Generated bundle index. Do not edit.
|
|
2609
2623
|
*/
|
|
2610
2624
|
|
|
2611
|
-
export { ArsClipperCommonModule, ClipperAuthInterceptor, ClipperAuthors, ClipperChannel, ClipperChannelSettings, ClipperChannels, ClipperDashboard, ClipperDocumentChangeReasons, ClipperDocumentContainer, ClipperExportDocumentsFormat, ClipperFacet, ClipperMessages, ClipperModel, ClipperModels, ClipperModule, ClipperModuleGroup, ClipperModuleGroups, ClipperModules, ClipperQueryReferencesMode, ClipperRegions, ClipperSearchCalendarSnapshotResult, ClipperSearchFacetsSnapshot, ClipperSearchParams, ClipperSearchResult, ClipperSearchUtils, ClipperSectorTypes, ClipperSectors, ClipperSelectionMode, ClipperService, ClipperSort, ClipperSources, ClipperUtils };
|
|
2625
|
+
export { ArsClipperCommonModule, ClipperAuthInterceptor, ClipperAuthors, ClipperChannel, ClipperChannelSettings, ClipperChannels, ClipperDashboard, ClipperDocumentChangeReasons, ClipperDocumentContainer, ClipperExportDocumentsFormat, ClipperFacet, ClipperMessages, ClipperModel, ClipperModels, ClipperModule, ClipperModuleGroup, ClipperModuleGroups, ClipperModules, ClipperQueryReferencesMode, ClipperRegions, ClipperSearchCalendarSnapshotResult, ClipperSearchFacetsSnapshot, ClipperSearchParams, ClipperSearchResult, ClipperSearchUtils, ClipperSectorTypes, ClipperSectors, ClipperSelectionMode, ClipperService, ClipperServiceFlags, ClipperSort, ClipperSources, ClipperUtils };
|
|
2612
2626
|
//# sourceMappingURL=arsedizioni-ars-utils-clipper.common.mjs.map
|