@osovitny/anatoly 3.16.18 → 3.16.19

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.
@@ -13,6 +13,8 @@
13
13
  Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
14
14
  </file>
15
15
  */
16
+ //guards
17
+ export * from './guards';
16
18
  //services
17
19
  export * from './services/auth.service';
18
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmF0b2x5L3NyYy9saWIvaWFtL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztFQWNFO0FBRUYsVUFBVTtBQUNWLGNBQWMseUJBQXlCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKlxyXG48ZmlsZT5cclxuICBQcm9qZWN0OlxyXG4gICAgQG9zb3ZpdG55L2FuYXRvbHlcclxuXHJcbiAgQXV0aG9yczpcclxuICAgIFZhZGltIE9zb3ZpdG55IHZhZGltQG9zb3ZpdG55LmNvbVxyXG4gICAgQW5hdG9seSBPc292aXRueSBhbmF0b2x5QG9zb3ZpdG55LmNvbVxyXG5cclxuICBDcmVhdGVkOlxyXG4gICAgMjcgTm92IDIwMjNcclxuXHJcbiAgQ29weXJpZ2h0IChjKSAyMDE2LTIwMjIgT3Nvdml0bnkgSW5jLiBBbGwgcmlnaHRzIHJlc2VydmVkLlxyXG48L2ZpbGU+XHJcbiovXHJcblxyXG4vL3NlcnZpY2VzXHJcbmV4cG9ydCAqIGZyb20gJy4vc2VydmljZXMvYXV0aC5zZXJ2aWNlJztcclxuIl19
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmF0b2x5L3NyYy9saWIvaWFtL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztFQWNFO0FBRUYsUUFBUTtBQUNSLGNBQWMsVUFBVSxDQUFDO0FBRXpCLFVBQVU7QUFDVixjQUFjLHlCQUF5QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcclxuPGZpbGU+XHJcbiAgUHJvamVjdDpcclxuICAgIEBvc292aXRueS9hbmF0b2x5XHJcblxyXG4gIEF1dGhvcnM6XHJcbiAgICBWYWRpbSBPc292aXRueSB2YWRpbUBvc292aXRueS5jb21cclxuICAgIEFuYXRvbHkgT3Nvdml0bnkgYW5hdG9seUBvc292aXRueS5jb21cclxuXHJcbiAgQ3JlYXRlZDpcclxuICAgIDI3IE5vdiAyMDIzXHJcblxyXG4gIENvcHlyaWdodCAoYykgMjAxNi0yMDIyIE9zb3ZpdG55IEluYy4gQWxsIHJpZ2h0cyByZXNlcnZlZC5cclxuPC9maWxlPlxyXG4qL1xyXG5cclxuLy9ndWFyZHNcclxuZXhwb3J0ICogZnJvbSAnLi9ndWFyZHMnO1xyXG5cclxuLy9zZXJ2aWNlc1xyXG5leHBvcnQgKiBmcm9tICcuL3NlcnZpY2VzL2F1dGguc2VydmljZSc7XHJcbiJdfQ==
@@ -2730,6 +2730,91 @@ class AuthService extends ApiServiceBase {
2730
2730
  args: [MSAL_GUARD_CONFIG]
2731
2731
  }] }, { type: i4.MsalService }, { type: i4.MsalBroadcastService }]; }, null); })();
2732
2732
 
