@arsedizioni/ars-utils 21.2.108 → 21.2.110

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 (27) hide show
  1. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs +27 -27
  2. package/fesm2022/arsedizioni-ars-utils-clipper.common.mjs.map +1 -1
  3. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs +112 -112
  4. package/fesm2022/arsedizioni-ars-utils-clipper.ui.mjs.map +1 -1
  5. package/fesm2022/arsedizioni-ars-utils-core.mjs +119 -119
  6. package/fesm2022/arsedizioni-ars-utils-core.mjs.map +1 -1
  7. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs +12 -12
  8. package/fesm2022/arsedizioni-ars-utils-evolution.common.mjs.map +1 -1
  9. package/fesm2022/arsedizioni-ars-utils-help.mjs +17 -17
  10. package/fesm2022/arsedizioni-ars-utils-help.mjs.map +1 -1
  11. package/fesm2022/arsedizioni-ars-utils-support.common.mjs +8 -8
  12. package/fesm2022/arsedizioni-ars-utils-support.common.mjs.map +1 -1
  13. package/fesm2022/arsedizioni-ars-utils-support.ui.mjs +8 -8
  14. package/fesm2022/arsedizioni-ars-utils-support.ui.mjs.map +1 -1
  15. package/fesm2022/arsedizioni-ars-utils-tinymce.mjs +8 -8
  16. package/fesm2022/arsedizioni-ars-utils-tinymce.mjs.map +1 -1
  17. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs +140 -140
  18. package/fesm2022/arsedizioni-ars-utils-ui.application.mjs.map +1 -1
  19. package/fesm2022/arsedizioni-ars-utils-ui.mjs +613 -599
  20. package/fesm2022/arsedizioni-ars-utils-ui.mjs.map +1 -1
  21. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs +15 -15
  22. package/fesm2022/arsedizioni-ars-utils-ui.oauth.mjs.map +1 -1
  23. package/package.json +1 -1
  24. package/types/arsedizioni-ars-utils-clipper.common.d.ts +3 -3
  25. package/types/arsedizioni-ars-utils-clipper.ui.d.ts +1 -1
  26. package/types/arsedizioni-ars-utils-ui.application.d.ts +1 -1
  27. package/types/arsedizioni-ars-utils-ui.d.ts +1 -1
@@ -18,11 +18,11 @@ var LoginOAuthType;
18
18
 
19
19
  // Material
20
20
  class ArsUIOAuthModule {
21
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ArsUIOAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
22
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.0", ngImport: i0, type: ArsUIOAuthModule }); }
23
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ArsUIOAuthModule }); }
21
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ArsUIOAuthModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
22
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.4", ngImport: i0, type: ArsUIOAuthModule }); }
23
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ArsUIOAuthModule }); }
24
24
  }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ArsUIOAuthModule, decorators: [{
25
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: ArsUIOAuthModule, decorators: [{
26
26
  type: NgModule
27
27
  }] });
28
28
 
@@ -63,14 +63,14 @@ class LoginOAuthComponent {
63
63
  this.dialogService = inject(DialogService);
64
64
  this.ngZone = inject(NgZone);
65
65
  this.success = output();
66
- this.showInfo = input(true, ...(ngDevMode ? [{ debugName: "showInfo" }] : []));
67
- this.applicationName = input(...(ngDevMode ? [undefined, { debugName: "applicationName" }] : []));
68
- this.autoInitialize = input(false, ...(ngDevMode ? [{ debugName: "autoInitialize" }] : []));
69
- this.allowMicrosoft = input(true, ...(ngDevMode ? [{ debugName: "allowMicrosoft" }] : []));
70
- this.allowGoogle = input(true, ...(ngDevMode ? [{ debugName: "allowGoogle" }] : []));
71
- this.oauthReady = signal(false, ...(ngDevMode ? [{ debugName: "oauthReady" }] : []));
72
- this.oauthMicrosoftReady = signal(false, ...(ngDevMode ? [{ debugName: "oauthMicrosoftReady" }] : []));
73
- this.oauthGoogleReady = signal(false, ...(ngDevMode ? [{ debugName: "oauthGoogleReady" }] : []));
66
+ this.showInfo = input(true, ...(ngDevMode ? [{ debugName: "showInfo" }] : /* istanbul ignore next */ []));
67
+ this.applicationName = input(...(ngDevMode ? [undefined, { debugName: "applicationName" }] : /* istanbul ignore next */ []));
68
+ this.autoInitialize = input(false, ...(ngDevMode ? [{ debugName: "autoInitialize" }] : /* istanbul ignore next */ []));
69
+ this.allowMicrosoft = input(true, ...(ngDevMode ? [{ debugName: "allowMicrosoft" }] : /* istanbul ignore next */ []));
70
+ this.allowGoogle = input(true, ...(ngDevMode ? [{ debugName: "allowGoogle" }] : /* istanbul ignore next */ []));
71
+ this.oauthReady = signal(false, ...(ngDevMode ? [{ debugName: "oauthReady" }] : /* istanbul ignore next */ []));
72
+ this.oauthMicrosoftReady = signal(false, ...(ngDevMode ? [{ debugName: "oauthMicrosoftReady" }] : /* istanbul ignore next */ []));
73
+ this.oauthGoogleReady = signal(false, ...(ngDevMode ? [{ debugName: "oauthGoogleReady" }] : /* istanbul ignore next */ []));
74
74
  }
