@absolutejs/absolute 0.19.0-beta.877 → 0.19.0-beta.878
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-Mb7iXC/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
var __require = import.meta.require;
|
|
3
3
|
|
|
4
|
-
// .angular-partial-tmp-
|
|
4
|
+
// .angular-partial-tmp-Mb7iXC/src/core/streamingSlotRegistrar.ts
|
|
5
5
|
var STREAMING_SLOT_REGISTRAR_KEY = Symbol.for("absolutejs.streamingSlotRegistrar");
|
|
6
6
|
var STREAMING_SLOT_WARNING_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotWarningController");
|
|
7
7
|
var STREAMING_SLOT_COLLECTION_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotCollectionController");
|
|
@@ -48,7 +48,7 @@ var warnMissingStreamingSlotCollector = (primitiveName) => {
|
|
|
48
48
|
getWarningController()?.maybeWarn(primitiveName);
|
|
49
49
|
};
|
|
50
50
|
|
|
51
|
-
// .angular-partial-tmp-
|
|
51
|
+
// .angular-partial-tmp-Mb7iXC/src/core/streamingSlotRegistry.ts
|
|
52
52
|
var STREAMING_SLOT_STORAGE_KEY = Symbol.for("absolutejs.streamingSlotAsyncLocalStorage");
|
|
53
53
|
var isObjectRecord2 = (value) => Boolean(value) && typeof value === "object";
|
|
54
54
|
var isAsyncLocalStorage = (value) => isObjectRecord2(value) && ("getStore" in value) && typeof value.getStore === "function" && ("run" in value) && typeof value.run === "function";
|
|
@@ -154,15 +154,40 @@ const createFreshAt = (
|
|
|
154
154
|
|
|
155
155
|
/* Splice `newLView` into `parentLView` at `slotIndex`, replacing
|
|
156
156
|
* `oldLView`. After the splice, the new LView lives in the parent's
|
|
157
|
-
* view tree; the old one is detached.
|
|
157
|
+
* view tree; the old one is detached.
|
|
158
|
+
*
|
|
159
|
+
* ALSO rewires the directive-instance slots in `parentLView` for
|
|
160
|
+
* this node from the OLD instance to the NEW one. Angular stores
|
|
161
|
+
* each directive instance at `parentLView[i]` for `i` in
|
|
162
|
+
* `[tNode.directiveStart, tNode.directiveEnd)`. Parent template
|
|
163
|
+
* binding ops like `ɵɵproperty('priority', value)` walk that range
|
|
164
|
+
* and write to `parentLView[i].priority` — if those slots still
|
|
165
|
+
* point at the OLD instance, parent CD writes to a dead reference
|
|
166
|
+
* and `@Input` bindings never make it to the new instance. */
|
|
158
167
|
const spliceLViewIntoParent = (
|
|
159
168
|
target: LiveInstance,
|
|
160
|
-
newLView: LView
|
|
169
|
+
newLView: LView,
|
|
170
|
+
newInstance: unknown
|
|
161
171
|
): void => {
|
|
162
172
|
const { parentLView, oldLView, slotIndex, tNode } = target;
|
|
163
173
|
replaceLViewInTree(parentLView, oldLView, newLView, slotIndex);
|
|
164
174
|
newLView[PARENT] = parentLView;
|
|
165
175
|
newLView[T_HOST] = tNode;
|
|
176
|
+
|
|
177
|
+
const oldInstance = oldLView[CONTEXT];
|
|
178
|
+
const tNodeWithDirectiveRange = tNode as TNode & {
|
|
179
|
+
directiveStart?: number;
|
|
180
|
+
directiveEnd?: number;
|
|
181
|
+
};
|
|
182
|
+
const start = tNodeWithDirectiveRange.directiveStart;
|
|
183
|
+
const end = tNodeWithDirectiveRange.directiveEnd;
|
|
184
|
+
if (typeof start === 'number' && typeof end === 'number') {
|
|
185
|
+
for (let i = start; i < end; i++) {
|
|
186
|
+
if (parentLView[i] === oldInstance) {
|
|
187
|
+
parentLView[i] = newInstance;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
}
|
|
166
191
|
};
|
|
167
192
|
|
|
168
193
|
/* Fire onDestroy + cleanup on the OLD LView so subscriptions, event
|
|
@@ -251,7 +276,7 @@ export const remountComponentClass = async (
|
|
|
251
276
|
continue;
|
|
252
277
|
}
|
|
253
278
|
|
|
254
|
-
spliceLViewIntoParent(target, fresh.newLView);
|
|
279
|
+
spliceLViewIntoParent(target, fresh.newLView, fresh.instance);
|
|
255
280
|
teardownOldLView(target.oldLView);
|
|
256
281
|
|
|
257
282
|
fresh.componentRef.hostView.detectChanges?.();
|
package/package.json
CHANGED