@flusys/ng-localization 9.1.0 → 9.1.2

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.
@@ -1,402 +1,203 @@
1
- import * as _angular_core from '@angular/core';
2
- import { InjectionToken, Provider, EnvironmentProviders, OnInit } from '@angular/core';
3
- import { ApiResourceService, ISingleResponse, IListResponse } from '@flusys/ng-shared';
4
- import { Observable } from 'rxjs';
5
- import * as _flusys_ng_localization from '@flusys/ng-localization';
6
- import { MenuItem } from '@flusys/ng-ui';
7
- import * as _angular_forms_signals from '@angular/forms/signals';
8
- import { Routes } from '@angular/router';
9
-
10
- interface ILanguage {
11
- id: string;
12
- code: string;
13
- name: string;
14
- nativeName: string | null;
15
- direction: 'ltr' | 'rtl' | null;
16
- isActive: boolean;
17
- isDefault: boolean;
18
- isReadonly: boolean;
19
- serial: number | null;
20
- createdAt: string;
21
- updatedAt: string;
22
- }
23
- type ITranslationsMap = Record<string, string>;
24
- interface ICreateLanguageDto {
25
- code: string;
26
- name: string;
27
- nativeName?: string;
28
- direction?: 'ltr' | 'rtl';
29
- isActive?: boolean;
30
- isDefault?: boolean;
31
- serial?: number;
32
- }
33
- interface IUpdateLanguageDto extends Partial<ICreateLanguageDto> {
34
- id: string;
35
- }
36
-
37
- type LocalizationLoadStrategy = 'all' | 'modules';
1
+ import * as i0 from "@angular/core";
2
+ import { EnvironmentProviders, InjectionToken, Provider } from "@angular/core";
3
+ import { ApiResourceService, IListResponse, ISingleResponse } from "@flusys/ng-shared";
4
+ import { Observable } from "rxjs";
5
+ import { MenuItem } from "@flusys/ng-ui";
6
+ import { Routes } from "@angular/router";
7
+ export interface ILanguage {
8
+ id: string;
9
+ code: string;
10
+ name: string;
11
+ nativeName: string | null;
12
+ direction: 'ltr' | 'rtl' | null;
13
+ isActive: boolean;
14
+ isDefault: boolean;
15
+ isReadonly: boolean;
16
+ serial: number | null;
17
+ createdAt: string;
18
+ updatedAt: string;
19
+ }
20
+ export type ITranslationsMap = Record<string, string>;
21
+ export interface ICreateLanguageDto {
22
+ code: string;
23
+ name: string;
24
+ nativeName?: string;
25
+ direction?: 'ltr' | 'rtl';
26
+ isActive?: boolean;
27
+ isDefault?: boolean;
28
+ serial?: number;
29
+ }
30
+ export interface IUpdateLanguageDto extends Partial<ICreateLanguageDto> {
31
+ id: string;
32
+ }
33
+ export type LocalizationLoadStrategy = 'all' | 'modules';
38
34
  /** Localization system configuration */
39
- interface ILocalizationConfig {
40
- /** Default language code (e.g., 'en', 'ar') */
41
- defaultLanguageCode: string;
42
- /** Translation loading strategy (default: 'modules') */
43
- loadStrategy?: LocalizationLoadStrategy;
44
- /** Modules to load at app initialization (default: []) */
45
- initialModules?: string[];
46
- /** Show language selector in layout (default: false) */
47
- enableLayoutSelector?: boolean;
48
- }
49
- declare const LOCALIZATION_CONFIG: InjectionToken<ILocalizationConfig>;
35
+ export interface ILocalizationConfig {
36
+ /** Default language code (e.g., 'en', 'ar') */
37
+ defaultLanguageCode: string;
38
+ /** Translation loading strategy (default: 'modules') */
39
+ loadStrategy?: LocalizationLoadStrategy;
40
+ /** Modules to load at app initialization (default: []) */
41
+ initialModules?: string[];
42
+ /** Show language selector in layout (default: false) */
43
+ enableLayoutSelector?: boolean;
44
+ }
45
+ export declare const LOCALIZATION_CONFIG: InjectionToken<ILocalizationConfig>;
50
46
  /** Get localization config with sensible defaults applied */
