@magmonium/one 0.1.13 → 0.1.15

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.
@@ -6468,7 +6468,7 @@ class SectionFormItemComponent extends ConfigComponent {
6468
6468
  break;
6469
6469
  }
6470
6470
  case InputType.TOGGLE: {
6471
- const { ToggleInputComponent } = await import('./magmonium-one-toggle-UVuimY8O.mjs');
6471
+ const { ToggleInputComponent } = await import('./magmonium-one-toggle-CtPlw2pO.mjs');
6472
6472
  this.createDynamicComponent(seq, ToggleInputComponent, [], true);
6473
6473
  break;
6474
6474
  }
@@ -6480,12 +6480,12 @@ class SectionFormItemComponent extends ConfigComponent {
6480
6480
  break;
6481
6481
  }
6482
6482
  case InputType.PASSWORD: {
6483
- const { PasswordInputComponent } = await import('./magmonium-one-password-BJyjGWvN.mjs');
6483
+ const { PasswordInputComponent } = await import('./magmonium-one-password-DOOpbUC0.mjs');
6484
6484
  this.createDynamicComponent(seq, PasswordInputComponent);
6485
6485
  break;
6486
6486
  }
6487
6487
  case InputType.OTP: {
6488
- const { OtpInputComponent } = await import('./magmonium-one-otp-BhQvfyaM.mjs');
6488
+ const { OtpInputComponent } = await import('./magmonium-one-otp-B1FWssrl.mjs');
6489
6489
  this.createDynamicComponent(seq, OtpInputComponent);
6490
6490
  break;
6491
6491
  }
@@ -17593,7 +17593,7 @@ class WrapperInputComponent extends ConfigComponent {
17593
17593
  break;
17594
17594
  }
17595
17595
  case InputType.TOGGLE: {
17596
- const { ToggleInputComponent } = await import('./magmonium-one-toggle-UVuimY8O.mjs');
17596
+ const { ToggleInputComponent } = await import('./magmonium-one-toggle-CtPlw2pO.mjs');
17597
17597
  this.createDynamicComponent(seq, ToggleInputComponent, [], true);
17598
17598
  break;
17599
17599
  }
@@ -17605,12 +17605,12 @@ class WrapperInputComponent extends ConfigComponent {
17605
17605
  break;
17606
17606
  }
17607
17607
  case InputType.PASSWORD: {
17608
- const { PasswordInputComponent } = await import('./magmonium-one-password-BJyjGWvN.mjs');
17608
+ const { PasswordInputComponent } = await import('./magmonium-one-password-DOOpbUC0.mjs');
17609
17609
  this.createDynamicComponent(seq, PasswordInputComponent);
17610
17610
  break;
17611
17611
  }
17612
17612
  case InputType.OTP: {
17613
- const { OtpInputComponent } = await import('./magmonium-one-otp-BhQvfyaM.mjs');
17613
+ const { OtpInputComponent } = await import('./magmonium-one-otp-B1FWssrl.mjs');
17614
17614
  this.createDynamicComponent(seq, OtpInputComponent);
17615
17615
  break;
17616
17616
  }
@@ -25564,22 +25564,30 @@ const provideOverlayWidgets = (map) => ({
25564
25564
  });
25565
25565
 
25566
25566
  /**
25567
- * Turns an overlay's named content — a form asset name or a custom-element
25568
- * tag — into rendered content. Presentational only, no business logic.
25567
+ * Turns an overlay's named content — a form asset name, a widget loader or a
25568
+ * custom-element tag — into rendered content. Presentational only, no business
25569
+ * logic.
25569
25570
  *
25570
- * The tag is not assumed to answer to anything yet: the widget behind it is
25571
- * loaded and defined on first open (`OVERLAY_WIDGETS`), which is what lets an
25572
- * App Widget be named by an overlay without being registered at bootstrap.
25571
+ * Two ways to name a widget, because two callers name one differently. A
25572
+ * generated Screen carries a `() => import(...)`: it knows the class it means
25573
+ * and says so where it is used, so the chunk is the bundler's to split. A
25574
+ * hand-written config carries a tag, which is resolved through `OVERLAY_WIDGETS`
25575
+ * and defined on first open — the older spelling, and the only one available to
25576
+ * a config that cannot hold a function, such as a YAML asset.
25573
25577
  */