75
75
  ngOnInit() {
76
76
  if (this.autoInitialize()) {
@@ -165,8 +165,8 @@ class LoginOAuthComponent {
165
165
  // Use wrapper click to prevent Illegal invocation exception
166
166
  googleButtonWrapper.click();
167
167
  }
168
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: LoginOAuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
169
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", 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: [
168
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: LoginOAuthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
169
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.4", 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: [
170
170
  {
171
171
  provide: MSAL_INSTANCE,
172
172
  deps: [EnvironmentService],
@@ -185,7 +185,7 @@ class LoginOAuthComponent {
185
185
  MsalBroadcastService
186
186
  ], 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()\" [attr.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 [attr.aria-label]=\"'Effettua accesso'\" [disabled]=\"!oauthGoogleReady()\">\r\n Accedi con Google</button>\r\n </div>\r\n }\r\n</div>", 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 }); }
187
187
  }
188
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: LoginOAuthComponent, decorators: [{
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: LoginOAuthComponent, decorators: [{
189
189
  type: Component,
190
190
  args: [{ selector: 'login-oauth', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
191
191
  {
@@ -1 +1 @@
1
- {"version":3,"file":"arsedizioni-ars-utils-ui.oauth.mjs","sources":["../../../projects/ars-utils/ui.oauth/ui/definitions.ts","../../../projects/ars-utils/ui.oauth/ui/ui.module.ts","../../../projects/ars-utils/ui.oauth/ui/components/login/login-oauth.component.ts","../../../projects/ars-utils/ui.oauth/ui/components/login/login-oauth.component.html","../../../projects/ars-utils/ui.oauth/public_api.ts","../../../projects/ars-utils/ui.oauth/arsedizioni-ars-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: number,\r\n token: string\r\n}","import { NgModule } from \"@angular/core\";\r\n\r\n// Material\r\n\r\n@NgModule()\r\nexport class ArsUIOAuthModule { }\r\n\r\nexport * from \"./definitions\";\r\n\r\n\r\n","import { ChangeDetectionStrategy, Component, DestroyRef, NgZone, OnInit, 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 '@arsedizioni/ars-utils/core';\r\nimport { DialogService } from '@arsedizioni/ars-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 { catchError, filter, throwError } 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, // This is your redir\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 implements OnInit {\r\n private readonly destroyRef = inject(DestroyRef);\r\n private msalBroadcastService = inject(MsalBroadcastService);\r\n private msaLService = inject(MsalService);\r\n private dialogService = inject(DialogService);\r\n private ngZone = inject(NgZone);\r\n\r\n readonly success = output<LoginOAuthResult>();\r\n\r\n readonly showInfo = input<boolean>(true);\r\n readonly applicationName = input<string>();\r\n readonly autoInitialize = input<boolean>(false);\r\n readonly allowMicrosoft = input<boolean>(true);\r\n readonly allowGoogle = input<boolean>(true);\r\n\r\n\r\n protected oauthReady = signal<boolean>(false);\r\n protected oauthMicrosoftReady = signal<boolean>(false);\r\n protected oauthGoogleReady = signal<boolean>(false);\r\n\r\n\r\n ngOnInit() {\r\n if (this.autoInitialize()) {\r\n this.initialize();\r\n }\r\n this.msalBroadcastService.msalSubject$\r\n .pipe(\r\n filter((msg: EventMessage) =>\r\n msg.eventType === EventType.ACQUIRE_TOKEN_SUCCESS ||\r\n msg.eventType === EventType.LOGOUT_SUCCESS),\r\n takeUntilDestroyed(this.destroyRef),\r\n catchError(error => {\r\n this.dialogService.error(error);\r\n return throwError(() => error);\r\n })\r\n )\r\n .subscribe((r: EventMessage) => {\r\n if (r) {\r\n // Casting payload as AuthenticationResult to access account\r\n const payload = r.payload as AuthenticationResult;\r\n this.success.emit({ type: 1, token: payload.accessToken });\r\n }\r\n });\r\n\r\n }\r\n\r\n /**\r\n * Initialize open authentication \r\n * Must be a public method \r\n */\r\n initialize() {\r\n if (this.oauthReady()) {\r\n return; // Already done\r\n }\r\n this.oauthReady.set(true);\r\n\r\n // Load MS stack\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 // Load google maps script after view init\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 * Perform login using MSAL\r\n */\r\n protected loginMSAL() {\r\n this.msaLService.loginPopup()\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 }).subscribe({\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* Perform login using Google\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()\" [attr.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 [attr.aria-label]=\"'Effettua accesso'\" [disabled]=\"!oauthGoogleReady()\">\r\n Accedi con Google</button>\r\n </div>\r\n }\r\n</div>","/*\r\n * Public API Surface of ars-utils\r\n */\r\nexport * from './ui/ui.module';\r\nexport * from './ui/components/login/login-oauth.component';\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;;ACE1B;MAGa,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAhB,gBAAgB,EAAA,CAAA,CAAA;+GAAhB,gBAAgB,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAD5B;;;ACMK,SAAU,mBAAmB,CAAC,WAA+B,EAAA;IACjE,OAAO,IAAI,uBAAuB,CAAC;AACjC,QAAA,IAAI,EAAE;AACJ,YAAA,QAAQ,EAAE,sCAAsC;AAChD,YAAA,SAAS,EAAE,0C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AAkB,CAAC;IAEtD,OAAO;QACL,KAAK,EAAE,MAAK;;YAEV,wBAAwB,CAAC,KAAK,EAAE;QAClC,CAAC;KACF;AACH,CAAC;AACD,IAAI,mBAAwB;;AEnO5B;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"arsedizioni-ars-utils-ui.oauth.mjs","sources":["../../../projects/ars-utils/ui.oauth/ui/definitions.ts","../../../projects/ars-utils/ui.oauth/ui/ui.module.ts","../../../projects/ars-utils/ui.oauth/ui/components/login/login-oauth.component.ts","../../../projects/ars-utils/ui.oauth/ui/components/login/login-oauth.component.html","../../../projects/ars-utils/ui.oauth/public_api.ts","../../../projects/ars-utils/ui.oauth/arsedizioni-ars-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: number,\r\n token: string\r\n}","import { NgModule } from \"@angular/core\";\r\n\r\n// Material\r\n\r\n@NgModule()\r\nexport class ArsUIOAuthModule { }\r\n\r\nexport * from \"./definitions\";\r\n\r\n\r\n","import { ChangeDetectionStrategy, Component, DestroyRef, NgZone, OnInit, 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 '@arsedizioni/ars-utils/core';\r\nimport { DialogService } from '@arsedizioni/ars-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 { catchError, filter, throwError } 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, // This is your redir\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 implements OnInit {\r\n private readonly destroyRef = inject(DestroyRef);\r\n private msalBroadcastService = inject(MsalBroadcastService);\r\n private msaLService = inject(MsalService);\r\n private dialogService = inject(DialogService);\r\n private ngZone = inject(NgZone);\r\n\r\n readonly success = output<LoginOAuthResult>();\r\n\r\n readonly showInfo = input<boolean>(true);\r\n readonly applicationName = input<string>();\r\n readonly autoInitialize = input<boolean>(false);\r\n readonly allowMicrosoft = input<boolean>(true);\r\n readonly allowGoogle = input<boolean>(true);\r\n\r\n\r\n protected oauthReady = signal<boolean>(false);\r\n protected oauthMicrosoftReady = signal<boolean>(false);\r\n protected oauthGoogleReady = signal<boolean>(false);\r\n\r\n\r\n ngOnInit() {\r\n if (this.autoInitialize()) {\r\n this.initialize();\r\n }\r\n this.msalBroadcastService.msalSubject$\r\n .pipe(\r\n filter((msg: EventMessage) =>\r\n msg.eventType === EventType.ACQUIRE_TOKEN_SUCCESS ||\r\n msg.eventType === EventType.LOGOUT_SUCCESS),\r\n takeUntilDestroyed(this.destroyRef),\r\n catchError(error => {\r\n this.dialogService.error(error);\r\n return throwError(() => error);\r\n })\r\n )\r\n .subscribe((r: EventMessage) => {\r\n if (r) {\r\n // Casting payload as AuthenticationResult to access account\r\n const payload = r.payload as AuthenticationResult;\r\n this.success.emit({ type: 1, token: payload.accessToken });\r\n }\r\n });\r\n\r\n }\r\n\r\n /**\r\n * Initialize open authentication \r\n * Must be a public method \r\n */\r\n initialize() {\r\n if (this.oauthReady()) {\r\n return; // Already done\r\n }\r\n this.oauthReady.set(true);\r\n\r\n // Load MS stack\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 // Load google maps script after view init\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 * Perform login using MSAL\r\n */\r\n protected loginMSAL() {\r\n this.msaLService.loginPopup()\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 }).subscribe({\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* Perform login using Google\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()\" [attr.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 [attr.aria-label]=\"'Effettua accesso'\" [disabled]=\"!oauthGoogleReady()\">\r\n Accedi con Google</button>\r\n </div>\r\n }\r\n</div>","/*\r\n * Public API Surface of ars-utils\r\n */\r\nexport * from './ui/ui.module';\r\nexport * from './ui/components/login/login-oauth.component';\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;;ACE1B;MAGa,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAhB,gBAAgB,EAAA,CAAA,CAAA;+GAAhB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AC,kBAAkB,CAAC;;;;IAK7C,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,YAAY,CAAC,kBAAkB,EAAE;AACzD,QAAA,IAAI,EAAE,MAAM;AACZ,QAAA,KAAK,EAAE,KAAK;AACb,KAAA,CAAC;IAEF,MAAM,wBAAwB,GAC5B,kBAAkB,CAAC,aAAa,CAAC,kBAAkB,CAAC;IAEtD,OAAO;QACL,KAAK,EAAE,MAAK;;YAEV,wBAAwB,CAAC,KAAK,EAAE;QAClC,CAAC;KACF;AACH,CAAC;AACD,IAAI,mBAAwB;;AEnO5B;;AAEG;;ACFH;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arsedizioni/ars-utils",
3
- "version": "21.2.108",
3
+ "version": "21.2.110",
4
4
  "author": {
5
5
  "email": "software@arsedizioni.it",
6
6
  "name": "Fabio Buscaroli, Alberto Doria"
@@ -487,9 +487,9 @@ interface ClipperExportDocumentsParams {
487
487
  format?: ClipperExportDocumentsFormat;
488
488
  }
489
489
  interface ClipperSendDocumentsByEmailParams extends SendToDialogResult {
490
- ids: string[];
491
- public: string;
492
- isCalendar: boolean;
490
+ ids?: string[];
491
+ public?: string;
492
+ isCalendar?: boolean;
493
493
  }
494
494
  interface ClipperDocumentStructure {
495
495
  id: string;
@@ -1048,7 +1048,7 @@ declare class ClipperDocumentMenuComponent implements OnInit {
1048
1048
  private readonly changeDetector;
1049
1049
  private readonly clipperService;
1050
1050
  readonly useSelections: _angular_core.InputSignal<boolean>;
1051
- readonly selectionSource: _angular_core.InputSignal<"selection" | "bag" | "none">;
1051
+ readonly selectionSource: _angular_core.InputSignal<"none" | "selection" | "bag">;
1052
1052
  protected selection: () => ClipperDocumentInfo[];
1053
1053
  readonly parent: _angular_core.InputSignal<any>;
1054
1054
  readonly item: _angular_core.InputSignal<ClipperDocumentInfo>;
@@ -1001,7 +1001,7 @@ declare class ChipsSelectorComponent implements OnInit, OnDestroy, AfterContentI
1001
1001
  readonly label: _angular_core.InputSignal<string>;
1002
1002
  readonly multiple: _angular_core.InputSignal<boolean>;
1003
1003
  readonly mustSelect: _angular_core.InputSignal<boolean>;
1004
- readonly mode: _angular_core.InputSignal<"collapsed" | "dynamic">;
1004
+ readonly mode: _angular_core.InputSignal<"dynamic" | "collapsed">;
1005
1005
  readonly stacked: _angular_core.InputSignal<boolean>;
1006
1006
  readonly padAt: _angular_core.InputSignal<number>;
1007
1007
  private _value?;
@@ -295,7 +295,7 @@ declare class FxFlexDirective extends ResponsiveBaseDirective {
295
295
  readonly mdDown: _angular_core.InputSignal<string>;
296
296
  readonly lgDown: _angular_core.InputSignal<string>;
297
297
  readonly xlDown: _angular_core.InputSignal<string>;
298
- private readonly _flexCss;
298
+ private readonly _rawFlex;
299
299
  constructor();
300
300
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<FxFlexDirective, never>;
301
301
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FxFlexDirective, " [fxFlex], [fxFlex.xs],[fxFlex.sm],[fxFlex.md],[fxFlex.lg],[fxFlex.xl],[fxFlex.xxl], [fxFlex.lt-sm],[fxFlex.lt-md],[fxFlex.lt-lg],[fxFlex.lt-xl],[fxFlex.lt-xxl], [fxFlex.gt-xs],[fxFlex.gt-sm],[fxFlex.gt-md],[fxFlex.gt-lg],[fxFlex.gt-xl], [fxFlex.sm-up],[fxFlex.md-up],[fxFlex.lg-up],[fxFlex.xl-up],[fxFlex.xxl-up], [fxFlex.sm-down],[fxFlex.md-down],[fxFlex.lg-down],[fxFlex.xl-down] ", never, { "fxFlex": { "alias": "fxFlex"; "required": false; "isSignal": true; }; "xs": { "alias": "fxFlex.xs"; "required": false; "isSignal": true; }; "sm": { "alias": "fxFlex.sm"; "required": false; "isSignal": true; }; "md": { "alias": "fxFlex.md"; "required": false; "isSignal": true; }; "lg": { "alias": "fxFlex.lg"; "required": false; "isSignal": true; }; "xl": { "alias": "fxFlex.xl"; "required": false; "isSignal": true; }; "xxl": { "alias": "fxFlex.xxl"; "required": false; "isSignal": true; }; "ltSm": { "alias": "fxFlex.lt-sm"; "required": false; "isSignal": true; }; "ltMd": { "alias": "fxFlex.lt-md"; "required": false; "isSignal": true; }; "ltLg": { "alias": "fxFlex.lt-lg"; "required": false; "isSignal": true; }; "ltXl": { "alias": "fxFlex.lt-xl"; "required": false; "isSignal": true; }; "ltXxl": { "alias": "fxFlex.lt-xxl"; "required": false; "isSignal": true; }; "gtXs": { "alias": "fxFlex.gt-xs"; "required": false; "isSignal": true; }; "gtSm": { "alias": "fxFlex.gt-sm"; "required": false; "isSignal": true; }; "gtMd": { "alias": "fxFlex.gt-md"; "required": false; "isSignal": true; }; "gtLg": { "alias": "fxFlex.gt-lg"; "required": false; "isSignal": true; }; "gtXl": { "alias": "fxFlex.gt-xl"; "required": false; "isSignal": true; }; "smUp": { "alias": "fxFlex.sm-up"; "required": false; "isSignal": true; }; "mdUp": { "alias": "fxFlex.md-up"; "required": false; "isSignal": true; }; "lgUp": { "alias": "fxFlex.lg-up"; "required": false; "isSignal": true; }; "xlUp": { "alias": "fxFlex.xl-up"; "required": false; "isSignal": true; }; "xxlUp": { "alias": "fxFlex.xxl-up"; "required": false; "isSignal": true; }; "smDown": { "alias": "fxFlex.sm-down"; "required": false; "isSignal": true; }; "mdDown": { "alias": "fxFlex.md-down"; "required": false; "isSignal": true; }; "lgDown": { "alias": "fxFlex.lg-down"; "required": false; "isSignal": true; }; "xlDown": { "alias": "fxFlex.xl-down"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;