@absolutejs/absolute 0.19.0-beta.980 → 0.19.0-beta.982
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/dist/angular/browser.js +19 -4
- package/dist/angular/browser.js.map +3 -3
- package/dist/angular/components/core/streamingSlotRegistrar.js +1 -1
- package/dist/angular/components/core/streamingSlotRegistry.js +2 -2
- package/dist/angular/index.js +48 -18
- package/dist/angular/index.js.map +4 -4
- package/dist/angular/server.js +30 -15
- package/dist/angular/server.js.map +3 -3
- package/dist/build.js +69 -20
- package/dist/build.js.map +4 -4
- package/dist/index.js +69 -20
- package/dist/index.js.map +4 -4
- package/dist/src/angular/composables/useSubscription.d.ts +9 -3
- package/dist/src/build/compileAngular.d.ts +19 -1
- package/package.json +1 -1
package/dist/angular/browser.js
CHANGED
|
@@ -9457,9 +9457,24 @@ var useResource = (fetcher, options = {}) => {
|
|
|
9457
9457
|
// src/angular/composables/useSubscription.ts
|
|
9458
9458
|
import { DestroyRef as DestroyRef2, inject as inject3 } from "@angular/core";
|
|
9459
9459
|
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
|
9460
|
-
|
|
9461
|
-
|
|
9462
|
-
|
|
9460
|
+
var warnedOnce = false;
|
|
9461
|
+
var tryCaptureDestroyRef = () => {
|
|
9462
|
+
try {
|
|
9463
|
+
return inject3(DestroyRef2);
|
|
9464
|
+
} catch {
|
|
9465
|
+
if (!warnedOnce) {
|
|
9466
|
+
warnedOnce = true;
|
|
9467
|
+
console.warn("[absolute/angular] useSubscription was called outside an Angular injection context (likely from a lifecycle hook). Auto-teardown via takeUntilDestroyed is disabled for that call; the subscription will leak unless the caller manually unsubscribes. Move the call to a field initializer or the constructor, or pass the captured DestroyRef as the third argument.");
|
|
9468
|
+
}
|
|
9469
|
+
return null;
|
|
9470
|
+
}
|
|
9471
|
+
};
|
|
9472
|
+
function useSubscription(observable, observerOrNext, destroyRef) {
|
|
9473
|
+
const captured = destroyRef ?? tryCaptureDestroyRef();
|
|
9474
|
+
const observer = typeof observerOrNext === "function" ? { next: observerOrNext } : observerOrNext;
|
|
9475
|
+
if (!captured)
|
|
9476
|
+
return observable.subscribe(observer);
|
|
9477
|
+
return observable.pipe(takeUntilDestroyed(captured)).subscribe(observer);
|
|
9463
9478
|
}
|
|
9464
9479
|
// src/angular/composables/useTimers.ts
|
|
9465
9480
|
import { DestroyRef as DestroyRef3, inject as inject4 } from "@angular/core";
|
|
@@ -10355,5 +10370,5 @@ export {
|
|
|
10355
10370
|
ABSOLUTE_HTTP_TRANSFER_CACHE_SKIP_HEADER
|
|
10356
10371
|
};
|
|
10357
10372
|
|
|
10358
|
-
//# debugId=
|
|
10373
|
+
//# debugId=AF4A6CBC43E323FC64756E2164756E21
|
|
10359
10374
|
//# sourceMappingURL=browser.js.map
|