@testgorilla/tgo-ui 12.0.4 → 12.2.0
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-ai-feedback.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-badge.mjs +2 -2
- package/fesm2022/testgorilla-tgo-ui-components-badge.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-button.mjs +14 -4
- package/fesm2022/testgorilla-tgo-ui-components-button.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs +2 -0
- package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-field.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs +2 -0
- package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-table.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-table.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs.map +1 -1
- package/mcp/catalog.json +1 -1
- package/package.json +1 -1
- package/types/testgorilla-tgo-ui-components-button.d.ts +12 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testgorilla-tgo-ui-components-button.mjs","names":[],"sources":["../../../components/button/color-contrast.ts","../../../components/button/button.component.ts","../../../components/button/button.component.html","../../../components/button/button.component.module.ts"],"sourcesContent":["/**\n * Function for adjusting the lightness of a color based on different events (hover, pressed, disabled).\n * Accepts a hex color, transforms it to HSL, and based on color's L and event darkens or lightens it.\n * Used to manage different colors based on application configuration\n *\n * @param hexColor color in hex format\n * @param typeEvent interaction event\n * @param theme\n */\ntype LightnessEvent = 'hover' | 'pressed' | 'disabled';\n\n/** Lightness band of a colour, in percent. `null` = exactly on a 30/70 boundary (no adjustment). */\nconst lightnessBand = (lightness: number): 'high' | 'low' | 'mid' | null => {\n if (lightness > 70) {\n return 'high';\n }\n if (lightness < 30) {\n return 'low';\n }\n if (lightness < 70 && lightness > 30) {\n return 'mid';\n }\n return null;\n};\n\n/** Lightness delta (in percent points) for the `new` theme. */\nconst getNewThemeDelta = (lightness: number, typeEvent: LightnessEvent): number => {\n if (typeEvent !== 'hover' && typeEvent !== 'pressed') {\n return 0;\n }\n const band = lightnessBand(lightness);\n return band === 'low' ? 10 : band ? -10 : 0;\n};\n\n/** Lightness delta (in percent points) for the `classic` theme. */\nconst getClassicThemeDelta = (lightness: number, typeEvent: LightnessEvent): number => {\n const deltasByEvent: Record<LightnessEvent, { high: number; low: number; mid: number }> = {\n hover: { high: -10, low: 10, mid: -10 },\n pressed: { high: -20, low: 30, mid: -20 },\n disabled: { high: 10, low: 50, mid: 20 },\n };\n const band = lightnessBand(lightness);\n if (!band) {\n return 0;\n }\n // typeEvent is LightnessEvent at compile time, but callers may pass an\n // out-of-range button state at runtime (matches the original no-op behaviour).\n const eventDeltas: { high: number; low: number; mid: number } | undefined = deltasByEvent[typeEvent];\n return eventDeltas ? eventDeltas[band] : 0;\n};\n\nexport const adjustLightness = (\n hexColor: string,\n typeEvent: LightnessEvent,\n theme: 'new' | 'classic' = 'new'\n): string => {\n const hexRegex = /^#(?:[0-9A-F]{3}|[0-9A-F]{6})$/i;\n if (hexColor && !hexRegex.test(hexColor)) {\n throw new Error('Invalid HEX color format');\n }\n\n const hslColor = hexToHsl(hexColor);\n const lightness = hslColor.l * 100;\n const delta = theme === 'new' ? getNewThemeDelta(lightness, typeEvent) : getClassicThemeDelta(lightness, typeEvent);\n hslColor.l = clamp(hslColor.l + delta / 100);\n\n return hslToHex(hslColor);\n};\n\n/**\n * Transforms hex color to HSL in object variation.\n * @param hexColor string value with hex color\n */\nexport const hexToHsl = (hexColor: string): { h: number; s: number; l: number } => {\n const rgbColor = parseInt(hexColor.slice(1), 16);\n /* eslint-disable no-bitwise -- standard RGB channel extraction from a packed 24-bit integer */\n const r = ((rgbColor >> 16) & 255) / 255;\n const g = ((rgbColor >> 8) & 255) / 255;\n const b = (rgbColor & 255) / 255;\n /* eslint-enable no-bitwise */\n\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n\n let h = 0;\n let s;\n const l = (max + min) / 2;\n\n if (max === min) {\n h = s = 0; // grayscale\n } else {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n\n h /= 6;\n }\n\n return { h, s, l };\n};\n\n/**\n * Transforms HSL color, represented as an object and transforms it to hex string.\n * @param hslColor accepts the HSL color like an object.\n */\nexport const hslToHex = (hslColor: { h: number; s: number; l: number }): string => {\n const { h, s, l } = hslColor;\n\n const hueToRgb = (p: number, q: number, t: number): number => {\n let tNorm = t;\n if (tNorm < 0) {\n tNorm += 1;\n }\n if (tNorm > 1) {\n tNorm -= 1;\n }\n if (tNorm < 1 / 6) {\n return p + (q - p) * 6 * tNorm;\n }\n if (tNorm < 1 / 2) {\n return q;\n }\n if (tNorm < 2 / 3) {\n return p + (q - p) * (2 / 3 - tNorm) * 6;\n }\n return p;\n };\n\n const qBase = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const pBase = 2 * l - qBase;\n\n const r = hueToRgb(pBase, qBase, h + 1 / 3);\n const g = hueToRgb(pBase, qBase, h);\n const b = hueToRgb(pBase, qBase, h - 1 / 3);\n\n // eslint-disable-next-line no-bitwise -- standard RGB channel packing into a 24-bit integer\n const rgbColor = (Math.round(r * 255) << 16) | (Math.round(g * 255) << 8) | Math.round(b * 255);\n\n return `#${rgbColor.toString(16).padStart(6, '0')}`;\n};\n\n/**\n * Restricts the value to be within the range [0, 1].\n * @param value\n */\nconst clamp = (value: number): number => Math.min(Math.max(value, 0), 1);\n","/* eslint-disable @angular-eslint/use-lifecycle-interface */\nimport { FocusOrigin } from '@angular/cdk/a11y';\nimport { NgClass, NgStyle, AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n AfterViewInit,\n booleanAttribute,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n OnInit,\n Optional,\n Output,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { MatButton } from '@angular/material/button';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\nimport { TooltipPosition, MatTooltip } from '@angular/material/tooltip';\n\nimport { BadgeComponent } from '@testgorilla/tgo-ui/components/badge';\nimport { ApplicationTheme, Color, EllipseTextDirective, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconName, IconComponentModule, tgoIcons, tgoRebrandIcons } from '@testgorilla/tgo-ui/components/icon';\n\nimport {\n ButtonBadgeConfig,\n ButtonColor,\n ButtonIconPosition,\n ButtonSize,\n ButtonState,\n ButtonType,\n IconButtonSize,\n LinkUrlTarget,\n} from './button.model';\nimport { adjustLightness } from './color-contrast';\n\n@Component({\n selector: 'ui-button',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n imports: [\n MatTooltip,\n NgClass,\n BadgeComponent,\n MatButton,\n NgStyle,\n MatProgressSpinner,\n IconComponentModule,\n EllipseTextDirective,\n AsyncPipe,\n UiTranslatePipe,\n ],\n})\nexport class ButtonComponent implements OnInit, AfterViewInit {\n @HostBinding('style.pointer-events')\n get enabled(): string {\n return this.disabled ? 'none' : 'all';\n }\n\n @ViewChild('tooltipElement') tooltipElement: ElementRef<HTMLElement>;\n\n /**\n * Define button height\n *\n * @type {ButtonSize}\n * @memberof ButtonComponent\n */\n @Input() size: ButtonSize = 'big';\n /**\n * Background color of the button while in active state\n *\n * @type {ButtonColor}\n * @memberof ButtonComponent\n */\n @HostBinding('attr.btn-variant')\n @Input()\n variant: ButtonColor = 'primary';\n\n /**\n * Text content to appear on the button\n *\n * @memberof ButtonComponent\n */\n @Input() label = '';\n\n /**\n * Positioning of the icon (when existant)\n *\n * @type {ButtonIconPosition}\n * @memberof ButtonComponent\n */\n @Input() iconPosition?: ButtonIconPosition = 'right';\n\n /**\n * Define if button has only icon without text\n *\n * @memberof ButtonComponent\n */\n @Input() justIcon = false;\n\n /**\n * Name of ui-icon\n *\n * @type {IconName}\n * @memberof ButtonComponent\n */\n @Input() iconName: IconName | undefined;\n\n /**\n * Name of a second ui-icon rendered after the label, in addition to `iconName`.\n * Pair it with `iconPosition=\"left\"` to show a leading and a trailing icon at once.\n *\n * @type {IconName}\n * @memberof ButtonComponent\n */\n @Input() trailingIconName: IconName | undefined;\n\n /**\n * Renders the trailing icon filled, independently of `iconFilled`.\n *\n * @memberof ButtonComponent\n */\n @Input() trailingIconFilled = false;\n\n /**\n * Indicator if the button should be disabled\n *\n * @memberof ButtonComponent\n */\n @Input() disabled = false;\n\n /**\n * Indicator if the loading icon should be shown\n *\n * @memberof ButtonComponent\n */\n @Input() loading = false;\n\n /**\n * Show a small inline spinner to the left of the label while keeping the\n * label visible. Pair with `disabled` to make the button non-interactive.\n * If `loading` is also true, `loading` takes precedence.\n *\n * @memberof ButtonComponent\n */\n @Input() loadingWithLabel = false;\n\n /**\n * Indicator of the button width\n *\n * @memberof ButtonComponent\n */\n @Input() fullWidth = false;\n\n /**\n * Url of button if it is a link\n *\n * @memberof ButtonComponent\n */\n @Input() url?: string;\n\n /**\n * Url's target of button if it is a link\n *\n * @type {@type {LinkUrlTarget}}\n * @memberof ButtonComponent\n */\n @Input() urlTarget?: LinkUrlTarget;\n\n /**\n * Button value\n *\n * @memberof ButtonComponent\n */\n @Input() value?: string;\n\n /**\n * @property tooltip\n * @description The tooltip that is displayed on hover. Required for icon-button type\n * @type {string}\n * @memberof ButtonComponent\n */\n @Input() tooltip = '';\n\n /**\n * @property isPremium\n * @description The icon that is displayed for Premium button\n * @type {boolean}\n * @memberof ButtonComponent\n */\n @Input() isPremium = false;\n\n /**\n * The type of the button.\n *\n * @type {ButtonType}\n * @memberof ButtonComponent\n * @default 'button'\n */\n @Input() type: ButtonType = 'button';\n\n /**\n * Color of the button.\n * Defaults to Test Gorilla primary color.\n *\n * @type {string}\n * @memberof ButtonComponent\n */\n @Input() companyColor: string | null = '';\n\n /**\n * Config for the button badge variation\n * @type {ButtonBadgeConfig}\n * @property badgeType Type of badge on the button\n * @property badgeLabel Label text for the badge\n * @property badgeNotificationAmount The amount for notification in the badge\n */\n @Input() buttonBadgeConfig: ButtonBadgeConfig | undefined;\n\n /**\n *\n * Defines the application theme where buttons is used\n *\n * @type {ApplicationTheme}\n * @memberof ButtonComponent\n */\n @HostBinding('attr.theme')\n @Input()\n applicationTheme: ApplicationTheme = 'light';\n\n /** The premium marker reads as the warning badge does, so the two are recognisably the same signal. */\n protected readonly premiumMarkerColor = Color.BLACK;\n\n /**\n *\n * Disabled button scale on click\n *\n * @type {boolean}\n * @memberof ButtonComponent\n */\n @Input() disabledScaleOnClick = false;\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 ButtonComponent\n */\n @Input() ariaLabel: string;\n\n /**\n * Whether the button controls a disclosure widget that is currently expanded.\n * Set to `true` for an expanded disclosure, `false` for collapsed, or leave\n * undefined when the button is not a disclosure trigger.\n * @memberof ButtonComponent\n */\n @Input() ariaExpanded?: boolean;\n\n /**\n * The id of the element controlled by this button (used together with\n * `ariaExpanded` for disclosure semantics).\n * @memberof ButtonComponent\n */\n @Input() ariaControls?: string;\n\n /**\n * Whether the button is a toggle button currently in the pressed state.\n * Use `true` / `false` for two-state toggles. Leave undefined when the\n * button is not a toggle.\n * @memberof ButtonComponent\n */\n @Input() ariaPressed?: boolean;\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 ButtonComponent\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 field is required for form submission.\n * @type {string}\n * @memberof ButtonComponent\n */\n @Input() ariaLabelledby = '';\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 {string}\n * @memberof ButtonComponent\n */\n @Input() ariaDescribedby = '';\n\n /**\n * Prevents default button click behavior\n * @type {boolean}\n * @memberof ButtonComponent\n */\n @Input({ transform: booleanAttribute }) preventDefault = false;\n\n /**\n * Ghost variant with white background\n * @type {boolean}\n * @memberof ButtonComponent\n */\n @Input({ transform: booleanAttribute }) hasBackground = false;\n\n /**\n * Sets tooltip position\n *\n * @type {TooltipPosition}\n * @memberof ButtonComponent\n */\n @Input() tooltipPosition: TooltipPosition = 'below';\n\n @Input() role = 'button';\n\n @Input() iconFilled = false;\n\n @Input() testId: string | null = null;\n\n @Output() buttonClickEvent: EventEmitter<Event> = new EventEmitter<Event>();\n\n @Output() buttonHoverEvent: EventEmitter<Event> = new EventEmitter<Event>();\n\n @ViewChild('buttonElement', { static: false }) buttonElement: MatButton;\n\n get isDisabled(): boolean {\n return this.disabled;\n }\n\n @HostBinding('style.--color')\n get compColor() {\n return this.getCompanyColor;\n }\n\n classCss: string;\n styleCss: Record<string, string>;\n isButtonLink: boolean;\n isLabel: boolean;\n buttonState: ButtonState;\n hover = false;\n iconButtonSize: IconButtonSize = '40';\n allowButtonTypeForPremium: ButtonColor[] = [\n 'secondary',\n 'secondary-inverted',\n 'primary',\n 'ghost',\n 'outlined',\n 'destructive',\n 'icon-button',\n ];\n isFilledIcon: boolean;\n coloredIcons = ['Google-in-line', 'Google', 'Google-filled', 'Linkedin-brand-filled', 'Linkedin-brand-in-line'];\n labelEllipsis = false;\n icon: IconName = '';\n trailingIcon: IconName = '';\n\n private static nextAriaLabelledId = 0;\n ariaLabelledbyId = '';\n\n get typeIncluded(): boolean {\n return this.allowButtonTypeForPremium.includes(this.variant);\n }\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n ngOnInit(): void {\n this.classCss = this.setCssClass();\n this.styleCss = this.setCssStyle();\n this.isButtonLink = this.showButtonLink();\n this.isLabel = this.showLabel();\n this.createAriaLabelledById();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['disabled']) {\n this.buttonState = 'default';\n }\n if (!this.applicationTheme) {\n this.applicationTheme = 'light';\n }\n if (changes['type']) {\n this.isButtonLink = this.showButtonLink();\n }\n if (changes['loading']) {\n this.isLabel = this.showLabel();\n }\n if (changes['iconName']) {\n this.icon = changes['iconName'].currentValue as IconName;\n }\n if (changes['trailingIconName']) {\n this.trailingIcon = changes['trailingIconName'].currentValue as IconName;\n }\n if (this.hasCssAffectingChange(changes)) {\n this.classCss = this.setCssClass();\n this.styleCss = this.setCssStyle();\n }\n if (this.isIconButtonSizeChange(changes)) {\n this.iconButtonSize = this.setIconButtonSize();\n }\n\n this.isFilledIcon = this.isFilledIconVariant();\n }\n\n private hasCssAffectingChange(changes: SimpleChanges): boolean {\n return Boolean(\n changes['type'] ||\n changes['fullWidth'] ||\n changes['iconName'] ||\n changes['trailingIconName'] ||\n changes['trailingIconFilled'] ||\n changes['justIcon'] ||\n changes['iconPosition'] ||\n changes['disabled'] ||\n changes['companyColor'] ||\n changes['variant'] ||\n changes['applicationTheme']\n );\n }\n\n private isIconButtonSizeChange(changes: SimpleChanges): boolean {\n return (\n changes['variant']?.currentValue === 'icon-button' ||\n (changes['variant']?.currentValue === 'menuTrigger' && this.applicationTheme !== 'classic')\n );\n }\n\n private isFilledIconVariant(): boolean {\n return (\n this.applicationTheme !== 'classic' &&\n (this.variant === 'primary' ||\n this.variant === 'secondary' ||\n this.variant === 'secondary-inverted' ||\n this.variant === 'linkedin')\n );\n }\n\n ngAfterViewInit(): void {\n this.tooltipElement.nativeElement.onclick = ev => {\n ev.preventDefault();\n ev.stopPropagation();\n };\n }\n\n buttonClick(event: Event): void {\n if (this.preventDefault) {\n event.preventDefault();\n event.stopPropagation();\n }\n this.buttonClickEvent.emit(event);\n }\n\n buttonHover(event: Event): void {\n if (event.type === 'mouseenter') {\n this.hover = true;\n this.buttonHoverEvent.emit(event);\n this.buttonState = 'hover';\n if (this.shouldChangeFilledStatus && this.icon) {\n this.icon = this.getIconName(this.iconName as IconName, '-filled');\n }\n if (this.trailingIcon && this.canToggleFilled(this.trailingIcon)) {\n this.trailingIcon = this.getIconName(this.trailingIconName as IconName, '-filled');\n }\n } else {\n this.hover = false;\n if (this.shouldChangeFilledStatus && this.icon) {\n this.icon = this.iconName as IconName;\n }\n if (this.trailingIcon && this.canToggleFilled(this.trailingIcon)) {\n this.trailingIcon = this.trailingIconName as IconName;\n }\n this.buttonState = 'default';\n }\n\n this.styleCss = this.setCssStyle();\n }\n\n //Show or hide label\n showLabel(): boolean {\n return !this.loading;\n }\n\n //Set css class according inputs\n setCssClass(): string {\n const width = this.fullWidth ? 'full-width' : '';\n const hasIcon = this.iconName === null ? '' : 'icon';\n const justIcon = this.justIcon || this.variant === 'icon-button' ? 'only-icon' : '';\n const iconPosition = this.iconPosition ?? '';\n const disabled = this.disabled && this.variant === 'primary' ? 'primary-disabled' : '';\n const variant = this.variant === 'ghost' && this.applicationTheme === 'classic' ? 'outlined' : this.variant;\n const companyColor = this.companyColor ? 'has-company-color' : '';\n return `${this.size} ${iconPosition} ${variant} ${width} ${hasIcon} ${justIcon} ${disabled} ${companyColor} ${this.applicationTheme}-theme`;\n }\n\n setCssStyle(): Record<string, string> {\n this.buttonState = this.disabled ? 'disabled' : this.buttonState;\n return (\n this.getInteractiveStyle() ??\n this.getClassicInteractiveStyle() ??\n this.getCompanyColorStyle() ??\n this.getGhostBackgroundStyle() ??\n {}\n );\n }\n\n private get isColorVariant(): boolean {\n return this.variant === 'primary' || this.variant === 'text' || this.variant === 'text-inline';\n }\n\n private get isTextVariant(): boolean {\n return this.variant === 'text' || this.variant === 'text-inline';\n }\n\n private getInteractiveStyle(): Record<string, string> | null {\n if (this.buttonState !== 'hover' && this.buttonState !== 'pressed') {\n return null;\n }\n if (!this.isColorVariant || this.applicationTheme === 'classic') {\n return null;\n }\n const styleObj: Record<string, string> = {};\n styleObj[this.variant === 'primary' ? 'background-color' : 'color'] = adjustLightness(\n this.getCompanyColor,\n this.buttonState\n );\n if (this.isTextVariant) {\n styleObj['--active-color'] = this.companyColor\n ? adjustLightness(this.getCompanyColor, this.buttonState)\n : '#666666';\n }\n return styleObj;\n }\n\n private getClassicInteractiveStyle(): Record<string, string> | null {\n if (this.buttonState === 'default') {\n return null;\n }\n if (!this.isColorVariant || this.applicationTheme !== 'classic') {\n return null;\n }\n return {\n [this.variant === 'primary' ? 'background-color' : 'color']: adjustLightness(\n this.getCompanyColor,\n this.buttonState,\n 'classic'\n ),\n };\n }\n\n private getCompanyColorStyle(): Record<string, string> | null {\n const isCompanyColorVariant =\n this.variant === 'link' || this.variant === 'tertiary' || this.variant === 'icon-button';\n if (!(this.getCompanyColor && isCompanyColorVariant)) {\n return null;\n }\n return { color: this.getCompanyColor };\n }\n\n private getGhostBackgroundStyle(): Record<string, string> | null {\n return this.hasBackground ? { '--ghost-background': '#ffffff' } : null;\n }\n\n //Show or hide spinner\n get showSpinner(): boolean {\n const isNotTab = this.variant !== 'tab';\n const isNotLink = this.variant !== 'link';\n const isLoading = this.loading === true;\n return isLoading && isNotTab && isNotLink;\n }\n\n //Show or hide the inline spinner that sits next to the label\n get showInlineSpinner(): boolean {\n return (\n this.loadingWithLabel && !this.loading && this.variant !== 'tab' && this.variant !== 'link' && !this.justIcon\n );\n }\n\n //Show button with <button> or <a> tag\n showButtonLink(): boolean {\n return this.variant !== 'link';\n }\n\n setIconButtonSize(): IconButtonSize {\n return this.size === 'big' ? '40' : this.size === 'small' ? '24' : '32';\n }\n\n onPressed(ev: Event): void {\n if (ev.type === 'mousedown') {\n this.buttonState = 'pressed';\n } else {\n this.buttonState = this.hover ? 'hover' : 'default';\n }\n\n this.styleCss = this.setCssStyle();\n }\n\n focus(origin?: FocusOrigin): void {\n this.buttonElement.focus(origin);\n }\n\n get getCompanyColor(): string {\n return (\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- empty companyColor ('' is the default) falls back to the theme colour\n this.companyColor ||\n (this.variant === 'text' || this.variant === 'text-inline'\n ? this.applicationTheme === 'dark'\n ? '#ffffff'\n : '#242424'\n : this.applicationTheme === 'classic'\n ? '#46A997'\n : '#D410AA')\n );\n }\n\n get shouldChangeFilledStatus(): boolean {\n return this.canToggleFilled(this.icon);\n }\n\n /**\n * Whether this specific icon may be swapped to its filled variant on hover. Takes the icon as an\n * argument because a button can render two, and a brand icon in one slot must not freeze the other.\n */\n canToggleFilled(icon: IconName): boolean {\n return (\n this.applicationTheme !== 'classic' &&\n this.variant !== 'primary' &&\n this.variant !== 'secondary' &&\n this.variant !== 'linkedin' &&\n !this.coloredIcons.includes(icon)\n );\n }\n\n onKeydown(event: KeyboardEvent): void {\n if (event.key === ' ') {\n event.preventDefault();\n const target = event.target as HTMLElement;\n target.click();\n }\n\n if (event.key === 'Enter' || event.key === ' ') {\n this.buttonState = 'pressed';\n this.styleCss = this.setCssStyle();\n }\n }\n\n onKeyup(event: KeyboardEvent): void {\n if (event.key === 'Enter' || event.key === ' ') {\n this.buttonState = this.hover ? 'hover' : 'default';\n this.styleCss = this.setCssStyle();\n }\n }\n\n onLabelEllipsisChange(state: boolean): void {\n this.labelEllipsis = state;\n }\n\n getIconName(iconName: string, defaultValue: string): IconName {\n if (iconName.includes('filled')) {\n return iconName.replace(/filled/, 'in-line') as IconName;\n } else if (iconName.includes('in-line')) {\n return iconName.replace(/in-line/, 'filled') as IconName;\n }\n // Only append when the result is a real icon; otherwise it falls outside the IconName union.\n const suffixed = iconName + defaultValue;\n return this.isKnownIconName(suffixed) ? suffixed : (iconName as IconName);\n }\n\n private isKnownIconName(name: string): name is IconName {\n return (tgoRebrandIcons as readonly string[]).includes(name) || (tgoIcons as readonly string[]).includes(name);\n }\n\n private createAriaLabelledById(): void {\n const labelledByValue = this.variant === 'link' ? 'labelledby-link' : 'labelledby';\n this.ariaLabelledbyId = `${labelledByValue}-uiButton-${++ButtonComponent.nextAriaLabelledId}`;\n }\n}\n","<div\n #tooltipElement\n class=\"tooltip\"\n [matTooltip]=\"tooltip ? tooltip : labelEllipsis ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n></div>\n<div\n class=\"button-wrapper\"\n [ngClass]=\"{\n 'full-width': fullWidth,\n 'rounded-icon': applicationTheme !== 'classic' && icon && !label,\n link: !isButtonLink,\n }\"\n>\n <div\n class=\"button-container\"\n [ngClass]=\"{\n disabled: disabled,\n 'button-scale': buttonState === 'pressed' && applicationTheme !== 'classic' && !disabledScaleOnClick,\n }\"\n >\n @if (isPremium && typeIncluded) {\n <span class=\"right-top premium-marker\">\n <ui-icon name=\"Premium-in-line\" size=\"16\" [color]=\"premiumMarkerColor\"></ui-icon>\n </span>\n }\n @if (buttonBadgeConfig?.badgeType) {\n <ui-badge\n id=\"badge\"\n [rebrandColor]=\"buttonBadgeConfig?.rebrandColor ?? 'brand'\"\n [variant]=\"buttonBadgeConfig!.badgeType!\"\n [label]=\"buttonBadgeConfig?.badgeLabel ?? ''\"\n [notificationsAmount]=\"buttonBadgeConfig?.badgeNotificationAmount ?? 0\"\n class=\"right-top\"\n [ngClass]=\"[\n buttonBadgeConfig?.badgeType === 'primary' ? 'badge-primary' : '',\n buttonBadgeConfig?.badgeType === 'notification' ? 'badge-notification' : '',\n variant,\n ]\"\n ></ui-badge>\n }\n @if (isButtonLink) {\n <button\n [style]=\"'--icon-button-size:' + iconButtonSize + 'px'\"\n [ngClass]=\"classCss\"\n [ngStyle]=\"styleCss\"\n [disabled]=\"disabled\"\n (click)=\"buttonClick($event)\"\n (mouseleave)=\"buttonHover($event)\"\n (mouseenter)=\"buttonHover($event)\"\n (mousedown)=\"onPressed($event)\"\n (mouseup)=\"onPressed($event)\"\n (keydown)=\"onKeydown($event)\"\n (keyup)=\"onKeyup($event)\"\n [attr.aria-required]=\"ariaRequired\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledbyId\"\n [attr.aria-describedby]=\"'describedby'\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-controls]=\"ariaControls\"\n [attr.aria-pressed]=\"ariaPressed\"\n [attr.data-testid]=\"testId\"\n [type]=\"type\"\n [disableRipple]=\"applicationTheme !== 'classic'\"\n [matTooltip]=\"tooltip ? tooltip : labelEllipsis ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n [matTooltipPosition]=\"tooltipPosition\"\n #buttonElement\n [attr.role]=\"role\"\n mat-flat-button\n >\n <span id=\"describedby\" [style.display]=\"'none'\">\n {{ isPremium ? label + ' ' + ('BUTTON.PREMIUM_FEATURE' | uiTranslate | async) : ariaDescribedby }}\n </span>\n <span [id]=\"ariaLabelledbyId\" [style.display]=\"'none'\">\n {{ ariaLabelledby }}\n </span>\n @if (showSpinner) {\n <span class=\"spinner-wrapper\">\n <mat-spinner class=\"position-spinner\" aria-label=\"loading\" mode=\"indeterminate\" diameter=\"24\"></mat-spinner>\n </span>\n } @else {\n @if (justIcon && !!icon) {\n <span class=\"icon-only-wrapper\">\n <span class=\"icon only\" role=\"label\">\n <ui-icon\n [color]=\"variant === 'ghost-ai' ? 'ai' : 'inherit'\"\n [applicationTheme]=\"applicationTheme\"\n [name]=\"icon\"\n [filled]=\"isFilledIcon || iconFilled\"\n [useFullIconName]=\"variant === 'primary' || variant === 'secondary' || variant === 'linkedin'\"\n [size]=\"size === 'small' ? '16' : '24'\"\n ></ui-icon>\n </span>\n </span>\n }\n @if (!justIcon) {\n <span class=\"icon-label-wrapper\" [ngClass]=\"{ 'center-text': iconName === '' }\">\n @if (showInlineSpinner) {\n <span class=\"icon inline-spinner\" aria-hidden=\"true\">\n <mat-spinner\n aria-label=\"loading\"\n mode=\"indeterminate\"\n [diameter]=\"size === 'small' ? 16 : 20\"\n ></mat-spinner>\n </span>\n }\n @if (iconPosition === 'left' && !!iconName && !showInlineSpinner) {\n <span class=\"icon\" aria-hidden=\"true\">\n <ui-icon\n [color]=\"variant === 'ghost-ai' ? 'ai' : 'inherit'\"\n [applicationTheme]=\"applicationTheme\"\n [name]=\"icon\"\n [filled]=\"isFilledIcon || iconFilled\"\n [useFullIconName]=\"variant === 'primary' || variant === 'secondary' || variant === 'linkedin'\"\n [size]=\"size === 'small' ? '16' : '24'\"\n ></ui-icon>\n </span>\n }\n @if (isLabel) {\n <span\n class=\"label\"\n id=\"label\"\n uiEllipseText\n [isMultiline]=\"true\"\n (onChangeTextState)=\"onLabelEllipsisChange($event)\"\n >\n {{ label }}\n </span>\n }\n @if (iconPosition === 'right' && !!icon) {\n <span class=\"icon\" aria-hidden=\"true\"\n ><ui-icon\n [color]=\"variant === 'ghost-ai' ? 'ai' : 'inherit'\"\n [applicationTheme]=\"applicationTheme\"\n [name]=\"icon\"\n [filled]=\"isFilledIcon || iconFilled\"\n [size]=\"size === 'small' ? '16' : '24'\"\n [useFullIconName]=\"variant === 'primary' || variant === 'secondary' || variant === 'linkedin'\"\n ></ui-icon\n ></span>\n }\n @if (!!trailingIcon && !showInlineSpinner) {\n <span class=\"icon trailing\" aria-hidden=\"true\"\n ><ui-icon\n [color]=\"variant === 'ghost-ai' ? 'ai' : 'inherit'\"\n [applicationTheme]=\"applicationTheme\"\n [name]=\"trailingIcon\"\n [filled]=\"isFilledIcon || trailingIconFilled\"\n [size]=\"size === 'small' ? '16' : '24'\"\n [useFullIconName]=\"variant === 'primary' || variant === 'secondary' || variant === 'linkedin'\"\n ></ui-icon\n ></span>\n }\n </span>\n }\n }\n </button>\n }\n @if (!isButtonLink) {\n <a\n #buttonElement\n [ngClass]=\"classCss\"\n [ngStyle]=\"styleCss\"\n [disabled]=\"disabled\"\n (click)=\"buttonClick($event)\"\n (mouseenter)=\"buttonHover($event)\"\n (mouseleave)=\"buttonHover($event)\"\n (mousedown)=\"onPressed($event)\"\n (mouseup)=\"onPressed($event)\"\n (keydown)=\"onKeydown($event)\"\n (keyup)=\"onKeyup($event)\"\n [disableRipple]=\"true\"\n [attr.aria-required]=\"ariaRequired\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledbyId\"\n [attr.aria-describedby]=\"'describedby-link'\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-controls]=\"ariaControls\"\n [attr.aria-pressed]=\"ariaPressed\"\n [attr.data-testid]=\"testId\"\n [matTooltip]=\"tooltip ? tooltip : labelEllipsis ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n role=\"link\"\n [href]=\"url\"\n [target]=\"urlTarget\"\n mat-flat-button\n >\n <span id=\"describedby-link\" [style.display]=\"'none'\">\n {{ ariaDescribedby }}\n </span>\n <span [id]=\"ariaLabelledbyId\" [style.display]=\"'none'\">\n {{ ariaLabelledby }}\n </span>\n <span class=\"icon-label-wrapper\">\n {{ label }}\n </span>\n </a>\n }\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { BadgeComponentModule } from '@testgorilla/tgo-ui/components/badge';\nimport { EllipseTextDirective, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\nimport { ButtonComponent } from './button.component';\n\n@NgModule({\n imports: [\n CommonModule,\n MatButtonModule,\n IconComponentModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n BadgeComponentModule,\n EllipseTextDirective,\n MatRadioModule,\n UiTranslatePipe,\n ButtonComponent,\n ],\n exports: [ButtonComponent],\n providers: [],\n})\nexport class ButtonComponentModule {}\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,iBAAiB,cAAoD;CACzE,IAAI,YAAY,IACd,OAAO;CAET,IAAI,YAAY,IACd,OAAO;CAET,IAAI,YAAY,MAAM,YAAY,IAChC,OAAO;CAET,OAAO;AACT;AAGA,MAAM,oBAAoB,WAAmB,cAAqC;CAChF,IAAI,cAAc,WAAW,cAAc,WACzC,OAAO;CAET,MAAM,OAAO,cAAc,SAAS;CACpC,OAAO,SAAS,QAAQ,KAAK,OAAO,MAAM;AAC5C;AAGA,MAAM,wBAAwB,WAAmB,cAAqC;CACpF,MAAM,gBAAoF;EACxF,OAAO;GAAE,MAAM;GAAK,KAAK;GAAI,KAAK;EAAG;EACrC,SAAS;GAAE,MAAM;GAAK,KAAK;GAAI,KAAK;EAAG;EACvC,UAAU;GAAE,MAAM;GAAI,KAAK;GAAI,KAAK;EAAE;CACvC;C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YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAqB,SAAA;IAd9B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GAAe;GAAA,SAAA,CAEP,eAAe;EAAA,CAAA;CAAA;CAGd;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAqB,SAAA;IAd9B;IACA;IACA;IACA;IACA;IACA;IAEA;IAEA;GAAe;EAAA,CAAA;CAAA;;AAKN,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,YAAA,CAAA;EAhBjC,MAAA;EAAS,MAAA,CAAA;GACR,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GACD,SAAS,CAAC,eAAe;GACzB,WAAW,CAAA;EACZ,CAAA"}
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ui-components-button.mjs","names":[],"sources":["../../../components/button/color-contrast.ts","../../../components/button/button.component.ts","../../../components/button/button.component.html","../../../components/button/button.component.module.ts"],"sourcesContent":["/**\n * Function for adjusting the lightness of a color based on different events (hover, pressed, disabled).\n * Accepts a hex color, transforms it to HSL, and based on color's L and event darkens or lightens it.\n * Used to manage different colors based on application configuration\n *\n * @param hexColor color in hex format\n * @param typeEvent interaction event\n * @param theme\n */\ntype LightnessEvent = 'hover' | 'pressed' | 'disabled';\n\n/** Lightness band of a colour, in percent. `null` = exactly on a 30/70 boundary (no adjustment). */\nconst lightnessBand = (lightness: number): 'high' | 'low' | 'mid' | null => {\n if (lightness > 70) {\n return 'high';\n }\n if (lightness < 30) {\n return 'low';\n }\n if (lightness < 70 && lightness > 30) {\n return 'mid';\n }\n return null;\n};\n\n/** Lightness delta (in percent points) for the `new` theme. */\nconst getNewThemeDelta = (lightness: number, typeEvent: LightnessEvent): number => {\n if (typeEvent !== 'hover' && typeEvent !== 'pressed') {\n return 0;\n }\n const band = lightnessBand(lightness);\n return band === 'low' ? 10 : band ? -10 : 0;\n};\n\n/** Lightness delta (in percent points) for the `classic` theme. */\nconst getClassicThemeDelta = (lightness: number, typeEvent: LightnessEvent): number => {\n const deltasByEvent: Record<LightnessEvent, { high: number; low: number; mid: number }> = {\n hover: { high: -10, low: 10, mid: -10 },\n pressed: { high: -20, low: 30, mid: -20 },\n disabled: { high: 10, low: 50, mid: 20 },\n };\n const band = lightnessBand(lightness);\n if (!band) {\n return 0;\n }\n // typeEvent is LightnessEvent at compile time, but callers may pass an\n // out-of-range button state at runtime (matches the original no-op behaviour).\n const eventDeltas: { high: number; low: number; mid: number } | undefined = deltasByEvent[typeEvent];\n return eventDeltas ? eventDeltas[band] : 0;\n};\n\nexport const adjustLightness = (\n hexColor: string,\n typeEvent: LightnessEvent,\n theme: 'new' | 'classic' = 'new'\n): string => {\n const hexRegex = /^#(?:[0-9A-F]{3}|[0-9A-F]{6})$/i;\n if (hexColor && !hexRegex.test(hexColor)) {\n throw new Error('Invalid HEX color format');\n }\n\n const hslColor = hexToHsl(hexColor);\n const lightness = hslColor.l * 100;\n const delta = theme === 'new' ? getNewThemeDelta(lightness, typeEvent) : getClassicThemeDelta(lightness, typeEvent);\n hslColor.l = clamp(hslColor.l + delta / 100);\n\n return hslToHex(hslColor);\n};\n\n/**\n * Transforms hex color to HSL in object variation.\n * @param hexColor string value with hex color\n */\nexport const hexToHsl = (hexColor: string): { h: number; s: number; l: number } => {\n const rgbColor = parseInt(hexColor.slice(1), 16);\n /* eslint-disable no-bitwise -- standard RGB channel extraction from a packed 24-bit integer */\n const r = ((rgbColor >> 16) & 255) / 255;\n const g = ((rgbColor >> 8) & 255) / 255;\n const b = (rgbColor & 255) / 255;\n /* eslint-enable no-bitwise */\n\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n\n let h = 0;\n let s;\n const l = (max + min) / 2;\n\n if (max === min) {\n h = s = 0; // grayscale\n } else {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n\n h /= 6;\n }\n\n return { h, s, l };\n};\n\n/**\n * Transforms HSL color, represented as an object and transforms it to hex string.\n * @param hslColor accepts the HSL color like an object.\n */\nexport const hslToHex = (hslColor: { h: number; s: number; l: number }): string => {\n const { h, s, l } = hslColor;\n\n const hueToRgb = (p: number, q: number, t: number): number => {\n let tNorm = t;\n if (tNorm < 0) {\n tNorm += 1;\n }\n if (tNorm > 1) {\n tNorm -= 1;\n }\n if (tNorm < 1 / 6) {\n return p + (q - p) * 6 * tNorm;\n }\n if (tNorm < 1 / 2) {\n return q;\n }\n if (tNorm < 2 / 3) {\n return p + (q - p) * (2 / 3 - tNorm) * 6;\n }\n return p;\n };\n\n const qBase = l < 0.5 ? l * (1 + s) : l + s - l * s;\n const pBase = 2 * l - qBase;\n\n const r = hueToRgb(pBase, qBase, h + 1 / 3);\n const g = hueToRgb(pBase, qBase, h);\n const b = hueToRgb(pBase, qBase, h - 1 / 3);\n\n // eslint-disable-next-line no-bitwise -- standard RGB channel packing into a 24-bit integer\n const rgbColor = (Math.round(r * 255) << 16) | (Math.round(g * 255) << 8) | Math.round(b * 255);\n\n return `#${rgbColor.toString(16).padStart(6, '0')}`;\n};\n\n/**\n * Restricts the value to be within the range [0, 1].\n * @param value\n */\nconst clamp = (value: number): number => Math.min(Math.max(value, 0), 1);\n","/* eslint-disable @angular-eslint/use-lifecycle-interface */\nimport { FocusOrigin } from '@angular/cdk/a11y';\nimport { NgClass, NgStyle, AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n AfterViewInit,\n booleanAttribute,\n Component,\n ElementRef,\n EventEmitter,\n HostBinding,\n Inject,\n Input,\n OnInit,\n Optional,\n Output,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { MatButton } from '@angular/material/button';\nimport { MatProgressSpinner } from '@angular/material/progress-spinner';\nimport { TooltipPosition, MatTooltip } from '@angular/material/tooltip';\n\nimport { BadgeComponent } from '@testgorilla/tgo-ui/components/badge';\nimport { ApplicationTheme, Color, EllipseTextDirective, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconName, IconComponentModule, tgoIcons, tgoRebrandIcons } from '@testgorilla/tgo-ui/components/icon';\n\nimport {\n ButtonBadgeConfig,\n ButtonColor,\n ButtonIconPosition,\n ButtonSize,\n ButtonState,\n ButtonType,\n IconButtonSize,\n LinkUrlTarget,\n} from './button.model';\nimport { adjustLightness } from './color-contrast';\n\n@Component({\n selector: 'ui-button',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './button.component.html',\n styleUrls: ['./button.component.scss'],\n imports: [\n MatTooltip,\n NgClass,\n BadgeComponent,\n MatButton,\n NgStyle,\n MatProgressSpinner,\n IconComponentModule,\n EllipseTextDirective,\n AsyncPipe,\n UiTranslatePipe,\n ],\n})\nexport class ButtonComponent implements OnInit, AfterViewInit {\n @HostBinding('style.pointer-events')\n get enabled(): string {\n return this.disabled ? 'none' : 'all';\n }\n\n @ViewChild('tooltipElement') tooltipElement: ElementRef<HTMLElement>;\n\n /**\n * Define button height\n *\n * @type {ButtonSize}\n * @memberof ButtonComponent\n */\n @Input() size: ButtonSize = 'big';\n /**\n * Background color of the button while in active state\n *\n * @type {ButtonColor}\n * @memberof ButtonComponent\n */\n @HostBinding('attr.btn-variant')\n @Input()\n variant: ButtonColor = 'primary';\n\n /**\n * Text content to appear on the button\n *\n * @memberof ButtonComponent\n */\n @Input() label = '';\n\n /**\n * Positioning of the icon (when existant)\n *\n * @type {ButtonIconPosition}\n * @memberof ButtonComponent\n */\n @Input() iconPosition?: ButtonIconPosition = 'right';\n\n /**\n * Define if button has only icon without text\n *\n * @memberof ButtonComponent\n */\n @Input() justIcon = false;\n\n /**\n * Name of ui-icon\n *\n * @type {IconName}\n * @memberof ButtonComponent\n */\n @Input() iconName: IconName | undefined;\n\n /**\n * Name of a second ui-icon rendered after the label, in addition to `iconName`.\n * Pair it with `iconPosition=\"left\"` to show a leading and a trailing icon at once.\n *\n * @type {IconName}\n * @memberof ButtonComponent\n */\n @Input() trailingIconName: IconName | undefined;\n\n /**\n * Renders the trailing icon filled, independently of `iconFilled`.\n *\n * @memberof ButtonComponent\n */\n @Input() trailingIconFilled = false;\n\n /**\n * Indicator if the button should be disabled\n *\n * @memberof ButtonComponent\n */\n @Input() disabled = false;\n\n /**\n * Indicator if the loading icon should be shown\n *\n * @memberof ButtonComponent\n */\n @Input() loading = false;\n\n /**\n * Show a small inline spinner to the left of the label while keeping the\n * label visible. Pair with `disabled` to make the button non-interactive.\n * If `loading` is also true, `loading` takes precedence.\n *\n * @memberof ButtonComponent\n */\n @Input() loadingWithLabel = false;\n\n /**\n * Indicator of the button width\n *\n * @memberof ButtonComponent\n */\n @Input() fullWidth = false;\n\n /**\n * Url of button if it is a link\n *\n * @memberof ButtonComponent\n */\n @Input() url?: string;\n\n /**\n * Url's target of button if it is a link\n *\n * @type {@type {LinkUrlTarget}}\n * @memberof ButtonComponent\n */\n @Input() urlTarget?: LinkUrlTarget;\n\n /**\n * Button value\n *\n * @memberof ButtonComponent\n */\n @Input() value?: string;\n\n /**\n * @property tooltip\n * @description The tooltip that is displayed on hover. Required for icon-button type\n * @type {string}\n * @memberof ButtonComponent\n */\n @Input() tooltip = '';\n\n /**\n * @property isPremium\n * @description The icon that is displayed for Premium button\n * @type {boolean}\n * @memberof ButtonComponent\n */\n @Input() isPremium = false;\n\n /**\n * The type of the button.\n *\n * @type {ButtonType}\n * @memberof ButtonComponent\n * @default 'button'\n */\n @Input() type: ButtonType = 'button';\n\n /**\n * Color of the button.\n * Defaults to Test Gorilla primary color.\n *\n * @type {string}\n * @memberof ButtonComponent\n */\n @Input() companyColor: string | null = '';\n\n /**\n * Config for the button badge variation\n * @type {ButtonBadgeConfig}\n * @property badgeType Type of badge on the button\n * @property badgeLabel Label text for the badge\n * @property badgeNotificationAmount The amount for notification in the badge\n */\n @Input() buttonBadgeConfig: ButtonBadgeConfig | undefined;\n\n /**\n *\n * Defines the application theme where buttons is used\n *\n * @type {ApplicationTheme}\n * @memberof ButtonComponent\n */\n @HostBinding('attr.theme')\n @Input()\n applicationTheme: ApplicationTheme = 'light';\n\n /** The premium marker reads as the warning badge does, so the two are recognisably the same signal. */\n protected readonly premiumMarkerColor = Color.BLACK;\n\n /**\n *\n * Disabled button scale on click\n *\n * @type {boolean}\n * @memberof ButtonComponent\n */\n @Input() disabledScaleOnClick = false;\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 ButtonComponent\n */\n @Input() ariaLabel: string;\n\n /**\n * Whether the button controls a disclosure widget that is currently expanded.\n * Set to `true` for an expanded disclosure, `false` for collapsed, or leave\n * undefined when the button is not a disclosure trigger.\n * @memberof ButtonComponent\n */\n @Input() ariaExpanded?: boolean;\n\n /**\n * The id of the element controlled by this button (used together with\n * `ariaExpanded` for disclosure semantics).\n * @memberof ButtonComponent\n */\n @Input() ariaControls?: string;\n\n /**\n * Whether the button is a toggle button currently in the pressed state.\n * Use `true` / `false` for two-state toggles. Leave undefined when the\n * button is not a toggle.\n * @memberof ButtonComponent\n */\n @Input() ariaPressed?: boolean;\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 ButtonComponent\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 field is required for form submission.\n * @type {string}\n * @memberof ButtonComponent\n */\n @Input() ariaLabelledby = '';\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 {string}\n * @memberof ButtonComponent\n */\n @Input() ariaDescribedby = '';\n\n /**\n * Prevents default button click behavior\n * @type {boolean}\n * @memberof ButtonComponent\n */\n @Input({ transform: booleanAttribute }) preventDefault = false;\n\n /**\n * Ghost variant with white background\n * @type {boolean}\n * @memberof ButtonComponent\n */\n @Input({ transform: booleanAttribute }) hasBackground = false;\n\n /**\n * Draws an icon-only button as a circle on any variant: 32px when small, 40px when medium and 48px when big.\n * Has no effect on buttons that show a label, on the classic theme or on `icon-button`, which is already round.\n * @type {boolean}\n * @memberof ButtonComponent\n */\n @Input({ transform: booleanAttribute }) circular = false;\n\n /**\n * Sets tooltip position\n *\n * @type {TooltipPosition}\n * @memberof ButtonComponent\n */\n @Input() tooltipPosition: TooltipPosition = 'below';\n\n @Input() role = 'button';\n\n @Input() iconFilled = false;\n\n @Input() testId: string | null = null;\n\n @Output() buttonClickEvent: EventEmitter<Event> = new EventEmitter<Event>();\n\n @Output() buttonHoverEvent: EventEmitter<Event> = new EventEmitter<Event>();\n\n @ViewChild('buttonElement', { static: false }) buttonElement: MatButton;\n\n get isDisabled(): boolean {\n return this.disabled;\n }\n\n @HostBinding('style.--color')\n get compColor() {\n return this.getCompanyColor;\n }\n\n classCss: string;\n styleCss: Record<string, string>;\n isButtonLink: boolean;\n isLabel: boolean;\n buttonState: ButtonState;\n hover = false;\n iconButtonSize: IconButtonSize = '40';\n allowButtonTypeForPremium: ButtonColor[] = [\n 'secondary',\n 'secondary-inverted',\n 'primary',\n 'ghost',\n 'outlined',\n 'destructive',\n 'icon-button',\n ];\n isFilledIcon: boolean;\n coloredIcons = ['Google-in-line', 'Google', 'Google-filled', 'Linkedin-brand-filled', 'Linkedin-brand-in-line'];\n labelEllipsis = false;\n icon: IconName = '';\n trailingIcon: IconName = '';\n\n private static nextAriaLabelledId = 0;\n ariaLabelledbyId = '';\n\n get typeIncluded(): boolean {\n return this.allowButtonTypeForPremium.includes(this.variant);\n }\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n ngOnInit(): void {\n this.classCss = this.setCssClass();\n this.styleCss = this.setCssStyle();\n this.isButtonLink = this.showButtonLink();\n this.isLabel = this.showLabel();\n this.createAriaLabelledById();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['disabled']) {\n this.buttonState = 'default';\n }\n if (!this.applicationTheme) {\n this.applicationTheme = 'light';\n }\n if (changes['type']) {\n this.isButtonLink = this.showButtonLink();\n }\n if (changes['loading']) {\n this.isLabel = this.showLabel();\n }\n if (changes['iconName']) {\n this.icon = changes['iconName'].currentValue as IconName;\n }\n if (changes['trailingIconName']) {\n this.trailingIcon = changes['trailingIconName'].currentValue as IconName;\n }\n if (this.hasCssAffectingChange(changes)) {\n this.classCss = this.setCssClass();\n this.styleCss = this.setCssStyle();\n }\n if (this.isIconButtonSizeChange(changes)) {\n this.iconButtonSize = this.setIconButtonSize();\n }\n\n this.isFilledIcon = this.isFilledIconVariant();\n }\n\n private hasCssAffectingChange(changes: SimpleChanges): boolean {\n return Boolean(\n changes['type'] ||\n changes['fullWidth'] ||\n changes['iconName'] ||\n changes['trailingIconName'] ||\n changes['trailingIconFilled'] ||\n changes['justIcon'] ||\n changes['iconPosition'] ||\n changes['disabled'] ||\n changes['companyColor'] ||\n changes['variant'] ||\n changes['applicationTheme']\n );\n }\n\n private isIconButtonSizeChange(changes: SimpleChanges): boolean {\n return (\n changes['variant']?.currentValue === 'icon-button' ||\n (changes['variant']?.currentValue === 'menuTrigger' && this.applicationTheme !== 'classic')\n );\n }\n\n private isFilledIconVariant(): boolean {\n return (\n this.applicationTheme !== 'classic' &&\n (this.variant === 'primary' ||\n this.variant === 'secondary' ||\n this.variant === 'secondary-inverted' ||\n this.variant === 'linkedin')\n );\n }\n\n ngAfterViewInit(): void {\n this.tooltipElement.nativeElement.onclick = ev => {\n ev.preventDefault();\n ev.stopPropagation();\n };\n }\n\n buttonClick(event: Event): void {\n if (this.preventDefault) {\n event.preventDefault();\n event.stopPropagation();\n }\n this.buttonClickEvent.emit(event);\n }\n\n buttonHover(event: Event): void {\n if (event.type === 'mouseenter') {\n this.hover = true;\n this.buttonHoverEvent.emit(event);\n this.buttonState = 'hover';\n if (this.shouldChangeFilledStatus && this.icon) {\n this.icon = this.getIconName(this.iconName as IconName, '-filled');\n }\n if (this.trailingIcon && this.canToggleFilled(this.trailingIcon)) {\n this.trailingIcon = this.getIconName(this.trailingIconName as IconName, '-filled');\n }\n } else {\n this.hover = false;\n if (this.shouldChangeFilledStatus && this.icon) {\n this.icon = this.iconName as IconName;\n }\n if (this.trailingIcon && this.canToggleFilled(this.trailingIcon)) {\n this.trailingIcon = this.trailingIconName as IconName;\n }\n this.buttonState = 'default';\n }\n\n this.styleCss = this.setCssStyle();\n }\n\n //Show or hide label\n showLabel(): boolean {\n return !this.loading;\n }\n\n //Set css class according inputs\n setCssClass(): string {\n const width = this.fullWidth ? 'full-width' : '';\n const hasIcon = this.iconName === null ? '' : 'icon';\n const justIcon = this.justIcon || this.variant === 'icon-button' ? 'only-icon' : '';\n const iconPosition = this.iconPosition ?? '';\n const disabled = this.disabled && this.variant === 'primary' ? 'primary-disabled' : '';\n const variant = this.variant === 'ghost' && this.applicationTheme === 'classic' ? 'outlined' : this.variant;\n const companyColor = this.companyColor ? 'has-company-color' : '';\n return `${this.size} ${iconPosition} ${variant} ${width} ${hasIcon} ${justIcon} ${disabled} ${companyColor} ${this.applicationTheme}-theme`;\n }\n\n setCssStyle(): Record<string, string> {\n this.buttonState = this.disabled ? 'disabled' : this.buttonState;\n return (\n this.getInteractiveStyle() ??\n this.getClassicInteractiveStyle() ??\n this.getCompanyColorStyle() ??\n this.getGhostBackgroundStyle() ??\n {}\n );\n }\n\n private get isColorVariant(): boolean {\n return this.variant === 'primary' || this.variant === 'text' || this.variant === 'text-inline';\n }\n\n private get isTextVariant(): boolean {\n return this.variant === 'text' || this.variant === 'text-inline';\n }\n\n private getInteractiveStyle(): Record<string, string> | null {\n if (this.buttonState !== 'hover' && this.buttonState !== 'pressed') {\n return null;\n }\n if (!this.isColorVariant || this.applicationTheme === 'classic') {\n return null;\n }\n const styleObj: Record<string, string> = {};\n styleObj[this.variant === 'primary' ? 'background-color' : 'color'] = adjustLightness(\n this.getCompanyColor,\n this.buttonState\n );\n if (this.isTextVariant) {\n styleObj['--active-color'] = this.companyColor\n ? adjustLightness(this.getCompanyColor, this.buttonState)\n : '#666666';\n }\n return styleObj;\n }\n\n private getClassicInteractiveStyle(): Record<string, string> | null {\n if (this.buttonState === 'default') {\n return null;\n }\n if (!this.isColorVariant || this.applicationTheme !== 'classic') {\n return null;\n }\n return {\n [this.variant === 'primary' ? 'background-color' : 'color']: adjustLightness(\n this.getCompanyColor,\n this.buttonState,\n 'classic'\n ),\n };\n }\n\n private getCompanyColorStyle(): Record<string, string> | null {\n const isCompanyColorVariant =\n this.variant === 'link' || this.variant === 'tertiary' || this.variant === 'icon-button';\n if (!(this.getCompanyColor && isCompanyColorVariant)) {\n return null;\n }\n return { color: this.getCompanyColor };\n }\n\n private getGhostBackgroundStyle(): Record<string, string> | null {\n return this.hasBackground ? { '--ghost-background': '#ffffff' } : null;\n }\n\n //Show or hide spinner\n get showSpinner(): boolean {\n const isNotTab = this.variant !== 'tab';\n const isNotLink = this.variant !== 'link';\n const isLoading = this.loading === true;\n return isLoading && isNotTab && isNotLink;\n }\n\n //Show or hide the inline spinner that sits next to the label\n get showInlineSpinner(): boolean {\n return (\n this.loadingWithLabel && !this.loading && this.variant !== 'tab' && this.variant !== 'link' && !this.justIcon\n );\n }\n\n //Show button with <button> or <a> tag\n showButtonLink(): boolean {\n return this.variant !== 'link';\n }\n\n setIconButtonSize(): IconButtonSize {\n return this.size === 'big' ? '40' : this.size === 'small' ? '24' : '32';\n }\n\n onPressed(ev: Event): void {\n if (ev.type === 'mousedown') {\n this.buttonState = 'pressed';\n } else {\n this.buttonState = this.hover ? 'hover' : 'default';\n }\n\n this.styleCss = this.setCssStyle();\n }\n\n focus(origin?: FocusOrigin): void {\n this.buttonElement.focus(origin);\n }\n\n get getCompanyColor(): string {\n return (\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- empty companyColor ('' is the default) falls back to the theme colour\n this.companyColor ||\n (this.variant === 'text' || this.variant === 'text-inline'\n ? this.applicationTheme === 'dark'\n ? '#ffffff'\n : '#242424'\n : this.applicationTheme === 'classic'\n ? '#46A997'\n : '#D410AA')\n );\n }\n\n get shouldChangeFilledStatus(): boolean {\n return this.canToggleFilled(this.icon);\n }\n\n /**\n * Whether this specific icon may be swapped to its filled variant on hover. Takes the icon as an\n * argument because a button can render two, and a brand icon in one slot must not freeze the other.\n */\n canToggleFilled(icon: IconName): boolean {\n return (\n this.applicationTheme !== 'classic' &&\n this.variant !== 'primary' &&\n this.variant !== 'secondary' &&\n this.variant !== 'linkedin' &&\n !this.coloredIcons.includes(icon)\n );\n }\n\n onKeydown(event: KeyboardEvent): void {\n if (event.key === ' ') {\n event.preventDefault();\n const target = event.target as HTMLElement;\n target.click();\n }\n\n if (event.key === 'Enter' || event.key === ' ') {\n this.buttonState = 'pressed';\n this.styleCss = this.setCssStyle();\n }\n }\n\n onKeyup(event: KeyboardEvent): void {\n if (event.key === 'Enter' || event.key === ' ') {\n this.buttonState = this.hover ? 'hover' : 'default';\n this.styleCss = this.setCssStyle();\n }\n }\n\n onLabelEllipsisChange(state: boolean): void {\n this.labelEllipsis = state;\n }\n\n getIconName(iconName: string, defaultValue: string): IconName {\n if (iconName.includes('filled')) {\n return iconName.replace(/filled/, 'in-line') as IconName;\n } else if (iconName.includes('in-line')) {\n return iconName.replace(/in-line/, 'filled') as IconName;\n }\n // Only append when the result is a real icon; otherwise it falls outside the IconName union.\n const suffixed = iconName + defaultValue;\n return this.isKnownIconName(suffixed) ? suffixed : (iconName as IconName);\n }\n\n private isKnownIconName(name: string): name is IconName {\n return (tgoRebrandIcons as readonly string[]).includes(name) || (tgoIcons as readonly string[]).includes(name);\n }\n\n private createAriaLabelledById(): void {\n const labelledByValue = this.variant === 'link' ? 'labelledby-link' : 'labelledby';\n this.ariaLabelledbyId = `${labelledByValue}-uiButton-${++ButtonComponent.nextAriaLabelledId}`;\n }\n}\n","<div\n #tooltipElement\n class=\"tooltip\"\n [matTooltip]=\"tooltip ? tooltip : labelEllipsis ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n></div>\n<div\n class=\"button-wrapper\"\n [ngClass]=\"{\n 'full-width': fullWidth,\n 'rounded-icon': applicationTheme !== 'classic' && icon && !label,\n circular: circular && justIcon && variant !== 'icon-button' && applicationTheme !== 'classic',\n link: !isButtonLink,\n }\"\n>\n <div\n class=\"button-container\"\n [ngClass]=\"{\n disabled: disabled,\n 'button-scale': buttonState === 'pressed' && applicationTheme !== 'classic' && !disabledScaleOnClick,\n }\"\n >\n @if (isPremium && typeIncluded) {\n <span class=\"right-top premium-marker\">\n <ui-icon name=\"Premium-in-line\" size=\"16\" [color]=\"premiumMarkerColor\"></ui-icon>\n </span>\n }\n @if (buttonBadgeConfig?.badgeType) {\n <ui-badge\n id=\"badge\"\n [rebrandColor]=\"buttonBadgeConfig?.rebrandColor ?? 'brand'\"\n [variant]=\"buttonBadgeConfig!.badgeType!\"\n [label]=\"buttonBadgeConfig?.badgeLabel ?? ''\"\n [notificationsAmount]=\"buttonBadgeConfig?.badgeNotificationAmount ?? 0\"\n class=\"right-top\"\n [ngClass]=\"[\n buttonBadgeConfig?.badgeType === 'primary' ? 'badge-primary' : '',\n buttonBadgeConfig?.badgeType === 'notification' ? 'badge-notification' : '',\n variant,\n ]\"\n ></ui-badge>\n }\n @if (isButtonLink) {\n <button\n [style]=\"'--icon-button-size:' + iconButtonSize + 'px'\"\n [ngClass]=\"classCss\"\n [ngStyle]=\"styleCss\"\n [disabled]=\"disabled\"\n (click)=\"buttonClick($event)\"\n (mouseleave)=\"buttonHover($event)\"\n (mouseenter)=\"buttonHover($event)\"\n (mousedown)=\"onPressed($event)\"\n (mouseup)=\"onPressed($event)\"\n (keydown)=\"onKeydown($event)\"\n (keyup)=\"onKeyup($event)\"\n [attr.aria-required]=\"ariaRequired\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledbyId\"\n [attr.aria-describedby]=\"'describedby'\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-controls]=\"ariaControls\"\n [attr.aria-pressed]=\"ariaPressed\"\n [attr.data-testid]=\"testId\"\n [type]=\"type\"\n [disableRipple]=\"applicationTheme !== 'classic'\"\n [matTooltip]=\"tooltip ? tooltip : labelEllipsis ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n [matTooltipPosition]=\"tooltipPosition\"\n #buttonElement\n [attr.role]=\"role\"\n mat-flat-button\n >\n <span id=\"describedby\" [style.display]=\"'none'\">\n {{ isPremium ? label + ' ' + ('BUTTON.PREMIUM_FEATURE' | uiTranslate | async) : ariaDescribedby }}\n </span>\n <span [id]=\"ariaLabelledbyId\" [style.display]=\"'none'\">\n {{ ariaLabelledby }}\n </span>\n @if (showSpinner) {\n <span class=\"spinner-wrapper\">\n <mat-spinner class=\"position-spinner\" aria-label=\"loading\" mode=\"indeterminate\" diameter=\"24\"></mat-spinner>\n </span>\n } @else {\n @if (justIcon && !!icon) {\n <span class=\"icon-only-wrapper\">\n <span class=\"icon only\" role=\"label\">\n <ui-icon\n [color]=\"variant === 'ghost-ai' ? 'ai' : 'inherit'\"\n [applicationTheme]=\"applicationTheme\"\n [name]=\"icon\"\n [filled]=\"isFilledIcon || iconFilled\"\n [useFullIconName]=\"variant === 'primary' || variant === 'secondary' || variant === 'linkedin'\"\n [size]=\"size === 'small' ? '16' : '24'\"\n ></ui-icon>\n </span>\n </span>\n }\n @if (!justIcon) {\n <span class=\"icon-label-wrapper\" [ngClass]=\"{ 'center-text': iconName === '' }\">\n @if (showInlineSpinner) {\n <span class=\"icon inline-spinner\" aria-hidden=\"true\">\n <mat-spinner\n aria-label=\"loading\"\n mode=\"indeterminate\"\n [diameter]=\"size === 'small' ? 16 : 20\"\n ></mat-spinner>\n </span>\n }\n @if (iconPosition === 'left' && !!iconName && !showInlineSpinner) {\n <span class=\"icon\" aria-hidden=\"true\">\n <ui-icon\n [color]=\"variant === 'ghost-ai' ? 'ai' : 'inherit'\"\n [applicationTheme]=\"applicationTheme\"\n [name]=\"icon\"\n [filled]=\"isFilledIcon || iconFilled\"\n [useFullIconName]=\"variant === 'primary' || variant === 'secondary' || variant === 'linkedin'\"\n [size]=\"size === 'small' ? '16' : '24'\"\n ></ui-icon>\n </span>\n }\n @if (isLabel) {\n <span\n class=\"label\"\n id=\"label\"\n uiEllipseText\n [isMultiline]=\"true\"\n (onChangeTextState)=\"onLabelEllipsisChange($event)\"\n >\n {{ label }}\n </span>\n }\n @if (iconPosition === 'right' && !!icon) {\n <span class=\"icon\" aria-hidden=\"true\"\n ><ui-icon\n [color]=\"variant === 'ghost-ai' ? 'ai' : 'inherit'\"\n [applicationTheme]=\"applicationTheme\"\n [name]=\"icon\"\n [filled]=\"isFilledIcon || iconFilled\"\n [size]=\"size === 'small' ? '16' : '24'\"\n [useFullIconName]=\"variant === 'primary' || variant === 'secondary' || variant === 'linkedin'\"\n ></ui-icon\n ></span>\n }\n @if (!!trailingIcon && !showInlineSpinner) {\n <span class=\"icon trailing\" aria-hidden=\"true\"\n ><ui-icon\n [color]=\"variant === 'ghost-ai' ? 'ai' : 'inherit'\"\n [applicationTheme]=\"applicationTheme\"\n [name]=\"trailingIcon\"\n [filled]=\"isFilledIcon || trailingIconFilled\"\n [size]=\"size === 'small' ? '16' : '24'\"\n [useFullIconName]=\"variant === 'primary' || variant === 'secondary' || variant === 'linkedin'\"\n ></ui-icon\n ></span>\n }\n </span>\n }\n }\n </button>\n }\n @if (!isButtonLink) {\n <a\n #buttonElement\n [ngClass]=\"classCss\"\n [ngStyle]=\"styleCss\"\n [disabled]=\"disabled\"\n (click)=\"buttonClick($event)\"\n (mouseenter)=\"buttonHover($event)\"\n (mouseleave)=\"buttonHover($event)\"\n (mousedown)=\"onPressed($event)\"\n (mouseup)=\"onPressed($event)\"\n (keydown)=\"onKeydown($event)\"\n (keyup)=\"onKeyup($event)\"\n [disableRipple]=\"true\"\n [attr.aria-required]=\"ariaRequired\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledbyId\"\n [attr.aria-describedby]=\"'describedby-link'\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-expanded]=\"ariaExpanded\"\n [attr.aria-controls]=\"ariaControls\"\n [attr.aria-pressed]=\"ariaPressed\"\n [attr.data-testid]=\"testId\"\n [matTooltip]=\"tooltip ? tooltip : labelEllipsis ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n role=\"link\"\n [href]=\"url\"\n [target]=\"urlTarget\"\n mat-flat-button\n >\n <span id=\"describedby-link\" [style.display]=\"'none'\">\n {{ ariaDescribedby }}\n </span>\n <span [id]=\"ariaLabelledbyId\" [style.display]=\"'none'\">\n {{ ariaLabelledby }}\n </span>\n <span class=\"icon-label-wrapper\">\n {{ label }}\n </span>\n </a>\n }\n </div>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\nimport { BadgeComponentModule } from '@testgorilla/tgo-ui/components/badge';\nimport { EllipseTextDirective, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\nimport { ButtonComponent } from './button.component';\n\n@NgModule({\n imports: [\n CommonModule,\n MatButtonModule,\n IconComponentModule,\n MatProgressSpinnerModule,\n MatTooltipModule,\n BadgeComponentModule,\n EllipseTextDirective,\n MatRadioModule,\n UiTranslatePipe,\n ButtonComponent,\n ],\n exports: [ButtonComponent],\n providers: [],\n})\nexport class ButtonComponentModule {}\n"],"mappings":";;;;;;;;;;;AAYA,MAAM,iBAAiB,cAA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ui-components-checklist.mjs","names":[],"sources":["../../../components/checklist/checklist.component.ts","../../../components/checklist/checklist.component.html"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Inject, Optional, computed, input, model, output } from '@angular/core';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport {\n ApplicationTheme,\n IKeyboardEvent,\n UiTranslatePipe,\n LanguageService,\n} from '@testgorilla/tgo-ui/components/core';\nimport { DividerComponentModule } from '@testgorilla/tgo-ui/components/divider';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { ProgressBarComponentModule } from '@testgorilla/tgo-ui/components/progress-bar';\nimport { RadioButtonComponentModule } from '@testgorilla/tgo-ui/components/radio-button';\n\nimport type { ChecklistItem } from './checklist.model';\n\n@Component({\n selector: 'ui-checklist',\n imports: [\n ProgressBarComponentModule,\n RadioButtonComponentModule,\n IconComponentModule,\n ButtonComponentModule,\n DividerComponentModule,\n UiTranslatePipe,\n AsyncPipe,\n ],\n templateUrl: './checklist.component.html',\n styleUrl: './checklist.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChecklistComponent {\n /**\n * Label for the checklist\n * @type {string}\n * @memberof ChecklistComponent\n */\n label = input('');\n\n /**\n * Sub title/Description for the checklist\n * @type {string}\n * @memberof ChecklistComponent\n */\n description = input<string | null>(null);\n\n /**\n * Items for the checklist\n * @type {ModelSignal<ChecklistItem[]>}\n * @memberof ChecklistComponent\n */\n items = model<ChecklistItem[]>([]);\n\n /**\n * Application theme\n * @type {ApplicationTheme}\n * @memberof ChecklistComponent\n */\n applicationTheme = input<ApplicationTheme | undefined>(undefined);\n readonly theme = computed(() => this.applicationTheme() ?? this.defaultAppTheme);\n\n /**\n * Confirm button label\n * @type {string}\n * @memberof ChecklistComponent\n */\n footerButtonLabel = input<string | undefined>(undefined);\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 {string}\n * @memberof ChecklistComponent\n */\n ariaLabel = input<string | undefined>(undefined);\n\n /**\n * The language to be used\n * @property language\n * @type {Language}\n * @memberof ChecklistComponent\n */\n language = input(LanguageService.defaultLanguage);\n\n /**\n * A boolean property that determines whether the checklist items should be automatically checked.\n *\n * @type {boolean}\n */\n autocheck = input(true);\n\n readonly testId = input<string | null>(null);\n\n protected itemTestId(value: string): string {\n const testId = this.testId();\n return testId ? `${testId}-${value}` : 'checklist-item';\n }\n\n /**\n * Event emitter that triggers when the footer button is clicked.\n * Emits a void event.\n */\n footerButtonClicked = output<void>();\n\n /**\n * An output event emitter that signifies the completion of a task or process.\n * This event does not carry any payload.\n */\n readonly completed = output<void>();\n\n /**\n * Represents the currently selected item in the checklist.\n * This is an instance of the `ChecklistItem` supports two-way binding.\n */\n selectedItem = model<ChecklistItem>();\n\n readonly currentIndex = computed(() => {\n const items = this.items();\n const selectedItem = this.selectedItem();\n return selectedItem ? items.indexOf(selectedItem) : -1;\n });\n\n protected progress = computed(() => {\n const items = this.items();\n const total = items.length;\n const checked = items.filter(item => item.checked).length;\n const progressValue = Number(((checked / total) * 100).toFixed(0));\n if (progressValue === 100) {\n this.completed.emit();\n }\n return progressValue;\n });\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {}\n\n selectItem(item: ChecklistItem) {\n if ((item.checked || item.disabled || this.selectedItem() === item) && !item.reselect) {\n return;\n }\n if (this.autocheck()) {\n item.checked = item?.reselect ? !item.checked : true;\n this.items.set([...this.items()]);\n }\n this.selectedItem.set(item);\n }\n\n keydownHandler($event: KeyboardEvent, item: ChecklistItem) {\n if ((IKeyboardEvent.SPACE as string) === $event.key || (IKeyboardEvent.ENTER as string) === $event.key) {\n $event.preventDefault();\n this.selectItem(item);\n }\n }\n\n next() {\n const currentIndex = this.currentIndex();\n if (currentIndex < this.items().length - 1) {\n this.selectItem(this.items()[currentIndex + 1]);\n }\n }\n\n prev() {\n const currentIndex = this.currentIndex();\n if (currentIndex > 0) {\n this.selectItem(this.items()[currentIndex - 1]);\n }\n }\n\n footerButtonClick(event: Event) {\n event.preventDefault();\n this.footerButtonClicked.emit();\n }\n}\n","@if (label()) {\n <h4 [attr.aria-label]=\"ariaLabel() ?? label()\">{{ label() }}</h4>\n}\n@if (description()) {\n <div aria-label=\"description\" class=\"description\" [innerHTML]=\"description()\"></div>\n}\n\n<ui-progress-bar [showPercentage]=\"true\" [progress]=\"progress()\"></ui-progress-bar>\n\n<div style=\"position: absolute; left: -9999px\" [attr.aria-live]=\"'polite'\">\n {{ 'COMMON.PROGRESS' | uiTranslate: { progress: progress() } | async }}\n</div>\n\n<ui-divider size=\"small\" companyColor=\"#d3d3d3\"> </ui-divider>\n\n<div class=\"checklist-container\" [attr.data-testid]=\"testId() ?? 'checklist-container'\">\n @for (item of items(); track item.value + item.checked; let i = $index) {\n <div\n [attr.data-testid]=\"itemTestId(item.value)\"\n class=\"checklist-item\"\n [class.disabled]=\"item.disabled\"\n [class.checked]=\"item.checked\"\n [class.active]=\"item === selectedItem() && !autocheck()\"\n [attr.aria-labelledby]=\"'item-' + item.value\"\n [tabindex]=\"item?.disabled ? -1 : 0\"\n (click)=\"selectItem(item)\"\n (keydown)=\"keydownHandler($event, item)\"\n >\n <div class=\"content\">\n <ui-icon\n [name]=\"item.checked ? 'Check-in-line' : 'Circle-in-line'\"\n [filled]=\"item.checked\"\n class=\"checked\"\n [applicationTheme]=\"theme()\"\n [size]=\"'16'\"\n [color]=\"item.checked ? 'white' : item.disabled ? '#919191' : 'dark'\"\n ></ui-icon>\n <div class=\"label-and-description\">\n <span [id]=\"'item-' + item.value\" class=\"label\">{{ item.label }}</span>\n @if (item.description) {\n <span class=\"item-description\">{{ item.description }}</span>\n }\n </div>\n </div>\n\n @if (item.hasLink && !item.disabled) {\n <div class=\"navigation\">\n <ui-icon\n [tabindex]=\"-1\"\n class=\"link\"\n [name]=\"'Arrow-chevron-right-filled'\"\n [applicationTheme]=\"theme()\"\n [size]=\"'24'\"\n color=\"rebrand-black\"\n ></ui-icon>\n </div>\n }\n </div>\n }\n</div>\n@if (footerButtonLabel()) {\n <div class=\"action-btn\">\n <ui-button\n data-testid=\"checklist-footer-button\"\n [label]=\"footerButtonLabel()!\"\n [variant]=\"'link'\"\n [companyColor]=\"'#000'\"\n (buttonClickEvent)=\"footerButtonClick($event)\"\n ></ui-button>\n </div>\n}\n"],"mappings":";;;;;;;;;;;;;AAgCA,IAAa,qBAAb,MAAa,mBAAkB;CA8DnB,WAAW,OAAa;EAChC,MAAM,SAAS,KAAK,OAAM;EAC1B,OAAO,SAAS,GAAG,OAAM,GAAI,UAAU;CACzC;CAqCA,YAC6E,iBAAiC;EAAjC,KAAA,kBAAA;EAjG7E,KAAA,QAAQ,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAOjB,KAAA,cAAc,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;EAOxC,KAAA,QAAQ,MAAuB,CAAA,GAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAOlC,KAAA,mBAAmB,MAAoC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,mBAAA,CAAA,+BAAA,CAAA,CAAA;EACxD,KAAA,QAAQ,eAAe,KAAK,iBAAgB,KAAM,KAAK,iBAAgB,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAOhF,KAAA,oBAAoB,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,oBAAA,CAAA,+BAAA,CAAA,CAAA;EAQxD,KAAA,YAAY,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CAAA,+BAAA,CAAA,CAAA;EAQhD,KAAA,WAAW,MAAM,gBAAgB,iBAAgB,GAAA,YAAA,CA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AAA,MAAA;KAAA,MAAA,GAAA;KAAA,UAAA;KAAA,QAAA;MAAA;MAAA;MAAA;MAAA;KAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MACtB;KAAe,MAAA;IAAA;IAAA;KAAA,MAAA;KAAA,MACf;KAAS,MAAA;IAAA;GAAA;GAAA,iBAAA,GAAA,wBAAA;EAAA,CAAA;CAAA;;AAMA,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAkB,YAAA,CAAA;EAf9B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAc,SACf;IACP;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GAAA,iBAGgB,wBAAwB;GAAM,UAAA;GAAA,QAAA,CAAA,g/IAAA;EAAA,CAAA;;;;E,eAyG5C,MAAA,S;GAAY,MAAA;GAAO,MAAA,CAAA,oCAAoC"}
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ui-components-checklist.mjs","names":[],"sources":["../../../components/checklist/checklist.component.ts","../../../components/checklist/checklist.component.html"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Inject, Optional, computed, input, model, output } from '@angular/core';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport {\n ApplicationTheme,\n IKeyboardEvent,\n UiTranslatePipe,\n LanguageService,\n} from '@testgorilla/tgo-ui/components/core';\nimport { DividerComponentModule } from '@testgorilla/tgo-ui/components/divider';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { ProgressBarComponentModule } from '@testgorilla/tgo-ui/components/progress-bar';\nimport { RadioButtonComponentModule } from '@testgorilla/tgo-ui/components/radio-button';\n\nimport type { ChecklistItem } from './checklist.model';\n\n@Component({\n selector: 'ui-checklist',\n imports: [\n ProgressBarComponentModule,\n RadioButtonComponentModule,\n IconComponentModule,\n ButtonComponentModule,\n DividerComponentModule,\n UiTranslatePipe,\n AsyncPipe,\n ],\n templateUrl: './checklist.component.html',\n styleUrl: './checklist.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ChecklistComponent {\n /**\n * Label for the checklist\n * @type {string}\n * @memberof ChecklistComponent\n */\n label = input('');\n\n /**\n * Sub title/Description for the checklist\n * @type {string}\n * @memberof ChecklistComponent\n */\n description = input<string | null>(null);\n\n /**\n * Items for the checklist\n * @type {ModelSignal<ChecklistItem[]>}\n * @memberof ChecklistComponent\n */\n items = model<ChecklistItem[]>([]);\n\n /**\n * Application theme\n * @type {ApplicationTheme}\n * @memberof ChecklistComponent\n */\n applicationTheme = input<ApplicationTheme | undefined>(undefined);\n readonly theme = computed(() => this.applicationTheme() ?? this.defaultAppTheme);\n\n /**\n * Confirm button label\n * @type {string}\n * @memberof ChecklistComponent\n */\n footerButtonLabel = input<string | undefined>(undefined);\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 {string}\n * @memberof ChecklistComponent\n */\n ariaLabel = input<string | undefined>(undefined);\n\n /**\n * The language to be used\n * @property language\n * @type {Language}\n * @memberof ChecklistComponent\n */\n language = input(LanguageService.defaultLanguage);\n\n /**\n * A boolean property that determines whether the checklist items should be automatically checked.\n *\n * @type {boolean}\n */\n autocheck = input(true);\n\n readonly testId = input<string | null>(null);\n\n protected itemTestId(value: string): string {\n const testId = this.testId();\n return testId ? `${testId}-${value}` : 'checklist-item';\n }\n\n /**\n * Event emitter that triggers when the footer button is clicked.\n * Emits a void event.\n */\n footerButtonClicked = output<void>();\n\n /**\n * An output event emitter that signifies the completion of a task or process.\n * This event does not carry any payload.\n */\n readonly completed = output<void>();\n\n /**\n * Represents the currently selected item in the checklist.\n * This is an instance of the `ChecklistItem` supports two-way binding.\n */\n selectedItem = model<ChecklistItem>();\n\n readonly currentIndex = computed(() => {\n const items = this.items();\n const selectedItem = this.selectedItem();\n return selectedItem ? items.indexOf(selectedItem) : -1;\n });\n\n protected progress = computed(() => {\n const items = this.items();\n const total = items.length;\n const checked = items.filter(item => item.checked).length;\n const progressValue = Number(((checked / total) * 100).toFixed(0));\n if (progressValue === 100) {\n this.completed.emit();\n }\n return progressValue;\n });\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {}\n\n selectItem(item: ChecklistItem) {\n if ((item.checked || item.disabled || this.selectedItem() === item) && !item.reselect) {\n return;\n }\n if (this.autocheck()) {\n item.checked = item?.reselect ? !item.checked : true;\n this.items.set([...this.items()]);\n }\n this.selectedItem.set(item);\n }\n\n keydownHandler($event: KeyboardEvent, item: ChecklistItem) {\n if ((IKeyboardEvent.SPACE as string) === $event.key || (IKeyboardEvent.ENTER as string) === $event.key) {\n $event.preventDefault();\n this.selectItem(item);\n }\n }\n\n next() {\n const currentIndex = this.currentIndex();\n if (currentIndex < this.items().length - 1) {\n this.selectItem(this.items()[currentIndex + 1]);\n }\n }\n\n prev() {\n const currentIndex = this.currentIndex();\n if (currentIndex > 0) {\n this.selectItem(this.items()[currentIndex - 1]);\n }\n }\n\n footerButtonClick(event: Event) {\n event.preventDefault();\n this.footerButtonClicked.emit();\n }\n}\n","@if (label()) {\n <h4 [attr.aria-label]=\"ariaLabel() ?? label()\">{{ label() }}</h4>\n}\n@if (description()) {\n <div aria-label=\"description\" class=\"description\" [innerHTML]=\"description()\"></div>\n}\n\n<ui-progress-bar [showPercentage]=\"true\" [progress]=\"progress()\"></ui-progress-bar>\n\n<div style=\"position: absolute; left: -9999px\" [attr.aria-live]=\"'polite'\">\n {{ 'COMMON.PROGRESS' | uiTranslate: { progress: progress() } | async }}\n</div>\n\n<ui-divider size=\"small\" companyColor=\"#d3d3d3\"> </ui-divider>\n\n<div class=\"checklist-container\" [attr.data-testid]=\"testId() ?? 'checklist-container'\">\n @for (item of items(); track item.value + item.checked; let i = $index) {\n <div\n [attr.data-testid]=\"itemTestId(item.value)\"\n class=\"checklist-item\"\n [class.disabled]=\"item.disabled\"\n [class.checked]=\"item.checked\"\n [class.active]=\"item === selectedItem() && !autocheck()\"\n [attr.aria-labelledby]=\"'item-' + item.value\"\n [tabindex]=\"item?.disabled ? -1 : 0\"\n (click)=\"selectItem(item)\"\n (keydown)=\"keydownHandler($event, item)\"\n >\n <div class=\"content\">\n <ui-icon\n [name]=\"item.checked ? 'Check-in-line' : 'Circle-in-line'\"\n [filled]=\"item.checked\"\n class=\"checked\"\n [applicationTheme]=\"theme()\"\n [size]=\"'16'\"\n [color]=\"item.checked ? 'white' : item.disabled ? '#919191' : 'dark'\"\n ></ui-icon>\n <div class=\"label-and-description\">\n <span [id]=\"'item-' + item.value\" class=\"label\">{{ item.label }}</span>\n @if (item.description) {\n <span class=\"item-description\">{{ item.description }}</span>\n }\n </div>\n </div>\n\n @if (item.hasLink && !item.disabled) {\n <div class=\"navigation\">\n <ui-icon\n [tabindex]=\"-1\"\n class=\"link\"\n [name]=\"'Arrow-chevron-right-filled'\"\n [applicationTheme]=\"theme()\"\n [size]=\"'24'\"\n color=\"rebrand-black\"\n ></ui-icon>\n </div>\n }\n </div>\n }\n</div>\n@if (footerButtonLabel()) {\n <div class=\"action-btn\">\n <ui-button\n data-testid=\"checklist-footer-button\"\n [label]=\"footerButtonLabel()!\"\n [variant]=\"'link'\"\n [companyColor]=\"'#000'\"\n (buttonClickEvent)=\"footerButtonClick($event)\"\n ></ui-button>\n </div>\n}\n"],"mappings":";;;;;;;;;;;;;AAgCA,IAAa,qBAAb,MAAa,mBAAkB;CA8DnB,WAAW,OAAa;EAChC,MAAM,SAAS,KAAK,OAAM;EAC1B,OAAO,SAAS,GAAG,OAAM,GAAI,UAAU;CACzC;CAqCA,YAC6E,iBAAiC;EAAjC,KAAA,kBAAA;EAjG7E,KAAA,QAAQ,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;EAOjB,KAAA,cAAc,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA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ventDefault",
|
|
382
382
|
"hasBackground",
|
|
383
|
+
"circular",
|
|
383
384
|
"tooltipPosition",
|
|
384
385
|
"role",
|
|
385
386
|
"iconFilled",
|
|
@@ -1010,6 +1011,7 @@ var DialogCustomComponent = class DialogCustomComponent {
|
|
|
1010
1011
|
"ariaDescribedby",
|
|
1011
1012
|
"preventDefault",
|
|
1012
1013
|
"hasBackground",
|
|
1014
|
+
"circular",
|
|
1013
1015
|
"tooltipPosition",
|
|
1014
1016
|
"role",
|
|
1015
1017
|
"iconFilled",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testgorilla-tgo-ui-components-dialog.mjs","names":[],"sources":["../../../components/dialog/dialog.component.ts","../../../components/dialog/dialog.component.html","../../../components/dialog/dialog.service.ts","../../../components/dialog/dialog.component.module.ts","../../../components/dialog/confirm-dialog/confirm-dialog.component.ts","../../../components/dialog/confirm-dialog/confirm-dialog.component.html","../../../components/dialog/confirm-dialog/confirm-dialog.component.module.ts","../../../components/dialog/dialog-custom/dialog-custom.component.ts","../../../components/dialog/dialog-custom/dialog-custom.component.html","../../../components/dialog/dialog-custom/dialog-custom.component.module.ts"],"sourcesContent":["import { hasModifierKey } from '@angular/cdk/keycodes';\nimport { CdkScrollable } from '@angular/cdk/scrolling';\nimport { AsyncPipe } from '@angular/common';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n EventEmitter,\n HostBinding,\n Inject,\n inject,\n Input,\n input,\n OnChanges,\n OnInit,\n Optional,\n Output,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef,\n MatDialogState,\n MatDialogTitle,\n MatDialogContent,\n MatDialogActions,\n} from '@angular/material/dialog';\nimport { filter } from 'rxjs';\n\nimport { ButtonComponent, ButtonColor, ButtonIconPosition } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\nimport { TooltipComponent } from '@testgorilla/tgo-ui/components/tooltip';\n\n@Component({\n selector: 'ui-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n MatDialogTitle,\n TooltipComponent,\n ButtonComponent,\n CdkScrollable,\n MatDialogContent,\n MatDialogActions,\n AsyncPipe,\n UiTranslatePipe,\n ],\n})\nexport class DialogComponent implements OnInit, OnChanges, AfterViewInit {\n /**\n * Dialog title\n *\n * @memberof DialogComponent\n */\n @Input() title? = '';\n\n /**\n * Show close button\n *\n * @memberof DialogComponent\n */\n @Input() showCloseButton = true;\n\n /**\n * Fuction called before dialgo is closed\n *\n * @memberof DialogComponent\n */\n @Input() canCloseFn: () => boolean = () => true;\n\n /**\n * Secondary button label\n *\n * @memberof DialogComponent\n */\n @Input() secondaryButtonLabel? = '';\n\n /**\n * Footer dialog message\n *\n * @memberof DialogComponent\n */\n @Input() footerMessage? = '';\n\n /**\n * Primary button label\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonLabel? = '';\n\n /**\n * Primary button icon name\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonIconName?: IconName | '' = '';\n\n /**\n * Secondary button type\n *\n * @memberof DialogComponent\n */\n @Input() secondaryButtonType: ButtonColor = 'ghost';\n\n /**\n * Primary button type\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonType: ButtonColor = 'primary';\n\n /**\n * Primary button test id\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonDataTestId: string | null = null;\n\n @Input() testId: string | null = null;\n\n @Input() closeButtonTestId: string | null = null;\n\n @Input() closeButtonAriaLabel = '';\n\n /**\n * Secondary button test id\n *\n * @memberof DialogComponent\n */\n @Input() secondaryButtonDataTestId: string | null = null;\n\n /**\n * Color of the dialog.\n * Defaults to Test Gorilla primary color.\n *\n * @type {string}\n * @memberof DialogComponent\n */\n @HostBinding('style.--color')\n @Input()\n companyColor: string | null = '';\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof DialogComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n /**\n *\n * Disable primary button\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() disablePrimaryButton = false;\n /**\n *\n * Show a spinner in place of the primary button label while the action runs.\n * Also disables the button, so a second click cannot fire\n * `primaryButtonClickEvent` while the first is still in flight.\n *\n * @memberof DialogComponent\n */\n primaryButtonLoading = input(false, { transform: booleanAttribute });\n /**\n *\n * Tooltip shown when hovering the primary button. Bound to a wrapper around the\n * button so it also shows while the button is disabled (a disabled button\n * receives no pointer events), e.g. to explain why the action is unavailable.\n *\n * @type {string}\n * @memberof DialogComponent\n */\n @Input() primaryButtonTooltip = '';\n /**\n *\n * Disable close button\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() disableClose = false;\n\n /**\n *\n * Disable button when canCloseFn is used\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() shouldDisableButtons = true;\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 {string}\n * @memberof DialogComponent\n */\n @Input() ariaLabelledby = '';\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 {string}\n * @memberof DialogComponent\n */\n @Input() ariaDescribedby = '';\n\n /**\n * Defines how modal was opened (with keyboard or not)\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() keyboardOpen = false;\n\n primaryButtonIconPosition = input<ButtonIconPosition>('left');\n\n @Output() closeEvent: EventEmitter<Event> = new EventEmitter<Event>();\n @Output() secondaryButtonClickEvent: EventEmitter<Event> = new EventEmitter<Event>();\n @Output() primaryButtonClickEvent: EventEmitter<Event> = new EventEmitter<Event>();\n\n @ViewChild('closeButton') closeButton: ButtonComponent;\n\n modalClosed = false;\n\n private readonly cdr = inject(ChangeDetectorRef);\n\n onEsc() {\n this.dismiss();\n }\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n public dialogRef: MatDialogRef<DialogComponent>,\n @Inject(MAT_DIALOG_DATA) private readonly data: { applicationTheme: ApplicationTheme }\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n // Not a host listener: focus can sit outside <ui-dialog>, e.g. on mat-dialog-container.\n // Optional call: MatDialogRef is stubbed as {} by DialogComponentModule, the stories and many consumer specs.\n this.dialogRef\n .keydownEvents?.()\n .pipe(\n filter(event => event.key === 'Escape' && !hasModifierKey(event)),\n takeUntilDestroyed()\n )\n .subscribe(() => this.onEsc());\n }\n\n disableButtons = false;\n protected readonly translationContext = 'DIALOG.';\n\n @ContentChild('dialogHeader')\n customHeader?: unknown;\n\n get hasCustomHeader(): boolean {\n return Boolean(this.customHeader);\n }\n\n ngOnInit(): void {\n this.areButtonsDisabled();\n if (this.data?.applicationTheme) {\n this.applicationTheme = this.data.applicationTheme;\n }\n if (this.applicationTheme !== 'classic') {\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- empty companyColor falls back to the theme colour\n this.companyColor = this.companyColor || '#D410AA';\n } else {\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- empty companyColor falls back to the theme colour\n this.companyColor = this.companyColor || '#46A997';\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['canCloseFn']) {\n this.dialogRef.disableClose = !this.canCloseFn();\n this.areButtonsDisabled();\n }\n }\n\n ngAfterViewInit(): void {\n if (this.keyboardOpen) {\n setTimeout(() => {\n this.closeButton.buttonElement.focus('keyboard');\n }, 100);\n }\n }\n\n //Disable primary button when canClose is false\n areButtonsDisabled() {\n this.disableButtons = !this.canCloseFn() && this.shouldDisableButtons;\n }\n\n //Close modal\n dismiss(): void {\n if (this.canCloseFn()) {\n this.dialogRef.disableClose = false;\n this.dialogRef.close();\n this.modalClosed = true;\n this.cdr.markForCheck();\n }\n }\n\n onClose(event: Event): void {\n this.closeEvent.emit(event);\n this.modalClosed = true;\n }\n\n onSecondaryButtonClick(event: Event): void {\n this.secondaryButtonClickEvent.emit(event);\n }\n\n onPrimaryButtonClick(event: Event): void {\n this.primaryButtonClickEvent.emit(event);\n\n // The consumer may have closed the dialog with its own result. Closing again\n // would overwrite that result with undefined, and consumers read a missing\n // result as a cancel (ASM-157).\n if (this.dialogRef.getState() === MatDialogState.OPEN) {\n this.dismiss();\n }\n }\n}\n","<div class=\"dialog-container\" [attr.theme]=\"applicationTheme\" [attr.data-testid]=\"testId\">\n <div\n mat-dialog-title\n class=\"dialog-title\"\n [attr.aria-modal]=\"true\"\n [attr.aria-labelledby]=\"'labelledby'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n\n <!-- Default header content -->\n @if (!hasCustomHeader) {\n <h3 class=\"bold\" id=\"labelledby\">{{ title }}</h3>\n @if (showCloseButton) {\n <div>\n <ui-button\n #closeButton\n [variant]=\"'icon-button'\"\n [iconName]=\"'Close'\"\n [companyColor]=\"applicationTheme === 'classic' ? '#000' : '#242424'\"\n [applicationTheme]=\"applicationTheme\"\n [tooltip]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n (click)=\"onClose($event)\"\n (buttonClickEvent)=\"dismiss()\"\n [testId]=\"closeButtonTestId\"\n [ariaLabel]=\"closeButtonAriaLabel || ('COMMON.CLOSE' | uiTranslate | async)!\"\n id=\"dialog-close-button\"\n ></ui-button>\n </div>\n }\n }\n\n <!-- Custom header content projection -->\n <ng-content select=\"[dialogHeader]\"></ng-content>\n </div>\n <mat-dialog-content>\n <ng-content></ng-content>\n </mat-dialog-content>\n @if (secondaryButtonLabel !== '' || primaryButtonLabel !== '') {\n <div mat-dialog-actions [class.dialog-action-w-message]=\"!!footerMessage\">\n @if (footerMessage) {\n <div class=\"actions-footer-message\">{{ footerMessage }}</div>\n }\n\n <!-- Projected footer content, rendered to the left of the action buttons -->\n <ng-content select=\"[dialogFooter]\"></ng-content>\n\n @if (!!secondaryButtonLabel) {\n <!-- Action-button ids stay on the ui-button wrappers: five tgo-qa-automation page objects descend from them. -->\n <ui-button\n [companyColor]=\"companyColor\"\n [variant]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [label]=\"secondaryButtonLabel\"\n [attr.data-testid]=\"secondaryButtonDataTestId\"\n (click)=\"onSecondaryButtonClick($event)\"\n ></ui-button>\n }\n @if (!!primaryButtonLabel) {\n <!-- The tooltip wraps the button: a disabled ui-button receives no pointer\n events, so the tooltip must trigger from an enclosing element. -->\n <ui-tooltip\n class=\"primary-button-tooltip-trigger\"\n [message]=\"primaryButtonTooltip\"\n [applicationTheme]=\"applicationTheme\"\n >\n <ui-button\n [iconPosition]=\"primaryButtonIconPosition()\"\n [iconName]=\"primaryButtonIconName ? primaryButtonIconName : undefined\"\n [variant]=\"primaryButtonType\"\n [loading]=\"primaryButtonLoading()\"\n [ariaLabel]=\"primaryButtonLoading() ? primaryButtonLabel : ''\"\n [disabled]=\"disableButtons || disablePrimaryButton || primaryButtonLoading()\"\n [applicationTheme]=\"applicationTheme\"\n (click)=\"onPrimaryButtonClick($event)\"\n [label]=\"primaryButtonLabel\"\n [companyColor]=\"companyColor\"\n [attr.data-testid]=\"primaryButtonDataTestId\"\n ></ui-button>\n </ui-tooltip>\n }\n </div>\n }\n\n <!-- This is announcement for screen reader that dialog was closed-->\n <div aria-live=\"assertive\" role=\"alert\" style=\"position: absolute; left: -9999px\">\n @if (modalClosed) {\n <span>{{ 'DIALOG.CLOSED' | uiTranslate | async }}</span>\n }\n </div>\n</div>\n","import { ComponentType } from '@angular/cdk/portal';\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\n\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\n\nimport { DialogConfig } from './dialog.model';\n\nexport type DialogSize = 'small' | 'large' | 'x-large';\n@Injectable()\nexport class DialogService {\n constructor(\n private readonly matDialog: MatDialog,\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {}\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- mirrors MatDialog.open<T, D = any, R = any>: untyped-by-default data/result types for consumer ergonomics\n open<K = any, R = any, T = any>(\n dialogComponent: ComponentType<T>,\n dialogConfig?: DialogConfig<K>\n ): MatDialogRef<T, R> {\n const {\n applicationTheme = 'light',\n size = 'small',\n panelClass = '',\n extraData = {},\n backdropClass = '',\n keyboardOpen = false,\n config = {},\n } = dialogConfig ?? {};\n // Open the dialog using UI custom styles\n return this.matDialog.open(dialogComponent, {\n ...config,\n data: {\n applicationTheme: this.defaultAppTheme ?? applicationTheme,\n ...extraData,\n keyboardOpen,\n },\n backdropClass: backdropClass || '',\n panelClass:\n applicationTheme === 'classic'\n ? ['ui-dialog-wrapper', panelClass, size]\n : ['ui-dialog-wrapper', panelClass, applicationTheme, size],\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\n\nimport { DialogComponent } from './dialog.component';\nimport { DialogService } from './dialog.service';\n\n@NgModule({\n imports: [CommonModule, MatDialogModule, ButtonComponentModule, UiTranslatePipe, DialogComponent],\n exports: [DialogComponent],\n providers: [{ provide: MAT_DIALOG_DATA, useValue: {} }, { provide: MatDialogRef, useValue: {} }, DialogService],\n})\nexport class DialogComponentModule {}\n","import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Inject, Input, Optional } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { ButtonColor, ButtonIconPosition } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme, LanguageService, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\n\nimport { DialogComponent } from '../dialog.component';\n\nimport { ConfirmDialogData } from './confirm-dialog.model';\n\n@Component({\n selector: 'ui-confirm-dialog',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './confirm-dialog.component.html',\n styleUrls: ['./confirm-dialog.component.scss'],\n imports: [DialogComponent, AsyncPipe, UiTranslatePipe],\n})\nexport class ConfirmDialogComponent {\n confirmMessage: string | undefined;\n confirmButtonText: string | undefined;\n cancelButtonText: string | undefined;\n title: string | undefined;\n lang = LanguageService.defaultLanguage;\n confirmMessageHtml: string | undefined;\n showCloseButton = false;\n showSecondaryButton = true;\n color: string | null;\n primaryButtonType: ButtonColor;\n secondaryButtonType: ButtonColor;\n primaryButtonIconName: IconName | undefined;\n primaryButtonDataTestId = 'confirm-dialog.confirm-button';\n secondaryButtonDataTestId = 'confirm-dialog.cancel-button';\n primaryButtonIconPosition: ButtonIconPosition;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof DialogComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n public dialogRef: MatDialogRef<ConfirmDialogComponent>,\n @Inject(MAT_DIALOG_DATA) private readonly data: ConfirmDialogData\n ) {\n this.confirmMessage = data.message;\n this.confirmButtonText = data.confirmButtonText;\n this.cancelButtonText = data.cancelButtonText;\n this.title = data.title;\n this.lang = data.language ?? LanguageService.defaultLanguage;\n this.confirmMessageHtml = data.messageHtml ?? undefined;\n this.showCloseButton = data.showCloseButton ?? false;\n this.showSecondaryButton = data.showSecondaryButton ?? true;\n this.color = data.color ?? null;\n this.primaryButtonType = data.primaryButtonType ?? 'primary';\n this.secondaryButtonType = data.secondaryButtonType ?? 'ghost';\n this.primaryButtonIconName = data.primaryButtonIconName ?? undefined;\n this.primaryButtonDataTestId = data.primaryButtonDataTestId ?? 'confirm-dialog.confirm-button';\n this.secondaryButtonDataTestId = data.secondaryButtonDataTestId ?? 'confirm-dialog.cancel-button';\n this.primaryButtonIconPosition = data.primaryButtonIconPosition ?? 'left';\n\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n onConfirm(): void {\n if (this.data.onConfirm) {\n this.data.onConfirm();\n }\n this.dialogRef.close(true);\n }\n}\n","<ng-container>\n <ui-dialog\n [title]=\"title ?? ('COMMON.CONFIRM' | uiTranslate | async)!\"\n [primaryButtonLabel]=\"confirmButtonText ?? ('COMMON.YES' | uiTranslate | async)!\"\n [secondaryButtonLabel]=\"\n showSecondaryButton ? (cancelButtonText ?? ('COMMON.CANCEL' | uiTranslate | async)!) : undefined\n \"\n (primaryButtonClickEvent)=\"onConfirm()\"\n (secondaryButtonClickEvent)=\"dialogRef.close(false)\"\n (closeEvent)=\"dialogRef.close(null)\"\n [primaryButtonType]=\"primaryButtonType\"\n [primaryButtonIconName]=\"primaryButtonIconName\"\n [secondaryButtonType]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [showCloseButton]=\"showCloseButton\"\n [companyColor]=\"color\"\n [primaryButtonDataTestId]=\"primaryButtonDataTestId\"\n [secondaryButtonDataTestId]=\"secondaryButtonDataTestId\"\n [primaryButtonIconPosition]=\"primaryButtonIconPosition\"\n >\n <div class=\"message\">{{ confirmMessage }}</div>\n @if (confirmMessageHtml) {\n <div class=\"message\" [innerHTML]=\"confirmMessageHtml\"></div>\n }\n </ui-dialog>\n</ng-container>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\n\nimport { DialogComponentModule } from '../dialog.component.module';\n\nimport { ConfirmDialogComponent } from './confirm-dialog.component';\n\n@NgModule({\n exports: [ConfirmDialogComponent],\n providers: [\n { provide: MAT_DIALOG_DATA, useValue: {} },\n { provide: MatDialogRef, useValue: {} },\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n ButtonComponentModule,\n DialogComponentModule,\n UiTranslatePipe,\n ConfirmDialogComponent,\n ],\n})\nexport class ConfirmDialogComponentModule {}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n Input,\n OnInit,\n Optional,\n ViewEncapsulation,\n} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { ButtonComponent } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { ToggleComponent } from '@testgorilla/tgo-ui/components/toggle';\n\nimport { DialogComponent } from '../dialog.component';\n\n// Shape of the MAT_DIALOG_DATA this demo dialog is opened with (see\n// dialog-demo.component's extraData; keyboardOpen is always merged in by\n// DialogService.open). The booleans are required because ui-dialog's\n// matching inputs are strict `boolean`.\ninterface DialogCustomData {\n title?: string;\n type?: 'default' | 'custom-header' | 'footer-content' | 'disabled-primary-tooltip';\n showCloseButton: boolean;\n keyboardOpen: boolean;\n footerMessage?: string;\n primaryButtonTooltip?: string;\n}\n\n@Component({\n selector: 'ui-dialog-custom',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './dialog-custom.component.html',\n styleUrls: ['./dialog-custom.component.scss'],\n encapsulation: ViewEncapsulation.None,\n imports: [DialogComponent, ButtonComponent, ToggleComponent],\n})\nexport class DialogCustomComponent implements OnInit {\n canClose: () => boolean;\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof DialogComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n @Inject(MAT_DIALOG_DATA) protected data: DialogCustomData,\n private readonly cdr: ChangeDetectorRef\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n ngOnInit(): void {\n this.canClose = this.canCloseFalse.bind(this);\n setTimeout(() => {\n this.canClose = this.canCloseTrue.bind(this);\n // `canClose` is template-bound and swapped from a timer.\n this.cdr.markForCheck();\n }, 2000);\n }\n\n //canCloseFn @input demo with false value\n canCloseFalse(): boolean {\n return false;\n }\n\n //canCloseFn @input demo with true value\n canCloseTrue(): boolean {\n return true;\n }\n}\n","<ui-dialog\n [title]=\"data.title\"\n [showCloseButton]=\"data.showCloseButton\"\n [applicationTheme]=\"applicationTheme\"\n [primaryButtonLabel]=\"'OK'\"\n [secondaryButtonLabel]=\"'Cancel'\"\n [canCloseFn]=\"canClose\"\n [keyboardOpen]=\"data.keyboardOpen\"\n [footerMessage]=\"data.footerMessage\"\n [disablePrimaryButton]=\"data.type === 'disabled-primary-tooltip'\"\n [primaryButtonTooltip]=\"data.primaryButtonTooltip ?? ''\"\n>\n <!-- Custom header content -->\n @if (data.type === 'custom-header') {\n <div dialogHeader class=\"custom-header\">\n <div class=\"button-group\">\n <ui-button label=\"Action 1\" [variant]=\"'ghost'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n <ui-button label=\"Action 2\" [variant]=\"'primary'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n </div>\n </div>\n }\n\n <!-- Custom footer content projection -->\n @if (data.type === 'footer-content') {\n <ui-toggle dialogFooter label=\"Don't show this again\" [applicationTheme]=\"applicationTheme\"></ui-toggle>\n }\n\n <!-- Dialog content -->\n <div class=\"dialog-content\">\n @if (data.type === 'default') {\n <p class=\"dialog-message\">This is a default dialog example with a standard header.</p>\n }\n @if (data.type === 'custom-header') {\n <p class=\"dialog-message\">This dialog uses a custom header with content projection.</p>\n }\n @if (data.type === 'footer-content') {\n <p class=\"dialog-message\">\n This dialog projects a <code>ui-toggle</code> into the footer, to the left of the action buttons.\n </p>\n }\n @if (data.type === 'disabled-primary-tooltip') {\n <p class=\"dialog-message\">\n The primary button is disabled; hover it to see the tooltip explaining why the action is unavailable.\n </p>\n }\n <p class=\"dialog-message\">The dialog will be closeable in 2 seconds (demonstrating canCloseFn).</p>\n </div>\n</ui-dialog>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { ToggleComponentModule } from '@testgorilla/tgo-ui/components/toggle';\n\nimport { DialogComponentModule } from '../dialog.component.module';\n\nimport { DialogCustomComponent } from './dialog-custom.component';\n\n@NgModule({\n imports: [CommonModule, DialogComponentModule, ButtonComponentModule, ToggleComponentModule, DialogCustomComponent],\n exports: [DialogCustomComponent],\n})\nexport class DialogCustomComponentModule {}\n"],"mappings":";;;;;;;;;;;;;AAyDA,IAAa,kBAAb,MAAa,gBAAe;CAwL1B,QAAK;EACH,KAAK,QAAO;CACd;CAEA,YAC6E,iBACpE,WACmC,MAA4C;EAFX,KAAA,kBAAA;EACpE,KAAA,YAAA;EACmC,KAAA,OAAA;EAzLnC,KAAA,QAAS;EAOT,KAAA,kBAAkB;EAOlB,KAAA,mBAAkC;EAOlC,KAAA,uBAAwB;EAOxB,KAAA,gBAAiB;EAOjB,KAAA,qBAAsB;EAOtB,KAAA,wBAAwC;EAOxC,KAAA,sBAAmC;EAOnC,KAAA,oBAAiC;EAOjC,KAAA,0BAAyC;EAEzC,KAAA,SAAwB;EAExB,KAAA,oBAAmC;EAEnC,KAAA,uBAAuB;EAOvB,KAAA,4BAA2C;EAWpD,KAAA,eAA8B;EASrB,KAAA,mBAAqC;EAQrC,KAAA,uBAAuB;EAShC,KAAA,uBAAuB,MAAM,OAAK;GAAA,GAAA,YAAA,EAAA,W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A,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA2B,SAAA;IAH5B;IAAc;IAAuB;IAAuB;IAAuB;GAAqB;EAAA,CAAA;CAAA;;AAGvG,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA2B,YAAA,CAAA;EAJvC,MAAA;EAAS,MAAA,CAAA;GACR,SAAS;IAAC;IAAc;IAAuB;IAAuB;IAAuB;GAAqB;GAClH,SAAS,CAAC,qBAAqB;EAChC,CAAA"}
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ui-components-dialog.mjs","names":[],"sources":["../../../components/dialog/dialog.component.ts","../../../components/dialog/dialog.component.html","../../../components/dialog/dialog.service.ts","../../../components/dialog/dialog.component.module.ts","../../../components/dialog/confirm-dialog/confirm-dialog.component.ts","../../../components/dialog/confirm-dialog/confirm-dialog.component.html","../../../components/dialog/confirm-dialog/confirm-dialog.component.module.ts","../../../components/dialog/dialog-custom/dialog-custom.component.ts","../../../components/dialog/dialog-custom/dialog-custom.component.html","../../../components/dialog/dialog-custom/dialog-custom.component.module.ts"],"sourcesContent":["import { hasModifierKey } from '@angular/cdk/keycodes';\nimport { CdkScrollable } from '@angular/cdk/scrolling';\nimport { AsyncPipe } from '@angular/common';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n EventEmitter,\n HostBinding,\n Inject,\n inject,\n Input,\n input,\n OnChanges,\n OnInit,\n Optional,\n Output,\n SimpleChanges,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n MAT_DIALOG_DATA,\n MatDialogRef,\n MatDialogState,\n MatDialogTitle,\n MatDialogContent,\n MatDialogActions,\n} from '@angular/material/dialog';\nimport { filter } from 'rxjs';\n\nimport { ButtonComponent, ButtonColor, ButtonIconPosition } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\nimport { TooltipComponent } from '@testgorilla/tgo-ui/components/tooltip';\n\n@Component({\n selector: 'ui-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [\n MatDialogTitle,\n TooltipComponent,\n ButtonComponent,\n CdkScrollable,\n MatDialogContent,\n MatDialogActions,\n AsyncPipe,\n UiTranslatePipe,\n ],\n})\nexport class DialogComponent implements OnInit, OnChanges, AfterViewInit {\n /**\n * Dialog title\n *\n * @memberof DialogComponent\n */\n @Input() title? = '';\n\n /**\n * Show close button\n *\n * @memberof DialogComponent\n */\n @Input() showCloseButton = true;\n\n /**\n * Fuction called before dialgo is closed\n *\n * @memberof DialogComponent\n */\n @Input() canCloseFn: () => boolean = () => true;\n\n /**\n * Secondary button label\n *\n * @memberof DialogComponent\n */\n @Input() secondaryButtonLabel? = '';\n\n /**\n * Footer dialog message\n *\n * @memberof DialogComponent\n */\n @Input() footerMessage? = '';\n\n /**\n * Primary button label\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonLabel? = '';\n\n /**\n * Primary button icon name\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonIconName?: IconName | '' = '';\n\n /**\n * Secondary button type\n *\n * @memberof DialogComponent\n */\n @Input() secondaryButtonType: ButtonColor = 'ghost';\n\n /**\n * Primary button type\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonType: ButtonColor = 'primary';\n\n /**\n * Primary button test id\n *\n * @memberof DialogComponent\n */\n @Input() primaryButtonDataTestId: string | null = null;\n\n @Input() testId: string | null = null;\n\n @Input() closeButtonTestId: string | null = null;\n\n @Input() closeButtonAriaLabel = '';\n\n /**\n * Secondary button test id\n *\n * @memberof DialogComponent\n */\n @Input() secondaryButtonDataTestId: string | null = null;\n\n /**\n * Color of the dialog.\n * Defaults to Test Gorilla primary color.\n *\n * @type {string}\n * @memberof DialogComponent\n */\n @HostBinding('style.--color')\n @Input()\n companyColor: string | null = '';\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof DialogComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n /**\n *\n * Disable primary button\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() disablePrimaryButton = false;\n /**\n *\n * Show a spinner in place of the primary button label while the action runs.\n * Also disables the button, so a second click cannot fire\n * `primaryButtonClickEvent` while the first is still in flight.\n *\n * @memberof DialogComponent\n */\n primaryButtonLoading = input(false, { transform: booleanAttribute });\n /**\n *\n * Tooltip shown when hovering the primary button. Bound to a wrapper around the\n * button so it also shows while the button is disabled (a disabled button\n * receives no pointer events), e.g. to explain why the action is unavailable.\n *\n * @type {string}\n * @memberof DialogComponent\n */\n @Input() primaryButtonTooltip = '';\n /**\n *\n * Disable close button\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() disableClose = false;\n\n /**\n *\n * Disable button when canCloseFn is used\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() shouldDisableButtons = true;\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 {string}\n * @memberof DialogComponent\n */\n @Input() ariaLabelledby = '';\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 {string}\n * @memberof DialogComponent\n */\n @Input() ariaDescribedby = '';\n\n /**\n * Defines how modal was opened (with keyboard or not)\n *\n * @type {boolean}\n * @memberof DialogComponent\n */\n @Input() keyboardOpen = false;\n\n primaryButtonIconPosition = input<ButtonIconPosition>('left');\n\n @Output() closeEvent: EventEmitter<Event> = new EventEmitter<Event>();\n @Output() secondaryButtonClickEvent: EventEmitter<Event> = new EventEmitter<Event>();\n @Output() primaryButtonClickEvent: EventEmitter<Event> = new EventEmitter<Event>();\n\n @ViewChild('closeButton') closeButton: ButtonComponent;\n\n modalClosed = false;\n\n private readonly cdr = inject(ChangeDetectorRef);\n\n onEsc() {\n this.dismiss();\n }\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n public dialogRef: MatDialogRef<DialogComponent>,\n @Inject(MAT_DIALOG_DATA) private readonly data: { applicationTheme: ApplicationTheme }\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n // Not a host listener: focus can sit outside <ui-dialog>, e.g. on mat-dialog-container.\n // Optional call: MatDialogRef is stubbed as {} by DialogComponentModule, the stories and many consumer specs.\n this.dialogRef\n .keydownEvents?.()\n .pipe(\n filter(event => event.key === 'Escape' && !hasModifierKey(event)),\n takeUntilDestroyed()\n )\n .subscribe(() => this.onEsc());\n }\n\n disableButtons = false;\n protected readonly translationContext = 'DIALOG.';\n\n @ContentChild('dialogHeader')\n customHeader?: unknown;\n\n get hasCustomHeader(): boolean {\n return Boolean(this.customHeader);\n }\n\n ngOnInit(): void {\n this.areButtonsDisabled();\n if (this.data?.applicationTheme) {\n this.applicationTheme = this.data.applicationTheme;\n }\n if (this.applicationTheme !== 'classic') {\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- empty companyColor falls back to the theme colour\n this.companyColor = this.companyColor || '#D410AA';\n } else {\n // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- empty companyColor falls back to the theme colour\n this.companyColor = this.companyColor || '#46A997';\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['canCloseFn']) {\n this.dialogRef.disableClose = !this.canCloseFn();\n this.areButtonsDisabled();\n }\n }\n\n ngAfterViewInit(): void {\n if (this.keyboardOpen) {\n setTimeout(() => {\n this.closeButton.buttonElement.focus('keyboard');\n }, 100);\n }\n }\n\n //Disable primary button when canClose is false\n areButtonsDisabled() {\n this.disableButtons = !this.canCloseFn() && this.shouldDisableButtons;\n }\n\n //Close modal\n dismiss(): void {\n if (this.canCloseFn()) {\n this.dialogRef.disableClose = false;\n this.dialogRef.close();\n this.modalClosed = true;\n this.cdr.markForCheck();\n }\n }\n\n onClose(event: Event): void {\n this.closeEvent.emit(event);\n this.modalClosed = true;\n }\n\n onSecondaryButtonClick(event: Event): void {\n this.secondaryButtonClickEvent.emit(event);\n }\n\n onPrimaryButtonClick(event: Event): void {\n this.primaryButtonClickEvent.emit(event);\n\n // The consumer may have closed the dialog with its own result. Closing again\n // would overwrite that result with undefined, and consumers read a missing\n // result as a cancel (ASM-157).\n if (this.dialogRef.getState() === MatDialogState.OPEN) {\n this.dismiss();\n }\n }\n}\n","<div class=\"dialog-container\" [attr.theme]=\"applicationTheme\" [attr.data-testid]=\"testId\">\n <div\n mat-dialog-title\n class=\"dialog-title\"\n [attr.aria-modal]=\"true\"\n [attr.aria-labelledby]=\"'labelledby'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n\n <!-- Default header content -->\n @if (!hasCustomHeader) {\n <h3 class=\"bold\" id=\"labelledby\">{{ title }}</h3>\n @if (showCloseButton) {\n <div>\n <ui-button\n #closeButton\n [variant]=\"'icon-button'\"\n [iconName]=\"'Close'\"\n [companyColor]=\"applicationTheme === 'classic' ? '#000' : '#242424'\"\n [applicationTheme]=\"applicationTheme\"\n [tooltip]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n (click)=\"onClose($event)\"\n (buttonClickEvent)=\"dismiss()\"\n [testId]=\"closeButtonTestId\"\n [ariaLabel]=\"closeButtonAriaLabel || ('COMMON.CLOSE' | uiTranslate | async)!\"\n id=\"dialog-close-button\"\n ></ui-button>\n </div>\n }\n }\n\n <!-- Custom header content projection -->\n <ng-content select=\"[dialogHeader]\"></ng-content>\n </div>\n <mat-dialog-content>\n <ng-content></ng-content>\n </mat-dialog-content>\n @if (secondaryButtonLabel !== '' || primaryButtonLabel !== '') {\n <div mat-dialog-actions [class.dialog-action-w-message]=\"!!footerMessage\">\n @if (footerMessage) {\n <div class=\"actions-footer-message\">{{ footerMessage }}</div>\n }\n\n <!-- Projected footer content, rendered to the left of the action buttons -->\n <ng-content select=\"[dialogFooter]\"></ng-content>\n\n @if (!!secondaryButtonLabel) {\n <!-- Action-button ids stay on the ui-button wrappers: five tgo-qa-automation page objects descend from them. -->\n <ui-button\n [companyColor]=\"companyColor\"\n [variant]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [label]=\"secondaryButtonLabel\"\n [attr.data-testid]=\"secondaryButtonDataTestId\"\n (click)=\"onSecondaryButtonClick($event)\"\n ></ui-button>\n }\n @if (!!primaryButtonLabel) {\n <!-- The tooltip wraps the button: a disabled ui-button receives no pointer\n events, so the tooltip must trigger from an enclosing element. -->\n <ui-tooltip\n class=\"primary-button-tooltip-trigger\"\n [message]=\"primaryButtonTooltip\"\n [applicationTheme]=\"applicationTheme\"\n >\n <ui-button\n [iconPosition]=\"primaryButtonIconPosition()\"\n [iconName]=\"primaryButtonIconName ? primaryButtonIconName : undefined\"\n [variant]=\"primaryButtonType\"\n [loading]=\"primaryButtonLoading()\"\n [ariaLabel]=\"primaryButtonLoading() ? primaryButtonLabel : ''\"\n [disabled]=\"disableButtons || disablePrimaryButton || primaryButtonLoading()\"\n [applicationTheme]=\"applicationTheme\"\n (click)=\"onPrimaryButtonClick($event)\"\n [label]=\"primaryButtonLabel\"\n [companyColor]=\"companyColor\"\n [attr.data-testid]=\"primaryButtonDataTestId\"\n ></ui-button>\n </ui-tooltip>\n }\n </div>\n }\n\n <!-- This is announcement for screen reader that dialog was closed-->\n <div aria-live=\"assertive\" role=\"alert\" style=\"position: absolute; left: -9999px\">\n @if (modalClosed) {\n <span>{{ 'DIALOG.CLOSED' | uiTranslate | async }}</span>\n }\n </div>\n</div>\n","import { ComponentType } from '@angular/cdk/portal';\nimport { Inject, Injectable, Optional } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\n\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\n\nimport { DialogConfig } from './dialog.model';\n\nexport type DialogSize = 'small' | 'large' | 'x-large';\n@Injectable()\nexport class DialogService {\n constructor(\n private readonly matDialog: MatDialog,\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {}\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- mirrors MatDialog.open<T, D = any, R = any>: untyped-by-default data/result types for consumer ergonomics\n open<K = any, R = any, T = any>(\n dialogComponent: ComponentType<T>,\n dialogConfig?: DialogConfig<K>\n ): MatDialogRef<T, R> {\n const {\n applicationTheme = 'light',\n size = 'small',\n panelClass = '',\n extraData = {},\n backdropClass = '',\n keyboardOpen = false,\n config = {},\n } = dialogConfig ?? {};\n // Open the dialog using UI custom styles\n return this.matDialog.open(dialogComponent, {\n ...config,\n data: {\n applicationTheme: this.defaultAppTheme ?? applicationTheme,\n ...extraData,\n keyboardOpen,\n },\n backdropClass: backdropClass || '',\n panelClass:\n applicationTheme === 'classic'\n ? ['ui-dialog-wrapper', panelClass, size]\n : ['ui-dialog-wrapper', panelClass, applicationTheme, size],\n });\n }\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatDialogModule, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\n\nimport { DialogComponent } from './dialog.component';\nimport { DialogService } from './dialog.service';\n\n@NgModule({\n imports: [CommonModule, MatDialogModule, ButtonComponentModule, UiTranslatePipe, DialogComponent],\n exports: [DialogComponent],\n providers: [{ provide: MAT_DIALOG_DATA, useValue: {} }, { provide: MatDialogRef, useValue: {} }, DialogService],\n})\nexport class DialogComponentModule {}\n","import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Inject, Input, Optional } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { ButtonColor, ButtonIconPosition } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme, LanguageService, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconName } from '@testgorilla/tgo-ui/components/icon';\n\nimport { DialogComponent } from '../dialog.component';\n\nimport { ConfirmDialogData } from './confirm-dialog.model';\n\n@Component({\n selector: 'ui-confirm-dialog',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './confirm-dialog.component.html',\n styleUrls: ['./confirm-dialog.component.scss'],\n imports: [DialogComponent, AsyncPipe, UiTranslatePipe],\n})\nexport class ConfirmDialogComponent {\n confirmMessage: string | undefined;\n confirmButtonText: string | undefined;\n cancelButtonText: string | undefined;\n title: string | undefined;\n lang = LanguageService.defaultLanguage;\n confirmMessageHtml: string | undefined;\n showCloseButton = false;\n showSecondaryButton = true;\n color: string | null;\n primaryButtonType: ButtonColor;\n secondaryButtonType: ButtonColor;\n primaryButtonIconName: IconName | undefined;\n primaryButtonDataTestId = 'confirm-dialog.confirm-button';\n secondaryButtonDataTestId = 'confirm-dialog.cancel-button';\n primaryButtonIconPosition: ButtonIconPosition;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof DialogComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n public dialogRef: MatDialogRef<ConfirmDialogComponent>,\n @Inject(MAT_DIALOG_DATA) private readonly data: ConfirmDialogData\n ) {\n this.confirmMessage = data.message;\n this.confirmButtonText = data.confirmButtonText;\n this.cancelButtonText = data.cancelButtonText;\n this.title = data.title;\n this.lang = data.language ?? LanguageService.defaultLanguage;\n this.confirmMessageHtml = data.messageHtml ?? undefined;\n this.showCloseButton = data.showCloseButton ?? false;\n this.showSecondaryButton = data.showSecondaryButton ?? true;\n this.color = data.color ?? null;\n this.primaryButtonType = data.primaryButtonType ?? 'primary';\n this.secondaryButtonType = data.secondaryButtonType ?? 'ghost';\n this.primaryButtonIconName = data.primaryButtonIconName ?? undefined;\n this.primaryButtonDataTestId = data.primaryButtonDataTestId ?? 'confirm-dialog.confirm-button';\n this.secondaryButtonDataTestId = data.secondaryButtonDataTestId ?? 'confirm-dialog.cancel-button';\n this.primaryButtonIconPosition = data.primaryButtonIconPosition ?? 'left';\n\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n onConfirm(): void {\n if (this.data.onConfirm) {\n this.data.onConfirm();\n }\n this.dialogRef.close(true);\n }\n}\n","<ng-container>\n <ui-dialog\n [title]=\"title ?? ('COMMON.CONFIRM' | uiTranslate | async)!\"\n [primaryButtonLabel]=\"confirmButtonText ?? ('COMMON.YES' | uiTranslate | async)!\"\n [secondaryButtonLabel]=\"\n showSecondaryButton ? (cancelButtonText ?? ('COMMON.CANCEL' | uiTranslate | async)!) : undefined\n \"\n (primaryButtonClickEvent)=\"onConfirm()\"\n (secondaryButtonClickEvent)=\"dialogRef.close(false)\"\n (closeEvent)=\"dialogRef.close(null)\"\n [primaryButtonType]=\"primaryButtonType\"\n [primaryButtonIconName]=\"primaryButtonIconName\"\n [secondaryButtonType]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [showCloseButton]=\"showCloseButton\"\n [companyColor]=\"color\"\n [primaryButtonDataTestId]=\"primaryButtonDataTestId\"\n [secondaryButtonDataTestId]=\"secondaryButtonDataTestId\"\n [primaryButtonIconPosition]=\"primaryButtonIconPosition\"\n >\n <div class=\"message\">{{ confirmMessage }}</div>\n @if (confirmMessageHtml) {\n <div class=\"message\" [innerHTML]=\"confirmMessageHtml\"></div>\n }\n </ui-dialog>\n</ng-container>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogModule, MatDialogRef } from '@angular/material/dialog';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\n\nimport { DialogComponentModule } from '../dialog.component.module';\n\nimport { ConfirmDialogComponent } from './confirm-dialog.component';\n\n@NgModule({\n exports: [ConfirmDialogComponent],\n providers: [\n { provide: MAT_DIALOG_DATA, useValue: {} },\n { provide: MatDialogRef, useValue: {} },\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n ButtonComponentModule,\n DialogComponentModule,\n UiTranslatePipe,\n ConfirmDialogComponent,\n ],\n})\nexport class ConfirmDialogComponentModule {}\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n Inject,\n Input,\n OnInit,\n Optional,\n ViewEncapsulation,\n} from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\n\nimport { ButtonComponent } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { ToggleComponent } from '@testgorilla/tgo-ui/components/toggle';\n\nimport { DialogComponent } from '../dialog.component';\n\n// Shape of the MAT_DIALOG_DATA this demo dialog is opened with (see\n// dialog-demo.component's extraData; keyboardOpen is always merged in by\n// DialogService.open). The booleans are required because ui-dialog's\n// matching inputs are strict `boolean`.\ninterface DialogCustomData {\n title?: string;\n type?: 'default' | 'custom-header' | 'footer-content' | 'disabled-primary-tooltip';\n showCloseButton: boolean;\n keyboardOpen: boolean;\n footerMessage?: string;\n primaryButtonTooltip?: string;\n}\n\n@Component({\n selector: 'ui-dialog-custom',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './dialog-custom.component.html',\n styleUrls: ['./dialog-custom.component.scss'],\n encapsulation: ViewEncapsulation.None,\n imports: [DialogComponent, ButtonComponent, ToggleComponent],\n})\nexport class DialogCustomComponent implements OnInit {\n canClose: () => boolean;\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof DialogComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n @Inject(MAT_DIALOG_DATA) protected data: DialogCustomData,\n private readonly cdr: ChangeDetectorRef\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n\n ngOnInit(): void {\n this.canClose = this.canCloseFalse.bind(this);\n setTimeout(() => {\n this.canClose = this.canCloseTrue.bind(this);\n // `canClose` is template-bound and swapped from a timer.\n this.cdr.markForCheck();\n }, 2000);\n }\n\n //canCloseFn @input demo with false value\n canCloseFalse(): boolean {\n return false;\n }\n\n //canCloseFn @input demo with true value\n canCloseTrue(): boolean {\n return true;\n }\n}\n","<ui-dialog\n [title]=\"data.title\"\n [showCloseButton]=\"data.showCloseButton\"\n [applicationTheme]=\"applicationTheme\"\n [primaryButtonLabel]=\"'OK'\"\n [secondaryButtonLabel]=\"'Cancel'\"\n [canCloseFn]=\"canClose\"\n [keyboardOpen]=\"data.keyboardOpen\"\n [footerMessage]=\"data.footerMessage\"\n [disablePrimaryButton]=\"data.type === 'disabled-primary-tooltip'\"\n [primaryButtonTooltip]=\"data.primaryButtonTooltip ?? ''\"\n>\n <!-- Custom header content -->\n @if (data.type === 'custom-header') {\n <div dialogHeader class=\"custom-header\">\n <div class=\"button-group\">\n <ui-button label=\"Action 1\" [variant]=\"'ghost'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n <ui-button label=\"Action 2\" [variant]=\"'primary'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n </div>\n </div>\n }\n\n <!-- Custom footer content projection -->\n @if (data.type === 'footer-content') {\n <ui-toggle dialogFooter label=\"Don't show this again\" [applicationTheme]=\"applicationTheme\"></ui-toggle>\n }\n\n <!-- Dialog content -->\n <div class=\"dialog-content\">\n @if (data.type === 'default') {\n <p class=\"dialog-message\">This is a default dialog example with a standard header.</p>\n }\n @if (data.type === 'custom-header') {\n <p class=\"dialog-message\">This dialog uses a custom header with content projection.</p>\n }\n @if (data.type === 'footer-content') {\n <p class=\"dialog-message\">\n This dialog projects a <code>ui-toggle</code> into the footer, to the left of the action buttons.\n </p>\n }\n @if (data.type === 'disabled-primary-tooltip') {\n <p class=\"dialog-message\">\n The primary button is disabled; hover it to see the tooltip explaining why the action is unavailable.\n </p>\n }\n <p class=\"dialog-message\">The dialog will be closeable in 2 seconds (demonstrating canCloseFn).</p>\n </div>\n</ui-dialog>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { ToggleComponentModule } from '@testgorilla/tgo-ui/components/toggle';\n\nimport { DialogComponentModule } from '../dialog.component.module';\n\nimport { DialogCustomComponent } from './dialog-custom.component';\n\n@NgModule({\n imports: [CommonModule, DialogComponentModule, ButtonComponentModule, ToggleComponentModule, DialogCustomComponent],\n exports: [DialogCustomComponent],\n})\nexport class DialogCustomComponentModule {}\n"],"mappings":";;;;;;;;;;;;;AAyDA,IAAa,kBAAb,MAAa,gBAAe;CAwL1B,QAAK;EACH,KAAK,QAAO;CACd;CAEA,YAC6E,iBACpE,WACmC,MAA4C;EAFX,KAAA,kBAAA;EACpE,KAAA,YAAA;EACmC,KAAA,OAAA;EAzLnC,KAAA,QAAS;EAOT,KAAA,kBAAkB;EAOlB,KAAA,mBAAkC;EAOlC,KAAA,uBAAwB;EAOxB,KAAA,gBAAiB;EAOjB,KAAA,qBAAsB;EAOtB,KAAA,wBAAwC;EAOxC,KAAA,sBAAmC;EAOnC,KAAA,oBAAiC;EAOjC,KAAA,0BAAyC;EAEzC,KAAA,SAAwB;EAExB,KAAA,oBAAmC;EAEnC,KAAA,uBAAuB;EAOvB,KAAA,4BAA2C;EAWpD,KAAA,eAA8B;EASrB,KAAA,mBAAqC;EAQrC,KAAA,uBAAuB;EAShC,KAAA,uBAAuB,MAAM,OAAK;GAAA,GAAA,YAAA,EAAA,WAA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