@sdcorejs/angular 22.2.8 → 22.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs +4 -4
- package/fesm2022/sdcorejs-angular-components-form-generic.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-modal.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-modal.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs +35 -2
- package/fesm2022/sdcorejs-angular-components-query-builder.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-side-drawer.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-tab.mjs +2 -2
- package/fesm2022/sdcorejs-angular-components-tab.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components-table.mjs +243 -82
- package/fesm2022/sdcorejs-angular-components-table.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-components.mjs +0 -1
- package/fesm2022/sdcorejs-angular-components.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-directives.mjs +49 -11
- package/fesm2022/sdcorejs-angular-directives.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-forms-switch.mjs +6 -3
- package/fesm2022/sdcorejs-angular-forms-switch.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-i18n.mjs +5 -0
- package/fesm2022/sdcorejs-angular-i18n.mjs.map +1 -1
- package/fesm2022/sdcorejs-angular-modules-layout.mjs +44 -10
- package/fesm2022/sdcorejs-angular-modules-layout.mjs.map +1 -1
- package/package.json +1 -7
- package/types/sdcorejs-angular-components-form-generic.d.ts +1 -0
- package/types/sdcorejs-angular-components-query-builder.d.ts +3 -0
- package/types/sdcorejs-angular-components-table.d.ts +1 -1
- package/types/sdcorejs-angular-components.d.ts +0 -1
- package/types/sdcorejs-angular-forms-switch.d.ts +3 -2
- package/types/sdcorejs-angular-i18n.d.ts +1 -0
- package/types/sdcorejs-angular-modules-layout.d.ts +7 -1
- package/fesm2022/sdcorejs-angular-components-chart.mjs +0 -310
- package/fesm2022/sdcorejs-angular-components-chart.mjs.map +0 -1
- package/types/sdcorejs-angular-components-chart.d.ts +0 -65
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ElementRef, input, booleanAttribute, effect, ChangeDetectionStrategy, Component, InjectionToken, Injectable, signal, computed, Pipe, DestroyRef, viewChild, output, isSignal, untracked, NgModule } from '@angular/core';
|
|
2
|
+
import { inject, ElementRef, input, booleanAttribute, effect, ChangeDetectionStrategy, Component, InjectionToken, Injectable, signal, computed, Pipe, DestroyRef, viewChild, output, isSignal, 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';
|
|
@@ -2037,6 +2037,10 @@ class SdLayoutMenuTreeComponent {
|
|
|
2037
2037
|
/** V3 hierarchy and flat shortcuts are opt-in; V2/mobile retain the default presentation. */
|
|
2038
2038
|
presentation = input('default', /* @ts-ignore */
|
|
2039
2039
|
...(ngDevMode ? [{ debugName: "presentation" }] : /* istanbul ignore next */ []));
|
|
2040
|
+
collapsible = input(false, /* @ts-ignore */
|
|
2041
|
+
...(ngDevMode ? [{ debugName: "collapsible" }] : /* istanbul ignore next */ []));
|
|
2042
|
+
collapsedGroupKeys = model([], /* @ts-ignore */
|
|
2043
|
+
...(ngDevMode ? [{ debugName: "collapsedGroupKeys" }] : /* istanbul ignore next */ []));
|
|
2040
2044
|
structured = computed(() => this.presentation() !== 'default', /* @ts-ignore */
|
|
2041
2045
|
...(ngDevMode ? [{ debugName: "structured" }] : /* istanbul ignore next */ []));
|
|
2042
2046
|
iconFontSet = computed(() => (this.structured() ? 'material-icons-outlined' : undefined), /* @ts-ignore */
|
|
@@ -2050,6 +2054,8 @@ class SdLayoutMenuTreeComponent {
|
|
|
2050
2054
|
const query = this.query().trim();
|
|
2051
2055
|
const structured = this.structured();
|
|
2052
2056
|
const hierarchy = this.presentation() === 'hierarchy' && !query;
|
|
2057
|
+
const collapsible = this.collapsible() && !query;
|
|
2058
|
+
const collapsedKeys = new Set(this.collapsedGroupKeys());
|
|
2053
2059
|
const menus = query ? searchMenuLeaves(this.menus(), query) : this.menus();
|
|
2054
2060
|
// 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
|
|
2055
2061
|
const activeMenuPath = resolveActiveMenuPath(menus, this.activePath());
|
|
@@ -2063,6 +2069,7 @@ class SdLayoutMenuTreeComponent {
|
|
|
2063
2069
|
const path = 'path' in menu ? menu.path : '';
|
|
2064
2070
|
const title = menu.title ?? menu.tooltipTitle ?? '';
|
|
2065
2071
|
const isPinned = pinnedKeys.has(key);
|
|
2072
|
+
const isExpanded = !collapsible || !collapsedKeys.has(key);
|
|
2066
2073
|
nodes.push({
|
|
2067
2074
|
menu,
|
|
2068
2075
|
key,
|
|
@@ -2074,6 +2081,8 @@ class SdLayoutMenuTreeComponent {
|
|
|
2074
2081
|
showIcon: !structured || (hierarchy && depth === 0),
|
|
2075
2082
|
isRoot: depth === 0 && (!structured || hierarchy),
|
|
2076
2083
|
isGroup,
|
|
2084
|
+
isCollapsible: isGroup && collapsible,
|
|
2085
|
+
isExpanded,
|
|
2077
2086
|
isActive: !!path && path === activeMenuPath,
|
|
2078
2087
|
isPinned,
|
|
2079
2088
|
isPinVisible: alwaysShowPin || isPinned || hoveredPinKey === key,
|
|
@@ -2082,7 +2091,7 @@ class SdLayoutMenuTreeComponent {
|
|
|
2082
2091
|
// quyết định vị trí. Tính trong `nodes` computed nên tự cập nhật khi đổi ngôn ngữ.
|
|
2083
2092
|
pinLabel: this.#i18n.t(isPinned ? 'core.module.layout.menu.unpin' : 'core.module.layout.menu.pin', { title }),
|
|
2084
2093
|
});
|
|
2085
|
-
if (isGroup && 'children' in menu)
|
|
2094
|
+
if (isGroup && isExpanded && 'children' in menu)
|
|
2086
2095
|
append(menu.children ?? [], depth + 1, [...ancestors, menu.title ?? key]);
|
|
2087
2096
|
}
|
|
2088
2097
|
};
|
|
@@ -2097,6 +2106,9 @@ class SdLayoutMenuTreeComponent {
|
|
|
2097
2106
|
if ('path' in menu)
|
|
2098
2107
|
this.navigate.emit(menu);
|
|
2099
2108
|
}
|
|
2109
|
+
onToggleGroup(key) {
|
|
2110
|
+
this.collapsedGroupKeys.update(keys => (keys.includes(key) ? keys.filter(value => value !== key) : [...keys, key]));
|
|
2111
|
+
}
|
|
2100
2112
|
onTogglePinned(event, menu) {
|
|
2101
2113
|
event.stopPropagation();
|
|
2102
2114
|
this.togglePinned.emit(menu);
|
|
@@ -2122,12 +2134,12 @@ class SdLayoutMenuTreeComponent {
|
|
|
2122
2134
|
this.#pinHoverTimerId = undefined;
|
|
2123
2135
|
}
|
|
2124
2136
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdLayoutMenuTreeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2125
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", 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 });
|
|
2137
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", 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 });
|
|
2126
2138
|
}
|
|
2127
2139
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdLayoutMenuTreeComponent, decorators: [{
|
|
2128
2140
|
type: Component,
|
|
2129
|
-
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"] }]
|
|
2130
|
-
}], 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"] }] } });
|
|
2141
|
+
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"] }]
|
|
2142
|
+
}], 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"] }] } });
|
|
2131
2143
|
|
|
2132
2144
|
class SdLayoutSearchFieldComponent {
|
|
2133
2145
|
model = input('', /* @ts-ignore */
|
|
@@ -2273,7 +2285,7 @@ class SdSidebarV2 {
|
|
|
2273
2285
|
this.#navigationState.patchVersionState(2, { locked: false });
|
|
2274
2286
|
}
|
|
2275
2287
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdSidebarV2, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2276
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", 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 });
|
|
2288
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", 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 });
|
|
2277
2289
|
}
|
|
2278
2290
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdSidebarV2, decorators: [{
|
|
2279
2291
|
type: Component,
|
|
@@ -2395,7 +2407,7 @@ class SdSidebarMobileV2 {
|
|
|
2395
2407
|
this.#document.body.style.overflow = this.#previousBodyOverflow;
|
|
2396
2408
|
}
|
|
2397
2409
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdSidebarMobileV2, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2398
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", 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 });
|
|
2410
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", 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 });
|
|
2399
2411
|
}
|
|
2400
2412
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdSidebarMobileV2, decorators: [{
|
|
2401
2413
|
type: Component,
|
|
@@ -2415,6 +2427,8 @@ class SdSidebarV3 {
|
|
|
2415
2427
|
...(ngDevMode ? [{ debugName: "sidebar" }] : /* istanbul ignore next */ []));
|
|
2416
2428
|
isCollapsed = signal(false, /* @ts-ignore */
|
|
2417
2429
|
...(ngDevMode ? [{ debugName: "isCollapsed" }] : /* istanbul ignore next */ []));
|
|
2430
|
+
collapsedGroupKeys = signal([], /* @ts-ignore */
|
|
2431
|
+
...(ngDevMode ? [{ debugName: "collapsedGroupKeys" }] : /* istanbul ignore next */ []));
|
|
2418
2432
|
searchText = signal('', /* @ts-ignore */
|
|
2419
2433
|
...(ngDevMode ? [{ debugName: "searchText" }] : /* istanbul ignore next */ []));
|
|
2420
2434
|
activePath = signal(this.#router.url.split(/[?#]/, 1)[0] ?? '', /* @ts-ignore */
|
|
@@ -2446,6 +2460,25 @@ class SdSidebarV3 {
|
|
|
2446
2460
|
if (event instanceof NavigationEnd)
|
|
2447
2461
|
this.activePath.set(event.urlAfterRedirects.split(/[?#]/, 1)[0] ?? '');
|
|
2448
2462
|
});
|
|
2463
|
+
effect(() => {
|
|
2464
|
+
const menus = this.menus();
|
|
2465
|
+
const activeMenuPath = resolveActiveMenuPath(menus, this.activePath());
|
|
2466
|
+
if (!activeMenuPath)
|
|
2467
|
+
return;
|
|
2468
|
+
const activeGroupKeys = new Set();
|
|
2469
|
+
const visit = (items, ancestors) => {
|
|
2470
|
+
for (const menu of items) {
|
|
2471
|
+
if (!('children' in menu) || !containsMenuPath(menu, activeMenuPath))
|
|
2472
|
+
continue;
|
|
2473
|
+
const key = getMenuStableKey(menu, ancestors);
|
|
2474
|
+
activeGroupKeys.add(key);
|
|
2475
|
+
visit(menu.children ?? [], [...ancestors, menu.title ?? key]);
|
|
2476
|
+
}
|
|
2477
|
+
};
|
|
2478
|
+
visit(menus, []);
|
|
2479
|
+
// why: Chỉ mở nhánh khi route/menu đổi; người dùng vẫn được đóng nhánh đang active.
|
|
2480
|
+
untracked(() => this.collapsedGroupKeys.update(keys => keys.filter(key => !activeGroupKeys.has(key))));
|
|
2481
|
+
});
|
|
2449
2482
|
}
|
|
2450
2483
|
toggleCollapsed() {
|
|
2451
2484
|
this.isCollapsed.update(collapsed => !collapsed);
|
|
@@ -2456,6 +2489,7 @@ class SdSidebarV3 {
|
|
|
2456
2489
|
this.navigateMenu(menu);
|
|
2457
2490
|
else {
|
|
2458
2491
|
this.isCollapsed.set(false);
|
|
2492
|
+
this.collapsedGroupKeys.update(keys => keys.filter(key => key !== getMenuStableKey(menu)));
|
|
2459
2493
|
this.#navigationState.patchVersionState(3, { collapsed: false });
|
|
2460
2494
|
}
|
|
2461
2495
|
}
|
|
@@ -2478,11 +2512,11 @@ class SdSidebarV3 {
|
|
|
2478
2512
|
this.#navigationState.togglePinned(menu);
|
|
2479
2513
|
}
|
|
2480
2514
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdSidebarV3, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2481
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", 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 });
|
|
2515
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", 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 });
|
|
2482
2516
|
}
|
|
2483
2517
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdSidebarV3, decorators: [{
|
|
2484
2518
|
type: Component,
|
|
2485
|
-
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"] }]
|
|
2519
|
+
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"] }]
|
|
2486
2520
|
}], 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 }] }] } });
|
|
2487
2521
|
|
|
2488
2522
|
class SdSidebarMobileV3 {
|
|
@@ -2589,7 +2623,7 @@ class SdSidebarMobileV3 {
|
|
|
2589
2623
|
this.#document.body.style.overflow = this.#previousBodyOverflow;
|
|
2590
2624
|
}
|
|
2591
2625
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdSidebarMobileV3, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2592
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", 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 });
|
|
2626
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.5", 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 });
|
|
2593
2627
|
}
|
|
2594
2628
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.5", ngImport: i0, type: SdSidebarMobileV3, decorators: [{
|
|
2595
2629
|
type: Component,
|