2733
+ /*
2734
+ <file>
2735
+ Project:
2736
+ @osovitny/anatoly
2737
+
2738
+ Authors:
2739
+ Vadim Osovitny vadim@osovitny.com
2740
+ Anatoly Osovitny anatoly@osovitny.com
2741
+
2742
+ Created:
2743
+ 6 Dec 2018
2744
+
2745
+ Description:
2746
+ Identity and Access Management
2747
+
2748
+ Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2749
+ </file>
2750
+ */
2751
+ //Node
2752
+ class AdminGuard {
2753
+ auth;
2754
+ constructor(auth) {
2755
+ this.auth = auth;
2756
+ }
2757
+ isUserAdmin() {
2758
+ return of(this.auth.isUserAdmin());
2759
+ }
2760
+ canActivate(next, state) {
2761
+ return this.isUserAdmin();
2762
+ }
2763
+ canActivateChild(route, state) {
2764
+ if (route.component) {
2765
+ return this.isUserAdmin();
2766
+ }
2767
+ return of(true);
2768
+ }
2769
+ static ɵfac = function AdminGuard_Factory(t) { return new (t || AdminGuard)(i0.ɵɵinject(AuthService)); };
2770
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AdminGuard, factory: AdminGuard.ɵfac });
2771
+ }
2772
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AdminGuard, [{
2773
+ type: Injectable
2774
+ }], function () { return [{ type: AuthService }]; }, null); })();
2775
+
2776
+ class AuthenticationGuard extends MsalGuard {
2777
+ _msalGuardConfig;
2778
+ constructor(msalGuardConfig, msalBroadcastService, authService, location, router) {
2779
+ super(msalGuardConfig, msalBroadcastService, authService, location, router);
2780
+ this._msalGuardConfig = msalGuardConfig;
2781
+ }
2782
+ setInteractionType(route) {
2783
+ let interactionType = route.data.interactionType;
2784
+ this._msalGuardConfig.interactionType = interactionType || InteractionType.Redirect;
2785
+ }
2786
+ canActivate(route, state) {
2787
+ this.setInteractionType(route);
2788
+ return super.canActivate(route, state);
2789
+ }
2790
+ static ɵfac = function AuthenticationGuard_Factory(t) { return new (t || AuthenticationGuard)(i0.ɵɵinject(MSAL_GUARD_CONFIG), i0.ɵɵinject(i4.MsalBroadcastService), i0.ɵɵinject(i4.MsalService), i0.ɵɵinject(i1$5.Location), i0.ɵɵinject(i1.Router)); };
2791
+ static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AuthenticationGuard, factory: AuthenticationGuard.ɵfac });
2792
+ }
2793
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthenticationGuard, [{
2794
+ type: Injectable
2795
+ }], function () { return [{ type: undefined, decorators: [{
2796
+ type: Inject,
2797
+ args: [MSAL_GUARD_CONFIG]
2798
+ }] }, { type: i4.MsalBroadcastService }, { type: i4.MsalService }, { type: i1$5.Location }, { type: i1.Router }]; }, null); })();
2799
+
2800
+ /*
2801
+ <file>
2802
+ Project:
2803
+ QA
2804
+
2805
+ Authors:
2806
+ Vadim Osovitny vadim@osovitny.com
2807
+
2808
+ Created:
2809
+ 6 Dec 2018
2810
+
2811
+ Description:
2812
+ Identity and Access Management
2813
+
2814
+ Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2815
+ </file>
2816
+ */
2817
+
2733
2818
  /*
2734
2819
  <file>
2735
2820
  Project:
@@ -2745,7 +2830,7 @@ class AuthService extends ApiServiceBase {
2745
2830
  Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
2746
2831
  </file>
2747
2832
  */
2748
- //services
2833
+ //guards
2749
2834
 
2750
2835
  /*
2751
2836
  <file>
@@ -6012,91 +6097,6 @@ function loggerCallback(logLevel, message, containsPii) {
6012
6097
  }
6013
6098
  }
6014
6099
 
6015
- /*
6016
- <file>
6017
- Project:
6018
- @osovitny/anatoly
6019
-
6020
- Authors:
6021
- Vadim Osovitny vadim@osovitny.com
6022
- Anatoly Osovitny anatoly@osovitny.com
6023
-
6024
- Created:
6025
- 6 Dec 2018
6026
-
6027
- Description:
6028
- Identity and Access Management
6029
-
6030
- Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
6031
- </file>
6032
- */
6033
- //Node
6034
- class AdminGuard {
6035
- auth;
6036
- constructor(auth) {
6037
- this.auth = auth;
6038
- }
6039
- isUserAdmin() {
6040
- return of(this.auth.isUserAdmin());
6041
- }
6042
- canActivate(next, state) {
6043
- return this.isUserAdmin();
6044
- }
6045
- canActivateChild(route, state) {
6046
- if (route.component) {
6047
- return this.isUserAdmin();
6048
- }
6049
- return of(true);
6050
- }
6051
- static ɵfac = function AdminGuard_Factory(t) { return new (t || AdminGuard)(i0.ɵɵinject(AuthService)); };
6052
- static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AdminGuard, factory: AdminGuard.ɵfac });
6053
- }
6054
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AdminGuard, [{
6055
- type: Injectable
6056
- }], function () { return [{ type: AuthService }]; }, null); })();
6057
-
6058
- class AuthenticationGuard extends MsalGuard {
6059
- _msalGuardConfig;
6060
- constructor(msalGuardConfig, msalBroadcastService, authService, location, router) {
6061
- super(msalGuardConfig, msalBroadcastService, authService, location, router);
6062
- this._msalGuardConfig = msalGuardConfig;
6063
- }
6064
- setInteractionType(route) {
6065
- let interactionType = route.data.interactionType;
6066
- this._msalGuardConfig.interactionType = interactionType || InteractionType.Redirect;
6067
- }
6068
- canActivate(route, state) {
6069
- this.setInteractionType(route);
6070
- return super.canActivate(route, state);
6071
- }
6072
- static ɵfac = function AuthenticationGuard_Factory(t) { return new (t || AuthenticationGuard)(i0.ɵɵinject(MSAL_GUARD_CONFIG), i0.ɵɵinject(i4.MsalBroadcastService), i0.ɵɵinject(i4.MsalService), i0.ɵɵinject(i1$5.Location), i0.ɵɵinject(i1.Router)); };
6073
- static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: AuthenticationGuard, factory: AuthenticationGuard.ɵfac });
6074
- }
6075
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AuthenticationGuard, [{
6076
- type: Injectable
6077
- }], function () { return [{ type: undefined, decorators: [{
6078
- type: Inject,
6079
- args: [MSAL_GUARD_CONFIG]
6080
- }] }, { type: i4.MsalBroadcastService }, { type: i4.MsalService }, { type: i1$5.Location }, { type: i1.Router }]; }, null); })();
6081
-
6082
- /*
6083
- <file>
6084
- Project:
6085
- QA
6086
-
6087
- Authors:
6088
- Vadim Osovitny vadim@osovitny.com
6089
-
6090
- Created:
6091
- 6 Dec 2018
6092
-
6093
- Description:
6094
- Identity and Access Management
6095
-
6096
- Copyright (c) 2016-2022 Osovitny Inc. All rights reserved.
6097
- </file>
6098
- */
6099
-
6100
6100
  /*
6101
6101
  <file>
6102
6102
  Project:
@@ -6737,5 +6737,5 @@ class AnatolyModule {
6737
6737
  * Generated bundle index. Do not edit.
6738
6738
  */
