@c8y/ngx-components 1018.0.192 → 1018.0.196

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.
Files changed (97) hide show
  1. package/core/common/global-config.service.d.ts +1 -1
  2. package/core/common/permissions.service.d.ts +67 -0
  3. package/core/common/tenant-ui.service.d.ts +1 -1
  4. package/esm2020/assets-navigator/asset-node.service.mjs +5 -4
  5. package/esm2020/auth-configuration/auth-configuration.guard.mjs +5 -2
  6. package/esm2020/auth-configuration/factories/navigation.factory.mjs +3 -3
  7. package/esm2020/cockpit-config/cockpit-config.guard.mjs +2 -2
  8. package/esm2020/cockpit-config/cockpit-config.service.mjs +2 -2
  9. package/esm2020/context-dashboard/add-dashboard.factory.mjs +6 -3
  10. package/esm2020/context-dashboard/context-dashboard.service.mjs +3 -3
  11. package/esm2020/context-dashboard/dashboard-detail.component.mjs +2 -2
  12. package/esm2020/context-dashboard/report-dashboard/report-dashboard-list.component.mjs +3 -3
  13. package/esm2020/core/common/global-config.service.mjs +3 -2
  14. package/esm2020/core/common/permissions.service.mjs +68 -1
  15. package/esm2020/core/common/tenant-ui.service.mjs +3 -2
  16. package/esm2020/core/common/user-preferences/user-preferences.service.mjs +6 -2
  17. package/esm2020/ecosystem/application-properties/application-properties.component.mjs +2 -2
  18. package/esm2020/ecosystem/ecosystem-navigation.factory.mjs +3 -3
  19. package/esm2020/ecosystem/packages/package-list/packages-list.component.mjs +2 -2
  20. package/esm2020/ecosystem/packages/package-versions/package-versions-list/package-versions-list.component.mjs +2 -2
  21. package/esm2020/files-repository/files-repository.guard.mjs +5 -3
  22. package/esm2020/protocol-lwm2m/components/bootstrap-parameters/lwm2m-bootstrap-parameters.component.mjs +2 -2
  23. package/esm2020/register-device/register-device-navigation.factory.mjs +3 -3
  24. package/esm2020/reports/export-schedules.component.mjs +3 -3
  25. package/esm2020/repository/configuration/device-tab/configuration-preview.component.mjs +4 -4
  26. package/esm2020/sms-gateway/sms-gateway.guard.mjs +2 -2
  27. package/esm2020/sms-gateway/sms-gateway.module.mjs +6 -6
  28. package/esm2020/sub-assets/add-group/add-group.component.mjs +2 -2
  29. package/esm2020/sub-assets/groups.component.mjs +2 -2
  30. package/esm2020/sub-assets/sub-assets.component.mjs +2 -2
  31. package/esm2020/sub-assets/sub-assets.service.mjs +16 -10
  32. package/esm2020/tenants/tenant-list/tenant-list.component.mjs +12 -7
  33. package/esm2020/upgrade/ng1/downgraded.services.mjs +3 -2
  34. package/esm2020/upgrade/ng1/index.mjs +4 -3
  35. package/fesm2015/c8y-ngx-components-assets-navigator.mjs +4 -3
  36. package/fesm2015/c8y-ngx-components-assets-navigator.mjs.map +1 -1
  37. package/fesm2015/c8y-ngx-components-auth-configuration.mjs +7 -4
  38. package/fesm2015/c8y-ngx-components-auth-configuration.mjs.map +1 -1
  39. package/fesm2015/c8y-ngx-components-cockpit-config.mjs +3 -3
  40. package/fesm2015/c8y-ngx-components-cockpit-config.mjs.map +1 -1
  41. package/fesm2015/c8y-ngx-components-context-dashboard.mjs +11 -8
  42. package/fesm2015/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  43. package/fesm2015/c8y-ngx-components-ecosystem.mjs +6 -6
  44. package/fesm2015/c8y-ngx-components-ecosystem.mjs.map +1 -1
  45. package/fesm2015/c8y-ngx-components-files-repository.mjs +5 -3
  46. package/fesm2015/c8y-ngx-components-files-repository.mjs.map +1 -1
  47. package/fesm2015/c8y-ngx-components-protocol-lwm2m-components-bootstrap-parameters.mjs +2 -2
  48. package/fesm2015/c8y-ngx-components-protocol-lwm2m-components-bootstrap-parameters.mjs.map +1 -1
  49. package/fesm2015/c8y-ngx-components-register-device.mjs +3 -3
  50. package/fesm2015/c8y-ngx-components-register-device.mjs.map +1 -1
  51. package/fesm2015/c8y-ngx-components-reports.mjs +2 -2
  52. package/fesm2015/c8y-ngx-components-reports.mjs.map +1 -1
  53. package/fesm2015/c8y-ngx-components-repository-configuration.mjs +3 -3
  54. package/fesm2015/c8y-ngx-components-repository-configuration.mjs.map +1 -1
  55. package/fesm2015/c8y-ngx-components-sms-gateway.mjs +6 -6
  56. package/fesm2015/c8y-ngx-components-sms-gateway.mjs.map +1 -1
  57. package/fesm2015/c8y-ngx-components-sub-assets.mjs +19 -13
  58. package/fesm2015/c8y-ngx-components-sub-assets.mjs.map +1 -1
  59. package/fesm2015/c8y-ngx-components-tenants.mjs +11 -6
  60. package/fesm2015/c8y-ngx-components-tenants.mjs.map +1 -1
  61. package/fesm2015/c8y-ngx-components-upgrade.mjs +4 -2
  62. package/fesm2015/c8y-ngx-components-upgrade.mjs.map +1 -1
  63. package/fesm2015/c8y-ngx-components.mjs +74 -3
  64. package/fesm2015/c8y-ngx-components.mjs.map +1 -1
  65. package/fesm2020/c8y-ngx-components-assets-navigator.mjs +4 -3
  66. package/fesm2020/c8y-ngx-components-assets-navigator.mjs.map +1 -1
  67. package/fesm2020/c8y-ngx-components-auth-configuration.mjs +7 -4
  68. package/fesm2020/c8y-ngx-components-auth-configuration.mjs.map +1 -1
  69. package/fesm2020/c8y-ngx-components-cockpit-config.mjs +3 -3
  70. package/fesm2020/c8y-ngx-components-cockpit-config.mjs.map +1 -1
  71. package/fesm2020/c8y-ngx-components-context-dashboard.mjs +11 -8
  72. package/fesm2020/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  73. package/fesm2020/c8y-ngx-components-ecosystem.mjs +6 -6
  74. package/fesm2020/c8y-ngx-components-ecosystem.mjs.map +1 -1
  75. package/fesm2020/c8y-ngx-components-files-repository.mjs +5 -3
  76. package/fesm2020/c8y-ngx-components-files-repository.mjs.map +1 -1
  77. package/fesm2020/c8y-ngx-components-protocol-lwm2m-components-bootstrap-parameters.mjs +2 -2
  78. package/fesm2020/c8y-ngx-components-protocol-lwm2m-components-bootstrap-parameters.mjs.map +1 -1
  79. package/fesm2020/c8y-ngx-components-register-device.mjs +3 -3
  80. package/fesm2020/c8y-ngx-components-register-device.mjs.map +1 -1
  81. package/fesm2020/c8y-ngx-components-reports.mjs +2 -2
  82. package/fesm2020/c8y-ngx-components-reports.mjs.map +1 -1
  83. package/fesm2020/c8y-ngx-components-repository-configuration.mjs +3 -3
  84. package/fesm2020/c8y-ngx-components-repository-configuration.mjs.map +1 -1
  85. package/fesm2020/c8y-ngx-components-sms-gateway.mjs +6 -6
  86. package/fesm2020/c8y-ngx-components-sms-gateway.mjs.map +1 -1
  87. package/fesm2020/c8y-ngx-components-sub-assets.mjs +19 -13
  88. package/fesm2020/c8y-ngx-components-sub-assets.mjs.map +1 -1
  89. package/fesm2020/c8y-ngx-components-tenants.mjs +11 -6
  90. package/fesm2020/c8y-ngx-components-tenants.mjs.map +1 -1
  91. package/fesm2020/c8y-ngx-components-upgrade.mjs +4 -2
  92. package/fesm2020/c8y-ngx-components-upgrade.mjs.map +1 -1
  93. package/fesm2020/c8y-ngx-components.mjs +74 -3
  94. package/fesm2020/c8y-ngx-components.mjs.map +1 -1
  95. package/package.json +1 -1
  96. package/tenants/tenant-list/tenant-list.component.d.ts +4 -2
  97. package/upgrade/ng1/downgraded.services.d.ts +1 -0
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { Component, Input, ViewChild, Injectable, Pipe, EventEmitter, Output, NgModule } from '@angular/core';
3
3
  import * as i2 from '@c8y/ngx-components';