25574
25578
  class OverlayBodyComponent {
25575
25579
  form = input(...(ngDevMode ? [undefined, { debugName: "form" }] : /* istanbul ignore next */ []));
25576
25580
  tag = input(...(ngDevMode ? [undefined, { debugName: "tag" }] : /* istanbul ignore next */ []));
25581
+ widget = input(...(ngDevMode ? [undefined, { debugName: "widget" }] : /* istanbul ignore next */ []));
25577
25582
  injector = inject(Injector);
25578
25583
  widgets = inject(OVERLAY_WIDGETS, { optional: true });
25579
25584
  // Held rather than derived: whether a tag can render is the answer to an
25580
25585
  // async question, and rendering the element before that answer arrives is
25581
25586
  // how an unknown element ends up in the DOM.
25582
25587
  ready = signal('', ...(ngDevMode ? [{ debugName: "ready" }] : /* istanbul ignore next */ []));
25588
+ // The same question for a loader, and the same answer: the class exists only
25589
+ // once its chunk has arrived, and `ngComponentOutlet` takes a class.
25590
+ loaded = signal(null, ...(ngDevMode ? [{ debugName: "loaded" }] : /* istanbul ignore next */ []));
25583
25591
  readyTag = computed(() => this.ready() === this.tag() ? this.ready() : '', ...(ngDevMode ? [{ debugName: "readyTag" }] : /* istanbul ignore next */ []));
25584
25592
  constructor() {
25585
25593
  effect(() => {
@@ -25594,15 +25602,27 @@ class OverlayBodyComponent {
25594
25602
  this.ready.set(tag);
25595
25603
  });
25596
25604
  });
25605
+ effect(() => {
25606
+ const load = this.widget();
25607
+ this.loaded.set(null);
25608
+ if (!load)
25609
+ return;
25610
+ load().then((widget) => {
25611
+ if (this.widget() === load)
25612
+ this.loaded.set(widget);
25613
+ });
25614
+ });
25597
25615
  }
25598
25616
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OverlayBodyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
25599
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: OverlayBodyComponent, isStandalone: true, selector: "m-overlay-body", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, tag: { classPropertyName: "tag", publicName: "tag", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
25617
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: OverlayBodyComponent, isStandalone: true, selector: "m-overlay-body", inputs: { form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, tag: { classPropertyName: "tag", publicName: "tag", isSignal: true, isRequired: false, transformFunction: null }, widget: { classPropertyName: "widget", publicName: "widget", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
25600
25618
  @if (form(); as f) {
25601
25619
  <m-form [name]="f" />
25620
+ } @else if (loaded(); as widget) {
25621
+ <ng-container [ngComponentOutlet]="widget" />
25602
25622
  } @else if (readyTag(); as t) {
25603
25623
  <m-ce-outlet [tag]="t" />
25604
25624
  }
25605
- `, isInline: true, dependencies: [{ kind: "component", type: FormGroupComponent, selector: "m-form, m-one-form", inputs: ["data", "state", "validation", "options", "fieldConfigs", "aclResolver", "autofocus", "readonly", "fieldRenderIds", "elements", "templates", "datas", "label", "subtitle"], outputs: ["dataChange", "act", "stateChange"] }, { kind: "component", type: CeOutletComponent, selector: "m-ce-outlet", inputs: ["tag"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
25625
+ `, isInline: true, dependencies: [{ kind: "component", type: FormGroupComponent, selector: "m-form, m-one-form", inputs: ["data", "state", "validation", "options", "fieldConfigs", "aclResolver", "autofocus", "readonly", "fieldRenderIds", "elements", "templates", "datas", "label", "subtitle"], outputs: ["dataChange", "act", "stateChange"] }, { kind: "component", type: CeOutletComponent, selector: "m-ce-outlet", inputs: ["tag"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
25606
25626
  }
25607
25627
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: OverlayBodyComponent, decorators: [{
25608
25628
  type: Component,
@@ -25611,14 +25631,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
25611
25631
  template: `
25612
25632
  @if (form(); as f) {
25613
25633
  <m-form [name]="f" />
25634
+ } @else if (loaded(); as widget) {
25635
+ <ng-container [ngComponentOutlet]="widget" />
25614
25636
  } @else if (readyTag(); as t) {
25615
25637
  <m-ce-outlet [tag]="t" />
25616
25638
  }
25617
25639
  `,
25618
25640
  changeDetection: ChangeDetectionStrategy.OnPush,
25619
- imports: [FormGroupComponent, CeOutletComponent],
25641
+ imports: [FormGroupComponent, CeOutletComponent, NgComponentOutlet],
25620
25642
  }]
25621
- }], ctorParameters: () => [], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], tag: [{ type: i0.Input, args: [{ isSignal: true, alias: "tag", required: false }] }] } });
25643
+ }], ctorParameters: () => [], propDecorators: { form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], tag: [{ type: i0.Input, args: [{ isSignal: true, alias: "tag", required: false }] }], widget: [{ type: i0.Input, args: [{ isSignal: true, alias: "widget", required: false }] }] } });
25622
25644
 
