quang 19.0.19-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.
- package/README.md +25 -0
- package/auth/README.md +160 -0
- package/auth/auth-providers.d.ts +39 -0
- package/auth/auth.service.d.ts +52 -0
- package/auth/directives/has-at-least-one-role.directive.d.ts +26 -0
- package/auth/directives/has-every-role.directive.d.ts +26 -0
- package/auth/directives/is-authenticated.directive.d.ts +14 -0
- package/auth/directives/is-not-authenticated.directive.d.ts +14 -0
- package/auth/guards/index.d.ts +2 -0
- package/auth/guards/is-allowed.guard.d.ts +2 -0
- package/auth/guards/is-authenticated.guard.d.ts +2 -0
- package/auth/index.d.ts +9 -0
- package/auth/logout-on-error.interceptor.d.ts +9 -0
- package/auth/mobile/index.d.ts +1 -0
- package/auth/mobile/mobile-auth-feature.d.ts +2 -0
- package/auth/token-storage/index.d.ts +3 -0
- package/auth/token-storage/local-storage-feature.d.ts +2 -0
- package/auth/token-storage/memory-storage-feature.d.ts +12 -0
- package/auth/token-storage/session-storage-feature.d.ts +2 -0
- package/components/autocomplete/autocomplete.component.d.ts +43 -0
- package/components/autocomplete/index.d.ts +1 -0
- package/components/checkbox/checkbox.component.d.ts +11 -0
- package/components/checkbox/index.d.ts +1 -0
- package/components/date/date.component.d.ts +85 -0
- package/components/date/global-date.component.scss +1 -0
- package/components/date/index.d.ts +1 -0
- package/components/input/index.d.ts +1 -0
- package/components/input/input.component.d.ts +15 -0
- package/components/paginator/index.d.ts +5 -0
- package/components/paginator/paginator-language.service.d.ts +10 -0
- package/components/paginator/paginator.component.d.ts +30 -0
- package/components/paginator/paginator.module.d.ts +7 -0
- package/components/paginator/paginator.service.d.ts +6 -0
- package/components/paginator/paginatorIntl.d.ts +12 -0
- package/components/select/index.d.ts +1 -0
- package/components/select/select.component.d.ts +29 -0
- package/components/shared/ErrorData.d.ts +4 -0
- package/components/shared/index.d.ts +4 -0
- package/components/shared/makeId.d.ts +1 -0
- package/components/shared/option-list/option-list.component.d.ts +50 -0
- package/components/shared/quang-base-component.directive.d.ts +50 -0
- package/components/table/index.d.ts +1 -0
- package/components/table/table.component.d.ts +66 -0
- package/components/wysiwyg/global-wysiswyg.component.scss +1 -0
- package/components/wysiwyg/index.d.ts +1 -0
- package/components/wysiwyg/wysiwyg.component.d.ts +46 -0
- package/device/index.d.ts +1 -0
- package/device/resize-observable.service.d.ts +11 -0
- package/fesm2022/quang-auth-mobile.mjs +48 -0
- package/fesm2022/quang-auth-mobile.mjs.map +1 -0
- package/fesm2022/quang-auth.mjs +473 -0
- package/fesm2022/quang-auth.mjs.map +1 -0
- package/fesm2022/quang-components-autocomplete.mjs +196 -0
- package/fesm2022/quang-components-autocomplete.mjs.map +1 -0
- package/fesm2022/quang-components-checkbox.mjs +53 -0
- package/fesm2022/quang-components-checkbox.mjs.map +1 -0
- package/fesm2022/quang-components-date.mjs +392 -0
- package/fesm2022/quang-components-date.mjs.map +1 -0
- package/fesm2022/quang-components-input.mjs +54 -0
- package/fesm2022/quang-components-input.mjs.map +1 -0
- package/fesm2022/quang-components-paginator.mjs +157 -0
- package/fesm2022/quang-components-paginator.mjs.map +1 -0
- package/fesm2022/quang-components-select.mjs +123 -0
- package/fesm2022/quang-components-select.mjs.map +1 -0
- package/fesm2022/quang-components-shared.mjs +386 -0
- package/fesm2022/quang-components-shared.mjs.map +1 -0
- package/fesm2022/quang-components-table.mjs +162 -0
- package/fesm2022/quang-components-table.mjs.map +1 -0
- package/fesm2022/quang-components-wysiwyg.mjs +230 -0
- package/fesm2022/quang-components-wysiwyg.mjs.map +1 -0
- package/fesm2022/quang-device.mjs +42 -0
- package/fesm2022/quang-device.mjs.map +1 -0
- package/fesm2022/quang-forms.mjs +188 -0
- package/fesm2022/quang-forms.mjs.map +1 -0
- package/fesm2022/quang-loader.mjs +116 -0
- package/fesm2022/quang-loader.mjs.map +1 -0
- package/fesm2022/quang-overlay-modal.mjs +118 -0
- package/fesm2022/quang-overlay-modal.mjs.map +1 -0
- package/fesm2022/quang-overlay-popover.mjs +70 -0
- package/fesm2022/quang-overlay-popover.mjs.map +1 -0
- package/fesm2022/quang-overlay-shared.mjs +359 -0
- package/fesm2022/quang-overlay-shared.mjs.map +1 -0
- package/fesm2022/quang-overlay-toast.mjs +105 -0
- package/fesm2022/quang-overlay-toast.mjs.map +1 -0
- package/fesm2022/quang-overlay-tooltip.mjs +56 -0
- package/fesm2022/quang-overlay-tooltip.mjs.map +1 -0
- package/fesm2022/quang-shared.mjs +29 -0
- package/fesm2022/quang-shared.mjs.map +1 -0
- package/fesm2022/quang-translation.mjs +119 -0
- package/fesm2022/quang-translation.mjs.map +1 -0
- package/fesm2022/quang.mjs +23 -0
- package/fesm2022/quang.mjs.map +1 -0
- package/forms/README.md +6 -0
- package/forms/form-group-model.d.ts +18 -0
- package/forms/index.d.ts +2 -0
- package/forms/validators.d.ts +43 -0
- package/index.d.ts +30 -0
- package/loader/README.md +14 -0
- package/loader/index.d.ts +4 -0
- package/loader/loader-providers.d.ts +23 -0
- package/loader/loader.component.d.ts +23 -0
- package/loader/loader.interceptor.d.ts +10 -0
- package/loader/loader.service.d.ts +9 -0
- package/overlay/modal/index.d.ts +1 -0
- package/overlay/modal/modal.component.d.ts +29 -0
- package/overlay/popover/index.d.ts +1 -0
- package/overlay/popover/popover.component.d.ts +13 -0
- package/overlay/popover/popover.directive.d.ts +11 -0
- package/overlay/shared/CustomViewportRuler.d.ts +63 -0
- package/overlay/shared/index.d.ts +3 -0
- package/overlay/shared/quang-base-overlay.component.d.ts +9 -0
- package/overlay/shared/quang-base-overlay.directive.d.ts +44 -0
- package/overlay/toast/index.d.ts +2 -0
- package/overlay/toast/toast.component.d.ts +13 -0
- package/overlay/toast/toast.service.d.ts +27 -0
- package/overlay/tooltip/index.d.ts +2 -0
- package/overlay/tooltip/tooltip.component.d.ts +11 -0
- package/overlay/tooltip/tooltip.directive.d.ts +11 -0
- package/package.json +146 -0
- package/shared/index.d.ts +1 -0
- package/shared/intercept-utils.d.ts +13 -0
- package/translation/README.md +21 -0
- package/translation/index.d.ts +4 -0
- package/translation/translation-loader.service.d.ts +10 -0
- package/translation/translation-providers.d.ts +28 -0
- package/translation/translation.service.d.ts +15 -0
- package/translation/translations.tokens.d.ts +5 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TemplateRef } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface ToastData {
|
|
4
|
+
type: 'success' | 'warning' | 'error';
|
|
5
|
+
title?: string;
|
|
6
|
+
position: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'center' | 'top-center' | 'bottom-center';
|
|
7
|
+
timing: number;
|
|
8
|
+
text?: string;
|
|
9
|
+
textValue?: string;
|
|
10
|
+
showCloseButton?: boolean;
|
|
11
|
+
date?: Date;
|
|
12
|
+
dateFormat?: string;
|
|
13
|
+
customTemplate?: TemplateRef<any>;
|
|
14
|
+
customIcon?: string;
|
|
15
|
+
hideHeader?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare class QuangToastService {
|
|
18
|
+
private toastState;
|
|
19
|
+
isShowing: import("@angular/core").Signal<boolean>;
|
|
20
|
+
count: import("@ngrx/signals/src/deep-signal").Signal<number>;
|
|
21
|
+
currentTimeout: import("@ngrx/signals/src/deep-signal").Signal<number | null>;
|
|
22
|
+
openToast(toastData: ToastData): void;
|
|
23
|
+
closeToast(): void;
|
|
24
|
+
currentToast: import("@angular/core").WritableSignal<ToastData | null>;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QuangToastService, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<QuangToastService>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ConnectionPositionPair } from '@angular/cdk/overlay';
|
|
2
|
+
import { QuangBaseOverlayComponent } from 'quang/overlay/shared';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class QuangTooltipComponent implements QuangBaseOverlayComponent {
|
|
5
|
+
content: import("@angular/core").InputSignal<string>;
|
|
6
|
+
quangTooltipPosition: import("@angular/core").InputSignal<"top" | "bottom" | "left" | "right">;
|
|
7
|
+
positionPair: import("@angular/core").WritableSignal<ConnectionPositionPair | null>;
|
|
8
|
+
payload: import("@angular/core").InputSignal<unknown>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QuangTooltipComponent, never>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<QuangTooltipComponent, "quang-tooltip", never, { "content": { "alias": "content"; "required": false; "isSignal": true; }; "quangTooltipPosition": { "alias": "quangTooltipPosition"; "required": false; "isSignal": true; }; "payload": { "alias": "payload"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ComponentType } from '@angular/cdk/portal';
|
|
2
|
+
import { QuangBaseOverlayDirective } from 'quang/overlay/shared';
|
|
3
|
+
import { QuangTooltipComponent } from './tooltip.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class QuangTooltipDirective extends QuangBaseOverlayDirective<QuangTooltipComponent> {
|
|
6
|
+
targetComponentType: import("@angular/core").WritableSignal<ComponentType<QuangTooltipComponent> | undefined>;
|
|
7
|
+
content: import("@angular/core").InputSignal<string>;
|
|
8
|
+
showMethod: import("@angular/core").InputSignal<"click" | "hover">;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QuangTooltipDirective, never>;
|
|
10
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<QuangTooltipDirective, "[quangTooltip]", never, { "content": { "alias": "quangTooltip"; "required": true; "isSignal": true; }; "showMethod": { "alias": "showMethod"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
11
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "quang",
|
|
3
|
+
"sideEffects": false,
|
|
4
|
+
"version": "19.0.19-2",
|
|
5
|
+
"dependencies": {
|
|
6
|
+
"tslib": "^2.3.0"
|
|
7
|
+
},
|
|
8
|
+
"peerDependencies": {
|
|
9
|
+
"@angular/animations": "^19.0.3",
|
|
10
|
+
"@angular/cdk": "^19.0.2",
|
|
11
|
+
"@angular/common": "^19.0.3",
|
|
12
|
+
"@angular/core": "^19.0.3",
|
|
13
|
+
"@angular/forms": "^19.0.3",
|
|
14
|
+
"@capacitor/app": "^6.0.0",
|
|
15
|
+
"@capacitor/browser": "^6.0.1",
|
|
16
|
+
"@capacitor/core": "^6.1.1",
|
|
17
|
+
"@jsverse/transloco": "^7.5.0",
|
|
18
|
+
"@ngrx/signals": "^19.0.0",
|
|
19
|
+
"air-datepicker": "^3.5.0",
|
|
20
|
+
"angular-oauth2-oidc": "^19.0.0",
|
|
21
|
+
"date-fns": "^3.6.0",
|
|
22
|
+
"rxjs": "~7.8.0",
|
|
23
|
+
"suneditor": "^2.46.0"
|
|
24
|
+
},
|
|
25
|
+
"peerDependenciesMeta": {
|
|
26
|
+
"@capacitor/app": {
|
|
27
|
+
"optional": true
|
|
28
|
+
},
|
|
29
|
+
"@capacitor/browser": {
|
|
30
|
+
"optional": true
|
|
31
|
+
},
|
|
32
|
+
"@capacitor/core": {
|
|
33
|
+
"optional": true
|
|
34
|
+
},
|
|
35
|
+
"@ngrx/signals": {
|
|
36
|
+
"optional": true
|
|
37
|
+
},
|
|
38
|
+
"air-datepicker": {
|
|
39
|
+
"optional": true
|
|
40
|
+
},
|
|
41
|
+
"angular-oauth2-oidc": {
|
|
42
|
+
"optional": true
|
|
43
|
+
},
|
|
44
|
+
"date-fns": {
|
|
45
|
+
"optional": true
|
|
46
|
+
},
|
|
47
|
+
"suneditor": {
|
|
48
|
+
"optional": true
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"module": "fesm2022/quang.mjs",
|
|
52
|
+
"typings": "index.d.ts",
|
|
53
|
+
"exports": {
|
|
54
|
+
"./package.json": {
|
|
55
|
+
"default": "./package.json"
|
|
56
|
+
},
|
|
57
|
+
".": {
|
|
58
|
+
"types": "./index.d.ts",
|
|
59
|
+
"default": "./fesm2022/quang.mjs"
|
|
60
|
+
},
|
|
61
|
+
"./auth": {
|
|
62
|
+
"types": "./auth/index.d.ts",
|
|
63
|
+
"default": "./fesm2022/quang-auth.mjs"
|
|
64
|
+
},
|
|
65
|
+
"./device": {
|
|
66
|
+
"types": "./device/index.d.ts",
|
|
67
|
+
"default": "./fesm2022/quang-device.mjs"
|
|
68
|
+
},
|
|
69
|
+
"./forms": {
|
|
70
|
+
"types": "./forms/index.d.ts",
|
|
71
|
+
"default": "./fesm2022/quang-forms.mjs"
|
|
72
|
+
},
|
|
73
|
+
"./loader": {
|
|
74
|
+
"types": "./loader/index.d.ts",
|
|
75
|
+
"default": "./fesm2022/quang-loader.mjs"
|
|
76
|
+
},
|
|
77
|
+
"./shared": {
|
|
78
|
+
"types": "./shared/index.d.ts",
|
|
79
|
+
"default": "./fesm2022/quang-shared.mjs"
|
|
80
|
+
},
|
|
81
|
+
"./translation": {
|
|
82
|
+
"types": "./translation/index.d.ts",
|
|
83
|
+
"default": "./fesm2022/quang-translation.mjs"
|
|
84
|
+
},
|
|
85
|
+
"./auth/mobile": {
|
|
86
|
+
"types": "./auth/mobile/index.d.ts",
|
|
87
|
+
"default": "./fesm2022/quang-auth-mobile.mjs"
|
|
88
|
+
},
|
|
89
|
+
"./components/autocomplete": {
|
|
90
|
+
"types": "./components/autocomplete/index.d.ts",
|
|
91
|
+
"default": "./fesm2022/quang-components-autocomplete.mjs"
|
|
92
|
+
},
|
|
93
|
+
"./components/checkbox": {
|
|
94
|
+
"types": "./components/checkbox/index.d.ts",
|
|
95
|
+
"default": "./fesm2022/quang-components-checkbox.mjs"
|
|
96
|
+
},
|
|
97
|
+
"./components/date": {
|
|
98
|
+
"types": "./components/date/index.d.ts",
|
|
99
|
+
"default": "./fesm2022/quang-components-date.mjs"
|
|
100
|
+
},
|
|
101
|
+
"./components/input": {
|
|
102
|
+
"types": "./components/input/index.d.ts",
|
|
103
|
+
"default": "./fesm2022/quang-components-input.mjs"
|
|
104
|
+
},
|
|
105
|
+
"./components/select": {
|
|
106
|
+
"types": "./components/select/index.d.ts",
|
|
107
|
+
"default": "./fesm2022/quang-components-select.mjs"
|
|
108
|
+
},
|
|
109
|
+
"./components/paginator": {
|
|
110
|
+
"types": "./components/paginator/index.d.ts",
|
|
111
|
+
"default": "./fesm2022/quang-components-paginator.mjs"
|
|
112
|
+
},
|
|
113
|
+
"./components/shared": {
|
|
114
|
+
"types": "./components/shared/index.d.ts",
|
|
115
|
+
"default": "./fesm2022/quang-components-shared.mjs"
|
|
116
|
+
},
|
|
117
|
+
"./components/table": {
|
|
118
|
+
"types": "./components/table/index.d.ts",
|
|
119
|
+
"default": "./fesm2022/quang-components-table.mjs"
|
|
120
|
+
},
|
|
121
|
+
"./components/wysiwyg": {
|
|
122
|
+
"types": "./components/wysiwyg/index.d.ts",
|
|
123
|
+
"default": "./fesm2022/quang-components-wysiwyg.mjs"
|
|
124
|
+
},
|
|
125
|
+
"./overlay/modal": {
|
|
126
|
+
"types": "./overlay/modal/index.d.ts",
|
|
127
|
+
"default": "./fesm2022/quang-overlay-modal.mjs"
|
|
128
|
+
},
|
|
129
|
+
"./overlay/popover": {
|
|
130
|
+
"types": "./overlay/popover/index.d.ts",
|
|
131
|
+
"default": "./fesm2022/quang-overlay-popover.mjs"
|
|
132
|
+
},
|
|
133
|
+
"./overlay/shared": {
|
|
134
|
+
"types": "./overlay/shared/index.d.ts",
|
|
135
|
+
"default": "./fesm2022/quang-overlay-shared.mjs"
|
|
136
|
+
},
|
|
137
|
+
"./overlay/toast": {
|
|
138
|
+
"types": "./overlay/toast/index.d.ts",
|
|
139
|
+
"default": "./fesm2022/quang-overlay-toast.mjs"
|
|
140
|
+
},
|
|
141
|
+
"./overlay/tooltip": {
|
|
142
|
+
"types": "./overlay/tooltip/index.d.ts",
|
|
143
|
+
"default": "./fesm2022/quang-overlay-tooltip.mjs"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './intercept-utils';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
2
|
+
export declare function isHttpMethod(value: string): value is HttpMethod;
|
|
3
|
+
export interface UrlData {
|
|
4
|
+
url: string;
|
|
5
|
+
method: HttpMethod;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @example
|
|
9
|
+
* providers: [
|
|
10
|
+
* provideHttpClient(withInterceptors([quangLoaderInterceptor]))
|
|
11
|
+
* ]
|
|
12
|
+
*/
|
|
13
|
+
export declare function getExcludedUrlsByMethod(urlData: UrlData[]): Map<HttpMethod, Set<string>>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Quang Translation
|
|
2
|
+
|
|
3
|
+
`Quang Translation` is a wrapper of `Transloco` to implements commons features
|
|
4
|
+
|
|
5
|
+
### QuangTranslationLoaderService
|
|
6
|
+
|
|
7
|
+
[QuangTranslationLoaderService](./translation-loader.service.ts) loads translations' files.
|
|
8
|
+
|
|
9
|
+
### Translation Providers
|
|
10
|
+
|
|
11
|
+
`Translation Providers` provides a configurable setup for internationalization (i18n) using the @jsverse/transloco library.
|
|
12
|
+
|
|
13
|
+
Read [@example](./translation-providers.ts) for usage.
|
|
14
|
+
|
|
15
|
+
### QuangTranslationService
|
|
16
|
+
|
|
17
|
+
[QuangTranslationService](./translation.service.ts) is responsible for managing translations within the application. It leverages the @jsverse/transloco library for core translation functionalities.
|
|
18
|
+
|
|
19
|
+
### Translation Tokens
|
|
20
|
+
|
|
21
|
+
[`Translation Tokens`](./translations.tokens.ts) includes a set of tokens that you can use inside your project.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Translation, TranslocoLoader } from '@jsverse/transloco';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class QuangTranslationLoaderService implements TranslocoLoader {
|
|
5
|
+
private readonly httpClient;
|
|
6
|
+
private readonly translationBasePath;
|
|
7
|
+
getTranslation(lang: string): Observable<Translation> | Promise<Translation>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QuangTranslationLoaderService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<QuangTranslationLoaderService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { EnvironmentProviders } from '@angular/core';
|
|
2
|
+
import { QuangFeature, QuangFeatureKind } from 'quang';
|
|
3
|
+
export interface TranslationConfig {
|
|
4
|
+
availableLangs: string[];
|
|
5
|
+
defaultLang: string;
|
|
6
|
+
fallbackLang: string;
|
|
7
|
+
translationsBasePath?: string;
|
|
8
|
+
reRenderOnLangChange?: boolean;
|
|
9
|
+
prodMode?: boolean;
|
|
10
|
+
failedRetries?: number;
|
|
11
|
+
logMissingKey?: boolean;
|
|
12
|
+
useFallbackTranslation?: boolean;
|
|
13
|
+
allowEmpty?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @example
|
|
17
|
+
* export const appConfig: ApplicationConfig = {
|
|
18
|
+
* providers: [
|
|
19
|
+
* provideTranslation({
|
|
20
|
+
* availableLangs: ['it', 'en'],
|
|
21
|
+
* defaultLang: 'it',
|
|
22
|
+
* fallbackLang: 'it',
|
|
23
|
+
* })
|
|
24
|
+
* ]
|
|
25
|
+
* }
|
|
26
|
+
*/
|
|
27
|
+
export declare function provideTranslation(config: TranslationConfig): EnvironmentProviders;
|
|
28
|
+
export declare function withTranslation(config: TranslationConfig): QuangFeature<QuangFeatureKind.TranslationFeature>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { HashMap, SetTranslationOptions, Translation } from '@jsverse/transloco';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class QuangTranslationService {
|
|
4
|
+
private readonly _translocoService;
|
|
5
|
+
activeLang: import("@angular/core").Signal<string | null>;
|
|
6
|
+
private readonly _availableLangs;
|
|
7
|
+
private readonly _defaultLang;
|
|
8
|
+
setActiveLang(lang: string): void;
|
|
9
|
+
getActiveLang(): string | null;
|
|
10
|
+
translate(key: string, params?: HashMap): string;
|
|
11
|
+
setTranslation(translation: Translation, lang?: string, options?: SetTranslationOptions): void;
|
|
12
|
+
setTranslationKey(key: string, value: string, options?: Omit<SetTranslationOptions, 'merge'>): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<QuangTranslationService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<QuangTranslationService>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
export declare const AVAILABLE_LANGS: InjectionToken<string[]>;
|
|
3
|
+
export declare const DEFAULT_LANG: InjectionToken<string>;
|
|
4
|
+
export declare const FALLBACK_LANG: InjectionToken<string>;
|
|
5
|
+
export declare const TRANSLATIONS_BASE_PATH: InjectionToken<string>;
|