Skip to content

Commit 1835e4f

Browse files
committed
fix(angular):removed translation dependency
1 parent 36bf7d9 commit 1835e4f

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

packages/angular/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
},
2828
"dependencies": {
2929
"@firebase-ui/core": "workspace:*",
30-
"@firebase-ui/translations": "workspace:*",
3130
"@firebase-ui/styles": "workspace:*",
3231
"@tanstack/angular-form": "^1.1.0",
3332
"tslib": "^2.8.1",

packages/angular/src/lib/provider.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ import {
2424
} from "@angular/core";
2525
import { FirebaseApps } from "@angular/fire/app";
2626
import { type FirebaseUI as FirebaseUIType, getTranslation } from "@firebase-ui/core";
27+
import { Tail } from "../types";
2728
import { distinctUntilChanged, map, takeUntil } from "rxjs/operators";
2829
import { Observable, ReplaySubject } from "rxjs";
2930
import { Store } from "nanostores";
30-
import { TranslationCategory, TranslationKey } from "@firebase-ui/translations";
3131

3232
const FIREBASE_UI_STORE = new InjectionToken<FirebaseUIType>("firebaseui.store");
3333
const FIREBASE_UI_POLICIES = new InjectionToken<PolicyConfig>("firebaseui.policies");
@@ -74,8 +74,9 @@ export class FirebaseUI {
7474
return this.useStore(this.store);
7575
}
7676

77-
translation<T extends TranslationCategory>(category: T, key: TranslationKey<T>) {
78-
return this.config().pipe(map((config) => getTranslation(config, category, key)));
77+
//TODO: This should be typed more specifically from the translations package
78+
translation(...args: Tail) {
79+
return this.config().pipe(map((config) => getTranslation(config, ...args)));
7980
}
8081

8182
useStore<T>(store: Store<T> | null): Observable<T> {

packages/angular/src/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export type Tail = [
2+
any, // category
3+
any, // key
4+
];

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)