@sambath999/localize-token 12.2.2 → 12.2.3

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 (57) hide show
  1. package/angular.json +119 -0
  2. package/ng-package.json +19 -0
  3. package/package.json +49 -38
  4. package/release.ps1 +30 -0
  5. package/release.sh +26 -0
  6. package/src/app/app.component.html +11 -0
  7. package/src/app/app.component.scss +0 -0
  8. package/src/app/app.component.ts +26 -0
  9. package/src/app/app.module.ts +32 -0
  10. package/src/assets/.gitkeep +0 -0
  11. package/src/assets/images/logo-300px.png +0 -0
  12. package/src/index.html +103 -0
  13. package/src/localize-logindlg/localize-logindlg.component.ts +400 -0
  14. package/src/localize-logindlg/localize-logindlg.module.ts +25 -0
  15. package/src/localize-logindlg/localize-logindlg.service.ts +38 -0
  16. package/src/localize-logindlg/public-api.ts +3 -0
  17. package/src/localize-token/localize.api.service.ts +177 -0
  18. package/src/localize-token/localize.token.module.ts +13 -0
  19. package/src/localize-token/localize.token.service.ts +84 -0
  20. package/src/localize-token/localize.token.storage.ts +132 -0
  21. package/src/localize-token/localize.token.ts +86 -0
  22. package/{localize-token/public-api.d.ts → src/localize-token/public-api.ts} +1 -1
  23. package/src/main.ts +7 -0
  24. package/src/polyfills.ts +53 -0
  25. package/src/styles.css +0 -0
  26. package/src/types/index.ts +0 -0
  27. package/tsconfig.app.json +14 -0
  28. package/tsconfig.json +38 -0
  29. package/bundles/sambath999-localize-token.umd.js +0 -1149
  30. package/bundles/sambath999-localize-token.umd.js.map +0 -1
  31. package/esm2015/localize-logindlg/localize-logindlg.component.js +0 -391
  32. package/esm2015/localize-logindlg/localize-logindlg.module.js +0 -28
  33. package/esm2015/localize-logindlg/localize-logindlg.service.js +0 -37
  34. package/esm2015/localize-logindlg/public-api.js +0 -4
  35. package/esm2015/localize-token/localize.api.service.js +0 -159
  36. package/esm2015/localize-token/localize.token.js +0 -67
  37. package/esm2015/localize-token/localize.token.module.js +0 -14
  38. package/esm2015/localize-token/localize.token.service.js +0 -70
  39. package/esm2015/localize-token/localize.token.storage.js +0 -107
  40. package/esm2015/localize-token/public-api.js +0 -6
  41. package/esm2015/public-api.js +0 -3
  42. package/esm2015/sambath999-localize-token.js +0 -5
  43. package/fesm2015/sambath999-localize-token.js +0 -851
  44. package/fesm2015/sambath999-localize-token.js.map +0 -1
  45. package/localize-logindlg/localize-logindlg.component.d.ts +0 -33
  46. package/localize-logindlg/localize-logindlg.module.d.ts +0 -2
  47. package/localize-logindlg/localize-logindlg.service.d.ts +0 -16
  48. package/localize-logindlg/public-api.d.ts +0 -3
  49. package/localize-token/localize.api.service.d.ts +0 -69
  50. package/localize-token/localize.token.d.ts +0 -46
  51. package/localize-token/localize.token.module.d.ts +0 -2
  52. package/localize-token/localize.token.service.d.ts +0 -29
  53. package/localize-token/localize.token.storage.d.ts +0 -61
  54. package/sambath999-localize-token.d.ts +0 -4
  55. package/sambath999-localize-token.metadata.json +0 -1
  56. /package/{README.md → README.MD} +0 -0
  57. /package/{public-api.d.ts → src/public-api.ts} +0 -0
