From 4f4413a6e9aa0cd8e9d3f53ea256b03c115dafe3 Mon Sep 17 00:00:00 2001 From: Alexander Brandon Coles Date: Fri, 17 Jan 2025 14:37:10 -0300 Subject: [PATCH 1/2] Fix calls to deprecated RxJS tap operator overload See https://rxjs.dev/deprecations/subscribe-arguments#what-signature-is-affected --- .../loading-indicator.service.ts | 20 +++++++++---------- .../bell/state/ian-bell.service.ts | 8 ++++---- .../op-autocompleter.component.ts | 8 ++++---- .../macros/attribute-model-loader.service.ts | 2 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/frontend/src/app/core/loading-indicator/loading-indicator.service.ts b/frontend/src/app/core/loading-indicator/loading-indicator.service.ts index 40cab7fb20bf..c2665bb00399 100644 --- a/frontend/src/app/core/loading-indicator/loading-indicator.service.ts +++ b/frontend/src/app/core/loading-indicator/loading-indicator.service.ts @@ -38,11 +38,11 @@ export function withLoadingIndicator(indicator:LoadingIndicator, delayStopTim indicator.start(); return source$.pipe( - tap( - () => indicator.delayedStop(delayStopTime), - () => indicator.stop(), - () => indicator.stop(), - ), + tap({ + next: () => indicator.delayedStop(delayStopTime), + error: () => indicator.stop(), + complete: () => indicator.stop(), + }), ); }; } @@ -52,11 +52,11 @@ export function withDelayedLoadingIndicator(indicator:() => LoadingIndicator) setTimeout(() => indicator().start()); return source$.pipe( - tap( - () => undefined, - () => indicator().stop(), - () => indicator().stop(), - ), + tap({ + next: () => undefined, + error: () => indicator().stop(), + complete: () => indicator().stop(), + }), ); }; } diff --git a/frontend/src/app/features/in-app-notifications/bell/state/ian-bell.service.ts b/frontend/src/app/features/in-app-notifications/bell/state/ian-bell.service.ts index 9a511306d103..8c059b2665f1 100644 --- a/frontend/src/app/features/in-app-notifications/bell/state/ian-bell.service.ts +++ b/frontend/src/app/features/in-app-notifications/bell/state/ian-bell.service.ts @@ -86,15 +86,15 @@ export class IanBellService { ) .pipe( map((result) => result.total), - tap( - (count) => { + tap({ + next: (count) => { this.store.update({ totalUnread: count }); }, - (error) => { + error: (error) => { console.error('Failed to load notifications: %O', error); this.store.update({ totalUnread: -1 }); }, - ), + }), catchError(() => EMPTY), ); } diff --git a/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.ts b/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.ts index 0c57248daa8f..47b441325f4e 100644 --- a/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.ts +++ b/frontend/src/app/shared/components/autocompleter/op-autocompleter/op-autocompleter.component.ts @@ -493,10 +493,10 @@ export class OpAutocompleterComponent this.loading$.next(false), - () => this.loading$.next(false), - ), + tap({ + next: () => this.loading$.next(false), + error: () => this.loading$.next(false), + }), ); } diff --git a/frontend/src/app/shared/components/fields/macros/attribute-model-loader.service.ts b/frontend/src/app/shared/components/fields/macros/attribute-model-loader.service.ts index 3e82790c099f..808efe5a46d3 100644 --- a/frontend/src/app/shared/components/fields/macros/attribute-model-loader.service.ts +++ b/frontend/src/app/shared/components/fields/macros/attribute-model-loader.service.ts @@ -99,7 +99,7 @@ export class AttributeModelLoaderService { .values$() .pipe( take(1), - tap((val) => console.log(`VAL ${val}`), (err) => console.error(`ERR ${err}`)), + tap({ next: (val) => console.log(`VAL ${val}`), error: (err) => console.error(`ERR ${err}`) }), ); } From 21c1166e1e26fde06491bd5d59f0f79abe1c4207 Mon Sep 17 00:00:00 2001 From: Alexander Brandon Coles Date: Fri, 17 Jan 2025 14:42:29 -0300 Subject: [PATCH 2/2] Fix call to deprecated groupBy operator overload --- frontend/src/app/core/state/file-links/file-links.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/core/state/file-links/file-links.service.ts b/frontend/src/app/core/state/file-links/file-links.service.ts index c2626f87c193..b046af2e3ed6 100644 --- a/frontend/src/app/core/state/file-links/file-links.service.ts +++ b/frontend/src/app/core/state/file-links/file-links.service.ts @@ -77,7 +77,7 @@ export class FileLinksResourceService extends ResourceStoreService { switchMap((collection) => from(collection._embedded.elements)), groupBy( (fileLink) => fileLink._links.storage.href, - (fileLink) => fileLink, + { element: (fileLink) => fileLink }, ), mergeMap((group$) => { const seed = { storage: group$.key, fileLinks: [] as IFileLink[] };