@alfresco/adf-content-services 8.4.0-18942272265 → 8.4.0-18976556289
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.
|
@@ -2697,7 +2697,7 @@ class SavedSearchesService {
|
|
|
2697
2697
|
getSavedSearches() {
|
|
2698
2698
|
const savedSearchesMigrated = localStorage.getItem(this.getLocalStorageKey()) ?? '';
|
|
2699
2699
|
if (savedSearchesMigrated === 'true') {
|
|
2700
|
-
return
|
|
2700
|
+
return this.getSavedSearchesFromPreferenceApi();
|
|
2701
2701
|
}
|
|
2702
2702
|
else {
|
|
2703
2703
|
return this.getSavedSearchesNodeId().pipe(take(1), concatMap(() => {
|
|
@@ -2705,9 +2705,9 @@ class SavedSearchesService {
|
|
|
2705
2705
|
return this.migrateSavedSearches();
|
|
2706
2706
|
}
|
|
2707
2707
|
else {
|
|
2708
|
-
return
|
|
2708
|
+
return this.getSavedSearchesFromPreferenceApi();
|
|
2709
2709
|
}
|
|
2710
|
-
}));
|
|
2710
|
+
}), catchError(() => this.getSavedSearchesFromPreferenceApi()));
|
|
2711
2711
|
}
|
|
2712
2712
|
}
|
|
2713
2713
|
/**
|
|
@@ -2809,11 +2809,8 @@ class SavedSearchesService {
|
|
|
2809
2809
|
const errorStatusCode = JSON.parse(error.message).error.statusCode;
|
|
2810
2810
|
if (errorStatusCode === 404) {
|
|
2811
2811
|
localStorage.setItem(this.getLocalStorageKey(), 'true');
|
|
2812
|
-
return '';
|
|
2813
|
-
}
|
|
2814
|
-
else {
|
|
2815
|
-
return throwError(() => error);
|
|
2816
2812
|
}
|
|
2813
|
+
return throwError(() => error);
|
|
2817
2814
|
}));
|
|
2818
2815
|
}
|
|
2819
2816
|
async mapFileContentToSavedSearches(blob) {
|
|
@@ -2837,6 +2834,9 @@ class SavedSearchesService {
|
|
|
2837
2834
|
this.nodesApi.deleteNode(this.savedSearchFileNodeId, { permanent: true });
|
|
2838
2835
|
}));
|
|
2839
2836
|
}
|
|
2837
|
+
getSavedSearchesFromPreferenceApi() {
|
|
2838
|
+
return from(this.preferencesApi.getPreference('-me-', 'saved-searches')).pipe(map((preference) => JSON.parse(preference.entry.value)), catchError(() => of([])));
|
|
2839
|
+
}
|
|
2840
2840
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SavedSearchesService, deps: [{ token: AlfrescoApiService }, { token: i1.AuthenticationService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2841
2841
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SavedSearchesService, providedIn: 'root' }); }
|
|
2842
2842
|
}
|