@odx/angular 1.0.4 → 2.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/cdk/autocomplete-control/README.md +3 -0
- package/cdk/autocomplete-control/index.d.ts +3 -0
- package/cdk/autocomplete-control/lib/abstract/base-search-field.directive.d.ts +13 -0
- package/cdk/autocomplete-control/lib/abstract/index.d.ts +1 -0
- package/cdk/autocomplete-control/lib/autocomplete-control.d.ts +39 -0
- package/cdk/autocomplete-control/lib/pipes/base-search-filter-pipe.d.ts +11 -0
- package/cdk/autocomplete-control/lib/pipes/index.d.ts +1 -0
- package/cdk/option-control/README.md +3 -0
- package/cdk/option-control/index.d.ts +1 -0
- package/cdk/option-control/lib/option-control.d.ts +17 -0
- package/components/autocomplete/README.md +3 -0
- package/components/autocomplete/index.d.ts +6 -0
- package/components/autocomplete/lib/autocomplete.component.d.ts +30 -0
- package/components/autocomplete/lib/autocomplete.module.d.ts +11 -0
- package/components/autocomplete/lib/autocomplete.tokens.d.ts +3 -0
- package/components/autocomplete/lib/components/index.d.ts +1 -0
- package/components/autocomplete/lib/components/option/autocomplete-option.component.d.ts +9 -0
- package/components/autocomplete/lib/directives/autocomplete-search-field.directive.d.ts +9 -0
- package/components/autocomplete/lib/directives/index.d.ts +1 -0
- package/components/autocomplete/lib/pipes/autocomplete-search-filter.pipe.d.ts +12 -0
- package/components/autocomplete/lib/pipes/index.d.ts +1 -0
- package/components/chip/index.d.ts +1 -1
- package/components/chip/lib/{chip.component.d.ts → components/chip/chip.component.d.ts} +1 -1
- package/components/chip/lib/components/chip-list/chip-list.component.d.ts +6 -0
- package/components/chip/lib/components/chip-list-row/chip-list-row.component.d.ts +6 -0
- package/components/chip/lib/components/index.d.ts +3 -0
- package/components/dropdown/lib/dropdown.directive.d.ts +2 -1
- package/components/form-field/lib/models/form-field-variant.d.ts +1 -0
- package/components/main-menu/lib/directives/index.d.ts +1 -0
- package/components/main-menu/lib/directives/main-menu-close.directive.d.ts +7 -0
- package/components/main-menu/lib/directives/main-menu-item.directive.d.ts +3 -4
- package/components/main-menu/lib/main-menu.module.d.ts +3 -2
- package/components/menu/lib/directives/menu-item.directive.d.ts +1 -1
- package/components/select/index.d.ts +0 -1
- package/components/select/lib/components/index.d.ts +1 -1
- package/components/select/lib/components/select-option/select-option.component.d.ts +19 -0
- package/components/select/lib/directives/select-search-field.directive.d.ts +3 -7
- package/components/select/lib/pipes/select-search-filter.pipe.d.ts +8 -8
- package/components/select/lib/select.component.d.ts +15 -30
- package/components/select/lib/select.module.d.ts +2 -2
- package/components/select/lib/select.tokens.d.ts +2 -2
- package/components/table/README.md +3 -0
- package/components/table/index.d.ts +5 -0
- package/components/table/lib/components/check-cell/check-cell.component.d.ts +11 -0
- package/components/table/lib/components/header-title/header-title.component.d.ts +28 -0
- package/components/table/lib/components/index.d.ts +2 -0
- package/components/table/lib/directives/index.d.ts +2 -0
- package/components/table/lib/directives/table-cell.directive.d.ts +6 -0
- package/components/table/lib/directives/table-row.directive.d.ts +6 -0
- package/components/table/lib/interfaces/index.d.ts +3 -0
- package/components/table/lib/models/index.d.ts +2 -0
- package/components/table/lib/models/sort-variant.d.ts +6 -0
- package/components/table/lib/models/table-variant.d.ts +5 -0
- package/components/table/lib/table.component.d.ts +29 -0
- package/components/table/lib/table.config.d.ts +4 -0
- package/components/table/lib/table.module.d.ts +11 -0
- package/components/wizard/README.md +3 -0
- package/components/wizard/index.d.ts +3 -0
- package/components/wizard/lib/components/index.d.ts +1 -0
- package/components/wizard/lib/components/wizard-step/wizard-step.component.d.ts +17 -0
- package/components/wizard/lib/wizard.component.d.ts +31 -0
- package/components/wizard/lib/wizard.module.d.ts +9 -0
- package/esm2020/cdk/autocomplete-control/index.mjs +4 -0
- package/esm2020/cdk/autocomplete-control/lib/abstract/base-search-field.directive.mjs +38 -0
- package/esm2020/cdk/autocomplete-control/lib/abstract/index.mjs +2 -0
- package/esm2020/cdk/autocomplete-control/lib/autocomplete-control.mjs +90 -0
- package/esm2020/cdk/autocomplete-control/lib/pipes/base-search-filter-pipe.mjs +32 -0
- package/esm2020/cdk/autocomplete-control/lib/pipes/index.mjs +2 -0
- package/esm2020/cdk/autocomplete-control/odx-angular-cdk-autocomplete-control.mjs +5 -0
- package/esm2020/cdk/option-control/index.mjs +2 -0
- package/esm2020/cdk/option-control/lib/option-control.mjs +47 -0
- package/esm2020/cdk/option-control/odx-angular-cdk-option-control.mjs +5 -0
- package/esm2020/components/autocomplete/index.mjs +7 -0
- package/esm2020/components/autocomplete/lib/autocomplete.component.mjs +162 -0
- package/esm2020/components/autocomplete/lib/autocomplete.module.mjs +21 -0
- package/esm2020/components/autocomplete/lib/autocomplete.tokens.mjs +3 -0
- package/esm2020/components/autocomplete/lib/components/index.mjs +2 -0
- package/esm2020/components/autocomplete/lib/components/option/autocomplete-option.component.mjs +33 -0
- package/esm2020/components/autocomplete/lib/directives/autocomplete-search-field.directive.mjs +26 -0
- package/esm2020/components/autocomplete/lib/directives/index.mjs +2 -0
- package/esm2020/components/autocomplete/lib/pipes/autocomplete-search-filter.pipe.mjs +30 -0
- package/esm2020/components/autocomplete/lib/pipes/index.mjs +2 -0
- package/esm2020/components/autocomplete/odx-angular-components-autocomplete.mjs +5 -0
- package/esm2020/components/card/lib/card.component.mjs +2 -2
- package/esm2020/components/chip/index.mjs +2 -2
- package/esm2020/components/chip/lib/{chip.component.mjs → components/chip/chip.component.mjs} +2 -2
- package/esm2020/components/chip/lib/components/chip-list/chip-list.component.mjs +21 -0
- package/esm2020/components/chip/lib/components/chip-list-row/chip-list-row.component.mjs +21 -0
- package/esm2020/components/chip/lib/components/index.mjs +4 -0
- package/esm2020/components/dropdown/lib/dropdown.component.mjs +3 -3
- package/esm2020/components/dropdown/lib/dropdown.directive.mjs +10 -2
- package/esm2020/components/form-field/lib/components/form-group/form-group.component.mjs +3 -3
- package/esm2020/components/form-field/lib/form-field.component.mjs +3 -3
- package/esm2020/components/form-field/lib/form-field.service.mjs +2 -2
- package/esm2020/components/form-field/lib/models/form-field-variant.mjs +2 -1
- package/esm2020/components/main-menu/lib/directives/index.mjs +2 -1
- package/esm2020/components/main-menu/lib/directives/main-menu-close.directive.mjs +24 -0
- package/esm2020/components/main-menu/lib/directives/main-menu-item.directive.mjs +6 -12
- package/esm2020/components/main-menu/lib/main-menu.module.mjs +4 -4
- package/esm2020/components/menu/lib/directives/menu-item.directive.mjs +3 -3
- package/esm2020/components/select/index.mjs +1 -2
- package/esm2020/components/select/lib/components/index.mjs +2 -2
- package/esm2020/components/select/lib/components/select-option/select-option.component.mjs +75 -0
- package/esm2020/components/select/lib/directives/select-search-field.directive.mjs +9 -21
- package/esm2020/components/select/lib/pipes/select-search-filter.pipe.mjs +12 -33
- package/esm2020/components/select/lib/select.component.mjs +44 -86
- package/esm2020/components/select/lib/select.module.mjs +5 -5
- package/esm2020/components/select/lib/select.tokens.mjs +2 -2
- package/esm2020/components/table/index.mjs +6 -0
- package/esm2020/components/table/lib/components/check-cell/check-cell.component.mjs +29 -0
- package/esm2020/components/table/lib/components/header-title/header-title.component.mjs +86 -0
- package/esm2020/components/table/lib/components/index.mjs +3 -0
- package/esm2020/components/table/lib/directives/index.mjs +3 -0
- package/esm2020/components/table/lib/directives/table-cell.directive.mjs +27 -0
- package/esm2020/components/table/lib/directives/table-row.directive.mjs +28 -0
- package/esm2020/components/table/lib/interfaces/index.mjs +4 -0
- package/esm2020/components/table/lib/models/index.mjs +3 -0
- package/esm2020/components/table/lib/models/sort-variant.mjs +6 -0
- package/esm2020/components/table/lib/models/table-variant.mjs +5 -0
- package/esm2020/components/table/lib/table.component.mjs +86 -0
- package/esm2020/components/table/lib/table.config.mjs +3 -0
- package/esm2020/components/table/lib/table.module.mjs +21 -0
- package/esm2020/components/table/odx-angular-components-table.mjs +5 -0
- package/esm2020/components/wizard/index.mjs +4 -0
- package/esm2020/components/wizard/lib/components/index.mjs +2 -0
- package/esm2020/components/wizard/lib/components/wizard-step/wizard-step.component.mjs +73 -0
- package/esm2020/components/wizard/lib/wizard.component.mjs +155 -0
- package/esm2020/components/wizard/lib/wizard.module.mjs +19 -0
- package/esm2020/components/wizard/odx-angular-components-wizard.mjs +5 -0
- package/esm2020/lib/services/window-ref.mjs +4 -1
- package/fesm2015/odx-angular-cdk-autocomplete-control.mjs +164 -0
- package/fesm2015/odx-angular-cdk-autocomplete-control.mjs.map +1 -0
- package/fesm2015/odx-angular-cdk-option-control.mjs +55 -0
- package/fesm2015/odx-angular-cdk-option-control.mjs.map +1 -0
- package/fesm2015/odx-angular-components-autocomplete.mjs +263 -0
- package/fesm2015/odx-angular-components-autocomplete.mjs.map +1 -0
- package/fesm2015/odx-angular-components-card.mjs +1 -1
- package/fesm2015/odx-angular-components-card.mjs.map +1 -1
- package/fesm2015/odx-angular-components-chip.mjs +35 -5
- package/fesm2015/odx-angular-components-chip.mjs.map +1 -1
- package/fesm2015/odx-angular-components-dropdown.mjs +11 -3
- package/fesm2015/odx-angular-components-dropdown.mjs.map +1 -1
- package/fesm2015/odx-angular-components-form-field.mjs +5 -4
- package/fesm2015/odx-angular-components-form-field.mjs.map +1 -1
- package/fesm2015/odx-angular-components-main-menu.mjs +28 -14
- package/fesm2015/odx-angular-components-main-menu.mjs.map +1 -1
- package/fesm2015/odx-angular-components-menu.mjs +2 -2
- package/fesm2015/odx-angular-components-menu.mjs.map +1 -1
- package/fesm2015/odx-angular-components-select.mjs +80 -175
- package/fesm2015/odx-angular-components-select.mjs.map +1 -1
- package/fesm2015/odx-angular-components-table.mjs +264 -0
- package/fesm2015/odx-angular-components-table.mjs.map +1 -0
- package/fesm2015/odx-angular-components-wizard.mjs +242 -0
- package/fesm2015/odx-angular-components-wizard.mjs.map +1 -0
- package/fesm2015/odx-angular.mjs +3 -0
- package/fesm2015/odx-angular.mjs.map +1 -1
- package/fesm2020/odx-angular-cdk-autocomplete-control.mjs +160 -0
- package/fesm2020/odx-angular-cdk-autocomplete-control.mjs.map +1 -0
- package/fesm2020/odx-angular-cdk-option-control.mjs +54 -0
- package/fesm2020/odx-angular-cdk-option-control.mjs.map +1 -0
- package/fesm2020/odx-angular-components-autocomplete.mjs +254 -0
- package/fesm2020/odx-angular-components-autocomplete.mjs.map +1 -0
- package/fesm2020/odx-angular-components-card.mjs +1 -1
- package/fesm2020/odx-angular-components-card.mjs.map +1 -1
- package/fesm2020/odx-angular-components-chip.mjs +35 -5
- package/fesm2020/odx-angular-components-chip.mjs.map +1 -1
- package/fesm2020/odx-angular-components-dropdown.mjs +11 -3
- package/fesm2020/odx-angular-components-dropdown.mjs.map +1 -1
- package/fesm2020/odx-angular-components-form-field.mjs +5 -4
- package/fesm2020/odx-angular-components-form-field.mjs.map +1 -1
- package/fesm2020/odx-angular-components-main-menu.mjs +28 -14
- package/fesm2020/odx-angular-components-main-menu.mjs.map +1 -1
- package/fesm2020/odx-angular-components-menu.mjs +2 -2
- package/fesm2020/odx-angular-components-menu.mjs.map +1 -1
- package/fesm2020/odx-angular-components-select.mjs +77 -170
- package/fesm2020/odx-angular-components-select.mjs.map +1 -1
- package/fesm2020/odx-angular-components-table.mjs +259 -0
- package/fesm2020/odx-angular-components-table.mjs.map +1 -0
- package/fesm2020/odx-angular-components-wizard.mjs +239 -0
- package/fesm2020/odx-angular-components-wizard.mjs.map +1 -0
- package/fesm2020/odx-angular.mjs +3 -0
- package/fesm2020/odx-angular.mjs.map +1 -1
- package/lib/services/window-ref.d.ts +1 -0
- package/package.json +42 -2
- package/components/select/lib/abstract/index.d.ts +0 -2
- package/components/select/lib/abstract/select-control-option.d.ts +0 -9
- package/components/select/lib/abstract/select-control.d.ts +0 -12
- package/components/select/lib/components/option/option.component.d.ts +0 -26
- package/esm2020/components/select/lib/abstract/index.mjs +0 -3
- package/esm2020/components/select/lib/abstract/select-control-option.mjs +0 -2
- package/esm2020/components/select/lib/abstract/select-control.mjs +0 -2
- package/esm2020/components/select/lib/components/option/option.component.mjs +0 -95
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odx-angular-cdk-autocomplete-control.mjs","sources":["../../../../libs/angular/cdk/autocomplete-control/src/lib/abstract/base-search-field.directive.ts","../../../../libs/angular/cdk/autocomplete-control/src/lib/autocomplete-control.ts","../../../../libs/angular/cdk/autocomplete-control/src/lib/pipes/base-search-filter-pipe.ts","../../../../libs/angular/cdk/autocomplete-control/src/odx-angular-cdk-autocomplete-control.ts"],"sourcesContent":["import { Directive } from '@angular/core';\nimport { injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { distinctUntilChanged, fromEvent, map } from 'rxjs';\n\n@Directive({\n standalone: true,\n host: {\n '[class.odx-form-field-control]': 'true',\n },\n})\nexport abstract class BaseSearchFieldDirective {\n protected readonly takeUntilDestroyed = untilDestroyed();\n\n public readonly element = injectElement<HTMLInputElement>();\n\n public valueChange$ = fromEvent(this.element.nativeElement, 'input').pipe(\n distinctUntilChanged(),\n map(() => this.nativeElementValue),\n this.takeUntilDestroyed()\n );\n\n public get nativeElementValue(): string {\n return this.element.nativeElement.value;\n }\n\n public set nativeElementValue(value: string) {\n this.element.nativeElement.value = value;\n }\n\n public focus(): void {\n this.element.nativeElement.focus();\n }\n\n public blur(): void {\n this.element.nativeElement.blur();\n }\n\n public reset(): void {\n this.element.nativeElement.value = '';\n }\n}\n","import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { AfterViewInit, ChangeDetectorRef, Directive, EventEmitter, HostListener, inject, Input, Output, QueryList, ViewChild } from '@angular/core';\nimport { detectControllerChanges, StringifyFn } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { OptionControl } from '@odx/angular/cdk/option-control';\nimport { DropdownDirective } from '@odx/angular/components/dropdown';\nimport { injectElement, isFunction, Transform, untilDestroyed } from '@odx/angular/utils';\nimport { BaseSearchFieldDirective } from './abstract';\n\n@Directive({\n standalone: true,\n host: {\n '[class.is-open]': 'isOpen',\n '[attr.aria-disabled]': 'isDisabled || null',\n },\n})\nexport abstract class AutocompleteControl<T> extends CustomFormControl<T | null> implements AfterViewInit {\n public static ngAcceptInputType_isLoading: BooleanInput;\n\n protected keyManager?: ActiveDescendantKeyManager<OptionControl<T>>;\n\n protected smoothScrollEnabled = false;\n\n @ViewChild(DropdownDirective)\n protected readonly dropdown?: DropdownDirective;\n\n protected abstract readonly options?: QueryList<OptionControl<T>>;\n\n protected readonly takeUntilDestroyed = untilDestroyed();\n\n protected readonly changeDetector = inject(ChangeDetectorRef);\n\n public abstract searchField?: BaseSearchFieldDirective;\n\n public readonly element = injectElement();\n\n public get hasOptions(): boolean {\n return !!this.options?.length;\n }\n\n public get isOpen(): boolean {\n return !!this.dropdown?.isOpen;\n }\n\n @Transform(coerceBooleanProperty)\n @Input()\n public isLoading = false;\n\n @Input()\n public stringify?: StringifyFn<unknown>;\n\n @Output()\n public optionSelected = new EventEmitter<T>();\n\n constructor() {\n super(null);\n detectControllerChanges(this).subscribe();\n }\n\n public ngAfterViewInit(): void {\n if (!this.options) return;\n\n this.initKeyManager(this.options);\n this.handleQueryListOption(this.options);\n this.handleSearchFieldChanges();\n }\n\n public scrollOptionIntoView({ element }: OptionControl<T>): void {\n const behavior = this.smoothScrollEnabled ? 'smooth' : undefined;\n if (isFunction(element.nativeElement.scrollIntoView)) {\n element.nativeElement.scrollIntoView({ block: 'center', behavior });\n }\n }\n\n protected abstract handleQueryListOption(options: QueryList<OptionControl<T>>): void;\n\n protected abstract handleSearchFieldChanges(): void;\n\n protected abstract activateSelectedOption(): void;\n\n protected initKeyManager(options: QueryList<OptionControl<T>>): void {\n this.keyManager = new ActiveDescendantKeyManager(options).withHomeAndEnd();\n }\n\n protected disableSmoothScroll(): void {\n this.smoothScrollEnabled = false;\n }\n\n protected enableSmoothScroll(): void {\n this.smoothScrollEnabled = true;\n }\n\n protected openDropdown(): void {\n this.dropdown?.open();\n }\n\n protected closeDropdown(): void {\n this.dropdown?.close();\n }\n\n @HostListener('focusout', ['$event'])\n protected handleFocusOut(event: FocusEvent): void {\n if (this.isOpen) {\n event.stopImmediatePropagation();\n }\n this.onTouched();\n }\n}\n","import { inject } from '@angular/core';\nimport { ODX_STRINGIFY, ODX_STRING_SEARCH_HANDLER, StringifyFn, StringSearchHandler } from '@odx/angular';\nimport { Pure } from '@odx/angular/utils';\nimport { BaseSearchFieldDirective } from '../abstract';\n\nexport abstract class BaseSearchFilterPipe {\n private readonly stringSearchHandler = inject(ODX_STRING_SEARCH_HANDLER);\n protected readonly stringify = inject(ODX_STRINGIFY);\n\n public transform<T>(items: T[] | null, searchHandler?: StringSearchHandler): T[] | null {\n if (this.searchField) {\n return this.filter(items, this.searchField.nativeElementValue, searchHandler);\n }\n return items;\n }\n\n protected abstract get searchField(): BaseSearchFieldDirective | undefined;\n protected abstract get searchBy(): StringifyFn<unknown>;\n protected abstract queryHandler(query: string): string;\n\n @Pure\n private filter<T>(items: T[] | null, query: string, searchHandler?: StringSearchHandler): T[] | null {\n if (!items) return null;\n\n query = this.queryHandler(query);\n\n if (query === '') return items;\n\n const search = searchHandler ?? this.stringSearchHandler;\n\n return items.filter((item: T) => search(this.searchBy(item), query));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAUsB,wBAAwB,CAAA;AAN9C,IAAA,WAAA,GAAA;QAOqB,IAAkB,CAAA,kBAAA,GAAG,cAAc,EAAE,CAAC;QAEzC,IAAO,CAAA,OAAA,GAAG,aAAa,EAAoB,CAAC;AAErD,QAAA,IAAA,CAAA,YAAY,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CACvE,oBAAoB,EAAE,EACtB,GAAG,CAAC,MAAM,IAAI,CAAC,kBAAkB,CAAC,EAClC,IAAI,CAAC,kBAAkB,EAAE,CAC1B,CAAC;AAqBH,KAAA;AAnBC,IAAA,IAAW,kBAAkB,GAAA;AAC3B,QAAA,OAAO,IAAI,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+
import { untilDestroyed, injectElement } from '@odx/angular/utils';
|
|
4
|
+
|
|
5
|
+
class OptionControl {
|
|
6
|
+
constructor() {
|
|
7
|
+
this.takeUntilDestroyed = untilDestroyed();
|
|
8
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
9
|
+
this.isActive = false;
|
|
10
|
+
this.value = null;
|
|
11
|
+
this.element = injectElement();
|
|
12
|
+
}
|
|
13
|
+
setActiveStyles() {
|
|
14
|
+
this.isActive = true;
|
|
15
|
+
}
|
|
16
|
+
setInactiveStyles() {
|
|
17
|
+
this.isActive = false;
|
|
18
|
+
}
|
|
19
|
+
getLabel() {
|
|
20
|
+
return this.element.nativeElement.textContent?.trim() ?? '';
|
|
21
|
+
}
|
|
22
|
+
select(event) {
|
|
23
|
+
event.stopPropagation();
|
|
24
|
+
event.preventDefault();
|
|
25
|
+
this.selectOption();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
OptionControl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OptionControl, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
29
|
+
OptionControl.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: OptionControl, isStandalone: true, inputs: { value: "value" }, host: { attributes: { "role": "option" }, listeners: { "click": "select($event)" }, properties: { "class.odx-option": "true", "class.is-active": "isActive", "attr.aria-selected": "isSelected", "class.is-selected": "isSelected" } }, ngImport: i0 });
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: OptionControl, decorators: [{
|
|
31
|
+
type: Directive,
|
|
32
|
+
args: [{
|
|
33
|
+
standalone: true,
|
|
34
|
+
host: {
|
|
35
|
+
role: 'option',
|
|
36
|
+
'[class.odx-option]': 'true',
|
|
37
|
+
'[class.is-active]': 'isActive',
|
|
38
|
+
'[attr.aria-selected]': 'isSelected',
|
|
39
|
+
'[class.is-selected]': 'isSelected',
|
|
40
|
+
},
|
|
41
|
+
}]
|
|
42
|
+
}], propDecorators: { value: [{
|
|
43
|
+
type: Input
|
|
44
|
+
}], select: [{
|
|
45
|
+
type: HostListener,
|
|
46
|
+
args: ['click', ['$event']]
|
|
47
|
+
}] } });
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Generated bundle index. Do not edit.
|
|
51
|
+
*/
|
|
52
|
+
|
|
53
|
+
export { OptionControl };
|
|
54
|
+
//# sourceMappingURL=odx-angular-cdk-option-control.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odx-angular-cdk-option-control.mjs","sources":["../../../../libs/angular/cdk/option-control/src/lib/option-control.ts","../../../../libs/angular/cdk/option-control/src/odx-angular-cdk-option-control.ts"],"sourcesContent":["import { Highlightable } from '@angular/cdk/a11y';\nimport { ChangeDetectorRef, Directive, ElementRef, HostListener, inject, Input } from '@angular/core';\nimport { injectElement, untilDestroyed } from '@odx/angular/utils';\n\n@Directive({\n standalone: true,\n host: {\n role: 'option',\n '[class.odx-option]': 'true',\n '[class.is-active]': 'isActive',\n '[attr.aria-selected]': 'isSelected',\n '[class.is-selected]': 'isSelected',\n },\n})\nexport abstract class OptionControl<T> implements Highlightable {\n protected readonly takeUntilDestroyed = untilDestroyed();\n protected readonly cdr = inject(ChangeDetectorRef);\n\n protected isActive = false;\n\n @Input()\n public value: T | null = null;\n\n public readonly element: ElementRef<HTMLElement> = injectElement();\n\n public setActiveStyles(): void {\n this.isActive = true;\n }\n\n public setInactiveStyles(): void {\n this.isActive = false;\n }\n\n public getLabel(): string {\n return this.element.nativeElement.textContent?.trim() ?? '';\n }\n\n protected abstract selectOption(): void;\n\n @HostListener('click', ['$event'])\n protected select(event: Event): void {\n event.stopPropagation();\n event.preventDefault();\n\n this.selectOption();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;MAcsB,aAAa,CAAA;AAVnC,IAAA,WA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,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,QAAQ;AACd,wBAAA,oBAAoB,EAAE,MAAM;AAC5B,wBAAA,mBAAmB,EAAE,UAAU;AAC/B,wBAAA,sBAAsB,EAAE,YAAY;AACpC,wBAAA,qBAAqB,EAAE,YAAY;AACpC,qBAAA;AACF,iBAAA,CAAA;8BAQQ,KAAK,EAAA,CAAA;sBADX,KAAK;gBAoBI,MAAM,EAAA,CAAA;sBADf,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAA;;;ACvCnC;;AAEG;;;;"}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { __decorate } from 'tslib';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { InjectionToken, inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Directive, forwardRef, ContentChildren, ContentChild, HostListener, Pipe, NgModule } from '@angular/core';
|
|
4
|
+
import * as i1 from '@odx/angular';
|
|
5
|
+
import { CoreModule, ReadonlyController, WithTabIndex, ClickOutsideDirective } from '@odx/angular';
|
|
6
|
+
import { BaseSearchFieldDirective, AutocompleteControl, BaseSearchFilterPipe } from '@odx/angular/cdk/autocomplete-control';
|
|
7
|
+
import { DropdownDirective } from '@odx/angular/components/dropdown';
|
|
8
|
+
import { LoadingSpinnerModule } from '@odx/angular/components/loading-spinner';
|
|
9
|
+
import { CSSComponent } from '@odx/angular/internal';
|
|
10
|
+
import { fromQueryList } from '@odx/angular/rxjs';
|
|
11
|
+
import { deferFn } from '@odx/angular/utils';
|
|
12
|
+
import { OptionControl } from '@odx/angular/cdk/option-control';
|
|
13
|
+
import * as i2 from '@angular/common';
|
|
14
|
+
|
|
15
|
+
const AUTOCOMPLETE_CONTROL = new InjectionToken('@odx/angular/components/autocomplete::AutocompleteComponent');
|
|
16
|
+
|
|
17
|
+
let AutocompleteOptionComponent = class AutocompleteOptionComponent extends OptionControl {
|
|
18
|
+
constructor() {
|
|
19
|
+
super(...arguments);
|
|
20
|
+
this.autocompleteControl = inject(AUTOCOMPLETE_CONTROL);
|
|
21
|
+
}
|
|
22
|
+
setActiveStyles() {
|
|
23
|
+
this.isActive = true;
|
|
24
|
+
if (this.autocompleteControl.isOpen) {
|
|
25
|
+
this.autocompleteControl.scrollOptionIntoView(this);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
selectOption() {
|
|
29
|
+
this.autocompleteControl.selectOption(this);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
AutocompleteOptionComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutocompleteOptionComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
+
AutocompleteOptionComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AutocompleteOptionComponent, isStandalone: true, selector: "odx-autocomplete-option", usesInheritance: true, ngImport: i0, template: "<ng-content></ng-content>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
34
|
+
AutocompleteOptionComponent = __decorate([
|
|
35
|
+
CSSComponent('autocomplete-option')
|
|
36
|
+
], AutocompleteOptionComponent);
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutocompleteOptionComponent, decorators: [{
|
|
38
|
+
type: Component,
|
|
39
|
+
args: [{ standalone: true, selector: 'odx-autocomplete-option', imports: [CoreModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content></ng-content>\n" }]
|
|
40
|
+
}] });
|
|
41
|
+
|
|
42
|
+
class AutocompleteSearchFieldDirective extends BaseSearchFieldDirective {
|
|
43
|
+
constructor() {
|
|
44
|
+
super(...arguments);
|
|
45
|
+
this.readonlyController = ReadonlyController.inject();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
AutocompleteSearchFieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutocompleteSearchFieldDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
49
|
+
AutocompleteSearchFieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: AutocompleteSearchFieldDirective, isStandalone: true, selector: "input[odxAutocompleteControl]", host: { properties: { "attr.readonly": "readonlyController?.readonly || null" } }, providers: [ReadonlyController.connect()], usesInheritance: true, hostDirectives: [{ directive: i1.WithTabIndex }], ngImport: i0 });
|
|
50
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutocompleteSearchFieldDirective, decorators: [{
|
|
51
|
+
type: Directive,
|
|
52
|
+
args: [{
|
|
53
|
+
standalone: true,
|
|
54
|
+
selector: 'input[odxAutocompleteControl]',
|
|
55
|
+
host: {
|
|
56
|
+
'[attr.readonly]': 'readonlyController?.readonly || null',
|
|
57
|
+
},
|
|
58
|
+
providers: [ReadonlyController.connect()],
|
|
59
|
+
hostDirectives: [WithTabIndex],
|
|
60
|
+
}]
|
|
61
|
+
}] });
|
|
62
|
+
|
|
63
|
+
var AutocompleteComponent_1;
|
|
64
|
+
let AutocompleteComponent = AutocompleteComponent_1 = class AutocompleteComponent extends AutocompleteControl {
|
|
65
|
+
constructor() {
|
|
66
|
+
super(...arguments);
|
|
67
|
+
this.defaultActiveOptionIndex = 0;
|
|
68
|
+
this.clickOutsideDirective = inject(ClickOutsideDirective, { host: true });
|
|
69
|
+
this.dropdownOpenTriggers = [];
|
|
70
|
+
}
|
|
71
|
+
ngAfterViewInit() {
|
|
72
|
+
if (!this.options)
|
|
73
|
+
return;
|
|
74
|
+
this.initKeyManager(this.options);
|
|
75
|
+
this.handleQueryListOption(this.options);
|
|
76
|
+
this.handleSearchFieldChanges();
|
|
77
|
+
this.handleClickOutside();
|
|
78
|
+
}
|
|
79
|
+
selectOption(option) {
|
|
80
|
+
if (!option?.value)
|
|
81
|
+
return;
|
|
82
|
+
this.updateValue(option.value);
|
|
83
|
+
this.updateSearchField(option.value);
|
|
84
|
+
this.optionSelected.emit(option.value);
|
|
85
|
+
this.closeDropdown();
|
|
86
|
+
}
|
|
87
|
+
resetSearchField() {
|
|
88
|
+
this.updateValue('');
|
|
89
|
+
this.searchField?.reset();
|
|
90
|
+
}
|
|
91
|
+
handleQueryListOption(options) {
|
|
92
|
+
fromQueryList(options)
|
|
93
|
+
.pipe(this.takeUntilDestroyed())
|
|
94
|
+
.subscribe(() => {
|
|
95
|
+
if (this.isOpen) {
|
|
96
|
+
deferFn(() => this.activateSelectedOption());
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
handleSearchFieldChanges() {
|
|
101
|
+
this.searchField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe(() => {
|
|
102
|
+
this.triggerControllerChange();
|
|
103
|
+
deferFn(() => this.handleSearchFieldValueChange());
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
handleClickOutside() {
|
|
107
|
+
this.clickOutsideDirective.odxClickOutside.pipe(this.takeUntilDestroyed()).subscribe(() => this.clickOutside());
|
|
108
|
+
}
|
|
109
|
+
clickOutside() {
|
|
110
|
+
this.closeDropdown();
|
|
111
|
+
this.blurSelectSearchField();
|
|
112
|
+
}
|
|
113
|
+
handleSearchFieldValueChange() {
|
|
114
|
+
this.updateValue((this.searchField?.nativeElementValue ?? ''));
|
|
115
|
+
if (this.isOpen && !this.hasOptions) {
|
|
116
|
+
this.closeDropdown();
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (this.isOpen && this.hasOptions) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (!this.isOpen && this.hasOptions) {
|
|
123
|
+
this.openDropdown();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
handleClickEvent() {
|
|
127
|
+
if (this.isLoading && this.isOpen) {
|
|
128
|
+
this.closeDropdown();
|
|
129
|
+
this.blurSelectSearchField();
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (this.isReadonly || this.isDisabled)
|
|
133
|
+
return;
|
|
134
|
+
if (!this.isOpen && this.hasOptions) {
|
|
135
|
+
this.openDropdown();
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
handleKeyboardEvent(event) {
|
|
139
|
+
if (this.isReadonly || this.isDisabled)
|
|
140
|
+
return;
|
|
141
|
+
if (this.isOpen && this.hasOptions) {
|
|
142
|
+
if (event.key === 'Enter' || event.key === 'Tab') {
|
|
143
|
+
event.preventDefault();
|
|
144
|
+
event.stopImmediatePropagation();
|
|
145
|
+
this.selectOption(this.keyManager?.activeItem);
|
|
146
|
+
return;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
if (event.key === 'Enter') {
|
|
150
|
+
this.optionSelected.emit((this.value ?? ''));
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
if (!this.isOpen && event.key === 'Tab') {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
if (!this.isOpen && this.hasOptions) {
|
|
157
|
+
this.openDropdown();
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
this.keyManager?.onKeydown(event);
|
|
161
|
+
}
|
|
162
|
+
activateSelectedOption() {
|
|
163
|
+
this.keyManager?.setActiveItem(this.defaultActiveOptionIndex);
|
|
164
|
+
}
|
|
165
|
+
onDropdownBeforeOpen() {
|
|
166
|
+
this.activateSelectedOption();
|
|
167
|
+
}
|
|
168
|
+
updateSearchField(value) {
|
|
169
|
+
if (!this.searchField)
|
|
170
|
+
return;
|
|
171
|
+
this.searchField.nativeElementValue = this.stringify?.(value) ?? value;
|
|
172
|
+
}
|
|
173
|
+
blurSelectSearchField() {
|
|
174
|
+
this.searchField?.blur();
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
AutocompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutocompleteComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
178
|
+
AutocompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: AutocompleteComponent, isStandalone: true, selector: "odx-autocomplete", host: { listeners: { "click": "handleClickEvent()", "keydown": "handleKeyboardEvent($event)" } }, providers: [
|
|
179
|
+
{
|
|
180
|
+
provide: AUTOCOMPLETE_CONTROL,
|
|
181
|
+
useExisting: forwardRef(() => AutocompleteComponent_1),
|
|
182
|
+
},
|
|
183
|
+
], queries: [{ propertyName: "searchField", first: true, predicate: AutocompleteSearchFieldDirective, descendants: true }, { propertyName: "options", predicate: AutocompleteOptionComponent, descendants: true }], usesInheritance: true, hostDirectives: [{ directive: i1.ClickOutsideDirective }], ngImport: i0, template: "<div\n aria-haspopup=\"listbox\"\n class=\"odx-autocomplete__trigger\"\n [odxDropdown]=\"dropdownContent\"\n [odxDropdownDisabled]=\"isDisabled || isReadonly\"\n [odxDropdownOptions]=\"{ matchReferenceWidth: true, offset: 4, outerPadding: 10, position: 'bottom-start' }\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n [odxDropdownShowLoader]=\"isLoading\"\n [odxDropdownOpenTrigger]=\"dropdownOpenTriggers\"\n [odxDropdownClickOutsideActive]=\"false\"\n (odxDropdownBeforeOpen)=\"onDropdownBeforeOpen()\"\n (odxDropdownAfterOpen)=\"enableSmoothScroll()\"\n (odxDropdownBeforeClose)=\"disableSmoothScroll()\"\n>\n <ng-content select=\"input[odxAutocompleteControl]\"></ng-content>\n</div>\n\n<ng-template #dropdownContent>\n <div class=\"odx-dropdown__option-list\" role=\"listbox\">\n <ng-template [ngIf]=\"hasOptions\">\n <ng-content></ng-content>\n </ng-template>\n </div>\n</ng-template>\n", dependencies: [{ kind: "directive", type: DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownClickOutsideActive", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "ngmodule", type: LoadingSpinnerModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
184
|
+
AutocompleteComponent = AutocompleteComponent_1 = __decorate([
|
|
185
|
+
CSSComponent('autocomplete')
|
|
186
|
+
], AutocompleteComponent);
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
188
|
+
type: Component,
|
|
189
|
+
args: [{ standalone: true, selector: 'odx-autocomplete', imports: [DropdownDirective, AutocompleteOptionComponent, LoadingSpinnerModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
190
|
+
{
|
|
191
|
+
provide: AUTOCOMPLETE_CONTROL,
|
|
192
|
+
useExisting: forwardRef(() => AutocompleteComponent),
|
|
193
|
+
},
|
|
194
|
+
], hostDirectives: [ClickOutsideDirective], template: "<div\n aria-haspopup=\"listbox\"\n class=\"odx-autocomplete__trigger\"\n [odxDropdown]=\"dropdownContent\"\n [odxDropdownDisabled]=\"isDisabled || isReadonly\"\n [odxDropdownOptions]=\"{ matchReferenceWidth: true, offset: 4, outerPadding: 10, position: 'bottom-start' }\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n [odxDropdownShowLoader]=\"isLoading\"\n [odxDropdownOpenTrigger]=\"dropdownOpenTriggers\"\n [odxDropdownClickOutsideActive]=\"false\"\n (odxDropdownBeforeOpen)=\"onDropdownBeforeOpen()\"\n (odxDropdownAfterOpen)=\"enableSmoothScroll()\"\n (odxDropdownBeforeClose)=\"disableSmoothScroll()\"\n>\n <ng-content select=\"input[odxAutocompleteControl]\"></ng-content>\n</div>\n\n<ng-template #dropdownContent>\n <div class=\"odx-dropdown__option-list\" role=\"listbox\">\n <ng-template [ngIf]=\"hasOptions\">\n <ng-content></ng-content>\n </ng-template>\n </div>\n</ng-template>\n" }]
|
|
195
|
+
}], propDecorators: { options: [{
|
|
196
|
+
type: ContentChildren,
|
|
197
|
+
args: [AutocompleteOptionComponent, { descendants: true, emitDistinctChangesOnly: true }]
|
|
198
|
+
}], searchField: [{
|
|
199
|
+
type: ContentChild,
|
|
200
|
+
args: [AutocompleteSearchFieldDirective]
|
|
201
|
+
}], handleClickEvent: [{
|
|
202
|
+
type: HostListener,
|
|
203
|
+
args: ['click']
|
|
204
|
+
}], handleKeyboardEvent: [{
|
|
205
|
+
type: HostListener,
|
|
206
|
+
args: ['keydown', ['$event']]
|
|
207
|
+
}] } });
|
|
208
|
+
|
|
209
|
+
class AutocompleteSearchFilterPipe extends BaseSearchFilterPipe {
|
|
210
|
+
constructor() {
|
|
211
|
+
super(...arguments);
|
|
212
|
+
this.hostController = inject(AUTOCOMPLETE_CONTROL, { optional: true });
|
|
213
|
+
}
|
|
214
|
+
get searchField() {
|
|
215
|
+
return this.hostController?.searchField;
|
|
216
|
+
}
|
|
217
|
+
queryHandler(query) {
|
|
218
|
+
return query?.trim() || '';
|
|
219
|
+
}
|
|
220
|
+
get searchBy() {
|
|
221
|
+
return this.hostController?.stringify ?? this.stringify;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
AutocompleteSearchFilterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutocompleteSearchFilterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe });
|
|
225
|
+
AutocompleteSearchFilterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: AutocompleteSearchFilterPipe, isStandalone: true, name: "odxAutocompleteSearchFilter", pure: false });
|
|
226
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutocompleteSearchFilterPipe, decorators: [{
|
|
227
|
+
type: Pipe,
|
|
228
|
+
args: [{
|
|
229
|
+
pure: false,
|
|
230
|
+
name: 'odxAutocompleteSearchFilter',
|
|
231
|
+
standalone: true,
|
|
232
|
+
}]
|
|
233
|
+
}] });
|
|
234
|
+
|
|
235
|
+
const modules = [AutocompleteComponent, AutocompleteSearchFieldDirective, AutocompleteSearchFilterPipe, AutocompleteOptionComponent];
|
|
236
|
+
class AutocompleteModule {
|
|
237
|
+
}
|
|
238
|
+
AutocompleteModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutocompleteModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
239
|
+
AutocompleteModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: AutocompleteModule, imports: [AutocompleteComponent, AutocompleteSearchFieldDirective, AutocompleteSearchFilterPipe, AutocompleteOptionComponent], exports: [CoreModule, AutocompleteComponent, AutocompleteSearchFieldDirective, AutocompleteSearchFilterPipe, AutocompleteOptionComponent] });
|
|
240
|
+
AutocompleteModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutocompleteModule, imports: [AutocompleteComponent, AutocompleteOptionComponent, CoreModule] });
|
|
241
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: AutocompleteModule, decorators: [{
|
|
242
|
+
type: NgModule,
|
|
243
|
+
args: [{
|
|
244
|
+
imports: modules,
|
|
245
|
+
exports: [CoreModule, ...modules],
|
|
246
|
+
}]
|
|
247
|
+
}] });
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Generated bundle index. Do not edit.
|
|
251
|
+
*/
|
|
252
|
+
|
|
253
|
+
export { AUTOCOMPLETE_CONTROL, AutocompleteComponent, AutocompleteModule, AutocompleteOptionComponent, AutocompleteSearchFieldDirective, AutocompleteSearchFilterPipe };
|
|
254
|
+
//# sourceMappingURL=odx-angular-components-autocomplete.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"odx-angular-components-autocomplete.mjs","sources":["../../../../libs/angular/components/autocomplete/src/lib/autocomplete.tokens.ts","../../../../libs/angular/components/autocomplete/src/lib/components/option/autocomplete-option.component.ts","../../../../libs/angular/components/autocomplete/src/lib/components/option/autocomplete-option.component.html","../../../../libs/angular/components/autocomplete/src/lib/directives/autocomplete-search-field.directive.ts","../../../../libs/angular/components/autocomplete/src/lib/autocomplete.component.ts","../../../../libs/angular/components/autocomplete/src/lib/autocomplete.component.html","../../../../libs/angular/components/autocomplete/src/lib/pipes/autocomplete-search-filter.pipe.ts","../../../../libs/angular/components/autocomplete/src/lib/autocomplete.module.ts","../../../../libs/angular/components/autocomplete/src/odx-angular-components-autocomplete.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\nimport { AutocompleteComponent } from './autocomplete.component';\n\nexport const AUTOCOMPLETE_CONTROL = new InjectionToken<AutocompleteComponent>('@odx/angular/components/autocomplete::AutocompleteComponent');\n","import { ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { OptionControl } from '@odx/angular/cdk/option-control';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { AUTOCOMPLETE_CONTROL } from '../../autocomplete.tokens';\n\n@CSSComponent('autocomplete-option')\n@Component({\n standalone: true,\n selector: 'odx-autocomplete-option',\n imports: [CoreModule],\n templateUrl: './autocomplete-option.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class AutocompleteOptionComponent<T> extends OptionControl<T> {\n protected readonly autocompleteControl = inject(AUTOCOMPLETE_CONTROL);\n\n public override setActiveStyles(): void {\n this.isActive = true;\n\n if (this.autocompleteControl.isOpen) {\n this.autocompleteControl.scrollOptionIntoView(this);\n }\n }\n\n protected selectOption(): void {\n this.autocompleteControl.selectOption(this);\n }\n}\n","<ng-content></ng-content>\n","import { Directive } from '@angular/core';\nimport { ReadonlyController, WithTabIndex } from '@odx/angular';\nimport { BaseSearchFieldDirective } from '@odx/angular/cdk/autocomplete-control';\n\n@Directive({\n standalone: true,\n selector: 'input[odxAutocompleteControl]',\n host: {\n '[attr.readonly]': 'readonlyController?.readonly || null',\n },\n providers: [ReadonlyController.connect()],\n hostDirectives: [WithTabIndex],\n})\nexport class AutocompleteSearchFieldDirective extends BaseSearchFieldDirective {\n protected readonly readonlyController = ReadonlyController.inject();\n}\n","import {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ContentChildren,\n forwardRef,\n HostListener,\n inject,\n QueryList,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ClickOutsideDirective } from '@odx/angular';\nimport { AutocompleteControl } from '@odx/angular/cdk/autocomplete-control';\nimport { DropdownDirective } from '@odx/angular/components/dropdown';\nimport { LoadingSpinnerModule } from '@odx/angular/components/loading-spinner';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { fromQueryList } from '@odx/angular/rxjs';\nimport { deferFn } from '@odx/angular/utils';\nimport { AUTOCOMPLETE_CONTROL } from './autocomplete.tokens';\nimport { AutocompleteOptionComponent } from './components';\nimport { AutocompleteSearchFieldDirective } from './directives';\n\n@CSSComponent('autocomplete')\n@Component({\n standalone: true,\n selector: 'odx-autocomplete',\n imports: [DropdownDirective, AutocompleteOptionComponent, LoadingSpinnerModule],\n templateUrl: './autocomplete.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: AUTOCOMPLETE_CONTROL,\n useExisting: forwardRef(() => AutocompleteComponent),\n },\n ],\n hostDirectives: [ClickOutsideDirective],\n})\nexport class AutocompleteComponent<T = unknown> extends AutocompleteControl<T | null> implements AfterViewInit {\n private readonly defaultActiveOptionIndex = 0;\n\n protected readonly clickOutsideDirective = inject(ClickOutsideDirective, { host: true });\n\n @ContentChildren(AutocompleteOptionComponent, { descendants: true, emitDistinctChangesOnly: true })\n public options?: QueryList<AutocompleteOptionComponent<T>>;\n\n @ContentChild(AutocompleteSearchFieldDirective)\n public searchField?: AutocompleteSearchFieldDirective;\n\n public readonly dropdownOpenTriggers = [];\n\n public override ngAfterViewInit(): void {\n if (!this.options) return;\n\n this.initKeyManager(this.options);\n this.handleQueryListOption(this.options);\n this.handleSearchFieldChanges();\n this.handleClickOutside();\n }\n\n public selectOption(option?: AutocompleteOptionComponent<T> | null): void {\n if (!option?.value) return;\n\n this.updateValue(option.value);\n this.updateSearchField(option.value);\n\n this.optionSelected.emit(option.value);\n\n this.closeDropdown();\n }\n\n public resetSearchField(): void {\n this.updateValue('' as T);\n this.searchField?.reset();\n }\n\n protected handleQueryListOption(options: QueryList<AutocompleteOptionComponent<T>>): void {\n fromQueryList(options)\n .pipe(this.takeUntilDestroyed())\n .subscribe(() => {\n if (this.isOpen) {\n deferFn(() => this.activateSelectedOption());\n }\n });\n }\n\n protected handleSearchFieldChanges(): void {\n this.searchField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe(() => {\n this.triggerControllerChange();\n deferFn(() => this.handleSearchFieldValueChange());\n });\n }\n\n protected handleClickOutside(): void {\n this.clickOutsideDirective.odxClickOutside.pipe(this.takeUntilDestroyed()).subscribe(() => this.clickOutside());\n }\n\n protected clickOutside(): void {\n this.closeDropdown();\n this.blurSelectSearchField();\n }\n\n protected handleSearchFieldValueChange(): void {\n this.updateValue((this.searchField?.nativeElementValue ?? '') as T);\n\n if (this.isOpen && !this.hasOptions) {\n this.closeDropdown();\n return;\n }\n\n if (this.isOpen && this.hasOptions) {\n return;\n }\n\n if (!this.isOpen && this.hasOptions) {\n this.openDropdown();\n }\n }\n\n @HostListener('click')\n protected handleClickEvent() {\n if (this.isLoading && this.isOpen) {\n this.closeDropdown();\n this.blurSelectSearchField();\n return;\n }\n\n if (this.isReadonly || this.isDisabled) return;\n\n if (!this.isOpen && this.hasOptions) {\n this.openDropdown();\n }\n }\n\n @HostListener('keydown', ['$event'])\n protected handleKeyboardEvent(event: KeyboardEvent) {\n if (this.isReadonly || this.isDisabled) return;\n\n if (this.isOpen && this.hasOptions) {\n if (event.key === 'Enter' || event.key === 'Tab') {\n event.preventDefault();\n event.stopImmediatePropagation();\n this.selectOption(this.keyManager?.activeItem as AutocompleteOptionComponent<T> | undefined);\n return;\n }\n }\n\n if (event.key === 'Enter') {\n this.optionSelected.emit((this.value ?? '') as T);\n return;\n }\n\n if (!this.isOpen && event.key === 'Tab') {\n return;\n }\n\n if (!this.isOpen && this.hasOptions) {\n this.openDropdown();\n return;\n }\n\n this.keyManager?.onKeydown(event);\n }\n\n protected activateSelectedOption(): void {\n this.keyManager?.setActiveItem(this.defaultActiveOptionIndex);\n }\n\n protected onDropdownBeforeOpen(): void {\n this.activateSelectedOption();\n }\n\n private updateSearchField(value: T): void {\n if (!this.searchField) return;\n\n this.searchField.nativeElementValue = this.stringify?.(value) ?? (value as string);\n }\n\n private blurSelectSearchField(): void {\n this.searchField?.blur();\n }\n}\n","<div\n aria-haspopup=\"listbox\"\n class=\"odx-autocomplete__trigger\"\n [odxDropdown]=\"dropdownContent\"\n [odxDropdownDisabled]=\"isDisabled || isReadonly\"\n [odxDropdownOptions]=\"{ matchReferenceWidth: true, offset: 4, outerPadding: 10, position: 'bottom-start' }\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n [odxDropdownShowLoader]=\"isLoading\"\n [odxDropdownOpenTrigger]=\"dropdownOpenTriggers\"\n [odxDropdownClickOutsideActive]=\"false\"\n (odxDropdownBeforeOpen)=\"onDropdownBeforeOpen()\"\n (odxDropdownAfterOpen)=\"enableSmoothScroll()\"\n (odxDropdownBeforeClose)=\"disableSmoothScroll()\"\n>\n <ng-content select=\"input[odxAutocompleteControl]\"></ng-content>\n</div>\n\n<ng-template #dropdownContent>\n <div class=\"odx-dropdown__option-list\" role=\"listbox\">\n <ng-template [ngIf]=\"hasOptions\">\n <ng-content></ng-content>\n </ng-template>\n </div>\n</ng-template>\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { StringifyFn } from '@odx/angular';\nimport { BaseSearchFieldDirective, BaseSearchFilterPipe } from '@odx/angular/cdk/autocomplete-control';\nimport { AUTOCOMPLETE_CONTROL } from '../autocomplete.tokens';\n\n@Pipe({\n pure: false,\n name: 'odxAutocompleteSearchFilter',\n standalone: true,\n})\nexport class AutocompleteSearchFilterPipe extends BaseSearchFilterPipe implements PipeTransform {\n protected readonly hostController = inject(AUTOCOMPLETE_CONTROL, { optional: true });\n\n protected get searchField(): BaseSearchFieldDirective | undefined {\n return this.hostController?.searchField;\n }\n\n protected queryHandler(query: string): string {\n return query?.trim() || '';\n }\n\n protected get searchBy(): StringifyFn<unknown> {\n return this.hostController?.stringify ?? this.stringify;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { AutocompleteComponent } from './autocomplete.component';\nimport { AutocompleteOptionComponent } from './components';\nimport { AutocompleteSearchFieldDirective } from './directives';\nimport { AutocompleteSearchFilterPipe } from './pipes';\n\nconst modules = [AutocompleteComponent, AutocompleteSearchFieldDirective, AutocompleteSearchFilterPipe, AutocompleteOptionComponent];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class AutocompleteModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAGa,oBAAoB,GAAG,IAAI,cAAc,CAAwB,6DAA6D;;ACYpI,I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AgC,EAAE,4BAA4B,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA;AAMtH,kBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,EANd,OAAA,EAAA,CAAA,qBAAqB,EAAkE,2BAA2B,EAIvH,UAAU,CAAA,EAAA,CAAA,CAAA;2FAET,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;AAClC,iBAAA,CAAA;;;ACZD;;AAEG;;;;"}
|
|
@@ -66,7 +66,7 @@ let CardComponent = class CardComponent {
|
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
CardComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: CardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
69
|
-
CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CardComponent, isStandalone: true, selector: "odx-card", inputs: { variant: "variant" }, outputs: { interact: "interact" }, queries: [{ propertyName: "menu", first: true, predicate: MenuComponent, descendants: true }, { propertyName: "footer", first: true, predicate: CardFooterComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "menuHost", first: true, predicate: MenuDirective, descendants: true }], hostDirectives: [{ directive: i1.InteractiveDirective }], ngImport: i0, template: "<div class=\"odx-card__container\">\n <ng-container *ngIf=\"launchTile; else card\">\n <ng-content select=\"odx-avatar\"></ng-content>\n <div class=\"odx-card__content\">\n <div class=\"odx-card__title\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </div>\n <ng-content select=\"odx-launch-card-subtitle\"></ng-content>\n </div>\n </ng-container>\n\n <ng-template #card>\n <div class=\"odx-card__title\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </div>\n <ng-content select=\"[odxCardContent]\"></ng-content>\n </ng-template>\n</div>\n\n<ng-content select=\"odx-card-footer\"></ng-content>\n\n<odx-action-group class=\"odx-card-menu\" *ngIf=\"menu\">\n <button odxButton [odxMenu]=\"menuTpl\" odxMenuPosition=\"bottom-end\">\n <odx-icon name=\"more\" iconSet=\"core\"></odx-icon>\n </button>\n\n <ng-template #menuTpl>\n <ng-content select=\"odx-menu\"></ng-content>\n </ng-template>\n</odx-action-group>\n\n<ng-template #title>\n <ng-content></ng-content>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "ngmodule", type: MenuModule }, { kind: "directive", type: i3.MenuDirective, selector: "[odxMenu]", inputs: ["odxMenu", "odxMenuPosition"], exportAs: ["odxMenu"] }, { kind: "
|
|
69
|
+
CardComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: CardComponent, isStandalone: true, selector: "odx-card", inputs: { variant: "variant" }, outputs: { interact: "interact" }, queries: [{ propertyName: "menu", first: true, predicate: MenuComponent, descendants: true }, { propertyName: "footer", first: true, predicate: CardFooterComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "menuHost", first: true, predicate: MenuDirective, descendants: true }], hostDirectives: [{ directive: i1.InteractiveDirective }], ngImport: i0, template: "<div class=\"odx-card__container\">\n <ng-container *ngIf=\"launchTile; else card\">\n <ng-content select=\"odx-avatar\"></ng-content>\n <div class=\"odx-card__content\">\n <div class=\"odx-card__title\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </div>\n <ng-content select=\"odx-launch-card-subtitle\"></ng-content>\n </div>\n </ng-container>\n\n <ng-template #card>\n <div class=\"odx-card__title\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </div>\n <ng-content select=\"[odxCardContent]\"></ng-content>\n </ng-template>\n</div>\n\n<ng-content select=\"odx-card-footer\"></ng-content>\n\n<odx-action-group class=\"odx-card-menu\" *ngIf=\"menu\">\n <button odxButton [odxMenu]=\"menuTpl\" odxMenuPosition=\"bottom-end\">\n <odx-icon name=\"more\" iconSet=\"core\"></odx-icon>\n </button>\n\n <ng-template #menuTpl>\n <ng-content select=\"odx-menu\"></ng-content>\n </ng-template>\n</odx-action-group>\n\n<ng-template #title>\n <ng-content></ng-content>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "ngmodule", type: MenuModule }, { kind: "directive", type: i3.MenuDirective, selector: "[odxMenu]", inputs: ["odxMenu", "odxMenuPosition"], exportAs: ["odxMenu"] }, { kind: "component", type: ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
70
70
|
__decorate([
|
|
71
71
|
CSSModifier(),
|
|
72
72
|
__metadata("design:type", String)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-card.mjs","sources":["../../../../libs/angular/components/card/src/lib/components/card-footer/card-footer.component.ts","../../../../libs/angular/components/card/src/lib/components/card-footer/card-footer.component.html","../../../../libs/angular/components/card/src/lib/components/launch-card-subtitle/launch-card-subtitle.component.ts","../../../../libs/angular/components/card/src/lib/components/launch-card-subtitle/launch-card-subtitle.component.html","../../../../libs/angular/components/card/src/lib/models/card-variant.ts","../../../../libs/angular/components/card/src/lib/card.component.ts","../../../../libs/angular/components/card/src/lib/card.component.html","../../../../libs/angular/components/card/src/lib/directives/card-content.directive.ts","../../../../libs/angular/components/card/src/lib/directives/card-title.directive.ts","../../../../libs/angular/components/card/src/lib/card.module.ts","../../../../libs/angular/components/card/src/odx-angular-components-card.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'odx-card-footer',\n templateUrl: './card-footer.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class.odx-card__footer]': 'true',\n },\n})\nexport class CardFooterComponent {}\n","<ng-content></ng-content>\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'odx-launch-card-subtitle',\n templateUrl: './launch-card-subtitle.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class.odx-card__subtitle]': 'true',\n },\n})\nexport class LaunchCardSubtitleComponent {}\n","<ng-content></ng-content>\n","export type CardVariant = (typeof CardVariant)[keyof typeof CardVariant];\n\nexport const CardVariant = {\n DEFAULT: 'default',\n LAUNCH_TILE: 'launch-tile',\n LAUNCH_TILE_CENTERED: 'launch-tile-centered',\n} as const;\n","import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, inject, Input, Output, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { A11yModule, InteractiveDirective } from '@odx/angular/cdk/a11y';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { MenuComponent, MenuDirective, MenuModule } from '@odx/angular/components/menu';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { containsElement, injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { CardFooterComponent } from './components';\nimport { CardVariant } from './models';\n\n@CSSComponent('card')\n@Component({\n selector: 'odx-card',\n templateUrl: './card.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [A11yModule, ButtonComponent, IconComponent, MenuModule, ActionGroupComponent],\n hostDirectives: [InteractiveDirective],\n})\nexport class CardComponent {\n private readonly interactiveDirective = inject(InteractiveDirective, { host: true });\n private readonly takeUntilDestroyed = untilDestroyed();\n\n @ContentChild(MenuComponent)\n protected readonly menu?: MenuComponent;\n\n @ViewChild(MenuDirective)\n protected readonly menuHost?: MenuDirective;\n\n @ContentChild(CardFooterComponent, { read: ElementRef })\n protected readonly footer?: ElementRef<HTMLElement>;\n\n public readonly element = injectElement();\n\n @CSSModifier()\n @Input()\n public variant?: CardVariant = CardVariant.DEFAULT;\n\n @Output()\n public interact = new EventEmitter<Event>();\n\n constructor() {\n this.interactiveDirective.interact.pipe(this.takeUntilDestroyed()).subscribe((event) => {\n this.stopEvents(event);\n });\n }\n\n public get launchTile(): boolean {\n return this.variant !== CardVariant.DEFAULT;\n }\n\n public stopEvents(event: Event): void {\n const target = event.target as Element | null;\n const isFooterEvent = containsElement(this.footer?.nativeElement, target, false);\n const isMenuEvent = containsElement(this.menuHost?.element.nativeElement, target);\n if (!isFooterEvent && !isMenuEvent && !this.menuHost?.isOpen()) {\n this.interact.emit(event);\n }\n }\n}\n","<div class=\"odx-card__container\">\n <ng-container *ngIf=\"launchTile; else card\">\n <ng-content select=\"odx-avatar\"></ng-content>\n <div class=\"odx-card__content\">\n <div class=\"odx-card__title\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </div>\n <ng-content select=\"odx-launch-card-subtitle\"></ng-content>\n </div>\n </ng-container>\n\n <ng-template #card>\n <div class=\"odx-card__title\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </div>\n <ng-content select=\"[odxCardContent]\"></ng-content>\n </ng-template>\n</div>\n\n<ng-content select=\"odx-card-footer\"></ng-content>\n\n<odx-action-group class=\"odx-card-menu\" *ngIf=\"menu\">\n <button odxButton [odxMenu]=\"menuTpl\" odxMenuPosition=\"bottom-end\">\n <odx-icon name=\"more\" iconSet=\"core\"></odx-icon>\n </button>\n\n <ng-template #menuTpl>\n <ng-content select=\"odx-menu\"></ng-content>\n </ng-template>\n</odx-action-group>\n\n<ng-template #title>\n <ng-content></ng-content>\n</ng-template>\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[odxCardContent]',\n standalone: true,\n host: {\n '[class.odx-card__content]': 'true',\n },\n})\nexport class CardContentDirective {}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[odxCardTitle]',\n standalone: true,\n host: {\n '[class.odx-card-title]': 'true',\n },\n})\nexport class CardTitleDirective {}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { AvatarComponent } from '@odx/angular/components/avatar';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { MenuModule } from '@odx/angular/components/menu';\nimport { CardComponent } from './card.component';\nimport { CardFooterComponent, LaunchCardSubtitleComponent } from './components';\nimport { CardContentDirective } from './directives/card-content.directive';\nimport { CardTitleDirective } from './directives/card-title.directive';\n\nconst modules = [\n CardComponent,\n CardTitleDirective,\n CardContentDirective,\n CardFooterComponent,\n LaunchCardSubtitleComponent,\n AvatarComponent,\n ButtonComponent,\n IconComponent,\n];\n\n@NgModule({\n imports: [modules],\n exports: [CoreModule, MenuModule, ...modules],\n})\nexport class CardModule {}\n","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V,UAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,YAdrB,aAAa;QACb,kBAAkB;QAClB,oBAAoB;QACpB,mBAAmB;QACnB,2BAA2B;QAC3B,eAAe;QACf,eAAe;AACf,QAAA,aAAa,CAKH,EAAA,OAAA,EAAA,CAAA,UAAU,EAAE,UAAU,EAZhC,aAAa;QACb,kBAAkB;QAClB,oBAAoB;QACpB,mBAAmB;QACnB,2BAA2B;QAC3B,eAAe;QACf,eAAe;QACf,aAAa,CAAA,EAAA,CAAA,CAAA;AAOF,UAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,YAdrB,aAAa;QAGb,mBAAmB;QACnB,2BAA2B;QAC3B,eAAe;QACf,eAAe;QACf,aAAa,EAKH,UAAU,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;2FAErB,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,OAAO,CAAC;oBAClB,OAAO,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;AAC9C,iBAAA,CAAA;;;ACzBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"odx-angular-components-card.mjs","sources":["../../../../libs/angular/components/card/src/lib/components/card-footer/card-footer.component.ts","../../../../libs/angular/components/card/src/lib/components/card-footer/card-footer.component.html","../../../../libs/angular/components/card/src/lib/components/launch-card-subtitle/launch-card-subtitle.component.ts","../../../../libs/angular/components/card/src/lib/components/launch-card-subtitle/launch-card-subtitle.component.html","../../../../libs/angular/components/card/src/lib/models/card-variant.ts","../../../../libs/angular/components/card/src/lib/card.component.ts","../../../../libs/angular/components/card/src/lib/card.component.html","../../../../libs/angular/components/card/src/lib/directives/card-content.directive.ts","../../../../libs/angular/components/card/src/lib/directives/card-title.directive.ts","../../../../libs/angular/components/card/src/lib/card.module.ts","../../../../libs/angular/components/card/src/odx-angular-components-card.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'odx-card-footer',\n templateUrl: './card-footer.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class.odx-card__footer]': 'true',\n },\n})\nexport class CardFooterComponent {}\n","<ng-content></ng-content>\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\n\n@Component({\n selector: 'odx-launch-card-subtitle',\n templateUrl: './launch-card-subtitle.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n host: {\n '[class.odx-card__subtitle]': 'true',\n },\n})\nexport class LaunchCardSubtitleComponent {}\n","<ng-content></ng-content>\n","export type CardVariant = (typeof CardVariant)[keyof typeof CardVariant];\n\nexport const CardVariant = {\n DEFAULT: 'default',\n LAUNCH_TILE: 'launch-tile',\n LAUNCH_TILE_CENTERED: 'launch-tile-centered',\n} as const;\n","import { ChangeDetectionStrategy, Component, ContentChild, ElementRef, EventEmitter, inject, Input, Output, ViewChild, ViewEncapsulation } from '@angular/core';\nimport { A11yModule, InteractiveDirective } from '@odx/angular/cdk/a11y';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { MenuComponent, MenuDirective, MenuModule } from '@odx/angular/components/menu';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { containsElement, injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { CardFooterComponent } from './components';\nimport { CardVariant } from './models';\n\n@CSSComponent('card')\n@Component({\n selector: 'odx-card',\n templateUrl: './card.component.html',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n imports: [A11yModule, ButtonComponent, IconComponent, MenuModule, ActionGroupComponent],\n hostDirectives: [InteractiveDirective],\n})\nexport class CardComponent {\n private readonly interactiveDirective = inject(InteractiveDirective, { host: true });\n private readonly takeUntilDestroyed = untilDestroyed();\n\n @ContentChild(MenuComponent)\n protected readonly menu?: MenuComponent;\n\n @ViewChild(MenuDirective)\n protected readonly menuHost?: MenuDirective;\n\n @ContentChild(CardFooterComponent, { read: ElementRef })\n protected readonly footer?: ElementRef<HTMLElement>;\n\n public readonly element = injectElement();\n\n @CSSModifier()\n @Input()\n public variant?: CardVariant = CardVariant.DEFAULT;\n\n @Output()\n public interact = new EventEmitter<Event>();\n\n constructor() {\n this.interactiveDirective.interact.pipe(this.takeUntilDestroyed()).subscribe((event) => {\n this.stopEvents(event);\n });\n }\n\n public get launchTile(): boolean {\n return this.variant !== CardVariant.DEFAULT;\n }\n\n public stopEvents(event: Event): void {\n const target = event.target as Element | null;\n const isFooterEvent = containsElement(this.footer?.nativeElement, target, false);\n const isMenuEvent = containsElement(this.menuHost?.element.nativeElement, target);\n if (!isFooterEvent && !isMenuEvent && !this.menuHost?.isOpen()) {\n this.interact.emit(event);\n }\n }\n}\n","<div class=\"odx-card__container\">\n <ng-container *ngIf=\"launchTile; else card\">\n <ng-content select=\"odx-avatar\"></ng-content>\n <div class=\"odx-card__content\">\n <div class=\"odx-card__title\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </div>\n <ng-content select=\"odx-launch-card-subtitle\"></ng-content>\n </div>\n </ng-container>\n\n <ng-template #card>\n <div class=\"odx-card__title\">\n <ng-container *ngTemplateOutlet=\"title\"></ng-container>\n </div>\n <ng-content select=\"[odxCardContent]\"></ng-content>\n </ng-template>\n</div>\n\n<ng-content select=\"odx-card-footer\"></ng-content>\n\n<odx-action-group class=\"odx-card-menu\" *ngIf=\"menu\">\n <button odxButton [odxMenu]=\"menuTpl\" odxMenuPosition=\"bottom-end\">\n <odx-icon name=\"more\" iconSet=\"core\"></odx-icon>\n </button>\n\n <ng-template #menuTpl>\n <ng-content select=\"odx-menu\"></ng-content>\n </ng-template>\n</odx-action-group>\n\n<ng-template #title>\n <ng-content></ng-content>\n</ng-template>\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[odxCardContent]',\n standalone: true,\n host: {\n '[class.odx-card__content]': 'true',\n },\n})\nexport class CardContentDirective {}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[odxCardTitle]',\n standalone: true,\n host: {\n '[class.odx-card-title]': 'true',\n },\n})\nexport class CardTitleDirective {}\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { AvatarComponent } from '@odx/angular/components/avatar';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { MenuModule } from '@odx/angular/components/menu';\nimport { CardComponent } from './card.component';\nimport { CardFooterComponent, LaunchCardSubtitleComponent } from './components';\nimport { CardContentDirective } from './directives/card-content.directive';\nimport { CardTitleDirective } from './directives/card-title.directive';\n\nconst modules = [\n CardComponent,\n CardTitleDirective,\n CardContentDirective,\n CardFooterComponent,\n LaunchCardSubtitleComponent,\n AvatarComponent,\n ButtonComponent,\n IconComponent,\n];\n\n@NgModule({\n imports: [modules],\n exports: [CoreModule, MenuModule, ...modules],\n})\nexport class CardModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;MAYa,mBAAmB,CAAA;;gHAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA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AU,EAAE,UAAU,EAZhC,aAAa;QACb,kBAAkB;QAClB,oBAAoB;QACpB,mBAAmB;QACnB,2BAA2B;QAC3B,eAAe;QACf,eAAe;QACf,aAAa,CAAA,EAAA,CAAA,CAAA;AAOF,UAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAU,YAdrB,aAAa;QAGb,mBAAmB;QACnB,2BAA2B;QAC3B,eAAe;QACf,eAAe;QACf,aAAa,EAKH,UAAU,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;2FAErB,UAAU,EAAA,UAAA,EAAA,CAAA;kBAJtB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,OAAO,CAAC;oBAClB,OAAO,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;AAC9C,iBAAA,CAAA;;;ACzBD;;AAEG;;;;"}
|
|
@@ -1,14 +1,44 @@
|
|
|
1
1
|
import { __decorate, __metadata } from 'tslib';
|
|
2
|
-
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
3
2
|
import * as i0 from '@angular/core';
|
|
4
|
-
import {
|
|
3
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, EventEmitter, Input, Output } from '@angular/core';
|
|
4
|
+
import { CSSComponent, CSSModifier } from '@odx/angular/internal';
|
|
5
|
+
import { injectElement, Transform } from '@odx/angular/utils';
|
|
6
|
+
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
5
7
|
import { CoreModule } from '@odx/angular';
|
|
6
8
|
import { ButtonComponent } from '@odx/angular/components/button';
|
|
7
9
|
import { IconComponent } from '@odx/angular/components/icon';
|
|
8
|
-
import { CSSModifier, CSSComponent } from '@odx/angular/internal';
|
|
9
|
-
import { injectElement, Transform } from '@odx/angular/utils';
|
|
10
10
|
import * as i1 from '@angular/common';
|
|
11
11
|
|
|
12
|
+
let ChipListRowComponent = class ChipListRowComponent {
|
|
13
|
+
constructor() {
|
|
14
|
+
this.element = injectElement();
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
ChipListRowComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ChipListRowComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
18
|
+
ChipListRowComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ChipListRowComponent, isStandalone: true, selector: "odx-chip-list-row", ngImport: i0, template: "<ng-content select=\"odx-chip\"></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
19
|
+
ChipListRowComponent = __decorate([
|
|
20
|
+
CSSComponent('chip-list-row')
|
|
21
|
+
], ChipListRowComponent);
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ChipListRowComponent, decorators: [{
|
|
23
|
+
type: Component,
|
|
24
|
+
args: [{ selector: 'odx-chip-list-row', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<ng-content select=\"odx-chip\"></ng-content>\n" }]
|
|
25
|
+
}] });
|
|
26
|
+
|
|
27
|
+
let ChipListComponent = class ChipListComponent {
|
|
28
|
+
constructor() {
|
|
29
|
+
this.element = injectElement();
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
ChipListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ChipListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
33
|
+
ChipListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ChipListComponent, isStandalone: true, selector: "odx-chip-list", ngImport: i0, template: "<ng-content select=\"odx-chip-list-row\"></ng-content>\n<ng-content select=\"odx-autocomplete\"></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
34
|
+
ChipListComponent = __decorate([
|
|
35
|
+
CSSComponent('chip-list')
|
|
36
|
+
], ChipListComponent);
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ChipListComponent, decorators: [{
|
|
38
|
+
type: Component,
|
|
39
|
+
args: [{ selector: 'odx-chip-list', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<ng-content select=\"odx-chip-list-row\"></ng-content>\n<ng-content select=\"odx-autocomplete\"></ng-content>\n" }]
|
|
40
|
+
}] });
|
|
41
|
+
|
|
12
42
|
const ChipSize = {
|
|
13
43
|
SMALL: 'small',
|
|
14
44
|
MEDIUM: 'medium',
|
|
@@ -67,5 +97,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
|
|
|
67
97
|
* Generated bundle index. Do not edit.
|
|
68
98
|
*/
|
|
69
99
|
|
|
70
|
-
export { ChipComponent, ChipSize, ChipVariant };
|
|
100
|
+
export { ChipComponent, ChipListComponent, ChipListRowComponent, ChipSize, ChipVariant };
|
|
71
101
|
//# sourceMappingURL=odx-angular-components-chip.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"odx-angular-components-chip.mjs","sources":["../../../../libs/angular/components/chip/src/lib/models/chip-size.ts","../../../../libs/angular/components/chip/src/lib/models/chip-variant.ts","../../../../libs/angular/components/chip/src/lib/chip.component.ts","../../../../libs/angular/components/chip/src/lib/chip.component.html","../../../../libs/angular/components/chip/src/odx-angular-components-chip.ts"],"sourcesContent":["export type ChipSize = typeof ChipSize[keyof typeof ChipSize];\n\nexport const ChipSize = {\n SMALL: 'small',\n MEDIUM: 'medium',\n} as const;\n","export type ChipVariant = typeof ChipVariant[keyof typeof ChipVariant];\n\nexport const ChipVariant = {\n SECONDARY: 'secondary',\n HIGHLIGHT: 'highlight',\n SUCCESS: 'success',\n DANGER: 'danger',\n} as const;\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement, Transform } from '@odx/angular/utils';\nimport { ChipSize, ChipVariant } from '
|
|
1
|
+
{"version":3,"file":"odx-angular-components-chip.mjs","sources":["../../../../libs/angular/components/chip/src/lib/components/chip-list-row/chip-list-row.component.ts","../../../../libs/angular/components/chip/src/lib/components/chip-list-row/chip-list-row.component.html","../../../../libs/angular/components/chip/src/lib/components/chip-list/chip-list.component.ts","../../../../libs/angular/components/chip/src/lib/components/chip-list/chip-list.component.html","../../../../libs/angular/components/chip/src/lib/models/chip-size.ts","../../../../libs/angular/components/chip/src/lib/models/chip-variant.ts","../../../../libs/angular/components/chip/src/lib/components/chip/chip.component.ts","../../../../libs/angular/components/chip/src/lib/components/chip/chip.component.html","../../../../libs/angular/components/chip/src/odx-angular-components-chip.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('chip-list-row')\n@Component({\n selector: 'odx-chip-list-row',\n templateUrl: './chip-list-row.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class ChipListRowComponent {\n public readonly element = injectElement();\n}\n","<ng-content select=\"odx-chip\"></ng-content>\n","import { ChangeDetectionStrategy, Component, ViewEncapsulation } from '@angular/core';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\n\n@CSSComponent('chip-list')\n@Component({\n selector: 'odx-chip-list',\n templateUrl: './chip-list.component.html',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class ChipListComponent {\n public readonly element = injectElement();\n}\n","<ng-content select=\"odx-chip-list-row\"></ng-content>\n<ng-content select=\"odx-autocomplete\"></ng-content>\n","export type ChipSize = typeof ChipSize[keyof typeof ChipSize];\n\nexport const ChipSize = {\n SMALL: 'small',\n MEDIUM: 'medium',\n} as const;\n","export type ChipVariant = typeof ChipVariant[keyof typeof ChipVariant];\n\nexport const ChipVariant = {\n SECONDARY: 'secondary',\n HIGHLIGHT: 'highlight',\n SUCCESS: 'success',\n DANGER: 'danger',\n} as const;\n","import { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { injectElement, Transform } from '@odx/angular/utils';\nimport { ChipSize, ChipVariant } from '../../models';\n\n@CSSComponent('chip')\n@Component({\n selector: 'odx-chip',\n templateUrl: './chip.component.html',\n imports: [CoreModule, ButtonComponent, IconComponent],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true,\n})\nexport class ChipComponent {\n public static ngAcceptInputType_removable: BooleanInput;\n public readonly element = injectElement();\n\n @Transform(coerceBooleanProperty)\n @Input()\n public removable = false;\n\n @CSSModifier()\n @Input()\n public size: ChipSize = ChipSize.SMALL;\n\n @CSSModifier()\n @Input()\n public variant: ChipVariant = ChipVariant.SECONDARY;\n\n @Output()\n public remove = new EventEmitter<void>();\n\n public onClick(): void {\n this.remove.emit();\n }\n}\n","<div class=\"odx-chip__content\">\n <ng-content></ng-content>\n</div>\n<button odxButton class=\"odx-chip__action\" [size]=\"size\" [variant]=\"variant\" type=\"button\" (click)=\"onClick()\" *ngIf=\"removable\">\n <odx-icon [size]=\"size\" name=\"close\" iconSet=\"core\"></odx-icon>\n</button>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;AAYa,IAAA,oBAAoB,GAA1B,MAAM,oBAAoB,CAAA;AAA1B,IAAA,WAAA,GAAA;QACW,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAC3C,KAAA;;iHAFY,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,6ECZjC,iDACA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;ADWa,oBAAoB,GAAA,UAAA,CAAA;IARhC,YAAY,CAAC,eAAe,CAAC;AAQjB,CAAA,EAAA,oBAAoB,CAEhC,CAAA;2FAFY,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,SAAS;+BACE,mBAAmB,EAAA,aAAA,EAEd,iBAAiB,CAAC,IAAI,mBACpB,uBAAuB,CAAC,MAAM,EAAA,UAAA,EACnC,IAAI,EAAA,QAAA,EAAA,iDAAA,EAAA,CAAA;;;AEEL,IAAA,iBAAiB,GAAvB,MAAM,iBAAiB,CAAA;AAAvB,IAAA,WAAA,GAAA;QACW,IAAO,CAAA,OAAA,GAAG,aAAa,EAAE,CAAC;AAC3C,KAAA;;8GAFY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CA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