@igo2/auth 18.0.1-next.2 → 18.0.2

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 (67) hide show
  1. package/esm2022/environment/environment.interface.mjs +2 -0
  2. package/esm2022/environment/igo2-auth-environment.mjs +5 -0
  3. package/esm2022/environment/public_api.mjs +2 -0
  4. package/esm2022/facebook/auth-facebook/auth-facebook.component.mjs +65 -0
  5. package/esm2022/facebook/igo2-auth-facebook.mjs +5 -0
  6. package/esm2022/facebook/public_api.mjs +3 -0
  7. package/esm2022/facebook/shared/auth-facebook.interface.mjs +2 -0
  8. package/esm2022/facebook/shared/index.mjs +2 -0
  9. package/esm2022/form/auth-form/auth-form.component.mjs +166 -0
  10. package/esm2022/form/auth-form.module.mjs +73 -0
  11. package/esm2022/form/igo2-auth-form.mjs +5 -0
  12. package/esm2022/form/public_api.mjs +7 -0
  13. package/esm2022/form/shared/auth-form.interface.mjs +2 -0
  14. package/esm2022/form/shared/index.mjs +2 -0
  15. package/esm2022/google/auth-google/auth-google.component.mjs +108 -0
  16. package/esm2022/google/igo2-auth-google.mjs +5 -0
  17. package/esm2022/google/public_api.mjs +3 -0
  18. package/esm2022/google/shared/auth-google.interface.mjs +2 -0
  19. package/esm2022/google/shared/index.mjs +2 -0
  20. package/esm2022/igo2-auth.mjs +5 -0
  21. package/esm2022/internal/auth-intern/auth-intern.component.mjs +84 -0
  22. package/esm2022/internal/igo2-auth-internal.mjs +5 -0
  23. package/esm2022/internal/public_api.mjs +2 -0
  24. package/esm2022/lib/auth.provider.mjs +22 -0
  25. package/esm2022/lib/shared/admin.guard.mjs +38 -0
  26. package/esm2022/lib/shared/auth-storage.interface.mjs +2 -0
  27. package/esm2022/lib/shared/auth-storage.service.mjs +100 -0
  28. package/esm2022/lib/shared/auth.guard.mjs +38 -0
  29. package/esm2022/lib/shared/auth.interceptor.mjs +159 -0
  30. package/esm2022/lib/shared/auth.interface.mjs +5 -0
  31. package/esm2022/lib/shared/auth.service.mjs +175 -0
  32. package/esm2022/lib/shared/index.mjs +12 -0
  33. package/esm2022/lib/shared/logged.guard.mjs +38 -0
  34. package/esm2022/lib/shared/profils.guard.mjs +43 -0
  35. package/esm2022/lib/shared/token.interface.mjs +2 -0
  36. package/esm2022/lib/shared/token.service.mjs +48 -0
  37. package/esm2022/microsoft/auth-microsoft/auth-microsoft.component.mjs +100 -0
  38. package/esm2022/microsoft/auth-microsoft.provider.mjs +104 -0
  39. package/esm2022/microsoft/auth-microsoftb2c/auth-microsoftb2c.component.mjs +98 -0
  40. package/esm2022/microsoft/auth-microsoftb2c/auth-msalBroadcastServiceb2c.service.mjs +47 -0
  41. package/esm2022/microsoft/auth-microsoftb2c/auth-msalServiceb2c.service.mjs +85 -0
  42. package/esm2022/microsoft/igo2-auth-microsoft.mjs +5 -0
  43. package/esm2022/microsoft/public_api.mjs +5 -0
  44. package/esm2022/microsoft/shared/auth-microsoft.interface.mjs +2 -0
  45. package/esm2022/microsoft/shared/index.mjs +2 -0
  46. package/esm2022/monitoring/auth-monitoring/auth-monitoring.provider.mjs +24 -0
  47. package/esm2022/monitoring/auth-monitoring/auth-monitoring.service.mjs +54 -0
  48. package/esm2022/monitoring/igo2-auth-monitoring.mjs +5 -0
  49. package/esm2022/monitoring/public_api.mjs +3 -0
  50. package/esm2022/public_api.mjs +6 -0
  51. package/fesm2022/igo2-auth-facebook.mjs +3 -3
  52. package/fesm2022/igo2-auth-facebook.mjs.map +1 -1
  53. package/fesm2022/igo2-auth-form.mjs +8 -8
  54. package/fesm2022/igo2-auth-form.mjs.map +1 -1
  55. package/fesm2022/igo2-auth-google.mjs +3 -3
  56. package/fesm2022/igo2-auth-google.mjs.map +1 -1
  57. package/fesm2022/igo2-auth-internal.mjs +4 -4
  58. package/fesm2022/igo2-auth-internal.mjs.map +1 -1
  59. package/fesm2022/igo2-auth-microsoft.mjs +14 -14
  60. package/fesm2022/igo2-auth-microsoft.mjs.map +1 -1
  61. package/fesm2022/igo2-auth-monitoring.mjs +10 -8
  62. package/fesm2022/igo2-auth-monitoring.mjs.map +1 -1
  63. package/fesm2022/igo2-auth.mjs +24 -24
  64. package/fesm2022/igo2-auth.mjs.map +1 -1
  65. package/form/src/auth-form/auth-intern.theme.scss +2 -3
  66. package/monitoring/auth-monitoring/auth-monitoring.provider.d.ts +2 -2
  67. package/package.json +26 -10
@@ -94,10 +94,10 @@ class AuthGoogleComponent {
94
94
  js.src = 'https://apis.google.com/js/platform.js';
95
95
  fjs.parentNode.insertBefore(js, fjs);
96
96
  }
97
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthGoogleComponent, deps: [{ token: i1.AuthService }, { token: i2.ConfigService }, { token: i3.LanguageService }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Component });
98
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.6", type: AuthGoogleComponent, isStandalone: true, selector: "igo-auth-google", outputs: { login: "login" }, ngImport: i0, template: "<div\n class=\"g-signin2 google-login-button\"\n data-height=\"40\"\n data-width=\"265\"\n data-longtitle=\"true\"\n></div>\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block}.google-login-button ::ng-deep .abcRioButton{color:#000000de}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
97
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthGoogleComponent, deps: [{ token: i1.AuthService }, { token: i2.ConfigService }, { token: i3.LanguageService }, { token: i0.ApplicationRef }], target: i0.ɵɵFactoryTarget.Component });
98
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AuthGoogleComponent, isStandalone: true, selector: "igo-auth-google", outputs: { login: "login" }, ngImport: i0, template: "<div\n class=\"g-signin2 google-login-button\"\n data-height=\"40\"\n data-width=\"265\"\n data-longtitle=\"true\"\n></div>\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block}.google-login-button ::ng-deep .abcRioButton{color:#000000de}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
99
99
  }