51
- declare function getLocalizationConfig(overrides?: Partial<ILocalizationConfig>): ILocalizationConfig;
52
-
53
- interface ITranslationKey {
54
- id: string;
55
- module: string;
56
- key: string;
57
- defaultMessage: string;
58
- description: string | null;
59
- variables: string[] | null;
60
- isActive: boolean;
61
- isReadonly: boolean;
62
- createdAt: string;
63
- updatedAt: string;
64
- }
65
- interface ICreateTranslationKeyDto {
66
- module: string;
67
- key: string;
68
- defaultMessage: string;
69
- description?: string;
70
- variables?: string[];
71
- isActive?: boolean;
72
- }
73
- interface IUpdateTranslationKeyDto extends Partial<ICreateTranslationKeyDto> {
74
- id: string;
75
- }
76
- interface ITranslationKeyFilter {
77
- module?: string;
78
- isActive?: boolean;
79
- search?: string;
80
- }
81
-
82
- interface ITranslation {
83
- id: string;
84
- languageId: string;
85
- translationKeyId: string;
86
- value: string;
87
- isVerified: boolean;
88
- isActive: boolean;
89
- language?: ILanguage;
90
- translationKey?: ITranslationKey;
91
- createdAt: string;
92
- updatedAt: string;
93
- }
94
- interface ITranslationWithKey extends ITranslation {
95
- translationKey: ITranslationKey;
96
- }
97
-
98
- declare const STORAGE_KEYS: {
99
- readonly CURRENT_LANGUAGE: "flusys.language";
47
+ export declare function getLocalizationConfig(overrides?: Partial<ILocalizationConfig>): ILocalizationConfig;
48
+ export interface ITranslationKey {
49
+ id: string;
50
+ module: string;
51
+ key: string;
52
+ defaultMessage: string;
53
+ description: string | null;
54
+ variables: string[] | null;
55
+ isActive: boolean;
56
+ isReadonly: boolean;
57
+ createdAt: string;
58
+ updatedAt: string;
59
+ }
60
+ export interface ICreateTranslationKeyDto {
61
+ module: string;
62
+ key: string;
63
+ defaultMessage: string;
64
+ description?: string;
65
+ variables?: string[];
66
+ isActive?: boolean;
67
+ }
68
+ export interface IUpdateTranslationKeyDto extends Partial<ICreateTranslationKeyDto> {
69
+ id: string;
70
+ }
71
+ export interface ITranslationKeyFilter {
72
+ module?: string;
73
+ isActive?: boolean;
74
+ search?: string;
75
+ }
76
+ export interface ITranslation {
77
+ id: string;
78
+ languageId: string;
79
+ translationKeyId: string;
80
+ value: string;
81
+ isVerified: boolean;
82
+ isActive: boolean;
83
+ language?: ILanguage;
84
+ translationKey?: ITranslationKey;
85
+ createdAt: string;
86
+ updatedAt: string;
87
+ }
88
+ export interface ITranslationWithKey extends ITranslation {
89
+ translationKey: ITranslationKey;
90
+ }
91
+ export declare const STORAGE_KEYS: {
92
+ readonly CURRENT_LANGUAGE: "flusys.language";
100
93
  };
101
-
102
- declare const LOCALIZATION_MESSAGES: Record<string, string>;
103
-
104
- declare class LanguageApiService extends ApiResourceService<ICreateLanguageDto | IUpdateLanguageDto, ILanguage> {
105
- constructor();
106
- setDefault(id: string): Observable<ISingleResponse<ILanguage>>;
107
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<LanguageApiService, never>;
108
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<LanguageApiService>;
109
- }
110
-
111
- declare class LocalizationApiService {
112
- private readonly http;
113
- private readonly appConfig;
114
- private get baseUrl();
115
- getActiveLanguages(): Observable<IListResponse<ILanguage>>;
116
- getTranslationsByLanguage(languageCode: string, modules?: string[]): Observable<ISingleResponse<ITranslationsMap>>;
117
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<LocalizationApiService, never>;
118
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<LocalizationApiService>;
119
- }
120
-
121
- declare class LocalizationStateService {
122
- private readonly platformService;
123
- private readonly document;
124
- private readonly appRef;
125
- private readonly _loadedModules;
126
- private readonly _currentLanguage;
127
- private readonly _availableLanguages;
128
- private readonly _translations;
129
- private readonly _fallbackMessages;
130
- private readonly _isLoading;
131
- readonly availableLanguages: _angular_core.Signal<ILanguage[]>;
132
- readonly translations: _angular_core.Signal<ITranslationsMap>;
133
- readonly fallbackMessages: _angular_core.Signal<ITranslationsMap>;
134
- readonly isLoading: _angular_core.Signal<boolean>;
135
- readonly currentLanguageCode: _angular_core.Signal<string>;
136
- constructor();
137
- setCurrentLanguage(language: ILanguage): void;
138
- setAvailableLanguages(languages: ILanguage[]): void;
139
- setTranslations(translations: ITranslationsMap): void;
140
- mergeTranslations(translations: ITranslationsMap): void;
141
- setLoading(loading: boolean): void;
142
- getSavedLanguageCode(): string | null;
143
- isModuleLoaded(module: string): boolean;
144
- markModuleLoaded(module: string): void;
145
- getLoadedModules(): string[];
146
- clearLoadedModules(): void;
147
- updateFallbackMessages(messages: ITranslationsMap): void;
148
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<LocalizationStateService, never>;
149
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<LocalizationStateService>;
150
- }
151
-
152
- declare class LocalizationInitializerService {
153
- apiService: LocalizationApiService;
154
- stateService: LocalizationStateService;
155
- initialize(initialFallbackMessages?: Record<string, string>): Promise<void>;
156
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<LocalizationInitializerService, never>;
157
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<LocalizationInitializerService>;
158
- }
159
-
160
- interface ICreateTranslationDto {
161
- languageId: string;
162
- translationKeyId: string;
163
- value: string;
164
- isVerified?: boolean;
165
- isActive?: boolean;
166
- }
167
- interface IUpdateTranslationDto extends Partial<ICreateTranslationDto> {
168
- id: string;
169
- }
170
- interface IBulkUpdateTranslationDto {
171
- id?: string;
172
- languageId: string;
173
- translationKeyId: string;
174
- value: string;
175
- isVerified?: boolean;
176
- }
177
- declare class TranslationApiService extends ApiResourceService<ICreateTranslationDto | IUpdateTranslationDto, ITranslation> {
178
- constructor();
179
- getByKeyId(translationKeyId: string): Observable<IListResponse<ITranslation>>;
180
- getCounts(): Observable<ISingleResponse<Record<string, number>>>;
181
- bulkUpdate(translations: IBulkUpdateTranslationDto[]): Observable<IListResponse<ITranslation>>;
182
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<TranslationApiService, never>;
183
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<TranslationApiService>;
184
- }
185
-
186
- declare class TranslationKeyApiService extends ApiResourceService<ICreateTranslationKeyDto | IUpdateTranslationKeyDto, ITranslationKey> {
187
- constructor();
188
- getModules(): Observable<ISingleResponse<string[]>>;
189
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<TranslationKeyApiService, never>;
190
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<TranslationKeyApiService>;
191
- }
192
-
193
- declare class TranslationLoaderService {
194
- private readonly DEFAULT_INITIAL_MODULES;
195
- private readonly config;
196
- apiService: LocalizationApiService;
197
- stateService: LocalizationStateService;
198
- loadTranslations(languageCode: string, clearModules?: boolean): Promise<void>;
199
- private loadAndSetTranslations;
200
- private reloadModules;
201
- loadTranslationsAsync(languageCode: string, clearModules?: boolean): Observable<void>;
202
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<TranslationLoaderService, never>;
203
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<TranslationLoaderService>;
204
- }
205
-
206
- declare class LanguageSelectorComponent {
207
- private readonly localizationState;
208
- private readonly translationLoader;
209
- private readonly destroyRef;
210
- readonly languages: _angular_core.Signal<_flusys_ng_localization.ILanguage[]>;
211
- readonly selectedLanguageCode: _angular_core.Signal<string>;
212
- readonly selectedLanguage: _angular_core.Signal<_flusys_ng_localization.ILanguage | null>;
213
- readonly menuItems: _angular_core.Signal<MenuItem[]>;
214
- onLanguageSelect(code: string): void;
215
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<LanguageSelectorComponent, never>;
216
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<LanguageSelectorComponent, "lib-language-selector", never, {}, {}, never, never, true, never>;
217
- }
218
-
219
- declare function provideLocalization(config: ILocalizationConfig, initialFallbackMessages?: Record<string, string>): Array<Provider | EnvironmentProviders>;
220
-
221
- interface ILanguageFormModel {
222
- code: string;
223
- name: string;
224
- nativeName: string;
225
- direction: 'ltr' | 'rtl';
226
- serial: string;
227
- isActive: boolean;
228
- isDefault: boolean;
229
- }
230
- declare class LanguageFormPage {
231
- private readonly router;
232
- private readonly route;
233
- private readonly languageService;
234
- private readonly messageService;
235
- private readonly translateAdapter;
236
- private readonly destroyRef;
237
- private readonly routeParams;
238
- private loadTriggered;
239
- readonly isSaving: _angular_core.WritableSignal<boolean>;
240
- readonly existingLanguage: _angular_core.WritableSignal<ILanguage | null>;
241
- readonly isEditMode: _angular_core.Signal<boolean>;
242
- readonly isReadonly: _angular_core.Signal<boolean>;
243
- private translate;
244
- readonly directionOptions: _angular_core.Signal<{
245
- label: string;
246
- value: string;
247
- }[]>;
248
- readonly formModel: _angular_core.WritableSignal<ILanguageFormModel>;
249
- readonly formTree: _angular_forms_signals.FieldTree<ILanguageFormModel, string | number, "writable">;
250
- readonly isFormValid: _angular_core.Signal<boolean>;
251
- constructor();
252
- updateDirection(value: 'ltr' | 'rtl'): void;
253
- loadLanguage(id: string): void;
254
- private toFormModel;
255
- onSubmit(): void;
256
- onCancel(): void;
257
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<LanguageFormPage, never>;
258
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<LanguageFormPage, "lib-language-form-page", never, {}, {}, never, never, true, never>;
259
- }
260
-
261
- declare class LanguageListPage implements OnInit {
262
- readonly LANGUAGE_PERMISSIONS: {
263
- readonly CREATE: "language.create";
264
- readonly READ: "language.read";
265
- readonly UPDATE: "language.update";
266
- readonly DELETE: "language.delete";
267
- };
268
- private readonly router;
269
- readonly languageService: LanguageApiService;
270
- private readonly confirmationService;
271
- private readonly messageService;
272
- private readonly translateService;
273
- private readonly destroyRef;
274
- ngOnInit(): void;
275
- onCreate(): void;
276
- onSearchChange(term: string): void;
277
- onEdit(id: string): void;
278
- onSetDefault(lang: ILanguage): void;
279
- onDelete(lang: ILanguage): void;
280
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<LanguageListPage, never>;
281
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<LanguageListPage, "lib-language-list-page", never, {}, {}, never, never, true, never>;
282
- }
283
-
284
- interface ITab {
285
- id: string;
286
- labelKey: string;
287
- icon: string;
288
- route: string;
289
- permission: string;
290
- }
291
- declare class LocalizationContainerPage {
292
- private readonly permissionValidator;
293
- private readonly allTabs;
294
- readonly visibleTabs: _angular_core.Signal<ITab[]>;
295
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<LocalizationContainerPage, never>;
296
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<LocalizationContainerPage, "lib-localization-container", never, {}, {}, never, never, true, never>;
297
- }
298
-
299
- interface ITranslationValue {
300
- languageId: string;
301
- value: string;
302
- translationId?: string;
303
- }
304
- interface ITranslationKeyFormModel {
305
- key: string;
306
- module: string;
307
- defaultMessage: string;
308
- description: string;
309
- variables: string;
310
- }
311
- declare class TranslationKeyFormPage implements OnInit {
312
- private readonly router;
313
- private readonly route;
314
- private readonly languageService;
315
- private readonly translationKeyService;
316
- private readonly translationService;
317
- private readonly messageService;
318
- private readonly translateAdapter;
319
- private readonly destroyRef;
320
- private readonly routeParams;
321
- private loadTriggered;
322
- readonly isSaving: _angular_core.WritableSignal<boolean>;
323
- readonly isLoadingLanguages: _angular_core.WritableSignal<boolean>;
324
- readonly existingKey: _angular_core.WritableSignal<ITranslationKey | null>;
325
- readonly isEditMode: _angular_core.Signal<boolean>;
326
- readonly isReadonly: _angular_core.Signal<boolean>;
327
- readonly languages: _angular_core.WritableSignal<ILanguage[]>;
328
- readonly modules: _angular_core.WritableSignal<string[]>;
329
- readonly translations: _angular_core.WritableSignal<ITranslationValue[]>;
330
- private translate;
331
- readonly moduleOptions: _angular_core.Signal<{
332
- label: string;
333
- value: string;
334
- }[]>;
335
- readonly formModel: _angular_core.WritableSignal<ITranslationKeyFormModel>;
336
- readonly formTree: _angular_forms_signals.FieldTree<ITranslationKeyFormModel, string | number, "writable">;
337
- readonly isFormValid: _angular_core.Signal<boolean>;
338
- constructor();
339
- ngOnInit(): void;
340
- initializeTranslations(languages: ILanguage[]): void;
341
- updateModule(value: string): void;
342
- getTranslationValue(languageId: string): string;
343
- setTranslationValue(languageId: string, value: string): void;
344
- loadTranslationKey(id: string): void;
345
- loadExistingTranslations(keyId: string): void;
346
- private toFormModel;
347
- onSubmit(): void;
348
- private createKey;
349
- private updateKey;
350
- private saveTranslations;
351
- private onSaveSuccess;
352
- onCancel(): void;
353
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<TranslationKeyFormPage, never>;
354
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<TranslationKeyFormPage, "lib-translation-key-form-page", never, {}, {}, never, never, true, never>;
355
- }
356
-
357
- declare class TranslationKeyListPage implements OnInit {
358
- readonly TRANSLATION_KEY_PERMISSIONS: {
359
- readonly CREATE: "translation-key.create";
360
- readonly READ: "translation-key.read";
361
- readonly UPDATE: "translation-key.update";
362
- readonly DELETE: "translation-key.delete";
363
- };
364
- private readonly router;
365
- private readonly languageService;
366
- private readonly translationKeyService;
367
- private readonly translationService;
368
- private readonly confirmationService;
369
- private readonly messageService;
370
- private readonly translateService;
371
- private readonly destroyRef;
372
- readonly isLoading: _angular_core.WritableSignal<boolean>;
373
- readonly languages: _angular_core.WritableSignal<ILanguage[]>;
374
- readonly modules: _angular_core.WritableSignal<string[]>;
375
- readonly translationKeys: _angular_core.WritableSignal<ITranslationKey[]>;
376
- readonly translationCounts: _angular_core.WritableSignal<Map<string, number>>;
377
- readonly selectedModule: _angular_core.WritableSignal<string | null>;
378
- readonly searchTerm: _angular_core.WritableSignal<string>;
379
- readonly moduleOptions: _angular_core.Signal<({
380
- label: string;
381
- value: string;
382
- } | {
383
- label: string;
384
- value: null;
385
- })[]>;
386
- readonly filteredKeys: _angular_core.Signal<ITranslationKey[]>;
387
- ngOnInit(): void;
388
- loadData(): void;
389
- loadTranslationCounts(): void;
390
- getTranslationCount(keyId: string): number;
391
- onModuleChange(value: string | null): void;
392
- onCreate(): void;
393
- onEdit(key: ITranslationKey): void;
394
- onDelete(key: ITranslationKey): void;
395
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<TranslationKeyListPage, never>;
396
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<TranslationKeyListPage, "lib-translation-key-list-page", never, {}, {}, never, never, true, never>;
397
- }
398
-
399
- declare const LOCALIZATION_ROUTES: Routes;
400
-
401
- export { LOCALIZATION_CONFIG, LOCALIZATION_MESSAGES, LOCALIZATION_ROUTES, LanguageApiService, LanguageFormPage, LanguageListPage, LanguageSelectorComponent, LocalizationApiService, LocalizationContainerPage, LocalizationInitializerService, LocalizationStateService, STORAGE_KEYS, TranslationApiService, TranslationKeyApiService, TranslationKeyFormPage, TranslationKeyListPage, TranslationLoaderService, getLocalizationConfig, provideLocalization };
402
- export type { IBulkUpdateTranslationDto, ICreateLanguageDto, ICreateTranslationDto, ICreateTranslationKeyDto, ILanguage, ILocalizationConfig, ITranslation, ITranslationKey, ITranslationKeyFilter, ITranslationWithKey, ITranslationsMap, IUpdateLanguageDto, IUpdateTranslationDto, IUpdateTranslationKeyDto, LocalizationLoadStrategy };
94
+ export declare const LOCALIZATION_MESSAGES: Record<string, string>;
95
+ export declare class LanguageApiService extends ApiResourceService<ICreateLanguageDto | IUpdateLanguageDto, ILanguage> {
96
+ constructor();
97
+ setDefault(id: string): Observable<ISingleResponse<ILanguage>>;
98
+ static ɵfac: i0.ɵɵFactoryDeclaration<LanguageApiService, never>;
99
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
100
+ }
101
+ export declare class LocalizationApiService {
102
+ private readonly http;
103
+ private readonly appConfig;
104
+ private get baseUrl();
105
+ getActiveLanguages(): Observable<IListResponse<ILanguage>>;
106
+ getTranslationsByLanguage(languageCode: string, modules?: string[]): Observable<ISingleResponse<ITranslationsMap>>;
107
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizationApiService, never>;
108
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
109
+ }
110
+ export declare class LocalizationStateService {
111
+ private readonly platformService;
112
+ private readonly document;
113
+ private readonly appRef;
114
+ private readonly _loadedModules;
115
+ private readonly _currentLanguage;
116
+ private readonly _availableLanguages;
117
+ private readonly _translations;
118
+ private readonly _fallbackMessages;
119
+ private readonly _isLoading;
120
+ readonly availableLanguages: import("@angular/core").Signal<ILanguage[]>;
121
+ readonly translations: import("@angular/core").Signal<ITranslationsMap>;
122
+ readonly fallbackMessages: import("@angular/core").Signal<ITranslationsMap>;
123
+ readonly isLoading: import("@angular/core").Signal<boolean>;
124
+ readonly currentLanguageCode: import("@angular/core").Signal<string>;
125
+ constructor();
126
+ setCurrentLanguage(language: ILanguage): void;
127
+ setAvailableLanguages(languages: ILanguage[]): void;
128
+ setTranslations(translations: ITranslationsMap): void;
129
+ mergeTranslations(translations: ITranslationsMap): void;
130
+ setLoading(loading: boolean): void;
131
+ getSavedLanguageCode(): string | null;
132
+ isModuleLoaded(module: string): boolean;
133
+ markModuleLoaded(module: string): void;
134
+ getLoadedModules(): string[];
135
+ clearLoadedModules(): void;
136
+ updateFallbackMessages(messages: ITranslationsMap): void;
137
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizationStateService, never>;
138
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
139
+ }
140
+ export declare class LocalizationInitializerService {
141
+ apiService: LocalizationApiService;
142
+ stateService: LocalizationStateService;
143
+ initialize(initialFallbackMessages?: Record<string, string>): Promise<void>;
144
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizationInitializerService, never>;
145
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
146
+ }
147
+ export interface ICreateTranslationDto {
148
+ languageId: string;
149
+ translationKeyId: string;
150
+ value: string;
151
+ isVerified?: boolean;
152
+ isActive?: boolean;
153
+ }
154
+ export interface IUpdateTranslationDto extends Partial<ICreateTranslationDto> {
155
+ id: string;
156
+ }
157
+ export interface IBulkUpdateTranslationDto {
158
+ id?: string;
159
+ languageId: string;
160
+ translationKeyId: string;
161
+ value: string;
162
+ isVerified?: boolean;
163
+ }
164
+ export declare class TranslationApiService extends ApiResourceService<ICreateTranslationDto | IUpdateTranslationDto, ITranslation> {
165
+ constructor();
166
+ getByKeyId(translationKeyId: string): Observable<IListResponse<ITranslation>>;
167
+ getCounts(): Observable<ISingleResponse<Record<string, number>>>;
168
+ bulkUpdate(translations: IBulkUpdateTranslationDto[]): Observable<IListResponse<ITranslation>>;
169
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslationApiService, never>;
170
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
171
+ }
172
+ export declare class TranslationKeyApiService extends ApiResourceService<ICreateTranslationKeyDto | IUpdateTranslationKeyDto, ITranslationKey> {
173
+ constructor();
174
+ getModules(): Observable<ISingleResponse<string[]>>;
175
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslationKeyApiService, never>;
176
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
177
+ }
178
+ export declare class TranslationLoaderService {
179
+ private readonly DEFAULT_INITIAL_MODULES;
180
+ private readonly config;
181
+ apiService: LocalizationApiService;
182
+ stateService: LocalizationStateService;
183
+ loadTranslations(languageCode: string, clearModules?: boolean): Promise<void>;
184
+ private loadAndSetTranslations;
185
+ private reloadModules;
186
+ loadTranslationsAsync(languageCode: string, clearModules?: boolean): Observable<void>;
187
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslationLoaderService, never>;
188
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
189
+ }
190
+ export declare class LanguageSelectorComponent {
191
+ private readonly localizationState;
192
+ private readonly translationLoader;
193
+ private readonly destroyRef;
194
+ readonly languages: import("@angular/core").Signal<import("@flusys/ng-localization").ILanguage[]>;
195
+ readonly selectedLanguageCode: import("@angular/core").Signal<string>;
196
+ readonly selectedLanguage: import("@angular/core").Signal<import("@flusys/ng-localization").ILanguage | null>;
197
+ readonly menuItems: import("@angular/core").Signal<MenuItem[]>;
198
+ onLanguageSelect(code: string): void;
199
+ static ɵfac: i0.ɵɵFactoryDeclaration<LanguageSelectorComponent, never>;
200
+ static ɵcmp: i0.ɵɵComponentDeclaration<LanguageSelectorComponent, "lib-language-selector", never, {}, {}, never, never, true, never>;
201
+ }
202
+ export declare function provideLocalization(config: ILocalizationConfig, initialFallbackMessages?: Record<string, string>): Array<Provider | EnvironmentProviders>;
203
+ export declare const LOCALIZATION_ROUTES: Routes;