@testgorilla/tgo-ui 11.12.0 → 11.12.2
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/fesm2022/testgorilla-tgo-ui-components-button.mjs +9 -6
- package/fesm2022/testgorilla-tgo-ui-components-button.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs +2 -2
- package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-tag.mjs +2 -3
- package/fesm2022/testgorilla-tgo-ui-components-tag.mjs.map +1 -1
- package/mcp/catalog.json +1 -1
- package/package.json +1 -1
- package/types/testgorilla-tgo-ui-components-button.d.ts +1 -0
- package/types/testgorilla-tgo-ui-components-tag.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testgorilla-tgo-ui-components-overflow-menu.mjs","sources":["../../../components/overflow-menu/overflow-menu.component.ts","../../../components/overflow-menu/overflow-menu.component.html","../../../components/overflow-menu/overflow-menu.component.module.ts","../../../components/overflow-menu/testgorilla-tgo-ui-components-overflow-menu.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { NgClass, NgTemplateOutlet, AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n EventEmitter,\n Inject,\n inject,\n Input,\n input,\n NgZone,\n OnInit,\n Optional,\n Output,\n QueryList,\n signal,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewChildren,\n ViewEncapsulation,\n OnChanges,\n AfterViewInit,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MatMenu, MatMenuTrigger, MatMenuItem } from '@angular/material/menu';\nimport { MatTooltip } from '@angular/material/tooltip';\n\nimport { ButtonColor, ButtonSize, ButtonComponent } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme, EllipseTextDirective, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconName, IconComponent } from '@testgorilla/tgo-ui/components/icon';\n\nimport {\n MenuConfig,\n OverflowMenuButtonModify,\n OverflowMenuButtonsType,\n OverflowMenuSelectionMode,\n} from './overflow-menu.model';\n\nconst DEFAULT_MENU_CONFIG: MenuConfig = {\n overlapTrigger: false,\n panelClass: '',\n xPosition: 'after',\n yPosition: 'below',\n};\n\n@Component({\n selector: 'ui-overflow-menu',\n templateUrl: './overflow-menu.component.html',\n styleUrls: ['./overflow-menu.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgClass,\n MatMenuTrigger,\n MatTooltip,\n ButtonComponent,\n NgTemplateOutlet,\n IconComponent,\n MatMenu,\n EllipseTextDirective,\n MatMenuItem,\n AsyncPipe,\n UiTranslatePipe,\n ],\n})\nexport class OverflowMenuComponent implements OnInit, OnChanges, AfterViewInit {\n /**\n * Menu buttons\n *\n * @type {OverflowMenuButtonsType[]}\n * @memberof OverflowMenuComponent\n */\n @Input() buttons: OverflowMenuButtonsType[];\n\n /**\n * Menu icon trigger\n *\n * @memberof OverflowMenuComponent\n */\n @Input() iconTrigger: IconName = 'Menu-ellipsis';\n\n /**\n * Label menu\n *\n * @memberof OverflowMenuComponent\n */\n @Input() menuLabel = '';\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof OverflowMenuComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * A string representing the ARIA label for accessibility.\n * This label is used to provide an accessible name for the input element.\n * @type {string}\n * @memberof OverflowMenuComponent\n */\n @Input() ariaLabel: string;\n\n @Input() testId: string | null = null;\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {boolean}\n * @memberof OverflowMenuComponent\n */\n @Input() ariaRequired = false;\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input for description.\n * @type {text}\n * @memberof OverflowMenuComponent\n */\n @Input() describedby = '';\n\n /**\n * Custom template for the button (optional)\n *\n * @type {TemplateRef<unknown>}\n * @memberof OverflowMenuComponent\n */\n @Input() contentTemplateRef: TemplateRef<unknown>;\n\n /**\n * Button variant for the overflow menu trigger\n * When null, uses the default icon rendering\n *\n * @type {ButtonColor | null}\n * @memberof OverflowMenuComponent\n */\n @Input() buttonVariant: ButtonColor | null = null;\n\n /**\n * Button size for the overflow menu trigger\n *\n * @type {ButtonSize}\n * @memberof OverflowMenuComponent\n */\n @Input() buttonSize: ButtonSize = 'medium';\n\n @Input() menuConfig: MenuConfig = DEFAULT_MENU_CONFIG;\n\n /**\n * Selection semantics of the menu. 'single' renders every entry as a menuitemradio whose\n * aria-checked and right-aligned check come from the button's isSelected flag; 'none' keeps\n * plain menuitem entries.\n *\n * @type {OverflowMenuSelectionMode}\n * @memberof OverflowMenuComponent\n */\n readonly selectionMode = input<OverflowMenuSelectionMode>('none');\n\n @Input() isDynamicMenu = false;\n\n @Input() withRemovableOption = false;\n\n @Output() selectItem: EventEmitter<string> = new EventEmitter<string>();\n\n @Output() menuOpened = new EventEmitter<void>();\n\n @Output() menuClosed = new EventEmitter<void>();\n\n @ViewChildren(MatMenu) matmenus: QueryList<MatMenu>;\n @ViewChildren(MatMenuTrigger) matTrigger: QueryList<MatMenuTrigger>;\n @ViewChild('buttonElement') buttonElement: ElementRef<HTMLElement>;\n\n menuItems: string[] = [];\n submenus: Array<OverflowMenuButtonModify[]> = [];\n\n isMenuRendered = signal(false);\n isMenuOpened = signal(false);\n isFocused = signal(false);\n\n get menuItemHasHovered(): boolean {\n return this.submenus.some(menu => menu.some(item => item.isHovered));\n }\n\n private readonly destroyRef = inject(DestroyRef);\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n private readonly focusMonitor: FocusMonitor,\n private readonly ngZone: NgZone\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n ngOnInit() {\n this.createSubmenus(this.buttons, 's0', 1);\n this.reindex();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Selection menus re-render on their own: the natural flow is to hand in a new buttons array\n // after a pick, and requiring isDynamicMenu for the check to move would be an untold coupling.\n if (changes['buttons'] && (this.isDynamicMenu || this.selectionMode() === 'single')) {\n this.resetSubmenus();\n this.createSubmenus(this.buttons, 's0', 1);\n this.reindex();\n }\n }\n\n ngAfterViewInit() {\n this.isMenuRendered.set(true);\n\n setTimeout(() => {\n this.focusMonitor\n .monitor(this.buttonElement)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(origin =>\n this.ngZone.run(() => {\n if (origin === 'keyboard') {\n this.isFocused.set(true);\n } else {\n if (!this.isMenuOpened()) {\n this.isFocused.set(false);\n }\n }\n })\n );\n }, 300);\n }\n\n /** Opens the dropdown programmatically, as if the trigger had been used. */\n openMenu(): void {\n this.matTrigger.first?.openMenu();\n }\n\n /** Closes the dropdown, whichever way it was opened. */\n closeMenu(): void {\n this.matTrigger.first?.closeMenu();\n }\n\n onSelectItem(event: Event, value: string) {\n if (value) {\n this.selectItem.emit(value);\n }\n }\n\n onMenuOpened(): void {\n this.menuOpened.emit();\n this.isMenuOpened.set(true);\n\n if (this.isFocused()) {\n setTimeout(() => {\n // eslint-disable-next-line no-underscore-dangle -- _allItems is MatMenu's internal item query\n this.matmenus.first._allItems.first.focus('keyboard');\n }, 300);\n }\n }\n\n onMenuClosed(): void {\n this.isMenuOpened.set(false);\n this.menuClosed.emit();\n }\n\n onButtonFocus(button: OverflowMenuButtonModify) {\n if (this.isFocused()) {\n button.isFocused = true;\n }\n }\n\n onButtonBlur(button: OverflowMenuButtonModify) {\n button.isFocused = false;\n }\n\n onButtonClick(button: OverflowMenuButtonModify, $event: Event) {\n if (button.disabled) {\n $event.preventDefault();\n $event.stopPropagation();\n } else {\n this.onSelectItem($event, button.value);\n }\n }\n\n onSubmenuOpened(): void {\n this.isMenuOpened.set(!this.isMenuOpened);\n if (this.isFocused()) {\n setTimeout(() => {\n // eslint-disable-next-line no-underscore-dangle -- _allItems is MatMenu's internal item query\n this.matmenus.last._allItems.first.focus('keyboard');\n }, 300);\n }\n }\n\n trackByButton = (_: number, btn: OverflowMenuButtonModify) => btn.action ?? btn.value ?? btn.label;\n\n onButtonHover(button: OverflowMenuButtonModify, state: boolean) {\n button.isHovered = state;\n }\n\n getMenu(index: unknown) {\n return typeof index === 'number' && index >= 0 && this.matmenus\n ? (this.matmenus.find((x, i) => i === index) ?? null)\n : null;\n }\n\n private reindex() {\n this.submenus.forEach((menu: OverflowMenuButtonsType[]) => {\n menu.forEach((item: OverflowMenuButtonsType) => {\n if (item.subMenu !== -1) {\n item.subMenu = this.menuItems.indexOf(`${item.action}`);\n }\n });\n });\n }\n\n private resetSubmenus() {\n this.submenus = [];\n this.menuItems = [];\n }\n\n private createSubmenus(menu: OverflowMenuButtonsType[], prefix: string, count: number): void {\n this.menuItems.push(prefix);\n this.submenus.push(\n menu.map((item: OverflowMenuButtonsType, index: number) => ({\n label: item.label,\n icon: item.icon,\n isDestructive: item.isDestructive,\n tooltipText: item.tooltipText,\n value: item.value,\n disabled: item.disabled,\n isSelected: item.isSelected,\n btnTemplate: item.btnTemplate,\n subMenu: item.subMenu ? 0 : -1,\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- an empty action falls back to a generated key\n action: item.action ? item.action : prefix + index,\n isTitleButton: item.isTitleButton,\n hideTitleButton: item.hideTitleButton,\n isPremium: item.isPremium,\n // The template reads these off the copy, so omitting them leaves the menu items' ARIA unset.\n ariaLabel: item.ariaLabel,\n describedby: item.describedby,\n testId: item.testId,\n }))\n );\n\n menu.forEach((item: OverflowMenuButtonsType, index: number) => {\n if (item.subMenu) {\n this.createSubmenus((item as { subMenu: OverflowMenuButtonsType[] }).subMenu, prefix + index, count + 1);\n }\n });\n }\n}\n","<div class=\"overflow-menu-container\" [attr.theme]=\"applicationTheme\">\n @if (isMenuRendered()) {\n <button\n #buttonElement\n [ngClass]=\"{\n 'icon-button': !contentTemplateRef && !buttonVariant,\n 'content-template': contentTemplateRef,\n 'no-hover': buttonVariant,\n }\"\n [matMenuTriggerFor]=\"matmenus.first\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n [attr.aria-describedby]=\"'describedby'\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"isMenuOpened()\"\n [attr.data-testid]=\"testId\"\n (menuOpened)=\"onMenuOpened()\"\n (menuClosed)=\"onMenuClosed()\"\n class=\"overflow-menu-opener\"\n [matTooltip]=\"menuLabel\"\n >\n <span [id]=\"'describedby'\" [style.display]=\"'none'\">{{ describedby }}</span>\n @if (buttonVariant) {\n <ui-button\n [variant]=\"buttonVariant\"\n [justIcon]=\"true\"\n [iconName]=\"iconTrigger\"\n [applicationTheme]=\"applicationTheme\"\n [disabled]=\"false\"\n [size]=\"buttonSize\"\n >\n </ui-button>\n } @else if (contentTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"contentTemplateRef\"></ng-container>\n } @else {\n <ui-icon\n [name]=\"iconTrigger\"\n [applicationTheme]=\"applicationTheme\"\n [size]=\"'24'\"\n [color]=\"'rebrand-black'\"\n ></ui-icon>\n }\n </button>\n }\n\n <!-- Tracked by index so refreshing the buttons re-renders the rows without destroying an open\n mat-menu, whose trigger would otherwise be left holding a dead overlay. -->\n @for (menu of submenus; track $index) {\n <mat-menu\n [xPosition]=\"menuConfig.xPosition\"\n [yPosition]=\"menuConfig.yPosition\"\n #matMenu\n [class]=\"'overflow-menu ' + menuConfig.panelClass\"\n [overlapTrigger]=\"menuConfig.overlapTrigger\"\n backdropClass=\"overflow-menu-backdrop\"\n >\n @for (button of menu; track trackByButton(id, button); let id = $index) {\n @if (button.btnTemplate) {\n <!-- Menu option by provided button template-->\n <ng-container\n [ngTemplateOutlet]=\"button.btnTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: button }\"\n ></ng-container>\n } @else if (withRemovableOption) {\n <!-- Simple menu option that can be removed dynamically -->\n <div class=\"menu-option\" [ngClass]=\"{ 'is-destructive': button.isDestructive, disabled: button.disabled }\">\n <span\n [id]=\"'labelledby-' + button.label + id\"\n class=\"label\"\n uiEllipseText\n [refresh]=\"isMenuOpened()\"\n [maxDiffPixels]=\"1\"\n [isMultiline]=\"true\"\n (onChangeTextState)=\"button.isTextEllipsed = $event\"\n >{{ button.label }}\n </span>\n @if (button.icon) {\n <ui-button\n variant=\"icon-button\"\n [applicationTheme]=\"applicationTheme\"\n [iconName]=\"button.icon\"\n [tooltip]=\"button.tooltipText ? button.tooltipText : button.isTextEllipsed ? button.label : ''\"\n [tooltipPosition]=\"'above'\"\n [size]=\"'medium'\"\n (focus)=\"onButtonFocus(button)\"\n (blur)=\"onButtonBlur(button)\"\n (mouseenter)=\"onButtonHover(button, true)\"\n (mouseleave)=\"onButtonHover(button, false)\"\n (click)=\"onSelectItem($event, button.value)\"\n [testId]=\"button.testId ?? null\"\n [ariaLabel]=\"button.ariaLabel || button.label\"\n >\n </ui-button>\n }\n </div>\n } @else {\n <!-- Default non-removable menu option -->\n @if (button.isTitleButton && !button.hideTitleButton) {\n <div class=\"menu-title\">{{ button.label }}</div>\n }\n @if (!button.isTitleButton) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"getMenu(button.subMenu)\"\n (menuOpened)=\"onSubmenuOpened()\"\n (focus)=\"onButtonFocus(button)\"\n (blur)=\"onButtonBlur(button)\"\n (mouseenter)=\"onButtonHover(button, true)\"\n (mouseleave)=\"onButtonHover(button, false)\"\n [ngClass]=\"{ 'is-destructive': button.isDestructive, disabled: button.disabled }\"\n disableRipple\n (click)=\"onButtonClick(button, $event)\"\n [matTooltip]=\"button.tooltipText ? button.tooltipText : button.isTextEllipsed ? button.label : ''\"\n [attr.aria-labelledby]=\"'labelledby-' + button.label + id\"\n [attr.aria-describedby]=\"'describedby-' + button.label + id\"\n [attr.aria-label]=\"button.ariaLabel || null\"\n [role]=\"selectionMode() === 'single' ? 'menuitemradio' : 'menuitem'\"\n [attr.aria-checked]=\"selectionMode() === 'single' ? !!button.isSelected : null\"\n [attr.data-testid]=\"button.testId ?? null\"\n matTooltipPosition=\"right\"\n >\n <span [id]=\"'describedby-' + button.label + id\" [style.display]=\"'none'\">\n {{\n button.disabled\n ? ('MENU.MENUITEM_DISABLED' | uiTranslate | async) + ' ' + (button.describedby || '')\n : button.describedby\n }}\n </span>\n @if (button.icon) {\n <ui-icon\n [name]=\"button.icon\"\n [toggleIconStyle]=\"true\"\n [filled]=\"\n button.disabled ? false : button.isHovered ? true : menuItemHasHovered ? false : !!button.isFocused\n \"\n [applicationTheme]=\"applicationTheme\"\n [size]=\"'24'\"\n [color]=\"button.disabled ? 'dark' : button.isDestructive ? 'red' : 'rebrand-black'\"\n ></ui-icon>\n }\n <span\n [id]=\"'labelledby-' + button.label + id\"\n class=\"label\"\n uiEllipseText\n [refresh]=\"isMenuOpened()\"\n [maxDiffPixels]=\"1\"\n [isMultiline]=\"true\"\n (onChangeTextState)=\"button.isTextEllipsed = $event\"\n >{{ button.label }}</span\n >\n @if (selectionMode() === 'single' && button.isSelected) {\n <ui-icon\n class=\"overflow-menu-selected-check\"\n [name]=\"'Check-small-in-line'\"\n [applicationTheme]=\"applicationTheme\"\n [size]=\"'16'\"\n [color]=\"'rebrand-black'\"\n ></ui-icon>\n }\n @if (button.isPremium) {\n <ui-icon\n [name]=\"'Premium-circle-in-line'\"\n [applicationTheme]=\"applicationTheme\"\n [size]=\"'24'\"\n class=\"premium-icon\"\n ></ui-icon>\n }\n </button>\n }\n }\n }\n\n <ng-content select=\"[menu-content]\"></ng-content>\n </mat-menu>\n }\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { EllipseTextDirective, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\nimport { OverflowMenuComponent } from './overflow-menu.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ButtonComponentModule,\n IconComponentModule,\n MatMenuModule,\n MatButtonModule,\n MatTooltipModule,\n EllipseTextDirective,\n UiTranslatePipe,\n OverflowMenuComponent,\n ],\n exports: [OverflowMenuComponent],\n})\nexport class OverflowMenuComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAyCA,MAAM,mBAAmB,GAAe;AACtC,IAAA,cAAc,EAAE,KAAK;AACrB,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,SAAS,EAAE,OAAO;AAClB,IAAA,SAAS,EAAE,OAAO;CACnB;MAsBY,qBAAqB,CAAA;AAoHhC,IAAA,IAAI,kBAAkB,GAAA;QACpB,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;IACtE;AAIA,IAAA,WAAA,CAC6E,eAAiC,EAC3F,YAA0B,EAC1B,MAAc,EAAA;QAF4C,IAAA,CAAA,eAAe,GAAf,eAAe;QACzE,IAAA,CAAA,YAAY,GAAZ,YAAY;QACZ,IAAA,CAAA,MAAM,GAAN,MAAM;AApHzB;;;;AAIG;QACM,IAAA,CAAA,WAAW,GAAa,eAAe;AAEhD;;;;AAIG;QACM,IAAA,CAAA,SAAS,GAAG,EAAE;AAEvB;;;;;;AAMG;QACM,IAAA,CAAA,gBAAgB,GAAqB,OAAO;QAU5C,IAAA,CAAA,MAAM,GAAkB,IAAI;AAErC;;;;;AAKG;QACM,IAAA,CAAA,YAAY,GAAG,KAAK;AAE7B;;;;;AAKG;QACM,IAAA,CAAA,WAAW,GA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AA,EAAA,IAAA,EAAA,2BAA2B,YAZpC,YAAY;YACZ,qBAAqB;YACrB,mBAAmB;YACnB,aAAa;YACb,eAAe;YACf,gBAAgB;YAChB,oBAAoB;YACpB,eAAe;AACf,YAAA,qBAAqB,aAEb,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAEpB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,YAZpC,YAAY;YACZ,qBAAqB;YACrB,mBAAmB;YACnB,aAAa;YACb,eAAe;YACf,gBAAgB;YAGhB,qBAAqB,CAAA,EAAA,CAAA,CAAA;;4FAIZ,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAdvC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,qBAAqB;wBACrB,mBAAmB;wBACnB,aAAa;wBACb,eAAe;wBACf,gBAAgB;wBAChB,oBAAoB;wBACpB,eAAe;wBACf,qBAAqB;AACtB,qBAAA;oBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACjC,iBAAA;;;ACzBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ui-components-overflow-menu.mjs","sources":["../../../components/overflow-menu/overflow-menu.component.ts","../../../components/overflow-menu/overflow-menu.component.html","../../../components/overflow-menu/overflow-menu.component.module.ts","../../../components/overflow-menu/testgorilla-tgo-ui-components-overflow-menu.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { NgClass, NgTemplateOutlet, AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n EventEmitter,\n Inject,\n inject,\n Input,\n input,\n NgZone,\n OnInit,\n Optional,\n Output,\n QueryList,\n signal,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewChildren,\n ViewEncapsulation,\n OnChanges,\n AfterViewInit,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { MatMenu, MatMenuTrigger, MatMenuItem } from '@angular/material/menu';\nimport { MatTooltip } from '@angular/material/tooltip';\n\nimport { ButtonColor, ButtonSize, ButtonComponent } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme, EllipseTextDirective, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconName, IconComponent } from '@testgorilla/tgo-ui/components/icon';\n\nimport {\n MenuConfig,\n OverflowMenuButtonModify,\n OverflowMenuButtonsType,\n OverflowMenuSelectionMode,\n} from './overflow-menu.model';\n\nconst DEFAULT_MENU_CONFIG: MenuConfig = {\n overlapTrigger: false,\n panelClass: '',\n xPosition: 'after',\n yPosition: 'below',\n};\n\n@Component({\n selector: 'ui-overflow-menu',\n templateUrl: './overflow-menu.component.html',\n styleUrls: ['./overflow-menu.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n NgClass,\n MatMenuTrigger,\n MatTooltip,\n ButtonComponent,\n NgTemplateOutlet,\n IconComponent,\n MatMenu,\n EllipseTextDirective,\n MatMenuItem,\n AsyncPipe,\n UiTranslatePipe,\n ],\n})\nexport class OverflowMenuComponent implements OnInit, OnChanges, AfterViewInit {\n /**\n * Menu buttons\n *\n * @type {OverflowMenuButtonsType[]}\n * @memberof OverflowMenuComponent\n */\n @Input() buttons: OverflowMenuButtonsType[];\n\n /**\n * Menu icon trigger\n *\n * @memberof OverflowMenuComponent\n */\n @Input() iconTrigger: IconName = 'Menu-ellipsis';\n\n /**\n * Label menu\n *\n * @memberof OverflowMenuComponent\n */\n @Input() menuLabel = '';\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof OverflowMenuComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * A string representing the ARIA label for accessibility.\n * This label is used to provide an accessible name for the input element.\n * @type {string}\n * @memberof OverflowMenuComponent\n */\n @Input() ariaLabel: string;\n\n @Input() testId: string | null = null;\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {boolean}\n * @memberof OverflowMenuComponent\n */\n @Input() ariaRequired = false;\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input for description.\n * @type {text}\n * @memberof OverflowMenuComponent\n */\n @Input() describedby = '';\n\n /**\n * Custom template for the button (optional)\n *\n * @type {TemplateRef<unknown>}\n * @memberof OverflowMenuComponent\n */\n @Input() contentTemplateRef: TemplateRef<unknown>;\n\n /**\n * Button variant for the overflow menu trigger\n * When null, uses the default icon rendering\n *\n * @type {ButtonColor | null}\n * @memberof OverflowMenuComponent\n */\n @Input() buttonVariant: ButtonColor | null = null;\n\n /**\n * Button size for the overflow menu trigger\n *\n * @type {ButtonSize}\n * @memberof OverflowMenuComponent\n */\n @Input() buttonSize: ButtonSize = 'medium';\n\n @Input() menuConfig: MenuConfig = DEFAULT_MENU_CONFIG;\n\n /**\n * Selection semantics of the menu. 'single' renders every entry as a menuitemradio whose\n * aria-checked and right-aligned check come from the button's isSelected flag; 'none' keeps\n * plain menuitem entries.\n *\n * @type {OverflowMenuSelectionMode}\n * @memberof OverflowMenuComponent\n */\n readonly selectionMode = input<OverflowMenuSelectionMode>('none');\n\n @Input() isDynamicMenu = false;\n\n @Input() withRemovableOption = false;\n\n @Output() selectItem: EventEmitter<string> = new EventEmitter<string>();\n\n @Output() menuOpened = new EventEmitter<void>();\n\n @Output() menuClosed = new EventEmitter<void>();\n\n @ViewChildren(MatMenu) matmenus: QueryList<MatMenu>;\n @ViewChildren(MatMenuTrigger) matTrigger: QueryList<MatMenuTrigger>;\n @ViewChild('buttonElement') buttonElement: ElementRef<HTMLElement>;\n\n menuItems: string[] = [];\n submenus: Array<OverflowMenuButtonModify[]> = [];\n\n isMenuRendered = signal(false);\n isMenuOpened = signal(false);\n isFocused = signal(false);\n\n get menuItemHasHovered(): boolean {\n return this.submenus.some(menu => menu.some(item => item.isHovered));\n }\n\n private readonly destroyRef = inject(DestroyRef);\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n private readonly focusMonitor: FocusMonitor,\n private readonly ngZone: NgZone\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n ngOnInit() {\n this.createSubmenus(this.buttons, 's0', 1);\n this.reindex();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n // Selection menus re-render on their own: the natural flow is to hand in a new buttons array\n // after a pick, and requiring isDynamicMenu for the check to move would be an untold coupling.\n if (changes['buttons'] && (this.isDynamicMenu || this.selectionMode() === 'single')) {\n this.resetSubmenus();\n this.createSubmenus(this.buttons, 's0', 1);\n this.reindex();\n }\n }\n\n ngAfterViewInit() {\n this.isMenuRendered.set(true);\n\n setTimeout(() => {\n this.focusMonitor\n .monitor(this.buttonElement)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(origin =>\n this.ngZone.run(() => {\n if (origin === 'keyboard') {\n this.isFocused.set(true);\n } else {\n if (!this.isMenuOpened()) {\n this.isFocused.set(false);\n }\n }\n })\n );\n }, 300);\n }\n\n /** Opens the dropdown programmatically, as if the trigger had been used. */\n openMenu(): void {\n this.matTrigger.first?.openMenu();\n }\n\n /** Closes the dropdown, whichever way it was opened. */\n closeMenu(): void {\n this.matTrigger.first?.closeMenu();\n }\n\n onSelectItem(event: Event, value: string) {\n if (value) {\n this.selectItem.emit(value);\n }\n }\n\n onMenuOpened(): void {\n this.menuOpened.emit();\n this.isMenuOpened.set(true);\n\n if (this.isFocused()) {\n setTimeout(() => {\n // eslint-disable-next-line no-underscore-dangle -- _allItems is MatMenu's internal item query\n this.matmenus.first._allItems.first.focus('keyboard');\n }, 300);\n }\n }\n\n onMenuClosed(): void {\n this.isMenuOpened.set(false);\n this.menuClosed.emit();\n }\n\n onButtonFocus(button: OverflowMenuButtonModify) {\n if (this.isFocused()) {\n button.isFocused = true;\n }\n }\n\n onButtonBlur(button: OverflowMenuButtonModify) {\n button.isFocused = false;\n }\n\n onButtonClick(button: OverflowMenuButtonModify, $event: Event) {\n if (button.disabled) {\n $event.preventDefault();\n $event.stopPropagation();\n } else {\n this.onSelectItem($event, button.value);\n }\n }\n\n onSubmenuOpened(): void {\n this.isMenuOpened.set(!this.isMenuOpened);\n if (this.isFocused()) {\n setTimeout(() => {\n // eslint-disable-next-line no-underscore-dangle -- _allItems is MatMenu's internal item query\n this.matmenus.last._allItems.first.focus('keyboard');\n }, 300);\n }\n }\n\n trackByButton = (_: number, btn: OverflowMenuButtonModify) => btn.action ?? btn.value ?? btn.label;\n\n onButtonHover(button: OverflowMenuButtonModify, state: boolean) {\n button.isHovered = state;\n }\n\n getMenu(index: unknown) {\n return typeof index === 'number' && index >= 0 && this.matmenus\n ? (this.matmenus.find((x, i) => i === index) ?? null)\n : null;\n }\n\n private reindex() {\n this.submenus.forEach((menu: OverflowMenuButtonsType[]) => {\n menu.forEach((item: OverflowMenuButtonsType) => {\n if (item.subMenu !== -1) {\n item.subMenu = this.menuItems.indexOf(`${item.action}`);\n }\n });\n });\n }\n\n private resetSubmenus() {\n this.submenus = [];\n this.menuItems = [];\n }\n\n private createSubmenus(menu: OverflowMenuButtonsType[], prefix: string, count: number): void {\n this.menuItems.push(prefix);\n this.submenus.push(\n menu.map((item: OverflowMenuButtonsType, index: number) => ({\n label: item.label,\n icon: item.icon,\n isDestructive: item.isDestructive,\n tooltipText: item.tooltipText,\n value: item.value,\n disabled: item.disabled,\n isSelected: item.isSelected,\n btnTemplate: item.btnTemplate,\n subMenu: item.subMenu ? 0 : -1,\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- an empty action falls back to a generated key\n action: item.action ? item.action : prefix + index,\n isTitleButton: item.isTitleButton,\n hideTitleButton: item.hideTitleButton,\n isPremium: item.isPremium,\n // The template reads these off the copy, so omitting them leaves the menu items' ARIA unset.\n ariaLabel: item.ariaLabel,\n describedby: item.describedby,\n testId: item.testId,\n }))\n );\n\n menu.forEach((item: OverflowMenuButtonsType, index: number) => {\n if (item.subMenu) {\n this.createSubmenus((item as { subMenu: OverflowMenuButtonsType[] }).subMenu, prefix + index, count + 1);\n }\n });\n }\n}\n","<div class=\"overflow-menu-container\" [attr.theme]=\"applicationTheme\">\n @if (isMenuRendered()) {\n <button\n #buttonElement\n [ngClass]=\"{\n 'icon-button': !contentTemplateRef && !buttonVariant,\n 'content-template': contentTemplateRef,\n 'no-hover': buttonVariant,\n }\"\n [matMenuTriggerFor]=\"matmenus.first\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n [attr.aria-describedby]=\"'describedby'\"\n [attr.aria-haspopup]=\"true\"\n [attr.aria-expanded]=\"isMenuOpened()\"\n [attr.data-testid]=\"testId\"\n (menuOpened)=\"onMenuOpened()\"\n (menuClosed)=\"onMenuClosed()\"\n class=\"overflow-menu-opener\"\n [matTooltip]=\"menuLabel\"\n >\n <span [id]=\"'describedby'\" [style.display]=\"'none'\">{{ describedby }}</span>\n @if (buttonVariant) {\n <ui-button\n [variant]=\"buttonVariant\"\n [justIcon]=\"true\"\n [iconName]=\"iconTrigger\"\n [applicationTheme]=\"applicationTheme\"\n [disabled]=\"false\"\n [size]=\"buttonSize\"\n >\n </ui-button>\n } @else if (contentTemplateRef) {\n <ng-container [ngTemplateOutlet]=\"contentTemplateRef\"></ng-container>\n } @else {\n <ui-icon\n [name]=\"iconTrigger\"\n [applicationTheme]=\"applicationTheme\"\n [size]=\"'24'\"\n [color]=\"'rebrand-black'\"\n ></ui-icon>\n }\n </button>\n }\n\n <!-- Tracked by index so refreshing the buttons re-renders the rows without destroying an open\n mat-menu, whose trigger would otherwise be left holding a dead overlay. -->\n @for (menu of submenus; track $index) {\n <mat-menu\n [xPosition]=\"menuConfig.xPosition\"\n [yPosition]=\"menuConfig.yPosition\"\n #matMenu\n [class]=\"'overflow-menu ' + menuConfig.panelClass\"\n [overlapTrigger]=\"menuConfig.overlapTrigger\"\n backdropClass=\"overflow-menu-backdrop\"\n >\n @for (button of menu; track trackByButton(id, button); let id = $index) {\n @if (button.btnTemplate) {\n <!-- Menu option by provided button template-->\n <ng-container\n [ngTemplateOutlet]=\"button.btnTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: button }\"\n ></ng-container>\n } @else if (withRemovableOption) {\n <!-- Simple menu option that can be removed dynamically -->\n <div class=\"menu-option\" [ngClass]=\"{ 'is-destructive': button.isDestructive, disabled: button.disabled }\">\n <span\n [id]=\"'labelledby-' + button.label + id\"\n class=\"label\"\n uiEllipseText\n [refresh]=\"isMenuOpened()\"\n [maxDiffPixels]=\"1\"\n [isMultiline]=\"true\"\n (onChangeTextState)=\"button.isTextEllipsed = $event\"\n >{{ button.label }}\n </span>\n @if (button.icon) {\n <ui-button\n variant=\"icon-button\"\n [applicationTheme]=\"applicationTheme\"\n [iconName]=\"button.icon\"\n [tooltip]=\"button.tooltipText ? button.tooltipText : button.isTextEllipsed ? button.label : ''\"\n [tooltipPosition]=\"'above'\"\n [size]=\"'medium'\"\n (focus)=\"onButtonFocus(button)\"\n (blur)=\"onButtonBlur(button)\"\n (mouseenter)=\"onButtonHover(button, true)\"\n (mouseleave)=\"onButtonHover(button, false)\"\n (click)=\"onSelectItem($event, button.value)\"\n [testId]=\"button.testId ?? null\"\n [ariaLabel]=\"button.ariaLabel || button.label\"\n >\n </ui-button>\n }\n </div>\n } @else {\n <!-- Default non-removable menu option -->\n @if (button.isTitleButton && !button.hideTitleButton) {\n <div class=\"menu-title\">{{ button.label }}</div>\n }\n @if (!button.isTitleButton) {\n <button\n mat-menu-item\n [matMenuTriggerFor]=\"getMenu(button.subMenu)\"\n (menuOpened)=\"onSubmenuOpened()\"\n (focus)=\"onButtonFocus(button)\"\n (blur)=\"onButtonBlur(button)\"\n (mouseenter)=\"onButtonHover(button, true)\"\n (mouseleave)=\"onButtonHover(button, false)\"\n [ngClass]=\"{ 'is-destructive': button.isDestructive, disabled: button.disabled }\"\n disableRipple\n (click)=\"onButtonClick(button, $event)\"\n [matTooltip]=\"button.tooltipText ? button.tooltipText : button.isTextEllipsed ? button.label : ''\"\n [attr.aria-labelledby]=\"'labelledby-' + button.label + id\"\n [attr.aria-describedby]=\"'describedby-' + button.label + id\"\n [attr.aria-label]=\"button.ariaLabel || null\"\n [role]=\"selectionMode() === 'single' ? 'menuitemradio' : 'menuitem'\"\n [attr.aria-checked]=\"selectionMode() === 'single' ? !!button.isSelected : null\"\n [attr.data-testid]=\"button.testId ?? null\"\n matTooltipPosition=\"right\"\n >\n <span [id]=\"'describedby-' + button.label + id\" [style.display]=\"'none'\">\n {{\n button.disabled\n ? ('MENU.MENUITEM_DISABLED' | uiTranslate | async) + ' ' + (button.describedby || '')\n : button.describedby\n }}\n </span>\n @if (button.icon) {\n <ui-icon\n [name]=\"button.icon\"\n [toggleIconStyle]=\"true\"\n [filled]=\"\n button.disabled ? false : button.isHovered ? true : menuItemHasHovered ? false : !!button.isFocused\n \"\n [applicationTheme]=\"applicationTheme\"\n [size]=\"'24'\"\n [color]=\"button.disabled ? 'dark' : button.isDestructive ? 'red' : 'rebrand-black'\"\n ></ui-icon>\n }\n <span\n [id]=\"'labelledby-' + button.label + id\"\n class=\"label\"\n uiEllipseText\n [refresh]=\"isMenuOpened()\"\n [maxDiffPixels]=\"1\"\n [isMultiline]=\"true\"\n (onChangeTextState)=\"button.isTextEllipsed = $event\"\n >{{ button.label }}</span\n >\n @if (selectionMode() === 'single' && button.isSelected) {\n <ui-icon\n class=\"overflow-menu-selected-check\"\n [name]=\"'Check-small-in-line'\"\n [applicationTheme]=\"applicationTheme\"\n [size]=\"'16'\"\n [color]=\"'rebrand-black'\"\n ></ui-icon>\n }\n @if (button.isPremium) {\n <ui-icon\n [name]=\"'Premium-circle-in-line'\"\n [applicationTheme]=\"applicationTheme\"\n [size]=\"'24'\"\n class=\"premium-icon\"\n ></ui-icon>\n }\n </button>\n }\n }\n }\n\n <ng-content select=\"[menu-content]\"></ng-content>\n </mat-menu>\n }\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { EllipseTextDirective, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\nimport { OverflowMenuComponent } from './overflow-menu.component';\n\n@NgModule({\n imports: [\n CommonModule,\n ButtonComponentModule,\n IconComponentModule,\n MatMenuModule,\n MatButtonModule,\n MatTooltipModule,\n EllipseTextDirective,\n UiTranslatePipe,\n OverflowMenuComponent,\n ],\n exports: [OverflowMenuComponent],\n})\nexport class OverflowMenuComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;AAyCA,MAAM,mBAAmB,GAAe;AACtC,IAAA,cAAc,EAAE,KAAK;AACrB,IAAA,UAAU,EAAE,EAAE;AACd,IAAA,SAAS,EAAE,OAAO;AAClB,IAAA,SAAS,EAAE,OAAO;CACnB;MAsBY,qBAAqB,CAAA;AAoHhC,IAAA,IAAI,kBAAkB,GAAA;QACpB,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;IACtE;AAIA,IAAA,WAAA,CAC6E,eAAiC,EAC3F,YAA0B,EAC1B,MAAc,EAAA;QAF4C,IAAA,CAAA,eAAe,GAAf,eAAe;QACzE,IAAA,CAAA,YAAY,GAAZ,YAAY;QACZ,IAAA,CAAA,MAAM,GAAN,MAAM;AApHzB;;;;AAI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uBAAC,eAAe;;;MErJf,2BAA2B,CAAA;+GAA3B,2BAA2B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAA3B,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,YAZpC,YAAY;YACZ,qBAAqB;YACrB,mBAAmB;YACnB,aAAa;YACb,eAAe;YACf,gBAAgB;YAChB,oBAAoB;YACpB,eAAe;AACf,YAAA,qBAAqB,aAEb,qBAAqB,CAAA,EAAA,CAAA,CAAA;AAEpB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,2BAA2B,YAZpC,YAAY;YACZ,qBAAqB;YACrB,mBAAmB;YACnB,aAAa;YACb,eAAe;YACf,gBAAgB;YAGhB,qBAAqB,CAAA,EAAA,CAAA,CAAA;;4FAIZ,2BAA2B,EAAA,UAAA,EAAA,CAAA;kBAdvC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,qBAAqB;wBACrB,mBAAmB;wBACnB,aAAa;wBACb,eAAe;wBACf,gBAAgB;wBAChB,oBAAoB;wBACpB,eAAe;wBACf,qBAAqB;AACtB,qBAAA;oBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;AACjC,iBAAA;;;ACzBD;;AAEG;;;;"}
|
|
@@ -155,7 +155,6 @@ class TagComponent {
|
|
|
155
155
|
}));
|
|
156
156
|
this.isHovered = signal(false, ...(ngDevMode ? [{ debugName: "isHovered" }] : /* istanbul ignore next */ []));
|
|
157
157
|
this.shrink = false;
|
|
158
|
-
this.iconToPass = computed(() => this.theme() !== 'classic' && this.isHovered() ? `${this.icon()}-filled` : this.icon(), ...(ngDevMode ? [{ debugName: "iconToPass" }] : /* istanbul ignore next */ []));
|
|
159
158
|
this.iconColor = 'black';
|
|
160
159
|
this.closeBtnFocused = signal(false, ...(ngDevMode ? [{ debugName: "closeBtnFocused" }] : /* istanbul ignore next */ []));
|
|
161
160
|
this.labelElement = viewChild('labelElement', ...(ngDevMode ? [{ debugName: "labelElement" }] : /* istanbul ignore next */ []));
|
|
@@ -200,11 +199,11 @@ class TagComponent {
|
|
|
200
199
|
}
|
|
201
200
|
}
|
|
202
201
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: TagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
203
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: TagComponent, isStandalone: true, selector: "ui-tag", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, allowClose: { classPropertyName: "allowClose", publicName: "allowClose", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, isSelected: { classPropertyName: "isSelected", publicName: "isSelected", isSignal: true, isRequired: false, transformFunction: null }, showIconWhenSelected: { classPropertyName: "showIconWhenSelected", publicName: "showIconWhenSelected", isSignal: true, isRequired: false, transformFunction: null }, pinnedBackground: { classPropertyName: "pinnedBackground", publicName: "pinnedBackground", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, applicationTheme: { classPropertyName: "applicationTheme", publicName: "applicationTheme", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, testId: { classPropertyName: "testId", publicName: "testId", isSignal: true, isRequired: false, transformFunction: null }, ariaRequired: { classPropertyName: "ariaRequired", publicName: "ariaRequired", isSignal: true, isRequired: false, transformFunction: null }, showBadge: { classPropertyName: "showBadge", publicName: "showBadge", isSignal: true, isRequired: false, transformFunction: null }, notificationsAmount: { classPropertyName: "notificationsAmount", publicName: "notificationsAmount", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isSelected: "isSelectedChange", close: "close", press: "press" }, viewQueries: [{ propertyName: "labelElement", first: true, predicate: ["labelElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? label() : ''\"\n [matTooltipClass]=\"theme()\"\n [tabindex]=\"tabIndex()\"\n class=\"tag-container\"\n [attr.data-testid]=\"testId() ?? 'tag--container'\"\n [attr.theme]=\"theme()\"\n [class]=\"{\n filled: filled(),\n readonly: readOnly(),\n disabled: isDisabled(),\n outlined: !isSelected(),\n shrink,\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\"\n (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\"\n (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\"\n (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel() || label()\"\n [attr.aria-required]=\"ariaRequired()\"\n >\n @if (icon()) {\n <ui-icon class=\"icon\" [color]=\"iconColor\" [name]=\"iconToPass()\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n @if (isSelected() && showIconWhenSelected()) {\n <ui-icon [color]=\"iconColor\" class=\"icon\" [name]=\"'Check'\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n <span class=\"tag-label\" #labelElement>{{ label() }}</span>\n @if (showBadge()) {\n <span class=\"count\" aria-hidden=\"true\">\n <span class=\"count-dot\">•</span>\n <span class=\"count-value\">{{ notificationsAmount() }}</span>\n </span>\n }\n @if (allowClose()) {\n <ui-icon\n (focus)=\"closeBtnFocused.set(true)\"\n (blur)=\"closeBtnFocused.set(false)\"\n [tabindex]=\"tabIndex()\"\n class=\"delete-icon\"\n [attr.data-testid]=\"closeTestId()\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\"\n (click)=\"onClose(); $event.stopPropagation()\"\n [name]=\"'Close'\"\n [applicationTheme]=\"theme()\"\n ></ui-icon>\n }\n </div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host .tag-wrapper{max-width:264px}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .tag-container{height:32px;max-width:264px;border-radius:4px;display:flex;align-items:center;justify-content:center;padding:0 8px;width:fit-content;cursor:pointer;margin:4px}:host .tag-container:focus-visible{outline:2px solid #242424;animation:focus-ring-animation .4s forwards;outline-offset:2px;position:relative}:host .tag-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:-2px;left:-2px;outline:2px solid #ffffff;border-radius:4px}:host .tag-container.outlined{border:1px solid #6894a0}:host .tag-container.filled{background:#e9f0f1;border:1px solid #e9f0f1}:host .tag-container.filled:hover{background-color:#e9f0f1;border:1px solid #276678}:host .tag-container.filled:active{background:#a9c2c9;border:1px solid #1b4754}:host .tag-container:hover{background:#f6f6f6;border:1px solid #6894a0}:host .tag-container:active{background:#e9f0f1}:host .tag-container.readonly{pointer-events:none}:host .tag-container.disabled{opacity:.5;border:1px solid #276678;background:#e9f0f1;pointer-events:none}:host .tag-container .tag-label{-webkit-user-select:none;user-select:none;font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tag-container .icon{height:16px;width:16px;min-width:16px;margin-right:8px}:host .tag-container .delete-icon{display:flex;align-items:center;justify-content:center;margin-left:8px;text-align:center;border-radius:50px}:host .tag-container[theme=dark],:host .tag-container[theme=light]{border-radius:8px;background:#f4f4f4;border:1px solid #e9e9e9;color:#242424}:host .tag-container[theme=dark].outlined:not(.filled),:host .tag-container[theme=light].outlined:not(.filled){background:#fff;border-color:#919191}:host .tag-container[theme=dark].filled.readonly,:host .tag-container[theme=light].filled.readonly{border:none}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):hover,:host .tag-container[theme=light]:not(.readonly):not(.disabled):hover{background:#d3d3d3;border-color:#d3d3d3;color:#242424}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):focus-visible,:host .tag-container[theme=light]:not(.readonly):not(.disabled):focus-visible{outline:2px solid #242424;outline-offset:2px;border-radius:10px;animation:none}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):focus-visible:after,:host .tag-container[theme=light]:not(.readonly):not(.disabled):focus-visible:after{display:none}:host .tag-container[theme=dark].shrink,:host .tag-container[theme=light].shrink{transform:scale(.98)}:host .tag-container[theme=dark].disabled,:host .tag-container[theme=light].disabled{pointer-events:none;--cnp-icon-color: #919191}:host .tag-container[theme=dark].disabled .tag-label,:host .tag-container[theme=dark].disabled .count-dot,:host .tag-container[theme=dark].disabled .count-value,:host .tag-container[theme=light].disabled .tag-label,:host .tag-container[theme=light].disabled .count-dot,:host .tag-container[theme=light].disabled .count-value{color:#919191}:host .tag-container[theme=dark] .count,:host .tag-container[theme=light] .count{display:inline-flex;align-items:center;gap:4px;margin-left:4px;font-size:14px;line-height:20px}:host .tag-container[theme=dark] .count-dot,:host .tag-container[theme=light] .count-dot{color:#666}:host .tag-container[theme=dark] .count-value,:host .tag-container[theme=light] .count-value{color:#242424;font-variant-numeric:tabular-nums}:host .tag-container[theme=dark] .icon,:host .tag-container[theme=light] .icon{margin-right:4px}:host .tag-container[theme=dark] .delete-icon,:host .tag-container[theme=light] .delete-icon{margin-left:4px;border-radius:4px;transition:outline-color .1s;outline:2px solid transparent}:host .tag-container[theme=dark] .delete-icon:focus-visible,:host .tag-container[theme=light] .delete-icon:focus-visible{outline-color:#242424}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mat-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"], dependencies: [{ kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: IconComponentModule }, { kind: "component", type: i1.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: UiTranslatePipe, name: "uiTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
202
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.19", type: TagComponent, isStandalone: true, selector: "ui-tag", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, allowClose: { classPropertyName: "allowClose", publicName: "allowClose", isSignal: true, isRequired: false, transformFunction: null }, readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, isSelected: { classPropertyName: "isSelected", publicName: "isSelected", isSignal: true, isRequired: false, transformFunction: null }, showIconWhenSelected: { classPropertyName: "showIconWhenSelected", publicName: "showIconWhenSelected", isSignal: true, isRequired: false, transformFunction: null }, pinnedBackground: { classPropertyName: "pinnedBackground", publicName: "pinnedBackground", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, applicationTheme: { classPropertyName: "applicationTheme", publicName: "applicationTheme", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, testId: { classPropertyName: "testId", publicName: "testId", isSignal: true, isRequired: false, transformFunction: null }, ariaRequired: { classPropertyName: "ariaRequired", publicName: "ariaRequired", isSignal: true, isRequired: false, transformFunction: null }, showBadge: { classPropertyName: "showBadge", publicName: "showBadge", isSignal: true, isRequired: false, transformFunction: null }, notificationsAmount: { classPropertyName: "notificationsAmount", publicName: "notificationsAmount", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isSelected: "isSelectedChange", close: "close", press: "press" }, viewQueries: [{ propertyName: "labelElement", first: true, predicate: ["labelElement"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? label() : ''\"\n [matTooltipClass]=\"theme()\"\n [tabindex]=\"tabIndex()\"\n class=\"tag-container\"\n [attr.data-testid]=\"testId() ?? 'tag--container'\"\n [attr.theme]=\"theme()\"\n [class]=\"{\n filled: filled(),\n readonly: readOnly(),\n disabled: isDisabled(),\n outlined: !isSelected(),\n shrink,\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\"\n (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\"\n (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\"\n (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel() || label()\"\n [attr.aria-required]=\"ariaRequired()\"\n >\n @if (icon()) {\n <!-- Let ui-icon resolve the hover variant: composing the name here appended instead of\n replacing, yielding names like `Sparkle-in-line-filled` that exist in no icon set. -->\n <ui-icon\n class=\"icon\"\n [color]=\"iconColor\"\n [name]=\"icon()\"\n [filled]=\"isHovered()\"\n [toggleIconStyle]=\"true\"\n [applicationTheme]=\"theme()\"\n ></ui-icon>\n }\n @if (isSelected() && showIconWhenSelected()) {\n <ui-icon [color]=\"iconColor\" class=\"icon\" [name]=\"'Check'\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n <span class=\"tag-label\" #labelElement>{{ label() }}</span>\n @if (showBadge()) {\n <span class=\"count\" aria-hidden=\"true\">\n <span class=\"count-dot\">•</span>\n <span class=\"count-value\">{{ notificationsAmount() }}</span>\n </span>\n }\n @if (allowClose()) {\n <ui-icon\n (focus)=\"closeBtnFocused.set(true)\"\n (blur)=\"closeBtnFocused.set(false)\"\n [tabindex]=\"tabIndex()\"\n class=\"delete-icon\"\n [attr.data-testid]=\"closeTestId()\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\"\n (click)=\"onClose(); $event.stopPropagation()\"\n [name]=\"'Close'\"\n [applicationTheme]=\"theme()\"\n ></ui-icon>\n }\n </div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.tag-container ui-icon:not(.delete-icon){pointer-events:none}:host .tag-wrapper{max-width:264px}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .tag-container{height:32px;max-width:264px;border-radius:4px;display:flex;align-items:center;justify-content:center;padding:0 8px;width:fit-content;cursor:pointer;margin:4px}:host .tag-container:focus-visible{outline:2px solid #242424;animation:focus-ring-animation .4s forwards;outline-offset:2px;position:relative}:host .tag-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:-2px;left:-2px;outline:2px solid #ffffff;border-radius:4px}:host .tag-container.outlined{border:1px solid #6894a0}:host .tag-container.filled{background:#e9f0f1;border:1px solid #e9f0f1}:host .tag-container.filled:hover{background-color:#e9f0f1;border:1px solid #276678}:host .tag-container.filled:active{background:#a9c2c9;border:1px solid #1b4754}:host .tag-container:hover{background:#f6f6f6;border:1px solid #6894a0}:host .tag-container:active{background:#e9f0f1}:host .tag-container.readonly{pointer-events:none}:host .tag-container.disabled{opacity:.5;border:1px solid #276678;background:#e9f0f1;pointer-events:none}:host .tag-container .tag-label{-webkit-user-select:none;user-select:none;font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tag-container .icon{height:16px;width:16px;min-width:16px;margin-right:8px}:host .tag-container .delete-icon{display:flex;align-items:center;justify-content:center;margin-left:8px;text-align:center;border-radius:50px}:host .tag-container[theme=dark],:host .tag-container[theme=light]{border-radius:8px;background:#f4f4f4;border:1px solid #e9e9e9;color:#242424}:host .tag-container[theme=dark].outlined:not(.filled),:host .tag-container[theme=light].outlined:not(.filled){background:#fff;border-color:#919191}:host .tag-container[theme=dark].filled.readonly,:host .tag-container[theme=light].filled.readonly{border:none}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):hover,:host .tag-container[theme=light]:not(.readonly):not(.disabled):hover{background:#d3d3d3;border-color:#d3d3d3;color:#242424}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):focus-visible,:host .tag-container[theme=light]:not(.readonly):not(.disabled):focus-visible{outline:2px solid #242424;outline-offset:2px;border-radius:10px;animation:none}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):focus-visible:after,:host .tag-container[theme=light]:not(.readonly):not(.disabled):focus-visible:after{display:none}:host .tag-container[theme=dark].shrink,:host .tag-container[theme=light].shrink{transform:scale(.98)}:host .tag-container[theme=dark].disabled,:host .tag-container[theme=light].disabled{pointer-events:none;--cnp-icon-color: #919191}:host .tag-container[theme=dark].disabled .tag-label,:host .tag-container[theme=dark].disabled .count-dot,:host .tag-container[theme=dark].disabled .count-value,:host .tag-container[theme=light].disabled .tag-label,:host .tag-container[theme=light].disabled .count-dot,:host .tag-container[theme=light].disabled .count-value{color:#919191}:host .tag-container[theme=dark] .count,:host .tag-container[theme=light] .count{display:inline-flex;align-items:center;gap:4px;margin-left:4px;font-size:14px;line-height:20px}:host .tag-container[theme=dark] .count-dot,:host .tag-container[theme=light] .count-dot{color:#666}:host .tag-container[theme=dark] .count-value,:host .tag-container[theme=light] .count-value{color:#242424;font-variant-numeric:tabular-nums}:host .tag-container[theme=dark] .icon,:host .tag-container[theme=light] .icon{margin-right:4px}:host .tag-container[theme=dark] .delete-icon,:host .tag-container[theme=light] .delete-icon{margin-left:4px;border-radius:4px;transition:outline-color .1s;outline:2px solid transparent}:host .tag-container[theme=dark] .delete-icon:focus-visible,:host .tag-container[theme=light] .delete-icon:focus-visible{outline-color:#242424}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mat-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"], dependencies: [{ kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: IconComponentModule }, { kind: "component", type: i1.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: UiTranslatePipe, name: "uiTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
204
203
|
}
|
|
205
204
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.19", ngImport: i0, type: TagComponent, decorators: [{
|
|
206
205
|
type: Component,
|
|
207
|
-
args: [{ selector: 'ui-tag', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatTooltip, IconComponentModule, AsyncPipe, UiTranslatePipe], template: "<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? label() : ''\"\n [matTooltipClass]=\"theme()\"\n [tabindex]=\"tabIndex()\"\n class=\"tag-container\"\n [attr.data-testid]=\"testId() ?? 'tag--container'\"\n [attr.theme]=\"theme()\"\n [class]=\"{\n filled: filled(),\n readonly: readOnly(),\n disabled: isDisabled(),\n outlined: !isSelected(),\n shrink,\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\"\n (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\"\n (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\"\n (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel() || label()\"\n [attr.aria-required]=\"ariaRequired()\"\n >\n @if (icon()) {\n <ui-icon
|
|
206
|
+
args: [{ selector: 'ui-tag', changeDetection: ChangeDetectionStrategy.OnPush, imports: [MatTooltip, IconComponentModule, AsyncPipe, UiTranslatePipe], template: "<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? label() : ''\"\n [matTooltipClass]=\"theme()\"\n [tabindex]=\"tabIndex()\"\n class=\"tag-container\"\n [attr.data-testid]=\"testId() ?? 'tag--container'\"\n [attr.theme]=\"theme()\"\n [class]=\"{\n filled: filled(),\n readonly: readOnly(),\n disabled: isDisabled(),\n outlined: !isSelected(),\n shrink,\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\"\n (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\"\n (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\"\n (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel() || label()\"\n [attr.aria-required]=\"ariaRequired()\"\n >\n @if (icon()) {\n <!-- Let ui-icon resolve the hover variant: composing the name here appended instead of\n replacing, yielding names like `Sparkle-in-line-filled` that exist in no icon set. -->\n <ui-icon\n class=\"icon\"\n [color]=\"iconColor\"\n [name]=\"icon()\"\n [filled]=\"isHovered()\"\n [toggleIconStyle]=\"true\"\n [applicationTheme]=\"theme()\"\n ></ui-icon>\n }\n @if (isSelected() && showIconWhenSelected()) {\n <ui-icon [color]=\"iconColor\" class=\"icon\" [name]=\"'Check'\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n <span class=\"tag-label\" #labelElement>{{ label() }}</span>\n @if (showBadge()) {\n <span class=\"count\" aria-hidden=\"true\">\n <span class=\"count-dot\">•</span>\n <span class=\"count-value\">{{ notificationsAmount() }}</span>\n </span>\n }\n @if (allowClose()) {\n <ui-icon\n (focus)=\"closeBtnFocused.set(true)\"\n (blur)=\"closeBtnFocused.set(false)\"\n [tabindex]=\"tabIndex()\"\n class=\"delete-icon\"\n [attr.data-testid]=\"closeTestId()\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\"\n (click)=\"onClose(); $event.stopPropagation()\"\n [name]=\"'Close'\"\n [applicationTheme]=\"theme()\"\n ></ui-icon>\n }\n </div>\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&display=swap\";.bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.tag-container ui-icon:not(.delete-icon){pointer-events:none}:host .tag-wrapper{max-width:264px}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}:host .tag-container{height:32px;max-width:264px;border-radius:4px;display:flex;align-items:center;justify-content:center;padding:0 8px;width:fit-content;cursor:pointer;margin:4px}:host .tag-container:focus-visible{outline:2px solid #242424;animation:focus-ring-animation .4s forwards;outline-offset:2px;position:relative}:host .tag-container:focus-visible:after{content:\"\";position:absolute;width:calc(100% + 4px);height:calc(100% + 4px);top:-2px;left:-2px;outline:2px solid #ffffff;border-radius:4px}:host .tag-container.outlined{border:1px solid #6894a0}:host .tag-container.filled{background:#e9f0f1;border:1px solid #e9f0f1}:host .tag-container.filled:hover{background-color:#e9f0f1;border:1px solid #276678}:host .tag-container.filled:active{background:#a9c2c9;border:1px solid #1b4754}:host .tag-container:hover{background:#f6f6f6;border:1px solid #6894a0}:host .tag-container:active{background:#e9f0f1}:host .tag-container.readonly{pointer-events:none}:host .tag-container.disabled{opacity:.5;border:1px solid #276678;background:#e9f0f1;pointer-events:none}:host .tag-container .tag-label{-webkit-user-select:none;user-select:none;font-size:14px;line-height:20px;font-weight:400;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .tag-container .icon{height:16px;width:16px;min-width:16px;margin-right:8px}:host .tag-container .delete-icon{display:flex;align-items:center;justify-content:center;margin-left:8px;text-align:center;border-radius:50px}:host .tag-container[theme=dark],:host .tag-container[theme=light]{border-radius:8px;background:#f4f4f4;border:1px solid #e9e9e9;color:#242424}:host .tag-container[theme=dark].outlined:not(.filled),:host .tag-container[theme=light].outlined:not(.filled){background:#fff;border-color:#919191}:host .tag-container[theme=dark].filled.readonly,:host .tag-container[theme=light].filled.readonly{border:none}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):hover,:host .tag-container[theme=light]:not(.readonly):not(.disabled):hover{background:#d3d3d3;border-color:#d3d3d3;color:#242424}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):focus-visible,:host .tag-container[theme=light]:not(.readonly):not(.disabled):focus-visible{outline:2px solid #242424;outline-offset:2px;border-radius:10px;animation:none}:host .tag-container[theme=dark]:not(.readonly):not(.disabled):focus-visible:after,:host .tag-container[theme=light]:not(.readonly):not(.disabled):focus-visible:after{display:none}:host .tag-container[theme=dark].shrink,:host .tag-container[theme=light].shrink{transform:scale(.98)}:host .tag-container[theme=dark].disabled,:host .tag-container[theme=light].disabled{pointer-events:none;--cnp-icon-color: #919191}:host .tag-container[theme=dark].disabled .tag-label,:host .tag-container[theme=dark].disabled .count-dot,:host .tag-container[theme=dark].disabled .count-value,:host .tag-container[theme=light].disabled .tag-label,:host .tag-container[theme=light].disabled .count-dot,:host .tag-container[theme=light].disabled .count-value{color:#919191}:host .tag-container[theme=dark] .count,:host .tag-container[theme=light] .count{display:inline-flex;align-items:center;gap:4px;margin-left:4px;font-size:14px;line-height:20px}:host .tag-container[theme=dark] .count-dot,:host .tag-container[theme=light] .count-dot{color:#666}:host .tag-container[theme=dark] .count-value,:host .tag-container[theme=light] .count-value{color:#242424;font-variant-numeric:tabular-nums}:host .tag-container[theme=dark] .icon,:host .tag-container[theme=light] .icon{margin-right:4px}:host .tag-container[theme=dark] .delete-icon,:host .tag-container[theme=light] .delete-icon{margin-left:4px;border-radius:4px;transition:outline-color .1s;outline:2px solid transparent}:host .tag-container[theme=dark] .delete-icon:focus-visible,:host .tag-container[theme=light] .delete-icon:focus-visible{outline-color:#242424}::ng-deep .mat-mdc-tooltip{background-color:#a9c2c9;font-family:Open Sans,serif;font-weight:400;font-size:12px;border-radius:4px;overflow:visible;max-width:248px;padding:6px 2px;--mdc-plain-tooltip-container-color: none;--mat-tooltip-container-color: none;--mdc-plain-tooltip-supporting-text-color: $tgo-black}\n"] }]
|
|
208
207
|
}], ctorParameters: () => [], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], allowClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowClose", required: false }] }], readOnly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], isSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "isSelected", required: false }] }, { type: i0.Output, args: ["isSelectedChange"] }], showIconWhenSelected: [{ type: i0.Input, args: [{ isSignal: true, alias: "showIconWhenSelected", required: false }] }], pinnedBackground: [{ type: i0.Input, args: [{ isSignal: true, alias: "pinnedBackground", required: false }] }], isDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isDisabled", required: false }] }], applicationTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "applicationTheme", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], testId: [{ type: i0.Input, args: [{ isSignal: true, alias: "testId", required: false }] }], ariaRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaRequired", required: false }] }], showBadge: [{ type: i0.Input, args: [{ isSignal: true, alias: "showBadge", required: false }] }], notificationsAmount: [{ type: i0.Input, args: [{ isSignal: true, alias: "notificationsAmount", required: false }] }], close: [{ type: i0.Output, args: ["close"] }], press: [{ type: i0.Output, args: ["press"] }], labelElement: [{ type: i0.ViewChild, args: ['labelElement', { isSignal: true }] }] } });
|
|
209
208
|
|
|
210
209
|
class TagComponentModule {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testgorilla-tgo-ui-components-tag.mjs","sources":["../../../components/tag/tag.component.ts","../../../components/tag/tag.component.html","../../../components/tag/tag.component.module.ts","../../../components/tag/testgorilla-tgo-ui-components-tag.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n ProviderToken,\n signal,\n viewChild,\n} from '@angular/core';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { debounceTime, map, ReplaySubject } from 'rxjs';\n\nimport { ApplicationTheme, IKeyboardEvent, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconColor, IconName, IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\n@Component({\n selector: 'ui-tag',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './tag.component.html',\n styleUrls: ['./tag.component.scss'],\n imports: [MatTooltip, IconComponentModule, AsyncPipe, UiTranslatePipe],\n})\nexport class TagComponent {\n /**\n * Tag's label\n *\n * @memberof TagComponent\n */\n label = input<string>('');\n\n /**\n * Icon\n *\n * @type {string}\n * @memberof TagComponent\n */\n icon = input<IconName>('');\n\n /**\n * Whether to allow the tag to be closed.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n allowClose = input(false, { transform: booleanAttribute });\n\n /**\n * Whether the tag is in read-only mode.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n readOnly = input(false, { transform: booleanAttribute });\n\n /**\n * Whether the tag is selected.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n isSelected = model(false);\n\n /**\n * Display icon when is selected\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n showIconWhenSelected = input(false, { transform: booleanAttribute });\n\n /**\n * Pins the tag to its filled background at rest, without tying that background\n * to the selected state — pressing the tag never flips its fill. Interactive\n * states (hover, focus ring, press scale) and the `press` output are unaffected,\n * so the tag stays clickable; use `readOnly` when it should not be.\n *\n * The fill follows the theme: grayscale in `light` / `dark`, petrol in `classic`.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n pinnedBackground = input(false, { transform: booleanAttribute });\n\n /**\n * Specifies whether the element is disabled.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n isDisabled = input(false, { transform: booleanAttribute });\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme | undefined}\n * @memberof TagComponent\n *\n * When not provided, the component falls back to the injected\n * `CANOPYUI_DEFAULT_APPLICATION_THEME` token (if any), then to `'light'`.\n */\n applicationTheme = input<ApplicationTheme | undefined>(undefined);\n private readonly defaultAppTheme = inject<ApplicationTheme>(\n 'CANOPYUI_DEFAULT_APPLICATION_THEME' as unknown as ProviderToken<ApplicationTheme>,\n { optional: true }\n );\n readonly theme = computed<ApplicationTheme>(() => this.applicationTheme() ?? this.defaultAppTheme ?? 'light');\n\n /**\n * A string representing the ARIA label for accessibility.\n * This label is used to provide an accessible name for the input element.\n * @type {string}\n * @memberof TagComponent\n */\n ariaLabel = input<string | undefined>(undefined);\n\n readonly testId = input<string | null>(null);\n\n protected readonly closeTestId = computed(() => (this.testId() ? `${this.testId()}-remove` : null));\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {boolean}\n * @memberof TagComponent\n */\n ariaRequired = input(false, { transform: booleanAttribute });\n\n /**\n * Whether to show the badge on the tag.\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n showBadge = input<boolean>(false);\n\n /**\n * The notifications amount to be displayed on the badge.\n * @type {number}\n * @default 0\n * @memberof TagComponent\n */\n notificationsAmount = input<number>(0);\n\n /**\n * Event triggered when the tag should be closed.\n *\n * @event\n * @memberof TagComponent\n */\n // eslint-disable-next-line @angular-eslint/no-output-native -- output shadows a native event; rename is breaking, deferred to the breaking-change MAJOR (see plan)\n close = output<void>();\n\n /**\n * Event triggered when a press action occurs.\n *\n * @event\n * @memberof TagComponent\n */\n press = output<boolean>();\n\n /**\n * Subject that needs to be triggered when Label input changes, to check if it's truncated\n * @private\n * @type {void}\n * @memberof TagComponent\n */\n private readonly checkLabelEllipsis$ = new ReplaySubject<void>(1);\n\n /**\n * Observable that indicates if the Label is truncated\n * debounceTime is used to wait for view to be initialized after receiving a new Label input\n * @protected\n * @type {boolean}\n * @memberof TagComponent\n */\n protected isEllipseActiveObs$ = this.checkLabelEllipsis$.pipe(\n debounceTime(100),\n map(() => {\n const el = this.labelElement()?.nativeElement;\n return el ? el.offsetWidth < el.scrollWidth : false;\n })\n );\n protected readonly isHovered = signal(false);\n protected shrink = false;\n protected readonly iconToPass = computed<IconName>(() =>\n this.theme() !== 'classic' && this.isHovered() ? (`${this.icon()}-filled` as IconName) : this.icon()\n );\n protected iconColor: IconColor = 'black';\n protected closeBtnFocused = signal(false);\n\n protected readonly labelElement = viewChild<ElementRef<HTMLElement>>('labelElement');\n\n constructor() {\n effect(() => {\n this.label(); // dep — re-run on label change\n this.labelElement(); // dep — re-run once @ViewChild resolves\n this.isLabelEllipseActive();\n });\n }\n\n onPress(): void {\n if (!this.readOnly() && !this.allowClose()) {\n const newSelected = this.showIconWhenSelected() ? !this.isSelected() : false;\n this.isSelected.set(newSelected);\n this.press.emit(newSelected);\n }\n }\n\n setHoverState(state: boolean) {\n if (this.theme() === 'classic') {\n return;\n }\n this.isHovered.set(state);\n }\n\n setShrinkState(state: boolean) {\n this.shrink = state;\n }\n\n onClose(): void {\n this.close.emit();\n }\n\n private isLabelEllipseActive(): void {\n this.checkLabelEllipsis$.next();\n }\n\n readonly tabIndex = computed(() => (this.isDisabled() || this.readOnly() ? -1 : 0));\n\n readonly filled = computed(\n () => this.readOnly() || this.allowClose() || this.isSelected() || this.pinnedBackground()\n );\n\n onKeydown($event: KeyboardEvent): void {\n if (\n ($event.key === (IKeyboardEvent.ENTER as string) || $event.key === (IKeyboardEvent.SPACE as string)) &&\n !this.closeBtnFocused()\n ) {\n this.onPress();\n } else if (\n this.closeBtnFocused() &&\n ($event.key === (IKeyboardEvent.ENTER as string) || $event.key === (IKeyboardEvent.SPACE as string))\n ) {\n this.onClose();\n }\n }\n}\n","<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? label() : ''\"\n [matTooltipClass]=\"theme()\"\n [tabindex]=\"tabIndex()\"\n class=\"tag-container\"\n [attr.data-testid]=\"testId() ?? 'tag--container'\"\n [attr.theme]=\"theme()\"\n [class]=\"{\n filled: filled(),\n readonly: readOnly(),\n disabled: isDisabled(),\n outlined: !isSelected(),\n shrink,\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\"\n (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\"\n (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\"\n (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel() || label()\"\n [attr.aria-required]=\"ariaRequired()\"\n >\n @if (icon()) {\n <ui-icon class=\"icon\" [color]=\"iconColor\" [name]=\"iconToPass()\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n @if (isSelected() && showIconWhenSelected()) {\n <ui-icon [color]=\"iconColor\" class=\"icon\" [name]=\"'Check'\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n <span class=\"tag-label\" #labelElement>{{ label() }}</span>\n @if (showBadge()) {\n <span class=\"count\" aria-hidden=\"true\">\n <span class=\"count-dot\">•</span>\n <span class=\"count-value\">{{ notificationsAmount() }}</span>\n </span>\n }\n @if (allowClose()) {\n <ui-icon\n (focus)=\"closeBtnFocused.set(true)\"\n (blur)=\"closeBtnFocused.set(false)\"\n [tabindex]=\"tabIndex()\"\n class=\"delete-icon\"\n [attr.data-testid]=\"closeTestId()\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\"\n (click)=\"onClose(); $event.stopPropagation()\"\n [name]=\"'Close'\"\n [applicationTheme]=\"theme()\"\n ></ui-icon>\n }\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { TooltipComponentModule } from '@testgorilla/tgo-ui/components/tooltip';\n\nimport { TagComponent } from './tag.component';\n\n@NgModule({\n imports: [\n CommonModule,\n IconComponentModule,\n TooltipComponentModule,\n MatTooltipModule,\n MatInputModule,\n UiTranslatePipe,\n TagComponent,\n ],\n exports: [TagComponent],\n providers: [],\n})\nexport class TagComponentModule {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Ac;YACd,eAAe;AACf,YAAA,YAAY,aAEJ,YAAY,CAAA,EAAA,CAAA,CAAA;AAGX,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAX3B,YAAY;YACZ,mBAAmB;YACnB,sBAAsB;YACtB,gBAAgB;YAChB,cAAc;YAEd,YAAY,CAAA,EAAA,CAAA,CAAA;;4FAKH,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAb9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,mBAAmB;wBACnB,sBAAsB;wBACtB,gBAAgB;wBAChB,cAAc;wBACd,eAAe;wBACf,YAAY;AACb,qBAAA;oBACD,OAAO,EAAE,CAAC,YAAY,CAAC;AACvB,oBAAA,SAAS,EAAE,EAAE;AACd,iBAAA;;;ACvBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ui-components-tag.mjs","sources":["../../../components/tag/tag.component.ts","../../../components/tag/tag.component.html","../../../components/tag/tag.component.module.ts","../../../components/tag/testgorilla-tgo-ui-components-tag.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n booleanAttribute,\n Component,\n computed,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n ProviderToken,\n signal,\n viewChild,\n} from '@angular/core';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { debounceTime, map, ReplaySubject } from 'rxjs';\n\nimport { ApplicationTheme, IKeyboardEvent, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconColor, IconName, IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\n@Component({\n selector: 'ui-tag',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './tag.component.html',\n styleUrls: ['./tag.component.scss'],\n imports: [MatTooltip, IconComponentModule, AsyncPipe, UiTranslatePipe],\n})\nexport class TagComponent {\n /**\n * Tag's label\n *\n * @memberof TagComponent\n */\n label = input<string>('');\n\n /**\n * Icon\n *\n * @type {string}\n * @memberof TagComponent\n */\n icon = input<IconName>('');\n\n /**\n * Whether to allow the tag to be closed.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n allowClose = input(false, { transform: booleanAttribute });\n\n /**\n * Whether the tag is in read-only mode.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n readOnly = input(false, { transform: booleanAttribute });\n\n /**\n * Whether the tag is selected.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n isSelected = model(false);\n\n /**\n * Display icon when is selected\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n showIconWhenSelected = input(false, { transform: booleanAttribute });\n\n /**\n * Pins the tag to its filled background at rest, without tying that background\n * to the selected state — pressing the tag never flips its fill. Interactive\n * states (hover, focus ring, press scale) and the `press` output are unaffected,\n * so the tag stays clickable; use `readOnly` when it should not be.\n *\n * The fill follows the theme: grayscale in `light` / `dark`, petrol in `classic`.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n pinnedBackground = input(false, { transform: booleanAttribute });\n\n /**\n * Specifies whether the element is disabled.\n *\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n isDisabled = input(false, { transform: booleanAttribute });\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme | undefined}\n * @memberof TagComponent\n *\n * When not provided, the component falls back to the injected\n * `CANOPYUI_DEFAULT_APPLICATION_THEME` token (if any), then to `'light'`.\n */\n applicationTheme = input<ApplicationTheme | undefined>(undefined);\n private readonly defaultAppTheme = inject<ApplicationTheme>(\n 'CANOPYUI_DEFAULT_APPLICATION_THEME' as unknown as ProviderToken<ApplicationTheme>,\n { optional: true }\n );\n readonly theme = computed<ApplicationTheme>(() => this.applicationTheme() ?? this.defaultAppTheme ?? 'light');\n\n /**\n * A string representing the ARIA label for accessibility.\n * This label is used to provide an accessible name for the input element.\n * @type {string}\n * @memberof TagComponent\n */\n ariaLabel = input<string | undefined>(undefined);\n\n readonly testId = input<string | null>(null);\n\n protected readonly closeTestId = computed(() => (this.testId() ? `${this.testId()}-remove` : null));\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {boolean}\n * @memberof TagComponent\n */\n ariaRequired = input(false, { transform: booleanAttribute });\n\n /**\n * Whether to show the badge on the tag.\n * @type {boolean}\n * @default false\n * @memberof TagComponent\n */\n showBadge = input<boolean>(false);\n\n /**\n * The notifications amount to be displayed on the badge.\n * @type {number}\n * @default 0\n * @memberof TagComponent\n */\n notificationsAmount = input<number>(0);\n\n /**\n * Event triggered when the tag should be closed.\n *\n * @event\n * @memberof TagComponent\n */\n // eslint-disable-next-line @angular-eslint/no-output-native -- output shadows a native event; rename is breaking, deferred to the breaking-change MAJOR (see plan)\n close = output<void>();\n\n /**\n * Event triggered when a press action occurs.\n *\n * @event\n * @memberof TagComponent\n */\n press = output<boolean>();\n\n /**\n * Subject that needs to be triggered when Label input changes, to check if it's truncated\n * @private\n * @type {void}\n * @memberof TagComponent\n */\n private readonly checkLabelEllipsis$ = new ReplaySubject<void>(1);\n\n /**\n * Observable that indicates if the Label is truncated\n * debounceTime is used to wait for view to be initialized after receiving a new Label input\n * @protected\n * @type {boolean}\n * @memberof TagComponent\n */\n protected isEllipseActiveObs$ = this.checkLabelEllipsis$.pipe(\n debounceTime(100),\n map(() => {\n const el = this.labelElement()?.nativeElement;\n return el ? el.offsetWidth < el.scrollWidth : false;\n })\n );\n protected readonly isHovered = signal(false);\n protected shrink = false;\n protected iconColor: IconColor = 'black';\n protected closeBtnFocused = signal(false);\n\n protected readonly labelElement = viewChild<ElementRef<HTMLElement>>('labelElement');\n\n constructor() {\n effect(() => {\n this.label(); // dep — re-run on label change\n this.labelElement(); // dep — re-run once @ViewChild resolves\n this.isLabelEllipseActive();\n });\n }\n\n onPress(): void {\n if (!this.readOnly() && !this.allowClose()) {\n const newSelected = this.showIconWhenSelected() ? !this.isSelected() : false;\n this.isSelected.set(newSelected);\n this.press.emit(newSelected);\n }\n }\n\n setHoverState(state: boolean) {\n if (this.theme() === 'classic') {\n return;\n }\n this.isHovered.set(state);\n }\n\n setShrinkState(state: boolean) {\n this.shrink = state;\n }\n\n onClose(): void {\n this.close.emit();\n }\n\n private isLabelEllipseActive(): void {\n this.checkLabelEllipsis$.next();\n }\n\n readonly tabIndex = computed(() => (this.isDisabled() || this.readOnly() ? -1 : 0));\n\n readonly filled = computed(\n () => this.readOnly() || this.allowClose() || this.isSelected() || this.pinnedBackground()\n );\n\n onKeydown($event: KeyboardEvent): void {\n if (\n ($event.key === (IKeyboardEvent.ENTER as string) || $event.key === (IKeyboardEvent.SPACE as string)) &&\n !this.closeBtnFocused()\n ) {\n this.onPress();\n } else if (\n this.closeBtnFocused() &&\n ($event.key === (IKeyboardEvent.ENTER as string) || $event.key === (IKeyboardEvent.SPACE as string))\n ) {\n this.onClose();\n }\n }\n}\n","<div class=\"tag-wrapper\">\n <div\n [matTooltip]=\"(isEllipseActiveObs$ | async) ? label() : ''\"\n [matTooltipClass]=\"theme()\"\n [tabindex]=\"tabIndex()\"\n class=\"tag-container\"\n [attr.data-testid]=\"testId() ?? 'tag--container'\"\n [attr.theme]=\"theme()\"\n [class]=\"{\n filled: filled(),\n readonly: readOnly(),\n disabled: isDisabled(),\n outlined: !isSelected(),\n shrink,\n }\"\n (click)=\"onPress()\"\n (mouseenter)=\"setHoverState(true)\"\n (mouseleave)=\"setHoverState(false)\"\n (mousedown)=\"setShrinkState(true)\"\n (mouseup)=\"setShrinkState(false)\"\n (touchstart)=\"setShrinkState(true)\"\n (touchend)=\"setShrinkState(false)\"\n (keydown)=\"onKeydown($event)\"\n [attr.aria-label]=\"ariaLabel() || label()\"\n [attr.aria-required]=\"ariaRequired()\"\n >\n @if (icon()) {\n <!-- Let ui-icon resolve the hover variant: composing the name here appended instead of\n replacing, yielding names like `Sparkle-in-line-filled` that exist in no icon set. -->\n <ui-icon\n class=\"icon\"\n [color]=\"iconColor\"\n [name]=\"icon()\"\n [filled]=\"isHovered()\"\n [toggleIconStyle]=\"true\"\n [applicationTheme]=\"theme()\"\n ></ui-icon>\n }\n @if (isSelected() && showIconWhenSelected()) {\n <ui-icon [color]=\"iconColor\" class=\"icon\" [name]=\"'Check'\" [applicationTheme]=\"theme()\"></ui-icon>\n }\n <span class=\"tag-label\" #labelElement>{{ label() }}</span>\n @if (showBadge()) {\n <span class=\"count\" aria-hidden=\"true\">\n <span class=\"count-dot\">•</span>\n <span class=\"count-value\">{{ notificationsAmount() }}</span>\n </span>\n }\n @if (allowClose()) {\n <ui-icon\n (focus)=\"closeBtnFocused.set(true)\"\n (blur)=\"closeBtnFocused.set(false)\"\n [tabindex]=\"tabIndex()\"\n class=\"delete-icon\"\n [attr.data-testid]=\"closeTestId()\"\n [attr.aria-label]=\"'TAG.REMOVE' | uiTranslate | async\"\n [color]=\"iconColor\"\n (click)=\"onClose(); $event.stopPropagation()\"\n [name]=\"'Close'\"\n [applicationTheme]=\"theme()\"\n ></ui-icon>\n }\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { TooltipComponentModule } from '@testgorilla/tgo-ui/components/tooltip';\n\nimport { TagComponent } from './tag.component';\n\n@NgModule({\n imports: [\n CommonModule,\n IconComponentModule,\n TooltipComponentModule,\n MatTooltipModule,\n MatInputModule,\n UiTranslatePipe,\n TagComponent,\n ],\n exports: [TagComponent],\n providers: [],\n})\nexport class TagComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api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