mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-23 06:13:38 -04:00
Fixed execution of RxJS teardown logic on complete (7.2.3 regression)
This commit is contained in:
@@ -31,6 +31,7 @@ import {
|
||||
} from "rxjs"
|
||||
import {
|
||||
distinctUntilKeyChanged,
|
||||
finalize,
|
||||
map,
|
||||
switchMap,
|
||||
tap,
|
||||
@@ -175,7 +176,8 @@ export function mountCodeBlock(
|
||||
/* Create and return component */
|
||||
return watchCodeBlock(el, options)
|
||||
.pipe(
|
||||
tap(internal$),
|
||||
tap(state => internal$.next(state)),
|
||||
finalize(() => internal$.complete()),
|
||||
map(state => ({ ref: el, ...state }))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
import { Observable, Subject } from "rxjs"
|
||||
import {
|
||||
filter,
|
||||
finalize,
|
||||
map,
|
||||
mapTo,
|
||||
mergeWith,
|
||||
@@ -107,7 +108,8 @@ export function mountDetails(
|
||||
/* Create and return component */
|
||||
return watchDetails(el, options)
|
||||
.pipe(
|
||||
tap(internal$),
|
||||
tap(state => internal$.next(state)),
|
||||
finalize(() => internal$.complete()),
|
||||
mapTo({ ref: el })
|
||||
)
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import {
|
||||
of
|
||||
} from "rxjs"
|
||||
import {
|
||||
finalize,
|
||||
delay,
|
||||
map,
|
||||
observeOn,
|
||||
@@ -131,7 +132,8 @@ export function mountDialog(
|
||||
/* Create and return component */
|
||||
return watchDialog(el, options)
|
||||
.pipe(
|
||||
tap(internal$),
|
||||
tap(state => internal$.next(state)),
|
||||
finalize(() => internal$.complete()),
|
||||
map(state => ({ ref: el, ...state }))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import {
|
||||
} from "rxjs"
|
||||
import {
|
||||
distinctUntilKeyChanged,
|
||||
finalize,
|
||||
map,
|
||||
observeOn,
|
||||
tap
|
||||
@@ -139,7 +140,8 @@ export function mountHeaderTitle(
|
||||
/* Create and return component */
|
||||
return watchHeaderTitle(headline, options)
|
||||
.pipe(
|
||||
tap(internal$),
|
||||
tap(state => internal$.next(state)),
|
||||
finalize(() => internal$.complete()),
|
||||
map(state => ({ ref: el, ...state }))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@ import {
|
||||
of
|
||||
} from "rxjs"
|
||||
import {
|
||||
finalize,
|
||||
map,
|
||||
mapTo,
|
||||
mergeMap,
|
||||
@@ -140,7 +141,8 @@ export function mountPalette(
|
||||
const inputs = getElements<HTMLInputElement>("input", el)
|
||||
return watchPalette(inputs)
|
||||
.pipe(
|
||||
tap(internal$),
|
||||
tap(state => internal$.next(state)),
|
||||
finalize(() => internal$.complete()),
|
||||
map(state => ({ ref: el, ...state }))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -32,6 +32,7 @@ import {
|
||||
distinctUntilChanged,
|
||||
distinctUntilKeyChanged,
|
||||
filter,
|
||||
finalize,
|
||||
map,
|
||||
take,
|
||||
takeLast,
|
||||
@@ -172,7 +173,8 @@ export function mountSearchQuery(
|
||||
/* Create and return component */
|
||||
return watchSearchQuery(el, { tx$, rx$ })
|
||||
.pipe(
|
||||
tap(internal$),
|
||||
tap(state => internal$.next(state)),
|
||||
finalize(() => internal$.complete()),
|
||||
map(state => ({ ref: el, ...state }))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import {
|
||||
import {
|
||||
bufferCount,
|
||||
filter,
|
||||
finalize,
|
||||
map,
|
||||
observeOn,
|
||||
switchMap,
|
||||
@@ -152,7 +153,8 @@ export function mountSearchResult(
|
||||
/* Create and return component */
|
||||
return result$
|
||||
.pipe(
|
||||
tap(internal$),
|
||||
tap(state => internal$.next(state)),
|
||||
finalize(() => internal$.complete()),
|
||||
map(state => ({ ref: el, ...state }))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -25,7 +25,11 @@ import {
|
||||
Subject,
|
||||
fromEvent
|
||||
} from "rxjs"
|
||||
import { map, tap } from "rxjs/operators"
|
||||
import {
|
||||
finalize,
|
||||
map,
|
||||
tap
|
||||
} from "rxjs/operators"
|
||||
|
||||
import { getLocation } from "~/browser"
|
||||
|
||||
@@ -112,7 +116,8 @@ export function mountSearchShare(
|
||||
/* Create and return component */
|
||||
return watchSearchShare(el, options)
|
||||
.pipe(
|
||||
tap(internal$),
|
||||
tap(state => internal$.next(state)),
|
||||
finalize(() => internal$.complete()),
|
||||
map(state => ({ ref: el, ...state }))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import {
|
||||
combineLatestWith,
|
||||
distinctUntilChanged,
|
||||
filter,
|
||||
finalize,
|
||||
map,
|
||||
observeOn,
|
||||
tap
|
||||
@@ -144,7 +145,8 @@ export function mountSearchSuggest(
|
||||
/* Create and return component */
|
||||
return result$
|
||||
.pipe(
|
||||
tap(internal$),
|
||||
tap(state => internal$.next(state)),
|
||||
finalize(() => internal$.complete()),
|
||||
map(() => ({ ref: el }))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import {
|
||||
} from "rxjs"
|
||||
import {
|
||||
distinctUntilChanged,
|
||||
finalize,
|
||||
map,
|
||||
observeOn,
|
||||
tap,
|
||||
@@ -157,7 +158,8 @@ export function mountSidebar(
|
||||
/* Create and return component */
|
||||
return watchSidebar(el, options)
|
||||
.pipe(
|
||||
tap(internal$),
|
||||
tap(state => internal$.next(state)),
|
||||
finalize(() => internal$.complete()),
|
||||
map(state => ({ ref: el, ...state }))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ import { NEVER, Observable, Subject, defer, of } from "rxjs"
|
||||
import {
|
||||
catchError,
|
||||
filter,
|
||||
finalize,
|
||||
map,
|
||||
shareReplay,
|
||||
tap
|
||||
@@ -117,7 +118,8 @@ export function mountSource(
|
||||
/* Create and return component */
|
||||
return watchSource(el)
|
||||
.pipe(
|
||||
tap(internal$),
|
||||
tap(state => internal$.next(state)),
|
||||
finalize(() => internal$.complete()),
|
||||
map(state => ({ ref: el, ...state }))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
import { Observable, Subject, animationFrameScheduler } from "rxjs"
|
||||
import {
|
||||
distinctUntilKeyChanged,
|
||||
finalize,
|
||||
map,
|
||||
observeOn,
|
||||
switchMap,
|
||||
@@ -135,7 +136,8 @@ export function mountTabs(
|
||||
/* Create and return component */
|
||||
return watchTabs(el, options)
|
||||
.pipe(
|
||||
tap(internal$),
|
||||
tap(state => internal$.next(state)),
|
||||
finalize(() => internal$.complete()),
|
||||
map(state => ({ ref: el, ...state }))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import {
|
||||
bufferCount,
|
||||
distinctUntilChanged,
|
||||
distinctUntilKeyChanged,
|
||||
finalize,
|
||||
map,
|
||||
observeOn,
|
||||
scan,
|
||||
@@ -267,7 +268,8 @@ export function mountTableOfContents(
|
||||
const anchors = getElements<HTMLAnchorElement>("[href^=\\#]", el)
|
||||
return watchTableOfContents(anchors, options)
|
||||
.pipe(
|
||||
tap(internal$),
|
||||
tap(state => internal$.next(state)),
|
||||
finalize(() => internal$.complete()),
|
||||
map(state => ({ ref: el, ...state }))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ import {
|
||||
bufferCount,
|
||||
distinctUntilChanged,
|
||||
distinctUntilKeyChanged,
|
||||
finalize,
|
||||
map,
|
||||
observeOn,
|
||||
tap,
|
||||
@@ -170,7 +171,8 @@ export function mountBackToTop(
|
||||
/* Create and return component */
|
||||
return watchBackToTop(el, { viewport$, header$, main$ })
|
||||
.pipe(
|
||||
tap(internal$),
|
||||
tap(state => internal$.next(state)),
|
||||
finalize(() => internal$.complete()),
|
||||
map(state => ({ ref: el, ...state }))
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user