@testgorilla/tgo-ui 12.2.0 → 12.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs +6 -1
- package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs +6 -4
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-button.mjs +19 -4
- package/fesm2022/testgorilla-tgo-ui-components-button.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-core.mjs +11 -1
- package/fesm2022/testgorilla-tgo-ui-components-core.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs +7 -1
- package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-field.mjs +8 -2
- package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-infinite-scroll-table.mjs +12 -3
- package/fesm2022/testgorilla-tgo-ui-components-infinite-scroll-table.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs +6 -2
- package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs +6 -0
- package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-popover.mjs +250 -50
- package/fesm2022/testgorilla-tgo-ui-components-popover.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs +4 -0
- package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs +4 -1
- package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs +5 -2
- package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-scale.mjs +9 -2
- package/fesm2022/testgorilla-tgo-ui-components-scale.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs +89 -7
- package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs +7 -4
- package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-slider.mjs +13 -4
- package/fesm2022/testgorilla-tgo-ui-components-slider.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-table.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-table.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs +3 -0
- package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs.map +1 -1
- package/mcp/catalog.json +1 -1
- package/package.json +2 -2
- package/types/testgorilla-tgo-ui-components-alert-banner.d.ts +1 -0
- package/types/testgorilla-tgo-ui-components-autocomplete-v2.d.ts +1 -1
- package/types/testgorilla-tgo-ui-components-button.d.ts +32 -0
- package/types/testgorilla-tgo-ui-components-core.d.ts +1 -0
- package/types/testgorilla-tgo-ui-components-field.d.ts +1 -0
- package/types/testgorilla-tgo-ui-components-infinite-scroll-table.d.ts +3 -3
- package/types/testgorilla-tgo-ui-components-popover.d.ts +51 -5
- package/types/testgorilla-tgo-ui-components-radio-button.d.ts +1 -0
- package/types/testgorilla-tgo-ui-components-scale.d.ts +1 -0
- package/types/testgorilla-tgo-ui-components-side-navigation.d.ts +59 -1
- package/types/testgorilla-tgo-ui-components-slider.d.ts +2 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testgorilla-tgo-ui-components-dropdown.mjs","names":["MatOption_1"],"sources":["../../../components/dropdown/dropdown.component.ts","../../../components/dropdown/dropdown.component.html","../../../components/dropdown/dropdown.component.module.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { NgClass, NgTemplateOutlet, AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n DestroyRef,\n DoCheck,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n inject,\n Input,\n NgZone,\n OnChanges,\n OnInit,\n Output,\n ProviderToken,\n Renderer2,\n signal,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n AfterViewInit,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { MatOption } from '@angular/material/core';\nimport { FloatLabelType, MatFormField, MatLabel, MatHint } from '@angular/material/form-field';\nimport { MatSelect, MatSelectChange, MatSelectTrigger, MatOption as MatOption_1 } from '@angular/material/select';\n\nimport { adjustLightness, ButtonComponent } from '@testgorilla/tgo-ui/components/button';\nimport {\n ApplicationTheme,\n IKeyboardEvent,\n UiTranslatePipe,\n HasValidationErrorPipe,\n} from '@testgorilla/tgo-ui/components/core';\nimport { IconName, IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\n\nimport { OptionType } from './dropdown.model';\n\n/** The dropdown's form value: a single option value, or an array for multi-select. */\ntype DropdownValue = string | string[] | null | undefined;\n\n@Component({\n selector: 'ui-dropdown',\n templateUrl: './dropdown.component.html',\n styleUrls: ['./dropdown.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n MatFormField,\n NgClass,\n MatLabel,\n IconComponentModule,\n MatSelect,\n MatSelectTrigger,\n NgTemplateOutlet,\n MatOption_1,\n ButtonComponent,\n MatHint,\n ValidationErrorModule,\n AsyncPipe,\n UiTranslatePipe,\n HasValidationErrorPipe,\n ],\n})\nexport class DropdownComponent implements OnInit, ControlValueAccessor, DoCheck, OnChanges, AfterViewInit {\n @HostBinding() class = 'ui-dropdown';\n\n findValueByValueField = (item: OptionType) => item[this.valueField] === this.value;\n /**\n * Text content will be applied to the input element if present.\n *\n * @type {string}\n * @memberof DropdownComponent\n */\n @Input() label? = '';\n\n /**\n * Icon to display alongside the label\n *\n * @type {IconName}\n * @memberof DropdownComponent\n */\n @Input() labelIcon?: IconName;\n\n /**\n * Indicates if this field is filled by AI\n *\n * @type {boolean}\n * @memberof DropdownComponent\n */\n @Input() isAIVariant = false;\n\n /**\n * Input name attribute\n *\n * @type {string}\n * @memberof DropdownComponent\n */\n @Input() name: string;\n /**\n * Placeholder to be shown if no value has been selected.\n *\n * @type {string}\n * @memberof DropdownComponent\n */\n @Input() placeholder: string;\n\n /**\n * Unique id of the element.\n *\n * @type {string}\n * @memberof DropdownComponent\n */\n @Input() id? = '';\n\n @Input() testId: string | null = null;\n\n @Input() ariaLabel = '';\n\n /**\n * Input value\n *\n * @type {string}\n * @memberof DropdownComponent\n */\n @Input() value?: string;\n\n /**\n * Whether the component is in an error state.\n *\n * @type {string[]}\n * @memberof DropdownComponent\n */\n @Input() errors?: string[];\n\n /**\n * Whether the component is disabled.\n * Default: false.\n *\n * @type {boolean}\n * @memberof DropdownComponent\n */\n @Input() disabled = false;\n\n /**\n * List of options.\n *\n * @type {OptionType}\n * @memberof DropdownComponent\n */\n @Input() valueList: OptionType[] = [];\n\n /**\n * Whether the user should be allowed to clear the values.\n * Default: true.\n *\n * @type {boolean}\n * @memberof DropdownComponent\n */\n @Input() allowClear = true;\n\n /**\n * This will allow the user to select multiple values at once.\n * Default: true.\n *\n * @type {boolean}\n * @memberof DropdownComponent\n */\n @Input() allowMultipleSelection? = false;\n\n /**\n * Whether the component is required.\n * Default: false.\n *\n * @type {boolean}\n * @memberof DropdownComponent\n */\n @Input() required = false;\n\n /**\n * Show reserved content below form field\n * @property showBottomContent\n * @type {boolean}\n * @memberof DropdownComponent\n */\n @Input() showBottomContent = true;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof DropdownComponent\n */\n @HostBinding('attr.theme')\n @Input()\n applicationTheme: ApplicationTheme = 'light';\n\n /**\n * Hide in build errors for Reactive Forms\n *\n * @type {number}\n * @memberof DropdownComponent\n */\n @Input() hideBuiltInErrors = false;\n\n /**\n * Hide label in errors\n *\n * @type {number}\n * @memberof DropdownComponent\n */\n @Input() hideLabelInErrors = false;\n\n /**\n * @property textField\n * @description The field to be used as the display text in the dropdown.\n * @memberof DropdownComponent\n */\n @Input() textField = '';\n\n /**\n * @property valueField\n * @description The field to be used as the value in the dropdown.\n * @memberof DropdownComponent\n */\n @Input() valueField = '';\n\n @Input() hasError = false;\n\n /**\n * Color of the option hover.\n * Defaults to Test Gorilla primary color.\n *\n * @type {string}\n * @memberof DropdownComponent\n */\n @Input() companyColor = '';\n\n /**\n * Class to be applied to the panel.\n * @type {string}\n * @memberof DropdownComponent\n */\n @Input() panelClass = '';\n\n @Output() closed = new EventEmitter<void>();\n @Output() opened = new EventEmitter<void>();\n\n @ViewChild('matSelect') matSelect: MatSelect;\n\n @ContentChild('customOptionTemplate', { read: TemplateRef }) customOptionTemplate: TemplateRef<unknown> | null;\n @ContentChild('customSelectedOptionTemplate', { read: TemplateRef })\n customSelectedOptionTemplate: TemplateRef<unknown> | null;\n\n @HostListener('keydown.tab')\n onTabPress(): void {\n this.matSelect?.close();\n }\n\n /**\n * @ignore\n */\n onChange: (value: DropdownValue) => void = () => {};\n\n /**\n * @ignore\n */\n onTouch = () => {};\n\n private readonly defaultAppTheme = inject(\n 'CANOPYUI_DEFAULT_APPLICATION_THEME' as unknown as ProviderToken<ApplicationTheme>,\n {\n optional: true,\n }\n );\n private readonly cdr = inject(ChangeDetectorRef);\n public ngControl = inject(NgControl, { optional: true, self: true });\n private readonly renderer2 = inject(Renderer2);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly destroyRef = inject(DestroyRef);\n private readonly ngZone = inject(NgZone);\n\n constructor() {\n this.errors = [];\n this.valueList = [];\n if (this.defaultAppTheme) {\n this.applicationTheme = this.defaultAppTheme;\n }\n\n if (this.ngControl !== null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n floatLabel: FloatLabelType;\n classError: string;\n errorsLength: boolean;\n showCheck: boolean;\n optionSelected: MatOption | null = null;\n keyboardFocused = signal<boolean>(false);\n isOpen = signal(false);\n\n /**\n * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched or errors\n * to display validation errors that might happen (e.g. required)\n */\n ngDoCheck(): void {\n if (this.ngControl?.touched || this.ngControl?.errors) {\n this.cdr.markForCheck();\n }\n }\n\n ngOnInit(): void {\n this.errorsLength = this.setErrorsLength();\n this.setStyleVariable();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['companyColor']) {\n this.setStyleVariable();\n }\n }\n\n ngAfterViewInit(): void {\n /* eslint-disable no-underscore-dangle -- MatSelect internals (_elementRef/_handleKeydown) for focus monitoring + key handling */\n if (this.matSelect._elementRef) {\n this.focusMonitor\n .monitor(this.matSelect._elementRef as ElementRef<HTMLElement>)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(origin =>\n this.ngZone.run(() => {\n this.keyboardFocused.set(origin === 'keyboard');\n })\n );\n }\n\n this.matSelect._handleKeydown = this.onKeydown.bind(this);\n /* eslint-enable no-underscore-dangle */\n }\n\n clearValue(event: Event): void {\n event?.stopPropagation();\n this.value = '';\n this.optionSelected = null;\n this.matSelect.value = null;\n this.onChange(this.value);\n }\n\n //Save select value\n onChangeOption(event: MatSelectChange) {\n this.value = event.value as string;\n this.errorsLength = this.setErrorsLength();\n this.onTouch();\n this.onChange(this.value);\n }\n\n //Set errors length for validation\n setErrorsLength(): boolean {\n if (this.errors) {\n return this.errors.length > 0 ? true : false;\n }\n return false;\n }\n\n writeValue(value?: string): void {\n if (value) {\n this.value = value ?? '';\n } else {\n this.value = '';\n }\n this.cdr.markForCheck();\n }\n\n registerOnChange(fn: (value: DropdownValue) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.markForCheck();\n }\n\n onClosed(): void {\n this.onTouch();\n this.closed.emit();\n this.isOpen.set(false);\n }\n\n onOpened(): void {\n this.opened.emit();\n this.isOpen.set(true);\n }\n\n setStyleVariable() {\n const active = this.companyColor ? adjustLightness(this.companyColor, 'pressed') : '#FFE6FA';\n const hover = this.companyColor ? adjustLightness(this.companyColor, 'hover') : '#FFF2FC';\n document.body.style.setProperty('--dropdown-color-option-active', active);\n document.body.style.setProperty('--dropdown-color-option-hover', hover);\n }\n\n onKeydown($event: KeyboardEvent) {\n const key = $event.key;\n if (key === (IKeyboardEvent.ARROW_DOWN as string) || key === (IKeyboardEvent.ARROW_UP as string)) {\n this.handleArrowNavigation($event);\n } else if (key === (IKeyboardEvent.SPACE as string) || key === (IKeyboardEvent.ENTER as string)) {\n this.handleSelectionKey();\n } else if (key === (IKeyboardEvent.HOME as string)) {\n // eslint-disable-next-line no-underscore-dangle -- MatSelect's internal _keyManager drives option navigation\n this.matSelect._keyManager.setFirstItemActive();\n } else if (key === (IKeyboardEvent.END as string)) {\n // eslint-disable-next-line no-underscore-dangle -- MatSelect's internal _keyManager drives option navigation\n this.matSelect._keyManager.setLastItemActive();\n }\n }\n\n private handleArrowNavigation($event: KeyboardEvent): void {\n if (!this.matSelect.panelOpen) {\n this.matSelect.open();\n return;\n }\n const selectedItem = this.optionSelected ?? this.matSelect.options.first;\n const index = this.matSelect.options.toArray().indexOf(selectedItem);\n const nextIndex =\n $event.key === (IKeyboardEvent.ARROW_DOWN as string)\n ? index + 1 > this.matSelect.options.length - 1\n ? index\n : index + 1\n : index - 1;\n this.optionSelected = this.matSelect.options.toArray()[nextIndex];\n\n if (this.optionSelected) {\n // eslint-disable-next-line no-underscore-dangle -- MatSelect's internal _keyManager drives option navigation\n this.matSelect._keyManager.setActiveItem(this.optionSelected);\n }\n }\n\n private handleSelectionKey(): void {\n if (!this.isOpen()) {\n this.matSelect.open();\n return;\n }\n if (!this.optionSelected) {\n this.matSelect.value = this.matSelect.options.first.value as string;\n this.onChange(this.matSelect.value as string);\n return;\n }\n const selectedValue = this.optionSelected.value as string;\n if (!this.allowMultipleSelection) {\n this.matSelect.value = selectedValue;\n this.matSelect.close();\n } else if (this.matSelect.value) {\n const currentValue = this.matSelect.value as string[];\n this.matSelect.value = currentValue.includes(selectedValue)\n ? currentValue.filter(value => value !== selectedValue)\n : [...currentValue, selectedValue];\n } else {\n this.matSelect.value = [selectedValue];\n }\n this.onChange(this.matSelect.value as DropdownValue);\n }\n}\n","<ng-container>\n <mat-form-field\n appearance=\"outline\"\n [attr.theme]=\"applicationTheme\"\n [color]=\"errorsLength || (ngControl?.errors && ngControl?.touched) || hasError ? 'warn' : 'accent'\"\n [ngClass]=\"{\n 'hide-bottom-content': !showBottomContent,\n 'without-label': !label,\n 'keyboard-focused': keyboardFocused(),\n 'has-label': !!label,\n }\"\n >\n <mat-label class=\"label-with-icon\">\n @if (isAIVariant || labelIcon) {\n <ui-icon [name]=\"isAIVariant ? 'Sparkle-in-line' : labelIcon!\" [size]=\"'16'\" class=\"label-icon\"></ui-icon>\n }\n {{ label }}\n @if (required) {\n <span>*</span>\n }\n </mat-label>\n <mat-select\n (closed)=\"onClosed()\"\n (opened)=\"onOpened()\"\n #matSelect\n [id]=\"id!\"\n [disableRipple]=\"applicationTheme !== 'classic'\"\n [panelClass]=\"'ui-dropdown-list' + ' ' + applicationTheme + (panelClass ? ' ' + panelClass : '')\"\n [disabled]=\"disabled\"\n [multiple]=\"!!allowMultipleSelection\"\n [placeholder]=\"placeholder\"\n [value]=\"value\"\n (selectionChange)=\"onChangeOption($event)\"\n [attr.name]=\"name\"\n [aria-label]=\"ariaLabel\"\n [attr.data-testid]=\"testId ?? 'ui-dropdown-select'\"\n >\n @if (customSelectedOptionTemplate && valueField) {\n <mat-select-trigger>\n <ng-container\n [ngTemplateOutlet]=\"customSelectedOptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: valueList.find(findValueByValueField) }\"\n ></ng-container>\n </mat-select-trigger>\n }\n\n @if (customOptionTemplate && valueField) {\n @for (item of valueList; track item[valueField]) {\n <mat-option [value]=\"item[valueField]\">\n <ng-container\n [ngTemplateOutlet]=\"customOptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n ></ng-container>\n </mat-option>\n }\n } @else {\n @for (section of valueList; track section) {\n <div class=\"mat-option-section\">\n @if (section.sectionTitle) {\n <span class=\"section-title\">{{ section.sectionTitle }}</span>\n }\n @if (section) {\n <mat-option\n #matOption\n [value]=\"valueField ? section[valueField] : textField && !valueField ? section : section.value\"\n >\n <div class=\"option-content\">\n <span class=\"option-text\">{{\n textField ? section[textField] : (section.displayValue ?? section.value)\n }}</span>\n @if (section.isAISuggested) {\n <ui-icon [name]=\"'Sparkle-in-line'\" [size]=\"'16'\"> </ui-icon>\n }\n </div>\n </mat-option>\n }\n </div>\n }\n }\n </mat-select>\n @if (allowClear && !matSelect.empty) {\n <ui-button\n [ariaLabel]=\"('COMMON.CLEAR' | uiTranslate | async)!\"\n variant=\"secondary\"\n [justIcon]=\"true\"\n class=\"clear\"\n [iconName]=\"applicationTheme === 'classic' ? 'Close' : 'Close-filled'\"\n [label]=\"('COMMON.CLEAR' | uiTranslate | async)!\"\n (click)=\"clearValue($event)\"\n ></ui-button>\n }\n @if (!matSelect.panelOpen) {\n <ui-icon\n class=\"chevron-icon\"\n size=\"24\"\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Arrow_down' : 'Arrow-chevron-down-filled'\"\n ></ui-icon>\n }\n @if (matSelect.panelOpen) {\n <ui-icon\n class=\"chevron-icon\"\n size=\"24\"\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Arrow_up' : 'Arrow-chevron-up-filled'\"\n ></ui-icon>\n }\n @if (errorsLength || ($safeNavigationMigration(ngControl?.errors) | hasValidationError)) {\n <mat-hint class=\"error\">\n @if (errorsLength) {\n @for (error of errors; track error) {\n <div class=\"errors\">\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Error' : 'Error-in-line'\"\n ></ui-icon\n >{{ error }}\n </div>\n }\n }\n @if (ngControl && !hideBuiltInErrors) {\n <ui-validation-error [ngControl]=\"ngControl\" [label]=\"hideLabelInErrors ? null : label\"></ui-validation-error>\n }\n </mat-hint>\n }\n </mat-form-field>\n</ng-container>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { UiTranslatePipe, HasValidationErrorPipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\n\nimport { DropdownComponent } from './dropdown.component';\n\n@NgModule({\n imports: [\n CommonModule,\n MatFormFieldModule,\n MatInputModule,\n IconComponentModule,\n FormsModule,\n ReactiveFormsModule,\n ButtonComponentModule,\n MatSelectModule,\n UiTranslatePipe,\n ValidationErrorModule,\n HasValidationErrorPipe,\n DropdownComponent,\n ],\n exports: [DropdownComponent],\n})\nexport class DropdownComponentModule {}\n"],"mappings":";;;;;;;;;;;;;;;AAwEA,IAAa,oBAAb,MAAa,kBAAiB;CAgM5B,aAAU;EACR,KAAK,WAAW,MAAK;CACvB;CAyBA,cAAA;EA1Ne,KAAA,QAAQ;EAEvB,KAAA,yBAAyB,SAAqB,KAAK,KAAK,gBAAgB,KAAK;EAOpE,KAAA,QAAS;EAgBT,KAAA,cAAc;EAuBd,KAAA,KAAM;EAEN,KAAA,SAAwB;EAExB,KAAA,YAAY;EAyBZ,KAAA,WAAW;EAQX,KAAA,YAA0B,CAAA;EAS1B,KAAA,aAAa;EASb,KAAA,yBAA0B;EAS1B,KAAA,WAAW;EAQX,KAAA,oBAAoB;EAW7B,KAAA,mBAAqC;EAQ5B,KAAA,oBAAoB;EAQpB,KAAA,oBAAoB;EAOpB,KAAA,YAAY;EAOZ,KAAA,aAAa;EAEb,KAAA,WAAW;EASX,KAAA,eAAe;EAOf,KAAA,aAAa;EAEZ,KAAA,SAAS,IAAI,aAAY;EACzB,KAAA,SAAS,IAAI,aAAY;EAgBnC,KAAA,iBAAgD,CAAE;EAKlD,KAAA,gBAAe,CAAE;EAEA,KAAA,kBAAkB,OACjC,sCACA,EACE,UAAU,KACX,CAAA;EAEc,KAAA,MAAM,OAAO,iBAAiB;EACxC,KAAA,YAAY,OAAO,WAAW;GAAE,UAAU;GAAM,MAAM;EAAI,CAAE;EAClD,KAAA,YAAY,OAAO,SAAS;EAC5B,KAAA,eAAe,OAAO,YAAY;EAClC,KAAA,aAAa,OAAO,UAAU;EAC9B,KAAA,SAAS,OAAO,MAAM;EAkBvC,KAAA,iBAAmC;EACnC,KAAA,kBAAkB,OAAgB,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,kB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;GAAuB,SAAA;IAfhC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA;IAEA;GAAiB;EAAA,CAAA;CAAA;;AAIR,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAuB,YAAA,CAAA;EAjBnC,MAAA;EAAS,MAAA,CAAA;GACR,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GACD,SAAS,CAAC,iBAAiB;EAC5B,CAAA"}
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ui-components-dropdown.mjs","names":["MatOption_1"],"sources":["../../../components/dropdown/dropdown.component.ts","../../../components/dropdown/dropdown.component.html","../../../components/dropdown/dropdown.component.module.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { NgClass, NgTemplateOutlet, AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ContentChild,\n DestroyRef,\n DoCheck,\n ElementRef,\n EventEmitter,\n HostBinding,\n HostListener,\n inject,\n Input,\n NgZone,\n OnChanges,\n OnInit,\n Output,\n ProviderToken,\n Renderer2,\n signal,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ViewEncapsulation,\n AfterViewInit,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { MatOption } from '@angular/material/core';\nimport { FloatLabelType, MatFormField, MatLabel, MatHint } from '@angular/material/form-field';\nimport { MatSelect, MatSelectChange, MatSelectTrigger, MatOption as MatOption_1 } from '@angular/material/select';\n\nimport { adjustLightness, ButtonComponent } from '@testgorilla/tgo-ui/components/button';\nimport {\n ApplicationTheme,\n IKeyboardEvent,\n UiTranslatePipe,\n HasValidationErrorPipe,\n} from '@testgorilla/tgo-ui/components/core';\nimport { IconName, IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\n\nimport { OptionType } from './dropdown.model';\n\n/** The dropdown's form value: a single option value, or an array for multi-select. */\ntype DropdownValue = string | string[] | null | undefined;\n\n@Component({\n selector: 'ui-dropdown',\n templateUrl: './dropdown.component.html',\n styleUrls: ['./dropdown.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n MatFormField,\n NgClass,\n MatLabel,\n IconComponentModule,\n MatSelect,\n MatSelectTrigger,\n NgTemplateOutlet,\n MatOption_1,\n ButtonComponent,\n MatHint,\n ValidationErrorModule,\n AsyncPipe,\n UiTranslatePipe,\n HasValidationErrorPipe,\n ],\n})\nexport class DropdownComponent implements OnInit, ControlValueAccessor, DoCheck, OnChanges, AfterViewInit {\n @HostBinding() class = 'ui-dropdown';\n\n findValueByValueField = (item: OptionType) => item[this.valueField] === this.value;\n /**\n * Text content will be applied to the input element if present.\n *\n * @type {string}\n * @memberof DropdownComponent\n */\n @Input() label? = '';\n\n /**\n * Icon to display alongside the label\n *\n * @type {IconName}\n * @memberof DropdownComponent\n */\n @Input() labelIcon?: IconName;\n\n /**\n * Indicates if this field is filled by AI\n *\n * @type {boolean}\n * @memberof DropdownComponent\n */\n @Input() isAIVariant = false;\n\n /**\n * Input name attribute\n *\n * @type {string}\n * @memberof DropdownComponent\n */\n @Input() name: string;\n /**\n * Placeholder to be shown if no value has been selected.\n *\n * @type {string}\n * @memberof DropdownComponent\n */\n @Input() placeholder: string;\n\n /**\n * Unique id of the element.\n *\n * @type {string}\n * @memberof DropdownComponent\n */\n @Input() id? = '';\n\n @Input() testId: string | null = null;\n\n @Input() ariaLabel = '';\n\n /**\n * Input value\n *\n * @type {string}\n * @memberof DropdownComponent\n */\n @Input() value?: string;\n\n /**\n * Whether the component is in an error state.\n *\n * @type {string[]}\n * @memberof DropdownComponent\n */\n @Input() errors?: string[];\n\n /**\n * Whether the component is disabled.\n * Default: false.\n *\n * @type {boolean}\n * @memberof DropdownComponent\n */\n @Input() disabled = false;\n\n /**\n * List of options.\n *\n * @type {OptionType}\n * @memberof DropdownComponent\n */\n @Input() valueList: OptionType[] = [];\n\n /**\n * Whether the user should be allowed to clear the values.\n * Default: true.\n *\n * @type {boolean}\n * @memberof DropdownComponent\n */\n @Input() allowClear = true;\n\n /**\n * This will allow the user to select multiple values at once.\n * Default: true.\n *\n * @type {boolean}\n * @memberof DropdownComponent\n */\n @Input() allowMultipleSelection? = false;\n\n /**\n * Whether the component is required.\n * Default: false.\n *\n * @type {boolean}\n * @memberof DropdownComponent\n */\n @Input() required = false;\n\n /**\n * Show reserved content below form field\n * @property showBottomContent\n * @type {boolean}\n * @memberof DropdownComponent\n */\n @Input() showBottomContent = true;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof DropdownComponent\n */\n @HostBinding('attr.theme')\n @Input()\n applicationTheme: ApplicationTheme = 'light';\n\n /**\n * Hide in build errors for Reactive Forms\n *\n * @type {number}\n * @memberof DropdownComponent\n */\n @Input() hideBuiltInErrors = false;\n\n /**\n * Hide label in errors\n *\n * @type {number}\n * @memberof DropdownComponent\n */\n @Input() hideLabelInErrors = false;\n\n /**\n * @property textField\n * @description The field to be used as the display text in the dropdown.\n * @memberof DropdownComponent\n */\n @Input() textField = '';\n\n /**\n * @property valueField\n * @description The field to be used as the value in the dropdown.\n * @memberof DropdownComponent\n */\n @Input() valueField = '';\n\n @Input() hasError = false;\n\n /**\n * Color of the option hover.\n * Defaults to Test Gorilla primary color.\n *\n * @type {string}\n * @memberof DropdownComponent\n */\n @Input() companyColor = '';\n\n /**\n * Class to be applied to the panel.\n * @type {string}\n * @memberof DropdownComponent\n */\n @Input() panelClass = '';\n\n @Output() closed = new EventEmitter<void>();\n @Output() opened = new EventEmitter<void>();\n\n @ViewChild('matSelect') matSelect: MatSelect;\n\n @ContentChild('customOptionTemplate', { read: TemplateRef }) customOptionTemplate: TemplateRef<unknown> | null;\n @ContentChild('customSelectedOptionTemplate', { read: TemplateRef })\n customSelectedOptionTemplate: TemplateRef<unknown> | null;\n\n @HostListener('keydown.tab')\n onTabPress(): void {\n this.matSelect?.close();\n }\n\n /**\n * @ignore\n */\n onChange: (value: DropdownValue) => void = () => {};\n\n /**\n * @ignore\n */\n onTouch = () => {};\n\n private readonly defaultAppTheme = inject(\n 'CANOPYUI_DEFAULT_APPLICATION_THEME' as unknown as ProviderToken<ApplicationTheme>,\n {\n optional: true,\n }\n );\n private readonly cdr = inject(ChangeDetectorRef);\n public ngControl = inject(NgControl, { optional: true, self: true });\n private readonly renderer2 = inject(Renderer2);\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly destroyRef = inject(DestroyRef);\n private readonly ngZone = inject(NgZone);\n\n constructor() {\n this.errors = [];\n this.valueList = [];\n if (this.defaultAppTheme) {\n this.applicationTheme = this.defaultAppTheme;\n }\n\n if (this.ngControl !== null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n floatLabel: FloatLabelType;\n classError: string;\n errorsLength: boolean;\n showCheck: boolean;\n optionSelected: MatOption | null = null;\n keyboardFocused = signal<boolean>(false);\n isOpen = signal(false);\n\n /**\n * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched or errors\n * to display validation errors that might happen (e.g. required)\n */\n ngDoCheck(): void {\n if (this.ngControl?.touched || this.ngControl?.errors) {\n this.cdr.markForCheck();\n }\n }\n\n ngOnInit(): void {\n this.errorsLength = this.setErrorsLength();\n this.setStyleVariable();\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes['companyColor']) {\n this.setStyleVariable();\n }\n }\n\n ngAfterViewInit(): void {\n /* eslint-disable no-underscore-dangle -- MatSelect internals (_elementRef/_handleKeydown) for focus monitoring + key handling */\n if (this.matSelect._elementRef) {\n this.focusMonitor\n .monitor(this.matSelect._elementRef as ElementRef<HTMLElement>)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(origin =>\n this.ngZone.run(() => {\n this.keyboardFocused.set(origin === 'keyboard');\n })\n );\n }\n\n this.matSelect._handleKeydown = this.onKeydown.bind(this);\n /* eslint-enable no-underscore-dangle */\n }\n\n clearValue(event: Event): void {\n event?.stopPropagation();\n this.value = '';\n this.optionSelected = null;\n this.matSelect.value = null;\n this.onChange(this.value);\n }\n\n //Save select value\n onChangeOption(event: MatSelectChange) {\n this.value = event.value as string;\n this.errorsLength = this.setErrorsLength();\n this.onTouch();\n this.onChange(this.value);\n }\n\n //Set errors length for validation\n setErrorsLength(): boolean {\n if (this.errors) {\n return this.errors.length > 0 ? true : false;\n }\n return false;\n }\n\n writeValue(value?: string): void {\n if (value) {\n this.value = value ?? '';\n } else {\n this.value = '';\n }\n this.cdr.markForCheck();\n }\n\n registerOnChange(fn: (value: DropdownValue) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.markForCheck();\n }\n\n onClosed(): void {\n this.onTouch();\n this.closed.emit();\n this.isOpen.set(false);\n }\n\n onOpened(): void {\n this.opened.emit();\n this.isOpen.set(true);\n }\n\n setStyleVariable() {\n const active = this.companyColor ? adjustLightness(this.companyColor, 'pressed') : '#FFE6FA';\n const hover = this.companyColor ? adjustLightness(this.companyColor, 'hover') : '#FFF2FC';\n document.body.style.setProperty('--dropdown-color-option-active', active);\n document.body.style.setProperty('--dropdown-color-option-hover', hover);\n }\n\n onKeydown($event: KeyboardEvent) {\n const key = $event.key;\n if (key === (IKeyboardEvent.ARROW_DOWN as string) || key === (IKeyboardEvent.ARROW_UP as string)) {\n this.handleArrowNavigation($event);\n } else if (key === (IKeyboardEvent.SPACE as string) || key === (IKeyboardEvent.ENTER as string)) {\n this.handleSelectionKey();\n } else if (key === (IKeyboardEvent.HOME as string)) {\n // eslint-disable-next-line no-underscore-dangle -- MatSelect's internal _keyManager drives option navigation\n this.matSelect._keyManager.setFirstItemActive();\n } else if (key === (IKeyboardEvent.END as string)) {\n // eslint-disable-next-line no-underscore-dangle -- MatSelect's internal _keyManager drives option navigation\n this.matSelect._keyManager.setLastItemActive();\n }\n }\n\n private handleArrowNavigation($event: KeyboardEvent): void {\n if (!this.matSelect.panelOpen) {\n this.matSelect.open();\n return;\n }\n const selectedItem = this.optionSelected ?? this.matSelect.options.first;\n const index = this.matSelect.options.toArray().indexOf(selectedItem);\n const nextIndex =\n $event.key === (IKeyboardEvent.ARROW_DOWN as string)\n ? index + 1 > this.matSelect.options.length - 1\n ? index\n : index + 1\n : index - 1;\n this.optionSelected = this.matSelect.options.toArray()[nextIndex];\n\n if (this.optionSelected) {\n // eslint-disable-next-line no-underscore-dangle -- MatSelect's internal _keyManager drives option navigation\n this.matSelect._keyManager.setActiveItem(this.optionSelected);\n }\n }\n\n private handleSelectionKey(): void {\n if (!this.isOpen()) {\n this.matSelect.open();\n return;\n }\n if (!this.optionSelected) {\n this.matSelect.value = this.matSelect.options.first.value as string;\n this.onChange(this.matSelect.value as string);\n return;\n }\n const selectedValue = this.optionSelected.value as string;\n if (!this.allowMultipleSelection) {\n this.matSelect.value = selectedValue;\n this.matSelect.close();\n } else if (this.matSelect.value) {\n const currentValue = this.matSelect.value as string[];\n this.matSelect.value = currentValue.includes(selectedValue)\n ? currentValue.filter(value => value !== selectedValue)\n : [...currentValue, selectedValue];\n } else {\n this.matSelect.value = [selectedValue];\n }\n this.onChange(this.matSelect.value as DropdownValue);\n }\n}\n","<ng-container>\n <mat-form-field\n appearance=\"outline\"\n [attr.theme]=\"applicationTheme\"\n [color]=\"errorsLength || (ngControl?.errors && ngControl?.touched) || hasError ? 'warn' : 'accent'\"\n [ngClass]=\"{\n 'hide-bottom-content': !showBottomContent,\n 'without-label': !label,\n 'keyboard-focused': keyboardFocused(),\n 'has-label': !!label,\n }\"\n >\n <mat-label class=\"label-with-icon\">\n @if (isAIVariant || labelIcon) {\n <ui-icon [name]=\"isAIVariant ? 'Sparkle-in-line' : labelIcon!\" [size]=\"'16'\" class=\"label-icon\"></ui-icon>\n }\n {{ label }}\n @if (required) {\n <span>*</span>\n }\n </mat-label>\n <mat-select\n (closed)=\"onClosed()\"\n (opened)=\"onOpened()\"\n #matSelect\n [id]=\"id!\"\n [disableRipple]=\"applicationTheme !== 'classic'\"\n [panelClass]=\"'ui-dropdown-list' + ' ' + applicationTheme + (panelClass ? ' ' + panelClass : '')\"\n [disabled]=\"disabled\"\n [multiple]=\"!!allowMultipleSelection\"\n [placeholder]=\"placeholder\"\n [value]=\"value\"\n (selectionChange)=\"onChangeOption($event)\"\n [attr.name]=\"name\"\n [aria-label]=\"ariaLabel\"\n [attr.data-testid]=\"testId ?? 'ui-dropdown-select'\"\n >\n @if (customSelectedOptionTemplate && valueField) {\n <mat-select-trigger>\n <ng-container\n [ngTemplateOutlet]=\"customSelectedOptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: valueList.find(findValueByValueField) }\"\n ></ng-container>\n </mat-select-trigger>\n }\n\n @if (customOptionTemplate && valueField) {\n @for (item of valueList; track item[valueField]) {\n <mat-option [value]=\"item[valueField]\">\n <ng-container\n [ngTemplateOutlet]=\"customOptionTemplate\"\n [ngTemplateOutletContext]=\"{ $implicit: item }\"\n ></ng-container>\n </mat-option>\n }\n } @else {\n @for (section of valueList; track section) {\n <div class=\"mat-option-section\">\n @if (section.sectionTitle) {\n <span class=\"section-title\">{{ section.sectionTitle }}</span>\n }\n @if (section) {\n <mat-option\n #matOption\n [value]=\"valueField ? section[valueField] : textField && !valueField ? section : section.value\"\n >\n <div class=\"option-content\">\n <span class=\"option-text\">{{\n textField ? section[textField] : (section.displayValue ?? section.value)\n }}</span>\n @if (section.isAISuggested) {\n <ui-icon [name]=\"'Sparkle-in-line'\" [size]=\"'16'\"> </ui-icon>\n }\n </div>\n </mat-option>\n }\n </div>\n }\n }\n </mat-select>\n @if (allowClear && !matSelect.empty) {\n <ui-button\n [ariaLabel]=\"('COMMON.CLEAR' | uiTranslate | async)!\"\n variant=\"secondary\"\n [justIcon]=\"true\"\n class=\"clear\"\n [iconName]=\"applicationTheme === 'classic' ? 'Close' : 'Close-filled'\"\n [label]=\"('COMMON.CLEAR' | uiTranslate | async)!\"\n (click)=\"clearValue($event)\"\n ></ui-button>\n }\n @if (!matSelect.panelOpen) {\n <ui-icon\n class=\"chevron-icon\"\n size=\"24\"\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Arrow_down' : 'Arrow-chevron-down-filled'\"\n ></ui-icon>\n }\n @if (matSelect.panelOpen) {\n <ui-icon\n class=\"chevron-icon\"\n size=\"24\"\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Arrow_up' : 'Arrow-chevron-up-filled'\"\n ></ui-icon>\n }\n @if (errorsLength || ($safeNavigationMigration(ngControl?.errors) | hasValidationError)) {\n <mat-hint class=\"error\">\n @if (errorsLength) {\n @for (error of errors; track error) {\n <div class=\"errors\">\n <ui-icon\n [applicationTheme]=\"applicationTheme\"\n [name]=\"applicationTheme === 'classic' ? 'Error' : 'Error-in-line'\"\n ></ui-icon\n >{{ error }}\n </div>\n }\n }\n @if (ngControl && !hideBuiltInErrors) {\n <ui-validation-error [ngControl]=\"ngControl\" [label]=\"hideLabelInErrors ? null : label\"></ui-validation-error>\n }\n </mat-hint>\n }\n </mat-form-field>\n</ng-container>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatInputModule } from '@angular/material/input';\nimport { MatSelectModule } from '@angular/material/select';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { UiTranslatePipe, HasValidationErrorPipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\n\nimport { DropdownComponent } from './dropdown.component';\n\n@NgModule({\n imports: [\n CommonModule,\n MatFormFieldModule,\n MatInputModule,\n IconComponentModule,\n FormsModule,\n ReactiveFormsModule,\n ButtonComponentModule,\n MatSelectModule,\n UiTranslatePipe,\n ValidationErrorModule,\n HasValidationErrorPipe,\n DropdownComponent,\n ],\n exports: [DropdownComponent],\n})\nexport class DropdownComponentModule {}\n"],"mappings":";;;;;;;;;;;;;;;AAwEA,IAAa,oBAAb,MAAa,kBAAiB;CAgM5B,aAAU;EACR,KAAK,WAAW,MAAK;CACvB;CAyBA,cAAA;EA1Ne,KAAA,QAAQ;EAEvB,KAAA,yBAAyB,SAAqB,KAAK,KAAK,gBAAgB,KAAK;EAOpE,KAAA,QAAS;EAgBT,KAAA,cAAc;EAuBd,KAAA,KAAM;EAEN,KAAA,SAAwB;EAExB,KAAA,YAAY;EAyBZ,KAAA,WAAW;EAQX,KAAA,YAA0B,CAAA;EAS1B,KAAA,aAAa;EASb,KAAA,yBAA0B;EAS1B,KAAA,WAAW;EAQX,KAAA,oBAAoB;EAW7B,KAAA,mBAAqC;EAQ5B,KAAA,oBAAoB;EAQpB,KAAA,oBAAoB;EAOpB,KAAA,YAAY;EAOZ,KAAA,aAAa;EAEb,KAAA,WAAW;EASX,KAAA,eAAe;EAOf,KAAA,aAAa;EAEZ,KAAA,SAAS,IAAI,aAAY;EACzB,KAAA,SAAS,IAAI,aAAY;EAgBnC,KAAA,iBAAgD,CAAE;EAKlD,KAAA,gBAAe,CAAE;EAEA,KAAA,kBAAkB,OACjC,sCACA,EACE,UAAU,KACX,CAAA;EAEc,KAAA,MAAM,OAAO,iBAAiB;EACxC,KAAA,YAAY,OAAO,WAAW;GAAE,UAAU;GAAM,MAAM;EAAI,CAAE;EAClD,KAAA,YAAY,OAAO,SAAS;EAC5B,KAAA,eAAe,OAAO,YAAY;EAClC,KAAA,aAAa,OAAO,UAAU;EAC9B,KAAA,SAAS,OAAO,MAAM;EAkBvC,KAAA,iBAAmC;EACnC,KAAA,kBAAkB,OAAgB,OAAM,GAAA,YAAA,CAA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GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAuB,SAAA;IAfhC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA;IAEA;GAAiB;EAAA,CAAA;CAAA;;AAIR,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAuB,YAAA,CAAA;EAjBnC,MAAA;EAAS,MAAA,CAAA;GACR,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GACD,SAAS,CAAC,iBAAiB;EAC5B,CAAA"}
|
|
@@ -171,12 +171,15 @@ var EmptyStateComponent = class EmptyStateComponent {
|
|
|
171
171
|
"ariaExpanded",
|
|
172
172
|
"ariaControls",
|
|
173
173
|
"ariaPressed",
|
|
174
|
+
"ariaHasPopup",
|
|
174
175
|
"ariaRequired",
|
|
175
176
|
"ariaLabelledby",
|
|
176
177
|
"ariaDescribedby",
|
|
177
178
|
"preventDefault",
|
|
178
179
|
"hasBackground",
|
|
179
180
|
"circular",
|
|
181
|
+
"isSingleLineLabel",
|
|
182
|
+
"iconButtonShape",
|
|
180
183
|
"tooltipPosition",
|
|
181
184
|
"role",
|
|
182
185
|
"iconFilled",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testgorilla-tgo-ui-components-empty-state.mjs","names":[],"sources":["../../../components/empty-state/empty-state.component.ts","../../../components/empty-state/empty-state.component.html","../../../components/empty-state/empty-state.component.module.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Inject,\n Input,\n Optional,\n Output,\n OnInit,\n} from '@angular/core';\n\nimport { ButtonColor, ButtonIconPosition, ButtonSize, ButtonComponent } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconName, IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\nimport { ButtonVariant, EmptyStateVariant, IllustrationVariant } from './empty-state.model';\n\n@Component({\n selector: 'ui-empty-state',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './empty-state.component.html',\n styleUrls: ['./empty-state.component.scss'],\n imports: [IconComponentModule, ButtonComponent, AsyncPipe, UiTranslatePipe],\n})\nexport class EmptyStateComponent implements OnInit {\n /**\n * @description If the default image should be displayed.\n * @type {boolean}\n * @memberof EmptyStateComponent\n */\n @Input() showIllustration = false;\n /**\n * @description If the default image should be displayed.\n * @type {IllustrationVariant}\n * @memberof EmptyStateComponent\n */\n @Input() illustrationVariant: IllustrationVariant = 'Empty-search';\n /**\n * @description The icon to be displayed in the empty state.\n * @type {IconName}\n * @memberof EmptyStateComponent\n */\n @Input() icon: IconName = '';\n\n /**\n * @description The empty state variant.\n * @type {EmptyStateVariant}\n * @memberof EmptyStateComponent\n */\n @Input() emptyStateVariant: EmptyStateVariant = 'desktop';\n\n /**\n * @description The title of the empty state.\n * @type {string}\n * @memberof EmptyStateComponent\n */\n @Input() title = '';\n\n /**\n * @description The body text or description of the empty state.\n * @type {string}\n * @memberof EmptyStateComponent\n */\n @Input() bodyText = '';\n\n /**\n * @description Displays primary button if passed.\n * @type {string}\n * @memberof EmptyStateComponent\n */\n @Input() primaryButtonText = '';\n\n /**\n * Primary button variant - only for new theme.\n * @type {ButtonVariant}\n * @memberof EmptyStateComponent\n */\n @Input() primaryButtonVariant: ButtonVariant = 'pink';\n\n /**\n * General button variation - only for new theme.\n * @type {ButtonColor}\n * @memberof EmptyStateComponent\n */\n @Input() generalButtonVariation: ButtonColor = 'primary';\n\n /**\n * @description Name of ui-icon for primary button\n * @type {IconName}\n * @memberof EmptyStateComponent\n */\n @Input() primaryButtonIconName: IconName = '';\n\n /**\n * @description Position of ui-icon for primary button\n * @type {ButtonIconPosition}\n * @memberof EmptyStateComponent\n */\n @Input() primaryButtonIconPosition: ButtonIconPosition = 'left';\n\n /**\n * @description Displays secondary button if passed.\n * @type {string}\n * @memberof EmptyStateComponent\n */\n @Input() secondaryButtonText = '';\n\n /**\n * Secondary button variant - only for new theme.\n * @type {ButtonVariant}\n * @memberof EmptyStateComponent\n */\n @Input() secondaryButtonVariant: ButtonVariant = 'black';\n\n /**\n * @description Name of ui-icon for secondary button\n * @type {IconName}\n * @memberof EmptyStateComponent\n */\n @Input() secondaryButtonIconName: IconName = '';\n\n /**\n * @description Position of ui-icon for secondary button\n * @type {ButtonIconPosition}\n * @memberof EmptyStateComponent\n */\n @Input() secondaryButtonIconPosition: ButtonIconPosition = 'left';\n\n /**\n * @description Displays tertiary button if passed.\n * @type {string}\n * @memberof EmptyStateComponent\n */\n @Input() tertiaryButtonText = '';\n\n /**\n * Tertiary button variant - only for new theme.\n * @type {ButtonVariant}\n * @memberof EmptyStateComponent\n */\n @Input() tertiaryButtonVariant: ButtonVariant = 'ghost';\n\n /**\n * @description Name of ui-icon for tertiary button\n * @type {IconName}\n * @memberof EmptyStateComponent\n */\n @Input() tertiaryButtonIconName: IconName = '';\n\n /**\n * @description Position of ui-icon for tertiary button\n * @type {ButtonIconPosition}\n * @memberof EmptyStateComponent\n */\n @Input() tertiaryButtonIconPosition: ButtonIconPosition = 'left';\n\n /**\n * @description Displays general variation button if passed.\n * @type {string}\n * @memberof EmptyStateComponent\n */\n @Input() generalVariationButtonText = '';\n\n /**\n * @description Displays general variation button if passed.\n * @type {string}\n * @memberof EmptyStateComponent\n */\n @Input() generalVariationButtonSize: ButtonSize = 'big';\n\n /**\n * @description Name of ui-icon for general variation button\n * @type {IconName}\n * @memberof EmptyStateComponent\n */\n @Input() generalVariationButtonIconName: IconName = '';\n\n /**\n * @description Position of ui-icon for general variation button\n * @type {ButtonIconPosition}\n * @memberof EmptyStateComponent\n */\n @Input() generalVariationButtonIconPosition: ButtonIconPosition = 'left';\n\n /**\n * @description Disabled state for general variation button\n * @type {boolean}\n * @memberof EmptyStateComponent\n */\n @Input() generalVariationButtonDisabled = false;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof EmptyStateComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * Event triggered when the primary button is clicked.\n * @type {Event}\n * @event\n * @memberof TagComponent\n */\n @Output() primaryButtonClick = new EventEmitter<Event>();\n\n /**\n * Event triggered when the secondary button is clicked.\n * @type {Event}\n * @event\n * @memberof TagComponent\n */\n @Output() secondaryButtonClick = new EventEmitter<Event>();\n\n /**\n * Event triggered when the tertiary button is clicked.\n * @type {Event}\n * @event\n * @memberof TagComponent\n */\n @Output() tertiaryButtonClick = new EventEmitter<Event>();\n\n /**\n * Event triggered when the general variation button is clicked.\n * @type {Event}\n * @event\n * @memberof TagComponent\n */\n @Output() generalVariationButtonClick = new EventEmitter<Event>();\n\n buttonApplicationTheme: ApplicationTheme;\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() {\n if (this.applicationTheme !== 'classic') {\n this.buttonApplicationTheme = this.applicationTheme;\n }\n }\n\n onPrimaryButtonClick(event: Event): void {\n this.primaryButtonClick.emit(event);\n }\n\n onSecondaryButtonClick(event: Event): void {\n this.secondaryButtonClick.emit(event);\n }\n\n onTertiaryButtonClick(event: Event): void {\n this.tertiaryButtonClick.emit(event);\n }\n\n onGeneralVariationButtonClick(event: Event): void {\n this.generalVariationButtonClick.emit(event);\n }\n\n getVariant(variant: ButtonVariant) {\n if (variant === 'pink') {\n return 'primary';\n } else if (variant === 'black') {\n this.buttonApplicationTheme = 'light';\n return 'secondary';\n } else {\n this.buttonApplicationTheme = 'light';\n return 'ghost';\n }\n }\n}\n","<ng-container>\n <div class=\"empty-state-container\" [attr.theme]=\"applicationTheme\" [class.mobile]=\"emptyStateVariant === 'mobile'\">\n @if (showIllustration) {\n <div class=\"illustration\" [attr.aria-hidden]=\"true\">\n @if (applicationTheme === 'classic') {\n <img [attr.src]=\"'/images/empty-state-default.svg'\" [width]=\"160\" [height]=\"160\" alt=\"illustration\" />\n }\n @if (applicationTheme !== 'classic') {\n <img\n [attr.src]=\"'/icons/rebrand/' + illustrationVariant + '-in-line.svg'\"\n [width]=\"160\"\n [height]=\"160\"\n alt=\"illustration\"\n />\n }\n </div>\n }\n\n @if (icon) {\n <div class=\"icon\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"icon\" size=\"40\"></ui-icon>\n </div>\n }\n\n <div class=\"text-content\">\n <div class=\"title\">{{ title ? title : ('COMMON.NO_RESULTS' | uiTranslate | async) }}</div>\n @if (bodyText) {\n <div class=\"body-text\" [innerHTML]=\"bodyText\"></div>\n }\n </div>\n\n <div class=\"actions\">\n @if (primaryButtonText) {\n <ui-button\n [fullWidth]=\"emptyStateVariant === 'mobile'\"\n [applicationTheme]=\"buttonApplicationTheme\"\n class=\"action-button\"\n [variant]=\"applicationTheme !== 'classic' ? getVariant(primaryButtonVariant) : 'primary'\"\n [label]=\"primaryButtonText\"\n [iconName]=\"primaryButtonIconName\"\n [iconPosition]=\"primaryButtonIconPosition\"\n (buttonClickEvent)=\"onPrimaryButtonClick($event)\"\n ></ui-button>\n }\n @if (secondaryButtonText) {\n <ui-button\n [fullWidth]=\"emptyStateVariant === 'mobile'\"\n [applicationTheme]=\"buttonApplicationTheme\"\n class=\"action-button\"\n [variant]=\"applicationTheme !== 'classic' ? getVariant(secondaryButtonVariant) : 'secondary'\"\n [label]=\"secondaryButtonText\"\n [iconName]=\"secondaryButtonIconName\"\n [iconPosition]=\"secondaryButtonIconPosition\"\n (buttonClickEvent)=\"onSecondaryButtonClick($event)\"\n ></ui-button>\n }\n @if (tertiaryButtonText) {\n <ui-button\n [fullWidth]=\"emptyStateVariant === 'mobile'\"\n [applicationTheme]=\"buttonApplicationTheme\"\n class=\"action-button\"\n [variant]=\"applicationTheme !== 'classic' ? getVariant(tertiaryButtonVariant) : 'tertiary'\"\n [label]=\"tertiaryButtonText\"\n [iconName]=\"tertiaryButtonIconName\"\n [iconPosition]=\"tertiaryButtonIconPosition\"\n (buttonClickEvent)=\"onTertiaryButtonClick($event)\"\n ></ui-button>\n }\n @if (generalVariationButtonText) {\n <ui-button\n class=\"action-button\"\n [fullWidth]=\"emptyStateVariant === 'mobile'\"\n [applicationTheme]=\"buttonApplicationTheme\"\n [variant]=\"generalButtonVariation\"\n [label]=\"generalVariationButtonText\"\n [iconName]=\"generalVariationButtonIconName\"\n [iconPosition]=\"generalVariationButtonIconPosition\"\n [disabled]=\"generalVariationButtonDisabled\"\n [size]=\"generalVariationButtonSize\"\n (buttonClickEvent)=\"onGeneralVariationButtonClick($event)\"\n ></ui-button>\n }\n </div>\n </div>\n</ng-container>\n","import { CommonModule, NgOptimizedImage } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\nimport { EmptyStateComponent } from './empty-state.component';\n\n@NgModule({\n imports: [\n CommonModule,\n IconComponentModule,\n NgOptimizedImage,\n ButtonComponentModule,\n UiTranslatePipe,\n EmptyStateComponent,\n ],\n exports: [EmptyStateComponent],\n})\nexport class EmptyStateComponentModule {}\n"],"mappings":";;;;;;;AAyBA,IAAa,sBAAb,MAAa,oBAAmB;CAkN9B,YAC6E,iBAAiC;EAAjC,KAAA,kBAAA;EA7MpE,KAAA,mBAAmB;EAMnB,KAAA,sBAA2C;EAM3C,KAAA,OAAiB;EAOjB,KAAA,oBAAuC;EAOvC,KAAA,QAAQ;EAOR,KAAA,WAAW;EAOX,KAAA,oBAAoB;EAOpB,KAAA,uBAAsC;EAOtC,KAAA,yBAAsC;EAOtC,KAAA,wBAAkC;EAOlC,KAAA,4BAAgD;EAOhD,KAAA,sBAAsB;EAOtB,KAAA,yBAAwC;EAOxC,KAAA,0BAAoC;EAOpC,KAAA,8BAAkD;EAO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MAAA;EAAS,MAAA,CAAA;GACR,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;GACD;GACD,SAAS,CAAC,mBAAmB;EAC9B,CAAA"}
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ui-components-empty-state.mjs","names":[],"sources":["../../../components/empty-state/empty-state.component.ts","../../../components/empty-state/empty-state.component.html","../../../components/empty-state/empty-state.component.module.ts"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n Inject,\n Input,\n Optional,\n Output,\n OnInit,\n} from '@angular/core';\n\nimport { ButtonColor, ButtonIconPosition, ButtonSize, ButtonComponent } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconName, IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\nimport { ButtonVariant, EmptyStateVariant, IllustrationVariant } from './empty-state.model';\n\n@Component({\n selector: 'ui-empty-state',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './empty-state.component.html',\n styleUrls: ['./empty-state.component.scss'],\n imports: [IconComponentModule, ButtonComponent, AsyncPipe, UiTranslatePipe],\n})\nexport class EmptyStateComponent implements OnInit {\n /**\n * @description If the default image should be displayed.\n * @type {boolean}\n * @memberof EmptyStateComponent\n */\n @Input() showIllustration = false;\n /**\n * @description If the default image should be displayed.\n * @type {IllustrationVariant}\n * @memberof EmptyStateComponent\n */\n @Input() illustrationVariant: IllustrationVariant = 'Empty-search';\n /**\n * @description The icon to be displayed in the empty state.\n * @type {IconName}\n * @memberof EmptyStateComponent\n */\n @Input() icon: IconName = '';\n\n /**\n * @description The empty state variant.\n * @type {EmptyStateVariant}\n * @memberof EmptyStateComponent\n */\n @Input() emptyStateVariant: EmptyStateVariant = 'desktop';\n\n /**\n * @description The title of the empty state.\n * @type {string}\n * @memberof EmptyStateComponent\n */\n @Input() title = '';\n\n /**\n * @description The body text or description of the empty state.\n * @type {string}\n * @memberof EmptyStateComponent\n */\n @Input() bodyText = '';\n\n /**\n * @description Displays primary button if passed.\n * @type {string}\n * @memberof EmptyStateComponent\n */\n @Input() primaryButtonText = '';\n\n /**\n * Primary button variant - only for new theme.\n * @type {ButtonVariant}\n * @memberof EmptyStateComponent\n */\n @Input() primaryButtonVariant: ButtonVariant = 'pink';\n\n /**\n * General button variation - only for new theme.\n * @type {ButtonColor}\n * @memberof EmptyStateComponent\n */\n @Input() generalButtonVariation: ButtonColor = 'primary';\n\n /**\n * @description Name of ui-icon for primary button\n * @type {IconName}\n * @memberof EmptyStateComponent\n */\n @Input() primaryButtonIconName: IconName = '';\n\n /**\n * @description Position of ui-icon for primary button\n * @type {ButtonIconPosition}\n * @memberof EmptyStateComponent\n */\n @Input() primaryButtonIconPosition: ButtonIconPosition = 'left';\n\n /**\n * @description Displays secondary button if passed.\n * @type {string}\n * @memberof EmptyStateComponent\n */\n @Input() secondaryButtonText = '';\n\n /**\n * Secondary button variant - only for new theme.\n * @type {ButtonVariant}\n * @memberof EmptyStateComponent\n */\n @Input() secondaryButtonVariant: ButtonVariant = 'black';\n\n /**\n * @description Name of ui-icon for secondary button\n * @type {IconName}\n * @memberof EmptyStateComponent\n */\n @Input() secondaryButtonIconName: IconName = '';\n\n /**\n * @description Position of ui-icon for secondary button\n * @type {ButtonIconPosition}\n * @memberof EmptyStateComponent\n */\n @Input() secondaryButtonIconPosition: ButtonIconPosition = 'left';\n\n /**\n * @description Displays tertiary button if passed.\n * @type {string}\n * @memberof EmptyStateComponent\n */\n @Input() tertiaryButtonText = '';\n\n /**\n * Tertiary button variant - only for new theme.\n * @type {ButtonVariant}\n * @memberof EmptyStateComponent\n */\n @Input() tertiaryButtonVariant: ButtonVariant = 'ghost';\n\n /**\n * @description Name of ui-icon for tertiary button\n * @type {IconName}\n * @memberof EmptyStateComponent\n */\n @Input() tertiaryButtonIconName: IconName = '';\n\n /**\n * @description Position of ui-icon for tertiary button\n * @type {ButtonIconPosition}\n * @memberof EmptyStateComponent\n */\n @Input() tertiaryButtonIconPosition: ButtonIconPosition = 'left';\n\n /**\n * @description Displays general variation button if passed.\n * @type {string}\n * @memberof EmptyStateComponent\n */\n @Input() generalVariationButtonText = '';\n\n /**\n * @description Displays general variation button if passed.\n * @type {string}\n * @memberof EmptyStateComponent\n */\n @Input() generalVariationButtonSize: ButtonSize = 'big';\n\n /**\n * @description Name of ui-icon for general variation button\n * @type {IconName}\n * @memberof EmptyStateComponent\n */\n @Input() generalVariationButtonIconName: IconName = '';\n\n /**\n * @description Position of ui-icon for general variation button\n * @type {ButtonIconPosition}\n * @memberof EmptyStateComponent\n */\n @Input() generalVariationButtonIconPosition: ButtonIconPosition = 'left';\n\n /**\n * @description Disabled state for general variation button\n * @type {boolean}\n * @memberof EmptyStateComponent\n */\n @Input() generalVariationButtonDisabled = false;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof EmptyStateComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * Event triggered when the primary button is clicked.\n * @type {Event}\n * @event\n * @memberof TagComponent\n */\n @Output() primaryButtonClick = new EventEmitter<Event>();\n\n /**\n * Event triggered when the secondary button is clicked.\n * @type {Event}\n * @event\n * @memberof TagComponent\n */\n @Output() secondaryButtonClick = new EventEmitter<Event>();\n\n /**\n * Event triggered when the tertiary button is clicked.\n * @type {Event}\n * @event\n * @memberof TagComponent\n */\n @Output() tertiaryButtonClick = new EventEmitter<Event>();\n\n /**\n * Event triggered when the general variation button is clicked.\n * @type {Event}\n * @event\n * @memberof TagComponent\n */\n @Output() generalVariationButtonClick = new EventEmitter<Event>();\n\n buttonApplicationTheme: ApplicationTheme;\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() {\n if (this.applicationTheme !== 'classic') {\n this.buttonApplicationTheme = this.applicationTheme;\n }\n }\n\n onPrimaryButtonClick(event: Event): void {\n this.primaryButtonClick.emit(event);\n }\n\n onSecondaryButtonClick(event: Event): void {\n this.secondaryButtonClick.emit(event);\n }\n\n onTertiaryButtonClick(event: Event): void {\n this.tertiaryButtonClick.emit(event);\n }\n\n onGeneralVariationButtonClick(event: Event): void {\n this.generalVariationButtonClick.emit(event);\n }\n\n getVariant(variant: ButtonVariant) {\n if (variant === 'pink') {\n return 'primary';\n } else if (variant === 'black') {\n this.buttonApplicationTheme = 'light';\n return 'secondary';\n } else {\n this.buttonApplicationTheme = 'light';\n return 'ghost';\n }\n }\n}\n","<ng-container>\n <div class=\"empty-state-container\" [attr.theme]=\"applicationTheme\" [class.mobile]=\"emptyStateVariant === 'mobile'\">\n @if (showIllustration) {\n <div class=\"illustration\" [attr.aria-hidden]=\"true\">\n @if (applicationTheme === 'classic') {\n <img [attr.src]=\"'/images/empty-state-default.svg'\" [width]=\"160\" [height]=\"160\" alt=\"illustration\" />\n }\n @if (applicationTheme !== 'classic') {\n <img\n [attr.src]=\"'/icons/rebrand/' + illustrationVariant + '-in-line.svg'\"\n [width]=\"160\"\n [height]=\"160\"\n alt=\"illustration\"\n />\n }\n </div>\n }\n\n @if (icon) {\n <div class=\"icon\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"icon\" size=\"40\"></ui-icon>\n </div>\n }\n\n <div class=\"text-content\">\n <div class=\"title\">{{ title ? title : ('COMMON.NO_RESULTS' | uiTranslate | async) }}</div>\n @if (bodyText) {\n <div class=\"body-text\" [innerHTML]=\"bodyText\"></div>\n }\n </div>\n\n <div class=\"actions\">\n @if (primaryButtonText) {\n <ui-button\n [fullWidth]=\"emptyStateVariant === 'mobile'\"\n [applicationTheme]=\"buttonApplicationTheme\"\n class=\"action-button\"\n [variant]=\"applicationTheme !== 'classic' ? getVariant(primaryButtonVariant) : 'primary'\"\n [label]=\"primaryButtonText\"\n [iconName]=\"primaryButtonIconName\"\n [iconPosition]=\"primaryButtonIconPosition\"\n (buttonClickEvent)=\"onPrimaryButtonClick($event)\"\n ></ui-button>\n }\n @if (secondaryButtonText) {\n <ui-button\n [fullWidth]=\"emptyStateVariant === 'mobile'\"\n [applicationTheme]=\"buttonApplicationTheme\"\n class=\"action-button\"\n [variant]=\"applicationTheme !== 'classic' ? getVariant(secondaryButtonVariant) : 'secondary'\"\n [label]=\"secondaryButtonText\"\n [iconName]=\"secondaryButtonIconName\"\n [iconPosition]=\"secondaryButtonIconPosition\"\n (buttonClickEvent)=\"onSecondaryButtonClick($event)\"\n ></ui-button>\n }\n @if (tertiaryButtonText) {\n <ui-button\n [fullWidth]=\"emptyStateVariant === 'mobile'\"\n [applicationTheme]=\"buttonApplicationTheme\"\n class=\"action-button\"\n [variant]=\"applicationTheme !== 'classic' ? getVariant(tertiaryButtonVariant) : 'tertiary'\"\n [label]=\"tertiaryButtonText\"\n [iconName]=\"tertiaryButtonIconName\"\n [iconPosition]=\"tertiaryButtonIconPosition\"\n (buttonClickEvent)=\"onTertiaryButtonClick($event)\"\n ></ui-button>\n }\n @if (generalVariationButtonText) {\n <ui-button\n class=\"action-button\"\n [fullWidth]=\"emptyStateVariant === 'mobile'\"\n [applicationTheme]=\"buttonApplicationTheme\"\n [variant]=\"generalButtonVariation\"\n [label]=\"generalVariationButtonText\"\n [iconName]=\"generalVariationButtonIconName\"\n [iconPosition]=\"generalVariationButtonIconPosition\"\n [disabled]=\"generalVariationButtonDisabled\"\n [size]=\"generalVariationButtonSize\"\n (buttonClickEvent)=\"onGeneralVariationButtonClick($event)\"\n ></ui-button>\n }\n </div>\n </div>\n</ng-container>\n","import { CommonModule, NgOptimizedImage } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\nimport { EmptyStateComponent } from './empty-state.component';\n\n@NgModule({\n imports: [\n CommonModule,\n IconComponentModule,\n NgOptimizedImage,\n ButtonComponentModule,\n UiTranslatePipe,\n EmptyStateComponent,\n ],\n exports: [EmptyStateComponent],\n})\nexport class EmptyStateComponentModule {}\n"],"mappings":";;;;;;;AAyBA,IAAa,sBAAb,MAAa,oBAAmB;CAkN9B,YAC6E,iBAAiC;EAAjC,KAAA,kBAAA;EA7MpE,KAAA,mBAAmB;EAMnB,KAAA,sBAA2C;EAM3C,KAAA,OAAiB;EAOjB,KAAA,oBAAuC;EAOvC,KAAA,QAAQ;EAOR,KAAA,WAAW;EAOX,KAAA,oBAAoB;EAOpB,KAAA,uBAAsC;EAOtC,KAAA,yBAAsC;EAOtC,KAAA,wBAAkC;EAOlC,KAAA,4BAAgD;EAOhD,KAAA,sBAAsB;EAOtB,KAAA,yBAAwC;EAOxC,KAAA,0BAAoC;EAOpC,KAAA,8BAAkD;EAOlD,KAAA,qBAAqB;EAOrB,KAAA,wBAAuC;EAOvC,KAAA,yBAAmC;EAOnC,KAAA,6BAAiD;EAOjD,KAAA,6BAA6B;EAO7B,KAAA,6BAAyC;EAOzC,KAAA,iCAA2C;EAO3C,KAAA,qCAAyD;EAOzD,KAAA,iCAAiC;EASjC,KAAA,mBAAqC;EAQpC,KAAA,qBAAqB,IAAI,aAAY;EAQrC,KAAA,uBAAuB,IAAI,aAAY;EAQvC,KAAA,sBAAsB,IAAI,aAAY;EAQtC,KAAA,8BAA8B,IAAI,aAAY;EAOtD,IAAI,iBACF,KAAK,mBAAmB;CAE5B;CAEA,WAAQ;EACN,IAAI,KAAK,qBAAqB,WAC5B,KAAK,yBAAyB,KAAK;CAEvC;CAEA,qBAAqB,OAAY;EAC/B,KAAK,mBAAmB,KAAK,KAAK;CACpC;CAEA,uBAAuB,OAAY;EACjC,KAAK,qBAAqB,KAAK,KAAK;CACtC;CAEA,sBAAsB,OAAY;EAChC,KAAK,oBAAoB,KAAK,KAAK;CACrC;CAEA,8BAA8B,OAAY;EACxC,KAAK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BAAyB;CAAzB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAyB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAzB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAyB,SAAA;IATlC;IACA;IACA;IACA;IACA;IACA;GAAmB;GAAA,SAAA,CAEX,mBAAmB;EAAA,CAAA;CAAA;CAElB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAyB,SAAA;IATlC;IACA;IAEA;IAEA;GAAmB;EAAA,CAAA;CAAA;;AAIV,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAyB,YAAA,CAAA;EAXrC,MAAA;EAAS,MAAA,CAAA;GACR,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;GACD;GACD,SAAS,CAAC,mBAAmB;EAC9B,CAAA"}
|
|
@@ -264,7 +264,7 @@ var FieldComponent = class FieldComponent {
|
|
|
264
264
|
publicName: "value",
|
|
265
265
|
isSignal: false,
|
|
266
266
|
isRequired: false,
|
|
267
|
-
transformFunction:
|
|
267
|
+
transformFunction: (value) => value ?? ""
|
|
268
268
|
},
|
|
269
269
|
badgeVariant: {
|
|
270
270
|
classPropertyName: "badgeVariant",
|
|
@@ -666,12 +666,15 @@ var FieldComponent = class FieldComponent {
|
|
|
666
666
|
"ariaExpanded",
|
|
667
667
|
"ariaControls",
|
|
668
668
|
"ariaPressed",
|
|
669
|
+
"ariaHasPopup",
|
|
669
670
|
"ariaRequired",
|
|
670
671
|
"ariaLabelledby",
|
|
671
672
|
"ariaDescribedby",
|
|
672
673
|
"preventDefault",
|
|
673
674
|
"hasBackground",
|
|
674
675
|
"circular",
|
|
676
|
+
"isSingleLineLabel",
|
|
677
|
+
"iconButtonShape",
|
|
675
678
|
"tooltipPosition",
|
|
676
679
|
"role",
|
|
677
680
|
"iconFilled",
|
|
@@ -808,7 +811,10 @@ i0.ɵɵngDeclareClassMetadata({
|
|
|
808
811
|
required: false
|
|
809
812
|
}]
|
|
810
813
|
}],
|
|
811
|
-
value: [{
|
|
814
|
+
value: [{
|
|
815
|
+
type: Input,
|
|
816
|
+
args: [{ transform: (value) => value ?? "" }]
|
|
817
|
+
}],
|
|
812
818
|
badgeVariant: [{ type: Input }],
|
|
813
819
|
errors: [{ type: Input }],
|
|
814
820
|
disabled: [{ type: Input }],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testgorilla-tgo-ui-components-field.mjs","names":[],"sources":["../../../components/field/field.component.ts","../../../components/field/field.component.html","../../../components/field/field.component.module.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { CdkTextareaAutosize } from '@angular/cdk/text-field';\nimport { NgStyle, NgClass, AsyncPipe } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n DestroyRef,\n DoCheck,\n ElementRef,\n EventEmitter,\n HostBinding,\n inject,\n input,\n Input,\n NgZone,\n OnInit,\n Output,\n ProviderToken,\n signal,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { MatFormField, MatLabel, MatPrefix, MatHint } from '@angular/material/form-field';\nimport { MatIconRegistry, MatIcon } from '@angular/material/icon';\nimport { MatInput } from '@angular/material/input';\nimport { DomSanitizer } from '@angular/platform-browser';\n\nimport { BadgeVariant, BadgeComponent } from '@testgorilla/tgo-ui/components/badge';\nimport { ButtonComponent } from '@testgorilla/tgo-ui/components/button';\nimport {\n ApplicationTheme,\n DigitsOnlyDirective,\n UiTranslatePipe,\n HasValidationErrorPipe,\n} from '@testgorilla/tgo-ui/components/core';\nimport { IconName, IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\n\nimport { FieldType } from './field.model';\n\n/**\n * A global counter used to generate unique field IDs.\n * This variable is incremented each time a new field ID is needed.\n *\n * @remarks\n * This is primarily used to ensure that each field component\n * has a unique identifier within the application / useful for their Aria Labels.\n */\nlet fieldID = 0;\n\n@Component({\n selector: 'ui-field',\n templateUrl: './field.component.html',\n styleUrls: ['./field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n MatFormField,\n NgStyle,\n NgClass,\n MatLabel,\n IconComponentModule,\n MatIcon,\n MatPrefix,\n MatInput,\n DigitsOnlyDirective,\n CdkTextareaAutosize,\n ButtonComponent,\n MatHint,\n ValidationErrorModule,\n BadgeComponent,\n AsyncPipe,\n UiTranslatePipe,\n HasValidationErrorPipe,\n ],\n})\nexport class FieldComponent implements OnInit, ControlValueAccessor, DoCheck, AfterViewInit {\n @HostBinding() class = 'ui-field';\n\n /**\n * Indicator of the autocomplete width\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @HostBinding('class.full-width')\n @Input()\n fullWidth = true;\n\n /**\n * Indicator of the field height\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @HostBinding('class.full-height')\n @Input()\n fullHeight = false;\n\n /**\n * Form field label\n *\n * @type {string}\n * @memberof FieldComponent\n */\n @Input() label? = '';\n\n /**\n * Form field label from html\n *\n * @memberof FieldComponent\n */\n labelHtml = input<string | null>(null);\n\n /**\n * Icon to display alongside the label\n *\n * @type {IconName}\n * @memberof FieldComponent\n */\n @Input() labelIcon?: IconName;\n\n /**\n * Input name attribute\n *\n * @type {string}\n * @memberof FieldComponent\n */\n @Input() fieldName?: string;\n\n /**\n * Input placeholder\n *\n * @type {string}\n * @memberof FieldComponent\n */\n @Input() placeholder? = '';\n\n /**\n * Input id\n *\n * @type {string}\n * @memberof FieldComponent\n */\n id = input(`field-${fieldID++}`);\n\n /**\n * Input value\n *\n * @type {string}\n * @memberof FieldComponent\n */\n @Input() value = '';\n\n /**\n * Variant of badge to use\n *\n * @type {BadgeVariant}\n * @memberof FieldComponent\n */\n @Input() badgeVariant?: BadgeVariant | undefined;\n\n _errors: string[];\n /**\n * Input field errors\n *\n * @type {string}\n * @memberof FieldComponent\n */\n @Input() set errors(errors: string[]) {\n this._errors = errors?.filter(Boolean) ?? [];\n this.errorsLength = this.setErrorsLength();\n }\n\n /**\n * Determines if input is disabled\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() disabled: boolean;\n\n /**\n * Input is required or not\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() required: boolean;\n\n /**\n * Input is readonly or not\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() readOnly = false;\n\n /**\n * Hint text\n *\n * @type {string}\n * @memberof FieldComponent\n */\n @Input() hintMessage = '';\n\n /**\n * Input type\n *\n * @type {FieldType}\n * @memberof FieldComponent\n */\n @HostBinding('attr.field-class')\n @Input()\n type: FieldType = 'text';\n\n /**\n * Input is update only on blur\n *\n * @type {Boolean}\n * @memberof FieldComponent\n */\n @Input() updateOnBlur = false;\n\n /**\n * allow only digits in input\n *\n * @type {Boolean}\n * @memberof FieldComponent\n */\n @Input() allowOnlyDigits = false;\n\n /**\n * allow autocomplete off in input\n *\n * @type {Boolean}\n * @memberof FieldComponent\n */\n @Input() isAutocompleteOff = false;\n\n /**\n * allow negative numbers\n *\n * @type {Boolean}\n * @memberof FieldComponent\n */\n @Input() allowNegative = true;\n\n /**\n * Show reserved content below form field\n * @property showBottomContent\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() showBottomContent = true;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof FieldComponent\n */\n @HostBinding('attr.theme')\n @Input()\n applicationTheme: ApplicationTheme = 'light';\n\n /**\n * A string representing the ARIA label for accessibility.\n * This label is used to provide an accessible name for the input element.\n * @type {string}\n * @memberof FieldComponent\n */\n @Input() ariaLabel: string;\n\n readonly testId = input<string | null>(null);\n\n protected readonly clearTestId = computed(() => (this.testId() ? `${this.testId()}-clear` : null));\n\n protected readonly passwordToggleTestId = computed(() => (this.testId() ? `${this.testId()}-visibility` : null));\n\n /**\n * Show loading button. Only for text\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() loading = false;\n\n /**\n * Show icon when field is valid\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() isValid = false;\n\n /**\n * Max characters number\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() maxCharacters = 255;\n\n /**\n * Trim text on blur\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() trimOnBlur = false;\n /**\n * Trim text on submit\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() trimOnSubmit = false;\n /**\n * Max rows for multi-line type\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() maxRows = 0;\n /**\n * has text area counter\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() hasTextAreaCounter = true;\n\n /**\n * Hide in build errors for Reactive Forms\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() hideBuiltInErrors = false;\n\n /**\n * Hide label in errors\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() hideLabelInErrors = false;\n\n /**\n * Set maximum number\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() max: number | undefined;\n\n /**\n * Set minimum number\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() min: number | undefined;\n\n /**\n * Sets textarea height. Default 110\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() textareaHeight = 110;\n\n /**\n * Sets textarea borderless. Default false\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() borderless = false;\n\n @Input() autosizableTextarea = false;\n\n /**\n * Indicates if this field is filled by AI\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() isAIVariant = false;\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used for input field Aria Labeled By Element Id.\n * @type {string}\n * @memberof FieldComponent\n */\n protected readonly ariaLabelledbyId = computed(() => `${this.id()}-labeledBy`);\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used for input field Aria LabeledBy Text.\n * @type {string}\n * @memberof FieldComponent\n */\n protected readonly ariaLabelledby = input<string | undefined>(undefined);\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used for input field Aria Described By Element Id.\n * @type {string}\n * @memberof FieldComponent\n */\n protected readonly ariaDescribedbyId = computed(() => `${this.id()}-describedBy`);\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used for input field Aria DescribedBy Text.\n * @type {string}\n * @memberof FieldComponent\n */\n readonly ariaDescribedby = input<string | undefined>(undefined);\n\n /**\n * Show state of error\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() hasError = false;\n\n @Output() validateEvent = new EventEmitter<string>();\n @Output() fieldBlur = new EventEmitter<void>();\n\n @ViewChild('inputElement', { read: ElementRef }) field: ElementRef<HTMLInputElement>;\n @ViewChild('autosize') autosize: CdkTextareaAutosize;\n\n get getPasswordIcon(): IconName {\n if (this.applicationTheme === 'classic') {\n return this.showPassword ? 'Eye-hide' : 'Eye-view';\n } else {\n if (!this.isActiveField && !this.isActiveHover) {\n return this.showPassword ? 'View-in-line' : 'Hide-in-line';\n } else {\n return this.showPassword ? 'View-filled' : 'Hide-filled';\n }\n }\n }\n\n isActiveField = false;\n isActiveHover = false;\n\n keyboardFocused = signal(false);\n\n protected readonly translationContext = 'FIELD.';\n\n /**\n * @ignore\n */\n onChange: (value: string | number) => void = () => {};\n\n /**\n * @ignore\n */\n onTouch = () => {};\n\n private readonly defaultAppTheme = inject(\n 'CANOPYUI_DEFAULT_APPLICATION_THEME' as unknown as ProviderToken<ApplicationTheme>,\n {\n optional: true,\n }\n );\n private readonly matIconRegistry = inject(MatIconRegistry);\n private readonly domSanitizer = inject(DomSanitizer);\n private readonly cdr = inject(ChangeDetectorRef);\n public ngControl = inject(NgControl, { optional: true, self: true });\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly ngZone = inject(NgZone);\n private readonly destroyRef = inject(DestroyRef);\n\n constructor() {\n if (this.defaultAppTheme) {\n this.applicationTheme = this.defaultAppTheme;\n }\n\n if (this.ngControl !== null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngAfterViewInit(): void {\n this.focusMonitor\n .monitor(this.field)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(origin =>\n this.ngZone.run(() => {\n queueMicrotask(() => {\n this.keyboardFocused.set(origin === 'keyboard');\n });\n })\n );\n\n if (this.type === 'multi-line') {\n this.autosize.resizeToFitContent(true);\n }\n }\n\n /**\n * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched or errors\n * to display validation errors that might happen (e.g. required)\n */\n ngDoCheck(): void {\n if (this.ngControl?.touched || this.ngControl?.errors) {\n this.cdr.markForCheck();\n }\n }\n\n showClose: boolean;\n showPassword: boolean;\n currentType: string;\n errorsLength: boolean;\n\n ngOnInit(): void {\n this.setSearchInput();\n this.currentType = this.getType();\n }\n\n validate(): void {\n this.validateEvent.emit(this.value);\n }\n\n //set search input initial value\n setSearchInput(): void {\n if (this.type === 'search' || this.type === 'collapsed-search') {\n // eslint-disable-next-line no-restricted-syntax -- SECURITY: hardcoded first-party asset URL; MatIconRegistry.addSvgIcon requires SafeResourceUrl.\n this.matIconRegistry.addSvgIcon('Search', this.domSanitizer.bypassSecurityTrustResourceUrl('/icons/Search.svg'));\n if (this.value) {\n this.showClose = true;\n } else {\n this.showClose = false;\n }\n } else {\n this.showClose = false;\n }\n }\n\n //change type for reveal password\n getType(): string {\n if (this.type === 'password' && this.showPassword) {\n return 'text';\n }\n return this.type;\n }\n\n //Clear input value\n clearValue(): void {\n this.value = '';\n this.onChange(this.value);\n this.onChangeInputSearch();\n }\n\n //toggle for password\n showPasswordClick() {\n this.showPassword = !this.showPassword;\n this.currentType = this.getType();\n }\n\n //Set options for search input\n onChangeInputSearch() {\n if (this.type === 'search' || this.type === 'collapsed-search') {\n if (!this.value) {\n this.showClose = false;\n }\n if (this.value) {\n this.showClose = true;\n }\n }\n }\n\n // Set errors length for validation\n // Consider only those errors which which are not empty\n setErrorsLength(): boolean {\n if (this._errors) {\n return this._errors.filter(err => Boolean(err)).length > 0 ? true : false;\n }\n return false;\n }\n\n //Save input value\n onInput(event: Event) {\n this.value = (event.target as HTMLInputElement | HTMLTextAreaElement).value;\n this.errorsLength = this.setErrorsLength();\n if (!this.updateOnBlur) {\n this.onTouch();\n }\n if (this.allowOnlyDigits && !this.allowNegative && Number(this.value) < 0) {\n this.value = '0';\n } else {\n this.onChange(this.type === 'number' && this.value !== '' ? Number(this.value) : this.value);\n }\n }\n\n writeValue(value?: string | number): void {\n if (value !== null && value !== undefined) {\n // The internal <input> value is always a string; a numeric form value\n // renders identically once assigned (the input coerces it anyway).\n this.value = String(value);\n } else {\n this.value = '';\n }\n this.onChangeInputSearch();\n this.cdr.markForCheck();\n }\n\n registerOnChange(fn: (value: string | number) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.markForCheck();\n }\n\n onActive(state: boolean, action: string): void {\n if (action === 'hover') {\n this.isActiveHover = state;\n } else if (action === 'focus') {\n this.isActiveField = state;\n\n if (!state && this.trimOnBlur) {\n this.clearSpace();\n }\n }\n }\n\n onSubmit(): void {\n if (this.trimOnSubmit) {\n this.clearSpace();\n }\n }\n\n private clearSpace(): void {\n this.value = this.value.trim();\n this.onChange(this.value);\n }\n\n onBlur(): void {\n this.fieldBlur.emit();\n }\n\n trackByFn = (index: number, value: string) => value;\n\n focus(): void {\n this.field.nativeElement.focus();\n }\n\n refocusPasswordButton(btn: ButtonComponent) {\n setTimeout(() => {\n btn.focus('keyboard');\n }, 0);\n }\n}\n","<ng-container>\n <mat-form-field\n [ngStyle]=\"{\n '--textarea-height': textareaHeight - 10 + 'px',\n '--textarea-height-container': textareaHeight + 'px',\n }\"\n #uiField\n appearance=\"outline\"\n hideRequiredMarker=\"true\"\n [color]=\"errorsLength || (ngControl?.errors && ngControl?.touched) || hasError ? 'warn' : 'accent'\"\n [ngClass]=\"{\n 'hide-bottom-content': !showBottomContent,\n textarea: type === 'textarea' || type === 'textarea-scrollable',\n 'textarea-scrollable': type === 'textarea-scrollable',\n 'multi-line': type === 'multi-line',\n 'multi-line-textarea': type === 'multi-line' && autosizableTextarea && borderless,\n 'keyboard-focused': keyboardFocused(),\n 'has-label': !!label,\n 'has-value': !!value,\n 'text-area-borderless': borderless && (type === 'textarea' || type === 'textarea-scrollable'),\n }\"\n (mouseenter)=\"onActive(true, 'hover')\"\n (mouseleave)=\"onActive(false, 'hover')\"\n >\n <span [style.display]=\"'none'\" [id]=\"ariaDescribedbyId()\">\n @if (required) {\n <span>{{ 'ERRORS.REQUIRED' | uiTranslate | async }}</span>\n }\n {{ ariaDescribedby() }}\n </span>\n <span [style.display]=\"'none'\" [id]=\"ariaLabelledbyId()\">\n {{ ariaLabelledby() ?? label }}\n </span>\n @if (\n (label || labelHtml()) &&\n ((type !== 'search' && applicationTheme === 'classic') || applicationTheme !== 'classic')\n ) {\n <mat-label class=\"label-with-icon\">\n @if (isAIVariant || labelIcon) {\n <ui-icon [name]=\"isAIVariant ? 'Sparkle-in-line' : labelIcon!\" [size]=\"'16'\" class=\"label-icon\"></ui-icon>\n }\n <span>\n @if (labelHtml()) {\n <span [innerHTML]=\"labelHtml()\"></span>\n } @else {\n {{ label }}\n }\n @if (required) {\n <span>*</span>\n }\n </span>\n </mat-label>\n }\n @if (type === 'search' || type === 'collapsed-search') {\n <mat-icon matIconPrefix class=\"search-icon\" [svgIcon]=\"'Search'\"></mat-icon>\n }\n @if (type !== 'textarea' && type !== 'textarea-scrollable' && type !== 'multi-line') {\n <input\n [attr.data-testid]=\"testId() ?? 'field-input'\"\n [readonly]=\"readOnly\"\n matInput\n #inputElement\n (blur)=\"onTouch(); onActive(false, 'focus'); onBlur()\"\n (input)=\"onInput($event)\"\n [id]=\"id()\"\n (keyup)=\"onChangeInputSearch()\"\n [placeholder]=\"placeholder!\"\n [value]=\"value\"\n [disabled]=\"disabled || loading\"\n [type]=\"currentType\"\n (keyup.enter)=\"onSubmit()\"\n [max]=\"max\"\n [min]=\"min\"\n [name]=\"fieldName!\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-invalid]=\"errorsLength || (ngControl?.errors && ngControl?.touched) || hasError\"\n [attr.aria-labelledby]=\"ariaLabelledbyId()\"\n [attr.aria-describedby]=\"ariaDescribedbyId()\"\n role=\"textbox\"\n digitsOnly\n [autocomplete]=\"isAutocompleteOff ? 'off' : 'on'\"\n [allowOnlyDigits]=\"allowOnlyDigits\"\n [allowNegative]=\"allowNegative\"\n (focusin)=\"onActive(true, 'focus')\"\n />\n } @else {\n <textarea\n [attr.data-testid]=\"testId()\"\n matInput\n #inputElement\n #autosize=\"cdkTextareaAutosize\"\n [readonly]=\"readOnly\"\n (blur)=\"onTouch(); onActive(false, 'focus'); onBlur()\"\n (input)=\"onInput($event)\"\n [id]=\"id()\"\n (keyup)=\"onChangeInputSearch()\"\n (keyup.enter)=\"onSubmit()\"\n [placeholder]=\"placeholder!\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [name]=\"fieldName!\"\n [required]=\"required\"\n [attr.aria-label]=\"!label ? ariaLabel : ''\"\n [attr.aria-invalid]=\"errorsLength || (ngControl?.errors && ngControl?.touched) || hasError\"\n [attr.aria-labelledby]=\"ariaLabelledbyId()\"\n [attr.aria-describedby]=\"ariaDescribedbyId()\"\n role=\"textbox\"\n [cdkTextareaAutosize]=\"type === 'multi-line'\"\n [cdkAutosizeMinRows]=\"type === 'multi-line' ? 1 : 5\"\n [cdkAutosizeMaxRows]=\"type === 'multi-line' ? maxRows : 5\"\n [attr.maxlength]=\"maxCharacters\"\n (focusin)=\"onActive(true, 'focus')\"\n ></textarea>\n }\n\n @if (type === 'search' || type === 'collapsed-search' || type === 'password' || type === 'validation-text') {\n <div class=\"options\">\n <div class=\"options-container\">\n @if (showClose) {\n <ui-button\n variant=\"secondary\"\n [justIcon]=\"true\"\n class=\"close\"\n iconName=\"Close\"\n [label]=\"('COMMON.CLEAR' | uiTranslate | async)!\"\n (buttonClickEvent)=\"clearValue()\"\n [ariaLabel]=\"ariaLabel + '--' + ('COMMON.CLEAR' | uiTranslate | async)\"\n [testId]=\"clearTestId()\"\n ></ui-button>\n }\n @if (type === 'password') {\n <ui-button\n class=\"password\"\n variant=\"secondary\"\n [tooltip]=\"((showPassword ? 'FIELD.HIDE_PASSWORD' : 'FIELD.SHOW_PASSWORD') | uiTranslate | async)!\"\n [justIcon]=\"true\"\n role=\"switch\"\n [attr.aria-checked]=\"showPassword\"\n [iconName]=\"getPasswordIcon\"\n [applicationTheme]=\"applicationTheme\"\n [testId]=\"passwordToggleTestId()\"\n (click)=\"showPasswordClick()\"\n #btn\n (keydown.enter)=\"refocusPasswordButton(btn)\"\n (keydown.space)=\"refocusPasswordButton(btn)\"\n ></ui-button>\n }\n @if (\n type === 'validation-text' && (applicationTheme === 'dark' || applicationTheme === 'light') && value.length\n ) {\n @if (!isValid) {\n <ui-button\n class=\"validation\"\n [variant]=\"'text'\"\n [applicationTheme]=\"'light'\"\n [label]=\"'Validate'\"\n [loading]=\"loading\"\n (click)=\"validate()\"\n [disabled]=\"disabled\"\n [size]=\"'small'\"\n ></ui-button>\n }\n @if (isValid) {\n <ui-icon class=\"valid\" [color]=\"'white'\" applicationTheme=\"light\" [name]=\"'Check'\"></ui-icon>\n }\n }\n </div>\n </div>\n }\n @if (\n hasTextAreaCounter &&\n (type === 'textarea' || type === 'textarea-scrollable') &&\n !errorsLength &&\n !($safeNavigationMigration(ngControl?.errors) | hasValidationError)\n ) {\n <mat-hint class=\"info\">{{ value.length }} / {{ maxCharacters }}</mat-hint>\n }\n\n @if (\n hintMessage &&\n !errorsLength &&\n !($safeNavigationMigration(ngControl?.errors) | hasValidationError) &&\n type !== 'textarea' &&\n type !== 'textarea-scrollable'\n ) {\n <mat-hint class=\"info\">{{ hintMessage }}</mat-hint>\n }\n\n @if (errorsLength || ($safeNavigationMigration(ngControl?.errors) | hasValidationError)) {\n <mat-hint class=\"error\">\n @if (errorsLength) {\n @for (error of _errors; track trackByFn($index, error)) {\n <div class=\"errors\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span [innerHTML]=\"error\"></span>\n </div>\n }\n }\n @if (ngControl && !hideBuiltInErrors) {\n <ui-validation-error [ngControl]=\"ngControl\" [label]=\"hideLabelInErrors ? null : label\"></ui-validation-error>\n }\n </mat-hint>\n }\n\n @if (badgeVariant) {\n <ui-badge class=\"field-badge\" [variant]=\"badgeVariant\"></ui-badge>\n }\n </mat-form-field>\n</ng-container>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { BadgeComponentModule } from '@testgorilla/tgo-ui/components/badge';\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { DigitsOnlyDirective, UiTranslatePipe, HasValidationErrorPipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\n\nimport { FieldComponent } from './field.component';\n\n@NgModule({\n imports: [\n CommonModule,\n MatFormFieldModule,\n MatInputModule,\n IconComponentModule,\n FormsModule,\n ReactiveFormsModule,\n ButtonComponentModule,\n MatIconModule,\n UiTranslatePipe,\n ValidationErrorModule,\n HasValidationErrorPipe,\n DigitsOnlyDirective,\n BadgeComponentModule,\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A,O;;GAEA,MAAA;GAAU,MAAA,CAAA,gBAAgB,EAAE,MAAM,WAAU,CAAE;;;GAC9C,MAAA;GAAU,MAAA,CAAA,UAAU;;;;AErZvB,IAAa,uBAAb,MAAa,qBAAoB;CAApB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAApB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,SAAA;IAjB7B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GAAc;GAAA,SAAA,CAEN,cAAc;EAAA,CAAA;CAAA;CAEb;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,SAAA;IAjB7B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA;IAGA;IACA;GAAc;EAAA,CAAA;CAAA;;AAIL,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAoB,YAAA,CAAA;EAnBhC,MAAA;EAAS,MAAA,CAAA;GACR,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GACD,SAAS,CAAC,cAAc;EACzB,CAAA"}
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ui-components-field.mjs","names":[],"sources":["../../../components/field/field.component.ts","../../../components/field/field.component.html","../../../components/field/field.component.module.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport { CdkTextareaAutosize } from '@angular/cdk/text-field';\nimport { NgStyle, NgClass, AsyncPipe } from '@angular/common';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n computed,\n DestroyRef,\n DoCheck,\n ElementRef,\n EventEmitter,\n HostBinding,\n inject,\n input,\n Input,\n NgZone,\n OnInit,\n Output,\n ProviderToken,\n signal,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { ControlValueAccessor, NgControl } from '@angular/forms';\nimport { MatFormField, MatLabel, MatPrefix, MatHint } from '@angular/material/form-field';\nimport { MatIconRegistry, MatIcon } from '@angular/material/icon';\nimport { MatInput } from '@angular/material/input';\nimport { DomSanitizer } from '@angular/platform-browser';\n\nimport { BadgeVariant, BadgeComponent } from '@testgorilla/tgo-ui/components/badge';\nimport { ButtonComponent } from '@testgorilla/tgo-ui/components/button';\nimport {\n ApplicationTheme,\n DigitsOnlyDirective,\n UiTranslatePipe,\n HasValidationErrorPipe,\n} from '@testgorilla/tgo-ui/components/core';\nimport { IconName, IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\n\nimport { FieldType } from './field.model';\n\n/**\n * A global counter used to generate unique field IDs.\n * This variable is incremented each time a new field ID is needed.\n *\n * @remarks\n * This is primarily used to ensure that each field component\n * has a unique identifier within the application / useful for their Aria Labels.\n */\nlet fieldID = 0;\n\n@Component({\n selector: 'ui-field',\n templateUrl: './field.component.html',\n styleUrls: ['./field.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n MatFormField,\n NgStyle,\n NgClass,\n MatLabel,\n IconComponentModule,\n MatIcon,\n MatPrefix,\n MatInput,\n DigitsOnlyDirective,\n CdkTextareaAutosize,\n ButtonComponent,\n MatHint,\n ValidationErrorModule,\n BadgeComponent,\n AsyncPipe,\n UiTranslatePipe,\n HasValidationErrorPipe,\n ],\n})\nexport class FieldComponent implements OnInit, ControlValueAccessor, DoCheck, AfterViewInit {\n @HostBinding() class = 'ui-field';\n\n /**\n * Indicator of the autocomplete width\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @HostBinding('class.full-width')\n @Input()\n fullWidth = true;\n\n /**\n * Indicator of the field height\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @HostBinding('class.full-height')\n @Input()\n fullHeight = false;\n\n /**\n * Form field label\n *\n * @type {string}\n * @memberof FieldComponent\n */\n @Input() label? = '';\n\n /**\n * Form field label from html\n *\n * @memberof FieldComponent\n */\n labelHtml = input<string | null>(null);\n\n /**\n * Icon to display alongside the label\n *\n * @type {IconName}\n * @memberof FieldComponent\n */\n @Input() labelIcon?: IconName;\n\n /**\n * Input name attribute\n *\n * @type {string}\n * @memberof FieldComponent\n */\n @Input() fieldName?: string;\n\n /**\n * Input placeholder\n *\n * @type {string}\n * @memberof FieldComponent\n */\n @Input() placeholder? = '';\n\n /**\n * Input id\n *\n * @type {string}\n * @memberof FieldComponent\n */\n id = input(`field-${fieldID++}`);\n\n /**\n * Input value\n *\n * @type {string}\n * @memberof FieldComponent\n */\n // A template `a?.b` binding yields `undefined` since Angular 22 (it was `null`). Either one means an empty field.\n @Input({ transform: (value: string | null | undefined): string => value ?? '' }) value = '';\n\n /**\n * Variant of badge to use\n *\n * @type {BadgeVariant}\n * @memberof FieldComponent\n */\n @Input() badgeVariant?: BadgeVariant | undefined;\n\n _errors: string[];\n /**\n * Input field errors\n *\n * @type {string}\n * @memberof FieldComponent\n */\n @Input() set errors(errors: string[]) {\n this._errors = errors?.filter(Boolean) ?? [];\n this.errorsLength = this.setErrorsLength();\n }\n\n /**\n * Determines if input is disabled\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() disabled: boolean;\n\n /**\n * Input is required or not\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() required: boolean;\n\n /**\n * Input is readonly or not\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() readOnly = false;\n\n /**\n * Hint text\n *\n * @type {string}\n * @memberof FieldComponent\n */\n @Input() hintMessage = '';\n\n /**\n * Input type\n *\n * @type {FieldType}\n * @memberof FieldComponent\n */\n @HostBinding('attr.field-class')\n @Input()\n type: FieldType = 'text';\n\n /**\n * Input is update only on blur\n *\n * @type {Boolean}\n * @memberof FieldComponent\n */\n @Input() updateOnBlur = false;\n\n /**\n * allow only digits in input\n *\n * @type {Boolean}\n * @memberof FieldComponent\n */\n @Input() allowOnlyDigits = false;\n\n /**\n * allow autocomplete off in input\n *\n * @type {Boolean}\n * @memberof FieldComponent\n */\n @Input() isAutocompleteOff = false;\n\n /**\n * allow negative numbers\n *\n * @type {Boolean}\n * @memberof FieldComponent\n */\n @Input() allowNegative = true;\n\n /**\n * Show reserved content below form field\n * @property showBottomContent\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() showBottomContent = true;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof FieldComponent\n */\n @HostBinding('attr.theme')\n @Input()\n applicationTheme: ApplicationTheme = 'light';\n\n /**\n * A string representing the ARIA label for accessibility.\n * This label is used to provide an accessible name for the input element.\n * @type {string}\n * @memberof FieldComponent\n */\n @Input() ariaLabel: string;\n\n readonly testId = input<string | null>(null);\n\n protected readonly clearTestId = computed(() => (this.testId() ? `${this.testId()}-clear` : null));\n\n protected readonly passwordToggleTestId = computed(() => (this.testId() ? `${this.testId()}-visibility` : null));\n\n /**\n * Show loading button. Only for text\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() loading = false;\n\n /**\n * Show icon when field is valid\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() isValid = false;\n\n /**\n * Max characters number\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() maxCharacters = 255;\n\n /**\n * Trim text on blur\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() trimOnBlur = false;\n /**\n * Trim text on submit\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() trimOnSubmit = false;\n /**\n * Max rows for multi-line type\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() maxRows = 0;\n /**\n * has text area counter\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() hasTextAreaCounter = true;\n\n /**\n * Hide in build errors for Reactive Forms\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() hideBuiltInErrors = false;\n\n /**\n * Hide label in errors\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() hideLabelInErrors = false;\n\n /**\n * Set maximum number\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() max: number | undefined;\n\n /**\n * Set minimum number\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() min: number | undefined;\n\n /**\n * Sets textarea height. Default 110\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() textareaHeight = 110;\n\n /**\n * Sets textarea borderless. Default false\n *\n * @type {number}\n * @memberof FieldComponent\n */\n @Input() borderless = false;\n\n @Input() autosizableTextarea = false;\n\n /**\n * Indicates if this field is filled by AI\n *\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() isAIVariant = false;\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used for input field Aria Labeled By Element Id.\n * @type {string}\n * @memberof FieldComponent\n */\n protected readonly ariaLabelledbyId = computed(() => `${this.id()}-labeledBy`);\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used for input field Aria LabeledBy Text.\n * @type {string}\n * @memberof FieldComponent\n */\n protected readonly ariaLabelledby = input<string | undefined>(undefined);\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used for input field Aria Described By Element Id.\n * @type {string}\n * @memberof FieldComponent\n */\n protected readonly ariaDescribedbyId = computed(() => `${this.id()}-describedBy`);\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used for input field Aria DescribedBy Text.\n * @type {string}\n * @memberof FieldComponent\n */\n readonly ariaDescribedby = input<string | undefined>(undefined);\n\n /**\n * Show state of error\n * @type {boolean}\n * @memberof FieldComponent\n */\n @Input() hasError = false;\n\n @Output() validateEvent = new EventEmitter<string>();\n @Output() fieldBlur = new EventEmitter<void>();\n\n @ViewChild('inputElement', { read: ElementRef }) field: ElementRef<HTMLInputElement>;\n @ViewChild('autosize') autosize: CdkTextareaAutosize;\n\n get getPasswordIcon(): IconName {\n if (this.applicationTheme === 'classic') {\n return this.showPassword ? 'Eye-hide' : 'Eye-view';\n } else {\n if (!this.isActiveField && !this.isActiveHover) {\n return this.showPassword ? 'View-in-line' : 'Hide-in-line';\n } else {\n return this.showPassword ? 'View-filled' : 'Hide-filled';\n }\n }\n }\n\n isActiveField = false;\n isActiveHover = false;\n\n keyboardFocused = signal(false);\n\n protected readonly translationContext = 'FIELD.';\n\n /**\n * @ignore\n */\n onChange: (value: string | number) => void = () => {};\n\n /**\n * @ignore\n */\n onTouch = () => {};\n\n private readonly defaultAppTheme = inject(\n 'CANOPYUI_DEFAULT_APPLICATION_THEME' as unknown as ProviderToken<ApplicationTheme>,\n {\n optional: true,\n }\n );\n private readonly matIconRegistry = inject(MatIconRegistry);\n private readonly domSanitizer = inject(DomSanitizer);\n private readonly cdr = inject(ChangeDetectorRef);\n public ngControl = inject(NgControl, { optional: true, self: true });\n private readonly focusMonitor = inject(FocusMonitor);\n private readonly ngZone = inject(NgZone);\n private readonly destroyRef = inject(DestroyRef);\n\n constructor() {\n if (this.defaultAppTheme) {\n this.applicationTheme = this.defaultAppTheme;\n }\n\n if (this.ngControl !== null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngAfterViewInit(): void {\n this.focusMonitor\n .monitor(this.field)\n .pipe(takeUntilDestroyed(this.destroyRef))\n .subscribe(origin =>\n this.ngZone.run(() => {\n queueMicrotask(() => {\n this.keyboardFocused.set(origin === 'keyboard');\n });\n })\n );\n\n if (this.type === 'multi-line') {\n this.autosize.resizeToFitContent(true);\n }\n }\n\n /**\n * Used to mark component view as dirty when touched programmatically with markAsTouched/markAllAsTouched or errors\n * to display validation errors that might happen (e.g. required)\n */\n ngDoCheck(): void {\n if (this.ngControl?.touched || this.ngControl?.errors) {\n this.cdr.markForCheck();\n }\n }\n\n showClose: boolean;\n showPassword: boolean;\n currentType: string;\n errorsLength: boolean;\n\n ngOnInit(): void {\n this.setSearchInput();\n this.currentType = this.getType();\n }\n\n validate(): void {\n this.validateEvent.emit(this.value);\n }\n\n //set search input initial value\n setSearchInput(): void {\n if (this.type === 'search' || this.type === 'collapsed-search') {\n // eslint-disable-next-line no-restricted-syntax -- SECURITY: hardcoded first-party asset URL; MatIconRegistry.addSvgIcon requires SafeResourceUrl.\n this.matIconRegistry.addSvgIcon('Search', this.domSanitizer.bypassSecurityTrustResourceUrl('/icons/Search.svg'));\n if (this.value) {\n this.showClose = true;\n } else {\n this.showClose = false;\n }\n } else {\n this.showClose = false;\n }\n }\n\n //change type for reveal password\n getType(): string {\n if (this.type === 'password' && this.showPassword) {\n return 'text';\n }\n return this.type;\n }\n\n //Clear input value\n clearValue(): void {\n this.value = '';\n this.onChange(this.value);\n this.onChangeInputSearch();\n }\n\n //toggle for password\n showPasswordClick() {\n this.showPassword = !this.showPassword;\n this.currentType = this.getType();\n }\n\n //Set options for search input\n onChangeInputSearch() {\n if (this.type === 'search' || this.type === 'collapsed-search') {\n if (!this.value) {\n this.showClose = false;\n }\n if (this.value) {\n this.showClose = true;\n }\n }\n }\n\n // Set errors length for validation\n // Consider only those errors which which are not empty\n setErrorsLength(): boolean {\n if (this._errors) {\n return this._errors.filter(err => Boolean(err)).length > 0 ? true : false;\n }\n return false;\n }\n\n //Save input value\n onInput(event: Event) {\n this.value = (event.target as HTMLInputElement | HTMLTextAreaElement).value;\n this.errorsLength = this.setErrorsLength();\n if (!this.updateOnBlur) {\n this.onTouch();\n }\n if (this.allowOnlyDigits && !this.allowNegative && Number(this.value) < 0) {\n this.value = '0';\n } else {\n this.onChange(this.type === 'number' && this.value !== '' ? Number(this.value) : this.value);\n }\n }\n\n writeValue(value?: string | number): void {\n if (value !== null && value !== undefined) {\n // The internal <input> value is always a string; a numeric form value\n // renders identically once assigned (the input coerces it anyway).\n this.value = String(value);\n } else {\n this.value = '';\n }\n this.onChangeInputSearch();\n this.cdr.markForCheck();\n }\n\n registerOnChange(fn: (value: string | number) => void): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.cdr.markForCheck();\n }\n\n onActive(state: boolean, action: string): void {\n if (action === 'hover') {\n this.isActiveHover = state;\n } else if (action === 'focus') {\n this.isActiveField = state;\n\n if (!state && this.trimOnBlur) {\n this.clearSpace();\n }\n }\n }\n\n onSubmit(): void {\n if (this.trimOnSubmit) {\n this.clearSpace();\n }\n }\n\n private clearSpace(): void {\n this.value = this.value.trim();\n this.onChange(this.value);\n }\n\n onBlur(): void {\n this.fieldBlur.emit();\n }\n\n trackByFn = (index: number, value: string) => value;\n\n focus(): void {\n this.field.nativeElement.focus();\n }\n\n refocusPasswordButton(btn: ButtonComponent) {\n setTimeout(() => {\n btn.focus('keyboard');\n }, 0);\n }\n}\n","<ng-container>\n <mat-form-field\n [ngStyle]=\"{\n '--textarea-height': textareaHeight - 10 + 'px',\n '--textarea-height-container': textareaHeight + 'px',\n }\"\n #uiField\n appearance=\"outline\"\n hideRequiredMarker=\"true\"\n [color]=\"errorsLength || (ngControl?.errors && ngControl?.touched) || hasError ? 'warn' : 'accent'\"\n [ngClass]=\"{\n 'hide-bottom-content': !showBottomContent,\n textarea: type === 'textarea' || type === 'textarea-scrollable',\n 'textarea-scrollable': type === 'textarea-scrollable',\n 'multi-line': type === 'multi-line',\n 'multi-line-textarea': type === 'multi-line' && autosizableTextarea && borderless,\n 'keyboard-focused': keyboardFocused(),\n 'has-label': !!label,\n 'has-value': !!value,\n 'text-area-borderless': borderless && (type === 'textarea' || type === 'textarea-scrollable'),\n }\"\n (mouseenter)=\"onActive(true, 'hover')\"\n (mouseleave)=\"onActive(false, 'hover')\"\n >\n <span [style.display]=\"'none'\" [id]=\"ariaDescribedbyId()\">\n @if (required) {\n <span>{{ 'ERRORS.REQUIRED' | uiTranslate | async }}</span>\n }\n {{ ariaDescribedby() }}\n </span>\n <span [style.display]=\"'none'\" [id]=\"ariaLabelledbyId()\">\n {{ ariaLabelledby() ?? label }}\n </span>\n @if (\n (label || labelHtml()) &&\n ((type !== 'search' && applicationTheme === 'classic') || applicationTheme !== 'classic')\n ) {\n <mat-label class=\"label-with-icon\">\n @if (isAIVariant || labelIcon) {\n <ui-icon [name]=\"isAIVariant ? 'Sparkle-in-line' : labelIcon!\" [size]=\"'16'\" class=\"label-icon\"></ui-icon>\n }\n <span>\n @if (labelHtml()) {\n <span [innerHTML]=\"labelHtml()\"></span>\n } @else {\n {{ label }}\n }\n @if (required) {\n <span>*</span>\n }\n </span>\n </mat-label>\n }\n @if (type === 'search' || type === 'collapsed-search') {\n <mat-icon matIconPrefix class=\"search-icon\" [svgIcon]=\"'Search'\"></mat-icon>\n }\n @if (type !== 'textarea' && type !== 'textarea-scrollable' && type !== 'multi-line') {\n <input\n [attr.data-testid]=\"testId() ?? 'field-input'\"\n [readonly]=\"readOnly\"\n matInput\n #inputElement\n (blur)=\"onTouch(); onActive(false, 'focus'); onBlur()\"\n (input)=\"onInput($event)\"\n [id]=\"id()\"\n (keyup)=\"onChangeInputSearch()\"\n [placeholder]=\"placeholder!\"\n [value]=\"value\"\n [disabled]=\"disabled || loading\"\n [type]=\"currentType\"\n (keyup.enter)=\"onSubmit()\"\n [max]=\"max\"\n [min]=\"min\"\n [name]=\"fieldName!\"\n [required]=\"required\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-invalid]=\"errorsLength || (ngControl?.errors && ngControl?.touched) || hasError\"\n [attr.aria-labelledby]=\"ariaLabelledbyId()\"\n [attr.aria-describedby]=\"ariaDescribedbyId()\"\n role=\"textbox\"\n digitsOnly\n [autocomplete]=\"isAutocompleteOff ? 'off' : 'on'\"\n [allowOnlyDigits]=\"allowOnlyDigits\"\n [allowNegative]=\"allowNegative\"\n (focusin)=\"onActive(true, 'focus')\"\n />\n } @else {\n <textarea\n [attr.data-testid]=\"testId()\"\n matInput\n #inputElement\n #autosize=\"cdkTextareaAutosize\"\n [readonly]=\"readOnly\"\n (blur)=\"onTouch(); onActive(false, 'focus'); onBlur()\"\n (input)=\"onInput($event)\"\n [id]=\"id()\"\n (keyup)=\"onChangeInputSearch()\"\n (keyup.enter)=\"onSubmit()\"\n [placeholder]=\"placeholder!\"\n [value]=\"value\"\n [disabled]=\"disabled\"\n [name]=\"fieldName!\"\n [required]=\"required\"\n [attr.aria-label]=\"!label ? ariaLabel : ''\"\n [attr.aria-invalid]=\"errorsLength || (ngControl?.errors && ngControl?.touched) || hasError\"\n [attr.aria-labelledby]=\"ariaLabelledbyId()\"\n [attr.aria-describedby]=\"ariaDescribedbyId()\"\n role=\"textbox\"\n [cdkTextareaAutosize]=\"type === 'multi-line'\"\n [cdkAutosizeMinRows]=\"type === 'multi-line' ? 1 : 5\"\n [cdkAutosizeMaxRows]=\"type === 'multi-line' ? maxRows : 5\"\n [attr.maxlength]=\"maxCharacters\"\n (focusin)=\"onActive(true, 'focus')\"\n ></textarea>\n }\n\n @if (type === 'search' || type === 'collapsed-search' || type === 'password' || type === 'validation-text') {\n <div class=\"options\">\n <div class=\"options-container\">\n @if (showClose) {\n <ui-button\n variant=\"secondary\"\n [justIcon]=\"true\"\n class=\"close\"\n iconName=\"Close\"\n [label]=\"('COMMON.CLEAR' | uiTranslate | async)!\"\n (buttonClickEvent)=\"clearValue()\"\n [ariaLabel]=\"ariaLabel + '--' + ('COMMON.CLEAR' | uiTranslate | async)\"\n [testId]=\"clearTestId()\"\n ></ui-button>\n }\n @if (type === 'password') {\n <ui-button\n class=\"password\"\n variant=\"secondary\"\n [tooltip]=\"((showPassword ? 'FIELD.HIDE_PASSWORD' : 'FIELD.SHOW_PASSWORD') | uiTranslate | async)!\"\n [justIcon]=\"true\"\n role=\"switch\"\n [attr.aria-checked]=\"showPassword\"\n [iconName]=\"getPasswordIcon\"\n [applicationTheme]=\"applicationTheme\"\n [testId]=\"passwordToggleTestId()\"\n (click)=\"showPasswordClick()\"\n #btn\n (keydown.enter)=\"refocusPasswordButton(btn)\"\n (keydown.space)=\"refocusPasswordButton(btn)\"\n ></ui-button>\n }\n @if (\n type === 'validation-text' && (applicationTheme === 'dark' || applicationTheme === 'light') && value.length\n ) {\n @if (!isValid) {\n <ui-button\n class=\"validation\"\n [variant]=\"'text'\"\n [applicationTheme]=\"'light'\"\n [label]=\"'Validate'\"\n [loading]=\"loading\"\n (click)=\"validate()\"\n [disabled]=\"disabled\"\n [size]=\"'small'\"\n ></ui-button>\n }\n @if (isValid) {\n <ui-icon class=\"valid\" [color]=\"'white'\" applicationTheme=\"light\" [name]=\"'Check'\"></ui-icon>\n }\n }\n </div>\n </div>\n }\n @if (\n hasTextAreaCounter &&\n (type === 'textarea' || type === 'textarea-scrollable') &&\n !errorsLength &&\n !($safeNavigationMigration(ngControl?.errors) | hasValidationError)\n ) {\n <mat-hint class=\"info\">{{ value.length }} / {{ maxCharacters }}</mat-hint>\n }\n\n @if (\n hintMessage &&\n !errorsLength &&\n !($safeNavigationMigration(ngControl?.errors) | hasValidationError) &&\n type !== 'textarea' &&\n type !== 'textarea-scrollable'\n ) {\n <mat-hint class=\"info\">{{ hintMessage }}</mat-hint>\n }\n\n @if (errorsLength || ($safeNavigationMigration(ngControl?.errors) | hasValidationError)) {\n <mat-hint class=\"error\">\n @if (errorsLength) {\n @for (error of _errors; track trackByFn($index, error)) {\n <div class=\"errors\">\n <ui-icon [applicationTheme]=\"applicationTheme\" [name]=\"'Error'\"></ui-icon>\n <span [innerHTML]=\"error\"></span>\n </div>\n }\n }\n @if (ngControl && !hideBuiltInErrors) {\n <ui-validation-error [ngControl]=\"ngControl\" [label]=\"hideLabelInErrors ? null : label\"></ui-validation-error>\n }\n </mat-hint>\n }\n\n @if (badgeVariant) {\n <ui-badge class=\"field-badge\" [variant]=\"badgeVariant\"></ui-badge>\n }\n </mat-form-field>\n</ng-container>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { BadgeComponentModule } from '@testgorilla/tgo-ui/components/badge';\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { DigitsOnlyDirective, UiTranslatePipe, HasValidationErrorPipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { ValidationErrorModule } from '@testgorilla/tgo-ui/components/validation-error';\n\nimport { FieldComponent } from './field.component';\n\n@NgModule({\n imports: [\n CommonModule,\n MatFormFieldModule,\n MatInputModule,\n IconComponentModule,\n FormsModule,\n ReactiveFormsModule,\n ButtonComponentModule,\n MatIconModule,\n UiTranslatePipe,\n ValidationErrorModule,\n HasValidationErrorPipe,\n DigitsOnlyDirective,\n BadgeComponentModule,\n FieldComponent,\n ],\n exports: [FieldComponent],\n})\nexport class FieldComponentModule {}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAqDA,IAAI,UAAU;AA4Bd,IAAa,iBAAb,MAAa,eAAc;CA8FzB,IAAa,OAAO,QAAgB;EAClC,KAAK,UAAU,QAAQ,OAAO,OAAO,KAAK,CAAA;EAC1C,KAAK,eAAe,KAAK,gBAAe;CAC1C;CAwQA,IAAI,kBAAe;EACjB,IAAI,KAAK,qBAAqB,WAC5B,OAAO,KAAK,eAAe,aAAa;OAExC,IAAI,CAAC,KAAK,iBAAiB,CAAC,KAAK,eAC/B,OAAO,KAAK,eAAe,iBAAiB;OAE5C,OAAO,KAAK,eAAe,gBAAgB;CAGjD;CAiCA,cAAA;EAnZe,KAAA,QAAQ;EAUvB,KAAA,YAAY;EAUZ,KAAA,aAAa;EAQJ,KAAA,QAAS;EAOlB,KAAA,YAAY,MAAqB,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,YAAA,CA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A,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAoB,SAAA;IAjB7B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAEA;IAGA;IACA;GAAc;EAAA,CAAA;CAAA;;AAIL,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAoB,YAAA,CAAA;EAnBhC,MAAA;EAAS,MAAA,CAAA;GACR,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;GACD,SAAS,CAAC,cAAc;EACzB,CAAA"}
|
|
@@ -394,12 +394,15 @@ var FilterButtonComponent = class FilterButtonComponent {
|
|
|
394
394
|
"ariaExpanded",
|
|
395
395
|
"ariaControls",
|
|
396
396
|
"ariaPressed",
|
|
397
|
+
"ariaHasPopup",
|
|
397
398
|
"ariaRequired",
|
|
398
399
|
"ariaLabelledby",
|
|
399
400
|
"ariaDescribedby",
|
|
400
401
|
"preventDefault",
|
|
401
402
|
"hasBackground",
|
|
402
403
|
"circular",
|
|
404
|
+
"isSingleLineLabel",
|
|
405
|
+
"iconButtonShape",
|
|
403
406
|
"tooltipPosition",
|
|
404
407
|
"role",
|
|
405
408
|
"iconFilled",
|