100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthGoogleComponent, decorators: [{
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthGoogleComponent, decorators: [{
101
101
  type: Component,
102
102
  args: [{ selector: 'igo-auth-google', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<div\n class=\"g-signin2 google-login-button\"\n data-height=\"40\"\n data-width=\"265\"\n data-longtitle=\"true\"\n></div>\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block}.google-login-button ::ng-deep .abcRioButton{color:#000000de}\n"] }]
103
103
  }], ctorParameters: () => [{ type: i1.AuthService }, { type: i2.ConfigService }, { type: i3.LanguageService }, { type: i0.ApplicationRef }], propDecorators: { login: [{
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-auth-google.mjs","sources":["../../../packages/auth/google/src/auth-google/auth-google.component.ts","../../../packages/auth/google/src/auth-google/auth-google.component.html","../../../packages/auth/google/src/igo2-auth-google.ts"],"sourcesContent":["import {\n ApplicationRef,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Output\n} from '@angular/core';\n\nimport { AuthService } from '@igo2/auth';\nimport { ConfigService } from '@igo2/core/config';\nimport { LanguageService } from '@igo2/core/language';\n\nimport { AuthGoogleOptions } from '../shared/auth-google.interface';\n\n@Component({\n selector: 'igo-auth-google',\n templateUrl: './auth-google.component.html',\n styleUrls: ['./auth-google.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class AuthGoogleComponent {\n private options?: AuthGoogleOptions;\n\n @Output() login: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n constructor(\n private authService: AuthService,\n private config: ConfigService,\n private languageService: LanguageService,\n private appRef: ApplicationRef\n ) {\n this.options = this.config.getConfig('auth.google');\n\n if (this.options?.apiKey && this.options?.clientId) {\n this.loadSDKGoogle();\n this.loadPlatform();\n } else {\n console.warn(\n 'Google authentification needs \"apiKey\" and \"clientId\" options'\n );\n }\n }\n\n public handleSignInClick() {\n (window as any).gapi.auth2.getAuthInstance().signIn();\n }\n\n public handleSignOutClick() {\n (window as any).gapi.auth2.getAuthInstance().signOut();\n }\n\n private handleClientLoad() {\n (window as any).gapi.load('client:auth2', () => this.initClient());\n }\n\n private initClient() {\n (window as any).gapi.client\n .init({\n apiKey: this.options?.apiKey,\n clientId: this.options?.clientId,\n discoveryDocs: [\n 'https://people.googleapis.com/$discovery/rest?version=v1'\n ],\n scope: 'profile'\n })\n .then(() => {\n this.handleSignOutClick();\n this.updateTextButton();\n (window as any).gapi.auth2\n .getAuthInstance()\n .isSignedIn.listen((rep) => {\n this.updateSigninStatus(rep);\n });\n });\n }\n\n private updateSigninStatus(isSignedIn) {\n this.updateTextButton();\n if (isSignedIn) {\n this.loginGoogle((window as any).gapi.client.getToken().access_token);\n }\n }\n\n private updateTextButton() {\n const btn = document.querySelector('span[id^=\"not_signed_\"]');\n if (btn && this.languageService.getLanguage() !== 'en') {\n if (btn.innerHTML === 'Sign in with Google') {\n btn.innerHTML = this.languageService.translate.instant(\n 'igo.auth.google.login'\n );\n } else if (btn.innerHTML === 'Signed in with Google') {\n btn.innerHTML = this.languageService.translate.instant(\n 'igo.auth.google.logged'\n );\n }\n }\n }\n\n private loginGoogle(token) {\n this.authService.loginWithToken(token, 'google').subscribe(() => {\n this.appRef.tick();\n this.login.emit(true);\n });\n }\n\n private loadSDKGoogle() {\n const fjs = document.getElementsByTagName('script')[0];\n const js = document.createElement('script');\n js.id = 'google-jssdk';\n js.src = 'https://apis.google.com/js/api.js';\n js.onload = () => {\n this.handleClientLoad();\n };\n fjs.parentNode.insertBefore(js, fjs);\n }\n\n private loadPlatform() {\n const fjs = document.getElementsByTagName('script')[0];\n const js = document.createElement('script');\n js.id = 'google-platform';\n js.src = 'https://apis.google.com/js/platform.js';\n fjs.parentNode.insertBefore(js, fjs);\n }\n}\n","<div\n class=\"g-signin2 google-login-button\"\n data-height=\"40\"\n data-width=\"265\"\n data-longtitle=\"true\"\n></div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MAqBa,mBAAmB,CAAA;AAMpB,IAAA,WAAA;AACA,IAAA,MAAA;AACA,IAAA,eAAA;AACA,IAAA,MAAA;AARF,IAAA,OAAO;AAEL,IAAA,KAAK,GAA0B,IAAI,YAAY,EAAW;AAEpE,IAAA,WAAA,CACU,WAAwB,EACxB,MAAqB,EACrB,eAAgC,EAChC,MAAsB,EAAA;QAHtB,IAAW,CAAA,WAAA,GAAX,WAAW;QACX,IAAM,CAAA,MAAA,GAAN,MAAM;QACN,IAAe,CAAA,eAAA,GAAf,eAAe;QACf,IAAM,CAAA,MAAA,GAAN,MAAM;QAEd,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC;AAEnD,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE;YAClD,IAAI,CAAC,aAAa,EAAE;YACpB,IAAI,CAAC,YAAY,EAAE;;aACd;AACL,YAAA,OAAO,CAAC,IAAI,CACV,+DAA+D,CAChE;;;IAIE,iBAAiB,GAAA;QACrB,MAAc,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE;;IAGhD,kBAAkB,GAAA;QACtB,MAAc,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC,OAAO,EAAE;;IAGhD,gBAAgB,GAAA;AACrB,QAAA,MAAc,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;;IAG5D,UAAU,GAAA;QACf,MAAc,CAAC,IA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B,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,wGCrBhC,mIAMA,EAAA,MAAA,EAAA,CAAA,qHAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FDea,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAP/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAGV,eAAA,EAAA,uBAAuB,CAAC,MAAM,cACnC,IAAI,EAAA,QAAA,EAAA,mIAAA,EAAA,MAAA,EAAA,CAAA,qHAAA,CAAA,EAAA;uKAKN,KAAK,EAAA,CAAA;sBAAd;;;AExBH;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-auth-google.mjs","sources":["../../../packages/auth/google/src/auth-google/auth-google.component.ts","../../../packages/auth/google/src/auth-google/auth-google.component.html","../../../packages/auth/google/src/igo2-auth-google.ts"],"sourcesContent":["import {\n ApplicationRef,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Output\n} from '@angular/core';\n\nimport { AuthService } from '@igo2/auth';\nimport { ConfigService } from '@igo2/core/config';\nimport { LanguageService } from '@igo2/core/language';\n\nimport { AuthGoogleOptions } from '../shared/auth-google.interface';\n\n@Component({\n selector: 'igo-auth-google',\n templateUrl: './auth-google.component.html',\n styleUrls: ['./auth-google.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class AuthGoogleComponent {\n private options?: AuthGoogleOptions;\n\n @Output() login: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n constructor(\n private authService: AuthService,\n private config: ConfigService,\n private languageService: LanguageService,\n private appRef: ApplicationRef\n ) {\n this.options = this.config.getConfig('auth.google');\n\n if (this.options?.apiKey && this.options?.clientId) {\n this.loadSDKGoogle();\n this.loadPlatform();\n } else {\n console.warn(\n 'Google authentification needs \"apiKey\" and \"clientId\" options'\n );\n }\n }\n\n public handleSignInClick() {\n (window as any).gapi.auth2.getAuthInstance().signIn();\n }\n\n public handleSignOutClick() {\n (window as any).gapi.auth2.getAuthInstance().signOut();\n }\n\n private handleClientLoad() {\n (window as any).gapi.load('client:auth2', () => this.initClient());\n }\n\n private initClient() {\n (window as any).gapi.client\n .init({\n apiKey: this.options?.apiKey,\n clientId: this.options?.clientId,\n discoveryDocs: [\n 'https://people.googleapis.com/$discovery/rest?version=v1'\n ],\n scope: 'profile'\n })\n .then(() => {\n this.handleSignOutClick();\n this.updateTextButton();\n (window as any).gapi.auth2\n .getAuthInstance()\n .isSignedIn.listen((rep) => {\n this.updateSigninStatus(rep);\n });\n });\n }\n\n private updateSigninStatus(isSignedIn) {\n this.updateTextButton();\n if (isSignedIn) {\n this.loginGoogle((window as any).gapi.client.getToken().access_token);\n }\n }\n\n private updateTextButton() {\n const btn = document.querySelector('span[id^=\"not_signed_\"]');\n if (btn && this.languageService.getLanguage() !== 'en') {\n if (btn.innerHTML === 'Sign in with Google') {\n btn.innerHTML = this.languageService.translate.instant(\n 'igo.auth.google.login'\n );\n } else if (btn.innerHTML === 'Signed in with Google') {\n btn.innerHTML = this.languageService.translate.instant(\n 'igo.auth.google.logged'\n );\n }\n }\n }\n\n private loginGoogle(token) {\n this.authService.loginWithToken(token, 'google').subscribe(() => {\n this.appRef.tick();\n this.login.emit(true);\n });\n }\n\n private loadSDKGoogle() {\n const fjs = document.getElementsByTagName('script')[0];\n const js = document.createElement('script');\n js.id = 'google-jssdk';\n js.src = 'https://apis.google.com/js/api.js';\n js.onload = () => {\n this.handleClientLoad();\n };\n fjs.parentNode.insertBefore(js, fjs);\n }\n\n private loadPlatform() {\n const fjs = document.getElementsByTagName('script')[0];\n const js = document.createElement('script');\n js.id = 'google-platform';\n js.src = 'https://apis.google.com/js/platform.js';\n fjs.parentNode.insertBefore(js, fjs);\n }\n}\n","<div\n class=\"g-signin2 google-login-button\"\n data-height=\"40\"\n data-width=\"265\"\n data-longtitle=\"true\"\n></div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;MAqBa,mBAAmB,CAAA;AAMpB,IAAA,WAAA,CAAA;AACA,IAAA,MAAA,CAAA;AACA,IAAA,eAAA,CAAA;AACA,IAAA,MAAA,CAAA;AARF,IAAA,OAAO,CAAqB;AAE1B,IAAA,KAAK,GAA0B,IAAI,YAAY,EAAW,CAAC;AAErE,IAAA,WAAA,CACU,WAAwB,EACxB,MAAqB,EACrB,eAAgC,EAChC,MAAsB,EAAA;QAHtB,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QACxB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAe;QACrB,IAAe,CAAA,eAAA,GAAf,eAAe,CAAiB;QAChC,IAAM,CAAA,MAAA,GAAN,MAAM,CAAgB;QAE9B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,aAAa,CAAC,CAAC;AAEpD,QAAA,IAAI,IAAI,CAAC,OAAO,EAAE,MAAM,IAAI,IAAI,CAAC,OAAO,EAAE,QAAQ,EAAE;YAClD,IAAI,CAAC,aAAa,EAAE,CAAC;YACrB,IAAI,CAAC,YAAY,EAAE,CAAC;SACrB;aAAM;AACL,YAAA,OAAO,CAAC,IAAI,CACV,+DAA+D,CAChE,CAAC;SACH;KACF;IAEM,iBAAiB,GAAA;QACrB,MAAc,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE,CAAC;KACvD;IAEM,kBAAkB,GAAA;QACtB,MAAc,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,EAAE,CAAC,OAAO,EAAE,CAAC;KACxD;IAEO,gBAAgB,GAAA;AACrB,QAAA,MAAc,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;KACpE;IAEO,UAA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,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,WAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,aAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,eAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,cAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,wGCrBhC,mIAMA,EAAA,MAAA,EAAA,CAAA,qHAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FDea,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAP/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAGV,eAAA,EAAA,uBAAuB,CAAC,MAAM,cACnC,IAAI,EAAA,QAAA,EAAA,mIAAA,EAAA,MAAA,EAAA,CAAA,qHAAA,CAAA,EAAA,CAAA;uKAKN,KAAK,EAAA,CAAA;sBAAd,MAAM;;;AExBT;;AAEG;;;;"}
@@ -60,12 +60,12 @@ class AuthInternComponent {
60
60
  this.login.emit(true);
61
61
  });
62
62
  }
63
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthInternComponent, deps: [{ token: i1.AuthService }, { token: i2.LanguageService }, { token: i3.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component });
64
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.6", type: AuthInternComponent, isStandalone: true, selector: "igo-auth-intern", inputs: { allowAnonymous: "allowAnonymous" }, outputs: { login: "login" }, ngImport: i0, template: "<form [formGroup]=\"form\" role=\"form\" (ngSubmit)=\"loginUser(form.value)\">\n <div>\n <mat-form-field class=\"full-width\">\n <mat-label>{{ 'igo.auth.user' | translate }}</mat-label>\n <input\n matInput\n required\n placeholder=\"{{ 'igo.auth.user' | translate }}\"\n formControlName=\"username\"\n />\n </mat-form-field>\n </div>\n\n <div>\n <mat-form-field class=\"full-width\">\n <mat-label>{{ 'igo.auth.password' | translate }}</mat-label>\n <input\n matInput\n required\n type=\"password\"\n placeholder=\"{{ 'igo.auth.password' | translate }}\"\n formControlName=\"password\"\n />\n </mat-form-field>\n </div>\n\n <button mat-raised-button type=\"submit\">\n {{ 'igo.auth.login' | translate }}\n </button>\n <button\n *ngIf=\"allowAnonymous\"\n mat-raised-button\n class=\"anonymous\"\n type=\"button\"\n (click)=\"loginAnonymous()\"\n >\n {{ 'igo.auth.accessAnonymous' | translate }}\n </button>\n <div *ngIf=\"error\">\n <br />\n <font size=\"3\" color=\"red\">{{ error }}</font>\n </div>\n</form>\n\n<div *ngIf=\"loading\" class=\"loading-container\">\n <mat-spinner [diameter]=\"40\"></mat-spinner>\n</div>\n", styles: [".full-width{width:100%}.anonymous{margin-left:10px}.loading-container{position:absolute;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:1000;top:0;left:0;padding:24px;box-sizing:border-box}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Default });
63
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthInternComponent, deps: [{ token: i1.AuthService }, { token: i2.LanguageService }, { token: i3.UntypedFormBuilder }], target: i0.ɵɵFactoryTarget.Component });
64
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AuthInternComponent, isStandalone: true, selector: "igo-auth-intern", inputs: { allowAnonymous: "allowAnonymous" }, outputs: { login: "login" }, ngImport: i0, template: "<form [formGroup]=\"form\" role=\"form\" (ngSubmit)=\"loginUser(form.value)\">\n <div>\n <mat-form-field class=\"full-width\">\n <mat-label>{{ 'igo.auth.user' | translate }}</mat-label>\n <input\n matInput\n required\n placeholder=\"{{ 'igo.auth.user' | translate }}\"\n formControlName=\"username\"\n />\n </mat-form-field>\n </div>\n\n <div>\n <mat-form-field class=\"full-width\">\n <mat-label>{{ 'igo.auth.password' | translate }}</mat-label>\n <input\n matInput\n required\n type=\"password\"\n placeholder=\"{{ 'igo.auth.password' | translate }}\"\n formControlName=\"password\"\n />\n </mat-form-field>\n </div>\n\n <button mat-raised-button type=\"submit\">\n {{ 'igo.auth.login' | translate }}\n </button>\n <button\n *ngIf=\"allowAnonymous\"\n mat-raised-button\n class=\"anonymous\"\n type=\"button\"\n (click)=\"loginAnonymous()\"\n >\n {{ 'igo.auth.accessAnonymous' | translate }}\n </button>\n <div *ngIf=\"error\">\n <br />\n <font size=\"3\" color=\"red\">{{ error }}</font>\n </div>\n</form>\n\n<div *ngIf=\"loading\" class=\"loading-container\">\n <mat-spinner [diameter]=\"40\"></mat-spinner>\n</div>\n", styles: [".full-width{width:100%}.anonymous{margin-left:10px}.loading-container{position:absolute;width:100%;height:100%;display:flex;justify-content:center;align-items:center;z-index:1000;top:0;left:0;padding:24px;box-sizing:border-box}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4.MatLabel, selector: "mat-label" }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i5.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i7.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.Default });
65
65
  }
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthInternComponent, decorators: [{
66
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthInternComponent, decorators: [{
67
67
  type: Component,
68
- args: [{ selector: 'igo-auth-intern', changeDetection: ChangeDetectionStrategy.Default, imports: [
68
+ args: [{ selector: 'igo-auth-intern', changeDetection: ChangeDetectionStrategy.Default, standalone: true, imports: [
69
69
  FormsModule,
70
70
  ReactiveFormsModule,
71
71
  MatFormFieldModule,
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-auth-internal.mjs","sources":["../../../packages/auth/internal/src/auth-intern/auth-intern.component.ts","../../../packages/auth/internal/src/auth-intern/auth-intern.component.html","../../../packages/auth/internal/src/igo2-auth-internal.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output\n} from '@angular/core';\nimport {\n FormsModule,\n ReactiveFormsModule,\n UntypedFormBuilder,\n UntypedFormGroup,\n Validators\n} from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\n\nimport { AuthService } from '@igo2/auth';\nimport { LanguageService } from '@igo2/core/language';\nimport { IgoLanguageModule } from '@igo2/core/language';\n\n@Component({\n selector: 'igo-auth-intern',\n templateUrl: './auth-intern.component.html',\n styleUrls: ['./auth-intern.component.scss'],\n changeDetection: ChangeDetectionStrategy.Default,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n MatInputModule,\n MatButtonModule,\n MatProgressSpinner,\n NgIf,\n IgoLanguageModule\n ]\n})\nexport class AuthInternComponent {\n @Input()\n get allowAnonymous(): boolean {\n return this._allowAnonymous;\n }\n set allowAnonymous(value: boolean) {\n this._allowAnonymous = value;\n }\n private _allowAnonymous = true;\n\n public error = '';\n public form: UntypedFormGroup;\n public loading = false;\n\n @Output() login: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n constructor(\n public auth: AuthService,\n private languageService: LanguageService,\n fb: UntypedFormBuilder\n ) {\n this.form = fb.group({\n username: ['', Validators.required],\n password: ['', Validators.required]\n });\n }\n\n loginUser(values: any) {\n this.loading = true;\n this.auth.login(values.username, values.password).subscribe(\n () => {\n this.login.emit(true);\n this.loading = false;\n },\n (error: any) => {\n try {\n this.languageService.translate\n .get('igo.auth.error.' + error.error.message)\n .subscribe((errorMsg) => (this.error = errorMsg));\n } catch {\n this.error = error.error.message;\n }\n this.loading = false;\n }\n );\n return false;\n }\n\n loginAnonymous() {\n this.auth.loginAnonymous().subscribe(() => {\n this.login.emit(true);\n });\n }\n}\n","<form [formGroup]=\"form\" role=\"form\" (ngSubmit)=\"loginUser(form.value)\">\n <div>\n <mat-form-field class=\"full-width\">\n <mat-label>{{ 'igo.auth.user' | translate }}</mat-label>\n <input\n matInput\n required\n placeholder=\"{{ 'igo.auth.user' | translate }}\"\n formControlName=\"username\"\n />\n </mat-form-field>\n </div>\n\n <div>\n <mat-form-field class=\"full-width\">\n <mat-label>{{ 'igo.auth.password' | translate }}</mat-label>\n <input\n matInput\n required\n type=\"password\"\n placeholder=\"{{ 'igo.auth.password' | translate }}\"\n formControlName=\"password\"\n />\n </mat-form-field>\n </div>\n\n <button mat-raised-button type=\"submit\">\n {{ 'igo.auth.login' | translate }}\n </button>\n <button\n *ngIf=\"allowAnonymous\"\n mat-raised-button\n class=\"anonymous\"\n type=\"button\"\n (click)=\"loginAnonymous()\"\n >\n {{ 'igo.auth.accessAnonymous' | translate }}\n </button>\n <div *ngIf=\"error\">\n <br />\n <font size=\"3\" color=\"red\">{{ error }}</font>\n </div>\n</form>\n\n<div *ngIf=\"loading\" class=\"loading-container\">\n <mat-spinner [diameter]=\"40\"></mat-spinner>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MAwCa,mBAAmB,CAAA;AAiBrB,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AA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,MAAA,EAAA,OAAA,EAAA,UAAA,EAAA,aAAA,CAAA,EAAA,QAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,IAAI,4FACJ,iBAAiB,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAA,EAAA,CAAA,aAAA,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,OAAA,EAAA,CAAA;;2FAGR,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAhB/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAGV,eAAA,EAAA,uBAAuB,CAAC,OAAO,EACvC,OAAA,EAAA;wBACP,WAAW;wBACX,mBAAmB;wBACnB,kBAAkB;wBAClB,cAAc;wBACd,eAAe;wBACf,kBAAkB;wBAClB,IAAI;wBACJ;AACD,qBAAA,EAAA,QAAA,EAAA,mvCAAA,EAAA,MAAA,EAAA,CAAA,uOAAA,CAAA,EAAA;+IAIG,cAAc,EAAA,CAAA;sBADjB;gBAaS,KAAK,EAAA,CAAA;sBAAd;;;AEtDH;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-auth-internal.mjs","sources":["../../../packages/auth/internal/src/auth-intern/auth-intern.component.ts","../../../packages/auth/internal/src/auth-intern/auth-intern.component.html","../../../packages/auth/internal/src/igo2-auth-internal.ts"],"sourcesContent":["import { NgIf } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Input,\n Output\n} from '@angular/core';\nimport {\n FormsModule,\n ReactiveFormsModule,\n UntypedFormBuilder,\n UntypedFormGroup,\n Validators\n} from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\n\nimport { AuthService } from '@igo2/auth';\nimport { LanguageService } from '@igo2/core/language';\nimport { IgoLanguageModule } from '@igo2/core/language';\n\n@Component({\n selector: 'igo-auth-intern',\n templateUrl: './auth-intern.component.html',\n styleUrls: ['./auth-intern.component.scss'],\n changeDetection: ChangeDetectionStrategy.Default,\n standalone: true,\n imports: [\n FormsModule,\n ReactiveFormsModule,\n MatFormFieldModule,\n MatInputModule,\n MatButtonModule,\n MatProgressSpinner,\n NgIf,\n IgoLanguageModule\n ]\n})\nexport class AuthInternComponent {\n @Input()\n get allowAnonymous(): boolean {\n return this._allowAnonymous;\n }\n set allowAnonymous(value: boolean) {\n this._allowAnonymous = value;\n }\n private _allowAnonymous = true;\n\n public error = '';\n public form: UntypedFormGroup;\n public loading = false;\n\n @Output() login: EventEmitter<boolean> = new EventEmitter<boolean>();\n\n constructor(\n public auth: AuthService,\n private languageService: LanguageService,\n fb: UntypedFormBuilder\n ) {\n this.form = fb.group({\n username: ['', Validators.required],\n password: ['', Validators.required]\n });\n }\n\n loginUser(values: any) {\n this.loading = true;\n this.auth.login(values.username, values.password).subscribe(\n () => {\n this.login.emit(true);\n this.loading = false;\n },\n (error: any) => {\n try {\n this.languageService.translate\n .get('igo.auth.error.' + error.error.message)\n .subscribe((errorMsg) => (this.error = errorMsg));\n } catch {\n this.error = error.error.message;\n }\n this.loading = false;\n }\n );\n return false;\n }\n\n loginAnonymous() {\n this.auth.loginAnonymous().subscribe(() => {\n this.login.emit(true);\n });\n }\n}\n","<form [formGroup]=\"form\" role=\"form\" (ngSubmit)=\"loginUser(form.value)\">\n <div>\n <mat-form-field class=\"full-width\">\n <mat-label>{{ 'igo.auth.user' | translate }}</mat-label>\n <input\n matInput\n required\n placeholder=\"{{ 'igo.auth.user' | translate }}\"\n formControlName=\"username\"\n />\n </mat-form-field>\n </div>\n\n <div>\n <mat-form-field class=\"full-width\">\n <mat-label>{{ 'igo.auth.password' | translate }}</mat-label>\n <input\n matInput\n required\n type=\"password\"\n placeholder=\"{{ 'igo.auth.password' | translate }}\"\n formControlName=\"password\"\n />\n </mat-form-field>\n </div>\n\n <button mat-raised-button type=\"submit\">\n {{ 'igo.auth.login' | translate }}\n </button>\n <button\n *ngIf=\"allowAnonymous\"\n mat-raised-button\n class=\"anonymous\"\n type=\"button\"\n (click)=\"loginAnonymous()\"\n >\n {{ 'igo.auth.accessAnonymous' | translate }}\n </button>\n <div *ngIf=\"error\">\n <br />\n <font size=\"3\" color=\"red\">{{ error }}</font>\n </div>\n</form>\n\n<div *ngIf=\"loading\" class=\"loading-container\">\n <mat-spinner [diameter]=\"40\"></mat-spinner>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;MAyCa,mBAAmB,CAAA;AAiBrB,IAAA,IAAA,CAAA;AACC,IAAA,eAAA,CAAA;AAjBV,IAAA,IACI,cAAc,GAAA;QAChB,OAAO,IAAI,CAAC,eAAe,CAAC;KAC7B;IACD,IAAI,cAAc,CAAC,KAAc,EAAA;AAC/B,QAAA,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;KAC9B;IACO,eAAe,GAAG,IAAI,CAAC;IAExB,KAAK,GAAG,EAAE,CAAC;AACX,IAAA,IAAI,CAAmB;IACvB,OAAO,GAAG,KAAK,CAAC;AAEb,IAAA,KAAK,GAA0B,IAAI,YAAY,EAAW,CAAC;AAErE,IAAA,WAAA,CACS,IAAiB,EAChB,eAAgC,EACxC,EAAsB,EAAA;QAFf,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAa;QAChB,IAAe,CAAA,eAAA,GAAf,eAAe,CAAiB;AAGxC,QAAA,IAAI,CAAC,IAAI,GAAG,EAAE,CAAC,KAAK,CAAC;AACnB,YAAA,QAAQ,EAAE,CAAC,EAAE,EAAE,UAAU,CAAC,QAAQ,CAAC;AACnC,YAAA,QAAQ,EAAE,CAAC,EAAE,EAAE,UAAU,CAAC,QAA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AA,EACpC,IAAI,EACP,OAAA,EAAA;wBACP,WAAW;wBACX,mBAAmB;wBACnB,kBAAkB;wBAClB,cAAc;wBACd,eAAe;wBACf,kBAAkB;wBAClB,IAAI;wBACJ,iBAAiB;AAClB,qBAAA,EAAA,QAAA,EAAA,mvCAAA,EAAA,MAAA,EAAA,CAAA,uOAAA,CAAA,EAAA,CAAA;+IAIG,cAAc,EAAA,CAAA;sBADjB,KAAK;gBAaI,KAAK,EAAA,CAAA;sBAAd,MAAM;;;AEvDT;;AAEG;;;;"}
@@ -87,12 +87,12 @@ class AuthMicrosoftComponent {
87
87
  getConf() {
88
88
  return this.msalGuardConfig.filter((conf) => conf.type === 'add')[0];
89
89
  }
90
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthMicrosoftComponent, deps: [{ token: i1.AuthService }, { token: i2.ConfigService }, { token: i0.ApplicationRef }, { token: i3.MsalService }, { token: MSAL_GUARD_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
91
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.6", type: AuthMicrosoftComponent, isStandalone: true, selector: "igo-auth-microsoft", outputs: { login: "login" }, ngImport: i0, template: "<button\n class=\"microsoft-login-button\"\n mat-raised-button\n (click)=\"loginMicrosoft()\"\n>\n <igo-icon [icon]=\"svgIcon\"></igo-icon>\n {{ 'igo.auth.microsoft.login' | translate }}\n</button>\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-15px}:host>button{font-size:15px;height:40px;width:265px}mat-icon{margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "component", type: IgoIconComponent, selector: "igo-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
90
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthMicrosoftComponent, deps: [{ token: i1.AuthService }, { token: i2.ConfigService }, { token: i0.ApplicationRef }, { token: i3.MsalService }, { token: MSAL_GUARD_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
91
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AuthMicrosoftComponent, isStandalone: true, selector: "igo-auth-microsoft", outputs: { login: "login" }, ngImport: i0, template: "<button\n class=\"microsoft-login-button\"\n mat-raised-button\n (click)=\"loginMicrosoft()\"\n>\n <igo-icon [icon]=\"svgIcon\"></igo-icon>\n {{ 'igo.auth.microsoft.login' | translate }}\n</button>\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-15px}:host>button{font-size:15px;height:40px;width:265px}mat-icon{margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "component", type: IgoIconComponent, selector: "igo-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
92
92
  }
93
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthMicrosoftComponent, decorators: [{
93
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthMicrosoftComponent, decorators: [{
94
94
  type: Component,
95
- args: [{ selector: 'igo-auth-microsoft', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule, IgoLanguageModule, IgoIconComponent], template: "<button\n class=\"microsoft-login-button\"\n mat-raised-button\n (click)=\"loginMicrosoft()\"\n>\n <igo-icon [icon]=\"svgIcon\"></igo-icon>\n {{ 'igo.auth.microsoft.login' | translate }}\n</button>\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-15px}:host>button{font-size:15px;height:40px;width:265px}mat-icon{margin-right:10px}\n"] }]
95
+ args: [{ selector: 'igo-auth-microsoft', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatButtonModule, IgoLanguageModule, IgoIconComponent], template: "<button\n class=\"microsoft-login-button\"\n mat-raised-button\n (click)=\"loginMicrosoft()\"\n>\n <igo-icon [icon]=\"svgIcon\"></igo-icon>\n {{ 'igo.auth.microsoft.login' | translate }}\n</button>\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-15px}:host>button{font-size:15px;height:40px;width:265px}mat-icon{margin-right:10px}\n"] }]
96
96
  }], ctorParameters: () => [{ type: i1.AuthService }, { type: i2.ConfigService }, { type: i0.ApplicationRef }, { type: i3.MsalService }, { type: undefined, decorators: [{
97
97
  type: Inject,
98
98
  args: [MSAL_GUARD_CONFIG]
@@ -168,10 +168,10 @@ class MsalServiceb2c {
168
168
  this.logger = logger.clone(this.name, this.version);
169
169
  this.instance.setLogger(logger);
170
170
  }
171
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MsalServiceb2c, deps: [{ token: MSAL_INSTANCE }, { token: i1$1.Location }], target: i0.ɵɵFactoryTarget.Injectable });
172
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MsalServiceb2c });
171
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MsalServiceb2c, deps: [{ token: MSAL_INSTANCE }, { token: i1$1.Location }], target: i0.ɵɵFactoryTarget.Injectable });
172
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MsalServiceb2c });
173
173
  }
174
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MsalServiceb2c, decorators: [{
174
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MsalServiceb2c, decorators: [{
175
175
  type: Injectable
176
176
  }], ctorParameters: () => [{ type: undefined, decorators: [{
177
177
  type: Inject,
@@ -208,10 +208,10 @@ class MsalBroadcastServiceb2c {
208
208
  }
209
209
  });
210
210
  }
211
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MsalBroadcastServiceb2c, deps: [{ token: MSAL_INSTANCE }, { token: MsalServiceb2c }], target: i0.ɵɵFactoryTarget.Injectable });
212
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MsalBroadcastServiceb2c });
211
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MsalBroadcastServiceb2c, deps: [{ token: MSAL_INSTANCE }, { token: MsalServiceb2c }], target: i0.ɵɵFactoryTarget.Injectable });
212
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MsalBroadcastServiceb2c });
213
213
  }
214
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: MsalBroadcastServiceb2c, decorators: [{
214
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MsalBroadcastServiceb2c, decorators: [{
215
215
  type: Injectable
216
216
  }], ctorParameters: () => [{ type: undefined, decorators: [{
217
217
  type: Inject,
@@ -285,12 +285,12 @@ class AuthMicrosoftb2cComponent {
285
285
  getConf() {
286
286
  return this.msalGuardConfig.filter((conf) => conf.type === 'b2c')[0];
287
287
  }
288
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthMicrosoftb2cComponent, deps: [{ token: i1.AuthService }, { token: i2.ConfigService }, { token: i0.ApplicationRef }, { token: MsalServiceb2c }, { token: MSAL_GUARD_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
289
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.6", type: AuthMicrosoftb2cComponent, isStandalone: true, selector: "igo-auth-microsoftb2c", outputs: { login: "login" }, providers: [MsalServiceb2c], ngImport: i0, template: "<button\n class=\"microsoft-login-button\"\n mat-raised-button\n (click)=\"loginMicrosoftb2c()\"\n>\n <igo-icon [icon]=\"svgIcon\"></igo-icon>\n {{ 'igo.auth.microsoftb2c.login' | translate }}\n</button>\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-15px}:host>button{font-size:15px;height:40px;width:265px}mat-icon{margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "component", type: IgoIconComponent, selector: "igo-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
288
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthMicrosoftb2cComponent, deps: [{ token: i1.AuthService }, { token: i2.ConfigService }, { token: i0.ApplicationRef }, { token: MsalServiceb2c }, { token: MSAL_GUARD_CONFIG }], target: i0.ɵɵFactoryTarget.Component });
289
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: AuthMicrosoftb2cComponent, isStandalone: true, selector: "igo-auth-microsoftb2c", outputs: { login: "login" }, providers: [MsalServiceb2c], ngImport: i0, template: "<button\n class=\"microsoft-login-button\"\n mat-raised-button\n (click)=\"loginMicrosoftb2c()\"\n>\n <igo-icon [icon]=\"svgIcon\"></igo-icon>\n {{ 'igo.auth.microsoftb2c.login' | translate }}\n</button>\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-15px}:host>button{font-size:15px;height:40px;width:265px}mat-icon{margin-right:10px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: IgoLanguageModule }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }, { kind: "component", type: IgoIconComponent, selector: "igo-icon", inputs: ["icon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
290
290
  }
291
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthMicrosoftb2cComponent, decorators: [{
291
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthMicrosoftb2cComponent, decorators: [{
292
292
  type: Component,
293
- args: [{ selector: 'igo-auth-microsoftb2c', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatButtonModule, IgoLanguageModule, IgoIconComponent], providers: [MsalServiceb2c], template: "<button\n class=\"microsoft-login-button\"\n mat-raised-button\n (click)=\"loginMicrosoftb2c()\"\n>\n <igo-icon [icon]=\"svgIcon\"></igo-icon>\n {{ 'igo.auth.microsoftb2c.login' | translate }}\n</button>\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-15px}:host>button{font-size:15px;height:40px;width:265px}mat-icon{margin-right:10px}\n"] }]
293
+ args: [{ selector: 'igo-auth-microsoftb2c', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [MatButtonModule, IgoLanguageModule, IgoIconComponent], providers: [MsalServiceb2c], template: "<button\n class=\"microsoft-login-button\"\n mat-raised-button\n (click)=\"loginMicrosoftb2c()\"\n>\n <igo-icon [icon]=\"svgIcon\"></igo-icon>\n {{ 'igo.auth.microsoftb2c.login' | translate }}\n</button>\n", styles: [":host{padding:10px 10px 10px 0;display:inline-block;position:relative;top:-15px}:host>button{font-size:15px;height:40px;width:265px}mat-icon{margin-right:10px}\n"] }]
294
294
  }], ctorParameters: () => [{ type: i1.AuthService }, { type: i2.ConfigService }, { type: i0.ApplicationRef }, { type: MsalServiceb2c }, { type: undefined, decorators: [{
295
295
  type: Inject,
296
296
  args: [MSAL_GUARD_CONFIG]
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-auth-microsoft.mjs","sources":["../../../packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.ts","../../../packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.html","../../../packages/auth/microsoft/src/auth-microsoftb2c/auth-msalServiceb2c.service.ts","../../../packages/auth/microsoft/src/auth-microsoftb2c/auth-msalBroadcastServiceb2c.service.ts","../../../packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.ts","../../../packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.html","../../../packages/auth/microsoft/src/auth-microsoft.provider.ts","../../../packages/auth/microsoft/src/igo2-auth-microsoft.ts"],"sourcesContent":["import {\n ApplicationRef,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Inject,\n Output\n} from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\n\nimport { AuthService } from '@igo2/auth';\nimport { IconSvg, IgoIconComponent, MICROSOFT_ICON } from '@igo2/common/icon';\nimport { ConfigService } from '@igo2/core/config';\nimport { IgoLanguageModule } from '@igo2/core/language';\n\nimport {\n MSAL_GUARD_CONFIG,\n MsalBroadcastService,\n MsalService\n} from '@azure/msal-angular';\nimport {\n AuthenticationResult,\n InteractionRequiredAuthError,\n InteractionStatus,\n PopupRequest,\n PublicClientApplication,\n SilentRequest\n} from '@azure/msal-browser';\nimport { Subject } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\n\nimport {\n AuthMicrosoftOptions,\n MSPMsalGuardConfiguration\n} from '../shared/auth-microsoft.interface';\n\n@Component({\n selector: 'igo-auth-microsoft',\n templateUrl: './auth-microsoft.component.html',\n styleUrls: ['./auth-microsoft.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatButtonModule, IgoLanguageModule, IgoIconComponent]\n})\nexport class AuthMicrosoftComponent {\n private options?: AuthMicrosoftOptions;\n private readonly _destroying$ = new Subject<void>();\n @Output() login: EventEmitter<boolean> = new EventEmitter<boolean>();\n private broadcastService: MsalBroadcastService;\n\n svgIcon: IconSvg = MICROSOFT_ICON;\n\n constructor(\n private authService: AuthService,\n private config: ConfigService,\n private appRef: ApplicationRef,\n private msalService: MsalService,\n @Inject(MSAL_GUARD_CONFIG)\n private msalGuardConfig: MSPMsalGuardConfiguration[]\n ) {\n this.options = this.config.getConfig('auth.microsoft');\n\n this.msalService.instance = new PublicClientApplication({\n auth: this.options,\n cache: {\n cacheLocation: 'sessionStorage'\n }\n });\n\n this.broadcastService = new MsalBroadcastService(\n this.msalService.instance,\n this.msalService\n );\n\n if (this.options?.clientId) {\n this.broadcastService.inProgress$\n .pipe(\n filter(\n (status: InteractionStatus) => status === InteractionStatus.None\n ),\n takeUntil(this._destroying$)\n )\n .subscribe(() => {\n this.checkAccount();\n });\n } else {\n console.warn('Microsoft authentification needs \"clientId\" option');\n }\n }\n\n public loginMicrosoft() {\n this.msalService\n .loginPopup({ ...this.getConf().authRequest } as PopupRequest)\n .subscribe((response: AuthenticationResult) => {\n this.msalService.instance.setActiveAccount(response.account);\n this.checkAccount();\n });\n }\n\n private checkAccount() {\n this.msalService.instance\n .acquireTokenSilent(this.getConf().authRequest as SilentRequest)\n .then((response: AuthenticationResult) => {\n const tokenAccess = response.accessToken;\n const tokenId = response.idToken;\n this.authService\n .loginWithToken(tokenAccess, 'microsoft', { tokenId })\n .subscribe(() => {\n this.appRef.tick();\n this.login.emit(true);\n });\n })\n .catch(async (error) => {\n if (error instanceof InteractionRequiredAuthError) {\n // fallback to interaction when silent call fails\n return this.msalService.acquireTokenPopup(\n this.getConf().authRequest as SilentRequest\n );\n }\n console.log(error);\n })\n .catch(() => {\n console.log('Silent token fails');\n });\n }\n\n private getConf(): MSPMsalGuardConfiguration {\n return this.msalGuardConfig.filter((conf) => conf.type === 'add')[0];\n }\n}\n","<button\n class=\"microsoft-login-button\"\n mat-raised-button\n (click)=\"loginMicrosoft()\"\n>\n <igo-icon [icon]=\"svgIcon\"></igo-icon>\n {{ 'igo.auth.microsoft.login' | translate }}\n</button>\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { Location } from '@angular/common';\nimport { Inject, Injectable } from '@angular/core';\n\nimport { MSAL_INSTANCE } from '@azure/msal-angular';\nimport { IMsalService } from '@azure/msal-angular';\nimport {\n AuthenticationResult,\n EndSessionPopupRequest,\n EndSessionRequest,\n IPublicClientApplication,\n Logger,\n PopupRequest,\n RedirectRequest,\n SilentRequest,\n SsoSilentRequest,\n WrapperSKU\n} from '@azure/msal-browser';\nimport { Observable, from } from 'rxjs';\n\n@Injectable()\nexport class MsalServiceb2c implements IMsalService {\n private redirectHash: string;\n private logger: Logger;\n private name = '@azure/msal-angular';\n private version = '2.0.0-beta.2';\n constructor(\n @Inject(MSAL_INSTANCE) public instance: IPublicClientApplication,\n private location: Location\n ) {\n const hash = this.location.path(true).split('#').pop();\n if (hash) {\n this.redirectHash = `#${hash}`;\n }\n this.instance.initializeWrapperLibrary(WrapperSKU.Angular, this.version);\n }\n\n initialize(): Observable<void> {\n return from(this.instance.initialize());\n }\n\n acquireTokenPopup(request: PopupRequest): Observable<AuthenticationResult> {\n return from(this.instance.acquireTokenPopup(request));\n }\n acquireTokenRedirect(request: RedirectRequest): Observable<void> {\n return from(this.instance.acquireTokenRedirect(request));\n }\n acquireTokenSilent(\n silentRequest: SilentRequest\n ): Observable<AuthenticationResult> {\n return from(this.instance.acquireTokenSilent(silentRequest));\n }\n handleRedirectObservable(hash?: string): Observable<AuthenticationResult> {\n return from(this.instance.handleRedirectPromise(hash || this.redirectHash));\n }\n loginPopup(request?: PopupRequest): Observable<AuthenticationResult> {\n return from(this.instance.loginPopup(request));\n }\n loginRedirect(request?: RedirectRequest): Observable<void> {\n return from(this.instance.loginRedirect(request));\n }\n logout(logoutRequest?: EndSessionRequest): Observable<void> {\n return from(this.instance.logout(logoutRequest));\n }\n logoutRedirect(logoutRequest?: EndSessionRequest): Observable<void> {\n return from(this.instance.logoutRedirect(logoutRequest));\n }\n logoutPopup(logoutRequest?: EndSessionPopupRequest): Observable<void> {\n return from(this.instance.logoutPopup(logoutRequest));\n }\n ssoSilent(request: SsoSilentRequest): Observable<AuthenticationResult> {\n return from(this.instance.ssoSilent(request));\n }\n /**\n * Gets logger for msal-angular.\n * If no logger set, returns logger instance created with same options as msal-browser\n */\n getLogger(): Logger {\n if (!this.logger) {\n this.logger = this.instance.getLogger().clone(this.name, this.version);\n }\n return this.logger;\n }\n // Create a logger instance for msal-angular with the same options as msal-browser\n setLogger(logger: Logger): void {\n this.logger = logger.clone(this.name, this.version);\n this.instance.setLogger(logger);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { Inject, Injectable } from '@angular/core';\n\nimport { MSAL_INSTANCE } from '@azure/msal-angular';\nimport {\n EventMessage,\n EventMessageUtils,\n IPublicClientApplication,\n InteractionStatus\n} from '@azure/msal-browser';\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\n\nimport { MsalServiceb2c } from './auth-msalServiceb2c.service';\n\n@Injectable()\nexport class MsalBroadcastServiceb2c {\n private _msalSubject: Subject<EventMessage>;\n public msalSubject$: Observable<EventMessage>;\n private _inProgress: BehaviorSubject<InteractionStatus>;\n public inProgress$: Observable<InteractionStatus>;\n\n constructor(\n @Inject(MSAL_INSTANCE) private msalInstance: IPublicClientApplication,\n private authService: MsalServiceb2c\n ) {\n this._msalSubject = new Subject<EventMessage>();\n this.msalSubject$ = this._msalSubject.asObservable();\n\n // InProgress as BehaviorSubject so most recent inProgress state will be available upon subscription\n this._inProgress = new BehaviorSubject<InteractionStatus>(\n InteractionStatus.Startup\n );\n this.inProgress$ = this._inProgress.asObservable();\n\n this.msalInstance.addEventCallback((message: EventMessage) => {\n this._msalSubject.next(message);\n const status = EventMessageUtils.getInteractionStatusFromEvent(message);\n if (status !== null) {\n this.authService\n .getLogger()\n .verbose(\n `BroadcastService - ${message.eventType} results in setting inProgress to ${status}`\n );\n this._inProgress.next(status);\n }\n });\n }\n}\n","import {\n ApplicationRef,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Inject,\n Output\n} from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\n\nimport { AuthService } from '@igo2/auth';\nimport { IconSvg, IgoIconComponent, MICROSOFT_ICON } from '@igo2/common/icon';\nimport { ConfigService } from '@igo2/core/config';\nimport { IgoLanguageModule } from '@igo2/core/language';\n\nimport { MSAL_GUARD_CONFIG } from '@azure/msal-angular';\nimport {\n AuthenticationResult,\n InteractionRequiredAuthError,\n InteractionStatus,\n PopupRequest,\n PublicClientApplication,\n SilentRequest\n} from '@azure/msal-browser';\nimport { Subject } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\n\nimport {\n AuthMicrosoftb2cOptions,\n MSPMsalGuardConfiguration\n} from '../shared/auth-microsoft.interface';\nimport { MsalBroadcastServiceb2c } from './auth-msalBroadcastServiceb2c.service';\nimport { MsalServiceb2c } from './auth-msalServiceb2c.service';\n\n@Component({\n selector: 'igo-auth-microsoftb2c',\n templateUrl: './auth-microsoftb2c.component.html',\n styleUrls: ['./auth-microsoftb2c.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [MatButtonModule, IgoLanguageModule, IgoIconComponent],\n providers: [MsalServiceb2c]\n})\nexport class AuthMicrosoftb2cComponent {\n private options: AuthMicrosoftb2cOptions;\n private readonly _destroying$ = new Subject<void>();\n @Output() login: EventEmitter<boolean> = new EventEmitter<boolean>();\n private broadcastService: MsalBroadcastServiceb2c;\n\n svgIcon: IconSvg = MICROSOFT_ICON;\n\n constructor(\n private authService: AuthService,\n private config: ConfigService,\n private appRef: ApplicationRef,\n private msalService: MsalServiceb2c,\n @Inject(MSAL_GUARD_CONFIG)\n private msalGuardConfig: MSPMsalGuardConfiguration[]\n ) {\n this.options = this.config.getConfig('auth.microsoftb2c') || {};\n\n this.msalService.instance = new PublicClientApplication({\n auth: this.options.browserAuthOptions,\n cache: {\n cacheLocation: 'sessionStorage'\n }\n });\n\n this.broadcastService = new MsalBroadcastServiceb2c(\n this.msalService.instance,\n this.msalService\n );\n\n if (this.options.browserAuthOptions.clientId) {\n this.broadcastService.inProgress$\n .pipe(\n filter(\n (status: InteractionStatus) => status === InteractionStatus.None\n ),\n takeUntil(this._destroying$)\n )\n .subscribe(() => {\n this.checkAccount();\n });\n } else {\n console.warn('Microsoft authentification needs \"clientId\" option');\n }\n }\n\n public loginMicrosoftb2c() {\n this.msalService\n .loginPopup({ ...this.getConf().authRequest } as PopupRequest)\n .subscribe((response: AuthenticationResult) => {\n this.msalService.instance.setActiveAccount(response.account);\n this.checkAccount();\n });\n }\n\n private checkAccount() {\n this.msalService.instance\n .acquireTokenSilent(this.getConf().authRequest as SilentRequest)\n .then((response: AuthenticationResult) => {\n const token = response.idToken;\n this.authService.loginWithToken(token, 'microsoftb2c').subscribe(() => {\n this.appRef.tick();\n this.login.emit(true);\n });\n })\n .catch(async (error) => {\n if (error instanceof InteractionRequiredAuthError) {\n // fallback to interaction when silent call fails\n return this.msalService.acquireTokenPopup(\n this.getConf().authRequest as SilentRequest\n );\n }\n })\n .catch(() => {\n console.log('Silent token fails');\n });\n }\n\n private getConf(): MSPMsalGuardConfiguration {\n return this.msalGuardConfig.filter((conf) => conf.type === 'b2c')[0];\n }\n}\n","<button\n class=\"microsoft-login-button\"\n mat-raised-button\n (click)=\"loginMicrosoftb2c()\"\n>\n <igo-icon [icon]=\"svgIcon\"></igo-icon>\n {{ 'igo.auth.microsoftb2c.login' | translate }}\n</button>\n","import { AuthFeature, AuthFeatureKind } from '@igo2/auth';\nimport { ConfigService } from '@igo2/core/config';\n\nimport {\n MSAL_GUARD_CONFIG,\n MSAL_INSTANCE,\n MsalService\n} from '@azure/msal-angular';\nimport { InteractionType, PublicClientApplication } from '@azure/msal-browser';\nimport { BrowserAuthOptions } from '@azure/msal-browser';\n\nimport { AuthMicrosoftComponent } from './auth-microsoft/auth-microsoft.component';\nimport { AuthMicrosoftb2cComponent } from './auth-microsoftb2c/auth-microsoftb2c.component';\nimport { MsalServiceb2c } from './auth-microsoftb2c/auth-msalServiceb2c.service';\nimport {\n AuthMicrosoftOptions,\n MSPMsalGuardConfiguration\n} from './shared/auth-microsoft.interface';\n\nexport const AUTH_MICROSOFT_DIRECTIVES = [\n AuthMicrosoftComponent,\n AuthMicrosoftb2cComponent\n] as const;\n\nexport function MSALConfigFactory(\n config: ConfigService\n): PublicClientApplication {\n const msConf = config.getConfig('auth.microsoft') as AuthMicrosoftOptions;\n if (!msConf) {\n return;\n }\n\n msConf.redirectUri = msConf?.redirectUri || window.location.href;\n msConf.authority =\n msConf?.authority || 'https://login.microsoftonline.com/organizations';\n\n const myMsalObj = new PublicClientApplication({\n auth: msConf,\n cache: {\n cacheLocation: 'sessionStorage'\n }\n });\n\n return myMsalObj;\n}\n\nexport function MSALConfigFactoryb2c(\n config: ConfigService\n): PublicClientApplication {\n const msConf = config.getConfig(\n 'auth.microsoftb2c.browserAuthOptions'\n ) as BrowserAuthOptions;\n if (!msConf) {\n return;\n }\n msConf.redirectUri = msConf?.redirectUri || window.location.href;\n msConf.authority =\n msConf?.authority || 'https://login.microsoftonline.com/organizations';\n\n const myMsalObj = new PublicClientApplication({\n auth: msConf,\n cache: {\n cacheLocation: 'sessionStorage'\n }\n });\n\n return myMsalObj;\n}\n\nexport function MSALAngularConfigFactory(): MSPMsalGuardConfiguration {\n return {\n interactionType: InteractionType.Popup,\n authRequest: {\n scopes: ['user.read'],\n loginHint: 'todo'\n },\n type: 'add'\n };\n}\n\nexport function MSALAngularConfigFactoryb2c(\n config: ConfigService\n): MSPMsalGuardConfiguration {\n const msConf = config.getConfig(\n 'auth.microsoftb2c.browserAuthOptions'\n ) as BrowserAuthOptions;\n\n return {\n interactionType: InteractionType.Popup,\n authRequest: {\n scopes: [msConf?.clientId]\n },\n type: 'b2c'\n };\n}\n\nexport function withMicrosoftSupport(\n type?: string\n): AuthFeature<AuthFeatureKind.Microsoft> {\n if (type === 'b2c') {\n return {\n kind: AuthFeatureKind.Microsoft,\n providers: [\n {\n provide: MSAL_INSTANCE,\n useFactory: MSALConfigFactoryb2c,\n deps: [ConfigService]\n },\n {\n provide: MSAL_GUARD_CONFIG,\n useFactory: MSALAngularConfigFactoryb2c,\n deps: [ConfigService],\n multi: true\n },\n MsalServiceb2c\n ]\n };\n } else {\n return {\n kind: AuthFeatureKind.Microsoft,\n providers: [\n {\n provide: MSAL_INSTANCE,\n useFactory: MSALConfigFactory,\n deps: [ConfigService]\n },\n {\n provide: MSAL_GUARD_CONFIG,\n useFactory: MSALAngularConfigFactory,\n deps: [ConfigService],\n multi: true\n },\n MsalService\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i1.MsalServiceb2c"],"mappings":";;;;;;;;;;;;;;;;;;MA2Ca,sBAAsB,CAAA;AASvB,IAAA,WAAA;AACA,IAAA,MAAA;AACA,IAAA,MAAA;AACA,IAAA,WAAA;AAEA,IAAA,eAAA;AAbF,IAAA,OAAO;AACE,IAAA,YAAY,GAAG,IAAI,OAAO,EAAQ;AACzC,IAAA,KAAK,GAA0B,IAAI,YAAY,EAAW;AAC5D,IAAA,gBAAgB;IAExB,OAAO,GAAY,cAAc;IAEjC,WACU,CAAA,WAAwB,EACxB,MAAqB,EACrB,MAAsB,EACtB,WAAwB,EAExB,eAA4C,EAAA;Q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C1B,oBAAA,UAAU,EAAE,wBAAwB;oBACpC,IAAI,EAAE,CAAC,aAAa,CAAC;AACrB,oBAAA,KAAK,EAAE;AACR,iBAAA;gBACD;AACD;SACF;;AAEL;;ACxIA;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-auth-microsoft.mjs","sources":["../../../packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.ts","../../../packages/auth/microsoft/src/auth-microsoft/auth-microsoft.component.html","../../../packages/auth/microsoft/src/auth-microsoftb2c/auth-msalServiceb2c.service.ts","../../../packages/auth/microsoft/src/auth-microsoftb2c/auth-msalBroadcastServiceb2c.service.ts","../../../packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.ts","../../../packages/auth/microsoft/src/auth-microsoftb2c/auth-microsoftb2c.component.html","../../../packages/auth/microsoft/src/auth-microsoft.provider.ts","../../../packages/auth/microsoft/src/igo2-auth-microsoft.ts"],"sourcesContent":["import {\n ApplicationRef,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Inject,\n Output\n} from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\n\nimport { AuthService } from '@igo2/auth';\nimport { IconSvg, IgoIconComponent, MICROSOFT_ICON } from '@igo2/common/icon';\nimport { ConfigService } from '@igo2/core/config';\nimport { IgoLanguageModule } from '@igo2/core/language';\n\nimport {\n MSAL_GUARD_CONFIG,\n MsalBroadcastService,\n MsalService\n} from '@azure/msal-angular';\nimport {\n AuthenticationResult,\n InteractionRequiredAuthError,\n InteractionStatus,\n PopupRequest,\n PublicClientApplication,\n SilentRequest\n} from '@azure/msal-browser';\nimport { Subject } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\n\nimport {\n AuthMicrosoftOptions,\n MSPMsalGuardConfiguration\n} from '../shared/auth-microsoft.interface';\n\n@Component({\n selector: 'igo-auth-microsoft',\n templateUrl: './auth-microsoft.component.html',\n styleUrls: ['./auth-microsoft.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [MatButtonModule, IgoLanguageModule, IgoIconComponent]\n})\nexport class AuthMicrosoftComponent {\n private options?: AuthMicrosoftOptions;\n private readonly _destroying$ = new Subject<void>();\n @Output() login: EventEmitter<boolean> = new EventEmitter<boolean>();\n private broadcastService: MsalBroadcastService;\n\n svgIcon: IconSvg = MICROSOFT_ICON;\n\n constructor(\n private authService: AuthService,\n private config: ConfigService,\n private appRef: ApplicationRef,\n private msalService: MsalService,\n @Inject(MSAL_GUARD_CONFIG)\n private msalGuardConfig: MSPMsalGuardConfiguration[]\n ) {\n this.options = this.config.getConfig('auth.microsoft');\n\n this.msalService.instance = new PublicClientApplication({\n auth: this.options,\n cache: {\n cacheLocation: 'sessionStorage'\n }\n });\n\n this.broadcastService = new MsalBroadcastService(\n this.msalService.instance,\n this.msalService\n );\n\n if (this.options?.clientId) {\n this.broadcastService.inProgress$\n .pipe(\n filter(\n (status: InteractionStatus) => status === InteractionStatus.None\n ),\n takeUntil(this._destroying$)\n )\n .subscribe(() => {\n this.checkAccount();\n });\n } else {\n console.warn('Microsoft authentification needs \"clientId\" option');\n }\n }\n\n public loginMicrosoft() {\n this.msalService\n .loginPopup({ ...this.getConf().authRequest } as PopupRequest)\n .subscribe((response: AuthenticationResult) => {\n this.msalService.instance.setActiveAccount(response.account);\n this.checkAccount();\n });\n }\n\n private checkAccount() {\n this.msalService.instance\n .acquireTokenSilent(this.getConf().authRequest as SilentRequest)\n .then((response: AuthenticationResult) => {\n const tokenAccess = response.accessToken;\n const tokenId = response.idToken;\n this.authService\n .loginWithToken(tokenAccess, 'microsoft', { tokenId })\n .subscribe(() => {\n this.appRef.tick();\n this.login.emit(true);\n });\n })\n .catch(async (error) => {\n if (error instanceof InteractionRequiredAuthError) {\n // fallback to interaction when silent call fails\n return this.msalService.acquireTokenPopup(\n this.getConf().authRequest as SilentRequest\n );\n }\n console.log(error);\n })\n .catch(() => {\n console.log('Silent token fails');\n });\n }\n\n private getConf(): MSPMsalGuardConfiguration {\n return this.msalGuardConfig.filter((conf) => conf.type === 'add')[0];\n }\n}\n","<button\n class=\"microsoft-login-button\"\n mat-raised-button\n (click)=\"loginMicrosoft()\"\n>\n <igo-icon [icon]=\"svgIcon\"></igo-icon>\n {{ 'igo.auth.microsoft.login' | translate }}\n</button>\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { Location } from '@angular/common';\nimport { Inject, Injectable } from '@angular/core';\n\nimport { MSAL_INSTANCE } from '@azure/msal-angular';\nimport { IMsalService } from '@azure/msal-angular';\nimport {\n AuthenticationResult,\n EndSessionPopupRequest,\n EndSessionRequest,\n IPublicClientApplication,\n Logger,\n PopupRequest,\n RedirectRequest,\n SilentRequest,\n SsoSilentRequest,\n WrapperSKU\n} from '@azure/msal-browser';\nimport { Observable, from } from 'rxjs';\n\n@Injectable()\nexport class MsalServiceb2c implements IMsalService {\n private redirectHash: string;\n private logger: Logger;\n private name = '@azure/msal-angular';\n private version = '2.0.0-beta.2';\n constructor(\n @Inject(MSAL_INSTANCE) public instance: IPublicClientApplication,\n private location: Location\n ) {\n const hash = this.location.path(true).split('#').pop();\n if (hash) {\n this.redirectHash = `#${hash}`;\n }\n this.instance.initializeWrapperLibrary(WrapperSKU.Angular, this.version);\n }\n\n initialize(): Observable<void> {\n return from(this.instance.initialize());\n }\n\n acquireTokenPopup(request: PopupRequest): Observable<AuthenticationResult> {\n return from(this.instance.acquireTokenPopup(request));\n }\n acquireTokenRedirect(request: RedirectRequest): Observable<void> {\n return from(this.instance.acquireTokenRedirect(request));\n }\n acquireTokenSilent(\n silentRequest: SilentRequest\n ): Observable<AuthenticationResult> {\n return from(this.instance.acquireTokenSilent(silentRequest));\n }\n handleRedirectObservable(hash?: string): Observable<AuthenticationResult> {\n return from(this.instance.handleRedirectPromise(hash || this.redirectHash));\n }\n loginPopup(request?: PopupRequest): Observable<AuthenticationResult> {\n return from(this.instance.loginPopup(request));\n }\n loginRedirect(request?: RedirectRequest): Observable<void> {\n return from(this.instance.loginRedirect(request));\n }\n logout(logoutRequest?: EndSessionRequest): Observable<void> {\n return from(this.instance.logout(logoutRequest));\n }\n logoutRedirect(logoutRequest?: EndSessionRequest): Observable<void> {\n return from(this.instance.logoutRedirect(logoutRequest));\n }\n logoutPopup(logoutRequest?: EndSessionPopupRequest): Observable<void> {\n return from(this.instance.logoutPopup(logoutRequest));\n }\n ssoSilent(request: SsoSilentRequest): Observable<AuthenticationResult> {\n return from(this.instance.ssoSilent(request));\n }\n /**\n * Gets logger for msal-angular.\n * If no logger set, returns logger instance created with same options as msal-browser\n */\n getLogger(): Logger {\n if (!this.logger) {\n this.logger = this.instance.getLogger().clone(this.name, this.version);\n }\n return this.logger;\n }\n // Create a logger instance for msal-angular with the same options as msal-browser\n setLogger(logger: Logger): void {\n this.logger = logger.clone(this.name, this.version);\n this.instance.setLogger(logger);\n }\n}\n","/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { Inject, Injectable } from '@angular/core';\n\nimport { MSAL_INSTANCE } from '@azure/msal-angular';\nimport {\n EventMessage,\n EventMessageUtils,\n IPublicClientApplication,\n InteractionStatus\n} from '@azure/msal-browser';\nimport { BehaviorSubject, Observable, Subject } from 'rxjs';\n\nimport { MsalServiceb2c } from './auth-msalServiceb2c.service';\n\n@Injectable()\nexport class MsalBroadcastServiceb2c {\n private _msalSubject: Subject<EventMessage>;\n public msalSubject$: Observable<EventMessage>;\n private _inProgress: BehaviorSubject<InteractionStatus>;\n public inProgress$: Observable<InteractionStatus>;\n\n constructor(\n @Inject(MSAL_INSTANCE) private msalInstance: IPublicClientApplication,\n private authService: MsalServiceb2c\n ) {\n this._msalSubject = new Subject<EventMessage>();\n this.msalSubject$ = this._msalSubject.asObservable();\n\n // InProgress as BehaviorSubject so most recent inProgress state will be available upon subscription\n this._inProgress = new BehaviorSubject<InteractionStatus>(\n InteractionStatus.Startup\n );\n this.inProgress$ = this._inProgress.asObservable();\n\n this.msalInstance.addEventCallback((message: EventMessage) => {\n this._msalSubject.next(message);\n const status = EventMessageUtils.getInteractionStatusFromEvent(message);\n if (status !== null) {\n this.authService\n .getLogger()\n .verbose(\n `BroadcastService - ${message.eventType} results in setting inProgress to ${status}`\n );\n this._inProgress.next(status);\n }\n });\n }\n}\n","import {\n ApplicationRef,\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Inject,\n Output\n} from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\n\nimport { AuthService } from '@igo2/auth';\nimport { IconSvg, IgoIconComponent, MICROSOFT_ICON } from '@igo2/common/icon';\nimport { ConfigService } from '@igo2/core/config';\nimport { IgoLanguageModule } from '@igo2/core/language';\n\nimport { MSAL_GUARD_CONFIG } from '@azure/msal-angular';\nimport {\n AuthenticationResult,\n InteractionRequiredAuthError,\n InteractionStatus,\n PopupRequest,\n PublicClientApplication,\n SilentRequest\n} from '@azure/msal-browser';\nimport { Subject } from 'rxjs';\nimport { filter, takeUntil } from 'rxjs/operators';\n\nimport {\n AuthMicrosoftb2cOptions,\n MSPMsalGuardConfiguration\n} from '../shared/auth-microsoft.interface';\nimport { MsalBroadcastServiceb2c } from './auth-msalBroadcastServiceb2c.service';\nimport { MsalServiceb2c } from './auth-msalServiceb2c.service';\n\n@Component({\n selector: 'igo-auth-microsoftb2c',\n templateUrl: './auth-microsoftb2c.component.html',\n styleUrls: ['./auth-microsoftb2c.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n imports: [MatButtonModule, IgoLanguageModule, IgoIconComponent],\n providers: [MsalServiceb2c]\n})\nexport class AuthMicrosoftb2cComponent {\n private options: AuthMicrosoftb2cOptions;\n private readonly _destroying$ = new Subject<void>();\n @Output() login: EventEmitter<boolean> = new EventEmitter<boolean>();\n private broadcastService: MsalBroadcastServiceb2c;\n\n svgIcon: IconSvg = MICROSOFT_ICON;\n\n constructor(\n private authService: AuthService,\n private config: ConfigService,\n private appRef: ApplicationRef,\n private msalService: MsalServiceb2c,\n @Inject(MSAL_GUARD_CONFIG)\n private msalGuardConfig: MSPMsalGuardConfiguration[]\n ) {\n this.options = this.config.getConfig('auth.microsoftb2c') || {};\n\n this.msalService.instance = new PublicClientApplication({\n auth: this.options.browserAuthOptions,\n cache: {\n cacheLocation: 'sessionStorage'\n }\n });\n\n this.broadcastService = new MsalBroadcastServiceb2c(\n this.msalService.instance,\n this.msalService\n );\n\n if (this.options.browserAuthOptions.clientId) {\n this.broadcastService.inProgress$\n .pipe(\n filter(\n (status: InteractionStatus) => status === InteractionStatus.None\n ),\n takeUntil(this._destroying$)\n )\n .subscribe(() => {\n this.checkAccount();\n });\n } else {\n console.warn('Microsoft authentification needs \"clientId\" option');\n }\n }\n\n public loginMicrosoftb2c() {\n this.msalService\n .loginPopup({ ...this.getConf().authRequest } as PopupRequest)\n .subscribe((response: AuthenticationResult) => {\n this.msalService.instance.setActiveAccount(response.account);\n this.checkAccount();\n });\n }\n\n private checkAccount() {\n this.msalService.instance\n .acquireTokenSilent(this.getConf().authRequest as SilentRequest)\n .then((response: AuthenticationResult) => {\n const token = response.idToken;\n this.authService.loginWithToken(token, 'microsoftb2c').subscribe(() => {\n this.appRef.tick();\n this.login.emit(true);\n });\n })\n .catch(async (error) => {\n if (error instanceof InteractionRequiredAuthError) {\n // fallback to interaction when silent call fails\n return this.msalService.acquireTokenPopup(\n this.getConf().authRequest as SilentRequest\n );\n }\n })\n .catch(() => {\n console.log('Silent token fails');\n });\n }\n\n private getConf(): MSPMsalGuardConfiguration {\n return this.msalGuardConfig.filter((conf) => conf.type === 'b2c')[0];\n }\n}\n","<button\n class=\"microsoft-login-button\"\n mat-raised-button\n (click)=\"loginMicrosoftb2c()\"\n>\n <igo-icon [icon]=\"svgIcon\"></igo-icon>\n {{ 'igo.auth.microsoftb2c.login' | translate }}\n</button>\n","import { AuthFeature, AuthFeatureKind } from '@igo2/auth';\nimport { ConfigService } from '@igo2/core/config';\n\nimport {\n MSAL_GUARD_CONFIG,\n MSAL_INSTANCE,\n MsalService\n} from '@azure/msal-angular';\nimport { InteractionType, PublicClientApplication } from '@azure/msal-browser';\nimport { BrowserAuthOptions } from '@azure/msal-browser';\n\nimport { AuthMicrosoftComponent } from './auth-microsoft/auth-microsoft.component';\nimport { AuthMicrosoftb2cComponent } from './auth-microsoftb2c/auth-microsoftb2c.component';\nimport { MsalServiceb2c } from './auth-microsoftb2c/auth-msalServiceb2c.service';\nimport {\n AuthMicrosoftOptions,\n MSPMsalGuardConfiguration\n} from './shared/auth-microsoft.interface';\n\nexport const AUTH_MICROSOFT_DIRECTIVES = [\n AuthMicrosoftComponent,\n AuthMicrosoftb2cComponent\n] as const;\n\nexport function MSALConfigFactory(\n config: ConfigService\n): PublicClientApplication {\n const msConf = config.getConfig('auth.microsoft') as AuthMicrosoftOptions;\n if (!msConf) {\n return;\n }\n\n msConf.redirectUri = msConf?.redirectUri || window.location.href;\n msConf.authority =\n msConf?.authority || 'https://login.microsoftonline.com/organizations';\n\n const myMsalObj = new PublicClientApplication({\n auth: msConf,\n cache: {\n cacheLocation: 'sessionStorage'\n }\n });\n\n return myMsalObj;\n}\n\nexport function MSALConfigFactoryb2c(\n config: ConfigService\n): PublicClientApplication {\n const msConf = config.getConfig(\n 'auth.microsoftb2c.browserAuthOptions'\n ) as BrowserAuthOptions;\n if (!msConf) {\n return;\n }\n msConf.redirectUri = msConf?.redirectUri || window.location.href;\n msConf.authority =\n msConf?.authority || 'https://login.microsoftonline.com/organizations';\n\n const myMsalObj = new PublicClientApplication({\n auth: msConf,\n cache: {\n cacheLocation: 'sessionStorage'\n }\n });\n\n return myMsalObj;\n}\n\nexport function MSALAngularConfigFactory(): MSPMsalGuardConfiguration {\n return {\n interactionType: InteractionType.Popup,\n authRequest: {\n scopes: ['user.read'],\n loginHint: 'todo'\n },\n type: 'add'\n };\n}\n\nexport function MSALAngularConfigFactoryb2c(\n config: ConfigService\n): MSPMsalGuardConfiguration {\n const msConf = config.getConfig(\n 'auth.microsoftb2c.browserAuthOptions'\n ) as BrowserAuthOptions;\n\n return {\n interactionType: InteractionType.Popup,\n authRequest: {\n scopes: [msConf?.clientId]\n },\n type: 'b2c'\n };\n}\n\nexport function withMicrosoftSupport(\n type?: string\n): AuthFeature<AuthFeatureKind.Microsoft> {\n if (type === 'b2c') {\n return {\n kind: AuthFeatureKind.Microsoft,\n providers: [\n {\n provide: MSAL_INSTANCE,\n useFactory: MSALConfigFactoryb2c,\n deps: [ConfigService]\n },\n {\n provide: MSAL_GUARD_CONFIG,\n useFactory: MSALAngularConfigFactoryb2c,\n deps: [ConfigService],\n multi: true\n },\n MsalServiceb2c\n ]\n };\n } else {\n return {\n kind: AuthFeatureKind.Microsoft,\n providers: [\n {\n provide: MSAL_INSTANCE,\n useFactory: MSALConfigFactory,\n deps: [ConfigService]\n },\n {\n provide: MSAL_GUARD_CONFIG,\n useFactory: MSALAngularConfigFactory,\n deps: [ConfigService],\n multi: true\n },\n MsalService\n ]\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1","i1.MsalServiceb2c"],"mappings":";;;;;;;;;;;;;;;;;;MA4Ca,sBAAsB,CAAA;AASvB,IAAA,WAAA,CAAA;AACA,IAAA,MAAA,CAAA;AACA,IAAA,MAAA,CAAA;AACA,IAAA,WAAA,CAAA;AAEA,IAAA,eAAA,CAAA;AAbF,IAAA,OAAO,CAAwB;AACtB,IAAA,YAAY,GAAG,IAAI,OAAO,EAAQ,CAAC;AAC1C,IAAA,KAAK,GAA0B,IAAI,YAAY,EAAW,CAAC;AAC7D,IAAA,gBAAgB,CAAuB;IAE/C,OAAO,GAAY,cAAc,CAAC;IAElC,WACU,CAAA,WAAwB,EACxB,MAAqB,EACrB,MAAsB,EACtB,WAAwB,EAExB,eAA4C,EAAA;QAL5C,IAAW,CAAA,WAAA,GAAX,WAAW,CAAa;QACxB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAe;QACrB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAgB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,EAAE,CAAC,aAAa,CAAC;AACrB,oBAAA,KAAK,EAAE,IAAI;AACZ,iBAAA;gBACD,WAAW;AACZ,aAAA;SACF,CAAC;KACH;AACH;;ACxIA;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, Optional, Inject, Injector, provideAppInitializer, inject } from '@angular/core';
2
+ import { Injectable, Optional, Inject, Injector, APP_INITIALIZER } from '@angular/core';
3
3
  import * as i1 from '@igo2/core/config';
4
4
  import { ConfigService } from '@igo2/core/config';
5
5
  import { identifySentryUser, MONITORING_OPTIONS } from '@igo2/core/monitoring';
@@ -38,10 +38,10 @@ class AuthMonitoringService {
38
38
  break;
39
39
  }
40
40
  }
41
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthMonitoringService, deps: [{ token: i1.ConfigService }, { token: MONITORING_OPTIONS, optional: true }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
42
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthMonitoringService, providedIn: 'root' });
41
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthMonitoringService, deps: [{ token: i1.ConfigService }, { token: MONITORING_OPTIONS, optional: true }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
42
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthMonitoringService, providedIn: 'root' });
43
43
  }
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthMonitoringService, decorators: [{
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthMonitoringService, decorators: [{
45
45
  type: Injectable,
46
46
  args: [{
47
47
  providedIn: 'root'
@@ -64,10 +64,12 @@ function provideAuthUserMonitoring(options) {
64
64
  deps: [ConfigService, MONITORING_OPTIONS, Injector]
65
65
  },
66
66
  // Force instantiate Tracing service to avoid require it in any constructor.
67
- provideAppInitializer(() => {
68
- inject(AuthMonitoringService);
69
- return;
70
- })
67
+ {
68
+ provide: APP_INITIALIZER,
69
+ useFactory: () => () => void 1,
70
+ deps: [AuthMonitoringService],
71
+ multi: true
72
+ }
71
73
  ];
72
74
  }
73
75
 
@@ -1 +1 @@
1
- {"version":3,"file":"igo2-auth-monitoring.mjs","sources":["../../../packages/auth/monitoring/src/auth-monitoring/auth-monitoring.service.ts","../../../packages/auth/monitoring/src/auth-monitoring/auth-monitoring.provider.ts","../../../packages/auth/monitoring/src/igo2-auth-monitoring.ts"],"sourcesContent":["import { Inject, Injectable, Injector, Optional } from '@angular/core';\n\nimport { AuthService, User } from '@igo2/auth';\nimport { ConfigService } from '@igo2/core/config';\nimport {\n AnyMonitoringOptions,\n MONITORING_OPTIONS,\n identifySentryUser\n} from '@igo2/core/monitoring';\n\nimport { first, switchMap } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthMonitoringService {\n // The AuthService need to be lazy provided because this service is provided in the APP_INITIALIZER\n authService?: AuthService;\n\n constructor(\n private configService: ConfigService,\n @Optional()\n @Inject(MONITORING_OPTIONS)\n private monitoringOptions: AnyMonitoringOptions | null,\n private injector: Injector\n ) {\n if (!this.monitoringOptions?.identifyUser) {\n return;\n }\n\n this.configService.isLoaded$\n .pipe(\n first((isLoaded) => isLoaded),\n switchMap(() => {\n this.authService = this.injector.get(AuthService);\n return this.authService?.authenticate$;\n })\n )\n .subscribe((isAuthenticated) => {\n const user = isAuthenticated ? this.authService.user : null;\n this._identifyUser(user);\n });\n }\n\n private _identifyUser(user: User | null): void {\n switch (this.monitoringOptions.provider) {\n case 'sentry':\n identifySentryUser(user);\n break;\n\n default:\n break;\n }\n }\n}\n","import {\n EnvironmentProviders,\n Injector,\n Provider,\n inject,\n provideAppInitializer\n} from '@angular/core';\n\nimport { ConfigService } from '@igo2/core/config';\nimport {\n AnyMonitoringOptions,\n MONITORING_OPTIONS\n} from '@igo2/core/monitoring';\n\nimport { AuthMonitoringService } from './auth-monitoring.service';\n\nexport function provideAuthUserMonitoring(\n options: AnyMonitoringOptions | null\n): (Provider | EnvironmentProviders)[] {\n if (!options) {\n return [];\n }\n\n return [\n {\n provide: AuthMonitoringService,\n useClass: AuthMonitoringService,\n deps: [ConfigService, MONITORING_OPTIONS, Injector]\n },\n // Force instantiate Tracing service to avoid require it in any constructor.\n provideAppInitializer(() => {\n inject(AuthMonitoringService);\n return;\n })\n ];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAea,qBAAqB,CAAA;AAKtB,IAAA,aAAA;AAGA,IAAA,iBAAA;AACA,IAAA,QAAA;;AAPV,IAAA,WAAW;AAEX,IAAA,WAAA,CACU,aAA4B,EAG5B,iBAA8C,EAC9C,QAAkB,EAAA;QAJlB,IAAa,CAAA,aAAA,GAAb,aAAa;QAGb,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB;QACjB,IAAQ,CAAA,QAAA,GAAR,QAAQ;AAEhB,QAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,YAAY,EAAE;YACzC;;QAGF,IAAI,CAAC,aAAa,CAAC;AAChB,aAAA,IAAI,CACH,KAAK,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,EAC7B,SAAS,CAAC,MAAK;YACb,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC;AACjD,YAAA,OAAO,IAAI,CAAC,WAAW,EAAE,aAAa;AACxC,SAAC,CAAC;AAEH,aAAA,SAAS,CAAC,CAAC,eAAe,KAAI;AAC7B,YAAA,MAAM,IAAI,GAAG,eAAe,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,GAAG,IAAI;AAC3D,YAA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KACF;AACH;;ACnCA;;AAEG;;;;"}
1
+ {"version":3,"file":"igo2-auth-monitoring.mjs","sources":["../../../packages/auth/monitoring/src/auth-monitoring/auth-monitoring.service.ts","../../../packages/auth/monitoring/src/auth-monitoring/auth-monitoring.provider.ts","../../../packages/auth/monitoring/src/igo2-auth-monitoring.ts"],"sourcesContent":["import { Inject, Injectable, Injector, Optional } from '@angular/core';\n\nimport { AuthService, User } from '@igo2/auth';\nimport { ConfigService } from '@igo2/core/config';\nimport {\n AnyMonitoringOptions,\n MONITORING_OPTIONS,\n identifySentryUser\n} from '@igo2/core/monitoring';\n\nimport { first, switchMap } from 'rxjs';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthMonitoringService {\n // The AuthService need to be lazy provided because this service is provided in the APP_INITIALIZER\n authService?: AuthService;\n\n constructor(\n private configService: ConfigService,\n @Optional()\n @Inject(MONITORING_OPTIONS)\n private monitoringOptions: AnyMonitoringOptions | null,\n private injector: Injector\n ) {\n if (!this.monitoringOptions?.identifyUser) {\n return;\n }\n\n this.configService.isLoaded$\n .pipe(\n first((isLoaded) => isLoaded),\n switchMap(() => {\n this.authService = this.injector.get(AuthService);\n return this.authService?.authenticate$;\n })\n )\n .subscribe((isAuthenticated) => {\n const user = isAuthenticated ? this.authService.user : null;\n this._identifyUser(user);\n });\n }\n\n private _identifyUser(user: User | null): void {\n switch (this.monitoringOptions.provider) {\n case 'sentry':\n identifySentryUser(user);\n break;\n\n default:\n break;\n }\n }\n}\n","import { APP_INITIALIZER, Injector, Provider } from '@angular/core';\n\nimport { ConfigService } from '@igo2/core/config';\nimport {\n AnyMonitoringOptions,\n MONITORING_OPTIONS\n} from '@igo2/core/monitoring';\n\nimport { AuthMonitoringService } from './auth-monitoring.service';\n\nexport function provideAuthUserMonitoring(\n options: AnyMonitoringOptions | null\n): Provider[] {\n if (!options) {\n return [];\n }\n\n return [\n {\n provide: AuthMonitoringService,\n useClass: AuthMonitoringService,\n deps: [ConfigService, MONITORING_OPTIONS, Injector]\n },\n // Force instantiate Tracing service to avoid require it in any constructor.\n {\n provide: APP_INITIALIZER,\n useFactory: () => () => void 1,\n deps: [AuthMonitoringService],\n multi: true\n }\n ];\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MAea,qBAAqB,CAAA;AAKtB,IAAA,aAAA,CAAA;AAGA,IAAA,iBAAA,CAAA;AACA,IAAA,QAAA,CAAA;;AAPV,IAAA,WAAW,CAAe;AAE1B,IAAA,WAAA,CACU,aAA4B,EAG5B,iBAA8C,EAC9C,QAAkB,EAAA;QAJlB,IAAa,CAAA,aAAA,GAAb,aAAa,CAAe;QAG5B,IAAiB,CAAA,iBAAA,GAAjB,iBAAiB,CAA6B;QAC9C,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;AAE1B,QAAA,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,YAAY,EAAE;YACzC,OAAO;SACR;QAED,IAAI,CAAC,aAAa,CAAC,SAAS;AACzB,aAAA,IAAI,CACH,KAAK,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,EAC7B,SAAS,CAAC,MAAK;YACb,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;AAClD,YAAA,OAAO,IAAI,CAAC,WAAW,EAAE,aAAa,CAAC;AACzC,SAAC,CAAC,CACH;AACA,aAAA,SAAS,CAAC,CAAC,eAAe,KAAI;AAC7B,YAAA,MAAM,IAAI,GAAG,eAAe,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,GAAG,IAAI,CAAC;AAC5D,YAAA,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;AAC3B,SAAC,CAAC,CAAC;KACN;AAEO,IAAA,aAAa,CAAC,IAAiB,EAAA;AACrC,QAAA,QAAQ,IAAI,CAAC,iBAAiB,CAAC,QAAQ;AACrC,YAAA,KAAK,QAAQ;gBACX,kBAAk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C/BA;;AAEG;;;;"}
@@ -49,10 +49,10 @@ class TokenService {
49
49
  }
50
50
  return true;
51
51
  }
52
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: TokenService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
53
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: TokenService, providedIn: 'root' });
52
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TokenService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
53
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TokenService, providedIn: 'root' });
54
54
  }
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: TokenService, decorators: [{
55
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: TokenService, decorators: [{
56
56
  type: Injectable,
57
57
  args: [{
58
58
  providedIn: 'root'
@@ -204,10 +204,10 @@ class AuthService {
204
204
  throw err;
205
205
  }));
206
206
  }
207
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthService, deps: [{ token: i1.HttpClient }, { token: TokenService }, { token: i2.ConfigService }, { token: i4.LanguageService }, { token: i5.MessageService }, { token: i3.Router, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
208
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthService, providedIn: 'root' });
207
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthService, deps: [{ token: i1.HttpClient }, { token: TokenService }, { token: i2.ConfigService }, { token: i4.LanguageService }, { token: i5.MessageService }, { token: i3.Router, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
208
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthService, providedIn: 'root' });
209
209
  }
210
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthService, decorators: [{
210
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthService, decorators: [{
211
211
  type: Injectable,
212
212
  args: [{
213
213
  providedIn: 'root'
@@ -295,10 +295,10 @@ class AuthStorageService extends BaseStorage {
295
295
  });
296
296
  }
297
297
  }
298
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthStorageService, deps: [{ token: i2.ConfigService }, { token: i1.HttpClient }, { token: AuthService }, { token: TokenService }], target: i0.ɵɵFactoryTarget.Injectable });
299
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthStorageService, providedIn: 'root' });
298
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthStorageService, deps: [{ token: i2.ConfigService }, { token: i1.HttpClient }, { token: AuthService }, { token: TokenService }], target: i0.ɵɵFactoryTarget.Injectable });
299
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthStorageService, providedIn: 'root' });
300
300
  }
301
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthStorageService, decorators: [{
301
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthStorageService, decorators: [{
302
302
  type: Injectable,
303
303
  args: [{
304
304
  providedIn: 'root'
@@ -450,10 +450,10 @@ class AuthInterceptor {
450
450
  });
451
451
  }
452
452
  }
453
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthInterceptor, deps: [{ token: i2.ConfigService }, { token: TokenService }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
454
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthInterceptor, providedIn: 'root' });
453
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthInterceptor, deps: [{ token: i2.ConfigService }, { token: TokenService }, { token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
454
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthInterceptor, providedIn: 'root' });
455
455
  }
456
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthInterceptor, decorators: [{
456
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthInterceptor, decorators: [{
457
457
  type: Injectable,
458
458
  args: [{
459
459
  providedIn: 'root'
@@ -480,10 +480,10 @@ class LoggedGuard {
480
480
  }
481
481
  return false;
482
482
  }
483
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: LoggedGuard, deps: [{ token: AuthService }, { token: i2.ConfigService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
484
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: LoggedGuard, providedIn: 'root' });
483
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoggedGuard, deps: [{ token: AuthService }, { token: i2.ConfigService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
484
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoggedGuard, providedIn: 'root' });
485
485
  }
486
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: LoggedGuard, decorators: [{
486
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: LoggedGuard, decorators: [{
487
487
  type: Injectable,
488
488
  args: [{
489
489
  providedIn: 'root'
@@ -510,10 +510,10 @@ class AuthGuard {
510
510
  }
511
511
  return false;
512
512
  }
513
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthGuard, deps: [{ token: AuthService }, { token: i2.ConfigService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
514
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthGuard, providedIn: 'root' });
513
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthGuard, deps: [{ token: AuthService }, { token: i2.ConfigService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
514
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthGuard, providedIn: 'root' });
515
515
  }
516
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AuthGuard, decorators: [{
516
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AuthGuard, decorators: [{
517
517
  type: Injectable,
518
518
  args: [{
519
519
  providedIn: 'root'
@@ -540,10 +540,10 @@ class AdminGuard {
540
540
  }
541
541
  return false;
542
542
  }
543
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AdminGuard, deps: [{ token: AuthService }, { token: i2.ConfigService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
544
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AdminGuard, providedIn: 'root' });
543
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AdminGuard, deps: [{ token: AuthService }, { token: i2.ConfigService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
544
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AdminGuard, providedIn: 'root' });
545
545
  }
546
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: AdminGuard, decorators: [{
546
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: AdminGuard, decorators: [{
547
547
  type: Injectable,
548
548
  args: [{
549
549
  providedIn: 'root'
@@ -574,10 +574,10 @@ class ProfilsGuard {
574
574
  return false;
575
575
  }));
576
576
  }
577
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: ProfilsGuard, deps: [{ token: AuthService }, { token: i2.ConfigService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
578
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: ProfilsGuard, providedIn: 'root' });
577
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProfilsGuard, deps: [{ token: AuthService }, { token: i2.ConfigService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Injectable });
578
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProfilsGuard, providedIn: 'root' });
579
579
  }
580
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: ProfilsGuard, decorators: [{
580
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: ProfilsGuard, decorators: [{
581
581
  type: Injectable,
582
582
  args: [{
583
583
  providedIn: 'root'