@magmonium/one 0.4.44 → 0.4.46
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.
|
@@ -29,7 +29,7 @@ import { o as isEditableImage, s as outputSize } from "./magmonium-one-image-fra
|
|
|
29
29
|
import * as i0 from "@angular/core";
|
|
30
30
|
import { ApplicationRef, CUSTOM_ELEMENTS_SCHEMA, ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, DOCUMENT, DestroyRef, Directive, ElementRef, EventEmitter, HostAttributeToken, HostBinding, HostListener, Injectable, InjectionToken, Injector, Input, Output, TemplateRef, ViewChild, ViewContainerRef, ViewEncapsulation, afterEveryRender, afterNextRender, afterRenderEffect, computed, contentChild, contentChildren, createComponent, effect, forwardRef, inject, input, inputBinding, linkedSignal, makeEnvironmentProviders, model, numberAttribute, output, outputBinding, provideAppInitializer, provideBrowserGlobalErrorListeners, provideZonelessChangeDetection, reflectComponentType, runInInjectionContext, signal, twoWayBinding, untracked, viewChild, viewChildren } from "@angular/core";
|
|
31
31
|
import { HttpErrorResponse, provideHttpClient, withFetch, withInterceptors } from "@angular/common/http";
|
|
32
|
-
import { EMPTY, Observable, Subject, catchError, combineLatest, filter, finalize, firstValueFrom, forkJoin, from, fromEvent, map, mergeMap, of, pipe, race, shareReplay, startWith, switchMap, take, tap, throwError } from "rxjs";
|
|
32
|
+
import { EMPTY, Observable, Subject, catchError, combineLatest, distinctUntilChanged, filter, finalize, firstValueFrom, forkJoin, from, fromEvent, map, mergeMap, of, pipe, race, shareReplay, startWith, switchMap, take, tap, throwError } from "rxjs";
|
|
33
33
|
import { rxResource, takeUntilDestroyed, toObservable, toSignal } from "@angular/core/rxjs-interop";
|
|
34
34
|
import { patchState, signalStore, withComputed, withHooks, withMethods, withProps, withState } from "@ngrx/signals";
|
|
35
35
|
import { rxMethod } from "@ngrx/signals/rxjs-interop";
|
|
@@ -29231,9 +29231,24 @@ var AppLogoComponent = class AppLogoComponent {
|
|
|
29231
29231
|
size = input(...ngDevMode ? [void 0, { debugName: "size" }] : /* istanbul ignore next */ []);
|
|
29232
29232
|
#state = inject(AppLogoState);
|
|
29233
29233
|
#own = inject(APP_LOGO_SOURCE);
|
|
29234
|
+
#injector = inject(Injector);
|
|
29235
|
+
#unheld = computed(() => {
|
|
29236
|
+
const link = this.link()?.trim();
|
|
29237
|
+
return link && !this.#state.logos()[link] ? link : void 0;
|
|
29238
|
+
}, ...ngDevMode ? [{ debugName: "#unheld" }] : /* istanbul ignore next */ []);
|
|
29239
|
+
#fetched = toSignal(toObservable(this.#unheld).pipe(distinctUntilChanged(), switchMap((link) => link ? this.#injector.get(AppIdentityService).identity(link) : of(void 0))));
|
|
29234
29240
|
lookup = computed(() => {
|
|
29235
29241
|
const link = this.link()?.trim();
|
|
29236
|
-
if (link)
|
|
29242
|
+
if (link) {
|
|
29243
|
+
const held = this.#state.logos()[link];
|
|
29244
|
+
if (held) return held;
|
|
29245
|
+
const identity = this.#fetched();
|
|
29246
|
+
return identity?.link === link ? {
|
|
29247
|
+
glyph: identity.logoGlyph,
|
|
29248
|
+
color: identity.appColor,
|
|
29249
|
+
name: identity.name || link
|
|
29250
|
+
} : void 0;
|
|
29251
|
+
}
|
|
29237
29252
|
return this.glyph() !== void 0 || this.appColor() !== void 0 || this.name() !== void 0 ? void 0 : this.#own();
|
|
29238
29253
|
}, ...ngDevMode ? [{ debugName: "lookup" }] : /* istanbul ignore next */ []);
|
|
29239
29254
|
color = computed(() => {
|
|
@@ -29534,13 +29549,22 @@ var RemoteComponent = class RemoteComponent {
|
|
|
29534
29549
|
return glyph ? rebuildLogoGlyph(glyph).svg || void 0 : void 0;
|
|
29535
29550
|
}, ...ngDevMode ? [{ debugName: "chosenGlyph" }] : /* istanbul ignore next */ []);
|
|
29536
29551
|
splash = computed(() => {
|
|
29537
|
-
const link = this.appLink()
|
|
29552
|
+
const link = this.appLink() || void 0;
|
|
29538
29553
|
const own = link ? this.appLogoState.logos()[link] : void 0;
|
|
29539
|
-
const
|
|
29554
|
+
const chosen = this.chosenGlyph();
|
|
29555
|
+
const color = this.mountColor();
|
|
29556
|
+
if (!own) return {
|
|
29557
|
+
link,
|
|
29558
|
+
glyph: chosen,
|
|
29559
|
+
color,
|
|
29560
|
+
name: void 0
|
|
29561
|
+
};
|
|
29562
|
+
const logo = own.glyph !== void 0 ? own : this.appLogoState.source();
|
|
29540
29563
|
return {
|
|
29541
|
-
|
|
29542
|
-
|
|
29543
|
-
|
|
29564
|
+
link,
|
|
29565
|
+
glyph: chosen ?? logo?.glyph ?? null,
|
|
29566
|
+
color: color ?? null,
|
|
29567
|
+
name: own.name?.trim() || link
|
|
29544
29568
|
};
|
|
29545
29569
|
}, ...ngDevMode ? [{ debugName: "splash" }] : /* istanbul ignore next */ []);
|
|
29546
29570
|
constructor() {
|
|
@@ -29907,6 +29931,7 @@ var RemoteComponent = class RemoteComponent {
|
|
|
29907
29931
|
<m-app-logo
|
|
29908
29932
|
variant="glow"
|
|
29909
29933
|
tone="light"
|
|
29934
|
+
[link]="splash().link"
|
|
29910
29935
|
[glyph]="splash().glyph"
|
|
29911
29936
|
[appColor]="splash().color"
|
|
29912
29937
|
[name]="splash().name"
|
|
@@ -30060,6 +30085,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
30060
30085
|
<m-app-logo
|
|
30061
30086
|
variant="glow"
|
|
30062
30087
|
tone="light"
|
|
30088
|
+
[link]="splash().link"
|
|
30063
30089
|
[glyph]="splash().glyph"
|
|
30064
30090
|
[appColor]="splash().color"
|
|
30065
30091
|
[name]="splash().name"
|