@magmonium/one 0.2.35 → 0.2.37
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.
- package/fesm2022/{magmonium-one-magmonium-one-DwGh5jaB.mjs → magmonium-one-magmonium-one-Byxgogqv.mjs} +193 -168
- package/fesm2022/magmonium-one-magmonium-one-Byxgogqv.mjs.map +1 -0
- package/fesm2022/{magmonium-one-otp-BeMIPFGz.mjs → magmonium-one-otp-ozxzDST4.mjs} +2 -2
- package/fesm2022/{magmonium-one-otp-BeMIPFGz.mjs.map → magmonium-one-otp-ozxzDST4.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-password-Bok5-DJu.mjs → magmonium-one-password-CIGsSlR_.mjs} +2 -2
- package/fesm2022/{magmonium-one-password-Bok5-DJu.mjs.map → magmonium-one-password-CIGsSlR_.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-toggle-CJXOeVOK.mjs → magmonium-one-toggle-xObigfCF.mjs} +2 -2
- package/fesm2022/{magmonium-one-toggle-CJXOeVOK.mjs.map → magmonium-one-toggle-xObigfCF.mjs.map} +1 -1
- package/fesm2022/magmonium-one.mjs +1 -1
- package/package.json +1 -1
- package/types/magmonium-one.d.ts +10 -9
- package/fesm2022/magmonium-one-magmonium-one-DwGh5jaB.mjs.map +0 -1
|
@@ -3452,147 +3452,6 @@ function getNavWidgetEntry(appId) {
|
|
|
3452
3452
|
return windowRegistry().get(appId);
|
|
3453
3453
|
}
|
|
3454
3454
|
|
|
3455
|
-
const emptyResult = () => ({
|
|
3456
|
-
breadcrumb: { header: { label: '', id: '' }, trail: [] },
|
|
3457
|
-
navMenus: [],
|
|
3458
|
-
});
|
|
3459
|
-
/**
|
|
3460
|
-
* One trail/menu entry. `nav` names where it goes by NavId — the NavKind on the
|
|
3461
|
-
* target decides whether following it routes or opens a panel, so nothing here
|
|
3462
|
-
* chooses a link kind (ADR 0014).
|
|
3463
|
-
*/
|
|
3464
|
-
const toTrailItem = (navId, navMap, anchor) => {
|
|
3465
|
-
const nav = navMap[navId];
|
|
3466
|
-
return {
|
|
3467
|
-
id: navId,
|
|
3468
|
-
label: nav?.title ?? navIdSegment(navId),
|
|
3469
|
-
icon: nav?.icon,
|
|
3470
|
-
nav: navId,
|
|
3471
|
-
address: renderAddress(navId, navMap, anchor),
|
|
3472
|
-
};
|
|
3473
|
-
};
|
|
3474
|
-
/** A Nav that *is* its parent's own content rather than a place beside it. */
|
|
3475
|
-
const isDefaultNav = (navId) => navIdSegment(navId) === DEFAULT_NAV_SEGMENT;
|
|
3476
|
-
/**
|
|
3477
|
-
* The Nav the User is standing on as the nav shows it. A `default` node names
|
|
3478
|
-
* no place of its own — it is the route answering its parent's empty path — so
|
|
3479
|
-
* landing on `root_app_default` is standing on `root_app`, and the panel says
|
|
3480
|
-
* so rather than naming a segment that is on no menu.
|
|
3481
|
-
*/
|
|
3482
|
-
const visibleNavId = (navId) => {
|
|
3483
|
-
let id = navId;
|
|
3484
|
-
while (id !== ROOT_NAV$1 && isDefaultNav(id))
|
|
3485
|
-
id = parentNavId(id) ?? ROOT_NAV$1;
|
|
3486
|
-
return id;
|
|
3487
|
-
};
|
|
3488
|
-
/**
|
|
3489
|
-
* The direct children of a Nav. `children` is the authored list, but a Nav that
|
|
3490
|
-
* lists none is not childless: the map already holds every node fetched for
|
|
3491
|
-
* this descent, and a child is named by its own id. Reading the map when the
|
|
3492
|
-
* list is empty is what keeps a generated tree — whose `root.yml` names the app
|
|
3493
|
-
* and nothing else — from titling a leaf over an empty panel.
|
|
3494
|
-
*/
|
|
3495
|
-
const childIdsOf = (navId, navMap) => {
|
|
3496
|
-
const declared = navMap[navId]?.children;
|
|
3497
|
-
if (declared?.length)
|
|
3498
|
-
return declared;
|
|
3499
|
-
return Object.keys(navMap).filter((id) => parentNavId(id) === navId);
|
|
3500
|
-
};
|
|
3501
|
-
/**
|
|
3502
|
-
* The children a menu may draw. A Nav needs a title to be a row at all, and a
|
|
3503
|
-
* `default` node is not a row: it is its parent's own content, so it is
|
|
3504
|
-
* *transparent* — its own children take its place in the list, spliced where
|
|
3505
|
-
* it stood. `app → default → { trending, latest }` is one list of two rows
|
|
3506
|
-
* under app, which is the tree the User was drawing when they put a `default`
|
|
3507
|
-
* in the middle of it. Filtering the node out without adopting its children
|
|
3508
|
-
* left that app with no rows at all.
|
|
3509
|
-
*/
|
|
3510
|
-
const menuChildIds = (navId, navMap) => childIdsOf(navId, navMap).flatMap((childId) => {
|
|
3511
|
-
if (isDefaultNav(childId))
|
|
3512
|
-
return menuChildIds(childId, navMap);
|
|
3513
|
-
return navMap[childId]?.title ? [childId] : [];
|
|
3514
|
-
});
|
|
3515
|
-
/**
|
|
3516
|
-
* Whose children the menu draws. A Nav with rows of its own draws them — that
|
|
3517
|
-
* is the descent. A leaf has none, and descending into nothing left the panel
|
|
3518
|
-
* on an empty state; it draws its *siblings* instead, so the menu stays the
|
|
3519
|
-
* list the User moved through and the row they are on is the one marked
|
|
3520
|
-
* active. Root is the floor: its own children are the last list there is.
|
|
3521
|
-
*/
|
|
3522
|
-
const navMenuOwnerId = (navId, navMap, hasOwnContent = false) => {
|
|
3523
|
-
const visible = visibleNavId(navId);
|
|
3524
|
-
if (visible === ROOT_NAV$1 || menuChildIds(visible, navMap).length) {
|
|
3525
|
-
return visible;
|
|
3526
|
-
}
|
|
3527
|
-
// A panel that answers with a widget of its own keeps its own title —
|
|
3528
|
-
// titling it after its parent while showing its own content reads as the
|
|
3529
|
-
// wrong panel. Being a Murl is not that proof: a Murl leaf nothing is
|
|
3530
|
-
// registered for draws nothing, and an empty panel must not name itself.
|
|
3531
|
-
if (hasOwnContent)
|
|
3532
|
-
return visible;
|
|
3533
|
-
// Nothing of its own and no rows under it: hand the panel to the nearest
|
|
3534
|
-
// ancestor that has rows, so the User reads the list they are in with their
|
|
3535
|
-
// own row marked. Where no ancestor lists anything there is no better title
|
|
3536
|
-
// than the one we are on — a mistitled empty panel is worse than a titled one.
|
|
3537
|
-
for (let ancestor = parentNavId(visible); ancestor; ancestor = parentNavId(ancestor)) {
|
|
3538
|
-
const owner = visibleNavId(ancestor);
|
|
3539
|
-
if (menuChildIds(owner, navMap).length)
|
|
3540
|
-
return owner;
|
|
3541
|
-
if (owner === ROOT_NAV$1)
|
|
3542
|
-
break;
|
|
3543
|
-
}
|
|
3544
|
-
return visible;
|
|
3545
|
-
};
|
|
3546
|
-
const buildNavMenus = (navId, navMap, anchor) => menuChildIds(navId, navMap).map((childId) => toTrailItem(childId, navMap, anchor));
|
|
3547
|
-
/**
|
|
3548
|
-
* Merges a widget's emitted trail over the derived one, matching by depth.
|
|
3549
|
-
* With a single keyspace there is nothing to translate — an emitted entry is
|
|
3550
|
-
* already in the same ids everything else uses.
|
|
3551
|
-
*/
|
|
3552
|
-
const mergeTrail = (derived, override, derivedHeader) => {
|
|
3553
|
-
const depth = (id) => navIdChain(id).length;
|
|
3554
|
-
const trail = derived.map((item) => {
|
|
3555
|
-
const emitted = override.trail?.find((e) => depth(e.id) === depth(item.id));
|
|
3556
|
-
return emitted ? { ...item, ...emitted } : item;
|
|
3557
|
-
});
|
|
3558
|
-
return { trail, header: override.header ?? derivedHeader };
|
|
3559
|
-
};
|
|
3560
|
-
function deriveBreadcrumb(params) {
|
|
3561
|
-
const { navId, navMap, anchor, breadcrumb, navMenu, hasOwnContent } = params;
|
|
3562
|
-
if (!navId)
|
|
3563
|
-
return emptyResult();
|
|
3564
|
-
// The header and the trail belong to whichever Nav owns the menu below them:
|
|
3565
|
-
// on a leaf that is the parent, so the User reads the list they are in with
|
|
3566
|
-
// their own row marked, rather than a title over an empty panel.
|
|
3567
|
-
const ownerId = navMenuOwnerId(navId, navMap, hasOwnContent);
|
|
3568
|
-
// An emitted breadcrumb names the panel it was emitted for. Once the panel
|
|
3569
|
-
// has been handed up to an ancestor it is no longer that panel, so the
|
|
3570
|
-
// override would title the ancestor's list after the leaf we left.
|
|
3571
|
-
const ownPanel = ownerId === visibleNavId(navId);
|
|
3572
|
-
const chain = navIdChain(ownerId);
|
|
3573
|
-
const derivedTrail = chain
|
|
3574
|
-
.slice(0, -1)
|
|
3575
|
-
.filter((id) => !isDefaultNav(id))
|
|
3576
|
-
.map((id) => toTrailItem(id, navMap, anchor));
|
|
3577
|
-
const nav = navMap[ownerId];
|
|
3578
|
-
const derivedHeader = {
|
|
3579
|
-
id: ownerId,
|
|
3580
|
-
label: nav?.title ?? (ownerId === ROOT_NAV$1 ? '' : navIdSegment(ownerId)),
|
|
3581
|
-
icon: nav?.icon,
|
|
3582
|
-
nav: ownerId,
|
|
3583
|
-
address: renderAddress(ownerId, navMap, anchor),
|
|
3584
|
-
};
|
|
3585
|
-
const { trail, header } = breadcrumb && ownPanel
|
|
3586
|
-
? mergeTrail(derivedTrail, breadcrumb, derivedHeader)
|
|
3587
|
-
: { trail: derivedTrail, header: derivedHeader };
|
|
3588
|
-
return {
|
|
3589
|
-
breadcrumb: { trail, header },
|
|
3590
|
-
navMenus: navMenu?.length && ownPanel
|
|
3591
|
-
? navMenu
|
|
3592
|
-
: buildNavMenus(ownerId, navMap, anchor),
|
|
3593
|
-
};
|
|
3594
|
-
}
|
|
3595
|
-
|
|
3596
3455
|
/**
|
|
3597
3456
|
* Platform Nav — the chrome this library owns (CONTEXT.md Platform Nav,
|
|
3598
3457
|
* ADR 0016).
|
|
@@ -3610,9 +3469,9 @@ function deriveBreadcrumb(params) {
|
|
|
3610
3469
|
* overrides by registering at the same NavId.
|
|
3611
3470
|
*/
|
|
3612
3471
|
/**
|
|
3613
|
-
* Platform Navs
|
|
3614
|
-
* in the menubar, settings in the footer.
|
|
3615
|
-
*
|
|
3472
|
+
* Platform Navs reached by a chrome button rather than a root row — search,
|
|
3473
|
+
* notification and user in the menubar, settings in the footer. Kept out of
|
|
3474
|
+
* root's rows at runtime so the menu does not repeat the menubar.
|
|
3616
3475
|
*/
|
|
3617
3476
|
const PLATFORM_BUTTON_NAV_IDS = [
|
|
3618
3477
|
'root_search',
|
|
@@ -3621,12 +3480,12 @@ const PLATFORM_BUTTON_NAV_IDS = [
|
|
|
3621
3480
|
'root_settings',
|
|
3622
3481
|
];
|
|
3623
3482
|
/**
|
|
3624
|
-
* Platform children rendered as rows in the root panel
|
|
3625
|
-
*
|
|
3626
|
-
*
|
|
3627
|
-
*
|
|
3483
|
+
* Platform children rendered as rows in the root panel. Empty on purpose —
|
|
3484
|
+
* every Platform Nav carries a button of its own, and a row beside the icon
|
|
3485
|
+
* that already opens it is the same NavRef twice. Root's runtime rows are App
|
|
3486
|
+
* Navs only.
|
|
3628
3487
|
*/
|
|
3629
|
-
const PLATFORM_ROOT_CHILDREN = [
|
|
3488
|
+
const PLATFORM_ROOT_CHILDREN = [];
|
|
3630
3489
|
/**
|
|
3631
3490
|
* Root carries no title of its own — an app's `navs/root.yml` names the app,
|
|
3632
3491
|
* and that is the one field of root the asset owns outright.
|
|
@@ -3732,8 +3591,9 @@ const createPlatformNavMap = () => Object.fromEntries(Object.entries(PLATFORM_NA
|
|
|
3732
3591
|
* same id. An extensible one merges: the asset contributes its App Nav
|
|
3733
3592
|
* children (and, at `root`, the app's own `title` / `logo` / `icon`), the
|
|
3734
3593
|
* platform children follow, and NavKind and NavPresentation stay the
|
|
3735
|
-
* library's — so an asset cannot delete chrome
|
|
3736
|
-
* and shipping a closed Platform NavId cannot
|
|
3594
|
+
* library's — so an asset cannot delete chrome (settings still exists even
|
|
3595
|
+
* though it is not a root row), and shipping a closed Platform NavId cannot
|
|
3596
|
+
* redefine it.
|
|
3737
3597
|
*/
|
|
3738
3598
|
const mergePlatformNav = (nav, navId) => {
|
|
3739
3599
|
const platform = PLATFORM_NAV_MAP[navId];
|
|
@@ -3742,9 +3602,10 @@ const mergePlatformNav = (nav, navId) => {
|
|
|
3742
3602
|
if (!isExtensiblePlatformNavId(navId))
|
|
3743
3603
|
return { ...platform };
|
|
3744
3604
|
const platformChildren = platform.children ?? [];
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3605
|
+
const appChildren = (nav.children ?? []).filter((childId) => !platformChildren.includes(childId) &&
|
|
3606
|
+
// Chrome-button Navs stay addressable but never become root menu rows,
|
|
3607
|
+
// even when an older asset still listed them under root.
|
|
3608
|
+
!(navId === ROOT_NAV$1 && PLATFORM_BUTTON_NAV_IDS.includes(childId)));
|
|
3748
3609
|
return {
|
|
3749
3610
|
...nav,
|
|
3750
3611
|
kind: platform.kind,
|
|
@@ -3766,6 +3627,151 @@ const unfetchedPlatformNav = (navId) => {
|
|
|
3766
3627
|
: undefined;
|
|
3767
3628
|
};
|
|
3768
3629
|
|
|
3630
|
+
const emptyResult = () => ({
|
|
3631
|
+
breadcrumb: { header: { label: '', id: '' }, trail: [] },
|
|
3632
|
+
navMenus: [],
|
|
3633
|
+
});
|
|
3634
|
+
/**
|
|
3635
|
+
* One trail/menu entry. `nav` names where it goes by NavId — the NavKind on the
|
|
3636
|
+
* target decides whether following it routes or opens a panel, so nothing here
|
|
3637
|
+
* chooses a link kind (ADR 0014).
|
|
3638
|
+
*/
|
|
3639
|
+
const toTrailItem = (navId, navMap, anchor) => {
|
|
3640
|
+
const nav = navMap[navId];
|
|
3641
|
+
return {
|
|
3642
|
+
id: navId,
|
|
3643
|
+
label: nav?.title ?? navIdSegment(navId),
|
|
3644
|
+
icon: nav?.icon,
|
|
3645
|
+
nav: navId,
|
|
3646
|
+
address: renderAddress(navId, navMap, anchor),
|
|
3647
|
+
};
|
|
3648
|
+
};
|
|
3649
|
+
/** A Nav that *is* its parent's own content rather than a place beside it. */
|
|
3650
|
+
const isDefaultNav = (navId) => navIdSegment(navId) === DEFAULT_NAV_SEGMENT;
|
|
3651
|
+
/**
|
|
3652
|
+
* The Nav the User is standing on as the nav shows it. A `default` node names
|
|
3653
|
+
* no place of its own — it is the route answering its parent's empty path — so
|
|
3654
|
+
* landing on `root_app_default` is standing on `root_app`, and the panel says
|
|
3655
|
+
* so rather than naming a segment that is on no menu.
|
|
3656
|
+
*/
|
|
3657
|
+
const visibleNavId = (navId) => {
|
|
3658
|
+
let id = navId;
|
|
3659
|
+
while (id !== ROOT_NAV$1 && isDefaultNav(id))
|
|
3660
|
+
id = parentNavId(id) ?? ROOT_NAV$1;
|
|
3661
|
+
return id;
|
|
3662
|
+
};
|
|
3663
|
+
/**
|
|
3664
|
+
* The direct children of a Nav. `children` is the authored list, but a Nav that
|
|
3665
|
+
* lists none is not childless: the map already holds every node fetched for
|
|
3666
|
+
* this descent, and a child is named by its own id. Reading the map when the
|
|
3667
|
+
* list is empty is what keeps a generated tree — whose `root.yml` names the app
|
|
3668
|
+
* and nothing else — from titling a leaf over an empty panel.
|
|
3669
|
+
*
|
|
3670
|
+
* The Platform Navs reached by a chrome button are the one exclusion: root
|
|
3671
|
+
* seeds `children: []` so they are never rows beside the icons that already
|
|
3672
|
+
* open them, and discovering them off the map would put them back.
|
|
3673
|
+
*/
|
|
3674
|
+
const childIdsOf = (navId, navMap) => {
|
|
3675
|
+
const declared = navMap[navId]?.children;
|
|
3676
|
+
if (declared?.length)
|
|
3677
|
+
return declared;
|
|
3678
|
+
return Object.keys(navMap).filter((id) => parentNavId(id) === navId && !PLATFORM_BUTTON_NAV_IDS.includes(id));
|
|
3679
|
+
};
|
|
3680
|
+
/**
|
|
3681
|
+
* The children a menu may draw. A Nav needs a title to be a row at all, and a
|
|
3682
|
+
* `default` node is not a row: it is its parent's own content, so it is
|
|
3683
|
+
* *transparent* — its own children take its place in the list, spliced where
|
|
3684
|
+
* it stood. `app → default → { trending, latest }` is one list of two rows
|
|
3685
|
+
* under app, which is the tree the User was drawing when they put a `default`
|
|
3686
|
+
* in the middle of it. Filtering the node out without adopting its children
|
|
3687
|
+
* left that app with no rows at all.
|
|
3688
|
+
*/
|
|
3689
|
+
const menuChildIds = (navId, navMap) => childIdsOf(navId, navMap).flatMap((childId) => {
|
|
3690
|
+
if (isDefaultNav(childId))
|
|
3691
|
+
return menuChildIds(childId, navMap);
|
|
3692
|
+
return navMap[childId]?.title ? [childId] : [];
|
|
3693
|
+
});
|
|
3694
|
+
/**
|
|
3695
|
+
* Whose children the menu draws. A Nav with rows of its own draws them — that
|
|
3696
|
+
* is the descent. A leaf has none, and descending into nothing left the panel
|
|
3697
|
+
* on an empty state; it draws its *siblings* instead, so the menu stays the
|
|
3698
|
+
* list the User moved through and the row they are on is the one marked
|
|
3699
|
+
* active. Root is the floor: its own children are the last list there is.
|
|
3700
|
+
*/
|
|
3701
|
+
const navMenuOwnerId = (navId, navMap, hasOwnContent = false) => {
|
|
3702
|
+
const visible = visibleNavId(navId);
|
|
3703
|
+
if (visible === ROOT_NAV$1 || menuChildIds(visible, navMap).length) {
|
|
3704
|
+
return visible;
|
|
3705
|
+
}
|
|
3706
|
+
// A panel that answers with a widget of its own keeps its own title —
|
|
3707
|
+
// titling it after its parent while showing its own content reads as the
|
|
3708
|
+
// wrong panel. Being a Murl is not that proof: a Murl leaf nothing is
|
|
3709
|
+
// registered for draws nothing, and an empty panel must not name itself.
|
|
3710
|
+
if (hasOwnContent)
|
|
3711
|
+
return visible;
|
|
3712
|
+
// Nothing of its own and no rows under it: hand the panel to the nearest
|
|
3713
|
+
// ancestor that has rows, so the User reads the list they are in with their
|
|
3714
|
+
// own row marked. Where no ancestor lists anything there is no better title
|
|
3715
|
+
// than the one we are on — a mistitled empty panel is worse than a titled one.
|
|
3716
|
+
for (let ancestor = parentNavId(visible); ancestor; ancestor = parentNavId(ancestor)) {
|
|
3717
|
+
const owner = visibleNavId(ancestor);
|
|
3718
|
+
if (menuChildIds(owner, navMap).length)
|
|
3719
|
+
return owner;
|
|
3720
|
+
if (owner === ROOT_NAV$1)
|
|
3721
|
+
break;
|
|
3722
|
+
}
|
|
3723
|
+
return visible;
|
|
3724
|
+
};
|
|
3725
|
+
const buildNavMenus = (navId, navMap, anchor) => menuChildIds(navId, navMap).map((childId) => toTrailItem(childId, navMap, anchor));
|
|
3726
|
+
/**
|
|
3727
|
+
* Merges a widget's emitted trail over the derived one, matching by depth.
|
|
3728
|
+
* With a single keyspace there is nothing to translate — an emitted entry is
|
|
3729
|
+
* already in the same ids everything else uses.
|
|
3730
|
+
*/
|
|
3731
|
+
const mergeTrail = (derived, override, derivedHeader) => {
|
|
3732
|
+
const depth = (id) => navIdChain(id).length;
|
|
3733
|
+
const trail = derived.map((item) => {
|
|
3734
|
+
const emitted = override.trail?.find((e) => depth(e.id) === depth(item.id));
|
|
3735
|
+
return emitted ? { ...item, ...emitted } : item;
|
|
3736
|
+
});
|
|
3737
|
+
return { trail, header: override.header ?? derivedHeader };
|
|
3738
|
+
};
|
|
3739
|
+
function deriveBreadcrumb(params) {
|
|
3740
|
+
const { navId, navMap, anchor, breadcrumb, navMenu, hasOwnContent } = params;
|
|
3741
|
+
if (!navId)
|
|
3742
|
+
return emptyResult();
|
|
3743
|
+
// The header and the trail belong to whichever Nav owns the menu below them:
|
|
3744
|
+
// on a leaf that is the parent, so the User reads the list they are in with
|
|
3745
|
+
// their own row marked, rather than a title over an empty panel.
|
|
3746
|
+
const ownerId = navMenuOwnerId(navId, navMap, hasOwnContent);
|
|
3747
|
+
// An emitted breadcrumb names the panel it was emitted for. Once the panel
|
|
3748
|
+
// has been handed up to an ancestor it is no longer that panel, so the
|
|
3749
|
+
// override would title the ancestor's list after the leaf we left.
|
|
3750
|
+
const ownPanel = ownerId === visibleNavId(navId);
|
|
3751
|
+
const chain = navIdChain(ownerId);
|
|
3752
|
+
const derivedTrail = chain
|
|
3753
|
+
.slice(0, -1)
|
|
3754
|
+
.filter((id) => !isDefaultNav(id))
|
|
3755
|
+
.map((id) => toTrailItem(id, navMap, anchor));
|
|
3756
|
+
const nav = navMap[ownerId];
|
|
3757
|
+
const derivedHeader = {
|
|
3758
|
+
id: ownerId,
|
|
3759
|
+
label: nav?.title ?? (ownerId === ROOT_NAV$1 ? '' : navIdSegment(ownerId)),
|
|
3760
|
+
icon: nav?.icon,
|
|
3761
|
+
nav: ownerId,
|
|
3762
|
+
address: renderAddress(ownerId, navMap, anchor),
|
|
3763
|
+
};
|
|
3764
|
+
const { trail, header } = breadcrumb && ownPanel
|
|
3765
|
+
? mergeTrail(derivedTrail, breadcrumb, derivedHeader)
|
|
3766
|
+
: { trail: derivedTrail, header: derivedHeader };
|
|
3767
|
+
return {
|
|
3768
|
+
breadcrumb: { trail, header },
|
|
3769
|
+
navMenus: navMenu?.length && ownPanel
|
|
3770
|
+
? navMenu
|
|
3771
|
+
: buildNavMenus(ownerId, navMap, anchor),
|
|
3772
|
+
};
|
|
3773
|
+
}
|
|
3774
|
+
|
|
3769
3775
|
class GetNavService {
|
|
3770
3776
|
httpService = inject(HttpService);
|
|
3771
3777
|
assetStore = inject(AssetStore);
|
|
@@ -4192,20 +4198,39 @@ const NavStore = signalStore({ providedIn: 'root' }, withState(initialState$3),
|
|
|
4192
4198
|
const back = () => {
|
|
4193
4199
|
if (!untracked(() => store.isNavOpened()))
|
|
4194
4200
|
return;
|
|
4195
|
-
const
|
|
4196
|
-
|
|
4201
|
+
const murl = untracked(() => store.murl());
|
|
4202
|
+
// One Murl segment off the Address we are on, keeping the Anchor. Read
|
|
4203
|
+
// from the Address rather than resolved through the map: an anchored
|
|
4204
|
+
// panel's NavId (`root_page_settings_user`) names no node, so asking the
|
|
4205
|
+
// map whether the parent is still a Murl answered no and sent a route
|
|
4206
|
+
// path nothing matched — the `**` redirect then landed on home.
|
|
4207
|
+
if (murl.length > 1) {
|
|
4208
|
+
const path = untracked(() => store.path());
|
|
4209
|
+
const base = path === URL_SEP ? URL_SEP : path.replace(/\/$/, '');
|
|
4210
|
+
router.navigateByUrl(`${base}${MURL_SEP}${murl.slice(0, -1).join(MURL_SEP)}`, { replaceUrl: true });
|
|
4197
4211
|
return;
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4212
|
+
}
|
|
4213
|
+
// The last Murl closes menu space and leaves the page we opened over,
|
|
4214
|
+
// panel still up so the menu follows the trail instead of vanishing.
|
|
4215
|
+
if (murl.length === 1) {
|
|
4216
|
+
patchState(store, {
|
|
4217
|
+
navOpenedByUser: true,
|
|
4218
|
+
keepPanelOnPathChange: true,
|
|
4219
|
+
});
|
|
4220
|
+
router.navigateByUrl(untracked(() => store.path()), {
|
|
4221
|
+
replaceUrl: true,
|
|
4222
|
+
});
|
|
4202
4223
|
return;
|
|
4203
4224
|
}
|
|
4225
|
+
// Icon-opened over a page: "up" is the Url tree's own step.
|
|
4226
|
+
const parent = parentNavId(untracked(() => store.id()));
|
|
4227
|
+
if (!parent)
|
|
4228
|
+
return;
|
|
4204
4229
|
patchState(store, {
|
|
4205
4230
|
navOpenedByUser: true,
|
|
4206
4231
|
keepPanelOnPathChange: true,
|
|
4207
4232
|
});
|
|
4208
|
-
router.navigateByUrl(
|
|
4233
|
+
router.navigateByUrl(addressFor(parent), { replaceUrl: true });
|
|
4209
4234
|
};
|
|
4210
4235
|
const loadNav = rxMethod(pipe(filter((req) => !!req.navId), tap(() => untracked(() => patchState(store, { navLoading: true }))), switchMap$1(({ navId, appNavId }) => getNavService
|
|
4211
4236
|
.getNav(navId, untracked(() => store.navMap()), {
|
|
@@ -6623,7 +6648,7 @@ class SectionFormItemComponent extends ConfigComponent {
|
|
|
6623
6648
|
break;
|
|
6624
6649
|
}
|
|
6625
6650
|
case InputType.TOGGLE: {
|
|
6626
|
-
const { ToggleInputComponent } = await import('./magmonium-one-toggle-
|
|
6651
|
+
const { ToggleInputComponent } = await import('./magmonium-one-toggle-xObigfCF.mjs');
|
|
6627
6652
|
this.createDynamicComponent(seq, ToggleInputComponent, [], true);
|
|
6628
6653
|
break;
|
|
6629
6654
|
}
|
|
@@ -6635,12 +6660,12 @@ class SectionFormItemComponent extends ConfigComponent {
|
|
|
6635
6660
|
break;
|
|
6636
6661
|
}
|
|
6637
6662
|
case InputType.PASSWORD: {
|
|
6638
|
-
const { PasswordInputComponent } = await import('./magmonium-one-password-
|
|
6663
|
+
const { PasswordInputComponent } = await import('./magmonium-one-password-CIGsSlR_.mjs');
|
|
6639
6664
|
this.createDynamicComponent(seq, PasswordInputComponent);
|
|
6640
6665
|
break;
|
|
6641
6666
|
}
|
|
6642
6667
|
case InputType.OTP: {
|
|
6643
|
-
const { OtpInputComponent } = await import('./magmonium-one-otp-
|
|
6668
|
+
const { OtpInputComponent } = await import('./magmonium-one-otp-ozxzDST4.mjs');
|
|
6644
6669
|
this.createDynamicComponent(seq, OtpInputComponent);
|
|
6645
6670
|
break;
|
|
6646
6671
|
}
|
|
@@ -20043,7 +20068,7 @@ class WrapperInputComponent extends ConfigComponent {
|
|
|
20043
20068
|
break;
|
|
20044
20069
|
}
|
|
20045
20070
|
case InputType.TOGGLE: {
|
|
20046
|
-
const { ToggleInputComponent } = await import('./magmonium-one-toggle-
|
|
20071
|
+
const { ToggleInputComponent } = await import('./magmonium-one-toggle-xObigfCF.mjs');
|
|
20047
20072
|
this.createDynamicComponent(seq, ToggleInputComponent, [], true);
|
|
20048
20073
|
break;
|
|
20049
20074
|
}
|
|
@@ -20055,12 +20080,12 @@ class WrapperInputComponent extends ConfigComponent {
|
|
|
20055
20080
|
break;
|
|
20056
20081
|
}
|
|
20057
20082
|
case InputType.PASSWORD: {
|
|
20058
|
-
const { PasswordInputComponent } = await import('./magmonium-one-password-
|
|
20083
|
+
const { PasswordInputComponent } = await import('./magmonium-one-password-CIGsSlR_.mjs');
|
|
20059
20084
|
this.createDynamicComponent(seq, PasswordInputComponent);
|
|
20060
20085
|
break;
|
|
20061
20086
|
}
|
|
20062
20087
|
case InputType.OTP: {
|
|
20063
|
-
const { OtpInputComponent } = await import('./magmonium-one-otp-
|
|
20088
|
+
const { OtpInputComponent } = await import('./magmonium-one-otp-ozxzDST4.mjs');
|
|
20064
20089
|
this.createDynamicComponent(seq, OtpInputComponent);
|
|
20065
20090
|
break;
|
|
20066
20091
|
}
|
|
@@ -34280,4 +34305,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
34280
34305
|
*/
|
|
34281
34306
|
|
|
34282
34307
|
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 };
|
|
34283
|
-
//# sourceMappingURL=magmonium-one-magmonium-one-
|
|
34308
|
+
//# sourceMappingURL=magmonium-one-magmonium-one-Byxgogqv.mjs.map
|