@syndew/oluso-account-ui 0.0.0-stage → 0.0.1

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 CHANGED
@@ -1,3 +1,7 @@
1
- # Temporary Holding Version
1
+ # account-ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ This library was generated with [Nx](https://nx.dev).
4
+
5
+ ## Running unit tests
6
+
7
+ Run `nx test account-ui` to execute the unit tests.
@@ -0,0 +1,73 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, Component } from '@angular/core';
3
+ import { RouterLink } from '@angular/router';
4
+ import { OidcSecurityService } from 'angular-auth-oidc-client';
5
+
6
+ class UnauthorizedPageComponent {
7
+ oidcService = inject(OidcSecurityService);
8
+ logout() {
9
+ this.oidcService.logoff().subscribe();
10
+ }
11
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: UnauthorizedPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
12
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.25", type: UnauthorizedPageComponent, isStandalone: true, selector: "app-unauthorized-page", ngImport: i0, template: `
13
+ <div class="min-h-screen flex items-center justify-center bg-gray-50">
14
+ <div class="max-w-md w-full text-center p-8">
15
+ <div class="mx-auto h-16 w-16 rounded-full bg-red-100 flex items-center justify-center mb-6">
16
+ <svg class="h-8 w-8 text-red-600" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
17
+ <path stroke-linecap="round" stroke-linejoin="round" d="M18.364 18.364A9 9 0 0 0 5.636 5.636m12.728 12.728A9 9 0 0 1 5.636 5.636m12.728 12.728L5.636 5.636" />
18
+ </svg>
19
+ </div>
20
+ <h1 class="text-2xl font-bold text-gray-900 mb-2">Access Denied</h1>
21
+ <p class="text-gray-600 mb-6">You don't have permission to access this page. Contact your administrator if you believe this is an error, or sign out and try with a different account.</p>
22
+ <div class="flex items-center justify-center gap-3">
23
+ <a routerLink="/profile" class="inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-primary-600 rounded-md hover:bg-primary-700">
24
+ Go to Profile
25
+ </a>
26
+ <button
27
+ type="button"
28
+ (click)="logout()"
29
+ class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"
30
+ >
31
+ Sign out
32
+ </button>
33
+ </div>
34
+ </div>
35
+ </div>
36
+ `, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
37
+ }
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: UnauthorizedPageComponent, decorators: [{
39
+ type: Component,
40
+ args: [{
41
+ selector: 'app-unauthorized-page',
42
+ standalone: true,
43
+ imports: [RouterLink],
44
+ template: `
45
+ <div class="min-h-screen flex items-center justify-center bg-gray-50">
46
+ <div class="max-w-md w-full text-center p-8">
47
+ <div class="mx-auto h-16 w-16 rounded-full bg-red-100 flex items-center justify-center mb-6">
48
+ <svg class="h-8 w-8 text-red-600" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
49
+ <path stroke-linecap="round" stroke-linejoin="round" d="M18.364 18.364A9 9 0 0 0 5.636 5.636m12.728 12.728A9 9 0 0 1 5.636 5.636m12.728 12.728L5.636 5.636" />
50
+ </svg>
51
+ </div>
52
+ <h1 class="text-2xl font-bold text-gray-900 mb-2">Access Denied</h1>
53
+ <p class="text-gray-600 mb-6">You don't have permission to access this page. Contact your administrator if you believe this is an error, or sign out and try with a different account.</p>
54
+ <div class="flex items-center justify-center gap-3">
55
+ <a routerLink="/profile" class="inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-primary-600 rounded-md hover:bg-primary-700">
56
+ Go to Profile
57
+ </a>
58
+ <button
59
+ type="button"
60
+ (click)="logout()"
61
+ class="inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50"
62
+ >
63
+ Sign out
64
+ </button>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ `,
69
+ }]
70
+ }] });
71
+
72
+ export { UnauthorizedPageComponent };
73
+ //# sourceMappingURL=syndew-oluso-account-ui-unauthorized-page.component-M-w0eNbc.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"syndew-oluso-account-ui-unauthorized-page.component-M-w0eNbc.mjs","sources":["../../../../libs/account-ui/src/lib/pages/unauthorized/unauthorized-page.component.ts"],"sourcesContent":["import { Component, inject } from '@angular/core';\nimport { RouterLink } from '@angular/router';\nimport { OidcSecurityService } from 'angular-auth-oidc-client';\n\n@Component({\n selector: 'app-unauthorized-page',\n standalone: true,\n imports: [RouterLink],\n template: `\n <div class=\"min-h-screen flex items-center justify-center bg-gray-50\">\n <div class=\"max-w-md w-full text-center p-8\">\n <div class=\"mx-auto h-16 w-16 rounded-full bg-red-100 flex items-center justify-center mb-6\">\n <svg class=\"h-8 w-8 text-red-600\" fill=\"none\" viewBox=\"0 0 24 24\" stroke-width=\"1.5\" stroke=\"currentColor\">\n <path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M18.364 18.364A9 9 0 0 0 5.636 5.636m12.728 12.728A9 9 0 0 1 5.636 5.636m12.728 12.728L5.636 5.636\" />\n </svg>\n </div>\n <h1 class=\"text-2xl font-bold text-gray-900 mb-2\">Access Denied</h1>\n <p class=\"text-gray-600 mb-6\">You don't have permission to access this page. Contact your administrator if you believe this is an error, or sign out and try with a different account.</p>\n <div class=\"flex items-center justify-center gap-3\">\n <a routerLink=\"/profile\" class=\"inline-flex items-center px-4 py-2 text-sm font-medium text-white bg-primary-600 rounded-md hover:bg-primary-700\">\n Go to Profile\n </a>\n <button\n type=\"button\"\n (click)=\"logout()\"\n class=\"inline-flex items-center px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50\"\n >\n Sign out\n </button>\n </div>\n </div>\n </div>\n `,\n})\nexport class UnauthorizedPageComponent {\n private readonly oidcService = inject(OidcSecurityService);\n\n logout(): void {\n this.oidcService.logoff().subscribe();\n }\n}\n"],"names":[],"mappings":";;;;;MAkCa,yBAAyB,CAAA;AACnB,IAAA,WAAW,GAAG,MAAM,CAAC,mBAAmB,CAAC;IAE1D,MAAM,GAAA;QACJ,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,SAAS,EAAE;IACvC;wGALW,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAzB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EA1B1B;;;;;;;;;;;;;;;;;;;;;;;;AAwBT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAzBS,UAAU,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;4FA2BT,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBA9BrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,uBAAuB;AACjC,oBAAA,UAAU,EAAE,IAAI;oBAChB,OAAO,EAAE,CAAC,UAAU,CAAC;AACrB,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;AAwBT,EAAA,CAAA;AACF,iBAAA;;;;;"}