@agorapulse/ui-components 22.4.13-beta.1 → 22.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agorapulse-ui-components-22.5.0.tgz +0 -0
- package/fesm2022/agorapulse-ui-components-directives.mjs +7 -1
- package/fesm2022/agorapulse-ui-components-directives.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-dropdown-base.mjs +1 -2
- package/fesm2022/agorapulse-ui-components-dropdown-base.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-filter-chips-list.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-filter-chips-list.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-form-field.mjs +38 -14
- package/fesm2022/agorapulse-ui-components-form-field.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-segmented-control.mjs +2 -2
- package/fesm2022/agorapulse-ui-components-segmented-control.mjs.map +1 -1
- package/package.json +1 -1
- package/types/agorapulse-ui-components-directives.d.ts +7 -1
- package/types/agorapulse-ui-components-form-field.d.ts +12 -4
- package/agorapulse-ui-components-22.4.13-beta.1.tgz +0 -0
|
Binary file
|
|
@@ -677,6 +677,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
677
677
|
args: ['validateEqualReference']
|
|
678
678
|
}] }] });
|
|
679
679
|
|
|
680
|
+
/**
|
|
681
|
+
* The elements that can take keyboard focus inside a wrapper, for reaching the real control behind a component host.
|
|
682
|
+
* `tabindex="-1"` is left out: it marks a focus target, not an entry point.
|
|
683
|
+
*/
|
|
684
|
+
const FOCUSABLE_INSIDE = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
685
|
+
|
|
680
686
|
class GifService {
|
|
681
687
|
static isGif(src) {
|
|
682
688
|
return src && src.split('?')[0].endsWith('.gif');
|
|
@@ -1188,5 +1194,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
1188
1194
|
* Generated bundle index. Do not edit.
|
|
1189
1195
|
*/
|
|
1190
1196
|
|
|
1191
|
-
export { AP_INTERACTIVE_ELEMENT, AutosizeTextareaDirective, BaseButtonDirective, CheckboxDirective, ClickDirective, DefaultImageDirective, EllipsisDirective, EqualValidatorDirective, FrozenGifDirective, GifService, MultiStyleTextDirective, OverflowCountDirective, OverflowCounterDirective, OverflowItemDirective, StopPropagationDirective, TableColumnDragDirective };
|
|
1197
|
+
export { AP_INTERACTIVE_ELEMENT, AutosizeTextareaDirective, BaseButtonDirective, CheckboxDirective, ClickDirective, DefaultImageDirective, EllipsisDirective, EqualValidatorDirective, FOCUSABLE_INSIDE, FrozenGifDirective, GifService, MultiStyleTextDirective, OverflowCountDirective, OverflowCounterDirective, OverflowItemDirective, StopPropagationDirective, TableColumnDragDirective };
|
|
1192
1198
|
//# sourceMappingURL=agorapulse-ui-components-directives.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-directives.mjs","sources":["../../../libs/ui-components/directives/src/autosize-textarea.directive.ts","../../../libs/ui-components/directives/src/base-button.directive.ts","../../../libs/ui-components/directives/src/checkbox.directive.ts","../../../libs/ui-components/directives/src/click.directive.ts","../../../libs/ui-components/directives/src/default-image.directive.ts","../../../libs/ui-components/directives/src/ellipsis.directive.ts","../../../libs/ui-components/directives/src/equal-validator.directive.ts","../../../libs/ui-components/directives/src/frozen-gif.directive.ts","../../../libs/ui-components/directives/src/interactive-element.ts","../../../libs/ui-components/directives/src/multi-style-text.directive.ts","../../../libs/ui-components/directives/src/overflow-count.directive.ts","../../../libs/ui-components/directives/src/stop-propagation.directive.ts","../../../libs/ui-components/directives/src/table-column-drag.directive.ts","../../../libs/ui-components/directives/src/agorapulse-ui-components-directives.ts"],"sourcesContent":["import { AfterContentChecked, Directive, ElementRef, HostListener } from '@angular/core';\n\n@Directive({\n selector: 'textarea[apAutosize]',\n standalone: true,\n})\n/**\n * expand textarea to fit content. Doesn't shrink.\n */\nexport class AutosizeTextareaDirective implements AfterContentChecked {\n static maxHeight: number = 200;\n\n constructor(public element: ElementRef) {}\n\n @HostListener('input')\n public onInput() {\n this.resize();\n }\n\n public ngAfterContentChecked() {\n this.resize();\n }\n\n public resize() {\n const style = this.element.nativeElement.style;\n const scrollHeight = this.element.nativeElement.scrollHeight;\n const actualHeight = this.element.nativeElement.offsetHeight;\n if (AutosizeTextareaDirective.maxHeight < scrollHeight) {\n // we arrived at the max\n style.overflow = 'auto';\n style.height = `${AutosizeTextareaDirective.maxHeight}px`;\n } else if (actualHeight < scrollHeight) {\n style.overflow = 'hidden';\n style.height = `${scrollHeight}px`;\n }\n }\n}\n","import { AfterViewInit, ChangeDetectorRef, Directive, ElementRef, inject, OnInit } from '@angular/core';\n\n@Directive({\n selector: '[apBaseButton]',\n standalone: true,\n})\nexport class BaseButtonDirective implements AfterViewInit, OnInit {\n hostId: string | undefined = undefined;\n hostDataTest: string | undefined = undefined;\n hostType: string = 'button';\n\n private elementRef: ElementRef = inject(ElementRef);\n private changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n ngOnInit() {\n this.hostDataTest = this.elementRef.nativeElement.getAttribute('data-test');\n this.hostId = this.elementRef.nativeElement.getAttribute('id');\n this.elementRef.nativeElement.removeAttribute('data-test');\n this.elementRef.nativeElement.removeAttribute('id');\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 const hostId = this.elementRef.nativeElement.getAttribute('id');\n const hostType = this.elementRef.nativeElement.getAttribute('type');\n if (hostDataTest && this.hostDataTest !== hostDataTest) {\n this.hostDataTest = hostDataTest;\n this.elementRef.nativeElement.removeAttribute('data-test');\n this.changeDetectorRef.markForCheck();\n }\n if (hostId && this.hostId !== hostId) {\n this.hostId = hostId;\n this.elementRef.nativeElement.removeAttribute('id');\n this.changeDetectorRef.markForCheck();\n }\n if (hostType && this.hostType !== hostType) {\n this.hostType = hostType;\n this.elementRef.nativeElement.removeAttribute('type');\n this.changeDetectorRef.markForCheck();\n }\n }\n}\n","import {\n booleanAttribute,\n Directive,\n effect,\n ElementRef,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Renderer2,\n signal\n} from '@angular/core';\n\n@Directive({\n selector: 'input[type=\"checkbox\"][apCheckbox]',\n standalone: true,\n providers: [],\n})\nexport class CheckboxDirective implements OnInit, OnDestroy {\n private readonly elementRef = inject(ElementRef<HTMLInputElement>);\n private readonly renderer = inject(Renderer2);\n\n // State signals\n private _checked = signal(false);\n private _indeterminate = signal(false);\n\n // Input signal accessors that work with host bindings\n checked = this._checked.asReadonly();\n indeterminate = this._indeterminate.asReadonly();\n\n // Input setters with proper aliases for template binding\n // Couldn't be migrated to yet\n @Input('checked')\n set checkedInput(checked: boolean) {\n this._checked.set(checked);\n this.updateNativeElementSync();\n }\n\n @Input({\n transform: booleanAttribute,\n alias: 'indeterminate',\n })\n set indeterminateInput(indeterminate: boolean) {\n if (indeterminate) {\n this._checked.set(false);\n }\n this._indeterminate.set(indeterminate);\n this.updateNativeElementSync();\n }\n\n private updateNativeElementSync(): void {\n const input = this.elementRef.nativeElement;\n if (input) {\n input.checked = this.checked();\n input.indeterminate = this.indeterminate();\n }\n }\n\n // Private properties\n private listeners: (() => void)[] = [];\n private styleElement!: HTMLStyleElement;\n private checkmarkSvg!: SVGElement;\n private indeterminateBar!: HTMLElement;\n\n constructor() {\n effect(() => {\n if (this.checkmarkSvg && this.indeterminateBar) {\n this.updateCheckmarkVisibility();\n }\n });\n }\n\n // Custom SVG content\n private readonly checkSvgContent = `\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"10\" height=\"10\" fill=\"white\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M14.238 3.337a.92.92 0 0 1 .025 1.301l-7.7 8a.92.92 0 0 1-1.326 0l-3.5-3.636a.92.92 0 1 1 1.326-1.276L5.9 10.674l7.037-7.312a.92.92 0 0 1 1.301-.025Z\" />\n </svg>\n `;\n\n ngOnInit() {\n this.createCheckboxStructure();\n this.setupEventListeners();\n }\n\n ngOnDestroy(): void {\n this.listeners.forEach(unlisten => unlisten());\n if (this.styleElement && this.styleElement.parentNode) {\n this.styleElement.parentNode.removeChild(this.styleElement);\n }\n if (this.checkmarkSvg && this.checkmarkSvg.parentNode) {\n this.checkmarkSvg.parentNode.removeChild(this.checkmarkSvg);\n }\n if (this.indeterminateBar && this.indeterminateBar.parentNode) {\n this.indeterminateBar.parentNode.removeChild(this.indeterminateBar);\n }\n }\n\n private createCheckboxStructure(): void {\n const input = this.elementRef.nativeElement;\n const parent = input.parentElement;\n\n // Make input's parent use inline-flex for alignment and position relative\n if (parent) {\n this.renderer.setStyle(parent, 'display', 'inline-flex');\n this.renderer.setStyle(parent, 'align-items', 'center');\n this.renderer.setStyle(parent, 'gap', 'var(--ref-spacing-xxs)');\n this.renderer.setStyle(parent, 'position', 'relative');\n }\n\n this.renderer.addClass(input, 'ap-checkbox-styled');\n\n this.createCheckmarkSvg();\n this.createIndeterminateBar();\n\n this.applyCheckboxStyles();\n\n this.updateCheckmarkVisibility();\n }\n\n private createOverlayElement(element: HTMLElement | SVGElement): void {\n const parent = this.elementRef.nativeElement.parentElement;\n\n // Apply common positioning styles\n this.renderer.setStyle(element, 'position', 'absolute');\n this.renderer.setStyle(element, 'top', '50%');\n this.renderer.setStyle(element, 'left', '8px'); // Center over 16px checkbox\n this.renderer.setStyle(element, 'transform', 'translate(-50%, -50%)');\n this.renderer.setStyle(element, 'pointer-events', 'none');\n this.renderer.setStyle(element, 'opacity', '0');\n this.renderer.setStyle(element, 'z-index', '1');\n\n // Append to parent\n this.renderer.appendChild(parent, element);\n }\n\n private createCheckmarkSvg(): void {\n // Create SVG element from string\n const tempDiv = this.renderer.createElement('div');\n this.renderer.setProperty(tempDiv, 'innerHTML', this.checkSvgContent);\n this.checkmarkSvg = tempDiv.firstElementChild as SVGElement;\n\n this.createOverlayElement(this.checkmarkSvg);\n }\n\n private createIndeterminateBar(): void {\n // Create the indeterminate bar element\n this.indeterminateBar = this.renderer.createElement('span');\n this.renderer.setStyle(this.indeterminateBar, 'height', '1.5px');\n this.renderer.setStyle(this.indeterminateBar, 'background', 'var(--ref-color-white)');\n this.renderer.setStyle(this.indeterminateBar, 'width', '8px');\n\n this.createOverlayElement(this.indeterminateBar);\n }\n\n private updateCheckmarkVisibility(): void {\n if (this.checkmarkSvg) {\n const opacity = this.checked() && !this.indeterminate() ? '1' : '0';\n this.renderer.setStyle(this.checkmarkSvg, 'opacity', opacity);\n }\n if (this.indeterminateBar) {\n const opacity = this.indeterminate() && !this.checked() ? '1' : '0';\n this.renderer.setStyle(this.indeterminateBar, 'opacity', opacity);\n }\n }\n\n private setupEventListeners(): void {\n const input = this.elementRef.nativeElement;\n\n // Input change listener (native checkbox change)\n const changeListener = this.renderer.listen(input, 'change', () => {\n this.onValueChange();\n });\n this.listeners.push(changeListener);\n\n // Listen for label clicks to ensure focus is maintained\n const parent = input.parentElement;\n if (parent) {\n const labelClickListener = this.renderer.listen(parent, 'click', (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n // If clicking on a label that targets our input, ensure focus\n if (target.tagName === 'LABEL' && target.getAttribute('for') === input.id) {\n // Small delay to ensure the label click is processed first\n setTimeout(() => {\n input.focus();\n }, 0);\n }\n });\n this.listeners.push(labelClickListener);\n }\n }\n\n private applyCheckboxStyles(): void {\n const styles = `\n /* Minimal checkbox styling */\n input[type=\"checkbox\"].ap-checkbox-styled {\n appearance: none !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n \n display: inline-block !important;\n width: 16px !important;\n height: 16px !important;\n min-width: 16px !important;\n min-height: 16px !important;\n margin: 0 !important;\n padding: 0 !important;\n border: 1px solid var(--ref-color-grey-60);\n border-radius: var(--sys-border-radius-sm);\n background: var(--ref-color-white);\n box-sizing: border-box;\n cursor: pointer;\n vertical-align: middle;\n }\n \n /* Hover state */\n input[type=\"checkbox\"].ap-checkbox-styled:hover {\n border-color: var(--ref-color-grey-80);\n }\n \n /* Active/pressed state */\n input[type=\"checkbox\"].ap-checkbox-styled:active {\n border-color: var(--ref-color-grey-100);\n }\n \n /* Checked state */\n input[type=\"checkbox\"].ap-checkbox-styled:checked {\n background: var(--ref-color-electric-blue-100);\n border-color: var(--ref-color-electric-blue-100);\n }\n \n /* Checked hover state */\n input[type=\"checkbox\"].ap-checkbox-styled:checked:hover {\n background: var(--ref-color-electric-blue-80);\n border-color: var(--ref-color-electric-blue-100);\n }\n \n /* Checked active/pressed state */\n input[type=\"checkbox\"].ap-checkbox-styled:checked:active {\n background: var(--ref-color-electric-blue-60);\n border-color: var(--ref-color-electric-blue-100);\n }\n \n /* Indeterminate state */\n input[type=\"checkbox\"].ap-checkbox-styled:indeterminate {\n background: var(--ref-color-electric-blue-100);\n border-color: var(--ref-color-electric-blue-100);\n }\n \n /* Disabled state */\n input[type=\"checkbox\"].ap-checkbox-styled:disabled {\n border-color: var(--ref-color-grey-20);\n background: var(--ref-color-grey-10);\n cursor: default;\n }\n \n input[type=\"checkbox\"].ap-checkbox-styled:disabled:checked {\n background: var(--ref-color-grey-20);\n }\n \n /* Focus state */\n @media (hover: hover) {\n input[type=\"checkbox\"].ap-checkbox-styled:focus:not(.disabled) {\n outline: 3px solid var(--ref-color-electric-blue-100) !important;\n outline-offset: 1px !important;\n }\n }\n \n /* Label styling */\n input[type=\"checkbox\"].ap-checkbox-styled + label {\n display: flex;\n align-items: center;\n font-family: var(--comp-forms-label-font-family);\n font-size: var(--comp-forms-label-size);\n font-weight: var(--comp-forms-label-font-weight);\n line-height: var(--comp-forms-label-line-height);\n color: var(--comp-forms-label-text-color);\n cursor: pointer;\n }\n \n /* Empty label styling */\n input[type=\"checkbox\"].ap-checkbox-styled + label:empty {\n display: none;\n }\n \n /* Disabled label styling */\n input[type=\"checkbox\"].ap-checkbox-styled:disabled + label {\n color: var(--ref-color-grey-60);\n cursor: default;\n }\n `;\n\n // Create and append style element\n this.styleElement = this.renderer.createElement('style');\n this.renderer.appendChild(this.styleElement, this.renderer.createText(styles));\n this.renderer.appendChild(document.head, this.styleElement);\n }\n\n private onValueChange(): void {\n if (!this.elementRef.nativeElement.disabled) {\n const input = this.elementRef.nativeElement;\n\n if (this.indeterminate()) {\n // When indeterminate, clicking should go to checked state\n this._checked.set(true);\n this._indeterminate.set(false);\n input.checked = true;\n input.indeterminate = false;\n } else {\n // Normal toggle behavior\n this._checked.set(input.checked);\n }\n }\n }\n}\n","import { booleanAttribute, Directive, ElementRef, inject, input, isDevMode, output } from '@angular/core';\n\nconst NATIVELY_ACTIVATED_TAGS = new Set(['BUTTON', 'INPUT', 'SELECT', 'TEXTAREA', 'SUMMARY']);\n\n/** Host tags already reported as redundant, so a 500-row list logs one line instead of 500. */\nconst warnedTags = new Set<string>();\n\n/**\n * Turns a non-interactive element into a control: it receives an ARIA role, enters the\n * tab order and activates with the keyboard, through the `(apClick)` binding alone.\n *\n * Prefer a real `<button>` whenever the layout allows one. Reach for this directive when\n * the element cannot be a button — a table row, a card, a styled anchor with no href.\n *\n * @example\n * ```html\n * <div (apClick)=\"openPost()\">…</div>\n * <span (apClick)=\"openDocs()\" apClickRole=\"link\">…</span>\n * <tr (apClick)=\"openRow()\" [apClickDisabled]=\"editing()\">…</tr>\n * ```\n */\n@Directive({\n selector: '[apClick]',\n standalone: true,\n host: {\n '[attr.role]': 'isInteractive() ? apClickRole() : null',\n '[attr.tabindex]': 'isInteractive() ? 0 : null',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class ClickDirective {\n /** Turns the host back into a plain element: no role, no tab stop, no activation at all. */\n apClickDisabled = input(false, { transform: booleanAttribute });\n\n /** ARIA role applied while the host is interactive. */\n apClickRole = input('button');\n\n apClick = output<MouseEvent | KeyboardEvent>();\n\n private host: HTMLElement = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n constructor() {\n if (isDevMode() && this.isNativelyActivated()) {\n this.warnRedundant();\n }\n }\n\n protected isInteractive(): boolean {\n return !this.apClickDisabled() && !this.isNativelyActivated();\n }\n\n /** The two checks are independent, so an anchor without `href` still gets its contenteditable read. */\n private isNativelyActivated(): boolean {\n if (NATIVELY_ACTIVATED_TAGS.has(this.host.tagName)) {\n return true;\n }\n\n return this.isNativeAnchor() || this.isContentEditable();\n }\n\n /**\n * `routerLink` counts as an `href`, and is read as a written attribute so the answer does not\n * depend on whether this directive's host bindings run before RouterLink's. A bound\n * `[routerLink]` leaves no attribute, so such an anchor stays plain until RouterLink writes one.\n */\n private isNativeAnchor(): boolean {\n const isAnchor = this.host.tagName === 'A' || this.host.tagName === 'AREA';\n\n return isAnchor && (this.host.hasAttribute('href') || this.host.hasAttribute('routerLink'));\n }\n\n /** `contenteditable=\"false\"` is explicitly opted out, so only a present, non-\"false\" value counts. */\n private isContentEditable(): boolean {\n return this.host.hasAttribute('contenteditable') && this.host.getAttribute('contenteditable') !== 'false';\n }\n\n private warnRedundant(): void {\n const tag = this.host.tagName.toLowerCase();\n if (warnedTags.has(tag)) {\n return;\n }\n\n warnedTags.add(tag);\n console.warn(`apClick is redundant on <${tag}>: the browser already activates it with the keyboard.`);\n }\n\n protected onClick(event: MouseEvent): void {\n // Not isInteractive(): a natively interactive host must keep emitting, or its existing\n // (apClick) binding would silently stop working.\n if (this.apClickDisabled()) {\n return;\n }\n\n this.apClick.emit(event);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n // A key pressed inside a focusable child must not activate the host.\n if (!this.isInteractive() || event.target !== this.host) {\n return;\n }\n\n if (!this.activationKeys().includes(event.key)) {\n return;\n }\n\n // Before the repeat guard: every repeat must be cancelled, or the page scrolls under a held Space.\n if (event.key === ' ') {\n event.preventDefault();\n }\n\n // A native button activates once per press, however long the key is held.\n if (event.repeat) {\n return;\n }\n\n this.apClick.emit(event);\n }\n\n /** A link activates on Enter only; every other role also answers Space. */\n private activationKeys(): readonly string[] {\n return this.apClickRole() === 'link' ? ['Enter'] : ['Enter', ' '];\n }\n}\n","import { Directive, Input } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'img[default]',\n standalone: true,\n host: {\n '(error)': 'updateUrl()',\n '[src]': 'src',\n },\n})\nexport class DefaultImageDirective {\n @Input({\n required: true,\n })\n src = '';\n @Input() default = '';\n\n updateUrl() {\n if (this.default) {\n this.src = this.default;\n } else {\n this.src = 'assets/lib-ui-components/img/default-avatar.png';\n }\n }\n}\n","import { AfterContentChecked, Directive, ElementRef, EventEmitter, Input, Output } from '@angular/core';\n\n/**\n * Removes excess text from element until it fits in elements\n * and appends a ellipsis symbol to end of text. This requires that\n * the elements height be fixed\n *\n * @example\n * ```html\n * <p apEllipsis>Ullamco esse laborum</p>\n * ```\n *\n */\n@Directive({\n selector: '[apEllipsis]',\n standalone: true,\n})\nexport class EllipsisDirective implements AfterContentChecked {\n @Input() apEllipsisSeparator = '';\n @Input() apEllipsisClip = false;\n @Input() apEllipsisIndex = -2;\n @Input() apEllipsisChar = '...';\n @Input() apEllipsisClickable = false;\n\n @Output() apEllipsisRemovedElementsCount = new EventEmitter<number>();\n @Output() apEllipsisRemovedText = new EventEmitter<string>();\n\n private get hasOverflow(): boolean {\n const el: HTMLElement = this.el.nativeElement;\n return el.scrollHeight > el.offsetHeight || el.scrollWidth > el.offsetWidth;\n }\n\n constructor(private el: ElementRef) {}\n\n ngAfterContentChecked() {\n this.clipText();\n }\n\n private clipText(): void {\n const el: HTMLElement = this.el.nativeElement;\n let text = el.innerText;\n let removedText = '';\n if (this.apEllipsisIndex > -1) {\n removedText = text.substring(this.apEllipsisIndex, text.length - 1) + removedText;\n text = text.substring(0, this.apEllipsisIndex);\n el.innerText = `${text}${this.apEllipsisChar}`;\n\n if (this.apEllipsisClickable) {\n el.addEventListener('click', () => {\n el.innerText = `${text}${removedText}`;\n });\n }\n } else {\n while (this.hasOverflow && text.length > 0) {\n removedText = text[text.length - 1] + removedText;\n text = text.substring(0, text.length - 1);\n el.innerText = `${text}${this.apEllipsisChar}`;\n }\n }\n\n if (this.apEllipsisSeparator) {\n const removedElementsCount = removedText\n .split(this.apEllipsisSeparator)\n .filter(element => !!element && element.length > 0).length;\n if (removedElementsCount > 0) {\n this.apEllipsisRemovedElementsCount.emit(removedElementsCount);\n }\n }\n if (removedText && removedText.length > 0) {\n this.apEllipsisRemovedText.emit(removedText);\n }\n }\n}\n","// Based on https://scotch.io/tutorials/how-to-implement-a-custom-validator-directive-confirm-password-in-angular-2\nimport { Attribute, Directive, forwardRef } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, Validator } from '@angular/forms';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[validateEqual][formControlName],[validateEqual][formControl],[validateEqual][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => EqualValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class EqualValidatorDirective implements Validator {\n constructor(\n @Attribute('validateEqual') public validateEqual: string,\n @Attribute('validateEqualReference') public validateEqualReference: string\n ) {}\n\n validate(self: AbstractControl): { [key: string]: any } | null {\n const other = self.root.get(this.validateEqual);\n if (other) {\n if (this.isReference()) {\n if (self.value === other.value) {\n if (other.errors) {\n delete other.errors['validateEqual'];\n if (!Object.keys(other.errors).length) {\n other.setErrors(null);\n }\n } else {\n other.setErrors(null);\n }\n } else {\n other.setErrors({ validateEqual: false });\n }\n } else if (self.value !== other.value) {\n return { validateEqual: false };\n }\n }\n return null;\n }\n\n private isReference(): boolean {\n if (!this.validateEqualReference) {\n return false;\n }\n return this.validateEqualReference === 'true';\n }\n}\n","import { Directive, ElementRef, Input, OnChanges } from '@angular/core';\n\nexport class GifService {\n static isGif(src: string) {\n return src && src.split('?')[0].endsWith('.gif');\n }\n}\n\n/**\n * If the image is a GIF then replace the img element by a canvas containing a frozen gif.\n * Note 1: if the image is displayed under a condition, the condition must be applied on the parent of the image, so the\n * new canvas element will have the same condition.\n * Note 2: the image must not have the properties \"display\" and \"visibility\" in its style. Since they are used to frozen\n * the GIF. You need to apply this properties on the parent element.\n * Note 3: If the GIF is frozen, all the event are propagated to the image. However, all events are dispatched\n * with an Event instance. Ex: click event is not dispatched with a MouseEvent instance.\n */\n\n@Directive({\n selector: 'img[apFrozenGif]',\n host: {\n '[src]': 'src',\n },\n standalone: true,\n})\nexport class FrozenGifDirective implements OnChanges {\n @Input({\n required: true,\n })\n src = '';\n @Input() apFrozen = true;\n // Add all the events that need to be propagated.\n @Input() apGifEvents: string[] = ['click'];\n\n private readonly element!: HTMLImageElement;\n private canvas: HTMLCanvasElement | null = null;\n\n constructor(private elementRef: ElementRef) {\n const element = this.elementRef.nativeElement;\n if (!(element instanceof HTMLImageElement)) {\n return;\n }\n\n this.element = element;\n }\n\n ngOnChanges(changes: any): void {\n let freeze = false;\n if (changes.src) {\n freeze = true;\n }\n if (changes.frozen) {\n if (changes.frozen.currentValue) {\n freeze = true;\n } else {\n this.unfreeze();\n }\n }\n\n if (freeze) {\n this.freeze();\n }\n }\n\n private freeze() {\n if (!GifService.isGif(this.src) || !this.apFrozen) {\n this.unfreeze();\n return;\n }\n\n // hack to avoid displaying the GIF before replacing it by the canvas\n this.element.style.visibility = 'hidden';\n this.element.addEventListener('load', () => this.addCanvas());\n }\n\n private addCanvas() {\n if (this.canvas) {\n this.canvas.remove();\n }\n\n this.canvas = document.createElement('canvas');\n this.canvas.width = this.element.width;\n this.canvas.height = this.element.height;\n this.canvas.getContext('2d')?.drawImage(this.element, 0, 0, this.canvas.width, this.canvas.height);\n for (let i = 0; i < this.element.attributes.length; i++) {\n const attr = this.element.attributes[i];\n if (attr.name === 'id') {\n // avoid two elements with the same id\n this.canvas.setAttribute('id', attr.value + '_frozenGif');\n } else if ((attr.name === 'style' && attr.value.includes('visibility: hidden;')) || attr.value.includes('display: none;')) {\n // remove the added 'visibility: hidden' and 'display: none'\n const styleValue = attr.value;\n this.canvas.setAttribute('style', styleValue.replace('visibility: hidden;', '').replace('display: none;', ''));\n } else if (attr.name !== '\"') {\n // test for invalid attributes\n this.canvas.setAttribute(attr.name, attr.value);\n }\n }\n\n this.addEvents();\n\n this.element.parentNode?.insertBefore(this.canvas, this.element);\n this.element.style.display = 'none';\n }\n\n private addEvents() {\n this.apGifEvents.forEach((eventName: string) => {\n this.canvas?.addEventListener(eventName, (ev: Event) =>\n this.element.dispatchEvent(\n // wm: find a way to dispatch the right event type\n new Event(ev.type, ev)\n )\n );\n });\n }\n\n private unfreeze() {\n if (this.canvas) {\n this.canvas.remove();\n this.canvas = null;\n }\n this.element.style.visibility = 'inherit';\n this.element.style.display = 'inherit';\n }\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * A component that renders the element users and assistive tech actually reach, rather than being it.\n * `<ap-button>` is the case that matters: its host is a plain custom element wrapping a real `<button>`.\n */\nexport interface ApInteractiveElement {\n interactiveElement(): HTMLElement;\n}\n\n/** Provided by such a component so a directive on its host can reach inside without guessing. */\nexport const AP_INTERACTIVE_ELEMENT = new InjectionToken<ApInteractiveElement>('AP_INTERACTIVE_ELEMENT');\n","import { Directive, ElementRef, EventEmitter, Input, Output, Renderer2 } from '@angular/core';\nimport DOMPurify from 'dompurify';\n\nconst DATA_MST = 'data-mst';\n\n/**\n * This directive aims to parse simple string to extract some specific tags and to turn them into SPAN with styling classes attributes and optional event listening.\n * The specific tags must this schema: <ng-container data-mst=\"STYLING-CLASSES\">TEXT</ng-container>.\n * Example: 'Lorem <ng-container data-mst=\"my-style\">ipsum</ng-container> dolor sit amet'.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[multiStyleText]',\n standalone: true,\n})\nexport class MultiStyleTextDirective {\n @Input() set multiStyleText(fullText: string) {\n // First remove previously added children (on update).\n this.renderer.setProperty(this.elRef.nativeElement, 'innerHTML', '');\n if (!fullText || fullText.length <= 0) {\n return;\n }\n\n this.renderer.setProperty(this.elRef.nativeElement, 'innerHTML', DOMPurify.sanitize(fullText.replace(/ng-container/g, 'span')));\n\n Array.from(this.elRef.nativeElement.children).forEach((childNode: Element) => {\n if (childNode.nodeType == 1 && childNode.tagName.toLowerCase() === 'span') {\n // Node.ELEMENT_NODE\n\n const span: HTMLElement = this.renderer.createElement('span');\n span.innerHTML = childNode.innerHTML;\n this.elRef.nativeElement.replaceChild(span, childNode);\n\n const mstValue = childNode.getAttribute(DATA_MST);\n if (mstValue) {\n const mstContents = mstValue.split(';');\n // Bind click events\n if (mstContents[1]) {\n this.renderer.listen(span, 'click', () => this.partEvent.emit(mstContents[1]));\n }\n // Add classes\n if (mstContents[0] && mstContents[0].length > 0) {\n this.renderer.setAttribute(span, 'class', mstContents[0].replace(',', ' '));\n }\n }\n }\n });\n }\n\n @Output() partEvent = new EventEmitter<string>();\n\n public constructor(\n private elRef: ElementRef<HTMLElement>,\n private renderer: Renderer2\n ) {}\n}\n","import {\n afterRenderEffect,\n booleanAttribute,\n contentChild,\n contentChildren,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n numberAttribute,\n signal,\n untracked,\n} from '@angular/core';\nimport { outputToObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgxResize } from 'ngxtension/resize';\n\n/** Marks an element as one of the items the row may collapse. */\n@Directive({\n selector: '[apOverflowItem]',\n})\nexport class OverflowItemDirective {\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n}\n\n/**\n * Marks the \"+N\" badge so its width can be reserved. Optional, and the first pass never has it:\n * the badge only enters the DOM once `hiddenCount()` is above zero, so `counterFallbackWidth` stands in.\n */\n@Directive({\n selector: '[apOverflowCounter]',\n})\nexport class OverflowCounterDirective {\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n}\n\n/**\n * Lays a row of items out on a single line and collapses whatever overflows into a \"+N\" badge.\n *\n * Put it on the container, mark the items with `apOverflowItem` and the badge with\n * `apOverflowCounter`; read `hiddenCount()` to render the badge and to derive the hidden data.\n * The container is measured, so it must be the box that actually bounds the row — give it\n * `overflow: hidden` and keep the items from shrinking. When `minVisible` keeps an item the row is\n * too narrow for, that last item gets a `max-width` so the badge stays inside: let it truncate.\n *\n * Specs that mock a consumer's dependencies have to keep this directive — ng-mocks stubs inputs\n * and outputs, not plain signal members, so a mocked `hiddenCount` is not callable:\n * `MockBuilder(MyComponent).keep(OverflowCountDirective)`.\n *\n * @example\n * ```html\n * <div class=\"chips\" apOverflowCount #overflow=\"apOverflowCount\">\n * @for (chip of chips(); track chip.id) {\n * <ap-tag apOverflowItem>{{ chip.label }}</ap-tag>\n * }\n * @if (overflow.hiddenCount() > 0) {\n * <ap-tag apOverflowCounter>+{{ overflow.hiddenCount() }}</ap-tag>\n * }\n * </div>\n * ```\n */\n@Directive({\n selector: '[apOverflowCount]',\n exportAs: 'apOverflowCount',\n hostDirectives: [NgxResize],\n})\nexport class OverflowCountDirective {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly ngxResize = inject(NgxResize);\n\n /**\n * Space between two items, in pixels. Read from the container's computed `column-gap` when left\n * undefined, which is what a flex or grid row already declares — pass it only when the gap comes\n * from somewhere the container doesn't express, such as item margins.\n */\n readonly gap = input<number | undefined>(undefined, {\n transform: (value: unknown) => (value == null ? undefined : numberAttribute(value)),\n });\n /** Width to reserve for the \"+N\" badge while it is not in the DOM to be measured. */\n readonly counterFallbackWidth = input(24, { transform: numberAttribute });\n /** Items kept visible whatever the width. A lone \"+N\" reads as an empty row, hence the default. */\n readonly minVisible = input(1, { transform: numberAttribute });\n /** Most items laid out whatever the width, for a group capped by design (\"2 avatars at most\"). */\n readonly max = input<number | undefined>(undefined, {\n transform: (value: unknown) => (value == null ? undefined : numberAttribute(value)),\n });\n /**\n * Set to false to lay every item out and hide none, for a row unfolded or wrapping on purpose. The\n * counts still say what a collapse would hide, so an unfolded row knows when folding it hides nothing.\n */\n readonly collapse = input(true, { transform: booleanAttribute });\n\n private readonly items = contentChildren(OverflowItemDirective, { descendants: true });\n private readonly counter = contentChild(OverflowCounterDirective);\n\n private readonly visible = signal(0);\n private readonly hidden = signal(0);\n\n // An item can change width while the container does not: a web font landing, a label re-rendered.\n private readonly itemObserver = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(() => this.scheduleRecompute());\n private pendingFrame: number | undefined;\n\n /** How many items fit on the line: the ones laid out, unless `collapse` is false. */\n readonly visibleCount = this.visible.asReadonly();\n /** How many items do not fit — the number the \"+N\" badge shows. With `collapse` false they stay laid out. */\n readonly hiddenCount = this.hidden.asReadonly();\n\n constructor() {\n // ngxtension pipes its whole stream — the ResizeObserver callback included, despite the name —\n // through `debounceTime(debounce.scroll ?? 0)`, and `scroll` defaults to 50. That debounce is\n // trailing, so while a drag keeps firing events nothing comes through at all and the count\n // only catches up once the pointer stops. Zero on both, and the row follows the drag.\n //\n // A consumer whose row is expensive enough to want a debounce can still put one back through\n // ngxtension's own `provideResizeOptions`, which NgxResize merges over this.\n this.ngxResize.ngxResizeOptions = { debounce: { scroll: 0, resize: 0 } };\n\n // Straight off the observer, not through a signal and a render pass: ResizeObserver already\n // fires after layout, so the widths are there to be read.\n outputToObservable(this.ngxResize.ngxResize)\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.recompute());\n\n // The item set is the other trigger, and that one does have to wait for the render: the new\n // items have to exist before they can be measured. The badge too: the first pass reserved its\n // fallback width, and its real one is only known once it is in the DOM.\n afterRenderEffect(() => {\n const items = this.items();\n const counter = this.counter();\n this.collapse();\n this.max();\n untracked(() => {\n this.observe([...items.map(item => item.elementRef.nativeElement), ...(counter ? [counter.elementRef.nativeElement] : [])]);\n this.recompute();\n });\n });\n\n inject(DestroyRef).onDestroy(() => {\n this.itemObserver?.disconnect();\n if (this.pendingFrame !== undefined) {\n cancelAnimationFrame(this.pendingFrame);\n }\n });\n }\n\n /** Measures the row and collapses its overflow. Public so a consumer resizing the container itself can force a pass. */\n recompute(): void {\n const items = this.items().map(item => item.elementRef.nativeElement);\n\n // Undo the previous collapse first, so what follows measures natural widths. Before the early\n // return too: a pass that cannot measure would otherwise leave items out of the flow while\n // reporting nothing hidden — a blank row, badge included.\n items.forEach(item => {\n item.style.display = '';\n item.style.maxWidth = '';\n });\n\n const collapse = this.collapse();\n\n // The cap needs no measurement, so it holds even in a container that cannot be measured.\n const cap = Math.min(items.length, this.max() ?? items.length);\n const containerWidth = this.elementRef.nativeElement.clientWidth;\n if (!items.length || containerWidth === 0) {\n if (collapse) {\n items.forEach((item, index) => (item.style.display = index < cap ? '' : 'none'));\n }\n this.setCounts(cap, items.length - cap);\n return;\n }\n\n const gap = this.resolvedGap();\n const widths = items.map(item => item.offsetWidth);\n const total = widths.reduce((sum, width) => sum + width, 0) + gap * (items.length - 1);\n if (cap === items.length && total <= containerWidth) {\n this.setCounts(items.length, 0);\n return;\n }\n\n // Something overflows: reserve the badge's room and keep as many items as fit before it.\n const available = containerWidth - gap - this.counterWidth();\n let used = 0;\n let visible = 0;\n for (let index = 0; index < cap; index++) {\n const width = widths[index] + (index > 0 ? gap : 0);\n if (used + width > available) {\n break;\n }\n used += width;\n visible++;\n }\n visible = Math.min(cap, Math.max(this.minVisible(), visible));\n\n if (collapse) {\n items.forEach((item, index) => (item.style.display = index < visible ? '' : 'none'));\n this.narrowLastVisible(items, widths, visible, visible < items.length ? available : containerWidth, gap);\n }\n this.setCounts(visible, items.length - visible);\n }\n\n /** Fits the last item `minVisible` forced into a row too narrow for it, so the badge is not pushed out. */\n private narrowLastVisible(items: HTMLElement[], widths: number[], visible: number, limit: number, gap: number): void {\n if (visible === 0) {\n return;\n }\n const last = visible - 1;\n const start = widths.slice(0, last).reduce((sum, width) => sum + width + gap, 0);\n if (start + widths[last] > limit) {\n items[last].style.maxWidth = `${Math.max(0, limit - start)}px`;\n }\n }\n\n private observe(elements: HTMLElement[]): void {\n if (!this.itemObserver) {\n return;\n }\n this.itemObserver.disconnect();\n elements.forEach(element => this.itemObserver?.observe(element));\n }\n\n /** A frame later, not in the callback: a pass toggles the observed items, which inside it raises \"ResizeObserver loop completed with undelivered notifications\". */\n private scheduleRecompute(): void {\n if (this.pendingFrame !== undefined) {\n return;\n }\n this.pendingFrame = requestAnimationFrame(() => {\n this.pendingFrame = undefined;\n this.recompute();\n });\n }\n\n /** Guarded: these signals are written from a render effect, so an unchanged pass must be inert. */\n private setCounts(visible: number, hidden: number): void {\n if (this.visible() !== visible) {\n this.visible.set(visible);\n }\n if (this.hidden() !== hidden) {\n this.hidden.set(hidden);\n }\n }\n\n private resolvedGap(): number {\n const declared = this.gap();\n if (declared !== undefined) {\n return declared;\n }\n // `column-gap` resolves to the keyword `normal` outside flex/grid, which parses to NaN.\n const computed = parseFloat(getComputedStyle(this.elementRef.nativeElement).columnGap);\n return Number.isNaN(computed) ? 0 : computed;\n }\n\n private counterWidth(): number {\n return this.counter()?.elementRef.nativeElement.offsetWidth || this.counterFallbackWidth();\n }\n}\n","import { Directive } from '@angular/core';\n\n/**\n * Stops a click from reaching the ancestors, without altering the host semantics.\n *\n * Use it on an element nested inside a clickable container — the container's handler\n * must not fire when the inner control is used.\n *\n * @example\n * ```html\n * <div class=\"row\" (click)=\"openRow()\">\n * <div class=\"row__actions\" apStopPropagation>\n * <ap-icon-button symbolId=\"more\" />\n * </div>\n * </div>\n * ```\n */\n@Directive({\n selector: '[apStopPropagation]',\n standalone: true,\n host: {\n '(click)': '$event.stopPropagation()',\n },\n})\nexport class StopPropagationDirective {}\n","import { Directive, ElementRef, OnDestroy, OnInit, inject } from '@angular/core';\n\nconst COLUMN_CLASS_PREFIX = 'cdk-column-';\n\n/**\n * Moves a column's body cells with its header cell while columns are reordered.\n *\n * Apply it to the table that carries `cdkDropList`:\n *\n * ```html\n * <table\n * cdk-table\n * cdkDropList\n * cdkDropListOrientation=\"horizontal\"\n * apTableColumnDrag>\n * ```\n */\n@Directive({\n selector: 'table[apTableColumnDrag]',\n})\nexport class TableColumnDragDirective implements OnInit, OnDestroy {\n private readonly table: HTMLElement = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private observer: MutationObserver | null = null;\n\n ngOnInit(): void {\n this.observer = new MutationObserver(mutations => this.mirrorHeaderTransforms(mutations));\n this.observer.observe(this.table, {\n attributes: true,\n attributeFilter: ['style'],\n subtree: true,\n });\n }\n\n ngOnDestroy(): void {\n this.observer?.disconnect();\n this.observer = null;\n }\n\n private mirrorHeaderTransforms(mutations: MutationRecord[]): void {\n for (const mutation of mutations) {\n const header = mutation.target;\n\n if (!(header instanceof HTMLElement) || header.tagName !== 'TH') {\n continue;\n }\n\n // The dragged header is parked off-screen while a placeholder clone\n // holds its slot, so only the element still in the flow positions the column.\n if (header.style.position === 'fixed') {\n continue;\n }\n\n const column = this.columnOf(header);\n\n if (!column) {\n continue;\n }\n\n const columnElements = Array.from(this.table.getElementsByClassName(COLUMN_CLASS_PREFIX + column));\n\n for (const element of columnElements) {\n if (element instanceof HTMLElement && element.tagName === 'TD') {\n element.style.transform = header.style.transform;\n }\n }\n }\n }\n\n private columnOf(cell: HTMLElement): string | null {\n const columnClass = Array.from(cell.classList).find(name => name.startsWith(COLUMN_CLASS_PREFIX));\n\n return columnClass?.slice(COLUMN_CLASS_PREFIX.length) ?? null;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAMA;;AAEG;MACU,yBAAyB,CAAA;AAGf,IAAA,OAAA;AAFnB,IAAA,OAAO,SAAS,GAAW,GAAG;AAE9B,IAAA,WAAA,CAAmB,OAAmB,EAAA;QAAnB,IAAA,CAAA,OAAO,GAAP,OAAO;IAAe;IAGlC,OAAO,GAAA;QACV,IAAI,CAAC,MAAM,EAAE;IACjB;IAEO,qBAAqB,GAAA;QACxB,IAAI,CAAC,MAAM,EAAE;IACjB;IAEO,MAAM,GAAA;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,KAA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oBAAA,QAAQ,EAAE,0BAA0B;AACvC,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-directives.mjs","sources":["../../../libs/ui-components/directives/src/autosize-textarea.directive.ts","../../../libs/ui-components/directives/src/base-button.directive.ts","../../../libs/ui-components/directives/src/checkbox.directive.ts","../../../libs/ui-components/directives/src/click.directive.ts","../../../libs/ui-components/directives/src/default-image.directive.ts","../../../libs/ui-components/directives/src/ellipsis.directive.ts","../../../libs/ui-components/directives/src/equal-validator.directive.ts","../../../libs/ui-components/directives/src/focusable.ts","../../../libs/ui-components/directives/src/frozen-gif.directive.ts","../../../libs/ui-components/directives/src/interactive-element.ts","../../../libs/ui-components/directives/src/multi-style-text.directive.ts","../../../libs/ui-components/directives/src/overflow-count.directive.ts","../../../libs/ui-components/directives/src/stop-propagation.directive.ts","../../../libs/ui-components/directives/src/table-column-drag.directive.ts","../../../libs/ui-components/directives/src/agorapulse-ui-components-directives.ts"],"sourcesContent":["import { AfterContentChecked, Directive, ElementRef, HostListener } from '@angular/core';\n\n@Directive({\n selector: 'textarea[apAutosize]',\n standalone: true,\n})\n/**\n * expand textarea to fit content. Doesn't shrink.\n */\nexport class AutosizeTextareaDirective implements AfterContentChecked {\n static maxHeight: number = 200;\n\n constructor(public element: ElementRef) {}\n\n @HostListener('input')\n public onInput() {\n this.resize();\n }\n\n public ngAfterContentChecked() {\n this.resize();\n }\n\n public resize() {\n const style = this.element.nativeElement.style;\n const scrollHeight = this.element.nativeElement.scrollHeight;\n const actualHeight = this.element.nativeElement.offsetHeight;\n if (AutosizeTextareaDirective.maxHeight < scrollHeight) {\n // we arrived at the max\n style.overflow = 'auto';\n style.height = `${AutosizeTextareaDirective.maxHeight}px`;\n } else if (actualHeight < scrollHeight) {\n style.overflow = 'hidden';\n style.height = `${scrollHeight}px`;\n }\n }\n}\n","import { AfterViewInit, ChangeDetectorRef, Directive, ElementRef, inject, OnInit } from '@angular/core';\n\n@Directive({\n selector: '[apBaseButton]',\n standalone: true,\n})\nexport class BaseButtonDirective implements AfterViewInit, OnInit {\n hostId: string | undefined = undefined;\n hostDataTest: string | undefined = undefined;\n hostType: string = 'button';\n\n private elementRef: ElementRef = inject(ElementRef);\n private changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\n ngOnInit() {\n this.hostDataTest = this.elementRef.nativeElement.getAttribute('data-test');\n this.hostId = this.elementRef.nativeElement.getAttribute('id');\n this.elementRef.nativeElement.removeAttribute('data-test');\n this.elementRef.nativeElement.removeAttribute('id');\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 const hostId = this.elementRef.nativeElement.getAttribute('id');\n const hostType = this.elementRef.nativeElement.getAttribute('type');\n if (hostDataTest && this.hostDataTest !== hostDataTest) {\n this.hostDataTest = hostDataTest;\n this.elementRef.nativeElement.removeAttribute('data-test');\n this.changeDetectorRef.markForCheck();\n }\n if (hostId && this.hostId !== hostId) {\n this.hostId = hostId;\n this.elementRef.nativeElement.removeAttribute('id');\n this.changeDetectorRef.markForCheck();\n }\n if (hostType && this.hostType !== hostType) {\n this.hostType = hostType;\n this.elementRef.nativeElement.removeAttribute('type');\n this.changeDetectorRef.markForCheck();\n }\n }\n}\n","import {\n booleanAttribute,\n Directive,\n effect,\n ElementRef,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Renderer2,\n signal\n} from '@angular/core';\n\n@Directive({\n selector: 'input[type=\"checkbox\"][apCheckbox]',\n standalone: true,\n providers: [],\n})\nexport class CheckboxDirective implements OnInit, OnDestroy {\n private readonly elementRef = inject(ElementRef<HTMLInputElement>);\n private readonly renderer = inject(Renderer2);\n\n // State signals\n private _checked = signal(false);\n private _indeterminate = signal(false);\n\n // Input signal accessors that work with host bindings\n checked = this._checked.asReadonly();\n indeterminate = this._indeterminate.asReadonly();\n\n // Input setters with proper aliases for template binding\n // Couldn't be migrated to yet\n @Input('checked')\n set checkedInput(checked: boolean) {\n this._checked.set(checked);\n this.updateNativeElementSync();\n }\n\n @Input({\n transform: booleanAttribute,\n alias: 'indeterminate',\n })\n set indeterminateInput(indeterminate: boolean) {\n if (indeterminate) {\n this._checked.set(false);\n }\n this._indeterminate.set(indeterminate);\n this.updateNativeElementSync();\n }\n\n private updateNativeElementSync(): void {\n const input = this.elementRef.nativeElement;\n if (input) {\n input.checked = this.checked();\n input.indeterminate = this.indeterminate();\n }\n }\n\n // Private properties\n private listeners: (() => void)[] = [];\n private styleElement!: HTMLStyleElement;\n private checkmarkSvg!: SVGElement;\n private indeterminateBar!: HTMLElement;\n\n constructor() {\n effect(() => {\n if (this.checkmarkSvg && this.indeterminateBar) {\n this.updateCheckmarkVisibility();\n }\n });\n }\n\n // Custom SVG content\n private readonly checkSvgContent = `\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\" width=\"10\" height=\"10\" fill=\"white\">\n <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M14.238 3.337a.92.92 0 0 1 .025 1.301l-7.7 8a.92.92 0 0 1-1.326 0l-3.5-3.636a.92.92 0 1 1 1.326-1.276L5.9 10.674l7.037-7.312a.92.92 0 0 1 1.301-.025Z\" />\n </svg>\n `;\n\n ngOnInit() {\n this.createCheckboxStructure();\n this.setupEventListeners();\n }\n\n ngOnDestroy(): void {\n this.listeners.forEach(unlisten => unlisten());\n if (this.styleElement && this.styleElement.parentNode) {\n this.styleElement.parentNode.removeChild(this.styleElement);\n }\n if (this.checkmarkSvg && this.checkmarkSvg.parentNode) {\n this.checkmarkSvg.parentNode.removeChild(this.checkmarkSvg);\n }\n if (this.indeterminateBar && this.indeterminateBar.parentNode) {\n this.indeterminateBar.parentNode.removeChild(this.indeterminateBar);\n }\n }\n\n private createCheckboxStructure(): void {\n const input = this.elementRef.nativeElement;\n const parent = input.parentElement;\n\n // Make input's parent use inline-flex for alignment and position relative\n if (parent) {\n this.renderer.setStyle(parent, 'display', 'inline-flex');\n this.renderer.setStyle(parent, 'align-items', 'center');\n this.renderer.setStyle(parent, 'gap', 'var(--ref-spacing-xxs)');\n this.renderer.setStyle(parent, 'position', 'relative');\n }\n\n this.renderer.addClass(input, 'ap-checkbox-styled');\n\n this.createCheckmarkSvg();\n this.createIndeterminateBar();\n\n this.applyCheckboxStyles();\n\n this.updateCheckmarkVisibility();\n }\n\n private createOverlayElement(element: HTMLElement | SVGElement): void {\n const parent = this.elementRef.nativeElement.parentElement;\n\n // Apply common positioning styles\n this.renderer.setStyle(element, 'position', 'absolute');\n this.renderer.setStyle(element, 'top', '50%');\n this.renderer.setStyle(element, 'left', '8px'); // Center over 16px checkbox\n this.renderer.setStyle(element, 'transform', 'translate(-50%, -50%)');\n this.renderer.setStyle(element, 'pointer-events', 'none');\n this.renderer.setStyle(element, 'opacity', '0');\n this.renderer.setStyle(element, 'z-index', '1');\n\n // Append to parent\n this.renderer.appendChild(parent, element);\n }\n\n private createCheckmarkSvg(): void {\n // Create SVG element from string\n const tempDiv = this.renderer.createElement('div');\n this.renderer.setProperty(tempDiv, 'innerHTML', this.checkSvgContent);\n this.checkmarkSvg = tempDiv.firstElementChild as SVGElement;\n\n this.createOverlayElement(this.checkmarkSvg);\n }\n\n private createIndeterminateBar(): void {\n // Create the indeterminate bar element\n this.indeterminateBar = this.renderer.createElement('span');\n this.renderer.setStyle(this.indeterminateBar, 'height', '1.5px');\n this.renderer.setStyle(this.indeterminateBar, 'background', 'var(--ref-color-white)');\n this.renderer.setStyle(this.indeterminateBar, 'width', '8px');\n\n this.createOverlayElement(this.indeterminateBar);\n }\n\n private updateCheckmarkVisibility(): void {\n if (this.checkmarkSvg) {\n const opacity = this.checked() && !this.indeterminate() ? '1' : '0';\n this.renderer.setStyle(this.checkmarkSvg, 'opacity', opacity);\n }\n if (this.indeterminateBar) {\n const opacity = this.indeterminate() && !this.checked() ? '1' : '0';\n this.renderer.setStyle(this.indeterminateBar, 'opacity', opacity);\n }\n }\n\n private setupEventListeners(): void {\n const input = this.elementRef.nativeElement;\n\n // Input change listener (native checkbox change)\n const changeListener = this.renderer.listen(input, 'change', () => {\n this.onValueChange();\n });\n this.listeners.push(changeListener);\n\n // Listen for label clicks to ensure focus is maintained\n const parent = input.parentElement;\n if (parent) {\n const labelClickListener = this.renderer.listen(parent, 'click', (event: MouseEvent) => {\n const target = event.target as HTMLElement;\n // If clicking on a label that targets our input, ensure focus\n if (target.tagName === 'LABEL' && target.getAttribute('for') === input.id) {\n // Small delay to ensure the label click is processed first\n setTimeout(() => {\n input.focus();\n }, 0);\n }\n });\n this.listeners.push(labelClickListener);\n }\n }\n\n private applyCheckboxStyles(): void {\n const styles = `\n /* Minimal checkbox styling */\n input[type=\"checkbox\"].ap-checkbox-styled {\n appearance: none !important;\n -webkit-appearance: none !important;\n -moz-appearance: none !important;\n \n display: inline-block !important;\n width: 16px !important;\n height: 16px !important;\n min-width: 16px !important;\n min-height: 16px !important;\n margin: 0 !important;\n padding: 0 !important;\n border: 1px solid var(--ref-color-grey-60);\n border-radius: var(--sys-border-radius-sm);\n background: var(--ref-color-white);\n box-sizing: border-box;\n cursor: pointer;\n vertical-align: middle;\n }\n \n /* Hover state */\n input[type=\"checkbox\"].ap-checkbox-styled:hover {\n border-color: var(--ref-color-grey-80);\n }\n \n /* Active/pressed state */\n input[type=\"checkbox\"].ap-checkbox-styled:active {\n border-color: var(--ref-color-grey-100);\n }\n \n /* Checked state */\n input[type=\"checkbox\"].ap-checkbox-styled:checked {\n background: var(--ref-color-electric-blue-100);\n border-color: var(--ref-color-electric-blue-100);\n }\n \n /* Checked hover state */\n input[type=\"checkbox\"].ap-checkbox-styled:checked:hover {\n background: var(--ref-color-electric-blue-80);\n border-color: var(--ref-color-electric-blue-100);\n }\n \n /* Checked active/pressed state */\n input[type=\"checkbox\"].ap-checkbox-styled:checked:active {\n background: var(--ref-color-electric-blue-60);\n border-color: var(--ref-color-electric-blue-100);\n }\n \n /* Indeterminate state */\n input[type=\"checkbox\"].ap-checkbox-styled:indeterminate {\n background: var(--ref-color-electric-blue-100);\n border-color: var(--ref-color-electric-blue-100);\n }\n \n /* Disabled state */\n input[type=\"checkbox\"].ap-checkbox-styled:disabled {\n border-color: var(--ref-color-grey-20);\n background: var(--ref-color-grey-10);\n cursor: default;\n }\n \n input[type=\"checkbox\"].ap-checkbox-styled:disabled:checked {\n background: var(--ref-color-grey-20);\n }\n \n /* Focus state */\n @media (hover: hover) {\n input[type=\"checkbox\"].ap-checkbox-styled:focus:not(.disabled) {\n outline: 3px solid var(--ref-color-electric-blue-100) !important;\n outline-offset: 1px !important;\n }\n }\n \n /* Label styling */\n input[type=\"checkbox\"].ap-checkbox-styled + label {\n display: flex;\n align-items: center;\n font-family: var(--comp-forms-label-font-family);\n font-size: var(--comp-forms-label-size);\n font-weight: var(--comp-forms-label-font-weight);\n line-height: var(--comp-forms-label-line-height);\n color: var(--comp-forms-label-text-color);\n cursor: pointer;\n }\n \n /* Empty label styling */\n input[type=\"checkbox\"].ap-checkbox-styled + label:empty {\n display: none;\n }\n \n /* Disabled label styling */\n input[type=\"checkbox\"].ap-checkbox-styled:disabled + label {\n color: var(--ref-color-grey-60);\n cursor: default;\n }\n `;\n\n // Create and append style element\n this.styleElement = this.renderer.createElement('style');\n this.renderer.appendChild(this.styleElement, this.renderer.createText(styles));\n this.renderer.appendChild(document.head, this.styleElement);\n }\n\n private onValueChange(): void {\n if (!this.elementRef.nativeElement.disabled) {\n const input = this.elementRef.nativeElement;\n\n if (this.indeterminate()) {\n // When indeterminate, clicking should go to checked state\n this._checked.set(true);\n this._indeterminate.set(false);\n input.checked = true;\n input.indeterminate = false;\n } else {\n // Normal toggle behavior\n this._checked.set(input.checked);\n }\n }\n }\n}\n","import { booleanAttribute, Directive, ElementRef, inject, input, isDevMode, output } from '@angular/core';\n\nconst NATIVELY_ACTIVATED_TAGS = new Set(['BUTTON', 'INPUT', 'SELECT', 'TEXTAREA', 'SUMMARY']);\n\n/** Host tags already reported as redundant, so a 500-row list logs one line instead of 500. */\nconst warnedTags = new Set<string>();\n\n/**\n * Turns a non-interactive element into a control: it receives an ARIA role, enters the\n * tab order and activates with the keyboard, through the `(apClick)` binding alone.\n *\n * Prefer a real `<button>` whenever the layout allows one. Reach for this directive when\n * the element cannot be a button — a table row, a card, a styled anchor with no href.\n *\n * @example\n * ```html\n * <div (apClick)=\"openPost()\">…</div>\n * <span (apClick)=\"openDocs()\" apClickRole=\"link\">…</span>\n * <tr (apClick)=\"openRow()\" [apClickDisabled]=\"editing()\">…</tr>\n * ```\n */\n@Directive({\n selector: '[apClick]',\n standalone: true,\n host: {\n '[attr.role]': 'isInteractive() ? apClickRole() : null',\n '[attr.tabindex]': 'isInteractive() ? 0 : null',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeydown($event)',\n },\n})\nexport class ClickDirective {\n /** Turns the host back into a plain element: no role, no tab stop, no activation at all. */\n apClickDisabled = input(false, { transform: booleanAttribute });\n\n /** ARIA role applied while the host is interactive. */\n apClickRole = input('button');\n\n apClick = output<MouseEvent | KeyboardEvent>();\n\n private host: HTMLElement = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n constructor() {\n if (isDevMode() && this.isNativelyActivated()) {\n this.warnRedundant();\n }\n }\n\n protected isInteractive(): boolean {\n return !this.apClickDisabled() && !this.isNativelyActivated();\n }\n\n /** The two checks are independent, so an anchor without `href` still gets its contenteditable read. */\n private isNativelyActivated(): boolean {\n if (NATIVELY_ACTIVATED_TAGS.has(this.host.tagName)) {\n return true;\n }\n\n return this.isNativeAnchor() || this.isContentEditable();\n }\n\n /**\n * `routerLink` counts as an `href`, and is read as a written attribute so the answer does not\n * depend on whether this directive's host bindings run before RouterLink's. A bound\n * `[routerLink]` leaves no attribute, so such an anchor stays plain until RouterLink writes one.\n */\n private isNativeAnchor(): boolean {\n const isAnchor = this.host.tagName === 'A' || this.host.tagName === 'AREA';\n\n return isAnchor && (this.host.hasAttribute('href') || this.host.hasAttribute('routerLink'));\n }\n\n /** `contenteditable=\"false\"` is explicitly opted out, so only a present, non-\"false\" value counts. */\n private isContentEditable(): boolean {\n return this.host.hasAttribute('contenteditable') && this.host.getAttribute('contenteditable') !== 'false';\n }\n\n private warnRedundant(): void {\n const tag = this.host.tagName.toLowerCase();\n if (warnedTags.has(tag)) {\n return;\n }\n\n warnedTags.add(tag);\n console.warn(`apClick is redundant on <${tag}>: the browser already activates it with the keyboard.`);\n }\n\n protected onClick(event: MouseEvent): void {\n // Not isInteractive(): a natively interactive host must keep emitting, or its existing\n // (apClick) binding would silently stop working.\n if (this.apClickDisabled()) {\n return;\n }\n\n this.apClick.emit(event);\n }\n\n protected onKeydown(event: KeyboardEvent): void {\n // A key pressed inside a focusable child must not activate the host.\n if (!this.isInteractive() || event.target !== this.host) {\n return;\n }\n\n if (!this.activationKeys().includes(event.key)) {\n return;\n }\n\n // Before the repeat guard: every repeat must be cancelled, or the page scrolls under a held Space.\n if (event.key === ' ') {\n event.preventDefault();\n }\n\n // A native button activates once per press, however long the key is held.\n if (event.repeat) {\n return;\n }\n\n this.apClick.emit(event);\n }\n\n /** A link activates on Enter only; every other role also answers Space. */\n private activationKeys(): readonly string[] {\n return this.apClickRole() === 'link' ? ['Enter'] : ['Enter', ' '];\n }\n}\n","import { Directive, Input } from '@angular/core';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'img[default]',\n standalone: true,\n host: {\n '(error)': 'updateUrl()',\n '[src]': 'src',\n },\n})\nexport class DefaultImageDirective {\n @Input({\n required: true,\n })\n src = '';\n @Input() default = '';\n\n updateUrl() {\n if (this.default) {\n this.src = this.default;\n } else {\n this.src = 'assets/lib-ui-components/img/default-avatar.png';\n }\n }\n}\n","import { AfterContentChecked, Directive, ElementRef, EventEmitter, Input, Output } from '@angular/core';\n\n/**\n * Removes excess text from element until it fits in elements\n * and appends a ellipsis symbol to end of text. This requires that\n * the elements height be fixed\n *\n * @example\n * ```html\n * <p apEllipsis>Ullamco esse laborum</p>\n * ```\n *\n */\n@Directive({\n selector: '[apEllipsis]',\n standalone: true,\n})\nexport class EllipsisDirective implements AfterContentChecked {\n @Input() apEllipsisSeparator = '';\n @Input() apEllipsisClip = false;\n @Input() apEllipsisIndex = -2;\n @Input() apEllipsisChar = '...';\n @Input() apEllipsisClickable = false;\n\n @Output() apEllipsisRemovedElementsCount = new EventEmitter<number>();\n @Output() apEllipsisRemovedText = new EventEmitter<string>();\n\n private get hasOverflow(): boolean {\n const el: HTMLElement = this.el.nativeElement;\n return el.scrollHeight > el.offsetHeight || el.scrollWidth > el.offsetWidth;\n }\n\n constructor(private el: ElementRef) {}\n\n ngAfterContentChecked() {\n this.clipText();\n }\n\n private clipText(): void {\n const el: HTMLElement = this.el.nativeElement;\n let text = el.innerText;\n let removedText = '';\n if (this.apEllipsisIndex > -1) {\n removedText = text.substring(this.apEllipsisIndex, text.length - 1) + removedText;\n text = text.substring(0, this.apEllipsisIndex);\n el.innerText = `${text}${this.apEllipsisChar}`;\n\n if (this.apEllipsisClickable) {\n el.addEventListener('click', () => {\n el.innerText = `${text}${removedText}`;\n });\n }\n } else {\n while (this.hasOverflow && text.length > 0) {\n removedText = text[text.length - 1] + removedText;\n text = text.substring(0, text.length - 1);\n el.innerText = `${text}${this.apEllipsisChar}`;\n }\n }\n\n if (this.apEllipsisSeparator) {\n const removedElementsCount = removedText\n .split(this.apEllipsisSeparator)\n .filter(element => !!element && element.length > 0).length;\n if (removedElementsCount > 0) {\n this.apEllipsisRemovedElementsCount.emit(removedElementsCount);\n }\n }\n if (removedText && removedText.length > 0) {\n this.apEllipsisRemovedText.emit(removedText);\n }\n }\n}\n","// Based on https://scotch.io/tutorials/how-to-implement-a-custom-validator-directive-confirm-password-in-angular-2\nimport { Attribute, Directive, forwardRef } from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, Validator } from '@angular/forms';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[validateEqual][formControlName],[validateEqual][formControl],[validateEqual][ngModel]',\n providers: [\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => EqualValidatorDirective),\n multi: true,\n },\n ],\n standalone: true,\n})\nexport class EqualValidatorDirective implements Validator {\n constructor(\n @Attribute('validateEqual') public validateEqual: string,\n @Attribute('validateEqualReference') public validateEqualReference: string\n ) {}\n\n validate(self: AbstractControl): { [key: string]: any } | null {\n const other = self.root.get(this.validateEqual);\n if (other) {\n if (this.isReference()) {\n if (self.value === other.value) {\n if (other.errors) {\n delete other.errors['validateEqual'];\n if (!Object.keys(other.errors).length) {\n other.setErrors(null);\n }\n } else {\n other.setErrors(null);\n }\n } else {\n other.setErrors({ validateEqual: false });\n }\n } else if (self.value !== other.value) {\n return { validateEqual: false };\n }\n }\n return null;\n }\n\n private isReference(): boolean {\n if (!this.validateEqualReference) {\n return false;\n }\n return this.validateEqualReference === 'true';\n }\n}\n","/**\n * The elements that can take keyboard focus inside a wrapper, for reaching the real control behind a component host.\n * `tabindex=\"-1\"` is left out: it marks a focus target, not an entry point.\n */\nexport const FOCUSABLE_INSIDE = 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])';\n","import { Directive, ElementRef, Input, OnChanges } from '@angular/core';\n\nexport class GifService {\n static isGif(src: string) {\n return src && src.split('?')[0].endsWith('.gif');\n }\n}\n\n/**\n * If the image is a GIF then replace the img element by a canvas containing a frozen gif.\n * Note 1: if the image is displayed under a condition, the condition must be applied on the parent of the image, so the\n * new canvas element will have the same condition.\n * Note 2: the image must not have the properties \"display\" and \"visibility\" in its style. Since they are used to frozen\n * the GIF. You need to apply this properties on the parent element.\n * Note 3: If the GIF is frozen, all the event are propagated to the image. However, all events are dispatched\n * with an Event instance. Ex: click event is not dispatched with a MouseEvent instance.\n */\n\n@Directive({\n selector: 'img[apFrozenGif]',\n host: {\n '[src]': 'src',\n },\n standalone: true,\n})\nexport class FrozenGifDirective implements OnChanges {\n @Input({\n required: true,\n })\n src = '';\n @Input() apFrozen = true;\n // Add all the events that need to be propagated.\n @Input() apGifEvents: string[] = ['click'];\n\n private readonly element!: HTMLImageElement;\n private canvas: HTMLCanvasElement | null = null;\n\n constructor(private elementRef: ElementRef) {\n const element = this.elementRef.nativeElement;\n if (!(element instanceof HTMLImageElement)) {\n return;\n }\n\n this.element = element;\n }\n\n ngOnChanges(changes: any): void {\n let freeze = false;\n if (changes.src) {\n freeze = true;\n }\n if (changes.frozen) {\n if (changes.frozen.currentValue) {\n freeze = true;\n } else {\n this.unfreeze();\n }\n }\n\n if (freeze) {\n this.freeze();\n }\n }\n\n private freeze() {\n if (!GifService.isGif(this.src) || !this.apFrozen) {\n this.unfreeze();\n return;\n }\n\n // hack to avoid displaying the GIF before replacing it by the canvas\n this.element.style.visibility = 'hidden';\n this.element.addEventListener('load', () => this.addCanvas());\n }\n\n private addCanvas() {\n if (this.canvas) {\n this.canvas.remove();\n }\n\n this.canvas = document.createElement('canvas');\n this.canvas.width = this.element.width;\n this.canvas.height = this.element.height;\n this.canvas.getContext('2d')?.drawImage(this.element, 0, 0, this.canvas.width, this.canvas.height);\n for (let i = 0; i < this.element.attributes.length; i++) {\n const attr = this.element.attributes[i];\n if (attr.name === 'id') {\n // avoid two elements with the same id\n this.canvas.setAttribute('id', attr.value + '_frozenGif');\n } else if ((attr.name === 'style' && attr.value.includes('visibility: hidden;')) || attr.value.includes('display: none;')) {\n // remove the added 'visibility: hidden' and 'display: none'\n const styleValue = attr.value;\n this.canvas.setAttribute('style', styleValue.replace('visibility: hidden;', '').replace('display: none;', ''));\n } else if (attr.name !== '\"') {\n // test for invalid attributes\n this.canvas.setAttribute(attr.name, attr.value);\n }\n }\n\n this.addEvents();\n\n this.element.parentNode?.insertBefore(this.canvas, this.element);\n this.element.style.display = 'none';\n }\n\n private addEvents() {\n this.apGifEvents.forEach((eventName: string) => {\n this.canvas?.addEventListener(eventName, (ev: Event) =>\n this.element.dispatchEvent(\n // wm: find a way to dispatch the right event type\n new Event(ev.type, ev)\n )\n );\n });\n }\n\n private unfreeze() {\n if (this.canvas) {\n this.canvas.remove();\n this.canvas = null;\n }\n this.element.style.visibility = 'inherit';\n this.element.style.display = 'inherit';\n }\n}\n","import { InjectionToken } from '@angular/core';\n\n/**\n * A component that renders the element users and assistive tech actually reach, rather than being it.\n * `<ap-button>` is the case that matters: its host is a plain custom element wrapping a real `<button>`.\n */\nexport interface ApInteractiveElement {\n interactiveElement(): HTMLElement;\n}\n\n/** Provided by such a component so a directive on its host can reach inside without guessing. */\nexport const AP_INTERACTIVE_ELEMENT = new InjectionToken<ApInteractiveElement>('AP_INTERACTIVE_ELEMENT');\n","import { Directive, ElementRef, EventEmitter, Input, Output, Renderer2 } from '@angular/core';\nimport DOMPurify from 'dompurify';\n\nconst DATA_MST = 'data-mst';\n\n/**\n * This directive aims to parse simple string to extract some specific tags and to turn them into SPAN with styling classes attributes and optional event listening.\n * The specific tags must this schema: <ng-container data-mst=\"STYLING-CLASSES\">TEXT</ng-container>.\n * Example: 'Lorem <ng-container data-mst=\"my-style\">ipsum</ng-container> dolor sit amet'.\n */\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: '[multiStyleText]',\n standalone: true,\n})\nexport class MultiStyleTextDirective {\n @Input() set multiStyleText(fullText: string) {\n // First remove previously added children (on update).\n this.renderer.setProperty(this.elRef.nativeElement, 'innerHTML', '');\n if (!fullText || fullText.length <= 0) {\n return;\n }\n\n this.renderer.setProperty(this.elRef.nativeElement, 'innerHTML', DOMPurify.sanitize(fullText.replace(/ng-container/g, 'span')));\n\n Array.from(this.elRef.nativeElement.children).forEach((childNode: Element) => {\n if (childNode.nodeType == 1 && childNode.tagName.toLowerCase() === 'span') {\n // Node.ELEMENT_NODE\n\n const span: HTMLElement = this.renderer.createElement('span');\n span.innerHTML = childNode.innerHTML;\n this.elRef.nativeElement.replaceChild(span, childNode);\n\n const mstValue = childNode.getAttribute(DATA_MST);\n if (mstValue) {\n const mstContents = mstValue.split(';');\n // Bind click events\n if (mstContents[1]) {\n this.renderer.listen(span, 'click', () => this.partEvent.emit(mstContents[1]));\n }\n // Add classes\n if (mstContents[0] && mstContents[0].length > 0) {\n this.renderer.setAttribute(span, 'class', mstContents[0].replace(',', ' '));\n }\n }\n }\n });\n }\n\n @Output() partEvent = new EventEmitter<string>();\n\n public constructor(\n private elRef: ElementRef<HTMLElement>,\n private renderer: Renderer2\n ) {}\n}\n","import {\n afterRenderEffect,\n booleanAttribute,\n contentChild,\n contentChildren,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n numberAttribute,\n signal,\n untracked,\n} from '@angular/core';\nimport { outputToObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { NgxResize } from 'ngxtension/resize';\n\n/** Marks an element as one of the items the row may collapse. */\n@Directive({\n selector: '[apOverflowItem]',\n})\nexport class OverflowItemDirective {\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n}\n\n/**\n * Marks the \"+N\" badge so its width can be reserved. Optional, and the first pass never has it:\n * the badge only enters the DOM once `hiddenCount()` is above zero, so `counterFallbackWidth` stands in.\n */\n@Directive({\n selector: '[apOverflowCounter]',\n})\nexport class OverflowCounterDirective {\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n}\n\n/**\n * Lays a row of items out on a single line and collapses whatever overflows into a \"+N\" badge.\n *\n * Put it on the container, mark the items with `apOverflowItem` and the badge with\n * `apOverflowCounter`; read `hiddenCount()` to render the badge and to derive the hidden data.\n * The container is measured, so it must be the box that actually bounds the row — give it\n * `overflow: hidden` and keep the items from shrinking. When `minVisible` keeps an item the row is\n * too narrow for, that last item gets a `max-width` so the badge stays inside: let it truncate.\n *\n * Specs that mock a consumer's dependencies have to keep this directive — ng-mocks stubs inputs\n * and outputs, not plain signal members, so a mocked `hiddenCount` is not callable:\n * `MockBuilder(MyComponent).keep(OverflowCountDirective)`.\n *\n * @example\n * ```html\n * <div class=\"chips\" apOverflowCount #overflow=\"apOverflowCount\">\n * @for (chip of chips(); track chip.id) {\n * <ap-tag apOverflowItem>{{ chip.label }}</ap-tag>\n * }\n * @if (overflow.hiddenCount() > 0) {\n * <ap-tag apOverflowCounter>+{{ overflow.hiddenCount() }}</ap-tag>\n * }\n * </div>\n * ```\n */\n@Directive({\n selector: '[apOverflowCount]',\n exportAs: 'apOverflowCount',\n hostDirectives: [NgxResize],\n})\nexport class OverflowCountDirective {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly ngxResize = inject(NgxResize);\n\n /**\n * Space between two items, in pixels. Read from the container's computed `column-gap` when left\n * undefined, which is what a flex or grid row already declares — pass it only when the gap comes\n * from somewhere the container doesn't express, such as item margins.\n */\n readonly gap = input<number | undefined>(undefined, {\n transform: (value: unknown) => (value == null ? undefined : numberAttribute(value)),\n });\n /** Width to reserve for the \"+N\" badge while it is not in the DOM to be measured. */\n readonly counterFallbackWidth = input(24, { transform: numberAttribute });\n /** Items kept visible whatever the width. A lone \"+N\" reads as an empty row, hence the default. */\n readonly minVisible = input(1, { transform: numberAttribute });\n /** Most items laid out whatever the width, for a group capped by design (\"2 avatars at most\"). */\n readonly max = input<number | undefined>(undefined, {\n transform: (value: unknown) => (value == null ? undefined : numberAttribute(value)),\n });\n /**\n * Set to false to lay every item out and hide none, for a row unfolded or wrapping on purpose. The\n * counts still say what a collapse would hide, so an unfolded row knows when folding it hides nothing.\n */\n readonly collapse = input(true, { transform: booleanAttribute });\n\n private readonly items = contentChildren(OverflowItemDirective, { descendants: true });\n private readonly counter = contentChild(OverflowCounterDirective);\n\n private readonly visible = signal(0);\n private readonly hidden = signal(0);\n\n // An item can change width while the container does not: a web font landing, a label re-rendered.\n private readonly itemObserver = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(() => this.scheduleRecompute());\n private pendingFrame: number | undefined;\n\n /** How many items fit on the line: the ones laid out, unless `collapse` is false. */\n readonly visibleCount = this.visible.asReadonly();\n /** How many items do not fit — the number the \"+N\" badge shows. With `collapse` false they stay laid out. */\n readonly hiddenCount = this.hidden.asReadonly();\n\n constructor() {\n // ngxtension pipes its whole stream — the ResizeObserver callback included, despite the name —\n // through `debounceTime(debounce.scroll ?? 0)`, and `scroll` defaults to 50. That debounce is\n // trailing, so while a drag keeps firing events nothing comes through at all and the count\n // only catches up once the pointer stops. Zero on both, and the row follows the drag.\n //\n // A consumer whose row is expensive enough to want a debounce can still put one back through\n // ngxtension's own `provideResizeOptions`, which NgxResize merges over this.\n this.ngxResize.ngxResizeOptions = { debounce: { scroll: 0, resize: 0 } };\n\n // Straight off the observer, not through a signal and a render pass: ResizeObserver already\n // fires after layout, so the widths are there to be read.\n outputToObservable(this.ngxResize.ngxResize)\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.recompute());\n\n // The item set is the other trigger, and that one does have to wait for the render: the new\n // items have to exist before they can be measured. The badge too: the first pass reserved its\n // fallback width, and its real one is only known once it is in the DOM.\n afterRenderEffect(() => {\n const items = this.items();\n const counter = this.counter();\n this.collapse();\n this.max();\n untracked(() => {\n this.observe([...items.map(item => item.elementRef.nativeElement), ...(counter ? [counter.elementRef.nativeElement] : [])]);\n this.recompute();\n });\n });\n\n inject(DestroyRef).onDestroy(() => {\n this.itemObserver?.disconnect();\n if (this.pendingFrame !== undefined) {\n cancelAnimationFrame(this.pendingFrame);\n }\n });\n }\n\n /** Measures the row and collapses its overflow. Public so a consumer resizing the container itself can force a pass. */\n recompute(): void {\n const items = this.items().map(item => item.elementRef.nativeElement);\n\n // Undo the previous collapse first, so what follows measures natural widths. Before the early\n // return too: a pass that cannot measure would otherwise leave items out of the flow while\n // reporting nothing hidden — a blank row, badge included.\n items.forEach(item => {\n item.style.display = '';\n item.style.maxWidth = '';\n });\n\n const collapse = this.collapse();\n\n // The cap needs no measurement, so it holds even in a container that cannot be measured.\n const cap = Math.min(items.length, this.max() ?? items.length);\n const containerWidth = this.elementRef.nativeElement.clientWidth;\n if (!items.length || containerWidth === 0) {\n if (collapse) {\n items.forEach((item, index) => (item.style.display = index < cap ? '' : 'none'));\n }\n this.setCounts(cap, items.length - cap);\n return;\n }\n\n const gap = this.resolvedGap();\n const widths = items.map(item => item.offsetWidth);\n const total = widths.reduce((sum, width) => sum + width, 0) + gap * (items.length - 1);\n if (cap === items.length && total <= containerWidth) {\n this.setCounts(items.length, 0);\n return;\n }\n\n // Something overflows: reserve the badge's room and keep as many items as fit before it.\n const available = containerWidth - gap - this.counterWidth();\n let used = 0;\n let visible = 0;\n for (let index = 0; index < cap; index++) {\n const width = widths[index] + (index > 0 ? gap : 0);\n if (used + width > available) {\n break;\n }\n used += width;\n visible++;\n }\n visible = Math.min(cap, Math.max(this.minVisible(), visible));\n\n if (collapse) {\n items.forEach((item, index) => (item.style.display = index < visible ? '' : 'none'));\n this.narrowLastVisible(items, widths, visible, visible < items.length ? available : containerWidth, gap);\n }\n this.setCounts(visible, items.length - visible);\n }\n\n /** Fits the last item `minVisible` forced into a row too narrow for it, so the badge is not pushed out. */\n private narrowLastVisible(items: HTMLElement[], widths: number[], visible: number, limit: number, gap: number): void {\n if (visible === 0) {\n return;\n }\n const last = visible - 1;\n const start = widths.slice(0, last).reduce((sum, width) => sum + width + gap, 0);\n if (start + widths[last] > limit) {\n items[last].style.maxWidth = `${Math.max(0, limit - start)}px`;\n }\n }\n\n private observe(elements: HTMLElement[]): void {\n if (!this.itemObserver) {\n return;\n }\n this.itemObserver.disconnect();\n elements.forEach(element => this.itemObserver?.observe(element));\n }\n\n /** A frame later, not in the callback: a pass toggles the observed items, which inside it raises \"ResizeObserver loop completed with undelivered notifications\". */\n private scheduleRecompute(): void {\n if (this.pendingFrame !== undefined) {\n return;\n }\n this.pendingFrame = requestAnimationFrame(() => {\n this.pendingFrame = undefined;\n this.recompute();\n });\n }\n\n /** Guarded: these signals are written from a render effect, so an unchanged pass must be inert. */\n private setCounts(visible: number, hidden: number): void {\n if (this.visible() !== visible) {\n this.visible.set(visible);\n }\n if (this.hidden() !== hidden) {\n this.hidden.set(hidden);\n }\n }\n\n private resolvedGap(): number {\n const declared = this.gap();\n if (declared !== undefined) {\n return declared;\n }\n // `column-gap` resolves to the keyword `normal` outside flex/grid, which parses to NaN.\n const computed = parseFloat(getComputedStyle(this.elementRef.nativeElement).columnGap);\n return Number.isNaN(computed) ? 0 : computed;\n }\n\n private counterWidth(): number {\n return this.counter()?.elementRef.nativeElement.offsetWidth || this.counterFallbackWidth();\n }\n}\n","import { Directive } from '@angular/core';\n\n/**\n * Stops a click from reaching the ancestors, without altering the host semantics.\n *\n * Use it on an element nested inside a clickable container — the container's handler\n * must not fire when the inner control is used.\n *\n * @example\n * ```html\n * <div class=\"row\" (click)=\"openRow()\">\n * <div class=\"row__actions\" apStopPropagation>\n * <ap-icon-button symbolId=\"more\" />\n * </div>\n * </div>\n * ```\n */\n@Directive({\n selector: '[apStopPropagation]',\n standalone: true,\n host: {\n '(click)': '$event.stopPropagation()',\n },\n})\nexport class StopPropagationDirective {}\n","import { Directive, ElementRef, OnDestroy, OnInit, inject } from '@angular/core';\n\nconst COLUMN_CLASS_PREFIX = 'cdk-column-';\n\n/**\n * Moves a column's body cells with its header cell while columns are reordered.\n *\n * Apply it to the table that carries `cdkDropList`:\n *\n * ```html\n * <table\n * cdk-table\n * cdkDropList\n * cdkDropListOrientation=\"horizontal\"\n * apTableColumnDrag>\n * ```\n */\n@Directive({\n selector: 'table[apTableColumnDrag]',\n})\nexport class TableColumnDragDirective implements OnInit, OnDestroy {\n private readonly table: HTMLElement = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n private observer: MutationObserver | null = null;\n\n ngOnInit(): void {\n this.observer = new MutationObserver(mutations => this.mirrorHeaderTransforms(mutations));\n this.observer.observe(this.table, {\n attributes: true,\n attributeFilter: ['style'],\n subtree: true,\n });\n }\n\n ngOnDestroy(): void {\n this.observer?.disconnect();\n this.observer = null;\n }\n\n private mirrorHeaderTransforms(mutations: MutationRecord[]): void {\n for (const mutation of mutations) {\n const header = mutation.target;\n\n if (!(header instanceof HTMLElement) || header.tagName !== 'TH') {\n continue;\n }\n\n // The dragged header is parked off-screen while a placeholder clone\n // holds its slot, so only the element still in the flow positions the column.\n if (header.style.position === 'fixed') {\n continue;\n }\n\n const column = this.columnOf(header);\n\n if (!column) {\n continue;\n }\n\n const columnElements = Array.from(this.table.getElementsByClassName(COLUMN_CLASS_PREFIX + column));\n\n for (const element of columnElements) {\n if (element instanceof HTMLElement && element.tagName === 'TD') {\n element.style.transform = header.style.transform;\n }\n }\n }\n }\n\n private columnOf(cell: HTMLElement): string | null {\n const columnClass = Array.from(cell.classList).find(name => name.startsWith(COLUMN_CLASS_PREFIX));\n\n return columnClass?.slice(COLUMN_CLASS_PREFIX.length) ?? null;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;AAMA;;AAEG;MACU,yBAAyB,CAAA;AAGf,IAAA,OAAA;AAFnB,IAAA,OAAO,SAAS,GAAW,GAAG;AAE9B,IAAA,WAAA,CAAmB,OAAmB,EAAA;QAAnB,IAAA,CAAA,OAAO,GAAP,OAAO;IAAe;IAGlC,OAAO,GAAA;QACV,IAAI,CAAC,MAAM,EAAE;IACjB;IAEO,qBAAqB,GAAA;QACxB,IAAI,CAAC,MAAM,EAAE;IACjB;IAEO,MAAM,GAAA;QACT,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK;QAC9C,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,YAAY;QAC5D,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,YAAY;AAC5D,QAAA,IAAI,yBAAyB,CAAC,SAAS,GAAG,YAAY,EAAE;;AAEpD,YAAA,KAAK,CAAC,QAAQ,GAAG,MAAM;YACvB,KAAK,CAAC,MAAM,GAAG,CAAA,EAAG,yBAAyB,CAAC,SAAS,IAAI;QAC7D;AAAO,aAAA,IAAI,YAAY,GAAG,YAA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E;gBACT;YACJ;AAEA,YAAA,MAAM,cAAc,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,GAAG,MAAM,CAAC,CAAC;AAElG,YAAA,KAAK,MAAM,OAAO,IAAI,cAAc,EAAE;gBAClC,IAAI,OAAO,YAAY,WAAW,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI,EAAE;oBAC5D,OAAO,CAAC,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,KAAK,CAAC,SAAS;gBACpD;YACJ;QACJ;IACJ;AAEQ,IAAA,QAAQ,CAAC,IAAiB,EAAA;QAC9B,MAAM,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC;QAEjG,OAAO,WAAW,EAAE,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,IAAI,IAAI;IACjE;uGApDS,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0BAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,0BAA0B;AACvC,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, ElementRef, input, Directive, HostListener } from '@angular/core';
|
|
3
|
+
import { FOCUSABLE_INSIDE } from '@agorapulse/ui-components/directives';
|
|
3
4
|
import { createFloatingOverlay } from '@agorapulse/ui-components/floating';
|
|
4
5
|
|
|
5
6
|
/** Set on the active option by `ActiveDescendantKeyManager`, where focus stays in a search field. */
|
|
@@ -99,8 +100,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
99
100
|
|
|
100
101
|
/** Natively interactive, or made focusable on purpose. `[tabindex]` includes `-1`: still a focus target. */
|
|
101
102
|
const INTERACTIVE = 'button, [href], input, select, textarea, [tabindex]';
|
|
102
|
-
/** What to fall back to inside a wrapper. Here `-1` is excluded: it is a target, not an entry point. */
|
|
103
|
-
const FOCUSABLE_INSIDE = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
104
103
|
/**
|
|
105
104
|
* The element a trigger really exposes — what takes focus and carries `aria-expanded`.
|
|
106
105
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-dropdown-base.mjs","sources":["../../../libs/ui-components/dropdown-base/src/dropdown-option.directive.ts","../../../libs/ui-components/dropdown-base/src/dropdown-trigger.directive.ts","../../../libs/ui-components/dropdown-base/src/trigger-element.ts","../../../libs/ui-components/dropdown-base/src/dropdown-overlay.helper.ts","../../../libs/ui-components/dropdown-base/src/agorapulse-ui-components-dropdown-base.ts"],"sourcesContent":["import { FocusableOption, Highlightable } from '@angular/cdk/a11y';\nimport { Directive, ElementRef, inject, input } from '@angular/core';\n\n/** Set on the active option by `ActiveDescendantKeyManager`, where focus stays in a search field. */\nexport const DROPDOWN_OPTION_ACTIVE_CLASS = 'ap-dropdown-option--active';\n\n/**\n * Marks an element a `ListKeyManager` can drive. It satisfies both managers, because the right one\n * depends on the role: `FocusKeyManager` moves real focus through a menu or a plain listbox,\n * `ActiveDescendantKeyManager` leaves focus in a combobox's input and only marks the active option.\n *\n * The panel is role-agnostic, so the host says which of its children are options.\n */\n@Directive({ selector: '[apDropdownOption]' })\nexport class DropdownOptionDirective implements FocusableOption, Highlightable {\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly label = input('', { alias: 'apDropdownOption' });\n\n readonly isDisabled = input(false, { alias: 'apDropdownOptionDisabled' });\n\n /** `ListKeyManager` skips disabled options on its own; a disabled button is unfocusable anyway. */\n get disabled(): boolean {\n return this.isDisabled();\n }\n\n /** The id `aria-activedescendant` points at. Only meaningful under the active-descendant manager. */\n get id(): string {\n return this.element.nativeElement.id;\n }\n\n focus(): void {\n this.element.nativeElement.focus();\n }\n\n /** Clicks the option, for a combobox where focus stays in the input and Enter must still reach it. */\n activate(): void {\n this.element.nativeElement.click();\n }\n\n getLabel(): string {\n return this.label();\n }\n\n setActiveStyles(): void {\n this.element.nativeElement.classList.add(DROPDOWN_OPTION_ACTIVE_CLASS);\n // Optional: jsdom has no such method, and keeping the active option in view is a browser nicety.\n this.element.nativeElement.scrollIntoView?.({ block: 'nearest' });\n }\n\n setInactiveStyles(): void {\n this.element.nativeElement.classList.remove(DROPDOWN_OPTION_ACTIVE_CLASS);\n }\n}\n","import { Directive, ElementRef, HostListener, inject, input } from '@angular/core';\nimport { DropdownOverlay } from './dropdown-overlay.interface';\n\n/**\n * Generic directive that turns any element into a trigger for a dropdown component\n * implementing the DropdownOverlay interface.\n * Handles click and keyboard interactions to open/close the dropdown.\n */\n@Directive({\n selector: '[apDropdownTrigger]',\n})\nexport class DropdownTriggerDirective {\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /** Reference to the dropdown component that this trigger controls */\n apDropdownTrigger = input.required<DropdownOverlay>();\n\n /** Handles click events to toggle the dropdown */\n @HostListener('click', ['$event'])\n onClick(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n this.apDropdownTrigger().toggle(this.elementRef.nativeElement);\n }\n\n /** Handles keyboard events for accessibility (Enter, Space, Arrow Down, Escape) */\n @HostListener('keydown', ['$event'])\n onKeyDown(event: KeyboardEvent): void {\n const dropdown = this.apDropdownTrigger();\n\n switch (event.key) {\n case 'Enter':\n case ' ':\n case 'ArrowDown':\n event.preventDefault();\n dropdown.open(this.elementRef.nativeElement);\n break;\n\n case 'Escape':\n event.preventDefault();\n dropdown.close();\n break;\n }\n }\n}\n","import type { ApInteractiveElement } from '@agorapulse/ui-components/directives';\n\n/** Natively interactive, or made focusable on purpose. `[tabindex]` includes `-1`: still a focus target. */\nconst INTERACTIVE = 'button, [href], input, select, textarea, [tabindex]';\n\n/** What to fall back to inside a wrapper. Here `-1` is excluded: it is a target, not an entry point. */\nconst FOCUSABLE_INSIDE = 'button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * The element a trigger really exposes — what takes focus and carries `aria-expanded`.\n *\n * `apDropdownTrigger` usually sits on a component host, and `<ap-button>` is not a button: it wraps\n * one, so writing on the host would be inert.\n *\n * @param declared what the host component provides through `AP_INTERACTIVE_ELEMENT`, if any.\n */\nexport function interactiveTriggerElement(host: HTMLElement, declared?: ApInteractiveElement | null): HTMLElement {\n if (declared) return declared.interactiveElement();\n if (host.matches(INTERACTIVE)) return host;\n\n return host.querySelector<HTMLElement>(FOCUSABLE_INSIDE) ?? host;\n}\n","import { createFloatingOverlay, FloatingAnchorMode, FloatingPlacement } from '@agorapulse/ui-components/floating';\nimport { TemplateRef } from '@angular/core';\n\nexport interface DropdownOverlayConfig {\n /** Defaults to `true` — the dropdown keeps its click catcher, unlike the primitive. */\n showBackdrop?: boolean;\n /** Panel placement. Unset means derived from `anchor`, i.e. `bottom-start`. */\n placement?: FloatingPlacement;\n /** What the panel connects to. Defaults to `'trigger'`. */\n anchor?: FloatingAnchorMode;\n /** Opt-in, and not offered by any existing panel's public API. */\n arrow?: boolean;\n /** What the tip points at. Defaults to `'anchor'`. */\n arrowTarget?: 'anchor' | 'pointer';\n /** Extra class(es) set on the overlay pane, so a consumer can scope global styles to its own dropdown. */\n panelClass?: string | string[];\n /** Called when the overlay is closed via outside click or Escape key. Typically routes to the component's own close() method. */\n onClose?: () => void;\n}\n\n/**\n * Thin adapter over `createFloatingOverlay()`. Keeps the dropdown's name, lifecycle and default\n * backdrop; delegates all positioning to the shared floating primitive. Must be called within an\n * Angular injection context (e.g., in a component constructor or field initializer).\n */\nexport function createDropdownOverlay() {\n const floating = createFloatingOverlay();\n\n return {\n get overlayRef() {\n return floating.overlayRef;\n },\n isOpen: floating.isOpen,\n close: floating.close,\n open(template: TemplateRef<unknown>, triggerElement?: HTMLElement, config?: DropdownOverlayConfig, event?: MouseEvent): void {\n floating.open(template, triggerElement, { ...config, showBackdrop: config?.showBackdrop ?? true }, event);\n },\n };\n}\n\nexport type DropdownOverlayInstance = ReturnType<typeof createDropdownOverlay>;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;AAGA;AACO,MAAM,4BAA4B,GAAG;AAE5C;;;;;;AAMG;MAEU,uBAAuB,CAAA;AACf,IAAA,OAAO,GAAG,MAAM,CAA0B,UAAU,CAAC;IAE7D,KAAK,GAAG,KAAK,CAAC,EAAE,6EAAI,KAAK,EAAE,kBAAkB,EAAA,CAAG;IAEhD,UAAU,GAAG,KAAK,CAAC,KAAK,kFAAI,KAAK,EAAE,0BAA0B,EAAA,CAAG;;AAGzE,IAAA,IAAI,QAAQ,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,UAAU,EAAE;IAC5B;;AAGA,IAAA,IAAI,EAAE,GAAA;AACF,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;IACxC;IAEA,KAAK,GAAA;AACD,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,EAAE;IACtC;;IAGA,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,EAAE;IACtC;IAEA,QAAQ,GAAA;AACJ,QAAA,OAAO,IAAI,CAAC,KAAK,EAAE;IACvB;IAEA,eAAe,GAAA;QACX,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,4BAA4B,CAAC;;AAEtE,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,cA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,kBAAkB,EAAE;AAClD,IAAA,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;AAAE,QAAA,OAAO,IAAI;IAE1C,OAAO,IAAI,CAAC,aAAa,CAAc,gBAAgB,CAAC,IAAI,IAAI;AACpE;;ACDA;;;;AAIG;SACa,qBAAqB,GAAA;AACjC,IAAA,MAAM,QAAQ,GAAG,qBAAqB,EAAE;IAExC,OAAO;AACH,QAAA,IAAI,UAAU,GAAA;YACV,OAAO,QAAQ,CAAC,UAAU;QAC9B,CAAC;QACD,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,KAAK,EAAE,QAAQ,CAAC,KAAK;AACrB,QAAA,IAAI,CAAC,QAA8B,EAAE,cAA4B,EAAE,MAA8B,EAAE,KAAkB,EAAA;YACjH,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,cAAc,EAAE,EAAE,GAAG,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,IAAI,IAAI,EAAE,EAAE,KAAK,CAAC;QAC7G,CAAC;KACJ;AACL;;ACtCA;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-dropdown-base.mjs","sources":["../../../libs/ui-components/dropdown-base/src/dropdown-option.directive.ts","../../../libs/ui-components/dropdown-base/src/dropdown-trigger.directive.ts","../../../libs/ui-components/dropdown-base/src/trigger-element.ts","../../../libs/ui-components/dropdown-base/src/dropdown-overlay.helper.ts","../../../libs/ui-components/dropdown-base/src/agorapulse-ui-components-dropdown-base.ts"],"sourcesContent":["import { FocusableOption, Highlightable } from '@angular/cdk/a11y';\nimport { Directive, ElementRef, inject, input } from '@angular/core';\n\n/** Set on the active option by `ActiveDescendantKeyManager`, where focus stays in a search field. */\nexport const DROPDOWN_OPTION_ACTIVE_CLASS = 'ap-dropdown-option--active';\n\n/**\n * Marks an element a `ListKeyManager` can drive. It satisfies both managers, because the right one\n * depends on the role: `FocusKeyManager` moves real focus through a menu or a plain listbox,\n * `ActiveDescendantKeyManager` leaves focus in a combobox's input and only marks the active option.\n *\n * The panel is role-agnostic, so the host says which of its children are options.\n */\n@Directive({ selector: '[apDropdownOption]' })\nexport class DropdownOptionDirective implements FocusableOption, Highlightable {\n private readonly element = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly label = input('', { alias: 'apDropdownOption' });\n\n readonly isDisabled = input(false, { alias: 'apDropdownOptionDisabled' });\n\n /** `ListKeyManager` skips disabled options on its own; a disabled button is unfocusable anyway. */\n get disabled(): boolean {\n return this.isDisabled();\n }\n\n /** The id `aria-activedescendant` points at. Only meaningful under the active-descendant manager. */\n get id(): string {\n return this.element.nativeElement.id;\n }\n\n focus(): void {\n this.element.nativeElement.focus();\n }\n\n /** Clicks the option, for a combobox where focus stays in the input and Enter must still reach it. */\n activate(): void {\n this.element.nativeElement.click();\n }\n\n getLabel(): string {\n return this.label();\n }\n\n setActiveStyles(): void {\n this.element.nativeElement.classList.add(DROPDOWN_OPTION_ACTIVE_CLASS);\n // Optional: jsdom has no such method, and keeping the active option in view is a browser nicety.\n this.element.nativeElement.scrollIntoView?.({ block: 'nearest' });\n }\n\n setInactiveStyles(): void {\n this.element.nativeElement.classList.remove(DROPDOWN_OPTION_ACTIVE_CLASS);\n }\n}\n","import { Directive, ElementRef, HostListener, inject, input } from '@angular/core';\nimport { DropdownOverlay } from './dropdown-overlay.interface';\n\n/**\n * Generic directive that turns any element into a trigger for a dropdown component\n * implementing the DropdownOverlay interface.\n * Handles click and keyboard interactions to open/close the dropdown.\n */\n@Directive({\n selector: '[apDropdownTrigger]',\n})\nexport class DropdownTriggerDirective {\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n\n /** Reference to the dropdown component that this trigger controls */\n apDropdownTrigger = input.required<DropdownOverlay>();\n\n /** Handles click events to toggle the dropdown */\n @HostListener('click', ['$event'])\n onClick(event: MouseEvent): void {\n event.preventDefault();\n event.stopPropagation();\n\n this.apDropdownTrigger().toggle(this.elementRef.nativeElement);\n }\n\n /** Handles keyboard events for accessibility (Enter, Space, Arrow Down, Escape) */\n @HostListener('keydown', ['$event'])\n onKeyDown(event: KeyboardEvent): void {\n const dropdown = this.apDropdownTrigger();\n\n switch (event.key) {\n case 'Enter':\n case ' ':\n case 'ArrowDown':\n event.preventDefault();\n dropdown.open(this.elementRef.nativeElement);\n break;\n\n case 'Escape':\n event.preventDefault();\n dropdown.close();\n break;\n }\n }\n}\n","import { type ApInteractiveElement, FOCUSABLE_INSIDE } from '@agorapulse/ui-components/directives';\n\n/** Natively interactive, or made focusable on purpose. `[tabindex]` includes `-1`: still a focus target. */\nconst INTERACTIVE = 'button, [href], input, select, textarea, [tabindex]';\n\n/**\n * The element a trigger really exposes — what takes focus and carries `aria-expanded`.\n *\n * `apDropdownTrigger` usually sits on a component host, and `<ap-button>` is not a button: it wraps\n * one, so writing on the host would be inert.\n *\n * @param declared what the host component provides through `AP_INTERACTIVE_ELEMENT`, if any.\n */\nexport function interactiveTriggerElement(host: HTMLElement, declared?: ApInteractiveElement | null): HTMLElement {\n if (declared) return declared.interactiveElement();\n if (host.matches(INTERACTIVE)) return host;\n\n return host.querySelector<HTMLElement>(FOCUSABLE_INSIDE) ?? host;\n}\n","import { createFloatingOverlay, FloatingAnchorMode, FloatingPlacement } from '@agorapulse/ui-components/floating';\nimport { TemplateRef } from '@angular/core';\n\nexport interface DropdownOverlayConfig {\n /** Defaults to `true` — the dropdown keeps its click catcher, unlike the primitive. */\n showBackdrop?: boolean;\n /** Panel placement. Unset means derived from `anchor`, i.e. `bottom-start`. */\n placement?: FloatingPlacement;\n /** What the panel connects to. Defaults to `'trigger'`. */\n anchor?: FloatingAnchorMode;\n /** Opt-in, and not offered by any existing panel's public API. */\n arrow?: boolean;\n /** What the tip points at. Defaults to `'anchor'`. */\n arrowTarget?: 'anchor' | 'pointer';\n /** Extra class(es) set on the overlay pane, so a consumer can scope global styles to its own dropdown. */\n panelClass?: string | string[];\n /** Called when the overlay is closed via outside click or Escape key. Typically routes to the component's own close() method. */\n onClose?: () => void;\n}\n\n/**\n * Thin adapter over `createFloatingOverlay()`. Keeps the dropdown's name, lifecycle and default\n * backdrop; delegates all positioning to the shared floating primitive. Must be called within an\n * Angular injection context (e.g., in a component constructor or field initializer).\n */\nexport function createDropdownOverlay() {\n const floating = createFloatingOverlay();\n\n return {\n get overlayRef() {\n return floating.overlayRef;\n },\n isOpen: floating.isOpen,\n close: floating.close,\n open(template: TemplateRef<unknown>, triggerElement?: HTMLElement, config?: DropdownOverlayConfig, event?: MouseEvent): void {\n floating.open(template, triggerElement, { ...config, showBackdrop: config?.showBackdrop ?? true }, event);\n },\n };\n}\n\nexport type DropdownOverlayInstance = ReturnType<typeof createDropdownOverlay>;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;AAGA;AACO,MAAM,4BAA4B,GAAG;AAE5C;;;;;;AAMG;MAEU,uBAAuB,CAAA;AACf,IAAA,OAAO,GAAG,MAAM,CAA0B,UAAU,CAAC;IAE7D,KAAK,GAAG,KAAK,CAAC,EAAE,6EAAI,KAAK,EAAE,kBAAkB,EAAA,CAAG;IAEhD,UAAU,GAAG,KAAK,CAAC,KAAK,kFAAI,KAAK,EAAE,0BAA0B,EAAA,CAAG;;AAGzE,IAAA,IAAI,QAAQ,GAAA;AACR,QAAA,OAAO,IAAI,CAAC,UAAU,EAAE;IAC5B;;AAGA,IAAA,IAAI,EAAE,GAAA;AACF,QAAA,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE;IACxC;IAEA,KAAK,GAAA;AACD,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,EAAE;IACtC;;IAGA,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,EAAE;IACtC;IAEA,QAAQ,GAAA;AACJ,QAAA,OAAO,IAAI,CAAC,KAAK,EAAE;IACvB;IAEA,eAAe,GAAA;QACX,IAAI,CAAC,OAAO,CAAC,aAAa,CA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C/F,IAAA,IAAI,QAAQ;AAAE,QAAA,OAAO,QAAQ,CAAC,kBAAkB,EAAE;AAClD,IAAA,IAAI,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC;AAAE,QAAA,OAAO,IAAI;IAE1C,OAAO,IAAI,CAAC,aAAa,CAAc,gBAAgB,CAAC,IAAI,IAAI;AACpE;;ACEA;;;;AAIG;SACa,qBAAqB,GAAA;AACjC,IAAA,MAAM,QAAQ,GAAG,qBAAqB,EAAE;IAExC,OAAO;AACH,QAAA,IAAI,UAAU,GAAA;YACV,OAAO,QAAQ,CAAC,UAAU;QAC9B,CAAC;QACD,MAAM,EAAE,QAAQ,CAAC,MAAM;QACvB,KAAK,EAAE,QAAQ,CAAC,KAAK;AACrB,QAAA,IAAI,CAAC,QAA8B,EAAE,cAA4B,EAAE,MAA8B,EAAE,KAAkB,EAAA;YACjH,QAAQ,CAAC,IAAI,CAAC,QAAQ,EAAE,cAAc,EAAE,EAAE,GAAG,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,IAAI,IAAI,EAAE,EAAE,KAAK,CAAC;QAC7G,CAAC;KACJ;AACL;;ACtCA;;AAEG;;;;"}
|
|
@@ -126,11 +126,11 @@ class FilterChipsListComponent {
|
|
|
126
126
|
return typeof item.value === 'object' ? '' : String(item.value);
|
|
127
127
|
}
|
|
128
128
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FilterChipsListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
129
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FilterChipsListComponent, isStandalone: true, selector: "ap-filter-chips-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, bindValue: { classPropertyName: "bindValue", publicName: "bindValue", isSignal: true, isRequired: false, transformFunction: null }, bindLabel: { classPropertyName: "bindLabel", publicName: "bindLabel", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, providers: [AP_FILTER_CHIPS_LIST_VALIDATOR], hostDirectives: [{ directive: i1.NgxControlValueAccessor }], ngImport: i0, template: "<div class=\"filter-chips-list\"\n cdkListbox\n cdkListboxOrientation=\"horizontal\"\n [cdkListboxValue]=\"cva.value$()\"\n [cdkListboxMultiple]=\"multiple()\"\n [cdkListboxDisabled]=\"isDisabled()\"\n [cdkListboxCompareWith]=\"compareWith()\"\n [attr.aria-required]=\"required() || null\"\n [apFormFieldControl]=\"ariaLabel()
|
|
129
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: FilterChipsListComponent, isStandalone: true, selector: "ap-filter-chips-list", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, bindValue: { classPropertyName: "bindValue", publicName: "bindValue", isSignal: true, isRequired: false, transformFunction: null }, bindLabel: { classPropertyName: "bindLabel", publicName: "bindLabel", isSignal: true, isRequired: false, transformFunction: null }, compareWith: { classPropertyName: "compareWith", publicName: "compareWith", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { valueChange: "valueChange" }, providers: [AP_FILTER_CHIPS_LIST_VALIDATOR], hostDirectives: [{ directive: i1.NgxControlValueAccessor }], ngImport: i0, template: "<div class=\"filter-chips-list\"\n cdkListbox\n cdkListboxOrientation=\"horizontal\"\n [cdkListboxValue]=\"cva.value$()\"\n [cdkListboxMultiple]=\"multiple()\"\n [cdkListboxDisabled]=\"isDisabled()\"\n [cdkListboxCompareWith]=\"compareWith()\"\n [attr.aria-required]=\"required() || null\"\n [apFormFieldControl]=\"ariaLabel()\"\n [disabled]=\"isDisabled()\"\n (cdkListboxValueChange)=\"onListboxChange($event)\">\n @for (item of viewItems(); track item.source) {\n <button\n ap-filter-chip\n type=\"button\"\n [cdkOption]=\"item.modelValue\"\n [cdkOptionDisabled]=\"item.disabled\"\n [disabled]=\"item.disabled\"\n [apTooltip]=\"item.disabledTooltip ?? null\"\n [apTooltipDisabled]=\"!item.disabled || !item.disabledTooltip\"\n [label]=\"item.label\"\n [symbolId]=\"item.symbolId\"\n [avatar]=\"item.avatar\"\n [disabledTooltip]=\"item.disabledTooltip\"></button>\n }\n</div>\n", styles: [":host{display:block}.filter-chips-list{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ref-spacing-xxs)}\n"], dependencies: [{ kind: "component", type: FilterChipComponent, selector: "button[ap-filter-chip]", inputs: ["label", "disabled", "disabledTooltip", "symbolId", "avatar"] }, { kind: "directive", type: FormFieldControlDirective, selector: "[apFormFieldControl]", inputs: ["apFormFieldControl", "disabled"] }, { kind: "directive", type: TooltipDirective, selector: "[apTooltip]", inputs: ["apTooltip", "apTooltipPosition", "apTooltipShowDelay", "apTooltipHideDelay", "apTooltipDuration", "apTooltipDisabled", "apTooltipTruncatedTextOnly", "apTooltipTemplateContext", "apTooltipVirtualScrollElement", "apTooltipTrigger", "apTooltipArrow", "apTooltipAnchor", "apTooltipType", "apTooltipPresentationContext", "apTooltipListItems", "apTooltipShowAvatarCaption"], exportAs: ["apTooltip"] }, { kind: "directive", type: CdkListbox, selector: "[cdkListbox]", inputs: ["id", "tabindex", "cdkListboxValue", "cdkListboxMultiple", "cdkListboxDisabled", "cdkListboxUseActiveDescendant", "cdkListboxOrientation", "cdkListboxCompareWith", "cdkListboxNavigationWrapDisabled", "cdkListboxNavigatesDisabledOptions"], outputs: ["cdkListboxValueChange"], exportAs: ["cdkListbox"] }, { kind: "directive", type: CdkOption, selector: "[cdkOption]", inputs: ["id", "cdkOption", "cdkOptionTypeaheadLabel", "cdkOptionDisabled", "tabindex"], exportAs: ["cdkOption"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
130
130
|
}
|
|
131
131
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FilterChipsListComponent, decorators: [{
|
|
132
132
|
type: Component,
|
|
133
|
-
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-filter-chips-list', imports: [FilterChipComponent, FormFieldControlDirective, TooltipDirective, CdkListbox, CdkOption], hostDirectives: [NgxControlValueAccessor], providers: [AP_FILTER_CHIPS_LIST_VALIDATOR], template: "<div class=\"filter-chips-list\"\n cdkListbox\n cdkListboxOrientation=\"horizontal\"\n [cdkListboxValue]=\"cva.value$()\"\n [cdkListboxMultiple]=\"multiple()\"\n [cdkListboxDisabled]=\"isDisabled()\"\n [cdkListboxCompareWith]=\"compareWith()\"\n [attr.aria-required]=\"required() || null\"\n [apFormFieldControl]=\"ariaLabel()
|
|
133
|
+
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-filter-chips-list', imports: [FilterChipComponent, FormFieldControlDirective, TooltipDirective, CdkListbox, CdkOption], hostDirectives: [NgxControlValueAccessor], providers: [AP_FILTER_CHIPS_LIST_VALIDATOR], template: "<div class=\"filter-chips-list\"\n cdkListbox\n cdkListboxOrientation=\"horizontal\"\n [cdkListboxValue]=\"cva.value$()\"\n [cdkListboxMultiple]=\"multiple()\"\n [cdkListboxDisabled]=\"isDisabled()\"\n [cdkListboxCompareWith]=\"compareWith()\"\n [attr.aria-required]=\"required() || null\"\n [apFormFieldControl]=\"ariaLabel()\"\n [disabled]=\"isDisabled()\"\n (cdkListboxValueChange)=\"onListboxChange($event)\">\n @for (item of viewItems(); track item.source) {\n <button\n ap-filter-chip\n type=\"button\"\n [cdkOption]=\"item.modelValue\"\n [cdkOptionDisabled]=\"item.disabled\"\n [disabled]=\"item.disabled\"\n [apTooltip]=\"item.disabledTooltip ?? null\"\n [apTooltipDisabled]=\"!item.disabled || !item.disabledTooltip\"\n [label]=\"item.label\"\n [symbolId]=\"item.symbolId\"\n [avatar]=\"item.avatar\"\n [disabledTooltip]=\"item.disabledTooltip\"></button>\n }\n</div>\n", styles: [":host{display:block}.filter-chips-list{display:flex;flex-wrap:wrap;align-items:center;gap:var(--ref-spacing-xxs)}\n"] }]
|
|
134
134
|
}], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], bindValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "bindValue", required: false }] }], bindLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "bindLabel", required: false }] }], compareWith: [{ type: i0.Input, args: [{ isSignal: true, alias: "compareWith", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], valueChange: [{ type: i0.Output, args: ["valueChange"] }] } });
|
|
135
135
|
|
|
136
136
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-filter-chips-list.mjs","sources":["../../../libs/ui-components/filter-chips-list/src/filter-chip/filter-chip.component.ts","../../../libs/ui-components/filter-chips-list/src/filter-chip/filter-chip.component.html","../../../libs/ui-components/filter-chips-list/src/filter-chips-list.component.ts","../../../libs/ui-components/filter-chips-list/src/filter-chips-list.component.html","../../../libs/ui-components/filter-chips-list/src/agorapulse-ui-components-filter-chips-list.ts"],"sourcesContent":["import { AvatarComponent } from '@agorapulse/ui-components/avatar';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { agorapulseSymbol, SymbolComponent } from '@agorapulse/ui-symbol';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nexport interface FilterChipAvatar {\n profilePicture?: string;\n username?: string;\n network?: string;\n}\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[ap-filter-chip]',\n templateUrl: './filter-chip.component.html',\n styleUrls: ['./filter-chip.component.scss'],\n imports: [SymbolComponent, AvatarComponent, TooltipDirective],\n host: {\n type: 'button',\n class: 'filter-chip',\n '[disabled]': 'disabled() || null',\n },\n})\nexport class FilterChipComponent {\n label = input('');\n disabled = input(false, { transform: booleanAttribute });\n disabledTooltip = input<string>();\n symbolId = input<agorapulseSymbol>();\n avatar = input<FilterChipAvatar>();\n}\n","@if (symbolId()) {\n <span class=\"filter-chip-icon\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"symbolId()\" />\n </span>\n}\n@if (avatar(); as avatar) {\n <ap-avatar\n class=\"filter-chip-avatar\"\n [username]=\"avatar.username ?? ''\"\n [profilePicture]=\"avatar.profilePicture\"\n [network]=\"avatar.network\"\n [showInitials]=\"true\"\n [size]=\"16\" />\n}\n<span\n class=\"filter-chip-label\"\n [apTooltip]=\"label()\"\n [apTooltipTruncatedTextOnly]=\"true\"\n [apTooltipDisabled]=\"!!disabledTooltip()\">\n {{ label() }}\n</span>\n","import { FormFieldControlDirective } from '@agorapulse/ui-components/form-field';\nimport { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { agorapulseSymbol, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport { CdkListbox, CdkOption, ListboxValueChangeEvent } from '@angular/cdk/listbox';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n forwardRef,\n inject,\n Injector,\n input,\n OnInit,\n output,\n runInInjectionContext,\n} from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator, ValidatorFn, Validators } from '@angular/forms';\nimport { get } from 'es-toolkit/compat';\nimport { NgxControlValueAccessor } from 'ngxtension/control-value-accessor';\nimport { explicitEffect } from 'ngxtension/explicit-effect';\nimport { FilterChipAvatar, FilterChipComponent } from './filter-chip/filter-chip.component';\n\nexport interface FilterChipItem {\n /**\n * The source object backing the chip — primitive or domain object.\n * The form-model value is extracted via `bindValue` and the displayed text via `bindLabel`.\n */\n value: unknown;\n disabled?: boolean;\n disabledTooltip?: string;\n symbolId?: agorapulseSymbol;\n avatar?: FilterChipAvatar;\n}\n\nexport type FilterChipsListValue = readonly unknown[];\n\nexport type FilterChipsListCompareFn = (a: unknown, b: unknown) => boolean;\n\n/** Emitted on user-initiated selection changes (not on programmatic `writeValue`). */\nexport interface FilterChipsListChange {\n /** New selection after the toggle — always an array (length 0 or 1 in single mode). */\n value: FilterChipsListValue;\n /** The item that was triggered. */\n item: FilterChipItem;\n}\n\nexport const AP_FILTER_CHIPS_LIST_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => FilterChipsListComponent),\n multi: true,\n};\n\nconst requiredArrayValidator: ValidatorFn = control => {\n const value = control.value;\n if (Array.isArray(value)) return value.length > 0 ? null : { required: true };\n return Validators.required(control);\n};\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-filter-chips-list',\n templateUrl: './filter-chips-list.component.html',\n styleUrls: ['./filter-chips-list.component.scss'],\n imports: [FilterChipComponent, FormFieldControlDirective, TooltipDirective, CdkListbox, CdkOption],\n hostDirectives: [NgxControlValueAccessor],\n providers: [AP_FILTER_CHIPS_LIST_VALIDATOR],\n})\nexport class FilterChipsListComponent implements Validator, OnInit {\n private readonly symbolRegistry = inject(SymbolRegistry);\n private readonly injector = inject(Injector);\n\n /**\n * Resolved in `ngOnInit` (not as a field initializer) to avoid a circular dependency:\n * `NgModel` injects `NG_VALIDATORS` (multi) → `FilterChipsListComponent` (validator) →\n * `NgxControlValueAccessor` → `NgControl` (= the same `NgModel` being constructed).\n */\n protected cva!: NgxControlValueAccessor<FilterChipsListValue>;\n\n /** Chips to render. Each item exposes a `value` (extracted via `bindValue`) and a label (via `bindLabel`). */\n items = input<FilterChipItem[]>([]);\n /** When true, multiple chips can be selected at once. When false, only one. */\n multiple = input(false, { transform: booleanAttribute });\n /** Disable every chip in the list. Combined with the FormControl disabled state. */\n disabled = input(false, { transform: booleanAttribute });\n /** Mark the control as required. Surfaces `{ required: true }` on empty selection and `aria-required=\"true\"`. */\n required = input(false, { transform: booleanAttribute });\n /** Key on `item.value` to project as the form-model value. When null (default), the whole `item.value` is used. */\n bindValue = input<string | null>(null);\n /** Key on `item.value` to display as the chip label. When null (default), the value itself is used when primitive. */\n bindLabel = input<string | null>(null);\n /** Equality used to match selected values against items. Defaults to `Object.is` — pass a custom fn for object values. */\n compareWith = input<FilterChipsListCompareFn>(Object.is);\n /** Accessible label for the listbox — relayed to the inner `[role=\"listbox\"]` element via `aria-label`. */\n ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n /** User-initiated selection change — payload `{ value, item }`. Not emitted on programmatic `writeValue`. */\n valueChange = output<FilterChipsListChange>();\n\n /** Effective disabled state — `[disabled]` input OR `FormControl.disable()` (mirrored by `cva.disabled$`). */\n protected readonly isDisabled = computed(() => this.disabled() || (this.cva?.disabled$() ?? false));\n\n protected readonly viewItems = computed(() => {\n const listDisabled = this.isDisabled();\n return this.items().map(item => ({\n source: item,\n modelValue: this.modelOf(item),\n label: this.labelOf(item),\n symbolId: item.symbolId,\n avatar: item.avatar,\n disabledTooltip: item.disabledTooltip,\n disabled: listDisabled || (item.disabled ?? false),\n }));\n });\n\n private readonly _validator = computed<ValidatorFn | null>(() => (this.required() ? requiredArrayValidator : null));\n\n private _onValidatorChange!: () => void;\n\n constructor() {\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n\n explicitEffect([this._validator], () => this._onValidatorChange());\n }\n\n ngOnInit(): void {\n this.cva = runInInjectionContext(this.injector, () =>\n inject<NgxControlValueAccessor<FilterChipsListValue>>(NgxControlValueAccessor)\n );\n }\n\n protected onListboxChange(event: ListboxValueChangeEvent<unknown>): void {\n // Setter on `cva.value` updates the signal AND notifies the parent ngControl via the registered `onChange`.\n this.cva.value = event.value;\n const cmp = this.compareWith();\n const item = this.items().find(i => cmp(this.modelOf(i), event.option?.value)) ?? this.items()[0];\n this.valueChange.emit({ value: event.value, item });\n }\n\n validate(control: AbstractControl): ValidationErrors | null {\n return this._validator()?.(control) ?? null;\n }\n\n registerOnValidatorChange(fn: () => void): void {\n this._onValidatorChange = fn;\n }\n\n private modelOf(item: FilterChipItem): unknown {\n const path = this.bindValue();\n return path ? get(item.value, path) : item.value;\n }\n\n private labelOf(item: FilterChipItem): string {\n const path = this.bindLabel();\n if (path) return String(get(item.value, path) ?? '');\n return typeof item.value === 'object' ? '' : String(item.value);\n }\n}\n","<div class=\"filter-chips-list\"\n cdkListbox\n cdkListboxOrientation=\"horizontal\"\n [cdkListboxValue]=\"cva.value$()\"\n [cdkListboxMultiple]=\"multiple()\"\n [cdkListboxDisabled]=\"isDisabled()\"\n [cdkListboxCompareWith]=\"compareWith()\"\n [attr.aria-required]=\"required() || null\"\n [apFormFieldControl]=\"ariaLabel() ?? undefined\"\n [disabled]=\"isDisabled()\"\n (cdkListboxValueChange)=\"onListboxChange($event)\">\n @for (item of viewItems(); track item.source) {\n <button\n ap-filter-chip\n type=\"button\"\n [cdkOption]=\"item.modelValue\"\n [cdkOptionDisabled]=\"item.disabled\"\n [disabled]=\"item.disabled\"\n [apTooltip]=\"item.disabledTooltip ?? null\"\n [apTooltipDisabled]=\"!item.disabled || !item.disabledTooltip\"\n [label]=\"item.label\"\n [symbolId]=\"item.symbolId\"\n [avatar]=\"item.avatar\"\n [disabledTooltip]=\"item.disabledTooltip\"></button>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAwBa,mBAAmB,CAAA;IAC5B,KAAK,GAAG,KAAK,CAAC,EAAE;8EAAC;IACjB,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACxD,IAAA,eAAe,GAAG,KAAK;mGAAU;AACjC,IAAA,QAAQ,GAAG,KAAK;4FAAoB;AACpC,IAAA,MAAM,GAAG,KAAK;0FAAoB;uGALzB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,s2BCxBhC,2nBAuBA,EAAA,MAAA,EAAA,CAAA,o8DAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDNc,eAAe,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,OAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,eAAe,6MAAE,gBAAgB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,mBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,mBAAA,EAAA,4BAAA,EAAA,0BAAA,EAAA,+BAAA,EAAA,kBAAA,EAAA,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CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,mBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,mBAAA,EAAA,4BAAA,EAAA,0BAAA,EAAA,+BAAA,EAAA,kBAAA,EAAA,gBAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,8BAAA,EAAA,oBAAA,EAAA,4BAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,UAAU,+WAAE,SAAS,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,IAAA,EAAA,WAAA,EAAA,yBAAA,EAAA,mBAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAIxF,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBATpC,SAAS;sCACW,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,sBAAsB,WAGvB,CAAC,mBAAmB,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,CAAC,EAAA,cAAA,EAClF,CAAC,uBAAuB,CAAC,EAAA,SAAA,EAC9B,CAAC,8BAA8B,CAAC,EAAA,QAAA,EAAA,2iCAAA,EAAA,MAAA,EAAA,CAAA,qHAAA,CAAA,EAAA;;;AEnE/C;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-filter-chips-list.mjs","sources":["../../../libs/ui-components/filter-chips-list/src/filter-chip/filter-chip.component.ts","../../../libs/ui-components/filter-chips-list/src/filter-chip/filter-chip.component.html","../../../libs/ui-components/filter-chips-list/src/filter-chips-list.component.ts","../../../libs/ui-components/filter-chips-list/src/filter-chips-list.component.html","../../../libs/ui-components/filter-chips-list/src/agorapulse-ui-components-filter-chips-list.ts"],"sourcesContent":["import { AvatarComponent } from '@agorapulse/ui-components/avatar';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { agorapulseSymbol, SymbolComponent } from '@agorapulse/ui-symbol';\nimport { booleanAttribute, ChangeDetectionStrategy, Component, input } from '@angular/core';\n\nexport interface FilterChipAvatar {\n profilePicture?: string;\n username?: string;\n network?: string;\n}\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[ap-filter-chip]',\n templateUrl: './filter-chip.component.html',\n styleUrls: ['./filter-chip.component.scss'],\n imports: [SymbolComponent, AvatarComponent, TooltipDirective],\n host: {\n type: 'button',\n class: 'filter-chip',\n '[disabled]': 'disabled() || null',\n },\n})\nexport class FilterChipComponent {\n label = input('');\n disabled = input(false, { transform: booleanAttribute });\n disabledTooltip = input<string>();\n symbolId = input<agorapulseSymbol>();\n avatar = input<FilterChipAvatar>();\n}\n","@if (symbolId()) {\n <span class=\"filter-chip-icon\">\n <ap-symbol\n size=\"sm\"\n [symbolId]=\"symbolId()\" />\n </span>\n}\n@if (avatar(); as avatar) {\n <ap-avatar\n class=\"filter-chip-avatar\"\n [username]=\"avatar.username ?? ''\"\n [profilePicture]=\"avatar.profilePicture\"\n [network]=\"avatar.network\"\n [showInitials]=\"true\"\n [size]=\"16\" />\n}\n<span\n class=\"filter-chip-label\"\n [apTooltip]=\"label()\"\n [apTooltipTruncatedTextOnly]=\"true\"\n [apTooltipDisabled]=\"!!disabledTooltip()\">\n {{ label() }}\n</span>\n","import { FormFieldControlDirective } from '@agorapulse/ui-components/form-field';\nimport { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';\nimport { TooltipDirective } from '@agorapulse/ui-components/tooltip';\nimport { agorapulseSymbol, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport { CdkListbox, CdkOption, ListboxValueChangeEvent } from '@angular/cdk/listbox';\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n forwardRef,\n inject,\n Injector,\n input,\n OnInit,\n output,\n runInInjectionContext,\n} from '@angular/core';\nimport { AbstractControl, NG_VALIDATORS, ValidationErrors, Validator, ValidatorFn, Validators } from '@angular/forms';\nimport { get } from 'es-toolkit/compat';\nimport { NgxControlValueAccessor } from 'ngxtension/control-value-accessor';\nimport { explicitEffect } from 'ngxtension/explicit-effect';\nimport { FilterChipAvatar, FilterChipComponent } from './filter-chip/filter-chip.component';\n\nexport interface FilterChipItem {\n /**\n * The source object backing the chip — primitive or domain object.\n * The form-model value is extracted via `bindValue` and the displayed text via `bindLabel`.\n */\n value: unknown;\n disabled?: boolean;\n disabledTooltip?: string;\n symbolId?: agorapulseSymbol;\n avatar?: FilterChipAvatar;\n}\n\nexport type FilterChipsListValue = readonly unknown[];\n\nexport type FilterChipsListCompareFn = (a: unknown, b: unknown) => boolean;\n\n/** Emitted on user-initiated selection changes (not on programmatic `writeValue`). */\nexport interface FilterChipsListChange {\n /** New selection after the toggle — always an array (length 0 or 1 in single mode). */\n value: FilterChipsListValue;\n /** The item that was triggered. */\n item: FilterChipItem;\n}\n\nexport const AP_FILTER_CHIPS_LIST_VALIDATOR = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => FilterChipsListComponent),\n multi: true,\n};\n\nconst requiredArrayValidator: ValidatorFn = control => {\n const value = control.value;\n if (Array.isArray(value)) return value.length > 0 ? null : { required: true };\n return Validators.required(control);\n};\n\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-filter-chips-list',\n templateUrl: './filter-chips-list.component.html',\n styleUrls: ['./filter-chips-list.component.scss'],\n imports: [FilterChipComponent, FormFieldControlDirective, TooltipDirective, CdkListbox, CdkOption],\n hostDirectives: [NgxControlValueAccessor],\n providers: [AP_FILTER_CHIPS_LIST_VALIDATOR],\n})\nexport class FilterChipsListComponent implements Validator, OnInit {\n private readonly symbolRegistry = inject(SymbolRegistry);\n private readonly injector = inject(Injector);\n\n /**\n * Resolved in `ngOnInit` (not as a field initializer) to avoid a circular dependency:\n * `NgModel` injects `NG_VALIDATORS` (multi) → `FilterChipsListComponent` (validator) →\n * `NgxControlValueAccessor` → `NgControl` (= the same `NgModel` being constructed).\n */\n protected cva!: NgxControlValueAccessor<FilterChipsListValue>;\n\n /** Chips to render. Each item exposes a `value` (extracted via `bindValue`) and a label (via `bindLabel`). */\n items = input<FilterChipItem[]>([]);\n /** When true, multiple chips can be selected at once. When false, only one. */\n multiple = input(false, { transform: booleanAttribute });\n /** Disable every chip in the list. Combined with the FormControl disabled state. */\n disabled = input(false, { transform: booleanAttribute });\n /** Mark the control as required. Surfaces `{ required: true }` on empty selection and `aria-required=\"true\"`. */\n required = input(false, { transform: booleanAttribute });\n /** Key on `item.value` to project as the form-model value. When null (default), the whole `item.value` is used. */\n bindValue = input<string | null>(null);\n /** Key on `item.value` to display as the chip label. When null (default), the value itself is used when primitive. */\n bindLabel = input<string | null>(null);\n /** Equality used to match selected values against items. Defaults to `Object.is` — pass a custom fn for object values. */\n compareWith = input<FilterChipsListCompareFn>(Object.is);\n /** Accessible label for the listbox — relayed to the inner `[role=\"listbox\"]` element via `aria-label`. */\n ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n /** User-initiated selection change — payload `{ value, item }`. Not emitted on programmatic `writeValue`. */\n valueChange = output<FilterChipsListChange>();\n\n /** Effective disabled state — `[disabled]` input OR `FormControl.disable()` (mirrored by `cva.disabled$`). */\n protected readonly isDisabled = computed(() => this.disabled() || (this.cva?.disabled$() ?? false));\n\n protected readonly viewItems = computed(() => {\n const listDisabled = this.isDisabled();\n return this.items().map(item => ({\n source: item,\n modelValue: this.modelOf(item),\n label: this.labelOf(item),\n symbolId: item.symbolId,\n avatar: item.avatar,\n disabledTooltip: item.disabledTooltip,\n disabled: listDisabled || (item.disabled ?? false),\n }));\n });\n\n private readonly _validator = computed<ValidatorFn | null>(() => (this.required() ? requiredArrayValidator : null));\n\n private _onValidatorChange!: () => void;\n\n constructor() {\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n\n explicitEffect([this._validator], () => this._onValidatorChange());\n }\n\n ngOnInit(): void {\n this.cva = runInInjectionContext(this.injector, () =>\n inject<NgxControlValueAccessor<FilterChipsListValue>>(NgxControlValueAccessor)\n );\n }\n\n protected onListboxChange(event: ListboxValueChangeEvent<unknown>): void {\n // Setter on `cva.value` updates the signal AND notifies the parent ngControl via the registered `onChange`.\n this.cva.value = event.value;\n const cmp = this.compareWith();\n const item = this.items().find(i => cmp(this.modelOf(i), event.option?.value)) ?? this.items()[0];\n this.valueChange.emit({ value: event.value, item });\n }\n\n validate(control: AbstractControl): ValidationErrors | null {\n return this._validator()?.(control) ?? null;\n }\n\n registerOnValidatorChange(fn: () => void): void {\n this._onValidatorChange = fn;\n }\n\n private modelOf(item: FilterChipItem): unknown {\n const path = this.bindValue();\n return path ? get(item.value, path) : item.value;\n }\n\n private labelOf(item: FilterChipItem): string {\n const path = this.bindLabel();\n if (path) return String(get(item.value, path) ?? '');\n return typeof item.value === 'object' ? '' : String(item.value);\n }\n}\n","<div class=\"filter-chips-list\"\n cdkListbox\n cdkListboxOrientation=\"horizontal\"\n [cdkListboxValue]=\"cva.value$()\"\n [cdkListboxMultiple]=\"multiple()\"\n [cdkListboxDisabled]=\"isDisabled()\"\n [cdkListboxCompareWith]=\"compareWith()\"\n [attr.aria-required]=\"required() || null\"\n [apFormFieldControl]=\"ariaLabel()\"\n [disabled]=\"isDisabled()\"\n (cdkListboxValueChange)=\"onListboxChange($event)\">\n @for (item of viewItems(); track item.source) {\n <button\n ap-filter-chip\n type=\"button\"\n [cdkOption]=\"item.modelValue\"\n [cdkOptionDisabled]=\"item.disabled\"\n [disabled]=\"item.disabled\"\n [apTooltip]=\"item.disabledTooltip ?? null\"\n [apTooltipDisabled]=\"!item.disabled || !item.disabledTooltip\"\n [label]=\"item.label\"\n [symbolId]=\"item.symbolId\"\n [avatar]=\"item.avatar\"\n [disabledTooltip]=\"item.disabledTooltip\"></button>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAwBa,mBAAmB,CAAA;IAC5B,KAAK,GAAG,KAAK,CAAC,EAAE;8EAAC;IACjB,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;AACxD,IAAA,eAAe,GAAG,KAAK;mGAAU;AACjC,IAAA,QAAQ,GAAG,KAAK;4FAAoB;AACpC,IAAA,MAAM,GAAG,KAAK;0FAAoB;uGALzB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,mBAAmB,s2BCxBhC,2nBAuBA,EAAA,MAAA,EAAA,CAAA,o8DAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDNc,eAAe,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,OAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,eAAe,6MAAE,gBAAgB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,mBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,mBAAA,EAAA,4BAAA,EAAA,0BAAA,EAAA,+BAAA,EAAA,kBAAA,EAAA,gBAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,8BAAA,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A,IAAA,EAAE,gBAAgB,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,WAAA,EAAA,mBAAA,EAAA,oBAAA,EAAA,oBAAA,EAAA,mBAAA,EAAA,mBAAA,EAAA,4BAAA,EAAA,0BAAA,EAAA,+BAAA,EAAA,kBAAA,EAAA,gBAAA,EAAA,iBAAA,EAAA,eAAA,EAAA,8BAAA,EAAA,oBAAA,EAAA,4BAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,UAAU,+WAAE,SAAS,EAAA,QAAA,EAAA,aAAA,EAAA,MAAA,EAAA,CAAA,IAAA,EAAA,WAAA,EAAA,yBAAA,EAAA,mBAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAIxF,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBATpC,SAAS;sCACW,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,sBAAsB,WAGvB,CAAC,mBAAmB,EAAE,yBAAyB,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,CAAC,EAAA,cAAA,EAClF,CAAC,uBAAuB,CAAC,EAAA,SAAA,EAC9B,CAAC,8BAA8B,CAAC,EAAA,QAAA,EAAA,8hCAAA,EAAA,MAAA,EAAA,CAAA,qHAAA,CAAA,EAAA;;;AEnE/C;;AAEG;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import { FOCUSABLE_INSIDE } from '@agorapulse/ui-components/directives';
|
|
1
2
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, APP_ID, viewChild, signal, computed, afterRenderEffect, untracked, ViewEncapsulation, ChangeDetectionStrategy, Component, input, booleanAttribute, ElementRef, DestroyRef, Directive } from '@angular/core';
|
|
3
|
+
import { inject, APP_ID, viewChild, signal, computed, afterRenderEffect, untracked, ViewEncapsulation, ChangeDetectionStrategy, Component, input, booleanAttribute, ElementRef, Renderer2, DestroyRef, effect, Directive } from '@angular/core';
|
|
3
4
|
|
|
4
5
|
class FormFieldComponent {
|
|
5
6
|
/**
|
|
@@ -50,10 +51,11 @@ class FormFieldComponent {
|
|
|
50
51
|
this.labelled.set(false);
|
|
51
52
|
return;
|
|
52
53
|
}
|
|
53
|
-
// When the control offers a target `for` can reach, the browser supplies the name and the focusing click, so no ARIA is owed
|
|
54
|
+
// When the control offers a target `for` can reach, the browser supplies the name and the focusing click, so no ARIA is owed;
|
|
55
|
+
// an author's `for` that reaches no control — one aimed at a component host — names nothing, so it is re-aimed.
|
|
54
56
|
const target = this.control()?.labelTarget(`${this.uid}-control`);
|
|
55
57
|
if (target) {
|
|
56
|
-
if (!label.
|
|
58
|
+
if (!label.control) {
|
|
57
59
|
label.htmlFor = target;
|
|
58
60
|
}
|
|
59
61
|
this.labelledById.set(undefined);
|
|
@@ -111,8 +113,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImpor
|
|
|
111
113
|
|
|
112
114
|
/** The elements a `<label for>` can reach. Everything else has to go through `aria-labelledby`. */
|
|
113
115
|
const LABELABLE = ['BUTTON', 'INPUT', 'METER', 'OUTPUT', 'PROGRESS', 'SELECT', 'TEXTAREA'];
|
|
114
|
-
/** Finds the first focusable descendant, for when the designated element is not focusable itself. */
|
|
115
|
-
const FOCUSABLE = 'button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])';
|
|
116
116
|
/**
|
|
117
117
|
* Points the surrounding `ap-form-field` at a control's focusable element, and carries the naming that follows.
|
|
118
118
|
*
|
|
@@ -125,18 +125,23 @@ class FormFieldControlDirective {
|
|
|
125
125
|
/** A disabled control does not take focus from a click on its label. */
|
|
126
126
|
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
127
127
|
element = inject(ElementRef).nativeElement;
|
|
128
|
+
renderer = inject(Renderer2);
|
|
128
129
|
formField = inject(FormFieldComponent, { optional: true });
|
|
130
|
+
authoredDescribedBy = this.element.getAttribute('aria-describedby');
|
|
129
131
|
/** Empty on the native branch, where the label's `for` already carries the association. */
|
|
130
132
|
labelledBy = computed(() => this.formField?.labelledBy(), /* @ts-ignore */
|
|
131
133
|
...(ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []));
|
|
132
134
|
/** The fallback only: an `aria-label` wins over a visible label, so it goes out only when no label names the control. */
|
|
133
|
-
label = computed(() => (this.formField?.hasLabel() ? undefined : this.ariaLabel()), /* @ts-ignore */
|
|
135
|
+
label = computed(() => (this.formField?.hasLabel() ? undefined : this.ariaLabel() || undefined), /* @ts-ignore */
|
|
134
136
|
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
135
|
-
describedBy = computed(() => this.formField?.describedBy(), /* @ts-ignore */
|
|
137
|
+
describedBy = computed(() => [this.authoredDescribedBy, this.formField?.describedBy()].filter(Boolean).join(' ') || undefined, /* @ts-ignore */
|
|
136
138
|
...(ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []));
|
|
137
139
|
constructor() {
|
|
138
140
|
this.formField?.registerControl(this);
|
|
139
141
|
inject(DestroyRef).onDestroy(() => this.formField?.unregisterControl(this));
|
|
142
|
+
this.reflect('aria-labelledby', this.labelledBy);
|
|
143
|
+
this.reflect('aria-label', this.label);
|
|
144
|
+
this.reflect('aria-describedby', this.describedBy);
|
|
140
145
|
}
|
|
141
146
|
labelTarget(fallbackId) {
|
|
142
147
|
if (!LABELABLE.includes(this.element.tagName)) {
|
|
@@ -147,6 +152,30 @@ class FormFieldControlDirective {
|
|
|
147
152
|
}
|
|
148
153
|
return this.element.id;
|
|
149
154
|
}
|
|
155
|
+
/**
|
|
156
|
+
* Writes the attribute only while there is a value for it, and gives back what the author wrote after: a host binding would
|
|
157
|
+
* clear an author's own `aria-label`, static or bound, whenever the field has nothing to say.
|
|
158
|
+
*/
|
|
159
|
+
reflect(name, value) {
|
|
160
|
+
const authored = this.element.getAttribute(name);
|
|
161
|
+
let written = false;
|
|
162
|
+
effect(() => {
|
|
163
|
+
const next = value();
|
|
164
|
+
if (next !== undefined) {
|
|
165
|
+
this.renderer.setAttribute(this.element, name, next);
|
|
166
|
+
written = true;
|
|
167
|
+
}
|
|
168
|
+
else if (written) {
|
|
169
|
+
if (authored === null) {
|
|
170
|
+
this.renderer.removeAttribute(this.element, name);
|
|
171
|
+
}
|
|
172
|
+
else {
|
|
173
|
+
this.renderer.setAttribute(this.element, name, authored);
|
|
174
|
+
}
|
|
175
|
+
written = false;
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
}
|
|
150
179
|
focus() {
|
|
151
180
|
if (this.disabled()) {
|
|
152
181
|
return;
|
|
@@ -155,21 +184,16 @@ class FormFieldControlDirective {
|
|
|
155
184
|
// A named container — `role="group"`, `role="listbox"` — is not always in the tab order; the
|
|
156
185
|
// label should then reach its first focusable element.
|
|
157
186
|
if (document.activeElement !== this.element) {
|
|
158
|
-
this.element.querySelector(
|
|
187
|
+
this.element.querySelector(FOCUSABLE_INSIDE)?.focus();
|
|
159
188
|
}
|
|
160
189
|
}
|
|
161
190
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormFieldControlDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
162
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: FormFieldControlDirective, isStandalone: true, selector: "[apFormFieldControl]", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "apFormFieldControl", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } },
|
|
191
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.5", type: FormFieldControlDirective, isStandalone: true, selector: "[apFormFieldControl]", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "apFormFieldControl", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 });
|
|
163
192
|
}
|
|
164
193
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: FormFieldControlDirective, decorators: [{
|
|
165
194
|
type: Directive,
|
|
166
195
|
args: [{
|
|
167
196
|
selector: '[apFormFieldControl]',
|
|
168
|
-
host: {
|
|
169
|
-
'[attr.aria-labelledby]': 'labelledBy()',
|
|
170
|
-
'[attr.aria-label]': 'label()',
|
|
171
|
-
'[attr.aria-describedby]': 'describedBy()',
|
|
172
|
-
},
|
|
173
197
|
}]
|
|
174
198
|
}], ctorParameters: () => [], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "apFormFieldControl", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
|
|
175
199
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-form-field.mjs","sources":["../../../libs/ui-components/form-field/src/form-field.component.ts","../../../libs/ui-components/form-field/src/form-field.component.html","../../../libs/ui-components/form-field/src/form-field-control.directive.ts","../../../libs/ui-components/form-field/src/agorapulse-ui-components-form-field.ts"],"sourcesContent":["import {\n afterRenderEffect,\n APP_ID,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n signal,\n untracked,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { FormFieldControl } from './form-field-control';\n\n@Component({\n selector: 'ap-form-field',\n templateUrl: './form-field.component.html',\n styleUrls: ['./form-field.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '(click)': 'onClick($event)',\n },\n})\nexport class FormFieldComponent {\n /**\n * Combines the application id — federated Angular apps can share a page — with a per-instance random suffix.\n * Not `crypto.randomUUID()`, which browsers refuse outside a secure context.\n */\n private readonly uid = `${inject(APP_ID)}-form-field-${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`;\n\n private readonly content = viewChild.required<ElementRef<HTMLElement>>('content');\n private readonly control = signal<FormFieldControl | undefined>(undefined);\n private readonly descriptions = signal<readonly string[]>([]);\n\n private readonly labelledById = signal<string | undefined>(undefined);\n private readonly labelled = signal(false);\n\n /**\n * The label's id when `aria-labelledby` has to carry the association — never on the native branch, where `for` suffices.\n * Undefined until the first render, and when the field has no label: a control must not emit a dangling reference.\n */\n readonly labelledBy = this.labelledById.asReadonly();\n\n /** Whether a label already names the control, by `for` or by `aria-labelledby`. */\n readonly hasLabel = this.labelled.asReadonly();\n\n /** The ids of everything describing the control, for its `aria-describedby`. */\n readonly describedBy = computed(() => this.descriptions().join(' ') || undefined);\n\n constructor() {\n // After render, so outside change detection: the projected content exists and writing signals\n // here cannot trigger NG0100. Re-runs when the control registers, since it picks the branch.\n afterRenderEffect(() => {\n this.content();\n this.control();\n untracked(() => this.associate());\n });\n }\n\n /**\n * Links the projected label to the registered control.\n *\n * Public because `detectChanges()` does not run after-render hooks in a zone.js harness, so a spec has to force the pass —\n * as does a consumer whose label only appears after the first render.\n */\n associate(): void {\n // `:scope >` and not `querySelector('label')`: `ng-content select=\"label\"` only projects direct\n // children, so a deeper label belongs to something else. Among several, the first names the field.\n const label = this.content().nativeElement.querySelector<HTMLLabelElement>(':scope > label');\n if (!label) {\n this.labelledById.set(undefined);\n this.labelled.set(false);\n return;\n }\n\n // When the control offers a target `for` can reach, the browser supplies the name and the focusing click, so no ARIA is owed.\n const target = this.control()?.labelTarget(`${this.uid}-control`);\n if (target) {\n if (!label.htmlFor) {\n label.htmlFor = target;\n }\n this.labelledById.set(undefined);\n this.labelled.set(true);\n return;\n }\n\n this.labelledById.set(this.ensureId(label, 'label'));\n this.labelled.set(true);\n }\n\n registerControl(control: FormFieldControl): void {\n this.control.set(control);\n }\n\n unregisterControl(control: FormFieldControl): void {\n // By identity: a destruction racing a new registration must not clear the live control.\n this.control.update(current => (current === control ? undefined : current));\n }\n\n registerDescription(id: string): void {\n this.descriptions.update(ids => (ids.includes(id) ? ids : [...ids, id]));\n }\n\n unregisterDescription(id: string): void {\n this.descriptions.update(ids => ids.filter(current => current !== id));\n }\n\n /** Only stamps what has no id yet: the author's own may already be referenced elsewhere. */\n private ensureId(element: HTMLElement, suffix: string): string {\n if (!element.id) {\n element.id = `${this.uid}-${suffix}`;\n }\n return element.id;\n }\n\n protected onClick(event: MouseEvent): void {\n const control = this.control();\n if (!control) {\n return;\n }\n\n const label = (event.target as HTMLElement | null)?.closest('label');\n if (!label || label.parentElement !== this.content().nativeElement) {\n return;\n }\n\n // `label.control` is null exactly when the `for` reaches nothing, the case this exists for.\n // `hasAttribute('for')` would instead let an inert `for` through — precisely what is repaired.\n if (label.control) {\n return;\n }\n\n control.focus();\n }\n}\n","<div\n #content\n class=\"ap-form-field\">\n <ng-content select=\"label\"></ng-content>\n <ng-content></ng-content>\n <ng-content select=\"ap-form-message\"></ng-content>\n</div>\n","import { booleanAttribute, computed, DestroyRef, Directive, ElementRef, inject, input } from '@angular/core';\nimport type { FormFieldControl } from './form-field-control';\nimport { FormFieldComponent } from './form-field.component';\n\n/** The elements a `<label for>` can reach. Everything else has to go through `aria-labelledby`. */\nconst LABELABLE = ['BUTTON', 'INPUT', 'METER', 'OUTPUT', 'PROGRESS', 'SELECT', 'TEXTAREA'];\n\n/** Finds the first focusable descendant, for when the designated element is not focusable itself. */\nconst FOCUSABLE =\n 'button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex=\"-1\"])';\n\n/**\n * Points the surrounding `ap-form-field` at a control's focusable element, and carries the naming that follows.\n *\n * Put it on the element the user actually focuses: the component host when that is it (via `hostDirectives`), otherwise the\n * inner element, in the component's template. With no `ap-form-field` around, it falls back to the `aria-label` it is given.\n */\n@Directive({\n selector: '[apFormFieldControl]',\n host: {\n '[attr.aria-labelledby]': 'labelledBy()',\n '[attr.aria-label]': 'label()',\n '[attr.aria-describedby]': 'describedBy()',\n },\n})\nexport class FormFieldControlDirective implements FormFieldControl {\n /** Fallback name, for a field with no visible label. */\n readonly ariaLabel = input<string | undefined>(undefined, { alias: 'apFormFieldControl' });\n\n /** A disabled control does not take focus from a click on its label. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n private readonly element: HTMLElement = inject(ElementRef).nativeElement;\n private readonly formField = inject(FormFieldComponent, { optional: true });\n\n /** Empty on the native branch, where the label's `for` already carries the association. */\n protected readonly labelledBy = computed(() => this.formField?.labelledBy());\n\n /** The fallback only: an `aria-label` wins over a visible label, so it goes out only when no label names the control. */\n protected readonly label = computed(() => (this.formField?.hasLabel() ? undefined : this.ariaLabel()));\n\n protected readonly describedBy = computed(() => this.formField?.describedBy());\n\n constructor() {\n this.formField?.registerControl(this);\n inject(DestroyRef).onDestroy(() => this.formField?.unregisterControl(this));\n }\n\n labelTarget(fallbackId: string): string | undefined {\n if (!LABELABLE.includes(this.element.tagName)) {\n return undefined;\n }\n if (!this.element.id) {\n this.element.id = fallbackId;\n }\n return this.element.id;\n }\n\n focus(): void {\n if (this.disabled()) {\n return;\n }\n\n this.element.focus();\n // A named container — `role=\"group\"`, `role=\"listbox\"` — is not always in the tab order; the\n // label should then reach its first focusable element.\n if (document.activeElement !== this.element) {\n this.element.querySelector<HTMLElement>(FOCUSABLE)?.focus();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;MA0Ba,kBAAkB,CAAA;AAC3B;;;AAGG;AACc,IAAA,GAAG,GAAG,CAAA,EAAG,MAAM,CAAC,MAAM,CAAC,CAAA,YAAA,EAAe,IAAI,CAAC,MAAM,EAAE,C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AACF,wBAAA,wBAAwB,EAAE,cAAc;AACxC,wBAAA,mBAAmB,EAAE,SAAS;AAC9B,wBAAA,yBAAyB,EAAE,eAAe;AAC7C,qBAAA;AACJ,iBAAA;;;ACxBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-form-field.mjs","sources":["../../../libs/ui-components/form-field/src/form-field.component.ts","../../../libs/ui-components/form-field/src/form-field.component.html","../../../libs/ui-components/form-field/src/form-field-control.directive.ts","../../../libs/ui-components/form-field/src/agorapulse-ui-components-form-field.ts"],"sourcesContent":["import {\n afterRenderEffect,\n APP_ID,\n ChangeDetectionStrategy,\n Component,\n computed,\n ElementRef,\n inject,\n signal,\n untracked,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { FormFieldControl } from './form-field-control';\n\n@Component({\n selector: 'ap-form-field',\n templateUrl: './form-field.component.html',\n styleUrls: ['./form-field.component.scss'],\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '(click)': 'onClick($event)',\n },\n})\nexport class FormFieldComponent {\n /**\n * Combines the application id — federated Angular apps can share a page — with a per-instance random suffix.\n * Not `crypto.randomUUID()`, which browsers refuse outside a secure context.\n */\n private readonly uid = `${inject(APP_ID)}-form-field-${Math.random().toString(36).slice(2)}${Date.now().toString(36)}`;\n\n private readonly content = viewChild.required<ElementRef<HTMLElement>>('content');\n private readonly control = signal<FormFieldControl | undefined>(undefined);\n private readonly descriptions = signal<readonly string[]>([]);\n\n private readonly labelledById = signal<string | undefined>(undefined);\n private readonly labelled = signal(false);\n\n /**\n * The label's id when `aria-labelledby` has to carry the association — never on the native branch, where `for` suffices.\n * Undefined until the first render, and when the field has no label: a control must not emit a dangling reference.\n */\n readonly labelledBy = this.labelledById.asReadonly();\n\n /** Whether a label already names the control, by `for` or by `aria-labelledby`. */\n readonly hasLabel = this.labelled.asReadonly();\n\n /** The ids of everything describing the control, for its `aria-describedby`. */\n readonly describedBy = computed(() => this.descriptions().join(' ') || undefined);\n\n constructor() {\n // After render, so outside change detection: the projected content exists and writing signals\n // here cannot trigger NG0100. Re-runs when the control registers, since it picks the branch.\n afterRenderEffect(() => {\n this.content();\n this.control();\n untracked(() => this.associate());\n });\n }\n\n /**\n * Links the projected label to the registered control.\n *\n * Public because `detectChanges()` does not run after-render hooks in a zone.js harness, so a spec has to force the pass —\n * as does a consumer whose label only appears after the first render.\n */\n associate(): void {\n // `:scope >` and not `querySelector('label')`: `ng-content select=\"label\"` only projects direct\n // children, so a deeper label belongs to something else. Among several, the first names the field.\n const label = this.content().nativeElement.querySelector<HTMLLabelElement>(':scope > label');\n if (!label) {\n this.labelledById.set(undefined);\n this.labelled.set(false);\n return;\n }\n\n // When the control offers a target `for` can reach, the browser supplies the name and the focusing click, so no ARIA is owed;\n // an author's `for` that reaches no control — one aimed at a component host — names nothing, so it is re-aimed.\n const target = this.control()?.labelTarget(`${this.uid}-control`);\n if (target) {\n if (!label.control) {\n label.htmlFor = target;\n }\n this.labelledById.set(undefined);\n this.labelled.set(true);\n return;\n }\n\n this.labelledById.set(this.ensureId(label, 'label'));\n this.labelled.set(true);\n }\n\n registerControl(control: FormFieldControl): void {\n this.control.set(control);\n }\n\n unregisterControl(control: FormFieldControl): void {\n // By identity: a destruction racing a new registration must not clear the live control.\n this.control.update(current => (current === control ? undefined : current));\n }\n\n registerDescription(id: string): void {\n this.descriptions.update(ids => (ids.includes(id) ? ids : [...ids, id]));\n }\n\n unregisterDescription(id: string): void {\n this.descriptions.update(ids => ids.filter(current => current !== id));\n }\n\n /** Only stamps what has no id yet: the author's own may already be referenced elsewhere. */\n private ensureId(element: HTMLElement, suffix: string): string {\n if (!element.id) {\n element.id = `${this.uid}-${suffix}`;\n }\n return element.id;\n }\n\n protected onClick(event: MouseEvent): void {\n const control = this.control();\n if (!control) {\n return;\n }\n\n const label = (event.target as HTMLElement | null)?.closest('label');\n if (!label || label.parentElement !== this.content().nativeElement) {\n return;\n }\n\n // `label.control` is null exactly when the `for` reaches nothing, the case this exists for.\n // `hasAttribute('for')` would instead let an inert `for` through — precisely what is repaired.\n if (label.control) {\n return;\n }\n\n control.focus();\n }\n}\n","<div\n #content\n class=\"ap-form-field\">\n <ng-content select=\"label\"></ng-content>\n <ng-content></ng-content>\n <ng-content select=\"ap-form-message\"></ng-content>\n</div>\n","import { FOCUSABLE_INSIDE } from '@agorapulse/ui-components/directives';\nimport { booleanAttribute, computed, DestroyRef, Directive, effect, ElementRef, inject, input, Renderer2, Signal } from '@angular/core';\nimport type { FormFieldControl } from './form-field-control';\nimport { FormFieldComponent } from './form-field.component';\n\n/** The elements a `<label for>` can reach. Everything else has to go through `aria-labelledby`. */\nconst LABELABLE = ['BUTTON', 'INPUT', 'METER', 'OUTPUT', 'PROGRESS', 'SELECT', 'TEXTAREA'];\n\n/**\n * Points the surrounding `ap-form-field` at a control's focusable element, and carries the naming that follows.\n *\n * Put it on the element the user actually focuses: the component host when that is it (via `hostDirectives`), otherwise the\n * inner element, in the component's template. With no `ap-form-field` around, it falls back to the `aria-label` it is given.\n */\n@Directive({\n selector: '[apFormFieldControl]',\n})\nexport class FormFieldControlDirective implements FormFieldControl {\n /** Fallback name, for a field with no visible label. */\n readonly ariaLabel = input<string | null | undefined>(undefined, { alias: 'apFormFieldControl' });\n\n /** A disabled control does not take focus from a click on its label. */\n readonly disabled = input(false, { transform: booleanAttribute });\n\n private readonly element: HTMLElement = inject(ElementRef).nativeElement;\n private readonly renderer = inject(Renderer2);\n private readonly formField = inject(FormFieldComponent, { optional: true });\n private readonly authoredDescribedBy = this.element.getAttribute('aria-describedby');\n\n /** Empty on the native branch, where the label's `for` already carries the association. */\n protected readonly labelledBy = computed(() => this.formField?.labelledBy());\n\n /** The fallback only: an `aria-label` wins over a visible label, so it goes out only when no label names the control. */\n protected readonly label = computed(() => (this.formField?.hasLabel() ? undefined : this.ariaLabel() || undefined));\n\n protected readonly describedBy = computed(\n () => [this.authoredDescribedBy, this.formField?.describedBy()].filter(Boolean).join(' ') || undefined\n );\n\n constructor() {\n this.formField?.registerControl(this);\n inject(DestroyRef).onDestroy(() => this.formField?.unregisterControl(this));\n this.reflect('aria-labelledby', this.labelledBy);\n this.reflect('aria-label', this.label);\n this.reflect('aria-describedby', this.describedBy);\n }\n\n labelTarget(fallbackId: string): string | undefined {\n if (!LABELABLE.includes(this.element.tagName)) {\n return undefined;\n }\n if (!this.element.id) {\n this.element.id = fallbackId;\n }\n return this.element.id;\n }\n\n /**\n * Writes the attribute only while there is a value for it, and gives back what the author wrote after: a host binding would\n * clear an author's own `aria-label`, static or bound, whenever the field has nothing to say.\n */\n private reflect(name: string, value: Signal<string | undefined>): void {\n const authored = this.element.getAttribute(name);\n let written = false;\n effect(() => {\n const next = value();\n if (next !== undefined) {\n this.renderer.setAttribute(this.element, name, next);\n written = true;\n } else if (written) {\n if (authored === null) {\n this.renderer.removeAttribute(this.element, name);\n } else {\n this.renderer.setAttribute(this.element, name, authored);\n }\n written = false;\n }\n });\n }\n\n focus(): void {\n if (this.disabled()) {\n return;\n }\n\n this.element.focus();\n // A named container — `role=\"group\"`, `role=\"listbox\"` — is not always in the tab order; the\n // label should then reach its first focusable element.\n if (document.activeElement !== this.element) {\n this.element.querySelector<HTMLElement>(FOCUSABLE_INSIDE)?.focus();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;MA0Ba,kBAAkB,CAAA;AAC3B;;;AAGG;AACc,IAAA,GAAG,GAAG,CAAA,EAAG,MAAM,CAAC,MAAM,CAAC,CAAA,YAAA,EAAe,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA,EAAG,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE;AAErG,IAAA,OAAO,GAAG,SAAS,CAAC,QAAQ,CAA0B,SAAS,CAAC;IAChE,OAAO,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QAGpB,IAAI,QAAQ,CAAC,aAAa,KAAK,IAAI,CAAC,OAAO,EAAE;YACzC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAc,gBAAgB,CAAC,EAAE,KAAK,EAAE;QACtE;IACJ;uGA1ES,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,sBAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,QAAA,EAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,UAAA,EAAA,UAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAzB,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAHrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sBAAsB;AACnC,iBAAA;;;AChBD;;AAEG;;;;"}
|
|
@@ -50,13 +50,13 @@ class SegmentedControlComponent {
|
|
|
50
50
|
this.value.set(option.value);
|
|
51
51
|
}
|
|
52
52
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SegmentedControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
53
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SegmentedControlComponent, isStandalone: true, selector: "ap-segmented-control", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class.ap-segmented-control--full-width": "fullWidth()" } }, ngImport: i0, template: "<div\n class=\"ap-segmented-control\"\n role=\"group\"\n [apFormFieldControl]=\"ariaLabel()
|
|
53
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: SegmentedControlComponent, isStandalone: true, selector: "ap-segmented-control", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, fullWidth: { classPropertyName: "fullWidth", publicName: "fullWidth", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { properties: { "class.ap-segmented-control--full-width": "fullWidth()" } }, ngImport: i0, template: "<div\n class=\"ap-segmented-control\"\n role=\"group\"\n [apFormFieldControl]=\"ariaLabel()\"\n [disabled]=\"disabled()\">\n @for (option of options(); track option.value) {\n <button\n type=\"button\"\n class=\"ap-segmented-control__segment\"\n [class.ap-segmented-control__segment--selected]=\"value() === option.value\"\n [attr.aria-pressed]=\"value() === option.value\"\n [disabled]=\"disabled() || (option.disabled ?? false)\"\n (click)=\"select(option)\">\n @if (option.symbolId) {\n <ap-symbol\n class=\"ap-segmented-control__icon\"\n [symbolId]=\"option.symbolId\"\n [size]=\"16\"\n [color]=\"value() === option.value ? 'blue' : 'grey-blue'\" />\n }\n <span class=\"ap-segmented-control__label\">{{ option.label }}</span>\n </button>\n }\n</div>\n", styles: ["ap-segmented-control{display:inline-block}ap-segmented-control.ap-segmented-control--full-width{display:block}ap-segmented-control.ap-segmented-control--full-width .ap-segmented-control{display:flex;width:100%}ap-segmented-control.ap-segmented-control--full-width .ap-segmented-control__segment{flex:1 1 0}.ap-segmented-control{display:inline-flex;align-items:center}.ap-segmented-control .ap-segmented-control__segment{display:inline-flex;align-items:center;justify-content:center;gap:var(--ref-spacing-xxs);box-sizing:border-box;min-height:36px;margin:0;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);border:1px solid var(--ref-color-grey-20);background-color:var(--ref-color-white);color:var(--ref-color-grey-100);font-family:var(--ref-font-family);font-size:var(--ref-font-size-sm);font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-md);white-space:nowrap;cursor:pointer;transition:color .15s ease,border-color .15s ease,background-color .15s ease}.ap-segmented-control .ap-segmented-control__segment:not(:first-child){margin-left:-1px}.ap-segmented-control .ap-segmented-control__segment:first-child{border-top-left-radius:var(--ref-border-radius-sm);border-bottom-left-radius:var(--ref-border-radius-sm)}.ap-segmented-control .ap-segmented-control__segment:last-child{border-top-right-radius:var(--ref-border-radius-sm);border-bottom-right-radius:var(--ref-border-radius-sm)}.ap-segmented-control .ap-segmented-control__segment:hover:not(:disabled){z-index:1;border-color:var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment:focus-visible{z-index:2;outline:none;border-color: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-segmented-control .ap-segmented-control__segment.ap-segmented-control__segment--selected{z-index:1;border-color:var(--ref-color-electric-blue-100);color:var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment:disabled{border-color:var(--ref-color-grey-20);background-color:var(--ref-color-grey-05);color:var(--ref-color-grey-40);cursor:not-allowed}.ap-segmented-control .ap-segmented-control__label{font:inherit;min-width:0;overflow:hidden;text-overflow:ellipsis}\n"], dependencies: [{ kind: "directive", type: FormFieldControlDirective, selector: "[apFormFieldControl]", inputs: ["apFormFieldControl", "disabled"] }, { kind: "component", type: SymbolComponent, selector: "ap-symbol", inputs: ["symbolId", "color", "size"], outputs: ["sizeChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
54
54
|
}
|
|
55
55
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: SegmentedControlComponent, decorators: [{
|
|
56
56
|
type: Component,
|
|
57
57
|
args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'ap-segmented-control', imports: [FormFieldControlDirective, SymbolComponent], host: {
|
|
58
58
|
'[class.ap-segmented-control--full-width]': 'fullWidth()',
|
|
59
|
-
}, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"ap-segmented-control\"\n role=\"group\"\n [apFormFieldControl]=\"ariaLabel()
|
|
59
|
+
}, encapsulation: ViewEncapsulation.None, template: "<div\n class=\"ap-segmented-control\"\n role=\"group\"\n [apFormFieldControl]=\"ariaLabel()\"\n [disabled]=\"disabled()\">\n @for (option of options(); track option.value) {\n <button\n type=\"button\"\n class=\"ap-segmented-control__segment\"\n [class.ap-segmented-control__segment--selected]=\"value() === option.value\"\n [attr.aria-pressed]=\"value() === option.value\"\n [disabled]=\"disabled() || (option.disabled ?? false)\"\n (click)=\"select(option)\">\n @if (option.symbolId) {\n <ap-symbol\n class=\"ap-segmented-control__icon\"\n [symbolId]=\"option.symbolId\"\n [size]=\"16\"\n [color]=\"value() === option.value ? 'blue' : 'grey-blue'\" />\n }\n <span class=\"ap-segmented-control__label\">{{ option.label }}</span>\n </button>\n }\n</div>\n", styles: ["ap-segmented-control{display:inline-block}ap-segmented-control.ap-segmented-control--full-width{display:block}ap-segmented-control.ap-segmented-control--full-width .ap-segmented-control{display:flex;width:100%}ap-segmented-control.ap-segmented-control--full-width .ap-segmented-control__segment{flex:1 1 0}.ap-segmented-control{display:inline-flex;align-items:center}.ap-segmented-control .ap-segmented-control__segment{display:inline-flex;align-items:center;justify-content:center;gap:var(--ref-spacing-xxs);box-sizing:border-box;min-height:36px;margin:0;padding:var(--ref-spacing-xxs) var(--ref-spacing-sm);border:1px solid var(--ref-color-grey-20);background-color:var(--ref-color-white);color:var(--ref-color-grey-100);font-family:var(--ref-font-family);font-size:var(--ref-font-size-sm);font-weight:var(--ref-font-weight-bold);line-height:var(--ref-font-line-height-md);white-space:nowrap;cursor:pointer;transition:color .15s ease,border-color .15s ease,background-color .15s ease}.ap-segmented-control .ap-segmented-control__segment:not(:first-child){margin-left:-1px}.ap-segmented-control .ap-segmented-control__segment:first-child{border-top-left-radius:var(--ref-border-radius-sm);border-bottom-left-radius:var(--ref-border-radius-sm)}.ap-segmented-control .ap-segmented-control__segment:last-child{border-top-right-radius:var(--ref-border-radius-sm);border-bottom-right-radius:var(--ref-border-radius-sm)}.ap-segmented-control .ap-segmented-control__segment:hover:not(:disabled){z-index:1;border-color:var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment:focus-visible{z-index:2;outline:none;border-color: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-segmented-control .ap-segmented-control__segment.ap-segmented-control__segment--selected{z-index:1;border-color:var(--ref-color-electric-blue-100);color:var(--ref-color-electric-blue-100)}.ap-segmented-control .ap-segmented-control__segment:disabled{border-color:var(--ref-color-grey-20);background-color:var(--ref-color-grey-05);color:var(--ref-color-grey-40);cursor:not-allowed}.ap-segmented-control .ap-segmented-control__label{font:inherit;min-width:0;overflow:hidden;text-overflow:ellipsis}\n"] }]
|
|
60
60
|
}], ctorParameters: () => [], propDecorators: { options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: true }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], fullWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "fullWidth", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }] } });
|
|
61
61
|
|
|
62
62
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agorapulse-ui-components-segmented-control.mjs","sources":["../../../libs/ui-components/segmented-control/src/segmented-control.component.ts","../../../libs/ui-components/segmented-control/src/segmented-control.component.html","../../../libs/ui-components/segmented-control/src/agorapulse-ui-components-segmented-control.ts"],"sourcesContent":["import { FormFieldControlDirective } from '@agorapulse/ui-components/form-field';\nimport { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';\nimport { agorapulseSymbol, SymbolComponent, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport { ChangeDetectionStrategy, Component, effect, inject, input, model, untracked, ViewEncapsulation } from '@angular/core';\n\nexport interface SegmentedControlOption {\n /** The value bound to the control when this option is selected. */\n value: string;\n /** The text shown on the segment. */\n label: string;\n /** Optional leading icon symbol id. */\n symbolId?: agorapulseSymbol;\n /** Disables this segment only. */\n disabled?: boolean;\n}\n\n/**\n * A single-select control for switching between a small set (2–4) of mutually\n * exclusive options laid out side by side.\n *\n * @example\n * ```html\n * <ap-segmented-control\n * [options]=\"[{ value: 'list', label: 'List' }, { value: 'board', label: 'Board' }]\"\n * [(value)]=\"view\"\n * ariaLabel=\"Choose a view\" />\n * ```\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-segmented-control',\n templateUrl: './segmented-control.component.html',\n styleUrls: ['./segmented-control.component.scss'],\n imports: [FormFieldControlDirective, SymbolComponent],\n host: {\n '[class.ap-segmented-control--full-width]': 'fullWidth()',\n },\n // Emit plain, global `.ap-segmented-control*` classes (no Angular scoping) so the\n // styling stays framework-agnostic and readable/reusable outside Angular.\n encapsulation: ViewEncapsulation.None,\n})\nexport class SegmentedControlComponent {\n private readonly symbolRegistry = inject(SymbolRegistry);\n\n readonly options = input.required<SegmentedControlOption[]>();\n /** The currently selected value. Supports two-way binding via `[(value)]`. Defaults to the first option's value when unset. */\n readonly value = model<string>('');\n /** Disables the whole control. */\n readonly disabled = input(false);\n /** When true, the control fills its container width and segments share it equally instead of fitting their text. */\n readonly fullWidth = input(false);\n /** Accessible name for the group of segments. */\n readonly ariaLabel = input('');\n\n // Keep `value` defined: fall back to the first option whenever it is unset.\n private readonly defaultValueEffect = effect(() => {\n const [firstOption] = this.options();\n if (!this.value() && firstOption) {\n untracked(() => this.value.set(firstOption.value));\n }\n });\n\n constructor() {\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n }\n\n protected select(option: SegmentedControlOption): void {\n if (this.disabled() || option.disabled) {\n return;\n }\n this.value.set(option.value);\n }\n}\n","<div\n class=\"ap-segmented-control\"\n role=\"group\"\n [apFormFieldControl]=\"ariaLabel()
|
|
1
|
+
{"version":3,"file":"agorapulse-ui-components-segmented-control.mjs","sources":["../../../libs/ui-components/segmented-control/src/segmented-control.component.ts","../../../libs/ui-components/segmented-control/src/segmented-control.component.html","../../../libs/ui-components/segmented-control/src/agorapulse-ui-components-segmented-control.ts"],"sourcesContent":["import { FormFieldControlDirective } from '@agorapulse/ui-components/form-field';\nimport { UI_COMPONENTS_SYMBOLS } from '@agorapulse/ui-components/providers';\nimport { agorapulseSymbol, SymbolComponent, SymbolRegistry } from '@agorapulse/ui-symbol';\nimport { ChangeDetectionStrategy, Component, effect, inject, input, model, untracked, ViewEncapsulation } from '@angular/core';\n\nexport interface SegmentedControlOption {\n /** The value bound to the control when this option is selected. */\n value: string;\n /** The text shown on the segment. */\n label: string;\n /** Optional leading icon symbol id. */\n symbolId?: agorapulseSymbol;\n /** Disables this segment only. */\n disabled?: boolean;\n}\n\n/**\n * A single-select control for switching between a small set (2–4) of mutually\n * exclusive options laid out side by side.\n *\n * @example\n * ```html\n * <ap-segmented-control\n * [options]=\"[{ value: 'list', label: 'List' }, { value: 'board', label: 'Board' }]\"\n * [(value)]=\"view\"\n * ariaLabel=\"Choose a view\" />\n * ```\n */\n@Component({\n changeDetection: ChangeDetectionStrategy.OnPush,\n selector: 'ap-segmented-control',\n templateUrl: './segmented-control.component.html',\n styleUrls: ['./segmented-control.component.scss'],\n imports: [FormFieldControlDirective, SymbolComponent],\n host: {\n '[class.ap-segmented-control--full-width]': 'fullWidth()',\n },\n // Emit plain, global `.ap-segmented-control*` classes (no Angular scoping) so the\n // styling stays framework-agnostic and readable/reusable outside Angular.\n encapsulation: ViewEncapsulation.None,\n})\nexport class SegmentedControlComponent {\n private readonly symbolRegistry = inject(SymbolRegistry);\n\n readonly options = input.required<SegmentedControlOption[]>();\n /** The currently selected value. Supports two-way binding via `[(value)]`. Defaults to the first option's value when unset. */\n readonly value = model<string>('');\n /** Disables the whole control. */\n readonly disabled = input(false);\n /** When true, the control fills its container width and segments share it equally instead of fitting their text. */\n readonly fullWidth = input(false);\n /** Accessible name for the group of segments. */\n readonly ariaLabel = input('');\n\n // Keep `value` defined: fall back to the first option whenever it is unset.\n private readonly defaultValueEffect = effect(() => {\n const [firstOption] = this.options();\n if (!this.value() && firstOption) {\n untracked(() => this.value.set(firstOption.value));\n }\n });\n\n constructor() {\n this.symbolRegistry.withSymbols(...(inject(UI_COMPONENTS_SYMBOLS, { optional: true })?.flat() ?? []));\n }\n\n protected select(option: SegmentedControlOption): void {\n if (this.disabled() || option.disabled) {\n return;\n }\n this.value.set(option.value);\n }\n}\n","<div\n class=\"ap-segmented-control\"\n role=\"group\"\n [apFormFieldControl]=\"ariaLabel()\"\n [disabled]=\"disabled()\">\n @for (option of options(); track option.value) {\n <button\n type=\"button\"\n class=\"ap-segmented-control__segment\"\n [class.ap-segmented-control__segment--selected]=\"value() === option.value\"\n [attr.aria-pressed]=\"value() === option.value\"\n [disabled]=\"disabled() || (option.disabled ?? false)\"\n (click)=\"select(option)\">\n @if (option.symbolId) {\n <ap-symbol\n class=\"ap-segmented-control__icon\"\n [symbolId]=\"option.symbolId\"\n [size]=\"16\"\n [color]=\"value() === option.value ? 'blue' : 'grey-blue'\" />\n }\n <span class=\"ap-segmented-control__label\">{{ option.label }}</span>\n </button>\n }\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;AAgBA;;;;;;;;;;;AAWG;MAcU,yBAAyB,CAAA;AACjB,IAAA,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;IAE/C,OAAO,GAAG,KAAK,CAAC,QAAQ;gFAA4B;;IAEpD,KAAK,GAAG,KAAK,CAAS,EAAE;8EAAC;;IAEzB,QAAQ,GAAG,KAAK,CAAC,KAAK;iFAAC;;IAEvB,SAAS,GAAG,KAAK,CAAC,KAAK;kFAAC;;IAExB,SAAS,GAAG,KAAK,CAAC,EAAE;kFAAC;;AAGb,IAAA,kBAAkB,GAAG,MAAM,CAAC,MAAK;QAC9C,MAAM,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE;QACpC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,WAAW,EAAE;AAC9B,YAAA,SAAS,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;QACtD;IACJ,CAAC;2FAAC;AAEF,IAAA,WAAA,GAAA;QACI,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,IAAI,MAAM,CAAC,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;IACzG;AAEU,IAAA,MAAM,CAAC,MAA8B,EAAA;QAC3C,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,MAAM,CAAC,QAAQ,EAAE;YACpC;QACJ;QACA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC;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,EAAA,CAAA,quEAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDSc,yBAAyB,6GAAE,eAAe,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,OAAA,EAAA,MAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA;;2FAQ3C,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAbrC,SAAS;sCACW,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,sBAAsB,EAAA,OAAA,EAGvB,CAAC,yBAAyB,EAAE,eAAe,CAAC,EAAA,IAAA,EAC/C;AACF,wBAAA,0CAA0C,EAAE,aAAa;qBAC5D,EAAA,aAAA,EAGc,iBAAiB,CAAC,IAAI,EAAA,QAAA,EAAA,m9BAAA,EAAA,MAAA,EAAA,CAAA,quEAAA,CAAA,EAAA;;;AEvCzC;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -147,6 +147,12 @@ declare class EqualValidatorDirective implements Validator {
|
|
|
147
147
|
static ɵdir: i0.ɵɵDirectiveDeclaration<EqualValidatorDirective, "[validateEqual][formControlName],[validateEqual][formControl],[validateEqual][ngModel]", never, {}, {}, never, never, true, never>;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
/**
|
|
151
|
+
* The elements that can take keyboard focus inside a wrapper, for reaching the real control behind a component host.
|
|
152
|
+
* `tabindex="-1"` is left out: it marks a focus target, not an entry point.
|
|
153
|
+
*/
|
|
154
|
+
declare const FOCUSABLE_INSIDE = "button, [href], input, select, textarea, [tabindex]:not([tabindex=\"-1\"])";
|
|
155
|
+
|
|
150
156
|
declare class GifService {
|
|
151
157
|
static isGif(src: string): boolean | "";
|
|
152
158
|
}
|
|
@@ -331,5 +337,5 @@ declare class TableColumnDragDirective implements OnInit, OnDestroy {
|
|
|
331
337
|
static ɵdir: i0.ɵɵDirectiveDeclaration<TableColumnDragDirective, "table[apTableColumnDrag]", never, {}, {}, never, never, true, never>;
|
|
332
338
|
}
|
|
333
339
|
|
|
334
|
-
export { AP_INTERACTIVE_ELEMENT, AutosizeTextareaDirective, BaseButtonDirective, CheckboxDirective, ClickDirective, DefaultImageDirective, EllipsisDirective, EqualValidatorDirective, FrozenGifDirective, GifService, MultiStyleTextDirective, OverflowCountDirective, OverflowCounterDirective, OverflowItemDirective, StopPropagationDirective, TableColumnDragDirective };
|
|
340
|
+
export { AP_INTERACTIVE_ELEMENT, AutosizeTextareaDirective, BaseButtonDirective, CheckboxDirective, ClickDirective, DefaultImageDirective, EllipsisDirective, EqualValidatorDirective, FOCUSABLE_INSIDE, FrozenGifDirective, GifService, MultiStyleTextDirective, OverflowCountDirective, OverflowCounterDirective, OverflowItemDirective, StopPropagationDirective, TableColumnDragDirective };
|
|
335
341
|
export type { ApInteractiveElement };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { Signal } from '@angular/core';
|
|
2
3
|
|
|
3
4
|
/** What a control offers the field around it, so that field's label can name it. */
|
|
4
5
|
interface FormFieldControl {
|
|
@@ -20,18 +21,25 @@ interface FormFieldControl {
|
|
|
20
21
|
*/
|
|
21
22
|
declare class FormFieldControlDirective implements FormFieldControl {
|
|
22
23
|
/** Fallback name, for a field with no visible label. */
|
|
23
|
-
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
24
|
+
readonly ariaLabel: _angular_core.InputSignal<string | null | undefined>;
|
|
24
25
|
/** A disabled control does not take focus from a click on its label. */
|
|
25
26
|
readonly disabled: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
26
27
|
private readonly element;
|
|
28
|
+
private readonly renderer;
|
|
27
29
|
private readonly formField;
|
|
30
|
+
private readonly authoredDescribedBy;
|
|
28
31
|
/** Empty on the native branch, where the label's `for` already carries the association. */
|
|
29
|
-
protected readonly labelledBy:
|
|
32
|
+
protected readonly labelledBy: Signal<string | undefined>;
|
|
30
33
|
/** The fallback only: an `aria-label` wins over a visible label, so it goes out only when no label names the control. */
|
|
31
|
-
protected readonly label:
|
|
32
|
-
protected readonly describedBy:
|
|
34
|
+
protected readonly label: Signal<string | undefined>;
|
|
35
|
+
protected readonly describedBy: Signal<string | undefined>;
|
|
33
36
|
constructor();
|
|
34
37
|
labelTarget(fallbackId: string): string | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Writes the attribute only while there is a value for it, and gives back what the author wrote after: a host binding would
|
|
40
|
+
* clear an author's own `aria-label`, static or bound, whenever the field has nothing to say.
|
|
41
|
+
*/
|
|
42
|
+
private reflect;
|
|
35
43
|
focus(): void;
|
|
36
44
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FormFieldControlDirective, never>;
|
|
37
45
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<FormFieldControlDirective, "[apFormFieldControl]", never, { "ariaLabel": { "alias": "apFormFieldControl"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
Binary file
|