@sdcorejs/angular 20.2.8 → 20.2.9

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.
Files changed (34) hide show
  1. package/README.md +4 -2
  2. package/components/form-generic/index.d.ts +1 -0
  3. package/components/index.d.ts +0 -1
  4. package/components/query-builder/index.d.ts +3 -0
  5. package/components/table/index.d.ts +1 -1
  6. package/fesm2022/sdcorejs-angular-components-form-generic.mjs +4 -4
  7. package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
  8. package/fesm2022/sdcorejs-angular-components-modal.mjs +2 -2
  9. package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
  10. package/fesm2022/sdcorejs-angular-components-query-builder.mjs +35 -2
  11. package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
  12. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +2 -2
  13. package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
  14. package/fesm2022/sdcorejs-angular-components-tab.mjs +2 -2
  15. package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
  16. package/fesm2022/sdcorejs-angular-components-table.mjs +214 -75
  17. package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
  18. package/fesm2022/sdcorejs-angular-components.mjs +0 -1
  19. package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
  20. package/fesm2022/sdcorejs-angular-directives.mjs +49 -11
  21. package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
  22. package/fesm2022/sdcorejs-angular-forms-switch.mjs +5 -3
  23. package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
  24. package/fesm2022/sdcorejs-angular-i18n.mjs +5 -0
  25. package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
  26. package/fesm2022/sdcorejs-angular-modules-layout.mjs +41 -10
  27. package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
  28. package/forms/switch/index.d.ts +3 -2
  29. package/i18n/index.d.ts +1 -0
  30. package/modules/layout/index.d.ts +7 -1
  31. package/package.json +1 -7
  32. package/components/chart/index.d.ts +0 -65
  33. package/fesm2022/sdcorejs-angular-components-chart.mjs +0 -290
  34. package/fesm2022/sdcorejs-angular-components-chart.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, input, booleanAttribute, effect, Component, InjectionToken, Injectable, signal, computed, Pipe, DestroyRef, viewChild, output, isSignal, ChangeDetectionStrategy, untracked, NgModule } from '@angular/core';
2
+ import { inject, ElementRef, input, booleanAttribute, effect, Component, InjectionToken, Injectable, signal, computed, Pipe, DestroyRef, viewChild, output, isSignal, ChangeDetectionStrategy, untracked, model, NgModule } from '@angular/core';
3
3
  import * as i2 from '@angular/common';
4
4
  import { DOCUMENT, CommonModule, NgTemplateOutlet } from '@angular/common';
5
5
  import * as i1$3 from '@angular/router';
