@acorex/components 22.0.0-next.9 → 22.1.0-next.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.
Files changed (51) hide show
  1. package/combo-box/README.md +26 -0
  2. package/fesm2022/acorex-components-calendar.mjs +10 -12
  3. package/fesm2022/acorex-components-calendar.mjs.map +1 -1
  4. package/fesm2022/acorex-components-combo-box.mjs +237 -0
  5. package/fesm2022/acorex-components-combo-box.mjs.map +1 -0
  6. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs +50 -0
  7. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs.map +1 -0
  8. package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs → acorex-components-conversation-open-composer-picker-for-files-BuNEjswI.mjs} +2 -2
  9. package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs.map → acorex-components-conversation-open-composer-picker-for-files-BuNEjswI.mjs.map} +1 -1
  10. package/fesm2022/acorex-components-conversation.mjs +2034 -7467
  11. package/fesm2022/acorex-components-conversation.mjs.map +1 -1
  12. package/fesm2022/acorex-components-data-table.mjs +135 -45
  13. package/fesm2022/acorex-components-data-table.mjs.map +1 -1
  14. package/fesm2022/acorex-components-datetime-box.mjs +14 -16
  15. package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
  16. package/fesm2022/acorex-components-datetime-input.mjs +61 -32
  17. package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
  18. package/fesm2022/acorex-components-dialog.mjs +3 -2
  19. package/fesm2022/acorex-components-dialog.mjs.map +1 -1
  20. package/fesm2022/acorex-components-file-viewer.mjs +27 -27
  21. package/fesm2022/acorex-components-file-viewer.mjs.map +1 -1
  22. package/fesm2022/acorex-components-grid-layout-builder.mjs +238 -36
  23. package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
  24. package/fesm2022/acorex-components-list.mjs +2 -2
  25. package/fesm2022/acorex-components-list.mjs.map +1 -1
  26. package/fesm2022/acorex-components-lookup.mjs +1292 -0
  27. package/fesm2022/acorex-components-lookup.mjs.map +1 -0
  28. package/fesm2022/acorex-components-menu.mjs +211 -74
  29. package/fesm2022/acorex-components-menu.mjs.map +1 -1
  30. package/fesm2022/acorex-components-number-box.mjs +30 -29
  31. package/fesm2022/acorex-components-number-box.mjs.map +1 -1
  32. package/fesm2022/acorex-components-scheduler.mjs +7 -17
  33. package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
  34. package/fesm2022/acorex-components-select-box.mjs +2 -2
  35. package/fesm2022/acorex-components-select-box.mjs.map +1 -1
  36. package/fesm2022/acorex-components-tag-box.mjs +2 -2
  37. package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
  38. package/lookup/README.md +47 -0
  39. package/package.json +11 -3
  40. package/types/acorex-components-combo-box.d.ts +114 -0
  41. package/types/acorex-components-conversation.d.ts +317 -94
  42. package/types/acorex-components-data-table.d.ts +35 -3
  43. package/types/acorex-components-datetime-box.d.ts +2 -0
  44. package/types/acorex-components-datetime-input.d.ts +24 -5
  45. package/types/acorex-components-grid-layout-builder.d.ts +34 -2
  46. package/types/acorex-components-lookup.d.ts +454 -0
  47. package/types/acorex-components-menu.d.ts +26 -4
  48. package/types/acorex-components-number-box.d.ts +3 -1
  49. package/types/acorex-components-scheduler.d.ts +2 -4
  50. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CNHiM1Sp.mjs +0 -106
  51. package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CNHiM1Sp.mjs.map +0 -1
