@agorapulse/ui-components 20.4.33 → 21.0.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-21.0.0.tgz +0 -0
- package/fesm2022/agorapulse-ui-components-action-dropdown.mjs +17 -18
- package/fesm2022/agorapulse-ui-components-action-dropdown.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-add-comment.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-autocomplete.mjs +7 -7
- package/fesm2022/agorapulse-ui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-avatar-group.mjs +11 -13
- package/fesm2022/agorapulse-ui-components-avatar-group.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-avatar.mjs +21 -23
- package/fesm2022/agorapulse-ui-components-avatar.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-badge.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-button.mjs +15 -15
- package/fesm2022/agorapulse-ui-components-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-checkbox.mjs +5 -5
- package/fesm2022/agorapulse-ui-components-checkbox.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-close-button.mjs +7 -7
- package/fesm2022/agorapulse-ui-components-close-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-confirm-modal.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-counter.mjs +9 -9
- package/fesm2022/agorapulse-ui-components-counter.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-datepicker.mjs +50 -50
- package/fesm2022/agorapulse-ui-components-datepicker.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-directives.mjs +26 -26
- package/fesm2022/agorapulse-ui-components-directives.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-dot-stepper.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-dropdown-base.mjs +5 -5
- package/fesm2022/agorapulse-ui-components-dropdown-base.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-filter-chips-list.mjs +22 -22
- package/fesm2022/agorapulse-ui-components-filter-chips-list.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs +78 -78
- package/fesm2022/agorapulse-ui-components-filter-dropdown.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-form-field.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-form-message.mjs +5 -5
- package/fesm2022/agorapulse-ui-components-form-message.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-icon-button.mjs +5 -5
- package/fesm2022/agorapulse-ui-components-icon-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-infobox.mjs +4 -4
- package/fesm2022/agorapulse-ui-components-infobox.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-input-group.mjs +6 -6
- package/fesm2022/agorapulse-ui-components-input-search.mjs +9 -9
- package/fesm2022/agorapulse-ui-components-input-search.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-input.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-labels-selector.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-labels.mjs +6 -6
- package/fesm2022/agorapulse-ui-components-legacy-input.mjs +4 -4
- package/fesm2022/agorapulse-ui-components-legacy-input.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-legacy-select.mjs +16 -16
- package/fesm2022/agorapulse-ui-components-legacy-select.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-legacy-textarea.mjs +4 -4
- package/fesm2022/agorapulse-ui-components-legacy-textarea.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-media-display-overlay.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-modal.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs +148 -148
- package/fesm2022/agorapulse-ui-components-nav-selector.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-neo-datepicker.mjs +6 -6
- package/fesm2022/agorapulse-ui-components-notification.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-paginator.mjs +8 -8
- package/fesm2022/agorapulse-ui-components-paginator.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-password-input.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-phone-number-input.mjs +5 -6
- package/fesm2022/agorapulse-ui-components-phone-number-input.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-popmenu.mjs +10 -10
- package/fesm2022/agorapulse-ui-components-radio-button-card.mjs +25 -25
- package/fesm2022/agorapulse-ui-components-radio-button-card.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-radio.mjs +6 -6
- package/fesm2022/agorapulse-ui-components-range-slider.mjs +4 -4
- package/fesm2022/agorapulse-ui-components-range-slider.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-segmented-control.mjs +9 -9
- package/fesm2022/agorapulse-ui-components-segmented-control.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-select.mjs +74 -74
- package/fesm2022/agorapulse-ui-components-select.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs +33 -33
- package/fesm2022/agorapulse-ui-components-selection-dropdown.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-slide-toggle.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-snackbars-thread.mjs +6 -6
- package/fesm2022/agorapulse-ui-components-social-button.mjs +6 -6
- package/fesm2022/agorapulse-ui-components-social-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-split-button.mjs +14 -14
- package/fesm2022/agorapulse-ui-components-split-button.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-status-card.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-status.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-stepper.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-tabs.mjs +25 -24
- package/fesm2022/agorapulse-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-tag.mjs +9 -9
- package/fesm2022/agorapulse-ui-components-tag.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-text-measurement.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-textarea.mjs +3 -3
- package/fesm2022/agorapulse-ui-components-toggle.mjs +5 -5
- package/fesm2022/agorapulse-ui-components-toggle.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components-tooltip.mjs +34 -34
- package/fesm2022/agorapulse-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/agorapulse-ui-components.mjs +4 -4
- package/package.json +71 -70
- package/{button/index.d.ts → types/agorapulse-ui-components-button.d.ts} +1 -1
- package/{icon-button/index.d.ts → types/agorapulse-ui-components-icon-button.d.ts} +1 -1
- package/{paginator/index.d.ts → types/agorapulse-ui-components-paginator.d.ts} +1 -1
- package/{social-button/index.d.ts → types/agorapulse-ui-components-social-button.d.ts} +1 -1
- package/{split-button/index.d.ts → types/agorapulse-ui-components-split-button.d.ts} +1 -1
- package/agorapulse-ui-components-20.4.33.tgz +0 -0
- /package/{action-dropdown/index.d.ts → types/agorapulse-ui-components-action-dropdown.d.ts} +0 -0
- /package/{add-comment/index.d.ts → types/agorapulse-ui-components-add-comment.d.ts} +0 -0
- /package/{autocomplete/index.d.ts → types/agorapulse-ui-components-autocomplete.d.ts} +0 -0
- /package/{avatar-group/index.d.ts → types/agorapulse-ui-components-avatar-group.d.ts} +0 -0
- /package/{avatar/index.d.ts → types/agorapulse-ui-components-avatar.d.ts} +0 -0
- /package/{badge/index.d.ts → types/agorapulse-ui-components-badge.d.ts} +0 -0
- /package/{checkbox/index.d.ts → types/agorapulse-ui-components-checkbox.d.ts} +0 -0
- /package/{close-button/index.d.ts → types/agorapulse-ui-components-close-button.d.ts} +0 -0
- /package/{confirm-modal/index.d.ts → types/agorapulse-ui-components-confirm-modal.d.ts} +0 -0
- /package/{counter/index.d.ts → types/agorapulse-ui-components-counter.d.ts} +0 -0
- /package/{datepicker/index.d.ts → types/agorapulse-ui-components-datepicker.d.ts} +0 -0
- /package/{directives/index.d.ts → types/agorapulse-ui-components-directives.d.ts} +0 -0
- /package/{dot-stepper/index.d.ts → types/agorapulse-ui-components-dot-stepper.d.ts} +0 -0
- /package/{dropdown-base/index.d.ts → types/agorapulse-ui-components-dropdown-base.d.ts} +0 -0
- /package/{filter-chips-list/index.d.ts → types/agorapulse-ui-components-filter-chips-list.d.ts} +0 -0
- /package/{filter-dropdown/index.d.ts → types/agorapulse-ui-components-filter-dropdown.d.ts} +0 -0
- /package/{form-field/index.d.ts → types/agorapulse-ui-components-form-field.d.ts} +0 -0
- /package/{form-message/index.d.ts → types/agorapulse-ui-components-form-message.d.ts} +0 -0
- /package/{infobox/index.d.ts → types/agorapulse-ui-components-infobox.d.ts} +0 -0
- /package/{input-group/index.d.ts → types/agorapulse-ui-components-input-group.d.ts} +0 -0
- /package/{input-search/index.d.ts → types/agorapulse-ui-components-input-search.d.ts} +0 -0
- /package/{input/index.d.ts → types/agorapulse-ui-components-input.d.ts} +0 -0
- /package/{labels-selector/index.d.ts → types/agorapulse-ui-components-labels-selector.d.ts} +0 -0
- /package/{labels/index.d.ts → types/agorapulse-ui-components-labels.d.ts} +0 -0
- /package/{legacy/input/index.d.ts → types/agorapulse-ui-components-legacy-input.d.ts} +0 -0
- /package/{legacy/select/index.d.ts → types/agorapulse-ui-components-legacy-select.d.ts} +0 -0
- /package/{legacy/textarea/index.d.ts → types/agorapulse-ui-components-legacy-textarea.d.ts} +0 -0
- /package/{media-display-overlay/index.d.ts → types/agorapulse-ui-components-media-display-overlay.d.ts} +0 -0
- /package/{modal/index.d.ts → types/agorapulse-ui-components-modal.d.ts} +0 -0
- /package/{nav-selector/testing/index.d.ts → types/agorapulse-ui-components-nav-selector-testing.d.ts} +0 -0
- /package/{nav-selector/index.d.ts → types/agorapulse-ui-components-nav-selector.d.ts} +0 -0
- /package/{neo-datepicker/index.d.ts → types/agorapulse-ui-components-neo-datepicker.d.ts} +0 -0
- /package/{notification/index.d.ts → types/agorapulse-ui-components-notification.d.ts} +0 -0
- /package/{password-input/index.d.ts → types/agorapulse-ui-components-password-input.d.ts} +0 -0
- /package/{phone-number-input/index.d.ts → types/agorapulse-ui-components-phone-number-input.d.ts} +0 -0
- /package/{popmenu/index.d.ts → types/agorapulse-ui-components-popmenu.d.ts} +0 -0
- /package/{providers/index.d.ts → types/agorapulse-ui-components-providers.d.ts} +0 -0
- /package/{radio-button-card/index.d.ts → types/agorapulse-ui-components-radio-button-card.d.ts} +0 -0
- /package/{radio/index.d.ts → types/agorapulse-ui-components-radio.d.ts} +0 -0
- /package/{range-slider/index.d.ts → types/agorapulse-ui-components-range-slider.d.ts} +0 -0
- /package/{segmented-control/index.d.ts → types/agorapulse-ui-components-segmented-control.d.ts} +0 -0
- /package/{select/index.d.ts → types/agorapulse-ui-components-select.d.ts} +0 -0
- /package/{selection-dropdown/index.d.ts → types/agorapulse-ui-components-selection-dropdown.d.ts} +0 -0
- /package/{slide-toggle/index.d.ts → types/agorapulse-ui-components-slide-toggle.d.ts} +0 -0
- /package/{snackbars-thread/index.d.ts → types/agorapulse-ui-components-snackbars-thread.d.ts} +0 -0
- /package/{status-card/index.d.ts → types/agorapulse-ui-components-status-card.d.ts} +0 -0
- /package/{status/index.d.ts → types/agorapulse-ui-components-status.d.ts} +0 -0
- /package/{stepper/index.d.ts → types/agorapulse-ui-components-stepper.d.ts} +0 -0
- /package/{tabs/index.d.ts → types/agorapulse-ui-components-tabs.d.ts} +0 -0
- /package/{tag/index.d.ts → types/agorapulse-ui-components-tag.d.ts} +0 -0
- /package/{text-measurement/index.d.ts → types/agorapulse-ui-components-text-measurement.d.ts} +0 -0
- /package/{textarea/index.d.ts → types/agorapulse-ui-components-textarea.d.ts} +0 -0
- /package/{toggle/index.d.ts → types/agorapulse-ui-components-toggle.d.ts} +0 -0
- /package/{tooltip/index.d.ts → types/agorapulse-ui-components-tooltip.d.ts} +0 -0
- /package/{index.d.ts → types/agorapulse-ui-components.d.ts} +0 -0
|
@@ -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 { 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, 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 [attr.aria-label]=\"ariaLabel()\"\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;AAC5B,IAAA,KAAK,GAAG,KAAK,CAAC,EAAE,iDAAC;AACjB,IAAA,QAAQ,GAAG,KAAK,CAAC,KAAK,4CAAI,SAAS,EAAE,gBAAgB,EAAA,CAAA,GAAA,CAA7B,EAAE,SAAS,EAAE,gBAAgB,EAAE,GAAC;IACxD,eAAe,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAU;IACjC,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAoB;IACpC,MAAM,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,QAAA,EAAA,CAAA,GAAA,EAAA,CAAA,CAAoB;wGALzB,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,SAAA,EAAA,IAAA,EAAA,mBAAmB,s2BCxBhC,2nBAuBA,EAAA,MAAA,EAAA,CAAA,o8DAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAA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yBAAA,EAAA,mBAAA,EAAA,UAAA,CAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAI7D,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBATpC,SAAS;sCACW,uBAAuB,CAAC,MAAM,EAAA,QAAA,EACrC,sBAAsB,WAGvB,CAAC,mBAAmB,EAAE,gBAAgB,EAAE,UAAU,EAAE,SAAS,CAAC,EAAA,cAAA,EACvD,CAAC,uBAAuB,CAAC,EAAA,SAAA,EAC9B,CAAC,8BAA8B,CAAC,EAAA,QAAA,EAAA,y/BAAA,EAAA,MAAA,EAAA,CAAA,qHAAA,CAAA,EAAA;;;AElE/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 { 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, 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 [attr.aria-label]=\"ariaLabel()\"\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;AAC5B,IAAA,KAAK,GAAG,KAAK,CAAC,EAAE,4EAAC;IACjB,QAAQ,GAAG,KAAK,CAAC,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;IACxD,eAAe,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;IACjC,QAAQ,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,UAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAoB;IACp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