@c8y/ngx-components 1021.58.0 → 1021.59.6

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 (56) hide show
  1. package/core/router/scoped-context-route.service.d.ts +2 -1
  2. package/core/router/scoped-context-route.service.d.ts.map +1 -1
  3. package/device-provisioned-certificates/device-tab-provisioned-certificates.component.d.ts.map +1 -1
  4. package/esm2022/core/router/scoped-context-route.service.mjs +32 -33
  5. package/esm2022/datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/datapoints-export-selector-file-exporter.component.mjs +3 -3
  6. package/esm2022/datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/datapoints-export-selector-preview/datapoints-export-selector-preview.component.mjs +3 -3
  7. package/esm2022/datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/datapoints-exports-selector-data-scope/datapoints-exports-selector-data-scope.component.mjs +3 -3
  8. package/esm2022/datapoints-export-selector/datapoints-export-selector.component.mjs +3 -3
  9. package/esm2022/device-provisioned-certificates/device-provisioned-certificates.guard.mjs +2 -2
  10. package/esm2022/device-provisioned-certificates/device-tab-provisioned-certificates.component.mjs +7 -5
  11. package/esm2022/sensor-phone/sensor-phone-modal/sensor-phone-modal.component.mjs +4 -4
  12. package/esm2022/sub-assets/add-group/add-group.component.mjs +30 -4
  13. package/esm2022/sub-assets/add-group/add-group.module.mjs +23 -4
  14. package/esm2022/sub-assets/assign-devices/assign-child-devices.component.mjs +14 -2
  15. package/esm2022/sub-assets/groups.component.mjs +3 -3
  16. package/esm2022/sub-assets/sub-assets-grids.module.mjs +24 -0
  17. package/esm2022/sub-assets/sub-assets.component.mjs +4 -4
  18. package/esm2022/sub-assets/sub-assets.module.mjs +8 -12
  19. package/esm2022/trusted-certificates/crl/crl-settings.component.mjs +3 -3
  20. package/esm2022/trusted-certificates/list/trusted-certificate-list.component.mjs +5 -5
  21. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +8 -8
  22. package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
  23. package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs +7 -5
  24. package/fesm2022/c8y-ngx-components-device-provisioned-certificates.mjs.map +1 -1
  25. package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs +3 -3
  26. package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs.map +1 -1
  27. package/fesm2022/c8y-ngx-components-sub-assets.mjs +1246 -1181
  28. package/fesm2022/c8y-ngx-components-sub-assets.mjs.map +1 -1
  29. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +6 -6
  30. package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
  31. package/fesm2022/c8y-ngx-components.mjs +29 -30
  32. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  33. package/locales/de.po +46 -51
  34. package/locales/es.po +25 -31
  35. package/locales/fr.po +30 -35
  36. package/locales/ja_JP.po +24 -32
  37. package/locales/ko.po +26 -31
  38. package/locales/locales.pot +6 -6
  39. package/locales/nl.po +26 -31
  40. package/locales/pl.po +27 -32
  41. package/locales/pt_BR.po +25 -30
  42. package/locales/zh_CN.po +27 -32
  43. package/locales/zh_TW.po +28 -33
  44. package/package.json +1 -1
  45. package/sensor-phone/sensor-phone-modal/sensor-phone-modal.component.d.ts.map +1 -1
  46. package/sub-assets/add-group/add-group.component.d.ts +9 -1
  47. package/sub-assets/add-group/add-group.component.d.ts.map +1 -1
  48. package/sub-assets/add-group/add-group.module.d.ts +3 -1
  49. package/sub-assets/add-group/add-group.module.d.ts.map +1 -1
  50. package/sub-assets/assign-devices/assign-child-devices.component.d.ts +3 -1
  51. package/sub-assets/assign-devices/assign-child-devices.component.d.ts.map +1 -1
  52. package/sub-assets/sub-assets-grids.module.d.ts +15 -0
  53. package/sub-assets/sub-assets-grids.module.d.ts.map +1 -0
  54. package/sub-assets/sub-assets.module.d.ts +18 -19
  55. package/sub-assets/sub-assets.module.d.ts.map +1 -1
  56. package/trusted-certificates/list/trusted-certificate-list.component.d.ts.map +1 -1
@@ -24710,10 +24710,10 @@ class ScopedContextRouteService {
24710
24710
  throw new Error(`${ScopedContextRouteService.name} should not be used on a route without a rootContext`);
24711
24711
  }
24712
24712
  this.router.events
