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.
- package/esm2020/lib/components/table/o-table.component.mjs +2 -2
- package/esm2020/lib/layouts/form-layout/tabgroup/o-form-layout-tabgroup.component.mjs +17 -34
- package/esm2020/lib/services/state/o-table-component-state.service.mjs +2 -2
- package/fesm2015/ontimize-web-ngx.mjs +17 -33
- package/fesm2015/ontimize-web-ngx.mjs.map +1 -1
- package/fesm2020/ontimize-web-ngx.mjs +16 -33
- package/fesm2020/ontimize-web-ngx.mjs.map +1 -1
- package/lib/layouts/form-layout/tabgroup/o-form-layout-tabgroup.component.d.ts +2 -2
- package/package.json +1 -1
|
@@ -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
|
|
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
|
|
15427
|
-
|
|
15428
|
-
|
|
15429
|
-
|
|
15430
|
-
|
|
15431
|
-
|
|
15432
|
-
|
|
15433
|
-
|
|
15434
|
-
|
|
15435
|
-
|
|
15436
|
-
|
|
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.
|
|
32319
|
+
this.showChartsOnDemandOption = oTableGlobalConfig.showChartsOnDemandOption;
|
|
32337
32320
|
}
|
|
32338
32321
|
;
|
|
32339
32322
|
if (Util.isDefined(oTableGlobalConfig.showReportOnDemandOption)) {
|