@liquid-js/lyr-core 22.0.0-alpha.3 → 22.0.0-alpha.4
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/components/accordion/accordion-item-body.component.scss +4 -1
- package/components/card/_card.component.theme.scss +7 -0
- package/components/card/flip-card/_flip-card.component.theme.scss +5 -0
- package/components/card/reveal-card/_reveal-card.component.theme.scss +5 -0
- package/components/list/_list.component.theme.scss +6 -0
- package/components/menu/_menu.component.theme.scss +7 -1
- package/components/tag/_tag-list.scss +5 -0
- package/components/tree-grid/_tree-grid.component.theme.scss +7 -0
- package/fesm2022/liquid-js-lyr-core-accordion.mjs +6 -3
- package/fesm2022/liquid-js-lyr-core-accordion.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-menu.mjs.map +1 -1
- package/fesm2022/liquid-js-lyr-core-tree-grid.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/core/_mixins.scss +10 -0
- package/styles/global/typography/_typography.scss +16 -0
- package/styles/prebuilt/components-custom-properties.css +1 -1
- package/styles/prebuilt/corporate-custom-properties.css +1 -1
- package/styles/prebuilt/corporate.css +1 -1
- package/styles/prebuilt/cosmic-custom-properties.css +1 -1
- package/styles/prebuilt/cosmic.css +1 -1
- package/styles/prebuilt/dark-custom-properties.css +1 -1
- package/styles/prebuilt/dark.css +1 -1
- package/styles/prebuilt/default-custom-properties.css +1 -1
- package/styles/prebuilt/default.css +1 -1
- package/styles/prebuilt/material-dark-custom-properties.css +1 -1
- package/styles/prebuilt/material-dark.css +1 -1
- package/styles/prebuilt/material-light-custom-properties.css +1 -1
- package/styles/prebuilt/material-light.css +1 -1
- package/styles/themes/_mapping.scss +8 -0
- package/types/liquid-js-lyr-core-menu.d.ts +2 -0
- package/types/liquid-js-lyr-core-tree-grid.d.ts +4 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
// It clips its content only while it's closed or opening and closing, so the focus rings of controls at the content's
|
|
2
|
+
// edges show in full once it's open. It's a formatting context of its own either way, as it was while it clipped.
|
|
1
3
|
.item-body-container {
|
|
2
|
-
|
|
4
|
+
display: flow-root;
|
|
3
5
|
|
|
4
6
|
// Its height changes on every frame as it opens or closes, and its content isn't where the page should stay; as a
|
|
5
7
|
// scroll anchor, the page would jump by the content's height as an item opens below another closing.
|
|
@@ -8,5 +10,6 @@
|
|
|
8
10
|
&.collapsed {
|
|
9
11
|
height: 0;
|
|
10
12
|
visibility: hidden;
|
|
13
|
+
overflow: hidden;
|
|
11
14
|
}
|
|
12
15
|
}
|
|
@@ -208,6 +208,13 @@
|
|
|
208
208
|
overflow: auto;
|
|
209
209
|
padding: nb-theme(card-padding);
|
|
210
210
|
position: relative;
|
|
211
|
+
|
|
212
|
+
// A body that scrolls can be focused from the keyboard, to scroll it; the ring is inside, as the card clips.
|
|
213
|
+
&:focus-visible {
|
|
214
|
+
outline: none;
|
|
215
|
+
box-shadow: inset 0 0 0 nb-theme(card-outline-width) nb-theme(card-outline-color);
|
|
216
|
+
}
|
|
217
|
+
|
|
211
218
|
@include nb-scrollbars(
|
|
212
219
|
nb-theme(card-scrollbar-color),
|
|
213
220
|
nb-theme(card-scrollbar-background-color),
|
|
@@ -8,6 +8,11 @@
|
|
|
8
8
|
// Inside the card's border, so the chevron ends where the card's text does.
|
|
9
9
|
margin-inline-end: nb-theme(card-border-width);
|
|
10
10
|
padding: nb-theme(card-padding);
|
|
11
|
+
|
|
12
|
+
// Highlighted within its padding, which already reaches the card's edge, rather than a little past it.
|
|
13
|
+
&:focus-visible {
|
|
14
|
+
box-shadow: none;
|
|
15
|
+
}
|
|
11
16
|
}
|
|
12
17
|
|
|
13
18
|
.flipcard-body .front-container {
|
|
@@ -18,5 +18,10 @@
|
|
|
18
18
|
margin-inline-end: nb-theme(card-border-width);
|
|
19
19
|
margin-bottom: nb-theme(card-border-width);
|
|
20
20
|
padding: nb-theme(card-padding);
|
|
21
|
+
|
|
22
|
+
// Highlighted within its padding, which already reaches the card's edge, rather than a little past it.
|
|
23
|
+
&:focus-visible {
|
|
24
|
+
box-shadow: none;
|
|
25
|
+
}
|
|
21
26
|
}
|
|
22
27
|
}
|
|
@@ -95,4 +95,10 @@
|
|
|
95
95
|
box-shadow: inset 0 0 0 nb-theme(list-item-outline-width) nb-theme(list-item-outline-color);
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
+
|
|
99
|
+
// A list that scrolls can be focused from the keyboard, to scroll it; the ring is inside, as it clips.
|
|
100
|
+
nb-list:focus-visible {
|
|
101
|
+
outline: none;
|
|
102
|
+
box-shadow: inset 0 0 0 nb-theme(list-item-outline-width) nb-theme(list-item-outline-color);
|
|
103
|
+
}
|
|
98
104
|
}
|
|
@@ -28,6 +28,12 @@
|
|
|
28
28
|
color: nb-theme(menu-text-color);
|
|
29
29
|
border-radius: nb-theme(menu-item-border-radius);
|
|
30
30
|
@include nb-component-animation(background-color, color);
|
|
31
|
+
|
|
32
|
+
// The focus ring is inside the item, as the menu clips what's outside its items.
|
|
33
|
+
&:focus-visible {
|
|
34
|
+
outline: none;
|
|
35
|
+
box-shadow: inset 0 0 0 nb-theme(menu-item-outline-width) nb-theme(menu-item-outline-color);
|
|
36
|
+
}
|
|
31
37
|
}
|
|
32
38
|
|
|
33
39
|
.menu-icon {
|
|
@@ -103,7 +109,7 @@
|
|
|
103
109
|
// Inside the button, as the menu clips what's outside its items.
|
|
104
110
|
&:focus-visible {
|
|
105
111
|
outline: none;
|
|
106
|
-
box-shadow: inset 0 0 0 nb-theme(outline-width) nb-theme(outline-color);
|
|
112
|
+
box-shadow: inset 0 0 0 nb-theme(menu-item-outline-width) nb-theme(menu-item-outline-color);
|
|
107
113
|
}
|
|
108
114
|
}
|
|
109
115
|
}
|
|
@@ -86,6 +86,11 @@
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
|
|
89
|
+
// Moved through with the keyboard, the active tag has the focus ring as well as its active colours.
|
|
90
|
+
nb-tag-list:focus-visible nb-tag.active {
|
|
91
|
+
box-shadow: 0 0 0 nb-theme(outline-width) nb-theme(outline-color);
|
|
92
|
+
}
|
|
93
|
+
|
|
89
94
|
// A filled basic tag lightens under the pointer, which in a field is the field's own colour, so in a list with an
|
|
90
95
|
// input it takes its active colours instead: a step away from the field, whatever its state.
|
|
91
96
|
.nb-tag-list-with-input nb-tag.appearance-filled.status-basic:hover {
|
|
@@ -183,5 +183,12 @@
|
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
|
|
186
|
+
// The sort buttons read as the headers' text, and the row toggles as bare chevrons, so they're highlighted as a
|
|
187
|
+
// link is rather than ringed.
|
|
188
|
+
.nb-tree-grid-header-change-sort-button:focus-visible,
|
|
189
|
+
nb-tree-grid-row-toggle .row-toggle-button:focus-visible {
|
|
190
|
+
@include nb-focus-highlight(nb-theme(tree-grid-button-outline-width), nb-theme(tree-grid-button-outline-color), nb-theme(tree-grid-button-outline-border-radius));
|
|
191
|
+
}
|
|
192
|
+
|
|
186
193
|
@include tree-grid-sort-theme.nb-tree-grid-sort-header-theme;
|
|
187
194
|
}
|
|
@@ -293,7 +293,10 @@ var NbAccordionItemBodyComponent = class NbAccordionItemBodyComponent {
|
|
|
293
293
|
let previous;
|
|
294
294
|
afterRenderEffect(() => {
|
|
295
295
|
const state = this.state();
|
|
296
|
-
if (previous !== void 0 && state !== previous) ɵanimateExpand(this.container().nativeElement, state === "expanded", { easing: "ease-in-out" }, {
|
|
296
|
+
if (previous !== void 0 && state !== previous) ɵanimateExpand(this.container().nativeElement, state === "expanded", { easing: "ease-in-out" }, {
|
|
297
|
+
visibility: "visible",
|
|
298
|
+
overflow: "hidden"
|
|
299
|
+
});
|
|
297
300
|
previous = state;
|
|
298
301
|
});
|
|
299
302
|
}
|
|
@@ -330,7 +333,7 @@ var NbAccordionItemBodyComponent = class NbAccordionItemBodyComponent {
|
|
|
330
333
|
}],
|
|
331
334
|
ngImport: i0,
|
|
332
335
|
template: "<div #container\n class=\"item-body-container\"\n [class.collapsed]=\"state() === 'collapsed'\">\n <div class=\"item-body\">\n <!-- nbAccordionItemBodyContent is lazy: it's created when the item is first expanded and then kept. -->\n @if (contentDirective(); as content) {\n @if (init()) {\n <ng-container [ngTemplateOutlet]=\"content.templateRef\" />\n }\n } @else {\n <ng-content />\n }\n </div>\n</div>\n",
|
|
333
|
-
styles: [".item-body-container{
|
|
336
|
+
styles: [".item-body-container{display:flow-root;overflow-anchor:none}.item-body-container.collapsed{height:0;visibility:hidden;overflow:hidden}\n"],
|
|
334
337
|
dependencies: [{
|
|
335
338
|
kind: "directive",
|
|
336
339
|
type: NgTemplateOutlet,
|
|
@@ -355,7 +358,7 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
355
358
|
selector: "nb-accordion-item-body",
|
|
356
359
|
imports: [NgTemplateOutlet],
|
|
357
360
|
template: "<div #container\n class=\"item-body-container\"\n [class.collapsed]=\"state() === 'collapsed'\">\n <div class=\"item-body\">\n <!-- nbAccordionItemBodyContent is lazy: it's created when the item is first expanded and then kept. -->\n @if (contentDirective(); as content) {\n @if (init()) {\n <ng-container [ngTemplateOutlet]=\"content.templateRef\" />\n }\n } @else {\n <ng-content />\n }\n </div>\n</div>\n",
|
|
358
|
-
styles: [".item-body-container{
|
|
361
|
+
styles: [".item-body-container{display:flow-root;overflow-anchor:none}.item-body-container.collapsed{height:0;visibility:hidden;overflow:hidden}\n"]
|
|
359
362
|
}]
|
|
360
363
|
}],
|
|
361
364
|
ctorParameters: () => [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liquid-js-lyr-core-accordion.mjs","names":["convertToBoolProperty","convertToBoolProperty","animateExpand"],"sources":["../../../packages/core/src/components/accordion/accordion.component.ts","../../../packages/core/src/components/accordion/accordion-item.component.ts","../../../packages/core/src/components/accordion/accordion-item.component.html","../../../packages/core/src/components/accordion/accordion-item-body-content.directive.ts","../../../packages/core/src/components/accordion/accordion-item-body.component.ts","../../../packages/core/src/components/accordion/accordion-item-body.component.html","../../../packages/core/src/components/accordion/accordion-item-header.component.ts","../../../packages/core/src/components/accordion/accordion-item-header.component.html","../../../packages/core/src/components/accordion/accordion.module.ts"],"sourcesContent":["import { Component, input, linkedSignal } from '@angular/core'\nimport { injectNbDefaults, NbContainerAppearance, ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\n\n/**\n * What the accordion needs from its items, which register themselves.\n */\nexport interface NbAccordionItem {\n setCollapsed(collapsed: boolean): void\n}\n\n/**\n * An accordion allows to toggle the display of sections of content\n *\n * Basic example\n *\n * @stacked-example(Showcase, accordion/accordion-showcase.component)\n *\n * ```ts\n * <nb-accordion>\n * <nb-accordion-item>\n * <nb-accordion-item-header>Product Details</nb-accordion-item-header>\n * <nb-accordion-item-body>\n * Item Content\n * </nb-accordion-item-body>\n * </nb-accordion-item>\n * </nb-accordion>\n * ```\n * ### Installation\n *\n * Import `NbAccordionComponent`, `NbAccordionItemComponent`, `NbAccordionItemHeaderComponent`, `NbAccordionItemBodyComponent` into your standalone component:\n * ```ts\n * @Component({\n * imports: [NbAccordionComponent, NbAccordionItemComponent, NbAccordionItemHeaderComponent, NbAccordionItemBodyComponent],\n * })\n * export class PageComponent { }\n * ```\n *\n * With NgModules:\n *\n * Import `NbAccordionModule` to your feature module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbAccordionModule,\n * ],\n * })\n * export class PageModule { }\n * ```\n * ### Usage\n *\n * With `multi` mode accordion can have multiple items expanded:\n * @stacked-example(Multiple expanded items, accordion/accordion-multi.component)\n *\n * `NbAccordionItemComponent` has several methods, for example it is possible to trigger item click/toggle:\n * @stacked-example(Expand API, accordion/accordion-toggle.component)\n *\n * An item's content is created with the accordion. Content in an `nbAccordionItemBodyContent` template is created\n * when the item is first expanded, and kept from then on:\n * ```html\n * <nb-accordion-item>\n * <nb-accordion-item-header>Settings</nb-accordion-item-header>\n * <nb-accordion-item-body>\n * <some-component *nbAccordionItemBodyContent />\n * </nb-accordion-item-body>\n * </nb-accordion-item>\n * ```\n * @styles\n *\n * accordion-border-width:\n * accordion-border-style:\n * accordion-border-color:\n * accordion-border-radius:\n * accordion-padding:\n * accordion-shadow:\n * accordion-floating-shadow:\n * accordion-header-text-color:\n * accordion-header-text-font-family:\n * accordion-header-text-font-size:\n * accordion-header-text-font-weight:\n * accordion-header-text-line-height:\n * accordion-header-disabled-text-color:\n * accordion-header-border-color:\n * accordion-header-border-style:\n * accordion-header-border-width:\n * accordion-header-hover-background-color:\n * accordion-header-outline-width:\n * accordion-header-outline-color:\n * accordion-item-background-color:\n * accordion-item-text-color:\n * accordion-item-text-font-family:\n * accordion-item-text-font-size:\n * accordion-item-text-font-weight:\n * accordion-item-text-line-height:\n */\n@Component({\n selector: 'nb-accordion',\n template: `\n <ng-content select=\"nb-accordion-item\" />\n `,\n host: {\n '[class]': '\"appearance-\" + appearance()'\n }\n})\nexport class NbAccordionComponent {\n protected readonly items = new Set<NbAccordionItem>()\n // The app's defaults for accordions, which the appearance starts from.\n protected readonly nbDefaults = injectNbDefaults('accordion')\n\n /**\n * Accordion appearance: `outline`, a card's border, or `floating`, a shadow instead, over the page.\n */\n readonly appearanceInput = input<NbContainerAppearance | undefined>(undefined, { alias: 'appearance' })\n /** The appearance in use: the input's, the app's default, or 'outline'. */\n readonly appearance = linkedSignal<NbContainerAppearance>(\n () => this.appearanceInput() ?? this.nbDefaults().appearance ?? 'outline'\n )\n\n /**\n * Allows several items to be expanded at once; otherwise opening an item closes the others.\n */\n readonly multi = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Opens all enabled items; does nothing outside `multi` mode.\n */\n openAll() {\n if (this.multi()) {\n this.items.forEach((item) => item.setCollapsed(false))\n }\n }\n\n /**\n * Closes all enabled items.\n */\n closeAll() {\n this.items.forEach((item) => item.setCollapsed(true))\n }\n\n /**\n * @docs-private\n */\n register(item: NbAccordionItem): () => void {\n this.items.add(item)\n return () => this.items.delete(item)\n }\n}\n","import { Component, computed, DestroyRef, inject, input, linkedSignal, output } from '@angular/core'\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NbAccordionComponent, NbAccordionItem } from './accordion.component'\n\n/**\n * A section of an `nb-accordion`, with an `nb-accordion-item-header` and an `nb-accordion-item-body`.\n */\n@Component({\n selector: 'nb-accordion-item',\n styleUrls: ['./accordion-item.component.scss'],\n templateUrl: './accordion-item.component.html',\n host: {\n '[class.collapsed]': 'isCollapsed()',\n '[class.expanded]': 'isExpanded()',\n '[class.disabled]': 'disabled()'\n }\n})\nexport class NbAccordionItemComponent implements NbAccordionItem {\n private readonly accordion = inject(NbAccordionComponent, { host: true })\n\n /**\n * Whether the item is collapsed (`true` by default); `expanded` wins over it.\n */\n readonly collapsed = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * Expands the item, whatever `collapsed` says.\n */\n readonly expanded = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Item is disabled and cannot be opened.\n */\n readonly disabled = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Emits when a user or the accordion opens or closes the item.\n */\n readonly collapsedChange = output<boolean>()\n\n /**\n * Whether the item is collapsed: the `collapsed` and `expanded` inputs, until the item is toggled.\n */\n readonly isCollapsed = linkedSignal(() => this.collapsed() && !this.expanded())\n\n readonly isExpanded = computed(() => !this.isCollapsed())\n\n constructor() {\n inject(DestroyRef).onDestroy(this.accordion.register(this))\n }\n\n /**\n * Toggles an enabled item; outside `multi` mode it closes the other items first.\n */\n toggle() {\n if (!this.disabled()) {\n const collapsed = !this.isCollapsed()\n\n if (!this.accordion.multi()) {\n this.accordion.closeAll()\n }\n this.setCollapsed(collapsed)\n }\n }\n\n open() {\n this.setCollapsed(false)\n }\n\n close() {\n this.setCollapsed(true)\n }\n\n /**\n * Opens or closes an enabled item and emits `collapsedChange` when that changes its state.\n */\n setCollapsed(collapsed: boolean) {\n if (!this.disabled() && this.isCollapsed() !== collapsed) {\n this.isCollapsed.set(collapsed)\n this.collapsedChange.emit(collapsed)\n }\n }\n}\n","<ng-content select=\"nb-accordion-item-header\" />\n<ng-content select=\"nb-accordion-item-body\" />\n","import { Directive, TemplateRef, inject } from '@angular/core'\n\n/**\n * An accordion item's content, rendered when the item is first expanded and then kept:\n * `<ng-template nbAccordionItemBodyContent>` in an `nb-accordion-item-body`.\n */\n@Directive({ selector: '[nbAccordionItemBodyContent]' })\nexport class NbAccordionItemBodyContentDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef)\n}\n","import {\n afterRenderEffect,\n Component,\n computed,\n contentChild,\n ElementRef,\n inject,\n linkedSignal,\n viewChild\n} from '@angular/core'\nimport { NgTemplateOutlet } from '@angular/common'\n\nimport { ɵanimateExpand as animateExpand } from '@liquid-js/lyr-core/base'\nimport { NbAccordionItemComponent } from './accordion-item.component'\nimport { NbAccordionItemBodyContentDirective } from './accordion-item-body-content.directive'\n\n/**\n * The content of an `nb-accordion-item`, which slides open and closed. Content in an `nbAccordionItemBodyContent`\n * template is created when the item is first expanded, and kept from then on.\n */\n@Component({\n selector: 'nb-accordion-item-body',\n templateUrl: './accordion-item-body.component.html',\n styleUrls: ['./accordion-item-body.component.scss'],\n imports: [NgTemplateOutlet]\n})\nexport class NbAccordionItemBodyComponent {\n private readonly accordionItem = inject(NbAccordionItemComponent, { host: true })\n private readonly container = viewChild.required<ElementRef<HTMLElement>>('container')\n\n readonly contentDirective = contentChild(NbAccordionItemBodyContentDirective)\n\n readonly state = computed(() => (this.accordionItem.isCollapsed() ? 'collapsed' : 'expanded'))\n\n /** Whether the `nbAccordionItemBodyContent` is rendered: since the item was first expanded. */\n readonly init = linkedSignal<boolean, boolean>({\n source: () => this.state() === 'expanded',\n computation: (expanded, previous) => expanded || !!previous?.value\n })\n\n constructor() {\n // The body opens and closes from the height it shows; it renders in its first state without animating. Opening and\n // closing follow the same curve, so as one item opens while another of the same height closes, they even out and\n // the items below stay put.\n let previous: string | undefined\n afterRenderEffect(() => {\n const state = this.state()\n if (previous !== undefined && state !== previous) {\n animateExpand(\n this.container().nativeElement,\n state === 'expanded',\n { easing: 'ease-in-out' },\n { visibility: 'visible' }\n )\n }\n previous = state\n })\n }\n}\n","<div #container\n class=\"item-body-container\"\n [class.collapsed]=\"state() === 'collapsed'\">\n <div class=\"item-body\">\n <!-- nbAccordionItemBodyContent is lazy: it's created when the item is first expanded and then kept. -->\n @if (contentDirective(); as content) {\n @if (init()) {\n <ng-container [ngTemplateOutlet]=\"content.templateRef\" />\n }\n } @else {\n <ng-content />\n }\n </div>\n</div>\n","import { Component, computed, inject } from '@angular/core'\nimport { NbIconComponent } from '@liquid-js/lyr-core/icon'\nimport { NbAccordionItemComponent } from './accordion-item.component'\n\n/**\n * The header of an `nb-accordion-item`: a button that toggles the item with a click, Space or Enter, and shows a\n * chevron unless the item is disabled.\n */\n@Component({\n selector: 'nb-accordion-item-header',\n styleUrls: ['./accordion-item-header.component.scss'],\n templateUrl: './accordion-item-header.component.html',\n imports: [NbIconComponent],\n host: {\n 'role': 'button',\n '[class.accordion-item-header-collapsed]': 'isCollapsed()',\n '[class.accordion-item-header-expanded]': 'expanded()',\n '[attr.aria-expanded]': 'expanded()',\n // A disabled header is skipped by Tab.\n '[attr.tabindex]': 'tabbable()',\n '[attr.aria-disabled]': 'disabled()',\n '(click)': 'toggle()',\n // As a button's: Space doesn't scroll the page.\n '(keydown.space)': '$event.preventDefault(); toggle()',\n '(keydown.enter)': '$event.preventDefault(); toggle()'\n }\n})\nexport class NbAccordionItemHeaderComponent {\n private readonly accordionItem = inject(NbAccordionItemComponent, { host: true })\n\n readonly isCollapsed = computed(() => this.accordionItem.isCollapsed())\n\n readonly expanded = computed(() => !this.accordionItem.isCollapsed())\n\n readonly tabbable = computed(() => (this.accordionItem.disabled() ? '-1' : '0'))\n\n readonly disabled = computed(() => this.accordionItem.disabled())\n\n readonly state = computed(() => (this.isCollapsed() ? 'collapsed' : 'expanded'))\n\n toggle() {\n this.accordionItem.toggle()\n }\n}\n","<ng-content select=\"nb-accordion-item-title\" />\n<ng-content select=\"nb-accordion-item-description\" />\n<ng-content />\n@if (!disabled()) {\n<nb-icon icon=\"chevron-down-outline\"\n pack=\"essentials\"\n class=\"expansion-indicator\" />\n}\n","import { NgModule } from '@angular/core'\n\nimport { NbIconModule } from '@liquid-js/lyr-core/icon'\nimport { NbAccordionComponent } from './accordion.component'\nimport { NbAccordionItemComponent } from './accordion-item.component'\nimport { NbAccordionItemHeaderComponent } from './accordion-item-header.component'\nimport { NbAccordionItemBodyComponent } from './accordion-item-body.component'\nimport { NbAccordionItemBodyContentDirective } from './accordion-item-body-content.directive'\n\nconst NB_ACCORDION_COMPONENTS = [\n NbAccordionComponent,\n NbAccordionItemComponent,\n NbAccordionItemHeaderComponent,\n NbAccordionItemBodyComponent,\n NbAccordionItemBodyContentDirective\n]\n\n@NgModule({\n imports: [NbIconModule, ...NB_ACCORDION_COMPONENTS],\n exports: [...NB_ACCORDION_COMPONENTS],\n providers: []\n})\nexport class NbAccordionModule {}\n"],"mappings":";;;;;AAwGA,IAAa,uBAAb,MAAa,qBAAoB;CATjC,cAAA;EAUuB,KAAA,wBAAQ,IAAI,IAAG;EAEf,KAAA,aAAa,iBAAiB,WAAW;EAKnD,KAAA,kBAAkB,MAAyC,QAAS;GAAA,GAAA,YAAA,EAAA,WAAA,kBAAA,+BAAA,CAAA;GAAI,OAAO;EAAY,CAAA;EAE3F,KAAA,aAAa,mBACZ,KAAK,gBAAe,KAAM,KAAK,WAAU,CAAE,CAAC,cAAc,WACnE,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAKQ,KAAA,QAAQ,MAA+B,OAAK;GAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;GAAI,WAAWA;EAAqB,CAAA;CAyB5F;CApBG,UAAO;EACH,IAAI,KAAK,MAAK,GACV,KAAK,MAAM,SAAS,SAAS,KAAK,aAAa,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SAAA;GAAA,UAAA;GAAA,MAAA;GAAiB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAjB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAiB,SAAA;IAJhB;IARV;IACA;IACA;IACA;IACA;GAAmC;GAAA,SAAA;IAJnC;IACA;IACA;IACA;IACA;GAAmC;EAAA,CAAA;CAAA;CAQ1B;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAiB,SAAA,CAJhB,cANV,8BAA8B;EAAA,CAAA;CAAA;;AAUrB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiB,YAAA,CAAA;EAL7B,MAAA;EAAS,MAAA,CAAA;GACN,SAAS,CAAC,cAAc,GAAG,uBAAuB;GAClD,SAAS,CAAC,GAAG,uBAAuB;GACpC,WAAW,CAAA;EACd,CAAA"}
|
|
1
|
+
{"version":3,"file":"liquid-js-lyr-core-accordion.mjs","names":["convertToBoolProperty","convertToBoolProperty","animateExpand"],"sources":["../../../packages/core/src/components/accordion/accordion.component.ts","../../../packages/core/src/components/accordion/accordion-item.component.ts","../../../packages/core/src/components/accordion/accordion-item.component.html","../../../packages/core/src/components/accordion/accordion-item-body-content.directive.ts","../../../packages/core/src/components/accordion/accordion-item-body.component.ts","../../../packages/core/src/components/accordion/accordion-item-body.component.html","../../../packages/core/src/components/accordion/accordion-item-header.component.ts","../../../packages/core/src/components/accordion/accordion-item-header.component.html","../../../packages/core/src/components/accordion/accordion.module.ts"],"sourcesContent":["import { Component, input, linkedSignal } from '@angular/core'\nimport { injectNbDefaults, NbContainerAppearance, ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\n\n/**\n * What the accordion needs from its items, which register themselves.\n */\nexport interface NbAccordionItem {\n setCollapsed(collapsed: boolean): void\n}\n\n/**\n * An accordion allows to toggle the display of sections of content\n *\n * Basic example\n *\n * @stacked-example(Showcase, accordion/accordion-showcase.component)\n *\n * ```ts\n * <nb-accordion>\n * <nb-accordion-item>\n * <nb-accordion-item-header>Product Details</nb-accordion-item-header>\n * <nb-accordion-item-body>\n * Item Content\n * </nb-accordion-item-body>\n * </nb-accordion-item>\n * </nb-accordion>\n * ```\n * ### Installation\n *\n * Import `NbAccordionComponent`, `NbAccordionItemComponent`, `NbAccordionItemHeaderComponent`, `NbAccordionItemBodyComponent` into your standalone component:\n * ```ts\n * @Component({\n * imports: [NbAccordionComponent, NbAccordionItemComponent, NbAccordionItemHeaderComponent, NbAccordionItemBodyComponent],\n * })\n * export class PageComponent { }\n * ```\n *\n * With NgModules:\n *\n * Import `NbAccordionModule` to your feature module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbAccordionModule,\n * ],\n * })\n * export class PageModule { }\n * ```\n * ### Usage\n *\n * With `multi` mode accordion can have multiple items expanded:\n * @stacked-example(Multiple expanded items, accordion/accordion-multi.component)\n *\n * `NbAccordionItemComponent` has several methods, for example it is possible to trigger item click/toggle:\n * @stacked-example(Expand API, accordion/accordion-toggle.component)\n *\n * An item's content is created with the accordion. Content in an `nbAccordionItemBodyContent` template is created\n * when the item is first expanded, and kept from then on:\n * ```html\n * <nb-accordion-item>\n * <nb-accordion-item-header>Settings</nb-accordion-item-header>\n * <nb-accordion-item-body>\n * <some-component *nbAccordionItemBodyContent />\n * </nb-accordion-item-body>\n * </nb-accordion-item>\n * ```\n * @styles\n *\n * accordion-border-width:\n * accordion-border-style:\n * accordion-border-color:\n * accordion-border-radius:\n * accordion-padding:\n * accordion-shadow:\n * accordion-floating-shadow:\n * accordion-header-text-color:\n * accordion-header-text-font-family:\n * accordion-header-text-font-size:\n * accordion-header-text-font-weight:\n * accordion-header-text-line-height:\n * accordion-header-disabled-text-color:\n * accordion-header-border-color:\n * accordion-header-border-style:\n * accordion-header-border-width:\n * accordion-header-hover-background-color:\n * accordion-header-outline-width:\n * accordion-header-outline-color:\n * accordion-item-background-color:\n * accordion-item-text-color:\n * accordion-item-text-font-family:\n * accordion-item-text-font-size:\n * accordion-item-text-font-weight:\n * accordion-item-text-line-height:\n */\n@Component({\n selector: 'nb-accordion',\n template: `\n <ng-content select=\"nb-accordion-item\" />\n `,\n host: {\n '[class]': '\"appearance-\" + appearance()'\n }\n})\nexport class NbAccordionComponent {\n protected readonly items = new Set<NbAccordionItem>()\n // The app's defaults for accordions, which the appearance starts from.\n protected readonly nbDefaults = injectNbDefaults('accordion')\n\n /**\n * Accordion appearance: `outline`, a card's border, or `floating`, a shadow instead, over the page.\n */\n readonly appearanceInput = input<NbContainerAppearance | undefined>(undefined, { alias: 'appearance' })\n /** The appearance in use: the input's, the app's default, or 'outline'. */\n readonly appearance = linkedSignal<NbContainerAppearance>(\n () => this.appearanceInput() ?? this.nbDefaults().appearance ?? 'outline'\n )\n\n /**\n * Allows several items to be expanded at once; otherwise opening an item closes the others.\n */\n readonly multi = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Opens all enabled items; does nothing outside `multi` mode.\n */\n openAll() {\n if (this.multi()) {\n this.items.forEach((item) => item.setCollapsed(false))\n }\n }\n\n /**\n * Closes all enabled items.\n */\n closeAll() {\n this.items.forEach((item) => item.setCollapsed(true))\n }\n\n /**\n * @docs-private\n */\n register(item: NbAccordionItem): () => void {\n this.items.add(item)\n return () => this.items.delete(item)\n }\n}\n","import { Component, computed, DestroyRef, inject, input, linkedSignal, output } from '@angular/core'\n\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput } from '@liquid-js/lyr-core/base'\nimport { NbAccordionComponent, NbAccordionItem } from './accordion.component'\n\n/**\n * A section of an `nb-accordion`, with an `nb-accordion-item-header` and an `nb-accordion-item-body`.\n */\n@Component({\n selector: 'nb-accordion-item',\n styleUrls: ['./accordion-item.component.scss'],\n templateUrl: './accordion-item.component.html',\n host: {\n '[class.collapsed]': 'isCollapsed()',\n '[class.expanded]': 'isExpanded()',\n '[class.disabled]': 'disabled()'\n }\n})\nexport class NbAccordionItemComponent implements NbAccordionItem {\n private readonly accordion = inject(NbAccordionComponent, { host: true })\n\n /**\n * Whether the item is collapsed (`true` by default); `expanded` wins over it.\n */\n readonly collapsed = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * Expands the item, whatever `collapsed` says.\n */\n readonly expanded = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Item is disabled and cannot be opened.\n */\n readonly disabled = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Emits when a user or the accordion opens or closes the item.\n */\n readonly collapsedChange = output<boolean>()\n\n /**\n * Whether the item is collapsed: the `collapsed` and `expanded` inputs, until the item is toggled.\n */\n readonly isCollapsed = linkedSignal(() => this.collapsed() && !this.expanded())\n\n readonly isExpanded = computed(() => !this.isCollapsed())\n\n constructor() {\n inject(DestroyRef).onDestroy(this.accordion.register(this))\n }\n\n /**\n * Toggles an enabled item; outside `multi` mode it closes the other items first.\n */\n toggle() {\n if (!this.disabled()) {\n const collapsed = !this.isCollapsed()\n\n if (!this.accordion.multi()) {\n this.accordion.closeAll()\n }\n this.setCollapsed(collapsed)\n }\n }\n\n open() {\n this.setCollapsed(false)\n }\n\n close() {\n this.setCollapsed(true)\n }\n\n /**\n * Opens or closes an enabled item and emits `collapsedChange` when that changes its state.\n */\n setCollapsed(collapsed: boolean) {\n if (!this.disabled() && this.isCollapsed() !== collapsed) {\n this.isCollapsed.set(collapsed)\n this.collapsedChange.emit(collapsed)\n }\n }\n}\n","<ng-content select=\"nb-accordion-item-header\" />\n<ng-content select=\"nb-accordion-item-body\" />\n","import { Directive, TemplateRef, inject } from '@angular/core'\n\n/**\n * An accordion item's content, rendered when the item is first expanded and then kept:\n * `<ng-template nbAccordionItemBodyContent>` in an `nb-accordion-item-body`.\n */\n@Directive({ selector: '[nbAccordionItemBodyContent]' })\nexport class NbAccordionItemBodyContentDirective {\n readonly templateRef = inject<TemplateRef<unknown>>(TemplateRef)\n}\n","import {\n afterRenderEffect,\n Component,\n computed,\n contentChild,\n ElementRef,\n inject,\n linkedSignal,\n viewChild\n} from '@angular/core'\nimport { NgTemplateOutlet } from '@angular/common'\n\nimport { ɵanimateExpand as animateExpand } from '@liquid-js/lyr-core/base'\nimport { NbAccordionItemComponent } from './accordion-item.component'\nimport { NbAccordionItemBodyContentDirective } from './accordion-item-body-content.directive'\n\n/**\n * The content of an `nb-accordion-item`, which slides open and closed. Content in an `nbAccordionItemBodyContent`\n * template is created when the item is first expanded, and kept from then on.\n */\n@Component({\n selector: 'nb-accordion-item-body',\n templateUrl: './accordion-item-body.component.html',\n styleUrls: ['./accordion-item-body.component.scss'],\n imports: [NgTemplateOutlet]\n})\nexport class NbAccordionItemBodyComponent {\n private readonly accordionItem = inject(NbAccordionItemComponent, { host: true })\n private readonly container = viewChild.required<ElementRef<HTMLElement>>('container')\n\n readonly contentDirective = contentChild(NbAccordionItemBodyContentDirective)\n\n readonly state = computed(() => (this.accordionItem.isCollapsed() ? 'collapsed' : 'expanded'))\n\n /** Whether the `nbAccordionItemBodyContent` is rendered: since the item was first expanded. */\n readonly init = linkedSignal<boolean, boolean>({\n source: () => this.state() === 'expanded',\n computation: (expanded, previous) => expanded || !!previous?.value\n })\n\n constructor() {\n // The body opens and closes from the height it shows; it renders in its first state without animating. Opening and\n // closing follow the same curve, so as one item opens while another of the same height closes, they even out and\n // the items below stay put.\n let previous: string | undefined\n afterRenderEffect(() => {\n const state = this.state()\n if (previous !== undefined && state !== previous) {\n animateExpand(\n this.container().nativeElement,\n state === 'expanded',\n { easing: 'ease-in-out' },\n { visibility: 'visible', overflow: 'hidden' }\n )\n }\n previous = state\n })\n }\n}\n","<div #container\n class=\"item-body-container\"\n [class.collapsed]=\"state() === 'collapsed'\">\n <div class=\"item-body\">\n <!-- nbAccordionItemBodyContent is lazy: it's created when the item is first expanded and then kept. -->\n @if (contentDirective(); as content) {\n @if (init()) {\n <ng-container [ngTemplateOutlet]=\"content.templateRef\" />\n }\n } @else {\n <ng-content />\n }\n </div>\n</div>\n","import { Component, computed, inject } from '@angular/core'\nimport { NbIconComponent } from '@liquid-js/lyr-core/icon'\nimport { NbAccordionItemComponent } from './accordion-item.component'\n\n/**\n * The header of an `nb-accordion-item`: a button that toggles the item with a click, Space or Enter, and shows a\n * chevron unless the item is disabled.\n */\n@Component({\n selector: 'nb-accordion-item-header',\n styleUrls: ['./accordion-item-header.component.scss'],\n templateUrl: './accordion-item-header.component.html',\n imports: [NbIconComponent],\n host: {\n 'role': 'button',\n '[class.accordion-item-header-collapsed]': 'isCollapsed()',\n '[class.accordion-item-header-expanded]': 'expanded()',\n '[attr.aria-expanded]': 'expanded()',\n // A disabled header is skipped by Tab.\n '[attr.tabindex]': 'tabbable()',\n '[attr.aria-disabled]': 'disabled()',\n '(click)': 'toggle()',\n // As a button's: Space doesn't scroll the page.\n '(keydown.space)': '$event.preventDefault(); toggle()',\n '(keydown.enter)': '$event.preventDefault(); toggle()'\n }\n})\nexport class NbAccordionItemHeaderComponent {\n private readonly accordionItem = inject(NbAccordionItemComponent, { host: true })\n\n readonly isCollapsed = computed(() => this.accordionItem.isCollapsed())\n\n readonly expanded = computed(() => !this.accordionItem.isCollapsed())\n\n readonly tabbable = computed(() => (this.accordionItem.disabled() ? '-1' : '0'))\n\n readonly disabled = computed(() => this.accordionItem.disabled())\n\n readonly state = computed(() => (this.isCollapsed() ? 'collapsed' : 'expanded'))\n\n toggle() {\n this.accordionItem.toggle()\n }\n}\n","<ng-content select=\"nb-accordion-item-title\" />\n<ng-content select=\"nb-accordion-item-description\" />\n<ng-content />\n@if (!disabled()) {\n<nb-icon icon=\"chevron-down-outline\"\n pack=\"essentials\"\n class=\"expansion-indicator\" />\n}\n","import { NgModule } from '@angular/core'\n\nimport { NbIconModule } from '@liquid-js/lyr-core/icon'\nimport { NbAccordionComponent } from './accordion.component'\nimport { NbAccordionItemComponent } from './accordion-item.component'\nimport { NbAccordionItemHeaderComponent } from './accordion-item-header.component'\nimport { NbAccordionItemBodyComponent } from './accordion-item-body.component'\nimport { NbAccordionItemBodyContentDirective } from './accordion-item-body-content.directive'\n\nconst NB_ACCORDION_COMPONENTS = [\n NbAccordionComponent,\n NbAccordionItemComponent,\n NbAccordionItemHeaderComponent,\n NbAccordionItemBodyComponent,\n NbAccordionItemBodyContentDirective\n]\n\n@NgModule({\n imports: [NbIconModule, ...NB_ACCORDION_COMPONENTS],\n exports: [...NB_ACCORDION_COMPONENTS],\n providers: []\n})\nexport class NbAccordionModule {}\n"],"mappings":";;;;;AAwGA,IAAa,uBAAb,MAAa,qBAAoB;CATjC,cAAA;EAUuB,KAAA,wBAAQ,IAAI,IAAG;EAEf,KAAA,aAAa,iBAAiB,WAAW;EAKnD,KAAA,kBAAkB,MAAyC,QAAS;GAAA,GAAA,YAAA,EAAA,WAAA,kBAAA,+BAAA,CAAA;GAAI,OAAO;EAAY,CAAA;EAE3F,KAAA,aAAa,mBACZ,KAAK,gBAAe,KAAM,KAAK,WAAU,CAAE,CAAC,cAAc,WACnE,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAKQ,KAAA,QAAQ,MAA+B,OAAK;GAAA,GAAA,YAAA,EAAA,WAAA,QAAA,+BAAA,CAAA;GAAI,WAAWA;EAAqB,CAAA;CAyB5F;CApBG,UAAO;EACH,IAAI,KAAK,MAAK,GACV,KAAK,MAAM,SAAS,SAAS,KAAK,aAAa,KAAK,CAAC;CAE7D;CAKA,WAAQ;EACJ,KAAK,MAAM,SAAS,SAAS,KAAK,aAAa,IAAI,CAAC;CACxD;CAKA,SAAS,MAAqB;EAC1B,KAAK,MAAM,IAAI,IAAI;EACnB,aAAa,KAAK,MAAM,OAAO,IAAI;CACvC;CAzCS;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAA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AAA;IAJnC;IACA;IACA;IACA;IACA;GAAmC;EAAA,CAAA;CAAA;CAQ1B;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAiB,SAAA,CAJhB,cANV,8BAA8B;EAAA,CAAA;CAAA;;AAUrB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAiB,YAAA,CAAA;EAL7B,MAAA;EAAS,MAAA,CAAA;GACN,SAAS,CAAC,cAAc,GAAG,uBAAuB;GAClD,SAAS,CAAC,GAAG,uBAAuB;GACpC,WAAW,CAAA;EACd,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"liquid-js-lyr-core-menu.mjs","names":["convertToBoolProperty","animateExpand"],"sources":["../../../packages/core/src/components/menu/url-matching-helpers.ts","../../../packages/core/src/components/menu/menu.service.ts","../../../packages/core/src/components/menu/menu-parent.ts","../../../packages/core/src/components/menu/menu.component.ts","../../../packages/core/src/components/menu/menu-item.component.html","../../../packages/core/src/components/menu/menu.component.html","../../../packages/core/src/components/menu/menu.module.ts"],"sourcesContent":["export function isUrlPathEqual(path: string, link?: string) {\n // Location.path() reports the root as '' while menu links use '/'; trailing slashes don't change the page.\n if (link === undefined) {\n return false\n }\n const withoutTrailingSlash = (url: string) => url.replace(/\\/+$/, '')\n return withoutTrailingSlash(link) === withoutTrailingSlash(getPathPartOfUrl(path))\n}\n\nexport function isUrlPathContain(path: string, link?: string) {\n if (link === undefined) {\n return false\n }\n const locationPath = getPathPartOfUrl(path)\n const endOfUrlSegmentRegExp = /\\/|^$/\n return locationPath.startsWith(link) &&\n locationPath.slice(link.length).charAt(0).search(endOfUrlSegmentRegExp) !== -1\n}\n\nexport function getPathPartOfUrl(url: string): string {\n return url.match(/.*?(?=[?;#]|$)/)?.[0] ?? ''\n}\n\nexport function getFragmentPartOfUrl(url: string): string {\n const matched = url.match(/#(.+)/)\n return matched ? matched[1] : ''\n}\n\nexport function isFragmentEqual(path: string, fragment: string): boolean {\n return getFragmentPartOfUrl(path) === fragment\n}\n\nexport function isFragmentContain(path: string, fragment: string): boolean {\n return getFragmentPartOfUrl(path).includes(fragment)\n}\n\n/**\n * Checks that the URL has the query params of a menu item: all of them (`exact` false), or only them (`exact` true).\n * Values are compared as strings, an array value as a repeated param.\n */\nexport function isQueryParamsMatch(url: string, queryParams: Record<string, unknown>, exact = false): boolean {\n const actual = new URLSearchParams(url.match(/\\?([^#]*)/)?.[1] ?? '')\n const expected = Object.entries(queryParams).filter(([, value]) => value != null)\n\n const hasAll = expected.every(([key, value]) => {\n const values = (Array.isArray(value) ? value : [value]).map(String)\n const actualValues = actual.getAll(key)\n return values.length === actualValues.length && values.every((v, i) => v === actualValues[i])\n })\n return hasAll && (!exact || new Set(actual.keys()).size === expected.length)\n}\n","import { inject, Service } from '@angular/core'\nimport { Location } from '@angular/common'\nimport { Params, QueryParamsHandling } from '@angular/router'\nimport { Observable, BehaviorSubject, ReplaySubject, Subject } from 'rxjs'\nimport { share } from 'rxjs/operators'\nimport { NbIconConfig } from '@liquid-js/lyr-core/icon'\nimport { NbBadge } from '@liquid-js/lyr-core/badge'\nimport {\n isFragmentContain,\n isFragmentEqual,\n isQueryParamsMatch,\n isUrlPathContain,\n isUrlPathEqual\n} from './url-matching-helpers'\n\nexport interface NbMenuBag {\n tag?: string\n item: NbMenuItem\n}\n\n/**\n * Delivers menu service commands to the menus with a matching tag (or to all menus for a command without a tag).\n * A command sent while no such menu exists waits for the first one, and is delivered only once,\n * so a menu created later doesn't get the commands meant for an earlier one.\n * */\nclass NbMenuCommands<T extends { tag?: string }> {\n protected readonly listeners = new Set<{ tag?: string, next: (command: T) => void }>()\n protected pending = new Array<T>()\n\n send(command: T) {\n const listeners = Array.from(this.listeners).filter((listener) => this.matches(command, listener.tag))\n if (listeners.length) {\n listeners.forEach((listener) => listener.next(command))\n } else {\n this.pending.push(command)\n }\n }\n\n listen(tag?: string): Observable<T> {\n return new Observable<T>((subscriber) => {\n const listener = { tag, next: (command: T) => subscriber.next(command) }\n this.listeners.add(listener)\n\n const ready = this.pending.filter((command) => this.matches(command, tag))\n this.pending = this.pending.filter((command) => !ready.includes(command))\n ready.forEach(listener.next)\n\n return () => this.listeners.delete(listener)\n })\n }\n\n protected matches(command: T, tag?: string): boolean {\n return !command.tag || command.tag === tag\n }\n}\n\nconst itemClick$ = new Subject<NbMenuBag>()\nconst addItems$ = new NbMenuCommands<{ tag?: string, items: NbMenuItem[] }>()\nconst navigateHome$ = new NbMenuCommands<{ tag?: string }>()\nconst getSelectedItem$ = new NbMenuCommands<{\n tag?: string\n listener: BehaviorSubject<{ tag?: string, item?: NbMenuItem } | undefined>\n}>()\nconst itemSelect$ = new ReplaySubject<NbMenuBag>(1)\nconst itemHover$ = new ReplaySubject<NbMenuBag>(1)\nconst submenuToggle$ = new ReplaySubject<NbMenuBag>(1)\nconst collapseAll$ = new NbMenuCommands<{ tag?: string }>()\n\nexport type NbMenuBadgeConfig = Omit<NbBadge, 'position'>\n\n/**\n * An item of an `nb-menu`: a router `link`, a plain `url`, an action without either, a `group` heading, or a parent\n * of `children`. The menu sets `parent`, `selected` and `expanded` on it.\n *\n * @stacked-example(Menu Link Parameters, menu/menu-link-params.component)\n */\nexport class NbMenuItem<D = unknown> {\n title = ''\n /**\n * Link for the router (`routerLink`).\n */\n link?: string\n /**\n * Plain `href`, e.g. for a page outside the app.\n */\n url?: string\n /**\n * Icon name, or an icon config.\n */\n icon?: string | NbIconConfig\n /**\n * Whether the submenu is open; the menu updates it as the user opens and closes submenus.\n */\n expanded?: boolean\n /**\n * Whether the submenu opens and closes (`true` by default). With `false` the children always show and the item has\n * no toggle, e.g. the sections of the page it links to. A horizontal menu's dropdowns still open and close.\n */\n collapsible?: boolean\n /**\n * A badge shown after the title.\n */\n badge?: NbMenuBadgeConfig\n /**\n * The items of the submenu.\n */\n children?: Array<NbMenuItem<D>>\n /**\n * The link's `target`; a link that opens elsewhere (e.g. `_blank`) doesn't take the selection.\n */\n target?: string\n /**\n * Leaves the item out of the menu; a parent whose children are all hidden shows as a plain item.\n */\n hidden?: boolean\n /**\n * How the URL must match `link` for the item to be selected: wholly (`full`, the default), or as a prefix ending\n * at a path segment (`prefix`). `queryParams` and `fragment` are matched the same way.\n */\n pathMatch?: 'full' | 'prefix' = 'full'\n /**\n * The item `NbMenuService.navigateHome()` goes to.\n */\n home?: boolean\n /**\n * A heading rather than a link: shown as plain text.\n */\n group?: boolean\n /** The `routerLink`'s `skipLocationChange`. */\n skipLocationChange?: boolean\n /** Query params of the `routerLink`; they also tell items with the same `link` apart when selecting from the URL. */\n queryParams?: Params\n queryParamsHandling?: QueryParamsHandling\n parent?: NbMenuItem<D>\n selected?: boolean\n /** The app's own data of the item. */\n data?: D\n fragment?: string\n preserveFragment?: boolean\n /** ARIA role of the link; an item with neither `link` nor `url` is a `button` by default. */\n ariaRole?: string\n\n /**\n * The item's parents, from the top down.\n */\n static getParents<D>(item: NbMenuItem<D>): Array<NbMenuItem<D>> {\n const parents = new Array<NbMenuItem<D>>()\n\n let parent = item.parent\n while (parent) {\n parents.unshift(parent)\n parent = parent.parent\n }\n\n return parents\n }\n\n static isParent<D>(item: NbMenuItem<D>, possibleChild: NbMenuItem<D>): boolean {\n return possibleChild.parent ? possibleChild.parent === item || this.isParent(item, possibleChild.parent) : false\n }\n}\n\n/**\n * Listens to menu events and sends commands to menus. A `tag` addresses the menu with that tag; without one, a command\n * goes to every menu. Events carry the tag of the menu they come from.\n *\n * @stacked-example(Menu Service, menu/menu-service.component)\n */\n@Service()\nexport class NbMenuService {\n /**\n * Adds items to the end of the menu. A command sent before the menu exists waits for it.\n */\n addItems(items: NbMenuItem[], tag?: string) {\n addItems$.send({ tag, items })\n }\n\n /**\n * Closes all submenus.\n */\n collapseAll(tag?: string) {\n collapseAll$.send({ tag })\n }\n\n /**\n * Goes to the item marked `home`.\n */\n navigateHome(tag?: string) {\n navigateHome$.send({ tag })\n }\n\n /**\n * The selected item as it is now, not followed afterwards: the observable emits `undefined` until the menu answers,\n * then once with the item (or none).\n */\n getSelectedItem(tag?: string): Observable<{ tag?: string, item?: NbMenuItem } | undefined> {\n const listener = new BehaviorSubject<{ tag?: string, item?: NbMenuItem } | undefined>(\n undefined\n )\n\n getSelectedItem$.send({ tag, listener })\n\n return listener.asObservable()\n }\n\n onItemClick(): Observable<NbMenuBag> {\n return itemClick$.pipe(share())\n }\n\n onItemSelect(): Observable<NbMenuBag> {\n return itemSelect$.pipe(share())\n }\n\n onItemHover(): Observable<NbMenuBag> {\n return itemHover$.pipe(share())\n }\n\n onSubmenuToggle(): Observable<NbMenuBag> {\n return submenuToggle$.pipe(share())\n }\n}\n\n@Service()\nexport class NbMenuInternalService {\n private readonly location = inject(Location)\n\n prepareItems(items: NbMenuItem[]) {\n const defaultItem = new NbMenuItem()\n items.forEach((i) => {\n this.applyDefaults(i, defaultItem)\n this.setParent(i)\n })\n }\n\n /**\n * Selects the item matching the current URL. With `resetIfNoMatch`, a URL that matches no item clears the selection,\n * so the item of the previous page doesn't stay selected.\n */\n selectFromUrl(items: NbMenuItem[], tag?: string, collapseOther: boolean = false, resetIfNoMatch: boolean = false) {\n const selectedItem = this.findItemByUrl(items)\n if (selectedItem) {\n this.selectItem(selectedItem, items, collapseOther, tag)\n } else if (resetIfNoMatch) {\n this.resetSelection(items)\n }\n }\n\n selectItem(item: NbMenuItem, items: NbMenuItem[], collapseOther: boolean = false, tag?: string) {\n const unselectedItems = this.resetSelection(items)\n const collapsedItems = collapseOther ? this.collapseItems(items) : []\n\n for (const parent of NbMenuItem.getParents(item)) {\n parent.selected = true\n // emit event only for items that weren't selected before ('unselectedItems' contains items that were selected)\n if (!unselectedItems.includes(parent)) {\n this.itemSelect(parent, tag)\n }\n\n const wasNotExpanded = !parent.expanded\n parent.expanded = true\n const i = collapsedItems.indexOf(parent)\n // emit event only for items that weren't expanded before.\n // 'collapsedItems' contains items that were expanded, so no need to emit event.\n // in case 'collapseOther' is false, 'collapsedItems' will be empty,\n // so also check if item isn't expanded already ('wasNotExpanded').\n if (i === -1 && wasNotExpanded) {\n this.submenuToggle(parent, tag)\n } else {\n collapsedItems.splice(i, 1)\n }\n }\n\n item.selected = true\n // emit event only for items that weren't selected before ('unselectedItems' contains items that were selected)\n if (!unselectedItems.includes(item)) {\n this.itemSelect(item, tag)\n }\n\n // remaining items which wasn't expanded back after expanding all currently selected items\n for (const collapsedItem of collapsedItems) {\n this.submenuToggle(collapsedItem, tag)\n }\n }\n\n collapseAll(items: NbMenuItem[], tag?: string, except?: NbMenuItem) {\n const collapsedItems = this.collapseItems(items, except)\n\n for (const item of collapsedItems) {\n this.submenuToggle(item, tag)\n }\n }\n\n onAddItem(tag?: string): Observable<{ tag?: string, items: NbMenuItem[] }> {\n return addItems$.listen(tag)\n }\n\n onNavigateHome(tag?: string): Observable<{ tag?: string }> {\n return navigateHome$.listen(tag)\n }\n\n onCollapseAll(tag?: string): Observable<{ tag?: string }> {\n return collapseAll$.listen(tag)\n }\n\n onGetSelectedItem(tag?: string): Observable<{\n tag?: string\n listener: BehaviorSubject<{ tag?: string, item?: NbMenuItem } | undefined>\n }> {\n return getSelectedItem$.listen(tag)\n }\n\n itemHover(item: NbMenuItem, tag?: string) {\n itemHover$.next({ tag, item })\n }\n\n submenuToggle(item: NbMenuItem, tag?: string) {\n submenuToggle$.next({ tag, item })\n }\n\n itemSelect(item: NbMenuItem, tag?: string) {\n itemSelect$.next({ tag, item })\n }\n\n itemClick(item: NbMenuItem, tag?: string) {\n itemClick$.next({ tag, item })\n }\n\n /**\n * Unselects the items and their children, and returns the ones that were selected.\n */\n private resetSelection(items: NbMenuItem[]): NbMenuItem[] {\n const unselectedItems = new Array<NbMenuItem>()\n\n for (const item of items) {\n if (item.selected) {\n unselectedItems.push(item)\n }\n item.selected = false\n\n if (item.children) {\n unselectedItems.push(...this.resetSelection(item.children))\n }\n }\n\n return unselectedItems\n }\n\n /**\n * Collapses the items and their children, and returns the ones that were expanded. `except` and its parents stay\n * as they are.\n */\n private collapseItems(items: NbMenuItem[], except?: NbMenuItem): NbMenuItem[] {\n const collapsedItems = new Array<NbMenuItem>()\n\n for (const item of items) {\n if (item === except) {\n continue\n }\n if (except && NbMenuItem.isParent(item, except)) {\n // Keep the path to `except` open, but collapse its siblings further down.\n collapsedItems.push(...this.collapseItems(item.children ?? [], except))\n continue\n }\n\n if (item.expanded) {\n collapsedItems.push(item)\n }\n item.expanded = false\n\n if (item.children) {\n collapsedItems.push(...this.collapseItems(item.children))\n }\n }\n\n return collapsedItems\n }\n\n private applyDefaults(item: NbMenuItem, defaultItem: NbMenuItem) {\n const menuItem = { ...item }\n Object.assign(item, defaultItem, menuItem)\n item.children &&\n item.children.forEach((child) => {\n this.applyDefaults(child, defaultItem)\n })\n }\n\n private setParent(item: NbMenuItem) {\n item.children &&\n item.children.forEach((child) => {\n child.parent = item\n this.setParent(child)\n })\n }\n\n /**\n * The deepest item matching the current URL, children before their parent.\n */\n private findItemByUrl(items: NbMenuItem[]): NbMenuItem | undefined {\n let selectedItem: NbMenuItem | undefined\n\n items.some((item) => {\n if (item.children) {\n selectedItem = this.findItemByUrl(item.children)\n }\n if (!selectedItem && this.isSelectedInUrl(item)) {\n selectedItem = item\n }\n\n return selectedItem\n })\n\n return selectedItem\n }\n\n private isSelectedInUrl(item: NbMenuItem): boolean {\n const exact: boolean = item.pathMatch === 'full'\n const link = item.link\n\n let isSelectedInPath = exact\n ? isUrlPathEqual(this.location.path(), link)\n : isUrlPathContain(this.location.path(), link)\n\n // Items for the same path tell apart by their query params.\n if (isSelectedInPath && item.queryParams) {\n isSelectedInPath = isQueryParamsMatch(this.location.path(true), item.queryParams, exact)\n }\n\n if (isSelectedInPath && item.fragment != null) {\n return exact\n ? isFragmentEqual(this.location.path(true), item.fragment)\n : isFragmentContain(this.location.path(true), item.fragment)\n }\n\n return isSelectedInPath\n }\n}\n","import { InjectionToken } from '@angular/core'\n\nimport type { NbMenuItem } from './menu.service'\n\n/** A component around a menu that has a say in its submenus opening and closing, e.g. the sidebar. */\nexport interface NbMenuParent {\n /** Called as a submenu is about to open or close, by click or key; `false` keeps it as it is. */\n submenuToggle(item: NbMenuItem): boolean\n}\n\nexport const NB_MENU_PARENT = new InjectionToken<NbMenuParent>('NB_MENU_PARENT')\n","import {\n AfterViewChecked,\n AfterViewInit,\n AnimationCallbackEvent,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n DestroyRef,\n DoCheck,\n ElementRef,\n inject,\n input,\n OnChanges,\n OnInit,\n output,\n PLATFORM_ID,\n SimpleChanges,\n viewChild\n} from '@angular/core'\nimport { NgTemplateOutlet } from '@angular/common'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport { Router, NavigationEnd, NavigationExtras, NavigationSkipped, RouterLink } from '@angular/router'\nimport { filter, map } from 'rxjs/operators'\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput, NB_WINDOW, ɵanimateExpand as animateExpand, NbLayoutDirectionService, injectNbTexts, NbLocalize } from '@liquid-js/lyr-core/base'\nimport { NbIconComponent } from '@liquid-js/lyr-core/icon'\nimport { NbBadgeComponent } from '@liquid-js/lyr-core/badge'\nimport { NbMenuInternalService, NbMenuItem, NbMenuBag, NbMenuService, NbMenuBadgeConfig } from './menu.service'\nimport { NB_MENU_PARENT } from './menu-parent'\n\n/** @internal */\ndeclare const $localize: NbLocalize\n\nexport type NbMenuOrientation = 'vertical' | 'horizontal'\n\nexport enum NbToggleStates {\n Expanded = 'expanded',\n Collapsed = 'collapsed'\n}\n\n@Component({\n selector: '[nbMenuItem]',\n templateUrl: './menu-item.component.html',\n // Menu items are plain objects that apps and the menu service change in place.\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [NbIconComponent, RouterLink, NgTemplateOutlet, NbBadgeComponent]\n})\nexport class NbMenuItemComponent implements DoCheck, AfterViewInit, AfterViewChecked {\n protected readonly menuService = inject(NbMenuService)\n protected readonly directionService = inject(NbLayoutDirectionService)\n protected readonly destroyRef = inject(DestroyRef)\n protected readonly texts = injectNbTexts('menu', () => ({\n submenu: (title: string) => $localize`:@@nb.menu.submenu:${title}:title: submenu`\n }))\n\n readonly menuItem = input.required<NbMenuItem>()\n readonly badge = input<NbMenuBadgeConfig>()\n /** @internal A top-level item of a horizontal menu, whose children open below it. */\n readonly dropdown = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n readonly hoverItem = output<NbMenuItem>()\n readonly toggleSubMenu = output<NbMenuItem>()\n readonly selectItem = output<NbMenuItem>()\n readonly itemClick = output<NbMenuItem>()\n\n // The menu it's in, which says how a selection shows.\n private readonly menu = inject(NbMenuComponent, { optional: true })\n\n toggleState = NbToggleStates.Collapsed\n\n private readonly submenu = viewChild<ElementRef<HTMLElement>>('submenu')\n private rendered?: { submenu: HTMLElement, state: NbToggleStates }\n // Whether the item has rendered, and the submenu it rendered with: one that appears later opens, unlike that one,\n // which Angular reports entering after the item has rendered.\n private itemRendered = false\n private firstSubmenu?: HTMLElement\n\n ngDoCheck() {\n this.toggleState = this.isExpanded() ? NbToggleStates.Expanded : NbToggleStates.Collapsed\n }\n\n // Menu items are plain objects, so the item compares the state its submenu rendered with the one it had; a submenu\n // that only now renders shows its state without animating.\n ngAfterViewChecked() {\n const submenu = this.submenu()?.nativeElement\n if (submenu && this.rendered?.submenu === submenu && this.rendered.state !== this.toggleState) {\n animateExpand(submenu, this.toggleState === NbToggleStates.Expanded, { easing: 'ease-in-out' })\n }\n this.rendered = submenu ? { submenu, state: this.toggleState } : undefined\n }\n\n ngAfterViewInit() {\n this.itemRendered = true\n this.firstSubmenu = this.submenu()?.nativeElement\n this.menuService\n .onSubmenuToggle()\n .pipe(\n filter(({ item }) => item === this.menuItem()),\n map(({ item }: NbMenuBag) => item.expanded || !this.collapsible()),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe((isExpanded) => (this.toggleState = isExpanded ? NbToggleStates.Expanded : NbToggleStates.Collapsed))\n }\n\n onToggleSubMenu(item: NbMenuItem) {\n this.toggleSubMenu.emit(item)\n }\n\n /** A submenu that appears open, as the item gets children, opens. */\n protected submenuEnter(event: AnimationCallbackEvent) {\n const submenu = event.target as HTMLElement\n if (this.itemRendered && submenu !== this.firstSubmenu && submenu.classList.contains('expanded')) {\n animateExpand(submenu, true, { easing: 'ease-in-out' })\n }\n event.animationComplete()\n }\n\n /** A submenu that goes while it shows, as the item loses its children, closes first. */\n protected submenuLeave(event: AnimationCallbackEvent) {\n const submenu = event.target as HTMLElement\n const animation = submenu.classList.contains('expanded')\n ? animateExpand(submenu, false, { easing: 'ease-in-out' })\n : undefined\n if (animation) {\n animation.finished.then(() => event.animationComplete(), () => event.animationComplete())\n } else {\n event.animationComplete()\n }\n }\n\n /** Going to a parent's own page opens its submenu, so its pages show. */\n openSubMenu(item: NbMenuItem) {\n if (!item.expanded) {\n this.toggleSubMenu.emit(item)\n }\n }\n\n onHoverItem(item: NbMenuItem) {\n this.hoverItem.emit(item)\n }\n\n onSelectItem(item: NbMenuItem) {\n this.selectItem.emit(item)\n }\n\n onItemClick(item: NbMenuItem) {\n this.itemClick.emit(item)\n }\n\n /** An item whose children are all hidden renders as a plain item, without an expand toggle. */\n hasVisibleChildren(): boolean {\n return !!this.menuItem().children?.some((child) => !child.hidden)\n }\n\n /** Whether the submenu opens and closes: unless the item says otherwise, and always as a dropdown. */\n collapsible(): boolean {\n return this.dropdown() || this.menuItem().collapsible !== false\n }\n\n /** Whether the item has a toggle for its submenu. */\n hasToggle(): boolean {\n return this.hasVisibleChildren() && this.collapsible()\n }\n\n /** Whether the submenu shows: open, or one that doesn't close. */\n isExpanded(): boolean {\n return !!this.menuItem().expanded || !this.collapsible()\n }\n\n /**\n * Whether the item shows as selected: the selected item, and its parents unless the menu marks only the item; then a\n * parent shows it only while its closed submenu hides the item.\n */\n isActive(): boolean {\n const item = this.menuItem()\n if (!item.selected) {\n return false\n }\n return this.menu?.highlightParents() !== false\n || !this.isExpanded()\n || !item.children?.some((child) => child.selected && !child.hidden)\n }\n\n /**\n * Whether a `url` item opens in the current tab; a link opened elsewhere (for example `target=\"_blank\"`)\n * shouldn't take the selection.\n * */\n opensInPlace(item: NbMenuItem): boolean {\n return !item.target || item.target === '_self'\n }\n\n /**\n * One chevron, which the styles turn: down while the submenu is open, else towards the item's end, or up in a\n * dropdown.\n */\n getExpandStateIcon(): string {\n return 'chevron-down-outline'\n }\n}\n\n/**\n * A navigation menu of `NbMenuItem`s, with submenus of any depth, in a column or in a row.\n *\n * Basic example\n *\n * @stacked-example(Showcase, menu/menu-showcase.component)\n *\n * ```ts\n * // ...\n * items: NbMenuItem[] = [\n * {\n * title: 'Home',\n * link: '/'\n * },\n * {\n * title: 'Dashboard',\n * link: 'dashboard'\n * }\n * ];\n * // ...\n * <nb-menu [items]=\"items\"></nb-menu>\n * ```\n * ### Installation\n *\n * Import `NbMenuComponent` into your standalone component:\n * ```ts\n * @Component({\n * imports: [NbMenuComponent],\n * })\n * export class PageComponent { }\n * ```\n *\n * and add `provideNbMenu()` to the application providers:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideNbMenu()],\n * });\n * ```\n *\n * With NgModules:\n *\n * Import `NbMenuModule.forRoot()` to your app module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbMenuModule.forRoot(),\n * ],\n * })\n * export class AppModule { }\n * ```\n * and `NbMenuModule` to your feature module where the component should be shown:\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbMenuModule,\n * ],\n * })\n * export class PageModule { }\n * ```\n * ### Usage\n *\n * Two-level menu example\n * @stacked-example(Two Levels, menu/menu-children.component)\n *\n * An item with children and a `link` or `url` has its own page: its title goes there and opens its submenu, and a\n * separate button, named \"{title} submenu\", opens and closes the submenu without leaving the page.\n *\n *\n * With `autoCollapse`, opening a submenu closes the others:\n * @stacked-example(Autocollapse Menu, menu/menu-autocollapse.component)\n *\n * The parents of the selected item show as selected too. With `highlightParents` set to `false`, only the item does,\n * and a parent while its closed submenu hides the item. An item with `collapsible: false` always shows its children,\n * without a toggle, e.g. the sections of the page it links to:\n * ```html\n * <nb-menu [items]=\"[{ title: 'Guide', link: '/guide', collapsible: false, children: sections }]\"\n * [highlightParents]=\"false\" />\n * ```\n *\n * An item's `badge` shows an `nb-badge` after its title:\n * @stacked-example(Menu item badge, menu/menu-badge.component)\n *\n * With `orientation=\"horizontal\"` the top-level items are in a row, e.g. in the layout header, and their children\n * open in a dropdown below them. One dropdown is open at a time, and it closes when an item in it is picked, on\n * Escape, and when focus or a click goes elsewhere. Deeper levels expand inside the dropdown.\n * @stacked-example(Horizontal, menu/menu-horizontal.component)\n * @styles\n *\n * menu-background-color:\n * menu-text-color:\n * menu-text-font-family:\n * menu-text-font-size:\n * menu-text-font-weight:\n * menu-text-line-height:\n * menu-group-text-color:\n * menu-item-border-radius:\n * menu-item-padding:\n * menu-item-hover-background-color:\n * menu-item-hover-cursor:\n * menu-item-focus-background-color:\n * menu-item-hover-text-color:\n * menu-item-icon-hover-color:\n * menu-item-active-background-color:\n * menu-item-active-text-color:\n * menu-item-icon-active-color:\n * menu-item-active-indicator-width:\n * menu-item-active-indicator-color:\n * menu-item-icon-color:\n * menu-item-icon-end-margin:\n * menu-item-icon-width:\n * menu-item-divider-color:\n * menu-item-divider-style:\n * menu-item-divider-width:\n * menu-submenu-background-color:\n * menu-submenu-text-color:\n * menu-submenu-margin:\n * menu-submenu-start-padding:\n * menu-submenu-item-border-color:\n * menu-submenu-item-border-style:\n * menu-submenu-item-border-width:\n * menu-submenu-item-border-radius:\n * menu-submenu-item-padding:\n * menu-submenu-item-hover-background-color:\n * menu-submenu-item-focus-background-color:\n * menu-submenu-item-hover-border-color:\n * menu-submenu-item-hover-text-color:\n * menu-submenu-item-icon-hover-color:\n * menu-submenu-item-active-background-color:\n * menu-submenu-item-active-border-color:\n * menu-submenu-item-active-text-color:\n * menu-submenu-item-icon-active-color:\n * menu-submenu-item-active-hover-background-color:\n * menu-submenu-item-active-hover-border-color:\n * menu-submenu-item-active-hover-text-color:\n * menu-submenu-item-icon-active-hover-color:\n * menu-dropdown-background-color:\n * menu-dropdown-border-style:\n * menu-dropdown-border-width:\n * menu-dropdown-border-color:\n * menu-dropdown-border-radius:\n * menu-dropdown-shadow:\n * menu-dropdown-min-width:\n * menu-dropdown-padding:\n */\n@Component({\n selector: 'nb-menu',\n styleUrls: ['./menu.component.scss'],\n templateUrl: './menu.component.html',\n // Menu items are plain objects that apps and the menu service change in place.\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [NbMenuItemComponent],\n host: {\n '[class.horizontal]': 'horizontal()',\n '(document:click)': 'onDocumentClick($event)',\n '(focusout)': 'onFocusOut($event)',\n '(keydown.escape)': 'onEscape($event)'\n }\n})\nexport class NbMenuComponent implements OnInit, OnChanges, AfterViewInit {\n protected readonly window = inject(NB_WINDOW)\n protected readonly platformId = inject(PLATFORM_ID)\n protected readonly menuInternalService = inject(NbMenuInternalService)\n protected readonly parent = inject(NB_MENU_PARENT, { optional: true })\n protected readonly router = inject(Router)\n protected readonly cd = inject(ChangeDetectorRef)\n\n protected readonly destroyRef = inject(DestroyRef)\n protected readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef)\n\n /**\n * Names the menu, so `NbMenuService` can address it and tell its events apart when there are several menus.\n */\n readonly tag = input<string>()\n\n /**\n * The items. The menu changes them in place: it sets `parent`, `selected` and `expanded`.\n */\n readonly items = input<NbMenuItem[]>([])\n\n /**\n * Closes the other submenus when one opens, and when an item is selected.\n */\n readonly autoCollapse = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Shows the parents of the selected item as selected too (`true` by default). With `false` only the item shows as\n * selected, and a parent while its closed submenu hides the item.\n */\n readonly highlightParents = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * Shows the top-level items in a column, or in a row with their children in dropdowns.\n */\n readonly orientation = input<NbMenuOrientation>('vertical')\n\n protected readonly horizontal = computed(() => this.orientation() === 'horizontal')\n\n ngOnInit() {\n this.menuInternalService.prepareItems(this.items())\n // Before the first render, so the menu opens with the current page's submenu open rather than animating it open.\n // It keeps a selection the app set when the URL matches no item.\n this.selectFromUrl()\n\n this.menuInternalService\n .onAddItem(this.tag())\n .pipe(\n filter((data: { tag?: string, items: NbMenuItem[] }) => this.compareTag(data.tag)),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe((data) => this.onAddItem(data))\n\n this.menuInternalService\n .onNavigateHome(this.tag())\n .pipe(\n filter((data: { tag?: string }) => this.compareTag(data.tag)),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => this.navigateHome())\n\n this.menuInternalService\n .onGetSelectedItem(this.tag())\n .pipe(\n filter((data) => this.compareTag(data.tag)),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe((data) => {\n data.listener.next({ tag: this.tag(), item: this.getSelectedItem(this.items()) })\n })\n\n this.menuInternalService\n .onCollapseAll(this.tag())\n .pipe(\n filter((data: { tag?: string }) => this.compareTag(data.tag)),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => this.collapseAll())\n\n this.router.events\n .pipe(\n // Also a navigation to the URL already shown, which the router skips.\n filter((event) => event instanceof NavigationEnd || event instanceof NavigationSkipped),\n takeUntilDestroyed(this.destroyRef)\n )\n // The URL changed, so a selection it doesn't match is stale.\n .subscribe(() => this.selectFromUrl(true))\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // A new items array needs the same preparation and URL selection as the initial one.\n if (changes['items'] && !changes['items'].firstChange) {\n this.menuInternalService.prepareItems(this.items())\n this.selectFromUrl()\n }\n }\n\n ngAfterViewInit() {\n // Shared items arrays keep `selected` from a menu that was destroyed on another page.\n setTimeout(() => this.selectFromUrl(true))\n }\n\n onAddItem(data: { tag?: string, items: NbMenuItem[] }) {\n this.items().push(...data.items)\n\n this.menuInternalService.prepareItems(this.items())\n this.selectFromUrl()\n }\n\n onHoverItem(item: NbMenuItem) {\n this.menuInternalService.itemHover(item, this.tag())\n }\n\n onToggleSubMenu(item: NbMenuItem) {\n if (this.parent?.submenuToggle(item) === false) {\n return\n }\n if (this.horizontal() && this.items().includes(item)) {\n this.closeDropdowns(item)\n }\n if (this.autoCollapse()) {\n this.menuInternalService.collapseAll(this.items(), this.tag(), item)\n }\n item.expanded = !item.expanded\n this.menuInternalService.submenuToggle(item, this.tag())\n }\n\n onSelectItem(item: NbMenuItem) {\n this.menuInternalService.selectItem(item, this.items(), this.autoCollapse(), this.tag())\n this.closeDropdowns()\n }\n\n onItemClick(item: NbMenuItem) {\n this.menuInternalService.itemClick(item, this.tag())\n if (!item.children?.some((child) => !child.hidden)) {\n this.closeDropdowns()\n }\n }\n\n /** @internal */\n onDocumentClick(event: MouseEvent) {\n if (!this.elementRef.nativeElement.contains(event.target as Node)) {\n this.closeDropdowns()\n }\n }\n\n /**\n * @internal\n * Closes a dropdown that focus leaves for another element. Focus that goes nowhere, as when Safari doesn't focus a\n * clicked link, leaves it open for the click.\n */\n onFocusOut(event: FocusEvent) {\n const target = event.relatedTarget as Node | null\n if (!target) {\n return\n }\n const open = this.items().findIndex((item) => item.expanded)\n if (open >= 0 && !this.topLevelElements()[open]?.contains(target)) {\n this.closeDropdowns()\n }\n }\n\n /** @internal Closes the open dropdown and focuses its item; then Escape closes nothing else, e.g. a popover. */\n onEscape(event: Event) {\n const open = this.horizontal() ? this.items().findIndex((item) => item.expanded) : -1\n if (open >= 0 && !event.defaultPrevented) {\n event.preventDefault()\n this.closeDropdowns()\n this.topLevelElements()[open]?.querySelector<HTMLElement>(':scope > a')?.focus()\n }\n }\n\n protected navigateHome() {\n const homeItem = this.getHomeItem(this.items())\n\n if (homeItem) {\n if (homeItem.link) {\n const extras: NavigationExtras = {\n queryParams: homeItem.queryParams,\n queryParamsHandling: homeItem.queryParamsHandling,\n fragment: homeItem.fragment,\n preserveFragment: homeItem.preserveFragment\n }\n void this.router.navigate([homeItem.link], extras)\n }\n\n if (homeItem.url && this.window) {\n this.window.location.href = homeItem.url\n }\n }\n }\n\n /** Closes the dropdowns of a horizontal menu, except the given one; open levels inside them stay open. */\n protected closeDropdowns(except?: NbMenuItem) {\n if (!this.horizontal()) {\n return\n }\n for (const item of this.items()) {\n if (item !== except && item.expanded) {\n item.expanded = false\n this.menuInternalService.submenuToggle(item, this.tag())\n }\n }\n this.cd.markForCheck()\n }\n\n /** The elements of the visible top-level items, by their index in `items`. */\n protected topLevelElements(): Array<HTMLElement | undefined> {\n const elements = [\n ...this.elementRef.nativeElement.querySelectorAll<HTMLElement>(':scope > .menu-items > .menu-item')\n ]\n return this.items().map((item) => (item.hidden ? undefined : elements.shift()))\n }\n\n protected collapseAll() {\n this.menuInternalService.collapseAll(this.items(), this.tag())\n this.cd.markForCheck()\n }\n\n /**\n * Selects the item matching the URL. Navigation, timers and service commands don't mark the menu for check, so\n * this does.\n */\n protected selectFromUrl(resetIfNoMatch = false) {\n this.menuInternalService.selectFromUrl(this.items(), this.tag(), this.autoCollapse(), resetIfNoMatch)\n // Selecting an item expands its parents, which in a horizontal menu would open a dropdown.\n this.closeDropdowns()\n this.cd.markForCheck()\n }\n\n protected getHomeItem(items: NbMenuItem[]): NbMenuItem | undefined {\n for (const item of items) {\n if (item.home) {\n return item\n }\n\n const homeItem = item.children && this.getHomeItem(item.children)\n if (homeItem) {\n return homeItem\n }\n }\n\n return undefined\n }\n\n protected compareTag(tag?: string) {\n return !tag || tag === this.tag()\n }\n\n protected getSelectedItem(items: NbMenuItem[]): NbMenuItem | undefined {\n let selected: NbMenuItem | undefined\n items.forEach((item: NbMenuItem) => {\n if (item.selected) {\n selected = item\n }\n if (item.selected && item.children && item.children.length > 0) {\n selected = this.getSelectedItem(item.children)\n }\n })\n return selected\n }\n}\n","@if (menuItem().group) {\n<span>\n @if (menuItem().icon) {\n <nb-icon class=\"menu-icon\"\n [config]=\"menuItem().icon\" />\n }\n <span dir=\"auto\">{{ menuItem().title }}</span>\n</span>\n}\n@if (menuItem().link && !menuItem().url && !hasToggle() && !menuItem().group) {\n<a [routerLink]=\"menuItem().link\"\n tabindex=\"0\"\n [queryParams]=\"menuItem().queryParams\"\n [fragment]=\"menuItem().fragment\"\n [queryParamsHandling]=\"menuItem().queryParamsHandling\"\n [preserveFragment]=\"menuItem().preserveFragment\"\n [skipLocationChange]=\"menuItem().skipLocationChange\"\n [attr.target]=\"menuItem().target\"\n [attr.title]=\"menuItem().title\"\n [attr.role]=\"menuItem().ariaRole\"\n [class.active]=\"isActive()\"\n [attr.aria-current]=\"menuItem().selected ? 'page' : null\"\n (mouseenter)=\"onHoverItem(menuItem())\"\n (click)=\"onItemClick(menuItem())\">\n @if (menuItem().icon) {\n <nb-icon class=\"menu-icon\"\n [config]=\"menuItem().icon\" />\n }\n <span class=\"menu-title\"><span dir=\"auto\">{{ menuItem().title }}</span></span>\n @if (badge()) {\n <ng-container [ngTemplateOutlet]=\"badgeTemplate\" />\n }\n</a>\n}\n@if (menuItem().url && !hasToggle() && !menuItem().link && !menuItem().group) {\n<a [attr.href]=\"menuItem().url\"\n tabindex=\"0\"\n [attr.target]=\"menuItem().target\"\n [attr.title]=\"menuItem().title\"\n [attr.role]=\"menuItem().ariaRole\"\n [class.active]=\"isActive()\"\n [attr.aria-current]=\"menuItem().selected ? 'page' : null\"\n (mouseenter)=\"onHoverItem(menuItem())\"\n (click)=\"onItemClick(menuItem()); opensInPlace(menuItem()) && onSelectItem(menuItem())\">\n @if (menuItem().icon) {\n <nb-icon class=\"menu-icon\"\n [config]=\"menuItem().icon\" />\n }\n <span class=\"menu-title\"><span dir=\"auto\">{{ menuItem().title }}</span></span>\n @if (badge()) {\n <ng-container [ngTemplateOutlet]=\"badgeTemplate\" />\n }\n</a>\n}\n@if (!hasToggle() && !menuItem().link && !menuItem().url && !menuItem().group) {\n<!-- An action rather than a link: Enter and Space choose it, as they would a button. -->\n<a [attr.target]=\"menuItem().target\"\n tabindex=\"0\"\n [attr.title]=\"menuItem().title\"\n [attr.role]=\"menuItem().ariaRole || 'button'\"\n [class.active]=\"isActive()\"\n (mouseenter)=\"onHoverItem(menuItem())\"\n (click)=\"$event.preventDefault(); onItemClick(menuItem())\"\n (keydown.enter)=\"$event.preventDefault(); onItemClick(menuItem())\"\n (keydown.space)=\"$event.preventDefault(); onItemClick(menuItem())\">\n @if (menuItem().icon) {\n <nb-icon class=\"menu-icon\"\n [config]=\"menuItem().icon\" />\n }\n <span class=\"menu-title\"><span dir=\"auto\">{{ menuItem().title }}</span></span>\n @if (badge()) {\n <ng-container [ngTemplateOutlet]=\"badgeTemplate\" />\n }\n</a>\n}\n@if (hasToggle() && (menuItem().link || menuItem().url)) {\n<!-- A parent with its own page: the title goes there, and the chevron opens and closes the submenu. -->\n<div class=\"menu-item-row\">\n @if (menuItem().link) {\n <a [routerLink]=\"menuItem().link\"\n tabindex=\"0\"\n [queryParams]=\"menuItem().queryParams\"\n [fragment]=\"menuItem().fragment\"\n [queryParamsHandling]=\"menuItem().queryParamsHandling\"\n [preserveFragment]=\"menuItem().preserveFragment\"\n [skipLocationChange]=\"menuItem().skipLocationChange\"\n [attr.target]=\"menuItem().target\"\n [attr.title]=\"menuItem().title\"\n [attr.role]=\"menuItem().ariaRole\"\n [class.active]=\"isActive()\"\n [attr.aria-current]=\"menuItem().selected ? 'page' : null\"\n (mouseenter)=\"onHoverItem(menuItem())\"\n (click)=\"onItemClick(menuItem()); openSubMenu(menuItem())\">\n <ng-container [ngTemplateOutlet]=\"itemContent\" />\n </a>\n } @else {\n <a [attr.href]=\"menuItem().url\"\n tabindex=\"0\"\n [attr.target]=\"menuItem().target\"\n [attr.title]=\"menuItem().title\"\n [attr.role]=\"menuItem().ariaRole\"\n [class.active]=\"isActive()\"\n [attr.aria-current]=\"menuItem().selected ? 'page' : null\"\n (mouseenter)=\"onHoverItem(menuItem())\"\n (click)=\"onItemClick(menuItem()); opensInPlace(menuItem()) && onSelectItem(menuItem()); openSubMenu(menuItem())\">\n <ng-container [ngTemplateOutlet]=\"itemContent\" />\n </a>\n }\n <button type=\"button\"\n class=\"menu-toggle\"\n tabindex=\"0\"\n [attr.aria-expanded]=\"menuItem().expanded ?? false\"\n [attr.aria-label]=\"texts().submenu(menuItem().title)\"\n (click)=\"onToggleSubMenu(menuItem())\">\n <nb-icon class=\"expand-state\"\n [class.expanded]=\"menuItem().expanded\"\n [class.dropdown]=\"dropdown()\"\n [icon]=\"getExpandStateIcon()\"\n pack=\"essentials\" />\n </button>\n</div>\n}\n@if (hasToggle() && !menuItem().link && !menuItem().url) {\n<!-- A parent without a page of its own only opens and closes its items: a button, not a link. -->\n<a (click)=\"onToggleSubMenu(menuItem())\"\n (keydown.enter)=\"$event.preventDefault(); onToggleSubMenu(menuItem())\"\n (keydown.space)=\"$event.preventDefault(); onToggleSubMenu(menuItem())\"\n tabindex=\"0\"\n [attr.title]=\"menuItem().title\"\n [attr.aria-expanded]=\"menuItem().expanded ?? false\"\n [attr.role]=\"menuItem().ariaRole || 'button'\"\n [class.active]=\"isActive()\"\n (mouseenter)=\"onHoverItem(menuItem())\">\n @if (menuItem().icon) {\n <nb-icon class=\"menu-icon\"\n [config]=\"menuItem().icon\" />\n }\n <span class=\"menu-title\"><span dir=\"auto\">{{ menuItem().title }}</span></span>\n @if (badge()) {\n <ng-container [ngTemplateOutlet]=\"badgeTemplate\" />\n }\n <nb-icon class=\"expand-state\"\n [class.expanded]=\"menuItem().expanded\"\n [class.dropdown]=\"dropdown()\"\n [icon]=\"getExpandStateIcon()\"\n pack=\"essentials\" />\n</a>\n}\n@if (hasVisibleChildren()) {\n<ul [class.collapsed]=\"!isExpanded()\"\n [class.expanded]=\"isExpanded()\"\n [attr.inert]=\"isExpanded() ? null : ''\"\n (animate.enter)=\"submenuEnter($event)\"\n (animate.leave)=\"submenuLeave($event)\"\n #submenu\n class=\"menu-items\">\n @for (item of menuItem().children; track item) {\n @if (!item.hidden) {\n <li nbMenuItem\n [menuItem]=\"item\"\n [badge]=\"item.badge\"\n [class.menu-group]=\"item.group\"\n (hoverItem)=\"onHoverItem($event)\"\n (toggleSubMenu)=\"onToggleSubMenu($event)\"\n (selectItem)=\"onSelectItem($event)\"\n (itemClick)=\"onItemClick($event)\"\n class=\"menu-item\"></li>\n }\n }\n</ul>\n}\n\n<ng-template #itemContent>\n @if (menuItem().icon) {\n <nb-icon class=\"menu-icon\"\n [config]=\"menuItem().icon\" />\n }\n <span class=\"menu-title\"><span dir=\"auto\">{{ menuItem().title }}</span></span>\n @if (badge()) {\n <ng-container [ngTemplateOutlet]=\"badgeTemplate\" />\n }\n</ng-template>\n\n<ng-template #badgeTemplate>\n @if (badge(); as badge) {\n <nb-badge [text]=\"badge.text\"\n [dotMode]=\"badge.dotMode\"\n [status]=\"badge.status\" />\n }\n</ng-template>\n","<ul class=\"menu-items\">\n @for (item of items(); track item) {\n @if (!item.hidden) {\n <li nbMenuItem\n [menuItem]=\"item\"\n [badge]=\"item.badge\"\n [dropdown]=\"horizontal()\"\n [class.menu-group]=\"item.group\"\n (hoverItem)=\"onHoverItem($event)\"\n (toggleSubMenu)=\"onToggleSubMenu($event)\"\n (selectItem)=\"onSelectItem($event)\"\n (itemClick)=\"onItemClick($event)\"\n class=\"menu-item\"></li>\n }\n }\n</ul>\n","import { NgModule, ModuleWithProviders, EnvironmentProviders, makeEnvironmentProviders } from '@angular/core'\n\nimport { NbIconModule } from '@liquid-js/lyr-core/icon'\nimport { NbBadgeModule } from '@liquid-js/lyr-core/badge'\nimport { NbMenuComponent, NbMenuItemComponent } from './menu.component'\nimport { NbMenuService, NbMenuInternalService } from './menu.service'\n\nconst nbMenuComponents = [NbMenuComponent, NbMenuItemComponent]\n\n/**\n * Provides the menu services, in place of `NbMenuModule.forRoot()`.\n */\nexport function provideNbMenu(): EnvironmentProviders {\n return makeEnvironmentProviders([NbMenuService, NbMenuInternalService])\n}\n\n@NgModule({\n imports: [NbIconModule, NbBadgeModule, ...nbMenuComponents],\n exports: [...nbMenuComponents]\n})\nexport class NbMenuModule {\n static forRoot(): ModuleWithProviders<NbMenuModule> {\n return { ngModule: NbMen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BAAA;EAAA,CAAA;CAAA;CAAZ;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAY,SAAA;IAHX;IAAc;IAVF;IAAiB;GAAmB;GAAA,SAAA,CAApC,iBAAiB,mBAAmB;EAAA,CAAA;CAAA;CAajD;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAY,SAAA;IAHX;IAAc;IAAkB;GAAgB;EAAA,CAAA;CAAA;;AAGjD,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EAJxB,MAAA;EAAS,MAAA,CAAA;GACN,SAAS;IAAC;IAAc;IAAe,GAAG;GAAgB;GAC1D,SAAS,CAAC,GAAG,gBAAgB;EAChC,CAAA"}
|
|
1
|
+
{"version":3,"file":"liquid-js-lyr-core-menu.mjs","names":["convertToBoolProperty","animateExpand"],"sources":["../../../packages/core/src/components/menu/url-matching-helpers.ts","../../../packages/core/src/components/menu/menu.service.ts","../../../packages/core/src/components/menu/menu-parent.ts","../../../packages/core/src/components/menu/menu.component.ts","../../../packages/core/src/components/menu/menu-item.component.html","../../../packages/core/src/components/menu/menu.component.html","../../../packages/core/src/components/menu/menu.module.ts"],"sourcesContent":["export function isUrlPathEqual(path: string, link?: string) {\n // Location.path() reports the root as '' while menu links use '/'; trailing slashes don't change the page.\n if (link === undefined) {\n return false\n }\n const withoutTrailingSlash = (url: string) => url.replace(/\\/+$/, '')\n return withoutTrailingSlash(link) === withoutTrailingSlash(getPathPartOfUrl(path))\n}\n\nexport function isUrlPathContain(path: string, link?: string) {\n if (link === undefined) {\n return false\n }\n const locationPath = getPathPartOfUrl(path)\n const endOfUrlSegmentRegExp = /\\/|^$/\n return locationPath.startsWith(link) &&\n locationPath.slice(link.length).charAt(0).search(endOfUrlSegmentRegExp) !== -1\n}\n\nexport function getPathPartOfUrl(url: string): string {\n return url.match(/.*?(?=[?;#]|$)/)?.[0] ?? ''\n}\n\nexport function getFragmentPartOfUrl(url: string): string {\n const matched = url.match(/#(.+)/)\n return matched ? matched[1] : ''\n}\n\nexport function isFragmentEqual(path: string, fragment: string): boolean {\n return getFragmentPartOfUrl(path) === fragment\n}\n\nexport function isFragmentContain(path: string, fragment: string): boolean {\n return getFragmentPartOfUrl(path).includes(fragment)\n}\n\n/**\n * Checks that the URL has the query params of a menu item: all of them (`exact` false), or only them (`exact` true).\n * Values are compared as strings, an array value as a repeated param.\n */\nexport function isQueryParamsMatch(url: string, queryParams: Record<string, unknown>, exact = false): boolean {\n const actual = new URLSearchParams(url.match(/\\?([^#]*)/)?.[1] ?? '')\n const expected = Object.entries(queryParams).filter(([, value]) => value != null)\n\n const hasAll = expected.every(([key, value]) => {\n const values = (Array.isArray(value) ? value : [value]).map(String)\n const actualValues = actual.getAll(key)\n return values.length === actualValues.length && values.every((v, i) => v === actualValues[i])\n })\n return hasAll && (!exact || new Set(actual.keys()).size === expected.length)\n}\n","import { inject, Service } from '@angular/core'\nimport { Location } from '@angular/common'\nimport { Params, QueryParamsHandling } from '@angular/router'\nimport { Observable, BehaviorSubject, ReplaySubject, Subject } from 'rxjs'\nimport { share } from 'rxjs/operators'\nimport { NbIconConfig } from '@liquid-js/lyr-core/icon'\nimport { NbBadge } from '@liquid-js/lyr-core/badge'\nimport {\n isFragmentContain,\n isFragmentEqual,\n isQueryParamsMatch,\n isUrlPathContain,\n isUrlPathEqual\n} from './url-matching-helpers'\n\nexport interface NbMenuBag {\n tag?: string\n item: NbMenuItem\n}\n\n/**\n * Delivers menu service commands to the menus with a matching tag (or to all menus for a command without a tag).\n * A command sent while no such menu exists waits for the first one, and is delivered only once,\n * so a menu created later doesn't get the commands meant for an earlier one.\n * */\nclass NbMenuCommands<T extends { tag?: string }> {\n protected readonly listeners = new Set<{ tag?: string, next: (command: T) => void }>()\n protected pending = new Array<T>()\n\n send(command: T) {\n const listeners = Array.from(this.listeners).filter((listener) => this.matches(command, listener.tag))\n if (listeners.length) {\n listeners.forEach((listener) => listener.next(command))\n } else {\n this.pending.push(command)\n }\n }\n\n listen(tag?: string): Observable<T> {\n return new Observable<T>((subscriber) => {\n const listener = { tag, next: (command: T) => subscriber.next(command) }\n this.listeners.add(listener)\n\n const ready = this.pending.filter((command) => this.matches(command, tag))\n this.pending = this.pending.filter((command) => !ready.includes(command))\n ready.forEach(listener.next)\n\n return () => this.listeners.delete(listener)\n })\n }\n\n protected matches(command: T, tag?: string): boolean {\n return !command.tag || command.tag === tag\n }\n}\n\nconst itemClick$ = new Subject<NbMenuBag>()\nconst addItems$ = new NbMenuCommands<{ tag?: string, items: NbMenuItem[] }>()\nconst navigateHome$ = new NbMenuCommands<{ tag?: string }>()\nconst getSelectedItem$ = new NbMenuCommands<{\n tag?: string\n listener: BehaviorSubject<{ tag?: string, item?: NbMenuItem } | undefined>\n}>()\nconst itemSelect$ = new ReplaySubject<NbMenuBag>(1)\nconst itemHover$ = new ReplaySubject<NbMenuBag>(1)\nconst submenuToggle$ = new ReplaySubject<NbMenuBag>(1)\nconst collapseAll$ = new NbMenuCommands<{ tag?: string }>()\n\nexport type NbMenuBadgeConfig = Omit<NbBadge, 'position'>\n\n/**\n * An item of an `nb-menu`: a router `link`, a plain `url`, an action without either, a `group` heading, or a parent\n * of `children`. The menu sets `parent`, `selected` and `expanded` on it.\n *\n * @stacked-example(Menu Link Parameters, menu/menu-link-params.component)\n */\nexport class NbMenuItem<D = unknown> {\n title = ''\n /**\n * Link for the router (`routerLink`).\n */\n link?: string\n /**\n * Plain `href`, e.g. for a page outside the app.\n */\n url?: string\n /**\n * Icon name, or an icon config.\n */\n icon?: string | NbIconConfig\n /**\n * Whether the submenu is open; the menu updates it as the user opens and closes submenus.\n */\n expanded?: boolean\n /**\n * Whether the submenu opens and closes (`true` by default). With `false` the children always show and the item has\n * no toggle, e.g. the sections of the page it links to. A horizontal menu's dropdowns still open and close.\n */\n collapsible?: boolean\n /**\n * A badge shown after the title.\n */\n badge?: NbMenuBadgeConfig\n /**\n * The items of the submenu.\n */\n children?: Array<NbMenuItem<D>>\n /**\n * The link's `target`; a link that opens elsewhere (e.g. `_blank`) doesn't take the selection.\n */\n target?: string\n /**\n * Leaves the item out of the menu; a parent whose children are all hidden shows as a plain item.\n */\n hidden?: boolean\n /**\n * How the URL must match `link` for the item to be selected: wholly (`full`, the default), or as a prefix ending\n * at a path segment (`prefix`). `queryParams` and `fragment` are matched the same way.\n */\n pathMatch?: 'full' | 'prefix' = 'full'\n /**\n * The item `NbMenuService.navigateHome()` goes to.\n */\n home?: boolean\n /**\n * A heading rather than a link: shown as plain text.\n */\n group?: boolean\n /** The `routerLink`'s `skipLocationChange`. */\n skipLocationChange?: boolean\n /** Query params of the `routerLink`; they also tell items with the same `link` apart when selecting from the URL. */\n queryParams?: Params\n queryParamsHandling?: QueryParamsHandling\n parent?: NbMenuItem<D>\n selected?: boolean\n /** The app's own data of the item. */\n data?: D\n fragment?: string\n preserveFragment?: boolean\n /** ARIA role of the link; an item with neither `link` nor `url` is a `button` by default. */\n ariaRole?: string\n\n /**\n * The item's parents, from the top down.\n */\n static getParents<D>(item: NbMenuItem<D>): Array<NbMenuItem<D>> {\n const parents = new Array<NbMenuItem<D>>()\n\n let parent = item.parent\n while (parent) {\n parents.unshift(parent)\n parent = parent.parent\n }\n\n return parents\n }\n\n static isParent<D>(item: NbMenuItem<D>, possibleChild: NbMenuItem<D>): boolean {\n return possibleChild.parent ? possibleChild.parent === item || this.isParent(item, possibleChild.parent) : false\n }\n}\n\n/**\n * Listens to menu events and sends commands to menus. A `tag` addresses the menu with that tag; without one, a command\n * goes to every menu. Events carry the tag of the menu they come from.\n *\n * @stacked-example(Menu Service, menu/menu-service.component)\n */\n@Service()\nexport class NbMenuService {\n /**\n * Adds items to the end of the menu. A command sent before the menu exists waits for it.\n */\n addItems(items: NbMenuItem[], tag?: string) {\n addItems$.send({ tag, items })\n }\n\n /**\n * Closes all submenus.\n */\n collapseAll(tag?: string) {\n collapseAll$.send({ tag })\n }\n\n /**\n * Goes to the item marked `home`.\n */\n navigateHome(tag?: string) {\n navigateHome$.send({ tag })\n }\n\n /**\n * The selected item as it is now, not followed afterwards: the observable emits `undefined` until the menu answers,\n * then once with the item (or none).\n */\n getSelectedItem(tag?: string): Observable<{ tag?: string, item?: NbMenuItem } | undefined> {\n const listener = new BehaviorSubject<{ tag?: string, item?: NbMenuItem } | undefined>(\n undefined\n )\n\n getSelectedItem$.send({ tag, listener })\n\n return listener.asObservable()\n }\n\n onItemClick(): Observable<NbMenuBag> {\n return itemClick$.pipe(share())\n }\n\n onItemSelect(): Observable<NbMenuBag> {\n return itemSelect$.pipe(share())\n }\n\n onItemHover(): Observable<NbMenuBag> {\n return itemHover$.pipe(share())\n }\n\n onSubmenuToggle(): Observable<NbMenuBag> {\n return submenuToggle$.pipe(share())\n }\n}\n\n@Service()\nexport class NbMenuInternalService {\n private readonly location = inject(Location)\n\n prepareItems(items: NbMenuItem[]) {\n const defaultItem = new NbMenuItem()\n items.forEach((i) => {\n this.applyDefaults(i, defaultItem)\n this.setParent(i)\n })\n }\n\n /**\n * Selects the item matching the current URL. With `resetIfNoMatch`, a URL that matches no item clears the selection,\n * so the item of the previous page doesn't stay selected.\n */\n selectFromUrl(items: NbMenuItem[], tag?: string, collapseOther: boolean = false, resetIfNoMatch: boolean = false) {\n const selectedItem = this.findItemByUrl(items)\n if (selectedItem) {\n this.selectItem(selectedItem, items, collapseOther, tag)\n } else if (resetIfNoMatch) {\n this.resetSelection(items)\n }\n }\n\n selectItem(item: NbMenuItem, items: NbMenuItem[], collapseOther: boolean = false, tag?: string) {\n const unselectedItems = this.resetSelection(items)\n const collapsedItems = collapseOther ? this.collapseItems(items) : []\n\n for (const parent of NbMenuItem.getParents(item)) {\n parent.selected = true\n // emit event only for items that weren't selected before ('unselectedItems' contains items that were selected)\n if (!unselectedItems.includes(parent)) {\n this.itemSelect(parent, tag)\n }\n\n const wasNotExpanded = !parent.expanded\n parent.expanded = true\n const i = collapsedItems.indexOf(parent)\n // emit event only for items that weren't expanded before.\n // 'collapsedItems' contains items that were expanded, so no need to emit event.\n // in case 'collapseOther' is false, 'collapsedItems' will be empty,\n // so also check if item isn't expanded already ('wasNotExpanded').\n if (i === -1 && wasNotExpanded) {\n this.submenuToggle(parent, tag)\n } else {\n collapsedItems.splice(i, 1)\n }\n }\n\n item.selected = true\n // emit event only for items that weren't selected before ('unselectedItems' contains items that were selected)\n if (!unselectedItems.includes(item)) {\n this.itemSelect(item, tag)\n }\n\n // remaining items which wasn't expanded back after expanding all currently selected items\n for (const collapsedItem of collapsedItems) {\n this.submenuToggle(collapsedItem, tag)\n }\n }\n\n collapseAll(items: NbMenuItem[], tag?: string, except?: NbMenuItem) {\n const collapsedItems = this.collapseItems(items, except)\n\n for (const item of collapsedItems) {\n this.submenuToggle(item, tag)\n }\n }\n\n onAddItem(tag?: string): Observable<{ tag?: string, items: NbMenuItem[] }> {\n return addItems$.listen(tag)\n }\n\n onNavigateHome(tag?: string): Observable<{ tag?: string }> {\n return navigateHome$.listen(tag)\n }\n\n onCollapseAll(tag?: string): Observable<{ tag?: string }> {\n return collapseAll$.listen(tag)\n }\n\n onGetSelectedItem(tag?: string): Observable<{\n tag?: string\n listener: BehaviorSubject<{ tag?: string, item?: NbMenuItem } | undefined>\n }> {\n return getSelectedItem$.listen(tag)\n }\n\n itemHover(item: NbMenuItem, tag?: string) {\n itemHover$.next({ tag, item })\n }\n\n submenuToggle(item: NbMenuItem, tag?: string) {\n submenuToggle$.next({ tag, item })\n }\n\n itemSelect(item: NbMenuItem, tag?: string) {\n itemSelect$.next({ tag, item })\n }\n\n itemClick(item: NbMenuItem, tag?: string) {\n itemClick$.next({ tag, item })\n }\n\n /**\n * Unselects the items and their children, and returns the ones that were selected.\n */\n private resetSelection(items: NbMenuItem[]): NbMenuItem[] {\n const unselectedItems = new Array<NbMenuItem>()\n\n for (const item of items) {\n if (item.selected) {\n unselectedItems.push(item)\n }\n item.selected = false\n\n if (item.children) {\n unselectedItems.push(...this.resetSelection(item.children))\n }\n }\n\n return unselectedItems\n }\n\n /**\n * Collapses the items and their children, and returns the ones that were expanded. `except` and its parents stay\n * as they are.\n */\n private collapseItems(items: NbMenuItem[], except?: NbMenuItem): NbMenuItem[] {\n const collapsedItems = new Array<NbMenuItem>()\n\n for (const item of items) {\n if (item === except) {\n continue\n }\n if (except && NbMenuItem.isParent(item, except)) {\n // Keep the path to `except` open, but collapse its siblings further down.\n collapsedItems.push(...this.collapseItems(item.children ?? [], except))\n continue\n }\n\n if (item.expanded) {\n collapsedItems.push(item)\n }\n item.expanded = false\n\n if (item.children) {\n collapsedItems.push(...this.collapseItems(item.children))\n }\n }\n\n return collapsedItems\n }\n\n private applyDefaults(item: NbMenuItem, defaultItem: NbMenuItem) {\n const menuItem = { ...item }\n Object.assign(item, defaultItem, menuItem)\n item.children &&\n item.children.forEach((child) => {\n this.applyDefaults(child, defaultItem)\n })\n }\n\n private setParent(item: NbMenuItem) {\n item.children &&\n item.children.forEach((child) => {\n child.parent = item\n this.setParent(child)\n })\n }\n\n /**\n * The deepest item matching the current URL, children before their parent.\n */\n private findItemByUrl(items: NbMenuItem[]): NbMenuItem | undefined {\n let selectedItem: NbMenuItem | undefined\n\n items.some((item) => {\n if (item.children) {\n selectedItem = this.findItemByUrl(item.children)\n }\n if (!selectedItem && this.isSelectedInUrl(item)) {\n selectedItem = item\n }\n\n return selectedItem\n })\n\n return selectedItem\n }\n\n private isSelectedInUrl(item: NbMenuItem): boolean {\n const exact: boolean = item.pathMatch === 'full'\n const link = item.link\n\n let isSelectedInPath = exact\n ? isUrlPathEqual(this.location.path(), link)\n : isUrlPathContain(this.location.path(), link)\n\n // Items for the same path tell apart by their query params.\n if (isSelectedInPath && item.queryParams) {\n isSelectedInPath = isQueryParamsMatch(this.location.path(true), item.queryParams, exact)\n }\n\n if (isSelectedInPath && item.fragment != null) {\n return exact\n ? isFragmentEqual(this.location.path(true), item.fragment)\n : isFragmentContain(this.location.path(true), item.fragment)\n }\n\n return isSelectedInPath\n }\n}\n","import { InjectionToken } from '@angular/core'\n\nimport type { NbMenuItem } from './menu.service'\n\n/** A component around a menu that has a say in its submenus opening and closing, e.g. the sidebar. */\nexport interface NbMenuParent {\n /** Called as a submenu is about to open or close, by click or key; `false` keeps it as it is. */\n submenuToggle(item: NbMenuItem): boolean\n}\n\nexport const NB_MENU_PARENT = new InjectionToken<NbMenuParent>('NB_MENU_PARENT')\n","import {\n AfterViewChecked,\n AfterViewInit,\n AnimationCallbackEvent,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n DestroyRef,\n DoCheck,\n ElementRef,\n inject,\n input,\n OnChanges,\n OnInit,\n output,\n PLATFORM_ID,\n SimpleChanges,\n viewChild\n} from '@angular/core'\nimport { NgTemplateOutlet } from '@angular/common'\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop'\nimport { Router, NavigationEnd, NavigationExtras, NavigationSkipped, RouterLink } from '@angular/router'\nimport { filter, map } from 'rxjs/operators'\nimport { ɵconvertToBoolProperty as convertToBoolProperty, NbBooleanInput, NB_WINDOW, ɵanimateExpand as animateExpand, NbLayoutDirectionService, injectNbTexts, NbLocalize } from '@liquid-js/lyr-core/base'\nimport { NbIconComponent } from '@liquid-js/lyr-core/icon'\nimport { NbBadgeComponent } from '@liquid-js/lyr-core/badge'\nimport { NbMenuInternalService, NbMenuItem, NbMenuBag, NbMenuService, NbMenuBadgeConfig } from './menu.service'\nimport { NB_MENU_PARENT } from './menu-parent'\n\n/** @internal */\ndeclare const $localize: NbLocalize\n\nexport type NbMenuOrientation = 'vertical' | 'horizontal'\n\nexport enum NbToggleStates {\n Expanded = 'expanded',\n Collapsed = 'collapsed'\n}\n\n@Component({\n selector: '[nbMenuItem]',\n templateUrl: './menu-item.component.html',\n // Menu items are plain objects that apps and the menu service change in place.\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [NbIconComponent, RouterLink, NgTemplateOutlet, NbBadgeComponent]\n})\nexport class NbMenuItemComponent implements DoCheck, AfterViewInit, AfterViewChecked {\n protected readonly menuService = inject(NbMenuService)\n protected readonly directionService = inject(NbLayoutDirectionService)\n protected readonly destroyRef = inject(DestroyRef)\n protected readonly texts = injectNbTexts('menu', () => ({\n submenu: (title: string) => $localize`:@@nb.menu.submenu:${title}:title: submenu`\n }))\n\n readonly menuItem = input.required<NbMenuItem>()\n readonly badge = input<NbMenuBadgeConfig>()\n /** @internal A top-level item of a horizontal menu, whose children open below it. */\n readonly dropdown = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n readonly hoverItem = output<NbMenuItem>()\n readonly toggleSubMenu = output<NbMenuItem>()\n readonly selectItem = output<NbMenuItem>()\n readonly itemClick = output<NbMenuItem>()\n\n // The menu it's in, which says how a selection shows.\n private readonly menu = inject(NbMenuComponent, { optional: true })\n\n toggleState = NbToggleStates.Collapsed\n\n private readonly submenu = viewChild<ElementRef<HTMLElement>>('submenu')\n private rendered?: { submenu: HTMLElement, state: NbToggleStates }\n // Whether the item has rendered, and the submenu it rendered with: one that appears later opens, unlike that one,\n // which Angular reports entering after the item has rendered.\n private itemRendered = false\n private firstSubmenu?: HTMLElement\n\n ngDoCheck() {\n this.toggleState = this.isExpanded() ? NbToggleStates.Expanded : NbToggleStates.Collapsed\n }\n\n // Menu items are plain objects, so the item compares the state its submenu rendered with the one it had; a submenu\n // that only now renders shows its state without animating.\n ngAfterViewChecked() {\n const submenu = this.submenu()?.nativeElement\n if (submenu && this.rendered?.submenu === submenu && this.rendered.state !== this.toggleState) {\n animateExpand(submenu, this.toggleState === NbToggleStates.Expanded, { easing: 'ease-in-out' })\n }\n this.rendered = submenu ? { submenu, state: this.toggleState } : undefined\n }\n\n ngAfterViewInit() {\n this.itemRendered = true\n this.firstSubmenu = this.submenu()?.nativeElement\n this.menuService\n .onSubmenuToggle()\n .pipe(\n filter(({ item }) => item === this.menuItem()),\n map(({ item }: NbMenuBag) => item.expanded || !this.collapsible()),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe((isExpanded) => (this.toggleState = isExpanded ? NbToggleStates.Expanded : NbToggleStates.Collapsed))\n }\n\n onToggleSubMenu(item: NbMenuItem) {\n this.toggleSubMenu.emit(item)\n }\n\n /** A submenu that appears open, as the item gets children, opens. */\n protected submenuEnter(event: AnimationCallbackEvent) {\n const submenu = event.target as HTMLElement\n if (this.itemRendered && submenu !== this.firstSubmenu && submenu.classList.contains('expanded')) {\n animateExpand(submenu, true, { easing: 'ease-in-out' })\n }\n event.animationComplete()\n }\n\n /** A submenu that goes while it shows, as the item loses its children, closes first. */\n protected submenuLeave(event: AnimationCallbackEvent) {\n const submenu = event.target as HTMLElement\n const animation = submenu.classList.contains('expanded')\n ? animateExpand(submenu, false, { easing: 'ease-in-out' })\n : undefined\n if (animation) {\n animation.finished.then(() => event.animationComplete(), () => event.animationComplete())\n } else {\n event.animationComplete()\n }\n }\n\n /** Going to a parent's own page opens its submenu, so its pages show. */\n openSubMenu(item: NbMenuItem) {\n if (!item.expanded) {\n this.toggleSubMenu.emit(item)\n }\n }\n\n onHoverItem(item: NbMenuItem) {\n this.hoverItem.emit(item)\n }\n\n onSelectItem(item: NbMenuItem) {\n this.selectItem.emit(item)\n }\n\n onItemClick(item: NbMenuItem) {\n this.itemClick.emit(item)\n }\n\n /** An item whose children are all hidden renders as a plain item, without an expand toggle. */\n hasVisibleChildren(): boolean {\n return !!this.menuItem().children?.some((child) => !child.hidden)\n }\n\n /** Whether the submenu opens and closes: unless the item says otherwise, and always as a dropdown. */\n collapsible(): boolean {\n return this.dropdown() || this.menuItem().collapsible !== false\n }\n\n /** Whether the item has a toggle for its submenu. */\n hasToggle(): boolean {\n return this.hasVisibleChildren() && this.collapsible()\n }\n\n /** Whether the submenu shows: open, or one that doesn't close. */\n isExpanded(): boolean {\n return !!this.menuItem().expanded || !this.collapsible()\n }\n\n /**\n * Whether the item shows as selected: the selected item, and its parents unless the menu marks only the item; then a\n * parent shows it only while its closed submenu hides the item.\n */\n isActive(): boolean {\n const item = this.menuItem()\n if (!item.selected) {\n return false\n }\n return this.menu?.highlightParents() !== false\n || !this.isExpanded()\n || !item.children?.some((child) => child.selected && !child.hidden)\n }\n\n /**\n * Whether a `url` item opens in the current tab; a link opened elsewhere (for example `target=\"_blank\"`)\n * shouldn't take the selection.\n * */\n opensInPlace(item: NbMenuItem): boolean {\n return !item.target || item.target === '_self'\n }\n\n /**\n * One chevron, which the styles turn: down while the submenu is open, else towards the item's end, or up in a\n * dropdown.\n */\n getExpandStateIcon(): string {\n return 'chevron-down-outline'\n }\n}\n\n/**\n * A navigation menu of `NbMenuItem`s, with submenus of any depth, in a column or in a row.\n *\n * Basic example\n *\n * @stacked-example(Showcase, menu/menu-showcase.component)\n *\n * ```ts\n * // ...\n * items: NbMenuItem[] = [\n * {\n * title: 'Home',\n * link: '/'\n * },\n * {\n * title: 'Dashboard',\n * link: 'dashboard'\n * }\n * ];\n * // ...\n * <nb-menu [items]=\"items\"></nb-menu>\n * ```\n * ### Installation\n *\n * Import `NbMenuComponent` into your standalone component:\n * ```ts\n * @Component({\n * imports: [NbMenuComponent],\n * })\n * export class PageComponent { }\n * ```\n *\n * and add `provideNbMenu()` to the application providers:\n * ```ts\n * bootstrapApplication(AppComponent, {\n * providers: [provideNbMenu()],\n * });\n * ```\n *\n * With NgModules:\n *\n * Import `NbMenuModule.forRoot()` to your app module.\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbMenuModule.forRoot(),\n * ],\n * })\n * export class AppModule { }\n * ```\n * and `NbMenuModule` to your feature module where the component should be shown:\n * ```ts\n * @NgModule({\n * imports: [\n * // ...\n * NbMenuModule,\n * ],\n * })\n * export class PageModule { }\n * ```\n * ### Usage\n *\n * Two-level menu example\n * @stacked-example(Two Levels, menu/menu-children.component)\n *\n * An item with children and a `link` or `url` has its own page: its title goes there and opens its submenu, and a\n * separate button, named \"{title} submenu\", opens and closes the submenu without leaving the page.\n *\n *\n * With `autoCollapse`, opening a submenu closes the others:\n * @stacked-example(Autocollapse Menu, menu/menu-autocollapse.component)\n *\n * The parents of the selected item show as selected too. With `highlightParents` set to `false`, only the item does,\n * and a parent while its closed submenu hides the item. An item with `collapsible: false` always shows its children,\n * without a toggle, e.g. the sections of the page it links to:\n * ```html\n * <nb-menu [items]=\"[{ title: 'Guide', link: '/guide', collapsible: false, children: sections }]\"\n * [highlightParents]=\"false\" />\n * ```\n *\n * An item's `badge` shows an `nb-badge` after its title:\n * @stacked-example(Menu item badge, menu/menu-badge.component)\n *\n * With `orientation=\"horizontal\"` the top-level items are in a row, e.g. in the layout header, and their children\n * open in a dropdown below them. One dropdown is open at a time, and it closes when an item in it is picked, on\n * Escape, and when focus or a click goes elsewhere. Deeper levels expand inside the dropdown.\n * @stacked-example(Horizontal, menu/menu-horizontal.component)\n * @styles\n *\n * menu-background-color:\n * menu-text-color:\n * menu-text-font-family:\n * menu-text-font-size:\n * menu-text-font-weight:\n * menu-text-line-height:\n * menu-group-text-color:\n * menu-item-border-radius:\n * menu-item-padding:\n * menu-item-hover-background-color:\n * menu-item-hover-cursor:\n * menu-item-focus-background-color:\n * menu-item-outline-width:\n * menu-item-outline-color:\n * menu-item-hover-text-color:\n * menu-item-icon-hover-color:\n * menu-item-active-background-color:\n * menu-item-active-text-color:\n * menu-item-icon-active-color:\n * menu-item-active-indicator-width:\n * menu-item-active-indicator-color:\n * menu-item-icon-color:\n * menu-item-icon-end-margin:\n * menu-item-icon-width:\n * menu-item-divider-color:\n * menu-item-divider-style:\n * menu-item-divider-width:\n * menu-submenu-background-color:\n * menu-submenu-text-color:\n * menu-submenu-margin:\n * menu-submenu-start-padding:\n * menu-submenu-item-border-color:\n * menu-submenu-item-border-style:\n * menu-submenu-item-border-width:\n * menu-submenu-item-border-radius:\n * menu-submenu-item-padding:\n * menu-submenu-item-hover-background-color:\n * menu-submenu-item-focus-background-color:\n * menu-submenu-item-hover-border-color:\n * menu-submenu-item-hover-text-color:\n * menu-submenu-item-icon-hover-color:\n * menu-submenu-item-active-background-color:\n * menu-submenu-item-active-border-color:\n * menu-submenu-item-active-text-color:\n * menu-submenu-item-icon-active-color:\n * menu-submenu-item-active-hover-background-color:\n * menu-submenu-item-active-hover-border-color:\n * menu-submenu-item-active-hover-text-color:\n * menu-submenu-item-icon-active-hover-color:\n * menu-dropdown-background-color:\n * menu-dropdown-border-style:\n * menu-dropdown-border-width:\n * menu-dropdown-border-color:\n * menu-dropdown-border-radius:\n * menu-dropdown-shadow:\n * menu-dropdown-min-width:\n * menu-dropdown-padding:\n */\n@Component({\n selector: 'nb-menu',\n styleUrls: ['./menu.component.scss'],\n templateUrl: './menu.component.html',\n // Menu items are plain objects that apps and the menu service change in place.\n changeDetection: ChangeDetectionStrategy.Eager,\n imports: [NbMenuItemComponent],\n host: {\n '[class.horizontal]': 'horizontal()',\n '(document:click)': 'onDocumentClick($event)',\n '(focusout)': 'onFocusOut($event)',\n '(keydown.escape)': 'onEscape($event)'\n }\n})\nexport class NbMenuComponent implements OnInit, OnChanges, AfterViewInit {\n protected readonly window = inject(NB_WINDOW)\n protected readonly platformId = inject(PLATFORM_ID)\n protected readonly menuInternalService = inject(NbMenuInternalService)\n protected readonly parent = inject(NB_MENU_PARENT, { optional: true })\n protected readonly router = inject(Router)\n protected readonly cd = inject(ChangeDetectorRef)\n\n protected readonly destroyRef = inject(DestroyRef)\n protected readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef)\n\n /**\n * Names the menu, so `NbMenuService` can address it and tell its events apart when there are several menus.\n */\n readonly tag = input<string>()\n\n /**\n * The items. The menu changes them in place: it sets `parent`, `selected` and `expanded`.\n */\n readonly items = input<NbMenuItem[]>([])\n\n /**\n * Closes the other submenus when one opens, and when an item is selected.\n */\n readonly autoCollapse = input<boolean, NbBooleanInput>(false, { transform: convertToBoolProperty })\n\n /**\n * Shows the parents of the selected item as selected too (`true` by default). With `false` only the item shows as\n * selected, and a parent while its closed submenu hides the item.\n */\n readonly highlightParents = input<boolean, NbBooleanInput>(true, { transform: convertToBoolProperty })\n\n /**\n * Shows the top-level items in a column, or in a row with their children in dropdowns.\n */\n readonly orientation = input<NbMenuOrientation>('vertical')\n\n protected readonly horizontal = computed(() => this.orientation() === 'horizontal')\n\n ngOnInit() {\n this.menuInternalService.prepareItems(this.items())\n // Before the first render, so the menu opens with the current page's submenu open rather than animating it open.\n // It keeps a selection the app set when the URL matches no item.\n this.selectFromUrl()\n\n this.menuInternalService\n .onAddItem(this.tag())\n .pipe(\n filter((data: { tag?: string, items: NbMenuItem[] }) => this.compareTag(data.tag)),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe((data) => this.onAddItem(data))\n\n this.menuInternalService\n .onNavigateHome(this.tag())\n .pipe(\n filter((data: { tag?: string }) => this.compareTag(data.tag)),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => this.navigateHome())\n\n this.menuInternalService\n .onGetSelectedItem(this.tag())\n .pipe(\n filter((data) => this.compareTag(data.tag)),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe((data) => {\n data.listener.next({ tag: this.tag(), item: this.getSelectedItem(this.items()) })\n })\n\n this.menuInternalService\n .onCollapseAll(this.tag())\n .pipe(\n filter((data: { tag?: string }) => this.compareTag(data.tag)),\n takeUntilDestroyed(this.destroyRef)\n )\n .subscribe(() => this.collapseAll())\n\n this.router.events\n .pipe(\n // Also a navigation to the URL already shown, which the router skips.\n filter((event) => event instanceof NavigationEnd || event instanceof NavigationSkipped),\n takeUntilDestroyed(this.destroyRef)\n )\n // The URL changed, so a selection it doesn't match is stale.\n .subscribe(() => this.selectFromUrl(true))\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // A new items array needs the same preparation and URL selection as the initial one.\n if (changes['items'] && !changes['items'].firstChange) {\n this.menuInternalService.prepareItems(this.items())\n this.selectFromUrl()\n }\n }\n\n ngAfterViewInit() {\n // Shared items arrays keep `selected` from a menu that was destroyed on another page.\n setTimeout(() => this.selectFromUrl(true))\n }\n\n onAddItem(data: { tag?: string, items: NbMenuItem[] }) {\n this.items().push(...data.items)\n\n this.menuInternalService.prepareItems(this.items())\n this.selectFromUrl()\n }\n\n onHoverItem(item: NbMenuItem) {\n this.menuInternalService.itemHover(item, this.tag())\n }\n\n onToggleSubMenu(item: NbMenuItem) {\n if (this.parent?.submenuToggle(item) === false) {\n return\n }\n if (this.horizontal() && this.items().includes(item)) {\n this.closeDropdowns(item)\n }\n if (this.autoCollapse()) {\n this.menuInternalService.collapseAll(this.items(), this.tag(), item)\n }\n item.expanded = !item.expanded\n this.menuInternalService.submenuToggle(item, this.tag())\n }\n\n onSelectItem(item: NbMenuItem) {\n this.menuInternalService.selectItem(item, this.items(), this.autoCollapse(), this.tag())\n this.closeDropdowns()\n }\n\n onItemClick(item: NbMenuItem) {\n this.menuInternalService.itemClick(item, this.tag())\n if (!item.children?.some((child) => !child.hidden)) {\n this.closeDropdowns()\n }\n }\n\n /** @internal */\n onDocumentClick(event: MouseEvent) {\n if (!this.elementRef.nativeElement.contains(event.target as Node)) {\n this.closeDropdowns()\n }\n }\n\n /**\n * @internal\n * Closes a dropdown that focus leaves for another element. Focus that goes nowhere, as when Safari doesn't focus a\n * clicked link, leaves it open for the click.\n */\n onFocusOut(event: FocusEvent) {\n const target = event.relatedTarget as Node | null\n if (!target) {\n return\n }\n const open = this.items().findIndex((item) => item.expanded)\n if (open >= 0 && !this.topLevelElements()[open]?.contains(target)) {\n this.closeDropdowns()\n }\n }\n\n /** @internal Closes the open dropdown and focuses its item; then Escape closes nothing else, e.g. a popover. */\n onEscape(event: Event) {\n const open = this.horizontal() ? this.items().findIndex((item) => item.expanded) : -1\n if (open >= 0 && !event.defaultPrevented) {\n event.preventDefault()\n this.closeDropdowns()\n this.topLevelElements()[open]?.querySelector<HTMLElement>(':scope > a')?.focus()\n }\n }\n\n protected navigateHome() {\n const homeItem = this.getHomeItem(this.items())\n\n if (homeItem) {\n if (homeItem.link) {\n const extras: NavigationExtras = {\n queryParams: homeItem.queryParams,\n queryParamsHandling: homeItem.queryParamsHandling,\n fragment: homeItem.fragment,\n preserveFragment: homeItem.preserveFragment\n }\n void this.router.navigate([homeItem.link], extras)\n }\n\n if (homeItem.url && this.window) {\n this.window.location.href = homeItem.url\n }\n }\n }\n\n /** Closes the dropdowns of a horizontal menu, except the given one; open levels inside them stay open. */\n protected closeDropdowns(except?: NbMenuItem) {\n if (!this.horizontal()) {\n return\n }\n for (const item of this.items()) {\n if (item !== except && item.expanded) {\n item.expanded = false\n this.menuInternalService.submenuToggle(item, this.tag())\n }\n }\n this.cd.markForCheck()\n }\n\n /** The elements of the visible top-level items, by their index in `items`. */\n protected topLevelElements(): Array<HTMLElement | undefined> {\n const elements = [\n ...this.elementRef.nativeElement.querySelectorAll<HTMLElement>(':scope > .menu-items > .menu-item')\n ]\n return this.items().map((item) => (item.hidden ? undefined : elements.shift()))\n }\n\n protected collapseAll() {\n this.menuInternalService.collapseAll(this.items(), this.tag())\n this.cd.markForCheck()\n }\n\n /**\n * Selects the item matching the URL. Navigation, timers and service commands don't mark the menu for check, so\n * this does.\n */\n protected selectFromUrl(resetIfNoMatch = false) {\n this.menuInternalService.selectFromUrl(this.items(), this.tag(), this.autoCollapse(), resetIfNoMatch)\n // Selecting an item expands its parents, which in a horizontal menu would open a dropdown.\n this.closeDropdowns()\n this.cd.markForCheck()\n }\n\n protected getHomeItem(items: NbMenuItem[]): NbMenuItem | undefined {\n for (const item of items) {\n if (item.home) {\n return item\n }\n\n const homeItem = item.children && this.getHomeItem(item.children)\n if (homeItem) {\n return homeItem\n }\n }\n\n return undefined\n }\n\n protected compareTag(tag?: string) {\n return !tag || tag === this.tag()\n }\n\n protected getSelectedItem(items: NbMenuItem[]): NbMenuItem | undefined {\n let selected: NbMenuItem | undefined\n items.forEach((item: NbMenuItem) => {\n if (item.selected) {\n selected = item\n }\n if (item.selected && item.children && item.children.length > 0) {\n selected = this.getSelectedItem(item.children)\n }\n })\n return selected\n }\n}\n","@if (menuItem().group) {\n<span>\n @if (menuItem().icon) {\n <nb-icon class=\"menu-icon\"\n [config]=\"menuItem().icon\" />\n }\n <span dir=\"auto\">{{ menuItem().title }}</span>\n</span>\n}\n@if (menuItem().link && !menuItem().url && !hasToggle() && !menuItem().group) {\n<a [routerLink]=\"menuItem().link\"\n tabindex=\"0\"\n [queryParams]=\"menuItem().queryParams\"\n [fragment]=\"menuItem().fragment\"\n [queryParamsHandling]=\"menuItem().queryParamsHandling\"\n [preserveFragment]=\"menuItem().preserveFragment\"\n [skipLocationChange]=\"menuItem().skipLocationChange\"\n [attr.target]=\"menuItem().target\"\n [attr.title]=\"menuItem().title\"\n [attr.role]=\"menuItem().ariaRole\"\n [class.active]=\"isActive()\"\n [attr.aria-current]=\"menuItem().selected ? 'page' : null\"\n (mouseenter)=\"onHoverItem(menuItem())\"\n (click)=\"onItemClick(menuItem())\">\n @if (menuItem().icon) {\n <nb-icon class=\"menu-icon\"\n [config]=\"menuItem().icon\" />\n }\n <span class=\"menu-title\"><span dir=\"auto\">{{ menuItem().title }}</span></span>\n @if (badge()) {\n <ng-container [ngTemplateOutlet]=\"badgeTemplate\" />\n }\n</a>\n}\n@if (menuItem().url && !hasToggle() && !menuItem().link && !menuItem().group) {\n<a [attr.href]=\"menuItem().url\"\n tabindex=\"0\"\n [attr.target]=\"menuItem().target\"\n [attr.title]=\"menuItem().title\"\n [attr.role]=\"menuItem().ariaRole\"\n [class.active]=\"isActive()\"\n [attr.aria-current]=\"menuItem().selected ? 'page' : null\"\n (mouseenter)=\"onHoverItem(menuItem())\"\n (click)=\"onItemClick(menuItem()); opensInPlace(menuItem()) && onSelectItem(menuItem())\">\n @if (menuItem().icon) {\n <nb-icon class=\"menu-icon\"\n [config]=\"menuItem().icon\" />\n }\n <span class=\"menu-title\"><span dir=\"auto\">{{ menuItem().title }}</span></span>\n @if (badge()) {\n <ng-container [ngTemplateOutlet]=\"badgeTemplate\" />\n }\n</a>\n}\n@if (!hasToggle() && !menuItem().link && !menuItem().url && !menuItem().group) {\n<!-- An action rather than a link: Enter and Space choose it, as they would a button. -->\n<a [attr.target]=\"menuItem().target\"\n tabindex=\"0\"\n [attr.title]=\"menuItem().title\"\n [attr.role]=\"menuItem().ariaRole || 'button'\"\n [class.active]=\"isActive()\"\n (mouseenter)=\"onHoverItem(menuItem())\"\n (click)=\"$event.preventDefault(); onItemClick(menuItem())\"\n (keydown.enter)=\"$event.preventDefault(); onItemClick(menuItem())\"\n (keydown.space)=\"$event.preventDefault(); onItemClick(menuItem())\">\n @if (menuItem().icon) {\n <nb-icon class=\"menu-icon\"\n [config]=\"menuItem().icon\" />\n }\n <span class=\"menu-title\"><span dir=\"auto\">{{ menuItem().title }}</span></span>\n @if (badge()) {\n <ng-container [ngTemplateOutlet]=\"badgeTemplate\" />\n }\n</a>\n}\n@if (hasToggle() && (menuItem().link || menuItem().url)) {\n<!-- A parent with its own page: the title goes there, and the chevron opens and closes the submenu. -->\n<div class=\"menu-item-row\">\n @if (menuItem().link) {\n <a [routerLink]=\"menuItem().link\"\n tabindex=\"0\"\n [queryParams]=\"menuItem().queryParams\"\n [fragment]=\"menuItem().fragment\"\n [queryParamsHandling]=\"menuItem().queryParamsHandling\"\n [preserveFragment]=\"menuItem().preserveFragment\"\n [skipLocationChange]=\"menuItem().skipLocationChange\"\n [attr.target]=\"menuItem().target\"\n [attr.title]=\"menuItem().title\"\n [attr.role]=\"menuItem().ariaRole\"\n [class.active]=\"isActive()\"\n [attr.aria-current]=\"menuItem().selected ? 'page' : null\"\n (mouseenter)=\"onHoverItem(menuItem())\"\n (click)=\"onItemClick(menuItem()); openSubMenu(menuItem())\">\n <ng-container [ngTemplateOutlet]=\"itemContent\" />\n </a>\n } @else {\n <a [attr.href]=\"menuItem().url\"\n tabindex=\"0\"\n [attr.target]=\"menuItem().target\"\n [attr.title]=\"menuItem().title\"\n [attr.role]=\"menuItem().ariaRole\"\n [class.active]=\"isActive()\"\n [attr.aria-current]=\"menuItem().selected ? 'page' : null\"\n (mouseenter)=\"onHoverItem(menuItem())\"\n (click)=\"onItemClick(menuItem()); opensInPlace(menuItem()) && onSelectItem(menuItem()); openSubMenu(menuItem())\">\n <ng-container [ngTemplateOutlet]=\"itemContent\" />\n </a>\n }\n <button type=\"button\"\n class=\"menu-toggle\"\n tabindex=\"0\"\n [attr.aria-expanded]=\"menuItem().expanded ?? false\"\n [attr.aria-label]=\"texts().submenu(menuItem().title)\"\n (click)=\"onToggleSubMenu(menuItem())\">\n <nb-icon class=\"expand-state\"\n [class.expanded]=\"menuItem().expanded\"\n [class.dropdown]=\"dropdown()\"\n [icon]=\"getExpandStateIcon()\"\n pack=\"essentials\" />\n </button>\n</div>\n}\n@if (hasToggle() && !menuItem().link && !menuItem().url) {\n<!-- A parent without a page of its own only opens and closes its items: a button, not a link. -->\n<a (click)=\"onToggleSubMenu(menuItem())\"\n (keydown.enter)=\"$event.preventDefault(); onToggleSubMenu(menuItem())\"\n (keydown.space)=\"$event.preventDefault(); onToggleSubMenu(menuItem())\"\n tabindex=\"0\"\n [attr.title]=\"menuItem().title\"\n [attr.aria-expanded]=\"menuItem().expanded ?? false\"\n [attr.role]=\"menuItem().ariaRole || 'button'\"\n [class.active]=\"isActive()\"\n (mouseenter)=\"onHoverItem(menuItem())\">\n @if (menuItem().icon) {\n <nb-icon class=\"menu-icon\"\n [config]=\"menuItem().icon\" />\n }\n <span class=\"menu-title\"><span dir=\"auto\">{{ menuItem().title }}</span></span>\n @if (badge()) {\n <ng-container [ngTemplateOutlet]=\"badgeTemplate\" />\n }\n <nb-icon class=\"expand-state\"\n [class.expanded]=\"menuItem().expanded\"\n [class.dropdown]=\"dropdown()\"\n [icon]=\"getExpandStateIcon()\"\n pack=\"essentials\" />\n</a>\n}\n@if (hasVisibleChildren()) {\n<ul [class.collapsed]=\"!isExpanded()\"\n [class.expanded]=\"isExpanded()\"\n [attr.inert]=\"isExpanded() ? null : ''\"\n (animate.enter)=\"submenuEnter($event)\"\n (animate.leave)=\"submenuLeave($event)\"\n #submenu\n class=\"menu-items\">\n @for (item of menuItem().children; track item) {\n @if (!item.hidden) {\n <li nbMenuItem\n [menuItem]=\"item\"\n [badge]=\"item.badge\"\n [class.menu-group]=\"item.group\"\n (hoverItem)=\"onHoverItem($event)\"\n (toggleSubMenu)=\"onToggleSubMenu($event)\"\n (selectItem)=\"onSelectItem($event)\"\n (itemClick)=\"onItemClick($event)\"\n class=\"menu-item\"></li>\n }\n }\n</ul>\n}\n\n<ng-template #itemContent>\n @if (menuItem().icon) {\n <nb-icon class=\"menu-icon\"\n [config]=\"menuItem().icon\" />\n }\n <span class=\"menu-title\"><span dir=\"auto\">{{ menuItem().title }}</span></span>\n @if (badge()) {\n <ng-container [ngTemplateOutlet]=\"badgeTemplate\" />\n }\n</ng-template>\n\n<ng-template #badgeTemplate>\n @if (badge(); as badge) {\n <nb-badge [text]=\"badge.text\"\n [dotMode]=\"badge.dotMode\"\n [status]=\"badge.status\" />\n }\n</ng-template>\n","<ul class=\"menu-items\">\n @for (item of items(); track item) {\n @if (!item.hidden) {\n <li nbMenuItem\n [menuItem]=\"item\"\n [badge]=\"item.badge\"\n [dropdown]=\"horizontal()\"\n [class.menu-group]=\"item.group\"\n (hoverItem)=\"onHoverItem($event)\"\n (toggleSubMenu)=\"onToggleSubMenu($event)\"\n (selectItem)=\"onSelectItem($event)\"\n (itemClick)=\"onItemClick($event)\"\n class=\"menu-item\"></li>\n }\n }\n</ul>\n","import { NgModule, ModuleWithProviders, EnvironmentProviders, makeEnvironmentProviders } from '@angular/core'\n\nimport { NbIconModule } from '@liquid-js/lyr-core/icon'\nimport { NbBadgeModule } from '@liquid-js/lyr-core/badge'\nimport { NbMenuComponent, NbMenuItemComponent } from './menu.component'\nimport { NbMenuService, NbMenuInternalService } from './menu.service'\n\nconst nbMenuComponents = [NbMenuComponent, NbMenuItemComponent]\n\n/**\n * Provides the menu services, in place of `NbMenuModule.forRoot()`.\n */\nexport function provideNbMenu(): EnvironmentProviders {\n return makeEnvironmentProviders([NbMenuService, NbMenuInternalService])\n}\n\n@NgModule({\n imports: [NbIconModule, NbBadgeModule, ...nbMenuComponents],\n exports: [...nbMenuComponents]\n})\nexport class NbMenuModule {\n static forRoot(): ModuleWithProviders<NbMenuModule> {\n return { ngModule: NbMenuModule, providers: [provideNbMenu()] }\n }\n}\n"],"mappings":";;;;;;;;;;AAAA,SAAgB,eAAe,MAAc,MAAa;CAEtD,IAAI,SAAS,QACT,OAAO;CAEX,MAAM,wBAAwB,QAAgB,IAAI,QAAQ,QAAQ,EAAE;CACpE,OAAO,qBAAqB,IAAI,MAAM,qBAAqB,iBAAiB,IAAI,CAAC;AACrF;AAEA,SAAgB,iBAAiB,MAAc,MAAa;CACxD,IAAI,SAAS,QACT,OAAO;CAEX,MAAM,eAAe,iBAAiB,IAAI;CAE1C,OAAO,aAAa,WAAW,IAAI,KACnC,aAAa,MAAM,KAAK,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,OAAqB,MAAM;AAChF;AAEA,SAAgB,iBAAiB,KAAW;CACxC,OAAO,IAAI,MAAM,gBAAgB,CAAC,GAAG,MAAM;AAC/C;AAEA,SAAgB,qBAAqB,KAAW;CAC5C,MAAM,UAAU,IAAI,MAAM,OAAO;CACjC,OAAO,UAAU,QAAQ,KAAK;AAClC;AAEA,SAAgB,gBAAgB,MAAc,UAAgB;CAC1D,OAAO,qBAAqB,IAAI,MAAM;AAC1C;AAEA,SAAgB,kBAAkB,MAAc,UAAgB;CAC5D,OAAO,qBAAqB,IAAI,CAAC,CAAC,SAAS,QAAQ;AACvD;AAMA,SAAgB,mBAAmB,KAAa,aAAsC,QAAQ,OAAK;CAC/F,MAAM,SAAS,IAAI,gBAAgB,IAAI,MAAM,WAAW,CAAC,GAAG,MAAM,EAAE;CACpE,MAAM,WAAW,OAAO,QAAQ,WAAW,CAAC,CAAC,QAAQ,GAAG,WAAW,SAAS,IAAI;CAOhF,OALe,SAAS,OAAO,CAAC,KAAK,WAAU;EAC3C,MAAM,UAAU,MAAM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