Skip to content
Snippets Groups Projects
Select Git revision
  • 127ded4e88afcd4dc9f61597c9e5c213825e4646
  • main default protected
  • OZG-7985-anfrage-von-landesebene
  • release
  • OZG-8252-gitlab-pipeline
  • OZG-7774-E2E
  • OZG-5120-PoC-Native-Image
  • 1.10.0
  • 1.9.0
  • 1.8.0
  • 1.7.0
  • 1.6.0
  • 1.5.0
  • 1.4.0
  • 1.3.0
  • 1.2.1
  • 1.2.0
  • 1.1.1
  • 1.1.0
  • 1.0.0
  • 0.8.0
  • 0.7.0
  • 0.6.0
  • 0.5.0
  • 0.4.0
  • 0.3.0
  • 0.2.0
27 results

SecurityConfiguration.java

Blame
  • search-field.component.ts 1.42 KiB
    import { CommonModule } from '@angular/common';
    import { Component, EventEmitter, Input, Output } from '@angular/core';
    import { FormControl } from '@angular/forms';
    import { EMPTY_STRING } from '../../../../../tech-shared/src';
    import { TextInputComponent } from '../../form/text-input/text-input.component';
    import { CloseIconComponent } from '../../icons/close-icon/close-icon.component';
    import { SearchIconComponent } from '../../icons/search-icon/search-icon.component';
    
    @Component({
      selector: 'ods-search-field',
      standalone: true,
      imports: [CommonModule, TextInputComponent, SearchIconComponent, CloseIconComponent],
      template: `<ods-text-input
        [label]="label"
        [fieldControl]="control"
        [placeholder]="placeholder"
        [withPrefix]="true"
        [withSuffix]="true"
        (clickEmitter)="inputClicked.emit()"
        role="combobox"
      >
        <ods-search-icon prefix aria-hidden="true" aria-label="Suchfeld" />
        <button suffix *ngIf="control.value" (click)="clearInput()" aria-label="Eingabe löschen">
          <ods-close-icon class="fill-primary hover:fill-primary-hover" />
        </button>
      </ods-text-input>`,
    })
    export class SearchFieldComponent {
      @Input() label: string = EMPTY_STRING;
      @Input() placeholder: string = EMPTY_STRING;
      @Input() control = new FormControl(EMPTY_STRING);
    
      @Output() inputClicked: EventEmitter<MouseEvent> = new EventEmitter<MouseEvent>();
    
      clearInput() {
        this.control.setValue(EMPTY_STRING);
      }
    }