@breadstone/mosaik-elements-angular 0.0.270 → 0.0.272
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 0.0.272 (2026-05-13)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- **ItemDefDirective:** schedule deferred cleanup of disconnected views ([9fa77c66fd](https://github.com/RueDeRennes/mosaik/commit/9fa77c66fd))
|
|
6
|
+
|
|
7
|
+
## 0.0.271 (2026-05-13)
|
|
8
|
+
|
|
9
|
+
This was a version bump only for mosaik-elements-angular to align it with other projects, there were no code changes.
|
|
10
|
+
|
|
1
11
|
## 0.0.270 (2026-05-13)
|
|
2
12
|
|
|
3
13
|
### 🚀 Features
|
|
@@ -5809,6 +5809,7 @@ class ItemDefDirective {
|
|
|
5809
5809
|
_injector;
|
|
5810
5810
|
_views;
|
|
5811
5811
|
_nativeElement;
|
|
5812
|
+
_cleanupScheduled;
|
|
5812
5813
|
// #endregion
|
|
5813
5814
|
// #region Ctor
|
|
5814
5815
|
constructor() {
|
|
@@ -5817,6 +5818,7 @@ class ItemDefDirective {
|
|
|
5817
5818
|
this._injector = inject(Injector);
|
|
5818
5819
|
this._views = [];
|
|
5819
5820
|
this._nativeElement = null;
|
|
5821
|
+
this._cleanupScheduled = false;
|
|
5820
5822
|
}
|
|
5821
5823
|
// #endregion
|
|
5822
5824
|
// #region Properties
|
|
@@ -5875,7 +5877,7 @@ class ItemDefDirective {
|
|
|
5875
5877
|
*/
|
|
5876
5878
|
createItemTemplateCallback(itemCellDef) {
|
|
5877
5879
|
return (item, definition) => {
|
|
5878
|
-
this.
|
|
5880
|
+
this.scheduleViewCleanup();
|
|
5879
5881
|
const viewRef = this._vcr.createEmbeddedView(itemCellDef.template, {
|
|
5880
5882
|
$implicit: item,
|
|
5881
5883
|
definition: definition
|
|
@@ -5889,6 +5891,23 @@ class ItemDefDirective {
|
|
|
5889
5891
|
return fragment;
|
|
5890
5892
|
};
|
|
5891
5893
|
}
|
|
5894
|
+
/**
|
|
5895
|
+
* Schedules a deferred cleanup of disconnected views.
|
|
5896
|
+
* The cleanup runs after the current Lit render cycle completes via `requestAnimationFrame`,
|
|
5897
|
+
* ensuring that newly created DOM nodes have been flushed to the document before checking `isConnected`.
|
|
5898
|
+
*
|
|
5899
|
+
* @private
|
|
5900
|
+
*/
|
|
5901
|
+
scheduleViewCleanup() {
|
|
5902
|
+
if (this._cleanupScheduled) {
|
|
5903
|
+
return;
|
|
5904
|
+
}
|
|
5905
|
+
this._cleanupScheduled = true;
|
|
5906
|
+
requestAnimationFrame(() => {
|
|
5907
|
+
this._cleanupScheduled = false;
|
|
5908
|
+
this.cleanupDisconnectedViews();
|
|
5909
|
+
});
|
|
5910
|
+
}
|
|
5892
5911
|
/**
|
|
5893
5912
|
* Destroys embedded views whose DOM nodes are no longer connected to the document.
|
|
5894
5913
|
* This prevents memory leaks when the DataList re-renders and replaces item content.
|