@rxap/ngx-localize 16.0.1-dev.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.
@@ -0,0 +1,21 @@
1
+ import { inject, LOCALE_ID } from '@angular/core';
2
+
3
+ function LanguageInterceptor(request, next) {
4
+ const localId = inject(LOCALE_ID, { optional: true });
5
+ if (localId) {
6
+ request = request.clone({
7
+ headers: request.headers.set('Accept-Language', localId),
8
+ });
9
+ }
10
+ return next(request);
11
+ }
12
+
13
+ // region
14
+ // endregion
15
+
16
+ /**
17
+ * Generated bundle index. Do not edit.
18
+ */
19
+
20
+ export { LanguageInterceptor };
21
+ //# sourceMappingURL=rxap-ngx-localize.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rxap-ngx-localize.mjs","sources":["../../../../../packages/angular/localize/src/lib/language-interceptor.ts","../../../../../packages/angular/localize/src/index.ts","../../../../../packages/angular/localize/src/rxap-ngx-localize.ts"],"sourcesContent":["import {\n HttpEvent,\n HttpHandlerFn,\n HttpRequest,\n} from '@angular/common/http';\nimport {\n inject,\n LOCALE_ID,\n} from '@angular/core';\nimport { Observable } from 'rxjs';\n\nexport function LanguageInterceptor(\n request: HttpRequest<unknown>,\n next: HttpHandlerFn,\n): Observable<HttpEvent<unknown>> {\n\n const localId = inject(LOCALE_ID, { optional: true });\n\n if (localId) {\n request = request.clone({\n headers: request.headers.set('Accept-Language', localId),\n });\n }\n\n return next(request);\n\n}\n","// region \nexport * from './lib/language-interceptor';\n// endregion\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;AAWgB,SAAA,mBAAmB,CACjC,OAA6B,EAC7B,IAAmB,EAAA;AAGnB,IAAA,MAAM,OAAO,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;AAEtD,IAAA,IAAI,OAAO,EAAE;AACX,QAAA,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC;YACtB,OAAO,EAAE,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,OAAO,CAAC;AACzD,SAAA,CAAC,CAAC;AACJ,KAAA;AAED,IAAA,OAAO,IAAI,CAAC,OAAO,CAAC,CAAC;AAEvB;;AC1BA;AAEA;;ACFA;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from './lib/language-interceptor';
@@ -0,0 +1,3 @@
1
+ import { HttpEvent, HttpHandlerFn, HttpRequest } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ export declare function LanguageInterceptor(request: HttpRequest<unknown>, next: HttpHandlerFn): Observable<HttpEvent<unknown>>;
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "version": "16.0.1-dev.0",
3
+ "name": "@rxap/ngx-localize",
4
+ "license": "GPL-3.0-or-later",
5
+ "dependencies": {
6
+ "tslib": "^2.3.0"
7
+ },
8
+ "peerDependencies": {
9
+ "@angular/common": "^16.1.4",
10
+ "@angular/core": "^16.1.4",
11
+ "rxjs": "^7.8.0"
12
+ },
13
+ "author": {
14
+ "name": "Merzough Münker",
15
+ "email": "mmuenker@digitaix.com"
16
+ },
17
+ "bugs": {
18
+ "url": "https://gitlab.com/rxap/packages/-/issues",
19
+ "email": "incoming+rxap-packages-14898188-issue-@incoming.gitlab.com"
20
+ },
21
+ "homepage": "https:/gitlab.com/rxap/packages/packages/angular/localize",
22
+ "keywords": [
23
+ "angular",
24
+ "angular-localize",
25
+ "ngx",
26
+ "packages",
27
+ "rxap"
28
+ ],
29
+ "publishConfig": {
30
+ "access": "public",
31
+ "directory": "../../../dist/packages/angular/localize"
32
+ },
33
+ "repository": {
34
+ "type": "git",
35
+ "url": "https://gitlab.com/rxap/packages.git",
36
+ "directory": "packages/angular/localize"
37
+ },
38
+ "sideEffects": false,
39
+ "gitHead": "76268b3e76dda1e11cc5fefead91c88f56d50b99",
40
+ "module": "fesm2022/rxap-ngx-localize.mjs",
41
+ "typings": "index.d.ts",
42
+ "exports": {
43
+ "./package.json": {
44
+ "default": "./package.json"
45
+ },
46
+ ".": {
47
+ "types": "./index.d.ts",
48
+ "esm2022": "./esm2022/rxap-ngx-localize.mjs",
49
+ "esm": "./esm2022/rxap-ngx-localize.mjs",
50
+ "default": "./fesm2022/rxap-ngx-localize.mjs"
51
+ },
52
+ "./theme": "./theme.css"
53
+ }
54
+ }
package/theme.css ADDED
File without changes