@c8y/ngx-components 1023.96.0 → 1023.97.4

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 (43) hide show
  1. package/alarms/index.d.ts.map +1 -1
  2. package/context-dashboard/device/view/index.d.ts +24 -1
  3. package/context-dashboard/device/view/index.d.ts.map +1 -1
  4. package/context-dashboard/index.d.ts +9 -3
  5. package/context-dashboard/index.d.ts.map +1 -1
  6. package/echart/index.d.ts.map +1 -1
  7. package/fesm2022/c8y-ngx-components-alarms.mjs +12 -5
  8. package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
  9. package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs +21 -3
  10. package/fesm2022/c8y-ngx-components-context-dashboard-device-view.mjs.map +1 -1
  11. package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs +2 -2
  12. package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs.map +1 -1
  13. package/fesm2022/c8y-ngx-components-context-dashboard.mjs +25 -15
  14. package/fesm2022/c8y-ngx-components-context-dashboard.mjs.map +1 -1
  15. package/fesm2022/c8y-ngx-components-echart.mjs +52 -36
  16. package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
  17. package/fesm2022/c8y-ngx-components-map.mjs +15 -0
  18. package/fesm2022/c8y-ngx-components-map.mjs.map +1 -1
  19. package/fesm2022/c8y-ngx-components-upgrade.mjs +12 -1
  20. package/fesm2022/c8y-ngx-components-upgrade.mjs.map +1 -1
  21. package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs +33 -9
  22. package/fesm2022/c8y-ngx-components-widgets-implementations-quick-links.mjs.map +1 -1
  23. package/fesm2022/c8y-ngx-components.mjs +30 -5
  24. package/fesm2022/c8y-ngx-components.mjs.map +1 -1
  25. package/index.d.ts +5 -0
  26. package/index.d.ts.map +1 -1
  27. package/locales/de.po +57 -3
  28. package/locales/es.po +57 -3
  29. package/locales/fr.po +57 -3
  30. package/locales/ja_JP.po +57 -3
  31. package/locales/ko.po +57 -3
  32. package/locales/locales.pot +9 -0
  33. package/locales/nl.po +57 -3
  34. package/locales/pl.po +57 -3
  35. package/locales/pt_BR.po +57 -3
  36. package/locales/zh_CN.po +57 -3
  37. package/locales/zh_TW.po +57 -3
  38. package/map/index.d.ts.map +1 -1
  39. package/package.json +1 -1
  40. package/upgrade/index.d.ts +1 -0
  41. package/upgrade/index.d.ts.map +1 -1
  42. package/widgets/implementations/quick-links/index.d.ts +3 -1
  43. package/widgets/implementations/quick-links/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
- this.ng1Scope = await this.dashboardBridgeService.instantiateComponent(this.config, this.el.nativeElement, this.dashboardChild);
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
  }