@masterteam/components 0.0.279 → 0.0.281

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.
@@ -1 +1 @@
1
- {"version":3,"file":"masterteam-components-sidebar.mjs","sources":["../../../../packages/masterteam/components/sidebar/sidebar.ts","../../../../packages/masterteam/components/sidebar/sidebar.html","../../../../packages/masterteam/components/sidebar/masterteam-components-sidebar.ts"],"sourcesContent":["import {\r\n booleanAttribute,\r\n Component,\r\n computed,\r\n HostListener,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { TranslocoPipe } from '@jsverse/transloco';\r\nimport { Icon, MTIcon } from '@masterteam/icons';\r\nimport {\r\n NavigationEnd,\r\n Router,\r\n RouterLink,\r\n RouterLinkActive,\r\n} from '@angular/router';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { filter } from 'rxjs';\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport { Tooltip } from '@masterteam/components/tooltip';\r\n\r\nexport interface SidebarItem {\r\n id: string | number;\r\n title: string;\r\n icon?: MTIcon;\r\n routerLink?: any[] | string;\r\n /** Absolute or app-relative URL for cross-app links. */\r\n href?: string;\r\n /**\r\n * Optional nested items. When present the entry becomes a submenu:\r\n * an inline accordion while the sidebar is expanded, and a hover/focus\r\n * flyout panel beside the icon while the sidebar is collapsed.\r\n */\r\n children?: SidebarItem[];\r\n /** Show a placeholder spinner row while the children load lazily. */\r\n loading?: boolean;\r\n}\r\n\r\n/** Positioned state for the collapsed-mode flyout panel. */\r\ninterface FlyoutState {\r\n item: SidebarItem;\r\n top: number;\r\n left?: number;\r\n right?: number;\r\n maxHeight: number;\r\n}\r\n\r\nconst FLYOUT_GAP = 8;\r\nconst FLYOUT_MARGIN = 16;\r\nconst FLYOUT_MIN_HEIGHT = 200;\r\nconst FLYOUT_CLOSE_DELAY = 140;\r\n\r\n@Component({\r\n selector: 'mt-sidebar',\r\n standalone: true,\r\n imports: [RouterLinkActive, RouterLink, Icon, Tooltip, TranslocoPipe],\r\n templateUrl: './sidebar.html',\r\n styles: [\r\n `\r\n :host {\r\n display: block;\r\n height: 100%;\r\n min-height: 0;\r\n }\r\n\r\n .mt-sidebar-menu {\r\n scrollbar-width: thin;\r\n scrollbar-color: var(--p-surface-400) transparent;\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar {\r\n width: 6px;\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar-track {\r\n background: transparent;\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar-thumb {\r\n border-radius: 9999px;\r\n background: color-mix(in srgb, var(--p-surface-500) 58%, transparent);\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar-thumb:hover {\r\n background: color-mix(in srgb, var(--p-surface-600) 72%, transparent);\r\n }\r\n\r\n .mt-sidebar-menu-collapsed {\r\n scrollbar-color: var(--p-surface-500) transparent;\r\n }\r\n\r\n .mt-sidebar-menu-collapsed::-webkit-scrollbar {\r\n width: 2px;\r\n }\r\n\r\n .mt-sidebar-menu-collapsed::-webkit-scrollbar-thumb {\r\n background: color-mix(in srgb, var(--p-surface-600) 82%, transparent);\r\n }\r\n\r\n /* Collapsed-mode submenu flyout */\r\n .mt-sidebar-flyout {\r\n position: fixed;\r\n z-index: 1200;\r\n animation: mt-sidebar-flyout-in 140ms ease-out;\r\n }\r\n\r\n @keyframes mt-sidebar-flyout-in {\r\n from {\r\n opacity: 0;\r\n transform: translateY(2px) scale(0.98);\r\n }\r\n\r\n to {\r\n opacity: 1;\r\n transform: translateY(0) scale(1);\r\n }\r\n }\r\n\r\n @media (prefers-reduced-motion: reduce) {\r\n .mt-sidebar-flyout {\r\n animation: none;\r\n }\r\n }\r\n `,\r\n ],\r\n // A static `title=\"…\"` is also the HTML global title attribute - without\r\n // this the browser shows it as a native tooltip over the whole sidebar.\r\n host: { '[attr.title]': 'null' },\r\n})\r\nexport class Sidebar {\r\n private readonly router = inject(Router);\r\n private readonly dir = inject(Directionality, { optional: true });\r\n\r\n items = input<SidebarItem[]>([]);\r\n\r\n logo = input<string>();\r\n logoLink = input<string | any[]>();\r\n title = input<string>();\r\n subTitle = input<string>();\r\n\r\n bgColor = input<string>();\r\n bgImage = input<string>();\r\n bgRepeat = input<boolean, unknown>(false, { transform: booleanAttribute });\r\n iconsColor = input<string>('var(--p-text-color)');\r\n\r\n expanded = signal(false);\r\n expandedChange = output<boolean>();\r\n\r\n /** Parent items the user forced open / closed, overriding auto-expand. */\r\n private readonly openGroupIds = signal<Set<string | number>>(new Set());\r\n private readonly closedGroupIds = signal<Set<string | number>>(new Set());\r\n\r\n /** Currently anchored collapsed-mode flyout, if any. */\r\n readonly flyout = signal<FlyoutState | null>(null);\r\n private flyoutCloseTimer: ReturnType<typeof setTimeout> | null = null;\r\n\r\n /** Live URL so active sections auto-expand their submenu. */\r\n private readonly currentUrl = signal(this.router.url);\r\n\r\n protected readonly isRtl = computed(() => this.dir?.value === 'rtl');\r\n\r\n constructor() {\r\n this.router.events\r\n .pipe(\r\n filter(\r\n (event): event is NavigationEnd => event instanceof NavigationEnd,\r\n ),\r\n takeUntilDestroyed(),\r\n )\r\n .subscribe((event) => this.currentUrl.set(event.urlAfterRedirects));\r\n }\r\n\r\n toggleSidebar(): void {\r\n this.expanded.update((v) => !v);\r\n this.expandedChange.emit(this.expanded());\r\n this.closeFlyout();\r\n }\r\n\r\n hasChildren(item: SidebarItem): boolean {\r\n return !!item.children?.length || !!item.loading;\r\n }\r\n\r\n // ============================================================================\r\n // Expanded mode — inline accordion\r\n // ============================================================================\r\n\r\n isGroupOpen(item: SidebarItem): boolean {\r\n if (this.openGroupIds().has(item.id)) return true;\r\n if (this.closedGroupIds().has(item.id)) return false;\r\n return this.isSectionActive(item);\r\n }\r\n\r\n toggleGroup(item: SidebarItem, event?: Event): void {\r\n event?.stopPropagation();\r\n const open = new Set(this.openGroupIds());\r\n const closed = new Set(this.closedGroupIds());\r\n if (this.isGroupOpen(item)) {\r\n open.delete(item.id);\r\n closed.add(item.id);\r\n } else {\r\n closed.delete(item.id);\r\n open.add(item.id);\r\n }\r\n this.openGroupIds.set(open);\r\n this.closedGroupIds.set(closed);\r\n }\r\n\r\n /** A parent is \"active\" when the current route matches it or any child. */\r\n isSectionActive(item: SidebarItem): boolean {\r\n const url = this.currentUrl().split('?')[0];\r\n if (this.linkMatches(item.routerLink, url, true)) return true;\r\n return !!item.children?.some((child) =>\r\n this.linkMatches(child.routerLink, url),\r\n );\r\n }\r\n\r\n private linkMatches(\r\n link: SidebarItem['routerLink'],\r\n url: string,\r\n exact = false,\r\n ): boolean {\r\n const path = this.toPath(link);\r\n if (!path) return false;\r\n return exact ? url === path : url === path || url.startsWith(path + '/');\r\n }\r\n\r\n private toPath(link: SidebarItem['routerLink']): string {\r\n if (!link) return '';\r\n const parts = Array.isArray(link) ? link : [link];\r\n return ('/' + parts.map((p) => String(p)).join('/')).replace(\r\n /\\/{2,}/g,\r\n '/',\r\n );\r\n }\r\n\r\n // ============================================================================\r\n // Collapsed mode — flyout panel\r\n // ============================================================================\r\n\r\n openFlyout(item: SidebarItem, event: Event): void {\r\n if (this.expanded() || !this.hasChildren(item)) return;\r\n\r\n const anchor = event.currentTarget as HTMLElement | null;\r\n if (!anchor) return;\r\n\r\n this.cancelFlyoutClose();\r\n\r\n const rect = anchor.getBoundingClientRect();\r\n const viewportHeight = window.innerHeight;\r\n\r\n let top = rect.top;\r\n if (top + FLYOUT_MIN_HEIGHT > viewportHeight) {\r\n top = Math.max(\r\n FLYOUT_MARGIN,\r\n viewportHeight - FLYOUT_MIN_HEIGHT - FLYOUT_MARGIN,\r\n );\r\n }\r\n\r\n const maxHeight = Math.max(\r\n FLYOUT_MIN_HEIGHT,\r\n viewportHeight - top - FLYOUT_MARGIN,\r\n );\r\n\r\n this.flyout.set(\r\n this.isRtl()\r\n ? {\r\n item,\r\n top,\r\n right: window.innerWidth - rect.left + FLYOUT_GAP,\r\n maxHeight,\r\n }\r\n : { item, top, left: rect.right + FLYOUT_GAP, maxHeight },\r\n );\r\n }\r\n\r\n /** Keep the panel open while the pointer travels into it. */\r\n cancelFlyoutClose(): void {\r\n if (this.flyoutCloseTimer !== null) {\r\n clearTimeout(this.flyoutCloseTimer);\r\n this.flyoutCloseTimer = null;\r\n }\r\n }\r\n\r\n scheduleFlyoutClose(): void {\r\n this.cancelFlyoutClose();\r\n this.flyoutCloseTimer = setTimeout(\r\n () => this.flyout.set(null),\r\n FLYOUT_CLOSE_DELAY,\r\n );\r\n }\r\n\r\n closeFlyout(): void {\r\n this.cancelFlyoutClose();\r\n this.flyout.set(null);\r\n }\r\n\r\n @HostListener('window:resize')\r\n onViewportChange(): void {\r\n this.closeFlyout();\r\n }\r\n}\r\n","<div\r\n class=\"flex h-full min-h-0 flex-col overflow-hidden border-e-1 border-surface-300 bg-surface-200 transition-all duration-400 ease-in-out dark:bg-surface-800\"\r\n [style.width]=\"expanded() ? '18rem' : '4rem'\"\r\n>\r\n <div\r\n class=\"flex h-full min-h-0 flex-col gap-3 px-2 py-4\"\r\n [style.backgroundColor]=\"bgColor()\"\r\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\r\n [style.backgroundSize]=\"bgImage() && !bgRepeat() ? 'cover' : null\"\r\n [style.backgroundPosition]=\"bgImage() && !bgRepeat() ? 'center' : null\"\r\n [class.bg-no-repeat]=\"!bgRepeat()\"\r\n [class.bg-repeat]=\"bgRepeat()\"\r\n >\r\n <!-- Toggle Button & Branding -->\r\n <div class=\"flex shrink-0 items-center gap-2\">\r\n <button\r\n type=\"button\"\r\n size=\"large\"\r\n class=\"flex items-center justify-center w-[47px] h-[40px] hover:bg-surface-100 dark:hover:bg-surface-900 transition-colors rounded-xl cursor-pointer shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n (click)=\"toggleSidebar()\"\r\n >\r\n <mt-icon\r\n icon=\"general.menu-01\"\r\n class=\"text-lg transition-transform duration-400 ease-in-out\"\r\n [class.rotate-180]=\"expanded()\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </button>\r\n\r\n @if (logo() || title()) {\r\n <div\r\n class=\"flex items-center gap-2 overflow-hidden transition-all duration-400 ease-in-out\"\r\n [class.max-w-0]=\"!expanded()\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n @if (logo()) {\r\n <img\r\n [src]=\"logo()\"\r\n [alt]=\"'components.sidebar.logoAlt' | transloco\"\r\n class=\"h-8 shrink-0\"\r\n [routerLink]=\"logoLink()\"\r\n [class.cursor-pointer]=\"logoLink()\"\r\n />\r\n }\r\n @if (logo() && (title() || subTitle())) {\r\n <div\r\n class=\"h-6 w-[1px] bg-current opacity-30 shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n ></div>\r\n }\r\n @if (title() || subTitle()) {\r\n <div\r\n class=\"flex flex-col gap-0.5 min-w-0\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n <span class=\"text-sm font-semibold truncate\">{{ title() }}</span>\r\n @if (subTitle()) {\r\n <span class=\"text-xs opacity-70 truncate\">{{\r\n subTitle()\r\n }}</span>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"mt-sidebar-menu flex min-h-0 flex-1 flex-col gap-1 overflow-x-hidden overflow-y-auto overscroll-contain\"\r\n [class.mt-sidebar-menu-collapsed]=\"!expanded()\"\r\n [class.pr-1]=\"expanded()\"\r\n [class.pr-px]=\"!expanded()\"\r\n (scroll)=\"closeFlyout()\"\r\n >\r\n @for (item of items(); track item.id) {\r\n <!-- ============ Submenu parent (has children) ============ -->\r\n @if (hasChildren(item)) {\r\n @if (expanded()) {\r\n <!-- Expanded: inline accordion -->\r\n <div class=\"flex flex-col\">\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\r\n [style.color]=\"\r\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\r\n \"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n <div\r\n class=\"flex-1 truncate whitespace-nowrap text-sm font-medium\"\r\n >\r\n {{ item.title }}\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"me-2 grid h-6 w-6 shrink-0 cursor-pointer place-items-center rounded hover:bg-surface-300/60 dark:hover:bg-surface-700/60 transition-colors\"\r\n [attr.aria-expanded]=\"isGroupOpen(item)\"\r\n (click)=\"toggleGroup(item, $event)\"\r\n >\r\n <mt-icon\r\n icon=\"arrow.chevron-down\"\r\n class=\"text-xs transition-transform duration-300 ease-in-out\"\r\n [class.rotate-180]=\"isGroupOpen(item)\"\r\n [style.--mt-icon-prev-width]=\"'14px'\"\r\n [style.--mt-icon-prev-height]=\"'14px'\"\r\n />\r\n </button>\r\n </a>\r\n\r\n <div\r\n class=\"grid transition-[grid-template-rows] duration-300 ease-in-out\"\r\n [style.gridTemplateRows]=\"isGroupOpen(item) ? '1fr' : '0fr'\"\r\n >\r\n <div class=\"overflow-hidden\">\r\n <div class=\"flex flex-col gap-0.5 py-1\">\r\n @if (item.loading && !item.children?.length) {\r\n <div\r\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 text-sm opacity-70\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n <mt-icon\r\n icon=\"general.loading-01\"\r\n class=\"animate-spin\"\r\n />\r\n <span class=\"truncate\">{{\r\n \"components.sidebar.loading\" | transloco\r\n }}</span>\r\n </div>\r\n }\r\n @for (child of item.children ?? []; track child.id) {\r\n @if (child.href) {\r\n <a\r\n [href]=\"child.href\"\r\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\r\n mtTooltip=\"{{ child.title }}\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n @if (child.icon) {\r\n <mt-icon\r\n [icon]=\"child.icon\"\r\n class=\"shrink-0 opacity-80\"\r\n [style.--mt-icon-prev-width]=\"'16px'\"\r\n [style.--mt-icon-prev-height]=\"'16px'\"\r\n />\r\n } @else {\r\n <span\r\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\r\n ></span>\r\n }\r\n <span class=\"truncate text-sm\">{{\r\n child.title\r\n }}</span>\r\n </a>\r\n } @else {\r\n <a\r\n [routerLink]=\"child.routerLink\"\r\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\r\n #crla=\"routerLinkActive\"\r\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\r\n mtTooltip=\"{{ child.title }}\"\r\n [style.color]=\"\r\n crla.isActive\r\n ? 'var(--p-primary-500)'\r\n : iconsColor()\r\n \"\r\n >\r\n @if (child.icon) {\r\n <mt-icon\r\n [icon]=\"child.icon\"\r\n class=\"shrink-0 opacity-80\"\r\n [style.--mt-icon-prev-width]=\"'16px'\"\r\n [style.--mt-icon-prev-height]=\"'16px'\"\r\n />\r\n } @else {\r\n <span\r\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\r\n ></span>\r\n }\r\n <span class=\"truncate text-sm\">{{\r\n child.title\r\n }}</span>\r\n </a>\r\n }\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <!-- Collapsed: icon trigger + hover/focus flyout -->\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\r\n [style.color]=\"\r\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\r\n \"\r\n (mouseenter)=\"openFlyout(item, $event)\"\r\n (mouseleave)=\"scheduleFlyoutClose()\"\r\n (focus)=\"openFlyout(item, $event)\"\r\n (blur)=\"scheduleFlyoutClose()\"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n </a>\r\n }\r\n } @else {\r\n <!-- ============ Leaf item ============ -->\r\n @if (item.href) {\r\n <a\r\n [href]=\"item.href\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\r\n mtTooltip=\"{{ item.title }}\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n <div\r\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n {{ item.title }}\r\n </div>\r\n </a>\r\n } @else {\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\r\n #rla=\"routerLinkActive\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\r\n mtTooltip=\"{{ item.title }}\"\r\n [style.color]=\"\r\n rla.isActive ? 'var(--p-primary-500)' : iconsColor()\r\n \"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n <div\r\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n {{ item.title }}\r\n </div>\r\n </a>\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- ============ Collapsed-mode flyout panel ============ -->\r\n@if (flyout(); as fly) {\r\n <div\r\n class=\"mt-sidebar-flyout flex w-60 flex-col overflow-hidden rounded-xl border border-surface-300 bg-surface-0 shadow-2xl dark:border-surface-700 dark:bg-surface-800\"\r\n [style.top.px]=\"fly.top\"\r\n [style.left.px]=\"fly.left\"\r\n [style.right.px]=\"fly.right\"\r\n (mouseenter)=\"cancelFlyoutClose()\"\r\n (mouseleave)=\"scheduleFlyoutClose()\"\r\n >\r\n <div\r\n class=\"flex items-center gap-2 border-b border-surface-200 px-4 py-2.5 dark:border-surface-700\"\r\n >\r\n @if (fly.item.icon) {\r\n <mt-icon\r\n [icon]=\"fly.item.icon\"\r\n class=\"text-primary-500 shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'18px'\"\r\n [style.--mt-icon-prev-height]=\"'18px'\"\r\n />\r\n }\r\n <span class=\"truncate text-sm font-semibold\">{{ fly.item.title }}</span>\r\n </div>\r\n\r\n <div\r\n class=\"mt-sidebar-menu flex flex-col gap-0.5 overflow-y-auto p-1.5\"\r\n [style.maxHeight.px]=\"fly.maxHeight\"\r\n >\r\n @if (fly.item.loading && !fly.item.children?.length) {\r\n <div class=\"flex items-center gap-2 px-3 py-2 text-sm text-muted-color\">\r\n <mt-icon icon=\"general.loading-01\" class=\"animate-spin\" />\r\n <span>{{ \"components.sidebar.loading\" | transloco }}</span>\r\n </div>\r\n } @else if (!fly.item.children?.length) {\r\n <div class=\"px-3 py-2 text-sm text-muted-color\">\r\n {{ \"components.sidebar.empty\" | transloco }}\r\n </div>\r\n }\r\n @for (child of fly.item.children ?? []; track child.id) {\r\n @if (child.href) {\r\n <a\r\n [href]=\"child.href\"\r\n class=\"flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors\"\r\n (click)=\"closeFlyout()\"\r\n >\r\n @if (child.icon) {\r\n <mt-icon\r\n [icon]=\"child.icon\"\r\n class=\"shrink-0 opacity-80\"\r\n [style.--mt-icon-prev-width]=\"'16px'\"\r\n [style.--mt-icon-prev-height]=\"'16px'\"\r\n />\r\n } @else {\r\n <span\r\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\r\n ></span>\r\n }\r\n <span class=\"truncate\">{{ child.title }}</span>\r\n </a>\r\n } @else {\r\n <a\r\n [routerLink]=\"child.routerLink\"\r\n routerLinkActive=\"bg-primary-50 text-(--p-primary-500) dark:bg-primary-900\"\r\n class=\"flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors\"\r\n (click)=\"closeFlyout()\"\r\n >\r\n @if (child.icon) {\r\n <mt-icon\r\n [icon]=\"child.icon\"\r\n class=\"shrink-0 opacity-80\"\r\n [style.--mt-icon-prev-width]=\"'16px'\"\r\n [style.--mt-icon-prev-height]=\"'16px'\"\r\n />\r\n } @else {\r\n <span\r\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\r\n ></span>\r\n }\r\n <span class=\"truncate\">{{ child.title }}</span>\r\n </a>\r\n }\r\n }\r\n </div>\r\n </div>\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAiDA,MAAM,UAAU,G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,YAAY,cACV,IAAI,EAAA,OAAA,EACP,CAAC,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,EAAA,IAAA,EAwE/D,EAAE,cAAc,EAAE,MAAM,EAAE,EAAA,QAAA,EAAA,ukgBAAA,EAAA,MAAA,EAAA,CAAA,6gCAAA,CAAA,EAAA;;sBAyK/B,YAAY;uBAAC,eAAe;;;AE1S/B;;AAEG;;;;"}
1
+ {"version":3,"file":"masterteam-components-sidebar.mjs","sources":["../../../../packages/masterteam/components/sidebar/sidebar.ts","../../../../packages/masterteam/components/sidebar/sidebar.html","../../../../packages/masterteam/components/sidebar/masterteam-components-sidebar.ts"],"sourcesContent":["import {\r\n booleanAttribute,\r\n Component,\r\n computed,\r\n HostListener,\r\n inject,\r\n input,\r\n output,\r\n signal,\r\n} from '@angular/core';\r\nimport { TranslocoPipe } from '@jsverse/transloco';\r\nimport { Icon, MTIcon } from '@masterteam/icons';\r\nimport {\r\n NavigationEnd,\r\n Router,\r\n RouterLink,\r\n RouterLinkActive,\r\n} from '@angular/router';\r\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\r\nimport { filter } from 'rxjs';\r\nimport { Directionality } from '@angular/cdk/bidi';\r\nimport { Tooltip } from '@masterteam/components/tooltip';\r\n\r\nexport interface SidebarItem {\r\n id: string | number;\r\n title: string;\r\n icon?: MTIcon;\r\n routerLink?: any[] | string;\r\n /** Absolute or app-relative URL for cross-app links. */\r\n href?: string;\r\n /**\r\n * Optional nested items. When present the entry becomes a submenu:\r\n * an inline accordion while the sidebar is expanded, and a hover/focus\r\n * flyout panel beside the icon while the sidebar is collapsed.\r\n */\r\n children?: SidebarItem[];\r\n /** Show a placeholder spinner row while the children load lazily. */\r\n loading?: boolean;\r\n}\r\n\r\n/** Positioned state for the collapsed-mode flyout panel. */\r\ninterface FlyoutState {\r\n item: SidebarItem;\r\n top: number;\r\n left?: number;\r\n right?: number;\r\n maxHeight: number;\r\n}\r\n\r\nconst FLYOUT_GAP = 8;\r\nconst FLYOUT_MARGIN = 16;\r\nconst FLYOUT_MIN_HEIGHT = 200;\r\nconst FLYOUT_CLOSE_DELAY = 140;\r\n\r\n@Component({\r\n selector: 'mt-sidebar',\r\n standalone: true,\r\n imports: [RouterLinkActive, RouterLink, Icon, Tooltip, TranslocoPipe],\r\n templateUrl: './sidebar.html',\r\n styles: [\r\n `\r\n :host {\r\n display: block;\r\n height: 100%;\r\n min-height: 0;\r\n }\r\n\r\n .mt-sidebar-menu {\r\n scrollbar-width: thin;\r\n scrollbar-color: var(--p-surface-400) transparent;\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar {\r\n width: 6px;\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar-track {\r\n background: transparent;\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar-thumb {\r\n border-radius: 9999px;\r\n background: color-mix(in srgb, var(--p-surface-500) 58%, transparent);\r\n }\r\n\r\n .mt-sidebar-menu::-webkit-scrollbar-thumb:hover {\r\n background: color-mix(in srgb, var(--p-surface-600) 72%, transparent);\r\n }\r\n\r\n .mt-sidebar-menu-collapsed {\r\n scrollbar-color: var(--p-surface-500) transparent;\r\n }\r\n\r\n .mt-sidebar-menu-collapsed::-webkit-scrollbar {\r\n width: 2px;\r\n }\r\n\r\n .mt-sidebar-menu-collapsed::-webkit-scrollbar-thumb {\r\n background: color-mix(in srgb, var(--p-surface-600) 82%, transparent);\r\n }\r\n\r\n /* Collapsed-mode submenu flyout */\r\n .mt-sidebar-flyout {\r\n position: fixed;\r\n z-index: 1200;\r\n animation: mt-sidebar-flyout-in 140ms ease-out;\r\n }\r\n\r\n @keyframes mt-sidebar-flyout-in {\r\n from {\r\n opacity: 0;\r\n transform: translateY(2px) scale(0.98);\r\n }\r\n\r\n to {\r\n opacity: 1;\r\n transform: translateY(0) scale(1);\r\n }\r\n }\r\n\r\n @media (prefers-reduced-motion: reduce) {\r\n .mt-sidebar-flyout {\r\n animation: none;\r\n }\r\n }\r\n `,\r\n ],\r\n // A static `title=\"…\"` is also the HTML global title attribute - without\r\n // this the browser shows it as a native tooltip over the whole sidebar.\r\n host: { '[attr.title]': 'null' },\r\n})\r\nexport class Sidebar {\r\n private readonly router = inject(Router);\r\n private readonly dir = inject(Directionality, { optional: true });\r\n\r\n items = input<SidebarItem[]>([]);\r\n\r\n logo = input<string>();\r\n logoLink = input<string | any[]>();\r\n title = input<string>();\r\n subTitle = input<string>();\r\n\r\n // Each half renders only when it carries text. A host can legitimately have\r\n // one and not the other — clearing the tagline in the branding editor is how\r\n // a tenant hides it — and an empty `<span>` still holds a line box, which\r\n // left the surviving half sitting off-centre.\r\n protected readonly hasTitle = computed(() => !!this.title()?.trim());\r\n protected readonly hasSubTitle = computed(() => !!this.subTitle()?.trim());\r\n protected readonly hasBrandText = computed(\r\n () => this.hasTitle() || this.hasSubTitle(),\r\n );\r\n\r\n bgColor = input<string>();\r\n bgImage = input<string>();\r\n bgRepeat = input<boolean, unknown>(false, { transform: booleanAttribute });\r\n iconsColor = input<string>('var(--p-text-color)');\r\n\r\n expanded = signal(false);\r\n expandedChange = output<boolean>();\r\n\r\n /** Parent items the user forced open / closed, overriding auto-expand. */\r\n private readonly openGroupIds = signal<Set<string | number>>(new Set());\r\n private readonly closedGroupIds = signal<Set<string | number>>(new Set());\r\n\r\n /** Currently anchored collapsed-mode flyout, if any. */\r\n readonly flyout = signal<FlyoutState | null>(null);\r\n private flyoutCloseTimer: ReturnType<typeof setTimeout> | null = null;\r\n\r\n /** Live URL so active sections auto-expand their submenu. */\r\n private readonly currentUrl = signal(this.router.url);\r\n\r\n protected readonly isRtl = computed(() => this.dir?.value === 'rtl');\r\n\r\n constructor() {\r\n this.router.events\r\n .pipe(\r\n filter(\r\n (event): event is NavigationEnd => event instanceof NavigationEnd,\r\n ),\r\n takeUntilDestroyed(),\r\n )\r\n .subscribe((event) => this.currentUrl.set(event.urlAfterRedirects));\r\n }\r\n\r\n toggleSidebar(): void {\r\n this.expanded.update((v) => !v);\r\n this.expandedChange.emit(this.expanded());\r\n this.closeFlyout();\r\n }\r\n\r\n hasChildren(item: SidebarItem): boolean {\r\n return !!item.children?.length || !!item.loading;\r\n }\r\n\r\n // ============================================================================\r\n // Expanded mode — inline accordion\r\n // ============================================================================\r\n\r\n isGroupOpen(item: SidebarItem): boolean {\r\n if (this.openGroupIds().has(item.id)) return true;\r\n if (this.closedGroupIds().has(item.id)) return false;\r\n return this.isSectionActive(item);\r\n }\r\n\r\n toggleGroup(item: SidebarItem, event?: Event): void {\r\n event?.stopPropagation();\r\n const open = new Set(this.openGroupIds());\r\n const closed = new Set(this.closedGroupIds());\r\n if (this.isGroupOpen(item)) {\r\n open.delete(item.id);\r\n closed.add(item.id);\r\n } else {\r\n closed.delete(item.id);\r\n open.add(item.id);\r\n }\r\n this.openGroupIds.set(open);\r\n this.closedGroupIds.set(closed);\r\n }\r\n\r\n /** A parent is \"active\" when the current route matches it or any child. */\r\n isSectionActive(item: SidebarItem): boolean {\r\n const url = this.currentUrl().split('?')[0];\r\n if (this.linkMatches(item.routerLink, url, true)) return true;\r\n return !!item.children?.some((child) =>\r\n this.linkMatches(child.routerLink, url),\r\n );\r\n }\r\n\r\n private linkMatches(\r\n link: SidebarItem['routerLink'],\r\n url: string,\r\n exact = false,\r\n ): boolean {\r\n const path = this.toPath(link);\r\n if (!path) return false;\r\n return exact ? url === path : url === path || url.startsWith(path + '/');\r\n }\r\n\r\n private toPath(link: SidebarItem['routerLink']): string {\r\n if (!link) return '';\r\n const parts = Array.isArray(link) ? link : [link];\r\n return ('/' + parts.map((p) => String(p)).join('/')).replace(\r\n /\\/{2,}/g,\r\n '/',\r\n );\r\n }\r\n\r\n // ============================================================================\r\n // Collapsed mode — flyout panel\r\n // ============================================================================\r\n\r\n openFlyout(item: SidebarItem, event: Event): void {\r\n if (this.expanded() || !this.hasChildren(item)) return;\r\n\r\n const anchor = event.currentTarget as HTMLElement | null;\r\n if (!anchor) return;\r\n\r\n this.cancelFlyoutClose();\r\n\r\n const rect = anchor.getBoundingClientRect();\r\n const viewportHeight = window.innerHeight;\r\n\r\n let top = rect.top;\r\n if (top + FLYOUT_MIN_HEIGHT > viewportHeight) {\r\n top = Math.max(\r\n FLYOUT_MARGIN,\r\n viewportHeight - FLYOUT_MIN_HEIGHT - FLYOUT_MARGIN,\r\n );\r\n }\r\n\r\n const maxHeight = Math.max(\r\n FLYOUT_MIN_HEIGHT,\r\n viewportHeight - top - FLYOUT_MARGIN,\r\n );\r\n\r\n this.flyout.set(\r\n this.isRtl()\r\n ? {\r\n item,\r\n top,\r\n right: window.innerWidth - rect.left + FLYOUT_GAP,\r\n maxHeight,\r\n }\r\n : { item, top, left: rect.right + FLYOUT_GAP, maxHeight },\r\n );\r\n }\r\n\r\n /** Keep the panel open while the pointer travels into it. */\r\n cancelFlyoutClose(): void {\r\n if (this.flyoutCloseTimer !== null) {\r\n clearTimeout(this.flyoutCloseTimer);\r\n this.flyoutCloseTimer = null;\r\n }\r\n }\r\n\r\n scheduleFlyoutClose(): void {\r\n this.cancelFlyoutClose();\r\n this.flyoutCloseTimer = setTimeout(\r\n () => this.flyout.set(null),\r\n FLYOUT_CLOSE_DELAY,\r\n );\r\n }\r\n\r\n closeFlyout(): void {\r\n this.cancelFlyoutClose();\r\n this.flyout.set(null);\r\n }\r\n\r\n @HostListener('window:resize')\r\n onViewportChange(): void {\r\n this.closeFlyout();\r\n }\r\n}\r\n","<div\r\n class=\"flex h-full min-h-0 flex-col overflow-hidden border-e-1 border-surface-300 bg-surface-200 transition-all duration-400 ease-in-out dark:bg-surface-800\"\r\n [style.width]=\"expanded() ? '18rem' : '4rem'\"\r\n>\r\n <div\r\n class=\"flex h-full min-h-0 flex-col gap-3 px-2 py-4\"\r\n [style.backgroundColor]=\"bgColor()\"\r\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\r\n [style.backgroundSize]=\"bgImage() && !bgRepeat() ? 'cover' : null\"\r\n [style.backgroundPosition]=\"bgImage() && !bgRepeat() ? 'center' : null\"\r\n [class.bg-no-repeat]=\"!bgRepeat()\"\r\n [class.bg-repeat]=\"bgRepeat()\"\r\n >\r\n <!-- Toggle Button & Branding -->\r\n <div class=\"flex shrink-0 items-center gap-2\">\r\n <button\r\n type=\"button\"\r\n size=\"large\"\r\n class=\"flex items-center justify-center w-[47px] h-[40px] hover:bg-surface-100 dark:hover:bg-surface-900 transition-colors rounded-xl cursor-pointer shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n (click)=\"toggleSidebar()\"\r\n >\r\n <mt-icon\r\n icon=\"general.menu-01\"\r\n class=\"text-lg transition-transform duration-400 ease-in-out\"\r\n [class.rotate-180]=\"expanded()\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </button>\r\n\r\n @if (logo() || hasBrandText()) {\r\n <div\r\n class=\"flex items-center gap-2 overflow-hidden transition-all duration-400 ease-in-out\"\r\n [class.max-w-0]=\"!expanded()\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n @if (logo()) {\r\n <img\r\n [src]=\"logo()\"\r\n [alt]=\"'components.sidebar.logoAlt' | transloco\"\r\n class=\"h-8 shrink-0\"\r\n [routerLink]=\"logoLink()\"\r\n [class.cursor-pointer]=\"logoLink()\"\r\n />\r\n }\r\n @if (logo() && hasBrandText()) {\r\n <div\r\n class=\"h-6 w-[1px] bg-current opacity-30 shrink-0\"\r\n [style.color]=\"iconsColor()\"\r\n ></div>\r\n }\r\n @if (hasBrandText()) {\r\n <div\r\n class=\"flex flex-col gap-0.5 min-w-0\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n @if (hasTitle()) {\r\n <span class=\"text-sm font-semibold truncate\">{{\r\n title()\r\n }}</span>\r\n }\r\n @if (hasSubTitle()) {\r\n <span class=\"text-xs opacity-70 truncate\">{{\r\n subTitle()\r\n }}</span>\r\n }\r\n </div>\r\n }\r\n </div>\r\n }\r\n </div>\r\n\r\n <div\r\n class=\"mt-sidebar-menu flex min-h-0 flex-1 flex-col gap-1 overflow-x-hidden overflow-y-auto overscroll-contain\"\r\n [class.mt-sidebar-menu-collapsed]=\"!expanded()\"\r\n [class.pr-1]=\"expanded()\"\r\n [class.pr-px]=\"!expanded()\"\r\n (scroll)=\"closeFlyout()\"\r\n >\r\n @for (item of items(); track item.id) {\r\n <!-- ============ Submenu parent (has children) ============ -->\r\n @if (hasChildren(item)) {\r\n @if (expanded()) {\r\n <!-- Expanded: inline accordion -->\r\n <div class=\"flex flex-col\">\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\r\n [style.color]=\"\r\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\r\n \"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n <div\r\n class=\"flex-1 truncate whitespace-nowrap text-sm font-medium\"\r\n >\r\n {{ item.title }}\r\n </div>\r\n <button\r\n type=\"button\"\r\n class=\"me-2 grid h-6 w-6 shrink-0 cursor-pointer place-items-center rounded hover:bg-surface-300/60 dark:hover:bg-surface-700/60 transition-colors\"\r\n [attr.aria-expanded]=\"isGroupOpen(item)\"\r\n (click)=\"toggleGroup(item, $event)\"\r\n >\r\n <mt-icon\r\n icon=\"arrow.chevron-down\"\r\n class=\"text-xs transition-transform duration-300 ease-in-out\"\r\n [class.rotate-180]=\"isGroupOpen(item)\"\r\n [style.--mt-icon-prev-width]=\"'14px'\"\r\n [style.--mt-icon-prev-height]=\"'14px'\"\r\n />\r\n </button>\r\n </a>\r\n\r\n <div\r\n class=\"grid transition-[grid-template-rows] duration-300 ease-in-out\"\r\n [style.gridTemplateRows]=\"isGroupOpen(item) ? '1fr' : '0fr'\"\r\n >\r\n <div class=\"overflow-hidden\">\r\n <div class=\"flex flex-col gap-0.5 py-1\">\r\n @if (item.loading && !item.children?.length) {\r\n <div\r\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 text-sm opacity-70\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n <mt-icon\r\n icon=\"general.loading-01\"\r\n class=\"animate-spin\"\r\n />\r\n <span class=\"truncate\">{{\r\n \"components.sidebar.loading\" | transloco\r\n }}</span>\r\n </div>\r\n }\r\n @for (child of item.children ?? []; track child.id) {\r\n @if (child.href) {\r\n <a\r\n [href]=\"child.href\"\r\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\r\n mtTooltip=\"{{ child.title }}\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n @if (child.icon) {\r\n <mt-icon\r\n [icon]=\"child.icon\"\r\n class=\"shrink-0 opacity-80\"\r\n [style.--mt-icon-prev-width]=\"'16px'\"\r\n [style.--mt-icon-prev-height]=\"'16px'\"\r\n />\r\n } @else {\r\n <span\r\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\r\n ></span>\r\n }\r\n <span class=\"truncate text-sm\">{{\r\n child.title\r\n }}</span>\r\n </a>\r\n } @else {\r\n <a\r\n [routerLink]=\"child.routerLink\"\r\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\r\n #crla=\"routerLinkActive\"\r\n class=\"flex items-center gap-2.5 h-10 ps-11 pe-3 shrink-0 rounded-md hover:bg-primary-50 dark:hover:bg-surface-900 transition-colors overflow-hidden\"\r\n mtTooltip=\"{{ child.title }}\"\r\n [style.color]=\"\r\n crla.isActive\r\n ? 'var(--p-primary-500)'\r\n : iconsColor()\r\n \"\r\n >\r\n @if (child.icon) {\r\n <mt-icon\r\n [icon]=\"child.icon\"\r\n class=\"shrink-0 opacity-80\"\r\n [style.--mt-icon-prev-width]=\"'16px'\"\r\n [style.--mt-icon-prev-height]=\"'16px'\"\r\n />\r\n } @else {\r\n <span\r\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\r\n ></span>\r\n }\r\n <span class=\"truncate text-sm\">{{\r\n child.title\r\n }}</span>\r\n </a>\r\n }\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n } @else {\r\n <!-- Collapsed: icon trigger + hover/focus flyout -->\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\r\n [style.color]=\"\r\n isSectionActive(item) ? 'var(--p-primary-500)' : iconsColor()\r\n \"\r\n (mouseenter)=\"openFlyout(item, $event)\"\r\n (mouseleave)=\"scheduleFlyoutClose()\"\r\n (focus)=\"openFlyout(item, $event)\"\r\n (blur)=\"scheduleFlyoutClose()\"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n </a>\r\n }\r\n } @else {\r\n <!-- ============ Leaf item ============ -->\r\n @if (item.href) {\r\n <a\r\n [href]=\"item.href\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\r\n mtTooltip=\"{{ item.title }}\"\r\n [style.color]=\"iconsColor()\"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n <div\r\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n {{ item.title }}\r\n </div>\r\n </a>\r\n } @else {\r\n <a\r\n [routerLink]=\"item.routerLink\"\r\n routerLinkActive=\"bg-primary-50 dark:bg-primary-900\"\r\n #rla=\"routerLinkActive\"\r\n class=\"flex items-center gap-3 h-[47px] min-w-[47px] shrink-0 dark:hover:bg-surface-900 hover:bg-primary-50 transition-colors rounded-md overflow-hidden\"\r\n mtTooltip=\"{{ item.title }}\"\r\n [style.color]=\"\r\n rla.isActive ? 'var(--p-primary-500)' : iconsColor()\r\n \"\r\n >\r\n <div class=\"px-3.5\">\r\n <mt-icon\r\n [icon]=\"item.icon\"\r\n class=\"shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'20px'\"\r\n [style.--mt-icon-prev-height]=\"'20px'\"\r\n />\r\n </div>\r\n <div\r\n class=\"whitespace-nowrap text-sm font-medium transition-all duration-400 ease-in-out overflow-hidden\"\r\n [class.opacity-0]=\"!expanded()\"\r\n [class.max-w-xs]=\"expanded()\"\r\n [class.opacity-100]=\"expanded()\"\r\n >\r\n {{ item.title }}\r\n </div>\r\n </a>\r\n }\r\n }\r\n }\r\n </div>\r\n </div>\r\n</div>\r\n\r\n<!-- ============ Collapsed-mode flyout panel ============ -->\r\n@if (flyout(); as fly) {\r\n <div\r\n class=\"mt-sidebar-flyout flex w-60 flex-col overflow-hidden rounded-xl border border-surface-300 bg-surface-0 shadow-2xl dark:border-surface-700 dark:bg-surface-800\"\r\n [style.top.px]=\"fly.top\"\r\n [style.left.px]=\"fly.left\"\r\n [style.right.px]=\"fly.right\"\r\n (mouseenter)=\"cancelFlyoutClose()\"\r\n (mouseleave)=\"scheduleFlyoutClose()\"\r\n >\r\n <div\r\n class=\"flex items-center gap-2 border-b border-surface-200 px-4 py-2.5 dark:border-surface-700\"\r\n >\r\n @if (fly.item.icon) {\r\n <mt-icon\r\n [icon]=\"fly.item.icon\"\r\n class=\"text-primary-500 shrink-0\"\r\n [style.--mt-icon-prev-width]=\"'18px'\"\r\n [style.--mt-icon-prev-height]=\"'18px'\"\r\n />\r\n }\r\n <span class=\"truncate text-sm font-semibold\">{{ fly.item.title }}</span>\r\n </div>\r\n\r\n <div\r\n class=\"mt-sidebar-menu flex flex-col gap-0.5 overflow-y-auto p-1.5\"\r\n [style.maxHeight.px]=\"fly.maxHeight\"\r\n >\r\n @if (fly.item.loading && !fly.item.children?.length) {\r\n <div class=\"flex items-center gap-2 px-3 py-2 text-sm text-muted-color\">\r\n <mt-icon icon=\"general.loading-01\" class=\"animate-spin\" />\r\n <span>{{ \"components.sidebar.loading\" | transloco }}</span>\r\n </div>\r\n } @else if (!fly.item.children?.length) {\r\n <div class=\"px-3 py-2 text-sm text-muted-color\">\r\n {{ \"components.sidebar.empty\" | transloco }}\r\n </div>\r\n }\r\n @for (child of fly.item.children ?? []; track child.id) {\r\n @if (child.href) {\r\n <a\r\n [href]=\"child.href\"\r\n class=\"flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors\"\r\n (click)=\"closeFlyout()\"\r\n >\r\n @if (child.icon) {\r\n <mt-icon\r\n [icon]=\"child.icon\"\r\n class=\"shrink-0 opacity-80\"\r\n [style.--mt-icon-prev-width]=\"'16px'\"\r\n [style.--mt-icon-prev-height]=\"'16px'\"\r\n />\r\n } @else {\r\n <span\r\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\r\n ></span>\r\n }\r\n <span class=\"truncate\">{{ child.title }}</span>\r\n </a>\r\n } @else {\r\n <a\r\n [routerLink]=\"child.routerLink\"\r\n routerLinkActive=\"bg-primary-50 text-(--p-primary-500) dark:bg-primary-900\"\r\n class=\"flex items-center gap-2.5 rounded-lg px-3 py-2 text-sm hover:bg-surface-100 dark:hover:bg-surface-700 transition-colors\"\r\n (click)=\"closeFlyout()\"\r\n >\r\n @if (child.icon) {\r\n <mt-icon\r\n [icon]=\"child.icon\"\r\n class=\"shrink-0 opacity-80\"\r\n [style.--mt-icon-prev-width]=\"'16px'\"\r\n [style.--mt-icon-prev-height]=\"'16px'\"\r\n />\r\n } @else {\r\n <span\r\n class=\"h-1.5 w-1.5 shrink-0 rounded-full bg-current opacity-50\"\r\n ></span>\r\n }\r\n <span class=\"truncate\">{{ child.title }}</span>\r\n </a>\r\n }\r\n }\r\n </div>\r\n </div>\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;AAiDA,MAAM,UAAU,GAAG,CAAC;AACpB,MAAM,aAAa,GAAG,EAAE;AACxB,MAAM,iBAAiB,GAAG,GAAG;AAC7B,MAAM,kBAAkB,GAAG,GAAG;MA+EjB,OAAO,CAAA;AACD,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IACvB,GAAG,GAAG,MAAM,CAAC,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAEjE,IAAA,KAAK,GAAG,KAAK,CAAgB,EAAE,4EAAC;IAEhC,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACtB,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAkB;IAClC,KAAK,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,OAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACvB,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAA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AA,CAAA,yBAAA,EAAA,uBAAA,EAAA,kBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,QAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,UAAU,EAAA,QAAA,EAAA,cAAA,EAAA,MAAA,EAAA,CAAA,QAAA,EAAA,aAAA,EAAA,UAAA,EAAA,qBAAA,EAAA,OAAA,EAAA,MAAA,EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,IAAI,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,OAAO,EAAA,QAAA,EAAA,aAAA,EAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,IAAA,EAAE,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;2FA0EzD,OAAO,EAAA,UAAA,EAAA,CAAA;kBA7EnB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,cACV,IAAI,EAAA,OAAA,EACP,CAAC,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,aAAa,CAAC,EAAA,IAAA,EAwE/D,EAAE,cAAc,EAAE,MAAM,EAAE,EAAA,QAAA,EAAA,kqgBAAA,EAAA,MAAA,EAAA,CAAA,6gCAAA,CAAA,EAAA;;sBAmL/B,YAAY;uBAAC,eAAe;;;AEpT/B;;AAEG;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, Component } from '@angular/core';
2
+ import { input, booleanAttribute, computed, Component } from '@angular/core';
3
3
  import { RouterLink } from '@angular/router';
4
4
  import { TranslocoPipe } from '@jsverse/transloco';
5
5
 
@@ -16,12 +16,19 @@ class Topbar {
16
16
  logoClass = input(...(ngDevMode ? [undefined, { debugName: "logoClass" }] : /* istanbul ignore next */ []));
17
17
  titleClass = input(...(ngDevMode ? [undefined, { debugName: "titleClass" }] : /* istanbul ignore next */ []));
18
18
  subTitleClass = input(...(ngDevMode ? [undefined, { debugName: "subTitleClass" }] : /* istanbul ignore next */ []));
19
+ // Each half renders only when it carries text. A host can legitimately have
20
+ // one and not the other — clearing the tagline in the branding editor is how
21
+ // a tenant hides it — and an empty element still holds a line box, which left
22
+ // the surviving half sitting off-centre against the logo.
23
+ hasTitle = computed(() => !!this.title()?.trim(), ...(ngDevMode ? [{ debugName: "hasTitle" }] : /* istanbul ignore next */ []));
24
+ hasSubTitle = computed(() => !!this.subTitle()?.trim(), ...(ngDevMode ? [{ debugName: "hasSubTitle" }] : /* istanbul ignore next */ []));
25
+ hasBrandText = computed(() => this.hasTitle() || this.hasSubTitle(), ...(ngDevMode ? [{ debugName: "hasBrandText" }] : /* istanbul ignore next */ []));
19
26
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Topbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
20
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: Topbar, isStandalone: true, selector: "mt-topbar", inputs: { logo: { classPropertyName: "logo", publicName: "logo", isSignal: true, isRequired: false, transformFunction: null }, logoLink: { classPropertyName: "logoLink", publicName: "logoLink", isSignal: true, isRequired: false, transformFunction: null }, bgColor: { classPropertyName: "bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null }, bgImage: { classPropertyName: "bgImage", publicName: "bgImage", isSignal: true, isRequired: false, transformFunction: null }, bgRepeat: { classPropertyName: "bgRepeat", publicName: "bgRepeat", isSignal: true, isRequired: false, transformFunction: null }, textColor: { classPropertyName: "textColor", publicName: "textColor", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subTitle: { classPropertyName: "subTitle", publicName: "subTitle", isSignal: true, isRequired: false, transformFunction: null }, showBranding: { classPropertyName: "showBranding", publicName: "showBranding", isSignal: true, isRequired: false, transformFunction: null }, logoClass: { classPropertyName: "logoClass", publicName: "logoClass", isSignal: true, isRequired: false, transformFunction: null }, titleClass: { classPropertyName: "titleClass", publicName: "titleClass", isSignal: true, isRequired: false, transformFunction: null }, subTitleClass: { classPropertyName: "subTitleClass", publicName: "subTitleClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.title": "null" } }, ngImport: i0, template: "<div\r\n class=\"w-full flex justify-between align-center bg-primary px-4 py-2 h-[var(--header-height)]\"\r\n [style.backgroundColor]=\"bgColor()\"\r\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\r\n [style.backgroundSize]=\"bgImage() && !bgRepeat() ? 'cover' : null\"\r\n [style.backgroundPosition]=\"bgImage() && !bgRepeat() ? 'center' : null\"\r\n [class.bg-no-repeat]=\"!bgRepeat()\"\r\n [class.bg-repeat]=\"bgRepeat()\"\r\n>\r\n <div class=\"flex gap-4 items-center\" [style.color]=\"textColor()\">\r\n <div\r\n class=\"flex gap-3 items-center h-full overflow-hidden transition-all duration-400 ease-in-out\"\r\n [class.max-w-0]=\"!showBranding()\"\r\n [class.opacity-0]=\"!showBranding()\"\r\n [class.max-w-lg]=\"showBranding()\"\r\n [class.opacity-100]=\"showBranding()\"\r\n >\r\n @if (logo()) {\r\n <img\r\n [src]=\"logo()\"\r\n [alt]=\"'components.topbar.logoAlt' | transloco\"\r\n class=\"h-10 shrink-0\"\r\n [class]=\"logoClass()\"\r\n [routerLink]=\"logoLink()\"\r\n [class.cursor-pointer]=\"logoLink()\"\r\n />\r\n }\r\n @if (logo() && (title() || subTitle())) {\r\n <div class=\"h-3/4 w-[1px] bg-current shrink-0 opacity-30\"></div>\r\n }\r\n @if (title() || subTitle()) {\r\n <div class=\"flex flex-col shrink-0\">\r\n <h2\r\n class=\"text-md font-semibold product-name whitespace-nowrap\"\r\n [class]=\"titleClass()\"\r\n >\r\n {{ title() }}\r\n </h2>\r\n <span\r\n class=\"text-sm product-tagline whitespace-nowrap\"\r\n [class]=\"subTitleClass()\"\r\n >{{ subTitle() }}</span\r\n >\r\n </div>\r\n }\r\n </div>\r\n <ng-content select=\"[start]\"></ng-content>\r\n </div>\r\n <div class=\"flex gap-2 items-center\">\r\n <ng-content select=\"[actions]\"></ng-content>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
27
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.8", type: Topbar, isStandalone: true, selector: "mt-topbar", inputs: { logo: { classPropertyName: "logo", publicName: "logo", isSignal: true, isRequired: false, transformFunction: null }, logoLink: { classPropertyName: "logoLink", publicName: "logoLink", isSignal: true, isRequired: false, transformFunction: null }, bgColor: { classPropertyName: "bgColor", publicName: "bgColor", isSignal: true, isRequired: false, transformFunction: null }, bgImage: { classPropertyName: "bgImage", publicName: "bgImage", isSignal: true, isRequired: false, transformFunction: null }, bgRepeat: { classPropertyName: "bgRepeat", publicName: "bgRepeat", isSignal: true, isRequired: false, transformFunction: null }, textColor: { classPropertyName: "textColor", publicName: "textColor", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, subTitle: { classPropertyName: "subTitle", publicName: "subTitle", isSignal: true, isRequired: false, transformFunction: null }, showBranding: { classPropertyName: "showBranding", publicName: "showBranding", isSignal: true, isRequired: false, transformFunction: null }, logoClass: { classPropertyName: "logoClass", publicName: "logoClass", isSignal: true, isRequired: false, transformFunction: null }, titleClass: { classPropertyName: "titleClass", publicName: "titleClass", isSignal: true, isRequired: false, transformFunction: null }, subTitleClass: { classPropertyName: "subTitleClass", publicName: "subTitleClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.title": "null" } }, ngImport: i0, template: "<div\r\n class=\"w-full flex justify-between align-center bg-primary px-4 py-2 h-[var(--header-height)]\"\r\n [style.backgroundColor]=\"bgColor()\"\r\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\r\n [style.backgroundSize]=\"bgImage() && !bgRepeat() ? 'cover' : null\"\r\n [style.backgroundPosition]=\"bgImage() && !bgRepeat() ? 'center' : null\"\r\n [class.bg-no-repeat]=\"!bgRepeat()\"\r\n [class.bg-repeat]=\"bgRepeat()\"\r\n>\r\n <div class=\"flex gap-4 items-center\" [style.color]=\"textColor()\">\r\n <div\r\n class=\"flex gap-3 items-center h-full overflow-hidden transition-all duration-400 ease-in-out\"\r\n [class.max-w-0]=\"!showBranding()\"\r\n [class.opacity-0]=\"!showBranding()\"\r\n [class.max-w-lg]=\"showBranding()\"\r\n [class.opacity-100]=\"showBranding()\"\r\n >\r\n @if (logo()) {\r\n <img\r\n [src]=\"logo()\"\r\n [alt]=\"'components.topbar.logoAlt' | transloco\"\r\n class=\"h-10 shrink-0\"\r\n [class]=\"logoClass()\"\r\n [routerLink]=\"logoLink()\"\r\n [class.cursor-pointer]=\"logoLink()\"\r\n />\r\n }\r\n @if (logo() && hasBrandText()) {\r\n <div class=\"h-3/4 w-[1px] bg-current shrink-0 opacity-30\"></div>\r\n }\r\n @if (hasBrandText()) {\r\n <div class=\"flex flex-col shrink-0\">\r\n @if (hasTitle()) {\r\n <h2\r\n class=\"text-md font-semibold product-name whitespace-nowrap\"\r\n [class]=\"titleClass()\"\r\n >\r\n {{ title() }}\r\n </h2>\r\n }\r\n @if (hasSubTitle()) {\r\n <span\r\n class=\"text-sm product-tagline whitespace-nowrap\"\r\n [class]=\"subTitleClass()\"\r\n >{{ subTitle() }}</span\r\n >\r\n }\r\n </div>\r\n }\r\n </div>\r\n <ng-content select=\"[start]\"></ng-content>\r\n </div>\r\n <div class=\"flex gap-2 items-center\">\r\n <ng-content select=\"[actions]\"></ng-content>\r\n </div>\r\n</div>\r\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: TranslocoPipe, name: "transloco" }] });
21
28
  }
22
29
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.8", ngImport: i0, type: Topbar, decorators: [{
23
30
  type: Component,
24
- args: [{ selector: 'mt-topbar', standalone: true, imports: [RouterLink, TranslocoPipe], host: { '[attr.title]': 'null' }, template: "<div\r\n class=\"w-full flex justify-between align-center bg-primary px-4 py-2 h-[var(--header-height)]\"\r\n [style.backgroundColor]=\"bgColor()\"\r\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\r\n [style.backgroundSize]=\"bgImage() && !bgRepeat() ? 'cover' : null\"\r\n [style.backgroundPosition]=\"bgImage() && !bgRepeat() ? 'center' : null\"\r\n [class.bg-no-repeat]=\"!bgRepeat()\"\r\n [class.bg-repeat]=\"bgRepeat()\"\r\n>\r\n <div class=\"flex gap-4 items-center\" [style.color]=\"textColor()\">\r\n <div\r\n class=\"flex gap-3 items-center h-full overflow-hidden transition-all duration-400 ease-in-out\"\r\n [class.max-w-0]=\"!showBranding()\"\r\n [class.opacity-0]=\"!showBranding()\"\r\n [class.max-w-lg]=\"showBranding()\"\r\n [class.opacity-100]=\"showBranding()\"\r\n >\r\n @if (logo()) {\r\n <img\r\n [src]=\"logo()\"\r\n [alt]=\"'components.topbar.logoAlt' | transloco\"\r\n class=\"h-10 shrink-0\"\r\n [class]=\"logoClass()\"\r\n [routerLink]=\"logoLink()\"\r\n [class.cursor-pointer]=\"logoLink()\"\r\n />\r\n }\r\n @if (logo() && (title() || subTitle())) {\r\n <div class=\"h-3/4 w-[1px] bg-current shrink-0 opacity-30\"></div>\r\n }\r\n @if (title() || subTitle()) {\r\n <div class=\"flex flex-col shrink-0\">\r\n <h2\r\n class=\"text-md font-semibold product-name whitespace-nowrap\"\r\n [class]=\"titleClass()\"\r\n >\r\n {{ title() }}\r\n </h2>\r\n <span\r\n class=\"text-sm product-tagline whitespace-nowrap\"\r\n [class]=\"subTitleClass()\"\r\n >{{ subTitle() }}</span\r\n >\r\n </div>\r\n }\r\n </div>\r\n <ng-content select=\"[start]\"></ng-content>\r\n </div>\r\n <div class=\"flex gap-2 items-center\">\r\n <ng-content select=\"[actions]\"></ng-content>\r\n </div>\r\n</div>\r\n" }]
31
+ args: [{ selector: 'mt-topbar', standalone: true, imports: [RouterLink, TranslocoPipe], host: { '[attr.title]': 'null' }, template: "<div\r\n class=\"w-full flex justify-between align-center bg-primary px-4 py-2 h-[var(--header-height)]\"\r\n [style.backgroundColor]=\"bgColor()\"\r\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\r\n [style.backgroundSize]=\"bgImage() && !bgRepeat() ? 'cover' : null\"\r\n [style.backgroundPosition]=\"bgImage() && !bgRepeat() ? 'center' : null\"\r\n [class.bg-no-repeat]=\"!bgRepeat()\"\r\n [class.bg-repeat]=\"bgRepeat()\"\r\n>\r\n <div class=\"flex gap-4 items-center\" [style.color]=\"textColor()\">\r\n <div\r\n class=\"flex gap-3 items-center h-full overflow-hidden transition-all duration-400 ease-in-out\"\r\n [class.max-w-0]=\"!showBranding()\"\r\n [class.opacity-0]=\"!showBranding()\"\r\n [class.max-w-lg]=\"showBranding()\"\r\n [class.opacity-100]=\"showBranding()\"\r\n >\r\n @if (logo()) {\r\n <img\r\n [src]=\"logo()\"\r\n [alt]=\"'components.topbar.logoAlt' | transloco\"\r\n class=\"h-10 shrink-0\"\r\n [class]=\"logoClass()\"\r\n [routerLink]=\"logoLink()\"\r\n [class.cursor-pointer]=\"logoLink()\"\r\n />\r\n }\r\n @if (logo() && hasBrandText()) {\r\n <div class=\"h-3/4 w-[1px] bg-current shrink-0 opacity-30\"></div>\r\n }\r\n @if (hasBrandText()) {\r\n <div class=\"flex flex-col shrink-0\">\r\n @if (hasTitle()) {\r\n <h2\r\n class=\"text-md font-semibold product-name whitespace-nowrap\"\r\n [class]=\"titleClass()\"\r\n >\r\n {{ title() }}\r\n </h2>\r\n }\r\n @if (hasSubTitle()) {\r\n <span\r\n class=\"text-sm product-tagline whitespace-nowrap\"\r\n [class]=\"subTitleClass()\"\r\n >{{ subTitle() }}</span\r\n >\r\n }\r\n </div>\r\n }\r\n </div>\r\n <ng-content select=\"[start]\"></ng-content>\r\n </div>\r\n <div class=\"flex gap-2 items-center\">\r\n <ng-content select=\"[actions]\"></ng-content>\r\n </div>\r\n</div>\r\n" }]
25
32
  }], propDecorators: { logo: [{ type: i0.Input, args: [{ isSignal: true, alias: "logo", required: false }] }], logoLink: [{ type: i0.Input, args: [{ isSignal: true, alias: "logoLink", required: false }] }], bgColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgColor", required: false }] }], bgImage: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgImage", required: false }] }], bgRepeat: [{ type: i0.Input, args: [{ isSignal: true, alias: "bgRepeat", required: false }] }], textColor: [{ type: i0.Input, args: [{ isSignal: true, alias: "textColor", required: false }] }], title: [{ type: i0.Input, args: [{ isSignal: true, alias: "title", required: false }] }], subTitle: [{ type: i0.Input, args: [{ isSignal: true, alias: "subTitle", required: false }] }], showBranding: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBranding", required: false }] }], logoClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "logoClass", required: false }] }], titleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "titleClass", required: false }] }], subTitleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "subTitleClass", required: false }] }] } });
