@c8y/ngx-components 1018.0.83 → 1018.0.88
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/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 +6 -10
- 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 +6 -10
- package/fesm2020/c8y-ngx-components.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -4673,8 +4673,7 @@ class AssetTypesService {
|
|
|
4673
4673
|
__and: [{ __has: 'c8y_IsAssetType' }, { name: 'group' }]
|
|
4674
4674
|
}
|
|
4675
4675
|
};
|
|
4676
|
-
this.
|
|
4677
|
-
this.DEFAULT_GROUP_ICON_OPEN = 'c8y-group-open';
|
|
4676
|
+
this.DEFAULT_ASSET_ICON = 'c8y-enterprise';
|
|
4678
4677
|
this.assetTypesCache = {};
|
|
4679
4678
|
this.isCacheSet = false;
|
|
4680
4679
|
this.allowedMethods = ['POST', 'PUT', 'DELETE'];
|
|
@@ -4736,7 +4735,7 @@ class AssetTypesService {
|
|
|
4736
4735
|
* Defaults to false.
|
|
4737
4736
|
* @returns Returns an icon for a given asset type.
|
|
4738
4737
|
*/
|
|
4739
|
-
getIcon(type
|
|
4738
|
+
getIcon(type) {
|
|
4740
4739
|
var _a, _b;
|
|
4741
4740
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4742
4741
|
if (!this.isCacheSet) {
|
|
@@ -4748,12 +4747,9 @@ class AssetTypesService {
|
|
|
4748
4747
|
}
|
|
4749
4748
|
}
|
|
4750
4749
|
const assetType = this.getAssetTypeByName(type);
|
|
4751
|
-
return ((_b = (_a = assetType === null || assetType === void 0 ? void 0 : assetType.c8y_IsAssetType) === null || _a === void 0 ? void 0 : _a.icon) === null || _b === void 0 ? void 0 : _b.name) || this.
|
|
4750
|
+
return ((_b = (_a = assetType === null || assetType === void 0 ? void 0 : assetType.c8y_IsAssetType) === null || _a === void 0 ? void 0 : _a.icon) === null || _b === void 0 ? void 0 : _b.name) || this.DEFAULT_ASSET_ICON;
|
|
4752
4751
|
});
|
|
4753
4752
|
}
|
|
4754
|
-
getDefaultGroupIcon(open = false) {
|
|
4755
|
-
return open ? this.DEFAULT_GROUP_ICON_OPEN : this.DEFAULT_GROUP_ICON;
|
|
4756
|
-
}
|
|
4757
4753
|
/**
|
|
4758
4754
|
* Add an asset type to the local cache.
|
|
4759
4755
|
* @param assetType Asset type which should be added to the cache.
|
|
@@ -4892,7 +4888,7 @@ class GroupService {
|
|
|
4892
4888
|
return __awaiter(this, void 0, void 0, function* () {
|
|
4893
4889
|
const genericMoType = this.determineMoType(mo);
|
|
4894
4890
|
if (genericMoType === 'asset') {
|
|
4895
|
-
return yield this.getAssetCustomIcon(mo.type
|
|
4891
|
+
return yield this.getAssetCustomIcon(mo.type);
|
|
4896
4892
|
}
|
|
4897
4893
|
const typeIcons = this.getDefaultIcon(genericMoType);
|
|
4898
4894
|
return (open && typeIcons.iconOpen) || typeIcons.icon;
|
|
@@ -4958,8 +4954,8 @@ class GroupService {
|
|
|
4958
4954
|
isDevice(mo) {
|
|
4959
4955
|
return !!mo.c8y_IsDevice;
|
|
4960
4956
|
}
|
|
4961
|
-
getAssetCustomIcon(moType
|
|
4962
|
-
return this.assetTypesService.getIcon(moType
|
|
4957
|
+
getAssetCustomIcon(moType) {
|
|
4958
|
+
return this.assetTypesService.getIcon(moType);
|
|
4963
4959
|
}
|
|
4964
4960
|
getDefaultIcon(moType) {
|
|
4965
4961
|
return this.icons[moType];
|