@resolveio/client-lib-core 2.0.1 → 2.0.3

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.
@@ -14,7 +14,7 @@ import { finalize } from 'rxjs/operators';
14
14
  import { detailedDiff } from 'deep-object-diff';
15
15
  import moment from 'moment';
16
16
  import * as i1$3 from '@angular/router';
17
- import { RouterModule, Router, RouterStateSnapshot } from '@angular/router';
17
+ import { RouterModule, Router } from '@angular/router';
18
18
  import * as i4 from '@angular/common/http';
19
19
  import { HttpClientModule } from '@angular/common/http';
20
20
  import * as i1$4 from '@ng-bootstrap/ng-bootstrap';
@@ -7348,10 +7348,10 @@ class HomeComponent extends BaseComponent {
7348
7348
  }
7349
7349
  }
7350
7350
  HomeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HomeComponent, deps: [{ token: i1$3.ActivatedRoute }, { token: AuthService }, { token: ProviderService }, { token: i4.HttpClient }, { token: CoreService }], target: i0.ɵɵFactoryTarget.Component });
7351
- HomeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: HomeComponent, selector: "ng-component", providers: [ProviderService], usesInheritance: true, ngImport: i0, template: "<div style=\"height: 100%\">\n <div class=\"row\" style=\"margin-left: 0px; margin-right: 0px; height: 100%;\">\n <div class=\"col-lg-12\" style=\"height: 100%\">\n <div class=\"jumbotron jumbotron-fluid\" style=\"height: 100%; padding-bottom: 0px;\">\n <div class=\"container text-center\" style=\"height: 100%\">\n <img src=\"/assets/images/ResolveIO.png\" class=\"img-fluid\" alt=\"Responsive image\" style=\"height: 100%; width: auto; max-width: 750px; max-height: 525px;\">\n <p style=\"font-size: 24px; font-style: italic\">The All-in-One Solution for Tracking Inventory, Ordering, POs, Management, and Much More!</p>\n </div>\n </div>\n </div>\n </div> \n</div>" });
7351
+ HomeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: HomeComponent, selector: "ng-component", providers: [ProviderService], usesInheritance: true, ngImport: i0, template: "<div style=\"height: 100%\">\n <div class=\"row\" style=\"margin-left: 0px; margin-right: 0px; height: 100%;\">\n <div class=\"col-lg-12\" style=\"height: 100%\">\n <div class=\"bg-light p-3\" style=\"height: 100%; padding-bottom: 0px;\">\n <div class=\"container text-center\" style=\"height: 100%\">\n <img src=\"/assets/images/ResolveIO.png\" class=\"img-fluid\" alt=\"Responsive image\" style=\"height: 100%; width: auto; max-width: 750px; max-height: 525px;\">\n <p style=\"font-size: 24px; font-style: italic\">The All-in-One Solution for Tracking Inventory, Ordering, POs, Management, and Much More!</p>\n </div>\n </div>\n </div>\n </div> \n</div>" });
7352
7352
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: HomeComponent, decorators: [{
7353
7353
  type: Component,
7354
- args: [{ providers: [ProviderService], template: "<div style=\"height: 100%\">\n <div class=\"row\" style=\"margin-left: 0px; margin-right: 0px; height: 100%;\">\n <div class=\"col-lg-12\" style=\"height: 100%\">\n <div class=\"jumbotron jumbotron-fluid\" style=\"height: 100%; padding-bottom: 0px;\">\n <div class=\"container text-center\" style=\"height: 100%\">\n <img src=\"/assets/images/ResolveIO.png\" class=\"img-fluid\" alt=\"Responsive image\" style=\"height: 100%; width: auto; max-width: 750px; max-height: 525px;\">\n <p style=\"font-size: 24px; font-style: italic\">The All-in-One Solution for Tracking Inventory, Ordering, POs, Management, and Much More!</p>\n </div>\n </div>\n </div>\n </div> \n</div>" }]
7354
+ args: [{ providers: [ProviderService], template: "<div style=\"height: 100%\">\n <div class=\"row\" style=\"margin-left: 0px; margin-right: 0px; height: 100%;\">\n <div class=\"col-lg-12\" style=\"height: 100%\">\n <div class=\"bg-light p-3\" style=\"height: 100%; padding-bottom: 0px;\">\n <div class=\"container text-center\" style=\"height: 100%\">\n <img src=\"/assets/images/ResolveIO.png\" class=\"img-fluid\" alt=\"Responsive image\" style=\"height: 100%; width: auto; max-width: 750px; max-height: 525px;\">\n <p style=\"font-size: 24px; font-style: italic\">The All-in-One Solution for Tracking Inventory, Ordering, POs, Management, and Much More!</p>\n </div>\n </div>\n </div>\n </div> \n</div>" }]
7355
7355
  }], ctorParameters: function () { return [{ type: i1$3.ActivatedRoute }, { type: AuthService }, { type: ProviderService }, { type: i4.HttpClient }, { type: CoreService }]; } });
7356
7356
 
7357
7357
  class CoreModule {
@@ -7494,7 +7494,6 @@ const AuthGuard = (next) => {
7494
7494
  let _offline = inject(OfflineManagerService);
7495
7495
  let _aps = inject(AuthPermissionService);
7496
7496
  // let _alert = inject(AlertService);
7497
- let _state = inject(RouterStateSnapshot);
7498
7497
  return new Promise((resolve) => {
7499
7498
  _account.isInitCompleted().then(() => {
7500
7499
  let user = _account.getUser();
@@ -7514,7 +7513,9 @@ const AuthGuard = (next) => {
7514
7513
  resolve(false);
7515
7514
  }
7516
7515
  else {
7517
- let view = _state.url.replace(/^(\/[-a-z]+\/[^\/]+)\/.*$/, '$1').replace(/\?.+/, '');
7516
+ console.log(next.url);
7517
+ console.log(next.pathFromRoot);
7518
+ let view = next.url.map(a => a.path).join().replace(/^(\/[-a-z]+\/[^\/]+)\/.*$/, '$1').replace(/\?.+/, '');
7518
7519
  let moduleView = view.replace(/^(\/.*\/).*/, '$1');
7519
7520
  if (user.roles.super_admin) {
7520
7521
  resolve(true);
@@ -7549,7 +7550,9 @@ const AuthGuard = (next) => {
7549
7550
  resolve(false);
7550
7551
  }
7551
7552
  else {
7552
- let view = _state.url.replace(/^(\/[-a-z]+\/[^\/]+)\/.*$/, '$1').replace(/\?.+/, '');
7553
+ console.log(next.url);
7554
+ console.log(next.pathFromRoot);
7555
+ let view = next.url.map(a => a.path).join().replace(/^(\/[-a-z]+\/[^\/]+)\/.*$/, '$1').replace(/\?.+/, '');
7553
7556
  let moduleView = view.replace(/^(\/.*\/).*/, '$1');
7554
7557
  if (user.roles.super_admin) {
7555
7558
  resolve(true);