@agorapulse/ui-components 17.1.8 → 17.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/agorapulse-ui-components-17.2.0.tgz +0 -0
  2. package/esm2022/autocomplete/autocomplete.component.mjs +5 -5
  3. package/esm2022/button/button.component.mjs +3 -3
  4. package/esm2022/checkbox/checkbox.component.mjs +5 -5
  5. package/esm2022/datepicker/datepicker.component.mjs +5 -5
  6. package/esm2022/form-message/form-message.component.mjs +6 -6
  7. package/esm2022/icon-button/icon-button.component.mjs +3 -3
  8. package/esm2022/infobox/infobox.component.mjs +9 -9
  9. package/esm2022/input-group/input-group.component.mjs +2 -2
  10. package/esm2022/input-search/input-search.component.mjs +5 -5
  11. package/esm2022/labels/label.component.mjs +3 -3
  12. package/esm2022/legacy/input/input.component.mjs +6 -6
  13. package/esm2022/legacy/select/select.component.mjs +5 -5
  14. package/esm2022/legacy/textarea/textarea.component.mjs +5 -5
  15. package/esm2022/media-display-overlay/media-display-overlay-dialog.component.mjs +5 -5
  16. package/esm2022/neo-datepicker/neo-datepicker.component.mjs +3 -3
  17. package/esm2022/paginator/paginator.component.mjs +5 -5
  18. package/esm2022/password-input/password-input.component.mjs +3 -3
  19. package/esm2022/select/dropdown-item-multiple-one-line/dropdown-item-multiple-one-line.component.mjs +3 -3
  20. package/esm2022/select/dropdown-item-multiple-two-lines/dropdown-item-multiple-two-lines.component.mjs +3 -3
  21. package/esm2022/select/dropdown-item-single-one-line/dropdown-item-single-one-line.component.mjs +3 -3
  22. package/esm2022/select/dropdown-item-single-two-lines/dropdown-item-single-two-lines.component.mjs +3 -3
  23. package/esm2022/select/dropdown-search-form/dropdown-search-form.component.mjs +3 -3
  24. package/esm2022/select/select-base.directive.mjs +3 -3
  25. package/esm2022/select/select-label-multiple/select-label-multiple.component.mjs +3 -3
  26. package/esm2022/snackbars-thread/component/snackbars-thread.component.mjs +5 -5
  27. package/esm2022/snackbars-thread/utils/const/snackbars-thread.const.mjs +4 -4
  28. package/esm2022/social-button/social-button.component.mjs +3 -3
  29. package/esm2022/split-button/split-button.component.mjs +6 -6
  30. package/esm2022/stepper/stepper.component.mjs +3 -3
  31. package/esm2022/tag/tag.component.mjs +3 -3
  32. package/esm2022/toggle/toggle.component.mjs +3 -3
  33. package/fesm2022/agorapulse-ui-components-autocomplete.mjs +4 -4
  34. package/fesm2022/agorapulse-ui-components-autocomplete.mjs.map +1 -1
  35. package/fesm2022/agorapulse-ui-components-button.mjs +2 -2
  36. package/fesm2022/agorapulse-ui-components-button.mjs.map +1 -1
  37. package/fesm2022/agorapulse-ui-components-checkbox.mjs +4 -4
  38. package/fesm2022/agorapulse-ui-components-checkbox.mjs.map +1 -1
  39. package/fesm2022/agorapulse-ui-components-datepicker.mjs +4 -4
  40. package/fesm2022/agorapulse-ui-components-datepicker.mjs.map +1 -1
  41. package/fesm2022/agorapulse-ui-components-form-message.mjs +5 -5
  42. package/fesm2022/agorapulse-ui-components-form-message.mjs.map +1 -1
  43. package/fesm2022/agorapulse-ui-components-icon-button.mjs +2 -2
  44. package/fesm2022/agorapulse-ui-components-icon-button.mjs.map +1 -1
  45. package/fesm2022/agorapulse-ui-components-infobox.mjs +8 -8
  46. package/fesm2022/agorapulse-ui-components-infobox.mjs.map +1 -1
  47. package/fesm2022/agorapulse-ui-components-input-group.mjs +2 -2
  48. package/fesm2022/agorapulse-ui-components-input-group.mjs.map +1 -1
  49. package/fesm2022/agorapulse-ui-components-input-search.mjs +4 -4
  50. package/fesm2022/agorapulse-ui-components-input-search.mjs.map +1 -1
  51. package/fesm2022/agorapulse-ui-components-labels.mjs +2 -2
  52. package/fesm2022/agorapulse-ui-components-labels.mjs.map +1 -1
  53. package/fesm2022/agorapulse-ui-components-legacy-input.mjs +5 -5
  54. package/fesm2022/agorapulse-ui-components-legacy-input.mjs.map +1 -1
  55. package/fesm2022/agorapulse-ui-components-legacy-select.mjs +4 -4
  56. package/fesm2022/agorapulse-ui-components-legacy-select.mjs.map +1 -1
  57. package/fesm2022/agorapulse-ui-components-legacy-textarea.mjs +4 -4
  58. package/fesm2022/agorapulse-ui-components-legacy-textarea.mjs.map +1 -1
  59. package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs +4 -4
  60. package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs.map +1 -1
  61. package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs +2 -2
  62. package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs.map +1 -1
  63. package/fesm2022/agorapulse-ui-components-paginator.mjs +4 -4
  64. package/fesm2022/agorapulse-ui-components-paginator.mjs.map +1 -1
  65. package/fesm2022/agorapulse-ui-components-password-input.mjs +2 -2
  66. package/fesm2022/agorapulse-ui-components-password-input.mjs.map +1 -1
  67. package/fesm2022/agorapulse-ui-components-select.mjs +14 -14
  68. package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
  69. package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs +7 -7
  70. package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs.map +1 -1
  71. package/fesm2022/agorapulse-ui-components-social-button.mjs +2 -2
  72. package/fesm2022/agorapulse-ui-components-social-button.mjs.map +1 -1
  73. package/fesm2022/agorapulse-ui-components-split-button.mjs +5 -5
  74. package/fesm2022/agorapulse-ui-components-split-button.mjs.map +1 -1
  75. package/fesm2022/agorapulse-ui-components-stepper.mjs +2 -2
  76. package/fesm2022/agorapulse-ui-components-stepper.mjs.map +1 -1
  77. package/fesm2022/agorapulse-ui-components-tag.mjs +2 -2
  78. package/fesm2022/agorapulse-ui-components-tag.mjs.map +1 -1
  79. package/fesm2022/agorapulse-ui-components-toggle.mjs +2 -2
  80. package/fesm2022/agorapulse-ui-components-toggle.mjs.map +1 -1
  81. package/form-message/form-message.component.d.ts +1 -1
  82. package/package.json +7 -7
  83. package/snackbars-thread/component/snackbars-thread.component.d.ts +1 -1
  84. package/agorapulse-ui-components-17.1.8.tgz +0 -0
@@ -1,6 +1,6 @@
1
1
  import { InputDirective } from '@agorapulse/ui-components/input';
2
2
  import { InputGroupComponent } from '@agorapulse/ui-components/input-group';
3
- import { SymbolRegistry, apSearchAlternate, apDeleteNoCircle, SymbolComponent } from '@agorapulse/ui-symbol';
3
+ import { SymbolRegistry, apSearch, apDeleteNoCircle, SymbolComponent } from '@agorapulse/ui-symbol';
4
4
  import * as i0 from '@angular/core';
5
5
  import { input, output, viewChild, signal, computed, inject, forwardRef, Component, ChangeDetectionStrategy, ViewEncapsulation } from '@angular/core';
6
6
  import * as i1 from '@angular/forms';
@@ -23,7 +23,7 @@ class InputSearchComponent {
23
23
  onChanged = () => { };
24
24
  symbolRegistry = inject(SymbolRegistry);
25
25
  constructor() {
26
- this.symbolRegistry.registerSymbols([apSearchAlternate, apDeleteNoCircle]);
26
+ this.symbolRegistry.registerSymbols([apSearch, apDeleteNoCircle]);
27
27
  }
28
28
  registerOnChange(fn) {
29
29
  this.onChanged = fn;
@@ -63,7 +63,7 @@ class InputSearchComponent {
63
63
  useExisting: forwardRef(() => InputSearchComponent),
64
64
  multi: true,
65
65
  },
66
- ], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "<ap-input-group>\n <ap-symbol symbolId=\"search-alternate\" />\n <input\n #input\n apInput\n [id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [ngModel]=\"value()\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange($event)\" />\n @if (clearable() && value()) {\n <div\n class=\"close\"\n tabindex=\"0\"\n (click)=\"onClear()\"\n (keyup)=\"onClear()\">\n <ap-symbol\n aria-label=\"close-snackbar\"\n size=\"20px\"\n symbolId=\"delete-no-circle\" />\n </div>\n }\n</ap-input-group>\n", styles: ["ap-input-search ap-input-group .ap-input-group .close{height:20px;width:20px;display:flex;justify-content:center;align-items:center;border-radius:50%}ap-input-search ap-input-group .ap-input-group .close ap-symbol{color:var(--ref-color-grey-100);width:20px;height:20px;min-height:20px;min-width:20px;max-height:20px;max-width:20px}ap-input-search ap-input-group .ap-input-group .close:hover{background:#3445631a;border-radius:50%;cursor:pointer}\n"], dependencies: [{ kind: "component", type: InputGroupComponent, selector: "ap-input-group", inputs: ["symbolPosition"] }, { kind: "directive", type: InputDirective, selector: "[apInput]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
66
+ ], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, isSignal: true }], ngImport: i0, template: "<ap-input-group>\n <ap-symbol symbolId=\"search\" />\n <input\n #input\n apInput\n [id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [ngModel]=\"value()\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange($event)\" />\n @if (clearable() && value()) {\n <div\n class=\"close\"\n tabindex=\"0\"\n (click)=\"onClear()\"\n (keyup)=\"onClear()\">\n <ap-symbol\n aria-label=\"close-snackbar\"\n symbolId=\"delete-no-circle\"\n size=\"xs\"\n />\n </div>\n }\n</ap-input-group>\n", styles: ["ap-input-search ap-input-group .ap-input-group .close{height:20px;width:20px;display:flex;justify-content:center;align-items:center;border-radius:50%}ap-input-search ap-input-group .ap-input-group .close ap-symbol{color:var(--ref-color-grey-100);align-self:center}ap-input-search ap-input-group .ap-input-group .close:hover{background:#3445631a;border-radius:50%;cursor:pointer}\n"], dependencies: [{ kind: "component", type: InputGroupComponent, selector: "ap-input-group", inputs: ["symbolPosition"] }, { kind: "directive", type: InputDirective, selector: "[apInput]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
67
67
  }
68
68
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: InputSearchComponent, decorators: [{
69
69
  type: Component,
@@ -73,7 +73,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
73
73
  useExisting: forwardRef(() => InputSearchComponent),
74
74
  multi: true,
75
75
  },
76
- ], template: "<ap-input-group>\n <ap-symbol symbolId=\"search-alternate\" />\n <input\n #input\n apInput\n [id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [ngModel]=\"value()\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange($event)\" />\n @if (clearable() && value()) {\n <div\n class=\"close\"\n tabindex=\"0\"\n (click)=\"onClear()\"\n (keyup)=\"onClear()\">\n <ap-symbol\n aria-label=\"close-snackbar\"\n size=\"20px\"\n symbolId=\"delete-no-circle\" />\n </div>\n }\n</ap-input-group>\n", styles: ["ap-input-search ap-input-group .ap-input-group .close{height:20px;width:20px;display:flex;justify-content:center;align-items:center;border-radius:50%}ap-input-search ap-input-group .ap-input-group .close ap-symbol{color:var(--ref-color-grey-100);width:20px;height:20px;min-height:20px;min-width:20px;max-height:20px;max-width:20px}ap-input-search ap-input-group .ap-input-group .close:hover{background:#3445631a;border-radius:50%;cursor:pointer}\n"] }]
76
+ ], template: "<ap-input-group>\n <ap-symbol symbolId=\"search\" />\n <input\n #input\n apInput\n [id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [ngModel]=\"value()\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange($event)\" />\n @if (clearable() && value()) {\n <div\n class=\"close\"\n tabindex=\"0\"\n (click)=\"onClear()\"\n (keyup)=\"onClear()\">\n <ap-symbol\n aria-label=\"close-snackbar\"\n symbolId=\"delete-no-circle\"\n size=\"xs\"\n />\n </div>\n }\n</ap-input-group>\n", styles: ["ap-input-search ap-input-group .ap-input-group .close{height:20px;width:20px;display:flex;justify-content:center;align-items:center;border-radius:50%}ap-input-search ap-input-group .ap-input-group .close ap-symbol{color:var(--ref-color-grey-100);align-self:center}ap-input-search ap-input-group .ap-input-group .close:hover{background:#3445631a;border-radius:50%;cursor:pointer}\n"] }]
77
77
  }], ctorParameters: () => [] });
78
78
 