6739
6739
 
6740
- export { AddressComponent, Alerts, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyIAMModule, AnatolyIAMPagesModule, AnatolyModule, AnatolyUIModule, ApiServiceBase, ApiUrl, AppContextService, AppCoreSettings, AppName, AppVersion, AuthService, BaseComponent, BaseDialog, BaseEditComponent, BaseGoService, BaseHtmlEditorComponent, BaseList, BasePage, BasePagedPage, Browser, BuyAccessButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CheckIconComponent, CompanyComponent, ContactUsDialog, ContactUsForm, Convert, Copy2ClipboardComponent, CoreApiService, DOM, DatapagerComponent, DefaultEditorOptions, DigitalMarketingService, EmailsApiService, FileSizePipe, FormValidationSummaryComponent, FormsHtmlEditorComponent, GlobalErrorHandler, GoogleAnalyticsService, GridEditServiceBase, GridReadServiceBase, Guid, HoveringDirective, HtmlEditorComponent, IdleService, InjectorInstance, ItemValidationSummaryComponent, L10NUrl, LoadingComponent, LoadingService, LocalStorageService, LocalizationInjectorInstance, LocalizationModule, LocalizationService, LocalizationSettingsModule, LocalizePipe, LoggingService, NativeElementDirective, NodataComponent, NotificationService, PageSpinnerComponent, ReplaceTextPipe, SafeHtmlPipe, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, StarterServiceBase, Stopwatch, Subs, SubscribePlanButtonComponent, TimezoneDropdownlist, UrlSlugComponent, Utils, ValidationSummaryComponent, XmlFormatter, localizationInitializerFactory, throwIfAlreadyLoaded, translateLoaderFactory };
6740
+ export { AddressComponent, AdminGuard, Alerts, AnatolyCoreModule, AnatolyDataModule, AnatolyHttpInterceptor, AnatolyIAMModule, AnatolyIAMPagesModule, AnatolyModule, AnatolyUIModule, ApiServiceBase, ApiUrl, AppContextService, AppCoreSettings, AppName, AppVersion, AuthService, AuthenticationGuard, BaseComponent, BaseDialog, BaseEditComponent, BaseGoService, BaseHtmlEditorComponent, BaseList, BasePage, BasePagedPage, Browser, BuyAccessButtonComponent, CardBodyComponent, CardComponent, CardFooterComponent, CardHeaderComponent, CheckIconComponent, CompanyComponent, ContactUsDialog, ContactUsForm, Convert, Copy2ClipboardComponent, CoreApiService, DOM, DatapagerComponent, DefaultEditorOptions, DigitalMarketingService, EmailsApiService, FileSizePipe, FormValidationSummaryComponent, FormsHtmlEditorComponent, GlobalErrorHandler, GoogleAnalyticsService, GridEditServiceBase, GridReadServiceBase, Guid, HoveringDirective, HtmlEditorComponent, IdleService, InjectorInstance, ItemValidationSummaryComponent, L10NUrl, LoadingComponent, LoadingService, LocalStorageService, LocalizationInjectorInstance, LocalizationModule, LocalizationService, LocalizationSettingsModule, LocalizePipe, LoggingService, NativeElementDirective, NodataComponent, NotificationService, PageSpinnerComponent, ReplaceTextPipe, SafeHtmlPipe, SessionStorageService, SignInButtonComponent, SignOutButtonComponent, SignUpButtonComponent, StarterServiceBase, Stopwatch, Subs, SubscribePlanButtonComponent, TimezoneDropdownlist, UrlSlugComponent, Utils, ValidationSummaryComponent, XmlFormatter, localizationInitializerFactory, throwIfAlreadyLoaded, translateLoaderFactory };
6741
6741
  //# sourceMappingURL=osovitny-anatoly.mjs.map