ontimize-web-ngx 15.3.0 → 15.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { InjectionToken, EventEmitter, Directive, Host, Self, Optional, Input, HostListener, forwardRef, Output, Injectable, Injector, Component, ContentChildren, ChangeDetectorRef, Pipe, NgModule, ViewChild, ElementRef, ViewEncapsulation, ViewContainerRef, Inject, NgZone, HostBinding, ViewChildren, ChangeDetectionStrategy, inject, CUSTOM_ELEMENTS_SCHEMA, TemplateRef, SkipSelf, isDevMode, ContentChild, Renderer2, APP_INITIALIZER } from '@angular/core';
3
3
  import moment from 'moment';
4
- import { isObservable, from, of, Subscription, Subject, Observable, timer, combineLatest, BehaviorSubject, ReplaySubject, merge, fromEvent, map as map$1 } from 'rxjs';
4
+ import { isObservable, from, of, Subscription, Subject, Observable, timer, combineLatest, BehaviorSubject, ReplaySubject, concatMap, delay, merge, fromEvent, map as map$1 } from 'rxjs';
5
5
  export { Observable, Subject } from 'rxjs';
6
6
  import * as i1$7 from '@angular/common/http';
7
7
  import { HttpClient, HttpHeaders, HttpRequest, HttpEventType, HttpErrorResponse, HttpClientModule } from '@angular/common/http';
@@ -13119,7 +13119,7 @@ class OTableComponentStateService extends AbstractComponentStateService {
13119
13119
  }
13120
13120
  getSortState() {
13121
13121
  const sortColumns = [];
13122
- this.component.sort.getSortColumns().forEach(sortData => {
13122
+ this.component.sort?.getSortColumns().forEach(sortData => {
13123
13123
  sortColumns.push(sortData.id + Codes.COLUMNS_ALIAS_SEPARATOR + sortData.direction);
13124
13124
  });
13125
13125
  return {
@@ -15187,6 +15187,7 @@ class OFormLayoutTabGroupComponent {
15187
15187
  this.tabsModificationsCache = [];
15188
15188
  this.dialogService = injector.get(DialogService);
15189
15189
  this.router = this.injector.get(Router);
15190
+ this.actRoute = this.injector.get(ActivatedRoute);
15190
15191
  }
15191
15192
  get state() {
15192
15193
  return this.formLayoutManager.state;
@@ -15423,38 +15424,20 @@ class OFormLayoutTabGroupComponent {
15423
15424
  this.state.tabsData = this.state.tabsData.filter(tabData => !tabData.insertionMode);
15424
15425
  if (this.state.tabsData.length >= 1 && (this.state.tabsData[0].url || '').length > 0) {
15425
15426
  this.showLoading.next(true);
15426
- const extras = {};
15427
- extras[Codes.QUERY_PARAMS] = this.state.tabsData[0].queryParams;
15428
- extras[Codes.QUERY_PARAMS][Codes.INSERTION_MODE] = `${this.state.tabsData[0].insertionMode}`;
15429
- if (this.formLayoutManager) {
15430
- this.formLayoutManager.setAsActiveFormLayoutManager();
15431
- }
15432
- this.router.navigate([this.state.tabsData[0].url], extras).then(() => {
15433
- if (this.data[0] && this.data[0].component && this.state.tabsData.length > 1) {
15434
- setTimeout(() => {
15435
- this.createTabsFromState();
15436
- }, 0);
15437
- }
15438
- else {
15439
- this.showLoading.next(false);
15440
- }
15441
- });
15442
- }
15443
- }
15444
- createTabsFromState() {
15445
- const tabComponent = this.data[0].component;
15446
- const stateTabsData = this.state.tabsData.slice(1);
15447
- if (stateTabsData.length > 0) {
15448
- stateTabsData.forEach((tabData) => {
15449
- setTimeout(() => {
15450
- const newDetailData = this.createDetailComponent(tabComponent, tabData);
15451
- this.data.push(newDetailData);
15452
- }, 0);
15427
+ const zone = this.injector.get(NgZone);
15428
+ from(this.state.tabsData).pipe(concatMap(tab => of(tab).pipe(delay(100)))).subscribe((tab) => {
15429
+ const extras = {};
15430
+ extras['relativeTo'] = this.actRoute;
15431
+ extras[Codes.QUERY_PARAMS] = tab.queryParams;
15432
+ extras[Codes.QUERY_PARAMS][Codes.INSERTION_MODE] = tab.insertionMode;
15433
+ if (this.formLayoutManager) {
15434
+ this.formLayoutManager.setAsActiveFormLayoutManager();
15435
+ }
15436
+ zone.run(() => this.router.navigate([tab.url], extras)
15437
+ .then(() => this.showLoading.next(false))
15438
+ .catch(() => this.showLoading.next(true)));
15453
15439
  });
15454
15440
  }
15455
- else {
15456
- this.showLoading.next(false);
15457
- }
15458
15441
  }
15459
15442
  createDetailComponent(component, paramsObj) {
15460
15443
  const newDetailComp = {
@@ -32333,7 +32316,7 @@ class OTableComponent extends AbstractOServiceComponent {
32333
32316
  }
32334
32317
  ;
32335
32318
  if (Util.isDefined(oTableGlobalConfig.showChartsOnDemandOption)) {
32336
- this.showReportOnDemandOption = oTableGlobalConfig.showChartsOnDemandOption;
32319
+ this.showChartsOnDemandOption = oTableGlobalConfig.showChartsOnDemandOption;
32337
32320
  }
32338
32321
  ;
32339
32322
  if (Util.isDefined(oTableGlobalConfig.showReportOnDemandOption)) {