79
79
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components-input-search.mjs","sources":["../../../libs/ui-components/input-search/src/input-search.component.ts","../../../libs/ui-components/input-search/src/input-search.component.html","../../../libs/ui-components/input-search/src/agorapulse-ui-components-input-search.ts"],"sourcesContent":["import { InputDirective } from '@agorapulse/ui-components/input';\nimport { InputGroupComponent } from '@agorapulse/ui-components/input-group';\nimport { SymbolComponent, SymbolRegistry, apDeleteNoCircle, apSearchAlternate } from '@agorapulse/ui-symbol';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewEncapsulation,\n computed,\n forwardRef,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nlet inputSearchId = 0;\n\n@Component({\n selector: 'ap-input-search',\n templateUrl: './input-search.component.html',\n styleUrls: ['./input-search.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [InputGroupComponent, InputDirective, FormsModule, SymbolComponent],\n\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputSearchComponent),\n multi: true,\n },\n ],\n})\nexport class InputSearchComponent implements ControlValueAccessor {\n id = input<string>('');\n placeholder = input<string>('');\n clearable = input(true);\n\n focus = output<FocusEvent>();\n blur = output<FocusEvent>();\n keyup = output<KeyboardEvent>();\n\n inputElement = viewChild.required<ElementRef>('input');\n\n value = signal<string | null>('');\n defaultInputId = `ap-input-search-${inputSearchId++}`;\n\n inputId = computed(() => this.id() ?? this.defaultInputId);\n\n disabled = signal(false);\n\n onTouched: () => void = () => {};\n\n onChanged: (value: any) => void = () => {};\n\n private symbolRegistry = inject(SymbolRegistry);\n\n constructor() {\n this.symbolRegistry.registerSymbols([apSearchAlternate, apDeleteNoCircle]);\n }\n\n registerOnChange(fn: (value: string | null) => void): void {\n this.onChanged = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n onValueChange(value: string | null) {\n this.writeValue(value);\n this.onChanged(value);\n }\n\n focusInput(): void {\n this.inputElement().nativeElement.focus();\n }\n\n writeValue(value: string | null): void {\n this.value.set(value);\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n onClear(): void {\n this.onValueChange(null);\n }\n\n onFocusHandle($event: FocusEvent): void {\n this.focus.emit($event);\n }\n\n onBlurHandle($event: FocusEvent): void {\n this.blur.emit($event);\n }\n\n onKeyup($event: KeyboardEvent): void {\n this.keyup.emit($event);\n }\n}\n","<ap-input-group>\n <ap-symbol symbolId=\"search-alternate\" />\n <input\n #input\n apInput\n [id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [ngModel]=\"value()\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange($event)\" />\n @if (clearable() && value()) {\n <div\n class=\"close\"\n tabindex=\"0\"\n (click)=\"onClear()\"\n (keyup)=\"onClear()\">\n <ap-symbol\n aria-label=\"close-snackbar\"\n size=\"20px\"\n symbolId=\"delete-no-circle\" />\n </div>\n }\n</ap-input-group>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAkBA,IAAI,aAAa,GAAG,CAAC,CAAC;MAmBT,oBAAoB,CAAA;AAC7B,IAAA,EAAE,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;AACvB,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;AAChC,IAAA,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IAExB,KAAK,GAAG,MAAM,EAAc,CAAC;IAC7B,IAAI,GAAG,MAAM,EAAc,CAAC;IAC5B,KAAK,GAAG,MAAM,EAAiB,CAAC;AAEhC,IAAA,YAAY,GAAG,SAAS,CAAC,QAAQ,CAAa,OAAO,CAAC,CAAC;AAEvD,IAAA,KAAK,GAAG,MAAM,CAAgB,EAAE,CAAC,CAAC;AAClC,IAAA,cAAc,GAAG,CAAA,gBAAA,EAAmB,aAAa,EAAE,EAAE,CAAC;AAEtD,IAAA,OAA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js","sources":["../../../libs/ui-components/input-search/src/input-search.component.ts","../../../libs/ui-components/input-search/src/input-search.component.html","../../../libs/ui-components/input-search/src/agorapulse-ui-components-input-search.ts"],"sourcesContent":["import { InputDirective } from '@agorapulse/ui-components/input';\nimport { InputGroupComponent } from '@agorapulse/ui-components/input-group';\nimport { SymbolComponent, SymbolRegistry, apDeleteNoCircle, apSearch } from '@agorapulse/ui-symbol';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n ViewEncapsulation,\n computed,\n forwardRef,\n inject,\n input,\n output,\n signal,\n viewChild,\n} from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nlet inputSearchId = 0;\n\n@Component({\n selector: 'ap-input-search',\n templateUrl: './input-search.component.html',\n styleUrls: ['./input-search.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [InputGroupComponent, InputDirective, FormsModule, SymbolComponent],\n\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputSearchComponent),\n multi: true,\n },\n ],\n})\nexport class InputSearchComponent implements ControlValueAccessor {\n id = input<string>('');\n placeholder = input<string>('');\n clearable = input(true);\n\n focus = output<FocusEvent>();\n blur = output<FocusEvent>();\n keyup = output<KeyboardEvent>();\n\n inputElement = viewChild.required<ElementRef>('input');\n\n value = signal<string | null>('');\n defaultInputId = `ap-input-search-${inputSearchId++}`;\n\n inputId = computed(() => this.id() ?? this.defaultInputId);\n\n disabled = signal(false);\n\n onTouched: () => void = () => {};\n\n onChanged: (value: any) => void = () => {};\n\n private symbolRegistry = inject(SymbolRegistry);\n\n constructor() {\n this.symbolRegistry.registerSymbols([apSearch, apDeleteNoCircle]);\n }\n\n registerOnChange(fn: (value: string | null) => void): void {\n this.onChanged = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n onValueChange(value: string | null) {\n this.writeValue(value);\n this.onChanged(value);\n }\n\n focusInput(): void {\n this.inputElement().nativeElement.focus();\n }\n\n writeValue(value: string | null): void {\n this.value.set(value);\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled.set(isDisabled);\n }\n\n onClear(): void {\n this.onValueChange(null);\n }\n\n onFocusHandle($event: FocusEvent): void {\n this.focus.emit($event);\n }\n\n onBlurHandle($event: FocusEvent): void {\n this.blur.emit($event);\n }\n\n onKeyup($event: KeyboardEvent): void {\n this.keyup.emit($event);\n }\n}\n","<ap-input-group>\n <ap-symbol symbolId=\"search\" />\n <input\n #input\n apInput\n [id]=\"inputId()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [ngModel]=\"value()\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange($event)\" />\n @if (clearable() && value()) {\n <div\n class=\"close\"\n tabindex=\"0\"\n (click)=\"onClear()\"\n (keyup)=\"onClear()\">\n <ap-symbol\n aria-label=\"close-snackbar\"\n symbolId=\"delete-no-circle\"\n size=\"xs\"\n />\n </div>\n }\n</ap-input-group>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAkBA,IAAI,aAAa,GAAG,CAAC,CAAC;MAmBT,oBAAoB,CAAA;AAC7B,IAAA,EAAE,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;AACvB,IAAA,WAAW,GAAG,KAAK,CAAS,EAAE,CAAC,CAAC;AAChC,IAAA,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IAExB,KAAK,GAAG,MAAM,EAAc,CAAC;IAC7B,IAAI,GAAG,MAAM,EAAc,CAAC;IAC5B,KAAK,GAAG,MAAM,EAAiB,CAAC;AAEhC,IAAA,YAAY,GAAG,SAAS,CAAC,QAAQ,CAAa,OAAO,CAAC,CAAC;AAEvD,IAAA,KAAK,GAAG,MAAM,CA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AA,MAAA,EAAA,CAAA,8XAAA,CAAA,EAAA,CAAA;;;AEnCL;;AAEG;;;;"}
@@ -38,11 +38,11 @@ class LabelComponent {
38
38
  this.remove.emit({ content: this.content, $event });
39
39
  }
