@c8y/ngx-components 1018.0.83 → 1018.0.89
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/core/asset-types/asset-types.service.d.ts +2 -4
- package/esm2020/context-dashboard/context-dashboard.component.mjs +3 -3
- package/esm2020/context-dashboard/widget-config.component.mjs +3 -3
- package/esm2020/core/asset-types/asset-types.service.mjs +4 -8
- package/esm2020/core/common/group.service.mjs +4 -4
- package/esm2020/core/dynamic-component/dynamic-component-alert-aggregator.mjs +2 -2
- package/fesm2015/c8y-ngx-components-context-dashboard.mjs +4 -4
- package/fesm2015/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2015/c8y-ngx-components.mjs +7 -12
- package/fesm2015/c8y-ngx-components.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components-context-dashboard.mjs +4 -4
- package/fesm2020/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2020/c8y-ngx-components.mjs +7 -12
- package/fesm2020/c8y-ngx-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -53,7 +53,6 @@ import { FieldArrayType, FieldType, FieldWrapper, FormlyModule, FORMLY_CONFIG,
|
|
|
53
53
|
import * as i5$2 from '@ngx-formly/core/select';
|
|
54
54
|
import { FormlySelectModule } from '@ngx-formly/core/select';
|
|
55
55
|
import { FormlyJsonschema } from '@ngx-formly/core/json-schema';
|
|
56
|
-
import { BehaviorSubject as BehaviorSubject$1 } from 'rxjs/internal/BehaviorSubject';
|
|
57
56
|
import * as i5$3 from '@angular/cdk/drag-drop';
|
|
58
57
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
59
58
|
import * as i7 from '@angular/cdk/table';
|
|
@@ -4692,8 +4691,7 @@ class AssetTypesService {
|
|
|
4692
4691
|
__and: [{ __has: 'c8y_IsAssetType' }, { name: 'group' }]
|
|
4693
4692
|
}
|
|
4694
4693
|
};
|
|
4695
|
-
this.
|
|
4696
|
-
this.DEFAULT_GROUP_ICON_OPEN = 'c8y-group-open';
|
|
4694
|
+
this.DEFAULT_ASSET_ICON = 'c8y-enterprise';
|
|
4697
4695
|
this.assetTypesCache = {};
|
|
4698
4696
|
this.isCacheSet = false;
|
|
4699
4697
|
this.allowedMethods = ['POST', 'PUT', 'DELETE'];
|
|
@@ -4753,7 +4751,7 @@ class AssetTypesService {
|
|
|
4753
4751
|
* Defaults to false.
|
|
4754
4752
|
* @returns Returns an icon for a given asset type.
|
|
4755
4753
|
*/
|
|
4756
|
-
async getIcon(type
|
|
4754
|
+
async getIcon(type) {
|
|
4757
4755
|
if (!this.isCacheSet) {
|
|
4758
4756
|
try {
|
|
4759
4757
|
await this.initAssetTypesCache();
|
|
@@ -4763,10 +4761,7 @@ class AssetTypesService {
|
|
|
4763
4761
|
}
|
|
4764
4762
|
}
|
|
4765
4763
|
const assetType = this.getAssetTypeByName(type);
|
|
4766
|
-
return assetType?.c8y_IsAssetType?.icon?.name || this.
|
|
4767
|
-
}
|
|
4768
|
-
getDefaultGroupIcon(open = false) {
|
|
4769
|
-
return open ? this.DEFAULT_GROUP_ICON_OPEN : this.DEFAULT_GROUP_ICON;
|
|
4764
|
+
return assetType?.c8y_IsAssetType?.icon?.name || this.DEFAULT_ASSET_ICON;
|
|
4770
4765
|
}
|
|
4771
4766
|
/**
|
|
4772
4767
|
* Add an asset type to the local cache.
|
|
@@ -4934,7 +4929,7 @@ class GroupService {
|
|
|
4934
4929
|
async getIcon(mo, open = false) {
|
|
4935
4930
|
const genericMoType = this.determineMoType(mo);
|
|
4936
4931
|
if (genericMoType === 'asset') {
|
|
4937
|
-
return await this.getAssetCustomIcon(mo.type
|
|
4932
|
+
return await this.getAssetCustomIcon(mo.type);
|
|
4938
4933
|
}
|
|
4939
4934
|
const typeIcons = this.getDefaultIcon(genericMoType);
|
|
4940
4935
|
return (open && typeIcons.iconOpen) || typeIcons.icon;
|
|
@@ -4999,8 +4994,8 @@ class GroupService {
|
|
|
4999
4994
|
isDevice(mo) {
|
|
5000
4995
|
return !!mo.c8y_IsDevice;
|
|
5001
4996
|
}
|
|
5002
|
-
getAssetCustomIcon(moType
|
|
5003
|
-
return this.assetTypesService.getIcon(moType
|
|
4997
|
+
getAssetCustomIcon(moType) {
|
|
4998
|
+
return this.assetTypesService.getIcon(moType);
|
|
5004
4999
|
}
|
|
5005
5000
|
getDefaultIcon(moType) {
|
|
5006
5001
|
return this.icons[moType];
|
|
@@ -22872,7 +22867,7 @@ var DismissAlertStrategy;
|
|
|
22872
22867
|
const WIDGET_ALERTS_ORDER = ['danger', 'warning', 'info'];
|
|
22873
22868
|
class DynamicComponentAlertAggregator {
|
|
22874
22869
|
constructor(alerts = []) {
|
|
22875
|
-
this.anyAlertExistsSubject = new BehaviorSubject
|
|
22870
|
+
this.anyAlertExistsSubject = new BehaviorSubject(false);
|
|
22876
22871
|
this.anyAlertExists$ = this.anyAlertExistsSubject.asObservable();
|
|
22877
22872
|
this.initAlertsGroups();
|
|
22878
22873
|
this.setAlerts(alerts);
|