25623
25645
  /** Opens a Modal from an asset name (`modal/<name>.yml`) or an inline config. */
25624
25646
  class ModalDirective {
@@ -25655,7 +25677,10 @@ class ModalDirective {
25655
25677
  component: OverlayBodyComponent,
25656
25678
  bindings: [
25657
25679
  inputBinding('form', () => config.form),
25658
- inputBinding('tag', () => config.component),
25680
+ // One config key, two spellings of what it names: a tag the app
25681
+ // registered, or the widget's own loader (`OverlayBodyComponent`).
25682
+ inputBinding('tag', () => typeof config.component === 'string' ? config.component : undefined),
25683
+ inputBinding('widget', () => typeof config.component === 'function' ? config.component : undefined),
25659
25684
  ],
25660
25685
  providers: [{ provide: MODAL_REF, useValue: modalRef }],
25661
25686
  config,
@@ -25710,7 +25735,10 @@ class SidePanelDirective {
25710
25735
  component: OverlayBodyComponent,
25711
25736
  bindings: [
25712
25737
  inputBinding('form', () => config.form),
25713
- inputBinding('tag', () => config.component),
25738
+ // One config key, two spellings of what it names: a tag the app
25739
+ // registered, or the widget's own loader (`OverlayBodyComponent`).
25740
+ inputBinding('tag', () => typeof config.component === 'string' ? config.component : undefined),
25741
+ inputBinding('widget', () => typeof config.component === 'function' ? config.component : undefined),
25714
25742
  ],
25715
25743
  providers: [{ provide: MODAL_REF, useValue: modalRef }],
25716
25744
  side: config.side,
@@ -31500,4 +31528,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
31500
31528
  */
31501
31529
 
31502
31530
  export { DateInputComponent 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_SIZE as Z, DashboardCardComponent as _, BaseTextInputComponent as a, NavComponent as a$, DatePickerComponent as a0, DeviceService as a1, DomService as a2, Domain as a3, DotGridComponent as a4, DragListDirective as a5, DragListItemDirective as a6, DraggableDirective as a7, DropdownInputComponent as a8, FLEX_VARIANTS as a9, LOGIN_STORE as aA, LanguageComponent as aB, LogoComponent as aC, MAG_SOCKET_EVENT as aD, MHeroColorDirective as aE, MHeroComponent as aF, MODAL_REF as aG, MODAL_STORE_REF as aH, MRefDirective as aI, MStepComponent as aJ, MURL_PARAM as aK, MURL_SEP as aL, ManifestEnrichmentService as aM, MenuComponent as aN, ModalDirective as aO, ModalRef as aP, ModalStore as aQ, MoneyPipe as aR, MultiRangeInputComponent as aS, MurlUrlSerializer as aT, NAV_DEFAULT_MURL as aU, NAV_ID_SEP as aV, NAV_MAIN_BUTTONS as aW, NAV_SEGMENT_RE as aX, NAV_STORE_REF as aY, NAV_WC_COMPONENTS as aZ, NAV_WIDGET_MAP as a_, FOLDER_PICK_LISTENER as aa, FORM_ASSET_FOLDER as ab, FileService as ac, FileUploadDirective as ad, FileUploadInputComponent as ae, FlexComponent as af, FlexItemComponent as ag, FormGroupComponent as ah, FrameComponent as ai, FreezeService as aj, GRID_BREAKPOINTS as ak, GetNavService as al, HeaderComponent$1 as am, HighlightDirective as an, HttpService as ao, ICON_SOURCE as ap, IS_SIDE_PANEL as aq, IconComponent as ar, ImgComponent as as, InputType as at, InstrumentScoreComponent as au, InterceptorObservables as av, JumbotronComponent as aw, KeyValueComponent as ax, LAYOUT_ASSET_FOLDER as ay, LOGIN_COMPONENT as az, TextOutputComponent as b, SectionFormComponent as b$, NavDetailsComponent as b0, NavHeaderComponent as b1, NavMenuComponent as b2, NavStore as b3, NavTrailComponent as b4, NothingComponent as b5, NotificationElementComponent as b6, NotificationGroupComponent as b7, NotificationPopupComponent as b8, NotificationService as b9, ReactiveElementComponent as bA, RemoteComponent as bB, RemoteLoaderService as bC, ResizeElementComponent as bD, RouteContainer as bE, RowComponent as bF, SEARCH_QUERY as bG, SEARCH_RESULTS_EVENT as bH, SECTION_ACCORDION_GROUP as bI, SECTION_FORM_CONTEXT as bJ, SHARED_ICONS as bK, SIZE_CONTEXT as bL, ScoreComponent as bM, ScrollComponent as bN, ScrollService as bO, SearchPanelComponent as bP, SearchStore as bQ, SearchUserPanelComponent as bR, SectionAccordionDirective as bS, SectionAccordionGroupDirective as bT, SectionBackComponent as bU, SectionBadgesComponent as bV, SectionButtonGroupComponent as bW, SectionCardComponent as bX, SectionComponent as bY, SectionFilterComponent as bZ, SectionFooterComponent as b_, NotificationStore as ba, NotificationType as bb, NotificationWidgetComponent as bc, ONE_ASSET_BASE_URL as bd, OPTIONS_SOURCE as be, OVERLAY_WIDGETS as bf, OneApp as bg, OptionsSourceDirective as bh, OverlayBodyComponent as bi, OverlayRef as bj, OverlayService as bk, PLATFORM_BUTTON_NAV_IDS as bl, PLATFORM_EXTENSIBLE_NAV_IDS as bm, PLATFORM_NAV_MAP as bn, PLATFORM_ROOT_CHILDREN as bo, PaginationComponent as bp, PanelComponent as bq, PercentagePipe as br, PlaygroundComponent as bs, PositionDirective as bt, PwaInstallComponent as bu, ROOT_NAV$1 as bv, RadioGroupComponent as bw, RadioInputComponent as bx, RangeInputComponent as by, RatingInputComponent as bz, ButtonComponent as c, WcRouterStore as c$, SectionFormItemComponent as c0, SectionHeaderComponent as c1, SectionHeroComponent as c2, SectionSearchComponent as c3, SectionStepperComponent as c4, SectionTabsComponent as c5, SectionToggleComponent as c6, SectionToggleItemDirective as c7, SelectableCardInputComponent as c8, SelectorDirective as c9, ThemeService as cA, ThemeStore as cB, TimeAgoPipe as cC, TimelineComponent as cD, ToggleButtonComponent as cE, ToggleInputComponent as cF, ToggleRadioInputComponent as cG, ToolTipDirective as cH, TooltipComponent as cI, TranslateService as cJ, TreeGridComponent as cK, URL_SEP as cL, USER_STORE_REF as cM, USER_TAB_MAP as cN, UlComponent as cO, UniverseComponent as cP, UserApiService as cQ, UserAvatarComponent as cR, UserComponent as cS, UserNavComponent as cT, UserSettingsComponent as cU, UserStore as cV, WC_ROUTE_CHANGED_EVENT as cW, WC_SEARCH_GROUPS as cX, WIN_USER_TAB_HOOK as cY, WIN_USER_TAB_KEY as cZ, WatermarkComponent as c_, SettingsSearchBarComponent as ca, SettingsSearchService as cb, ShapeComponent as cc, SharedStoreRegistry as cd, SidePanelDirective as ce, Size as cf, SocketStore as cg, SortComponent as ch, StatComponent as ci, StepComponent as cj, StepperComponent as ck, StepsComponent as cl, StorageService as cm, StrokeLinecap as cn, StrokeLinejoin as co, SummaryComponent as cp, SvgGeneratorComponent as cq, SvgGeneratorService as cr, SvgService as cs, TOTAL_COLUMNS as ct, TRANSLATION_SOURCE as cu, TableComponent as cv, TechnicalMeterComponent as cw, TextInputComponent as cx, TextareaInputComponent as cy, ThemeComponent as cz, APP_CONTEXT_REF as d, loadingActions as d$, WrapperInputComponent as d0, anchorNavId as d1, applyColorsToElement as d2, bootstrapMagApp as d3, bootstrapPwaInstall as d4, buildWcBaseUrl as d5, calculateLuminance as d6, calculateRanks as d7, cellText as d8, checkFilterCondition as d9, getValue as dA, hasErrorComputed as dB, hexToRgb as dC, hslToRgb$1 as dD, initMagmoniumApp as dE, initialNotificationState as dF, initialState$2 as dG, initials as dH, injectAuthenticate as dI, injectInstallApp as dJ, injectParentSize as dK, injectScrollSticky as dL, isButtonName as dM, isCancelledComputed as dN, isExtensiblePlatformNavId as dO, isJson as dP, isLoadingComputed as dQ, isLocalhost as dR, isPlatformNavId as dS, isSize as dT, isTierPreview as dU, isUrlLocalhost as dV, isValidNavId as dW, isValidNavSegment as dX, isWebComponent as dY, linkToId as dZ, linkToNav as d_, childNavId as da, classListSignal as db, coerceSize as dc, cornerEdge as dd, cornerSide as de, createMap as df, createPlatformNavMap as dg, deriveAvatarGradient as dh, deriveContrastColor as di, deriveOppositeColor as dj, derivePropertyName as dk, emailValidation as dl, evaluate as dm, evaluateBool as dn, flattenTreeGridRows as dp, formatBadgeCount as dq, fullName as dr, generateClipPath as ds, generateTransform as dt, getClassList as du, getProperty as dv, getScrollParent as dw, getTierFromPreviewPath as dx, getTreeGridRow as dy, getUniqueId as dz, ASSET_BASE_URL as e, toHostNavId as e$, mInterceptor as e0, manualValidation as e1, matchFieldValidation as e2, maxLengthValidation as e3, maxValidation as e4, mergePlatformNav as e5, mergeUnique as e6, mergeUniqueBy as e7, mergeUniqueWith as e8, minAgeValidation as e9, providePlatformNavWidgets as eA, provideSearch as eB, provideSizeContext as eC, provideUserTabs as eD, publicGuard as eE, readFieldPatterns as eF, renderAddress as eG, requiredValidation as eH, resolveConfigAsset as eI, resolveIconSize as eJ, resolvePallet as eK, resolvePatternRules as eL, resolveSize as eM, rgbToHex as eN, rgbToHsl as eO, rowHasChildren as eP, samePatterns as eQ, segmentsToNavId as eR, setProperty as eS, setTreeGridChildren as eT, settingsWidgets as eU, shouldShowBadge as eV, splitNavId as eW, stringToColor as eX, toAttrBool as eY, toAttrNumber as eZ, toCssLength as e_, minLengthValidation as ea, minValidation as eb, miniMarkToHtml as ec, navIdChain as ed, navIdFor as ee, navIdSegment as ef, navIdToRoutePath as eg, navIdToSegments as eh, navToId as ei, parentNavId as ej, parseAddress as ek, parseColor as el, parsePatternNames as em, patternValidation as en, patternsValidation as eo, platformNavWidgets as ep, privateGuard as eq, processImageToSvg as er, provideAppContext as es, provideMagAppConfig as et, provideMagWcConfig as eu, provideMagWcRoutes as ev, provideModalComponents as ew, provideMurlUrlSerializer as ex, provideNavWidgets as ey, provideOverlayWidgets as ez, AccordionBodyDirective as f, toLength$1 as f0, toLocalNavId as f1, toggleTreeGridRow as f2, unfetchedPlatformNav as f3, urlValidation as f4, 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 };
31503
- //# sourceMappingURL=magmonium-one-magmonium-one-BGcwClRr.mjs.map
31531
+ //# sourceMappingURL=magmonium-one-magmonium-one-BCnG-yvO.mjs.map