@c8y/ngx-components 1023.96.0 → 1023.97.3
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/index.d.ts.map +1 -1
- package/context-dashboard/device/view/index.d.ts +24 -1
- package/context-dashboard/device/view/index.d.ts.map +1 -1
- package/context-dashboard/index.d.ts +9 -3
- package/context-dashboard/index.d.ts.map +1 -1
- package/echart/index.d.ts.map +1 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs +12 -5
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs +21 -3
- package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs +2 -2
- package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs +25 -15
- package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-echart.mjs +52 -36
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-map.mjs +15 -0
- package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-upgrade.mjs +12 -1
- package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +30 -5
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/index.d.ts +5 -0
- package/index.d.ts.map +1 -1
- package/locales/de.po +57 -3
- package/locales/es.po +57 -3
- package/locales/fr.po +57 -3
- package/locales/ja_JP.po +57 -3
- package/locales/ko.po +57 -3
- package/locales/locales.pot +6 -0
- package/locales/nl.po +57 -3
- package/locales/pl.po +57 -3
- package/locales/pt_BR.po +57 -3
- package/locales/zh_CN.po +57 -3
- package/locales/zh_TW.po +57 -3
- package/map/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/upgrade/index.d.ts +1 -0
- package/upgrade/index.d.ts.map +1 -1
|
@@ -1467,6 +1467,7 @@ class WidgetComponent {
|
|
|
1467
1467
|
this.dashboardBridgeService = dashboardBridgeService;
|
|
1468
1468
|
this.el = el;
|
|
1469
1469
|
this.dashboardChild = dashboardChild;
|
|
1470
|
+
this.destroyed = false;
|
|
1470
1471
|
this.DEBOUNCE_TIME_UNTIL_WIDGET_HAS_SNAPPED = 400;
|
|
1471
1472
|
}
|
|
1472
1473
|
onBeforeSave() {
|
|
@@ -1478,7 +1479,16 @@ class WidgetComponent {
|
|
|
1478
1479
|
if (this.config.child) {
|
|
1479
1480
|
this.config.child.alerts = this.alerts;
|
|
1480
1481
|
}
|
|
1481
|
-
|
|
1482
|
+
const ng1Scope = await this.dashboardBridgeService.instantiateComponent(this.config, this.el.nativeElement, this.dashboardChild);
|
|
1483
|
+
// ngOnInit is async: if this component was destroyed while instantiateComponent was still
|
|
1484
|
+
// awaiting, ngOnDestroy already ran with this.ng1Scope undefined and could not destroy the
|
|
1485
|
+
// scope. Destroy the now-orphaned legacy scope here; otherwise it stays attached to
|
|
1486
|
+
// $rootScope and leaks the Angular widget it references via scope.dashboardChildForLegacy.
|
|
1487
|
+
if (this.destroyed) {
|
|
1488
|
+
ng1Scope?.$destroy();
|
|
1489
|
+
return;
|
|
1490
|
+
}
|
|
1491
|
+
this.ng1Scope = ng1Scope;
|
|
1482
1492
|
if (this.dashboard) {
|
|
1483
1493
|
this.resizeSubscription = merge(this.dashboard.onChangeDashboard, this.dashboard.onResize)
|
|
1484
1494
|
.pipe(debounceTime$1(this.DEBOUNCE_TIME_UNTIL_WIDGET_HAS_SNAPPED))
|
|
@@ -1489,6 +1499,7 @@ class WidgetComponent {
|
|
|
1489
1499
|
}
|
|
1490
1500
|
}
|
|
1491
1501
|
ngOnDestroy() {
|
|
1502
|
+
this.destroyed = true;
|
|
1492
1503
|
if (this.ng1Scope) {
|
|
1493
1504
|
this.ng1Scope.$destroy();
|
|
1494
1505
|
}
|