Revert "[ACS-9166] Migrate Saved Searches to preferences API from config file…" (#4347)

This reverts commit 0dfd2c17ab9537a144803c19ee1c1b90482d66a6.
This commit is contained in:
MichalKinas 2025-01-20 12:38:19 +01:00 committed by GitHub
parent 0dfd2c17ab
commit 1b170f69e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 60 additions and 42 deletions

View File

@ -167,7 +167,7 @@ test.describe('Remember sorting', () => {
});
test('[C261147] Sort order is retained when user changes the page from pagination', async ({ personalFiles }) => {
const lastFileInArray = testData.user1.files.jpg.slice(-2).pop();
const lastFileInArray = testData.user1.files.jpg.slice(-2)[0];
const firstFileInArray = testData.user1.files.pdf[0];
await personalFiles.pagination.clickOnNextPage();

79
package-lock.json generated
View File

@ -9,11 +9,11 @@
"version": "5.3.0",
"license": "LGPL-3.0",
"dependencies": {
"@alfresco/adf-content-services": "7.0.0-alpha.7-12862968027",
"@alfresco/adf-core": "7.0.0-alpha.7-12862968027",
"@alfresco/adf-extensions": "7.0.0-alpha.7-12862968027",
"@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.7-12862968027",
"@alfresco/js-api": "8.0.0-alpha.7-12862968027",
"@alfresco/adf-content-services": "7.0.0-alpha.7-12797937770",
"@alfresco/adf-core": "7.0.0-alpha.7-12797937770",
"@alfresco/adf-extensions": "7.0.0-alpha.7-12797937770",
"@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.7-12797937770",
"@alfresco/js-api": "8.0.0-alpha.7-12797937770",
"@angular/animations": "16.2.9",
"@angular/cdk": "16.2.9",
"@angular/common": "16.2.9",
@ -41,7 +41,7 @@
"zone.js": "0.13.3"
},
"devDependencies": {
"@alfresco/adf-cli": "7.0.0-alpha.7-12862968027",
"@alfresco/adf-cli": "7.0.0-alpha.7-12797937770",
"@angular-devkit/build-angular": "16.2.16",
"@angular-devkit/core": "16.2.9",
"@angular-devkit/schematics": "16.2.9",
@ -106,12 +106,13 @@
"dev": true
},
"node_modules/@alfresco/adf-cli": {
"version": "7.0.0-alpha.7-12862968027",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-7.0.0-alpha.7-12862968027.tgz",
"integrity": "sha512-u999t/ty0b3xhTTvfKF96rcbdjn/S94SsoFLFlj6QZgYHGko333UDmgd2t9TA9m2nP6wwftKXrmZVsOYxaXiFA==",
"version": "7.0.0-alpha.7-12797937770",
"resolved": "https://registry.npmjs.org/@alfresco/adf-cli/-/adf-cli-7.0.0-alpha.7-12797937770.tgz",
"integrity": "sha512-VdHmatCJamP14UeDOTlPqTbtGLs7LkIf2IChKdAva9ujvKDWQ3gDjiKSTEQO0EQfYWp3GotmXs6yjVdE7eK7+w==",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@alfresco/js-api": ">=8.0.0-alpha.7-12862968027",
"@alfresco/js-api": ">=8.0.0-alpha.7-12797937770",
"commander": "^6.2.1",
"ejs": "^3.1.9",
"license-checker": "^25.0.1",
@ -144,15 +145,16 @@
"dev": true
},
"node_modules/@alfresco/adf-content-services": {
"version": "7.0.0-alpha.7-12862968027",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-7.0.0-alpha.7-12862968027.tgz",
"integrity": "sha512-FNLpyfeibRUrxbM6e8FABNey6Tv920qZc/nBdMHwWvx6wN8SmDwZBKsTG9yL2Wcc084/aahnUdULTc7xf3mSJA==",
"version": "7.0.0-alpha.7-12797937770",
"resolved": "https://registry.npmjs.org/@alfresco/adf-content-services/-/adf-content-services-7.0.0-alpha.7-12797937770.tgz",
"integrity": "sha512-6dIKZLmgixL1E0jpBaXjQ4vJaBUy9IhjMs857r+mE86cFoQPugEN1EW9/YJg4+E/OCacYgpw36wBH7yt/pLRbw==",
"license": "Apache-2.0",
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
"@alfresco/adf-core": ">=7.0.0-alpha.7-12862968027",
"@alfresco/js-api": ">=8.0.0-alpha.7-12862968027",
"@alfresco/adf-core": ">=7.0.0-alpha.7-12797937770",
"@alfresco/js-api": ">=8.0.0-alpha.7-12797937770",
"@angular/animations": ">=14.1.3",
"@angular/cdk": ">=14.1.2",
"@angular/common": ">=14.1.3",
@ -167,9 +169,10 @@
}
},
"node_modules/@alfresco/adf-core": {
"version": "7.0.0-alpha.7-12862968027",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-7.0.0-alpha.7-12862968027.tgz",
"integrity": "sha512-h29JceTwmKh5ymJZ4Nc21/xxxBVR8u9Hv3ZISQzZGuHRDUeBEAXHX1HGi0hvhU4yMF1jD4rZUizfo+YpWcmjMg==",
"version": "7.0.0-alpha.7-12797937770",
"resolved": "https://registry.npmjs.org/@alfresco/adf-core/-/adf-core-7.0.0-alpha.7-12797937770.tgz",
"integrity": "sha512-o3ABUP2SE9m/UoZXCqzN46eNh+Il0Qjrmubioa2K3BCcjImdBjPsHoZpnilHkRC3nsvkZO4kQ9WN3bxPhX2wvg==",
"license": "Apache-2.0",
"dependencies": {
"angular-oauth2-oidc": "17.0.2",
"angular-oauth2-oidc-jwks": "17.0.2",
@ -179,8 +182,8 @@
"tslib": "^2.3.0"
},
"peerDependencies": {
"@alfresco/adf-extensions": ">=7.0.0-alpha.7-12862968027",
"@alfresco/js-api": ">=8.0.0-alpha.7-12862968027",
"@alfresco/adf-extensions": ">=7.0.0-alpha.7-12797937770",
"@alfresco/js-api": ">=8.0.0-alpha.7-12797937770",
"@angular/animations": "16.2.9",
"@angular/cdk": "16.2.9",
"@angular/common": "16.2.9",
@ -198,31 +201,34 @@
}
},
"node_modules/@alfresco/adf-extensions": {
"version": "7.0.0-alpha.7-12862968027",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-7.0.0-alpha.7-12862968027.tgz",
"integrity": "sha512-SUTCvh0b+EU928Wz7AN1l+xGEjQgffA4fqhKbaRC1YdExpOZhT7l1rZyDIPcq8rn672F/nXWDRULbwDeJPJLRw==",
"version": "7.0.0-alpha.7-12797937770",
"resolved": "https://registry.npmjs.org/@alfresco/adf-extensions/-/adf-extensions-7.0.0-alpha.7-12797937770.tgz",
"integrity": "sha512-dlrnLfy1fiUekFuneIwqbellIbn1g76azI8ZvIYQzvlcCiqCO3b5TuB9MDuNVH1J3vETo14994gh90X6tmdq9Q==",
"license": "Apache-2.0",
"dependencies": {
"tslib": "^2.3.0"
},
"peerDependencies": {
"@alfresco/js-api": ">=8.0.0-alpha.7-12862968027",
"@alfresco/js-api": ">=8.0.0-alpha.7-12797937770",
"@angular/common": ">=14.1.3",
"@angular/core": ">=14.1.3"
}
},
"node_modules/@alfresco/eslint-plugin-eslint-angular": {
"version": "7.0.0-alpha.7-12862968027",
"resolved": "https://registry.npmjs.org/@alfresco/eslint-plugin-eslint-angular/-/eslint-plugin-eslint-angular-7.0.0-alpha.7-12862968027.tgz",
"integrity": "sha512-/LV5xPL2cpPjpCc5I6OswK4BgnQ4nhiFQfeNKdBMTUi9TqBMQ0NJ9Yo0KtwfrsogWRXSi2nInnG0t22u5wAXUA==",
"version": "7.0.0-alpha.7-12797937770",
"resolved": "https://registry.npmjs.org/@alfresco/eslint-plugin-eslint-angular/-/eslint-plugin-eslint-angular-7.0.0-alpha.7-12797937770.tgz",
"integrity": "sha512-59Cf16RRJgNU5JaAVd9QfLSt2vnFQIwNNHio+J1C1bhjs+9TIbnb1Tg21X9yjBBfeAYidXUIYReJc/bKM3QG8Q==",
"license": "Apache-2.0",
"dependencies": {
"@angular-eslint/utils": "16.3.1",
"@typescript-eslint/utils": "5.62.0"
}
},
"node_modules/@alfresco/js-api": {
"version": "8.0.0-alpha.7-12862968027",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-8.0.0-alpha.7-12862968027.tgz",
"integrity": "sha512-q6/4Tcu1IL7xxq7jV5x42pJGTUfEd0JLrYYtwFFA/KrExcZ29DWkeRI+X0cyJNPZUObT0WHaJB1boPsx/oFNsw==",
"version": "8.0.0-alpha.7-12797937770",
"resolved": "https://registry.npmjs.org/@alfresco/js-api/-/js-api-8.0.0-alpha.7-12797937770.tgz",
"integrity": "sha512-yvXJ/Wn7Uzb9JqtsMekmx7BcLCDamJ/Udaq1VjW7GveezoF+KQSHdcl2AQJM/d0ECgtBza25QCA900pcyoI15Q==",
"license": "Apache-2.0",
"dependencies": {
"event-emitter": "^0.3.5",
"superagent": "^9.0.1",
@ -9364,6 +9370,7 @@
"version": "0.21.0",
"resolved": "https://registry.npmjs.org/@ts-morph/common/-/common-0.21.0.tgz",
"integrity": "sha512-ES110Mmne5Vi4ypUKrtVQfXFDtCsDXiUiGxF6ILVlE90dDD4fdpC1LSjydl/ml7xJWKSDZwUYD2zkOePMSrPBA==",
"license": "MIT",
"peer": true,
"dependencies": {
"fast-glob": "^3.2.12",
@ -9376,6 +9383,7 @@
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"license": "MIT",
"peer": true,
"dependencies": {
"balanced-match": "^1.0.0"
@ -9385,6 +9393,7 @@
"version": "7.4.6",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz",
"integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==",
"license": "ISC",
"peer": true,
"dependencies": {
"brace-expansion": "^2.0.1"
@ -9400,6 +9409,7 @@
"version": "2.1.6",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz",
"integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==",
"license": "MIT",
"peer": true,
"bin": {
"mkdirp": "dist/cjs/src/bin.js"
@ -10523,6 +10533,7 @@
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/angular-oauth2-oidc/-/angular-oauth2-oidc-17.0.2.tgz",
"integrity": "sha512-zYgeLmAnu1g8XAYZK+csAsCQBDhgp9ffBv/eArEnujGxNPTeK00bREHWObtehflpQdSn+k9rY2D15ChCSydyVw==",
"license": "MIT",
"dependencies": {
"tslib": "^2.5.2"
},
@ -10535,6 +10546,7 @@
"version": "17.0.2",
"resolved": "https://registry.npmjs.org/angular-oauth2-oidc-jwks/-/angular-oauth2-oidc-jwks-17.0.2.tgz",
"integrity": "sha512-zG0udq9VihQdCKfGjhUfrIg35TbxU34tGfOG/pddxKwJkodMAFI34cNoZoVyZ53hPgeZSDPra2rYyixkH7bkKw==",
"license": "MIT",
"dependencies": {
"jsrsasign": "^11.0.0",
"tslib": "^2.5.2"
@ -12077,6 +12089,7 @@
"version": "12.0.0",
"resolved": "https://registry.npmjs.org/code-block-writer/-/code-block-writer-12.0.0.tgz",
"integrity": "sha512-q4dMFMlXtKR3XNBHyMHt/3pwYNA69EDk00lloMOaaUMKPUXBw6lpXtbu3MMVG6/uOihGnRDOlkyqsONEUj60+w==",
"license": "MIT",
"peer": true
},
"node_modules/collect-v8-coverage": {
@ -12566,7 +12579,8 @@
"node_modules/cropperjs": {
"version": "1.6.2",
"resolved": "https://registry.npmjs.org/cropperjs/-/cropperjs-1.6.2.tgz",
"integrity": "sha512-nhymn9GdnV3CqiEHJVai54TULFAE3VshJTXSqSJKa8yXAKyBKDWdhHarnlIPrshJ0WMFTGuFvG02YjLXfPiuOA=="
"integrity": "sha512-nhymn9GdnV3CqiEHJVai54TULFAE3VshJTXSqSJKa8yXAKyBKDWdhHarnlIPrshJ0WMFTGuFvG02YjLXfPiuOA==",
"license": "MIT"
},
"node_modules/cross-spawn": {
"version": "7.0.6",
@ -18415,6 +18429,7 @@
"version": "11.1.0",
"resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-11.1.0.tgz",
"integrity": "sha512-Ov74K9GihaK9/9WncTe1mPmvrO7Py665TUfUKvraXBpu+xcTWitrtuOwcjf4KMU9maPaYn0OuaWy0HOzy/GBXg==",
"license": "MIT",
"funding": {
"url": "https://github.com/kjur/jsrsasign#donations"
}
@ -22116,6 +22131,7 @@
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz",
"integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==",
"license": "MIT",
"peer": true
},
"node_modules/path-exists": {
@ -26434,6 +26450,7 @@
"version": "20.0.0",
"resolved": "https://registry.npmjs.org/ts-morph/-/ts-morph-20.0.0.tgz",
"integrity": "sha512-JVmEJy2Wow5n/84I3igthL9sudQ8qzjh/6i4tmYCm6IqYyKFlNbJZi7oBdjyqcWSWYRu3CtL0xbT6fS03ESZIg==",
"license": "MIT",
"peer": true,
"dependencies": {
"@ts-morph/common": "~0.21.0",

View File

@ -30,11 +30,11 @@
},
"private": true,
"dependencies": {
"@alfresco/adf-content-services": "7.0.0-alpha.7-12862968027",
"@alfresco/adf-core": "7.0.0-alpha.7-12862968027",
"@alfresco/adf-extensions": "7.0.0-alpha.7-12862968027",
"@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.7-12862968027",
"@alfresco/js-api": "8.0.0-alpha.7-12862968027",
"@alfresco/adf-content-services": "7.0.0-alpha.7-12797937770",
"@alfresco/adf-core": "7.0.0-alpha.7-12797937770",
"@alfresco/adf-extensions": "7.0.0-alpha.7-12797937770",
"@alfresco/eslint-plugin-eslint-angular": "7.0.0-alpha.7-12797937770",
"@alfresco/js-api": "8.0.0-alpha.7-12797937770",
"@angular/animations": "16.2.9",
"@angular/cdk": "16.2.9",
"@angular/common": "16.2.9",
@ -62,7 +62,7 @@
"zone.js": "0.13.3"
},
"devDependencies": {
"@alfresco/adf-cli": "7.0.0-alpha.7-12862968027",
"@alfresco/adf-cli": "7.0.0-alpha.7-12797937770",
"@angular-devkit/build-angular": "16.2.16",
"@angular-devkit/core": "16.2.9",
"@angular-devkit/schematics": "16.2.9",

View File

@ -35,7 +35,7 @@ describe('SaveSearchSidenavComponent', () => {
beforeEach(() => {
const mockService = {
init: () => {},
innit: () => {},
getSavedSearches: () => of(),
savedSearches$: new ReplaySubject(1)
};

View File

@ -25,15 +25,16 @@
import { Component, DestroyRef, inject, OnInit, ViewEncapsulation } from '@angular/core';
import { SavedSearch, SavedSearchesService } from '@alfresco/adf-content-services';
import { CoreModule, TranslationService } from '@alfresco/adf-core';
import { NavBarLinkRef } from '@alfresco/adf-extensions';
import { DynamicExtensionComponent, NavBarLinkRef } from '@alfresco/adf-extensions';
import { ExpandMenuComponent } from '../../../sidenav/components/expand-menu.component';
import { SidenavHeaderComponent } from '../../../sidenav/components/sidenav-header.component';
import { AppService } from '@alfresco/aca-shared';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
@Component({
selector: 'aca-save-search-sidenav',
standalone: true,
imports: [CoreModule, ExpandMenuComponent],
imports: [CoreModule, DynamicExtensionComponent, ExpandMenuComponent, SidenavHeaderComponent],
templateUrl: './save-search-sidenav.component.html',
encapsulation: ViewEncapsulation.None
})
@ -47,7 +48,7 @@ export class SaveSearchSidenavComponent implements OnInit {
private readonly destroyRef = inject(DestroyRef);
ngOnInit() {
this.savedSearchesService.init();
this.savedSearchesService.innit();
this.savedSearchesService.savedSearches$
.asObservable()
.pipe(takeUntilDestroyed(this.destroyRef))