@acorex/components 22.1.0-next.7 → 22.1.0-next.8
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/fesm2022/acorex-components-conversation.mjs +166 -91
- package/fesm2022/acorex-components-conversation.mjs.map +1 -1
- package/fesm2022/acorex-components-lookup.mjs +8 -15
- package/fesm2022/acorex-components-lookup.mjs.map +1 -1
- package/package.json +3 -3
- package/types/acorex-components-conversation.d.ts +74 -48
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acorex/components",
|
|
3
|
-
"version": "22.1.0-next.
|
|
3
|
+
"version": "22.1.0-next.8",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@acorex/core": "22.1.0-next.
|
|
6
|
-
"@acorex/cdk": "22.1.0-next.
|
|
5
|
+
"@acorex/core": "22.1.0-next.8",
|
|
6
|
+
"@acorex/cdk": "22.1.0-next.8",
|
|
7
7
|
"polytype": ">=0.17.0",
|
|
8
8
|
"angular-imask": ">=7.6.1",
|
|
9
9
|
"imask": ">=7.6.1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _acorex_components_conversation from '@acorex/components/conversation';
|
|
2
2
|
import * as _angular_core from '@angular/core';
|
|
3
3
|
import { OnDestroy, ViewContainerRef, Type, InputSignal, WritableSignal, Signal, Provider, OnInit, EventEmitter, TemplateRef, InjectionToken, ModuleWithProviders } from '@angular/core';
|
|
4
|
-
import { AXComponentCloseEvent, AXHtmlEvent, AXDataSource, AXPlacement, AXClosableComponent } from '@acorex/cdk/common';
|
|
4
|
+
import { AXComponentCloseEvent, AXHtmlEvent, AXClickEvent, AXDataSource, AXPlacement, AXClosableComponent } from '@acorex/cdk/common';
|
|
5
5
|
import * as _acorex_components_popup from '@acorex/components/popup';
|
|
6
6
|
import { AXPopupService, AXPopupRef } from '@acorex/components/popup';
|
|
7
7
|
import { AXFileUploadOptions, AXUploadResult, AXUploadReference, AXUploaderService, AXUploaderFileChangeEvent } from '@acorex/cdk/uploader';
|
|
@@ -716,18 +716,20 @@ declare class AXConversationComposerService {
|
|
|
716
716
|
readonly canSend: _angular_core.Signal<boolean>;
|
|
717
717
|
/** Composer action context */
|
|
718
718
|
readonly actionContext: _angular_core.Signal<AXConversationComposerActionContext>;
|
|
719
|
-
/**
|
|
720
|
-
readonly
|
|
721
|
-
/**
|
|
722
|
-
readonly
|
|
723
|
-
/**
|
|
724
|
-
readonly
|
|
725
|
-
/**
|
|
726
|
-
readonly
|
|
727
|
-
/**
|
|
728
|
-
readonly
|
|
729
|
-
/**
|
|
730
|
-
readonly
|
|
719
|
+
/** Start actions from registry */
|
|
720
|
+
readonly startActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
721
|
+
/** End actions from registry */
|
|
722
|
+
readonly endActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
723
|
+
/** Start inline actions (location = 'inline' or undefined) */
|
|
724
|
+
readonly startInlineActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
725
|
+
/** Start menu actions — shown in the attachment popup */
|
|
726
|
+
readonly startMenuActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
727
|
+
/** End inline actions inside the input pill (excludes default action) */
|
|
728
|
+
readonly endInlineActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
729
|
+
/** End menu actions (location = 'menu') */
|
|
730
|
+
readonly endMenuActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
731
|
+
/** Default end action (voice/send morph button) */
|
|
732
|
+
readonly defaultAction: _angular_core.Signal<AXConversationComposerAction>;
|
|
731
733
|
startReply(message: AXConversationMessage): void;
|
|
732
734
|
startEdit(message: AXConversationMessage): void;
|
|
733
735
|
/** Focus the composer text area when the composer component is mounted. */
|
|
@@ -758,7 +760,7 @@ declare class AXConversationComposerService {
|
|
|
758
760
|
/**
|
|
759
761
|
* Get actions for the active conversation
|
|
760
762
|
*/
|
|
761
|
-
getActionsForPosition(position: '
|
|
763
|
+
getActionsForPosition(position: 'start' | 'end', context: AXConversationComposerActionContext): AXConversationComposerAction[];
|
|
762
764
|
/**
|
|
763
765
|
* Execute an action
|
|
764
766
|
*/
|
|
@@ -822,10 +824,15 @@ interface AXConversationComposerAction extends Omit<AXConversationRegistryItem,
|
|
|
822
824
|
label: string;
|
|
823
825
|
/** Icon name/class */
|
|
824
826
|
icon: string;
|
|
825
|
-
/** Position:
|
|
826
|
-
position: '
|
|
827
|
-
/** Location: inline (show as button) or menu (show in
|
|
827
|
+
/** Position: start or end of the composer */
|
|
828
|
+
position: 'start' | 'end';
|
|
829
|
+
/** Location: inline (show as button) or menu (show in attachment popup menu) */
|
|
828
830
|
location?: 'inline' | 'menu';
|
|
831
|
+
/**
|
|
832
|
+
* Primary end action (e.g. voice record). Only one action may be default.
|
|
833
|
+
* Renders as the circular send-style button and morphs into send when the draft has content.
|
|
834
|
+
*/
|
|
835
|
+
default?: boolean;
|
|
829
836
|
/** Visibility condition */
|
|
830
837
|
visible: (context: AXConversationComposerActionContext) => boolean;
|
|
831
838
|
/** Enabled condition */
|
|
@@ -869,18 +876,20 @@ declare class AXConversationComposerActionRegistry {
|
|
|
869
876
|
constructor();
|
|
870
877
|
/** All registered actions */
|
|
871
878
|
readonly actions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
872
|
-
/**
|
|
873
|
-
readonly
|
|
874
|
-
/**
|
|
875
|
-
readonly
|
|
876
|
-
/**
|
|
877
|
-
readonly
|
|
878
|
-
/**
|
|
879
|
-
readonly
|
|
880
|
-
/**
|
|
881
|
-
readonly
|
|
882
|
-
/**
|
|
883
|
-
readonly
|
|
879
|
+
/** Start-side actions sorted by priority */
|
|
880
|
+
readonly startActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
881
|
+
/** End-side actions sorted by priority */
|
|
882
|
+
readonly endActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
883
|
+
/** Start-side inline actions (location = 'inline' or undefined) */
|
|
884
|
+
readonly startInlineActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
885
|
+
/** Start-side menu actions (location = 'menu') — shown in the attachment popup */
|
|
886
|
+
readonly startMenuActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
887
|
+
/** End-side inline actions inside the input pill (excludes default action) */
|
|
888
|
+
readonly endInlineActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
889
|
+
/** End-side menu actions (location = 'menu') */
|
|
890
|
+
readonly endMenuActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
891
|
+
/** The single default end action (voice/send morph button) */
|
|
892
|
+
readonly defaultAction: _angular_core.Signal<AXConversationComposerAction>;
|
|
884
893
|
/**
|
|
885
894
|
* Register a composer action
|
|
886
895
|
*/
|
|
@@ -895,11 +904,11 @@ declare class AXConversationComposerActionRegistry {
|
|
|
895
904
|
/**
|
|
896
905
|
* Get visible actions for a position
|
|
897
906
|
*/
|
|
898
|
-
getVisibleActions(position: '
|
|
907
|
+
getVisibleActions(position: 'start' | 'end', context: AXConversationComposerActionContext): AXConversationComposerAction[];
|
|
899
908
|
/**
|
|
900
909
|
* Get enabled actions for a position
|
|
901
910
|
*/
|
|
902
|
-
getEnabledActions(position: '
|
|
911
|
+
getEnabledActions(position: 'start' | 'end', context: AXConversationComposerActionContext): AXConversationComposerAction[];
|
|
903
912
|
isActionEnabled(action: AXConversationComposerAction, context: AXConversationComposerActionContext): boolean;
|
|
904
913
|
/**
|
|
905
914
|
* Picker actions for a file catalog (by priority), when visible and enabled.
|
|
@@ -1598,7 +1607,7 @@ declare class AXConversationComposerComponent implements OnDestroy {
|
|
|
1598
1607
|
private readonly config;
|
|
1599
1608
|
private readonly translation;
|
|
1600
1609
|
/** Access registry through conversation service */
|
|
1601
|
-
|
|
1610
|
+
protected get composerActionRegistry(): _acorex_components_conversation.AXConversationComposerActionRegistry;
|
|
1602
1611
|
/** Composer text area reference */
|
|
1603
1612
|
private readonly textAreaRef;
|
|
1604
1613
|
/** Draft text - use service */
|
|
@@ -1627,6 +1636,9 @@ declare class AXConversationComposerComponent implements OnDestroy {
|
|
|
1627
1636
|
/** Emoji popover state */
|
|
1628
1637
|
private readonly emojiPopoverRef;
|
|
1629
1638
|
readonly emojiPopoverTarget: _angular_core.WritableSignal<HTMLElement>;
|
|
1639
|
+
/** Attachment menu popover state */
|
|
1640
|
+
private readonly attachPopoverRef;
|
|
1641
|
+
readonly attachPopoverTarget: _angular_core.WritableSignal<HTMLElement>;
|
|
1630
1642
|
readonly composerPopupLoader: () => Promise<typeof _acorex_components_conversation.AXConversationComposerPopupComponent>;
|
|
1631
1643
|
/** Input placeholder - use service */
|
|
1632
1644
|
readonly placeholder: _angular_core.Signal<string>;
|
|
@@ -1638,18 +1650,20 @@ declare class AXConversationComposerComponent implements OnDestroy {
|
|
|
1638
1650
|
readonly inputRows: _angular_core.Signal<number>;
|
|
1639
1651
|
/** Can send message - use service */
|
|
1640
1652
|
readonly canSend: _angular_core.Signal<boolean>;
|
|
1641
|
-
/**
|
|
1642
|
-
readonly
|
|
1643
|
-
/**
|
|
1644
|
-
readonly
|
|
1645
|
-
/**
|
|
1646
|
-
readonly
|
|
1647
|
-
/**
|
|
1648
|
-
readonly
|
|
1649
|
-
/**
|
|
1650
|
-
readonly
|
|
1651
|
-
/**
|
|
1652
|
-
readonly
|
|
1653
|
+
/** Start actions from registry - use service */
|
|
1654
|
+
readonly startActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
1655
|
+
/** End actions from registry - use service */
|
|
1656
|
+
readonly endActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
1657
|
+
/** Start inline actions */
|
|
1658
|
+
readonly startInlineActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
1659
|
+
/** Start menu actions (attachment popup) */
|
|
1660
|
+
readonly startMenuActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
1661
|
+
/** End inline actions inside input pill */
|
|
1662
|
+
readonly endInlineActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
1663
|
+
/** End menu actions */
|
|
1664
|
+
readonly endMenuActions: _angular_core.Signal<AXConversationComposerAction[]>;
|
|
1665
|
+
/** Default end action (voice/send morph) */
|
|
1666
|
+
readonly defaultAction: _angular_core.Signal<AXConversationComposerAction>;
|
|
1653
1667
|
/** Handle key down */
|
|
1654
1668
|
onKeyDown(event: AXHtmlEvent<KeyboardEvent>): void;
|
|
1655
1669
|
/** Handle input */
|
|
@@ -1661,7 +1675,7 @@ declare class AXConversationComposerComponent implements OnDestroy {
|
|
|
1661
1675
|
/** Handle send click */
|
|
1662
1676
|
onSendClick(): Promise<void>;
|
|
1663
1677
|
/** Handle emoji click */
|
|
1664
|
-
onEmojiClick(event?: MouseEvent): Promise<void>;
|
|
1678
|
+
onEmojiClick(event?: AXClickEvent | MouseEvent): Promise<void>;
|
|
1665
1679
|
/** Handle emoji popover closed */
|
|
1666
1680
|
onEmojiPopoverClosed(): void;
|
|
1667
1681
|
/** Handle emoji/sticker selection from popup */
|
|
@@ -1670,8 +1684,16 @@ declare class AXConversationComposerComponent implements OnDestroy {
|
|
|
1670
1684
|
private sendSticker;
|
|
1671
1685
|
/** Get inputs for emoji popup component */
|
|
1672
1686
|
getEmojiPopupInputs(): Record<string, unknown>;
|
|
1673
|
-
/** Handle attach click */
|
|
1674
|
-
|
|
1687
|
+
/** Handle attach menu click */
|
|
1688
|
+
onAttachMenuClick(event: AXClickEvent): void;
|
|
1689
|
+
/** Handle attachment popover closed */
|
|
1690
|
+
onAttachPopoverClosed(): void;
|
|
1691
|
+
/** Handle attachment menu action selection */
|
|
1692
|
+
onAttachMenuAction(actionId: string): Promise<void>;
|
|
1693
|
+
/** Handle default action click (voice when empty, send when has content) */
|
|
1694
|
+
onDefaultActionClick(): Promise<void>;
|
|
1695
|
+
/** Icon for the default morph button */
|
|
1696
|
+
getDefaultActionIcon(): string;
|
|
1675
1697
|
/** Handle voice click */
|
|
1676
1698
|
onVoiceClick(): void;
|
|
1677
1699
|
/** Remove attachment */
|
|
@@ -1684,8 +1706,9 @@ declare class AXConversationComposerComponent implements OnDestroy {
|
|
|
1684
1706
|
startReply(message: AXConversationMessage): void;
|
|
1685
1707
|
/** Focus the native textarea inside ax-text-area */
|
|
1686
1708
|
private focusTextArea;
|
|
1709
|
+
private getClickTarget;
|
|
1687
1710
|
/** Handle action click */
|
|
1688
|
-
onActionClick(actionId: string, event?: MouseEvent): Promise<void>;
|
|
1711
|
+
onActionClick(actionId: string, event?: AXClickEvent | MouseEvent): Promise<void>;
|
|
1689
1712
|
/** Check if action is enabled */
|
|
1690
1713
|
isActionEnabled(action: any): boolean;
|
|
1691
1714
|
/** Get replying sender name */
|
|
@@ -1693,6 +1716,9 @@ declare class AXConversationComposerComponent implements OnDestroy {
|
|
|
1693
1716
|
getActionLabel(action: {
|
|
1694
1717
|
label: string;
|
|
1695
1718
|
}): string;
|
|
1719
|
+
getActionButtonClass(action: {
|
|
1720
|
+
className?: string;
|
|
1721
|
+
}): string;
|
|
1696
1722
|
/** Get replying message text */
|
|
1697
1723
|
getReplyingMessageText(): string;
|
|
1698
1724
|
/** Preview object for replying banner (type, icon, value) */
|