@@ -0,0 +1,237 @@
1
+ import { NXComponent, AXComponent } from '@acorex/cdk/common';
2
+ import { AXPopoverComponent } from '@acorex/components/popover';
3
+ import { AXTranslatorPipe } from '@acorex/core/translation';
4
+ import { Combobox, ComboboxPopup, ComboboxWidget } from '@angular/aria/combobox';
5
+ import { Listbox, Option } from '@angular/aria/listbox';
6
+ import { AsyncPipe } from '@angular/common';
7
+ import * as i0 from '@angular/core';
8
+ import { input, model, output, signal, computed, linkedSignal, viewChild, effect, untracked, afterRenderEffect, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
9
+
10
+ /**
11
+ * A minimal combo box for selecting a single value from a list of items.
12
+ *
13
+ * Built on top of the `@angular/aria/combobox` directives, it supports two behaviors:
14
+ * - `searchable="true"` (default): an input with typeahead filtering (matches `id`).
15
+ * - `searchable="false"`: a select-like trigger (same input, read-only).
16
+ *
17
+ * Items use `text` for display, `id` for search/identity, and `value` as the submitted model value.
18
+ *
19
+ * @category Components
20
+ */
21
+ class AXComboBoxComponent extends NXComponent {
22
+ #isUserInteraction;
23
+ #lastValue;
24
+ #lastExpanded;
25
+ constructor() {
26
+ super();
27
+ /**
28
+ * The list of items the user can select from.
29
+ * Each item has `id` (search/identity), `text` (display), and `value` (submitted).
30
+ */
31
+ this.items = input([], /* @ts-ignore */
32
+ ...(ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []));
33
+ /**
34
+ * Whether the combo box accepts typing and filters the list (`true`),
35
+ * or is a select-like, read-only trigger (`false`).
36
+ */
37
+ this.searchable = input(true, /* @ts-ignore */
38
+ ...(ngDevMode ? [{ debugName: "searchable" }] : /* istanbul ignore next */ []));
39
+ /**
40
+ * The placeholder text shown when no value is selected.
41
+ */
42
+ this.placeholder = input('', /* @ts-ignore */
43
+ ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
44
+ /**
45
+ * Whether the combo box is disabled.
46
+ */
47
+ this.disabled = model(false, /* @ts-ignore */
48
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
49
+ /**
50
+ * Whether the combo box is readonly.
51
+ */
52
+ this.readonly = model(false, /* @ts-ignore */
53
+ ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
54
+ /**
55
+ * Predefined look scheme of the editor container. Same looks as other editor components like ax-text-box.
56
+ */
57
+ this.look = model('solid', /* @ts-ignore */
58
+ ...(ngDevMode ? [{ debugName: "look" }] : /* istanbul ignore next */ []));
59
+ /**
60
+ * The selected item's `value`. Supports two-way binding.
61
+ */
62
+ this.value = model(null, /* @ts-ignore */
63
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
64
+ /**
65
+ * Emitted when the selected value changes.
66
+ */
67
+ this.onValueChanged = output();
68
+ /**
69
+ * Emitted when the popup list opens.
70
+ */
71
+ this.onOpened = output();
72
+ /**
73
+ * Emitted when the popup list closes.
74
+ */
75
+ this.onClosed = output();
76
+ /** Whether the popup is expanded. */
77
+ this.expanded = signal(false, /* @ts-ignore */
78
+ ...(ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []));
79
+ /** The item whose `value` matches the current model value. */
80
+ this.selectedItem = computed(() => {
81
+ const value = this.value();
82
+ if (value == null) {
83
+ return null;
84
+ }
85
+ return this.items().find((item) => item.value === value) ?? null;
86
+ }, /* @ts-ignore */
87
+ ...(ngDevMode ? [{ debugName: "selectedItem" }] : /* istanbul ignore next */ []));
88
+ /** Display text shown in the trigger / used as the searchable input baseline. */
89
+ this.displayText = computed(() => this.selectedItem()?.text ?? '', /* @ts-ignore */
90
+ ...(ngDevMode ? [{ debugName: "displayText" }] : /* istanbul ignore next */ []));
91
+ /** The text typed in the searchable input. Resets to the selected item's text. */
92
+ this.searchText = linkedSignal(() => this.displayText(), /* @ts-ignore */
93
+ ...(ngDevMode ? [{ debugName: "searchText" }] : /* istanbul ignore next */ []));
94
+ /** The listbox selection (item ids), kept in sync with the selected value. */
95
+ this.selection = linkedSignal(() => {
96
+ const id = this.selectedItem()?.id;
97
+ return id != null ? [id] : [];
98
+ }, /* @ts-ignore */
99
+ ...(ngDevMode ? [{ debugName: "selection" }] : /* istanbul ignore next */ []));
100
+ /** Items filtered by typed query against `id` when the combo box is searchable. */
101
+ this.filteredItems = computed(() => {
102
+ const items = this.items();
103
+ if (!this.searchable()) {
104
+ return items;
105
+ }
106
+ const query = this.searchText().trim().toLowerCase();
107
+ const selectedId = (this.selectedItem()?.id ?? '').toLowerCase();
108
+ if (!query || query === selectedId || query === this.displayText().trim().toLowerCase()) {
109
+ return items;
110
+ }
111
+ return items.filter((item) => item.id.toLowerCase().includes(query));
112
+ }, /* @ts-ignore */
113
+ ...(ngDevMode ? [{ debugName: "filteredItems" }] : /* istanbul ignore next */ []));
114
+ this.comboboxRef = viewChild(Combobox, /* @ts-ignore */
115
+ ...(ngDevMode ? [{ debugName: "comboboxRef" }] : /* istanbul ignore next */ []));
116
+ this.listboxRef = viewChild(Listbox, /* @ts-ignore */
117
+ ...(ngDevMode ? [{ debugName: "listboxRef" }] : /* istanbul ignore next */ []));
118
+ this.popoverRef = viewChild(AXPopoverComponent, /* @ts-ignore */
119
+ ...(ngDevMode ? [{ debugName: "popoverRef" }] : /* istanbul ignore next */ []));
120
+ this.#isUserInteraction = false;
121
+ this.#lastValue = undefined;
122
+ this.#lastExpanded = undefined;
123
+ effect(() => this.#emitValueChanged(this.value()));
124
+ effect(() => this.#emitOpenedOrClosed(this.expanded()));
125
+ // Open during CD (before render) so the overlay exists before Aria DeferredContent
126
+ // creates the list in its after-render hook.
127
+ effect(() => {
128
+ const expanded = this.expanded();
129
+ const popover = this.popoverRef();
130
+ if (!popover) {
131
+ return;
132
+ }
133
+ untracked(() => {
134
+ if (expanded && !popover.isOpen) {
135
+ void popover.open();
136
+ }
137
+ else if (!expanded && popover.isOpen) {
138
+ popover.close();
139
+ }
140
+ });
141
+ });
142
+ afterRenderEffect(() => {
143
+ if (this.expanded()) {
144
+ this.listboxRef()?.scrollActiveItemIntoView();
145
+ }
146
+ });
147
+ }
148
+ /** Emits onValueChanged when the value actually changes (skips the initial value). */
149
+ #emitValueChanged(value) {
150
+ const previous = this.#lastValue;
151
+ this.#lastValue = value;
152
+ if (previous === undefined || previous === value) {
153
+ return;
154
+ }
155
+ this.onValueChanged.emit({
156
+ component: this,
157
+ htmlElement: this.nativeElement,
158
+ name: 'value',
159
+ value,
160
+ oldValue: previous,
161
+ isUserInteraction: this.#isUserInteraction,
162
+ });
163
+ this.#isUserInteraction = false;
164
+ }
165
+ /** Emits onOpened/onClosed when the expanded state actually changes (skips the initial state). */
166
+ #emitOpenedOrClosed(expanded) {
167
+ const previous = this.#lastExpanded;
168
+ this.#lastExpanded = expanded;
169
+ if (previous === undefined || previous === expanded) {
170
+ return;
171
+ }
172
+ const event = {
173
+ component: this,
174
+ htmlElement: this.nativeElement,
175
+ isUserInteraction: true,
176
+ };
177
+ expanded ? this.onOpened.emit(event) : this.onClosed.emit(event);
178
+ }
179
+ /**
180
+ * Opens (searchable) or toggles (non-searchable) the popup on trigger click.
181
+ */
182
+ onTriggerClick() {
183
+ if (this.disabled() || this.readonly()) {
184
+ return;
185
+ }
186
+ if (this.searchable()) {
187
+ this.expanded.set(true);
188
+ return;
189
+ }
190
+ this.expanded.update((open) => !open);
191
+ }
192
+ /**
193
+ * Keeps the combobox expanded state in sync when the popover closes (e.g. click outside).
194
+ */
195
+ onPopoverClosed() {
196
+ this.expanded.set(false);
197
+ }
198
+ /**
199
+ * Commits the current listbox selection as the component value and closes the popup.
200
+ */
201
+ commit() {
202
+ const selectedId = this.selection()[0];
203
+ const item = selectedId != null ? this.items().find((i) => i.id === selectedId) : undefined;
204
+ if (item != null && item.value !== this.value()) {
205
+ this.#isUserInteraction = true;
206
+ this.value.set(item.value);
207
+ }
208
+ this.expanded.set(false);
209
+ this.comboboxRef()?.element.focus();
210
+ }
211
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXComboBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
212
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXComboBoxComponent, isStandalone: true, selector: "ax-combo-box", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, searchable: { classPropertyName: "searchable", publicName: "searchable", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, look: { classPropertyName: "look", publicName: "look", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { disabled: "disabledChange", readonly: "readonlyChange", look: "lookChange", value: "valueChange", onValueChanged: "onValueChanged", onOpened: "onOpened", onClosed: "onClosed" }, providers: [{ provide: AXComponent, useExisting: AXComboBoxComponent }], viewQueries: [{ propertyName: "comboboxRef", first: true, predicate: Combobox, descendants: true, isSignal: true }, { propertyName: "listboxRef", first: true, predicate: Listbox, descendants: true, isSignal: true }, { propertyName: "popoverRef", first: true, predicate: AXPopoverComponent, descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div\n #origin\n class=\"ax-editor-container ax-{{ look() }} ax-default\"\n [class.ax-combo-box-trigger]=\"!searchable()\"\n [class.ax-state-disabled]=\"disabled()\"\n [class.ax-state-readonly]=\"readonly()\"\n>\n <ng-content select=\"ax-prefix\"></ng-content>\n\n <input\n ngCombobox\n #combobox=\"ngCombobox\"\n type=\"text\"\n class=\"ax-input\"\n [class.ax-combo-box-select-input]=\"!searchable()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly() || !searchable()\"\n [(value)]=\"searchText\"\n [(expanded)]=\"expanded\"\n (click)=\"onTriggerClick()\"\n />\n\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"onTriggerClick()\"\n >\n <span\n class=\"ax-icon\"\n [class.ax-icon-chevron-down]=\"!expanded()\"\n [class.ax-icon-chevron-up]=\"expanded()\"\n ></span>\n </button>\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n\n<ax-popover\n [target]=\"origin\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n [width]=\"origin.offsetWidth + 'px'\"\n [disabled]=\"disabled() || readonly()\"\n (onClosed)=\"onPopoverClosed()\"\n>\n <ng-template ngComboboxPopup [combobox]=\"combobox\">\n <div class=\"ax-combo-box-popup\" [class.ax-is-empty]=\"filteredItems().length === 0\">\n @if (filteredItems().length === 0) {\n <div class=\"ax-combo-box-empty\">{{ '@acorex:common.general.no-result-found' | translate | async }}</div>\n }\n <div\n ngListbox\n ngComboboxWidget\n #listbox=\"ngListbox\"\n class=\"ax-combo-box-listbox\"\n [class.ax-hidden]=\"filteredItems().length === 0\"\n focusMode=\"activedescendant\"\n selectionMode=\"explicit\"\n [tabindex]=\"-1\"\n [activeDescendant]=\"listbox.activeDescendant()\"\n [(value)]=\"selection\"\n (click)=\"commit()\"\n (keydown.enter)=\"commit()\"\n >\n @for (item of filteredItems(); track item.id) {\n <div ngOption class=\"ax-combo-box-option\" [value]=\"item.id\" [label]=\"item.text\">\n <span class=\"ax-combo-box-option-label\">{{ item.text }}</span>\n <span class=\"ax-combo-box-option-check\" aria-hidden=\"true\"></span>\n </div>\n }\n </div>\n </div>\n </ng-template>\n</ax-popover>\n", styles: ["@layer properties;@layer components{ax-combo-box{display:block;width:100%}ax-combo-box .ax-editor-container{justify-content:flex-start;gap:calc(var(--spacing, .25rem) * 1)}ax-combo-box .ax-editor-container.ax-state-disabled{cursor:not-allowed;opacity:50%}ax-combo-box .ax-editor-container.ax-state-disabled .ax-input,ax-combo-box .ax-editor-container.ax-state-disabled .ax-editor{cursor:not-allowed}ax-combo-box .ax-editor-container.ax-state-readonly{opacity:75%}ax-combo-box .ax-combo-box-trigger{cursor:pointer;--tw-outline-style: none;outline-style:none;-webkit-user-select:none;user-select:none}ax-combo-box .ax-combo-box-select-input{cursor:pointer;caret-color:transparent;-webkit-user-select:none;user-select:none}.ax-combo-box-popup{--ax-comp-combo-box-popup-max-height: 15rem;box-sizing:border-box;width:100%;overflow:hidden;border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));background-color:rgba(var(--ax-sys-color-lightest-surface));--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ax-combo-box-popup:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-darkest-surface))}.ax-combo-box-popup.ax-is-empty{display:flex;min-height:calc(var(--spacing, .25rem) * 12);align-items:center;justify-content:center}.ax-combo-box-listbox{display:flex;max-height:var(--ax-comp-combo-box-popup-max-height);flex-direction:column;gap:calc(var(--spacing, .25rem) * .5);overflow:auto;padding:calc(var(--spacing, .25rem) * 1);--tw-outline-style: none;outline-style:none}.ax-combo-box-listbox.ax-hidden{display:none}.ax-combo-box-empty{width:100%;padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 3);text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 60%,transparent)}}.ax-combo-box-option{display:flex;cursor:pointer;align-items:center;justify-content:space-between;border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:transparent;padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface));--tw-outline-style: none;outline-style:none}.ax-combo-box-option:hover{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-option:hover{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 5%,transparent)}}.ax-combo-box-option[data-active=true]{border-color:rgba(var(--ax-sys-color-primary-surface))}.ax-combo-box-option[aria-selected=true]{border-color:rgba(var(--ax-sys-color-primary-surface));background-color:rgba(var(--ax-sys-color-primary-lightest-surface));color:rgba(var(--ax-sys-color-primary-surface))}.ax-combo-box-option[aria-selected=true]:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-primary-darkest-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-option[aria-selected=true]:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-darkest-surface)) 25%,transparent)}}.ax-combo-box-option[aria-selected=true] .ax-combo-box-option-check{display:block;width:calc(var(--spacing, .25rem) * 2);height:calc(var(--spacing, .25rem) * 2);rotate:45deg;border-right-style:var(--tw-border-style);border-right-width:2px;border-bottom-style:var(--tw-border-style);border-bottom-width:2px;border-color:rgba(var(--ax-sys-color-primary-surface))}.ax-combo-box-option .ax-combo-box-option-check{display:none}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], dependencies: [{ kind: "directive", type: Combobox, selector: "[ngCombobox]", inputs: ["disabled", "readonly", "softDisabled", "alwaysExpanded", "tabindex", "expanded", "value", "inlineSuggestion"], outputs: ["expandedChange", "valueChange"], exportAs: ["ngCombobox"] }, { kind: "directive", type: ComboboxPopup, selector: "ng-template[ngComboboxPopup]", inputs: ["combobox", "popupType"], exportAs: ["ngComboboxPopup"] }, { kind: "directive", type: ComboboxWidget, selector: "[ngComboboxWidget]", inputs: ["activeDescendant"], exportAs: ["ngComboboxWidget"] }, { kind: "directive", type: Listbox, selector: "[ngListbox]", inputs: ["id", "orientation", "multi", "wrap", "softDisabled", "focusMode", "selectionMode", "typeaheadDelay", "disabled", "readonly", "tabindex", "value"], outputs: ["valueChange"], exportAs: ["ngListbox"] }, { kind: "directive", type: Option, selector: "[ngOption]", inputs: ["id", "value", "disabled", "label"], exportAs: ["ngOption"] }, { kind: "component", type: AXPopoverComponent, selector: "ax-popover", inputs: ["width", "disablePanelClass", "disabled", "offsetX", "offsetY", "target", "placement", "content", "openOn", "closeOn", "hasBackdrop", "openAfter", "closeAfter", "closeOnScroll", "backdropClass", "panelClass", "adaptivityEnabled"], outputs: ["onOpened", "onClosed"] }, { kind: "pipe", type: AXTranslatorPipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
213
+ }
214
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXComboBoxComponent, decorators: [{
215
+ type: Component,
216
+ args: [{ selector: 'ax-combo-box', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, imports: [Combobox, ComboboxPopup, ComboboxWidget, Listbox, Option, AXPopoverComponent, AXTranslatorPipe, AsyncPipe], providers: [{ provide: AXComponent, useExisting: AXComboBoxComponent }], template: "<div\n #origin\n class=\"ax-editor-container ax-{{ look() }} ax-default\"\n [class.ax-combo-box-trigger]=\"!searchable()\"\n [class.ax-state-disabled]=\"disabled()\"\n [class.ax-state-readonly]=\"readonly()\"\n>\n <ng-content select=\"ax-prefix\"></ng-content>\n\n <input\n ngCombobox\n #combobox=\"ngCombobox\"\n type=\"text\"\n class=\"ax-input\"\n [class.ax-combo-box-select-input]=\"!searchable()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly() || !searchable()\"\n [(value)]=\"searchText\"\n [(expanded)]=\"expanded\"\n (click)=\"onTriggerClick()\"\n />\n\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"onTriggerClick()\"\n >\n <span\n class=\"ax-icon\"\n [class.ax-icon-chevron-down]=\"!expanded()\"\n [class.ax-icon-chevron-up]=\"expanded()\"\n ></span>\n </button>\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n\n<ax-popover\n [target]=\"origin\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n [width]=\"origin.offsetWidth + 'px'\"\n [disabled]=\"disabled() || readonly()\"\n (onClosed)=\"onPopoverClosed()\"\n>\n <ng-template ngComboboxPopup [combobox]=\"combobox\">\n <div class=\"ax-combo-box-popup\" [class.ax-is-empty]=\"filteredItems().length === 0\">\n @if (filteredItems().length === 0) {\n <div class=\"ax-combo-box-empty\">{{ '@acorex:common.general.no-result-found' | translate | async }}</div>\n }\n <div\n ngListbox\n ngComboboxWidget\n #listbox=\"ngListbox\"\n class=\"ax-combo-box-listbox\"\n [class.ax-hidden]=\"filteredItems().length === 0\"\n focusMode=\"activedescendant\"\n selectionMode=\"explicit\"\n [tabindex]=\"-1\"\n [activeDescendant]=\"listbox.activeDescendant()\"\n [(value)]=\"selection\"\n (click)=\"commit()\"\n (keydown.enter)=\"commit()\"\n >\n @for (item of filteredItems(); track item.id) {\n <div ngOption class=\"ax-combo-box-option\" [value]=\"item.id\" [label]=\"item.text\">\n <span class=\"ax-combo-box-option-label\">{{ item.text }}</span>\n <span class=\"ax-combo-box-option-check\" aria-hidden=\"true\"></span>\n </div>\n }\n </div>\n </div>\n </ng-template>\n</ax-popover>\n", styles: ["@layer properties;@layer components{ax-combo-box{display:block;width:100%}ax-combo-box .ax-editor-container{justify-content:flex-start;gap:calc(var(--spacing, .25rem) * 1)}ax-combo-box .ax-editor-container.ax-state-disabled{cursor:not-allowed;opacity:50%}ax-combo-box .ax-editor-container.ax-state-disabled .ax-input,ax-combo-box .ax-editor-container.ax-state-disabled .ax-editor{cursor:not-allowed}ax-combo-box .ax-editor-container.ax-state-readonly{opacity:75%}ax-combo-box .ax-combo-box-trigger{cursor:pointer;--tw-outline-style: none;outline-style:none;-webkit-user-select:none;user-select:none}ax-combo-box .ax-combo-box-select-input{cursor:pointer;caret-color:transparent;-webkit-user-select:none;user-select:none}.ax-combo-box-popup{--ax-comp-combo-box-popup-max-height: 15rem;box-sizing:border-box;width:100%;overflow:hidden;border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-surface));background-color:rgba(var(--ax-sys-color-lightest-surface));--tw-shadow: 0 10px 15px -3px var(--tw-shadow-color, rgb(0 0 0 / .1)), 0 4px 6px -4px var(--tw-shadow-color, rgb(0 0 0 / .1));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ax-combo-box-popup:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-darkest-surface))}.ax-combo-box-popup.ax-is-empty{display:flex;min-height:calc(var(--spacing, .25rem) * 12);align-items:center;justify-content:center}.ax-combo-box-listbox{display:flex;max-height:var(--ax-comp-combo-box-popup-max-height);flex-direction:column;gap:calc(var(--spacing, .25rem) * .5);overflow:auto;padding:calc(var(--spacing, .25rem) * 1);--tw-outline-style: none;outline-style:none}.ax-combo-box-listbox.ax-hidden{display:none}.ax-combo-box-empty{width:100%;padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 3);text-align:center;font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-empty{color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 60%,transparent)}}.ax-combo-box-option{display:flex;cursor:pointer;align-items:center;justify-content:space-between;border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:transparent;padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2);font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));color:rgba(var(--ax-sys-color-on-surface));--tw-outline-style: none;outline-style:none}.ax-combo-box-option:hover{background-color:rgba(var(--ax-sys-color-on-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-option:hover{background-color:color-mix(in oklab,rgba(var(--ax-sys-color-on-surface)) 5%,transparent)}}.ax-combo-box-option[data-active=true]{border-color:rgba(var(--ax-sys-color-primary-surface))}.ax-combo-box-option[aria-selected=true]{border-color:rgba(var(--ax-sys-color-primary-surface));background-color:rgba(var(--ax-sys-color-primary-lightest-surface));color:rgba(var(--ax-sys-color-primary-surface))}.ax-combo-box-option[aria-selected=true]:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:rgba(var(--ax-sys-color-primary-darkest-surface))}@supports (color: color-mix(in lab,red,red)){.ax-combo-box-option[aria-selected=true]:where(.ax-dark,.ax-dark *):not(:where(.ax-light,.ax-light *)){background-color:color-mix(in oklab,rgba(var(--ax-sys-color-primary-darkest-surface)) 25%,transparent)}}.ax-combo-box-option[aria-selected=true] .ax-combo-box-option-check{display:block;width:calc(var(--spacing, .25rem) * 2);height:calc(var(--spacing, .25rem) * 2);rotate:45deg;border-right-style:var(--tw-border-style);border-right-width:2px;border-bottom-style:var(--tw-border-style);border-bottom-width:2px;border-color:rgba(var(--ax-sys-color-primary-surface))}.ax-combo-box-option .ax-combo-box-option-check{display:none}}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-inset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-shadow-color{syntax: \"*\"; inherits: false;}@property --tw-inset-shadow-alpha{syntax: \"<percentage>\"; inherits: false; initial-value: 100%;}@property --tw-ring-color{syntax: \"*\"; inherits: false;}@property --tw-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-inset-ring-color{syntax: \"*\"; inherits: false;}@property --tw-inset-ring-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@property --tw-ring-inset{syntax: \"*\"; inherits: false;}@property --tw-ring-offset-width{syntax: \"<length>\"; inherits: false; initial-value: 0px;}@property --tw-ring-offset-color{syntax: \"*\"; inherits: false; initial-value: #fff;}@property --tw-ring-offset-shadow{syntax: \"*\"; inherits: false; initial-value: 0 0 #0000;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style: solid;--tw-shadow: 0 0 #0000;--tw-shadow-color: initial;--tw-shadow-alpha: 100%;--tw-inset-shadow: 0 0 #0000;--tw-inset-shadow-color: initial;--tw-inset-shadow-alpha: 100%;--tw-ring-color: initial;--tw-ring-shadow: 0 0 #0000;--tw-inset-ring-color: initial;--tw-inset-ring-shadow: 0 0 #0000;--tw-ring-inset: initial;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-offset-shadow: 0 0 #0000}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
217
+ }], ctorParameters: () => [], propDecorators: { items: [{ type: i0.Input, args: [{ isSignal: true, alias: "items", required: false }] }], searchable: [{ type: i0.Input, args: [{ isSignal: true, alias: "searchable", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }, { type: i0.Output, args: ["readonlyChange"] }], look: [{ type: i0.Input, args: [{ isSignal: true, alias: "look", required: false }] }, { type: i0.Output, args: ["lookChange"] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], onValueChanged: [{ type: i0.Output, args: ["onValueChanged"] }], onOpened: [{ type: i0.Output, args: ["onOpened"] }], onClosed: [{ type: i0.Output, args: ["onClosed"] }], comboboxRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => Combobox), { isSignal: true }] }], listboxRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => Listbox), { isSignal: true }] }], popoverRef: [{ type: i0.ViewChild, args: [i0.forwardRef(() => AXPopoverComponent), { isSignal: true }] }] } });
218
+
219
+ class AXComboBoxModule {
220
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXComboBoxModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
221
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.8", ngImport: i0, type: AXComboBoxModule, imports: [AXComboBoxComponent], exports: [AXComboBoxComponent] }); }
222
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXComboBoxModule, imports: [AXComboBoxComponent] }); }
223
+ }
224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXComboBoxModule, decorators: [{
225
+ type: NgModule,
226
+ args: [{
227
+ imports: [AXComboBoxComponent],
228
+ exports: [AXComboBoxComponent],
229
+ }]
230
+ }] });
231
+
232
+ /**
233
+ * Generated bundle index. Do not edit.
234
+ */
235
+
236
+ export { AXComboBoxComponent, AXComboBoxModule };
237
+ //# sourceMappingURL=acorex-components-combo-box.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-combo-box.mjs","sources":["../../../../packages/components/combo-box/src/lib/combo-box.component.ts","../../../../packages/components/combo-box/src/lib/combo-box.component.html","../../../../packages/components/combo-box/src/lib/combo-box.module.ts","../../../../packages/components/combo-box/src/acorex-components-combo-box.ts"],"sourcesContent":["import { AXComponent, AXEvent, AXStyleLookType, AXValueChangedEvent, NXComponent } from '@acorex/cdk/common';\nimport { AXPopoverComponent } from '@acorex/components/popover';\nimport { AXTranslatorPipe } from '@acorex/core/translation';\nimport { Combobox, ComboboxPopup, ComboboxWidget } from '@angular/aria/combobox';\nimport { Listbox, Option } from '@angular/aria/listbox';\nimport { AsyncPipe } from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ViewEncapsulation,\n afterRenderEffect,\n computed,\n effect,\n input,\n linkedSignal,\n model,\n output,\n signal,\n untracked,\n viewChild,\n} from '@angular/core';\nimport { AXComboBoxItem } from './combo-box.types';\n\n/**\n * A minimal combo box for selecting a single value from a list of items.\n *\n * Built on top of the `@angular/aria/combobox` directives, it supports two behaviors:\n * - `searchable=\"true\"` (default): an input with typeahead filtering (matches `id`).\n * - `searchable=\"false\"`: a select-like trigger (same input, read-only).\n *\n * Items use `text` for display, `id` for search/identity, and `value` as the submitted model value.\n *\n * @category Components\n */\n@Component({\n selector: 'ax-combo-box',\n templateUrl: './combo-box.component.html',\n styleUrls: ['./combo-box.component.css'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [Combobox, ComboboxPopup, ComboboxWidget, Listbox, Option, AXPopoverComponent, AXTranslatorPipe, AsyncPipe],\n providers: [{ provide: AXComponent, useExisting: AXComboBoxComponent }],\n})\nexport class AXComboBoxComponent extends NXComponent {\n /**\n * The list of items the user can select from.\n * Each item has `id` (search/identity), `text` (display), and `value` (submitted).\n */\n items = input<AXComboBoxItem[]>([]);\n\n /**\n * Whether the combo box accepts typing and filters the list (`true`),\n * or is a select-like, read-only trigger (`false`).\n */\n searchable = input(true);\n\n /**\n * The placeholder text shown when no value is selected.\n */\n placeholder = input('');\n\n /**\n * Whether the combo box is disabled.\n */\n disabled = model(false);\n\n /**\n * Whether the combo box is readonly.\n */\n readonly = model(false);\n\n /**\n * Predefined look scheme of the editor container. Same looks as other editor components like ax-text-box.\n */\n look = model<AXStyleLookType>('solid');\n\n /**\n * The selected item's `value`. Supports two-way binding.\n */\n value = model<string | number | null>(null);\n\n /**\n * Emitted when the selected value changes.\n */\n onValueChanged = output<AXValueChangedEvent<string | number | null>>();\n\n /**\n * Emitted when the popup list opens.\n */\n onOpened = output<AXEvent>();\n\n /**\n * Emitted when the popup list closes.\n */\n onClosed = output<AXEvent>();\n\n /** Whether the popup is expanded. */\n protected expanded = signal(false);\n\n /** The item whose `value` matches the current model value. */\n protected selectedItem = computed(() => {\n const value = this.value();\n if (value == null) {\n return null;\n }\n return this.items().find((item) => item.value === value) ?? null;\n });\n\n /** Display text shown in the trigger / used as the searchable input baseline. */\n protected displayText = computed(() => this.selectedItem()?.text ?? '');\n\n /** The text typed in the searchable input. Resets to the selected item's text. */\n protected searchText = linkedSignal(() => this.displayText());\n\n /** The listbox selection (item ids), kept in sync with the selected value. */\n protected selection = linkedSignal<string[]>(() => {\n const id = this.selectedItem()?.id;\n return id != null ? [id] : [];\n });\n\n /** Items filtered by typed query against `id` when the combo box is searchable. */\n protected filteredItems = computed(() => {\n const items = this.items();\n if (!this.searchable()) {\n return items;\n }\n\n const query = this.searchText().trim().toLowerCase();\n const selectedId = (this.selectedItem()?.id ?? '').toLowerCase();\n if (!query || query === selectedId || query === this.displayText().trim().toLowerCase()) {\n return items;\n }\n\n return items.filter((item) => item.id.toLowerCase().includes(query));\n });\n\n protected comboboxRef = viewChild(Combobox);\n protected listboxRef = viewChild(Listbox);\n protected popoverRef = viewChild(AXPopoverComponent);\n\n #isUserInteraction = false;\n #lastValue: string | number | null | undefined = undefined;\n #lastExpanded: boolean | undefined = undefined;\n\n constructor() {\n super();\n\n effect(() => this.#emitValueChanged(this.value()));\n effect(() => this.#emitOpenedOrClosed(this.expanded()));\n\n // Open during CD (before render) so the overlay exists before Aria DeferredContent\n // creates the list in its after-render hook.\n effect(() => {\n const expanded = this.expanded();\n const popover = this.popoverRef();\n if (!popover) {\n return;\n }\n untracked(() => {\n if (expanded && !popover.isOpen) {\n void popover.open();\n } else if (!expanded && popover.isOpen) {\n popover.close();\n }\n });\n });\n\n afterRenderEffect(() => {\n if (this.expanded()) {\n this.listboxRef()?.scrollActiveItemIntoView();\n }\n });\n }\n\n /** Emits onValueChanged when the value actually changes (skips the initial value). */\n #emitValueChanged(value: string | number | null) {\n const previous = this.#lastValue;\n this.#lastValue = value;\n\n if (previous === undefined || previous === value) {\n return;\n }\n\n this.onValueChanged.emit({\n component: this,\n htmlElement: this.nativeElement,\n name: 'value',\n value,\n oldValue: previous,\n isUserInteraction: this.#isUserInteraction,\n });\n this.#isUserInteraction = false;\n }\n\n /** Emits onOpened/onClosed when the expanded state actually changes (skips the initial state). */\n #emitOpenedOrClosed(expanded: boolean) {\n const previous = this.#lastExpanded;\n this.#lastExpanded = expanded;\n\n if (previous === undefined || previous === expanded) {\n return;\n }\n\n const event: AXEvent = {\n component: this,\n htmlElement: this.nativeElement,\n isUserInteraction: true,\n };\n expanded ? this.onOpened.emit(event) : this.onClosed.emit(event);\n }\n\n /**\n * Opens (searchable) or toggles (non-searchable) the popup on trigger click.\n */\n protected onTriggerClick() {\n if (this.disabled() || this.readonly()) {\n return;\n }\n if (this.searchable()) {\n this.expanded.set(true);\n return;\n }\n this.expanded.update((open) => !open);\n }\n\n /**\n * Keeps the combobox expanded state in sync when the popover closes (e.g. click outside).\n */\n protected onPopoverClosed() {\n this.expanded.set(false);\n }\n\n /**\n * Commits the current listbox selection as the component value and closes the popup.\n */\n protected commit() {\n const selectedId = this.selection()[0];\n const item = selectedId != null ? this.items().find((i) => i.id === selectedId) : undefined;\n if (item != null && item.value !== this.value()) {\n this.#isUserInteraction = true;\n this.value.set(item.value);\n }\n this.expanded.set(false);\n this.comboboxRef()?.element.focus();\n }\n}\n","<div\n #origin\n class=\"ax-editor-container ax-{{ look() }} ax-default\"\n [class.ax-combo-box-trigger]=\"!searchable()\"\n [class.ax-state-disabled]=\"disabled()\"\n [class.ax-state-readonly]=\"readonly()\"\n>\n <ng-content select=\"ax-prefix\"></ng-content>\n\n <input\n ngCombobox\n #combobox=\"ngCombobox\"\n type=\"text\"\n class=\"ax-input\"\n [class.ax-combo-box-select-input]=\"!searchable()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly() || !searchable()\"\n [(value)]=\"searchText\"\n [(expanded)]=\"expanded\"\n (click)=\"onTriggerClick()\"\n />\n\n <button\n type=\"button\"\n class=\"ax-general-button-icon\"\n tabindex=\"-1\"\n [disabled]=\"disabled() || readonly()\"\n (click)=\"onTriggerClick()\"\n >\n <span\n class=\"ax-icon\"\n [class.ax-icon-chevron-down]=\"!expanded()\"\n [class.ax-icon-chevron-up]=\"expanded()\"\n ></span>\n </button>\n <ng-content select=\"ax-suffix\"></ng-content>\n</div>\n\n<ax-popover\n [target]=\"origin\"\n [openOn]=\"'manual'\"\n [closeOn]=\"'clickOut'\"\n [placement]=\"'bottom-start'\"\n [width]=\"origin.offsetWidth + 'px'\"\n [disabled]=\"disabled() || readonly()\"\n (onClosed)=\"onPopoverClosed()\"\n>\n <ng-template ngComboboxPopup [combobox]=\"combobox\">\n <div class=\"ax-combo-box-popup\" [class.ax-is-empty]=\"filteredItems().length === 0\">\n @if (filteredItems().length === 0) {\n <div class=\"ax-combo-box-empty\">{{ '@acorex:common.general.no-result-found' | translate | async }}</div>\n }\n <div\n ngListbox\n ngComboboxWidget\n #listbox=\"ngListbox\"\n class=\"ax-combo-box-listbox\"\n [class.ax-hidden]=\"filteredItems().length === 0\"\n focusMode=\"activedescendant\"\n selectionMode=\"explicit\"\n [tabindex]=\"-1\"\n [activeDescendant]=\"listbox.activeDescendant()\"\n [(value)]=\"selection\"\n (click)=\"commit()\"\n (keydown.enter)=\"commit()\"\n >\n @for (item of filteredItems(); track item.id) {\n <div ngOption class=\"ax-combo-box-option\" [value]=\"item.id\" [label]=\"item.text\">\n <span class=\"ax-combo-box-option-label\">{{ item.text }}</span>\n <span class=\"ax-combo-box-option-check\" aria-hidden=\"true\"></span>\n </div>\n }\n </div>\n </div>\n </ng-template>\n</ax-popover>\n","import { NgModule } from '@angular/core';\nimport { AXComboBoxComponent } from './combo-box.component';\n\n@NgModule({\n imports: [AXComboBoxComponent],\n exports: [AXComboBoxComponent],\n})\nexport class AXComboBoxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAuBA;;;;;;;;;;AAUG;AAUG,MAAO,mBAAoB,SAAQ,WAAW,CAAA;AAiGlD,IAAA,kBAAkB;AAClB,IAAA,UAAU;AACV,IAAA,aAAa;AAEb,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;AArGT;;;AAGG;QACH,IAAA,CAAA,KAAK,GAAG,KAAK,CAAmB,EAAE;kFAAC;AAEnC;;;AAGG;QACH,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,IAAI;uFAAC;AAExB;;AAEG;QACH,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,EAAE;wFAAC;AAEvB;;AAEG;QACH,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK;qFAAC;AAEvB;;AAEG;QACH,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,KAAK;qFAAC;AAEvB;;AAEG;QACH,IAAA,CAAA,IAAI,GAAG,KAAK,CAAkB,OAAO;iFAAC;AAEtC;;AAEG;QACH,IAAA,CAAA,KAAK,GAAG,KAAK,CAAyB,IAAI;kFAAC;AAE3C;;AAEG;QACH,IAAA,CAAA,cAAc,GAAG,MAAM,EAA+C;AAEtE;;AAEG;QACH,IAAA,CAAA,QAAQ,GAAG,MAAM,EAAW;AAE5B;;AAEG;QACH,IAAA,CAAA,QAAQ,GAAG,MAAM,EAAW;;QAGlB,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,KAAK;qFAAC;;AAGxB,QAAA,IAAA,CAAA,YAAY,GAAG,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CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACT,OAAO,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,SAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,UAAA,CAAA,MACP,kBAAkB,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;MEnIxC,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;+GAAhB,gBAAgB,EAAA,OAAA,EAAA,CAHjB,mBAAmB,CAAA,EAAA,OAAA,EAAA,CACnB,mBAAmB,CAAA,EAAA,CAAA,CAAA;AAElB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAHjB,mBAAmB,CAAA,EAAA,CAAA,CAAA;;2FAGlB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,mBAAmB,CAAC;oBAC9B,OAAO,EAAE,CAAC,mBAAmB,CAAC;AAC/B,iBAAA;;;ACND;;AAEG;;;;"}
@@ -0,0 +1,50 @@
1
+ import { AXComponentCloseEvent, AXClosableComponent } from '@acorex/cdk/common';
2
+ import { AXTranslationService } from '@acorex/core/translation';
3
+ import * as i0 from '@angular/core';
4
+ import { inject, input, computed, EventEmitter, ViewEncapsulation, Component } from '@angular/core';
5
+
6
+ class AXConversationComposerActionChoiceDialogComponent {
7
+ constructor() {
8
+ this.translation = inject(AXTranslationService);
9
+ this.actions = input.required(/* @ts-ignore */
10
+ ...(ngDevMode ? [{ debugName: "actions" }] : /* istanbul ignore next */ []));
11
+ this.fileCount = input(1, /* @ts-ignore */
12
+ ...(ngDevMode ? [{ debugName: "fileCount" }] : /* istanbul ignore next */ []));
13
+ this.composerActionRegistry = input.required(/* @ts-ignore */
14
+ ...(ngDevMode ? [{ debugName: "composerActionRegistry" }] : /* istanbul ignore next */ []));
15
+ this.__popup__ = input(/* @ts-ignore */
16
+ ...(ngDevMode ? [undefined, { debugName: "__popup__" }] : /* istanbul ignore next */ []));
17
+ this.hintText = computed(() => {
18
+ const count = this.fileCount();
19
+ if (count === 1) {
20
+ return this.translation.translateSync('@acorex:chat.dialog.choose-send-option.hint-single');
21
+ }
22
+ return this.translation.translateSync('@acorex:chat.dialog.choose-send-option.hint-multiple', {
23
+ params: { count },
24
+ });
25
+ }, /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "hintText" }] : /* istanbul ignore next */ []));
27
+ this.onClosed = new EventEmitter();
28
+ }
29
+ getActionLabel(action) {
30
+ return this.composerActionRegistry().getActionLabel(action);
31
+ }
32
+ getActionTooltip(action) {
33
+ return this.composerActionRegistry().getActionTooltip(action);
34
+ }
35
+ choose(action) {
36
+ const event = new AXComponentCloseEvent();
37
+ event.component = this;
38
+ event.data = action;
39
+ this.onClosed.emit(event);
40
+ }
41
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXConversationComposerActionChoiceDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
42
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.8", type: AXConversationComposerActionChoiceDialogComponent, isStandalone: true, selector: "ax-conversation-composer-action-choice-dialog", inputs: { actions: { classPropertyName: "actions", publicName: "actions", isSignal: true, isRequired: true, transformFunction: null }, fileCount: { classPropertyName: "fileCount", publicName: "fileCount", isSignal: true, isRequired: false, transformFunction: null }, composerActionRegistry: { classPropertyName: "composerActionRegistry", publicName: "composerActionRegistry", isSignal: true, isRequired: true, transformFunction: null }, __popup__: { classPropertyName: "__popup__", publicName: "__popup__", isSignal: true, isRequired: false, transformFunction: null } }, providers: [{ provide: AXClosableComponent, useExisting: AXConversationComposerActionChoiceDialogComponent }], ngImport: i0, template: " <div class=\"composer-action-choice\" role=\"dialog\" aria-modal=\"true\">\n <p class=\"composer-action-choice__hint\">{{ hintText() }}</p>\n <ul class=\"composer-action-choice__list\" role=\"listbox\">\n @for (action of actions(); track action.id) {\n <li role=\"presentation\">\n <button\n type=\"button\"\n class=\"composer-action-choice__option\"\n role=\"option\"\n (click)=\"choose(action)\"\n [attr.aria-label]=\"getActionLabel(action)\"\n >\n <span class=\"composer-action-choice__icon\" aria-hidden=\"true\">\n <i [class]=\"action.icon\"></i>\n </span>\n <span class=\"composer-action-choice__text\">\n <span class=\"composer-action-choice__title\">{{ getActionLabel(action) }}</span>\n @if (getActionTooltip(action); as tip) {\n <span class=\"composer-action-choice__subtitle\">{{ tip }}</span>\n }\n </span>\n <i class=\"fa-light fa-chevron-right composer-action-choice__chevron\" aria-hidden=\"true\"></i>\n </button>\n </li>\n }\n </ul>\n </div>\n", styles: ["@layer properties;@layer components{ax-conversation-composer-action-choice-dialog{display:block}ax-conversation-composer-action-choice-dialog .composer-action-choice{display:flex;min-width:calc(var(--spacing, .25rem) * 64);flex-direction:column;gap:calc(var(--spacing, .25rem) * 3);padding:calc(var(--spacing, .25rem) * 2)}ax-conversation-composer-action-choice-dialog .composer-action-choice__hint{margin:calc(var(--spacing, .25rem) * 0);font-size:.8125rem;--tw-leading: var(--leading-snug, 1.375);line-height:var(--leading-snug, 1.375);color:rgba(var(--ax-sys-color-on-surface),.7)}ax-conversation-composer-action-choice-dialog .composer-action-choice__list{margin:calc(var(--spacing, .25rem) * 0);display:flex;list-style-type:none;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);padding:calc(var(--spacing, .25rem) * 0)}ax-conversation-composer-action-choice-dialog .composer-action-choice__option{display:flex;width:100%;cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 3);border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-light-surface));background-color:rgba(var(--ax-sys-color-surface));padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2.5);text-align:start;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}ax-conversation-composer-action-choice-dialog .composer-action-choice__option:hover,ax-conversation-composer-action-choice-dialog .composer-action-choice__option:focus-visible{border-color:rgba(var(--ax-sys-color-primary-surface));--tw-outline-style: none;outline-style:none;background:rgba(var(--ax-sys-color-primary-500),.06);box-shadow:0 0 0 1px rgba(var(--ax-sys-color-primary-500),.25)}ax-conversation-composer-action-choice-dialog .composer-action-choice__icon{display:flex;height:calc(var(--spacing, .25rem) * 10);width:calc(var(--spacing, .25rem) * 10);flex-shrink:0;align-items:center;justify-content:center;border-radius:var(--ax-sys-border-radius);font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)));color:rgba(var(--ax-sys-color-primary-600));background:rgba(var(--ax-sys-color-primary-500),.1)}ax-conversation-composer-action-choice-dialog .composer-action-choice__text{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column;gap:calc(var(--spacing, .25rem) * .5)}ax-conversation-composer-action-choice-dialog .composer-action-choice__title{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:rgba(var(--ax-sys-color-on-surface))}ax-conversation-composer-action-choice-dialog .composer-action-choice__subtitle{overflow:hidden;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));text-overflow:ellipsis;white-space:nowrap;color:rgba(var(--ax-sys-color-on-surface),.6)}ax-conversation-composer-action-choice-dialog .composer-action-choice__chevron{flex-shrink:0;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:rgba(var(--ax-sys-color-on-surface),.45)}}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading: initial;--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"], encapsulation: i0.ViewEncapsulation.None }); }
43
+ }
44
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXConversationComposerActionChoiceDialogComponent, decorators: [{
45
+ type: Component,
46
+ args: [{ selector: 'ax-conversation-composer-action-choice-dialog', encapsulation: ViewEncapsulation.None, providers: [{ provide: AXClosableComponent, useExisting: AXConversationComposerActionChoiceDialogComponent }], template: " <div class=\"composer-action-choice\" role=\"dialog\" aria-modal=\"true\">\n <p class=\"composer-action-choice__hint\">{{ hintText() }}</p>\n <ul class=\"composer-action-choice__list\" role=\"listbox\">\n @for (action of actions(); track action.id) {\n <li role=\"presentation\">\n <button\n type=\"button\"\n class=\"composer-action-choice__option\"\n role=\"option\"\n (click)=\"choose(action)\"\n [attr.aria-label]=\"getActionLabel(action)\"\n >\n <span class=\"composer-action-choice__icon\" aria-hidden=\"true\">\n <i [class]=\"action.icon\"></i>\n </span>\n <span class=\"composer-action-choice__text\">\n <span class=\"composer-action-choice__title\">{{ getActionLabel(action) }}</span>\n @if (getActionTooltip(action); as tip) {\n <span class=\"composer-action-choice__subtitle\">{{ tip }}</span>\n }\n </span>\n <i class=\"fa-light fa-chevron-right composer-action-choice__chevron\" aria-hidden=\"true\"></i>\n </button>\n </li>\n }\n </ul>\n </div>\n", styles: ["@layer properties;@layer components{ax-conversation-composer-action-choice-dialog{display:block}ax-conversation-composer-action-choice-dialog .composer-action-choice{display:flex;min-width:calc(var(--spacing, .25rem) * 64);flex-direction:column;gap:calc(var(--spacing, .25rem) * 3);padding:calc(var(--spacing, .25rem) * 2)}ax-conversation-composer-action-choice-dialog .composer-action-choice__hint{margin:calc(var(--spacing, .25rem) * 0);font-size:.8125rem;--tw-leading: var(--leading-snug, 1.375);line-height:var(--leading-snug, 1.375);color:rgba(var(--ax-sys-color-on-surface),.7)}ax-conversation-composer-action-choice-dialog .composer-action-choice__list{margin:calc(var(--spacing, .25rem) * 0);display:flex;list-style-type:none;flex-direction:column;gap:calc(var(--spacing, .25rem) * 2);padding:calc(var(--spacing, .25rem) * 0)}ax-conversation-composer-action-choice-dialog .composer-action-choice__option{display:flex;width:100%;cursor:pointer;align-items:center;gap:calc(var(--spacing, .25rem) * 3);border-radius:var(--ax-sys-border-radius);border-style:var(--tw-border-style);border-width:1px;border-color:rgba(var(--ax-sys-color-border-light-surface));background-color:rgba(var(--ax-sys-color-surface));padding-inline:calc(var(--spacing, .25rem) * 3);padding-block:calc(var(--spacing, .25rem) * 2.5);text-align:start;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}ax-conversation-composer-action-choice-dialog .composer-action-choice__option:hover,ax-conversation-composer-action-choice-dialog .composer-action-choice__option:focus-visible{border-color:rgba(var(--ax-sys-color-primary-surface));--tw-outline-style: none;outline-style:none;background:rgba(var(--ax-sys-color-primary-500),.06);box-shadow:0 0 0 1px rgba(var(--ax-sys-color-primary-500),.25)}ax-conversation-composer-action-choice-dialog .composer-action-choice__icon{display:flex;height:calc(var(--spacing, .25rem) * 10);width:calc(var(--spacing, .25rem) * 10);flex-shrink:0;align-items:center;justify-content:center;border-radius:var(--ax-sys-border-radius);font-size:var(--text-lg, 1.125rem);line-height:var(--tw-leading, var(--text-lg--line-height, calc(1.75 / 1.125)));color:rgba(var(--ax-sys-color-primary-600));background:rgba(var(--ax-sys-color-primary-500),.1)}ax-conversation-composer-action-choice-dialog .composer-action-choice__text{display:flex;min-width:calc(var(--spacing, .25rem) * 0);flex:1;flex-direction:column;gap:calc(var(--spacing, .25rem) * .5)}ax-conversation-composer-action-choice-dialog .composer-action-choice__title{font-size:var(--text-sm, .875rem);line-height:var(--tw-leading, var(--text-sm--line-height, calc(1.25 / .875)));--tw-font-weight: var(--font-weight-semibold, 600);font-weight:var(--font-weight-semibold, 600);color:rgba(var(--ax-sys-color-on-surface))}ax-conversation-composer-action-choice-dialog .composer-action-choice__subtitle{overflow:hidden;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));text-overflow:ellipsis;white-space:nowrap;color:rgba(var(--ax-sys-color-on-surface),.6)}ax-conversation-composer-action-choice-dialog .composer-action-choice__chevron{flex-shrink:0;font-size:var(--text-xs, .75rem);line-height:var(--tw-leading, var(--text-xs--line-height, calc(1 / .75)));color:rgba(var(--ax-sys-color-on-surface),.45)}}@property --tw-leading{syntax: \"*\"; inherits: false;}@property --tw-border-style{syntax: \"*\"; inherits: false; initial-value: solid;}@property --tw-font-weight{syntax: \"*\"; inherits: false;}@layer properties{@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading: initial;--tw-border-style: solid;--tw-font-weight: initial}}}\n/*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */\n"] }]
47
+ }], propDecorators: { actions: [{ type: i0.Input, args: [{ isSignal: true, alias: "actions", required: true }] }], fileCount: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileCount", required: false }] }], composerActionRegistry: [{ type: i0.Input, args: [{ isSignal: true, alias: "composerActionRegistry", required: true }] }], __popup__: [{ type: i0.Input, args: [{ isSignal: true, alias: "__popup__", required: false }] }] } });
48
+
49
+ export { AXConversationComposerActionChoiceDialogComponent };
50
+ //# sourceMappingURL=acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs","sources":["../../../../packages/components/conversation/src/lib/components/message-list/composer-action-choice-dialog.component.ts","../../../../packages/components/conversation/src/lib/components/message-list/composer-action-choice-dialog.component.html"],"sourcesContent":["import { AXClosableComponent, AXComponentCloseEvent } from '@acorex/cdk/common';\nimport type { AXPopupRef } from '@acorex/components/popup';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { Component, EventEmitter, ViewEncapsulation, computed, inject, input } from '@angular/core';\nimport type {\n AXConversationComposerAction,\n AXConversationComposerActionRegistry,\n} from '../../registries/composer-action.registry';\n\n@Component({\n selector: 'ax-conversation-composer-action-choice-dialog',\n encapsulation: ViewEncapsulation.None,\n\n templateUrl: './composer-action-choice-dialog.component.html',\n styleUrl: './composer-action-choice-dialog.component.css',\n providers: [{ provide: AXClosableComponent, useExisting: AXConversationComposerActionChoiceDialogComponent }],\n})\nexport class AXConversationComposerActionChoiceDialogComponent {\n private readonly translation = inject(AXTranslationService);\n\n readonly actions = input.required<AXConversationComposerAction[]>();\n readonly fileCount = input(1);\n readonly composerActionRegistry = input.required<AXConversationComposerActionRegistry>();\n readonly __popup__ = input<AXPopupRef | undefined>();\n\n readonly hintText = computed(() => {\n const count = this.fileCount();\n if (count === 1) {\n return this.translation.translateSync('@acorex:chat.dialog.choose-send-option.hint-single');\n }\n return this.translation.translateSync('@acorex:chat.dialog.choose-send-option.hint-multiple', {\n params: { count },\n });\n });\n\n readonly onClosed = new EventEmitter<AXComponentCloseEvent>();\n\n getActionLabel(action: AXConversationComposerAction): string {\n return this.composerActionRegistry().getActionLabel(action);\n }\n\n getActionTooltip(action: AXConversationComposerAction): string | undefined {\n return this.composerActionRegistry().getActionTooltip(action);\n }\n\n choose(action: AXConversationComposerAction): void {\n const event = new AXComponentCloseEvent();\n event.component = this;\n event.data = action;\n this.onClosed.emit(event);\n }\n}\n"," <div class=\"composer-action-choice\" role=\"dialog\" aria-modal=\"true\">\n <p class=\"composer-action-choice__hint\">{{ hintText() }}</p>\n <ul class=\"composer-action-choice__list\" role=\"listbox\">\n @for (action of actions(); track action.id) {\n <li role=\"presentation\">\n <button\n type=\"button\"\n class=\"composer-action-choice__option\"\n role=\"option\"\n (click)=\"choose(action)\"\n [attr.aria-label]=\"getActionLabel(action)\"\n >\n <span class=\"composer-action-choice__icon\" aria-hidden=\"true\">\n <i [class]=\"action.icon\"></i>\n </span>\n <span class=\"composer-action-choice__text\">\n <span class=\"composer-action-choice__title\">{{ getActionLabel(action) }}</span>\n @if (getActionTooltip(action); as tip) {\n <span class=\"composer-action-choice__subtitle\">{{ tip }}</span>\n }\n </span>\n <i class=\"fa-light fa-chevron-right composer-action-choice__chevron\" aria-hidden=\"true\"></i>\n </button>\n </li>\n }\n </ul>\n </div>\n"],"names":[],"mappings":";;;;;MAiBa,iDAAiD,CAAA;AAR9D,IAAA,WAAA,GAAA;AASmB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,oBAAoB,CAAC;QAElD,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,QAAQ;oFAAkC;QAC1D,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,CAAC;sFAAC;QACpB,IAAA,CAAA,sBAAsB,GAAG,KAAK,CAAC,QAAQ;mGAAwC;AAC/E,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK;iGAA0B;AAE3C,QAAA,IAAA,CAAA,QAAQ,GAAG,QAAQ,CAAC,MAAK;AAChC,YAAA,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,EAAE;AAC9B,YAAA,IAAI,KAAK,KAAK,CAAC,EAAE;gBACf,OAAO,IAAI,CAAC,WAAW,CAAC,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,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,sBAAA,EAAA,EAAA,iBAAA,EAAA,wBAAA,EAAA,UAAA,EAAA,wBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,iBAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,SAAA,EAFjD,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,iDAAiD,EAAE,CAAC,0BCf/G,wuCA2BA,EAAA,MAAA,EAAA,CAAA,0xHAAA,CAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FDVa,iDAAiD,EAAA,UAAA,EAAA,CAAA;kBAR7D,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,+CAA+C,EAAA,aAAA,EAC1C,iBAAiB,CAAC,IAAI,aAI1B,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,iDAAmD,EAAE,CAAC,EAAA,QAAA,EAAA,wuCAAA,EAAA,MAAA,EAAA,CAAA,0xHAAA,CAAA,EAAA;;;;;"}
@@ -108,7 +108,7 @@ async function resolvePickerActionsForAllFiles(deps, files) {
108
108
  return analysis.actions;
109
109
  }
110
110
  async function promptComposerActionChoice(deps, actions, fileCount) {
111
- const { AXConversationComposerActionChoiceDialogComponent } = await import('./acorex-components-conversation-composer-action-choice-dialog.component-CNHiM1Sp.mjs');
111
+ const { AXConversationComposerActionChoiceDialogComponent } = await import('./acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs');
112
112
  const result = await deps.popupService.open(AXConversationComposerActionChoiceDialogComponent, {
113
113
  title: deps.translation.translateSync('@acorex:chat.dialog.choose-send-option.title'),
114
114
  size: 'sm',
@@ -220,4 +220,4 @@ async function handleConversationFilePaste(event, host, deps) {
220
220
  }
221
221
 
222
222
  export { filesFromClipboardEvent, handleConversationFilePaste, isPasteTargetInChatPanel, openComposerPickerForFiles, resolvePickerActionsForAllFiles };
223
- //# sourceMappingURL=acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs.map
223
+ //# sourceMappingURL=acorex-components-conversation-open-composer-picker-for-files-BuNEjswI.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs","sources":["../../../../packages/components/conversation/src/lib/components/message-list/open-composer-picker-popup.ts","../../../../packages/components/conversation/src/lib/components/message-list/open-composer-picker-for-files.ts"],"sourcesContent":["import type { AXPopupService } from '@acorex/components/popup';\nimport type { AXConversationComposerService } from '../composer/composer.service';\nimport type { AXConversationComposerAction, AXConversationComposerActionRegistry } from '../../registries/composer-action.registry';\nimport type { AXConversation } from '../../models';\nimport { resolveComposerMaxFiles } from '../../plugins/composer/composer-upload.config';\nimport type { AXConversationConfig } from '../../tokens/conversation-config.interface';\n\nexport async function openComposerPickerPopup(\n popupService: AXPopupService,\n composerService: AXConversationComposerService,\n registry: AXConversationComposerActionRegistry,\n action: AXConversationComposerAction,\n conversation: AXConversation,\n files: File[],\n config: Pick<Required<AXConversationConfig>, 'maxFilesPerMessage'>,\n): Promise<void> {\n const component = action.component ?? (action.componentLoader ? await action.componentLoader() : undefined);\n if (!component || files.length === 0) {\n return;\n }\n\n await popupService.open(component, {\n title: registry.getActionLabel(action),\n size: 'md',\n closeButton: true,\n header: false,\n panelClass: ['ax-conversation-composer-picker-popup'],\n inputs: {\n conversation,\n maxFiles: resolveComposerMaxFiles(action, config),\n initialFiles: files,\n service: composerService,\n },\n });\n}\n","import type { AXPopupService } from '@acorex/components/popup';\nimport type { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type { AXFileService } from '@acorex/core/file';\nimport type { AXValidationRuleResult } from '@acorex/core/validation';\nimport type { AXConversationComposerService } from '../composer/composer.service';\nimport type { AXConversation } from '../../models';\nimport type { AXConversationComposerAction, AXConversationComposerActionRegistry } from '../../registries/composer-action.registry';\nimport { notifyPickerValidationErrors } from '../../plugins/composer/components/shared/picker-upload';\nimport type { AXConversationConfig } from '../../tokens/conversation-config.interface';\nimport { openComposerPickerPopup } from './open-composer-picker-popup';\n\nexport interface AXConversationOpenComposerPickerForFilesDeps {\n fileService: AXFileService;\n composerService: AXConversationComposerService;\n composerActionRegistry: AXConversationComposerActionRegistry;\n popupService: AXPopupService;\n toast: AXToastService;\n translation: AXTranslationService;\n conversation: AXConversation | null | undefined;\n config: Pick<Required<AXConversationConfig>, 'maxFilesPerMessage'>;\n}\n\n/** Catalogs registered on picker actions (conversation-image, conversation-file, …). */\nfunction pickerCatalogNames(registry: AXConversationComposerActionRegistry): string[] {\n const names = new Set<string>();\n for (const action of registry.actions()) {\n if ((action.component || action.componentLoader) && action.fileType) {\n names.add(action.fileType);\n }\n }\n return [...names];\n}\n\ninterface AXConversationInboundFilesAnalysis {\n matchingCatalogs: string[];\n actions: AXConversationComposerAction[];\n supportedFiles: File[];\n unsupportedFiles: { file: File; errors: AXValidationRuleResult[] }[];\n}\n\n/** Files that are not accepted by any registered picker catalog. */\nasync function collectUnsupportedInboundFiles(\n deps: Pick<AXConversationOpenComposerPickerForFilesDeps, 'fileService' | 'composerActionRegistry'>,\n files: File[],\n catalogs: string[],\n): Promise<{ file: File; errors: AXValidationRuleResult[] }[]> {\n const unsupported: { file: File; errors: AXValidationRuleResult[] }[] = [];\n\n for (const file of files) {\n let acceptedByAny = false;\n let lastErrors: AXValidationRuleResult[] = [];\n\n for (const catalog of catalogs) {\n const errors = await deps.fileService.validate(file, catalog);\n if (errors.length === 0) {\n acceptedByAny = true;\n break;\n }\n lastErrors = errors;\n }\n\n if (!acceptedByAny) {\n unsupported.push({ file, errors: lastErrors });\n }\n }\n\n return unsupported;\n}\n\nasync function analyzeInboundFiles(\n deps: Pick<\n AXConversationOpenComposerPickerForFilesDeps,\n 'fileService' | 'composerService' | 'composerActionRegistry'\n >,\n files: File[],\n): Promise<AXConversationInboundFilesAnalysis> {\n if (!files.length) {\n return { matchingCatalogs: [], actions: [], supportedFiles: [], unsupportedFiles: [] };\n }\n\n const catalogs = pickerCatalogNames(deps.composerActionRegistry);\n const unsupportedFiles = await collectUnsupportedInboundFiles(deps, files, catalogs);\n const unsupportedSet = new Set(unsupportedFiles.map((entry) => entry.file));\n const supportedFiles = files.filter((file) => !unsupportedSet.has(file));\n\n if (supportedFiles.length === 0) {\n return { matchingCatalogs: [], actions: [], supportedFiles: [], unsupportedFiles };\n }\n\n const context = deps.composerService.actionContext();\n const matchingCatalogs: string[] = [];\n\n for (const catalog of catalogs) {\n const { rejected } = await deps.fileService.validateMany(supportedFiles, catalog);\n if (rejected.length === 0) {\n matchingCatalogs.push(catalog);\n }\n }\n\n const seen = new Set<string>();\n const actions: AXConversationComposerAction[] = [];\n\n for (const catalog of matchingCatalogs) {\n for (const action of deps.composerActionRegistry.findPickerActionsForFileType(catalog, context)) {\n if (!seen.has(action.id)) {\n seen.add(action.id);\n actions.push(action);\n }\n }\n }\n\n return {\n matchingCatalogs,\n actions: actions.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0)),\n supportedFiles,\n unsupportedFiles,\n };\n}\n\nfunction notifyInboundFilesValidationFailures(\n deps: Pick<AXConversationOpenComposerPickerForFilesDeps, 'toast' | 'translation'>,\n analysis: AXConversationInboundFilesAnalysis,\n): void {\n if (analysis.supportedFiles.length === 0) {\n if (analysis.unsupportedFiles.length === 0) {\n deps.toast.warning(deps.translation.translateSync('@acorex:chat.errors.inbound-files-none-supported'));\n }\n return;\n }\n\n if (analysis.actions.length === 0) {\n const key =\n analysis.matchingCatalogs.length === 0\n ? '@acorex:chat.errors.inbound-files-none-supported'\n : '@acorex:chat.errors.inbound-files-no-send-option';\n deps.toast.warning(deps.translation.translateSync(key));\n }\n}\n\n/**\n * File catalogs that accept every supported file in the batch, then matching visible picker actions.\n */\nexport async function resolvePickerActionsForAllFiles(\n deps: Pick<AXConversationOpenComposerPickerForFilesDeps, 'fileService' | 'composerService' | 'composerActionRegistry'>,\n files: File[],\n): Promise<AXConversationComposerAction[]> {\n const analysis = await analyzeInboundFiles(deps, files);\n return analysis.actions;\n}\n\nasync function promptComposerActionChoice(\n deps: AXConversationOpenComposerPickerForFilesDeps,\n actions: AXConversationComposerAction[],\n fileCount: number,\n): Promise<AXConversationComposerAction | undefined> {\n const { AXConversationComposerActionChoiceDialogComponent } = await import('./composer-action-choice-dialog.component');\n const result = await deps.popupService.open(AXConversationComposerActionChoiceDialogComponent, {\n title: deps.translation.translateSync('@acorex:chat.dialog.choose-send-option.title'),\n size: 'sm',\n closeButton: true,\n header: true,\n inputs: {\n actions,\n fileCount,\n composerActionRegistry: deps.composerActionRegistry,\n },\n });\n\n const action = result?.data as AXConversationComposerAction | undefined;\n if (!action?.component && !action?.componentLoader) {\n return undefined;\n }\n return action;\n}\n\n/**\n * Match dropped/pasted files to composer picker action(s) and open the popup.\n * Unsupported files are skipped after a warning toast; supported files continue.\n * @returns true when a picker popup was opened\n */\nexport async function openComposerPickerForFiles(\n deps: AXConversationOpenComposerPickerForFilesDeps,\n files: File[],\n): Promise<boolean> {\n if (!files.length) {\n return false;\n }\n\n const conversation = deps.conversation;\n if (!conversation) {\n return false;\n }\n\n const analysis = await analyzeInboundFiles(deps, files);\n\n if (analysis.unsupportedFiles.length > 0) {\n notifyPickerValidationErrors(deps.toast, deps.translation, analysis.unsupportedFiles);\n }\n\n if (!analysis.supportedFiles.length || !analysis.actions.length) {\n notifyInboundFilesValidationFailures(deps, analysis);\n return false;\n }\n\n let action = analysis.actions[0];\n if (analysis.actions.length > 1) {\n const chosen = await promptComposerActionChoice(deps, analysis.actions, analysis.supportedFiles.length);\n if (!chosen) {\n return false;\n }\n action = chosen;\n }\n\n const catalog = action.fileType;\n if (!catalog) {\n deps.toast.warning(deps.translation.translateSync('@acorex:chat.errors.inbound-files-none-supported'));\n return false;\n }\n\n const { accepted, rejected } = await deps.fileService.validateMany(analysis.supportedFiles, catalog);\n if (rejected.length > 0) {\n notifyPickerValidationErrors(deps.toast, deps.translation, rejected);\n }\n if (accepted.length === 0) {\n return false;\n }\n\n await openComposerPickerPopup(\n deps.popupService,\n deps.composerService,\n deps.composerActionRegistry,\n action,\n conversation,\n accepted,\n deps.config,\n );\n return true;\n}\n\n/** Extract OS-copied files from a paste event (e.g. Ctrl+V after copying a file in Explorer). */\nexport function filesFromClipboardEvent(event: ClipboardEvent): File[] {\n const items = event.clipboardData?.items;\n if (!items?.length) {\n return [];\n }\n\n const files: File[] = [];\n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n if (item.kind === 'file') {\n const file = item.getAsFile();\n if (file) {\n files.push(file);\n }\n }\n }\n return files;\n}\n\n/** Whether a paste event target lies in the chat panel (not sidebar). */\nexport function isPasteTargetInChatPanel(host: HTMLElement, target: EventTarget | null): boolean {\n if (!(target instanceof Node) || !host.contains(target)) {\n return false;\n }\n\n const excluded = host.querySelector('.conversation-sidebar-container, .sidebar-container');\n if (excluded?.contains(target)) {\n return false;\n }\n\n const chatMain = host.querySelector('.conversation-main-container, .main-area, .conversation-view');\n if (chatMain) {\n return chatMain.contains(target);\n }\n\n return true;\n}\n\n/** Handle Ctrl+V / paste when the clipboard holds files copied from the OS. */\nexport async function handleConversationFilePaste(\n event: ClipboardEvent,\n host: HTMLElement,\n deps: AXConversationOpenComposerPickerForFilesDeps,\n): Promise<void> {\n if (!isPasteTargetInChatPanel(host, event.target)) {\n return;\n }\n\n const files = filesFromClipboardEvent(event);\n if (!files.length) {\n return;\n }\n\n const handled = await openComposerPickerForFiles(deps, files);\n if (handled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n}\n"],"names":[],"mappings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,CAAC,IAAiB,EAAE,MAA0B,EAAA;AACpF,IAAA,IAAI,EAAE,MAAM,YAAY,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;AACvD,QAAA,OAAO,KAAK;IACd;IAEA,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,qDAAqD,CAAC;AAC1F,IAAA,IAAI,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE;AAC9B,QAAA,OAAO,KAAK;IACd;IAEA,MAAM,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,8DAA8D,CAAC;IACnG,IAAI,QAAQ,EAAE;AACZ,QAAA,OAAO,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC;IAClC;AAEA,IAAA,OAAO,IAAI;AACb;AAEA;AACO,eAAe,2BAA2B,CAC/C,KAAqB,EACrB,IAAiB,EACjB,IAAkD,EAAA;IAElD,IAAI,CAAC,wBAAwB,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE;QACjD;IACF;AAEA,IAAA,MAAM,KAAK,GAAG,uBAAuB,CAAC,KAAK,CAAC;AAC5C,IAAA,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;QACjB;IACF;IAEA,MAAM,OAAO,GAAG,MAAM,0BAA0B,CAAC,IAAI,EAAE,KAAK,CAAC;IAC7D,IAAI,OAAO,EAAE;QACX,KAAK,CAAC,cAAc,EAAE;QACtB,KAAK,CAAC,wBAAwB,EAAE;IAClC;AACF;;;;"}
1
+ {"version":3,"file":"acorex-components-conversation-open-composer-picker-for-files-BuNEjswI.mjs","sources":["../../../../packages/components/conversation/src/lib/components/message-list/open-composer-picker-popup.ts","../../../../packages/components/conversation/src/lib/components/message-list/open-composer-picker-for-files.ts"],"sourcesContent":["import type { AXPopupService } from '@acorex/components/popup';\nimport type { AXConversationComposerService } from '../composer/composer.service';\nimport type { AXConversationComposerAction, AXConversationComposerActionRegistry } from '../../registries/composer-action.registry';\nimport type { AXConversation } from '../../models';\nimport { resolveComposerMaxFiles } from '../../plugins/composer/composer-upload.config';\nimport type { AXConversationConfig } from '../../tokens/conversation-config.interface';\n\nexport async function openComposerPickerPopup(\n popupService: AXPopupService,\n composerService: AXConversationComposerService,\n registry: AXConversationComposerActionRegistry,\n action: AXConversationComposerAction,\n conversation: AXConversation,\n files: File[],\n config: Pick<Required<AXConversationConfig>, 'maxFilesPerMessage'>,\n): Promise<void> {\n const component = action.component ?? (action.componentLoader ? await action.componentLoader() : undefined);\n if (!component || files.length === 0) {\n return;\n }\n\n await popupService.open(component, {\n title: registry.getActionLabel(action),\n size: 'md',\n closeButton: true,\n header: false,\n panelClass: ['ax-conversation-composer-picker-popup'],\n inputs: {\n conversation,\n maxFiles: resolveComposerMaxFiles(action, config),\n initialFiles: files,\n service: composerService,\n },\n });\n}\n","import type { AXPopupService } from '@acorex/components/popup';\nimport type { AXToastService } from '@acorex/components/toast';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport type { AXFileService } from '@acorex/core/file';\nimport type { AXValidationRuleResult } from '@acorex/core/validation';\nimport type { AXConversationComposerService } from '../composer/composer.service';\nimport type { AXConversation } from '../../models';\nimport type { AXConversationComposerAction, AXConversationComposerActionRegistry } from '../../registries/composer-action.registry';\nimport { notifyPickerValidationErrors } from '../../plugins/composer/components/shared/picker-upload';\nimport type { AXConversationConfig } from '../../tokens/conversation-config.interface';\nimport { openComposerPickerPopup } from './open-composer-picker-popup';\n\nexport interface AXConversationOpenComposerPickerForFilesDeps {\n fileService: AXFileService;\n composerService: AXConversationComposerService;\n composerActionRegistry: AXConversationComposerActionRegistry;\n popupService: AXPopupService;\n toast: AXToastService;\n translation: AXTranslationService;\n conversation: AXConversation | null | undefined;\n config: Pick<Required<AXConversationConfig>, 'maxFilesPerMessage'>;\n}\n\n/** Catalogs registered on picker actions (conversation-image, conversation-file, …). */\nfunction pickerCatalogNames(registry: AXConversationComposerActionRegistry): string[] {\n const names = new Set<string>();\n for (const action of registry.actions()) {\n if ((action.component || action.componentLoader) && action.fileType) {\n names.add(action.fileType);\n }\n }\n return [...names];\n}\n\ninterface AXConversationInboundFilesAnalysis {\n matchingCatalogs: string[];\n actions: AXConversationComposerAction[];\n supportedFiles: File[];\n unsupportedFiles: { file: File; errors: AXValidationRuleResult[] }[];\n}\n\n/** Files that are not accepted by any registered picker catalog. */\nasync function collectUnsupportedInboundFiles(\n deps: Pick<AXConversationOpenComposerPickerForFilesDeps, 'fileService' | 'composerActionRegistry'>,\n files: File[],\n catalogs: string[],\n): Promise<{ file: File; errors: AXValidationRuleResult[] }[]> {\n const unsupported: { file: File; errors: AXValidationRuleResult[] }[] = [];\n\n for (const file of files) {\n let acceptedByAny = false;\n let lastErrors: AXValidationRuleResult[] = [];\n\n for (const catalog of catalogs) {\n const errors = await deps.fileService.validate(file, catalog);\n if (errors.length === 0) {\n acceptedByAny = true;\n break;\n }\n lastErrors = errors;\n }\n\n if (!acceptedByAny) {\n unsupported.push({ file, errors: lastErrors });\n }\n }\n\n return unsupported;\n}\n\nasync function analyzeInboundFiles(\n deps: Pick<\n AXConversationOpenComposerPickerForFilesDeps,\n 'fileService' | 'composerService' | 'composerActionRegistry'\n >,\n files: File[],\n): Promise<AXConversationInboundFilesAnalysis> {\n if (!files.length) {\n return { matchingCatalogs: [], actions: [], supportedFiles: [], unsupportedFiles: [] };\n }\n\n const catalogs = pickerCatalogNames(deps.composerActionRegistry);\n const unsupportedFiles = await collectUnsupportedInboundFiles(deps, files, catalogs);\n const unsupportedSet = new Set(unsupportedFiles.map((entry) => entry.file));\n const supportedFiles = files.filter((file) => !unsupportedSet.has(file));\n\n if (supportedFiles.length === 0) {\n return { matchingCatalogs: [], actions: [], supportedFiles: [], unsupportedFiles };\n }\n\n const context = deps.composerService.actionContext();\n const matchingCatalogs: string[] = [];\n\n for (const catalog of catalogs) {\n const { rejected } = await deps.fileService.validateMany(supportedFiles, catalog);\n if (rejected.length === 0) {\n matchingCatalogs.push(catalog);\n }\n }\n\n const seen = new Set<string>();\n const actions: AXConversationComposerAction[] = [];\n\n for (const catalog of matchingCatalogs) {\n for (const action of deps.composerActionRegistry.findPickerActionsForFileType(catalog, context)) {\n if (!seen.has(action.id)) {\n seen.add(action.id);\n actions.push(action);\n }\n }\n }\n\n return {\n matchingCatalogs,\n actions: actions.sort((a, b) => (b.priority ?? 0) - (a.priority ?? 0)),\n supportedFiles,\n unsupportedFiles,\n };\n}\n\nfunction notifyInboundFilesValidationFailures(\n deps: Pick<AXConversationOpenComposerPickerForFilesDeps, 'toast' | 'translation'>,\n analysis: AXConversationInboundFilesAnalysis,\n): void {\n if (analysis.supportedFiles.length === 0) {\n if (analysis.unsupportedFiles.length === 0) {\n deps.toast.warning(deps.translation.translateSync('@acorex:chat.errors.inbound-files-none-supported'));\n }\n return;\n }\n\n if (analysis.actions.length === 0) {\n const key =\n analysis.matchingCatalogs.length === 0\n ? '@acorex:chat.errors.inbound-files-none-supported'\n : '@acorex:chat.errors.inbound-files-no-send-option';\n deps.toast.warning(deps.translation.translateSync(key));\n }\n}\n\n/**\n * File catalogs that accept every supported file in the batch, then matching visible picker actions.\n */\nexport async function resolvePickerActionsForAllFiles(\n deps: Pick<AXConversationOpenComposerPickerForFilesDeps, 'fileService' | 'composerService' | 'composerActionRegistry'>,\n files: File[],\n): Promise<AXConversationComposerAction[]> {\n const analysis = await analyzeInboundFiles(deps, files);\n return analysis.actions;\n}\n\nasync function promptComposerActionChoice(\n deps: AXConversationOpenComposerPickerForFilesDeps,\n actions: AXConversationComposerAction[],\n fileCount: number,\n): Promise<AXConversationComposerAction | undefined> {\n const { AXConversationComposerActionChoiceDialogComponent } = await import('./composer-action-choice-dialog.component');\n const result = await deps.popupService.open(AXConversationComposerActionChoiceDialogComponent, {\n title: deps.translation.translateSync('@acorex:chat.dialog.choose-send-option.title'),\n size: 'sm',\n closeButton: true,\n header: true,\n inputs: {\n actions,\n fileCount,\n composerActionRegistry: deps.composerActionRegistry,\n },\n });\n\n const action = result?.data as AXConversationComposerAction | undefined;\n if (!action?.component && !action?.componentLoader) {\n return undefined;\n }\n return action;\n}\n\n/**\n * Match dropped/pasted files to composer picker action(s) and open the popup.\n * Unsupported files are skipped after a warning toast; supported files continue.\n * @returns true when a picker popup was opened\n */\nexport async function openComposerPickerForFiles(\n deps: AXConversationOpenComposerPickerForFilesDeps,\n files: File[],\n): Promise<boolean> {\n if (!files.length) {\n return false;\n }\n\n const conversation = deps.conversation;\n if (!conversation) {\n return false;\n }\n\n const analysis = await analyzeInboundFiles(deps, files);\n\n if (analysis.unsupportedFiles.length > 0) {\n notifyPickerValidationErrors(deps.toast, deps.translation, analysis.unsupportedFiles);\n }\n\n if (!analysis.supportedFiles.length || !analysis.actions.length) {\n notifyInboundFilesValidationFailures(deps, analysis);\n return false;\n }\n\n let action = analysis.actions[0];\n if (analysis.actions.length > 1) {\n const chosen = await promptComposerActionChoice(deps, analysis.actions, analysis.supportedFiles.length);\n if (!chosen) {\n return false;\n }\n action = chosen;\n }\n\n const catalog = action.fileType;\n if (!catalog) {\n deps.toast.warning(deps.translation.translateSync('@acorex:chat.errors.inbound-files-none-supported'));\n return false;\n }\n\n const { accepted, rejected } = await deps.fileService.validateMany(analysis.supportedFiles, catalog);\n if (rejected.length > 0) {\n notifyPickerValidationErrors(deps.toast, deps.translation, rejected);\n }\n if (accepted.length === 0) {\n return false;\n }\n\n await openComposerPickerPopup(\n deps.popupService,\n deps.composerService,\n deps.composerActionRegistry,\n action,\n conversation,\n accepted,\n deps.config,\n );\n return true;\n}\n\n/** Extract OS-copied files from a paste event (e.g. Ctrl+V after copying a file in Explorer). */\nexport function filesFromClipboardEvent(event: ClipboardEvent): File[] {\n const items = event.clipboardData?.items;\n if (!items?.length) {\n return [];\n }\n\n const files: File[] = [];\n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n if (item.kind === 'file') {\n const file = item.getAsFile();\n if (file) {\n files.push(file);\n }\n }\n }\n return files;\n}\n\n/** Whether a paste event target lies in the chat panel (not sidebar). */\nexport function isPasteTargetInChatPanel(host: HTMLElement, target: EventTarget | null): boolean {\n if (!(target instanceof Node) || !host.contains(target)) {\n return false;\n }\n\n const excluded = host.querySelector('.conversation-sidebar-container, .sidebar-container');\n if (excluded?.contains(target)) {\n return false;\n }\n\n const chatMain = host.querySelector('.conversation-main-container, .main-area, .conversation-view');\n if (chatMain) {\n return chatMain.contains(target);\n }\n\n return true;\n}\n\n/** Handle Ctrl+V / paste when the clipboard holds files copied from the OS. */\nexport async function handleConversationFilePaste(\n event: ClipboardEvent,\n host: HTMLElement,\n deps: AXConversationOpenComposerPickerForFilesDeps,\n): Promise<void> {\n if (!isPasteTargetInChatPanel(host, event.target)) {\n return;\n }\n\n const files = filesFromClipboardEvent(event);\n if (!files.length) {\n return;\n }\n\n const handled = await openComposerPickerForFiles(deps, files);\n if (handled) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n}\n"],"names":[],"mappings":";;AAOO,eAAe,uBAAuB,CAC3C,YAA4B,EAC5B,eAA8C,EAC9C,QAA8C,EAC9C,MAAoC,EACpC,YAA4B,EAC5B,KAAa,EACb,MAAkE,EAAA;IAElE,MAAM,SAAS,GAAG,MAAM,CAAC,SAAS,KAAK,MAAM,CAAC,eAAe,GAAG,MAAM,MAAM,CAAC,eAAe,EAAE,GAAG,SAAS,CAAC;IAC3G,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;QACpC;IACF;AAEA,IAAA,MAAM,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE;AACjC,QAAA,KAAK,EAAE,QAAQ,CAAC,cAAc,CAAC,MAAM,CAAC;AACtC,QAAA,IAAI,EAAE,IAAI;AACV,QAAA,WAAW,EAAE,IAAI;AACjB,QAAA,MAAM,EAAE,KAAK;QACb,UAAU,EAAE,CAAC,uCAAuC,CAAC;AACrD,QAAA,MAAM,EAAE;YACN,YAAY;AACZ,YAAA,QAAQ,EAAE,uBAAuB,CAAC,MAAM,EAAE,MAAM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