@magmonium/one 0.2.33 → 0.2.35

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,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, Injectable, signal, computed, DestroyRef, DOCUMENT, ApplicationRef, RendererFactory2, createComponent, EnvironmentInjector, Pipe, ChangeDetectorRef, ElementRef, afterNextRender, input, ChangeDetectionStrategy, Component, effect, Injector, reflectComponentType, untracked, model, HostListener, Renderer2, Directive, output, viewChild, ViewEncapsulation, forwardRef, contentChild, TemplateRef, ViewContainerRef, inputBinding, outputBinding, linkedSignal, afterRenderEffect, runInInjectionContext, Input, booleanAttribute, HostAttributeToken, EventEmitter, Output, ViewChild, ContentChild, provideZonelessChangeDetection, makeEnvironmentProviders, HostBinding, provideAppInitializer, provideBrowserGlobalErrorListeners, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
2
+ import { InjectionToken, inject, Injectable, signal, computed, DestroyRef, DOCUMENT, ApplicationRef, RendererFactory2, createComponent, EnvironmentInjector, Pipe, ChangeDetectorRef, untracked, ElementRef, afterNextRender, input, ChangeDetectionStrategy, Component, effect, Injector, reflectComponentType, model, HostListener, Renderer2, Directive, output, viewChild, ViewEncapsulation, forwardRef, contentChild, TemplateRef, ViewContainerRef, inputBinding, outputBinding, linkedSignal, afterRenderEffect, runInInjectionContext, Input, booleanAttribute, HostAttributeToken, EventEmitter, Output, ViewChild, ContentChild, provideZonelessChangeDetection, makeEnvironmentProviders, HostBinding, provideAppInitializer, provideBrowserGlobalErrorListeners, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
3
3
  import { HttpClient, HttpParams, provideHttpClient, withFetch, withInterceptors } from '@angular/common/http';
4
4
  import { firstValueFrom, of, tap, catchError, throwError, shareReplay, finalize, map, forkJoin, Observable, pipe, interval, fromEvent, switchMap as switchMap$1, filter, EMPTY, combineLatest, Subject, race, take, from } from 'rxjs';
5
5
  import { rxResource, toObservable, toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
@@ -2618,13 +2618,19 @@ const loadingActions = {
2618
2618
  // no change detection in between, so the overlay never rendered a frame. The
2619
2619
  // increment lands before the request is even sent; only the decrement needs to
2620
2620
  // wait for the response it belongs to.
2621
+ // `untracked`, because the increment is eager and a request may be sent from
2622
+ // inside a `computed` — a lazily read widget map, an asset a derived value
2623
+ // asks for. The counter is bookkeeping about the outside world rather than
2624
+ // anything that computed derives, so writing it there is not the bug Angular's
2625
+ // NG0600 guards against: without this, one such request threw mid-evaluation
2626
+ // and took the panel that asked for it down with it.
2621
2627
  startLoading: () => {
2622
- loadingSignal.update((state) => ({
2628
+ untracked(() => loadingSignal.update((state) => ({
2623
2629
  ...state,
2624
2630
  requestCount: state.requestCount + 1,
2625
2631
  error: undefined,
2626
2632
  cancelled: undefined,
2627
- }));
2633
+ })));
2628
2634
  },
2629
2635
  stopLoading: () => {
2630
2636
  queueMicrotask(() => {
@@ -3984,7 +3990,24 @@ const NavStore = signalStore({ providedIn: 'root' }, withState(initialState$3),
3984
3990
  * the anchored key would title the global panel after the page it opened
3985
3991
  * over.
3986
3992
  */
3987
- const panelNavId = computed(() => widgetEntry()?.navId ?? id(), ...(ngDevMode ? [{ debugName: "panelNavId" }] : /* istanbul ignore next */ []));
3993
+ const panelNavId = computed(() => {
3994
+ const hit = widgetEntry();
3995
+ if (hit)
3996
+ return hit.navId;
3997
+ // Nothing registered under either key, so the panel is a *menu*: the
3998
+ // same fall-through applies to the tree. `/page|settings` names the
3999
+ // global settings list, and reading it off the anchored key — a NavId no
4000
+ // asset holds — left the page's own menu up under its own header.
4001
+ const map = store.navMap();
4002
+ const candidates = widgetNavIds();
4003
+ return (candidates.find((c) => menuChildIds(c, map).length) ??
4004
+ // A leaf nothing is registered for is still a Nav the tree knows, and
4005
+ // that is where the panel belongs: `|settings|app` with no widget hands
4006
+ // the panel back to *settings*, whose row it is, rather than climbing
4007
+ // an anchored key the map has never heard of all the way to root.
4008
+ candidates.find((c) => !!map[c]) ??
4009
+ id());
4010
+ }, ...(ngDevMode ? [{ debugName: "panelNavId" }] : /* istanbul ignore next */ []));
3988
4011
  const breadcrumbResult = computed(() => {
3989
4012
  const menuConfig = resolvedNavMenuConfig();
3990
4013
  const widgetConfig = resolvedWidget();
@@ -4027,6 +4050,7 @@ const NavStore = signalStore({ providedIn: 'root' }, withState(initialState$3),
4027
4050
  }, ...(ngDevMode ? [{ debugName: "navHasContent" }] : /* istanbul ignore next */ []));
4028
4051
  return {
4029
4052
  id,
4053
+ panelNavId,
4030
4054
  hasMurl,
4031
4055
  isNavOpened,
4032
4056
  isMNavOpened,
@@ -5472,8 +5496,14 @@ class MRefDirective {
5472
5496
  #navRef = inject(NAV_STORE_REF, { optional: true });
5473
5497
  #renderer = inject(Renderer2);
5474
5498
  #elementRef = inject(ElementRef);
5499
+ /**
5500
+ * Where the User stands as the panel reads it — the Nav that answered the
5501
+ * address rather than the address's own key, so a row still knows itself
5502
+ * when the panel was opened over a page (`/page|settings` → `root_settings`).
5503
+ */
5504
+ #currentNavId = computed(() => this.#navRef?.panelNavId?.() ?? this.#navRef?.id(), ...(ngDevMode ? [{ debugName: "#currentNavId" }] : /* istanbul ignore next */ []));
5475
5505
  /** Exact hit only — what a toggle re-clicks, and never an ancestor. */
5476
- #currentlySelected = computed(() => this.mRef() === this.#navRef?.id(), ...(ngDevMode ? [{ debugName: "#currentlySelected" }] : /* istanbul ignore next */ []));
5506
+ #currentlySelected = computed(() => this.mRef() === this.#currentNavId(), ...(ngDevMode ? [{ debugName: "#currentlySelected" }] : /* istanbul ignore next */ []));
5477
5507
  /**
5478
5508
  * The row the open Nav came through. A menu lists the Nav Menu Owner's
5479
5509
  * children, and the User may be standing deeper than a row — on a leaf that
@@ -5483,7 +5513,7 @@ class MRefDirective {
5483
5513
  */
5484
5514
  #currentlyActive = computed(() => {
5485
5515
  const target = this.mRef();
5486
- const current = this.#navRef?.id();
5516
+ const current = this.#currentNavId();
5487
5517
  if (!target || !current)
5488
5518
  return false;
5489
5519
  return current === target || current.startsWith(`${target}_`);
@@ -6593,7 +6623,7 @@ class SectionFormItemComponent extends ConfigComponent {
6593
6623
  break;
6594
6624
  }
6595
6625
  case InputType.TOGGLE: {
6596
- const { ToggleInputComponent } = await import('./magmonium-one-toggle-CfNrRJwI.mjs');
6626
+ const { ToggleInputComponent } = await import('./magmonium-one-toggle-CJXOeVOK.mjs');
6597
6627
  this.createDynamicComponent(seq, ToggleInputComponent, [], true);
6598
6628
  break;
6599
6629
  }
@@ -6605,12 +6635,12 @@ class SectionFormItemComponent extends ConfigComponent {
6605
6635
  break;
6606
6636
  }
6607
6637
  case InputType.PASSWORD: {
6608
- const { PasswordInputComponent } = await import('./magmonium-one-password-DLDYsPCr.mjs');
6638
+ const { PasswordInputComponent } = await import('./magmonium-one-password-Bok5-DJu.mjs');
6609
6639
  this.createDynamicComponent(seq, PasswordInputComponent);
6610
6640
  break;
6611
6641
  }
6612
6642
  case InputType.OTP: {
6613
- const { OtpInputComponent } = await import('./magmonium-one-otp-BD-sIswJ.mjs');
6643
+ const { OtpInputComponent } = await import('./magmonium-one-otp-BeMIPFGz.mjs');
6614
6644
  this.createDynamicComponent(seq, OtpInputComponent);
6615
6645
  break;
6616
6646
  }
@@ -20013,7 +20043,7 @@ class WrapperInputComponent extends ConfigComponent {
20013
20043
  break;
20014
20044
  }
20015
20045
  case InputType.TOGGLE: {
20016
- const { ToggleInputComponent } = await import('./magmonium-one-toggle-CfNrRJwI.mjs');
20046
+ const { ToggleInputComponent } = await import('./magmonium-one-toggle-CJXOeVOK.mjs');
20017
20047
  this.createDynamicComponent(seq, ToggleInputComponent, [], true);
20018
20048
  break;
20019
20049
  }
@@ -20025,12 +20055,12 @@ class WrapperInputComponent extends ConfigComponent {
20025
20055
  break;
20026
20056
  }
20027
20057
  case InputType.PASSWORD: {
20028
- const { PasswordInputComponent } = await import('./magmonium-one-password-DLDYsPCr.mjs');
20058
+ const { PasswordInputComponent } = await import('./magmonium-one-password-Bok5-DJu.mjs');
20029
20059
  this.createDynamicComponent(seq, PasswordInputComponent);
20030
20060
  break;
20031
20061
  }
20032
20062
  case InputType.OTP: {
20033
- const { OtpInputComponent } = await import('./magmonium-one-otp-BD-sIswJ.mjs');
20063
+ const { OtpInputComponent } = await import('./magmonium-one-otp-BeMIPFGz.mjs');
20034
20064
  this.createDynamicComponent(seq, OtpInputComponent);
20035
20065
  break;
20036
20066
  }
@@ -34250,4 +34280,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
34250
34280
  */
34251
34281
 
34252
34282
  export { DEFAULT_NAV_SEGMENT as $, ACCESS_DOMAINS as A, BaseInputComponent as B, COMPONENT_INPUT_REGISTRY as C, CardComponent as D, CardWrapperComponent as E, CarouselComponent as F, ChartComponent as G, CheckboxInputComponent as H, IS_DESIGN_MODE as I, ClearableInputComponent as J, ColComponent as K, LabelComponent as L, ColorPickerInputComponent as M, CommentItemComponent as N, CommentsApiService as O, CommentsComponent as P, CommentsStore as Q, ComponentInputComponent as R, ComponentStepperComponent as S, TranslatePipe as T, ConfigComponent as U, ConfirmComponent as V, ContextMenuComponent as W, CustomIconClass as X, CustomIconEditComponent as Y, DEFAULT_FILTER_RANGE_MODE as Z, DEFAULT_FILTER_VARIANT as _, BaseTextInputComponent as a, NAV_ID_SEP as a$, DEFAULT_SIZE as a0, DashboardCardComponent as a1, DateInputComponent as a2, DatePickerComponent as a3, DeviceService as a4, DomService as a5, Domain as a6, DotGridComponent as a7, DragListDirective as a8, DragListItemDirective as a9, InstrumentScoreComponent as aA, InterceptorObservables as aB, JumbotronComponent as aC, KeyValueComponent as aD, LAYOUT_ASSET_FOLDER as aE, LOGIN_COMPONENT as aF, LOGIN_STORE as aG, LanguageComponent as aH, LogoComponent as aI, MAG_SOCKET_EVENT as aJ, MHeroColorDirective as aK, MHeroComponent as aL, MODAL_REF as aM, MODAL_STORE_REF as aN, MRefDirective as aO, MStepComponent as aP, MURL_PARAM as aQ, MURL_SEP as aR, ManifestEnrichmentService as aS, MenuComponent as aT, ModalDirective as aU, ModalRef as aV, ModalStore as aW, MoneyPipe as aX, MultiRangeInputComponent as aY, MurlUrlSerializer as aZ, NAV_DEFAULT_MURL as a_, DraggableDirective as aa, DropdownInputComponent as ab, FILTER_GROUP_CONTEXT as ac, FILTER_RANGE_MODES as ad, FILTER_VARIANTS as ae, FLEX_VARIANTS as af, FOLDER_PICK_LISTENER as ag, FORM_ASSET_FOLDER as ah, FileService as ai, FileUploadDirective as aj, FileUploadInputComponent as ak, FlexComponent as al, FlexItemComponent as am, FormGroupComponent as an, FrameComponent as ao, FreezeService as ap, GRID_BREAKPOINTS as aq, GetNavService as ar, HeaderComponent$1 as as, HighlightDirective as at, HttpService as au, ICON_SOURCE as av, IS_SIDE_PANEL as aw, IconComponent as ax, ImgComponent as ay, InputType as az, TextOutputComponent as b, SectionBadgesComponent as b$, NAV_MAIN_BUTTONS as b0, NAV_SEGMENT_RE as b1, NAV_STORE_REF as b2, NAV_WC_COMPONENTS as b3, NAV_WIDGET_MAP as b4, NavComponent as b5, NavDetailsComponent as b6, NavHeaderComponent as b7, NavMenuComponent as b8, NavStore as b9, PwaInstallComponent as bA, ROOT_NAV$1 as bB, RadioGroupComponent as bC, RadioInputComponent as bD, RangeInputComponent as bE, RatingInputComponent as bF, ReactiveElementComponent as bG, RemoteComponent as bH, RemoteLoaderService as bI, ResizeElementComponent as bJ, RouteContainer as bK, RowComponent as bL, SEARCH_QUERY as bM, SEARCH_RESULTS_EVENT as bN, SECTION_ACCORDION_GROUP as bO, SECTION_FORM_CONTEXT as bP, SHARED_ICONS as bQ, SIZE_CONTEXT as bR, ScoreComponent as bS, ScrollComponent as bT, ScrollService as bU, SearchPanelComponent as bV, SearchStore as bW, SearchUserPanelComponent as bX, SectionAccordionDirective as bY, SectionAccordionGroupDirective as bZ, SectionBackComponent as b_, NavTrailComponent as ba, NothingComponent as bb, NotificationElementComponent as bc, NotificationGroupComponent as bd, NotificationPopupComponent as be, NotificationService as bf, NotificationStore as bg, NotificationType as bh, NotificationWidgetComponent as bi, ONE_ASSET_BASE_URL as bj, OPTIONS_SOURCE as bk, OVERLAY_WIDGETS as bl, OneApp as bm, OptionsSourceDirective as bn, OverlayBodyComponent as bo, OverlayRef as bp, OverlayService as bq, PLATFORM_BUTTON_NAV_IDS as br, PLATFORM_EXTENSIBLE_NAV_IDS as bs, PLATFORM_NAV_MAP as bt, PLATFORM_ROOT_CHILDREN as bu, PaginationComponent as bv, PanelComponent as bw, PercentagePipe as bx, PlaygroundComponent as by, PositionDirective as bz, ButtonComponent as c, UlComponent as c$, SectionButtonGroupComponent as c0, SectionCardComponent as c1, SectionCarouselComponent as c2, SectionComponent as c3, SectionFilterComponent as c4, SectionFilterGroupComponent as c5, SectionFilterMenuComponent as c6, SectionFilterPanelComponent as c7, SectionFilterRangePanelComponent as c8, SectionFooterComponent as c9, StrokeLinejoin as cA, SummaryComponent as cB, SvgGeneratorComponent as cC, SvgGeneratorService as cD, SvgService as cE, TOTAL_COLUMNS as cF, TRANSLATION_SOURCE as cG, TableComponent as cH, TechnicalMeterComponent as cI, TextInputComponent as cJ, TextareaInputComponent as cK, ThemeComponent as cL, ThemeDataService as cM, ThemeService as cN, ThemeStore as cO, TimeAgoPipe as cP, TimelineComponent as cQ, ToggleButtonComponent as cR, ToggleInputComponent as cS, ToggleRadioInputComponent as cT, ToolTipDirective as cU, TooltipComponent as cV, TranslateService as cW, TreeGridComponent as cX, URL_SEP as cY, USER_STORE_REF as cZ, USER_TAB_MAP as c_, SectionFormComponent as ca, SectionFormItemComponent as cb, SectionHeaderComponent as cc, SectionHeroComponent as cd, SectionPaginationComponent as ce, SectionSearchComponent as cf, SectionStepperComponent as cg, SectionTabsComponent as ch, SectionToggleComponent as ci, SectionToggleItemDirective as cj, SelectableCardInputComponent as ck, SelectorDirective as cl, SettingsSearchBarComponent as cm, SettingsSearchService as cn, ShapeComponent as co, SharedStoreRegistry as cp, SidePanelDirective as cq, Size as cr, SocketStore as cs, SortComponent as ct, StatComponent as cu, StepComponent as cv, StepperComponent as cw, StepsComponent as cx, StorageService as cy, StrokeLinecap as cz, APP_CONTEXT_REF as d, hexToRgb as d$, UniverseComponent as d0, UserApiService as d1, UserAvatarComponent as d2, UserComponent as d3, UserNavComponent as d4, UserSettingsComponent as d5, UserStore as d6, WC_ROUTE_CHANGED_EVENT as d7, WC_SEARCH_GROUPS as d8, WIN_USER_TAB_HOOK as d9, evaluate as dA, evaluateBool as dB, filterHoldsList as dC, filterHoldsOneBound as dD, filterHoldsOptions as dE, filterHoldsRange as dF, filterList as dG, filterOne as dH, filterPanelOf as dI, filterPanelWidth as dJ, filterRange as dK, filterTreeGridRows as dL, filterValueList as dM, filterValues as dN, flattenTreeGridRows as dO, formatBadgeCount as dP, fullName as dQ, generateClipPath as dR, generateTransform as dS, getClassList as dT, getProperty as dU, getScrollParent as dV, getTierFromPreviewPath as dW, getTreeGridRow as dX, getUniqueId as dY, getValue as dZ, hasErrorComputed as d_, WIN_USER_TAB_KEY as da, WatermarkComponent as db, WcRouterStore as dc, WrapperInputComponent as dd, anchorNavId as de, applyColorsToElement as df, bootstrapMagApp as dg, bootstrapPwaInstall as dh, buildWcBaseUrl as di, calculateLuminance as dj, calculateRanks as dk, cellText as dl, checkFilterCondition as dm, childNavId as dn, classListSignal as dp, coerceSize as dq, cornerEdge as dr, cornerSide as ds, createMap as dt, createPlatformNavMap as du, deriveAvatarGradient as dv, deriveContrastColor as dw, deriveOppositeColor as dx, derivePropertyName as dy, emailValidation as dz, ASSET_BASE_URL as e, provideSizeContext as e$, hslToRgb$1 as e0, initMagmoniumApp as e1, initialNotificationState as e2, initialState$2 as e3, initials as e4, injectAuthenticate as e5, injectInstallApp as e6, injectParentSize as e7, injectScrollSticky as e8, isButtonName as e9, minValidation as eA, miniMarkToHtml as eB, navIdChain as eC, navIdFor as eD, navIdSegment as eE, navIdToRoutePath as eF, navIdToSegments as eG, navToId as eH, parentNavId as eI, parseAddress as eJ, parseColor as eK, parsePatternNames as eL, patternValidation as eM, patternsValidation as eN, platformNavWidgets as eO, privateGuard as eP, processImageToSvg as eQ, provideAppContext as eR, provideMagAppConfig as eS, provideMagWcConfig as eT, provideMagWcRoutes as eU, provideModalComponents as eV, provideMurlUrlSerializer as eW, provideNavWidgets as eX, provideOverlayWidgets as eY, providePlatformNavWidgets as eZ, provideSearch as e_, isCancelledComputed as ea, isExtensiblePlatformNavId as eb, isJson as ec, isLoadingComputed as ed, isLocalhost as ee, isPlatformNavId as ef, isSize as eg, isTierPreview as eh, isUrlLocalhost as ei, isValidNavId as ej, isValidNavSegment as ek, isWebComponent as el, linkToId as em, linkToNav as en, loadingActions as eo, mInterceptor as ep, manualValidation as eq, matchFieldValidation as er, maxLengthValidation as es, maxValidation as et, mergePlatformNav as eu, mergeUnique as ev, mergeUniqueBy as ew, mergeUniqueWith as ex, minAgeValidation as ey, minLengthValidation as ez, AccordionBodyDirective as f, provideUserTabs as f0, publicGuard as f1, readFieldPatterns as f2, renderAddress as f3, requiredValidation as f4, resolveConfigAsset as f5, resolveIconSize as f6, resolvePallet as f7, resolvePatternRules as f8, resolveSize as f9, rgbToHex as fa, rgbToHsl as fb, rowHasChildren as fc, samePatterns as fd, segmentsToNavId as fe, setProperty as ff, setTreeGridChildren as fg, settingsWidgets as fh, shouldShowBadge as fi, splitNavId as fj, splitOnMatch as fk, stringToColor as fl, toAttrBool as fm, toAttrNumber as fn, toCssLength as fo, toHostNavId as fp, toLength$1 as fq, toLocalNavId as fr, toggleTreeGridRow as fs, unfetchedPlatformNav as ft, urlValidation as fu, AccordionComponent as g, AccordionGroupComponent as h, ActionComponent as i, AnimatedGraphsComponent as j, AppCardComponent as k, AppRelationType as l, AppTileComponent as m, AssetStore as n, AssetUrlPipe as o, Assets as p, AuthActivityPageComponent as q, AuthApiService as r, AuthStore as s, AutosizeDirective as t, BadgeComponent as u, BandingComponent as v, BaseArrayInputComponent as w, BaseRootWebComponent as x, BaseWebComponent as y, ButtonGroupComponent as z };
34253
- //# sourceMappingURL=magmonium-one-magmonium-one-B2yxkDxk.mjs.map
34283
+ //# sourceMappingURL=magmonium-one-magmonium-one-DwGh5jaB.mjs.map