oip-common 0.0.14 → 0.0.15
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 +24 -26
- package/assets/i18n/en.json +64 -0
- package/assets/i18n/notfound.en.json +8 -0
- package/assets/i18n/notfound.ru.json +8 -0
- package/assets/i18n/ru.json +89 -0
- package/fesm2022/oip-common.mjs +332 -301
- package/fesm2022/oip-common.mjs.map +1 -1
- package/index.d.ts +35 -31
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -813,7 +813,42 @@ declare class LogoComponent {
|
|
|
813
813
|
static ɵcmp: i0.ɵɵComponentDeclaration<LogoComponent, "logo", never, { "width": { "alias": "width"; "required": false; }; "height": { "alias": "height"; "required": false; }; }, {}, never, never, true, never>;
|
|
814
814
|
}
|
|
815
815
|
|
|
816
|
+
/**
|
|
817
|
+
* Service for managing translation loading in the application
|
|
818
|
+
*/
|
|
819
|
+
declare class L10nService {
|
|
820
|
+
private loadedTranslations;
|
|
821
|
+
private httpClient;
|
|
822
|
+
private translateService;
|
|
823
|
+
private readonly primeNg;
|
|
824
|
+
private readonly layoutService;
|
|
825
|
+
/**
|
|
826
|
+
* Loads translations for a specific component
|
|
827
|
+
* @param component - Name of the component to load translations for
|
|
828
|
+
*/
|
|
829
|
+
loadComponentTranslations(component: string): void;
|
|
830
|
+
/**
|
|
831
|
+
* Gets the translated value of a key (or an array of keys)
|
|
832
|
+
* @returns the translated key, or an object of translated keys
|
|
833
|
+
*/
|
|
834
|
+
get(key: string): rxjs.Observable<any>;
|
|
835
|
+
/**
|
|
836
|
+
* Internal method to load translations from JSON files
|
|
837
|
+
* @param component - Component or translation namespace
|
|
838
|
+
* @param lang - Language code to load translations for
|
|
839
|
+
*/
|
|
840
|
+
private loadTranslations;
|
|
841
|
+
/**
|
|
842
|
+
* Changes the lang currently used
|
|
843
|
+
*/
|
|
844
|
+
use(selectedLanguage: string, key?: string): void;
|
|
845
|
+
init(langs: string[]): void;
|
|
846
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<L10nService, never>;
|
|
847
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<L10nService>;
|
|
848
|
+
}
|
|
849
|
+
|
|
816
850
|
declare class NotfoundComponent {
|
|
851
|
+
constructor(l10nService: L10nService);
|
|
817
852
|
static ɵfac: i0.ɵɵFactoryDeclaration<NotfoundComponent, never>;
|
|
818
853
|
static ɵcmp: i0.ɵɵComponentDeclaration<NotfoundComponent, "app-notfound", never, {}, {}, never, never, true, never>;
|
|
819
854
|
}
|
|
@@ -892,37 +927,6 @@ declare class DbMigrationComponent extends BaseModuleComponent<NoSettingsDto, No
|
|
|
892
927
|
static ɵcmp: i0.ɵɵComponentDeclaration<DbMigrationComponent, "db-migration", never, {}, {}, never, never, true, never>;
|
|
893
928
|
}
|
|
894
929
|
|
|
895
|
-
/**
|
|
896
|
-
* Service for managing translation loading in the application
|
|
897
|
-
*/
|
|
898
|
-
declare class L10nService {
|
|
899
|
-
private loadedTranslations;
|
|
900
|
-
private httpClient;
|
|
901
|
-
private translateService;
|
|
902
|
-
/**
|
|
903
|
-
* Loads translations for a specific component
|
|
904
|
-
* @param component - Name of the component to load translations for
|
|
905
|
-
*/
|
|
906
|
-
loadComponentTranslations(component: string): Promise<void>;
|
|
907
|
-
/**
|
|
908
|
-
* Gets the translated value of a key (or an array of keys)
|
|
909
|
-
* @returns the translated key, or an object of translated keys
|
|
910
|
-
*/
|
|
911
|
-
get(key: string): Promise<rxjs.Observable<any>>;
|
|
912
|
-
/**
|
|
913
|
-
* Internal method to load translations from JSON files
|
|
914
|
-
* @param component - Component or translation namespace
|
|
915
|
-
* @param lang - Language code to load translations for
|
|
916
|
-
*/
|
|
917
|
-
private loadTranslations;
|
|
918
|
-
/**
|
|
919
|
-
* Changes the lang currently used
|
|
920
|
-
*/
|
|
921
|
-
use(selectedLanguage: string): void;
|
|
922
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<L10nService, never>;
|
|
923
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<L10nService>;
|
|
924
|
-
}
|
|
925
|
-
|
|
926
930
|
interface L10n {
|
|
927
931
|
confirm: {
|
|
928
932
|
header: string;
|