@flusys/ng-localization 4.1.1 → 5.0.0
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.
- package/README.md +71 -387
- package/fesm2022/flusys-ng-localization.mjs +576 -922
- package/fesm2022/flusys-ng-localization.mjs.map +1 -1
- package/package.json +3 -3
- package/types/flusys-ng-localization.d.ts +12 -86
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flusys/ng-localization",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Localization module for multi-language support in FLUSYS Angular apps",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"peerDependencies": {
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
"@angular/core": ">=21.0.0",
|
|
9
9
|
"@angular/forms": ">=21.0.0",
|
|
10
10
|
"@angular/router": ">=21.0.0",
|
|
11
|
-
"@flusys/ng-core": ">=
|
|
12
|
-
"@flusys/ng-shared": ">=
|
|
11
|
+
"@flusys/ng-core": ">=5.0.0",
|
|
12
|
+
"@flusys/ng-shared": ">=5.0.0",
|
|
13
13
|
"@primeuix/themes": ">=1.0.0",
|
|
14
14
|
"primeicons": ">=7.0.0",
|
|
15
15
|
"primeng": ">=21.0.0",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { InjectionToken, Signal, Provider, OnInit } from '@angular/core';
|
|
3
|
-
import { IListResponse, ISingleResponse,
|
|
3
|
+
import { IListResponse, ISingleResponse, ApiResourceService } from '@flusys/ng-shared';
|
|
4
4
|
import { Observable } from 'rxjs';
|
|
5
5
|
import * as _flusys_ng_localization from '@flusys/ng-localization';
|
|
6
6
|
import { Routes } from '@angular/router';
|
|
@@ -95,6 +95,8 @@ declare class LocalizationStateService {
|
|
|
95
95
|
readonly isRtl: _angular_core.Signal<boolean>;
|
|
96
96
|
constructor();
|
|
97
97
|
private dotToCamel;
|
|
98
|
+
private readonly PRIMENG_NUMERIC_KEYS;
|
|
99
|
+
private readonly PRIMENG_ARRAY_DEFAULTS;
|
|
98
100
|
private syncPrimeNGTranslations;
|
|
99
101
|
setCurrentLanguage(language: ILanguage): void;
|
|
100
102
|
setAvailableLanguages(languages: ILanguage[]): void;
|
|
@@ -138,7 +140,6 @@ declare class TranslateService {
|
|
|
138
140
|
readonly languageCode: Signal<string>;
|
|
139
141
|
translate(key: string, params?: Record<string, string | number>): string;
|
|
140
142
|
translateSignal(key: string, params?: Record<string, string | number>): Signal<string>;
|
|
141
|
-
instant(key: string, params?: Record<string, string | number>): string;
|
|
142
143
|
private interpolate;
|
|
143
144
|
private getFromFallback;
|
|
144
145
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TranslateService, never>;
|
|
@@ -171,15 +172,8 @@ interface ICreateLanguageDto {
|
|
|
171
172
|
interface IUpdateLanguageDto extends Partial<ICreateLanguageDto> {
|
|
172
173
|
id: string;
|
|
173
174
|
}
|
|
174
|
-
declare class LanguageApiService {
|
|
175
|
-
|
|
176
|
-
private readonly appConfig;
|
|
177
|
-
private get baseUrl();
|
|
178
|
-
getAll(): Observable<IListResponse<ILanguage>>;
|
|
179
|
-
getById(id: string): Observable<ISingleResponse<ILanguage>>;
|
|
180
|
-
create(dto: ICreateLanguageDto): Observable<ISingleResponse<ILanguage>>;
|
|
181
|
-
update(dto: IUpdateLanguageDto): Observable<ISingleResponse<ILanguage>>;
|
|
182
|
-
delete(id: string): Observable<IMessageResponse>;
|
|
175
|
+
declare class LanguageApiService extends ApiResourceService<ICreateLanguageDto | IUpdateLanguageDto, ILanguage> {
|
|
176
|
+
constructor();
|
|
183
177
|
setDefault(id: string): Observable<ISingleResponse<ILanguage>>;
|
|
184
178
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LanguageApiService, never>;
|
|
185
179
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<LanguageApiService>;
|
|
@@ -201,18 +195,9 @@ interface ITranslationKeyFilter {
|
|
|
201
195
|
isActive?: boolean;
|
|
202
196
|
search?: string;
|
|
203
197
|
}
|
|
204
|
-
declare class TranslationKeyApiService {
|
|
205
|
-
|
|
206
|
-
private readonly appConfig;
|
|
207
|
-
private get baseUrl();
|
|
208
|
-
getAll(filter?: ITranslationKeyFilter): Observable<IListResponse<ITranslationKey>>;
|
|
209
|
-
getByModule(module: string): Observable<IListResponse<ITranslationKey>>;
|
|
198
|
+
declare class TranslationKeyApiService extends ApiResourceService<ICreateTranslationKeyDto | IUpdateTranslationKeyDto, ITranslationKey> {
|
|
199
|
+
constructor();
|
|
210
200
|
getModules(): Observable<ISingleResponse<string[]>>;
|
|
211
|
-
getById(id: string): Observable<ISingleResponse<ITranslationKey>>;
|
|
212
|
-
create(dto: ICreateTranslationKeyDto): Observable<ISingleResponse<ITranslationKey>>;
|
|
213
|
-
createMany(dtos: ICreateTranslationKeyDto[]): Observable<IListResponse<ITranslationKey>>;
|
|
214
|
-
update(dto: IUpdateTranslationKeyDto): Observable<ISingleResponse<ITranslationKey>>;
|
|
215
|
-
delete(id: string): Observable<IMessageResponse>;
|
|
216
201
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TranslationKeyApiService, never>;
|
|
217
202
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TranslationKeyApiService>;
|
|
218
203
|
}
|
|
@@ -234,19 +219,13 @@ interface IBulkUpdateTranslationDto {
|
|
|
234
219
|
value: string;
|
|
235
220
|
isVerified?: boolean;
|
|
236
221
|
}
|
|
237
|
-
declare class TranslationApiService {
|
|
238
|
-
|
|
239
|
-
private readonly appConfig;
|
|
240
|
-
private get baseUrl();
|
|
222
|
+
declare class TranslationApiService extends ApiResourceService<ICreateTranslationDto | IUpdateTranslationDto, ITranslation> {
|
|
223
|
+
constructor();
|
|
241
224
|
getByLanguageId(languageId: string): Observable<IListResponse<ITranslationWithKey>>;
|
|
242
225
|
getByModuleAndLanguageId(module: string, languageId: string): Observable<IListResponse<ITranslationWithKey>>;
|
|
243
|
-
getById(id: string): Observable<ISingleResponse<ITranslation>>;
|
|
244
|
-
create(dto: ICreateTranslationDto): Observable<ISingleResponse<ITranslation>>;
|
|
245
|
-
update(dto: IUpdateTranslationDto): Observable<ISingleResponse<ITranslation>>;
|
|
246
|
-
bulkUpdate(translations: IBulkUpdateTranslationDto[]): Observable<IListResponse<ITranslation>>;
|
|
247
|
-
delete(id: string): Observable<IMessageResponse>;
|
|
248
226
|
getByKeyId(translationKeyId: string): Observable<IListResponse<ITranslation>>;
|
|
249
227
|
getCounts(): Observable<ISingleResponse<Record<string, number>>>;
|
|
228
|
+
bulkUpdate(translations: IBulkUpdateTranslationDto[]): Observable<IListResponse<ITranslation>>;
|
|
250
229
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TranslationApiService, never>;
|
|
251
230
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<TranslationApiService>;
|
|
252
231
|
}
|
|
@@ -296,17 +275,14 @@ declare class LanguageListPage implements OnInit {
|
|
|
296
275
|
readonly DELETE: "language.delete";
|
|
297
276
|
};
|
|
298
277
|
private readonly router;
|
|
299
|
-
|
|
278
|
+
readonly languageService: LanguageApiService;
|
|
300
279
|
private readonly confirmationService;
|
|
301
280
|
private readonly messageService;
|
|
302
281
|
private readonly translateService;
|
|
303
282
|
private readonly destroyRef;
|
|
304
|
-
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
305
|
-
readonly languages: _angular_core.WritableSignal<ILanguage[]>;
|
|
306
283
|
ngOnInit(): void;
|
|
307
284
|
onCreate(): void;
|
|
308
285
|
onEdit(id: string): void;
|
|
309
|
-
loadLanguages(): void;
|
|
310
286
|
onSetDefault(lang: ILanguage): void;
|
|
311
287
|
onDelete(lang: ILanguage): void;
|
|
312
288
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LanguageListPage, never>;
|
|
@@ -452,55 +428,5 @@ declare class TranslationKeyFormPage implements OnInit {
|
|
|
452
428
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TranslationKeyFormPage, "lib-translation-key-form-page", never, {}, {}, never, never, true, never>;
|
|
453
429
|
}
|
|
454
430
|
|
|
455
|
-
|
|
456
|
-
translationKey: ITranslationKey;
|
|
457
|
-
translation: ITranslationWithKey | null;
|
|
458
|
-
editValue: string;
|
|
459
|
-
isVerified: boolean;
|
|
460
|
-
isDirty: boolean;
|
|
461
|
-
}
|
|
462
|
-
declare class TranslationListPage implements OnInit {
|
|
463
|
-
private readonly languageService;
|
|
464
|
-
private readonly translationKeyService;
|
|
465
|
-
private readonly translationService;
|
|
466
|
-
private readonly messageService;
|
|
467
|
-
private readonly translateService;
|
|
468
|
-
private readonly destroyRef;
|
|
469
|
-
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
470
|
-
readonly isSaving: _angular_core.WritableSignal<boolean>;
|
|
471
|
-
readonly languages: _angular_core.WritableSignal<ILanguage[]>;
|
|
472
|
-
readonly modules: _angular_core.WritableSignal<string[]>;
|
|
473
|
-
readonly translationRows: _angular_core.WritableSignal<ITranslationRow[]>;
|
|
474
|
-
readonly selectedModule: _angular_core.WritableSignal<string | null>;
|
|
475
|
-
readonly selectedLanguageId: _angular_core.WritableSignal<string | null>;
|
|
476
|
-
readonly searchTerm: _angular_core.WritableSignal<string>;
|
|
477
|
-
readonly moduleOptions: _angular_core.Signal<({
|
|
478
|
-
label: string;
|
|
479
|
-
value: string;
|
|
480
|
-
} | {
|
|
481
|
-
label: string;
|
|
482
|
-
value: null;
|
|
483
|
-
})[]>;
|
|
484
|
-
readonly paginationTemplate: _angular_core.Signal<string>;
|
|
485
|
-
readonly languageOptions: _angular_core.Signal<{
|
|
486
|
-
label: string;
|
|
487
|
-
value: string;
|
|
488
|
-
}[]>;
|
|
489
|
-
readonly filteredRows: _angular_core.Signal<ITranslationRow[]>;
|
|
490
|
-
readonly hasChanges: _angular_core.Signal<boolean>;
|
|
491
|
-
readonly changedCount: _angular_core.Signal<number>;
|
|
492
|
-
formatVariable(v: string): string;
|
|
493
|
-
ngOnInit(): void;
|
|
494
|
-
loadInitialData(): void;
|
|
495
|
-
onModuleChange(value: string | null): void;
|
|
496
|
-
onLanguageChange(value: string | null): void;
|
|
497
|
-
loadTranslations(): void;
|
|
498
|
-
onValueChange(row: ITranslationRow): void;
|
|
499
|
-
onVerifiedChange(row: ITranslationRow): void;
|
|
500
|
-
saveChanges(): void;
|
|
501
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TranslationListPage, never>;
|
|
502
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TranslationListPage, "lib-translation-list-page", never, {}, {}, never, never, true, never>;
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
export { LOCALIZATION_CONFIG, LOCALIZATION_MESSAGES, LOCALIZATION_ROUTES, LanguageApiService, LanguageFormPage, LanguageListPage, LanguageSelectorComponent, LocalizationApiService, LocalizationContainerPage, LocalizationInitializerService, LocalizationStateService, STORAGE_KEYS, TranslateService, TranslationApiService, TranslationKeyApiService, TranslationKeyFormPage, TranslationKeyListPage, TranslationListPage, TranslationLoaderService, getLocalizationConfig, provideLocalization };
|
|
431
|
+
export { LOCALIZATION_CONFIG, LOCALIZATION_MESSAGES, LOCALIZATION_ROUTES, LanguageApiService, LanguageFormPage, LanguageListPage, LanguageSelectorComponent, LocalizationApiService, LocalizationContainerPage, LocalizationInitializerService, LocalizationStateService, STORAGE_KEYS, TranslateService, TranslationApiService, TranslationKeyApiService, TranslationKeyFormPage, TranslationKeyListPage, TranslationLoaderService, getLocalizationConfig, provideLocalization };
|
|
506
432
|
export type { IBulkUpdateTranslationDto, ICreateLanguageDto, ICreateTranslationDto, ICreateTranslationKeyDto, ILanguage, ILocalizationConfig, ITranslation, ITranslationKey, ITranslationKeyFilter, ITranslationWithKey, ITranslationsMap, IUpdateLanguageDto, IUpdateTranslationDto, IUpdateTranslationKeyDto, LocalizationLoadStrategy };
|