40
40
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
41
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: LabelComponent, isStandalone: true, selector: "ap-label", inputs: { content: "content", selectorWidth: "selectorWidth", removable: ["removable", "removable", booleanAttribute] }, outputs: { remove: "remove" }, ngImport: i0, template: "<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <button\n type=\"button\"\n class=\"delete-button\"\n (click)=\"onClearLabel($event)\">\n <ap-symbol\n symbolId=\"remove-bold\"\n size=\"pico\" />\n </button>\n }\n</div>\n", styles: ["ap-label{display:flex;--button-size: calc(var(--comp-label-height) - 4px);--max-width: 180px}ap-label .label{padding:0 var(--ref-spacing-xxs);color:var(--comp-label-text-color);align-self:center;background:var(--comp-label-background-color);border-radius:var(--comp-label-border-radius);text-wrap:none;display:flex;align-items:center;border:none;padding:0 var(--comp-label-padding-right) 0 var(--comp-label-padding-left);height:var(--comp-label-height);box-sizing:border-box;text-overflow:ellipsis}ap-label .label.removable{gap:var(--comp-label-closable-spacing);padding:0 var(--comp-label-closable-padding-right) 0 var(--ref-spacing-xxs)}ap-label .label .label-content{max-width:var(--max-width);color:var(--comp-label-text-color);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--comp-label-text-style-font-family);font-size:var(--comp-label-text-style-size);line-height:var(--comp-label-text-style-line-height);font-weight:var(--comp-label-text-style-font-weight)}ap-label .label .delete-button{display:flex;align-items:center;justify-content:center;border:none;background:transparent;align-self:center;cursor:pointer;max-width:var(--button-size);width:var(--button-size);height:var(--button-size);max-height:var(--button-size);border-radius:100%}ap-label .label .delete-button ap-symbol{color:var(--ref-color-grey-80)}ap-label .label .delete-button:hover{background-color:#3445631a}ap-label .label .delete-button:hover ap-symbol{color:var(--ref-color-grey-100)}ap-label .label .delete-button:focus{-webkit-box-shadow:0px 0px 0px 1px var(--ref-color-white),0px 0px 0px 3px var(--ref-color-electric-blue-100);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}ap-label .label .delete-button:active{background-color:#34456333}ap-label .label .delete-button:active ap-symbol{color:var(--ref-color-grey-100)}\n"], dependencies: [{ kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltipPosition", "apTooltip", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
41
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.3", type: LabelComponent, isStandalone: true, selector: "ap-label", inputs: { content: "content", selectorWidth: "selectorWidth", removable: ["removable", "removable", booleanAttribute] }, outputs: { remove: "remove" }, ngImport: i0, template: "<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <button\n type=\"button\"\n class=\"delete-button\"\n (click)=\"onClearLabel($event)\">\n <ap-symbol\n symbolId=\"remove-bold\"\n size=\"xs\" />\n </button>\n }\n</div>\n", styles: ["ap-label{display:flex;--button-size: calc(var(--comp-label-height) - 4px);--max-width: 180px}ap-label .label{padding:0 var(--ref-spacing-xxs);color:var(--comp-label-text-color);align-self:center;background:var(--comp-label-background-color);border-radius:var(--comp-label-border-radius);text-wrap:none;display:flex;align-items:center;border:none;padding:0 var(--comp-label-padding-right) 0 var(--comp-label-padding-left);height:var(--comp-label-height);box-sizing:border-box;text-overflow:ellipsis}ap-label .label.removable{gap:var(--comp-label-closable-spacing);padding:0 var(--comp-label-closable-padding-right) 0 var(--ref-spacing-xxs)}ap-label .label .label-content{max-width:var(--max-width);color:var(--comp-label-text-color);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--comp-label-text-style-font-family);font-size:var(--comp-label-text-style-size);line-height:var(--comp-label-text-style-line-height);font-weight:var(--comp-label-text-style-font-weight)}ap-label .label .delete-button{display:flex;align-items:center;justify-content:center;border:none;background:transparent;align-self:center;cursor:pointer;max-width:var(--button-size);width:var(--button-size);height:var(--button-size);max-height:var(--button-size);border-radius:100%}ap-label .label .delete-button ap-symbol{color:var(--ref-color-grey-80)}ap-label .label .delete-button:hover{background-color:#3445631a}ap-label .label .delete-button:hover ap-symbol{color:var(--ref-color-grey-100)}ap-label .label .delete-button:focus{-webkit-box-shadow:0px 0px 0px 1px var(--ref-color-white),0px 0px 0px 3px var(--ref-color-electric-blue-100);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}ap-label .label .delete-button:active{background-color:#34456333}ap-label .label .delete-button:active ap-symbol{color:var(--ref-color-grey-100)}\n"], dependencies: [{ kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltipPosition", "apTooltip", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTemplateContext", "apTooltipVirtualScrollElement"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
42
42
  }
43
43
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: LabelComponent, decorators: [{
44
44
  type: Component,
45
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-label', standalone: true, imports: [NgClass, TooltipDirective, SymbolComponent], encapsulation: ViewEncapsulation.None, template: "<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <button\n type=\"button\"\n class=\"delete-button\"\n (click)=\"onClearLabel($event)\">\n <ap-symbol\n symbolId=\"remove-bold\"\n size=\"pico\" />\n </button>\n }\n</div>\n", styles: ["ap-label{display:flex;--button-size: calc(var(--comp-label-height) - 4px);--max-width: 180px}ap-label .label{padding:0 var(--ref-spacing-xxs);color:var(--comp-label-text-color);align-self:center;background:var(--comp-label-background-color);border-radius:var(--comp-label-border-radius);text-wrap:none;display:flex;align-items:center;border:none;padding:0 var(--comp-label-padding-right) 0 var(--comp-label-padding-left);height:var(--comp-label-height);box-sizing:border-box;text-overflow:ellipsis}ap-label .label.removable{gap:var(--comp-label-closable-spacing);padding:0 var(--comp-label-closable-padding-right) 0 var(--ref-spacing-xxs)}ap-label .label .label-content{max-width:var(--max-width);color:var(--comp-label-text-color);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--comp-label-text-style-font-family);font-size:var(--comp-label-text-style-size);line-height:var(--comp-label-text-style-line-height);font-weight:var(--comp-label-text-style-font-weight)}ap-label .label .delete-button{display:flex;align-items:center;justify-content:center;border:none;background:transparent;align-self:center;cursor:pointer;max-width:var(--button-size);width:var(--button-size);height:var(--button-size);max-height:var(--button-size);border-radius:100%}ap-label .label .delete-button ap-symbol{color:var(--ref-color-grey-80)}ap-label .label .delete-button:hover{background-color:#3445631a}ap-label .label .delete-button:hover ap-symbol{color:var(--ref-color-grey-100)}ap-label .label .delete-button:focus{-webkit-box-shadow:0px 0px 0px 1px var(--ref-color-white),0px 0px 0px 3px var(--ref-color-electric-blue-100);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}ap-label .label .delete-button:active{background-color:#34456333}ap-label .label .delete-button:active ap-symbol{color:var(--ref-color-grey-100)}\n"] }]
45
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-label', standalone: true, imports: [NgClass, TooltipDirective, SymbolComponent], encapsulation: ViewEncapsulation.None, template: "<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <button\n type=\"button\"\n class=\"delete-button\"\n (click)=\"onClearLabel($event)\">\n <ap-symbol\n symbolId=\"remove-bold\"\n size=\"xs\" />\n </button>\n }\n</div>\n", styles: ["ap-label{display:flex;--button-size: calc(var(--comp-label-height) - 4px);--max-width: 180px}ap-label .label{padding:0 var(--ref-spacing-xxs);color:var(--comp-label-text-color);align-self:center;background:var(--comp-label-background-color);border-radius:var(--comp-label-border-radius);text-wrap:none;display:flex;align-items:center;border:none;padding:0 var(--comp-label-padding-right) 0 var(--comp-label-padding-left);height:var(--comp-label-height);box-sizing:border-box;text-overflow:ellipsis}ap-label .label.removable{gap:var(--comp-label-closable-spacing);padding:0 var(--comp-label-closable-padding-right) 0 var(--ref-spacing-xxs)}ap-label .label .label-content{max-width:var(--max-width);color:var(--comp-label-text-color);display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--comp-label-text-style-font-family);font-size:var(--comp-label-text-style-size);line-height:var(--comp-label-text-style-line-height);font-weight:var(--comp-label-text-style-font-weight)}ap-label .label .delete-button{display:flex;align-items:center;justify-content:center;border:none;background:transparent;align-self:center;cursor:pointer;max-width:var(--button-size);width:var(--button-size);height:var(--button-size);max-height:var(--button-size);border-radius:100%}ap-label .label .delete-button ap-symbol{color:var(--ref-color-grey-80)}ap-label .label .delete-button:hover{background-color:#3445631a}ap-label .label .delete-button:hover ap-symbol{color:var(--ref-color-grey-100)}ap-label .label .delete-button:focus{-webkit-box-shadow:0px 0px 0px 1px var(--ref-color-white),0px 0px 0px 3px var(--ref-color-electric-blue-100);box-shadow:0 0 0 1px var(--ref-color-white),0 0 0 3px var(--ref-color-electric-blue-100)}ap-label .label .delete-button:active{background-color:#34456333}ap-label .label .delete-button:active ap-symbol{color:var(--ref-color-grey-100)}\n"] }]
46
46
  }], ctorParameters: () => [], propDecorators: { content: [{
47
47
  type: Input,
48
48
  args: [{
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components-labels.mjs","sources":["../../../libs/ui-components/labels/src/label.component.ts","../../../libs/ui-components/labels/src/label.component.html","../../../libs/ui-components/labels/src/label-list.component.ts","../../../libs/ui-components/labels/src/label-list.component.html","../../../libs/ui-components/labels/src/agorapulse-ui-components-labels.ts"],"sourcesContent":["import { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { apRemoveBold, SymbolComponent, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport { NgClass } from '@angular/common';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n NgZone,\n OnDestroy,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-label',\n standalone: true,\n templateUrl: './label.component.html',\n imports: [NgClass, TooltipDirective, SymbolComponent],\n styleUrls: ['./label.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class LabelComponent implements AfterViewInit, OnDestroy {\n private elementRef: ElementRef = inject(ElementRef);\n private symbolRegistry: SymbolRegistry = inject(SymbolRegistry);\n private zone: NgZone = inject(NgZone);\n\n @Input({\n required: true,\n })\n content!: string;\n @Input() selectorWidth: number = 0; //Width of the selector input, if applicable\n @Input({ transform: booleanAttribute }) removable: boolean = false;\n\n @Output() remove = new EventEmitter<{ content: string; $event: MouseEvent }>();\n\n private observer: ResizeObserver | undefined = undefined;\n tooltipEnabled: boolean = false;\n\n constructor() {\n this.symbolRegistry.registerSymbols([apRemoveBold]);\n }\n\n ngAfterViewInit(): void {\n this.observer = new ResizeObserver(entries => {\n this.zone.run(() => {\n const containerWidth =\n this.elementRef.nativeElement.clientWidth > 0 ? this.elementRef.nativeElement.clientWidth : this.selectorWidth;\n if (containerWidth > 0) {\n this.tooltipEnabled = entries[0].target.scrollWidth > containerWidth;\n }\n });\n });\n this.observer.observe(this.elementRef.nativeElement.getElementsByClassName('label-content')[0]);\n }\n\n ngOnDestroy() {\n this.observer?.unobserve(this.elementRef.nativeElement.children[0]);\n }\n\n onClearLabel($event: MouseEvent) {\n this.elementRef.nativeElement.remove();\n this.remove.emit({ content: this.content, $event });\n }\n}\n","<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <button\n type=\"button\"\n class=\"delete-button\"\n (click)=\"onClearLabel($event)\">\n <ap-symbol\n symbolId=\"remove-bold\"\n size=\"pico\" />\n </button>\n }\n</div>\n","import { TextMeasurementService } from '@agorapulse/ui-components/text-measurement';\n\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { LabelComponent } from './label.component';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-label-list',\n templateUrl: './label-list.component.html',\n styleUrls: ['./label-list.component.scss'],\n standalone: true,\n imports: [LabelComponent],\n})\nexport class LabelListComponent implements AfterContentInit, OnChanges, OnDestroy {\n @Input() labels: string[] = [];\n @Input() removeLabelsEnabled: boolean = false;\n @Input() responsive: boolean = false;\n @Input() seeLessTranslation: string = 'See less';\n @Input() hiddenLabelsTranslation: string = 'labels';\n @Output() removeLabel = new EventEmitter<string>();\n\n badgeWidth: number = 0;\n expanded: boolean = false;\n howManyItemsLeft = 0;\n responsiveLabels: string[] = [];\n\n private observer: ResizeObserver;\n private width$ = new BehaviorSubject<number>(0);\n\n constructor(\n private changeDetectorRef: ChangeDetectorRef,\n private elementRef: ElementRef,\n private textMeasurementService: TextMeasurementService,\n private zone: NgZone\n ) {\n this.observer = new ResizeObserver(entries => {\n this.zone.run(() => {\n this.width$.next(entries[0].contentRect.width);\n });\n });\n }\n\n ngAfterContentInit(): void {\n if (this.responsive) {\n this.generateResponsiveLabels(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0].offsetWidth);\n\n this.observer.observe(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0]);\n this.width$.subscribe(width => {\n this.generateResponsiveLabels(width);\n });\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.labels.currentValue && this.responsive) {\n this.generateResponsiveLabels(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0].offsetWidth);\n }\n }\n\n ngOnDestroy() {\n this.observer.unobserve(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0]);\n }\n\n onExpand() {\n this.expanded = !this.expanded;\n }\n\n onRemoveLabel({ content }: { content: string }): void {\n this.removeLabel.emit(content);\n }\n\n onResize() {\n this.generateResponsiveLabels(this.elementRef.nativeElement.children[0].offsetWidth);\n }\n\n public trackByLabelContent(_: number, entry: string) {\n return entry;\n }\n\n private generateResponsiveLabels(width: number) {\n let seeMoreElementWidth = this.textMeasurementService.calculateTextWidth('+'.concat(this.labels.length.toString()), 14, 'Averta');\n seeMoreElementWidth += 1 + 8 + 8 + 1; // border-left + padding-left + padding-right + border-right\n let elementWidth = width - 16 - 16; // width - padding-left - padding-right\n elementWidth -= seeMoreElementWidth;\n let currentIndex = 0;\n for (let index = 0; index < this.labels.length; index++) {\n let textWidth = this.textMeasurementService.calculateTextWidth(this.labels[index], 14, 'Averta');\n textWidth += 1 + 8 + (this.removeLabelsEnabled ? 25 : 8) + 1 + 4; // border-left + padding-left + padding-right + border-right + label spacing\n elementWidth -= textWidth;\n if (elementWidth <= 0) {\n break;\n }\n currentIndex = index;\n }\n if (currentIndex + 1 === this.labels.length) {\n this.expanded = false;\n }\n this.howManyItemsLeft = this.labels.length - (currentIndex + 1);\n this.badgeWidth =\n this.howManyItemsLeft > 0 && currentIndex === 0\n ? this.textMeasurementService.calculateTextWidth('+' + this.howManyItemsLeft, 14, 'Averta') + 22\n : 0;\n this.responsiveLabels = this.labels.slice(0, currentIndex + 1);\n this.changeDetectorRef.markForCheck();\n }\n}\n","<div\n class=\"labels-list\"\n (window:resize)=\"onResize()\">\n @if (responsive) {\n @for (label of expanded ? labels : responsiveLabels; track label) {\n <ap-label\n [content]=\"label\"\n [style.max-width]=\"!expanded ? 'calc(100% - ' + badgeWidth + 'px)' : '100%'\"\n [removable]=\"removeLabelsEnabled\"\n (remove)=\"onRemoveLabel($event)\" />\n }\n @if (!expanded && responsiveLabels.length !== labels.length && howManyItemsLeft > 0) {\n <a\n class=\"standalone\"\n role=\"button\"\n (click)=\"onExpand()\">\n +{{ howManyItemsLeft }} {{ hiddenLabelsTranslation }}\n </a>\n }\n @if (expanded) {\n <a\n class=\"standalone\"\n role=\"button\"\n (click)=\"onExpand()\">\n {{ seeLessTranslation }}\n </a>\n }\n } @else {\n @for (label of labels; track trackByLabelContent($index, label)) {\n <ap-label\n [content]=\"label\"\n [removable]=\"removeLabelsEnabled\"\n (remove)=\"onRemoveLabel($event)\" />\n }\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;MA2Ba,cAAc,CAAA;AACf,IAAA,UAAU,GAAe,MAAM,CAAC,UAAU,CAAC,CAAC;AAC5C,IAAA,cAAc,GAAmB,MAAM,CAAC,cAAc,CAAC,CAAC;AACxD,IAAA,IAAI,GAAW,MAAM,CAAC,MAAM,CAAC,CAAC;AAKtC,IAAA,OAAO,CAAU;AACR,IAAA,aAAa,GAAW,CAAC,CAAC;IACK,SAAS,GAAY,KAAK,CAAC;AAEzD,IAAA,MAAM,GAAG,IAAI,YAAY,EA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,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAEf,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAR9B,SAAS;sCACW,uBAAuB,CAAC,MAAM,EACrC,QAAA,EAAA,eAAe,cAGb,IAAI,EAAA,OAAA,EACP,CAAC,cAAc,CAAC,EAAA,QAAA,EAAA,kwCAAA,EAAA,MAAA,EAAA,CAAA,o3LAAA,CAAA,EAAA,CAAA;yKAGhB,MAAM,EAAA,CAAA;sBAAd,KAAK;gBACG,mBAAmB,EAAA,CAAA;sBAA3B,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,kBAAkB,EAAA,CAAA;sBAA1B,KAAK;gBACG,uBAAuB,EAAA,CAAA;sBAA/B,KAAK;gBACI,WAAW,EAAA,CAAA;sBAApB,MAAM;;;AEjCX;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-components-labels.mjs","sources":["../../../libs/ui-components/labels/src/label.component.ts","../../../libs/ui-components/labels/src/label.component.html","../../../libs/ui-components/labels/src/label-list.component.ts","../../../libs/ui-components/labels/src/label-list.component.html","../../../libs/ui-components/labels/src/agorapulse-ui-components-labels.ts"],"sourcesContent":["import { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { apRemoveBold, SymbolComponent, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport { NgClass } from '@angular/common';\nimport {\n AfterViewInit,\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n NgZone,\n OnDestroy,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-label',\n standalone: true,\n templateUrl: './label.component.html',\n imports: [NgClass, TooltipDirective, SymbolComponent],\n styleUrls: ['./label.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class LabelComponent implements AfterViewInit, OnDestroy {\n private elementRef: ElementRef = inject(ElementRef);\n private symbolRegistry: SymbolRegistry = inject(SymbolRegistry);\n private zone: NgZone = inject(NgZone);\n\n @Input({\n required: true,\n })\n content!: string;\n @Input() selectorWidth: number = 0; //Width of the selector input, if applicable\n @Input({ transform: booleanAttribute }) removable: boolean = false;\n\n @Output() remove = new EventEmitter<{ content: string; $event: MouseEvent }>();\n\n private observer: ResizeObserver | undefined = undefined;\n tooltipEnabled: boolean = false;\n\n constructor() {\n this.symbolRegistry.registerSymbols([apRemoveBold]);\n }\n\n ngAfterViewInit(): void {\n this.observer = new ResizeObserver(entries => {\n this.zone.run(() => {\n const containerWidth =\n this.elementRef.nativeElement.clientWidth > 0 ? this.elementRef.nativeElement.clientWidth : this.selectorWidth;\n if (containerWidth > 0) {\n this.tooltipEnabled = entries[0].target.scrollWidth > containerWidth;\n }\n });\n });\n this.observer.observe(this.elementRef.nativeElement.getElementsByClassName('label-content')[0]);\n }\n\n ngOnDestroy() {\n this.observer?.unobserve(this.elementRef.nativeElement.children[0]);\n }\n\n onClearLabel($event: MouseEvent) {\n this.elementRef.nativeElement.remove();\n this.remove.emit({ content: this.content, $event });\n }\n}\n","<div\n class=\"label\"\n [class.removable]=\"removable\"\n [apTooltip]=\"tooltipEnabled ? content : ''\">\n <span class=\"label-content\">{{ content }}</span>\n @if (removable) {\n <button\n type=\"button\"\n class=\"delete-button\"\n (click)=\"onClearLabel($event)\">\n <ap-symbol\n symbolId=\"remove-bold\"\n size=\"xs\" />\n </button>\n }\n</div>\n","import { TextMeasurementService } from '@agorapulse/ui-components/text-measurement';\n\nimport {\n AfterContentInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n Output,\n SimpleChanges,\n} from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\nimport { LabelComponent } from './label.component';\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-label-list',\n templateUrl: './label-list.component.html',\n styleUrls: ['./label-list.component.scss'],\n standalone: true,\n imports: [LabelComponent],\n})\nexport class LabelListComponent implements AfterContentInit, OnChanges, OnDestroy {\n @Input() labels: string[] = [];\n @Input() removeLabelsEnabled: boolean = false;\n @Input() responsive: boolean = false;\n @Input() seeLessTranslation: string = 'See less';\n @Input() hiddenLabelsTranslation: string = 'labels';\n @Output() removeLabel = new EventEmitter<string>();\n\n badgeWidth: number = 0;\n expanded: boolean = false;\n howManyItemsLeft = 0;\n responsiveLabels: string[] = [];\n\n private observer: ResizeObserver;\n private width$ = new BehaviorSubject<number>(0);\n\n constructor(\n private changeDetectorRef: ChangeDetectorRef,\n private elementRef: ElementRef,\n private textMeasurementService: TextMeasurementService,\n private zone: NgZone\n ) {\n this.observer = new ResizeObserver(entries => {\n this.zone.run(() => {\n this.width$.next(entries[0].contentRect.width);\n });\n });\n }\n\n ngAfterContentInit(): void {\n if (this.responsive) {\n this.generateResponsiveLabels(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0].offsetWidth);\n\n this.observer.observe(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0]);\n this.width$.subscribe(width => {\n this.generateResponsiveLabels(width);\n });\n }\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.labels.currentValue && this.responsive) {\n this.generateResponsiveLabels(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0].offsetWidth);\n }\n }\n\n ngOnDestroy() {\n this.observer.unobserve(this.elementRef.nativeElement.getElementsByClassName('labels-list')[0]);\n }\n\n onExpand() {\n this.expanded = !this.expanded;\n }\n\n onRemoveLabel({ content }: { content: string }): void {\n this.removeLabel.emit(content);\n }\n\n onResize() {\n this.generateResponsiveLabels(this.elementRef.nativeElement.children[0].offsetWidth);\n }\n\n public trackByLabelContent(_: number, entry: string) {\n return entry;\n }\n\n private generateResponsiveLabels(width: number) {\n let seeMoreElementWidth = this.textMeasurementService.calculateTextWidth('+'.concat(this.labels.length.toString()), 14, 'Averta');\n seeMoreElementWidth += 1 + 8 + 8 + 1; // border-left + padding-left + padding-right + border-right\n let elementWidth = width - 16 - 16; // width - padding-left - padding-right\n elementWidth -= seeMoreElementWidth;\n let currentIndex = 0;\n for (let index = 0; index < this.labels.length; index++) {\n let textWidth = this.textMeasurementService.calculateTextWidth(this.labels[index], 14, 'Averta');\n textWidth += 1 + 8 + (this.removeLabelsEnabled ? 25 : 8) + 1 + 4; // border-left + padding-left + padding-right + border-right + label spacing\n elementWidth -= textWidth;\n if (elementWidth <= 0) {\n break;\n }\n currentIndex = index;\n }\n if (currentIndex + 1 === this.labels.length) {\n this.expanded = false;\n }\n this.howManyItemsLeft = this.labels.length - (currentIndex + 1);\n this.badgeWidth =\n this.howManyItemsLeft > 0 && currentIndex === 0\n ? this.textMeasurementService.calculateTextWidth('+' + this.howManyItemsLeft, 14, 'Averta') + 22\n : 0;\n this.responsiveLabels = this.labels.slice(0, currentIndex + 1);\n this.changeDetectorRef.markForCheck();\n }\n}\n","<div\n class=\"labels-list\"\n (window:resize)=\"onResize()\">\n @if (responsive) {\n @for (label of expanded ? labels : responsiveLabels; track label) {\n <ap-label\n [content]=\"label\"\n [style.max-width]=\"!expanded ? 'calc(100% - ' + badgeWidth + 'px)' : '100%'\"\n [removable]=\"removeLabelsEnabled\"\n (remove)=\"onRemoveLabel($event)\" />\n }\n @if (!expanded && responsiveLabels.length !== labels.length && howManyItemsLeft > 0) {\n <a\n class=\"standalone\"\n role=\"button\"\n (click)=\"onExpand()\">\n +{{ howManyItemsLeft }} {{ hiddenLabelsTranslation }}\n </a>\n }\n @if (expanded) {\n <a\n class=\"standalone\"\n role=\"button\"\n (click)=\"onExpand()\">\n {{ seeLessTranslation }}\n </a>\n }\n } @else {\n @for (label of labels; track trackByLabelContent($index, label)) {\n <ap-label\n [content]=\"label\"\n [removable]=\"removeLabelsEnabled\"\n (remove)=\"onRemoveLabel($event)\" />\n }\n }\n</div>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EAAA,YAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,uBAAA,EAAA,yBAAA,EAAA,EAAA,OAAA,EAAA,EAAA,WAAA,EAAA,aAAA,EAAA,EAAA,aAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EC3B/B,kwCAoCA,EAAA,MAAA,EAAA,CAAA,o3LAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDXc,cAAc,EAAA,QAAA,EAAA,UAAA,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,eAAA,EAAA,WAAA,CAAA,EAAA,OAAA,EAAA,CAAA,QAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAEf,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAR9B,SAAS;sCACW,uBAAuB,CAAC,MAAM,EACrC,QAAA,EAAA,eAAe,cAGb,IAAI,EAAA,OAAA,EACP,CAAC,cAAc,CAAC,EAAA,QAAA,EAAA,kwCAAA,EAAA,MAAA,EAAA,CAAA,o3LAAA,CAAA,EAAA,CAAA;yKAGhB,MAAM,EAAA,CAAA;sBAAd,KAAK;gBACG,mBAAmB,EAAA,CAAA;sBAA3B,KAAK;gBACG,UAAU,EAAA,CAAA;sBAAlB,KAAK;gBACG,kBAAkB,EAAA,CAAA;sBAA1B,KAAK;gBACG,uBAAuB,EAAA,CAAA;sBAA/B,KAAK;gBACI,WAAW,EAAA,CAAA;sBAApB,MAAM;;;AEjCX;;AAEG;;;;"}
@@ -1,4 +1,4 @@
1
- import { SymbolRegistry, apAlertCircle, apCheckCircle, apClose, apSearchAlternate, SymbolComponent } from '@agorapulse/ui-symbol';
1
+ import { SymbolRegistry, apErrorFill, apRoundedCheckFill, apClose, apSearch, SymbolComponent } from '@agorapulse/ui-symbol';
2
2
  import * as i0 from '@angular/core';
3
3
  import { forwardRef, inject, ElementRef, EventEmitter, signal, booleanAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, ContentChildren, ViewChild, Input, Output } from '@angular/core';
4
4
  import * as i1 from '@angular/forms';
@@ -9,7 +9,7 @@ const AP_INPUT_CONTROL_VALUE_ACCESSOR = {
9
9
  useExisting: forwardRef(() => InputComponent),
10
10
  multi: true,
11
11
  };
12
- const SEARCH_SYMBOL_ID = 'search-alternate';
12
+ const SEARCH_SYMBOL_ID = 'search';
13
13
  /**
14
14
  * @deprecated use native input with directive apInput, ap-input-group and ap-form-field instead
15
15
  */
@@ -57,7 +57,7 @@ class InputComponent {
57
57
  }
58
58
  this.hostDataTest.set(this.elementRef.nativeElement.getAttribute('data-test'));
59
59
  this.elementRef.nativeElement.removeAttribute('data-test');
60
- this.symbolRegistry.registerSymbols([apAlertCircle, apCheckCircle, apClose, apSearchAlternate]);
60
+ this.symbolRegistry.registerSymbols([apErrorFill, apRoundedCheckFill, apClose, apSearch]);
61
61
  }
62
62
  // Sometimes attributes like the id, or the data-test are dynamic and can change between the constructor and the initialization.
63
63
  // In order to have the last attributes value we check if it changes, and if it does, we run a mark for check to update the view.
@@ -119,7 +119,7 @@ class InputComponent {
119
119
  useExisting: InputComponent,
120
120
  multi: true,
121
121
  },
122
- ], queries: [{ propertyName: "symbols", predicate: SymbolComponent }], viewQueries: [{ propertyName: "symbolWrapper", first: true, predicate: ["symbol"], descendants: true }, { propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "@if (label) {\n <label [for]=\"inputId\">\n <span>\n {{ label }}\n </span>\n @if (description) {\n <span class=\"description\">\n {{ description }}\n </span>\n }\n </label>\n}\n\n<div\n tabindex=\"0\"\n class=\"input-wrapper\"\n [class.inverse]=\"symbolPosition === 'left'\"\n [class.with-icon]=\"symbolId\"\n [class.with-prefix]=\"prefix\"\n [class.with-suffix]=\"suffix\"\n [class.with-error]=\"errorMessage\"\n [class.with-success]=\"successMessage\"\n [class.disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-describedby]=\"ariaDescribedBy || null\"\n [attr.aria-disabled]=\"disabled?.toString()\"\n (click)=\"focusInput()\"\n (keydown.enter)=\"focusInput()\">\n @if (prefix) {\n <div class=\"prefix\">\n <span>\n {{ prefix }}\n </span>\n <span class=\"divider\"></span>\n </div>\n }\n <div class=\"content\">\n <input\n #input\n [type]=\"inputType\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [id]=\"inputId ?? ''\"\n [attr.data-test]=\"hostDataTest() ? hostDataTest() : name\"\n [(ngModel)]=\"value\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange()\" />\n @if (clearable) {\n <button\n type=\"button\"\n class=\"clear-button\"\n (click)=\"onClear()\">\n <ap-symbol symbolId=\"close\" />\n </button>\n }\n </div>\n @if (suffix) {\n <div class=\"suffix\">\n <span class=\"divider\"></span>\n <span>\n {{ suffix }}\n </span>\n </div>\n }\n @if (symbolId) {\n <ap-symbol\n size=\"micro\"\n [symbolId]=\"symbolId\" />\n }\n</div>\n\n@if (errorMessage) {\n <div class=\"form-message error\">\n <ap-symbol\n symbolId=\"alert-circle\"\n size=\"micro\" />\n <span>\n {{ errorMessage }}\n </span>\n </div>\n}\n\n@if (successMessage) {\n <div class=\"form-message success\">\n <ap-symbol\n symbolId=\"check-circle\"\n size=\"micro\" />\n <span>\n {{ successMessage }}\n </span>\n </div>\n}\n", styles: ["ap-input{display:flex;flex-direction:column;gap:var(--comp-input-spacing-horizontal);--border-width: 1px}ap-input.full-width{width:100%}ap-input.full-width .input-wrapper{min-width:100%}ap-input label{display:flex;flex-direction:column;gap:var(--comp-forms-label-spacing-vertical);font-size:var(--comp-forms-label-size);font-weight:var(--comp-forms-label-font-weight);line-height:var(--comp-forms-label-line-height);font-family:var(--comp-forms-label-font-family);color:var(--comp-forms-label-text-color)}ap-input label .description{font-size:var(--comp-forms-label-description-text-size);font-weight:var(--comp-forms-label-description-text-font-weight);line-height:var(--comp-forms-label-description-text-line-height);font-family:var(--comp-forms-label-description-text-font-family);color:var(--comp-forms-label-description-text-color)}ap-input .input-wrapper{display:flex;align-items:center;position:relative;min-width:var(--comp-input-width-default);height:var(--comp-input-height);border:var(--border-width) solid var(--comp-input-border-default-color);box-sizing:border-box;border-radius:var(--comp-input-border-radius);overflow:hidden;background-color:var(--comp-input-fill-color)}ap-input .input-wrapper:hover:not(.disabled){border-color:var(--comp-input-border-hover-color)}ap-input .input-wrapper:focus-within:not(.disabled){border-color:var(--comp-input-border-focused-color)}ap-input .input-wrapper:focus-visible:not(.disabled){outline:none}ap-input .input-wrapper:active:not(.disabled){border-color:var(--comp-input-border-focused-color)}ap-input .input-wrapper.disabled{background-color:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input .input-wrapper .content{display:flex;gap:var(--comp-input-spacing-horizontal);flex:1;align-items:center}ap-input .input-wrapper .content input{border:none;outline:none;box-sizing:border-box;min-height:34px;max-height:34px;padding:0 var(--comp-input-padding-horizontal);flex:1;font-size:var(--comp-input-text-size);font-weight:var(--comp-input-text-font-weight);line-height:var(--comp-input-text-line-height);font-family:var(--comp-input-text-font-family);color:var(--comp-input-text-default-color);min-width:0}ap-input .input-wrapper .content input::placeholder{color:var(--comp-input-text-placeholder-color)}ap-input .input-wrapper .content input:disabled{cursor:not-allowed;pointer-events:none;background:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input .input-wrapper .content input:disabled:placeholder{color:var(--comp-input-text-placeholder-color)}ap-input .input-wrapper .content input[type=search]::-webkit-search-decoration,ap-input .input-wrapper .content input[type=search]::-webkit-search-cancel-button,ap-input .input-wrapper .content input[type=search]::-webkit-search-results-button,ap-input .input-wrapper .content input[type=search]::-webkit-search-results-decoration{display:none}ap-input .input-wrapper .content .counter{font-size:var(--comp-input-text-counter-size);font-weight:var(--comp-input-text-counter-font-weight);line-height:var(--comp-input-text-counter-line-height);font-family:var(--comp-input-text-counter-font-family);color:var(--comp-input-text-counter-color);padding-right:var(--comp-input-spacing-horizontal)}ap-input .input-wrapper .content .clear-button{display:flex;align-items:center;justify-content:center;border:none;margin:0;padding:0 var(--comp-input-spacing-horizontal) 0 0;background-color:transparent}ap-input .input-wrapper .content .clear-button:hover{cursor:pointer}ap-input .input-wrapper .content .clear-button ap-symbol{padding:0}ap-input .input-wrapper .prefix,ap-input .input-wrapper .suffix{height:100%;display:flex;justify-content:center;align-items:center;font-size:var(--sys-text-style-body-size);font-weight:var(--sys-text-style-body-weight);line-height:var(--sys-text-style-body-line-height);font-family:var(--ref-font-family);color:var(--ref-color-grey-100)}ap-input .input-wrapper .prefix .divider,ap-input .input-wrapper .suffix .divider{height:18px;width:var(--border-width);background:var(--ref-color-grey-10)}ap-input .input-wrapper ap-symbol{height:var(--comp-input-icon-size);width:var(--comp-input-icon-size);min-height:var(--comp-input-icon-size);min-width:var(--comp-input-icon-size);max-height:var(--comp-input-icon-size);max-width:var(--comp-input-icon-size);color:var(--comp-input-icon-color);padding-right:var(--comp-input-padding-horizontal);pointer-events:none;box-sizing:content-box}ap-input .input-wrapper ap-symbol:hover{cursor:text}ap-input .input-wrapper.inverse{flex-direction:row-reverse}ap-input .input-wrapper.inverse.with-icon input{padding-left:0}ap-input .input-wrapper.inverse.with-icon ap-symbol{padding-right:var(--comp-input-spacing-horizontal);padding-left:var(--comp-input-padding-horizontal)}ap-input .input-wrapper.with-icon input{padding-right:var(--ref-spacing-xxxs)}ap-input .input-wrapper.with-prefix input{padding-left:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-prefix .prefix{padding-left:var(--comp-input-padding-horizontal);gap:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-suffix input{padding-right:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-suffix .suffix{padding-right:var(--comp-input-padding-horizontal);gap:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-counter input{padding-right:0}ap-input .input-wrapper.with-error{border-color:var(--comp-input-border-error-color)}ap-input .input-wrapper.with-success{border-color:var(--comp-input-border-success-color)}.form-message{font-size:var(--comp-forms-status-text-size);font-weight:var(--comp-forms-status-text-font-weight);line-height:var(--comp-forms-status-text-line-height);font-family:var(--comp-forms-status-text-font-family);margin:0;display:flex;gap:var(--ref-spacing-xxxs)}.form-message.error{color:var(--comp-forms-status-text-error-color)}.form-message.error ap-symbol{color:var(--comp-forms-status-icon-error-color)}.form-message.success{color:var(--comp-forms-status-text-success-color)}.form-message.success ap-symbol{color:var(--comp-forms-status-icon-success-color)}form.ng-submitted ap-input.ng-valid .input-wrapper{border-color:var(--comp-input-border-success-color)}form.ng-submitted ap-input.ng-invalid .input-wrapper{border-color:var(--comp-input-border-error-color)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
122
+ ], queries: [{ propertyName: "symbols", predicate: SymbolComponent }], viewQueries: [{ propertyName: "symbolWrapper", first: true, predicate: ["symbol"], descendants: true }, { propertyName: "inputElement", first: true, predicate: ["input"], descendants: true }], ngImport: i0, template: "@if (label) {\n <label [for]=\"inputId\">\n <span>\n {{ label }}\n </span>\n @if (description) {\n <span class=\"description\">\n {{ description }}\n </span>\n }\n </label>\n}\n\n<div\n tabindex=\"0\"\n class=\"input-wrapper\"\n [class.inverse]=\"symbolPosition === 'left'\"\n [class.with-icon]=\"symbolId\"\n [class.with-prefix]=\"prefix\"\n [class.with-suffix]=\"suffix\"\n [class.with-error]=\"errorMessage\"\n [class.with-success]=\"successMessage\"\n [class.disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-describedby]=\"ariaDescribedBy || null\"\n [attr.aria-disabled]=\"disabled?.toString()\"\n (click)=\"focusInput()\"\n (keydown.enter)=\"focusInput()\">\n @if (prefix) {\n <div class=\"prefix\">\n <span>\n {{ prefix }}\n </span>\n <span class=\"divider\"></span>\n </div>\n }\n <div class=\"content\">\n <input\n #input\n [type]=\"inputType\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [id]=\"inputId ?? ''\"\n [attr.data-test]=\"hostDataTest() ? hostDataTest() : name\"\n [(ngModel)]=\"value\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange()\" />\n @if (clearable) {\n <button\n type=\"button\"\n class=\"clear-button\"\n (click)=\"onClear()\">\n <ap-symbol symbolId=\"close\" />\n </button>\n }\n </div>\n @if (suffix) {\n <div class=\"suffix\">\n <span class=\"divider\"></span>\n <span>\n {{ suffix }}\n </span>\n </div>\n }\n @if (symbolId) {\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"symbolId\" />\n }\n</div>\n\n@if (errorMessage) {\n <div class=\"form-message error\">\n <ap-symbol\n symbolId=\"error_fill\"\n size=\"sm\" />\n <span>\n {{ errorMessage }}\n </span>\n </div>\n}\n\n@if (successMessage) {\n <div class=\"form-message success\">\n <ap-symbol\n symbolId=\"rounded-check_fill\"\n size=\"sm\" />\n <span>\n {{ successMessage }}\n </span>\n </div>\n}\n", styles: ["ap-input{display:flex;flex-direction:column;gap:var(--comp-input-spacing-horizontal);--border-width: 1px}ap-input.full-width{width:100%}ap-input.full-width .input-wrapper{min-width:100%}ap-input label{display:flex;flex-direction:column;gap:var(--comp-forms-label-spacing-vertical);font-size:var(--comp-forms-label-size);font-weight:var(--comp-forms-label-font-weight);line-height:var(--comp-forms-label-line-height);font-family:var(--comp-forms-label-font-family);color:var(--comp-forms-label-text-color)}ap-input label .description{font-size:var(--comp-forms-label-description-text-size);font-weight:var(--comp-forms-label-description-text-font-weight);line-height:var(--comp-forms-label-description-text-line-height);font-family:var(--comp-forms-label-description-text-font-family);color:var(--comp-forms-label-description-text-color)}ap-input .input-wrapper{display:flex;align-items:center;position:relative;min-width:var(--comp-input-width-default);height:var(--comp-input-height);border:var(--border-width) solid var(--comp-input-border-default-color);box-sizing:border-box;border-radius:var(--comp-input-border-radius);overflow:hidden;background-color:var(--comp-input-fill-color)}ap-input .input-wrapper:hover:not(.disabled){border-color:var(--comp-input-border-hover-color)}ap-input .input-wrapper:focus-within:not(.disabled){border-color:var(--comp-input-border-focused-color)}ap-input .input-wrapper:focus-visible:not(.disabled){outline:none}ap-input .input-wrapper:active:not(.disabled){border-color:var(--comp-input-border-focused-color)}ap-input .input-wrapper.disabled{background-color:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input .input-wrapper .content{display:flex;gap:var(--comp-input-spacing-horizontal);flex:1;align-items:center}ap-input .input-wrapper .content input{border:none;outline:none;box-sizing:border-box;min-height:34px;max-height:34px;padding:0 var(--comp-input-padding-horizontal);flex:1;font-size:var(--comp-input-text-size);font-weight:var(--comp-input-text-font-weight);line-height:var(--comp-input-text-line-height);font-family:var(--comp-input-text-font-family);color:var(--comp-input-text-default-color);min-width:0}ap-input .input-wrapper .content input::placeholder{color:var(--comp-input-text-placeholder-color)}ap-input .input-wrapper .content input:disabled{cursor:not-allowed;pointer-events:none;background:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input .input-wrapper .content input:disabled:placeholder{color:var(--comp-input-text-placeholder-color)}ap-input .input-wrapper .content input[type=search]::-webkit-search-decoration,ap-input .input-wrapper .content input[type=search]::-webkit-search-cancel-button,ap-input .input-wrapper .content input[type=search]::-webkit-search-results-button,ap-input .input-wrapper .content input[type=search]::-webkit-search-results-decoration{display:none}ap-input .input-wrapper .content .counter{font-size:var(--comp-input-text-counter-size);font-weight:var(--comp-input-text-counter-font-weight);line-height:var(--comp-input-text-counter-line-height);font-family:var(--comp-input-text-counter-font-family);color:var(--comp-input-text-counter-color);padding-right:var(--comp-input-spacing-horizontal)}ap-input .input-wrapper .content .clear-button{display:flex;align-items:center;justify-content:center;border:none;margin:0;padding:0 var(--comp-input-spacing-horizontal) 0 0;background-color:transparent}ap-input .input-wrapper .content .clear-button:hover{cursor:pointer}ap-input .input-wrapper .content .clear-button ap-symbol{padding:0}ap-input .input-wrapper .prefix,ap-input .input-wrapper .suffix{height:100%;display:flex;justify-content:center;align-items:center;font-size:var(--sys-text-style-body-size);font-weight:var(--sys-text-style-body-weight);line-height:var(--sys-text-style-body-line-height);font-family:var(--ref-font-family);color:var(--ref-color-grey-100)}ap-input .input-wrapper .prefix .divider,ap-input .input-wrapper .suffix .divider{height:18px;width:var(--border-width);background:var(--ref-color-grey-10)}ap-input .input-wrapper ap-symbol{height:var(--comp-input-icon-size);width:var(--comp-input-icon-size);min-height:var(--comp-input-icon-size);min-width:var(--comp-input-icon-size);max-height:var(--comp-input-icon-size);max-width:var(--comp-input-icon-size);color:var(--comp-input-icon-color);padding-right:var(--comp-input-padding-horizontal);pointer-events:none;box-sizing:content-box}ap-input .input-wrapper ap-symbol:hover{cursor:text}ap-input .input-wrapper.inverse{flex-direction:row-reverse}ap-input .input-wrapper.inverse.with-icon input{padding-left:0}ap-input .input-wrapper.inverse.with-icon ap-symbol{padding-right:var(--comp-input-spacing-horizontal);padding-left:var(--comp-input-padding-horizontal)}ap-input .input-wrapper.with-icon input{padding-right:var(--ref-spacing-xxxs)}ap-input .input-wrapper.with-prefix input{padding-left:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-prefix .prefix{padding-left:var(--comp-input-padding-horizontal);gap:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-suffix input{padding-right:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-suffix .suffix{padding-right:var(--comp-input-padding-horizontal);gap:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-counter input{padding-right:0}ap-input .input-wrapper.with-error{border-color:var(--comp-input-border-error-color)}ap-input .input-wrapper.with-success{border-color:var(--comp-input-border-success-color)}.form-message{font-size:var(--comp-forms-status-text-size);font-weight:var(--comp-forms-status-text-font-weight);line-height:var(--comp-forms-status-text-line-height);font-family:var(--comp-forms-status-text-font-family);margin:0;display:flex;gap:var(--ref-spacing-xxxs)}.form-message.error{color:var(--comp-forms-status-text-error-color)}.form-message.error ap-symbol{color:var(--comp-forms-status-icon-error-color)}.form-message.success{color:var(--comp-forms-status-text-success-color)}.form-message.success ap-symbol{color:var(--comp-forms-status-icon-success-color)}form.ng-submitted ap-input.ng-valid .input-wrapper{border-color:var(--comp-input-border-success-color)}form.ng-submitted ap-input.ng-invalid .input-wrapper{border-color:var(--comp-input-border-error-color)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["color", "symbolId", "size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
123
123
  }
124
124
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: InputComponent, decorators: [{
125
125
  type: Component,
@@ -130,7 +130,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImpor
130
130
  useExisting: InputComponent,
131
131
  multi: true,
132
132
  },
133
- ], encapsulation: ViewEncapsulation.None, template: "@if (label) {\n <label [for]=\"inputId\">\n <span>\n {{ label }}\n </span>\n @if (description) {\n <span class=\"description\">\n {{ description }}\n </span>\n }\n </label>\n}\n\n<div\n tabindex=\"0\"\n class=\"input-wrapper\"\n [class.inverse]=\"symbolPosition === 'left'\"\n [class.with-icon]=\"symbolId\"\n [class.with-prefix]=\"prefix\"\n [class.with-suffix]=\"suffix\"\n [class.with-error]=\"errorMessage\"\n [class.with-success]=\"successMessage\"\n [class.disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-describedby]=\"ariaDescribedBy || null\"\n [attr.aria-disabled]=\"disabled?.toString()\"\n (click)=\"focusInput()\"\n (keydown.enter)=\"focusInput()\">\n @if (prefix) {\n <div class=\"prefix\">\n <span>\n {{ prefix }}\n </span>\n <span class=\"divider\"></span>\n </div>\n }\n <div class=\"content\">\n <input\n #input\n [type]=\"inputType\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [id]=\"inputId ?? ''\"\n [attr.data-test]=\"hostDataTest() ? hostDataTest() : name\"\n [(ngModel)]=\"value\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange()\" />\n @if (clearable) {\n <button\n type=\"button\"\n class=\"clear-button\"\n (click)=\"onClear()\">\n <ap-symbol symbolId=\"close\" />\n </button>\n }\n </div>\n @if (suffix) {\n <div class=\"suffix\">\n <span class=\"divider\"></span>\n <span>\n {{ suffix }}\n </span>\n </div>\n }\n @if (symbolId) {\n <ap-symbol\n size=\"micro\"\n [symbolId]=\"symbolId\" />\n }\n</div>\n\n@if (errorMessage) {\n <div class=\"form-message error\">\n <ap-symbol\n symbolId=\"alert-circle\"\n size=\"micro\" />\n <span>\n {{ errorMessage }}\n </span>\n </div>\n}\n\n@if (successMessage) {\n <div class=\"form-message success\">\n <ap-symbol\n symbolId=\"check-circle\"\n size=\"micro\" />\n <span>\n {{ successMessage }}\n </span>\n </div>\n}\n", styles: ["ap-input{display:flex;flex-direction:column;gap:var(--comp-input-spacing-horizontal);--border-width: 1px}ap-input.full-width{width:100%}ap-input.full-width .input-wrapper{min-width:100%}ap-input label{display:flex;flex-direction:column;gap:var(--comp-forms-label-spacing-vertical);font-size:var(--comp-forms-label-size);font-weight:var(--comp-forms-label-font-weight);line-height:var(--comp-forms-label-line-height);font-family:var(--comp-forms-label-font-family);color:var(--comp-forms-label-text-color)}ap-input label .description{font-size:var(--comp-forms-label-description-text-size);font-weight:var(--comp-forms-label-description-text-font-weight);line-height:var(--comp-forms-label-description-text-line-height);font-family:var(--comp-forms-label-description-text-font-family);color:var(--comp-forms-label-description-text-color)}ap-input .input-wrapper{display:flex;align-items:center;position:relative;min-width:var(--comp-input-width-default);height:var(--comp-input-height);border:var(--border-width) solid var(--comp-input-border-default-color);box-sizing:border-box;border-radius:var(--comp-input-border-radius);overflow:hidden;background-color:var(--comp-input-fill-color)}ap-input .input-wrapper:hover:not(.disabled){border-color:var(--comp-input-border-hover-color)}ap-input .input-wrapper:focus-within:not(.disabled){border-color:var(--comp-input-border-focused-color)}ap-input .input-wrapper:focus-visible:not(.disabled){outline:none}ap-input .input-wrapper:active:not(.disabled){border-color:var(--comp-input-border-focused-color)}ap-input .input-wrapper.disabled{background-color:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input .input-wrapper .content{display:flex;gap:var(--comp-input-spacing-horizontal);flex:1;align-items:center}ap-input .input-wrapper .content input{border:none;outline:none;box-sizing:border-box;min-height:34px;max-height:34px;padding:0 var(--comp-input-padding-horizontal);flex:1;font-size:var(--comp-input-text-size);font-weight:var(--comp-input-text-font-weight);line-height:var(--comp-input-text-line-height);font-family:var(--comp-input-text-font-family);color:var(--comp-input-text-default-color);min-width:0}ap-input .input-wrapper .content input::placeholder{color:var(--comp-input-text-placeholder-color)}ap-input .input-wrapper .content input:disabled{cursor:not-allowed;pointer-events:none;background:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input .input-wrapper .content input:disabled:placeholder{color:var(--comp-input-text-placeholder-color)}ap-input .input-wrapper .content input[type=search]::-webkit-search-decoration,ap-input .input-wrapper .content input[type=search]::-webkit-search-cancel-button,ap-input .input-wrapper .content input[type=search]::-webkit-search-results-button,ap-input .input-wrapper .content input[type=search]::-webkit-search-results-decoration{display:none}ap-input .input-wrapper .content .counter{font-size:var(--comp-input-text-counter-size);font-weight:var(--comp-input-text-counter-font-weight);line-height:var(--comp-input-text-counter-line-height);font-family:var(--comp-input-text-counter-font-family);color:var(--comp-input-text-counter-color);padding-right:var(--comp-input-spacing-horizontal)}ap-input .input-wrapper .content .clear-button{display:flex;align-items:center;justify-content:center;border:none;margin:0;padding:0 var(--comp-input-spacing-horizontal) 0 0;background-color:transparent}ap-input .input-wrapper .content .clear-button:hover{cursor:pointer}ap-input .input-wrapper .content .clear-button ap-symbol{padding:0}ap-input .input-wrapper .prefix,ap-input .input-wrapper .suffix{height:100%;display:flex;justify-content:center;align-items:center;font-size:var(--sys-text-style-body-size);font-weight:var(--sys-text-style-body-weight);line-height:var(--sys-text-style-body-line-height);font-family:var(--ref-font-family);color:var(--ref-color-grey-100)}ap-input .input-wrapper .prefix .divider,ap-input .input-wrapper .suffix .divider{height:18px;width:var(--border-width);background:var(--ref-color-grey-10)}ap-input .input-wrapper ap-symbol{height:var(--comp-input-icon-size);width:var(--comp-input-icon-size);min-height:var(--comp-input-icon-size);min-width:var(--comp-input-icon-size);max-height:var(--comp-input-icon-size);max-width:var(--comp-input-icon-size);color:var(--comp-input-icon-color);padding-right:var(--comp-input-padding-horizontal);pointer-events:none;box-sizing:content-box}ap-input .input-wrapper ap-symbol:hover{cursor:text}ap-input .input-wrapper.inverse{flex-direction:row-reverse}ap-input .input-wrapper.inverse.with-icon input{padding-left:0}ap-input .input-wrapper.inverse.with-icon ap-symbol{padding-right:var(--comp-input-spacing-horizontal);padding-left:var(--comp-input-padding-horizontal)}ap-input .input-wrapper.with-icon input{padding-right:var(--ref-spacing-xxxs)}ap-input .input-wrapper.with-prefix input{padding-left:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-prefix .prefix{padding-left:var(--comp-input-padding-horizontal);gap:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-suffix input{padding-right:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-suffix .suffix{padding-right:var(--comp-input-padding-horizontal);gap:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-counter input{padding-right:0}ap-input .input-wrapper.with-error{border-color:var(--comp-input-border-error-color)}ap-input .input-wrapper.with-success{border-color:var(--comp-input-border-success-color)}.form-message{font-size:var(--comp-forms-status-text-size);font-weight:var(--comp-forms-status-text-font-weight);line-height:var(--comp-forms-status-text-line-height);font-family:var(--comp-forms-status-text-font-family);margin:0;display:flex;gap:var(--ref-spacing-xxxs)}.form-message.error{color:var(--comp-forms-status-text-error-color)}.form-message.error ap-symbol{color:var(--comp-forms-status-icon-error-color)}.form-message.success{color:var(--comp-forms-status-text-success-color)}.form-message.success ap-symbol{color:var(--comp-forms-status-icon-success-color)}form.ng-submitted ap-input.ng-valid .input-wrapper{border-color:var(--comp-input-border-success-color)}form.ng-submitted ap-input.ng-invalid .input-wrapper{border-color:var(--comp-input-border-error-color)}\n"] }]
133
+ ], encapsulation: ViewEncapsulation.None, template: "@if (label) {\n <label [for]=\"inputId\">\n <span>\n {{ label }}\n </span>\n @if (description) {\n <span class=\"description\">\n {{ description }}\n </span>\n }\n </label>\n}\n\n<div\n tabindex=\"0\"\n class=\"input-wrapper\"\n [class.inverse]=\"symbolPosition === 'left'\"\n [class.with-icon]=\"symbolId\"\n [class.with-prefix]=\"prefix\"\n [class.with-suffix]=\"suffix\"\n [class.with-error]=\"errorMessage\"\n [class.with-success]=\"successMessage\"\n [class.disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-describedby]=\"ariaDescribedBy || null\"\n [attr.aria-disabled]=\"disabled?.toString()\"\n (click)=\"focusInput()\"\n (keydown.enter)=\"focusInput()\">\n @if (prefix) {\n <div class=\"prefix\">\n <span>\n {{ prefix }}\n </span>\n <span class=\"divider\"></span>\n </div>\n }\n <div class=\"content\">\n <input\n #input\n [type]=\"inputType\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [id]=\"inputId ?? ''\"\n [attr.data-test]=\"hostDataTest() ? hostDataTest() : name\"\n [(ngModel)]=\"value\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange()\" />\n @if (clearable) {\n <button\n type=\"button\"\n class=\"clear-button\"\n (click)=\"onClear()\">\n <ap-symbol symbolId=\"close\" />\n </button>\n }\n </div>\n @if (suffix) {\n <div class=\"suffix\">\n <span class=\"divider\"></span>\n <span>\n {{ suffix }}\n </span>\n </div>\n }\n @if (symbolId) {\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"symbolId\" />\n }\n</div>\n\n@if (errorMessage) {\n <div class=\"form-message error\">\n <ap-symbol\n symbolId=\"error_fill\"\n size=\"sm\" />\n <span>\n {{ errorMessage }}\n </span>\n </div>\n}\n\n@if (successMessage) {\n <div class=\"form-message success\">\n <ap-symbol\n symbolId=\"rounded-check_fill\"\n size=\"sm\" />\n <span>\n {{ successMessage }}\n </span>\n </div>\n}\n", styles: ["ap-input{display:flex;flex-direction:column;gap:var(--comp-input-spacing-horizontal);--border-width: 1px}ap-input.full-width{width:100%}ap-input.full-width .input-wrapper{min-width:100%}ap-input label{display:flex;flex-direction:column;gap:var(--comp-forms-label-spacing-vertical);font-size:var(--comp-forms-label-size);font-weight:var(--comp-forms-label-font-weight);line-height:var(--comp-forms-label-line-height);font-family:var(--comp-forms-label-font-family);color:var(--comp-forms-label-text-color)}ap-input label .description{font-size:var(--comp-forms-label-description-text-size);font-weight:var(--comp-forms-label-description-text-font-weight);line-height:var(--comp-forms-label-description-text-line-height);font-family:var(--comp-forms-label-description-text-font-family);color:var(--comp-forms-label-description-text-color)}ap-input .input-wrapper{display:flex;align-items:center;position:relative;min-width:var(--comp-input-width-default);height:var(--comp-input-height);border:var(--border-width) solid var(--comp-input-border-default-color);box-sizing:border-box;border-radius:var(--comp-input-border-radius);overflow:hidden;background-color:var(--comp-input-fill-color)}ap-input .input-wrapper:hover:not(.disabled){border-color:var(--comp-input-border-hover-color)}ap-input .input-wrapper:focus-within:not(.disabled){border-color:var(--comp-input-border-focused-color)}ap-input .input-wrapper:focus-visible:not(.disabled){outline:none}ap-input .input-wrapper:active:not(.disabled){border-color:var(--comp-input-border-focused-color)}ap-input .input-wrapper.disabled{background-color:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input .input-wrapper .content{display:flex;gap:var(--comp-input-spacing-horizontal);flex:1;align-items:center}ap-input .input-wrapper .content input{border:none;outline:none;box-sizing:border-box;min-height:34px;max-height:34px;padding:0 var(--comp-input-padding-horizontal);flex:1;font-size:var(--comp-input-text-size);font-weight:var(--comp-input-text-font-weight);line-height:var(--comp-input-text-line-height);font-family:var(--comp-input-text-font-family);color:var(--comp-input-text-default-color);min-width:0}ap-input .input-wrapper .content input::placeholder{color:var(--comp-input-text-placeholder-color)}ap-input .input-wrapper .content input:disabled{cursor:not-allowed;pointer-events:none;background:var(--comp-input-fill-disabled-color);color:var(--comp-input-text-disabled-color)}ap-input .input-wrapper .content input:disabled:placeholder{color:var(--comp-input-text-placeholder-color)}ap-input .input-wrapper .content input[type=search]::-webkit-search-decoration,ap-input .input-wrapper .content input[type=search]::-webkit-search-cancel-button,ap-input .input-wrapper .content input[type=search]::-webkit-search-results-button,ap-input .input-wrapper .content input[type=search]::-webkit-search-results-decoration{display:none}ap-input .input-wrapper .content .counter{font-size:var(--comp-input-text-counter-size);font-weight:var(--comp-input-text-counter-font-weight);line-height:var(--comp-input-text-counter-line-height);font-family:var(--comp-input-text-counter-font-family);color:var(--comp-input-text-counter-color);padding-right:var(--comp-input-spacing-horizontal)}ap-input .input-wrapper .content .clear-button{display:flex;align-items:center;justify-content:center;border:none;margin:0;padding:0 var(--comp-input-spacing-horizontal) 0 0;background-color:transparent}ap-input .input-wrapper .content .clear-button:hover{cursor:pointer}ap-input .input-wrapper .content .clear-button ap-symbol{padding:0}ap-input .input-wrapper .prefix,ap-input .input-wrapper .suffix{height:100%;display:flex;justify-content:center;align-items:center;font-size:var(--sys-text-style-body-size);font-weight:var(--sys-text-style-body-weight);line-height:var(--sys-text-style-body-line-height);font-family:var(--ref-font-family);color:var(--ref-color-grey-100)}ap-input .input-wrapper .prefix .divider,ap-input .input-wrapper .suffix .divider{height:18px;width:var(--border-width);background:var(--ref-color-grey-10)}ap-input .input-wrapper ap-symbol{height:var(--comp-input-icon-size);width:var(--comp-input-icon-size);min-height:var(--comp-input-icon-size);min-width:var(--comp-input-icon-size);max-height:var(--comp-input-icon-size);max-width:var(--comp-input-icon-size);color:var(--comp-input-icon-color);padding-right:var(--comp-input-padding-horizontal);pointer-events:none;box-sizing:content-box}ap-input .input-wrapper ap-symbol:hover{cursor:text}ap-input .input-wrapper.inverse{flex-direction:row-reverse}ap-input .input-wrapper.inverse.with-icon input{padding-left:0}ap-input .input-wrapper.inverse.with-icon ap-symbol{padding-right:var(--comp-input-spacing-horizontal);padding-left:var(--comp-input-padding-horizontal)}ap-input .input-wrapper.with-icon input{padding-right:var(--ref-spacing-xxxs)}ap-input .input-wrapper.with-prefix input{padding-left:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-prefix .prefix{padding-left:var(--comp-input-padding-horizontal);gap:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-suffix input{padding-right:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-suffix .suffix{padding-right:var(--comp-input-padding-horizontal);gap:var(--ref-spacing-xxs)}ap-input .input-wrapper.with-counter input{padding-right:0}ap-input .input-wrapper.with-error{border-color:var(--comp-input-border-error-color)}ap-input .input-wrapper.with-success{border-color:var(--comp-input-border-success-color)}.form-message{font-size:var(--comp-forms-status-text-size);font-weight:var(--comp-forms-status-text-font-weight);line-height:var(--comp-forms-status-text-line-height);font-family:var(--comp-forms-status-text-font-family);margin:0;display:flex;gap:var(--ref-spacing-xxxs)}.form-message.error{color:var(--comp-forms-status-text-error-color)}.form-message.error ap-symbol{color:var(--comp-forms-status-icon-error-color)}.form-message.success{color:var(--comp-forms-status-text-success-color)}.form-message.success ap-symbol{color:var(--comp-forms-status-icon-success-color)}form.ng-submitted ap-input.ng-valid .input-wrapper{border-color:var(--comp-input-border-success-color)}form.ng-submitted ap-input.ng-invalid .input-wrapper{border-color:var(--comp-input-border-error-color)}\n"] }]
134
134
  }], propDecorators: { symbols: [{
135
135
  type: ContentChildren,
136
136
  args: [SymbolComponent]
@@ -1 +1 @@
1
- {"version":3,"file":"agorapulse-ui-components-legacy-input.mjs","sources":["../../../libs/ui-components/legacy/input/src/input.component.ts","../../../libs/ui-components/legacy/input/src/input.component.html","../../../libs/ui-components/legacy/input/src/agorapulse-ui-components-legacy-input.ts"],"sourcesContent":["import { SymbolComponent, SymbolRegistry, apAlertCircle, apCheckCircle, apClose, apSearchAlternate } from '@agorapulse/ui-symbol';\n\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n WritableSignal,\n booleanAttribute,\n forwardRef,\n inject,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALIDATORS, NG_VALUE_ACCESSOR } from '@angular/forms';\n\ntype InputType =\n | 'color'\n | 'datetime'\n | 'datetime-local'\n | 'email'\n | 'hidden'\n | 'month'\n | 'number'\n | 'password'\n | 'range'\n | 'search'\n | 'text'\n | 'tel'\n | 'time'\n | 'url'\n | 'week';\n\nexport const AP_INPUT_CONTROL_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputComponent),\n multi: true,\n};\n\nconst SEARCH_SYMBOL_ID = 'search-alternate';\n\n/**\n * @deprecated use native input with directive apInput, ap-input-group and ap-form-field instead\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-input',\n styleUrls: ['./input.component.scss'],\n standalone: true,\n imports: [FormsModule, SymbolComponent],\n providers: [\n AP_INPUT_CONTROL_VALUE_ACCESSOR,\n\n {\n provide: NG_VALIDATORS,\n\n useExisting: InputComponent,\n\n multi: true,\n },\n ],\n templateUrl: './input.component.html',\n encapsulation: ViewEncapsulation.None,\n})\nexport class InputComponent implements OnInit, AfterViewInit, ControlValueAccessor {\n readonly elementRef: ElementRef = inject(ElementRef);\n readonly symbolRegistry: SymbolRegistry = inject(SymbolRegistry);\n\n @ContentChildren(SymbolComponent) symbols!: QueryList<SymbolComponent>;\n @ViewChild('symbol') symbolWrapper!: ElementRef;\n @ViewChild('input') inputElement!: ElementRef;\n\n @Input() ariaLabel!: string;\n\n @Input() ariaLabelledBy!: string;\n\n @Input() ariaDescribedBy!: string;\n\n @Input() disabled: boolean = false;\n\n @Input() clearable: boolean = false;\n\n @Input() inputType: InputType = 'text';\n\n @Input() inputId?: string;\n\n @Input({\n required: true,\n })\n name!: string;\n\n @Input() label?: string;\n\n @Input() description?: string;\n\n @Input() prefix?: string;\n\n @Input() suffix?: string;\n\n @Input({ transform: booleanAttribute }) required: boolean = false;\n\n @Input() placeholder?: string;\n\n @Input() errorMessage?: string;\n\n @Input() successMessage?: string;\n\n @Input() symbolId?: string;\n @Input() symbolPosition: 'left' | 'right' = 'right';\n\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() focus = new EventEmitter<FocusEvent>();\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() blur = new EventEmitter<FocusEvent>();\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() keyup = new EventEmitter<KeyboardEvent>();\n\n private _controlValueAccessorChangeFn!: (value: string | null) => void;\n\n hostDataTest: WritableSignal<string | undefined> = signal<string | undefined>(undefined);\n\n value!: string | null;\n\n onTouched!: () => void;\n\n ngOnInit(): void {\n if (this.label && !this.inputId) {\n throw Error('You have to provide an input id if you want to use a label.');\n }\n if (this.inputType === 'search') {\n this.symbolId = SEARCH_SYMBOL_ID;\n this.symbolPosition = 'left';\n }\n this.hostDataTest.set(this.elementRef.nativeElement.getAttribute('data-test'));\n this.elementRef.nativeElement.removeAttribute('data-test');\n this.symbolRegistry.registerSymbols([apAlertCircle, apCheckCircle, apClose, apSearchAlternate]);\n }\n\n // Sometimes attributes like the id, or the data-test are dynamic and can change between the constructor and the initialization.\n // In order to have the last attributes value we check if it changes, and if it does, we run a mark for check to update the view.\n ngAfterViewInit(): void {\n const hostDataTest = this.elementRef.nativeElement.getAttribute('data-test');\n\n if (hostDataTest && this.hostDataTest() !== hostDataTest) {\n this.hostDataTest.set(hostDataTest);\n this.elementRef.nativeElement.removeAttribute('data-test');\n }\n }\n\n validate() {\n const isNotValid = !this.value && this.required;\n return (\n isNotValid && {\n invalid: true,\n }\n );\n }\n\n onValueChange() {\n if (this.onTouched) {\n this.onTouched();\n }\n\n if (!this.disabled) {\n if (this._controlValueAccessorChangeFn) {\n this._controlValueAccessorChangeFn(this.value);\n }\n }\n }\n\n writeValue(value: string | null): void {\n this.value = value;\n }\n\n registerOnChange(fn: (value: string | null) => void): void {\n this._controlValueAccessorChangeFn = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n focusInput(): void {\n this.inputElement.nativeElement.focus();\n }\n\n onBlurHandle($event: FocusEvent): void {\n this.blur.emit($event);\n }\n\n onFocusHandle($event: FocusEvent): void {\n this.focus.emit($event);\n }\n\n onKeyup($event: KeyboardEvent): void {\n this.keyup.emit($event);\n }\n\n onClear(): void {\n this.writeValue(null);\n }\n}\n","@if (label) {\n <label [for]=\"inputId\">\n <span>\n {{ label }}\n </span>\n @if (description) {\n <span class=\"description\">\n {{ description }}\n </span>\n }\n </label>\n}\n\n<div\n tabindex=\"0\"\n class=\"input-wrapper\"\n [class.inverse]=\"symbolPosition === 'left'\"\n [class.with-icon]=\"symbolId\"\n [class.with-prefix]=\"prefix\"\n [class.with-suffix]=\"suffix\"\n [class.with-error]=\"errorMessage\"\n [class.with-success]=\"successMessage\"\n [class.disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-describedby]=\"ariaDescribedBy || null\"\n [attr.aria-disabled]=\"disabled?.toString()\"\n (click)=\"focusInput()\"\n (keydown.enter)=\"focusInput()\">\n @if (prefix) {\n <div class=\"prefix\">\n <span>\n {{ prefix }}\n </span>\n <span class=\"divider\"></span>\n </div>\n }\n <div class=\"content\">\n <input\n #input\n [type]=\"inputType\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [id]=\"inputId ?? ''\"\n [attr.data-test]=\"hostDataTest() ? hostDataTest() : name\"\n [(ngModel)]=\"value\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange()\" />\n @if (clearable) {\n <button\n type=\"button\"\n class=\"clear-button\"\n (click)=\"onClear()\">\n <ap-symbol symbolId=\"close\" />\n </button>\n }\n </div>\n @if (suffix) {\n <div class=\"suffix\">\n <span class=\"divider\"></span>\n <span>\n {{ suffix }}\n </span>\n </div>\n }\n @if (symbolId) {\n <ap-symbol\n size=\"micro\"\n [symbolId]=\"symbolId\" />\n }\n</div>\n\n@if (errorMessage) {\n <div class=\"form-message error\">\n <ap-symbol\n symbolId=\"alert-circle\"\n size=\"micro\" />\n <span>\n {{ errorMessage }}\n </span>\n </div>\n}\n\n@if (successMessage) {\n <div class=\"form-message success\">\n <ap-symbol\n symbolId=\"check-circle\"\n size=\"micro\" />\n <span>\n {{ successMessage }}\n </span>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAwCa,MAAA,+BAA+B,GAAG;AAC3C,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,cAAc,CAAC;AAC7C,IAAA,KAAK,EAAE,IAAI;EACb;AAEF,MAAM,gBAAgB,GAAG,kBAAkB,CAAC;AAE5C;;AAEG;MAqBU,cAAc,CAAA;AACd,IAAA,UAAU,GAAe,MAAM,CAAC,UAAU,CAAC,CAAC;AAC5C,IAAA,cAAc,GAAmB,MAAM,CAAC,cAAc,CAAC,CAAC;AAE/B,IAAA,OAAO,CAA8B;AAClD,IAAA,aAAa,CAAc;AAC5B,IAAA,YAAY,CAAc;AAErC,IAAA,SAAS,CAAU;AAEnB,IAAA,cAAc,CAAU;AAExB,IAAA,eAAe,CAAU;IAEzB,QAAQ,GAAY,KAAK,CAAC;IAE1B,SAAS,GAAY,KAAK,CAAC;IAE3B,SAAS,GAAc,MAAM,CAAC;AAE9B,IAAA,OAAO,CAAU;AAK1B,IAAA,IAAI,CAAU;AAEL,IAAA,KAAK,CAAU;AAEf,IAAA,WAAW,CAAU;AAErB,IAAA,MAAM,CAAU;AAEhB,IAAA,MAAM,CAAU;IAEe,QAAQ,GAAY,KAAK,CAAC;AAEzD,IAAA,WAAW,CAAU;AAErB,IAAA,YAAY,CAAU;AAEtB,IAAA,cAAc,CAAU;AAExB,IAAA,QAAQ,CAAU;IAClB,cAAc,GAAqB,OAAO,CAAC;;AAG1C,IAAA,KAAK,GAAG,IAAI,YA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Ac,EAAA,CAAA;sBAAtB,KAAK;gBAEG,eAAe,EAAA,CAAA;sBAAvB,KAAK;gBAEG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBAEG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBAEG,SAAS,EAAA,CAAA;sBAAjB,KAAK;gBAEG,OAAO,EAAA,CAAA;sBAAf,KAAK;gBAKN,IAAI,EAAA,CAAA;sBAHH,KAAK;AAAC,gBAAA,IAAA,EAAA,CAAA;AACH,wBAAA,QAAQ,EAAE,IAAI;AACjB,qBAAA,CAAA;gBAGQ,KAAK,EAAA,CAAA;sBAAb,KAAK;gBAEG,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBAEG,MAAM,EAAA,CAAA;sBAAd,KAAK;gBAEG,MAAM,EAAA,CAAA;sBAAd,KAAK;gBAEkC,QAAQ,EAAA,CAAA;sBAA/C,KAAK;uBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAA;gBAE7B,WAAW,EAAA,CAAA;sBAAnB,KAAK;gBAEG,YAAY,EAAA,CAAA;sBAApB,KAAK;gBAEG,cAAc,EAAA,CAAA;sBAAtB,KAAK;gBAEG,QAAQ,EAAA,CAAA;sBAAhB,KAAK;gBACG,cAAc,EAAA,CAAA;sBAAtB,KAAK;gBAGI,KAAK,EAAA,CAAA;sBAAd,MAAM;gBAEG,IAAI,EAAA,CAAA;sBAAb,MAAM;gBAEG,KAAK,EAAA,CAAA;sBAAd,MAAM;;;AE1HX;;AAEG;;;;"}
1
+ {"version":3,"file":"agorapulse-ui-components-legacy-input.mjs","sources":["../../../libs/ui-components/legacy/input/src/input.component.ts","../../../libs/ui-components/legacy/input/src/input.component.html","../../../libs/ui-components/legacy/input/src/agorapulse-ui-components-legacy-input.ts"],"sourcesContent":["import { SymbolComponent, SymbolRegistry, apErrorFill, apRoundedCheckFill, apClose, apSearch } from '@agorapulse/ui-symbol';\n\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChildren,\n ElementRef,\n EventEmitter,\n Input,\n OnInit,\n Output,\n QueryList,\n ViewChild,\n ViewEncapsulation,\n WritableSignal,\n booleanAttribute,\n forwardRef,\n inject,\n signal,\n} from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALIDATORS, NG_VALUE_ACCESSOR } from '@angular/forms';\n\ntype InputType =\n | 'color'\n | 'datetime'\n | 'datetime-local'\n | 'email'\n | 'hidden'\n | 'month'\n | 'number'\n | 'password'\n | 'range'\n | 'search'\n | 'text'\n | 'tel'\n | 'time'\n | 'url'\n | 'week';\n\nexport const AP_INPUT_CONTROL_VALUE_ACCESSOR = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => InputComponent),\n multi: true,\n};\n\nconst SEARCH_SYMBOL_ID = 'search';\n\n/**\n * @deprecated use native input with directive apInput, ap-input-group and ap-form-field instead\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-input',\n styleUrls: ['./input.component.scss'],\n standalone: true,\n imports: [FormsModule, SymbolComponent],\n providers: [\n AP_INPUT_CONTROL_VALUE_ACCESSOR,\n\n {\n provide: NG_VALIDATORS,\n\n useExisting: InputComponent,\n\n multi: true,\n },\n ],\n templateUrl: './input.component.html',\n encapsulation: ViewEncapsulation.None,\n})\nexport class InputComponent implements OnInit, AfterViewInit, ControlValueAccessor {\n readonly elementRef: ElementRef = inject(ElementRef);\n readonly symbolRegistry: SymbolRegistry = inject(SymbolRegistry);\n\n @ContentChildren(SymbolComponent) symbols!: QueryList<SymbolComponent>;\n @ViewChild('symbol') symbolWrapper!: ElementRef;\n @ViewChild('input') inputElement!: ElementRef;\n\n @Input() ariaLabel!: string;\n\n @Input() ariaLabelledBy!: string;\n\n @Input() ariaDescribedBy!: string;\n\n @Input() disabled: boolean = false;\n\n @Input() clearable: boolean = false;\n\n @Input() inputType: InputType = 'text';\n\n @Input() inputId?: string;\n\n @Input({\n required: true,\n })\n name!: string;\n\n @Input() label?: string;\n\n @Input() description?: string;\n\n @Input() prefix?: string;\n\n @Input() suffix?: string;\n\n @Input({ transform: booleanAttribute }) required: boolean = false;\n\n @Input() placeholder?: string;\n\n @Input() errorMessage?: string;\n\n @Input() successMessage?: string;\n\n @Input() symbolId?: string;\n @Input() symbolPosition: 'left' | 'right' = 'right';\n\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() focus = new EventEmitter<FocusEvent>();\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() blur = new EventEmitter<FocusEvent>();\n // eslint-disable-next-line @angular-eslint/no-output-native\n @Output() keyup = new EventEmitter<KeyboardEvent>();\n\n private _controlValueAccessorChangeFn!: (value: string | null) => void;\n\n hostDataTest: WritableSignal<string | undefined> = signal<string | undefined>(undefined);\n\n value!: string | null;\n\n onTouched!: () => void;\n\n ngOnInit(): void {\n if (this.label && !this.inputId) {\n throw Error('You have to provide an input id if you want to use a label.');\n }\n if (this.inputType === 'search') {\n this.symbolId = SEARCH_SYMBOL_ID;\n this.symbolPosition = 'left';\n }\n this.hostDataTest.set(this.elementRef.nativeElement.getAttribute('data-test'));\n this.elementRef.nativeElement.removeAttribute('data-test');\n this.symbolRegistry.registerSymbols([apErrorFill, apRoundedCheckFill, apClose, apSearch]);\n }\n\n // Sometimes attributes like the id, or the data-test are dynamic and can change between the constructor and the initialization.\n // In order to have the last attributes value we check if it changes, and if it does, we run a mark for check to update the view.\n ngAfterViewInit(): void {\n const hostDataTest = this.elementRef.nativeElement.getAttribute('data-test');\n\n if (hostDataTest && this.hostDataTest() !== hostDataTest) {\n this.hostDataTest.set(hostDataTest);\n this.elementRef.nativeElement.removeAttribute('data-test');\n }\n }\n\n validate() {\n const isNotValid = !this.value && this.required;\n return (\n isNotValid && {\n invalid: true,\n }\n );\n }\n\n onValueChange() {\n if (this.onTouched) {\n this.onTouched();\n }\n\n if (!this.disabled) {\n if (this._controlValueAccessorChangeFn) {\n this._controlValueAccessorChangeFn(this.value);\n }\n }\n }\n\n writeValue(value: string | null): void {\n this.value = value;\n }\n\n registerOnChange(fn: (value: string | null) => void): void {\n this._controlValueAccessorChangeFn = fn;\n }\n\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n focusInput(): void {\n this.inputElement.nativeElement.focus();\n }\n\n onBlurHandle($event: FocusEvent): void {\n this.blur.emit($event);\n }\n\n onFocusHandle($event: FocusEvent): void {\n this.focus.emit($event);\n }\n\n onKeyup($event: KeyboardEvent): void {\n this.keyup.emit($event);\n }\n\n onClear(): void {\n this.writeValue(null);\n }\n}\n","@if (label) {\n <label [for]=\"inputId\">\n <span>\n {{ label }}\n </span>\n @if (description) {\n <span class=\"description\">\n {{ description }}\n </span>\n }\n </label>\n}\n\n<div\n tabindex=\"0\"\n class=\"input-wrapper\"\n [class.inverse]=\"symbolPosition === 'left'\"\n [class.with-icon]=\"symbolId\"\n [class.with-prefix]=\"prefix\"\n [class.with-suffix]=\"suffix\"\n [class.with-error]=\"errorMessage\"\n [class.with-success]=\"successMessage\"\n [class.disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel || null\"\n [attr.aria-labelledby]=\"ariaLabelledBy || null\"\n [attr.aria-describedby]=\"ariaDescribedBy || null\"\n [attr.aria-disabled]=\"disabled?.toString()\"\n (click)=\"focusInput()\"\n (keydown.enter)=\"focusInput()\">\n @if (prefix) {\n <div class=\"prefix\">\n <span>\n {{ prefix }}\n </span>\n <span class=\"divider\"></span>\n </div>\n }\n <div class=\"content\">\n <input\n #input\n [type]=\"inputType\"\n [disabled]=\"disabled\"\n [placeholder]=\"placeholder\"\n [id]=\"inputId ?? ''\"\n [attr.data-test]=\"hostDataTest() ? hostDataTest() : name\"\n [(ngModel)]=\"value\"\n (blur)=\"onBlurHandle($event)\"\n (focus)=\"onFocusHandle($event)\"\n (keyup)=\"onKeyup($event)\"\n (ngModelChange)=\"onValueChange()\" />\n @if (clearable) {\n <button\n type=\"button\"\n class=\"clear-button\"\n (click)=\"onClear()\">\n <ap-symbol symbolId=\"close\" />\n </button>\n }\n </div>\n @if (suffix) {\n <div class=\"suffix\">\n <span class=\"divider\"></span>\n <span>\n {{ suffix }}\n </span>\n </div>\n }\n @if (symbolId) {\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"symbolId\" />\n }\n</div>\n\n@if (errorMessage) {\n <div class=\"form-message error\">\n <ap-symbol\n symbolId=\"error_fill\"\n size=\"sm\" />\n <span>\n {{ errorMessage }}\n </span>\n </div>\n}\n\n@if (successMessage) {\n <div class=\"form-message success\">\n <ap-symbol\n symbolId=\"rounded-check_fill\"\n size=\"sm\" />\n <span>\n {{ successMessage }}\n </span>\n </div>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAwCa,MAAA,+BAA+B,GAAG;AAC3C,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,cAAc,CAAC;AAC7C,IAAA,KAAK,EAAE,IAAI;EACb;AAEF,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAElC;;AAEG;MAqBU,cAAc,CAAA;AACd,IAAA,UAAU,GAAe,MAAM,CAAC,UAAU,CAAC,CAAC;AAC5C,IAAA,cAAc,GAAmB,MAAM,CAAC,cAAc,CAAC,CAAC;AAE/B,IAAA,OAAO,CAA8B;AAClD,IAAA,aAAa,CAAc;AAC5B,IAAA,YAAY,CAAc;AAErC,IAAA,SAAS,CAAU;AAEnB,IAAA,cAAc,CAAU;AAExB,IAAA,eAAe,CAAU;IAEzB,QAAQ,GAAY,KAAK,CAAC;IAE1B,SAAS,GAAY,KAAK,CAAC;IAE3B,SAAS,GAAc,MAAM,CAAC;AAE9B,IAAA,OAAO,CAAU;AAK1B,IAAA,IAAI,CAAU;AAEL,IAAA,KAAK,CAAU;AAEf,IAAA,WAAW,CAAU;AAErB,IAAA,MAAM,CAAU;AAEhB,IAAA,MAAM,CAAU;IAEe,QAAQ,G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