mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Improved semantics when returning from switchMap
This commit is contained in:
parent
eea6d1eec4
commit
1d1cf476c8
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -214,7 +214,7 @@
|
|||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script src="{{ 'assets/javascripts/bundle.130b2e88.min.js' | url }}"></script>
|
<script src="{{ 'assets/javascripts/bundle.897f3768.min.js' | url }}"></script>
|
||||||
{% for path in config["extra_javascript"] %}
|
{% for path in config["extra_javascript"] %}
|
||||||
<script src="{{ path | url }}"></script>
|
<script src="{{ path | url }}"></script>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -16,5 +16,5 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
{{ super() }}
|
{{ super() }}
|
||||||
<script src="{{ 'overrides/assets/javascripts/bundle.2e51be42.min.js' | url }}"></script>
|
<script src="{{ 'overrides/assets/javascripts/bundle.a375bc7d.min.js' | url }}"></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -260,7 +260,7 @@ export function setupInstantLoading(
|
|||||||
.pipe(
|
.pipe(
|
||||||
skip(1),
|
skip(1),
|
||||||
map(() => getComponentElement("container")),
|
map(() => getComponentElement("container")),
|
||||||
switchMap(el => of(...getElements("script", el))),
|
switchMap(el => getElements("script", el)),
|
||||||
concatMap(el => {
|
concatMap(el => {
|
||||||
const script = h("script")
|
const script = h("script")
|
||||||
if (el.src) {
|
if (el.src) {
|
||||||
|
@ -25,7 +25,6 @@ import {
|
|||||||
fromEvent,
|
fromEvent,
|
||||||
mapTo,
|
mapTo,
|
||||||
mergeMap,
|
mergeMap,
|
||||||
of,
|
|
||||||
switchMap,
|
switchMap,
|
||||||
takeWhile,
|
takeWhile,
|
||||||
tap,
|
tap,
|
||||||
@ -63,9 +62,9 @@ export function patchIndeterminate(
|
|||||||
): void {
|
): void {
|
||||||
document$
|
document$
|
||||||
.pipe(
|
.pipe(
|
||||||
switchMap(() => of(...getElements<HTMLInputElement>(
|
switchMap(() => getElements<HTMLInputElement>(
|
||||||
"[data-md-state=indeterminate]"
|
"[data-md-state=indeterminate]"
|
||||||
))),
|
)),
|
||||||
tap(el => {
|
tap(el => {
|
||||||
el.indeterminate = true
|
el.indeterminate = true
|
||||||
el.checked = false
|
el.checked = false
|
||||||
|
@ -26,7 +26,6 @@ import {
|
|||||||
fromEvent,
|
fromEvent,
|
||||||
mapTo,
|
mapTo,
|
||||||
mergeMap,
|
mergeMap,
|
||||||
of,
|
|
||||||
switchMap,
|
switchMap,
|
||||||
tap
|
tap
|
||||||
} from "rxjs"
|
} from "rxjs"
|
||||||
@ -77,7 +76,7 @@ export function patchScrollfix(
|
|||||||
): void {
|
): void {
|
||||||
document$
|
document$
|
||||||
.pipe(
|
.pipe(
|
||||||
switchMap(() => of(...getElements("[data-md-scrollfix]"))),
|
switchMap(() => getElements("[data-md-scrollfix]")),
|
||||||
tap(el => el.removeAttribute("data-md-scrollfix")),
|
tap(el => el.removeAttribute("data-md-scrollfix")),
|
||||||
filter(isAppleDevice),
|
filter(isAppleDevice),
|
||||||
mergeMap(el => fromEvent(el, "touchstart")
|
mergeMap(el => fromEvent(el, "touchstart")
|
||||||
|
@ -218,7 +218,7 @@ export function mountIconSearchResult(
|
|||||||
.pipe(
|
.pipe(
|
||||||
bufferCount(10),
|
bufferCount(10),
|
||||||
zipWith(boundary$),
|
zipWith(boundary$),
|
||||||
switchMap(([chunk]) => of(...chunk))
|
switchMap(([chunk]) => chunk)
|
||||||
)
|
)
|
||||||
)),
|
)),
|
||||||
withLatestFrom(query$)
|
withLatestFrom(query$)
|
||||||
|
@ -108,7 +108,7 @@ export function resolve(
|
|||||||
return from(glob(pattern, options))
|
return from(glob(pattern, options))
|
||||||
.pipe(
|
.pipe(
|
||||||
catchError(() => EMPTY),
|
catchError(() => EMPTY),
|
||||||
switchMap(files => from(files)),
|
switchMap(files => files),
|
||||||
options?.watch
|
options?.watch
|
||||||
? mergeWith(watch(pattern, options))
|
? mergeWith(watch(pattern, options))
|
||||||
: identity
|
: identity
|
||||||
|
Loading…
Reference in New Issue
Block a user