@acorex/components 22.0.0-next.9 → 22.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/combo-box/README.md +35 -0
- package/fesm2022/acorex-components-accordion.mjs +2 -2
- package/fesm2022/acorex-components-accordion.mjs.map +1 -1
- package/fesm2022/acorex-components-action-sheet.mjs +1 -0
- package/fesm2022/acorex-components-action-sheet.mjs.map +1 -1
- package/fesm2022/acorex-components-alert.mjs +2 -2
- package/fesm2022/acorex-components-alert.mjs.map +1 -1
- package/fesm2022/acorex-components-button.mjs +4 -4
- package/fesm2022/acorex-components-button.mjs.map +1 -1
- package/fesm2022/acorex-components-calendar.mjs +10 -12
- package/fesm2022/acorex-components-calendar.mjs.map +1 -1
- package/fesm2022/acorex-components-check-box.mjs +2 -2
- package/fesm2022/acorex-components-check-box.mjs.map +1 -1
- package/fesm2022/acorex-components-combo-box.mjs +783 -0
- package/fesm2022/acorex-components-combo-box.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs +50 -0
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-DCcRJYfF.mjs.map +1 -0
- package/fesm2022/{acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs → acorex-components-conversation-open-composer-picker-for-files-DnSW908R.mjs} +7 -20
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-DnSW908R.mjs.map +1 -0
- package/fesm2022/acorex-components-conversation.mjs +9946 -17396
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-data-table.mjs +188 -64
- package/fesm2022/acorex-components-data-table.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-box.mjs +14 -16
- package/fesm2022/acorex-components-datetime-box.mjs.map +1 -1
- package/fesm2022/acorex-components-datetime-input.mjs +61 -32
- package/fesm2022/acorex-components-datetime-input.mjs.map +1 -1
- package/fesm2022/acorex-components-decorators.mjs +21 -5
- package/fesm2022/acorex-components-decorators.mjs.map +1 -1
- package/fesm2022/acorex-components-dialog.mjs +7 -4
- package/fesm2022/acorex-components-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-drawer.mjs +2 -2
- package/fesm2022/acorex-components-drawer.mjs.map +1 -1
- package/fesm2022/acorex-components-dropdown.mjs +4 -4
- package/fesm2022/acorex-components-dropdown.mjs.map +1 -1
- package/fesm2022/acorex-components-fab.mjs +5 -5
- package/fesm2022/acorex-components-fab.mjs.map +1 -1
- package/fesm2022/acorex-components-file-viewer.mjs +27 -27
- package/fesm2022/acorex-components-file-viewer.mjs.map +1 -1
- package/fesm2022/acorex-components-form.mjs +21 -5
- package/fesm2022/acorex-components-form.mjs.map +1 -1
- package/fesm2022/acorex-components-grid-layout-builder.mjs +238 -36
- package/fesm2022/acorex-components-grid-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-components-label.mjs +2 -2
- package/fesm2022/acorex-components-label.mjs.map +1 -1
- package/fesm2022/acorex-components-list.mjs +2 -2
- package/fesm2022/acorex-components-list.mjs.map +1 -1
- package/fesm2022/acorex-components-loading-dialog.mjs +59 -42
- package/fesm2022/acorex-components-loading-dialog.mjs.map +1 -1
- package/fesm2022/acorex-components-lookup.mjs +2897 -0
- package/fesm2022/acorex-components-lookup.mjs.map +1 -0
- package/fesm2022/acorex-components-map.mjs +2 -2
- package/fesm2022/acorex-components-map.mjs.map +1 -1
- package/fesm2022/acorex-components-menu.mjs +238 -75
- package/fesm2022/acorex-components-menu.mjs.map +1 -1
- package/fesm2022/acorex-components-notification.mjs +13 -6
- package/fesm2022/acorex-components-notification.mjs.map +1 -1
- package/fesm2022/acorex-components-number-box.mjs +30 -29
- package/fesm2022/acorex-components-number-box.mjs.map +1 -1
- package/fesm2022/acorex-components-password-box.mjs +3 -3
- package/fesm2022/acorex-components-password-box.mjs.map +1 -1
- package/fesm2022/acorex-components-popover.mjs +29 -6
- package/fesm2022/acorex-components-popover.mjs.map +1 -1
- package/fesm2022/acorex-components-popup.mjs +4 -2
- package/fesm2022/acorex-components-popup.mjs.map +1 -1
- package/fesm2022/acorex-components-radio.mjs +2 -2
- package/fesm2022/acorex-components-radio.mjs.map +1 -1
- package/fesm2022/acorex-components-range-slider.mjs +2 -2
- package/fesm2022/acorex-components-range-slider.mjs.map +1 -1
- package/fesm2022/acorex-components-scheduler.mjs +12 -22
- package/fesm2022/acorex-components-scheduler.mjs.map +1 -1
- package/fesm2022/acorex-components-select-box.mjs +55 -18
- package/fesm2022/acorex-components-select-box.mjs.map +1 -1
- package/fesm2022/acorex-components-selection-list.mjs +2 -2
- package/fesm2022/acorex-components-selection-list.mjs.map +1 -1
- package/fesm2022/acorex-components-switch.mjs +2 -2
- package/fesm2022/acorex-components-switch.mjs.map +1 -1
- package/fesm2022/acorex-components-tabs.mjs +2 -2
- package/fesm2022/acorex-components-tabs.mjs.map +1 -1
- package/fesm2022/acorex-components-tag-box.mjs +2 -2
- package/fesm2022/acorex-components-tag-box.mjs.map +1 -1
- package/fesm2022/acorex-components-text-area.mjs +2 -2
- package/fesm2022/acorex-components-text-area.mjs.map +1 -1
- package/fesm2022/acorex-components-toast.mjs +9 -2
- package/fesm2022/acorex-components-toast.mjs.map +1 -1
- package/fesm2022/acorex-components-tooltip.mjs +2 -2
- package/fesm2022/acorex-components-tooltip.mjs.map +1 -1
- package/fesm2022/acorex-components-tree-view.mjs +40 -3
- package/fesm2022/acorex-components-tree-view.mjs.map +1 -1
- package/lookup/README.md +74 -0
- package/package.json +12 -7
- package/select-box/README.md +5 -0
- package/types/acorex-components-action-sheet.d.ts +9 -1
- package/types/acorex-components-combo-box.d.ts +280 -0
- package/types/acorex-components-conversation.d.ts +947 -1354
- package/types/acorex-components-data-table.d.ts +47 -5
- package/types/acorex-components-datetime-box.d.ts +2 -0
- package/types/acorex-components-datetime-input.d.ts +24 -5
- package/types/acorex-components-decorators.d.ts +1 -0
- package/types/acorex-components-dialog.d.ts +9 -0
- package/types/acorex-components-grid-layout-builder.d.ts +34 -2
- package/types/acorex-components-loading-dialog.d.ts +12 -4
- package/types/acorex-components-lookup.d.ts +831 -0
- package/types/acorex-components-menu.d.ts +28 -4
- package/types/acorex-components-notification.d.ts +11 -1
- package/types/acorex-components-number-box.d.ts +3 -1
- package/types/acorex-components-popover.d.ts +10 -1
- package/types/acorex-components-popup.d.ts +9 -1
- package/types/acorex-components-scheduler.d.ts +2 -4
- package/types/acorex-components-select-box.d.ts +21 -4
- package/types/acorex-components-toast.d.ts +10 -1
- package/types/acorex-components-tree-view.d.ts +9 -1
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CNHiM1Sp.mjs +0 -106
- package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CNHiM1Sp.mjs.map +0 -1
- package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs.map +0 -1
- package/fesm2022/acorex-components-selection-list-2.mjs +0 -168
- package/fesm2022/acorex-components-selection-list-2.mjs.map +0 -1
- package/selection-list-2/README.md +0 -3
- package/types/acorex-components-selection-list-2.d.ts +0 -52
|
@@ -138,6 +138,8 @@ declare class AXContextMenuComponent extends NXComponent {
|
|
|
138
138
|
/** @ignore */
|
|
139
139
|
private createBackdrop;
|
|
140
140
|
/** @ignore */
|
|
141
|
+
private resolveContextMenuTarget;
|
|
142
|
+
/** @ignore */
|
|
141
143
|
private removeBackdrop;
|
|
142
144
|
private createEventListeners;
|
|
143
145
|
/** @ignore */
|
|
@@ -175,8 +177,16 @@ declare class AXMenuItemComponent extends NXComponent implements OnDestroy {
|
|
|
175
177
|
private unsuscriber;
|
|
176
178
|
private renderer;
|
|
177
179
|
private injector;
|
|
180
|
+
private document;
|
|
178
181
|
private zIndexService;
|
|
179
182
|
private zToken;
|
|
183
|
+
private submenuPortalParent;
|
|
184
|
+
private submenuPortalNextSibling;
|
|
185
|
+
/** Survives submenu portaling when the DOM parent chain is broken. */
|
|
186
|
+
private linkedParent;
|
|
187
|
+
private mouseLeaveTimeout;
|
|
188
|
+
private submenuUnlistenEnter;
|
|
189
|
+
private submenuUnlistenLeave;
|
|
180
190
|
protected arrowIcon: _angular_core.Signal<string>;
|
|
181
191
|
onClick: _angular_core.OutputEmitterRef<AXMenuItemClickEvent>;
|
|
182
192
|
name: _angular_core.InputSignal<string>;
|
|
@@ -186,8 +196,8 @@ declare class AXMenuItemComponent extends NXComponent implements OnDestroy {
|
|
|
186
196
|
constructor();
|
|
187
197
|
private getText;
|
|
188
198
|
/**
|
|
189
|
-
* Resolves the parent menu item.
|
|
190
|
-
*
|
|
199
|
+
* Resolves the parent menu item. Prefers an explicit link (survives submenu portaling),
|
|
200
|
+
* then DI, then the DOM tree.
|
|
191
201
|
*/
|
|
192
202
|
getParentMenuItem(): AXMenuItemComponent | null;
|
|
193
203
|
/**
|
|
@@ -204,10 +214,20 @@ declare class AXMenuItemComponent extends NXComponent implements OnDestroy {
|
|
|
204
214
|
private schedulePositionCalculation;
|
|
205
215
|
/**
|
|
206
216
|
* Calculate the position of the submenu to avoid it going out of the viewport.
|
|
217
|
+
* Tall panels are height-clamped; the panel is portaled so parent overflow cannot clip it.
|
|
207
218
|
*/
|
|
208
219
|
private calculatePosition;
|
|
209
220
|
/** Measures submenu size using the same flex layout as the rendered menu. */
|
|
210
221
|
private measureSubmenuRect;
|
|
222
|
+
/** Moves the submenu under the context-menu backdrop (or body) to escape ancestor overflow. */
|
|
223
|
+
private portalSubmenu;
|
|
224
|
+
private restoreSubmenuPortal;
|
|
225
|
+
/** Keep this item open while the pointer is over its portaled submenu panel. */
|
|
226
|
+
private bindSubmenuPointerListeners;
|
|
227
|
+
private unbindSubmenuPointerListeners;
|
|
228
|
+
/** Links direct children so parent resolution still works after the panel is portaled. */
|
|
229
|
+
private linkChildItems;
|
|
230
|
+
private getInstanceFromElement;
|
|
211
231
|
/**
|
|
212
232
|
* Moves nested `ax-menu-item` nodes rendered by recursive `ngTemplateOutlet` templates
|
|
213
233
|
* into the submenu slot. Angular content queries do not traverse those embedded views.
|
|
@@ -225,10 +245,14 @@ declare class AXMenuItemComponent extends NXComponent implements OnDestroy {
|
|
|
225
245
|
private clampVerticalPosition;
|
|
226
246
|
handleClick(e: MouseEvent): void;
|
|
227
247
|
handleMouseEnter(event: MouseEvent): void;
|
|
228
|
-
private mouseLeaveTimeout;
|
|
229
248
|
handleMouseLeave(event: MouseEvent): void;
|
|
230
|
-
|
|
249
|
+
private handlePointerLeave;
|
|
250
|
+
private scheduleClose;
|
|
251
|
+
private clearCloseTimeout;
|
|
252
|
+
private clearAncestorCloseTimeouts;
|
|
253
|
+
/** True when the pointer is still inside this item's submenu tree (including portaled panels). */
|
|
231
254
|
private containsSubmenuPointer;
|
|
255
|
+
private isSelfOrAncestorOf;
|
|
232
256
|
ngOnDestroy(): void;
|
|
233
257
|
/** @ignore */
|
|
234
258
|
get __hostClass(): string[];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AXStyleColorType, AXStyleLookType, AXLocation, MXBaseComponent } from '@acorex/cdk/common';
|
|
2
2
|
import { AXOverlayRef } from '@acorex/cdk/overlay';
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
|
-
import { TemplateRef, Type, OnInit, InjectionToken } from '@angular/core';
|
|
4
|
+
import { TemplateRef, Type, ElementRef, OnInit, InjectionToken } from '@angular/core';
|
|
5
5
|
|
|
6
6
|
type AXNotificationContentType = string | TemplateRef<unknown> | Type<unknown>;
|
|
7
7
|
interface AXNotificationButtonItem {
|
|
@@ -26,6 +26,14 @@ interface AXNotificationOptions {
|
|
|
26
26
|
timeOut?: number;
|
|
27
27
|
timeOutProgress?: boolean;
|
|
28
28
|
pauseOnHover?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Element used to resolve inherited visual context for overlays rendered
|
|
31
|
+
* outside the originating DOM subtree.
|
|
32
|
+
*
|
|
33
|
+
* This affects Appearance, Light/Dark theme, Contrast, Size, and supported
|
|
34
|
+
* Density context. It does not affect overlay positioning.
|
|
35
|
+
*/
|
|
36
|
+
contextElement?: HTMLElement | ElementRef<HTMLElement>;
|
|
29
37
|
}
|
|
30
38
|
interface AXNotificationData {
|
|
31
39
|
buttons?: AXNotificationButtonItem[];
|
|
@@ -50,6 +58,7 @@ interface AXNotificationInternalRef {
|
|
|
50
58
|
id: string;
|
|
51
59
|
overlayRef: AXOverlayRef<unknown>;
|
|
52
60
|
config: AXNotificationData;
|
|
61
|
+
contextElement?: HTMLElement | ElementRef<HTMLElement>;
|
|
53
62
|
close: () => void;
|
|
54
63
|
}
|
|
55
64
|
|
|
@@ -124,6 +133,7 @@ declare class AXNotificationService {
|
|
|
124
133
|
private notificationCounterRef;
|
|
125
134
|
private moreNotificationsColor;
|
|
126
135
|
private moreNotificationsLocation;
|
|
136
|
+
private moreNotificationsContextElement;
|
|
127
137
|
private reserveCounter;
|
|
128
138
|
show(config: AXNotificationOptions): AXNotificationRef;
|
|
129
139
|
private displayNotification;
|
|
@@ -27,6 +27,7 @@ declare class AXNumberBoxComponent extends AXNumberBoxComponent_base {
|
|
|
27
27
|
changeOnScroll: _angular_core.InputSignal<boolean>;
|
|
28
28
|
step: _angular_core.InputSignal<number>;
|
|
29
29
|
protected mode: _angular_core.WritableSignal<"digits" | "thousandsSeparator" | "decimal">;
|
|
30
|
+
protected decimalPlaces: _angular_core.Signal<number>;
|
|
30
31
|
private input;
|
|
31
32
|
protected stringValue: _angular_core.WritableSignal<string>;
|
|
32
33
|
private translationService;
|
|
@@ -37,11 +38,12 @@ declare class AXNumberBoxComponent extends AXNumberBoxComponent_base {
|
|
|
37
38
|
result: boolean;
|
|
38
39
|
message?: undefined;
|
|
39
40
|
}>;
|
|
40
|
-
protected internalValueChanged(value: number | undefined): void;
|
|
41
|
+
protected internalValueChanged(value: number | undefined | null): void;
|
|
41
42
|
private plusValue;
|
|
42
43
|
private minusValue;
|
|
43
44
|
private getNumericValue;
|
|
44
45
|
private getSteppedValue;
|
|
46
|
+
private formatDisplayValue;
|
|
45
47
|
private clampToRange;
|
|
46
48
|
private getFractionDigits;
|
|
47
49
|
protected handleOnKeydownEvent(e: KeyboardEvent): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnDestroy, ElementRef, ComponentRef, TemplateRef, EventEmitter } from '@angular/core';
|
|
3
3
|
import { MXBaseComponent, AXPlacementType, AXEvent } from '@acorex/cdk/common';
|
|
4
|
+
import { AXOverlayVisualContextScope } from '@acorex/cdk/overlay';
|
|
4
5
|
import { AXComponentType } from '@acorex/core/components';
|
|
5
6
|
import * as i1 from '@angular/common';
|
|
6
7
|
|
|
@@ -39,6 +40,8 @@ declare class AXPopoverComponent extends MXBaseComponent implements OnDestroy {
|
|
|
39
40
|
private _disabled;
|
|
40
41
|
readonly width: i0.InputSignal<string>;
|
|
41
42
|
readonly disablePanelClass: i0.InputSignal<boolean>;
|
|
43
|
+
/** Propagate theme/size only — floating dropdown panels opt out of appearance/contrast. */
|
|
44
|
+
readonly visualContextScope: i0.InputSignal<AXOverlayVisualContextScope>;
|
|
42
45
|
private translateService;
|
|
43
46
|
/**
|
|
44
47
|
* Gets or sets whether the popover is disabled.
|
|
@@ -183,6 +186,12 @@ declare class AXPopoverComponent extends MXBaseComponent implements OnDestroy {
|
|
|
183
186
|
private setupScrollListener;
|
|
184
187
|
/** @ignore */
|
|
185
188
|
private removeScrollListener;
|
|
189
|
+
/**
|
|
190
|
+
* True when scroll is a side-effect of focusing an editable control inside the overlay
|
|
191
|
+
* (soft keyboard / visual viewport adjustment), mainly on iOS Safari.
|
|
192
|
+
* @ignore
|
|
193
|
+
*/
|
|
194
|
+
private isKeyboardInducedScroll;
|
|
186
195
|
/**
|
|
187
196
|
* Checks whether the given element lives inside a child overlay
|
|
188
197
|
* (an overlay stacked on top of this popover, e.g. a selectbox dropdown).
|
|
@@ -240,7 +249,7 @@ declare class AXPopoverComponent extends MXBaseComponent implements OnDestroy {
|
|
|
240
249
|
/** @ignore */
|
|
241
250
|
ngOnDestroy(): void;
|
|
242
251
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPopoverComponent, never>;
|
|
243
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AXPopoverComponent, "ax-popover", never, { "width": { "alias": "width"; "required": false; "isSignal": true; }; "disablePanelClass": { "alias": "disablePanelClass"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; "offsetX": { "alias": "offsetX"; "required": false; }; "offsetY": { "alias": "offsetY"; "required": false; }; "target": { "alias": "target"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "content": { "alias": "content"; "required": false; }; "openOn": { "alias": "openOn"; "required": false; }; "closeOn": { "alias": "closeOn"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "openAfter": { "alias": "openAfter"; "required": false; }; "closeAfter": { "alias": "closeAfter"; "required": false; }; "closeOnScroll": { "alias": "closeOnScroll"; "required": false; }; "backdropClass": { "alias": "backdropClass"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "adaptivityEnabled": { "alias": "adaptivityEnabled"; "required": false; }; }, { "onOpened": "onOpened"; "onClosed": "onClosed"; }, never, ["*"], true, never>;
|
|
252
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AXPopoverComponent, "ax-popover", never, { "width": { "alias": "width"; "required": false; "isSignal": true; }; "disablePanelClass": { "alias": "disablePanelClass"; "required": false; "isSignal": true; }; "visualContextScope": { "alias": "visualContextScope"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; }; "offsetX": { "alias": "offsetX"; "required": false; }; "offsetY": { "alias": "offsetY"; "required": false; }; "target": { "alias": "target"; "required": false; }; "placement": { "alias": "placement"; "required": false; }; "content": { "alias": "content"; "required": false; }; "openOn": { "alias": "openOn"; "required": false; }; "closeOn": { "alias": "closeOn"; "required": false; }; "hasBackdrop": { "alias": "hasBackdrop"; "required": false; }; "openAfter": { "alias": "openAfter"; "required": false; }; "closeAfter": { "alias": "closeAfter"; "required": false; }; "closeOnScroll": { "alias": "closeOnScroll"; "required": false; }; "backdropClass": { "alias": "backdropClass"; "required": false; }; "panelClass": { "alias": "panelClass"; "required": false; }; "adaptivityEnabled": { "alias": "adaptivityEnabled"; "required": false; }; }, { "onOpened": "onOpened"; "onClosed": "onClosed"; }, never, ["*"], true, never>;
|
|
244
253
|
}
|
|
245
254
|
|
|
246
255
|
declare class AXPopoverModule {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { TemplateRef, ViewContainerRef, StaticProvider, OnInit, OnDestroy } from '@angular/core';
|
|
2
|
+
import { TemplateRef, ViewContainerRef, StaticProvider, ElementRef, OnInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import * as i2 from '@acorex/cdk/common';
|
|
4
4
|
import { NXComponent, MXBaseComponent, AXComponentClosedPromise } from '@acorex/cdk/common';
|
|
5
5
|
import { AXComponentType, AXComponentInputs } from '@acorex/core/components';
|
|
@@ -55,6 +55,14 @@ interface AXPopupConfig {
|
|
|
55
55
|
* extra content inputs that depend on the ref.
|
|
56
56
|
*/
|
|
57
57
|
_bindContentInputs?: (ref: AXPopupRef) => Record<string, unknown>;
|
|
58
|
+
/**
|
|
59
|
+
* Element used to resolve inherited visual context for overlays rendered
|
|
60
|
+
* outside the originating DOM subtree.
|
|
61
|
+
*
|
|
62
|
+
* This affects Appearance, Light/Dark theme, Contrast, Size, and supported
|
|
63
|
+
* Density context. It does not affect overlay positioning.
|
|
64
|
+
*/
|
|
65
|
+
contextElement?: HTMLElement | ElementRef<HTMLElement>;
|
|
58
66
|
}
|
|
59
67
|
interface AXPopupData {
|
|
60
68
|
title: string;
|
|
@@ -115,7 +115,6 @@ declare class AXSchedulerComponent extends NXComponent implements OnInit {
|
|
|
115
115
|
private translationService;
|
|
116
116
|
private eventService;
|
|
117
117
|
private translationRevision;
|
|
118
|
-
private viewModeSelectbox;
|
|
119
118
|
private calendarPopover;
|
|
120
119
|
private _calendarDayCellTemplate;
|
|
121
120
|
private _calendarMonthCellTemplate;
|
|
@@ -133,8 +132,8 @@ declare class AXSchedulerComponent extends NXComponent implements OnInit {
|
|
|
133
132
|
appointments: _angular_core.Signal<AXSchedulerAppointment[]>;
|
|
134
133
|
protected readonly rtl: _angular_core.Signal<boolean>;
|
|
135
134
|
protected isFullScreen: _angular_core.WritableSignal<boolean>;
|
|
136
|
-
protected viewsDataSource: _angular_core.
|
|
137
|
-
id:
|
|
135
|
+
protected viewsDataSource: _angular_core.Signal<{
|
|
136
|
+
id: AXSchedulerView;
|
|
138
137
|
text: string;
|
|
139
138
|
}[]>;
|
|
140
139
|
private prevDate;
|
|
@@ -186,7 +185,6 @@ declare class AXSchedulerComponent extends NXComponent implements OnInit {
|
|
|
186
185
|
*/
|
|
187
186
|
private getWeekReanchorDate;
|
|
188
187
|
private syncCurrentDateAfterLocaleChange;
|
|
189
|
-
private fillDataSource;
|
|
190
188
|
private getGridDateRange;
|
|
191
189
|
currentDateText: _angular_core.Signal<string>;
|
|
192
190
|
calendarDepth: _angular_core.Signal<"day" | "month" | "year">;
|
|
@@ -12,7 +12,7 @@ import { Observable } from 'rxjs';
|
|
|
12
12
|
import * as i1 from '@angular/common';
|
|
13
13
|
import * as i3 from '@angular/forms';
|
|
14
14
|
import * as i4 from '@acorex/components/check-box';
|
|
15
|
-
import * as i5 from '@acorex/components/
|
|
15
|
+
import * as i5 from '@acorex/components/tag';
|
|
16
16
|
import * as i6 from '@acorex/components/decorators';
|
|
17
17
|
import * as i7 from '@acorex/core/translation';
|
|
18
18
|
import * as i8 from '@acorex/components/popover';
|
|
@@ -22,8 +22,10 @@ import * as i11 from '@acorex/components/text-box';
|
|
|
22
22
|
|
|
23
23
|
declare const AXSelectBoxComponent_base: polytype.Polytype.ClusteredConstructor<[typeof MXDropdownBoxBaseComponent, typeof MXSelectionValueComponent, typeof MXLookComponent]>;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
25
|
+
* @deprecated Use `combo-box` when your data is a simple array. Use `lookup` when you need advanced features and `AXDataSource` support.
|
|
26
|
+
* This component is deprecated and no longer supported.
|
|
27
|
+
*
|
|
28
|
+
* @category Components
|
|
27
29
|
*/
|
|
28
30
|
declare class AXSelectBoxComponent extends AXSelectBoxComponent_base implements OnDestroy {
|
|
29
31
|
#private;
|
|
@@ -56,6 +58,13 @@ declare class AXSelectBoxComponent extends AXSelectBoxComponent_base implements
|
|
|
56
58
|
protected _dropdownWidth: _angular_core.WritableSignal<string>;
|
|
57
59
|
/** @ignore */
|
|
58
60
|
protected _dropdownHeight: _angular_core.WritableSignal<string>;
|
|
61
|
+
/**
|
|
62
|
+
* Pixel height for the popover list and CDK viewport. Uses the sized height
|
|
63
|
+
* when known, otherwise the standard `maxVisibleItems × itemHeight` viewport.
|
|
64
|
+
* Always a pixel value so virtual scroll has a definite size on first open.
|
|
65
|
+
* @ignore
|
|
66
|
+
*/
|
|
67
|
+
protected _panelMinHeight: _angular_core.Signal<string>;
|
|
59
68
|
/** @ignore */
|
|
60
69
|
protected _listDataSource: AXDataSource<any>;
|
|
61
70
|
/** @ignore */
|
|
@@ -159,6 +168,10 @@ declare class AXSelectBoxComponent extends AXSelectBoxComponent_base implements
|
|
|
159
168
|
/** @ignore */
|
|
160
169
|
protected _handleItemSelected(e: AXItemSelectedEvent): void;
|
|
161
170
|
private resetSearchAfterSelection;
|
|
171
|
+
private _getListItemPx;
|
|
172
|
+
private _getMaxVisibleItems;
|
|
173
|
+
/** Standard popover list height: `maxVisibleItems` rows (default 5). */
|
|
174
|
+
private _getStandardListHeightPx;
|
|
162
175
|
/** @ignore */
|
|
163
176
|
private setDropdownSize;
|
|
164
177
|
/**
|
|
@@ -189,9 +202,13 @@ declare class AXSelectBoxComponent extends AXSelectBoxComponent_base implements
|
|
|
189
202
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXSelectBoxComponent, "ax-select-box", never, { "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "tabIndex": { "alias": "tabIndex"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "minValue": { "alias": "minValue"; "required": false; }; "maxValue": { "alias": "maxValue"; "required": false; }; "value": { "alias": "value"; "required": false; }; "state": { "alias": "state"; "required": false; }; "name": { "alias": "name"; "required": false; }; "id": { "alias": "id"; "required": false; }; "type": { "alias": "type"; "required": false; }; "look": { "alias": "look"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "valueField": { "alias": "valueField"; "required": false; }; "textField": { "alias": "textField"; "required": false; }; "disabledField": { "alias": "disabledField"; "required": false; }; "textTemplate": { "alias": "textTemplate"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "isItemTruncated": { "alias": "isItemTruncated"; "required": false; "isSignal": true; }; "showItemTooltip": { "alias": "showItemTooltip"; "required": false; "isSignal": true; }; "itemHeight": { "alias": "itemHeight"; "required": false; "isSignal": true; }; "maxVisibleItems": { "alias": "maxVisibleItems"; "required": false; "isSignal": true; }; "dataSource": { "alias": "dataSource"; "required": false; }; "minRecordsForSearch": { "alias": "minRecordsForSearch"; "required": false; }; "caption": { "alias": "caption"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; "selectedTemplate": { "alias": "selectedTemplate"; "required": false; }; "emptyTemplate": { "alias": "emptyTemplate"; "required": false; }; "loadingTemplate": { "alias": "loadingTemplate"; "required": false; }; "dropdownWidth": { "alias": "dropdownWidth"; "required": false; "isSignal": true; }; "searchBoxAutoFocus": { "alias": "searchBoxAutoFocus"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "stateChange": "stateChange"; "onValueChanged": "onValueChanged"; "onBlur": "onBlur"; "onFocus": "onFocus"; "readonlyChange": "readonlyChange"; "disabledChange": "disabledChange"; "onOpened": "onOpened"; "onClosed": "onClosed"; "onItemSelected": "onItemSelected"; "onItemClick": "onItemClick"; }, ["searchBox"], ["ax-prefix", "ax-clear-button", "ax-suffix", "ax-search-box", "ax-footer", "ax-validation-rule"], true, never>;
|
|
190
203
|
}
|
|
191
204
|
|
|
205
|
+
/**
|
|
206
|
+
* @deprecated Use `combo-box` when your data is a simple array. Use `lookup` when you need advanced features and `AXDataSource` support.
|
|
207
|
+
* This module is deprecated and no longer supported.
|
|
208
|
+
*/
|
|
192
209
|
declare class AXSelectBoxModule {
|
|
193
210
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXSelectBoxModule, never>;
|
|
194
|
-
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXSelectBoxModule, never, [typeof i1.CommonModule, typeof i2.AXCommonModule, typeof i3.FormsModule, typeof i4.AXCheckBoxModule, typeof i5.
|
|
211
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AXSelectBoxModule, never, [typeof i1.CommonModule, typeof i2.AXCommonModule, typeof i3.FormsModule, typeof i4.AXCheckBoxModule, typeof i5.AXTagModule, typeof i6.AXDecoratorModule, typeof i7.AXTranslationModule, typeof i8.AXPopoverModule, typeof i9.AXLoadingModule, typeof i10.A11yModule, typeof i11.AXTextBoxModule, typeof i12.AXDropdownModule, typeof i13.AXListModule, typeof AXSelectBoxComponent], [typeof AXSelectBoxComponent]>;
|
|
195
212
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<AXSelectBoxModule>;
|
|
196
213
|
}
|
|
197
214
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AXLocation, AXStyleColorType, AXStyleLookType, MXBaseComponent } from '@acorex/cdk/common';
|
|
2
2
|
import { AXOverlayRef } from '@acorex/cdk/overlay';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
|
-
import { OnInit, InjectionToken } from '@angular/core';
|
|
4
|
+
import { ElementRef, OnInit, InjectionToken } from '@angular/core';
|
|
5
5
|
import * as i2 from '@acorex/components/button';
|
|
6
6
|
import { AXButtonItem } from '@acorex/components/button';
|
|
7
7
|
import * as i1 from '@angular/common';
|
|
@@ -20,6 +20,14 @@ interface AXToastDisplayConfig {
|
|
|
20
20
|
timeOut?: number;
|
|
21
21
|
timeOutProgress?: boolean;
|
|
22
22
|
pauseOnHover?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Element used to resolve inherited visual context for overlays rendered
|
|
25
|
+
* outside the originating DOM subtree.
|
|
26
|
+
*
|
|
27
|
+
* This affects Appearance, Light/Dark theme, Contrast, Size, and supported
|
|
28
|
+
* Density context. It does not affect overlay positioning.
|
|
29
|
+
*/
|
|
30
|
+
contextElement?: HTMLElement | ElementRef<HTMLElement>;
|
|
23
31
|
}
|
|
24
32
|
interface AXToastData {
|
|
25
33
|
icon?: string;
|
|
@@ -45,6 +53,7 @@ interface AXToastInternalRef {
|
|
|
45
53
|
id: string;
|
|
46
54
|
overlayRef: AXOverlayRef<unknown>;
|
|
47
55
|
config: AXToastData;
|
|
56
|
+
contextElement?: HTMLElement | ElementRef<HTMLElement>;
|
|
48
57
|
close: () => void;
|
|
49
58
|
}
|
|
50
59
|
|
|
@@ -236,6 +236,11 @@ declare class AXTreeViewComponent {
|
|
|
236
236
|
readonly indentSize: _angular_core.InputSignal<number>;
|
|
237
237
|
/** Visual style variant. Default: `'default'` */
|
|
238
238
|
readonly look: _angular_core.InputSignal<AXTreeViewViewLook>;
|
|
239
|
+
/**
|
|
240
|
+
* When `true`, visible nodes use alternating background colors (flattened visual order,
|
|
241
|
+
* including expanded children). Default: `false`.
|
|
242
|
+
*/
|
|
243
|
+
readonly alternate: _angular_core.InputSignal<boolean>;
|
|
239
244
|
/** Custom template for tree items. Default: `undefined` */
|
|
240
245
|
readonly nodeTemplate: _angular_core.InputSignal<TemplateRef<AXTreeViewItemTemplateContext>>;
|
|
241
246
|
/** Field name for node ID. Default: `'id'` */
|
|
@@ -312,6 +317,9 @@ declare class AXTreeViewComponent {
|
|
|
312
317
|
/** Computed chevron icons that flip for RTL */
|
|
313
318
|
protected readonly directionExpandedIcon: _angular_core.Signal<string>;
|
|
314
319
|
protected readonly directionCollapsedIcon: _angular_core.Signal<string>;
|
|
320
|
+
/** Visible-row index (DFS of expanded, non-hidden nodes) used for alternate striping. */
|
|
321
|
+
protected readonly alternateRowIndexById: _angular_core.Signal<Map<string, number>>;
|
|
322
|
+
protected isAlternateNode(node: AXTreeViewNode): boolean;
|
|
315
323
|
/** Flag to prevent infinite loops when syncing datasource */
|
|
316
324
|
private isUpdatingFromDatasource;
|
|
317
325
|
/** Bumped when controlled selection changes so stale async sync is ignored. */
|
|
@@ -838,7 +846,7 @@ declare class AXTreeViewComponent {
|
|
|
838
846
|
*/
|
|
839
847
|
private handleError;
|
|
840
848
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AXTreeViewComponent, never>;
|
|
841
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXTreeViewComponent, "ax-tree-view", never, { "datasource": { "alias": "datasource"; "required": true; "isSignal": true; }; "selectMode": { "alias": "selectMode"; "required": false; "isSignal": true; }; "selectionBehavior": { "alias": "selectionBehavior"; "required": false; "isSignal": true; }; "dragArea": { "alias": "dragArea"; "required": false; "isSignal": true; }; "dragBehavior": { "alias": "dragBehavior"; "required": false; "isSignal": true; }; "showIcons": { "alias": "showIcons"; "required": false; "isSignal": true; }; "showChildrenBadge": { "alias": "showChildrenBadge"; "required": false; "isSignal": true; }; "expandedIcon": { "alias": "expandedIcon"; "required": false; "isSignal": true; }; "collapsedIcon": { "alias": "collapsedIcon"; "required": false; "isSignal": true; }; "indentSize": { "alias": "indentSize"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "nodeTemplate": { "alias": "nodeTemplate"; "required": false; "isSignal": true; }; "idField": { "alias": "idField"; "required": false; "isSignal": true; }; "titleField": { "alias": "titleField"; "required": false; "isSignal": true; }; "tooltipField": { "alias": "tooltipField"; "required": false; "isSignal": true; }; "iconField": { "alias": "iconField"; "required": false; "isSignal": true; }; "expandedField": { "alias": "expandedField"; "required": false; "isSignal": true; }; "selectedField": { "alias": "selectedField"; "required": false; "isSignal": true; }; "indeterminateField": { "alias": "indeterminateField"; "required": false; "isSignal": true; }; "disabledField": { "alias": "disabledField"; "required": false; "isSignal": true; }; "hiddenField": { "alias": "hiddenField"; "required": false; "isSignal": true; }; "childrenField": { "alias": "childrenField"; "required": false; "isSignal": true; }; "childrenCountField": { "alias": "childrenCountField"; "required": false; "isSignal": true; }; "dataField": { "alias": "dataField"; "required": false; "isSignal": true; }; "inheritDisabled": { "alias": "inheritDisabled"; "required": false; "isSignal": true; }; "expandOnDoubleClick": { "alias": "expandOnDoubleClick"; "required": false; "isSignal": true; }; "doubleClickDuration": { "alias": "doubleClickDuration"; "required": false; "isSignal": true; }; "tooltipDelay": { "alias": "tooltipDelay"; "required": false; "isSignal": true; }; "controlledSelection": { "alias": "controlledSelection"; "required": false; "isSignal": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; "isSignal": true; }; }, { "datasource": "datasourceChange"; "selectedIds": "selectedIdsChange"; "onBeforeDrop": "onBeforeDrop"; "onNodeToggle": "onNodeToggle"; "onNodeSelect": "onNodeSelect"; "onNodeDoubleClick": "onNodeDoubleClick"; "onNodeClick": "onNodeClick"; "onSelectionChange": "onSelectionChange"; "onOrderChange": "onOrderChange"; "onMoveChange": "onMoveChange"; "onItemsChange": "onItemsChange"; }, never, never, true, never>;
|
|
849
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<AXTreeViewComponent, "ax-tree-view", never, { "datasource": { "alias": "datasource"; "required": true; "isSignal": true; }; "selectMode": { "alias": "selectMode"; "required": false; "isSignal": true; }; "selectionBehavior": { "alias": "selectionBehavior"; "required": false; "isSignal": true; }; "dragArea": { "alias": "dragArea"; "required": false; "isSignal": true; }; "dragBehavior": { "alias": "dragBehavior"; "required": false; "isSignal": true; }; "showIcons": { "alias": "showIcons"; "required": false; "isSignal": true; }; "showChildrenBadge": { "alias": "showChildrenBadge"; "required": false; "isSignal": true; }; "expandedIcon": { "alias": "expandedIcon"; "required": false; "isSignal": true; }; "collapsedIcon": { "alias": "collapsedIcon"; "required": false; "isSignal": true; }; "indentSize": { "alias": "indentSize"; "required": false; "isSignal": true; }; "look": { "alias": "look"; "required": false; "isSignal": true; }; "alternate": { "alias": "alternate"; "required": false; "isSignal": true; }; "nodeTemplate": { "alias": "nodeTemplate"; "required": false; "isSignal": true; }; "idField": { "alias": "idField"; "required": false; "isSignal": true; }; "titleField": { "alias": "titleField"; "required": false; "isSignal": true; }; "tooltipField": { "alias": "tooltipField"; "required": false; "isSignal": true; }; "iconField": { "alias": "iconField"; "required": false; "isSignal": true; }; "expandedField": { "alias": "expandedField"; "required": false; "isSignal": true; }; "selectedField": { "alias": "selectedField"; "required": false; "isSignal": true; }; "indeterminateField": { "alias": "indeterminateField"; "required": false; "isSignal": true; }; "disabledField": { "alias": "disabledField"; "required": false; "isSignal": true; }; "hiddenField": { "alias": "hiddenField"; "required": false; "isSignal": true; }; "childrenField": { "alias": "childrenField"; "required": false; "isSignal": true; }; "childrenCountField": { "alias": "childrenCountField"; "required": false; "isSignal": true; }; "dataField": { "alias": "dataField"; "required": false; "isSignal": true; }; "inheritDisabled": { "alias": "inheritDisabled"; "required": false; "isSignal": true; }; "expandOnDoubleClick": { "alias": "expandOnDoubleClick"; "required": false; "isSignal": true; }; "doubleClickDuration": { "alias": "doubleClickDuration"; "required": false; "isSignal": true; }; "tooltipDelay": { "alias": "tooltipDelay"; "required": false; "isSignal": true; }; "controlledSelection": { "alias": "controlledSelection"; "required": false; "isSignal": true; }; "selectedIds": { "alias": "selectedIds"; "required": false; "isSignal": true; }; }, { "datasource": "datasourceChange"; "selectedIds": "selectedIdsChange"; "onBeforeDrop": "onBeforeDrop"; "onNodeToggle": "onNodeToggle"; "onNodeSelect": "onNodeSelect"; "onNodeDoubleClick": "onNodeDoubleClick"; "onNodeClick": "onNodeClick"; "onSelectionChange": "onSelectionChange"; "onOrderChange": "onOrderChange"; "onMoveChange": "onMoveChange"; "onItemsChange": "onItemsChange"; }, never, never, true, never>;
|
|
842
850
|
}
|
|
843
851
|
|
|
844
852
|
declare class AXTreeViewModule {
|
package/fesm2022/acorex-components-conversation-composer-action-choice-dialog.component-CNHiM1Sp.mjs
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
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, 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: `
|
|
43
|
-
<div class="composer-action-choice" role="dialog" aria-modal="true">
|
|
44
|
-
<p class="composer-action-choice__hint">{{ hintText() }}</p>
|
|
45
|
-
<ul class="composer-action-choice__list" role="listbox">
|
|
46
|
-
@for (action of actions(); track action.id) {
|
|
47
|
-
<li role="presentation">
|
|
48
|
-
<button
|
|
49
|
-
type="button"
|
|
50
|
-
class="composer-action-choice__option"
|
|
51
|
-
role="option"
|
|
52
|
-
(click)="choose(action)"
|
|
53
|
-
[attr.aria-label]="getActionLabel(action)"
|
|
54
|
-
>
|
|
55
|
-
<span class="composer-action-choice__icon" aria-hidden="true">
|
|
56
|
-
<i [class]="action.icon"></i>
|
|
57
|
-
</span>
|
|
58
|
-
<span class="composer-action-choice__text">
|
|
59
|
-
<span class="composer-action-choice__title">{{ getActionLabel(action) }}</span>
|
|
60
|
-
@if (getActionTooltip(action); as tip) {
|
|
61
|
-
<span class="composer-action-choice__subtitle">{{ tip }}</span>
|
|
62
|
-
}
|
|
63
|
-
</span>
|
|
64
|
-
<i class="fa-light fa-chevron-right composer-action-choice__chevron" aria-hidden="true"></i>
|
|
65
|
-
</button>
|
|
66
|
-
</li>
|
|
67
|
-
}
|
|
68
|
-
</ul>
|
|
69
|
-
</div>
|
|
70
|
-
`, isInline: true, styles: [":host{display:block}.composer-action-choice{display:flex;flex-direction:column;gap:.75rem;padding:.5rem;min-width:16rem}.composer-action-choice__hint{margin:0;font-size:.8125rem;line-height:1.45;color:rgba(var(--ax-sys-color-on-surface),.7)}.composer-action-choice__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.composer-action-choice__option{display:flex;align-items:center;gap:.75rem;width:100%;padding:.625rem .75rem;border:1px solid rgb(var(--ax-sys-color-border-light-surface));border-radius:var(--ax-sys-border-radius, .5rem);background:rgb(var(--ax-sys-color-surface));cursor:pointer;text-align:start;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}.composer-action-choice__option:hover,.composer-action-choice__option:focus-visible{border-color:rgb(var(--ax-sys-color-primary-500));background:rgba(var(--ax-sys-color-primary-500),.06);outline:none;box-shadow:0 0 0 1px rgba(var(--ax-sys-color-primary-500),.25)}.composer-action-choice__icon{display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;flex-shrink:0;border-radius:var(--ax-sys-border-radius, .375rem);background:rgba(var(--ax-sys-color-primary-500),.1);color:rgb(var(--ax-sys-color-primary-600));font-size:1.125rem}.composer-action-choice__text{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.composer-action-choice__title{font-size:.875rem;font-weight:600;color:rgb(var(--ax-sys-color-on-surface))}.composer-action-choice__subtitle{font-size:.75rem;color:rgba(var(--ax-sys-color-on-surface),.6);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.composer-action-choice__chevron{flex-shrink:0;font-size:.75rem;color:rgba(var(--ax-sys-color-on-surface),.45)}\n"] }); }
|
|
71
|
-
}
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.8", ngImport: i0, type: AXConversationComposerActionChoiceDialogComponent, decorators: [{
|
|
73
|
-
type: Component,
|
|
74
|
-
args: [{ selector: 'ax-conversation-composer-action-choice-dialog', template: `
|
|
75
|
-
<div class="composer-action-choice" role="dialog" aria-modal="true">
|
|
76
|
-
<p class="composer-action-choice__hint">{{ hintText() }}</p>
|
|
77
|
-
<ul class="composer-action-choice__list" role="listbox">
|
|
78
|
-
@for (action of actions(); track action.id) {
|
|
79
|
-
<li role="presentation">
|
|
80
|
-
<button
|
|
81
|
-
type="button"
|
|
82
|
-
class="composer-action-choice__option"
|
|
83
|
-
role="option"
|
|
84
|
-
(click)="choose(action)"
|
|
85
|
-
[attr.aria-label]="getActionLabel(action)"
|
|
86
|
-
>
|
|
87
|
-
<span class="composer-action-choice__icon" aria-hidden="true">
|
|
88
|
-
<i [class]="action.icon"></i>
|
|
89
|
-
</span>
|
|
90
|
-
<span class="composer-action-choice__text">
|
|
91
|
-
<span class="composer-action-choice__title">{{ getActionLabel(action) }}</span>
|
|
92
|
-
@if (getActionTooltip(action); as tip) {
|
|
93
|
-
<span class="composer-action-choice__subtitle">{{ tip }}</span>
|
|
94
|
-
}
|
|
95
|
-
</span>
|
|
96
|
-
<i class="fa-light fa-chevron-right composer-action-choice__chevron" aria-hidden="true"></i>
|
|
97
|
-
</button>
|
|
98
|
-
</li>
|
|
99
|
-
}
|
|
100
|
-
</ul>
|
|
101
|
-
</div>
|
|
102
|
-
`, providers: [{ provide: AXClosableComponent, useExisting: AXConversationComposerActionChoiceDialogComponent }], styles: [":host{display:block}.composer-action-choice{display:flex;flex-direction:column;gap:.75rem;padding:.5rem;min-width:16rem}.composer-action-choice__hint{margin:0;font-size:.8125rem;line-height:1.45;color:rgba(var(--ax-sys-color-on-surface),.7)}.composer-action-choice__list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.5rem}.composer-action-choice__option{display:flex;align-items:center;gap:.75rem;width:100%;padding:.625rem .75rem;border:1px solid rgb(var(--ax-sys-color-border-light-surface));border-radius:var(--ax-sys-border-radius, .5rem);background:rgb(var(--ax-sys-color-surface));cursor:pointer;text-align:start;transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease}.composer-action-choice__option:hover,.composer-action-choice__option:focus-visible{border-color:rgb(var(--ax-sys-color-primary-500));background:rgba(var(--ax-sys-color-primary-500),.06);outline:none;box-shadow:0 0 0 1px rgba(var(--ax-sys-color-primary-500),.25)}.composer-action-choice__icon{display:flex;align-items:center;justify-content:center;width:2.5rem;height:2.5rem;flex-shrink:0;border-radius:var(--ax-sys-border-radius, .375rem);background:rgba(var(--ax-sys-color-primary-500),.1);color:rgb(var(--ax-sys-color-primary-600));font-size:1.125rem}.composer-action-choice__text{flex:1;min-width:0;display:flex;flex-direction:column;gap:.125rem}.composer-action-choice__title{font-size:.875rem;font-weight:600;color:rgb(var(--ax-sys-color-on-surface))}.composer-action-choice__subtitle{font-size:.75rem;color:rgba(var(--ax-sys-color-on-surface),.6);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.composer-action-choice__chevron{flex-shrink:0;font-size:.75rem;color:rgba(var(--ax-sys-color-on-surface),.45)}\n"] }]
|
|
103
|
-
}], 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 }] }] } });
|
|
104
|
-
|
|
105
|
-
export { AXConversationComposerActionChoiceDialogComponent };
|
|
106
|
-
//# sourceMappingURL=acorex-components-conversation-composer-action-choice-dialog.component-CNHiM1Sp.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"acorex-components-conversation-composer-action-choice-dialog.component-CNHiM1Sp.mjs","sources":["../../../../packages/components/conversation/src/lib/components/message-list/composer-action-choice-dialog.component.ts"],"sourcesContent":["import { AXClosableComponent, AXComponentCloseEvent } from '@acorex/cdk/common';\nimport type { AXPopupRef } from '@acorex/components/popup';\nimport { AXTranslationService } from '@acorex/core/translation';\nimport { Component, EventEmitter, 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\n template: `\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 `,\n styles: [\n `\n :host {\n display: block;\n }\n\n .composer-action-choice {\n display: flex;\n flex-direction: column;\n gap: 0.75rem;\n padding: 0.5rem;\n min-width: 16rem;\n }\n\n .composer-action-choice__hint {\n margin: 0;\n font-size: 0.8125rem;\n line-height: 1.45;\n color: rgba(var(--ax-sys-color-on-surface), 0.7);\n }\n\n .composer-action-choice__list {\n list-style: none;\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n }\n\n .composer-action-choice__option {\n display: flex;\n align-items: center;\n gap: 0.75rem;\n width: 100%;\n padding: 0.625rem 0.75rem;\n border: 1px solid rgb(var(--ax-sys-color-border-light-surface));\n border-radius: var(--ax-sys-border-radius, 0.5rem);\n background: rgb(var(--ax-sys-color-surface));\n cursor: pointer;\n text-align: start;\n transition:\n border-color 0.15s ease,\n background-color 0.15s ease,\n box-shadow 0.15s ease;\n }\n\n .composer-action-choice__option:hover,\n .composer-action-choice__option:focus-visible {\n border-color: rgb(var(--ax-sys-color-primary-500));\n background: rgba(var(--ax-sys-color-primary-500), 0.06);\n outline: none;\n box-shadow: 0 0 0 1px rgba(var(--ax-sys-color-primary-500), 0.25);\n }\n\n .composer-action-choice__icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 2.5rem;\n height: 2.5rem;\n flex-shrink: 0;\n border-radius: var(--ax-sys-border-radius, 0.375rem);\n background: rgba(var(--ax-sys-color-primary-500), 0.1);\n color: rgb(var(--ax-sys-color-primary-600));\n font-size: 1.125rem;\n }\n\n .composer-action-choice__text {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 0.125rem;\n }\n\n .composer-action-choice__title {\n font-size: 0.875rem;\n font-weight: 600;\n color: rgb(var(--ax-sys-color-on-surface));\n }\n\n .composer-action-choice__subtitle {\n font-size: 0.75rem;\n color: rgba(var(--ax-sys-color-on-surface), 0.6);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .composer-action-choice__chevron {\n flex-shrink: 0;\n font-size: 0.75rem;\n color: rgba(var(--ax-sys-color-on-surface), 0.45);\n }\n `,\n ],\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"],"names":[],"mappings":";;;;;MA4Ia,iDAAiD,CAAA;AAnI9D,IAAA,WAAA,GAAA;AAoImB,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,aAAa,CAAC,oDAAoD,CAAC;YAC7F;AACA,YAAA,OAAO,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,sDAAsD,EAAE;gBAC5F,MAAM,EAAE,EAAE,KAAK,EAAE;AAClB,aAAA,CAA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,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,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EA9HnG;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,6tDAAA,CAAA,EAAA,CAAA,CAAA;;2FAoGU,iDAAiD,EAAA,UAAA,EAAA,CAAA;kBAnI7D,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,+CAA+C,EAAA,QAAA,EAE/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BT,EAAA,SAAA,EAkGU,CAAC,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAA,iDAAmD,EAAE,CAAC,EAAA,MAAA,EAAA,CAAA,6tDAAA,CAAA,EAAA;;;;;"}
|
package/fesm2022/acorex-components-conversation-open-composer-picker-for-files-Hh5Oyp3p.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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":";;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,CAAC;AACjD,YAAA,YAAY,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