@arsedizioni/ars-utils 18.2.465 → 18.2.467
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 +41 -16
- package/clipper.common/common/services/clipper.service.d.ts +51 -10
- package/esm2022/clipper.common/common/definitions.mjs +44 -13
- package/esm2022/clipper.common/common/services/clipper.service.mjs +140 -6
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +183 -18
- package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { signal, computed, inject, Injectable, NgModule } from '@angular/core';
|
|
3
|
-
import { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
|
|
3
|
+
import { HttpClient, HttpHeaders, HttpRequest, HttpErrorResponse } from '@angular/common/http';
|
|
4
4
|
import { BroadcastService, SystemUtils } from '@arsedizioni/ars-utils/core';
|
|
5
5
|
import { DialogService } from '@arsedizioni/ars-utils/ui';
|
|
6
6
|
import { throwError, of, finalize, catchError as catchError$1, switchMap } from 'rxjs';
|
|
@@ -46,6 +46,17 @@ var ClipperServiceFlags;
|
|
|
46
46
|
ClipperServiceFlags[ClipperServiceFlags["NotifySystemErrors"] = 1] = "NotifySystemErrors";
|
|
47
47
|
ClipperServiceFlags[ClipperServiceFlags["DisplayConnectionStateMessages"] = 2] = "DisplayConnectionStateMessages";
|
|
48
48
|
})(ClipperServiceFlags || (ClipperServiceFlags = {}));
|
|
49
|
+
var ClipperRecurrenceType;
|
|
50
|
+
(function (ClipperRecurrenceType) {
|
|
51
|
+
ClipperRecurrenceType[ClipperRecurrenceType["Year"] = 1] = "Year";
|
|
52
|
+
ClipperRecurrenceType[ClipperRecurrenceType["Month"] = 2] = "Month";
|
|
53
|
+
ClipperRecurrenceType[ClipperRecurrenceType["Day"] = 3] = "Day";
|
|
54
|
+
})(ClipperRecurrenceType || (ClipperRecurrenceType = {}));
|
|
55
|
+
const ClipperRecurrenceTypes = [
|
|
56
|
+
{ name: 'Anni', value: ClipperRecurrenceType.Year },
|
|
57
|
+
{ name: 'Mesi', value: ClipperRecurrenceType.Month },
|
|
58
|
+
{ name: 'Giorni', value: ClipperRecurrenceType.Day }
|
|
59
|
+
];
|
|
49
60
|
var ClipperSelectionMode;
|
|
50
61
|
(function (ClipperSelectionMode) {
|
|
51
62
|
ClipperSelectionMode[ClipperSelectionMode["Single"] = 1] = "Single";
|
|
@@ -1660,7 +1671,7 @@ const ClipperCalendarStates = [
|
|
|
1660
1671
|
{ name: 'Scadute', value: ClipperCalendarState.Expired },
|
|
1661
1672
|
{ name: 'Imminenti', value: ClipperCalendarState.Expiring }
|
|
1662
1673
|
];
|
|
1663
|
-
class
|
|
1674
|
+
class ClipperCalendarSearchParams {
|
|
1664
1675
|
constructor() {
|
|
1665
1676
|
this.id = null;
|
|
1666
1677
|
this.fromDate = null;
|
|
@@ -1676,17 +1687,6 @@ class ClipperSearchCalendarParams {
|
|
|
1676
1687
|
this.count = 15;
|
|
1677
1688
|
}
|
|
1678
1689
|
}
|
|
1679
|
-
var ClipperRecurrenceType;
|
|
1680
|
-
(function (ClipperRecurrenceType) {
|
|
1681
|
-
ClipperRecurrenceType[ClipperRecurrenceType["Year"] = 1] = "Year";
|
|
1682
|
-
ClipperRecurrenceType[ClipperRecurrenceType["Month"] = 2] = "Month";
|
|
1683
|
-
ClipperRecurrenceType[ClipperRecurrenceType["Day"] = 3] = "Day";
|
|
1684
|
-
})(ClipperRecurrenceType || (ClipperRecurrenceType = {}));
|
|
1685
|
-
const ClipperRecurrenceTypes = [
|
|
1686
|
-
{ name: 'Anni', value: ClipperRecurrenceType.Year },
|
|
1687
|
-
{ name: 'Mesi', value: ClipperRecurrenceType.Month },
|
|
1688
|
-
{ name: 'Giorni', value: ClipperRecurrenceType.Day }
|
|
1689
|
-
];
|
|
1690
1690
|
var ClipperCalendarCopyMode;
|
|
1691
1691
|
(function (ClipperCalendarCopyMode) {
|
|
1692
1692
|
ClipperCalendarCopyMode[ClipperCalendarCopyMode["Duplicate"] = 1] = "Duplicate";
|
|
@@ -1723,6 +1723,37 @@ var ClipperArchiveFileStorageType;
|
|
|
1723
1723
|
ClipperArchiveFileStorageType[ClipperArchiveFileStorageType["Binary"] = 2] = "Binary";
|
|
1724
1724
|
ClipperArchiveFileStorageType[ClipperArchiveFileStorageType["Permalink"] = 3] = "Permalink";
|
|
1725
1725
|
})(ClipperArchiveFileStorageType || (ClipperArchiveFileStorageType = {}));
|
|
1726
|
+
class ClipperArchiveFoldersSearchParams {
|
|
1727
|
+
constructor() {
|
|
1728
|
+
this.teamId = null;
|
|
1729
|
+
this.privateOnly = null;
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
class ClipperArchiveFilesSearchParams {
|
|
1733
|
+
constructor() {
|
|
1734
|
+
this.teamId = null;
|
|
1735
|
+
this.folderId = null;
|
|
1736
|
+
this.folderName = null;
|
|
1737
|
+
this.fileType = null;
|
|
1738
|
+
this.fromDate = null;
|
|
1739
|
+
this.toDate = null;
|
|
1740
|
+
this.topicPath = null;
|
|
1741
|
+
this.titlesOnly = null;
|
|
1742
|
+
this.text = null;
|
|
1743
|
+
this.changedFromDate = null;
|
|
1744
|
+
this.changeReason = null;
|
|
1745
|
+
this.changeState = null;
|
|
1746
|
+
this.documentNumber = null;
|
|
1747
|
+
this.documentYear = null;
|
|
1748
|
+
this.first = null;
|
|
1749
|
+
this.count = null;
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
var ClipperArchiveCopyMode;
|
|
1753
|
+
(function (ClipperArchiveCopyMode) {
|
|
1754
|
+
ClipperArchiveCopyMode[ClipperArchiveCopyMode["Duplicate"] = 1] = "Duplicate";
|
|
1755
|
+
ClipperArchiveCopyMode[ClipperArchiveCopyMode["Move"] = 2] = "Move";
|
|
1756
|
+
})(ClipperArchiveCopyMode || (ClipperArchiveCopyMode = {}));
|
|
1726
1757
|
class ClipperUtils {
|
|
1727
1758
|
/**
|
|
1728
1759
|
* Check if a model is readable
|
|
@@ -2728,12 +2759,146 @@ class ClipperService {
|
|
|
2728
2759
|
responseType: 'blob'
|
|
2729
2760
|
});
|
|
2730
2761
|
}
|
|
2762
|
+
///
|
|
2763
|
+
// ARCHIVE
|
|
2764
|
+
///
|
|
2765
|
+
/**
|
|
2766
|
+
* Retrieve all folders
|
|
2767
|
+
* @param params : parameters
|
|
2768
|
+
*/
|
|
2769
|
+
getArchiveFolders(params) {
|
|
2770
|
+
return this.httpClient
|
|
2771
|
+
.post(this._serviceUri + '/archive/folders', params)
|
|
2772
|
+
.pipe(map((r) => {
|
|
2773
|
+
// Store teams
|
|
2774
|
+
if (r.success) {
|
|
2775
|
+
this._teams = r.value.teams;
|
|
2776
|
+
}
|
|
2777
|
+
return r;
|
|
2778
|
+
return r;
|
|
2779
|
+
}));
|
|
2780
|
+
}
|
|
2781
|
+
/**
|
|
2782
|
+
* Save folder
|
|
2783
|
+
* @param params : parameters
|
|
2784
|
+
*/
|
|
2785
|
+
saveArchiveFolder(params) {
|
|
2786
|
+
return this.httpClient.post(this._serviceUri + '/archive/folders/save', params);
|
|
2787
|
+
}
|
|
2788
|
+
/**
|
|
2789
|
+
* Export folder
|
|
2790
|
+
* @param item : the folder to export
|
|
2791
|
+
*/
|
|
2792
|
+
exportArchiveFolder(item) {
|
|
2793
|
+
let url = this._serviceUri + '/archive/export/?';
|
|
2794
|
+
if (item.folderId) {
|
|
2795
|
+
url += 'id=' + item.folderId;
|
|
2796
|
+
}
|
|
2797
|
+
if (item.teamId) {
|
|
2798
|
+
if (item.folderId)
|
|
2799
|
+
url += '&';
|
|
2800
|
+
url += 'team=' + item.teamId;
|
|
2801
|
+
}
|
|
2802
|
+
return this.httpClient.get(url, {
|
|
2803
|
+
headers: new HttpHeaders({
|
|
2804
|
+
'Content-Type': 'application/octet-stram'
|
|
2805
|
+
}),
|
|
2806
|
+
responseType: 'blob'
|
|
2807
|
+
});
|
|
2808
|
+
}
|
|
2809
|
+
/**
|
|
2810
|
+
* Import folder
|
|
2811
|
+
* @param params : parameters
|
|
2812
|
+
*/
|
|
2813
|
+
importArchiveFolder(params) {
|
|
2814
|
+
// Prepare form
|
|
2815
|
+
const formData = new FormData();
|
|
2816
|
+
formData.append(params.file.name, params.file);
|
|
2817
|
+
formData.append('sourceFileName', params.file.name);
|
|
2818
|
+
formData.append('overwrite', params.overwrite === true ? "true" : "false");
|
|
2819
|
+
if (params.destFolderId) {
|
|
2820
|
+
formData.append('destFolderId', params.destFolderId);
|
|
2821
|
+
}
|
|
2822
|
+
if (params.teamId) {
|
|
2823
|
+
formData.append('teamId', params.teamId);
|
|
2824
|
+
}
|
|
2825
|
+
// Create request
|
|
2826
|
+
return this.httpClient.request(new HttpRequest('POST', this._serviceUri + '/archive/import/', formData, { reportProgress: true }));
|
|
2827
|
+
}
|
|
2731
2828
|
/**
|
|
2732
|
-
*
|
|
2733
|
-
* @param
|
|
2829
|
+
* Get files and folders
|
|
2830
|
+
* @param params : parameters
|
|
2831
|
+
*/
|
|
2832
|
+
queryArchiveItems(params) {
|
|
2833
|
+
return this.httpClient.post(this._serviceUri + '/archive/files', params);
|
|
2834
|
+
}
|
|
2835
|
+
/**
|
|
2836
|
+
* Delete file and folders
|
|
2837
|
+
* @param params parameters
|
|
2734
2838
|
*/
|
|
2735
|
-
|
|
2736
|
-
return this.httpClient.post(this._serviceUri + '/
|
|
2839
|
+
deleteArchiveItems(params) {
|
|
2840
|
+
return this.httpClient.post(this._serviceUri + '/archive/files/delete', params);
|
|
2841
|
+
}
|
|
2842
|
+
/**
|
|
2843
|
+
* Copy file and folders to another folder or the same
|
|
2844
|
+
* @param params parameters
|
|
2845
|
+
*/
|
|
2846
|
+
copyArchiveItems(params) {
|
|
2847
|
+
return this.httpClient.post(this._serviceUri + '/archive/files/copy', params);
|
|
2848
|
+
}
|
|
2849
|
+
/**
|
|
2850
|
+
* Save a file
|
|
2851
|
+
* @param params : parameters
|
|
2852
|
+
*/
|
|
2853
|
+
saveArchiveFile(params) {
|
|
2854
|
+
// Prepare form
|
|
2855
|
+
let formData = new FormData();
|
|
2856
|
+
if (params.file)
|
|
2857
|
+
formData.append(params.file.file.name, params.file.file);
|
|
2858
|
+
if (params.id)
|
|
2859
|
+
formData.append('id', params.id);
|
|
2860
|
+
formData.append('folderId', params.folderId);
|
|
2861
|
+
if (params.topicId) {
|
|
2862
|
+
formData.append('topicId', params.topicId);
|
|
2863
|
+
formData.append('topicPath', params.topicPath);
|
|
2864
|
+
}
|
|
2865
|
+
if (params.title1)
|
|
2866
|
+
formData.append('title1', params.title1);
|
|
2867
|
+
if (params.title2)
|
|
2868
|
+
formData.append('title2', params.title2);
|
|
2869
|
+
if (params.origin)
|
|
2870
|
+
formData.append('origin', params.origin);
|
|
2871
|
+
if (params.originDescription) {
|
|
2872
|
+
formData.append('originDescription', params.originDescription);
|
|
2873
|
+
}
|
|
2874
|
+
if (params.documentId)
|
|
2875
|
+
formData.append('documentId', params.documentId);
|
|
2876
|
+
if (params.documentIds)
|
|
2877
|
+
formData.append('documentIds', params.documentIds);
|
|
2878
|
+
if (params.binaryId)
|
|
2879
|
+
formData.append('binaryId', params.binaryId?.toString());
|
|
2880
|
+
if (params.tags)
|
|
2881
|
+
formData.append('tags', params.tags);
|
|
2882
|
+
if (params.notes)
|
|
2883
|
+
formData.append('notes', params.notes);
|
|
2884
|
+
if (params.fileName)
|
|
2885
|
+
formData.append('fileName', params.fileName);
|
|
2886
|
+
if (params.fileType)
|
|
2887
|
+
formData.append('fileType', params.fileType.toString());
|
|
2888
|
+
if (params.storageType)
|
|
2889
|
+
formData.append('storageType', params.storageType.toString());
|
|
2890
|
+
if (params.model)
|
|
2891
|
+
formData.append('model', params.model.toString());
|
|
2892
|
+
// Create request
|
|
2893
|
+
return this.httpClient.request(new HttpRequest('POST', this._serviceUri + '/archive/files/save', formData, { reportProgress: true }));
|
|
2894
|
+
}
|
|
2895
|
+
/**
|
|
2896
|
+
* Download file
|
|
2897
|
+
* @param id : the binary id to download
|
|
2898
|
+
* @param otp : the optional one time password
|
|
2899
|
+
*/
|
|
2900
|
+
downloadArchiveFile(id, otp = null) {
|
|
2901
|
+
return this.httpClient.get(this._serviceUri + '/archive/files/download/?id=' + id + '&otp=' + otp, { responseType: 'blob' });
|
|
2737
2902
|
}
|
|
2738
2903
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: ClipperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2739
2904
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.3", ngImport: i0, type: ClipperService, providedIn: 'root' }); }
|
|
@@ -2839,5 +3004,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.3", ngImpor
|
|
|
2839
3004
|
* Generated bundle index. Do not edit.
|
|
2840
3005
|
*/
|
|
2841
3006
|
|
|
2842
|
-
export { ArsClipperCommonModule, ClipperArchiveFileStorageType, ClipperArchiveFileType, ClipperArchiveFileTypes, ClipperAuthInterceptor, ClipperAuthors, ClipperCalendarCopyMode, ClipperCalendarState, ClipperCalendarStates, ClipperChannel, ClipperChannelSettings, ClipperChannels, ClipperDashboard, ClipperDocumentChangeReasons, ClipperDocumentContainer, ClipperExportDocumentsFormat, ClipperFacet, ClipperMessages, ClipperModel, ClipperModels, ClipperModule, ClipperModuleGroup, ClipperModuleGroups, ClipperModules, ClipperQueryReferencesMode, ClipperRecurrenceType, ClipperRecurrenceTypes, ClipperRegions,
|
|
3007
|
+
export { ArsClipperCommonModule, ClipperArchiveCopyMode, ClipperArchiveFileStorageType, 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, ClipperQueryReferencesMode, ClipperRecurrenceType, ClipperRecurrenceTypes, ClipperRegions, ClipperSearchCalendarSnapshotResult, ClipperSearchFacetsSnapshot, ClipperSearchParams, ClipperSearchResult, ClipperSearchUtils, ClipperSectorTypes, ClipperSectors, ClipperSelectionMode, ClipperService, ClipperServiceFlags, ClipperSort, ClipperSources, ClipperTeamInfo, ClipperTeamMemberInfo, ClipperTeamProduct, ClipperTeamProductPermission, ClipperUtils };
|
|
2843
3008
|
//# sourceMappingURL=arsedizioni-ars-utils-clipper.common.mjs.map
|