@@ -1951,6 +1951,8 @@ class SdLayoutMenuTreeComponent {
1951
1951
  pinVisibility = input('hover', ...(ngDevMode ? [{ debugName: "pinVisibility" }] : []));
1952
1952
  /** V3 hierarchy and flat shortcuts are opt-in; V2/mobile retain the default presentation. */
1953
1953
  presentation = input('default', ...(ngDevMode ? [{ debugName: "presentation" }] : []));
1954
+ collapsible = input(false, ...(ngDevMode ? [{ debugName: "collapsible" }] : []));
1955
+ collapsedGroupKeys = model([], ...(ngDevMode ? [{ debugName: "collapsedGroupKeys" }] : []));
1954
1956
  structured = computed(() => this.presentation() !== 'default', ...(ngDevMode ? [{ debugName: "structured" }] : []));
1955
1957
  iconFontSet = computed(() => (this.structured() ? 'material-icons-outlined' : undefined), ...(ngDevMode ? [{ debugName: "iconFontSet" }] : []));
1956
1958
  navigate = output();
@@ -1962,6 +1964,8 @@ class SdLayoutMenuTreeComponent {
1962
1964
  const query = this.query().trim();
1963
1965
  const structured = this.structured();
1964
1966
  const hierarchy = this.presentation() === 'hierarchy' && !query;
1967
+ const collapsible = this.collapsible() && !query;
1968
+ const collapsedKeys = new Set(this.collapsedGroupKeys());
1965
1969
  const menus = query ? searchMenuLeaves(this.menus(), query) : this.menus();
1966
1970
  // Nhiều menu cùng khớp route thì chỉ path sát nhất sáng: ở '/appointment/cs' thì '/appointment' không sáng nữa
1967
1971
  const activeMenuPath = resolveActiveMenuPath(menus, this.activePath());
@@ -1975,6 +1979,7 @@ class SdLayoutMenuTreeComponent {
1975
1979
  const path = 'path' in menu ? menu.path : '';
1976
1980
  const title = menu.title ?? menu.tooltipTitle ?? '';
1977
1981
  const isPinned = pinnedKeys.has(key);
1982
+ const isExpanded = !collapsible || !collapsedKeys.has(key);
1978
1983
  nodes.push({
1979
1984
  menu,
1980
1985
  key,
@@ -1986,6 +1991,8 @@ class SdLayoutMenuTreeComponent {
1986
1991
  showIcon: !structured || (hierarchy && depth === 0),
1987
1992
  isRoot: depth === 0 && (!structured || hierarchy),
1988
1993
  isGroup,
1994
+ isCollapsible: isGroup && collapsible,
1995
+ isExpanded,
1989
1996
  isActive: !!path && path === activeMenuPath,
1990
1997
  isPinned,
1991
1998
  isPinVisible: alwaysShowPin || isPinned || hoveredPinKey === key,
@@ -1994,7 +2001,7 @@ class SdLayoutMenuTreeComponent {
1994
2001
  // quyết định vị trí. Tính trong `nodes` computed nên tự cập nhật khi đổi ngôn ngữ.
1995
2002
  pinLabel: this.#i18n.t(isPinned ? 'core.module.layout.menu.unpin' : 'core.module.layout.menu.pin', { title }),
1996
2003
  });
1997
- if (isGroup && 'children' in menu)
2004
+ if (isGroup && isExpanded && 'children' in menu)
1998
2005
  append(menu.children ?? [], depth + 1, [...ancestors, menu.title ?? key]);
1999
2006
  }
2000
2007
  };
@@ -2008,6 +2015,9 @@ class SdLayoutMenuTreeComponent {
2008
2015
  if ('path' in menu)
2009
2016
  this.navigate.emit(menu);
2010
2017
  }
2018
+ onToggleGroup(key) {
2019
+ this.collapsedGroupKeys.update(keys => (keys.includes(key) ? keys.filter(value => value !== key) : [...keys, key]));
2020
+ }
2011
2021
  onTogglePinned(event, menu) {
2012
2022
  event.stopPropagation();
2013
2023
  this.togglePinned.emit(menu);
@@ -2033,12 +2043,12 @@ class SdLayoutMenuTreeComponent {
2033
2043
  this.#pinHoverTimerId = undefined;
2034
2044
  }
2035
2045
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdLayoutMenuTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
2036
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdLayoutMenuTreeComponent, isStandalone: true, selector: "sd-layout-menu-tree", inputs: { menus: { classPropertyName: "menus", publicName: "menus", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, activePath: { classPropertyName: "activePath", publicName: "activePath", isSignal: true, isRequired: false, transformFunction: null }, pinnedKeys: { classPropertyName: "pinnedKeys", publicName: "pinnedKeys", isSignal: true, isRequired: false, transformFunction: null }, showPin: { classPropertyName: "showPin", publicName: "showPin", isSignal: true, isRequired: false, transformFunction: null }, pinVisibility: { classPropertyName: "pinVisibility", publicName: "pinVisibility", isSignal: true, isRequired: false, transformFunction: null }, presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { navigate: "navigate", togglePinned: "togglePinned" }, ngImport: i0, template: "<nav\n class=\"sd-layout-menu-tree d-flex flex-column gap-4\"\n [class.sd-layout-menu-tree--structured]=\"structured()\"\n [class.sd-layout-menu-tree--pinnable]=\"showPin()\"\n aria-label=\"Navigation menu\">\n @for (node of nodes(); track node.key) {\n @if (node.isGroup) {\n <div\n class=\"sd-layout-menu-tree__group d-flex align-items-center gap-8 T12M text-black400\"\n [class.sd-layout-menu-tree__root]=\"node.isRoot\"\n [style.padding-left.px]=\"node.paddingLeft\">\n @for (offset of node.branchOffsets; track offset) {\n <span data-menu-branch class=\"sd-layout-menu-tree__branch\" [style.left.px]=\"offset\" aria-hidden=\"true\"></span>\n }\n @if (node.showIcon) {\n @if (structured() && node.menu.iconUrl) {\n <img data-menu-icon class=\"sd-layout-menu-tree__icon-image\" [src]=\"node.menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon\n data-menu-icon\n [name]=\"node.menu.icon || 'folder'\"\n [fontSet]=\"iconFontSet()\"\n [size]=\"structured() ? '20px' : undefined\"></sd-icon>\n }\n }\n <span class=\"sd-layout-menu-tree__label\" [class.text-ellipsis]=\"!structured()\">{{ node.title }}</span>\n </div>\n } @else {\n <div\n class=\"sd-layout-menu-tree__route d-flex align-items-center gap-4\"\n [class.sd-layout-menu-tree__root]=\"node.isRoot\"\n (mouseenter)=\"onPinHoverStart(node.key)\"\n (mouseleave)=\"onPinHoverEnd(node.key)\">\n @for (offset of node.branchOffsets; track offset) {\n <span data-menu-branch class=\"sd-layout-menu-tree__branch\" [style.left.px]=\"offset\" aria-hidden=\"true\"></span>\n }\n <button\n type=\"button\"\n class=\"sd-layout-menu-tree__route-button d-flex align-items-center gap-8 flex-1 text-left T14R\"\n data-menu-route\n [attr.data-menu-key]=\"node.key\"\n [attr.aria-current]=\"node.isActive ? 'page' : null\"\n [class.sd-layout-menu-tree__route-button--active]=\"node.isActive\"\n [style.margin-left.px]=\"node.inset\"\n [style.padding-left.px]=\"node.paddingLeft - node.inset\"\n [class.sd-layout-menu-tree__route-button--nested]=\"node.depth > 0\"\n (click)=\"onNavigate(node.menu)\">\n @if (node.showIcon) {\n @if (node.menu.iconUrl) {\n <img data-menu-icon class=\"sd-layout-menu-tree__icon-image\" [src]=\"node.menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon\n data-menu-icon\n [name]=\"node.menu.icon || 'chevron_right'\"\n [fontSet]=\"iconFontSet()\"\n [size]=\"structured() ? '20px' : undefined\"></sd-icon>\n }\n }\n <span class=\"sd-layout-menu-tree__label\" [class.text-ellipsis]=\"!structured()\">{{ node.title }}</span>\n </button>\n @if (showPin()) {\n <button\n type=\"button\"\n class=\"sd-layout-menu-tree__pin d-flex align-items-center justify-content-center\"\n [class.sd-layout-menu-tree__pin--visible]=\"node.isPinVisible\"\n [attr.data-pin-key]=\"node.key\"\n [attr.aria-label]=\"node.pinLabel\"\n [attr.aria-pressed]=\"node.isPinned\"\n (click)=\"onTogglePinned($event, node.menu)\">\n <sd-icon name=\"push_pin\"></sd-icon>\n </button>\n }\n </div>\n }\n } @empty {\n <div class=\"d-flex flex-column align-items-center justify-content-center gap-12 p-24 text-black400 T14R\">\n Kh\u00F4ng t\u00ECm th\u1EA5y menu ph\u00F9 h\u1EE3p\n </div>\n }\n</nav>\n", styles: [".sd-layout-menu-tree__route-button,.sd-layout-menu-tree__pin{min-height:40px;border:0;background:transparent;color:var(--sd-black500, var(--sd-text, #1a1b1f));cursor:pointer;border-radius:8px;transition:background-color .12s ease,color .12s ease}.sd-layout-menu-tree__route-button--active{color:var(--sd-primary);background:var(--sd-primary-light);font-weight:500}.sd-layout-menu-tree__route-button:hover,.sd-layout-menu-tree__pin:hover{background:var(--sd-black100, var(--sd-surface-muted, #f3f3f3));color:var(--sd-primary, #005cbb)}.sd-layout-menu-tree__route-button--active:hover{background:var(--sd-primary-light, #d7e3ff)}.sd-layout-menu-tree__route-button:focus-visible,.sd-layout-menu-tree__pin:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-layout-menu-tree__pin{width:36px;flex:0 0 36px;opacity:0;pointer-events:none;transition:opacity .12s ease,background-color .12s ease,color .12s ease}.sd-layout-menu-tree__pin--visible,.sd-layout-menu-tree__pin:focus-visible{opacity:1;pointer-events:auto}.sd-layout-menu-tree__group{min-height:32px}.sd-layout-menu-tree__icon-image{width:20px;height:20px;object-fit:contain}.sd-layout-menu-tree--structured{--menu-surface: var(--sd-white, #fff);--menu-line: color-mix(in srgb, var(--sd-border, #c4c6d0) 45%, var(--menu-surface));--menu-ink: var(--sd-text, #252c38);--menu-muted: var(--sd-text-secondary, #6b7280);gap:0!important}.sd-layout-menu-tree--structured .sd-layout-menu-tree__group,.sd-layout-menu-tree--structured .sd-layout-menu-tree__route{position:relative;min-width:0;margin:2px 0}.sd-layout-menu-tree--structured .sd-layout-menu-tree__group{min-height:34px;padding-right:10px;color:var(--menu-muted);font-weight:500;font-family:inherit;font-size:13px;line-height:1.4}.sd-layout-menu-tree--structured .sd-layout-menu-tree__root{min-height:40px;color:var(--menu-ink)}.sd-layout-menu-tree--structured .sd-layout-menu-tree__group.sd-layout-menu-tree__root:not(:first-child){margin-top:10px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__branch{position:absolute;top:-2px;bottom:-2px;width:1px;background:var(--menu-line);pointer-events:none}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button{position:relative;min-width:0;min-height:34px;padding-top:7px;padding-right:10px;padding-bottom:7px;border-radius:6px;color:var(--menu-ink);font-family:inherit;font-size:13px;font-weight:400;line-height:1.4}.sd-layout-menu-tree--structured .sd-layout-menu-tree__root .sd-layout-menu-tree__route-button{min-height:40px;border-radius:7px;font-weight:500}.sd-layout-menu-tree--structured .sd-layout-menu-tree__label{white-space:normal;overflow-wrap:anywhere;text-overflow:clip;min-width:0}.sd-layout-menu-tree--structured [data-menu-icon]{flex:0 0 20px;color:var(--menu-muted)}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button:hover{background:color-mix(in srgb,var(--sd-surface-muted, #e7e8ed) 35%,var(--menu-surface))}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active,.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:hover{color:var(--sd-primary, #005cbb);background:var(--sd-primary-light, #eaf1fa);font-weight:500}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:before,.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:hover:before{content:\"\";position:absolute;left:0;top:9px;bottom:9px;width:3px;border-radius:2px;background:var(--sd-primary, #005cbb)}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active [data-menu-icon],.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:hover [data-menu-icon]{color:inherit}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active.sd-layout-menu-tree__route-button--nested:before{left:-10px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin{position:absolute;right:2px;top:50%;transform:translateY(-50%);width:32px;min-height:32px;border-radius:6px;color:var(--menu-muted)}.sd-layout-menu-tree--structured.sd-layout-menu-tree--pinnable .sd-layout-menu-tree__route-button{padding-right:38px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button:focus-visible,.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin:focus-visible{outline-offset:-2px}@media(pointer:coarse){.sd-layout-menu-tree--structured .sd-layout-menu-tree__route .sd-layout-menu-tree__route-button,.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin{min-height:44px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin{width:44px;opacity:1;pointer-events:auto}.sd-layout-menu-tree--structured.sd-layout-menu-tree--pinnable .sd-layout-menu-tree__route-button{padding-right:50px}}@media(prefers-reduced-motion:reduce){.sd-layout-menu-tree__route-button,.sd-layout-menu-tree__pin{transition:none}}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2046
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdLayoutMenuTreeComponent, isStandalone: true, selector: "sd-layout-menu-tree", inputs: { menus: { classPropertyName: "menus", publicName: "menus", isSignal: true, isRequired: false, transformFunction: null }, query: { classPropertyName: "query", publicName: "query", isSignal: true, isRequired: false, transformFunction: null }, activePath: { classPropertyName: "activePath", publicName: "activePath", isSignal: true, isRequired: false, transformFunction: null }, pinnedKeys: { classPropertyName: "pinnedKeys", publicName: "pinnedKeys", isSignal: true, isRequired: false, transformFunction: null }, showPin: { classPropertyName: "showPin", publicName: "showPin", isSignal: true, isRequired: false, transformFunction: null }, pinVisibility: { classPropertyName: "pinVisibility", publicName: "pinVisibility", isSignal: true, isRequired: false, transformFunction: null }, presentation: { classPropertyName: "presentation", publicName: "presentation", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, collapsedGroupKeys: { classPropertyName: "collapsedGroupKeys", publicName: "collapsedGroupKeys", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { collapsedGroupKeys: "collapsedGroupKeysChange", navigate: "navigate", togglePinned: "togglePinned" }, ngImport: i0, template: "@let _structured = structured();\n@let _showPin = showPin();\n@let _iconFontSet = iconFontSet();\n<nav\n class=\"sd-layout-menu-tree d-flex flex-column gap-4\"\n [class.sd-layout-menu-tree--structured]=\"_structured\"\n [class.sd-layout-menu-tree--pinnable]=\"_showPin\"\n aria-label=\"Navigation menu\">\n @for (node of nodes(); track node.key) {\n @if (node.isGroup) {\n @if (node.isCollapsible) {\n <button\n type=\"button\"\n class=\"sd-layout-menu-tree__group sd-layout-menu-tree__group-toggle d-flex align-items-center gap-8 T12M text-black400\"\n [attr.data-menu-group]=\"node.key\"\n [attr.aria-label]=\"node.title\"\n [attr.aria-expanded]=\"node.isExpanded\"\n [class.sd-layout-menu-tree__root]=\"node.isRoot\"\n [style.padding-left.px]=\"node.paddingLeft\"\n (click)=\"onToggleGroup(node.key)\">\n <ng-container [ngTemplateOutlet]=\"groupContent\" [ngTemplateOutletContext]=\"{ $implicit: node }\"></ng-container>\n <sd-icon\n class=\"sd-layout-menu-tree__disclosure\"\n [name]=\"node.isExpanded ? 'expand_more' : 'chevron_right'\"\n size=\"18px\"\n aria-hidden=\"true\"></sd-icon>\n </button>\n } @else {\n <div\n class=\"sd-layout-menu-tree__group d-flex align-items-center gap-8 T12M text-black400\"\n [class.sd-layout-menu-tree__root]=\"node.isRoot\"\n [style.padding-left.px]=\"node.paddingLeft\">\n <ng-container [ngTemplateOutlet]=\"groupContent\" [ngTemplateOutletContext]=\"{ $implicit: node }\"></ng-container>\n </div>\n }\n } @else {\n <div\n class=\"sd-layout-menu-tree__route d-flex align-items-center gap-4\"\n [class.sd-layout-menu-tree__root]=\"node.isRoot\"\n (mouseenter)=\"onPinHoverStart(node.key)\"\n (mouseleave)=\"onPinHoverEnd(node.key)\">\n @for (offset of node.branchOffsets; track offset) {\n <span data-menu-branch class=\"sd-layout-menu-tree__branch\" [style.left.px]=\"offset\" aria-hidden=\"true\"></span>\n }\n <button\n type=\"button\"\n class=\"sd-layout-menu-tree__route-button d-flex align-items-center gap-8 flex-1 text-left T14R\"\n data-menu-route\n [attr.data-menu-key]=\"node.key\"\n [attr.aria-current]=\"node.isActive ? 'page' : null\"\n [class.sd-layout-menu-tree__route-button--active]=\"node.isActive\"\n [style.margin-left.px]=\"node.inset\"\n [style.padding-left.px]=\"node.paddingLeft - node.inset\"\n [class.sd-layout-menu-tree__route-button--nested]=\"node.depth > 0\"\n (click)=\"onNavigate(node.menu)\">\n @if (node.showIcon) {\n @if (node.menu.iconUrl) {\n <img data-menu-icon class=\"sd-layout-menu-tree__icon-image\" [src]=\"node.menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon\n data-menu-icon\n [name]=\"node.menu.icon || 'chevron_right'\"\n [fontSet]=\"_iconFontSet\"\n [size]=\"_structured ? '20px' : undefined\"></sd-icon>\n }\n }\n <span class=\"sd-layout-menu-tree__label\" [class.text-ellipsis]=\"!_structured\">{{ node.title }}</span>\n </button>\n @if (_showPin) {\n <button\n type=\"button\"\n class=\"sd-layout-menu-tree__pin d-flex align-items-center justify-content-center\"\n [class.sd-layout-menu-tree__pin--visible]=\"node.isPinVisible\"\n [attr.data-pin-key]=\"node.key\"\n [attr.aria-label]=\"node.pinLabel\"\n [attr.aria-pressed]=\"node.isPinned\"\n (click)=\"onTogglePinned($event, node.menu)\">\n <sd-icon name=\"push_pin\"></sd-icon>\n </button>\n }\n </div>\n }\n } @empty {\n <div class=\"d-flex flex-column align-items-center justify-content-center gap-12 p-24 text-black400 T14R\">\n Kh\u00F4ng t\u00ECm th\u1EA5y menu ph\u00F9 h\u1EE3p\n </div>\n }\n</nav>\n\n<ng-template #groupContent let-node>\n @for (offset of node.branchOffsets; track offset) {\n <span data-menu-branch class=\"sd-layout-menu-tree__branch\" [style.left.px]=\"offset\" aria-hidden=\"true\"></span>\n }\n @if (node.showIcon) {\n @if (_structured && node.menu.iconUrl) {\n <img data-menu-icon class=\"sd-layout-menu-tree__icon-image\" [src]=\"node.menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon data-menu-icon [name]=\"node.menu.icon || 'folder'\" [fontSet]=\"_iconFontSet\" [size]=\"_structured ? '20px' : undefined\"></sd-icon>\n }\n }\n <span class=\"sd-layout-menu-tree__label\" [class.text-ellipsis]=\"!_structured\">{{ node.title }}</span>\n</ng-template>\n", styles: [".sd-layout-menu-tree__route-button,.sd-layout-menu-tree__group-toggle,.sd-layout-menu-tree__pin{min-height:40px;border:0;background:transparent;color:var(--sd-black500, var(--sd-text, #1a1b1f));cursor:pointer;border-radius:8px;transition:background-color .12s ease,color .12s ease}.sd-layout-menu-tree__route-button--active{color:var(--sd-primary);background:var(--sd-primary-light);font-weight:500}.sd-layout-menu-tree__route-button:hover,.sd-layout-menu-tree__group-toggle:hover,.sd-layout-menu-tree__pin:hover{background:var(--sd-black100, var(--sd-surface-muted, #f3f3f3));color:var(--sd-primary, #005cbb)}.sd-layout-menu-tree__route-button--active:hover{background:var(--sd-primary-light, #d7e3ff)}.sd-layout-menu-tree__route-button:focus-visible,.sd-layout-menu-tree__group-toggle:focus-visible,.sd-layout-menu-tree__pin:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-layout-menu-tree__pin{width:36px;flex:0 0 36px;opacity:0;pointer-events:none;transition:opacity .12s ease,background-color .12s ease,color .12s ease}.sd-layout-menu-tree__pin--visible,.sd-layout-menu-tree__pin:focus-visible{opacity:1;pointer-events:auto}.sd-layout-menu-tree__group{min-height:32px}.sd-layout-menu-tree__group-toggle{text-align:left;padding-top:7px;padding-bottom:7px}.sd-layout-menu-tree__disclosure{flex:0 0 18px;margin-left:auto}.sd-layout-menu-tree__icon-image{width:20px;height:20px;object-fit:contain}.sd-layout-menu-tree--structured{--menu-surface: var(--sd-white, #fff);--menu-line: color-mix(in srgb, var(--sd-border, #c4c6d0) 45%, var(--menu-surface));--menu-ink: var(--sd-text, #252c38);--menu-muted: var(--sd-text-secondary, #6b7280);gap:0!important}.sd-layout-menu-tree--structured .sd-layout-menu-tree__group,.sd-layout-menu-tree--structured .sd-layout-menu-tree__route{position:relative;min-width:0;margin:2px 0}.sd-layout-menu-tree--structured .sd-layout-menu-tree__group{min-height:34px;padding-right:10px;color:var(--menu-muted);font-weight:500;font-family:inherit;font-size:13px;line-height:1.4}.sd-layout-menu-tree--structured .sd-layout-menu-tree__root{min-height:40px;color:var(--menu-ink)}.sd-layout-menu-tree--structured .sd-layout-menu-tree__group.sd-layout-menu-tree__root:not(:first-child){margin-top:10px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__branch{position:absolute;top:-2px;bottom:-2px;width:1px;background:var(--menu-line);pointer-events:none}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button{position:relative;min-width:0;min-height:34px;padding-top:7px;padding-right:10px;padding-bottom:7px;border-radius:6px;color:var(--menu-ink);font-family:inherit;font-size:13px;font-weight:400;line-height:1.4}.sd-layout-menu-tree--structured .sd-layout-menu-tree__root .sd-layout-menu-tree__route-button{min-height:40px;border-radius:7px;font-weight:500}.sd-layout-menu-tree--structured .sd-layout-menu-tree__label{white-space:normal;overflow-wrap:anywhere;text-overflow:clip;min-width:0}.sd-layout-menu-tree--structured [data-menu-icon]{flex:0 0 20px;color:var(--menu-muted)}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button:hover,.sd-layout-menu-tree--structured .sd-layout-menu-tree__group-toggle:hover{background:color-mix(in srgb,var(--sd-surface-muted, #e7e8ed) 35%,var(--menu-surface))}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active,.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:hover{color:var(--sd-primary, #005cbb);background:var(--sd-primary-light, #eaf1fa);font-weight:500}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:before,.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:hover:before{content:\"\";position:absolute;left:0;top:9px;bottom:9px;width:3px;border-radius:2px;background:var(--sd-primary, #005cbb)}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active [data-menu-icon],.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:hover [data-menu-icon]{color:inherit}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active.sd-layout-menu-tree__route-button--nested:before{left:-10px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin{position:absolute;right:2px;top:50%;transform:translateY(-50%);width:32px;min-height:32px;border-radius:6px;color:var(--menu-muted)}.sd-layout-menu-tree--structured.sd-layout-menu-tree--pinnable .sd-layout-menu-tree__route-button{padding-right:38px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button:focus-visible,.sd-layout-menu-tree--structured .sd-layout-menu-tree__group-toggle:focus-visible,.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin:focus-visible{outline-offset:-2px}@media(pointer:coarse){.sd-layout-menu-tree--structured .sd-layout-menu-tree__route .sd-layout-menu-tree__route-button,.sd-layout-menu-tree--structured .sd-layout-menu-tree__group-toggle,.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin{min-height:44px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin{width:44px;opacity:1;pointer-events:auto}.sd-layout-menu-tree--structured.sd-layout-menu-tree--pinnable .sd-layout-menu-tree__route-button{padding-right:50px}}@media(prefers-reduced-motion:reduce){.sd-layout-menu-tree__route-button,.sd-layout-menu-tree__group-toggle,.sd-layout-menu-tree__pin{transition:none}}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2037
2047
  }
2038
2048
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdLayoutMenuTreeComponent, decorators: [{
2039
2049
  type: Component,
2040
- args: [{ selector: 'sd-layout-menu-tree', standalone: true, imports: [SdIcon], changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav\n class=\"sd-layout-menu-tree d-flex flex-column gap-4\"\n [class.sd-layout-menu-tree--structured]=\"structured()\"\n [class.sd-layout-menu-tree--pinnable]=\"showPin()\"\n aria-label=\"Navigation menu\">\n @for (node of nodes(); track node.key) {\n @if (node.isGroup) {\n <div\n class=\"sd-layout-menu-tree__group d-flex align-items-center gap-8 T12M text-black400\"\n [class.sd-layout-menu-tree__root]=\"node.isRoot\"\n [style.padding-left.px]=\"node.paddingLeft\">\n @for (offset of node.branchOffsets; track offset) {\n <span data-menu-branch class=\"sd-layout-menu-tree__branch\" [style.left.px]=\"offset\" aria-hidden=\"true\"></span>\n }\n @if (node.showIcon) {\n @if (structured() && node.menu.iconUrl) {\n <img data-menu-icon class=\"sd-layout-menu-tree__icon-image\" [src]=\"node.menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon\n data-menu-icon\n [name]=\"node.menu.icon || 'folder'\"\n [fontSet]=\"iconFontSet()\"\n [size]=\"structured() ? '20px' : undefined\"></sd-icon>\n }\n }\n <span class=\"sd-layout-menu-tree__label\" [class.text-ellipsis]=\"!structured()\">{{ node.title }}</span>\n </div>\n } @else {\n <div\n class=\"sd-layout-menu-tree__route d-flex align-items-center gap-4\"\n [class.sd-layout-menu-tree__root]=\"node.isRoot\"\n (mouseenter)=\"onPinHoverStart(node.key)\"\n (mouseleave)=\"onPinHoverEnd(node.key)\">\n @for (offset of node.branchOffsets; track offset) {\n <span data-menu-branch class=\"sd-layout-menu-tree__branch\" [style.left.px]=\"offset\" aria-hidden=\"true\"></span>\n }\n <button\n type=\"button\"\n class=\"sd-layout-menu-tree__route-button d-flex align-items-center gap-8 flex-1 text-left T14R\"\n data-menu-route\n [attr.data-menu-key]=\"node.key\"\n [attr.aria-current]=\"node.isActive ? 'page' : null\"\n [class.sd-layout-menu-tree__route-button--active]=\"node.isActive\"\n [style.margin-left.px]=\"node.inset\"\n [style.padding-left.px]=\"node.paddingLeft - node.inset\"\n [class.sd-layout-menu-tree__route-button--nested]=\"node.depth > 0\"\n (click)=\"onNavigate(node.menu)\">\n @if (node.showIcon) {\n @if (node.menu.iconUrl) {\n <img data-menu-icon class=\"sd-layout-menu-tree__icon-image\" [src]=\"node.menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon\n data-menu-icon\n [name]=\"node.menu.icon || 'chevron_right'\"\n [fontSet]=\"iconFontSet()\"\n [size]=\"structured() ? '20px' : undefined\"></sd-icon>\n }\n }\n <span class=\"sd-layout-menu-tree__label\" [class.text-ellipsis]=\"!structured()\">{{ node.title }}</span>\n </button>\n @if (showPin()) {\n <button\n type=\"button\"\n class=\"sd-layout-menu-tree__pin d-flex align-items-center justify-content-center\"\n [class.sd-layout-menu-tree__pin--visible]=\"node.isPinVisible\"\n [attr.data-pin-key]=\"node.key\"\n [attr.aria-label]=\"node.pinLabel\"\n [attr.aria-pressed]=\"node.isPinned\"\n (click)=\"onTogglePinned($event, node.menu)\">\n <sd-icon name=\"push_pin\"></sd-icon>\n </button>\n }\n </div>\n }\n } @empty {\n <div class=\"d-flex flex-column align-items-center justify-content-center gap-12 p-24 text-black400 T14R\">\n Kh\u00F4ng t\u00ECm th\u1EA5y menu ph\u00F9 h\u1EE3p\n </div>\n }\n</nav>\n", styles: [".sd-layout-menu-tree__route-button,.sd-layout-menu-tree__pin{min-height:40px;border:0;background:transparent;color:var(--sd-black500, var(--sd-text, #1a1b1f));cursor:pointer;border-radius:8px;transition:background-color .12s ease,color .12s ease}.sd-layout-menu-tree__route-button--active{color:var(--sd-primary);background:var(--sd-primary-light);font-weight:500}.sd-layout-menu-tree__route-button:hover,.sd-layout-menu-tree__pin:hover{background:var(--sd-black100, var(--sd-surface-muted, #f3f3f3));color:var(--sd-primary, #005cbb)}.sd-layout-menu-tree__route-button--active:hover{background:var(--sd-primary-light, #d7e3ff)}.sd-layout-menu-tree__route-button:focus-visible,.sd-layout-menu-tree__pin:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-layout-menu-tree__pin{width:36px;flex:0 0 36px;opacity:0;pointer-events:none;transition:opacity .12s ease,background-color .12s ease,color .12s ease}.sd-layout-menu-tree__pin--visible,.sd-layout-menu-tree__pin:focus-visible{opacity:1;pointer-events:auto}.sd-layout-menu-tree__group{min-height:32px}.sd-layout-menu-tree__icon-image{width:20px;height:20px;object-fit:contain}.sd-layout-menu-tree--structured{--menu-surface: var(--sd-white, #fff);--menu-line: color-mix(in srgb, var(--sd-border, #c4c6d0) 45%, var(--menu-surface));--menu-ink: var(--sd-text, #252c38);--menu-muted: var(--sd-text-secondary, #6b7280);gap:0!important}.sd-layout-menu-tree--structured .sd-layout-menu-tree__group,.sd-layout-menu-tree--structured .sd-layout-menu-tree__route{position:relative;min-width:0;margin:2px 0}.sd-layout-menu-tree--structured .sd-layout-menu-tree__group{min-height:34px;padding-right:10px;color:var(--menu-muted);font-weight:500;font-family:inherit;font-size:13px;line-height:1.4}.sd-layout-menu-tree--structured .sd-layout-menu-tree__root{min-height:40px;color:var(--menu-ink)}.sd-layout-menu-tree--structured .sd-layout-menu-tree__group.sd-layout-menu-tree__root:not(:first-child){margin-top:10px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__branch{position:absolute;top:-2px;bottom:-2px;width:1px;background:var(--menu-line);pointer-events:none}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button{position:relative;min-width:0;min-height:34px;padding-top:7px;padding-right:10px;padding-bottom:7px;border-radius:6px;color:var(--menu-ink);font-family:inherit;font-size:13px;font-weight:400;line-height:1.4}.sd-layout-menu-tree--structured .sd-layout-menu-tree__root .sd-layout-menu-tree__route-button{min-height:40px;border-radius:7px;font-weight:500}.sd-layout-menu-tree--structured .sd-layout-menu-tree__label{white-space:normal;overflow-wrap:anywhere;text-overflow:clip;min-width:0}.sd-layout-menu-tree--structured [data-menu-icon]{flex:0 0 20px;color:var(--menu-muted)}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button:hover{background:color-mix(in srgb,var(--sd-surface-muted, #e7e8ed) 35%,var(--menu-surface))}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active,.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:hover{color:var(--sd-primary, #005cbb);background:var(--sd-primary-light, #eaf1fa);font-weight:500}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:before,.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:hover:before{content:\"\";position:absolute;left:0;top:9px;bottom:9px;width:3px;border-radius:2px;background:var(--sd-primary, #005cbb)}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active [data-menu-icon],.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:hover [data-menu-icon]{color:inherit}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active.sd-layout-menu-tree__route-button--nested:before{left:-10px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin{position:absolute;right:2px;top:50%;transform:translateY(-50%);width:32px;min-height:32px;border-radius:6px;color:var(--menu-muted)}.sd-layout-menu-tree--structured.sd-layout-menu-tree--pinnable .sd-layout-menu-tree__route-button{padding-right:38px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button:focus-visible,.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin:focus-visible{outline-offset:-2px}@media(pointer:coarse){.sd-layout-menu-tree--structured .sd-layout-menu-tree__route .sd-layout-menu-tree__route-button,.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin{min-height:44px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin{width:44px;opacity:1;pointer-events:auto}.sd-layout-menu-tree--structured.sd-layout-menu-tree--pinnable .sd-layout-menu-tree__route-button{padding-right:50px}}@media(prefers-reduced-motion:reduce){.sd-layout-menu-tree__route-button,.sd-layout-menu-tree__pin{transition:none}}\n"] }]
2041
- }], ctorParameters: () => [], propDecorators: { menus: [{ type: i0.Input, args: [{ isSignal: true, alias: "menus", required: false }] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }], activePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "activePath", required: false }] }], pinnedKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinnedKeys", required: false }] }], showPin: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPin", required: false }] }], pinVisibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinVisibility", required: false }] }], presentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "presentation", required: false }] }], navigate: [{ type: i0.Output, args: ["navigate"] }], togglePinned: [{ type: i0.Output, args: ["togglePinned"] }] } });
2050
+ args: [{ selector: 'sd-layout-menu-tree', standalone: true, imports: [SdIcon, NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let _structured = structured();\n@let _showPin = showPin();\n@let _iconFontSet = iconFontSet();\n<nav\n class=\"sd-layout-menu-tree d-flex flex-column gap-4\"\n [class.sd-layout-menu-tree--structured]=\"_structured\"\n [class.sd-layout-menu-tree--pinnable]=\"_showPin\"\n aria-label=\"Navigation menu\">\n @for (node of nodes(); track node.key) {\n @if (node.isGroup) {\n @if (node.isCollapsible) {\n <button\n type=\"button\"\n class=\"sd-layout-menu-tree__group sd-layout-menu-tree__group-toggle d-flex align-items-center gap-8 T12M text-black400\"\n [attr.data-menu-group]=\"node.key\"\n [attr.aria-label]=\"node.title\"\n [attr.aria-expanded]=\"node.isExpanded\"\n [class.sd-layout-menu-tree__root]=\"node.isRoot\"\n [style.padding-left.px]=\"node.paddingLeft\"\n (click)=\"onToggleGroup(node.key)\">\n <ng-container [ngTemplateOutlet]=\"groupContent\" [ngTemplateOutletContext]=\"{ $implicit: node }\"></ng-container>\n <sd-icon\n class=\"sd-layout-menu-tree__disclosure\"\n [name]=\"node.isExpanded ? 'expand_more' : 'chevron_right'\"\n size=\"18px\"\n aria-hidden=\"true\"></sd-icon>\n </button>\n } @else {\n <div\n class=\"sd-layout-menu-tree__group d-flex align-items-center gap-8 T12M text-black400\"\n [class.sd-layout-menu-tree__root]=\"node.isRoot\"\n [style.padding-left.px]=\"node.paddingLeft\">\n <ng-container [ngTemplateOutlet]=\"groupContent\" [ngTemplateOutletContext]=\"{ $implicit: node }\"></ng-container>\n </div>\n }\n } @else {\n <div\n class=\"sd-layout-menu-tree__route d-flex align-items-center gap-4\"\n [class.sd-layout-menu-tree__root]=\"node.isRoot\"\n (mouseenter)=\"onPinHoverStart(node.key)\"\n (mouseleave)=\"onPinHoverEnd(node.key)\">\n @for (offset of node.branchOffsets; track offset) {\n <span data-menu-branch class=\"sd-layout-menu-tree__branch\" [style.left.px]=\"offset\" aria-hidden=\"true\"></span>\n }\n <button\n type=\"button\"\n class=\"sd-layout-menu-tree__route-button d-flex align-items-center gap-8 flex-1 text-left T14R\"\n data-menu-route\n [attr.data-menu-key]=\"node.key\"\n [attr.aria-current]=\"node.isActive ? 'page' : null\"\n [class.sd-layout-menu-tree__route-button--active]=\"node.isActive\"\n [style.margin-left.px]=\"node.inset\"\n [style.padding-left.px]=\"node.paddingLeft - node.inset\"\n [class.sd-layout-menu-tree__route-button--nested]=\"node.depth > 0\"\n (click)=\"onNavigate(node.menu)\">\n @if (node.showIcon) {\n @if (node.menu.iconUrl) {\n <img data-menu-icon class=\"sd-layout-menu-tree__icon-image\" [src]=\"node.menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon\n data-menu-icon\n [name]=\"node.menu.icon || 'chevron_right'\"\n [fontSet]=\"_iconFontSet\"\n [size]=\"_structured ? '20px' : undefined\"></sd-icon>\n }\n }\n <span class=\"sd-layout-menu-tree__label\" [class.text-ellipsis]=\"!_structured\">{{ node.title }}</span>\n </button>\n @if (_showPin) {\n <button\n type=\"button\"\n class=\"sd-layout-menu-tree__pin d-flex align-items-center justify-content-center\"\n [class.sd-layout-menu-tree__pin--visible]=\"node.isPinVisible\"\n [attr.data-pin-key]=\"node.key\"\n [attr.aria-label]=\"node.pinLabel\"\n [attr.aria-pressed]=\"node.isPinned\"\n (click)=\"onTogglePinned($event, node.menu)\">\n <sd-icon name=\"push_pin\"></sd-icon>\n </button>\n }\n </div>\n }\n } @empty {\n <div class=\"d-flex flex-column align-items-center justify-content-center gap-12 p-24 text-black400 T14R\">\n Kh\u00F4ng t\u00ECm th\u1EA5y menu ph\u00F9 h\u1EE3p\n </div>\n }\n</nav>\n\n<ng-template #groupContent let-node>\n @for (offset of node.branchOffsets; track offset) {\n <span data-menu-branch class=\"sd-layout-menu-tree__branch\" [style.left.px]=\"offset\" aria-hidden=\"true\"></span>\n }\n @if (node.showIcon) {\n @if (_structured && node.menu.iconUrl) {\n <img data-menu-icon class=\"sd-layout-menu-tree__icon-image\" [src]=\"node.menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon data-menu-icon [name]=\"node.menu.icon || 'folder'\" [fontSet]=\"_iconFontSet\" [size]=\"_structured ? '20px' : undefined\"></sd-icon>\n }\n }\n <span class=\"sd-layout-menu-tree__label\" [class.text-ellipsis]=\"!_structured\">{{ node.title }}</span>\n</ng-template>\n", styles: [".sd-layout-menu-tree__route-button,.sd-layout-menu-tree__group-toggle,.sd-layout-menu-tree__pin{min-height:40px;border:0;background:transparent;color:var(--sd-black500, var(--sd-text, #1a1b1f));cursor:pointer;border-radius:8px;transition:background-color .12s ease,color .12s ease}.sd-layout-menu-tree__route-button--active{color:var(--sd-primary);background:var(--sd-primary-light);font-weight:500}.sd-layout-menu-tree__route-button:hover,.sd-layout-menu-tree__group-toggle:hover,.sd-layout-menu-tree__pin:hover{background:var(--sd-black100, var(--sd-surface-muted, #f3f3f3));color:var(--sd-primary, #005cbb)}.sd-layout-menu-tree__route-button--active:hover{background:var(--sd-primary-light, #d7e3ff)}.sd-layout-menu-tree__route-button:focus-visible,.sd-layout-menu-tree__group-toggle:focus-visible,.sd-layout-menu-tree__pin:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-layout-menu-tree__pin{width:36px;flex:0 0 36px;opacity:0;pointer-events:none;transition:opacity .12s ease,background-color .12s ease,color .12s ease}.sd-layout-menu-tree__pin--visible,.sd-layout-menu-tree__pin:focus-visible{opacity:1;pointer-events:auto}.sd-layout-menu-tree__group{min-height:32px}.sd-layout-menu-tree__group-toggle{text-align:left;padding-top:7px;padding-bottom:7px}.sd-layout-menu-tree__disclosure{flex:0 0 18px;margin-left:auto}.sd-layout-menu-tree__icon-image{width:20px;height:20px;object-fit:contain}.sd-layout-menu-tree--structured{--menu-surface: var(--sd-white, #fff);--menu-line: color-mix(in srgb, var(--sd-border, #c4c6d0) 45%, var(--menu-surface));--menu-ink: var(--sd-text, #252c38);--menu-muted: var(--sd-text-secondary, #6b7280);gap:0!important}.sd-layout-menu-tree--structured .sd-layout-menu-tree__group,.sd-layout-menu-tree--structured .sd-layout-menu-tree__route{position:relative;min-width:0;margin:2px 0}.sd-layout-menu-tree--structured .sd-layout-menu-tree__group{min-height:34px;padding-right:10px;color:var(--menu-muted);font-weight:500;font-family:inherit;font-size:13px;line-height:1.4}.sd-layout-menu-tree--structured .sd-layout-menu-tree__root{min-height:40px;color:var(--menu-ink)}.sd-layout-menu-tree--structured .sd-layout-menu-tree__group.sd-layout-menu-tree__root:not(:first-child){margin-top:10px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__branch{position:absolute;top:-2px;bottom:-2px;width:1px;background:var(--menu-line);pointer-events:none}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button{position:relative;min-width:0;min-height:34px;padding-top:7px;padding-right:10px;padding-bottom:7px;border-radius:6px;color:var(--menu-ink);font-family:inherit;font-size:13px;font-weight:400;line-height:1.4}.sd-layout-menu-tree--structured .sd-layout-menu-tree__root .sd-layout-menu-tree__route-button{min-height:40px;border-radius:7px;font-weight:500}.sd-layout-menu-tree--structured .sd-layout-menu-tree__label{white-space:normal;overflow-wrap:anywhere;text-overflow:clip;min-width:0}.sd-layout-menu-tree--structured [data-menu-icon]{flex:0 0 20px;color:var(--menu-muted)}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button:hover,.sd-layout-menu-tree--structured .sd-layout-menu-tree__group-toggle:hover{background:color-mix(in srgb,var(--sd-surface-muted, #e7e8ed) 35%,var(--menu-surface))}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active,.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:hover{color:var(--sd-primary, #005cbb);background:var(--sd-primary-light, #eaf1fa);font-weight:500}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:before,.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:hover:before{content:\"\";position:absolute;left:0;top:9px;bottom:9px;width:3px;border-radius:2px;background:var(--sd-primary, #005cbb)}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active [data-menu-icon],.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active:hover [data-menu-icon]{color:inherit}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button--active.sd-layout-menu-tree__route-button--nested:before{left:-10px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin{position:absolute;right:2px;top:50%;transform:translateY(-50%);width:32px;min-height:32px;border-radius:6px;color:var(--menu-muted)}.sd-layout-menu-tree--structured.sd-layout-menu-tree--pinnable .sd-layout-menu-tree__route-button{padding-right:38px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__route-button:focus-visible,.sd-layout-menu-tree--structured .sd-layout-menu-tree__group-toggle:focus-visible,.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin:focus-visible{outline-offset:-2px}@media(pointer:coarse){.sd-layout-menu-tree--structured .sd-layout-menu-tree__route .sd-layout-menu-tree__route-button,.sd-layout-menu-tree--structured .sd-layout-menu-tree__group-toggle,.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin{min-height:44px}.sd-layout-menu-tree--structured .sd-layout-menu-tree__pin{width:44px;opacity:1;pointer-events:auto}.sd-layout-menu-tree--structured.sd-layout-menu-tree--pinnable .sd-layout-menu-tree__route-button{padding-right:50px}}@media(prefers-reduced-motion:reduce){.sd-layout-menu-tree__route-button,.sd-layout-menu-tree__group-toggle,.sd-layout-menu-tree__pin{transition:none}}\n"] }]
2051
+ }], ctorParameters: () => [], propDecorators: { menus: [{ type: i0.Input, args: [{ isSignal: true, alias: "menus", required: false }] }], query: [{ type: i0.Input, args: [{ isSignal: true, alias: "query", required: false }] }], activePath: [{ type: i0.Input, args: [{ isSignal: true, alias: "activePath", required: false }] }], pinnedKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinnedKeys", required: false }] }], showPin: [{ type: i0.Input, args: [{ isSignal: true, alias: "showPin", required: false }] }], pinVisibility: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinVisibility", required: false }] }], presentation: [{ type: i0.Input, args: [{ isSignal: true, alias: "presentation", required: false }] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], collapsedGroupKeys: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsedGroupKeys", required: false }] }, { type: i0.Output, args: ["collapsedGroupKeysChange"] }], navigate: [{ type: i0.Output, args: ["navigate"] }], togglePinned: [{ type: i0.Output, args: ["togglePinned"] }] } });
2042
2052
 
2043
2053
  class SdLayoutSearchFieldComponent {
2044
2054
  model = input('', ...(ngDevMode ? [{ debugName: "model" }] : []));
@@ -2168,7 +2178,7 @@ class SdSidebarV2 {
2168
2178
  this.#navigationState.patchVersionState(2, { locked: false });
2169
2179
  }
2170
2180
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdSidebarV2, deps: [], target: i0.ɵɵFactoryTarget.Component });
2171
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdSidebarV2, isStandalone: true, selector: "sd-sidebar-v2", inputs: { menus: { classPropertyName: "menus", publicName: "menus", isSignal: true, isRequired: false, transformFunction: null }, userInfo: { classPropertyName: "userInfo", publicName: "userInfo", isSignal: true, isRequired: true, transformFunction: null }, sidebar: { classPropertyName: "sidebar", publicName: "sidebar", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "keydown.escape": "closeFromEscape()" } }, ngImport: i0, template: "<!-- why: `(keydown.escape)` \u0111\u01B0\u1EE3c gom l\u00EAn HOST c\u1EE7a component (xem `host` trong main.component.ts).\n Tr\u01B0\u1EDBc \u0111\u00E2y n\u00F3 n\u1EB1m tr\u00EAn div b\u1ECDc v\u00E0 tr\u00EAn <section> flyout \u2014 c\u1EA3 hai \u0111\u1EC1u KH\u00D4NG focusable n\u00EAn ch\u1EC9\n \"ch\u1EA1y nh\u1EDD\" event n\u1ED5i b\u1ECDt t\u1EEB con, \u0111\u1ED3ng th\u1EDDi khi\u1EBFn markup khai b\u00E1o interaction handler tr\u00EAn\n ph\u1EA7n t\u1EED kh\u00F4ng nh\u1EADn \u0111\u01B0\u1EE3c focus. Host l\u00E0 t\u1ED5 ti\u00EAn c\u1EE7a t\u1EA5t c\u1EA3 n\u00EAn h\u00E0nh vi gi\u1EEF nguy\u00EAn. -->\n<div class=\"sd-sidebar-v2\">\n <aside class=\"sd-sidebar-v2__rail d-flex flex-column align-items-center gap-8 py-12 bg-white border-right border-black200\">\n <button type=\"button\" class=\"sd-sidebar-v2__brand d-flex align-items-center justify-content-center\" [attr.aria-label]=\"'core.module.layout.home.tab-name' | sdTranslate\">\n @if (sidebar().logoUrl) {\n <img class=\"sd-sidebar-v2__logo\" [src]=\"sidebar().logoUrl\" alt=\"\" />\n } @else {\n <sd-icon name=\"apps\"></sd-icon>\n }\n </button>\n\n <nav class=\"d-flex flex-column align-items-center gap-4 flex-1\" [attr.aria-label]=\"'core.module.layout.sidebar.menu-groups' | sdTranslate\">\n @for (item of railItems(); track item.key) {\n <button\n type=\"button\"\n class=\"sd-sidebar-v2__rail-action d-flex flex-column align-items-center justify-content-center gap-4\"\n [attr.data-v2-group-key]=\"item.key\"\n [attr.aria-label]=\"item.title\"\n [attr.aria-expanded]=\"activeGroupKey() === item.key && isFlyoutOpen()\"\n [class.sd-sidebar-v2__rail-action--active]=\"activeGroupKey() === item.key\"\n (click)=\"selectGroup(item.menu)\"\n (mouseenter)=\"previewGroup(item.menu)\"\n (focus)=\"previewGroup(item.menu)\">\n @if (item.menu.iconUrl) {\n <img class=\"sd-sidebar-v2__rail-icon\" [src]=\"item.menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon [name]=\"item.menu.icon || 'widgets'\"></sd-icon>\n }\n <span class=\"sd-sidebar-v2__rail-label text-ellipsis\">{{ item.title }}</span>\n </button>\n }\n </nav>\n\n <sd-layout-user-menu [userInfo]=\"userInfo()\" [compact]=\"true\"></sd-layout-user-menu>\n </aside>\n\n @if (isFlyoutOpen()) {\n <button\n type=\"button\"\n class=\"sd-sidebar-v2__backdrop\"\n [attr.aria-label]=\"'core.module.layout.sidebar.close-menu' | sdTranslate\"\n (click)=\"closeFromBackdrop()\"\n (keydown.escape)=\"closeFromEscape()\"></button>\n <section\n class=\"sd-sidebar-v2__flyout d-flex flex-column bg-white border-right border-black200 mat-elevation-z4\"\n role=\"region\"\n [attr.aria-label]=\"activeGroup()?.title || 'Menu'\"\n (mouseleave)=\"leaveFlyout()\">\n <header class=\"d-flex align-items-center justify-content-between gap-8 px-16 py-12 border-bottom border-black200\">\n <span class=\"T16M text-ellipsis\">{{ activeGroup()?.title || sidebar().defaultTitle || 'Menu' }}</span>\n @if (isFlyoutLocked()) {\n <sd-icon name=\"lock\"></sd-icon>\n }\n </header>\n <div class=\"p-12\">\n <sd-layout-search-field\n [placeholder]=\"'core.module.layout.sidebar.search-in-group' | sdTranslate\"\n [autoId]=\"'layout-v2-context-search'\"\n [model]=\"searchText()\"\n (sdChange)=\"searchText.set($event)\">\n </sd-layout-search-field>\n </div>\n <div class=\"flex-1 overflow-auto px-8 pb-12\">\n <sd-layout-menu-tree\n [menus]=\"contextMenus()\"\n [query]=\"searchText()\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n (navigate)=\"onNavigate($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </div>\n </section>\n }\n\n <main class=\"sd-sidebar-v2__content\" data-v2-content data-content-offset=\"rail\">\n <ng-content></ng-content>\n </main>\n</div>\n", styles: [".sd-sidebar-v2{min-height:100vh;background:var(--sd-light)}.sd-sidebar-v2__rail{position:fixed;z-index:30;inset:0 auto 0 0;width:72px}.sd-sidebar-v2__brand,.sd-sidebar-v2__rail-action{width:56px;min-height:52px;border:0;border-radius:10px;background:transparent;color:var(--sd-black400);cursor:pointer}.sd-sidebar-v2__rail-action:hover,.sd-sidebar-v2__rail-action--active{color:var(--sd-primary);background:var(--sd-primary-light)}.sd-sidebar-v2__brand:focus-visible,.sd-sidebar-v2__rail-action:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-sidebar-v2__rail-label{width:52px;font-size:10px;line-height:12px;text-align:center}.sd-sidebar-v2__logo,.sd-sidebar-v2__rail-icon{width:24px;height:24px;object-fit:contain}.sd-sidebar-v2__backdrop{position:fixed;z-index:10;inset:0;border:0;background:transparent}.sd-sidebar-v2__flyout{position:fixed;z-index:20;inset:0 auto 0 72px;width:320px}.sd-sidebar-v2__content{min-height:100vh;margin-left:72px}@media(prefers-reduced-motion:reduce){.sd-sidebar-v2__flyout{transition:none}}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdLayoutSearchFieldComponent, selector: "sd-layout-search-field", inputs: ["model", "placeholder", "autoId", "appearance"], outputs: ["sdChange"] }, { kind: "component", type: SdLayoutMenuTreeComponent, selector: "sd-layout-menu-tree", inputs: ["menus", "query", "activePath", "pinnedKeys", "showPin", "pinVisibility", "presentation"], outputs: ["navigate", "togglePinned"] }, { kind: "component", type: SdLayoutUserMenuComponent, selector: "sd-layout-user-menu", inputs: ["userInfo", "signout", "changePassword", "updateProfile", "setting", "notification", "compact", "presentation"], outputs: ["opened", "closed"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2181
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdSidebarV2, isStandalone: true, selector: "sd-sidebar-v2", inputs: { menus: { classPropertyName: "menus", publicName: "menus", isSignal: true, isRequired: false, transformFunction: null }, userInfo: { classPropertyName: "userInfo", publicName: "userInfo", isSignal: true, isRequired: true, transformFunction: null }, sidebar: { classPropertyName: "sidebar", publicName: "sidebar", isSignal: true, isRequired: true, transformFunction: null } }, host: { listeners: { "keydown.escape": "closeFromEscape()" } }, ngImport: i0, template: "<!-- why: `(keydown.escape)` \u0111\u01B0\u1EE3c gom l\u00EAn HOST c\u1EE7a component (xem `host` trong main.component.ts).\n Tr\u01B0\u1EDBc \u0111\u00E2y n\u00F3 n\u1EB1m tr\u00EAn div b\u1ECDc v\u00E0 tr\u00EAn <section> flyout \u2014 c\u1EA3 hai \u0111\u1EC1u KH\u00D4NG focusable n\u00EAn ch\u1EC9\n \"ch\u1EA1y nh\u1EDD\" event n\u1ED5i b\u1ECDt t\u1EEB con, \u0111\u1ED3ng th\u1EDDi khi\u1EBFn markup khai b\u00E1o interaction handler tr\u00EAn\n ph\u1EA7n t\u1EED kh\u00F4ng nh\u1EADn \u0111\u01B0\u1EE3c focus. Host l\u00E0 t\u1ED5 ti\u00EAn c\u1EE7a t\u1EA5t c\u1EA3 n\u00EAn h\u00E0nh vi gi\u1EEF nguy\u00EAn. -->\n<div class=\"sd-sidebar-v2\">\n <aside class=\"sd-sidebar-v2__rail d-flex flex-column align-items-center gap-8 py-12 bg-white border-right border-black200\">\n <button type=\"button\" class=\"sd-sidebar-v2__brand d-flex align-items-center justify-content-center\" [attr.aria-label]=\"'core.module.layout.home.tab-name' | sdTranslate\">\n @if (sidebar().logoUrl) {\n <img class=\"sd-sidebar-v2__logo\" [src]=\"sidebar().logoUrl\" alt=\"\" />\n } @else {\n <sd-icon name=\"apps\"></sd-icon>\n }\n </button>\n\n <nav class=\"d-flex flex-column align-items-center gap-4 flex-1\" [attr.aria-label]=\"'core.module.layout.sidebar.menu-groups' | sdTranslate\">\n @for (item of railItems(); track item.key) {\n <button\n type=\"button\"\n class=\"sd-sidebar-v2__rail-action d-flex flex-column align-items-center justify-content-center gap-4\"\n [attr.data-v2-group-key]=\"item.key\"\n [attr.aria-label]=\"item.title\"\n [attr.aria-expanded]=\"activeGroupKey() === item.key && isFlyoutOpen()\"\n [class.sd-sidebar-v2__rail-action--active]=\"activeGroupKey() === item.key\"\n (click)=\"selectGroup(item.menu)\"\n (mouseenter)=\"previewGroup(item.menu)\"\n (focus)=\"previewGroup(item.menu)\">\n @if (item.menu.iconUrl) {\n <img class=\"sd-sidebar-v2__rail-icon\" [src]=\"item.menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon [name]=\"item.menu.icon || 'widgets'\"></sd-icon>\n }\n <span class=\"sd-sidebar-v2__rail-label text-ellipsis\">{{ item.title }}</span>\n </button>\n }\n </nav>\n\n <sd-layout-user-menu [userInfo]=\"userInfo()\" [compact]=\"true\"></sd-layout-user-menu>\n </aside>\n\n @if (isFlyoutOpen()) {\n <button\n type=\"button\"\n class=\"sd-sidebar-v2__backdrop\"\n [attr.aria-label]=\"'core.module.layout.sidebar.close-menu' | sdTranslate\"\n (click)=\"closeFromBackdrop()\"\n (keydown.escape)=\"closeFromEscape()\"></button>\n <section\n class=\"sd-sidebar-v2__flyout d-flex flex-column bg-white border-right border-black200 mat-elevation-z4\"\n role=\"region\"\n [attr.aria-label]=\"activeGroup()?.title || 'Menu'\"\n (mouseleave)=\"leaveFlyout()\">\n <header class=\"d-flex align-items-center justify-content-between gap-8 px-16 py-12 border-bottom border-black200\">\n <span class=\"T16M text-ellipsis\">{{ activeGroup()?.title || sidebar().defaultTitle || 'Menu' }}</span>\n @if (isFlyoutLocked()) {\n <sd-icon name=\"lock\"></sd-icon>\n }\n </header>\n <div class=\"p-12\">\n <sd-layout-search-field\n [placeholder]=\"'core.module.layout.sidebar.search-in-group' | sdTranslate\"\n [autoId]=\"'layout-v2-context-search'\"\n [model]=\"searchText()\"\n (sdChange)=\"searchText.set($event)\">\n </sd-layout-search-field>\n </div>\n <div class=\"flex-1 overflow-auto px-8 pb-12\">\n <sd-layout-menu-tree\n [menus]=\"contextMenus()\"\n [query]=\"searchText()\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n (navigate)=\"onNavigate($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </div>\n </section>\n }\n\n <main class=\"sd-sidebar-v2__content\" data-v2-content data-content-offset=\"rail\">\n <ng-content></ng-content>\n </main>\n</div>\n", styles: [".sd-sidebar-v2{min-height:100vh;background:var(--sd-light)}.sd-sidebar-v2__rail{position:fixed;z-index:30;inset:0 auto 0 0;width:72px}.sd-sidebar-v2__brand,.sd-sidebar-v2__rail-action{width:56px;min-height:52px;border:0;border-radius:10px;background:transparent;color:var(--sd-black400);cursor:pointer}.sd-sidebar-v2__rail-action:hover,.sd-sidebar-v2__rail-action--active{color:var(--sd-primary);background:var(--sd-primary-light)}.sd-sidebar-v2__brand:focus-visible,.sd-sidebar-v2__rail-action:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-sidebar-v2__rail-label{width:52px;font-size:10px;line-height:12px;text-align:center}.sd-sidebar-v2__logo,.sd-sidebar-v2__rail-icon{width:24px;height:24px;object-fit:contain}.sd-sidebar-v2__backdrop{position:fixed;z-index:10;inset:0;border:0;background:transparent}.sd-sidebar-v2__flyout{position:fixed;z-index:20;inset:0 auto 0 72px;width:320px}.sd-sidebar-v2__content{min-height:100vh;margin-left:72px}@media(prefers-reduced-motion:reduce){.sd-sidebar-v2__flyout{transition:none}}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdLayoutSearchFieldComponent, selector: "sd-layout-search-field", inputs: ["model", "placeholder", "autoId", "appearance"], outputs: ["sdChange"] }, { kind: "component", type: SdLayoutMenuTreeComponent, selector: "sd-layout-menu-tree", inputs: ["menus", "query", "activePath", "pinnedKeys", "showPin", "pinVisibility", "presentation", "collapsible", "collapsedGroupKeys"], outputs: ["collapsedGroupKeysChange", "navigate", "togglePinned"] }, { kind: "component", type: SdLayoutUserMenuComponent, selector: "sd-layout-user-menu", inputs: ["userInfo", "signout", "changePassword", "updateProfile", "setting", "notification", "compact", "presentation"], outputs: ["opened", "closed"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2172
2182
  }
2173
2183
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdSidebarV2, decorators: [{
2174
2184
  type: Component,
@@ -2279,7 +2289,7 @@ class SdSidebarMobileV2 {
2279
2289
  this.#document.body.style.overflow = this.#previousBodyOverflow;
2280
2290
  }
2281
2291
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdSidebarMobileV2, deps: [], target: i0.ɵɵFactoryTarget.Component });
2282
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdSidebarMobileV2, isStandalone: true, selector: "sd-sidebar-mobile-v2", inputs: { menus: { classPropertyName: "menus", publicName: "menus", isSignal: true, isRequired: false, transformFunction: null }, userInfo: { classPropertyName: "userInfo", publicName: "userInfo", isSignal: true, isRequired: true, transformFunction: null }, sidebar: { classPropertyName: "sidebar", publicName: "sidebar", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"sd-sidebar-mobile-v2 d-flex flex-column\">\n <main class=\"sd-sidebar-mobile-v2__content flex-1 overflow-auto\">\n <ng-content></ng-content>\n </main>\n\n <nav class=\"sd-sidebar-mobile-v2__bar d-flex align-items-stretch bg-white border-top border-black200\" [attr.aria-label]=\"'core.module.layout.sidebar.primary-nav' | sdTranslate\">\n @for (menu of primaryMenus(); track menu.id || menu.title) {\n <button\n type=\"button\"\n class=\"sd-sidebar-mobile-v2__bar-action d-flex flex-column align-items-center justify-content-center gap-4 flex-1\"\n [attr.data-mobile-menu-key]=\"menu.id ? 'id:' + menu.id : null\"\n [attr.aria-label]=\"menu.tooltipTitle || menu.title || 'Menu'\"\n [attr.aria-expanded]=\"sheetGroupKey() === (menu.id ? 'id:' + menu.id : '') && isSheetOpen()\"\n (click)=\"activateMenu(menu, $event.currentTarget)\">\n @if (menu.iconUrl) {\n <img class=\"sd-sidebar-mobile-v2__icon\" [src]=\"menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon [name]=\"menu.icon || 'widgets'\"></sd-icon>\n }\n <span class=\"sd-sidebar-mobile-v2__label text-ellipsis\">{{ menu.tooltipTitle || menu.title }}</span>\n </button>\n }\n @if (overflowMenus().length) {\n <button\n type=\"button\"\n class=\"sd-sidebar-mobile-v2__bar-action d-flex flex-column align-items-center justify-content-center gap-4 flex-1\"\n [attr.aria-label]=\"'core.module.layout.sidebar.more-menu' | sdTranslate\"\n [attr.aria-expanded]=\"sheetGroupKey() === 'more' && isSheetOpen()\"\n (click)=\"openMore($event.currentTarget)\">\n <sd-icon name=\"more_horiz\"></sd-icon>\n <span class=\"sd-sidebar-mobile-v2__label\">{{ 'core.module.layout.sidebar.more' | sdTranslate }}</span>\n </button>\n }\n </nav>\n\n @if (isSheetOpen()) {\n <button type=\"button\" class=\"sd-sidebar-mobile-v2__backdrop\" [attr.aria-label]=\"'core.module.layout.sidebar.close-menu' | sdTranslate\" (click)=\"closeSheet()\"></button>\n <section\n data-v2-sheet\n class=\"sd-sidebar-mobile-v2__sheet d-flex flex-column bg-white rounded-top-16 mat-elevation-z8\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"sheetTitle()\"\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\"\n (keydown)=\"onSheetKeydown($event)\">\n <header class=\"d-flex align-items-center justify-content-between gap-8 px-16 py-12 border-bottom border-black200\">\n <span class=\"T16M text-ellipsis\">{{ sheetTitle() }}</span>\n <button\n type=\"button\"\n class=\"sd-sidebar-mobile-v2__close d-flex align-items-center justify-content-center\"\n [attr.aria-label]=\"'core.common.close' | sdTranslate\"\n (click)=\"closeSheet()\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n </header>\n <div class=\"d-flex flex-column gap-12 p-12 overflow-auto\">\n <sd-layout-user-menu presentation=\"mobile-inline\" [userInfo]=\"userInfo()\"></sd-layout-user-menu>\n <sd-layout-search-field\n [placeholder]=\"'core.module.layout.sidebar.search-in-menu' | sdTranslate\"\n [autoId]=\"'layout-v2-mobile-search'\"\n [model]=\"searchText()\"\n (sdChange)=\"searchText.set($event)\">\n </sd-layout-search-field>\n <sd-layout-menu-tree\n [menus]=\"sheetMenus()\"\n [query]=\"searchText()\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n pinVisibility=\"always\"\n (navigate)=\"onNavigate($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </div>\n </section>\n }\n</div>\n", styles: [":host{display:block}.sd-sidebar-mobile-v2{min-height:100dvh;padding-bottom:calc(64px + env(safe-area-inset-bottom));background:var(--sd-light)}.sd-sidebar-mobile-v2__bar{position:fixed;z-index:30;inset:auto 0 0;min-height:64px;padding-bottom:env(safe-area-inset-bottom)}.sd-sidebar-mobile-v2__bar-action,.sd-sidebar-mobile-v2__close{min-width:0;min-height:48px;border:0;background:transparent;color:var(--sd-black400);cursor:pointer}.sd-sidebar-mobile-v2__bar-action:hover,.sd-sidebar-mobile-v2__close:hover{color:var(--sd-primary);background:var(--sd-primary-light)}.sd-sidebar-mobile-v2__bar-action:focus-visible,.sd-sidebar-mobile-v2__close:focus-visible{outline:2px solid var(--sd-primary);outline-offset:-2px}.sd-sidebar-mobile-v2__label{max-width:72px;font-size:11px;line-height:14px}.sd-sidebar-mobile-v2__icon{width:22px;height:22px;object-fit:contain}.sd-sidebar-mobile-v2__backdrop{position:fixed;z-index:40;inset:0;border:0;background:color-mix(in srgb,var(--sd-black) 40%,transparent)}.sd-sidebar-mobile-v2__sheet{position:fixed;z-index:50;inset:auto 0 0;max-height:min(78dvh,720px);padding-bottom:env(safe-area-inset-bottom);overflow:hidden}@media(prefers-reduced-motion:reduce){.sd-sidebar-mobile-v2__sheet{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdLayoutSearchFieldComponent, selector: "sd-layout-search-field", inputs: ["model", "placeholder", "autoId", "appearance"], outputs: ["sdChange"] }, { kind: "component", type: SdLayoutMenuTreeComponent, selector: "sd-layout-menu-tree", inputs: ["menus", "query", "activePath", "pinnedKeys", "showPin", "pinVisibility", "presentation"], outputs: ["navigate", "togglePinned"] }, { kind: "component", type: SdLayoutUserMenuComponent, selector: "sd-layout-user-menu", inputs: ["userInfo", "signout", "changePassword", "updateProfile", "setting", "notification", "compact", "presentation"], outputs: ["opened", "closed"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2292
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdSidebarMobileV2, isStandalone: true, selector: "sd-sidebar-mobile-v2", inputs: { menus: { classPropertyName: "menus", publicName: "menus", isSignal: true, isRequired: false, transformFunction: null }, userInfo: { classPropertyName: "userInfo", publicName: "userInfo", isSignal: true, isRequired: true, transformFunction: null }, sidebar: { classPropertyName: "sidebar", publicName: "sidebar", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "<div class=\"sd-sidebar-mobile-v2 d-flex flex-column\">\n <main class=\"sd-sidebar-mobile-v2__content flex-1 overflow-auto\">\n <ng-content></ng-content>\n </main>\n\n <nav class=\"sd-sidebar-mobile-v2__bar d-flex align-items-stretch bg-white border-top border-black200\" [attr.aria-label]=\"'core.module.layout.sidebar.primary-nav' | sdTranslate\">\n @for (menu of primaryMenus(); track menu.id || menu.title) {\n <button\n type=\"button\"\n class=\"sd-sidebar-mobile-v2__bar-action d-flex flex-column align-items-center justify-content-center gap-4 flex-1\"\n [attr.data-mobile-menu-key]=\"menu.id ? 'id:' + menu.id : null\"\n [attr.aria-label]=\"menu.tooltipTitle || menu.title || 'Menu'\"\n [attr.aria-expanded]=\"sheetGroupKey() === (menu.id ? 'id:' + menu.id : '') && isSheetOpen()\"\n (click)=\"activateMenu(menu, $event.currentTarget)\">\n @if (menu.iconUrl) {\n <img class=\"sd-sidebar-mobile-v2__icon\" [src]=\"menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon [name]=\"menu.icon || 'widgets'\"></sd-icon>\n }\n <span class=\"sd-sidebar-mobile-v2__label text-ellipsis\">{{ menu.tooltipTitle || menu.title }}</span>\n </button>\n }\n @if (overflowMenus().length) {\n <button\n type=\"button\"\n class=\"sd-sidebar-mobile-v2__bar-action d-flex flex-column align-items-center justify-content-center gap-4 flex-1\"\n [attr.aria-label]=\"'core.module.layout.sidebar.more-menu' | sdTranslate\"\n [attr.aria-expanded]=\"sheetGroupKey() === 'more' && isSheetOpen()\"\n (click)=\"openMore($event.currentTarget)\">\n <sd-icon name=\"more_horiz\"></sd-icon>\n <span class=\"sd-sidebar-mobile-v2__label\">{{ 'core.module.layout.sidebar.more' | sdTranslate }}</span>\n </button>\n }\n </nav>\n\n @if (isSheetOpen()) {\n <button type=\"button\" class=\"sd-sidebar-mobile-v2__backdrop\" [attr.aria-label]=\"'core.module.layout.sidebar.close-menu' | sdTranslate\" (click)=\"closeSheet()\"></button>\n <section\n data-v2-sheet\n class=\"sd-sidebar-mobile-v2__sheet d-flex flex-column bg-white rounded-top-16 mat-elevation-z8\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"sheetTitle()\"\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\"\n (keydown)=\"onSheetKeydown($event)\">\n <header class=\"d-flex align-items-center justify-content-between gap-8 px-16 py-12 border-bottom border-black200\">\n <span class=\"T16M text-ellipsis\">{{ sheetTitle() }}</span>\n <button\n type=\"button\"\n class=\"sd-sidebar-mobile-v2__close d-flex align-items-center justify-content-center\"\n [attr.aria-label]=\"'core.common.close' | sdTranslate\"\n (click)=\"closeSheet()\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n </header>\n <div class=\"d-flex flex-column gap-12 p-12 overflow-auto\">\n <sd-layout-user-menu presentation=\"mobile-inline\" [userInfo]=\"userInfo()\"></sd-layout-user-menu>\n <sd-layout-search-field\n [placeholder]=\"'core.module.layout.sidebar.search-in-menu' | sdTranslate\"\n [autoId]=\"'layout-v2-mobile-search'\"\n [model]=\"searchText()\"\n (sdChange)=\"searchText.set($event)\">\n </sd-layout-search-field>\n <sd-layout-menu-tree\n [menus]=\"sheetMenus()\"\n [query]=\"searchText()\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n pinVisibility=\"always\"\n (navigate)=\"onNavigate($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </div>\n </section>\n }\n</div>\n", styles: [":host{display:block}.sd-sidebar-mobile-v2{min-height:100dvh;padding-bottom:calc(64px + env(safe-area-inset-bottom));background:var(--sd-light)}.sd-sidebar-mobile-v2__bar{position:fixed;z-index:30;inset:auto 0 0;min-height:64px;padding-bottom:env(safe-area-inset-bottom)}.sd-sidebar-mobile-v2__bar-action,.sd-sidebar-mobile-v2__close{min-width:0;min-height:48px;border:0;background:transparent;color:var(--sd-black400);cursor:pointer}.sd-sidebar-mobile-v2__bar-action:hover,.sd-sidebar-mobile-v2__close:hover{color:var(--sd-primary);background:var(--sd-primary-light)}.sd-sidebar-mobile-v2__bar-action:focus-visible,.sd-sidebar-mobile-v2__close:focus-visible{outline:2px solid var(--sd-primary);outline-offset:-2px}.sd-sidebar-mobile-v2__label{max-width:72px;font-size:11px;line-height:14px}.sd-sidebar-mobile-v2__icon{width:22px;height:22px;object-fit:contain}.sd-sidebar-mobile-v2__backdrop{position:fixed;z-index:40;inset:0;border:0;background:color-mix(in srgb,var(--sd-black) 40%,transparent)}.sd-sidebar-mobile-v2__sheet{position:fixed;z-index:50;inset:auto 0 0;max-height:min(78dvh,720px);padding-bottom:env(safe-area-inset-bottom);overflow:hidden}@media(prefers-reduced-motion:reduce){.sd-sidebar-mobile-v2__sheet{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdLayoutSearchFieldComponent, selector: "sd-layout-search-field", inputs: ["model", "placeholder", "autoId", "appearance"], outputs: ["sdChange"] }, { kind: "component", type: SdLayoutMenuTreeComponent, selector: "sd-layout-menu-tree", inputs: ["menus", "query", "activePath", "pinnedKeys", "showPin", "pinVisibility", "presentation", "collapsible", "collapsedGroupKeys"], outputs: ["collapsedGroupKeysChange", "navigate", "togglePinned"] }, { kind: "component", type: SdLayoutUserMenuComponent, selector: "sd-layout-user-menu", inputs: ["userInfo", "signout", "changePassword", "updateProfile", "setting", "notification", "compact", "presentation"], outputs: ["opened", "closed"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2283
2293
  }
2284
2294
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdSidebarMobileV2, decorators: [{
2285
2295
  type: Component,
@@ -2295,6 +2305,7 @@ class SdSidebarV3 {
2295
2305
  userInfo = input.required(...(ngDevMode ? [{ debugName: "userInfo" }] : []));
2296
2306
  sidebar = input.required(...(ngDevMode ? [{ debugName: "sidebar" }] : []));
2297
2307
  isCollapsed = signal(false, ...(ngDevMode ? [{ debugName: "isCollapsed" }] : []));
2308
+ collapsedGroupKeys = signal([], ...(ngDevMode ? [{ debugName: "collapsedGroupKeys" }] : []));
2298
2309
  searchText = signal('', ...(ngDevMode ? [{ debugName: "searchText" }] : []));
2299
2310
  activePath = signal(this.#router.url.split(/[?#]/, 1)[0] ?? '', ...(ngDevMode ? [{ debugName: "activePath" }] : []));
2300
2311
  searchResults = computed(() => searchMenuLeaves(this.menus(), this.searchText()), ...(ngDevMode ? [{ debugName: "searchResults" }] : []));
@@ -2321,6 +2332,25 @@ class SdSidebarV3 {
2321
2332
  if (event instanceof NavigationEnd)
2322
2333
  this.activePath.set(event.urlAfterRedirects.split(/[?#]/, 1)[0] ?? '');
2323
2334
  });
2335
+ effect(() => {
2336
+ const menus = this.menus();
2337
+ const activeMenuPath = resolveActiveMenuPath(menus, this.activePath());
2338
+ if (!activeMenuPath)
2339
+ return;
2340
+ const activeGroupKeys = new Set();
2341
+ const visit = (items, ancestors) => {
2342
+ for (const menu of items) {
2343
+ if (!('children' in menu) || !containsMenuPath(menu, activeMenuPath))
2344
+ continue;
2345
+ const key = getMenuStableKey(menu, ancestors);
2346
+ activeGroupKeys.add(key);
2347
+ visit(menu.children ?? [], [...ancestors, menu.title ?? key]);
2348
+ }
2349
+ };
2350
+ visit(menus, []);
2351
+ // why: Chỉ mở nhánh khi route/menu đổi; người dùng vẫn được đóng nhánh đang active.
2352
+ untracked(() => this.collapsedGroupKeys.update(keys => keys.filter(key => !activeGroupKeys.has(key))));
2353
+ });
2324
2354
  }
2325
2355
  toggleCollapsed() {
2326
2356
  this.isCollapsed.update(collapsed => !collapsed);
@@ -2331,6 +2361,7 @@ class SdSidebarV3 {
2331
2361
  this.navigateMenu(menu);
2332
2362
  else {
2333
2363
  this.isCollapsed.set(false);
2364
+ this.collapsedGroupKeys.update(keys => keys.filter(key => key !== getMenuStableKey(menu)));
2334
2365
  this.#navigationState.patchVersionState(3, { collapsed: false });
2335
2366
  }
2336
2367
  }
@@ -2353,11 +2384,11 @@ class SdSidebarV3 {
2353
2384
  this.#navigationState.togglePinned(menu);
2354
2385
  }
2355
2386
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdSidebarV3, deps: [], target: i0.ɵɵFactoryTarget.Component });
2356
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdSidebarV3, isStandalone: true, selector: "sd-sidebar-v3", inputs: { menus: { classPropertyName: "menus", publicName: "menus", isSignal: true, isRequired: false, transformFunction: null }, userInfo: { classPropertyName: "userInfo", publicName: "userInfo", isSignal: true, isRequired: true, transformFunction: null }, sidebar: { classPropertyName: "sidebar", publicName: "sidebar", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let collapsed = isCollapsed();\n@let configuration = sidebar();\n@let pinned = pinnedMenus();\n@let recent = recentMenus();\n<div class=\"sd-sidebar-v3\" [class.sd-sidebar-v3--collapsed]=\"collapsed\">\n <aside class=\"sd-sidebar-v3__drawer d-flex flex-column\" data-v3-sidebar [attr.data-collapsed]=\"collapsed\">\n <header\n data-v3-header\n class=\"sd-sidebar-v3__header d-flex align-items-center gap-8 p-12\"\n [class.sd-sidebar-v3__header--collapsed]=\"collapsed\"\n [class.justify-content-between]=\"!collapsed\"\n [class.justify-content-center]=\"collapsed\">\n @if (!collapsed) {\n <div data-v3-brand class=\"d-flex align-items-center gap-8 overflow-hidden\">\n @if (configuration.logoUrl) {\n <img class=\"sd-sidebar-v3__logo\" [src]=\"configuration.logoUrl\" alt=\"\" />\n } @else {\n <sd-icon name=\"apps\" fontSet=\"material-icons-outlined\" size=\"20px\"></sd-icon>\n }\n <span class=\"sd-sidebar-v3__title text-ellipsis\">{{ configuration.defaultTitle || 'Back Office' }}</span>\n </div>\n }\n <button\n type=\"button\"\n class=\"sd-sidebar-v3__icon-action d-flex align-items-center justify-content-center\"\n [attr.aria-label]=\"collapsed ? 'M\u1EDF r\u1ED9ng sidebar' : 'Thu g\u1ECDn sidebar'\"\n [attr.aria-expanded]=\"!collapsed\"\n (click)=\"toggleCollapsed()\">\n <sd-icon [name]=\"collapsed ? 'chevron_right' : 'chevron_left'\" size=\"20px\"></sd-icon>\n </button>\n </header>\n\n @if (collapsed) {\n <nav class=\"sd-sidebar-v3__navigation d-flex flex-column align-items-center gap-4 p-8 flex-1 overflow-auto\" aria-label=\"Menu thu g\u1ECDn\">\n @for (item of collapsedItems(); track item.key) {\n <button\n type=\"button\"\n class=\"sd-sidebar-v3__collapsed-action d-flex align-items-center justify-content-center\"\n [attr.aria-label]=\"item.title\"\n [attr.title]=\"item.title\"\n (click)=\"activateCollapsedMenu(item.menu)\">\n @if (item.menu.iconUrl) {\n <img class=\"sd-sidebar-v3__logo\" [src]=\"item.menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon [name]=\"item.menu.icon || 'widgets'\" fontSet=\"material-icons-outlined\" size=\"20px\"></sd-icon>\n }\n </button>\n }\n </nav>\n } @else {\n <div class=\"sd-sidebar-v3__search px-12 pb-12\">\n <sd-layout-search-field\n appearance=\"compact\"\n placeholder=\"T\u00ECm trong t\u1EA5t c\u1EA3 menu\"\n [autoId]=\"'layout-v3-global-search'\"\n [model]=\"searchText()\"\n (sdChange)=\"searchText.set($event)\">\n </sd-layout-search-field>\n </div>\n <div class=\"sd-sidebar-v3__navigation d-flex flex-column gap-16 flex-1 overflow-auto px-8 pb-12\">\n @if (pinned.length) {\n <section data-v3-pinned class=\"d-flex flex-column gap-4\">\n <h2 class=\"sd-sidebar-v3__section-title m-0\">{{ 'core.module.layout.sidebar.pinned' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n presentation=\"shortcuts\"\n [menus]=\"pinned\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n (navigate)=\"navigateMenu($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </section>\n }\n @if (recentConfiguration().enabled && recent.length) {\n <section data-v3-recent class=\"d-flex flex-column gap-4\">\n <h2 class=\"sd-sidebar-v3__section-title m-0\">{{ 'core.module.layout.sidebar.recent' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n presentation=\"shortcuts\"\n [menus]=\"recent\"\n [activePath]=\"activePath()\"\n [showPin]=\"false\"\n (navigate)=\"navigateMenu($event)\">\n </sd-layout-menu-tree>\n </section>\n }\n <section data-v3-all class=\"d-flex flex-column gap-4\">\n <h2 class=\"sd-sidebar-v3__section-title m-0\">{{ 'core.module.layout.sidebar.all-menu' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n presentation=\"hierarchy\"\n [menus]=\"menus()\"\n [query]=\"searchText()\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n (navigate)=\"navigateMenu($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </section>\n </div>\n }\n\n <div data-v3-footer class=\"sd-sidebar-v3__footer p-8\">\n <sd-layout-user-menu [userInfo]=\"userInfo()\" [compact]=\"collapsed\"></sd-layout-user-menu>\n </div>\n </aside>\n\n <main class=\"sd-sidebar-v3__content\">\n <ng-content></ng-content>\n </main>\n</div>\n", styles: [".sd-sidebar-v3{--sidebar-surface: var(--sd-white, #fff);--sidebar-line: color-mix(in srgb, var(--sd-border, #c4c6d0) 45%, var(--sidebar-surface));--sidebar-ink: var(--sd-text, #252c38);--sidebar-muted: var(--sd-text-secondary, #6b7280);min-height:100vh;background:var(--sd-light)}.sd-sidebar-v3__drawer{position:fixed;z-index:20;inset:0 auto 0 0;width:304px;box-sizing:border-box;background:var(--sidebar-surface);border-right:1px solid var(--sidebar-line);color:var(--sidebar-ink);transition:width .16s ease}.sd-sidebar-v3__header{flex-shrink:0;min-height:64px;box-sizing:border-box}.sd-sidebar-v3__title{font-size:16px;font-weight:600;line-height:22px;letter-spacing:-.2px}.sd-sidebar-v3__search{flex-shrink:0}.sd-sidebar-v3__navigation{min-height:0;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--sidebar-line) transparent}.sd-sidebar-v3__navigation section{flex-shrink:0}.sd-sidebar-v3__section-title{padding:4px 10px;font-size:11px;font-weight:500;line-height:16px;letter-spacing:.3px;color:var(--sidebar-muted)}.sd-sidebar-v3__footer{flex-shrink:0;border-top:1px solid var(--sidebar-line);background:var(--sidebar-surface)}.sd-sidebar-v3--collapsed .sd-sidebar-v3__drawer{width:72px}.sd-sidebar-v3__content{min-height:100vh;margin-left:304px;transition:margin-left .16s ease}.sd-sidebar-v3--collapsed .sd-sidebar-v3__content{margin-left:72px}.sd-sidebar-v3__icon-action,.sd-sidebar-v3__collapsed-action{width:40px;flex-shrink:0;height:40px;border:0;border-radius:7px;background:transparent;color:var(--sidebar-muted);cursor:pointer}@media(pointer:coarse){.sd-sidebar-v3__icon-action,.sd-sidebar-v3__collapsed-action{width:44px;height:44px}}.sd-sidebar-v3__icon-action:hover,.sd-sidebar-v3__collapsed-action:hover{color:var(--sd-primary);background:var(--sd-primary-light)}.sd-sidebar-v3__icon-action:focus-visible,.sd-sidebar-v3__collapsed-action:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-sidebar-v3__logo{width:28px;height:28px;object-fit:contain}@media(prefers-reduced-motion:reduce){.sd-sidebar-v3__drawer,.sd-sidebar-v3__content{transition:none}}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdLayoutSearchFieldComponent, selector: "sd-layout-search-field", inputs: ["model", "placeholder", "autoId", "appearance"], outputs: ["sdChange"] }, { kind: "component", type: SdLayoutMenuTreeComponent, selector: "sd-layout-menu-tree", inputs: ["menus", "query", "activePath", "pinnedKeys", "showPin", "pinVisibility", "presentation"], outputs: ["navigate", "togglePinned"] }, { kind: "component", type: SdLayoutUserMenuComponent, selector: "sd-layout-user-menu", inputs: ["userInfo", "signout", "changePassword", "updateProfile", "setting", "notification", "compact", "presentation"], outputs: ["opened", "closed"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2387
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdSidebarV3, isStandalone: true, selector: "sd-sidebar-v3", inputs: { menus: { classPropertyName: "menus", publicName: "menus", isSignal: true, isRequired: false, transformFunction: null }, userInfo: { classPropertyName: "userInfo", publicName: "userInfo", isSignal: true, isRequired: true, transformFunction: null }, sidebar: { classPropertyName: "sidebar", publicName: "sidebar", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: "@let collapsed = isCollapsed();\n@let configuration = sidebar();\n@let pinned = pinnedMenus();\n@let recent = recentMenus();\n<div class=\"sd-sidebar-v3\" [class.sd-sidebar-v3--collapsed]=\"collapsed\">\n <aside class=\"sd-sidebar-v3__drawer d-flex flex-column\" data-v3-sidebar [attr.data-collapsed]=\"collapsed\">\n <header\n data-v3-header\n class=\"sd-sidebar-v3__header d-flex align-items-center gap-8 p-12\"\n [class.sd-sidebar-v3__header--collapsed]=\"collapsed\"\n [class.justify-content-between]=\"!collapsed\"\n [class.justify-content-center]=\"collapsed\">\n @if (!collapsed) {\n <div data-v3-brand class=\"d-flex align-items-center gap-8 overflow-hidden\">\n @if (configuration.logoUrl) {\n <img class=\"sd-sidebar-v3__logo\" [src]=\"configuration.logoUrl\" alt=\"\" />\n } @else {\n <sd-icon name=\"apps\" fontSet=\"material-icons-outlined\" size=\"20px\"></sd-icon>\n }\n <span class=\"sd-sidebar-v3__title text-ellipsis\">{{ configuration.defaultTitle || 'Back Office' }}</span>\n </div>\n }\n <button\n type=\"button\"\n class=\"sd-sidebar-v3__icon-action d-flex align-items-center justify-content-center\"\n [attr.aria-label]=\"collapsed ? 'M\u1EDF r\u1ED9ng sidebar' : 'Thu g\u1ECDn sidebar'\"\n [attr.aria-expanded]=\"!collapsed\"\n (click)=\"toggleCollapsed()\">\n <sd-icon [name]=\"collapsed ? 'chevron_right' : 'chevron_left'\" size=\"20px\"></sd-icon>\n </button>\n </header>\n\n @if (collapsed) {\n <nav class=\"sd-sidebar-v3__navigation d-flex flex-column align-items-center gap-4 p-8 flex-1 overflow-auto\" aria-label=\"Menu thu g\u1ECDn\">\n @for (item of collapsedItems(); track item.key) {\n <button\n type=\"button\"\n class=\"sd-sidebar-v3__collapsed-action d-flex align-items-center justify-content-center\"\n [attr.aria-label]=\"item.title\"\n [attr.title]=\"item.title\"\n (click)=\"activateCollapsedMenu(item.menu)\">\n @if (item.menu.iconUrl) {\n <img class=\"sd-sidebar-v3__logo\" [src]=\"item.menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon [name]=\"item.menu.icon || 'widgets'\" fontSet=\"material-icons-outlined\" size=\"20px\"></sd-icon>\n }\n </button>\n }\n </nav>\n } @else {\n <div class=\"sd-sidebar-v3__search px-12 pb-12\">\n <sd-layout-search-field\n appearance=\"compact\"\n placeholder=\"T\u00ECm trong t\u1EA5t c\u1EA3 menu\"\n [autoId]=\"'layout-v3-global-search'\"\n [model]=\"searchText()\"\n (sdChange)=\"searchText.set($event)\">\n </sd-layout-search-field>\n </div>\n <div class=\"sd-sidebar-v3__navigation d-flex flex-column gap-16 flex-1 overflow-auto px-8 pb-12\">\n @if (pinned.length) {\n <section data-v3-pinned class=\"d-flex flex-column gap-4\">\n <h2 class=\"sd-sidebar-v3__section-title m-0\">{{ 'core.module.layout.sidebar.pinned' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n presentation=\"shortcuts\"\n [menus]=\"pinned\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n (navigate)=\"navigateMenu($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </section>\n }\n @if (recentConfiguration().enabled && recent.length) {\n <section data-v3-recent class=\"d-flex flex-column gap-4\">\n <h2 class=\"sd-sidebar-v3__section-title m-0\">{{ 'core.module.layout.sidebar.recent' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n presentation=\"shortcuts\"\n [menus]=\"recent\"\n [activePath]=\"activePath()\"\n [showPin]=\"false\"\n (navigate)=\"navigateMenu($event)\">\n </sd-layout-menu-tree>\n </section>\n }\n <section data-v3-all class=\"d-flex flex-column gap-4\">\n <h2 class=\"sd-sidebar-v3__section-title m-0\">{{ 'core.module.layout.sidebar.all-menu' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n presentation=\"hierarchy\"\n [collapsible]=\"true\"\n [(collapsedGroupKeys)]=\"collapsedGroupKeys\"\n [menus]=\"menus()\"\n [query]=\"searchText()\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n (navigate)=\"navigateMenu($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </section>\n </div>\n }\n\n <div data-v3-footer class=\"sd-sidebar-v3__footer p-8\">\n <sd-layout-user-menu [userInfo]=\"userInfo()\" [compact]=\"collapsed\"></sd-layout-user-menu>\n </div>\n </aside>\n\n <main class=\"sd-sidebar-v3__content\">\n <ng-content></ng-content>\n </main>\n</div>\n", styles: [".sd-sidebar-v3{--sidebar-surface: var(--sd-white, #fff);--sidebar-line: color-mix(in srgb, var(--sd-border, #c4c6d0) 45%, var(--sidebar-surface));--sidebar-ink: var(--sd-text, #252c38);--sidebar-muted: var(--sd-text-secondary, #6b7280);min-height:100vh;background:var(--sd-light)}.sd-sidebar-v3__drawer{position:fixed;z-index:20;inset:0 auto 0 0;width:304px;box-sizing:border-box;background:var(--sidebar-surface);border-right:1px solid var(--sidebar-line);color:var(--sidebar-ink);transition:width .16s ease}.sd-sidebar-v3__header{flex-shrink:0;min-height:64px;box-sizing:border-box}.sd-sidebar-v3__title{font-size:16px;font-weight:600;line-height:22px;letter-spacing:-.2px}.sd-sidebar-v3__search{flex-shrink:0}.sd-sidebar-v3__navigation{min-height:0;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--sidebar-line) transparent}.sd-sidebar-v3__navigation section{flex-shrink:0}.sd-sidebar-v3__section-title{padding:4px 10px;font-size:11px;font-weight:500;line-height:16px;letter-spacing:.3px;color:var(--sidebar-muted)}.sd-sidebar-v3__footer{flex-shrink:0;border-top:1px solid var(--sidebar-line);background:var(--sidebar-surface)}.sd-sidebar-v3--collapsed .sd-sidebar-v3__drawer{width:72px}.sd-sidebar-v3__content{min-height:100vh;margin-left:304px;transition:margin-left .16s ease}.sd-sidebar-v3--collapsed .sd-sidebar-v3__content{margin-left:72px}.sd-sidebar-v3__icon-action,.sd-sidebar-v3__collapsed-action{width:40px;flex-shrink:0;height:40px;border:0;border-radius:7px;background:transparent;color:var(--sidebar-muted);cursor:pointer}@media(pointer:coarse){.sd-sidebar-v3__icon-action,.sd-sidebar-v3__collapsed-action{width:44px;height:44px}}.sd-sidebar-v3__icon-action:hover,.sd-sidebar-v3__collapsed-action:hover{color:var(--sd-primary);background:var(--sd-primary-light)}.sd-sidebar-v3__icon-action:focus-visible,.sd-sidebar-v3__collapsed-action:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-sidebar-v3__logo{width:28px;height:28px;object-fit:contain}@media(prefers-reduced-motion:reduce){.sd-sidebar-v3__drawer,.sd-sidebar-v3__content{transition:none}}\n"], dependencies: [{ kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdLayoutSearchFieldComponent, selector: "sd-layout-search-field", inputs: ["model", "placeholder", "autoId", "appearance"], outputs: ["sdChange"] }, { kind: "component", type: SdLayoutMenuTreeComponent, selector: "sd-layout-menu-tree", inputs: ["menus", "query", "activePath", "pinnedKeys", "showPin", "pinVisibility", "presentation", "collapsible", "collapsedGroupKeys"], outputs: ["collapsedGroupKeysChange", "navigate", "togglePinned"] }, { kind: "component", type: SdLayoutUserMenuComponent, selector: "sd-layout-user-menu", inputs: ["userInfo", "signout", "changePassword", "updateProfile", "setting", "notification", "compact", "presentation"], outputs: ["opened", "closed"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2357
2388
  }
2358
2389
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdSidebarV3, decorators: [{
2359
2390
  type: Component,
2360
- args: [{ selector: 'sd-sidebar-v3', standalone: true, imports: [SdIcon, SdLayoutSearchFieldComponent, SdLayoutMenuTreeComponent, SdLayoutUserMenuComponent, SdTranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let collapsed = isCollapsed();\n@let configuration = sidebar();\n@let pinned = pinnedMenus();\n@let recent = recentMenus();\n<div class=\"sd-sidebar-v3\" [class.sd-sidebar-v3--collapsed]=\"collapsed\">\n <aside class=\"sd-sidebar-v3__drawer d-flex flex-column\" data-v3-sidebar [attr.data-collapsed]=\"collapsed\">\n <header\n data-v3-header\n class=\"sd-sidebar-v3__header d-flex align-items-center gap-8 p-12\"\n [class.sd-sidebar-v3__header--collapsed]=\"collapsed\"\n [class.justify-content-between]=\"!collapsed\"\n [class.justify-content-center]=\"collapsed\">\n @if (!collapsed) {\n <div data-v3-brand class=\"d-flex align-items-center gap-8 overflow-hidden\">\n @if (configuration.logoUrl) {\n <img class=\"sd-sidebar-v3__logo\" [src]=\"configuration.logoUrl\" alt=\"\" />\n } @else {\n <sd-icon name=\"apps\" fontSet=\"material-icons-outlined\" size=\"20px\"></sd-icon>\n }\n <span class=\"sd-sidebar-v3__title text-ellipsis\">{{ configuration.defaultTitle || 'Back Office' }}</span>\n </div>\n }\n <button\n type=\"button\"\n class=\"sd-sidebar-v3__icon-action d-flex align-items-center justify-content-center\"\n [attr.aria-label]=\"collapsed ? 'M\u1EDF r\u1ED9ng sidebar' : 'Thu g\u1ECDn sidebar'\"\n [attr.aria-expanded]=\"!collapsed\"\n (click)=\"toggleCollapsed()\">\n <sd-icon [name]=\"collapsed ? 'chevron_right' : 'chevron_left'\" size=\"20px\"></sd-icon>\n </button>\n </header>\n\n @if (collapsed) {\n <nav class=\"sd-sidebar-v3__navigation d-flex flex-column align-items-center gap-4 p-8 flex-1 overflow-auto\" aria-label=\"Menu thu g\u1ECDn\">\n @for (item of collapsedItems(); track item.key) {\n <button\n type=\"button\"\n class=\"sd-sidebar-v3__collapsed-action d-flex align-items-center justify-content-center\"\n [attr.aria-label]=\"item.title\"\n [attr.title]=\"item.title\"\n (click)=\"activateCollapsedMenu(item.menu)\">\n @if (item.menu.iconUrl) {\n <img class=\"sd-sidebar-v3__logo\" [src]=\"item.menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon [name]=\"item.menu.icon || 'widgets'\" fontSet=\"material-icons-outlined\" size=\"20px\"></sd-icon>\n }\n </button>\n }\n </nav>\n } @else {\n <div class=\"sd-sidebar-v3__search px-12 pb-12\">\n <sd-layout-search-field\n appearance=\"compact\"\n placeholder=\"T\u00ECm trong t\u1EA5t c\u1EA3 menu\"\n [autoId]=\"'layout-v3-global-search'\"\n [model]=\"searchText()\"\n (sdChange)=\"searchText.set($event)\">\n </sd-layout-search-field>\n </div>\n <div class=\"sd-sidebar-v3__navigation d-flex flex-column gap-16 flex-1 overflow-auto px-8 pb-12\">\n @if (pinned.length) {\n <section data-v3-pinned class=\"d-flex flex-column gap-4\">\n <h2 class=\"sd-sidebar-v3__section-title m-0\">{{ 'core.module.layout.sidebar.pinned' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n presentation=\"shortcuts\"\n [menus]=\"pinned\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n (navigate)=\"navigateMenu($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </section>\n }\n @if (recentConfiguration().enabled && recent.length) {\n <section data-v3-recent class=\"d-flex flex-column gap-4\">\n <h2 class=\"sd-sidebar-v3__section-title m-0\">{{ 'core.module.layout.sidebar.recent' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n presentation=\"shortcuts\"\n [menus]=\"recent\"\n [activePath]=\"activePath()\"\n [showPin]=\"false\"\n (navigate)=\"navigateMenu($event)\">\n </sd-layout-menu-tree>\n </section>\n }\n <section data-v3-all class=\"d-flex flex-column gap-4\">\n <h2 class=\"sd-sidebar-v3__section-title m-0\">{{ 'core.module.layout.sidebar.all-menu' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n presentation=\"hierarchy\"\n [menus]=\"menus()\"\n [query]=\"searchText()\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n (navigate)=\"navigateMenu($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </section>\n </div>\n }\n\n <div data-v3-footer class=\"sd-sidebar-v3__footer p-8\">\n <sd-layout-user-menu [userInfo]=\"userInfo()\" [compact]=\"collapsed\"></sd-layout-user-menu>\n </div>\n </aside>\n\n <main class=\"sd-sidebar-v3__content\">\n <ng-content></ng-content>\n </main>\n</div>\n", styles: [".sd-sidebar-v3{--sidebar-surface: var(--sd-white, #fff);--sidebar-line: color-mix(in srgb, var(--sd-border, #c4c6d0) 45%, var(--sidebar-surface));--sidebar-ink: var(--sd-text, #252c38);--sidebar-muted: var(--sd-text-secondary, #6b7280);min-height:100vh;background:var(--sd-light)}.sd-sidebar-v3__drawer{position:fixed;z-index:20;inset:0 auto 0 0;width:304px;box-sizing:border-box;background:var(--sidebar-surface);border-right:1px solid var(--sidebar-line);color:var(--sidebar-ink);transition:width .16s ease}.sd-sidebar-v3__header{flex-shrink:0;min-height:64px;box-sizing:border-box}.sd-sidebar-v3__title{font-size:16px;font-weight:600;line-height:22px;letter-spacing:-.2px}.sd-sidebar-v3__search{flex-shrink:0}.sd-sidebar-v3__navigation{min-height:0;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--sidebar-line) transparent}.sd-sidebar-v3__navigation section{flex-shrink:0}.sd-sidebar-v3__section-title{padding:4px 10px;font-size:11px;font-weight:500;line-height:16px;letter-spacing:.3px;color:var(--sidebar-muted)}.sd-sidebar-v3__footer{flex-shrink:0;border-top:1px solid var(--sidebar-line);background:var(--sidebar-surface)}.sd-sidebar-v3--collapsed .sd-sidebar-v3__drawer{width:72px}.sd-sidebar-v3__content{min-height:100vh;margin-left:304px;transition:margin-left .16s ease}.sd-sidebar-v3--collapsed .sd-sidebar-v3__content{margin-left:72px}.sd-sidebar-v3__icon-action,.sd-sidebar-v3__collapsed-action{width:40px;flex-shrink:0;height:40px;border:0;border-radius:7px;background:transparent;color:var(--sidebar-muted);cursor:pointer}@media(pointer:coarse){.sd-sidebar-v3__icon-action,.sd-sidebar-v3__collapsed-action{width:44px;height:44px}}.sd-sidebar-v3__icon-action:hover,.sd-sidebar-v3__collapsed-action:hover{color:var(--sd-primary);background:var(--sd-primary-light)}.sd-sidebar-v3__icon-action:focus-visible,.sd-sidebar-v3__collapsed-action:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-sidebar-v3__logo{width:28px;height:28px;object-fit:contain}@media(prefers-reduced-motion:reduce){.sd-sidebar-v3__drawer,.sd-sidebar-v3__content{transition:none}}\n"] }]
2391
+ args: [{ selector: 'sd-sidebar-v3', standalone: true, imports: [SdIcon, SdLayoutSearchFieldComponent, SdLayoutMenuTreeComponent, SdLayoutUserMenuComponent, SdTranslatePipe], changeDetection: ChangeDetectionStrategy.OnPush, template: "@let collapsed = isCollapsed();\n@let configuration = sidebar();\n@let pinned = pinnedMenus();\n@let recent = recentMenus();\n<div class=\"sd-sidebar-v3\" [class.sd-sidebar-v3--collapsed]=\"collapsed\">\n <aside class=\"sd-sidebar-v3__drawer d-flex flex-column\" data-v3-sidebar [attr.data-collapsed]=\"collapsed\">\n <header\n data-v3-header\n class=\"sd-sidebar-v3__header d-flex align-items-center gap-8 p-12\"\n [class.sd-sidebar-v3__header--collapsed]=\"collapsed\"\n [class.justify-content-between]=\"!collapsed\"\n [class.justify-content-center]=\"collapsed\">\n @if (!collapsed) {\n <div data-v3-brand class=\"d-flex align-items-center gap-8 overflow-hidden\">\n @if (configuration.logoUrl) {\n <img class=\"sd-sidebar-v3__logo\" [src]=\"configuration.logoUrl\" alt=\"\" />\n } @else {\n <sd-icon name=\"apps\" fontSet=\"material-icons-outlined\" size=\"20px\"></sd-icon>\n }\n <span class=\"sd-sidebar-v3__title text-ellipsis\">{{ configuration.defaultTitle || 'Back Office' }}</span>\n </div>\n }\n <button\n type=\"button\"\n class=\"sd-sidebar-v3__icon-action d-flex align-items-center justify-content-center\"\n [attr.aria-label]=\"collapsed ? 'M\u1EDF r\u1ED9ng sidebar' : 'Thu g\u1ECDn sidebar'\"\n [attr.aria-expanded]=\"!collapsed\"\n (click)=\"toggleCollapsed()\">\n <sd-icon [name]=\"collapsed ? 'chevron_right' : 'chevron_left'\" size=\"20px\"></sd-icon>\n </button>\n </header>\n\n @if (collapsed) {\n <nav class=\"sd-sidebar-v3__navigation d-flex flex-column align-items-center gap-4 p-8 flex-1 overflow-auto\" aria-label=\"Menu thu g\u1ECDn\">\n @for (item of collapsedItems(); track item.key) {\n <button\n type=\"button\"\n class=\"sd-sidebar-v3__collapsed-action d-flex align-items-center justify-content-center\"\n [attr.aria-label]=\"item.title\"\n [attr.title]=\"item.title\"\n (click)=\"activateCollapsedMenu(item.menu)\">\n @if (item.menu.iconUrl) {\n <img class=\"sd-sidebar-v3__logo\" [src]=\"item.menu.iconUrl\" alt=\"\" />\n } @else {\n <sd-icon [name]=\"item.menu.icon || 'widgets'\" fontSet=\"material-icons-outlined\" size=\"20px\"></sd-icon>\n }\n </button>\n }\n </nav>\n } @else {\n <div class=\"sd-sidebar-v3__search px-12 pb-12\">\n <sd-layout-search-field\n appearance=\"compact\"\n placeholder=\"T\u00ECm trong t\u1EA5t c\u1EA3 menu\"\n [autoId]=\"'layout-v3-global-search'\"\n [model]=\"searchText()\"\n (sdChange)=\"searchText.set($event)\">\n </sd-layout-search-field>\n </div>\n <div class=\"sd-sidebar-v3__navigation d-flex flex-column gap-16 flex-1 overflow-auto px-8 pb-12\">\n @if (pinned.length) {\n <section data-v3-pinned class=\"d-flex flex-column gap-4\">\n <h2 class=\"sd-sidebar-v3__section-title m-0\">{{ 'core.module.layout.sidebar.pinned' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n presentation=\"shortcuts\"\n [menus]=\"pinned\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n (navigate)=\"navigateMenu($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </section>\n }\n @if (recentConfiguration().enabled && recent.length) {\n <section data-v3-recent class=\"d-flex flex-column gap-4\">\n <h2 class=\"sd-sidebar-v3__section-title m-0\">{{ 'core.module.layout.sidebar.recent' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n presentation=\"shortcuts\"\n [menus]=\"recent\"\n [activePath]=\"activePath()\"\n [showPin]=\"false\"\n (navigate)=\"navigateMenu($event)\">\n </sd-layout-menu-tree>\n </section>\n }\n <section data-v3-all class=\"d-flex flex-column gap-4\">\n <h2 class=\"sd-sidebar-v3__section-title m-0\">{{ 'core.module.layout.sidebar.all-menu' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n presentation=\"hierarchy\"\n [collapsible]=\"true\"\n [(collapsedGroupKeys)]=\"collapsedGroupKeys\"\n [menus]=\"menus()\"\n [query]=\"searchText()\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n (navigate)=\"navigateMenu($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </section>\n </div>\n }\n\n <div data-v3-footer class=\"sd-sidebar-v3__footer p-8\">\n <sd-layout-user-menu [userInfo]=\"userInfo()\" [compact]=\"collapsed\"></sd-layout-user-menu>\n </div>\n </aside>\n\n <main class=\"sd-sidebar-v3__content\">\n <ng-content></ng-content>\n </main>\n</div>\n", styles: [".sd-sidebar-v3{--sidebar-surface: var(--sd-white, #fff);--sidebar-line: color-mix(in srgb, var(--sd-border, #c4c6d0) 45%, var(--sidebar-surface));--sidebar-ink: var(--sd-text, #252c38);--sidebar-muted: var(--sd-text-secondary, #6b7280);min-height:100vh;background:var(--sd-light)}.sd-sidebar-v3__drawer{position:fixed;z-index:20;inset:0 auto 0 0;width:304px;box-sizing:border-box;background:var(--sidebar-surface);border-right:1px solid var(--sidebar-line);color:var(--sidebar-ink);transition:width .16s ease}.sd-sidebar-v3__header{flex-shrink:0;min-height:64px;box-sizing:border-box}.sd-sidebar-v3__title{font-size:16px;font-weight:600;line-height:22px;letter-spacing:-.2px}.sd-sidebar-v3__search{flex-shrink:0}.sd-sidebar-v3__navigation{min-height:0;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:var(--sidebar-line) transparent}.sd-sidebar-v3__navigation section{flex-shrink:0}.sd-sidebar-v3__section-title{padding:4px 10px;font-size:11px;font-weight:500;line-height:16px;letter-spacing:.3px;color:var(--sidebar-muted)}.sd-sidebar-v3__footer{flex-shrink:0;border-top:1px solid var(--sidebar-line);background:var(--sidebar-surface)}.sd-sidebar-v3--collapsed .sd-sidebar-v3__drawer{width:72px}.sd-sidebar-v3__content{min-height:100vh;margin-left:304px;transition:margin-left .16s ease}.sd-sidebar-v3--collapsed .sd-sidebar-v3__content{margin-left:72px}.sd-sidebar-v3__icon-action,.sd-sidebar-v3__collapsed-action{width:40px;flex-shrink:0;height:40px;border:0;border-radius:7px;background:transparent;color:var(--sidebar-muted);cursor:pointer}@media(pointer:coarse){.sd-sidebar-v3__icon-action,.sd-sidebar-v3__collapsed-action{width:44px;height:44px}}.sd-sidebar-v3__icon-action:hover,.sd-sidebar-v3__collapsed-action:hover{color:var(--sd-primary);background:var(--sd-primary-light)}.sd-sidebar-v3__icon-action:focus-visible,.sd-sidebar-v3__collapsed-action:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-sidebar-v3__logo{width:28px;height:28px;object-fit:contain}@media(prefers-reduced-motion:reduce){.sd-sidebar-v3__drawer,.sd-sidebar-v3__content{transition:none}}\n"] }]
2361
2392
  }], ctorParameters: () => [], propDecorators: { menus: [{ type: i0.Input, args: [{ isSignal: true, alias: "menus", required: false }] }], userInfo: [{ type: i0.Input, args: [{ isSignal: true, alias: "userInfo", required: true }] }], sidebar: [{ type: i0.Input, args: [{ isSignal: true, alias: "sidebar", required: true }] }] } });
2362
2393
 
2363
2394
  class SdSidebarMobileV3 {
@@ -2455,7 +2486,7 @@ class SdSidebarMobileV3 {
2455
2486
  this.#document.body.style.overflow = this.#previousBodyOverflow;
2456
2487
  }
2457
2488
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdSidebarMobileV3, deps: [], target: i0.ɵɵFactoryTarget.Component });
2458
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdSidebarMobileV3, isStandalone: true, selector: "sd-sidebar-mobile-v3", inputs: { menus: { classPropertyName: "menus", publicName: "menus", isSignal: true, isRequired: false, transformFunction: null }, userInfo: { classPropertyName: "userInfo", publicName: "userInfo", isSignal: true, isRequired: true, transformFunction: null }, sidebar: { classPropertyName: "sidebar", publicName: "sidebar", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"sd-sidebar-mobile-v3 d-flex flex-column\">\n <header\n class=\"sd-sidebar-mobile-v3__topbar d-flex align-items-center justify-content-between gap-8 px-16 bg-white border-bottom border-black200\">\n <div class=\"d-flex align-items-center gap-8 overflow-hidden\">\n @if (sidebar().logoUrl) {\n <img class=\"sd-sidebar-mobile-v3__logo\" [src]=\"sidebar().logoUrl\" alt=\"\" />\n }\n <span class=\"T16M text-ellipsis\">{{ sidebar().defaultTitle || 'Back Office' }}</span>\n </div>\n <button\n #trigger\n type=\"button\"\n data-v3-mobile-trigger\n class=\"sd-sidebar-mobile-v3__icon-action d-flex align-items-center justify-content-center\"\n aria-label=\"M\u1EDF menu\"\n [attr.aria-expanded]=\"isDrawerOpen()\"\n (click)=\"openDrawer($event.currentTarget)\">\n <sd-icon name=\"menu\"></sd-icon>\n </button>\n </header>\n\n <main class=\"flex-1 overflow-auto\">\n <ng-content></ng-content>\n </main>\n\n @if (isDrawerOpen()) {\n <button type=\"button\" class=\"sd-sidebar-mobile-v3__backdrop\" aria-label=\"\u0110\u00F3ng menu\" (click)=\"closeFromBackdrop()\"></button>\n <aside\n class=\"sd-sidebar-mobile-v3__drawer d-flex flex-column bg-white mat-elevation-z8\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Menu ch\u00EDnh\"\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\"\n (keydown)=\"onDrawerKeydown($event)\">\n <header class=\"d-flex align-items-center justify-content-between gap-8 px-16 py-12 border-bottom border-black200\">\n <span class=\"T18M text-ellipsis\">{{ sidebar().defaultTitle || 'Back Office' }}</span>\n <button\n type=\"button\"\n class=\"sd-sidebar-mobile-v3__icon-action d-flex align-items-center justify-content-center\"\n aria-label=\"\u0110\u00F3ng menu\"\n (click)=\"closeFromBackdrop()\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n </header>\n <div class=\"sd-sidebar-mobile-v3__navigation d-flex flex-column gap-16 flex-1 overflow-auto p-12\">\n <sd-layout-user-menu presentation=\"mobile-inline\" [userInfo]=\"userInfo()\"></sd-layout-user-menu>\n <div class=\"sd-sidebar-mobile-v3__search bg-white\">\n <sd-layout-search-field\n placeholder=\"T\u00ECm trong t\u1EA5t c\u1EA3 menu\"\n [autoId]=\"'layout-v3-mobile-global-search'\"\n [model]=\"searchText()\"\n (sdChange)=\"searchText.set($event)\">\n </sd-layout-search-field>\n </div>\n @if (pinnedMenus().length) {\n <section data-v3-mobile-pinned class=\"d-flex flex-column gap-4\">\n <h2 class=\"T12M text-black400 px-12 m-0\">{{ 'core.module.layout.sidebar.pinned' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n [menus]=\"pinnedMenus()\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n pinVisibility=\"always\"\n (navigate)=\"navigateMenu($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </section>\n }\n @if (recentConfiguration().enabled && recentMenus().length) {\n <section data-v3-mobile-recent class=\"d-flex flex-column gap-4\">\n <h2 class=\"T12M text-black400 px-12 m-0\">{{ 'core.module.layout.sidebar.recent' | sdTranslate }}</h2>\n <sd-layout-menu-tree [menus]=\"recentMenus()\" [activePath]=\"activePath()\" [showPin]=\"false\" (navigate)=\"navigateMenu($event)\">\n </sd-layout-menu-tree>\n </section>\n }\n <section class=\"d-flex flex-column gap-4\">\n <h2 class=\"T12M text-black400 px-12 m-0\">{{ 'core.module.layout.sidebar.all-menu' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n [menus]=\"menus()\"\n [query]=\"searchText()\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n pinVisibility=\"always\"\n (navigate)=\"navigateMenu($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </section>\n </div>\n </aside>\n }\n</div>\n", styles: [":host{display:block}.sd-sidebar-mobile-v3{min-height:100dvh;background:var(--sd-light)}.sd-sidebar-mobile-v3__topbar{min-height:56px}.sd-sidebar-mobile-v3__icon-action{width:40px;height:40px;border:0;border-radius:8px;background:transparent;color:var(--sd-black500);cursor:pointer}.sd-sidebar-mobile-v3__icon-action:hover{color:var(--sd-primary);background:var(--sd-primary-light)}.sd-sidebar-mobile-v3__icon-action:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-sidebar-mobile-v3__logo{width:28px;height:28px;object-fit:contain}.sd-sidebar-mobile-v3__backdrop{position:fixed;z-index:40;inset:0;border:0;background:color-mix(in srgb,var(--sd-black) 40%,transparent)}.sd-sidebar-mobile-v3__drawer{position:fixed;z-index:50;inset:0 auto 0 0;width:min(88vw,360px);max-width:100%;padding-bottom:env(safe-area-inset-bottom)}.sd-sidebar-mobile-v3__search{position:sticky;z-index:2;top:-12px;margin:-12px;padding:12px;background:var(--sd-white, #fff)}@media(prefers-reduced-motion:reduce){.sd-sidebar-mobile-v3__drawer{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdLayoutSearchFieldComponent, selector: "sd-layout-search-field", inputs: ["model", "placeholder", "autoId", "appearance"], outputs: ["sdChange"] }, { kind: "component", type: SdLayoutMenuTreeComponent, selector: "sd-layout-menu-tree", inputs: ["menus", "query", "activePath", "pinnedKeys", "showPin", "pinVisibility", "presentation"], outputs: ["navigate", "togglePinned"] }, { kind: "component", type: SdLayoutUserMenuComponent, selector: "sd-layout-user-menu", inputs: ["userInfo", "signout", "changePassword", "updateProfile", "setting", "notification", "compact", "presentation"], outputs: ["opened", "closed"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2489
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.25", type: SdSidebarMobileV3, isStandalone: true, selector: "sd-sidebar-mobile-v3", inputs: { menus: { classPropertyName: "menus", publicName: "menus", isSignal: true, isRequired: false, transformFunction: null }, userInfo: { classPropertyName: "userInfo", publicName: "userInfo", isSignal: true, isRequired: true, transformFunction: null }, sidebar: { classPropertyName: "sidebar", publicName: "sidebar", isSignal: true, isRequired: true, transformFunction: null } }, viewQueries: [{ propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"sd-sidebar-mobile-v3 d-flex flex-column\">\n <header\n class=\"sd-sidebar-mobile-v3__topbar d-flex align-items-center justify-content-between gap-8 px-16 bg-white border-bottom border-black200\">\n <div class=\"d-flex align-items-center gap-8 overflow-hidden\">\n @if (sidebar().logoUrl) {\n <img class=\"sd-sidebar-mobile-v3__logo\" [src]=\"sidebar().logoUrl\" alt=\"\" />\n }\n <span class=\"T16M text-ellipsis\">{{ sidebar().defaultTitle || 'Back Office' }}</span>\n </div>\n <button\n #trigger\n type=\"button\"\n data-v3-mobile-trigger\n class=\"sd-sidebar-mobile-v3__icon-action d-flex align-items-center justify-content-center\"\n aria-label=\"M\u1EDF menu\"\n [attr.aria-expanded]=\"isDrawerOpen()\"\n (click)=\"openDrawer($event.currentTarget)\">\n <sd-icon name=\"menu\"></sd-icon>\n </button>\n </header>\n\n <main class=\"flex-1 overflow-auto\">\n <ng-content></ng-content>\n </main>\n\n @if (isDrawerOpen()) {\n <button type=\"button\" class=\"sd-sidebar-mobile-v3__backdrop\" aria-label=\"\u0110\u00F3ng menu\" (click)=\"closeFromBackdrop()\"></button>\n <aside\n class=\"sd-sidebar-mobile-v3__drawer d-flex flex-column bg-white mat-elevation-z8\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"Menu ch\u00EDnh\"\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"true\"\n (keydown)=\"onDrawerKeydown($event)\">\n <header class=\"d-flex align-items-center justify-content-between gap-8 px-16 py-12 border-bottom border-black200\">\n <span class=\"T18M text-ellipsis\">{{ sidebar().defaultTitle || 'Back Office' }}</span>\n <button\n type=\"button\"\n class=\"sd-sidebar-mobile-v3__icon-action d-flex align-items-center justify-content-center\"\n aria-label=\"\u0110\u00F3ng menu\"\n (click)=\"closeFromBackdrop()\">\n <sd-icon name=\"close\"></sd-icon>\n </button>\n </header>\n <div class=\"sd-sidebar-mobile-v3__navigation d-flex flex-column gap-16 flex-1 overflow-auto p-12\">\n <sd-layout-user-menu presentation=\"mobile-inline\" [userInfo]=\"userInfo()\"></sd-layout-user-menu>\n <div class=\"sd-sidebar-mobile-v3__search bg-white\">\n <sd-layout-search-field\n placeholder=\"T\u00ECm trong t\u1EA5t c\u1EA3 menu\"\n [autoId]=\"'layout-v3-mobile-global-search'\"\n [model]=\"searchText()\"\n (sdChange)=\"searchText.set($event)\">\n </sd-layout-search-field>\n </div>\n @if (pinnedMenus().length) {\n <section data-v3-mobile-pinned class=\"d-flex flex-column gap-4\">\n <h2 class=\"T12M text-black400 px-12 m-0\">{{ 'core.module.layout.sidebar.pinned' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n [menus]=\"pinnedMenus()\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n pinVisibility=\"always\"\n (navigate)=\"navigateMenu($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </section>\n }\n @if (recentConfiguration().enabled && recentMenus().length) {\n <section data-v3-mobile-recent class=\"d-flex flex-column gap-4\">\n <h2 class=\"T12M text-black400 px-12 m-0\">{{ 'core.module.layout.sidebar.recent' | sdTranslate }}</h2>\n <sd-layout-menu-tree [menus]=\"recentMenus()\" [activePath]=\"activePath()\" [showPin]=\"false\" (navigate)=\"navigateMenu($event)\">\n </sd-layout-menu-tree>\n </section>\n }\n <section class=\"d-flex flex-column gap-4\">\n <h2 class=\"T12M text-black400 px-12 m-0\">{{ 'core.module.layout.sidebar.all-menu' | sdTranslate }}</h2>\n <sd-layout-menu-tree\n [menus]=\"menus()\"\n [query]=\"searchText()\"\n [activePath]=\"activePath()\"\n [pinnedKeys]=\"pinnedKeys()\"\n pinVisibility=\"always\"\n (navigate)=\"navigateMenu($event)\"\n (togglePinned)=\"onTogglePinned($event)\">\n </sd-layout-menu-tree>\n </section>\n </div>\n </aside>\n }\n</div>\n", styles: [":host{display:block}.sd-sidebar-mobile-v3{min-height:100dvh;background:var(--sd-light)}.sd-sidebar-mobile-v3__topbar{min-height:56px}.sd-sidebar-mobile-v3__icon-action{width:40px;height:40px;border:0;border-radius:8px;background:transparent;color:var(--sd-black500);cursor:pointer}.sd-sidebar-mobile-v3__icon-action:hover{color:var(--sd-primary);background:var(--sd-primary-light)}.sd-sidebar-mobile-v3__icon-action:focus-visible{outline:2px solid var(--sd-primary);outline-offset:2px}.sd-sidebar-mobile-v3__logo{width:28px;height:28px;object-fit:contain}.sd-sidebar-mobile-v3__backdrop{position:fixed;z-index:40;inset:0;border:0;background:color-mix(in srgb,var(--sd-black) 40%,transparent)}.sd-sidebar-mobile-v3__drawer{position:fixed;z-index:50;inset:0 auto 0 0;width:min(88vw,360px);max-width:100%;padding-bottom:env(safe-area-inset-bottom)}.sd-sidebar-mobile-v3__search{position:sticky;z-index:2;top:-12px;margin:-12px;padding:12px;background:var(--sd-white, #fff)}@media(prefers-reduced-motion:reduce){.sd-sidebar-mobile-v3__drawer{transition:none}}\n"], dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1$2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: SdIcon, selector: "sd-icon", inputs: ["name", "fontIcon", "color", "set", "fontSet", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }, { kind: "component", type: SdLayoutSearchFieldComponent, selector: "sd-layout-search-field", inputs: ["model", "placeholder", "autoId", "appearance"], outputs: ["sdChange"] }, { kind: "component", type: SdLayoutMenuTreeComponent, selector: "sd-layout-menu-tree", inputs: ["menus", "query", "activePath", "pinnedKeys", "showPin", "pinVisibility", "presentation", "collapsible", "collapsedGroupKeys"], outputs: ["collapsedGroupKeysChange", "navigate", "togglePinned"] }, { kind: "component", type: SdLayoutUserMenuComponent, selector: "sd-layout-user-menu", inputs: ["userInfo", "signout", "changePassword", "updateProfile", "setting", "notification", "compact", "presentation"], outputs: ["opened", "closed"] }, { kind: "pipe", type: SdTranslatePipe, name: "sdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2459
2490
  }
2460
2491
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.25", ngImport: i0, type: SdSidebarMobileV3, decorators: [{
2461
2492
  type: Component,