avero-ui 0.0.0-stage → 0.0.1
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/LICENSE +21 -0
- package/README.md +1043 -2
- package/fesm2022/avero-ui-accordion.mjs +515 -0
- package/fesm2022/avero-ui-accordion.mjs.map +1 -0
- package/fesm2022/avero-ui-animate-on-scroll.mjs +223 -0
- package/fesm2022/avero-ui-animate-on-scroll.mjs.map +1 -0
- package/fesm2022/avero-ui-auto-complete.mjs +638 -0
- package/fesm2022/avero-ui-auto-complete.mjs.map +1 -0
- package/fesm2022/avero-ui-auto-focus.mjs +88 -0
- package/fesm2022/avero-ui-auto-focus.mjs.map +1 -0
- package/fesm2022/avero-ui-avatar.mjs +274 -0
- package/fesm2022/avero-ui-avatar.mjs.map +1 -0
- package/fesm2022/avero-ui-badge.mjs +278 -0
- package/fesm2022/avero-ui-badge.mjs.map +1 -0
- package/fesm2022/avero-ui-bind.mjs +103 -0
- package/fesm2022/avero-ui-bind.mjs.map +1 -0
- package/fesm2022/avero-ui-block-ui.mjs +175 -0
- package/fesm2022/avero-ui-block-ui.mjs.map +1 -0
- package/fesm2022/avero-ui-breadcrumb.mjs +187 -0
- package/fesm2022/avero-ui-breadcrumb.mjs.map +1 -0
- package/fesm2022/avero-ui-button.mjs +118 -0
- package/fesm2022/avero-ui-button.mjs.map +1 -0
- package/fesm2022/avero-ui-calendar.mjs +412 -0
- package/fesm2022/avero-ui-calendar.mjs.map +1 -0
- package/fesm2022/avero-ui-card.mjs +305 -0
- package/fesm2022/avero-ui-card.mjs.map +1 -0
- package/fesm2022/avero-ui-carousel.mjs +390 -0
- package/fesm2022/avero-ui-carousel.mjs.map +1 -0
- package/fesm2022/avero-ui-cascade-select.mjs +771 -0
- package/fesm2022/avero-ui-cascade-select.mjs.map +1 -0
- package/fesm2022/avero-ui-chart.mjs +361 -0
- package/fesm2022/avero-ui-chart.mjs.map +1 -0
- package/fesm2022/avero-ui-checkbox.mjs +279 -0
- package/fesm2022/avero-ui-checkbox.mjs.map +1 -0
- package/fesm2022/avero-ui-chip.mjs +256 -0
- package/fesm2022/avero-ui-chip.mjs.map +1 -0
- package/fesm2022/avero-ui-class-names.mjs +80 -0
- package/fesm2022/avero-ui-class-names.mjs.map +1 -0
- package/fesm2022/avero-ui-color-picker.mjs +665 -0
- package/fesm2022/avero-ui-color-picker.mjs.map +1 -0
- package/fesm2022/avero-ui-confirm-dialog.mjs +561 -0
- package/fesm2022/avero-ui-confirm-dialog.mjs.map +1 -0
- package/fesm2022/avero-ui-confirm-popup.mjs +406 -0
- package/fesm2022/avero-ui-confirm-popup.mjs.map +1 -0
- package/fesm2022/avero-ui-context-menu.mjs +409 -0
- package/fesm2022/avero-ui-context-menu.mjs.map +1 -0
- package/fesm2022/avero-ui-core.mjs +38 -0
- package/fesm2022/avero-ui-core.mjs.map +1 -0
- package/fesm2022/avero-ui-data-view.mjs +312 -0
- package/fesm2022/avero-ui-data-view.mjs.map +1 -0
- package/fesm2022/avero-ui-dialog.mjs +595 -0
- package/fesm2022/avero-ui-dialog.mjs.map +1 -0
- package/fesm2022/avero-ui-divider.mjs +119 -0
- package/fesm2022/avero-ui-divider.mjs.map +1 -0
- package/fesm2022/avero-ui-dock.mjs +243 -0
- package/fesm2022/avero-ui-dock.mjs.map +1 -0
- package/fesm2022/avero-ui-drawer.mjs +577 -0
- package/fesm2022/avero-ui-drawer.mjs.map +1 -0
- package/fesm2022/avero-ui-dropdown.mjs +510 -0
- package/fesm2022/avero-ui-dropdown.mjs.map +1 -0
- package/fesm2022/avero-ui-dynamic-dialog.mjs +268 -0
- package/fesm2022/avero-ui-dynamic-dialog.mjs.map +1 -0
- package/fesm2022/avero-ui-fieldset.mjs +354 -0
- package/fesm2022/avero-ui-fieldset.mjs.map +1 -0
- package/fesm2022/avero-ui-file-upload.mjs +658 -0
- package/fesm2022/avero-ui-file-upload.mjs.map +1 -0
- package/fesm2022/avero-ui-fluid.mjs +147 -0
- package/fesm2022/avero-ui-fluid.mjs.map +1 -0
- package/fesm2022/avero-ui-focus-trap.mjs +120 -0
- package/fesm2022/avero-ui-focus-trap.mjs.map +1 -0
- package/fesm2022/avero-ui-galleria.mjs +523 -0
- package/fesm2022/avero-ui-galleria.mjs.map +1 -0
- package/fesm2022/avero-ui-icon-field.mjs +99 -0
- package/fesm2022/avero-ui-icon-field.mjs.map +1 -0
- package/fesm2022/avero-ui-image-compare.mjs +274 -0
- package/fesm2022/avero-ui-image-compare.mjs.map +1 -0
- package/fesm2022/avero-ui-image.mjs +397 -0
- package/fesm2022/avero-ui-image.mjs.map +1 -0
- package/fesm2022/avero-ui-input-group.mjs +79 -0
- package/fesm2022/avero-ui-input-group.mjs.map +1 -0
- package/fesm2022/avero-ui-input-mask.mjs +678 -0
- package/fesm2022/avero-ui-input-mask.mjs.map +1 -0
- package/fesm2022/avero-ui-input-number.mjs +390 -0
- package/fesm2022/avero-ui-input-number.mjs.map +1 -0
- package/fesm2022/avero-ui-input-otp.mjs +541 -0
- package/fesm2022/avero-ui-input-otp.mjs.map +1 -0
- package/fesm2022/avero-ui-input.mjs +140 -0
- package/fesm2022/avero-ui-input.mjs.map +1 -0
- package/fesm2022/avero-ui-knob.mjs +436 -0
- package/fesm2022/avero-ui-knob.mjs.map +1 -0
- package/fesm2022/avero-ui-mega-menu.mjs +431 -0
- package/fesm2022/avero-ui-mega-menu.mjs.map +1 -0
- package/fesm2022/avero-ui-menu.mjs +398 -0
- package/fesm2022/avero-ui-menu.mjs.map +1 -0
- package/fesm2022/avero-ui-menubar.mjs +387 -0
- package/fesm2022/avero-ui-menubar.mjs.map +1 -0
- package/fesm2022/avero-ui-message.mjs +221 -0
- package/fesm2022/avero-ui-message.mjs.map +1 -0
- package/fesm2022/avero-ui-order-list.mjs +302 -0
- package/fesm2022/avero-ui-order-list.mjs.map +1 -0
- package/fesm2022/avero-ui-organization-chart.mjs +505 -0
- package/fesm2022/avero-ui-organization-chart.mjs.map +1 -0
- package/fesm2022/avero-ui-paginator.mjs +319 -0
- package/fesm2022/avero-ui-paginator.mjs.map +1 -0
- package/fesm2022/avero-ui-panel-menu.mjs +339 -0
- package/fesm2022/avero-ui-panel-menu.mjs.map +1 -0
- package/fesm2022/avero-ui-password.mjs +483 -0
- package/fesm2022/avero-ui-password.mjs.map +1 -0
- package/fesm2022/avero-ui-popover.mjs +469 -0
- package/fesm2022/avero-ui-popover.mjs.map +1 -0
- package/fesm2022/avero-ui-progress-bar.mjs +194 -0
- package/fesm2022/avero-ui-progress-bar.mjs.map +1 -0
- package/fesm2022/avero-ui-progress-spinner.mjs +150 -0
- package/fesm2022/avero-ui-progress-spinner.mjs.map +1 -0
- package/fesm2022/avero-ui-radio.mjs +67 -0
- package/fesm2022/avero-ui-radio.mjs.map +1 -0
- package/fesm2022/avero-ui-rating.mjs +271 -0
- package/fesm2022/avero-ui-rating.mjs.map +1 -0
- package/fesm2022/avero-ui-scroll-panel.mjs +415 -0
- package/fesm2022/avero-ui-scroll-panel.mjs.map +1 -0
- package/fesm2022/avero-ui-slider.mjs +274 -0
- package/fesm2022/avero-ui-slider.mjs.map +1 -0
- package/fesm2022/avero-ui-splitter.mjs +438 -0
- package/fesm2022/avero-ui-splitter.mjs.map +1 -0
- package/fesm2022/avero-ui-stepper.mjs +626 -0
- package/fesm2022/avero-ui-stepper.mjs.map +1 -0
- package/fesm2022/avero-ui-switch.mjs +252 -0
- package/fesm2022/avero-ui-switch.mjs.map +1 -0
- package/fesm2022/avero-ui-table.mjs +448 -0
- package/fesm2022/avero-ui-table.mjs.map +1 -0
- package/fesm2022/avero-ui-tabs.mjs +693 -0
- package/fesm2022/avero-ui-tabs.mjs.map +1 -0
- package/fesm2022/avero-ui-textarea.mjs +180 -0
- package/fesm2022/avero-ui-textarea.mjs.map +1 -0
- package/fesm2022/avero-ui-tiered-menu.mjs +444 -0
- package/fesm2022/avero-ui-tiered-menu.mjs.map +1 -0
- package/fesm2022/avero-ui-timeline.mjs +348 -0
- package/fesm2022/avero-ui-timeline.mjs.map +1 -0
- package/fesm2022/avero-ui-toast.mjs +291 -0
- package/fesm2022/avero-ui-toast.mjs.map +1 -0
- package/fesm2022/avero-ui-toggle-button.mjs +317 -0
- package/fesm2022/avero-ui-toggle-button.mjs.map +1 -0
- package/fesm2022/avero-ui-toolbar.mjs +284 -0
- package/fesm2022/avero-ui-toolbar.mjs.map +1 -0
- package/fesm2022/avero-ui-tooltip.mjs +442 -0
- package/fesm2022/avero-ui-tooltip.mjs.map +1 -0
- package/fesm2022/avero-ui-tree.mjs +426 -0
- package/fesm2022/avero-ui-tree.mjs.map +1 -0
- package/fesm2022/avero-ui-virtual-scroller.mjs +503 -0
- package/fesm2022/avero-ui-virtual-scroller.mjs.map +1 -0
- package/fesm2022/avero-ui.mjs +114 -0
- package/fesm2022/avero-ui.mjs.map +1 -0
- package/package.json +342 -3
- package/scripts/install-agent-skills.mjs +31 -0
- package/skills/avero-ui-build/SKILL.md +40 -0
- package/skills/avero-ui-build/agents/openai.yaml +4 -0
- package/skills/avero-ui-build/assets/workspace-page.scss +94 -0
- package/skills/avero-ui-build/assets/workspace-page.ts +222 -0
- package/skills/avero-ui-build/references/components.md +47 -0
- package/skills/avero-ui-build/references/integration.md +65 -0
- package/skills/avero-ui-build/references/recipes.md +88 -0
- package/styles/theme.scss +92 -0
- package/types/avero-ui-accordion.d.ts +101 -0
- package/types/avero-ui-animate-on-scroll.d.ts +56 -0
- package/types/avero-ui-auto-complete.d.ts +188 -0
- package/types/avero-ui-auto-focus.d.ts +24 -0
- package/types/avero-ui-avatar.d.ts +73 -0
- package/types/avero-ui-badge.d.ts +71 -0
- package/types/avero-ui-bind.d.ts +26 -0
- package/types/avero-ui-block-ui.d.ts +31 -0
- package/types/avero-ui-breadcrumb.d.ts +65 -0
- package/types/avero-ui-button.d.ts +37 -0
- package/types/avero-ui-calendar.d.ts +105 -0
- package/types/avero-ui-card.d.ts +53 -0
- package/types/avero-ui-carousel.d.ts +128 -0
- package/types/avero-ui-cascade-select.d.ts +212 -0
- package/types/avero-ui-chart.d.ts +106 -0
- package/types/avero-ui-checkbox.d.ts +90 -0
- package/types/avero-ui-chip.d.ts +63 -0
- package/types/avero-ui-class-names.d.ts +24 -0
- package/types/avero-ui-color-picker.d.ts +173 -0
- package/types/avero-ui-confirm-dialog.d.ts +113 -0
- package/types/avero-ui-confirm-popup.d.ts +68 -0
- package/types/avero-ui-context-menu.d.ts +95 -0
- package/types/avero-ui-core.d.ts +11 -0
- package/types/avero-ui-data-view.d.ts +102 -0
- package/types/avero-ui-dialog.d.ts +118 -0
- package/types/avero-ui-divider.d.ts +31 -0
- package/types/avero-ui-dock.d.ts +80 -0
- package/types/avero-ui-drawer.d.ts +109 -0
- package/types/avero-ui-dropdown.d.ts +146 -0
- package/types/avero-ui-dynamic-dialog.d.ts +51 -0
- package/types/avero-ui-fieldset.d.ts +73 -0
- package/types/avero-ui-file-upload.d.ts +195 -0
- package/types/avero-ui-fluid.d.ts +32 -0
- package/types/avero-ui-focus-trap.d.ts +25 -0
- package/types/avero-ui-galleria.d.ts +156 -0
- package/types/avero-ui-icon-field.d.ts +22 -0
- package/types/avero-ui-image-compare.d.ts +77 -0
- package/types/avero-ui-image.d.ts +111 -0
- package/types/avero-ui-input-group.d.ts +14 -0
- package/types/avero-ui-input-mask.d.ts +178 -0
- package/types/avero-ui-input-number.d.ts +131 -0
- package/types/avero-ui-input-otp.d.ts +140 -0
- package/types/avero-ui-input.d.ts +36 -0
- package/types/avero-ui-knob.d.ts +139 -0
- package/types/avero-ui-mega-menu.d.ts +115 -0
- package/types/avero-ui-menu.d.ts +100 -0
- package/types/avero-ui-menubar.d.ts +91 -0
- package/types/avero-ui-message.d.ts +54 -0
- package/types/avero-ui-order-list.d.ts +85 -0
- package/types/avero-ui-organization-chart.d.ts +145 -0
- package/types/avero-ui-paginator.d.ts +104 -0
- package/types/avero-ui-panel-menu.d.ts +99 -0
- package/types/avero-ui-password.d.ts +163 -0
- package/types/avero-ui-popover.d.ts +91 -0
- package/types/avero-ui-progress-bar.d.ts +45 -0
- package/types/avero-ui-progress-spinner.d.ts +41 -0
- package/types/avero-ui-radio.d.ts +16 -0
- package/types/avero-ui-rating.d.ts +75 -0
- package/types/avero-ui-scroll-panel.d.ts +78 -0
- package/types/avero-ui-slider.d.ts +92 -0
- package/types/avero-ui-splitter.d.ts +90 -0
- package/types/avero-ui-stepper.d.ts +134 -0
- package/types/avero-ui-switch.d.ts +83 -0
- package/types/avero-ui-table.d.ts +150 -0
- package/types/avero-ui-tabs.d.ts +135 -0
- package/types/avero-ui-textarea.d.ts +43 -0
- package/types/avero-ui-tiered-menu.d.ts +105 -0
- package/types/avero-ui-timeline.d.ts +97 -0
- package/types/avero-ui-toast.d.ts +99 -0
- package/types/avero-ui-toggle-button.d.ts +115 -0
- package/types/avero-ui-toolbar.d.ts +33 -0
- package/types/avero-ui-tooltip.d.ts +93 -0
- package/types/avero-ui-tree.d.ts +128 -0
- package/types/avero-ui-virtual-scroller.d.ts +149 -0
- package/types/avero-ui.d.ts +82 -0
|
@@ -0,0 +1,638 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, ElementRef, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, output, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { AvIdGenerator } from "avero-ui/core";
|
|
4
|
+
import { AvFluidControl } from "avero-ui/fluid";
|
|
5
|
+
import { NgTemplateOutlet } from "@angular/common";
|
|
6
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
7
|
+
var AvAutoComplete = class AvAutoComplete {
|
|
8
|
+
inputId = input(inject(AvIdGenerator).next("av-auto-complete"), ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
|
|
9
|
+
suggestions = input([], ...ngDevMode ? [{ debugName: "suggestions" }] : /* istanbul ignore next */ []);
|
|
10
|
+
optionLabel = input("", ...ngDevMode ? [{ debugName: "optionLabel" }] : /* istanbul ignore next */ []);
|
|
11
|
+
dataKey = input("", ...ngDevMode ? [{ debugName: "dataKey" }] : /* istanbul ignore next */ []);
|
|
12
|
+
placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
13
|
+
ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
|
|
14
|
+
describedBy = input(null, ...ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []);
|
|
15
|
+
dropdown = input(false, {
|
|
16
|
+
...ngDevMode ? { debugName: "dropdown" } : /* istanbul ignore next */ {},
|
|
17
|
+
transform: booleanAttribute
|
|
18
|
+
});
|
|
19
|
+
dropdownMode = input("blank", ...ngDevMode ? [{ debugName: "dropdownMode" }] : /* istanbul ignore next */ []);
|
|
20
|
+
multiple = input(false, {
|
|
21
|
+
...ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {},
|
|
22
|
+
transform: booleanAttribute
|
|
23
|
+
});
|
|
24
|
+
forceSelection = input(false, {
|
|
25
|
+
...ngDevMode ? { debugName: "forceSelection" } : /* istanbul ignore next */ {},
|
|
26
|
+
transform: booleanAttribute
|
|
27
|
+
});
|
|
28
|
+
disabled = input(false, {
|
|
29
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
30
|
+
transform: booleanAttribute
|
|
31
|
+
});
|
|
32
|
+
readonly = input(false, {
|
|
33
|
+
...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
|
|
34
|
+
transform: booleanAttribute
|
|
35
|
+
});
|
|
36
|
+
required = input(false, {
|
|
37
|
+
...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
|
|
38
|
+
transform: booleanAttribute
|
|
39
|
+
});
|
|
40
|
+
invalid = input(false, {
|
|
41
|
+
...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
|
|
42
|
+
transform: booleanAttribute
|
|
43
|
+
});
|
|
44
|
+
fluid = inject(AvFluidControl).expanded;
|
|
45
|
+
loading = input(false, {
|
|
46
|
+
...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
|
|
47
|
+
transform: booleanAttribute
|
|
48
|
+
});
|
|
49
|
+
showClear = input(false, {
|
|
50
|
+
...ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {},
|
|
51
|
+
transform: booleanAttribute
|
|
52
|
+
});
|
|
53
|
+
minLength = input(1, ...ngDevMode ? [{ debugName: "minLength" }] : /* istanbul ignore next */ []);
|
|
54
|
+
delay = input(200, ...ngDevMode ? [{ debugName: "delay" }] : /* istanbul ignore next */ []);
|
|
55
|
+
emptyMessage = input("No results found", ...ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []);
|
|
56
|
+
completeMethod = output();
|
|
57
|
+
onSelect = output();
|
|
58
|
+
onUnselect = output();
|
|
59
|
+
onClear = output();
|
|
60
|
+
itemTemplate = contentChild("item", ...ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []);
|
|
61
|
+
value = signal(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
62
|
+
text = signal("", ...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
|
|
63
|
+
open = signal(false, ...ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []);
|
|
64
|
+
active = signal(-1, ...ngDevMode ? [{ debugName: "active" }] : /* istanbul ignore next */ []);
|
|
65
|
+
selected = computed(() => Array.isArray(this.value()) ? this.value() : [], ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
|
|
66
|
+
formDisabled = signal(false, ...ngDevMode ? [{ debugName: "formDisabled" }] : /* istanbul ignore next */ []);
|
|
67
|
+
isDisabled = computed(() => this.disabled() || this.formDisabled(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
|
|
68
|
+
options = computed(() => this.suggestions().filter((option) => !this.multiple() || !this.selected().some((value) => this.same(value, option))), ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
|
|
69
|
+
activeId = computed(() => this.open() && this.active() >= 0 && this.active() < this.options().length ? `${this.inputId()}-option-${this.active()}` : null, ...ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []);
|
|
70
|
+
field = viewChild.required("field", ...ngDevMode ? [{ debugName: "field" }] : /* istanbul ignore next */ []);
|
|
71
|
+
host = inject(ElementRef);
|
|
72
|
+
timer;
|
|
73
|
+
change = () => {};
|
|
74
|
+
touched = () => {};
|
|
75
|
+
constructor() {
|
|
76
|
+
inject(DestroyRef).onDestroy(() => clearTimeout(this.timer));
|
|
77
|
+
effect(() => {
|
|
78
|
+
if (this.isDisabled() || this.readonly()) this.close();
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
writeValue(value) {
|
|
82
|
+
this.close();
|
|
83
|
+
this.value.set(value);
|
|
84
|
+
this.text.set(this.multiple() ? "" : this.label(value));
|
|
85
|
+
}
|
|
86
|
+
registerOnChange(fn) {
|
|
87
|
+
this.change = fn;
|
|
88
|
+
}
|
|
89
|
+
registerOnTouched(fn) {
|
|
90
|
+
this.touched = fn;
|
|
91
|
+
}
|
|
92
|
+
setDisabledState(value) {
|
|
93
|
+
this.formDisabled.set(value);
|
|
94
|
+
}
|
|
95
|
+
label(value) {
|
|
96
|
+
if (value == null) return "";
|
|
97
|
+
const label = this.optionLabel();
|
|
98
|
+
if (typeof label === "function") return label(value);
|
|
99
|
+
return String(label && typeof value === "object" ? value[label] ?? "" : value);
|
|
100
|
+
}
|
|
101
|
+
same(a, b) {
|
|
102
|
+
const key = this.dataKey();
|
|
103
|
+
return key && a && b && typeof a === "object" && typeof b === "object" ? Object.is(a[key], b[key]) : Object.is(a, b);
|
|
104
|
+
}
|
|
105
|
+
commit(value) {
|
|
106
|
+
this.value.set(value);
|
|
107
|
+
this.change(value);
|
|
108
|
+
}
|
|
109
|
+
edit(event) {
|
|
110
|
+
if (this.isDisabled() || this.readonly()) return;
|
|
111
|
+
const text = event.target.value;
|
|
112
|
+
this.text.set(text);
|
|
113
|
+
if (!this.multiple()) this.commit(this.forceSelection() ? null : text || null);
|
|
114
|
+
if (!event.isComposing) this.search(event, text);
|
|
115
|
+
}
|
|
116
|
+
search(event, query, immediate = false) {
|
|
117
|
+
this.close();
|
|
118
|
+
if (!immediate && query.length < Math.max(0, this.minLength())) return;
|
|
119
|
+
const run = () => {
|
|
120
|
+
if (this.isDisabled() || this.readonly()) return;
|
|
121
|
+
this.open.set(true);
|
|
122
|
+
this.completeMethod.emit({
|
|
123
|
+
originalEvent: event,
|
|
124
|
+
query
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
if (immediate || this.delay() <= 0) run();
|
|
128
|
+
else this.timer = setTimeout(run, Number.isFinite(this.delay()) ? this.delay() : 200);
|
|
129
|
+
}
|
|
130
|
+
toggle(event) {
|
|
131
|
+
if (this.isDisabled() || this.readonly()) return;
|
|
132
|
+
this.field().nativeElement.focus();
|
|
133
|
+
if (this.open()) this.close();
|
|
134
|
+
else this.search(event, this.dropdownMode() === "blank" ? "" : this.text(), true);
|
|
135
|
+
}
|
|
136
|
+
choose(option, event) {
|
|
137
|
+
if (this.isDisabled() || this.readonly()) return;
|
|
138
|
+
this.commit(this.multiple() ? [...this.selected(), option] : option);
|
|
139
|
+
this.text.set(this.multiple() ? "" : this.label(option));
|
|
140
|
+
this.close();
|
|
141
|
+
this.field().nativeElement.focus();
|
|
142
|
+
this.onSelect.emit({
|
|
143
|
+
originalEvent: event,
|
|
144
|
+
value: option
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
remove(index, event) {
|
|
148
|
+
if (this.isDisabled() || this.readonly()) return;
|
|
149
|
+
const option = this.selected()[index];
|
|
150
|
+
this.commit(this.selected().filter((_, i) => i !== index));
|
|
151
|
+
this.field().nativeElement.focus();
|
|
152
|
+
this.onUnselect.emit({
|
|
153
|
+
originalEvent: event,
|
|
154
|
+
value: option
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
clear(event) {
|
|
158
|
+
if (this.isDisabled() || this.readonly()) return;
|
|
159
|
+
this.commit(this.multiple() ? [] : null);
|
|
160
|
+
this.text.set("");
|
|
161
|
+
this.close();
|
|
162
|
+
this.field().nativeElement.focus();
|
|
163
|
+
this.onClear.emit(event);
|
|
164
|
+
}
|
|
165
|
+
key(event) {
|
|
166
|
+
if (event.isComposing || this.isDisabled() || this.readonly()) return;
|
|
167
|
+
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
168
|
+
event.preventDefault();
|
|
169
|
+
if (!this.open()) {
|
|
170
|
+
this.search(event, this.text(), true);
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
const length = this.options().length;
|
|
174
|
+
if (!length) return;
|
|
175
|
+
this.active.set((this.active() + (event.key === "ArrowDown" ? 1 : this.active() < 0 ? 0 : -1) + length) % length);
|
|
176
|
+
this.host.nativeElement.querySelectorAll("[role=\"option\"]")[this.active()]?.scrollIntoView?.({ block: "nearest" });
|
|
177
|
+
} else if (event.key === "Enter" && this.activeId()) {
|
|
178
|
+
event.preventDefault();
|
|
179
|
+
this.choose(this.options()[this.active()], event);
|
|
180
|
+
} else if (event.key === "Escape") {
|
|
181
|
+
if (this.open()) {
|
|
182
|
+
event.preventDefault();
|
|
183
|
+
event.stopPropagation();
|
|
184
|
+
}
|
|
185
|
+
this.close();
|
|
186
|
+
} else if (event.key === "Tab") this.close();
|
|
187
|
+
else if (event.key === "Backspace" && this.multiple() && !this.text() && this.selected().length) {
|
|
188
|
+
event.preventDefault();
|
|
189
|
+
this.remove(this.selected().length - 1, event);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
leave(event) {
|
|
193
|
+
if (event.relatedTarget instanceof Node && this.host.nativeElement.contains(event.relatedTarget)) return;
|
|
194
|
+
this.close();
|
|
195
|
+
if (this.forceSelection() && !this.multiple() && this.text() !== this.label(this.value())) {
|
|
196
|
+
const match = this.suggestions().find((option) => this.label(option).toLocaleLowerCase() === this.text().toLocaleLowerCase());
|
|
197
|
+
this.commit(match ?? null);
|
|
198
|
+
this.text.set(match == null ? "" : this.label(match));
|
|
199
|
+
}
|
|
200
|
+
if (this.multiple()) this.text.set("");
|
|
201
|
+
this.touched();
|
|
202
|
+
}
|
|
203
|
+
close() {
|
|
204
|
+
clearTimeout(this.timer);
|
|
205
|
+
this.open.set(false);
|
|
206
|
+
this.active.set(-1);
|
|
207
|
+
}
|
|
208
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
209
|
+
minVersion: "12.0.0",
|
|
210
|
+
version: "22.3.2",
|
|
211
|
+
ngImport: i0,
|
|
212
|
+
type: AvAutoComplete,
|
|
213
|
+
deps: [],
|
|
214
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
215
|
+
});
|
|
216
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
217
|
+
minVersion: "17.0.0",
|
|
218
|
+
version: "22.3.2",
|
|
219
|
+
type: AvAutoComplete,
|
|
220
|
+
isStandalone: true,
|
|
221
|
+
selector: "av-auto-complete",
|
|
222
|
+
inputs: {
|
|
223
|
+
inputId: {
|
|
224
|
+
classPropertyName: "inputId",
|
|
225
|
+
publicName: "inputId",
|
|
226
|
+
isSignal: true,
|
|
227
|
+
isRequired: false,
|
|
228
|
+
transformFunction: null
|
|
229
|
+
},
|
|
230
|
+
suggestions: {
|
|
231
|
+
classPropertyName: "suggestions",
|
|
232
|
+
publicName: "suggestions",
|
|
233
|
+
isSignal: true,
|
|
234
|
+
isRequired: false,
|
|
235
|
+
transformFunction: null
|
|
236
|
+
},
|
|
237
|
+
optionLabel: {
|
|
238
|
+
classPropertyName: "optionLabel",
|
|
239
|
+
publicName: "optionLabel",
|
|
240
|
+
isSignal: true,
|
|
241
|
+
isRequired: false,
|
|
242
|
+
transformFunction: null
|
|
243
|
+
},
|
|
244
|
+
dataKey: {
|
|
245
|
+
classPropertyName: "dataKey",
|
|
246
|
+
publicName: "dataKey",
|
|
247
|
+
isSignal: true,
|
|
248
|
+
isRequired: false,
|
|
249
|
+
transformFunction: null
|
|
250
|
+
},
|
|
251
|
+
placeholder: {
|
|
252
|
+
classPropertyName: "placeholder",
|
|
253
|
+
publicName: "placeholder",
|
|
254
|
+
isSignal: true,
|
|
255
|
+
isRequired: false,
|
|
256
|
+
transformFunction: null
|
|
257
|
+
},
|
|
258
|
+
ariaLabel: {
|
|
259
|
+
classPropertyName: "ariaLabel",
|
|
260
|
+
publicName: "ariaLabel",
|
|
261
|
+
isSignal: true,
|
|
262
|
+
isRequired: false,
|
|
263
|
+
transformFunction: null
|
|
264
|
+
},
|
|
265
|
+
describedBy: {
|
|
266
|
+
classPropertyName: "describedBy",
|
|
267
|
+
publicName: "describedBy",
|
|
268
|
+
isSignal: true,
|
|
269
|
+
isRequired: false,
|
|
270
|
+
transformFunction: null
|
|
271
|
+
},
|
|
272
|
+
dropdown: {
|
|
273
|
+
classPropertyName: "dropdown",
|
|
274
|
+
publicName: "dropdown",
|
|
275
|
+
isSignal: true,
|
|
276
|
+
isRequired: false,
|
|
277
|
+
transformFunction: null
|
|
278
|
+
},
|
|
279
|
+
dropdownMode: {
|
|
280
|
+
classPropertyName: "dropdownMode",
|
|
281
|
+
publicName: "dropdownMode",
|
|
282
|
+
isSignal: true,
|
|
283
|
+
isRequired: false,
|
|
284
|
+
transformFunction: null
|
|
285
|
+
},
|
|
286
|
+
multiple: {
|
|
287
|
+
classPropertyName: "multiple",
|
|
288
|
+
publicName: "multiple",
|
|
289
|
+
isSignal: true,
|
|
290
|
+
isRequired: false,
|
|
291
|
+
transformFunction: null
|
|
292
|
+
},
|
|
293
|
+
forceSelection: {
|
|
294
|
+
classPropertyName: "forceSelection",
|
|
295
|
+
publicName: "forceSelection",
|
|
296
|
+
isSignal: true,
|
|
297
|
+
isRequired: false,
|
|
298
|
+
transformFunction: null
|
|
299
|
+
},
|
|
300
|
+
disabled: {
|
|
301
|
+
classPropertyName: "disabled",
|
|
302
|
+
publicName: "disabled",
|
|
303
|
+
isSignal: true,
|
|
304
|
+
isRequired: false,
|
|
305
|
+
transformFunction: null
|
|
306
|
+
},
|
|
307
|
+
readonly: {
|
|
308
|
+
classPropertyName: "readonly",
|
|
309
|
+
publicName: "readonly",
|
|
310
|
+
isSignal: true,
|
|
311
|
+
isRequired: false,
|
|
312
|
+
transformFunction: null
|
|
313
|
+
},
|
|
314
|
+
required: {
|
|
315
|
+
classPropertyName: "required",
|
|
316
|
+
publicName: "required",
|
|
317
|
+
isSignal: true,
|
|
318
|
+
isRequired: false,
|
|
319
|
+
transformFunction: null
|
|
320
|
+
},
|
|
321
|
+
invalid: {
|
|
322
|
+
classPropertyName: "invalid",
|
|
323
|
+
publicName: "invalid",
|
|
324
|
+
isSignal: true,
|
|
325
|
+
isRequired: false,
|
|
326
|
+
transformFunction: null
|
|
327
|
+
},
|
|
328
|
+
loading: {
|
|
329
|
+
classPropertyName: "loading",
|
|
330
|
+
publicName: "loading",
|
|
331
|
+
isSignal: true,
|
|
332
|
+
isRequired: false,
|
|
333
|
+
transformFunction: null
|
|
334
|
+
},
|
|
335
|
+
showClear: {
|
|
336
|
+
classPropertyName: "showClear",
|
|
337
|
+
publicName: "showClear",
|
|
338
|
+
isSignal: true,
|
|
339
|
+
isRequired: false,
|
|
340
|
+
transformFunction: null
|
|
341
|
+
},
|
|
342
|
+
minLength: {
|
|
343
|
+
classPropertyName: "minLength",
|
|
344
|
+
publicName: "minLength",
|
|
345
|
+
isSignal: true,
|
|
346
|
+
isRequired: false,
|
|
347
|
+
transformFunction: null
|
|
348
|
+
},
|
|
349
|
+
delay: {
|
|
350
|
+
classPropertyName: "delay",
|
|
351
|
+
publicName: "delay",
|
|
352
|
+
isSignal: true,
|
|
353
|
+
isRequired: false,
|
|
354
|
+
transformFunction: null
|
|
355
|
+
},
|
|
356
|
+
emptyMessage: {
|
|
357
|
+
classPropertyName: "emptyMessage",
|
|
358
|
+
publicName: "emptyMessage",
|
|
359
|
+
isSignal: true,
|
|
360
|
+
isRequired: false,
|
|
361
|
+
transformFunction: null
|
|
362
|
+
}
|
|
363
|
+
},
|
|
364
|
+
outputs: {
|
|
365
|
+
completeMethod: "completeMethod",
|
|
366
|
+
onSelect: "onSelect",
|
|
367
|
+
onUnselect: "onUnselect",
|
|
368
|
+
onClear: "onClear"
|
|
369
|
+
},
|
|
370
|
+
host: {
|
|
371
|
+
listeners: { "focusout": "leave($event)" },
|
|
372
|
+
properties: {
|
|
373
|
+
"class.disabled": "isDisabled()",
|
|
374
|
+
"class.invalid": "invalid()",
|
|
375
|
+
"class.fluid": "fluid()"
|
|
376
|
+
}
|
|
377
|
+
},
|
|
378
|
+
providers: [{
|
|
379
|
+
provide: NG_VALUE_ACCESSOR,
|
|
380
|
+
useExisting: forwardRef(() => AvAutoComplete),
|
|
381
|
+
multi: true
|
|
382
|
+
}],
|
|
383
|
+
queries: [{
|
|
384
|
+
propertyName: "itemTemplate",
|
|
385
|
+
first: true,
|
|
386
|
+
predicate: ["item"],
|
|
387
|
+
descendants: true,
|
|
388
|
+
isSignal: true
|
|
389
|
+
}],
|
|
390
|
+
viewQueries: [{
|
|
391
|
+
propertyName: "field",
|
|
392
|
+
first: true,
|
|
393
|
+
predicate: ["field"],
|
|
394
|
+
descendants: true,
|
|
395
|
+
isSignal: true
|
|
396
|
+
}],
|
|
397
|
+
hostDirectives: [{
|
|
398
|
+
directive: AvFluidControl,
|
|
399
|
+
inputs: ["fluid", "fluid"]
|
|
400
|
+
}],
|
|
401
|
+
ngImport: i0,
|
|
402
|
+
template: "<div class=\"control\">\n @if (multiple()) {\n @for (option of selected(); track $index) {\n <span class=\"chip\">{{ label(option) }}<button type=\"button\" [disabled]=\"isDisabled() || readonly()\" [attr.aria-label]=\"'Remove ' + label(option)\" (click)=\"remove($index, $event)\">×</button></span>\n }\n }\n <input #field [id]=\"inputId()\" type=\"text\" role=\"combobox\" autocomplete=\"off\" aria-autocomplete=\"list\" aria-haspopup=\"listbox\"\n [value]=\"text()\" [placeholder]=\"placeholder()\" [disabled]=\"isDisabled()\" [readOnly]=\"readonly()\" [required]=\"required() && !selected().length\"\n [attr.aria-label]=\"ariaLabel() || null\" [attr.aria-describedby]=\"describedBy()\" [attr.aria-invalid]=\"invalid() || null\"\n [attr.aria-expanded]=\"open()\" [attr.aria-controls]=\"open() ? inputId() + '-list' : null\" [attr.aria-activedescendant]=\"activeId()\"\n (input)=\"edit($event)\" (compositionend)=\"edit($event)\" (keydown)=\"key($event)\" />\n @if (loading()) { <span class=\"loading\" aria-hidden=\"true\">◌</span> }\n @if (showClear() && (text() || selected().length)) { <button class=\"action\" type=\"button\" aria-label=\"Clear selection\" [disabled]=\"isDisabled() || readonly()\" (click)=\"clear($event)\">×</button> }\n @if (dropdown()) { <button class=\"action dropdown\" type=\"button\" aria-label=\"Show suggestions\" [attr.aria-expanded]=\"open()\" [disabled]=\"isDisabled() || readonly()\" (click)=\"toggle($event)\">⌄</button> }\n</div>\n@if (open()) {\n <div class=\"panel\">\n <ul [id]=\"inputId() + '-list'\" role=\"listbox\" [attr.aria-label]=\"ariaLabel() || 'Suggestions'\" [attr.aria-busy]=\"loading()\">\n @for (option of options(); track $index) {\n <li role=\"option\" [id]=\"inputId() + '-option-' + $index\" [attr.aria-selected]=\"active() === $index\" [class.active]=\"active() === $index\" (pointerdown)=\"$event.preventDefault()\" (click)=\"choose(option, $event)\">\n @if (itemTemplate(); as template) { <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: option }\" /> }\n @else { {{ label(option) }} }\n </li>\n }\n </ul>\n @if (loading() || !options().length) { <p class=\"empty\" role=\"status\">{{ loading() ? 'Loading…' : emptyMessage() }}</p> }\n </div>\n}\n",
|
|
403
|
+
styles: [":host{display:inline-block;position:relative;width:280px;max-width:100%;font:inherit;color:var(--av-text, #334b43)}:host.fluid{width:100%}.control{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-height:42px;box-sizing:border-box;padding:5px 10px;border:1px solid var(--av-auto-complete-border, var(--av-border, #cbd9d2));border-radius:8px;background:var(--av-auto-complete-background, var(--av-surface, white))}.control:focus-within{border-color:var(--av-primary, #16815e);outline:3px solid var(--av-focus-ring, rgba(22, 129, 94, .1333333333))}input{flex:1;min-width:60px;width:0;padding:5px 0;border:0;outline:0;background:transparent;color:inherit;font:inherit;font-size:14px}button{border:0;background:transparent;color:inherit;cursor:pointer;font:inherit}button:focus-visible{outline:2px solid var(--av-primary, #16815e);outline-offset:2px;border-radius:4px}button:disabled{cursor:default}.action{width:26px;height:28px;font-size:20px}.chip{display:inline-flex;align-items:center;gap:4px;border-radius:16px;background:var(--av-primary-soft, #eaf3ee);padding:2px 8px;font-size:13px;overflow-wrap:anywhere;max-width:100%}.chip button{font-size:18px}.panel{position:absolute;inset-inline:0;top:calc(100% + 6px);z-index:100;background:var(--av-auto-complete-background, var(--av-surface, white));border:1px solid var(--av-border, #dce6e0);border-radius:10px;box-shadow:0 8px 24px var(--av-shadow-color, rgba(23, 62, 41, .1490196078));max-height:240px;overflow:auto}ul{margin:0;padding:5px;list-style:none}li{padding:10px 12px;border-radius:6px;cursor:pointer;font-size:14px;overflow-wrap:anywhere}li:hover,li.active{background:var(--av-auto-complete-option-active, var(--av-primary-soft, #e7f3ec))}.empty{padding:10px 16px;margin:0;font-size:13px;color:var(--av-text-muted, #60756b)}:host.disabled{opacity:.6}:host.invalid .control{border-color:var(--av-danger, #c84343)}.loading{animation:rotate 1s linear infinite}@keyframes rotate{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.loading{animation:none}}\n"],
|
|
404
|
+
dependencies: [{
|
|
405
|
+
kind: "directive",
|
|
406
|
+
type: NgTemplateOutlet,
|
|
407
|
+
selector: "[ngTemplateOutlet]",
|
|
408
|
+
inputs: [
|
|
409
|
+
"ngTemplateOutletContext",
|
|
410
|
+
"ngTemplateOutlet",
|
|
411
|
+
"ngTemplateOutletInjector"
|
|
412
|
+
]
|
|
413
|
+
}],
|
|
414
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
415
|
+
});
|
|
416
|
+
};
|
|
417
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
418
|
+
minVersion: "12.0.0",
|
|
419
|
+
version: "22.3.2",
|
|
420
|
+
ngImport: i0,
|
|
421
|
+
type: AvAutoComplete,
|
|
422
|
+
decorators: [{
|
|
423
|
+
type: Component,
|
|
424
|
+
args: [{
|
|
425
|
+
hostDirectives: [{
|
|
426
|
+
directive: AvFluidControl,
|
|
427
|
+
inputs: ["fluid"]
|
|
428
|
+
}],
|
|
429
|
+
selector: "av-auto-complete",
|
|
430
|
+
standalone: true,
|
|
431
|
+
imports: [NgTemplateOutlet],
|
|
432
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
433
|
+
providers: [{
|
|
434
|
+
provide: NG_VALUE_ACCESSOR,
|
|
435
|
+
useExisting: forwardRef(() => AvAutoComplete),
|
|
436
|
+
multi: true
|
|
437
|
+
}],
|
|
438
|
+
host: {
|
|
439
|
+
"(focusout)": "leave($event)",
|
|
440
|
+
"[class.disabled]": "isDisabled()",
|
|
441
|
+
"[class.invalid]": "invalid()",
|
|
442
|
+
"[class.fluid]": "fluid()"
|
|
443
|
+
},
|
|
444
|
+
template: "<div class=\"control\">\n @if (multiple()) {\n @for (option of selected(); track $index) {\n <span class=\"chip\">{{ label(option) }}<button type=\"button\" [disabled]=\"isDisabled() || readonly()\" [attr.aria-label]=\"'Remove ' + label(option)\" (click)=\"remove($index, $event)\">×</button></span>\n }\n }\n <input #field [id]=\"inputId()\" type=\"text\" role=\"combobox\" autocomplete=\"off\" aria-autocomplete=\"list\" aria-haspopup=\"listbox\"\n [value]=\"text()\" [placeholder]=\"placeholder()\" [disabled]=\"isDisabled()\" [readOnly]=\"readonly()\" [required]=\"required() && !selected().length\"\n [attr.aria-label]=\"ariaLabel() || null\" [attr.aria-describedby]=\"describedBy()\" [attr.aria-invalid]=\"invalid() || null\"\n [attr.aria-expanded]=\"open()\" [attr.aria-controls]=\"open() ? inputId() + '-list' : null\" [attr.aria-activedescendant]=\"activeId()\"\n (input)=\"edit($event)\" (compositionend)=\"edit($event)\" (keydown)=\"key($event)\" />\n @if (loading()) { <span class=\"loading\" aria-hidden=\"true\">◌</span> }\n @if (showClear() && (text() || selected().length)) { <button class=\"action\" type=\"button\" aria-label=\"Clear selection\" [disabled]=\"isDisabled() || readonly()\" (click)=\"clear($event)\">×</button> }\n @if (dropdown()) { <button class=\"action dropdown\" type=\"button\" aria-label=\"Show suggestions\" [attr.aria-expanded]=\"open()\" [disabled]=\"isDisabled() || readonly()\" (click)=\"toggle($event)\">⌄</button> }\n</div>\n@if (open()) {\n <div class=\"panel\">\n <ul [id]=\"inputId() + '-list'\" role=\"listbox\" [attr.aria-label]=\"ariaLabel() || 'Suggestions'\" [attr.aria-busy]=\"loading()\">\n @for (option of options(); track $index) {\n <li role=\"option\" [id]=\"inputId() + '-option-' + $index\" [attr.aria-selected]=\"active() === $index\" [class.active]=\"active() === $index\" (pointerdown)=\"$event.preventDefault()\" (click)=\"choose(option, $event)\">\n @if (itemTemplate(); as template) { <ng-container [ngTemplateOutlet]=\"template\" [ngTemplateOutletContext]=\"{ $implicit: option }\" /> }\n @else { {{ label(option) }} }\n </li>\n }\n </ul>\n @if (loading() || !options().length) { <p class=\"empty\" role=\"status\">{{ loading() ? 'Loading…' : emptyMessage() }}</p> }\n </div>\n}\n",
|
|
445
|
+
styles: [":host{display:inline-block;position:relative;width:280px;max-width:100%;font:inherit;color:var(--av-text, #334b43)}:host.fluid{width:100%}.control{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-height:42px;box-sizing:border-box;padding:5px 10px;border:1px solid var(--av-auto-complete-border, var(--av-border, #cbd9d2));border-radius:8px;background:var(--av-auto-complete-background, var(--av-surface, white))}.control:focus-within{border-color:var(--av-primary, #16815e);outline:3px solid var(--av-focus-ring, rgba(22, 129, 94, .1333333333))}input{flex:1;min-width:60px;width:0;padding:5px 0;border:0;outline:0;background:transparent;color:inherit;font:inherit;font-size:14px}button{border:0;background:transparent;color:inherit;cursor:pointer;font:inherit}button:focus-visible{outline:2px solid var(--av-primary, #16815e);outline-offset:2px;border-radius:4px}button:disabled{cursor:default}.action{width:26px;height:28px;font-size:20px}.chip{display:inline-flex;align-items:center;gap:4px;border-radius:16px;background:var(--av-primary-soft, #eaf3ee);padding:2px 8px;font-size:13px;overflow-wrap:anywhere;max-width:100%}.chip button{font-size:18px}.panel{position:absolute;inset-inline:0;top:calc(100% + 6px);z-index:100;background:var(--av-auto-complete-background, var(--av-surface, white));border:1px solid var(--av-border, #dce6e0);border-radius:10px;box-shadow:0 8px 24px var(--av-shadow-color, rgba(23, 62, 41, .1490196078));max-height:240px;overflow:auto}ul{margin:0;padding:5px;list-style:none}li{padding:10px 12px;border-radius:6px;cursor:pointer;font-size:14px;overflow-wrap:anywhere}li:hover,li.active{background:var(--av-auto-complete-option-active, var(--av-primary-soft, #e7f3ec))}.empty{padding:10px 16px;margin:0;font-size:13px;color:var(--av-text-muted, #60756b)}:host.disabled{opacity:.6}:host.invalid .control{border-color:var(--av-danger, #c84343)}.loading{animation:rotate 1s linear infinite}@keyframes rotate{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.loading{animation:none}}\n"]
|
|
446
|
+
}]
|
|
447
|
+
}],
|
|
448
|
+
ctorParameters: () => [],
|
|
449
|
+
propDecorators: {
|
|
450
|
+
inputId: [{
|
|
451
|
+
type: i0.Input,
|
|
452
|
+
args: [{
|
|
453
|
+
isSignal: true,
|
|
454
|
+
alias: "inputId",
|
|
455
|
+
required: false
|
|
456
|
+
}]
|
|
457
|
+
}],
|
|
458
|
+
suggestions: [{
|
|
459
|
+
type: i0.Input,
|
|
460
|
+
args: [{
|
|
461
|
+
isSignal: true,
|
|
462
|
+
alias: "suggestions",
|
|
463
|
+
required: false
|
|
464
|
+
}]
|
|
465
|
+
}],
|
|
466
|
+
optionLabel: [{
|
|
467
|
+
type: i0.Input,
|
|
468
|
+
args: [{
|
|
469
|
+
isSignal: true,
|
|
470
|
+
alias: "optionLabel",
|
|
471
|
+
required: false
|
|
472
|
+
}]
|
|
473
|
+
}],
|
|
474
|
+
dataKey: [{
|
|
475
|
+
type: i0.Input,
|
|
476
|
+
args: [{
|
|
477
|
+
isSignal: true,
|
|
478
|
+
alias: "dataKey",
|
|
479
|
+
required: false
|
|
480
|
+
}]
|
|
481
|
+
}],
|
|
482
|
+
placeholder: [{
|
|
483
|
+
type: i0.Input,
|
|
484
|
+
args: [{
|
|
485
|
+
isSignal: true,
|
|
486
|
+
alias: "placeholder",
|
|
487
|
+
required: false
|
|
488
|
+
}]
|
|
489
|
+
}],
|
|
490
|
+
ariaLabel: [{
|
|
491
|
+
type: i0.Input,
|
|
492
|
+
args: [{
|
|
493
|
+
isSignal: true,
|
|
494
|
+
alias: "ariaLabel",
|
|
495
|
+
required: false
|
|
496
|
+
}]
|
|
497
|
+
}],
|
|
498
|
+
describedBy: [{
|
|
499
|
+
type: i0.Input,
|
|
500
|
+
args: [{
|
|
501
|
+
isSignal: true,
|
|
502
|
+
alias: "describedBy",
|
|
503
|
+
required: false
|
|
504
|
+
}]
|
|
505
|
+
}],
|
|
506
|
+
dropdown: [{
|
|
507
|
+
type: i0.Input,
|
|
508
|
+
args: [{
|
|
509
|
+
isSignal: true,
|
|
510
|
+
alias: "dropdown",
|
|
511
|
+
required: false
|
|
512
|
+
}]
|
|
513
|
+
}],
|
|
514
|
+
dropdownMode: [{
|
|
515
|
+
type: i0.Input,
|
|
516
|
+
args: [{
|
|
517
|
+
isSignal: true,
|
|
518
|
+
alias: "dropdownMode",
|
|
519
|
+
required: false
|
|
520
|
+
}]
|
|
521
|
+
}],
|
|
522
|
+
multiple: [{
|
|
523
|
+
type: i0.Input,
|
|
524
|
+
args: [{
|
|
525
|
+
isSignal: true,
|
|
526
|
+
alias: "multiple",
|
|
527
|
+
required: false
|
|
528
|
+
}]
|
|
529
|
+
}],
|
|
530
|
+
forceSelection: [{
|
|
531
|
+
type: i0.Input,
|
|
532
|
+
args: [{
|
|
533
|
+
isSignal: true,
|
|
534
|
+
alias: "forceSelection",
|
|
535
|
+
required: false
|
|
536
|
+
}]
|
|
537
|
+
}],
|
|
538
|
+
disabled: [{
|
|
539
|
+
type: i0.Input,
|
|
540
|
+
args: [{
|
|
541
|
+
isSignal: true,
|
|
542
|
+
alias: "disabled",
|
|
543
|
+
required: false
|
|
544
|
+
}]
|
|
545
|
+
}],
|
|
546
|
+
readonly: [{
|
|
547
|
+
type: i0.Input,
|
|
548
|
+
args: [{
|
|
549
|
+
isSignal: true,
|
|
550
|
+
alias: "readonly",
|
|
551
|
+
required: false
|
|
552
|
+
}]
|
|
553
|
+
}],
|
|
554
|
+
required: [{
|
|
555
|
+
type: i0.Input,
|
|
556
|
+
args: [{
|
|
557
|
+
isSignal: true,
|
|
558
|
+
alias: "required",
|
|
559
|
+
required: false
|
|
560
|
+
}]
|
|
561
|
+
}],
|
|
562
|
+
invalid: [{
|
|
563
|
+
type: i0.Input,
|
|
564
|
+
args: [{
|
|
565
|
+
isSignal: true,
|
|
566
|
+
alias: "invalid",
|
|
567
|
+
required: false
|
|
568
|
+
}]
|
|
569
|
+
}],
|
|
570
|
+
loading: [{
|
|
571
|
+
type: i0.Input,
|
|
572
|
+
args: [{
|
|
573
|
+
isSignal: true,
|
|
574
|
+
alias: "loading",
|
|
575
|
+
required: false
|
|
576
|
+
}]
|
|
577
|
+
}],
|
|
578
|
+
showClear: [{
|
|
579
|
+
type: i0.Input,
|
|
580
|
+
args: [{
|
|
581
|
+
isSignal: true,
|
|
582
|
+
alias: "showClear",
|
|
583
|
+
required: false
|
|
584
|
+
}]
|
|
585
|
+
}],
|
|
586
|
+
minLength: [{
|
|
587
|
+
type: i0.Input,
|
|
588
|
+
args: [{
|
|
589
|
+
isSignal: true,
|
|
590
|
+
alias: "minLength",
|
|
591
|
+
required: false
|
|
592
|
+
}]
|
|
593
|
+
}],
|
|
594
|
+
delay: [{
|
|
595
|
+
type: i0.Input,
|
|
596
|
+
args: [{
|
|
597
|
+
isSignal: true,
|
|
598
|
+
alias: "delay",
|
|
599
|
+
required: false
|
|
600
|
+
}]
|
|
601
|
+
}],
|
|
602
|
+
emptyMessage: [{
|
|
603
|
+
type: i0.Input,
|
|
604
|
+
args: [{
|
|
605
|
+
isSignal: true,
|
|
606
|
+
alias: "emptyMessage",
|
|
607
|
+
required: false
|
|
608
|
+
}]
|
|
609
|
+
}],
|
|
610
|
+
completeMethod: [{
|
|
611
|
+
type: i0.Output,
|
|
612
|
+
args: ["completeMethod"]
|
|
613
|
+
}],
|
|
614
|
+
onSelect: [{
|
|
615
|
+
type: i0.Output,
|
|
616
|
+
args: ["onSelect"]
|
|
617
|
+
}],
|
|
618
|
+
onUnselect: [{
|
|
619
|
+
type: i0.Output,
|
|
620
|
+
args: ["onUnselect"]
|
|
621
|
+
}],
|
|
622
|
+
onClear: [{
|
|
623
|
+
type: i0.Output,
|
|
624
|
+
args: ["onClear"]
|
|
625
|
+
}],
|
|
626
|
+
itemTemplate: [{
|
|
627
|
+
type: i0.ContentChild,
|
|
628
|
+
args: ["item", { isSignal: true }]
|
|
629
|
+
}],
|
|
630
|
+
field: [{
|
|
631
|
+
type: i0.ViewChild,
|
|
632
|
+
args: ["field", { isSignal: true }]
|
|
633
|
+
}]
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
export { AvAutoComplete };
|
|
637
|
+
|
|
638
|
+
//# sourceMappingURL=avero-ui-auto-complete.mjs.map
|