@agorapulse/ui-components 17.0.0 → 17.1.0-beta

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 (120) hide show
  1. package/agorapulse-ui-components-17.1.0-beta.tgz +0 -0
  2. package/dot-stepper/dot-stepper.component.d.ts +20 -0
  3. package/dot-stepper/index.d.ts +5 -0
  4. package/dot-stepper/public_api.d.ts +1 -0
  5. package/esm2022/button/button.component.mjs +3 -3
  6. package/esm2022/checkbox/checkbox.component.mjs +3 -3
  7. package/esm2022/datepicker/datepicker.component.mjs +3 -3
  8. package/esm2022/dot-stepper/agorapulse-ui-components-dot-stepper.mjs +5 -0
  9. package/esm2022/dot-stepper/dot-stepper.component.mjs +46 -0
  10. package/esm2022/dot-stepper/public_api.mjs +2 -0
  11. package/esm2022/form-message/form-message.component.mjs +3 -3
  12. package/esm2022/icon-button/icon-button.component.mjs +3 -3
  13. package/esm2022/index.mjs +2 -2
  14. package/esm2022/infobox/infobox.component.mjs +3 -3
  15. package/esm2022/input-group/input-group.component.mjs +3 -3
  16. package/esm2022/input-group/input-prefix/input-prefix.component.mjs +11 -0
  17. package/esm2022/input-group/public_api.mjs +2 -1
  18. package/esm2022/{dots-stepper/agorapulse-ui-components-dots-stepper.mjs → input-search/agorapulse-ui-components-input-search.mjs} +1 -1
  19. package/esm2022/input-search/input-search.component.mjs +77 -0
  20. package/esm2022/input-search/public_api.mjs +2 -0
  21. package/esm2022/labels/label.component.mjs +3 -3
  22. package/esm2022/labels-selector/labels-selector.component.mjs +11 -5
  23. package/esm2022/legacy/input/input.component.mjs +3 -3
  24. package/esm2022/legacy/select/select.component.mjs +3 -3
  25. package/esm2022/legacy/textarea/textarea.component.mjs +3 -3
  26. package/esm2022/media-display-overlay/media-display-overlay-dialog.component.mjs +3 -3
  27. package/esm2022/neo-datepicker/neo-datepicker.component.mjs +3 -3
  28. package/esm2022/password-input/password-input.component.mjs +3 -3
  29. package/esm2022/phone-number-input/agorapulse-ui-components-phone-number-input.mjs +5 -0
  30. package/esm2022/phone-number-input/phone-number-input.component.mjs +147 -0
  31. package/esm2022/phone-number-input/public_api.mjs +2 -0
  32. package/esm2022/radio/radio.component.mjs +1 -2
  33. package/esm2022/select/dropdown-item-multiple-one-line/dropdown-item-multiple-one-line.component.mjs +3 -3
  34. package/esm2022/select/dropdown-item-multiple-two-lines/dropdown-item-multiple-two-lines.component.mjs +3 -3
  35. package/esm2022/select/dropdown-item-single-one-line/dropdown-item-single-one-line.component.mjs +3 -3
  36. package/esm2022/select/dropdown-item-single-two-lines/dropdown-item-single-two-lines.component.mjs +3 -3
  37. package/esm2022/select/dropdown-search-form/dropdown-search-form.component.mjs +6 -5
  38. package/esm2022/select/select-label-multiple/select-label-multiple.component.mjs +28 -64
  39. package/esm2022/snackbars-thread/component/snackbars-thread.component.mjs +3 -3
  40. package/esm2022/snackbars-thread/service/snackbars-thread.service.mjs +3 -3
  41. package/esm2022/social-button/social-button.component.mjs +3 -3
  42. package/esm2022/split-button/split-button.component.mjs +2 -2
  43. package/esm2022/src/lib/agorapulse-ui-components.module.mjs +7 -7
  44. package/esm2022/stepper/stepper.component.mjs +3 -3
  45. package/esm2022/tag/tag.component.mjs +3 -3
  46. package/fesm2022/agorapulse-ui-components-button.mjs +2 -2
  47. package/fesm2022/agorapulse-ui-components-button.mjs.map +1 -1
  48. package/fesm2022/agorapulse-ui-components-checkbox.mjs +2 -2
  49. package/fesm2022/agorapulse-ui-components-checkbox.mjs.map +1 -1
  50. package/fesm2022/agorapulse-ui-components-datepicker.mjs +2 -2
  51. package/fesm2022/agorapulse-ui-components-datepicker.mjs.map +1 -1
  52. package/fesm2022/agorapulse-ui-components-dot-stepper.mjs +53 -0
  53. package/fesm2022/agorapulse-ui-components-dot-stepper.mjs.map +1 -0
  54. package/fesm2022/agorapulse-ui-components-form-message.mjs +2 -2
  55. package/fesm2022/agorapulse-ui-components-form-message.mjs.map +1 -1
  56. package/fesm2022/agorapulse-ui-components-icon-button.mjs +2 -2
  57. package/fesm2022/agorapulse-ui-components-icon-button.mjs.map +1 -1
  58. package/fesm2022/agorapulse-ui-components-infobox.mjs +2 -2
  59. package/fesm2022/agorapulse-ui-components-infobox.mjs.map +1 -1
  60. package/fesm2022/agorapulse-ui-components-input-group.mjs +12 -3
  61. package/fesm2022/agorapulse-ui-components-input-group.mjs.map +1 -1
  62. package/fesm2022/agorapulse-ui-components-input-search.mjs +84 -0
  63. package/fesm2022/agorapulse-ui-components-input-search.mjs.map +1 -0
  64. package/fesm2022/agorapulse-ui-components-labels-selector.mjs +10 -4
  65. package/fesm2022/agorapulse-ui-components-labels-selector.mjs.map +1 -1
  66. package/fesm2022/agorapulse-ui-components-labels.mjs +2 -2
  67. package/fesm2022/agorapulse-ui-components-labels.mjs.map +1 -1
  68. package/fesm2022/agorapulse-ui-components-legacy-input.mjs +2 -2
  69. package/fesm2022/agorapulse-ui-components-legacy-input.mjs.map +1 -1
  70. package/fesm2022/agorapulse-ui-components-legacy-select.mjs +2 -2
  71. package/fesm2022/agorapulse-ui-components-legacy-select.mjs.map +1 -1
  72. package/fesm2022/agorapulse-ui-components-legacy-textarea.mjs +2 -2
  73. package/fesm2022/agorapulse-ui-components-legacy-textarea.mjs.map +1 -1
  74. package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs +2 -2
  75. package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs.map +1 -1
  76. package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs +2 -2
  77. package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs.map +1 -1
  78. package/fesm2022/agorapulse-ui-components-password-input.mjs +2 -2
  79. package/fesm2022/agorapulse-ui-components-password-input.mjs.map +1 -1
  80. package/fesm2022/agorapulse-ui-components-phone-number-input.mjs +154 -0
  81. package/fesm2022/agorapulse-ui-components-phone-number-input.mjs.map +1 -0
  82. package/fesm2022/agorapulse-ui-components-radio.mjs +0 -1
  83. package/fesm2022/agorapulse-ui-components-radio.mjs.map +1 -1
  84. package/fesm2022/agorapulse-ui-components-select.mjs +39 -75
  85. package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
  86. package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs +4 -4
  87. package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs.map +1 -1
  88. package/fesm2022/agorapulse-ui-components-social-button.mjs +2 -2
  89. package/fesm2022/agorapulse-ui-components-social-button.mjs.map +1 -1
  90. package/fesm2022/agorapulse-ui-components-split-button.mjs +1 -1
  91. package/fesm2022/agorapulse-ui-components-split-button.mjs.map +1 -1
  92. package/fesm2022/agorapulse-ui-components-stepper.mjs +2 -2
  93. package/fesm2022/agorapulse-ui-components-stepper.mjs.map +1 -1
  94. package/fesm2022/agorapulse-ui-components-tag.mjs +2 -2
  95. package/fesm2022/agorapulse-ui-components-tag.mjs.map +1 -1
  96. package/fesm2022/agorapulse-ui-components.mjs +7 -7
  97. package/fesm2022/agorapulse-ui-components.mjs.map +1 -1
  98. package/index.d.ts +1 -1
  99. package/input-group/input-group.component.d.ts +1 -1
  100. package/input-group/input-prefix/input-prefix.component.d.ts +5 -0
  101. package/input-group/public_api.d.ts +1 -0
  102. package/{dots-stepper → input-search}/index.d.ts +1 -1
  103. package/input-search/input-search.component.d.ts +32 -0
  104. package/input-search/public_api.d.ts +1 -0
  105. package/labels-selector/labels-selector.component.d.ts +4 -4
  106. package/package.json +97 -85
  107. package/phone-number-input/index.d.ts +5 -0
  108. package/phone-number-input/phone-number-input.component.d.ts +41 -0
  109. package/phone-number-input/public_api.d.ts +1 -0
  110. package/select/dropdown-search-form/dropdown-search-form.component.d.ts +3 -2
  111. package/select/select-label-multiple/select-label-multiple.component.d.ts +11 -14
  112. package/snackbars-thread/component/snackbars-thread.component.d.ts +1 -1
  113. package/src/lib/agorapulse-ui-components.module.d.ts +2 -2
  114. package/agorapulse-ui-components-17.0.0.tgz +0 -0
  115. package/dots-stepper/dots-stepper.component.d.ts +0 -16
  116. package/dots-stepper/public_api.d.ts +0 -1
  117. package/esm2022/dots-stepper/dots-stepper.component.mjs +0 -46
  118. package/esm2022/dots-stepper/public_api.mjs +0 -2
  119. package/fesm2022/agorapulse-ui-components-dots-stepper.mjs +0 -53
  120. package/fesm2022/agorapulse-ui-components-dots-stepper.mjs.map +0 -1
@@ -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,EAA2C,CAAC;IAEvE,QAAQ,GAA+B,SAAS,CAA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,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=\"xxs\" />\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 './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AA,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;;;;"}
@@ -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=\"alert-circle\"\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=\"check-circle\"\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=\"alert-circle\"\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=\"check-circle\"\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,CA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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=\"sm\"\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=\"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=\"check-circle\"\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,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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