@ngneat/transloco-persist-translations
Advanced tools
Comparing version 4.0.0 to 5.0.0
@@ -1,5 +0,4 @@ | ||
export * from './lib/transloco-persist-translations.config'; | ||
export * from './lib/transloco.storage'; | ||
export * from './lib/transloco-persist-translations.service'; | ||
export * from './lib/transloco-persist-translations.module'; | ||
export * from './lib/transloco-persist-translations.config'; | ||
export { TRANSLOCO_PERSIST_TRANSLATIONS_STORAGE_CONFIG, TRANSLOCO_PERSIST_TRANSLATIONS_LOADER, TRANSLOCO_PERSIST_TRANSLATIONS_STORAGE, StorageConfig, TranslocoPersistTranslationsConfig, } from './lib/transloco-persist-translations.config'; | ||
export { MaybeAsyncStorage, MaybeAsync } from './lib/transloco.storage'; | ||
export { TranslocoPersistTranslations } from './lib/transloco-persist-translations.service'; | ||
export { provideTranslocoPersistTranslations } from './lib/transloco-persist-translations.providers'; |
@@ -1,3 +0,4 @@ | ||
import { InjectionToken, Provider, Type } from '@angular/core'; | ||
import { ClassProvider, ExistingProvider, FactoryProvider, InjectionToken, Type, ValueProvider } from '@angular/core'; | ||
import { TranslocoLoader } from '@ngneat/transloco'; | ||
import { MaybeAsyncStorage } from './transloco.storage'; | ||
export interface StorageConfig { | ||
@@ -7,9 +8,11 @@ ttl: number; | ||
} | ||
type providerValue = Pick<ValueProvider, 'useValue'> | Pick<ClassProvider, 'useClass'> | Pick<ExistingProvider, 'useExisting'> | Pick<FactoryProvider, 'useFactory' | 'deps'>; | ||
export interface TranslocoPersistTranslationsConfig extends Partial<StorageConfig> { | ||
loader: Type<TranslocoLoader>; | ||
storage: Provider; | ||
storage: providerValue; | ||
} | ||
export declare const defaultConfig: Required<StorageConfig>; | ||
export declare const PERSIST_TRANSLATIONS_LOADER: InjectionToken<Type<TranslocoLoader>>; | ||
export declare const PERSIST_TRANSLATIONS_STORAGE: InjectionToken<Provider>; | ||
export declare const PERSIST_TRANSLATIONS_STORAGE_CONFIG: InjectionToken<Provider>; | ||
export declare const defaultConfig: StorageConfig; | ||
export declare const TRANSLOCO_PERSIST_TRANSLATIONS_LOADER: InjectionToken<TranslocoLoader>; | ||
export declare const TRANSLOCO_PERSIST_TRANSLATIONS_STORAGE: InjectionToken<MaybeAsyncStorage>; | ||
export declare const TRANSLOCO_PERSIST_TRANSLATIONS_STORAGE_CONFIG: InjectionToken<StorageConfig>; | ||
export {}; |
import { Translation, TranslocoLoader } from '@ngneat/transloco'; | ||
import { Observable } from 'rxjs'; | ||
import { StorageConfig } from './transloco-persist-translations.config'; | ||
import { OnDestroy } from '@angular/core'; | ||
import { MaybeAsyncStorage } from './transloco.storage'; | ||
import * as i0 from "@angular/core"; | ||
export declare function getTimestampKey(key: string): string; | ||
export declare class TranslocoPersistTranslations implements TranslocoLoader, OnDestroy { | ||
@@ -11,6 +10,4 @@ private loader; | ||
private config; | ||
private merged; | ||
private subscription; | ||
private cache; | ||
constructor(loader: TranslocoLoader, storage: MaybeAsyncStorage, config: StorageConfig); | ||
getTranslation(lang: string): Observable<Translation>; | ||
@@ -17,0 +14,0 @@ clearCache(): void; |
import { Observable } from 'rxjs'; | ||
export declare type MaybeAsync<T = any> = Promise<T> | Observable<T> | T; | ||
export type MaybeAsync<T = any> = Promise<T> | Observable<T> | T; | ||
export interface MaybeAsyncStorage { | ||
@@ -4,0 +4,0 @@ getItem(key: string): MaybeAsync; |
{ | ||
"name": "@ngneat/transloco-persist-translations", | ||
"version": "4.0.0", | ||
"version": "5.0.0", | ||
"description": "Transloco persist translations", | ||
@@ -34,5 +34,4 @@ "publishConfig": { | ||
"peerDependencies": { | ||
"@angular/core": ">=13.0.0", | ||
"@ngneat/transloco": ">=4.0.0", | ||
"rxjs": ">=6.0.0" | ||
"@angular/core": ">=16.0.0", | ||
"@ngneat/transloco": ">=5.0.0" | ||
}, | ||
@@ -42,8 +41,4 @@ "dependencies": { | ||
}, | ||
"module": "fesm2015/ngneat-transloco-persist-translations.mjs", | ||
"es2020": "fesm2020/ngneat-transloco-persist-translations.mjs", | ||
"esm2020": "esm2020/ngneat-transloco-persist-translations.mjs", | ||
"fesm2020": "fesm2020/ngneat-transloco-persist-translations.mjs", | ||
"fesm2015": "fesm2015/ngneat-transloco-persist-translations.mjs", | ||
"typings": "ngneat-transloco-persist-translations.d.ts", | ||
"module": "fesm2022/ngneat-transloco-persist-translations.mjs", | ||
"typings": "index.d.ts", | ||
"exports": { | ||
@@ -54,8 +49,6 @@ "./package.json": { | ||
".": { | ||
"types": "./ngneat-transloco-persist-translations.d.ts", | ||
"esm2020": "./esm2020/ngneat-transloco-persist-translations.mjs", | ||
"es2020": "./fesm2020/ngneat-transloco-persist-translations.mjs", | ||
"es2015": "./fesm2015/ngneat-transloco-persist-translations.mjs", | ||
"node": "./fesm2015/ngneat-transloco-persist-translations.mjs", | ||
"default": "./fesm2020/ngneat-transloco-persist-translations.mjs" | ||
"types": "./index.d.ts", | ||
"esm2022": "./esm2022/ngneat-transloco-persist-translations.mjs", | ||
"esm": "./esm2022/ngneat-transloco-persist-translations.mjs", | ||
"default": "./fesm2022/ngneat-transloco-persist-translations.mjs" | ||
} | ||
@@ -62,0 +55,0 @@ }, |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
3
49131
18
346