@c8y/ngx-components 1021.59.1 → 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.
- package/core/router/scoped-context-route.service.d.ts +2 -1
- package/core/router/scoped-context-route.service.d.ts.map +1 -1
- package/esm2022/core/router/scoped-context-route.service.mjs +32 -33
- package/esm2022/datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/datapoints-export-selector-file-exporter.component.mjs +3 -3
- 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
- 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
- package/esm2022/datapoints-export-selector/datapoints-export-selector.component.mjs +3 -3
- package/esm2022/sensor-phone/sensor-phone-modal/sensor-phone-modal.component.mjs +4 -4
- package/esm2022/trusted-certificates/crl/crl-settings.component.mjs +3 -3
- package/esm2022/trusted-certificates/list/trusted-certificate-list.component.mjs +3 -3
- package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs +8 -8
- package/fesm2022/c8y-ngx-components-datapoints-export-selector.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs +3 -3
- package/fesm2022/c8y-ngx-components-sensor-phone-sensor-phone-modal.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs +4 -4
- package/fesm2022/c8y-ngx-components-trusted-certificates.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +29 -30
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/locales/de.po +46 -51
- package/locales/es.po +25 -31
- package/locales/fr.po +30 -35
- package/locales/ja_JP.po +24 -32
- package/locales/ko.po +26 -31
- package/locales/locales.pot +3 -3
- package/locales/nl.po +26 -31
- package/locales/pl.po +27 -32
- package/locales/pt_BR.po +25 -30
- package/locales/zh_CN.po +27 -32
- package/locales/zh_TW.po +28 -33
- package/package.json +1 -1
- package/sensor-phone/sensor-phone-modal/sensor-phone-modal.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(
|
|
24714
|
-
.subscribe((
|
|
24715
|
-
route.data
|
|
24716
|
-
.pipe(
|
|
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.
|
|
24774
|
+
this.redirectToFirstTabOnUpdateTabs();
|
|
24759
24775
|
}
|
|
24760
|
-
|
|
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
|
-
|
|
24765
|
-
|
|
24766
|
-
|
|
24767
|
-
|
|
24768
|
-
|
|
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() {
|