24713
- .pipe(filter(e => e instanceof ActivationEnd), takeUntilDestroyed(this.destroyRef))
24714
- .subscribe((e) => this.redirectToFirstTab(e));
24715
- route.data
24716
- .pipe(merge$1(this.updatedContext(route), this.refreshTrigger$), switchMap(() => this.tabsResolver.resolve(route.snapshot)), takeUntilDestroyed(this.destroyRef))
24713
+ .pipe(filter(event => event instanceof ActivationEnd && this.needsRedirect(event)), switchMap((event) => this.tabsResolver.resolve(event.snapshot)), takeUntilDestroyed(this.destroyRef))
24714
+ .subscribe((tabs) => this.redirectToFirstTabOnActivationEnd(tabs));
24715
+ merge(this.updatedContext(route), this.refreshTrigger$, route.data)
24716
+ .pipe(switchMap(() => this.tabsResolver.resolve(route.snapshot)), takeUntilDestroyed(this.destroyRef))
24717
24717
  .subscribe(tabs => this.updateTabs(tabs));
24718
24718
  }
24719
24719
  /**
@@ -24728,6 +24728,22 @@ class ScopedContextRouteService {
24728
24728
  refreshContext() {
24729
24729
  this.refreshTrigger$.next();
24730
24730
  }
24731
+ redirectToFirstTabOnActivationEnd(tabs) {
24732
+ if (!tabs.length) {
24733
+ return;
24734
+ }
24735
+ const tab = this.tabsService.sortTabs(tabs)[0];
24736
+ const currentQueryParams = this.router.routerState.snapshot.root.queryParams;
24737
+ const queryParamsString = new URLSearchParams(currentQueryParams).toString();
24738
+ const queryParamsSuffix = queryParamsString ? `?${queryParamsString}` : '';
24739
+ const currentContextId = (this.router.url.match(this.ID_REGEX) || []).shift();
24740
+ const tabPathId = (tab.path.match(this.ID_REGEX) || []).shift();
24741
+ if (currentContextId === tabPathId) {
24742
+ this.router.navigateByUrl(`${tab.path}${queryParamsSuffix}`, {
24743
+ replaceUrl: true
24744
+ });
24745
+ }
24746
+ }
24731
24747
  /**
24732
24748
  * Sets an API hook to refresh the contextData on changes.
24733
24749
  * @param activatedRoute The current activated route.
@@ -24755,39 +24771,22 @@ class ScopedContextRouteService {
24755
24771
  this.lastAddedTabs.forEach(t => this.tabsService.remove(t));
24756
24772
  this.lastAddedTabs = tabs;
24757
24773
  tabs.forEach(t => this.tabsService.add(t));
24758
- this.redirectToFirstTab();
24774
+ this.redirectToFirstTabOnUpdateTabs();
24759
24775
  }
24760
- redirectToFirstTab(event) {
24776
+ redirectToFirstTabOnUpdateTabs() {
24761
24777
  const currentQueryParams = this.router.routerState.snapshot.root.queryParams;
24762
24778
  const queryParamsString = new URLSearchParams(currentQueryParams).toString();
24763
24779
  const queryParamsSuffix = queryParamsString ? `?${queryParamsString}` : '';
24764
- if (event) {
24765
- if (this.needsRedirect(event)) {
24766
- const tab = this.tabsService.sortTabs(event.snapshot.data.tabs)?.[0];
24767
- if (!tab) {
24768
- return;
24769
- }
24770
- const currentContextId = (this.router.url.match(this.ID_REGEX) || []).shift();
24780
+ const currentContextId = (this.router.url.match(this.ID_REGEX) || []).shift();
24781
+ if (this.needsRedirectLegacy()) {
24782
+ this.tabsService.firstTab$
24783
+ .pipe(filter((tab) => typeof tab?.path === 'string'))
24784
+ .subscribe((tab) => {
24771
24785
  const tabPathId = (tab.path.match(this.ID_REGEX) || []).shift();
24772
24786
  if (currentContextId === tabPathId) {
24773
- this.router.navigateByUrl(`${tab.path}${queryParamsSuffix}`, {
24774
- replaceUrl: true
24775
- });
24787
+ this.router.navigateByUrl(`${tab.path}${queryParamsSuffix}`, { replaceUrl: true });
24776
24788
  }
24777
- }
24778
- }
24779
- else {
24780
- const currentContextId = (this.router.url.match(this.ID_REGEX) || []).shift();
24781
- if (this.needsRedirectLegacy()) {
24782
- this.tabsService.firstTab$
24783
- .pipe(filter((tab) => typeof tab?.path === 'string'))
24784
- .subscribe((tab) => {
24785
- const tabPathId = (tab.path.match(this.ID_REGEX) || []).shift();
24786
- if (currentContextId === tabPathId) {
24787
- this.router.navigateByUrl(`${tab.path}${queryParamsSuffix}`, { replaceUrl: true });
24788
- }
24789
- });
24790
- }
24789
+ });
24791
24790
  }
24792
24791
  }
24793
24792
  needsRedirectLegacy() {