26
33
 
27
34
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"masterteam-components-topbar.mjs","sources":["../../../../packages/masterteam/components/topbar/topbar.ts","../../../../packages/masterteam/components/topbar/topbar.html","../../../../packages/masterteam/components/topbar/masterteam-components-topbar.ts"],"sourcesContent":["import { booleanAttribute, Component, input } from '@angular/core';\r\nimport { RouterLink } from '@angular/router';\r\nimport { TranslocoPipe } from '@jsverse/transloco';\r\n\r\n@Component({\r\n selector: 'mt-topbar',\r\n standalone: true,\r\n imports: [RouterLink, TranslocoPipe],\r\n templateUrl: './topbar.html',\r\n // A static `title=\"…\"` is also the HTML global title attribute - without\r\n // this the browser shows it as a native tooltip over the whole topbar.\r\n host: { '[attr.title]': 'null' },\r\n})\r\nexport class Topbar {\r\n logo = input<string>();\r\n logoLink = input<string | any[]>();\r\n bgColor = input<string>('var(--p-primary-color)');\r\n bgImage = input<string>();\r\n bgRepeat = input<boolean, unknown>(false, { transform: booleanAttribute });\r\n textColor = input<string>('var(--p-primary-contrast-color)');\r\n title = input<string>();\r\n subTitle = input<string>();\r\n showBranding = input<boolean, unknown>(true, { transform: booleanAttribute });\r\n logoClass = input<string>();\r\n titleClass = input<string>();\r\n subTitleClass = input<string>();\r\n}\r\n","<div\r\n class=\"w-full flex justify-between align-center bg-primary px-4 py-2 h-[var(--header-height)]\"\r\n [style.backgroundColor]=\"bgColor()\"\r\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\r\n [style.backgroundSize]=\"bgImage() && !bgRepeat() ? 'cover' : null\"\r\n [style.backgroundPosition]=\"bgImage() && !bgRepeat() ? 'center' : null\"\r\n [class.bg-no-repeat]=\"!bgRepeat()\"\r\n [class.bg-repeat]=\"bgRepeat()\"\r\n>\r\n <div class=\"flex gap-4 items-center\" [style.color]=\"textColor()\">\r\n <div\r\n class=\"flex gap-3 items-center h-full overflow-hidden transition-all duration-400 ease-in-out\"\r\n [class.max-w-0]=\"!showBranding()\"\r\n [class.opacity-0]=\"!showBranding()\"\r\n [class.max-w-lg]=\"showBranding()\"\r\n [class.opacity-100]=\"showBranding()\"\r\n >\r\n @if (logo()) {\r\n <img\r\n [src]=\"logo()\"\r\n [alt]=\"'components.topbar.logoAlt' | transloco\"\r\n class=\"h-10 shrink-0\"\r\n [class]=\"logoClass()\"\r\n [routerLink]=\"logoLink()\"\r\n [class.cursor-pointer]=\"logoLink()\"\r\n />\r\n }\r\n @if (logo() && (title() || subTitle())) {\r\n <div class=\"h-3/4 w-[1px] bg-current shrink-0 opacity-30\"></div>\r\n }\r\n @if (title() || subTitle()) {\r\n <div class=\"flex flex-col shrink-0\">\r\n <h2\r\n class=\"text-md font-semibold product-name whitespace-nowrap\"\r\n [class]=\"titleClass()\"\r\n >\r\n {{ title() }}\r\n </h2>\r\n <span\r\n class=\"text-sm product-tagline whitespace-nowrap\"\r\n [class]=\"subTitleClass()\"\r\n >{{ subTitle() }}</span\r\n >\r\n </div>\r\n }\r\n </div>\r\n <ng-content select=\"[start]\"></ng-content>\r\n </div>\r\n <div class=\"flex gap-2 items-center\">\r\n <ng-content select=\"[actions]\"></ng-content>\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAaa,MAAM,CAAA;IACjB,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACtB,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAkB;AAClC,IAAA,OAAO,GAAG,KAAK,CAAS,wBAAwB,8EAAC;IACjD,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACzB,QAAQ,GAAG,KAAK,CAAmB,KAAK,gFAAI,S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AAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,iBAAA,EAAA,YAAA,EAAA,UAAA,EAAA,YAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,aAAA,EAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,UAAA,EAAA,eAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,YAAA,EAAA,MAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,ECbnB,m+DAoDA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,ED7CY,UAAU,+NAAE,aAAa,EAAA,IAAA,EAAA,WAAA,EAAA,CAAA,EAAA,CAAA;;2FAMxB,MAAM,EAAA,UAAA,EAAA,CAAA;kBATlB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,WAAW,EAAA,UAAA,EACT,IAAI,EAAA,OAAA,EACP,CAAC,UAAU,EAAE,aAAa,CAAC,EAAA,IAAA,EAI9B,EAAE,cAAc,EAAE,MAAM,EAAE,EAAA,QAAA,EAAA,m+DAAA,EAAA;;;AEXlC;;AAEG;;;;"}
1
+ {"version":3,"file":"masterteam-components-topbar.mjs","sources":["../../../../packages/masterteam/components/topbar/topbar.ts","../../../../packages/masterteam/components/topbar/topbar.html","../../../../packages/masterteam/components/topbar/masterteam-components-topbar.ts"],"sourcesContent":["import { booleanAttribute, Component, computed, input } from '@angular/core';\r\nimport { RouterLink } from '@angular/router';\r\nimport { TranslocoPipe } from '@jsverse/transloco';\r\n\r\n@Component({\r\n selector: 'mt-topbar',\r\n standalone: true,\r\n imports: [RouterLink, TranslocoPipe],\r\n templateUrl: './topbar.html',\r\n // A static `title=\"…\"` is also the HTML global title attribute - without\r\n // this the browser shows it as a native tooltip over the whole topbar.\r\n host: { '[attr.title]': 'null' },\r\n})\r\nexport class Topbar {\r\n logo = input<string>();\r\n logoLink = input<string | any[]>();\r\n bgColor = input<string>('var(--p-primary-color)');\r\n bgImage = input<string>();\r\n bgRepeat = input<boolean, unknown>(false, { transform: booleanAttribute });\r\n textColor = input<string>('var(--p-primary-contrast-color)');\r\n title = input<string>();\r\n subTitle = input<string>();\r\n showBranding = input<boolean, unknown>(true, { transform: booleanAttribute });\r\n logoClass = input<string>();\r\n titleClass = input<string>();\r\n subTitleClass = input<string>();\r\n\r\n // Each half renders only when it carries text. A host can legitimately have\r\n // one and not the other — clearing the tagline in the branding editor is how\r\n // a tenant hides it — and an empty element still holds a line box, which left\r\n // the surviving half sitting off-centre against the logo.\r\n protected readonly hasTitle = computed(() => !!this.title()?.trim());\r\n protected readonly hasSubTitle = computed(() => !!this.subTitle()?.trim());\r\n protected readonly hasBrandText = computed(\r\n () => this.hasTitle() || this.hasSubTitle(),\r\n );\r\n}\r\n","<div\r\n class=\"w-full flex justify-between align-center bg-primary px-4 py-2 h-[var(--header-height)]\"\r\n [style.backgroundColor]=\"bgColor()\"\r\n [style.backgroundImage]=\"bgImage() ? 'url(' + bgImage() + ')' : null\"\r\n [style.backgroundSize]=\"bgImage() && !bgRepeat() ? 'cover' : null\"\r\n [style.backgroundPosition]=\"bgImage() && !bgRepeat() ? 'center' : null\"\r\n [class.bg-no-repeat]=\"!bgRepeat()\"\r\n [class.bg-repeat]=\"bgRepeat()\"\r\n>\r\n <div class=\"flex gap-4 items-center\" [style.color]=\"textColor()\">\r\n <div\r\n class=\"flex gap-3 items-center h-full overflow-hidden transition-all duration-400 ease-in-out\"\r\n [class.max-w-0]=\"!showBranding()\"\r\n [class.opacity-0]=\"!showBranding()\"\r\n [class.max-w-lg]=\"showBranding()\"\r\n [class.opacity-100]=\"showBranding()\"\r\n >\r\n @if (logo()) {\r\n <img\r\n [src]=\"logo()\"\r\n [alt]=\"'components.topbar.logoAlt' | transloco\"\r\n class=\"h-10 shrink-0\"\r\n [class]=\"logoClass()\"\r\n [routerLink]=\"logoLink()\"\r\n [class.cursor-pointer]=\"logoLink()\"\r\n />\r\n }\r\n @if (logo() && hasBrandText()) {\r\n <div class=\"h-3/4 w-[1px] bg-current shrink-0 opacity-30\"></div>\r\n }\r\n @if (hasBrandText()) {\r\n <div class=\"flex flex-col shrink-0\">\r\n @if (hasTitle()) {\r\n <h2\r\n class=\"text-md font-semibold product-name whitespace-nowrap\"\r\n [class]=\"titleClass()\"\r\n >\r\n {{ title() }}\r\n </h2>\r\n }\r\n @if (hasSubTitle()) {\r\n <span\r\n class=\"text-sm product-tagline whitespace-nowrap\"\r\n [class]=\"subTitleClass()\"\r\n >{{ subTitle() }}</span\r\n >\r\n }\r\n </div>\r\n }\r\n </div>\r\n <ng-content select=\"[start]\"></ng-content>\r\n </div>\r\n <div class=\"flex gap-2 items-center\">\r\n <ng-content select=\"[actions]\"></ng-content>\r\n </div>\r\n</div>\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAaa,MAAM,CAAA;IACjB,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACtB,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAkB;AAClC,IAAA,OAAO,GAAG,KAAK,CAAS,wBAAwB,8EAAC;IACjD,OAAO,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,SAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IAC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cAAc,EAAE,MAAM,EAAE,EAAA,QAAA,EAAA,0kEAAA,EAAA;;;AEXlC;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@masterteam/components",
3
- "version": "0.0.279",
3
+ "version": "0.0.281",
4
4
  "publishConfig": {
5
5
  "directory": "../../../dist/masterteam/components",
6
6
  "linkDirectory": true,
@@ -477,6 +477,22 @@ interface FormulaToolbarPropertyItem {
477
477
  key: string;
478
478
  name?: string;
479
479
  description?: string;
480
+ /**
481
+ * Marks a property whose comparison values come from a real source (a
482
+ * lookup, a lookup matrix, a status set) instead of being typed by hand.
483
+ * The toolbar renders a values toggle on such chips and asks the host for
484
+ * the items through `onPropertyValuesRequest`.
485
+ */
486
+ hasValues?: boolean;
487
+ }
488
+ /**
489
+ * One selectable value of a value-backed property. `key` is what the formula
490
+ * stores and what the engine compares against; `name` is only the label shown
491
+ * on the chip.
492
+ */
493
+ interface FormulaToolbarValueItem {
494
+ key: string;
495
+ name: string;
480
496
  }
481
497
  interface OperatorGroup {
482
498
  type: string;
@@ -490,6 +506,14 @@ declare class FormulaToolbar {
490
506
  readonly propertiesTemplate: _angular_core.InputSignal<TemplateRef<FormulaToolbarPropertiesContext> | null>;
491
507
  /** Projected properties template */
492
508
  readonly projectedPropertiesTemplate: _angular_core.Signal<TemplateRef<any> | undefined>;
509
+ /**
510
+ * Values of value-backed properties, keyed by property key. Supplied by the
511
+ * host (usually lazily, in response to `onPropertyValuesRequest`); a key
512
+ * present here — even with an empty array — counts as loaded.
513
+ */
514
+ readonly propertyValues: _angular_core.InputSignal<Record<string, readonly FormulaToolbarValueItem[]>>;
515
+ /** Property key whose values are currently being fetched by the host. */
516
+ readonly loadingValuesFor: _angular_core.InputSignal<string | null>;
493
517
  /** Function categories (from API or static data) */
494
518
  readonly functionCategories: _angular_core.InputSignal<FunctionCategoryGroup[]>;
495
519
  /** Operators list (overridable) */
@@ -508,11 +532,18 @@ declare class FormulaToolbar {
508
532
  noFunctionsFound?: string;
509
533
  noPropertiesAvailable?: string;
510
534
  noOperatorsFound?: string;
535
+ values?: string;
536
+ noValuesAvailable?: string;
511
537
  }>;
512
538
  /** Insert event - emits SmartBlock for the editor */
513
539
  readonly onBlockInsert: _angular_core.OutputEmitterRef<SmartBlock>;
514
540
  /** Tab change event */
515
541
  readonly onTabChange: _angular_core.OutputEmitterRef<ToolbarTab>;
542
+ /**
543
+ * A value-backed property was expanded and its values are not in
544
+ * `propertyValues` yet — the host should fetch them for this key.
545
+ */
546
+ readonly onPropertyValuesRequest: _angular_core.OutputEmitterRef<string>;
516
547
  /** Active tab */
517
548
  readonly activeTab: _angular_core.WritableSignal<ToolbarTab>;
518
549
  /** Tab options */
@@ -529,6 +560,8 @@ declare class FormulaToolbar {
529
560
  protected readonly propertiesTemplateContext: FormulaToolbarPropertiesContext;
530
561
  /** Resolve properties template (projected first, input fallback) */
531
562
  readonly resolvedPropertiesTemplate: _angular_core.Signal<TemplateRef<any> | null>;
563
+ /** Property key whose value list is currently expanded, if any. */
564
+ readonly expandedPropertyKey: _angular_core.WritableSignal<string | null>;
532
565
  /** Search query */
533
566
  readonly searchQuery: _angular_core.WritableSignal<string>;
534
567
  /** Custom value input */
@@ -552,6 +585,20 @@ declare class FormulaToolbar {
552
585
  readonly propertyItems: _angular_core.Signal<FormulaToolbarPropertyItem[]>;
553
586
  /** Filtered properties based on search */
554
587
  readonly filteredProperties: _angular_core.Signal<FormulaToolbarPropertyItem[]>;
588
+ /**
589
+ * The expanded property, but only while it survives the current search —
590
+ * filtering it away collapses the panel without touching the stored key.
591
+ */
592
+ readonly expandedProperty: _angular_core.Signal<FormulaToolbarPropertyItem | null>;
593
+ /** Values of the expanded property, or an empty list while none is open. */
594
+ readonly expandedPropertyValues: _angular_core.Signal<readonly FormulaToolbarValueItem[]>;
595
+ /** True while the expanded property's values are still being fetched. */
596
+ readonly isLoadingExpandedValues: _angular_core.Signal<boolean>;
597
+ /**
598
+ * True when the expanded property finished loading and genuinely has no
599
+ * values — distinct from "still loading", so the empty note does not flash.
600
+ */
601
+ readonly hasNoExpandedValues: _angular_core.Signal<boolean>;
555
602
  /** Operators translated through the active locale */
556
603
  private readonly translatedOperators;
557
604
  /** Filtered operators based on search */
@@ -581,6 +628,8 @@ declare class FormulaToolbar {
581
628
  readonly labelNoFunctions: _angular_core.Signal<string>;
582
629
  readonly labelNoProperties: _angular_core.Signal<string>;
583
630
  readonly labelNoOperators: _angular_core.Signal<string>;
631
+ readonly labelValues: _angular_core.Signal<string>;
632
+ readonly labelNoValues: _angular_core.Signal<string>;
584
633
  /** Get count for a specific tab (filtered when searching) */
585
634
  getTabCount(tab: ToolbarTab): number;
586
635
  /** Check if a tab has results when searching */
@@ -591,12 +640,24 @@ declare class FormulaToolbar {
591
640
  insertBlock(block: SmartBlock): void;
592
641
  /** Clear search */
593
642
  clearSearch(): void;
643
+ /**
644
+ * Open (or close) the value list of a value-backed property, asking the host
645
+ * to load the items the first time that key is opened.
646
+ */
647
+ togglePropertyValues(property: FormulaToolbarPropertyItem): void;
648
+ /** Whether a property's value list is the one currently expanded. */
649
+ isPropertyExpanded(propertyKey: string): boolean;
650
+ /**
651
+ * Insert a picked value as a literal. The item's `key` is what gets stored
652
+ * and compared; the name rides along as the chip's display label only.
653
+ */
654
+ insertPropertyValue(item: FormulaToolbarValueItem): void;
594
655
  /** Insert custom value */
595
656
  insertCustomValue(): void;
596
657
  /** Clear custom value input */
597
658
  clearCustomValue(): void;
598
659
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormulaToolbar, never>;
599
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormulaToolbar, "mt-formula-toolbar", never, { "knownProperties": { "alias": "knownProperties"; "required": false; "isSignal": true; }; "propertiesTemplate": { "alias": "propertiesTemplate"; "required": false; "isSignal": true; }; "functionCategories": { "alias": "functionCategories"; "required": false; "isSignal": true; }; "operators": { "alias": "operators"; "required": false; "isSignal": true; }; "initialTab": { "alias": "initialTab"; "required": false; "isSignal": true; }; "visibleTabs": { "alias": "visibleTabs"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; }, { "onBlockInsert": "onBlockInsert"; "onTabChange": "onTabChange"; }, ["projectedPropertiesTemplate"], never, true, never>;
660
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<FormulaToolbar, "mt-formula-toolbar", never, { "knownProperties": { "alias": "knownProperties"; "required": false; "isSignal": true; }; "propertiesTemplate": { "alias": "propertiesTemplate"; "required": false; "isSignal": true; }; "propertyValues": { "alias": "propertyValues"; "required": false; "isSignal": true; }; "loadingValuesFor": { "alias": "loadingValuesFor"; "required": false; "isSignal": true; }; "functionCategories": { "alias": "functionCategories"; "required": false; "isSignal": true; }; "operators": { "alias": "operators"; "required": false; "isSignal": true; }; "initialTab": { "alias": "initialTab"; "required": false; "isSignal": true; }; "visibleTabs": { "alias": "visibleTabs"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "labels": { "alias": "labels"; "required": false; "isSignal": true; }; }, { "onBlockInsert": "onBlockInsert"; "onTabChange": "onTabChange"; "onPropertyValuesRequest": "onPropertyValuesRequest"; }, ["projectedPropertiesTemplate"], never, true, never>;
600
661
  }
601
662
 
602
663
  declare const OPERATOR_SYMBOL_TO_TRANSLATION_KEY: Record<string, string>;
@@ -756,4 +817,4 @@ declare class FormulaRuntimeEngine {
756
817
  }
757
818
 
758
819
  export { CONDITION_FUNCTION_CATEGORIES, CONDITION_OPERATORS, CONDITION_RUNTIME_CATALOG, DEFAULT_OPERATORS, FormulaEditor, FormulaEditorCode, FormulaRuntimeEngine, FormulaStatusBar, FormulaToolbar, FormulaToolbarItem, OPERATOR_SYMBOL_TO_TRANSLATION_KEY, VALIDATION_FUNCTION_CATEGORIES, VALIDATION_OPERATORS, VALIDATION_RUNTIME_CATALOG, cloneBlock, cloneToken, cloneTokens, createFunctionBlock, createFunctionTokens, createLiteralBlock, createLiteralToken, createOperatorBlock, createOperatorToken, createPropertyBlock, createPropertyToken, createTextToken, findFunctionRange, generateFunctionId, generateSmartBlockId, generateTokenId, getArgumentIndexAtPosition, getFunctionTokens, isValidDropPosition, parseSignature, recalculateDepths, serializeTokens, serializeTokensForDisplay, shouldInsertSpace, tokenizeFormulaTemplate };
759
- export type { ApiErrorResponse, ArgumentSlot, AutocompleteContext, AutocompleteRequest, AutocompleteResponse, AutocompleteSuggestion, BlockType, DragBehavior, ExampleItem, FormulaConditionEvaluation, FormulaEvaluationContext, FormulaRuntimeCatalog, FormulaRuntimeDomain, FormulaRuntimeEngineError, FormulaRuntimeEngineErrorCode, FormulaToken, FormulaToolbarPropertiesContext, FormulaToolbarPropertyItem, FormulaValidationEvaluation, FormulaValidationRulesEvaluation, FunctionCategory, FunctionCategoryGroup, FunctionDefinition, FunctionExample, FunctionInfo, OperatorDefinition, ParameterDefinition, SmartBlock, TokenType, ToolbarItemType, ToolbarTab, ValidationError, ValidationRequest, ValidationResult, ValidationSeverity, ValidationWarning };
820
+ export type { ApiErrorResponse, ArgumentSlot, AutocompleteContext, AutocompleteRequest, AutocompleteResponse, AutocompleteSuggestion, BlockType, DragBehavior, ExampleItem, FormulaConditionEvaluation, FormulaEvaluationContext, FormulaRuntimeCatalog, FormulaRuntimeDomain, FormulaRuntimeEngineError, FormulaRuntimeEngineErrorCode, FormulaToken, FormulaToolbarPropertiesContext, FormulaToolbarPropertyItem, FormulaToolbarValueItem, FormulaValidationEvaluation, FormulaValidationRulesEvaluation, FunctionCategory, FunctionCategoryGroup, FunctionDefinition, FunctionExample, FunctionInfo, OperatorDefinition, ParameterDefinition, SmartBlock, TokenType, ToolbarItemType, ToolbarTab, ValidationError, ValidationRequest, ValidationResult, ValidationSeverity, ValidationWarning };
@@ -68,13 +68,48 @@ declare function resolveActionLabel(action: RuntimeAction): string;
68
68
  declare function buildActionPayload(action: RuntimeAction, formValue: Record<string, unknown> | undefined, externalResolvers?: Record<string, () => unknown>): Record<string, unknown> | undefined;
69
69
  declare function normalizePayloadValue(key: string, value: unknown): unknown;
70
70
  declare function resolveDefaultPayloadValue(key: string): unknown;
71
+ /**
72
+ * The declared operation inputs the payload would submit with no value — the
73
+ * `{ propertyKey, value: null }` placeholders the backend sent, still unfilled.
74
+ *
75
+ * A non-empty result means the action was fired without rendering its form, and
76
+ * submitting it would write nulls over the record (or fail the contract's
77
+ * `operation_input.required` rule). Hosts fill these by running the operation
78
+ * through `process-form-load` / `process-submit` instead.
79
+ */
80
+ declare function getUnfilledActionInputKeys(payload: Record<string, unknown> | undefined): string[];
71
81
  declare function getMissingRequiredPayloadKeys(action: RuntimeAction, payload: Record<string, unknown> | undefined): string[];
72
82
  declare function isMissingPayloadValue(value: unknown): boolean;
73
83
  declare function normalizeHttpMethod(value: string | null | undefined): string | null;
74
84
  declare function methodSupportsBody(method: string): boolean;
75
85
  declare function buildRequestOptions(method: string, payload: Record<string, unknown> | undefined): Record<string, unknown>;
86
+ /**
87
+ * The action collects free-form request metadata — a reason, a note, a
88
+ * delegate, attachments — which the generic confirm dialog can render on its
89
+ * own because the keys are fixed and operation-independent.
90
+ *
91
+ * Operation *inputs* are a different thing entirely: see
92
+ * {@link hasActionInputFields}.
93
+ */
76
94
  declare function hasActionFormFields(action: RuntimeAction): boolean;
77
- declare function hasProgressTemplateField(action: RuntimeAction): boolean;
95
+ /**
96
+ * The action declares operation inputs the user still has to supply — its
97
+ * `payloadTemplate.fields` is a non-empty list of `{ propertyKey, value: null }`
98
+ * placeholders.
99
+ *
100
+ * Firing such an action straight from its template submits those nulls, so a
101
+ * host must instead run the operation through its own form: `process-form-load`
102
+ * for the effective form and current values, `process-submit/validate`, then
103
+ * `process-submit`. The backend owns which fields those are — never infer them
104
+ * from the operation key.
105
+ */
106
+ declare function hasActionInputFields(action: RuntimeAction): boolean;
107
+ /**
108
+ * The property keys an action declares as its operation inputs, in the
109
+ * backend's own casing. Pass them to `mt-client-form`'s `allowedFieldKeys` to
110
+ * scope a configured form down to the inputs this action actually writes.
111
+ */
112
+ declare function getActionInputFieldKeys(action: RuntimeAction): string[];
78
113
 
79
114
  declare class RuntimeActionContextStore {
80
115
  private readonly formSource;
@@ -101,5 +136,5 @@ declare class RuntimeActionRunner {
101
136
  static ɵprov: i0.ɵɵInjectableDeclaration<RuntimeActionRunner>;
102
137
  }
103
138
 
104
- export { RUNTIME_ACTION_CONFIRM_DIALOG, RuntimeActionContextStore, RuntimeActionRunner, buildActionPayload, buildRequestOptions, getMissingRequiredPayloadKeys, hasActionFormFields, hasProgressTemplateField, isMissingPayloadValue, methodSupportsBody, normalizeHttpMethod, normalizePayloadValue, resolveActionLabel, resolveDefaultPayloadValue };
139
+ export { RUNTIME_ACTION_CONFIRM_DIALOG, RuntimeActionContextStore, RuntimeActionRunner, buildActionPayload, buildRequestOptions, getActionInputFieldKeys, getMissingRequiredPayloadKeys, getUnfilledActionInputKeys, hasActionFormFields, hasActionInputFields, isMissingPayloadValue, methodSupportsBody, normalizeHttpMethod, normalizePayloadValue, resolveActionLabel, resolveDefaultPayloadValue };
105
140
  export type { RuntimeAction, RuntimeActionAfterSuccess, RuntimeActionExecuteOptions, RuntimeActionFormSource, RuntimeActionFormValue, RuntimeActionReason, RuntimeActionResult, RuntimeActionStatus, RuntimeActionTranslatable };
@@ -33,6 +33,9 @@ declare class Sidebar {
33
33
  logoLink: _angular_core.InputSignal<string | any[] | undefined>;
34
34
  title: _angular_core.InputSignal<string | undefined>;
35
35
  subTitle: _angular_core.InputSignal<string | undefined>;
36
+ protected readonly hasTitle: _angular_core.Signal<boolean>;
37
+ protected readonly hasSubTitle: _angular_core.Signal<boolean>;
38
+ protected readonly hasBrandText: _angular_core.Signal<boolean>;
36
39
  bgColor: _angular_core.InputSignal<string | undefined>;
37
40
  bgImage: _angular_core.InputSignal<string | undefined>;
38
41
  bgRepeat: _angular_core.InputSignalWithTransform<boolean, unknown>;
@@ -13,6 +13,9 @@ declare class Topbar {
13
13
  logoClass: _angular_core.InputSignal<string | undefined>;
14
14
  titleClass: _angular_core.InputSignal<string | undefined>;
15
15
  subTitleClass: _angular_core.InputSignal<string | undefined>;
16
+ protected readonly hasTitle: _angular_core.Signal<boolean>;
17
+ protected readonly hasSubTitle: _angular_core.Signal<boolean>;
18
+ protected readonly hasBrandText: _angular_core.Signal<boolean>;
16
19
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Topbar, never>;
17
20
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<Topbar, "mt-topbar", never, { "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "logoLink": { "alias": "logoLink"; "required": false; "isSignal": true; }; "bgColor": { "alias": "bgColor"; "required": false; "isSignal": true; }; "bgImage": { "alias": "bgImage"; "required": false; "isSignal": true; }; "bgRepeat": { "alias": "bgRepeat"; "required": false; "isSignal": true; }; "textColor": { "alias": "textColor"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "subTitle": { "alias": "subTitle"; "required": false; "isSignal": true; }; "showBranding": { "alias": "showBranding"; "required": false; "isSignal": true; }; "logoClass": { "alias": "logoClass"; "required": false; "isSignal": true; }; "titleClass": { "alias": "titleClass"; "required": false; "isSignal": true; }; "subTitleClass": { "alias": "subTitleClass"; "required": false; "isSignal": true; }; }, {}, never, ["[start]", "[actions]"], true, never>;
18
21
  }