@fabio.buscaroli/scm-utils 22.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 +10 -0
- package/fesm2022/abv-scm-utils-core.mjs +3293 -0
- package/fesm2022/abv-scm-utils-core.mjs.map +1 -0
- package/fesm2022/abv-scm-utils-tinymce.mjs +230 -0
- package/fesm2022/abv-scm-utils-tinymce.mjs.map +1 -0
- package/fesm2022/abv-scm-utils-ui.application.mjs +3396 -0
- package/fesm2022/abv-scm-utils-ui.application.mjs.map +1 -0
- package/fesm2022/abv-scm-utils-ui.mjs +3060 -0
- package/fesm2022/abv-scm-utils-ui.mjs.map +1 -0
- package/fesm2022/abv-scm-utils-ui.oauth.mjs +278 -0
- package/fesm2022/abv-scm-utils-ui.oauth.mjs.map +1 -0
- package/fesm2022/abv-scm-utils.mjs +13 -0
- package/fesm2022/abv-scm-utils.mjs.map +1 -0
- package/fesm2022/fabio.buscaroli-scm-utils-core.mjs +3293 -0
- package/fesm2022/fabio.buscaroli-scm-utils-core.mjs.map +1 -0
- package/fesm2022/fabio.buscaroli-scm-utils-tinymce.mjs +230 -0
- package/fesm2022/fabio.buscaroli-scm-utils-tinymce.mjs.map +1 -0
- package/fesm2022/fabio.buscaroli-scm-utils-ui.application.mjs +3396 -0
- package/fesm2022/fabio.buscaroli-scm-utils-ui.application.mjs.map +1 -0
- package/fesm2022/fabio.buscaroli-scm-utils-ui.mjs +3060 -0
- package/fesm2022/fabio.buscaroli-scm-utils-ui.mjs.map +1 -0
- package/fesm2022/fabio.buscaroli-scm-utils-ui.oauth.mjs +278 -0
- package/fesm2022/fabio.buscaroli-scm-utils-ui.oauth.mjs.map +1 -0
- package/fesm2022/fabio.buscaroli-scm-utils.mjs +13 -0
- package/fesm2022/fabio.buscaroli-scm-utils.mjs.map +1 -0
- package/package.json +58 -0
- package/styles/ui.colors.scss +77 -0
- package/styles/ui.scss +350 -0
- package/tinymce/README.md +12 -0
- package/tinymce/langs/it.js +466 -0
- package/types/abv-scm-utils-core.d.ts +1536 -0
- package/types/abv-scm-utils-tinymce.d.ts +59 -0
- package/types/abv-scm-utils-ui.application.d.ts +1504 -0
- package/types/abv-scm-utils-ui.d.ts +1393 -0
- package/types/abv-scm-utils-ui.oauth.d.ts +68 -0
- package/types/abv-scm-utils.d.ts +4 -0
- package/types/fabio.buscaroli-scm-utils-core.d.ts +1536 -0
- package/types/fabio.buscaroli-scm-utils-tinymce.d.ts +59 -0
- package/types/fabio.buscaroli-scm-utils-ui.application.d.ts +1504 -0
- package/types/fabio.buscaroli-scm-utils-ui.d.ts +1393 -0
- package/types/fabio.buscaroli-scm-utils-ui.oauth.d.ts +68 -0
- package/types/fabio.buscaroli-scm-utils.d.ts +4 -0
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, DestroyRef, NgZone, output, input, signal, afterNextRender, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import * as i1 from '@angular/material/button';
|
|
5
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
6
|
+
import { EnvironmentService } from '@abv/scm-utils/core';
|
|
7
|
+
import { DialogService } from '@abv/scm-utils/ui';
|
|
8
|
+
import { MsalBroadcastService, MsalService, MSAL_INSTANCE, MSAL_GUARD_CONFIG, MSAL_INTERCEPTOR_CONFIG } from '@azure/msal-angular';
|
|
9
|
+
import { PublicClientApplication, BrowserCacheLocation, InteractionType, EventType } from '@azure/msal-browser';
|
|
10
|
+
import { filter } from 'rxjs';
|
|
11
|
+
import { broadcastResponseToMainFrame } from '@azure/msal-browser/redirect-bridge';
|
|
12
|
+
import * as i1$1 from '@ngbracket/ngx-layout/flex';
|
|
13
|
+
import { FlexModule } from '@ngbracket/ngx-layout/flex';
|
|
14
|
+
import * as i2 from '@angular/material/progress-bar';
|
|
15
|
+
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
16
|
+
|
|
17
|
+
var LoginOAuthType;
|
|
18
|
+
(function (LoginOAuthType) {
|
|
19
|
+
LoginOAuthType[LoginOAuthType["None"] = 0] = "None";
|
|
20
|
+
LoginOAuthType[LoginOAuthType["Microsoft"] = 1] = "Microsoft";
|
|
21
|
+
LoginOAuthType[LoginOAuthType["Google"] = 2] = "Google";
|
|
22
|
+
})(LoginOAuthType || (LoginOAuthType = {}));
|
|
23
|
+
|
|
24
|
+
function MSALInstanceFactory(environment) {
|
|
25
|
+
return new PublicClientApplication({
|
|
26
|
+
auth: {
|
|
27
|
+
clientId: "6b2c080f-6ab0-4511-a9df-0bce69db5833",
|
|
28
|
+
authority: "https://login.microsoftonline.com/common",
|
|
29
|
+
redirectUri: environment.appLoginRedirectUri,
|
|
30
|
+
},
|
|
31
|
+
cache: {
|
|
32
|
+
cacheLocation: BrowserCacheLocation.LocalStorage
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
function MSALInterceptorConfigFactory(environment) {
|
|
37
|
+
return {
|
|
38
|
+
interactionType: InteractionType.Popup,
|
|
39
|
+
protectedResourceMap: new Map([
|
|
40
|
+
[environment.appServiceLoginUri, ["api://6b2c080f-6ab0-4511-a9df-0bce69db5833/AngularSPAAuthScope"]],
|
|
41
|
+
["https://graph.microsoft.com/v2.0/me", ["user.read"]],
|
|
42
|
+
])
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function MSALGuardConfigFactory() {
|
|
46
|
+
return {
|
|
47
|
+
interactionType: InteractionType.Popup,
|
|
48
|
+
authRequest: {
|
|
49
|
+
scopes: ["user.read"]
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
class LoginOAuthComponent {
|
|
54
|
+
constructor() {
|
|
55
|
+
this.destroyRef = inject(DestroyRef);
|
|
56
|
+
this.msalBroadcastService = inject(MsalBroadcastService);
|
|
57
|
+
this.msaLService = inject(MsalService);
|
|
58
|
+
this.dialogService = inject(DialogService);
|
|
59
|
+
this.ngZone = inject(NgZone);
|
|
60
|
+
/** Emitted when OAuth authentication succeeds. */
|
|
61
|
+
this.success = output();
|
|
62
|
+
/** Whether to show the introductory info panel. */
|
|
63
|
+
this.showInfo = input(true, /* @ts-ignore */
|
|
64
|
+
...(ngDevMode ? [{ debugName: "showInfo" }] : /* istanbul ignore next */ []));
|
|
65
|
+
/** Application name displayed in the info panel. */
|
|
66
|
+
this.applicationName = input(/* @ts-ignore */
|
|
67
|
+
...(ngDevMode ? [undefined, { debugName: "applicationName" }] : /* istanbul ignore next */ []));
|
|
68
|
+
/** Whether to trigger `initialize()` automatically on mount. */
|
|
69
|
+
this.autoInitialize = input(false, /* @ts-ignore */
|
|
70
|
+
...(ngDevMode ? [{ debugName: "autoInitialize" }] : /* istanbul ignore next */ []));
|
|
71
|
+
/** Whether the Microsoft login button is shown. */
|
|
72
|
+
this.allowMicrosoft = input(true, /* @ts-ignore */
|
|
73
|
+
...(ngDevMode ? [{ debugName: "allowMicrosoft" }] : /* istanbul ignore next */ []));
|
|
74
|
+
/** Whether the Google login button is shown. */
|
|
75
|
+
this.allowGoogle = input(true, /* @ts-ignore */
|
|
76
|
+
...(ngDevMode ? [{ debugName: "allowGoogle" }] : /* istanbul ignore next */ []));
|
|
77
|
+
this.oauthReady = signal(false, /* @ts-ignore */
|
|
78
|
+
...(ngDevMode ? [{ debugName: "oauthReady" }] : /* istanbul ignore next */ []));
|
|
79
|
+
this.oauthMicrosoftReady = signal(false, /* @ts-ignore */
|
|
80
|
+
...(ngDevMode ? [{ debugName: "oauthMicrosoftReady" }] : /* istanbul ignore next */ []));
|
|
81
|
+
this.oauthGoogleReady = signal(false, /* @ts-ignore */
|
|
82
|
+
...(ngDevMode ? [{ debugName: "oauthGoogleReady" }] : /* istanbul ignore next */ []));
|
|
83
|
+
this.msalBroadcastService.msalSubject$
|
|
84
|
+
.pipe(filter((msg) => msg.eventType === EventType.LOGOUT_FAILURE ||
|
|
85
|
+
msg.eventType === EventType.ACQUIRE_TOKEN_FAILURE), takeUntilDestroyed(this.destroyRef))
|
|
86
|
+
.subscribe((r) => {
|
|
87
|
+
if (r?.payload) {
|
|
88
|
+
const error = r.payload;
|
|
89
|
+
this.dialogService.error(error?.message ?? 'Errore di autenticazione Microsoft');
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
afterNextRender(() => {
|
|
93
|
+
if (this.autoInitialize()) {
|
|
94
|
+
this.initialize();
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Initialize OAuth providers (Microsoft MSAL and Google GSI).
|
|
100
|
+
* Safe to call multiple times — already-initialized providers are skipped.
|
|
101
|
+
* Must be public so the host component can trigger it manually when `autoInitialize` is false.
|
|
102
|
+
*/
|
|
103
|
+
initialize() {
|
|
104
|
+
if (this.oauthMicrosoftReady() && this.oauthGoogleReady()) {
|
|
105
|
+
return; // Both already loaded
|
|
106
|
+
}
|
|
107
|
+
this.oauthReady.set(true);
|
|
108
|
+
// Load MS stack only if not already initialized
|
|
109
|
+
if (!this.oauthMicrosoftReady()) {
|
|
110
|
+
this.msaLService.initialize()
|
|
111
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
112
|
+
.subscribe(() => {
|
|
113
|
+
this.oauthMicrosoftReady.set(true);
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
// Load Google script only if not already initialized
|
|
117
|
+
if (!this.oauthGoogleReady()) {
|
|
118
|
+
const DSLScript = document.createElement('script');
|
|
119
|
+
DSLScript.src = 'https://accounts.google.com/gsi/client';
|
|
120
|
+
DSLScript.type = 'text/javascript';
|
|
121
|
+
document.body.appendChild(DSLScript);
|
|
122
|
+
document.body.removeChild(DSLScript);
|
|
123
|
+
// @ts-ignore
|
|
124
|
+
window.onGoogleLibraryLoad = () => {
|
|
125
|
+
// initialize google account
|
|
126
|
+
// @ts-ignore
|
|
127
|
+
google.accounts.id.initialize({
|
|
128
|
+
client_id: '71204983077-ag31h3bgt2udcbfr9nn84r9rni2k3snp.apps.googleusercontent.com',
|
|
129
|
+
cancel_on_tap_outside: true,
|
|
130
|
+
auto_select: false,
|
|
131
|
+
callback: (r) => {
|
|
132
|
+
this.ngZone.run(() => {
|
|
133
|
+
this.success.emit({ type: 2, token: r.credential });
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
googleButtonWrapper = createFakeGoogleWrapper();
|
|
138
|
+
this.oauthGoogleReady.set(true);
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Trigger a Microsoft (MSAL) login popup and acquire an access token on success.
|
|
144
|
+
*/
|
|
145
|
+
loginMSAL() {
|
|
146
|
+
// Clear any in-progress interaction flag that may have been left by a previous incomplete popup
|
|
147
|
+
sessionStorage.removeItem('msal.interaction.status');
|
|
148
|
+
this.msaLService.loginPopup()
|
|
149
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
150
|
+
.subscribe({
|
|
151
|
+
next: (r) => {
|
|
152
|
+
try {
|
|
153
|
+
this.msaLService.instance.setActiveAccount(r.account);
|
|
154
|
+
this.msaLService.acquireTokenSilent({
|
|
155
|
+
scopes: [
|
|
156
|
+
"api://6b2c080f-6ab0-4511-a9df-0bce69db5833/AngularSPAAuthScope"
|
|
157
|
+
],
|
|
158
|
+
account: r.account
|
|
159
|
+
}).pipe(takeUntilDestroyed(this.destroyRef)).subscribe({
|
|
160
|
+
next: (tokenResult) => {
|
|
161
|
+
console.log("Token acquired!");
|
|
162
|
+
this.success.emit({ type: 1, token: tokenResult.accessToken });
|
|
163
|
+
},
|
|
164
|
+
error: (error) => {
|
|
165
|
+
this.dialogService.error(error.message);
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
catch (error) {
|
|
170
|
+
this.dialogService.error(error.message);
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
error: (error) => {
|
|
174
|
+
this.dialogService.error(error.message);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Trigger the hidden Google GSI button to open the Google sign-in flow.
|
|
180
|
+
*/
|
|
181
|
+
loginGoogle() {
|
|
182
|
+
// Use wrapper click to prevent Illegal invocation exception
|
|
183
|
+
googleButtonWrapper.click();
|
|
184
|
+
}
|
|
185
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: LoginOAuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
186
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.1", type: LoginOAuthComponent, isStandalone: true, selector: "login-oauth", inputs: { showInfo: { classPropertyName: "showInfo", publicName: "showInfo", isSignal: true, isRequired: false, transformFunction: null }, applicationName: { classPropertyName: "applicationName", publicName: "applicationName", isSignal: true, isRequired: false, transformFunction: null }, autoInitialize: { classPropertyName: "autoInitialize", publicName: "autoInitialize", isSignal: true, isRequired: false, transformFunction: null }, allowMicrosoft: { classPropertyName: "allowMicrosoft", publicName: "allowMicrosoft", isSignal: true, isRequired: false, transformFunction: null }, allowGoogle: { classPropertyName: "allowGoogle", publicName: "allowGoogle", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { success: "success" }, providers: [
|
|
187
|
+
{
|
|
188
|
+
provide: MSAL_INSTANCE,
|
|
189
|
+
deps: [EnvironmentService],
|
|
190
|
+
useFactory: MSALInstanceFactory
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
provide: MSAL_GUARD_CONFIG,
|
|
194
|
+
useFactory: MSALGuardConfigFactory
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
provide: MSAL_INTERCEPTOR_CONFIG,
|
|
198
|
+
deps: [EnvironmentService],
|
|
199
|
+
useFactory: MSALInterceptorConfigFactory
|
|
200
|
+
},
|
|
201
|
+
MsalService,
|
|
202
|
+
MsalBroadcastService
|
|
203
|
+
], ngImport: i0, template: "<div class=\"login-oauth\">\r\n @if(showInfo()) {\r\n <div class=\"message\">\r\n <p>Questa sezione consente di accedere al servizio utilizzando un provider OAuth2.</p>\r\n @if(applicationName()) {\r\n <p>La email utilizzata deve essere collegata ad un utente valido di {{applicationName()}} e dei servizi ad esso\r\n connessi.</p>\r\n }\r\n </div>\r\n }\r\n @if (allowMicrosoft()) {\r\n <div class=\"button\">\r\n <button mat-flat-button (click)=\"loginMSAL()\" aria-label=\"Effettua accesso\"\r\n [disabled]=\"!oauthMicrosoftReady()\" style=\"width: 100%;\">\r\n Accedi con Microsoft</button>\r\n </div>\r\n }\r\n @if (allowGoogle()) {\r\n <div class=\"button\">\r\n <button mat-flat-button (click)=\"loginGoogle()\" style=\"width: 100%;\"\r\n aria-label=\"Effettua accesso\" [disabled]=\"!oauthGoogleReady()\">\r\n Accedi con Google</button>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".login-oauth{text-align:center}.login-oauth .button{padding:10px 0;width:100%}.login-oauth .message{padding:0 0 10px!important;font-size:small}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
204
|
+
}
|
|
205
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: LoginOAuthComponent, decorators: [{
|
|
206
|
+
type: Component,
|
|
207
|
+
args: [{ selector: 'login-oauth', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
208
|
+
{
|
|
209
|
+
provide: MSAL_INSTANCE,
|
|
210
|
+
deps: [EnvironmentService],
|
|
211
|
+
useFactory: MSALInstanceFactory
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
provide: MSAL_GUARD_CONFIG,
|
|
215
|
+
useFactory: MSALGuardConfigFactory
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
provide: MSAL_INTERCEPTOR_CONFIG,
|
|
219
|
+
deps: [EnvironmentService],
|
|
220
|
+
useFactory: MSALInterceptorConfigFactory
|
|
221
|
+
},
|
|
222
|
+
MsalService,
|
|
223
|
+
MsalBroadcastService
|
|
224
|
+
], imports: [
|
|
225
|
+
MatButtonModule
|
|
226
|
+
], template: "<div class=\"login-oauth\">\r\n @if(showInfo()) {\r\n <div class=\"message\">\r\n <p>Questa sezione consente di accedere al servizio utilizzando un provider OAuth2.</p>\r\n @if(applicationName()) {\r\n <p>La email utilizzata deve essere collegata ad un utente valido di {{applicationName()}} e dei servizi ad esso\r\n connessi.</p>\r\n }\r\n </div>\r\n }\r\n @if (allowMicrosoft()) {\r\n <div class=\"button\">\r\n <button mat-flat-button (click)=\"loginMSAL()\" aria-label=\"Effettua accesso\"\r\n [disabled]=\"!oauthMicrosoftReady()\" style=\"width: 100%;\">\r\n Accedi con Microsoft</button>\r\n </div>\r\n }\r\n @if (allowGoogle()) {\r\n <div class=\"button\">\r\n <button mat-flat-button (click)=\"loginGoogle()\" style=\"width: 100%;\"\r\n aria-label=\"Effettua accesso\" [disabled]=\"!oauthGoogleReady()\">\r\n Accedi con Google</button>\r\n </div>\r\n }\r\n</div>\r\n", styles: [".login-oauth{text-align:center}.login-oauth .button{padding:10px 0;width:100%}.login-oauth .message{padding:0 0 10px!important;font-size:small}\n"] }]
|
|
227
|
+
}], ctorParameters: () => [], propDecorators: { success: [{ type: i0.Output, args: ["success"] }], showInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "showInfo", required: false }] }], applicationName: [{ type: i0.Input, args: [{ isSignal: true, alias: "applicationName", required: false }] }], autoInitialize: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoInitialize", required: false }] }], allowMicrosoft: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowMicrosoft", required: false }] }], allowGoogle: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowGoogle", required: false }] }] } });
|
|
228
|
+
const createFakeGoogleWrapper = () => {
|
|
229
|
+
const googleLoginWrapper = document.createElement("div");
|
|
230
|
+
// Or you can simple hide it in CSS rule for custom-google-button
|
|
231
|
+
googleLoginWrapper.style.display = "none";
|
|
232
|
+
googleLoginWrapper.classList.add("custom-google-button");
|
|
233
|
+
// Add the wrapper to body
|
|
234
|
+
document.body.appendChild(googleLoginWrapper);
|
|
235
|
+
// Use GSI javascript api to render the button inside our wrapper
|
|
236
|
+
// You can ignore the properties because this button will not appear
|
|
237
|
+
// @ts-ignore
|
|
238
|
+
window.google.accounts.id.renderButton(googleLoginWrapper, {
|
|
239
|
+
type: "icon",
|
|
240
|
+
width: "200",
|
|
241
|
+
});
|
|
242
|
+
const googleLoginWrapperButton = googleLoginWrapper.querySelector("div[role=button]");
|
|
243
|
+
return {
|
|
244
|
+
click: () => {
|
|
245
|
+
// @ts-ignore
|
|
246
|
+
googleLoginWrapperButton.click();
|
|
247
|
+
},
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
var googleButtonWrapper;
|
|
251
|
+
|
|
252
|
+
class LoginOAuthOkMSComponent {
|
|
253
|
+
constructor() {
|
|
254
|
+
/** Message displayed while the popup is completing authentication. */
|
|
255
|
+
this.message = input('Accesso in corso...', /* @ts-ignore */
|
|
256
|
+
...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
|
|
257
|
+
// MSAL v5 popup flow: parse the auth response from the URL and send
|
|
258
|
+
// it back to the opener window via BroadcastChannel, then close the popup.
|
|
259
|
+
broadcastResponseToMainFrame();
|
|
260
|
+
}
|
|
261
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: LoginOAuthOkMSComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
262
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "22.0.1", type: LoginOAuthOkMSComponent, isStandalone: true, selector: "app-login-oauth-ok-ms", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFill>\r\n <div class=\"login-auto fade-in\">\r\n <div class=\"message\">\r\n Autenticazione in corso...\r\n </div>\r\n <mat-progress-bar mode=\"indeterminate\" color=\"primary\"></mat-progress-bar>\r\n </div>\r\n</div>\r\n", styles: [".login-auto{padding:20px 0}.login-auto .message{font-size:large;font-weight:700;color:var(--ars-color-primary);max-width:300px;text-align:center;width:100%;padding:40px 0}\n"], dependencies: [{ kind: "ngmodule", type: FlexModule }, { kind: "directive", type: i1$1.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i1$1.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i1$1.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "ngmodule", type: MatProgressBarModule }, { kind: "component", type: i2.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
263
|
+
}
|
|
264
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImport: i0, type: LoginOAuthOkMSComponent, decorators: [{
|
|
265
|
+
type: Component,
|
|
266
|
+
args: [{ selector: 'app-login-oauth-ok-ms', changeDetection: ChangeDetectionStrategy.OnPush, imports: [FlexModule, MatProgressBarModule], template: "<div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFill>\r\n <div class=\"login-auto fade-in\">\r\n <div class=\"message\">\r\n Autenticazione in corso...\r\n </div>\r\n <mat-progress-bar mode=\"indeterminate\" color=\"primary\"></mat-progress-bar>\r\n </div>\r\n</div>\r\n", styles: [".login-auto{padding:20px 0}.login-auto .message{font-size:large;font-weight:700;color:var(--ars-color-primary);max-width:300px;text-align:center;width:100%;padding:40px 0}\n"] }]
|
|
267
|
+
}], ctorParameters: () => [], propDecorators: { message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }] } });
|
|
268
|
+
|
|
269
|
+
/*
|
|
270
|
+
* Public API Surface of scm-utils
|
|
271
|
+
*/
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* Generated bundle index. Do not edit.
|
|
275
|
+
*/
|
|
276
|
+
|
|
277
|
+
export { LoginOAuthComponent, LoginOAuthOkMSComponent, LoginOAuthType, MSALGuardConfigFactory, MSALInstanceFactory, MSALInterceptorConfigFactory };
|
|
278
|
+
//# sourceMappingURL=abv-scm-utils-ui.oauth.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abv-scm-utils-ui.oauth.mjs","sources":["../../../projects/scm-utils/ui.oauth/ui/definitions.ts","../../../projects/scm-utils/ui.oauth/ui/components/login/login-oauth.component.ts","../../../projects/scm-utils/ui.oauth/ui/components/login/login-oauth.component.html","../../../projects/scm-utils/ui.oauth/ui/components/login-ok/ms/login-oauth-ok-ms.component.ts","../../../projects/scm-utils/ui.oauth/ui/components/login-ok/ms/login-oauth-ok-ms.component.html","../../../projects/scm-utils/ui.oauth/public_api.ts","../../../projects/scm-utils/ui.oauth/abv-scm-utils-ui.oauth.ts"],"sourcesContent":["export enum LoginOAuthType {\r\n None = 0,\r\n Microsoft = 1,\r\n Google = 2\r\n}\r\n\r\nexport interface LoginOAuthResult {\r\n type: LoginOAuthType,\r\n token: string\r\n}","import { ChangeDetectionStrategy, Component, DestroyRef, NgZone, afterNextRender, inject, input, output, signal } from '@angular/core';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { MatButtonModule } from '@angular/material/button';\r\nimport { EnvironmentService } from '@abv/scm-utils/core';\r\nimport { DialogService } from '@abv/scm-utils/ui';\r\nimport { MSAL_GUARD_CONFIG, MSAL_INSTANCE, MSAL_INTERCEPTOR_CONFIG, MsalBroadcastService, MsalGuardConfiguration, MsalInterceptorConfiguration, MsalService } from '@azure/msal-angular';\r\nimport { AuthenticationResult, BrowserCacheLocation, EventMessage, EventType, IPublicClientApplication, InteractionType, PublicClientApplication } from '@azure/msal-browser';\r\nimport { filter } from 'rxjs';\r\nimport { LoginOAuthResult } from '../../definitions';\r\n\r\nexport function MSALInstanceFactory(environment: EnvironmentService): IPublicClientApplication {\r\n return new PublicClientApplication({\r\n auth: {\r\n clientId: \"6b2c080f-6ab0-4511-a9df-0bce69db5833\",\r\n authority: \"https://login.microsoftonline.com/common\",\r\n redirectUri: environment.appLoginRedirectUri,\r\n },\r\n cache: {\r\n cacheLocation: BrowserCacheLocation.LocalStorage\r\n }\r\n });\r\n}\r\n\r\nexport function MSALInterceptorConfigFactory(environment: EnvironmentService): MsalInterceptorConfiguration {\r\n\r\n return {\r\n interactionType: InteractionType.Popup,\r\n protectedResourceMap: new Map([\r\n [environment.appServiceLoginUri, [\"api://6b2c080f-6ab0-4511-a9df-0bce69db5833/AngularSPAAuthScope\"]],\r\n [\"https://graph.microsoft.com/v2.0/me\", [\"user.read\"]],\r\n ])\r\n };\r\n}\r\n\r\nexport function MSALGuardConfigFactory(): MsalGuardConfiguration {\r\n return {\r\n interactionType: InteractionType.Popup,\r\n authRequest: {\r\n scopes: [\"user.read\"]\r\n }\r\n };\r\n}\r\n\r\n@Component({\r\n selector: 'login-oauth',\r\n templateUrl: './login-oauth.component.html',\r\n styleUrls: ['./login-oauth.component.scss'],\r\n standalone: true,\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n providers: [\r\n {\r\n provide: MSAL_INSTANCE,\r\n deps: [EnvironmentService],\r\n useFactory: MSALInstanceFactory\r\n },\r\n {\r\n provide: MSAL_GUARD_CONFIG,\r\n useFactory: MSALGuardConfigFactory\r\n },\r\n {\r\n provide: MSAL_INTERCEPTOR_CONFIG,\r\n deps: [EnvironmentService],\r\n useFactory: MSALInterceptorConfigFactory\r\n },\r\n MsalService,\r\n MsalBroadcastService],\r\n imports: [\r\n MatButtonModule\r\n ]\r\n})\r\nexport class LoginOAuthComponent {\r\n private readonly destroyRef = inject(DestroyRef);\r\n private readonly msalBroadcastService = inject(MsalBroadcastService);\r\n private readonly msaLService = inject(MsalService);\r\n private readonly dialogService = inject(DialogService);\r\n private readonly ngZone = inject(NgZone);\r\n /** Emitted when OAuth authentication succeeds. */\r\n readonly success = output<LoginOAuthResult>();\r\n /** Whether to show the introductory info panel. */\r\n readonly showInfo = input<boolean>(true);\r\n /** Application name displayed in the info panel. */\r\n readonly applicationName = input<string>();\r\n /** Whether to trigger `initialize()` automatically on mount. */\r\n readonly autoInitialize = input<boolean>(false);\r\n /** Whether the Microsoft login button is shown. */\r\n readonly allowMicrosoft = input<boolean>(true);\r\n /** Whether the Google login button is shown. */\r\n readonly allowGoogle = input<boolean>(true);\r\n protected readonly oauthReady = signal<boolean>(false);\r\n protected readonly oauthMicrosoftReady = signal<boolean>(false);\r\n protected readonly oauthGoogleReady = signal<boolean>(false);\r\n\r\n constructor() {\r\n\r\n this.msalBroadcastService.msalSubject$\r\n .pipe(\r\n filter((msg: EventMessage) =>\r\n msg.eventType === EventType.LOGOUT_FAILURE ||\r\n msg.eventType === EventType.ACQUIRE_TOKEN_FAILURE),\r\n takeUntilDestroyed(this.destroyRef),\r\n )\r\n .subscribe((r: EventMessage) => {\r\n if (r?.payload) {\r\n const error = r.payload as any;\r\n this.dialogService.error(error?.message ?? 'Errore di autenticazione Microsoft');\r\n }\r\n });\r\n\r\n afterNextRender(() => {\r\n if (this.autoInitialize()) {\r\n this.initialize();\r\n }\r\n });\r\n\r\n }\r\n\r\n /**\r\n * Initialize OAuth providers (Microsoft MSAL and Google GSI).\r\n * Safe to call multiple times — already-initialized providers are skipped.\r\n * Must be public so the host component can trigger it manually when `autoInitialize` is false.\r\n */\r\n initialize() {\r\n if (this.oauthMicrosoftReady() && this.oauthGoogleReady()) {\r\n return; // Both already loaded\r\n }\r\n this.oauthReady.set(true);\r\n\r\n // Load MS stack only if not already initialized\r\n if (!this.oauthMicrosoftReady()) {\r\n this.msaLService.initialize()\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe(() => {\r\n this.oauthMicrosoftReady.set(true);\r\n });\r\n }\r\n\r\n // Load Google script only if not already initialized\r\n if (!this.oauthGoogleReady()) {\r\n const DSLScript = document.createElement('script');\r\n DSLScript.src = 'https://accounts.google.com/gsi/client';\r\n DSLScript.type = 'text/javascript';\r\n document.body.appendChild(DSLScript);\r\n document.body.removeChild(DSLScript);\r\n\r\n // @ts-ignore\r\n window.onGoogleLibraryLoad = () => {\r\n // initialize google account\r\n // @ts-ignore\r\n google.accounts.id.initialize({\r\n client_id: '71204983077-ag31h3bgt2udcbfr9nn84r9rni2k3snp.apps.googleusercontent.com',\r\n cancel_on_tap_outside: true,\r\n auto_select: false,\r\n callback: (r: any) => {\r\n this.ngZone.run(() => {\r\n this.success.emit({ type: 2, token: r.credential });\r\n });\r\n }\r\n });\r\n\r\n googleButtonWrapper = createFakeGoogleWrapper();\r\n\r\n this.oauthGoogleReady.set(true);\r\n };\r\n }\r\n }\r\n\r\n /**\r\n * Trigger a Microsoft (MSAL) login popup and acquire an access token on success.\r\n */\r\n protected loginMSAL() {\r\n // Clear any in-progress interaction flag that may have been left by a previous incomplete popup\r\n sessionStorage.removeItem('msal.interaction.status');\r\n\r\n this.msaLService.loginPopup()\r\n .pipe(takeUntilDestroyed(this.destroyRef))\r\n .subscribe({\r\n next: (r: AuthenticationResult) => {\r\n try {\r\n this.msaLService.instance.setActiveAccount(r.account);\r\n this.msaLService.acquireTokenSilent({\r\n scopes: [\r\n \"api://6b2c080f-6ab0-4511-a9df-0bce69db5833/AngularSPAAuthScope\"\r\n ],\r\n account: r.account\r\n }).pipe(takeUntilDestroyed(this.destroyRef)).subscribe({\r\n next: (tokenResult: AuthenticationResult) => {\r\n console.log(\"Token acquired!\");\r\n this.success.emit({ type: 1, token: tokenResult.accessToken });\r\n },\r\n error: (error: any) => {\r\n this.dialogService.error(error.message);\r\n }\r\n });\r\n } catch (error: any) {\r\n this.dialogService.error(error.message);\r\n }\r\n },\r\n error: (error: any) => {\r\n this.dialogService.error(error.message);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Trigger the hidden Google GSI button to open the Google sign-in flow.\r\n */\r\n protected loginGoogle() {\r\n // Use wrapper click to prevent Illegal invocation exception\r\n googleButtonWrapper.click();\r\n }\r\n}\r\n\r\nconst createFakeGoogleWrapper = () => {\r\n const googleLoginWrapper = document.createElement(\"div\");\r\n // Or you can simple hide it in CSS rule for custom-google-button\r\n googleLoginWrapper.style.display = \"none\";\r\n googleLoginWrapper.classList.add(\"custom-google-button\");\r\n\r\n // Add the wrapper to body\r\n document.body.appendChild(googleLoginWrapper);\r\n\r\n // Use GSI javascript api to render the button inside our wrapper\r\n // You can ignore the properties because this button will not appear\r\n // @ts-ignore\r\n window.google.accounts.id.renderButton(googleLoginWrapper, {\r\n type: \"icon\",\r\n width: \"200\",\r\n });\r\n\r\n const googleLoginWrapperButton =\r\n googleLoginWrapper.querySelector(\"div[role=button]\");\r\n\r\n return {\r\n click: () => {\r\n // @ts-ignore\r\n googleLoginWrapperButton.click();\r\n },\r\n };\r\n};\r\nvar googleButtonWrapper: any;\r\n\r\n","<div class=\"login-oauth\">\r\n @if(showInfo()) {\r\n <div class=\"message\">\r\n <p>Questa sezione consente di accedere al servizio utilizzando un provider OAuth2.</p>\r\n @if(applicationName()) {\r\n <p>La email utilizzata deve essere collegata ad un utente valido di {{applicationName()}} e dei servizi ad esso\r\n connessi.</p>\r\n }\r\n </div>\r\n }\r\n @if (allowMicrosoft()) {\r\n <div class=\"button\">\r\n <button mat-flat-button (click)=\"loginMSAL()\" aria-label=\"Effettua accesso\"\r\n [disabled]=\"!oauthMicrosoftReady()\" style=\"width: 100%;\">\r\n Accedi con Microsoft</button>\r\n </div>\r\n }\r\n @if (allowGoogle()) {\r\n <div class=\"button\">\r\n <button mat-flat-button (click)=\"loginGoogle()\" style=\"width: 100%;\"\r\n aria-label=\"Effettua accesso\" [disabled]=\"!oauthGoogleReady()\">\r\n Accedi con Google</button>\r\n </div>\r\n }\r\n</div>\r\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\r\nimport { broadcastResponseToMainFrame } from '@azure/msal-browser/redirect-bridge';\r\nimport { FlexModule } from '@ngbracket/ngx-layout/flex';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\n\r\n\r\n@Component({\r\n selector: 'app-login-oauth-ok-ms',\r\n styleUrls: ['./login-oauth-ok-ms.component.scss'],\r\n templateUrl: './login-oauth-ok-ms.component.html',\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n imports: [FlexModule, MatProgressBarModule]\r\n})\r\nexport class LoginOAuthOkMSComponent {\r\n\r\n /** Message displayed while the popup is completing authentication. */\r\n readonly message = input<string>('Accesso in corso...');\r\n\r\n constructor() {\r\n // MSAL v5 popup flow: parse the auth response from the URL and send\r\n // it back to the opener window via BroadcastChannel, then close the popup.\r\n broadcastResponseToMainFrame();\r\n }\r\n}\r\n","<div fxLayout=\"column\" fxLayoutAlign=\"center center\" fxFill>\r\n <div class=\"login-auto fade-in\">\r\n <div class=\"message\">\r\n Autenticazione in corso...\r\n </div>\r\n <mat-progress-bar mode=\"indeterminate\" color=\"primary\"></mat-progress-bar>\r\n </div>\r\n</div>\r\n","/*\r\n * Public API Surface of scm-utils\r\n */\r\nexport * from './ui/definitions';\r\nexport * from './ui/components/index';\r\n\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;IAAY;AAAZ,CAAA,UAAY,cAAc,EAAA;AACxB,IAAA,cAAA,CAAA,cAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAQ;AACR,IAAA,cAAA,CAAA,cAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAa;AACb,IAAA,cAAA,CAAA,cAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAU;AACZ,CAAC,EAJW,cAAc,KAAd,cAAc,GAAA,EAAA,CAAA,CAAA;;ACUpB,SAAU,mBAAmB,CAAC,WAA+B,EAAA;IACjE,OAAO,IAAI,uBAAuB,CAAC;AACjC,QAAA,IAAI,EAAE;AACJ,YAAA,QAAQ,EAAE,sCAAsC;AAChD,YAAA,S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EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,cAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,OAAA,EAAA,aAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,cAAA,CAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAEjC,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAPnC,SAAS;+BACI,uBAAuB,EAAA,eAAA,EAGhB,uBAAuB,CAAC,MAAM,WACtC,CAAC,UAAU,EAAE,oBAAoB,CAAC,EAAA,QAAA,EAAA,2SAAA,EAAA,MAAA,EAAA,CAAA,+KAAA,CAAA,EAAA;;;AEX/C;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from '@abv/scm-utils/core';
|
|
2
|
+
export * from '@abv/scm-utils/ui';
|
|
3
|
+
export * from '@abv/scm-utils/ui.application';
|
|
4
|
+
export * from '@abv/scm-utils/tinymce';
|
|
5
|
+
|
|
6
|
+
/*
|
|
7
|
+
* Public API Surface of scm-utils
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Generated bundle index. Do not edit.
|
|
12
|
+
*/
|
|
13
|
+
//# sourceMappingURL=abv-scm-utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abv-scm-utils.mjs","sources":["../../../projects/scm-utils/public_api.ts","../../../projects/scm-utils/abv-scm-utils.ts"],"sourcesContent":["/*\r\n * Public API Surface of scm-utils\r\n */\r\nexport * from '@abv/scm-utils/core';\r\nexport * from '@abv/scm-utils/ui';\r\nexport * from '@abv/scm-utils/ui.application';\r\nexport * from '@abv/scm-utils/tinymce';\r\n\r\n\r\n\r\n\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAAA;;AAEG;;ACFH;;AAEG"}
|