@magmonium/one 0.4.38 → 0.4.40
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.
|
@@ -7603,7 +7603,7 @@ var SectionSearchComponent = class SectionSearchComponent extends BaseTextInputC
|
|
|
7603
7603
|
resultInput = input(SEARCH_RESULT_INPUT, ...ngDevMode ? [{ debugName: "resultInput" }] : /* istanbul ignore next */ []);
|
|
7604
7604
|
elementInputs = input(...ngDevMode ? [void 0, { debugName: "elementInputs" }] : /* istanbul ignore next */ []);
|
|
7605
7605
|
searchChange = output();
|
|
7606
|
-
isOpen =
|
|
7606
|
+
isOpen = model(false, ...ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []);
|
|
7607
7607
|
resultText = signal("", ...ngDevMode ? [{ debugName: "resultText" }] : /* istanbul ignore next */ []);
|
|
7608
7608
|
isDesignMode = !!inject(IS_DESIGN_MODE, { optional: true });
|
|
7609
7609
|
scrollSticky = injectScrollSticky(0, "none");
|
|
@@ -7791,12 +7791,20 @@ var SectionSearchComponent = class SectionSearchComponent extends BaseTextInputC
|
|
|
7791
7791
|
isSignal: true,
|
|
7792
7792
|
isRequired: false,
|
|
7793
7793
|
transformFunction: null
|
|
7794
|
+
},
|
|
7795
|
+
isOpen: {
|
|
7796
|
+
classPropertyName: "isOpen",
|
|
7797
|
+
publicName: "isOpen",
|
|
7798
|
+
isSignal: true,
|
|
7799
|
+
isRequired: false,
|
|
7800
|
+
transformFunction: null
|
|
7794
7801
|
}
|
|
7795
7802
|
},
|
|
7796
7803
|
outputs: {
|
|
7797
7804
|
value: "valueChange",
|
|
7798
7805
|
touched: "touchedChange",
|
|
7799
|
-
searchChange: "searchChange"
|
|
7806
|
+
searchChange: "searchChange",
|
|
7807
|
+
isOpen: "isOpenChange"
|
|
7800
7808
|
},
|
|
7801
7809
|
host: {
|
|
7802
7810
|
listeners: { "focusout": "onFocusOut($event)" },
|
|
@@ -8161,6 +8169,17 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
8161
8169
|
searchChange: [{
|
|
8162
8170
|
type: i0.Output,
|
|
8163
8171
|
args: ["searchChange"]
|
|
8172
|
+
}],
|
|
8173
|
+
isOpen: [{
|
|
8174
|
+
type: i0.Input,
|
|
8175
|
+
args: [{
|
|
8176
|
+
isSignal: true,
|
|
8177
|
+
alias: "isOpen",
|
|
8178
|
+
required: false
|
|
8179
|
+
}]
|
|
8180
|
+
}, {
|
|
8181
|
+
type: i0.Output,
|
|
8182
|
+
args: ["isOpenChange"]
|
|
8164
8183
|
}]
|
|
8165
8184
|
}
|
|
8166
8185
|
});
|
|
@@ -40580,6 +40599,11 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
40580
40599
|
}]
|
|
40581
40600
|
}]
|
|
40582
40601
|
});
|
|
40602
|
+
const SEARCH_TOGGLE = {
|
|
40603
|
+
icon: "search",
|
|
40604
|
+
iconOnly: true,
|
|
40605
|
+
variant: "ghost"
|
|
40606
|
+
};
|
|
40583
40607
|
var NavHeaderComponent = class NavHeaderComponent {
|
|
40584
40608
|
_navStore = inject(NavStore);
|
|
40585
40609
|
_searchStore = inject(SearchStore);
|
|
@@ -40587,6 +40611,9 @@ var NavHeaderComponent = class NavHeaderComponent {
|
|
|
40587
40611
|
_isUser = computed(() => this._navStore.panelNavId() === `${ROOT_NAV}_user`, ...ngDevMode ? [{ debugName: "_isUser" }] : /* istanbul ignore next */ []);
|
|
40588
40612
|
_isSearch = computed(() => this._navStore.panelNavId() === `${ROOT_NAV}_search`, ...ngDevMode ? [{ debugName: "_isSearch" }] : /* istanbul ignore next */ []);
|
|
40589
40613
|
_hasParent = computed(() => this._navStore.breadcrumb().header?.id !== ROOT_NAV, ...ngDevMode ? [{ debugName: "_hasParent" }] : /* istanbul ignore next */ []);
|
|
40614
|
+
_searchOpen = signal(false, ...ngDevMode ? [{ debugName: "_searchOpen" }] : /* istanbul ignore next */ []);
|
|
40615
|
+
_searchToggle = SEARCH_TOGGLE;
|
|
40616
|
+
_openSearch = () => this._searchOpen.set(true);
|
|
40590
40617
|
_searchLabel = computed(() => this._navStore.searchLabel() ?? "", ...ngDevMode ? [{ debugName: "_searchLabel" }] : /* istanbul ignore next */ []);
|
|
40591
40618
|
_trail = computed(() => {
|
|
40592
40619
|
const trail = this._navStore.breadcrumb().trail;
|
|
@@ -40594,6 +40621,11 @@ var NavHeaderComponent = class NavHeaderComponent {
|
|
|
40594
40621
|
}, ...ngDevMode ? [{ debugName: "_trail" }] : /* istanbul ignore next */ []);
|
|
40595
40622
|
_user = computed(() => this._isUser() ? this.#authStore.user() ?? null : null, ...ngDevMode ? [{ debugName: "_user" }] : /* istanbul ignore next */ []);
|
|
40596
40623
|
_header = computed(() => this._isUser() ? null : this._navStore.breadcrumb().header, ...ngDevMode ? [{ debugName: "_header" }] : /* istanbul ignore next */ []);
|
|
40624
|
+
constructor() {
|
|
40625
|
+
effect(() => {
|
|
40626
|
+
if (!this._isSearch()) this._searchOpen.set(false);
|
|
40627
|
+
});
|
|
40628
|
+
}
|
|
40597
40629
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
40598
40630
|
minVersion: "12.0.0",
|
|
40599
40631
|
version: "22.2.1",
|
|
@@ -40609,8 +40641,8 @@ var NavHeaderComponent = class NavHeaderComponent {
|
|
|
40609
40641
|
isStandalone: true,
|
|
40610
40642
|
selector: "m-nav-header",
|
|
40611
40643
|
ngImport: i0,
|
|
40612
|
-
template: "<m-section>\n @if (_trail(); as trail) {\n
|
|
40613
|
-
styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block;--m-section-min-height: 0}.nav-header__user{display:block;padding:1rem}.nav-header__username{font-size:.6875rem;font-weight:600;color:var(--m-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}\n"],
|
|
40644
|
+
template: "<m-section>\n @if (_isSearch() && _searchOpen()) {\n <!-- Searching: the field takes the row the trail was on, so the nav is\n hidden while there is something to type into. -->\n <m-section-search\n class=\"nav-header__search\"\n [(isOpen)]=\"_searchOpen\"\n [value]=\"_searchStore.query()\"\n [searchLabel]=\"_searchLabel()\"\n (searchChange)=\"_searchStore.updateQuery($event)\"\n />\n } @else {\n @if (_trail(); as trail) {\n <m-section-back [back]=\"_hasParent()\" (navigate)=\"_navStore.back()\">\n <m-nav-trail [config]=\"trail\" />\n @if (_isSearch()) {\n <!-- The bar's toggle, drawn in the nav's own row rather than in a row\n stacked on top of it. -->\n <m-button\n class=\"nav-header__search-toggle\"\n [config]=\"_searchToggle\"\n (clicked)=\"_openSearch()\"\n />\n }\n </m-section-back>\n } @else if (_isSearch()) {\n <!-- No trail to sit beside — a search opened at root — so the toggle takes\n the header row on its own. -->\n <m-section-back>\n <m-button\n class=\"nav-header__search-toggle\"\n [config]=\"_searchToggle\"\n (clicked)=\"_openSearch()\"\n />\n </m-section-back>\n }\n\n @if (!_isSearch()) {\n @if (_user(); as user) {\n <m-user class=\"nav-header__user\" [id]=\"user.id\" [user]=\"user\" mRef=\"root_user\">\n <span class=\"nav-header__username\">@{{ user.username }}</span>\n </m-user>\n } @else if (_header(); as h) {\n @if (h.label) {\n <m-section-header class=\"nav-header__title\" [icon]=\"h.icon\" [label]=\"h.label\" />\n }\n }\n }\n }\n</m-section>\n",
|
|
40645
|
+
styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block;--m-section-min-height: 0}.nav-header__user{display:block;padding:1rem}.nav-header__username{font-size:.6875rem;font-weight:600;color:var(--m-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}m-section-search.nav-header__search{--_nav-row-height: var(--section-header-min-height, calc(var(--section-header-py, .5rem) * 2 + 1.25rem));min-height:var(--_nav-row-height);padding-block:0;--m-input-clear-height: calc(var(--_nav-row-height) - .5rem);--m-input-clear-min-height: calc(var(--_nav-row-height) - .5rem)}\n"],
|
|
40614
40646
|
dependencies: [
|
|
40615
40647
|
{
|
|
40616
40648
|
kind: "component",
|
|
@@ -40701,14 +40733,50 @@ var NavHeaderComponent = class NavHeaderComponent {
|
|
|
40701
40733
|
"sticky",
|
|
40702
40734
|
"element",
|
|
40703
40735
|
"resultInput",
|
|
40704
|
-
"elementInputs"
|
|
40736
|
+
"elementInputs",
|
|
40737
|
+
"isOpen"
|
|
40705
40738
|
],
|
|
40706
40739
|
outputs: [
|
|
40707
40740
|
"valueChange",
|
|
40708
40741
|
"touchedChange",
|
|
40709
|
-
"searchChange"
|
|
40742
|
+
"searchChange",
|
|
40743
|
+
"isOpenChange"
|
|
40710
40744
|
]
|
|
40711
40745
|
},
|
|
40746
|
+
{
|
|
40747
|
+
kind: "component",
|
|
40748
|
+
type: ButtonComponent,
|
|
40749
|
+
selector: "m-button,m-one-button",
|
|
40750
|
+
inputs: [
|
|
40751
|
+
"config",
|
|
40752
|
+
"color",
|
|
40753
|
+
"labelClass",
|
|
40754
|
+
"fullWidth",
|
|
40755
|
+
"nav",
|
|
40756
|
+
"navParams",
|
|
40757
|
+
"href",
|
|
40758
|
+
"disabled",
|
|
40759
|
+
"variant",
|
|
40760
|
+
"name",
|
|
40761
|
+
"baseUrl",
|
|
40762
|
+
"one",
|
|
40763
|
+
"remote",
|
|
40764
|
+
"label",
|
|
40765
|
+
"noTranslate",
|
|
40766
|
+
"params",
|
|
40767
|
+
"noNative",
|
|
40768
|
+
"icon",
|
|
40769
|
+
"isRightIcon",
|
|
40770
|
+
"iconOnly",
|
|
40771
|
+
"stacked",
|
|
40772
|
+
"imgSrc",
|
|
40773
|
+
"nonClickable",
|
|
40774
|
+
"inverted",
|
|
40775
|
+
"isSubmit",
|
|
40776
|
+
"tabindex"
|
|
40777
|
+
],
|
|
40778
|
+
outputs: ["configChange", "clicked"]
|
|
40779
|
+
},
|
|
40712
40780
|
{
|
|
40713
40781
|
kind: "component",
|
|
40714
40782
|
type: UserComponent,
|
|
@@ -40752,15 +40820,17 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
40752
40820
|
SectionHeaderComponent,
|
|
40753
40821
|
SectionBackComponent,
|
|
40754
40822
|
SectionSearchComponent,
|
|
40823
|
+
ButtonComponent,
|
|
40755
40824
|
UserComponent,
|
|
40756
40825
|
MRefDirective
|
|
40757
40826
|
],
|
|
40758
40827
|
encapsulation: ViewEncapsulation.None,
|
|
40759
40828
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
40760
|
-
template: "<m-section>\n @if (_trail(); as trail) {\n
|
|
40761
|
-
styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block;--m-section-min-height: 0}.nav-header__user{display:block;padding:1rem}.nav-header__username{font-size:.6875rem;font-weight:600;color:var(--m-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}\n"]
|
|
40829
|
+
template: "<m-section>\n @if (_isSearch() && _searchOpen()) {\n <!-- Searching: the field takes the row the trail was on, so the nav is\n hidden while there is something to type into. -->\n <m-section-search\n class=\"nav-header__search\"\n [(isOpen)]=\"_searchOpen\"\n [value]=\"_searchStore.query()\"\n [searchLabel]=\"_searchLabel()\"\n (searchChange)=\"_searchStore.updateQuery($event)\"\n />\n } @else {\n @if (_trail(); as trail) {\n <m-section-back [back]=\"_hasParent()\" (navigate)=\"_navStore.back()\">\n <m-nav-trail [config]=\"trail\" />\n @if (_isSearch()) {\n <!-- The bar's toggle, drawn in the nav's own row rather than in a row\n stacked on top of it. -->\n <m-button\n class=\"nav-header__search-toggle\"\n [config]=\"_searchToggle\"\n (clicked)=\"_openSearch()\"\n />\n }\n </m-section-back>\n } @else if (_isSearch()) {\n <!-- No trail to sit beside — a search opened at root — so the toggle takes\n the header row on its own. -->\n <m-section-back>\n <m-button\n class=\"nav-header__search-toggle\"\n [config]=\"_searchToggle\"\n (clicked)=\"_openSearch()\"\n />\n </m-section-back>\n }\n\n @if (!_isSearch()) {\n @if (_user(); as user) {\n <m-user class=\"nav-header__user\" [id]=\"user.id\" [user]=\"user\" mRef=\"root_user\">\n <span class=\"nav-header__username\">@{{ user.username }}</span>\n </m-user>\n } @else if (_header(); as h) {\n @if (h.label) {\n <m-section-header class=\"nav-header__title\" [icon]=\"h.icon\" [label]=\"h.label\" />\n }\n }\n }\n }\n</m-section>\n",
|
|
40830
|
+
styles: ["@keyframes toggle-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.02)}}@keyframes thumb-slide{0%{transform:translate(0) scale(1)}50%{transform:translate(.3em) scale(.9)}to{transform:translate(.6em) scale(1)}}:host{display:block;--m-section-min-height: 0}.nav-header__user{display:block;padding:1rem}.nav-header__username{font-size:.6875rem;font-weight:600;color:var(--m-text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}m-section-search.nav-header__search{--_nav-row-height: var(--section-header-min-height, calc(var(--section-header-py, .5rem) * 2 + 1.25rem));min-height:var(--_nav-row-height);padding-block:0;--m-input-clear-height: calc(var(--_nav-row-height) - .5rem);--m-input-clear-min-height: calc(var(--_nav-row-height) - .5rem)}\n"]
|
|
40762
40831
|
}]
|
|
40763
|
-
}]
|
|
40832
|
+
}],
|
|
40833
|
+
ctorParameters: () => []
|
|
40764
40834
|
});
|
|
40765
40835
|
const PLACEHOLDER_MAP = {
|
|
40766
40836
|
root_settings_user_theme: "search-theme",
|