@arsedizioni/ars-utils 22.0.10 → 22.0.12
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/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +23 -33
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +18 -9
- package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-core.mjs +1700 -1797
- package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +15 -26
- package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-help.mjs +2 -11
- package/fesm2022/arsedizioni-ars-utils-help.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs +3 -12
- package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-tinymce.mjs +2 -12
- package/fesm2022/arsedizioni-ars-utils-tinymce.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +96 -123
- package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.mjs +4 -44
- package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +2 -11
- package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
- package/package.json +1 -1
- package/types/arsedizioni-ars-utils-clipper.common.d.ts +5 -9
- package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1 -1
- package/types/arsedizioni-ars-utils-core.d.ts +512 -491
- package/types/arsedizioni-ars-utils-evolution.common.d.ts +5 -10
- package/types/arsedizioni-ars-utils-help.d.ts +34 -40
- package/types/arsedizioni-ars-utils-support.common.d.ts +3 -9
- package/types/arsedizioni-ars-utils-tinymce.d.ts +7 -13
- package/types/arsedizioni-ars-utils-ui.application.d.ts +46 -56
- package/types/arsedizioni-ars-utils-ui.d.ts +4 -35
- package/types/arsedizioni-ars-utils-ui.oauth.d.ts +1 -7
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, computed, inject, DestroyRef, Service, Injectable
|
|
2
|
+
import { signal, computed, inject, DestroyRef, Service, Injectable } from '@angular/core';
|
|
3
3
|
import { HttpClient, HttpHeaders, HttpRequest, HttpErrorResponse } from '@angular/common/http';
|
|
4
4
|
import { BroadcastService, SystemUtils } from '@arsedizioni/ars-utils/core';
|
|
5
5
|
import { EMPTY, throwError, of, catchError as catchError$1 } from 'rxjs';
|
|
6
6
|
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
7
|
-
import {
|
|
8
|
-
import { catchError, finalize, map } from 'rxjs/operators';
|
|
7
|
+
import { catchError, map, finalize } from 'rxjs/operators';
|
|
9
8
|
|
|
10
9
|
const ClipperMessages = {
|
|
11
10
|
/**
|
|
@@ -13,13 +12,16 @@ const ClipperMessages = {
|
|
|
13
12
|
*/
|
|
14
13
|
// Error
|
|
15
14
|
ERROR: '§clipper-error',
|
|
15
|
+
SUCCESS: '§clipper-success',
|
|
16
|
+
SUCCESS_TOAST: '§clipper-success-toast',
|
|
16
17
|
// Login
|
|
17
18
|
LOGIN_CHANGED: '§clipper-login-changed',
|
|
18
19
|
LOGIN_COMPLETED: '§clipper-login-completed',
|
|
19
|
-
LOGOUT_COMPLETED: '§clipper-logout-completed',
|
|
20
20
|
LOGIN_PENDING: '§clipper-login-pending',
|
|
21
21
|
LOGIN_FAILED: '§clipper-login-failed',
|
|
22
22
|
LOGOUT: '§clipper-logout',
|
|
23
|
+
LOGOUT_COMPLETED: '§clipper-logout-completed',
|
|
24
|
+
LOGOUT_FAILED: '§clipper-logout-failed',
|
|
23
25
|
// Document
|
|
24
26
|
DOCUMENT_READ: '$clipper-document-read',
|
|
25
27
|
DOCUMENT_NAVIGATE: '$clipper-document-navigate',
|
|
@@ -2194,7 +2196,6 @@ class ClipperService {
|
|
|
2194
2196
|
this.httpClient = inject(HttpClient);
|
|
2195
2197
|
this.destroyRef = inject(DestroyRef);
|
|
2196
2198
|
this.broadcastService = inject(BroadcastService);
|
|
2197
|
-
this.dialogService = inject(DialogService);
|
|
2198
2199
|
this.broadcastInitialized = false;
|
|
2199
2200
|
this._serviceUri = '';
|
|
2200
2201
|
this._flags = ClipperServiceFlags.None;
|
|
@@ -2280,13 +2281,13 @@ class ClipperService {
|
|
|
2280
2281
|
next: r => {
|
|
2281
2282
|
if (!r.success) {
|
|
2282
2283
|
if ((this.flags & ClipperServiceFlags.DisplayConnectionStateMessages) > 0) {
|
|
2283
|
-
this.
|
|
2284
|
+
this.broadcastService.sendMessage(ClipperMessages.ERROR, "Le credenziali di accesso sono cambiate o non sono più valide. Esegui un nuovo accesso.");
|
|
2284
2285
|
}
|
|
2285
2286
|
this.broadcastService.sendMessage(ClipperMessages.LOGIN_FAILED);
|
|
2286
2287
|
}
|
|
2287
2288
|
else {
|
|
2288
2289
|
if ((this.flags & ClipperServiceFlags.DisplayConnectionStateMessages) > 0) {
|
|
2289
|
-
this.
|
|
2290
|
+
this.broadcastService.sendMessage(ClipperMessages.SUCCESS_TOAST, { message: "Connesso a Clipper", icon: 'power', duration: 1500 });
|
|
2290
2291
|
}
|
|
2291
2292
|
// Load bag
|
|
2292
2293
|
this.loadBag();
|
|
@@ -2300,12 +2301,12 @@ class ClipperService {
|
|
|
2300
2301
|
this.logout().subscribe(r => {
|
|
2301
2302
|
if (!r.success) {
|
|
2302
2303
|
if (r.message) {
|
|
2303
|
-
this.
|
|
2304
|
+
this.broadcastService.sendMessage(ClipperMessages.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>");
|
|
2304
2305
|
}
|
|
2305
2306
|
}
|
|
2306
2307
|
else {
|
|
2307
2308
|
if ((this.flags & ClipperServiceFlags.DisplayConnectionStateMessages) > 0) {
|
|
2308
|
-
this.
|
|
2309
|
+
this.broadcastService.sendMessage(ClipperMessages.SUCCESS_TOAST, { message: "Disconnesso da Clipper", icon: 'power_off', duration: 1500 });
|
|
2309
2310
|
}
|
|
2310
2311
|
// Empty bag
|
|
2311
2312
|
this.bag.set([]);
|
|
@@ -2360,22 +2361,21 @@ class ClipperService {
|
|
|
2360
2361
|
*/
|
|
2361
2362
|
autoLogin(onSuccess) {
|
|
2362
2363
|
this.login(undefined, undefined, true)
|
|
2363
|
-
.pipe(finalize(() => this.dialogService.clearBusy()))
|
|
2364
2364
|
.subscribe({
|
|
2365
2365
|
next: r => {
|
|
2366
2366
|
if (!r.success) {
|
|
2367
|
-
this.
|
|
2367
|
+
this.broadcastService.sendMessage(ClipperMessages.ERROR, r.message);
|
|
2368
2368
|
}
|
|
2369
2369
|
else {
|
|
2370
2370
|
if (!r.value.requiresMfa) {
|
|
2371
|
-
this.
|
|
2371
|
+
this.broadcastService.sendMessage(ClipperMessages.SUCCESS_TOAST, { message: "Connesso a Clipper", icon: 'power', duration: 1500 });
|
|
2372
2372
|
}
|
|
2373
2373
|
if (onSuccess) {
|
|
2374
2374
|
onSuccess(r.value);
|
|
2375
2375
|
}
|
|
2376
2376
|
}
|
|
2377
2377
|
},
|
|
2378
|
-
error: () => { this.
|
|
2378
|
+
error: () => { this.broadcastService.sendMessage(ClipperMessages.ERROR, "Clipper non disponibile."); }
|
|
2379
2379
|
});
|
|
2380
2380
|
}
|
|
2381
2381
|
/**
|
|
@@ -2388,17 +2388,16 @@ class ClipperService {
|
|
|
2388
2388
|
next: r => {
|
|
2389
2389
|
if (!r.success) {
|
|
2390
2390
|
if (r.message) {
|
|
2391
|
-
this.
|
|
2391
|
+
this.broadcastService.sendMessage(ClipperMessages.ERROR, r.message);
|
|
2392
2392
|
}
|
|
2393
2393
|
this.broadcastService.sendMessage(ClipperMessages.LOGIN_CHANGED);
|
|
2394
2394
|
}
|
|
2395
2395
|
else {
|
|
2396
|
-
this.
|
|
2396
|
+
this.broadcastService.sendMessage(ClipperMessages.SUCCESS_TOAST, { message: "Disconnesso da Clipper", icon: 'power_off', duration: 1500 });
|
|
2397
2397
|
}
|
|
2398
2398
|
},
|
|
2399
2399
|
error: () => { },
|
|
2400
2400
|
complete: () => {
|
|
2401
|
-
this.dialogService.clearBusy();
|
|
2402
2401
|
if (onSuccess) {
|
|
2403
2402
|
onSuccess();
|
|
2404
2403
|
}
|
|
@@ -2799,7 +2798,7 @@ class ClipperService {
|
|
|
2799
2798
|
.get(this.serviceUri + '/documents/working')
|
|
2800
2799
|
.subscribe(r => {
|
|
2801
2800
|
if (!r.success) {
|
|
2802
|
-
this.
|
|
2801
|
+
this.broadcastService.sendMessage(ClipperMessages.ERROR, r.message);
|
|
2803
2802
|
}
|
|
2804
2803
|
else {
|
|
2805
2804
|
if (r.value) {
|
|
@@ -2832,7 +2831,7 @@ class ClipperService {
|
|
|
2832
2831
|
.post(this.serviceUri + '/documents/working/add', { documentIds: documentIds })
|
|
2833
2832
|
.subscribe((r) => {
|
|
2834
2833
|
if (!r.success) {
|
|
2835
|
-
this.
|
|
2834
|
+
this.broadcastService.sendMessage(ClipperMessages.LOGIN_CHANGED);
|
|
2836
2835
|
}
|
|
2837
2836
|
else {
|
|
2838
2837
|
if (r.value) {
|
|
@@ -2852,7 +2851,7 @@ class ClipperService {
|
|
|
2852
2851
|
if (newItems.length > 0) {
|
|
2853
2852
|
this.bag.update((values) => [...values, ...newItems]);
|
|
2854
2853
|
}
|
|
2855
|
-
this.
|
|
2854
|
+
this.broadcastService.sendMessage(ClipperMessages.SUCCESS_TOAST, { message: "Operazione completata con successo.", icon: 'check', duration: 1500 });
|
|
2856
2855
|
}
|
|
2857
2856
|
}
|
|
2858
2857
|
});
|
|
@@ -2866,7 +2865,7 @@ class ClipperService {
|
|
|
2866
2865
|
.post(this.serviceUri + '/documents/working/delete', { documentIds: [documentId] })
|
|
2867
2866
|
.subscribe((r) => {
|
|
2868
2867
|
if (!r.success) {
|
|
2869
|
-
this.
|
|
2868
|
+
this.broadcastService.sendMessage(ClipperMessages.ERROR, r.message);
|
|
2870
2869
|
}
|
|
2871
2870
|
else {
|
|
2872
2871
|
const p = this.bag().findIndex((n) => n.documentId === documentId);
|
|
@@ -2875,7 +2874,7 @@ class ClipperService {
|
|
|
2875
2874
|
values.splice(p, 1);
|
|
2876
2875
|
return [...values];
|
|
2877
2876
|
});
|
|
2878
|
-
this.
|
|
2877
|
+
this.broadcastService.sendMessage(ClipperMessages.SUCCESS_TOAST, { message: "Operazione completata con successo.", icon: 'check', duration: 1500 });
|
|
2879
2878
|
}
|
|
2880
2879
|
}
|
|
2881
2880
|
});
|
|
@@ -2888,11 +2887,11 @@ class ClipperService {
|
|
|
2888
2887
|
.post(this.serviceUri + '/documents/working/delete', { deleteAll: true })
|
|
2889
2888
|
.subscribe((r) => {
|
|
2890
2889
|
if (!r.success) {
|
|
2891
|
-
this.
|
|
2890
|
+
this.broadcastService.sendMessage(ClipperMessages.ERROR, r.message);
|
|
2892
2891
|
}
|
|
2893
2892
|
else {
|
|
2894
2893
|
this.bag.set([]);
|
|
2895
|
-
this.
|
|
2894
|
+
this.broadcastService.sendMessage(ClipperMessages.SUCCESS_TOAST, { message: "Operazione completata con successo.", icon: 'check', duration: 1500 });
|
|
2896
2895
|
}
|
|
2897
2896
|
});
|
|
2898
2897
|
}
|
|
@@ -3442,15 +3441,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
|
|
|
3442
3441
|
type: Injectable
|
|
3443
3442
|
}] });
|
|
3444
3443
|
|
|
3445
|
-
class ArsClipperCommonModule {
|
|
3446
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ArsClipperCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
3447
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.0", ngImport: i0, type: ArsClipperCommonModule }); }
|
|
3448
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ArsClipperCommonModule }); }
|
|
3449
|
-
}
|
|
3450
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImport: i0, type: ArsClipperCommonModule, decorators: [{
|
|
3451
|
-
type: NgModule
|
|
3452
|
-
}] });
|
|
3453
|
-
|
|
3454
3444
|
/*
|
|
3455
3445
|
* Public API Surface of ars-utils
|
|
3456
3446
|
*/
|
|
@@ -3459,5 +3449,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.0", ngImpor
|
|
|
3459
3449
|
* Generated bundle index. Do not edit.
|
|
3460
3450
|
*/
|
|
3461
3451
|
|
|
3462
|
-
export {
|
|
3452
|
+
export { ClipperArchiveCopyMode, ClipperArchiveFileStorageType, ClipperArchiveFileStorageTypes, ClipperArchiveFileType, ClipperArchiveFileTypes, ClipperArchiveFilesSearchParams, ClipperArchiveFoldersSearchParams, ClipperAuthInterceptor, ClipperAuthors, ClipperCalendarCopyMode, ClipperCalendarSearchParams, ClipperCalendarState, ClipperCalendarStates, ClipperChannel, ClipperChannelSettings, ClipperChannels, ClipperDashboard, ClipperDocumentChangeReasons, ClipperDocumentContainer, ClipperExportDocumentsFormat, ClipperFacet, ClipperMessages, ClipperModel, ClipperModels, ClipperModule, ClipperModuleGroup, ClipperModuleGroups, ClipperModules, ClipperQueryDocumentFlags, ClipperQueryReferencesMode, ClipperRecurrenceType, ClipperRecurrenceTypes, ClipperRegions, ClipperSearchCalendarSnapshotResult, ClipperSearchFacetsSnapshot, ClipperSearchParams, ClipperSearchResult, ClipperSearchUtils, ClipperSectorTypes, ClipperSectors, ClipperSelectionMode, ClipperService, ClipperServiceFlags, ClipperSort, ClipperSources, ClipperTeamInfo, ClipperTeamProduct, ClipperTeamProductPermission, ClipperUpdateChannelsStateParams, ClipperUtils, NotesColors };
|
|
3463
3453
|
//# sourceMappingURL=arsedizioni-ars-utils-clipper.common.mjs.map
|