@c8y/ngx-components 1021.25.5 → 1021.29.0
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/alarm-details.component.d.ts +8 -13
- package/alarms/alarm-details.component.d.ts.map +1 -1
- package/alarms/alarm-details.service.d.ts +3 -20
- package/alarms/alarm-details.service.d.ts.map +1 -1
- package/alarms/alarm-info.component.d.ts +0 -1
- package/alarms/alarm-info.component.d.ts.map +1 -1
- package/branding/shared/data/branding-version.service.d.ts.map +1 -1
- package/branding/shared/lazy/branding-theme-form/branding-theme-form.component.d.ts.map +1 -1
- package/core/bootstrap/bootstrap.component.d.ts.map +1 -1
- package/core/common/geo.service.d.ts.map +1 -1
- package/core/common/inter-app.service.d.ts +1 -0
- package/core/common/inter-app.service.d.ts.map +1 -1
- package/core/plugins/plugins.model.d.ts +3 -1
- package/core/plugins/plugins.model.d.ts.map +1 -1
- package/core/plugins/plugins.service.d.ts.map +1 -1
- package/device-map/bounds-resolver.service.d.ts +12 -0
- package/device-map/bounds-resolver.service.d.ts.map +1 -0
- package/device-map/c8y-ngx-components-device-map.d.ts.map +1 -0
- package/device-map/device-map-navigation.factory.d.ts +9 -0
- package/device-map/device-map-navigation.factory.d.ts.map +1 -0
- package/device-map/device-map.component.d.ts +10 -0
- package/device-map/device-map.component.d.ts.map +1 -0
- package/device-map/device-map.feature.d.ts +3 -0
- package/device-map/device-map.feature.d.ts.map +1 -0
- package/device-map/index.d.ts +6 -0
- package/device-map/index.d.ts.map +1 -0
- package/device-map/location-resolver.service.d.ts +8 -0
- package/device-map/location-resolver.service.d.ts.map +1 -0
- package/ecosystem/application-plugins/application-plugins.component.d.ts.map +1 -1
- package/ecosystem/application-plugins/orphaned-status-cell-renderer.component.d.ts.map +1 -1
- package/esm2022/alarms/alarm-details.component.mjs +14 -30
- package/esm2022/alarms/alarm-details.service.mjs +5 -25
- package/esm2022/alarms/alarm-info.component.mjs +1 -1
- package/esm2022/branding/shared/data/branding-version.service.mjs +9 -5
- package/esm2022/branding/shared/lazy/branding-theme-form/branding-theme-form.component.mjs +5 -2
- package/esm2022/core/bootstrap/bootstrap.component.mjs +4 -3
- package/esm2022/core/common/geo.service.mjs +2 -5
- package/esm2022/core/common/inter-app.service.mjs +3 -2
- package/esm2022/core/plugins/plugins.model.mjs +2 -1
- package/esm2022/core/plugins/plugins.service.mjs +7 -5
- package/esm2022/core/version/websdk-plugin-version.factory.mjs +2 -2
- package/esm2022/device-map/bounds-resolver.service.mjs +21 -0
- package/esm2022/device-map/c8y-ngx-components-device-map.mjs +5 -0
- package/esm2022/device-map/device-map-navigation.factory.mjs +25 -0
- package/esm2022/device-map/device-map.component.mjs +30 -0
- package/esm2022/device-map/device-map.feature.mjs +15 -0
- package/esm2022/device-map/index.mjs +6 -0
- package/esm2022/device-map/location-resolver.service.mjs +25 -0
- package/esm2022/ecosystem/application-plugins/application-plugins.component.mjs +66 -22
- package/esm2022/ecosystem/application-plugins/orphaned-status-cell-renderer.component.mjs +7 -1
- package/esm2022/location/location.component.mjs +3 -3
- package/esm2022/map/map-status.component.mjs +20 -7
- package/esm2022/map/map.component.mjs +15 -7
- package/esm2022/map/map.model.mjs +2 -2
- package/esm2022/map/map.module.mjs +25 -4
- package/esm2022/map/map.service.mjs +73 -7
- package/esm2022/repository/firmware/list/firmware-list.component.mjs +10 -10
- package/esm2022/repository/software/list/software-list.component.mjs +10 -10
- package/esm2022/tracking/tracking-marker-popup.component.mjs +10 -3
- package/esm2022/tracking/tracking.component.mjs +3 -4
- package/esm2022/tracking/tracking.service.mjs +6 -3
- package/fesm2022/c8y-ngx-components-alarms.mjs +18 -54
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-data.mjs +8 -4
- package/fesm2022/c8y-ngx-components-branding-shared-data.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs +4 -1
- package/fesm2022/c8y-ngx-components-branding-shared-lazy.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-device-map.mjs +106 -0
- package/fesm2022/c8y-ngx-components-device-map.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs +71 -21
- package/fesm2022/c8y-ngx-components-ecosystem-application-plugins.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem.mjs +71 -21
- package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-location.mjs +2 -2
- package/fesm2022/c8y-ngx-components-location.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-map.mjs +122 -14
- package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs +9 -9
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-repository-software.mjs +9 -9
- package/fesm2022/c8y-ngx-components-repository-software.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-tracking.mjs +16 -7
- package/fesm2022/c8y-ngx-components-tracking.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +14 -12
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/de.po +13 -1
- package/locales/es.po +13 -1
- package/locales/fr.po +13 -1
- package/locales/ja_JP.po +15 -3
- package/locales/ko.po +13 -1
- package/locales/locales.pot +12 -0
- package/locales/nl.po +13 -1
- package/locales/pl.po +13 -1
- package/locales/pt_BR.po +13 -1
- package/locales/zh_CN.po +13 -1
- package/locales/zh_TW.po +13 -1
- package/map/map-status.component.d.ts +3 -1
- package/map/map-status.component.d.ts.map +1 -1
- package/map/map.component.d.ts +2 -1
- package/map/map.component.d.ts.map +1 -1
- package/map/map.model.d.ts +1 -0
- package/map/map.model.d.ts.map +1 -1
- package/map/map.module.d.ts +2 -1
- package/map/map.module.d.ts.map +1 -1
- package/map/map.service.d.ts +27 -2
- package/map/map.service.d.ts.map +1 -1
- package/package.json +1 -1
- package/repository/firmware/list/firmware-list.component.d.ts.map +1 -1
- package/repository/software/list/software-list.component.d.ts.map +1 -1
- package/tracking/tracking-marker-popup.component.d.ts +5 -1
- package/tracking/tracking-marker-popup.component.d.ts.map +1 -1
- package/tracking/tracking.component.d.ts.map +1 -1
- package/tracking/tracking.service.d.ts.map +1 -1
|
@@ -2230,6 +2230,12 @@ class OrphanedStatusCellRendererComponent {
|
|
|
2230
2230
|
text: gettext('LATEST`plugin status`'),
|
|
2231
2231
|
class: 'label-success'
|
|
2232
2232
|
};
|
|
2233
|
+
case ApplicationPluginStatus.AUTO:
|
|
2234
|
+
return {
|
|
2235
|
+
value: statusValue,
|
|
2236
|
+
text: gettext('AUTO`plugin status`'),
|
|
2237
|
+
class: 'label-success'
|
|
2238
|
+
};
|
|
2233
2239
|
default:
|
|
2234
2240
|
return null;
|
|
2235
2241
|
}
|
|
@@ -2354,8 +2360,25 @@ class ApplicationPluginsComponent {
|
|
|
2354
2360
|
this.allAvailablePlugins$
|
|
2355
2361
|
]).pipe(map(([remotePlugins, allPlugins]) => this.getInstalledPlugins(allPlugins, remotePlugins)), shareReplay(1));
|
|
2356
2362
|
this.orphanedPlugins$ = this.installedPlugins$.pipe(map(plugins => plugins.filter(p => p.status === ApplicationPluginStatus.ORPHANED)));
|
|
2357
|
-
this.isStandard$ = combineLatest([this.installedPlugins$, this.selfPlugins$]).pipe(map(([installedPlugins, selfPlugins]) =>
|
|
2358
|
-
|
|
2363
|
+
this.isStandard$ = combineLatest([this.installedPlugins$, this.selfPlugins$]).pipe(map(([installedPlugins, selfPlugins]) => {
|
|
2364
|
+
const manifestRemotes = this.app?.manifest?.remotes || {};
|
|
2365
|
+
// ensure that every installed plugin is a self plugin or a plugin from the manifest
|
|
2366
|
+
const allInstalledPluginsAreSelf = installedPlugins.every(p => selfPlugins.some(selfPlugin => selfPlugin.id === p.id) ||
|
|
2367
|
+
(Array.isArray(manifestRemotes[p.contextPath]) &&
|
|
2368
|
+
manifestRemotes[p.contextPath].includes(p.module)));
|
|
2369
|
+
// ensure that every self plugin is installed
|
|
2370
|
+
const allSelfPluginsAreInstalled = selfPlugins.every(selfPlugin => installedPlugins.some(p => p.id === selfPlugin.id));
|
|
2371
|
+
const configRemotes = this.app?.config?.remotes || {};
|
|
2372
|
+
// ensure that every remote from the manifest is in the config
|
|
2373
|
+
// if no config exists we are also all good
|
|
2374
|
+
const everyRemoteFromManifestIsInConfig = !this.app?.config?.remotes ||
|
|
2375
|
+
Object.keys(manifestRemotes).every(contextPath => Array.isArray(configRemotes[contextPath]) &&
|
|
2376
|
+
Array.isArray(manifestRemotes[contextPath]) &&
|
|
2377
|
+
manifestRemotes[contextPath].every(module => configRemotes[contextPath].includes(module)));
|
|
2378
|
+
return (allInstalledPluginsAreSelf &&
|
|
2379
|
+
allSelfPluginsAreInstalled &&
|
|
2380
|
+
everyRemoteFromManifestIsInConfig);
|
|
2381
|
+
}));
|
|
2359
2382
|
this.title = gettext('Installed plugins');
|
|
2360
2383
|
this.loadMoreItemsLabel = gettext('Load more packages');
|
|
2361
2384
|
this.loadingItemsLabel = gettext('Loading packages…');
|
|
@@ -2387,9 +2410,16 @@ class ApplicationPluginsComponent {
|
|
|
2387
2410
|
{
|
|
2388
2411
|
name: 'Version',
|
|
2389
2412
|
header: gettext('Version'),
|
|
2390
|
-
path: '
|
|
2413
|
+
path: 'version',
|
|
2391
2414
|
filterable: false
|
|
2392
2415
|
},
|
|
2416
|
+
{
|
|
2417
|
+
name: 'Tag',
|
|
2418
|
+
header: gettext('Tag`noun`'),
|
|
2419
|
+
path: 'installedViaTag',
|
|
2420
|
+
filterable: false,
|
|
2421
|
+
cellRendererComponent: LabelCellRendererComponent
|
|
2422
|
+
},
|
|
2393
2423
|
{
|
|
2394
2424
|
name: 'description',
|
|
2395
2425
|
header: gettext('Description'),
|
|
@@ -2661,29 +2691,46 @@ class ApplicationPluginsComponent {
|
|
|
2661
2691
|
}
|
|
2662
2692
|
getInstallModalInitState() {
|
|
2663
2693
|
return {
|
|
2664
|
-
plugins$: combineLatest([
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2694
|
+
plugins$: combineLatest([this.allAvailablePlugins$, this.installedPlugins$]).pipe(map(([allPlugins, installedPlugins]) => {
|
|
2695
|
+
// to not mutate the original array and objects contained in it
|
|
2696
|
+
const allPluginsAsNewObjects = allPlugins.map(p => ({ ...p }));
|
|
2697
|
+
for (const plugin of installedPlugins) {
|
|
2698
|
+
let installedPlugin = allPluginsAsNewObjects.find(p => p.id === plugin.id);
|
|
2699
|
+
if (!installedPlugin && plugin.installedViaTag) {
|
|
2700
|
+
installedPlugin = allPluginsAsNewObjects.find(p => p.contextPath === plugin.contextPath &&
|
|
2701
|
+
p.module === plugin.module &&
|
|
2702
|
+
p.tags?.includes(plugin.installedViaTag));
|
|
2703
|
+
}
|
|
2704
|
+
if (installedPlugin) {
|
|
2705
|
+
installedPlugin.installed = true;
|
|
2706
|
+
continue;
|
|
2707
|
+
}
|
|
2708
|
+
}
|
|
2709
|
+
return allPluginsAsNewObjects.map(p => ({ ...p, installed: !!p.installed }));
|
|
2674
2710
|
}), shareReplay(1))
|
|
2675
2711
|
};
|
|
2676
2712
|
}
|
|
2677
2713
|
getOrphanedPlugins(orphanedPluginIds, allPlugins) {
|
|
2678
2714
|
const orphanedPlugins = orphanedPluginIds.map(p => this.extractDetails(p));
|
|
2679
2715
|
const orphanedPluginsUpdated = orphanedPlugins.map(p => {
|
|
2716
|
+
const pluginWithMatchingTag = allPlugins.find(tmp => tmp.contextPath === p.contextPath &&
|
|
2717
|
+
tmp.module === p.module &&
|
|
2718
|
+
tmp.tags?.includes(p.version || 'latest'));
|
|
2719
|
+
if (pluginWithMatchingTag) {
|
|
2720
|
+
return {
|
|
2721
|
+
...pluginWithMatchingTag,
|
|
2722
|
+
id: p.id,
|
|
2723
|
+
status: ApplicationPluginStatus.AUTO,
|
|
2724
|
+
installedViaTag: p.version || 'latest'
|
|
2725
|
+
};
|
|
2726
|
+
}
|
|
2680
2727
|
const pluginInDifferentVersion = allPlugins.find(tmp => tmp.contextPath === p.contextPath && tmp.module === p.module);
|
|
2681
2728
|
if (pluginInDifferentVersion) {
|
|
2682
2729
|
return {
|
|
2683
2730
|
...pluginInDifferentVersion,
|
|
2684
|
-
version: p.version
|
|
2731
|
+
version: p.version,
|
|
2685
2732
|
id: p.id,
|
|
2686
|
-
status:
|
|
2733
|
+
status: ApplicationPluginStatus.OUTDATED
|
|
2687
2734
|
};
|
|
2688
2735
|
}
|
|
2689
2736
|
return p;
|
|
@@ -2716,12 +2763,15 @@ class ApplicationPluginsComponent {
|
|
|
2716
2763
|
}));
|
|
2717
2764
|
const orphanedPluginIds = remotePlugins.filter(r => !availablePlugins.find(plugin => plugin.id === r));
|
|
2718
2765
|
const orphanedPlugins = this.getOrphanedPlugins(orphanedPluginIds, allPlugins);
|
|
2719
|
-
const
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2766
|
+
const notActuallyOrphanedPlugins = orphanedPlugins.filter(p => p.status === ApplicationPluginStatus.AUTO);
|
|
2767
|
+
const orphanedOrRevokedPlugins = orphanedPlugins.filter(p => p.status !== ApplicationPluginStatus.AUTO);
|
|
2768
|
+
const { actuallyOrphanedPlugins, revokedPlugins } = this.splitOrphanedPluginsIntoOrphanedAndRevokedPlugins(allPlugins, orphanedOrRevokedPlugins);
|
|
2769
|
+
return [
|
|
2770
|
+
...availablePlugins,
|
|
2771
|
+
...notActuallyOrphanedPlugins,
|
|
2772
|
+
...revokedPlugins,
|
|
2773
|
+
...actuallyOrphanedPlugins
|
|
2774
|
+
];
|
|
2725
2775
|
}
|
|
2726
2776
|
extractDetails(pluginId) {
|
|
2727
2777
|
const contextPath = this.getStringMatchingRegex(pluginId, /^[^@]*(@|\/)/);
|