4
- import { gettext, Status, ViewContext, PackageType, ApplicationPluginStatus, DataGridComponent, CoreModule, hookRoute, FormsModule, hookTab, hookNavigator, hookWizard } from '@c8y/ngx-components';
4
+ import { gettext, Status, Permissions, ViewContext, PackageType, ApplicationPluginStatus, DataGridComponent, CoreModule, hookRoute, FormsModule, hookTab, hookNavigator, hookWizard } from '@c8y/ngx-components';
5
5
  import * as i1 from '@c8y/ngx-components/ecosystem/shared';
6
6
  import { packageProperties, PRODUCT_EXPERIENCE, EcosystemWizards, ApplicationPropertiesFormComponent, ERROR_TYPE, PACKAGE_TYPE_LABELS, SharedEcosystemModule } from '@c8y/ngx-components/ecosystem/shared';
7
7
  import * as i3 from '@angular/common';
@@ -287,7 +287,7 @@ class ApplicationPropertiesComponent {
287
287
  this.isUpdateAvailable = false;
288
288
  }
289
289
  async ngOnInit() {
290
- this.hasAdminPermissions = this.permissions.hasRole('ROLE_APPLICATION_MANAGEMENT_ADMIN');
290
+ this.hasAdminPermissions = this.permissions.hasRole(Permissions.ROLE_APPLICATION_MANAGEMENT_ADMIN);
291
291
  await this.refresh();
292
292
  }
