@c8y/ngx-components 1023.14.8 → 1023.16.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.
- package/alarms/index.d.ts +110 -53
- package/alarms/index.d.ts.map +1 -1
- package/assets-navigator/index.d.ts +7 -3
- package/assets-navigator/index.d.ts.map +1 -1
- package/context-dashboard/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs +365 -205
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-assets-navigator.mjs +25 -6
- package/fesm2022/c8y-ngx-components-assets-navigator.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +2 -4
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +2 -2
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-group-breadcrumbs.mjs +192 -0
- package/fesm2022/c8y-ngx-components-group-breadcrumbs.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-module-federation-exports-assets-navigator.mjs +13 -0
- package/fesm2022/c8y-ngx-components-module-federation-exports-assets-navigator.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs +2 -2
- package/fesm2022/c8y-ngx-components-widgets-implementations-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +1201 -36
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/group-breadcrumbs/index.d.ts +6 -0
- package/group-breadcrumbs/index.d.ts.map +1 -0
- package/index.d.ts +873 -6
- package/index.d.ts.map +1 -1
- package/locales/de.po +66 -58
- package/locales/es.po +55 -48
- package/locales/fr.po +47 -40
- package/locales/ja_JP.po +43 -37
- package/locales/ko.po +53 -46
- package/locales/locales.pot +25 -15
- package/locales/nl.po +50 -43
- package/locales/pl.po +65 -58
- package/locales/pt_BR.po +52 -45
- package/locales/zh_CN.po +49 -43
- package/locales/zh_TW.po +61 -53
- package/module-federation-exports/assets-navigator/index.d.ts +2 -0
- package/module-federation-exports/assets-navigator/index.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -2,14 +2,14 @@ import * as i1 from '@c8y/ngx-components';
|
|
|
2
2
|
import { NavigatorNode, DeviceStatusComponent, GroupFragment, ModalService, AlertService, BreadcrumbService, AppStateService, OptionsService, ViewContext, Permissions, IconDirective, C8yTranslateDirective, C8yTranslatePipe, SearchInputComponent, GetGroupIconPipe, LoadingComponent, EmptyStateComponent, CoreModule, CommonModule, CoreSearchModule, ModalModule, DeviceStatusModule, hookNavigator } from '@c8y/ngx-components';
|
|
3
3
|
import { gettext } from '@c8y/ngx-components/gettext';
|
|
4
4
|
import { debounce, get } from 'lodash-es';
|
|
5
|
-
import { BehaviorSubject, Subject, empty } from 'rxjs';
|
|
5
|
+
import { BehaviorSubject, Subject, firstValueFrom, empty } from 'rxjs';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
7
7
|
import { InjectionToken, Injectable, inject, Optional, Inject, EventEmitter, Output, Input, Component, forwardRef, ViewChild, NgModule } from '@angular/core';
|
|
8
8
|
import { Router, ActivationEnd } from '@angular/router';
|
|
9
9
|
import * as i2 from '@c8y/client';
|
|
10
10
|
import { InventoryService, UserService, QueriesUtil } from '@c8y/client';
|
|
11
11
|
import { ApiService } from '@c8y/ngx-components/api';
|
|
12
|
-
import { filter, first, mergeMap, takeUntil, tap } from 'rxjs/operators';
|
|
12
|
+
import { switchMap, shareReplay, filter, first, skip, mergeMap, takeUntil, tap } from 'rxjs/operators';
|
|
13
13
|
import * as i1$1 from '@ngx-translate/core';
|
|
14
14
|
import { TranslateService } from '@ngx-translate/core';
|
|
15
15
|
import { CollapseDirective, CollapseModule } from 'ngx-bootstrap/collapse';
|
|
@@ -126,7 +126,6 @@ class AssetNode extends NavigatorNode {
|
|
|
126
126
|
}
|
|
127
127
|
click(options = {}) {
|
|
128
128
|
if (this.isDeviceOrProbablyChildDevice && !this.showChildDevices) {
|
|
129
|
-
this.service.preferBreadcrumb(this.parents);
|
|
130
129
|
return;
|
|
131
130
|
}
|
|
132
131
|
this.hookEvents();
|
|
@@ -432,6 +431,9 @@ class AssetNodeService {
|
|
|
432
431
|
constructor() {
|
|
433
432
|
this.firstUrl = true;
|
|
434
433
|
this.PAGE_SIZE = 20;
|
|
434
|
+
this.refreshTrigger$ = new BehaviorSubject(undefined);
|
|
435
|
+
this.rootGroupsFetched = false;
|
|
436
|
+
this.rootGroups$ = this.refreshTrigger$.pipe(switchMap(() => this.fetchRootGroups()), shareReplay({ bufferSize: 1, refCount: false }));
|
|
435
437
|
this.inventory = inject(InventoryService);
|
|
436
438
|
this.apiService = inject(ApiService);
|
|
437
439
|
this.modal = inject(ModalService);
|
|
@@ -552,7 +554,24 @@ class AssetNodeService {
|
|
|
552
554
|
}
|
|
553
555
|
return this.createAssetNode(config);
|
|
554
556
|
}
|
|
555
|
-
getRootNodes(customFilter) {
|
|
557
|
+
async getRootNodes(customFilter) {
|
|
558
|
+
if (!customFilter) {
|
|
559
|
+
if (this.rootGroupsFetched) {
|
|
560
|
+
const resultPromise = firstValueFrom(this.rootGroups$.pipe(skip(1))); // skip first (current) value on refresh to get fresh value
|
|
561
|
+
this.refresh();
|
|
562
|
+
return resultPromise;
|
|
563
|
+
}
|
|
564
|
+
else {
|
|
565
|
+
this.rootGroupsFetched = true;
|
|
566
|
+
return firstValueFrom(this.rootGroups$);
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
return this.fetchRootGroups(customFilter);
|
|
570
|
+
}
|
|
571
|
+
refresh() {
|
|
572
|
+
this.refreshTrigger$.next();
|
|
573
|
+
}
|
|
574
|
+
async fetchRootGroups(customFilter) {
|
|
556
575
|
const defaultFilter = {
|
|
557
576
|
pageSize: this.PAGE_SIZE,
|
|
558
577
|
withChildren: false,
|
|
@@ -2047,14 +2066,14 @@ class AssetsNavigatorModule {
|
|
|
2047
2066
|
}
|
|
2048
2067
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AssetsNavigatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
2049
2068
|
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.15", ngImport: i0, type: AssetsNavigatorModule, imports: [ModalModule, AssetSelectorModule, DeviceStatusModule] }); }
|
|
2050
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AssetsNavigatorModule, providers: [ModalService,
|
|
2069
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AssetsNavigatorModule, providers: [ModalService, hookNavigator(AssetNodeFactory)], imports: [ModalModule, AssetSelectorModule, DeviceStatusModule] }); }
|
|
2051
2070
|
}
|
|
2052
2071
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImport: i0, type: AssetsNavigatorModule, decorators: [{
|
|
2053
2072
|
type: NgModule,
|
|
2054
2073
|
args: [{
|
|
2055
2074
|
declarations: [],
|
|
2056
2075
|
imports: [ModalModule, AssetSelectorModule, DeviceStatusModule],
|
|
2057
|
-
providers: [ModalService,
|
|
2076
|
+
providers: [ModalService, hookNavigator(AssetNodeFactory)]
|
|
2058
2077
|
}]
|
|
2059
2078
|
}] });
|
|
2060
2079
|
|