@sambath999/localize-token 12.2.7 → 18.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.
Files changed (41) hide show
  1. package/esm2022/lib/index.mjs +6 -0
  2. package/esm2022/lib/localize.api.service.mjs +138 -0
  3. package/esm2022/lib/localize.token.mjs +54 -0
  4. package/esm2022/lib/localize.token.module.mjs +22 -0
  5. package/esm2022/lib/localize.token.service.mjs +61 -0
  6. package/esm2022/lib/localize.token.storage.mjs +101 -0
  7. package/esm2022/public-api.mjs +2 -0
  8. package/{esm2015/sambath999-localize-token.js → esm2022/sambath999-localize-token.mjs} +4 -4
  9. package/fesm2022/sambath999-localize-token.mjs +371 -0
  10. package/fesm2022/sambath999-localize-token.mjs.map +1 -0
  11. package/{sambath999-localize-token.d.ts → index.d.ts} +5 -4
  12. package/lib/index.d.ts +5 -0
  13. package/{localize-token → lib}/localize.api.service.d.ts +62 -67
  14. package/{localize-token → lib}/localize.token.d.ts +35 -43
  15. package/lib/localize.token.module.d.ts +6 -0
  16. package/{localize-token → lib}/localize.token.service.d.ts +29 -28
  17. package/{localize-token → lib}/localize.token.storage.d.ts +61 -61
  18. package/package.json +24 -15
  19. package/public-api.d.ts +1 -2
  20. package/bundles/sambath999-localize-token.umd.js +0 -1133
  21. package/bundles/sambath999-localize-token.umd.js.map +0 -1
  22. package/esm2015/localize-logindlg/localize-logindlg.component.js +0 -389
  23. package/esm2015/localize-logindlg/localize-logindlg.module.js +0 -28
  24. package/esm2015/localize-logindlg/localize-logindlg.service.js +0 -37
  25. package/esm2015/localize-logindlg/public-api.js +0 -4
  26. package/esm2015/localize-token/localize.api.service.js +0 -155
  27. package/esm2015/localize-token/localize.token.js +0 -61
  28. package/esm2015/localize-token/localize.token.module.js +0 -14
  29. package/esm2015/localize-token/localize.token.service.js +0 -69
  30. package/esm2015/localize-token/localize.token.storage.js +0 -107
  31. package/esm2015/localize-token/public-api.js +0 -6
  32. package/esm2015/public-api.js +0 -3
  33. package/fesm2015/sambath999-localize-token.js +0 -841
  34. package/fesm2015/sambath999-localize-token.js.map +0 -1
  35. package/localize-logindlg/localize-logindlg.component.d.ts +0 -31
  36. package/localize-logindlg/localize-logindlg.module.d.ts +0 -2
  37. package/localize-logindlg/localize-logindlg.service.d.ts +0 -16
  38. package/localize-logindlg/public-api.d.ts +0 -3
  39. package/localize-token/localize.token.module.d.ts +0 -2
  40. package/localize-token/public-api.d.ts +0 -5
  41. package/sambath999-localize-token.metadata.json +0 -1
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class LocalizeTokenModule {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizeTokenModule, never>;
4
+ static ɵmod: i0.ɵɵNgModuleDeclaration<LocalizeTokenModule, never, never, never>;
5
+ static ɵinj: i0.ɵɵInjectorDeclaration<LocalizeTokenModule>;
6
+ }
@@ -1,28 +1,29 @@
1
- import { BehaviorSubject } from 'rxjs';
2
- import * as jwt_decode from 'jwt-decode';
3
- export interface JwtPayload extends jwt_decode.JwtPayload {
4
- email: string;
5
- sub: string;
6
- name: string;
7
- iat: number;
8
- exp: number;
9
- }
10
- export declare class LocalizeTokenService {
11
- readonly isRevokingTokenSubject: BehaviorSubject<boolean>;
12
- private readonly config;
13
- constructor();
14
- private get authToken();
15
- private set authToken(value);
16
- get refreshToken(): string;
17
- get accessToken(): string | undefined;
18
- set accessToken(value: string | undefined);
19
- get isRevokingToken(): boolean;
20
- set isRevokingToken(value: boolean);
21
- get getTenantToken(): string;
22
- tenantToken(name: string): string;
23
- private storageGet;
24
- private storageSet;
25
- tokensValid(): number | boolean;
26
- decodeToken: (token: string) => JwtPayload;
27
- get decodeRefreshToken(): JwtPayload;
28
- }
1
+ import { BehaviorSubject } from 'rxjs';
2
+ import * as jwt_decode from 'jwt-decode';
3
+ import * as i0 from "@angular/core";
4
+ export interface JwtPayload extends jwt_decode.JwtPayload {
5
+ email: string;
6
+ sub: string;
7
+ name: string;
8
+ iat: number;
9
+ exp: number;
10
+ }
11
+ export declare class LocalizeTokenService {
12
+ readonly isRevokingTokenSubject: BehaviorSubject<boolean>;
13
+ private get authToken();
14
+ private set authToken(value);
15
+ get refreshToken(): string;
16
+ get accessToken(): string | undefined;
17
+ set accessToken(value: string | undefined);
18
+ get isRevokingToken(): boolean;
19
+ set isRevokingToken(value: boolean);
20
+ get tenantToken(): string;
21
+ constructor();
22
+ private storageGet;
23
+ private storageSet;
24
+ tokensValid(): number | boolean;
25
+ decodeToken: (token: string) => JwtPayload;
26
+ get decodeRefreshToken(): JwtPayload;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalizeTokenService, never>;
28
+ static ɵprov: i0.ɵɵInjectableDeclaration<LocalizeTokenService>;
29
+ }
@@ -1,61 +1,61 @@
1
- export interface ICookieOptions {
2
- /**
3
- * Cookie expiration date in days from now. If not provided the cookie is a session cookie
4
- */
5
- expires?: number | Date;
6
- path?: string;
7
- domain?: string;
8
- secure?: boolean;
9
- samesite?: "strict" | "lax" | "none";
10
- }
11
- /**
12
- * Assembly of @package ng2-cookies @see https://www.npmjs.com/package/ng2-cookies
13
- *
14
- * Reassembled by
15
- * @author sambath999
16
- * @date_29_09_2021
17
- * Updated from raw parameters to
18
- * @param {ICookieOptions} options and added another newer cookie flag
19
- * @param {string} samesite
20
- * @param {constant} SameSiteTypes, @param {string} strict "strict", @param {string} lax "lax", @param {string} none "none"
21
- *
22
- * @enum
23
- */
24
- export declare class LocalizeTokenStorage {
25
- private get getDefaultOptions();
26
- private readonly defaultOptions;
27
- constructor(_defaultOptions?: ICookieOptions);
28
- /**
29
- * Checks the existence of a single cookie by it's name
30
- *
31
- * @param {string} name Identification of the cookie
32
- * @returns existence of the cookie
33
- */
34
- check(name: string): boolean;
35
- /**
36
- * Retrieves a single cookie by it's name
37
- *
38
- * @param {string} name Identification of the Cookie
39
- * @returns The Cookie's value
40
- */
41
- get(name: string): string | undefined;
42
- /**
43
- * Retrieves a a list of all cookie avaiable
44
- *
45
- * @returns Object with all Cookies
46
- */
47
- getAll(): any;
48
- set(name: string, value: string, options?: ICookieOptions): void;
49
- /**
50
- * Removes specified Cookie
51
- *
52
- * @param {string} name Cookie's identification
53
- * @param {string} path Path relative to the domain where the cookie should be avaiable. Default /
54
- * @param {string} domain Domain where the cookie should be avaiable. Default current domain
55
- */
56
- delete(name: string, path?: string, domain?: string): void;
57
- /**
58
- * Delete all cookie avaiable
59
- */
60
- deleteAll(path?: string, domain?: string): void;
61
- }
1
+ /**
2
+ * Assembly of @package ng2-cookies @see https://www.npmjs.com/package/ng2-cookies
3
+ *
4
+ * Reassembled by
5
+ * @author sambath999
6
+ * @date_29_09_2021
7
+ * Updated from raw parameters to
8
+ * @param {ICookieOptions} options and added another newer cookie flag
9
+ * @param {string} samesite
10
+ * @param {constant} SameSiteTypes, @param {string} strict "strict", @param {string} lax "lax", @param {string} none "none"
11
+ *
12
+ * @enum
13
+ */
14
+ export declare class LocalizeTokenStorageHelper {
15
+ /**
16
+ * Checks the existence of a single cookie by it's name
17
+ *
18
+ * @param {string} name Identification of the cookie
19
+ * @returns existence of the cookie
20
+ */
21
+ check(name: string): boolean;
22
+ /**
23
+ * Retrieves a single cookie by it's name
24
+ *
25
+ * @param {string} name Identification of the Cookie
26
+ * @returns The Cookie's value
27
+ */
28
+ get(name: string): string | undefined;
29
+ /**
30
+ * Retrieves a a list of all cookie avaiable
31
+ *
32
+ * @returns Object with all Cookies
33
+ */
34
+ getAll(): any;
35
+ get defaultOptions(): ICookieOptions;
36
+ set(name: string, value: string, options?: ICookieOptions): void;
37
+ /**
38
+ * Removes specified Cookie
39
+ *
40
+ * @param {string} name Cookie's identification
41
+ * @param {string} path Path relative to the domain where the cookie should be avaiable. Default /
42
+ * @param {string} domain Domain where the cookie should be avaiable. Default current domain
43
+ */
44
+ delete(name: string, path?: string, domain?: string): void;
45
+ /**
46
+ * Delete all cookie avaiable
47
+ */
48
+ deleteAll(path?: string, domain?: string): void;
49
+ }
50
+ export declare enum ISameSiteType {
51
+ strict = "strict",
52
+ lax = "lax",
53
+ none = "none"
54
+ }
55
+ export interface ICookieOptions {
56
+ expires?: number | Date;
57
+ path?: string;
58
+ domain?: string;
59
+ secure?: boolean;
60
+ samesite?: string;
61
+ }
package/package.json CHANGED
@@ -1,8 +1,17 @@
1
1
  {
2
2
  "name": "@sambath999/localize-token",
3
- "version": "12.2.7",
3
+ "version": "18.0.0",
4
4
  "description": "localize token client app",
5
5
  "type": "module",
6
+ "esm2022": "lib/esm2022/sambath999-localize-token.js",
7
+ "fesm2022": "lib/fesm2022/sambath999-localize-token.js",
8
+ "esm2020": "lib/esm2020/sambath999-localize-token.js",
9
+ "fesm2020": "lib/fesm2020/sambath999-localize-token.js",
10
+ "esm2015": "lib/esm2015/sambath999-localize-token.js",
11
+ "fesm2015": "lib/fesm2015/sambath999-localize-token.js",
12
+ "typings": "index.d.ts",
13
+ "main": "bundles/sambath999-localize-token.umd.js",
14
+ "types": "lib/index.d.ts",
6
15
  "repository": {
7
16
  "type": "git",
8
17
  "url": "git+https://github.com/sambathM/localize-token.git"
@@ -17,22 +26,22 @@
17
26
  },
18
27
  "homepage": "https://github.com/sambathM/localize-token#readme",
19
28
  "dependencies": {
20
- "@angular/animations": "^12.0.0",
21
- "@angular/compiler": "^12.0.0",
22
- "@angular/forms": "^12.0.0",
23
- "@angular/platform-browser": "^12.0.0",
24
29
  "jwt-decode": "^4.0.0",
25
- "primeflex": "^2.0.0",
26
- "primeng": "^11.0.0",
27
30
  "rxjs": "^7.8.1",
28
- "tslib": "^2.2.0"
31
+ "@angular/compiler": "^18.0.0",
32
+ "tslib": "^2.3.0"
33
+ },
34
+ "module": "fesm2022/sambath999-localize-token.mjs",
35
+ "exports": {
36
+ "./package.json": {
37
+ "default": "./package.json"
38
+ },
39
+ ".": {
40
+ "types": "./index.d.ts",
41
+ "esm2022": "./esm2022/sambath999-localize-token.mjs",
42
+ "esm": "./esm2022/sambath999-localize-token.mjs",
43
+ "default": "./fesm2022/sambath999-localize-token.mjs"
44
+ }
29
45
  },
30
- "main": "bundles/sambath999-localize-token.umd.js",
31
- "module": "fesm2015/sambath999-localize-token.js",
32
- "es2015": "fesm2015/sambath999-localize-token.js",
33
- "esm2015": "esm2015/sambath999-localize-token.js",
34
- "fesm2015": "fesm2015/sambath999-localize-token.js",
35
- "typings": "sambath999-localize-token.d.ts",
36
- "metadata": "sambath999-localize-token.metadata.json",
37
46
  "sideEffects": false
38
47
  }
package/public-api.d.ts CHANGED
@@ -1,2 +1 @@
1
- export * from './localize-token/public-api';
2
- export * from './localize-logindlg/public-api';
1
+ export * from './lib';