293
293
  async refresh() {
@@ -859,8 +859,8 @@ class EcosystemNavigationFactory {
859
859
  this.permissions = permissions;
860
860
  this.navs = [];
861
861
  this.showNavigatorNodes = this.permissions.hasAnyRole([
862
- 'ROLE_APPLICATION_MANAGEMENT_READ',
863
- 'ROLE_APPLICATION_MANAGEMENT_ADMIN'
862
+ Permissions.ROLE_APPLICATION_MANAGEMENT_READ,
863
+ Permissions.ROLE_APPLICATION_MANAGEMENT_ADMIN
864
864
  ]);
865
865
  }
866
866
  async get() {
@@ -1676,7 +1676,7 @@ class PackagesListComponent {
1676
1676
  this.packages$ = this.reload$.pipe(takeUntil(this.destroy$), tap(() => (this.reloading = true)), switchMap(() => this.ecosystemService.getPackageApplications()), tap(() => (this.reloading = false)), shareReplay(1));
1677
1677
  }
1678
1678
  ngOnInit() {
1679
- this.hasAdminPermissions = this.permissions.hasRole('ROLE_APPLICATION_MANAGEMENT_ADMIN');
1679
+ this.hasAdminPermissions = this.permissions.hasRole(Permissions.ROLE_APPLICATION_MANAGEMENT_ADMIN);
1680
1680
  this.loadPackages();
1681
1681
  }
1682
1682
  loadPackages() {
@@ -1798,7 +1798,7 @@ class PackageVersionsListComponent {
1798
1798
  }
1799
1799
  async ngOnInit() {
1800
1800
  this.isLoading = true;
1801
- this.hasAdminPermissions = this.permissions.hasRole('ROLE_APPLICATION_MANAGEMENT_ADMIN');
1801
+ this.hasAdminPermissions = this.permissions.hasRole(Permissions.ROLE_APPLICATION_MANAGEMENT_ADMIN);
1802
1802
  this.package = this.activatedRoute?.snapshot?.parent?.data?.contextData;
1803
1803
  this.isPackageOwnedByCurrentTenant = this.ecosystemService.isOwner(this.package);
1804
1804
  this.versionsLimit = (await this.optionsService.getSystemOption('application', 'versions.limit', DEFAULT_VERSIONS_LIMIT));