package/angular.json ADDED
@@ -0,0 +1,119 @@
1
+ {
2
+ "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
+ "version": 1,
4
+ "newProjectRoot": "projects",
5
+ "projects": {
6
+ "localize-token": {
7
+ "projectType": "application",
8
+ "schematics": {
9
+ "@schematics/angular:component": {
10
+ "style": "scss",
11
+ "skipTests": true
12
+ }
13
+ },
14
+ "root": "",
15
+ "sourceRoot": "src",
16
+ "prefix": "app",
17
+ "architect": {
18
+ "build": {
19
+ "builder": "@angular-devkit/build-angular:browser",
20
+ "options": {
21
+ "outputPath": "dist/localize-token",
22
+ "index": "src/index.html",
23
+ "main": "src/main.ts",
24
+ "polyfills": "src/polyfills.ts",
25
+ "tsConfig": "tsconfig.app.json",
26
+ "aot": true,
27
+ "assets": [
28
+ "src/favicon.ico",
29
+ "src/assets"
30
+ ],
31
+ "styles": [
32
+ "src/styles.css",
33
+ "node_modules/primeflex/primeflex.css",
34
+ "node_modules/primeng/resources/themes/saga-blue/theme.css",
35
+ "node_modules/primeng/resources/primeng.min.css",
36
+ "node_modules/material-icons/iconfont/material-icons.css"
37
+ ],
38
+ "scripts": []
39
+ },
40
+ "configurations": {
41
+ "production": {
42
+ "fileReplacements": [
43
+ {
44
+ "replace": "src/environments/environment.ts",
45
+ "with": "src/environments/environment.prod.ts"
46
+ }
47
+ ],
48
+ "optimization": true,
49
+ "outputHashing": "all",
50
+ "sourceMap": false,
51
+ "namedChunks": false,
52
+ "aot": true,
53
+ "extractLicenses": true,
54
+ "vendorChunk": false,
55
+ "buildOptimizer": true,
56
+ "budgets": [
57
+ {
58
+ "type": "initial",
59
+ "maximumWarning": "2mb",
60
+ "maximumError": "5mb"
61
+ }
62
+ ]
63
+ }
64
+ }
65
+ },
66
+ "serve": {
67
+ "builder": "@angular-devkit/build-angular:dev-server",
68
+ "options": {
69
+ "browserTarget": "localize-token:build"
70
+ },
71
+ "configurations": {
72
+ "production": {
73
+ "browserTarget": "localize-token:build:production"
74
+ }
75
+ }
76
+ },
77
+ "extract-i18n": {
78
+ "builder": "@angular-devkit/build-angular:extract-i18n",
79
+ "options": {
80
+ "browserTarget": "localize-token:build"
81
+ }
82
+ },
83
+ "test": {
84
+ "builder": "@angular-devkit/build-angular:karma",
85
+ "options": {
86
+ "main": "src/test.ts",
87
+ "polyfills": "src/polyfills.ts",
88
+ "tsConfig": "tsconfig.spec.json",
89
+ "karmaConfig": "karma.conf.js",
90
+ "assets": [
91
+ "src/favicon.ico",
92
+ "src/assets"
93
+ ],
94
+ "styles": [
95
+ "src/styles.css"
96
+ ],
97
+ "scripts": []
98
+ }
99
+ },
100
+ "lint": {
101
+ "builder": "@angular-devkit/build-angular:tslint",
102
+ "options": {
103
+ "tsConfig": [
104
+ "tsconfig.app.json",
105
+ "tsconfig.spec.json",
106
+ "e2e/tsconfig.json"
107
+ ],
108
+ "exclude": [
109
+ "**/node_modules/**"
110
+ ]
111
+ }
112
+ }
113
+ }
114
+ }
115
+ },
116
+ "cli": {
117
+ "analytics": "e5ffe4a0-155a-4779-b1e3-a59f92c77753"
118
+ }
119
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/ng-packagr/ng-packagr/main/src/ng-package.schema.json#schema",
3
+ "dest": "./dist",
4
+ "lib": {
5
+ "entryFile": "src/public-api.ts"
6
+ },
7
+ "allowedNonPeerDependencies": [
8
+ "@angular/core",
9
+ "@angular/compiler",
10
+ "@angular/forms",
11
+ "@angular/animations",
12
+ "@angular/platform-browser",
13
+ "primeng",
14
+ "primeflex",
15
+ "jwt-decode",
16
+ "rxjs",
17
+ "@angular/common"
18
+ ]
19
+ }
package/package.json CHANGED
@@ -1,38 +1,49 @@
1
- {
2
- "name": "@sambath999/localize-token",
3
- "version": "12.2.2",
4
- "description": "localize token client app",
5
- "type": "module",
6
- "repository": {
7
- "type": "git",
8
- "url": "git+https://github.com/sambathM/localize-token.git"
9
- },
10
- "keywords": [
11
- "localize-token"
12
- ],
13
- "author": "sambathM",
14
- "license": "ISC",
15
- "bugs": {
16
- "url": "https://github.com/sambathM/localize-token/issues"
17
- },
18
- "homepage": "https://github.com/sambathM/localize-token#readme",
19
- "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
- "jwt-decode": "^4.0.0",
25
- "primeflex": "^2.0.0",
26
- "primeng": "^11.0.0",
27
- "rxjs": "^7.8.1",
28
- "tslib": "^2.2.0"
29
- },
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
- "sideEffects": false
38
- }
1
+ {
2
+ "name": "@sambath999/localize-token",
3
+ "version": "12.2.3",
4
+ "description": "localize token client app",
5
+ "type": "module",
6
+ "scripts": {
7
+ "ng": "ng",
8
+ "build": "ng-packagr -p ng-package.json",
9
+ "prepublish": "npm run build"
10
+ },
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git+https://github.com/sambathM/localize-token.git"
14
+ },
15
+ "keywords": [
16
+ "localize-token"
17
+ ],
18
+ "author": "sambathM",
19
+ "license": "ISC",
20
+ "bugs": {
21
+ "url": "https://github.com/sambathM/localize-token/issues"
22
+ },
23
+ "homepage": "https://github.com/sambathM/localize-token#readme",
24
+ "dependencies": {
25
+ "@angular/animations": "^12.0.0",
26
+ "@angular/compiler": "^12.0.0",
27
+ "@angular/forms": "^12.0.0",
28
+ "@angular/platform-browser": "^12.0.0",
29
+ "jwt-decode": "^4.0.0",
30
+ "primeflex": "^2.0.0",
31
+ "primeng": "^11.0.0",
32
+ "rxjs": "^7.8.1"
33
+ },
34
+ "devDependencies": {
35
+ "@angular-devkit/build-angular": "^12.0.0",
36
+ "@angular/cli": "^12.0.0",
37
+ "@angular/common": "^12.0.0",
38
+ "@angular/compiler": "^12.0.0",
39
+ "@angular/compiler-cli": "^12.0.0",
40
+ "@angular/core": "^12.0.0",
41
+ "@angular/platform-browser-dynamic": "^12.0.0",
42
+ "ng-packagr": "^12.0.0",
43
+ "typescript": "~4.3.5",
44
+ "material-icons": "^1.13.8",
45
+ "yarn": "^1.22.22",
46
+ "zone.js": "^0.11.8",
47
+ "@types/node": "^14.11.0"
48
+ }
49
+ }
package/release.ps1 ADDED
@@ -0,0 +1,30 @@
1
+ try {
2
+ # Add all changes and commit with message "update"
3
+ git add .
4
+ git commit -m "update" 2>$null
5
+ }
6
+ catch {
7
+ Write-Warning "Git commit failed, continuing with the script."
8
+ }
9
+
10
+ # Increment the patch version
11
+ npm version patch
12
+ if ($LASTEXITCODE -ne 0) {
13
+ Write-Error "Failed to increment patch version"
14
+ exit $LASTEXITCODE
15
+ }
16
+
17
+ # Build the project using yarn
18
+ yarn build
19
+ if ($LASTEXITCODE -ne 0) {
20
+ Write-Error "Failed to build the project"
21
+ exit $LASTEXITCODE
22
+ }
23
+
24
+ # Publish the package to npm
25
+ Set-Location ./dist
26
+ try {
27
+ npm publish --access public
28
+ }
29
+ catch {}
30
+ Set-Location ..
package/release.sh ADDED
@@ -0,0 +1,26 @@
1
+ #!/bin/bash
2
+
3
+ # Add all changes and commit with message "update"
4
+ if ! git add . || ! git commit -m "update"; then
5
+ echo "Git commit failed, continuing with the script."
6
+ fi
7
+
8
+ # Increment the patch version
9
+ if ! npm version patch; then
10
+ echo "Failed to increment patch version"
11
+ exit 1
12
+ fi
13
+
14
+ # Build the project using yarn
15
+ if ! yarn build; then
16
+ echo "Failed to build the project"
17
+ exit 1
18
+ fi
19
+
20
+ # Publish the package to npm
21
+ cd ./dist || exit
22
+ if ! npm publish --access public; then
23
+ echo "Failed to publish the package"
24
+ exit 1
25
+ fi
26
+ cd ..
@@ -0,0 +1,11 @@
1
+
2
+ <div class="content" role="main">
3
+ <div class="flex w-12">
4
+ <div class="l-left-menu-content" style="overflow-y: auto;">
5
+ <app-menu></app-menu>
6
+ </div>
7
+ <div class="l-main-content">
8
+ <router-outlet></router-outlet>
9
+ </div>
10
+ </div>
11
+ </div>
File without changes
@@ -0,0 +1,26 @@
1
+ import { Component, OnInit, ViewEncapsulation } from '@angular/core';
2
+ import { LocalizeLogindlgService } from '@sambath999/localize-token';
3
+
4
+ @Component({
5
+ selector: 'app-root',
6
+ templateUrl: './app.component.html',
7
+ styleUrls: [
8
+ './app.component.scss',
9
+ ],
10
+ encapsulation: ViewEncapsulation.None
11
+ })
12
+ export class AppComponent implements OnInit {
13
+ showNotification: boolean = false;
14
+ isShowMenuBar: boolean = false;
15
+ constructor(private readonly localizeLogindlgService: LocalizeLogindlgService) { }
16
+ ngOnInit(): void {
17
+ this.localizeLogindlgService.openLoginDialog({
18
+ loginUrl: 'http://localhost:3000/login',
19
+ logoutUrl: 'http://localhost:3000/logout',
20
+ logoutFunc: () => {
21
+ this.showNotification = true;
22
+ }
23
+ });
24
+ }
25
+
26
+ }
@@ -0,0 +1,32 @@
1
+ import { DecimalPipe } from "@angular/common";
2
+ import { provideHttpClient, withInterceptorsFromDi } from "@angular/common/http";
3
+ import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from "@angular/core";
4
+ import { BrowserModule } from "@angular/platform-browser";
5
+ import { LocalizeLogindlgModule, LocalizeLogindlgService } from "@sambath999/localize-token";
6
+ import { ConfirmationService } from "primeng/api";
7
+ import { DialogService } from "primeng/dynamicdialog";
8
+ import { LocalizeTokenModule } from "src/public-api";
9
+ import { AppComponent } from "./app.component";
10
+
11
+ @NgModule({
12
+ declarations: [
13
+ AppComponent,
14
+ ],
15
+ bootstrap: [AppComponent],
16
+ schemas: [
17
+ CUSTOM_ELEMENTS_SCHEMA
18
+ ],
19
+ imports: [
20
+ BrowserModule,
21
+ LocalizeTokenModule,
22
+ LocalizeLogindlgModule,
23
+ ],
24
+ providers: [
25
+ ConfirmationService,
26
+ DecimalPipe,
27
+ DialogService,
28
+ LocalizeLogindlgService,
29
+ provideHttpClient(withInterceptorsFromDi())
30
+ ]
31
+ })
32
+ export class AppModule { }
File without changes
Binary file
package/src/index.html ADDED
@@ -0,0 +1,103 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
7
+ <meta http-equiv="Strict-Transport-Security" content="max-age=0;">
8
+ <title>Localize Admin</title>
9
+ <base href="/">
10
+ <meta name="viewport" content="width=device-width, initial-scale=1">
11
+ <link rel="icon" type="image/x-icon" href="favicon.ico">
12
+ <style>
13
+ .l-is-spiner-loader {
14
+ height: 100vh;
15
+ align-items: center;
16
+ justify-content: center;
17
+ display: flex;
18
+ position: fixed;
19
+ left: 50%;
20
+ z-index: 1;
21
+ }
22
+
23
+ .l-is-spiner-loader .loading-container {
24
+ padding: 40px 0 60px;
25
+ margin-top: 1em;
26
+ min-height: 1px;
27
+ display: flex;
28
+ justify-content: center;
29
+ align-items: center;
30
+ flex-direction: column;
31
+ position: relative;
32
+ }
33
+
34
+ .l-is-spiner-loader .loading-container .loading {
35
+ position: relative;
36
+ }
37
+
38
+ .l-is-spiner-loader .loading-container .loading:after {
39
+ content: "";
40
+ background-size: 100% 100%;
41
+ display: inline-block;
42
+ width: 2.5rem;
43
+ height: 2.5rem;
44
+ background-image: url(assets/images/logo-300px.png);
45
+ position: absolute;
46
+ top: 50%;
47
+ left: 50%;
48
+ transform: translate(-50%, -50%);
49
+ opacity: 0.7;
50
+ z-index: 100001;
51
+ }
52
+
53
+ .l-is-spiner-loader .loading-container .loading:before {
54
+ position: absolute;
55
+ top: 50%;
56
+ left: 50%;
57
+ display: block;
58
+ width: 60px;
59
+ height: 60px;
60
+ margin: -35px;
61
+ content: "";
62
+ animation: rotation 1s linear infinite, opacity 0.5s;
63
+ opacity: 1;
64
+ border: 5px solid rgba(85, 85, 85, 0.1);
65
+ border-top-color: rgb(0 133 72 / 57%);
66
+ border-radius: 100%;
67
+ -webkit-backface-visibility: hidden;
68
+ backface-visibility: hidden;
69
+ z-index: 100000;
70
+ background-color: #fff;
71
+ }
72
+
73
+ @-webkit-keyframes rotation {
74
+ to {
75
+ transform: rotate(1turn);
76
+ }
77
+ }
78
+
79
+ @keyframes rotation {
80
+ to {
81
+ transform: rotate(1turn);
82
+ }
83
+ }
84
+
85
+ /* .material-icons,
86
+ .material-icons-outlined,
87
+ .material-icons-round {
88
+ color: #737373;
89
+ } */
90
+ </style>
91
+ </head>
92
+
93
+ <body style="margin: 0;">
94
+ <app-root>
95
+ <div class="l-is-spiner-loader">
96
+ <div class="loading-container">
97
+ <div class="loading"></div>
98
+ </div>
99
+ </div>
100
+ </app-root>
101
+ </body>
102
+
103
+ </html>