@uzum-tech/ui 2.3.3 → 2.3.4
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/dist/index.js +287 -242
- package/dist/index.mjs +287 -242
- package/dist/index.prod.js +2 -2
- package/dist/index.prod.mjs +2 -2
- package/es/chat/src/Chat.d.ts +363 -3120
- package/es/chat/src/Chat.mjs +13 -240
- package/es/chat/src/ChatListItems.d.ts +4 -4
- package/es/chat/src/ChatMainArea.d.ts +36 -10
- package/es/chat/src/ChatMainArea.mjs +49 -3
- package/es/chat/src/ChatMessages.d.ts +3 -3
- package/es/chat/src/interface.d.ts +2814 -2
- package/es/chat/src/interface.mjs +244 -1
- package/es/components.d.ts +251 -183
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/chat/src/Chat.d.ts +363 -3120
- package/lib/chat/src/Chat.js +15 -180
- package/lib/chat/src/ChatListItems.d.ts +4 -4
- package/lib/chat/src/ChatMainArea.d.ts +36 -10
- package/lib/chat/src/ChatMainArea.js +48 -3
- package/lib/chat/src/ChatMessages.d.ts +3 -3
- package/lib/chat/src/interface.d.ts +2814 -2
- package/lib/chat/src/interface.js +183 -1
- package/lib/components.d.ts +251 -183
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +9 -2
package/dist/index.mjs
CHANGED
|
@@ -55477,6 +55477,249 @@ const markTypeToServiceVariantMap = {
|
|
|
55477
55477
|
["event" /* EVENT */]: MessageBubbleServiceVariant.EVENT,
|
|
55478
55478
|
["divider" /* DIVIDER */]: MessageBubbleServiceVariant.DIVIDER
|
|
55479
55479
|
};
|
|
55480
|
+
const chatProps = {
|
|
55481
|
+
...useTheme.props,
|
|
55482
|
+
chatItems: {
|
|
55483
|
+
type: Array,
|
|
55484
|
+
default: () => []
|
|
55485
|
+
},
|
|
55486
|
+
selectedChatId: {
|
|
55487
|
+
type: [String, Number],
|
|
55488
|
+
default: void 0
|
|
55489
|
+
},
|
|
55490
|
+
inputValue: {
|
|
55491
|
+
type: String,
|
|
55492
|
+
default: void 0
|
|
55493
|
+
},
|
|
55494
|
+
messages: {
|
|
55495
|
+
type: Array,
|
|
55496
|
+
default: () => []
|
|
55497
|
+
},
|
|
55498
|
+
typingChatIds: {
|
|
55499
|
+
type: Array,
|
|
55500
|
+
default: () => []
|
|
55501
|
+
},
|
|
55502
|
+
disabled: {
|
|
55503
|
+
type: Boolean,
|
|
55504
|
+
default: false
|
|
55505
|
+
},
|
|
55506
|
+
listEmptyProps: {
|
|
55507
|
+
type: Object,
|
|
55508
|
+
default: void 0
|
|
55509
|
+
},
|
|
55510
|
+
listHeaderTitle: {
|
|
55511
|
+
type: [String, Function],
|
|
55512
|
+
default: "Chats"
|
|
55513
|
+
},
|
|
55514
|
+
listHeaderActions: {
|
|
55515
|
+
type: Array,
|
|
55516
|
+
default: () => []
|
|
55517
|
+
},
|
|
55518
|
+
listHeaderButtonProps: {
|
|
55519
|
+
type: Object,
|
|
55520
|
+
default: void 0
|
|
55521
|
+
},
|
|
55522
|
+
listHeaderIconProps: {
|
|
55523
|
+
type: Object,
|
|
55524
|
+
default: void 0
|
|
55525
|
+
},
|
|
55526
|
+
listItemAvatarProps: {
|
|
55527
|
+
type: Object,
|
|
55528
|
+
default: void 0
|
|
55529
|
+
},
|
|
55530
|
+
listItemBadgeProps: {
|
|
55531
|
+
type: Object,
|
|
55532
|
+
default: void 0
|
|
55533
|
+
},
|
|
55534
|
+
headerTitle: {
|
|
55535
|
+
type: [String, Function],
|
|
55536
|
+
default: void 0
|
|
55537
|
+
},
|
|
55538
|
+
headerActions: {
|
|
55539
|
+
type: Array,
|
|
55540
|
+
default: () => []
|
|
55541
|
+
},
|
|
55542
|
+
headerButtonProps: {
|
|
55543
|
+
type: Object,
|
|
55544
|
+
default: void 0
|
|
55545
|
+
},
|
|
55546
|
+
headerIconProps: {
|
|
55547
|
+
type: Object,
|
|
55548
|
+
default: void 0
|
|
55549
|
+
},
|
|
55550
|
+
headerShareButtonProps: {
|
|
55551
|
+
type: Object,
|
|
55552
|
+
default: void 0
|
|
55553
|
+
},
|
|
55554
|
+
headerProfileButtonProps: {
|
|
55555
|
+
type: Object,
|
|
55556
|
+
default: void 0
|
|
55557
|
+
},
|
|
55558
|
+
headerCloseButtonProps: {
|
|
55559
|
+
type: Object,
|
|
55560
|
+
default: void 0
|
|
55561
|
+
},
|
|
55562
|
+
headerShareIconProps: {
|
|
55563
|
+
type: Object,
|
|
55564
|
+
default: void 0
|
|
55565
|
+
},
|
|
55566
|
+
headerProfileIconProps: {
|
|
55567
|
+
type: Object,
|
|
55568
|
+
default: void 0
|
|
55569
|
+
},
|
|
55570
|
+
messageSenderAvatarProps: {
|
|
55571
|
+
type: Object,
|
|
55572
|
+
default: void 0
|
|
55573
|
+
},
|
|
55574
|
+
messageUploadProps: {
|
|
55575
|
+
type: Object,
|
|
55576
|
+
default: void 0
|
|
55577
|
+
},
|
|
55578
|
+
messageButtonProps: {
|
|
55579
|
+
type: Object,
|
|
55580
|
+
default: void 0
|
|
55581
|
+
},
|
|
55582
|
+
footerInputProps: {
|
|
55583
|
+
type: Object,
|
|
55584
|
+
default: void 0
|
|
55585
|
+
},
|
|
55586
|
+
footerButtonProps: {
|
|
55587
|
+
type: Object,
|
|
55588
|
+
default: void 0
|
|
55589
|
+
},
|
|
55590
|
+
footerUploadProps: {
|
|
55591
|
+
type: Object,
|
|
55592
|
+
default: void 0
|
|
55593
|
+
},
|
|
55594
|
+
footerUploadTriggerProps: {
|
|
55595
|
+
type: Object,
|
|
55596
|
+
default: void 0
|
|
55597
|
+
},
|
|
55598
|
+
footerIconProps: {
|
|
55599
|
+
type: Object,
|
|
55600
|
+
default: void 0
|
|
55601
|
+
},
|
|
55602
|
+
footerSuffixIconProps: {
|
|
55603
|
+
type: Object,
|
|
55604
|
+
default: void 0
|
|
55605
|
+
},
|
|
55606
|
+
emptyProps: {
|
|
55607
|
+
type: Object,
|
|
55608
|
+
default: void 0
|
|
55609
|
+
},
|
|
55610
|
+
retryText: {
|
|
55611
|
+
type: String,
|
|
55612
|
+
default: void 0
|
|
55613
|
+
},
|
|
55614
|
+
typingText: {
|
|
55615
|
+
type: String,
|
|
55616
|
+
default: void 0
|
|
55617
|
+
},
|
|
55618
|
+
closeButtonText: {
|
|
55619
|
+
type: String,
|
|
55620
|
+
default: void 0
|
|
55621
|
+
},
|
|
55622
|
+
shareButtonTooltip: {
|
|
55623
|
+
type: String,
|
|
55624
|
+
default: void 0
|
|
55625
|
+
},
|
|
55626
|
+
profileButtonTooltip: {
|
|
55627
|
+
type: String,
|
|
55628
|
+
default: void 0
|
|
55629
|
+
},
|
|
55630
|
+
unreadNotificationText: {
|
|
55631
|
+
type: String,
|
|
55632
|
+
default: void 0
|
|
55633
|
+
},
|
|
55634
|
+
chatItemsLoading: {
|
|
55635
|
+
type: Boolean,
|
|
55636
|
+
default: false
|
|
55637
|
+
},
|
|
55638
|
+
chatItemsLoadingCount: {
|
|
55639
|
+
type: Number,
|
|
55640
|
+
default: 10
|
|
55641
|
+
},
|
|
55642
|
+
messagesLoading: {
|
|
55643
|
+
type: Boolean,
|
|
55644
|
+
default: false
|
|
55645
|
+
},
|
|
55646
|
+
messagesLoadingCount: {
|
|
55647
|
+
type: Number,
|
|
55648
|
+
default: 10
|
|
55649
|
+
},
|
|
55650
|
+
height: {
|
|
55651
|
+
type: [String, Number],
|
|
55652
|
+
default: 800
|
|
55653
|
+
},
|
|
55654
|
+
onChatSelect: {
|
|
55655
|
+
type: Function,
|
|
55656
|
+
default: void 0
|
|
55657
|
+
},
|
|
55658
|
+
onMessageRetry: {
|
|
55659
|
+
type: Function,
|
|
55660
|
+
default: void 0
|
|
55661
|
+
},
|
|
55662
|
+
bubbleActions: {
|
|
55663
|
+
type: Array,
|
|
55664
|
+
default: void 0
|
|
55665
|
+
},
|
|
55666
|
+
onChatClose: {
|
|
55667
|
+
type: Function,
|
|
55668
|
+
default: void 0
|
|
55669
|
+
},
|
|
55670
|
+
onChatShare: {
|
|
55671
|
+
type: Function,
|
|
55672
|
+
default: void 0
|
|
55673
|
+
},
|
|
55674
|
+
onUserProfile: {
|
|
55675
|
+
type: Function,
|
|
55676
|
+
default: void 0
|
|
55677
|
+
},
|
|
55678
|
+
onAttachmentUpload: {
|
|
55679
|
+
type: Function,
|
|
55680
|
+
default: void 0
|
|
55681
|
+
},
|
|
55682
|
+
onAttachmentDownload: {
|
|
55683
|
+
type: Function,
|
|
55684
|
+
default: void 0
|
|
55685
|
+
},
|
|
55686
|
+
onFilterChange: {
|
|
55687
|
+
type: Function,
|
|
55688
|
+
default: void 0
|
|
55689
|
+
},
|
|
55690
|
+
onFooterInputChange: {
|
|
55691
|
+
type: Function,
|
|
55692
|
+
default: void 0
|
|
55693
|
+
},
|
|
55694
|
+
onNetworkError: {
|
|
55695
|
+
type: Function,
|
|
55696
|
+
default: void 0
|
|
55697
|
+
},
|
|
55698
|
+
onUploadError: {
|
|
55699
|
+
type: Function,
|
|
55700
|
+
default: void 0
|
|
55701
|
+
},
|
|
55702
|
+
onSendError: {
|
|
55703
|
+
type: Function,
|
|
55704
|
+
default: void 0
|
|
55705
|
+
},
|
|
55706
|
+
onChatItemsScrollToTop: {
|
|
55707
|
+
type: Function,
|
|
55708
|
+
default: void 0
|
|
55709
|
+
},
|
|
55710
|
+
onChatItemsScrollToBottom: {
|
|
55711
|
+
type: Function,
|
|
55712
|
+
default: void 0
|
|
55713
|
+
},
|
|
55714
|
+
onMessagesScrollToTop: {
|
|
55715
|
+
type: Function,
|
|
55716
|
+
default: void 0
|
|
55717
|
+
},
|
|
55718
|
+
onMessagesScrollToBottom: {
|
|
55719
|
+
type: Function,
|
|
55720
|
+
default: void 0
|
|
55721
|
+
}
|
|
55722
|
+
};
|
|
55480
55723
|
|
|
55481
55724
|
var style$15 = cB("chat", `
|
|
55482
55725
|
height: 100%;
|
|
@@ -56306,6 +56549,10 @@ const chatMainAreaProps = {
|
|
|
56306
56549
|
type: Object,
|
|
56307
56550
|
default: void 0
|
|
56308
56551
|
},
|
|
56552
|
+
inputValue: {
|
|
56553
|
+
type: String,
|
|
56554
|
+
default: void 0
|
|
56555
|
+
},
|
|
56309
56556
|
messages: {
|
|
56310
56557
|
type: Array,
|
|
56311
56558
|
default: () => []
|
|
@@ -56422,6 +56669,10 @@ const chatMainAreaProps = {
|
|
|
56422
56669
|
type: Function,
|
|
56423
56670
|
default: void 0
|
|
56424
56671
|
},
|
|
56672
|
+
"onUpdate:inputValue": {
|
|
56673
|
+
type: Function,
|
|
56674
|
+
default: void 0
|
|
56675
|
+
},
|
|
56425
56676
|
onChatClose: {
|
|
56426
56677
|
type: Function,
|
|
56427
56678
|
default: void 0
|
|
@@ -56474,6 +56725,10 @@ var _UChatMainArea = defineComponent({
|
|
|
56474
56725
|
const headerProfileIconPropsRef = UChat?.headerProfileIconPropsRef ?? toRef(props, "headerProfileIconProps");
|
|
56475
56726
|
const messageUploadPropsRef = UChat?.messageUploadPropsRef ?? toRef(props, "messageUploadProps");
|
|
56476
56727
|
const footerInputPropsRef = UChat?.footerInputPropsRef ?? toRef(props, "footerInputProps");
|
|
56728
|
+
const safeFooterInputPropsRef = computed(() => {
|
|
56729
|
+
const { value, ...rest } = footerInputPropsRef.value ?? {};
|
|
56730
|
+
return rest;
|
|
56731
|
+
});
|
|
56477
56732
|
const footerButtonPropsRef = UChat?.footerButtonPropsRef ?? toRef(props, "footerButtonProps");
|
|
56478
56733
|
const footerUploadPropsRef = UChat?.footerUploadPropsRef ?? toRef(props, "footerUploadProps");
|
|
56479
56734
|
const footerIconPropsRef = UChat?.footerIconPropsRef ?? toRef(props, "footerIconProps");
|
|
@@ -56598,7 +56853,22 @@ var _UChatMainArea = defineComponent({
|
|
|
56598
56853
|
);
|
|
56599
56854
|
const messagesBodyRef = ref();
|
|
56600
56855
|
const inputRef = ref();
|
|
56601
|
-
const
|
|
56856
|
+
const uncontrolledInputValueRef = ref(props.inputValue ?? "");
|
|
56857
|
+
const handleInputValueChange = UChat?.handleInputValueChange ?? ((value) => {
|
|
56858
|
+
uncontrolledInputValueRef.value = value;
|
|
56859
|
+
props["onUpdate:inputValue"]?.(value);
|
|
56860
|
+
});
|
|
56861
|
+
const inputValue = computed({
|
|
56862
|
+
get: () => {
|
|
56863
|
+
if (UChat) {
|
|
56864
|
+
return UChat.inputValueRef.value ?? "";
|
|
56865
|
+
}
|
|
56866
|
+
return props.inputValue !== void 0 ? props.inputValue : uncontrolledInputValueRef.value;
|
|
56867
|
+
},
|
|
56868
|
+
set: (value) => {
|
|
56869
|
+
handleInputValueChange(value);
|
|
56870
|
+
}
|
|
56871
|
+
});
|
|
56602
56872
|
const attachmentFileList = ref([]);
|
|
56603
56873
|
const uploadedAttachmentsMap = ref(/* @__PURE__ */ new Map());
|
|
56604
56874
|
const lastScrollTop = ref(0);
|
|
@@ -57173,13 +57443,14 @@ var _UChatMainArea = defineComponent({
|
|
|
57173
57443
|
}
|
|
57174
57444
|
},
|
|
57175
57445
|
onKeydown: (e) => {
|
|
57446
|
+
footerInputPropsRef.value?.onKeydown?.(e);
|
|
57176
57447
|
if (e.key === "Enter" && !e.shiftKey) {
|
|
57177
57448
|
e.preventDefault();
|
|
57178
57449
|
e.stopPropagation();
|
|
57179
57450
|
void handleSendMessage();
|
|
57180
57451
|
}
|
|
57181
57452
|
},
|
|
57182
|
-
...
|
|
57453
|
+
...safeFooterInputPropsRef.value
|
|
57183
57454
|
},
|
|
57184
57455
|
{
|
|
57185
57456
|
prefix: () => renderEditingBlock(),
|
|
@@ -57213,6 +57484,8 @@ var _UChatMainArea = defineComponent({
|
|
|
57213
57484
|
mergedClsPrefixRef,
|
|
57214
57485
|
mergedThemeRef,
|
|
57215
57486
|
selectedChatRef,
|
|
57487
|
+
inputValueRef: inputValue,
|
|
57488
|
+
handleInputValueChange,
|
|
57216
57489
|
messagesRef,
|
|
57217
57490
|
typingChatIdsRef,
|
|
57218
57491
|
messagesLoadingRef,
|
|
@@ -58982,250 +59255,12 @@ var ChatSidebar = defineComponent({
|
|
|
58982
59255
|
}
|
|
58983
59256
|
});
|
|
58984
59257
|
|
|
58985
|
-
const chatProps = {
|
|
58986
|
-
...useTheme.props,
|
|
58987
|
-
chatItems: {
|
|
58988
|
-
type: Array,
|
|
58989
|
-
default: () => []
|
|
58990
|
-
},
|
|
58991
|
-
selectedChatId: {
|
|
58992
|
-
type: [String, Number],
|
|
58993
|
-
default: void 0
|
|
58994
|
-
},
|
|
58995
|
-
messages: {
|
|
58996
|
-
type: Array,
|
|
58997
|
-
default: () => []
|
|
58998
|
-
},
|
|
58999
|
-
typingChatIds: {
|
|
59000
|
-
type: Array,
|
|
59001
|
-
default: () => []
|
|
59002
|
-
},
|
|
59003
|
-
disabled: {
|
|
59004
|
-
type: Boolean,
|
|
59005
|
-
default: false
|
|
59006
|
-
},
|
|
59007
|
-
listEmptyProps: {
|
|
59008
|
-
type: Object,
|
|
59009
|
-
default: void 0
|
|
59010
|
-
},
|
|
59011
|
-
listHeaderTitle: {
|
|
59012
|
-
type: [String, Function],
|
|
59013
|
-
default: "Chats"
|
|
59014
|
-
},
|
|
59015
|
-
listHeaderActions: {
|
|
59016
|
-
type: Array,
|
|
59017
|
-
default: () => []
|
|
59018
|
-
},
|
|
59019
|
-
listHeaderButtonProps: {
|
|
59020
|
-
type: Object,
|
|
59021
|
-
default: void 0
|
|
59022
|
-
},
|
|
59023
|
-
listHeaderIconProps: {
|
|
59024
|
-
type: Object,
|
|
59025
|
-
default: void 0
|
|
59026
|
-
},
|
|
59027
|
-
listItemAvatarProps: {
|
|
59028
|
-
type: Object,
|
|
59029
|
-
default: void 0
|
|
59030
|
-
},
|
|
59031
|
-
listItemBadgeProps: {
|
|
59032
|
-
type: Object,
|
|
59033
|
-
default: void 0
|
|
59034
|
-
},
|
|
59035
|
-
headerTitle: {
|
|
59036
|
-
type: [String, Function],
|
|
59037
|
-
default: void 0
|
|
59038
|
-
},
|
|
59039
|
-
headerActions: {
|
|
59040
|
-
type: Array,
|
|
59041
|
-
default: () => []
|
|
59042
|
-
},
|
|
59043
|
-
headerButtonProps: {
|
|
59044
|
-
type: Object,
|
|
59045
|
-
default: void 0
|
|
59046
|
-
},
|
|
59047
|
-
headerIconProps: {
|
|
59048
|
-
type: Object,
|
|
59049
|
-
default: void 0
|
|
59050
|
-
},
|
|
59051
|
-
headerShareButtonProps: {
|
|
59052
|
-
type: Object,
|
|
59053
|
-
default: void 0
|
|
59054
|
-
},
|
|
59055
|
-
headerProfileButtonProps: {
|
|
59056
|
-
type: Object,
|
|
59057
|
-
default: void 0
|
|
59058
|
-
},
|
|
59059
|
-
headerCloseButtonProps: {
|
|
59060
|
-
type: Object,
|
|
59061
|
-
default: void 0
|
|
59062
|
-
},
|
|
59063
|
-
headerShareIconProps: {
|
|
59064
|
-
type: Object,
|
|
59065
|
-
default: void 0
|
|
59066
|
-
},
|
|
59067
|
-
headerProfileIconProps: {
|
|
59068
|
-
type: Object,
|
|
59069
|
-
default: void 0
|
|
59070
|
-
},
|
|
59071
|
-
messageSenderAvatarProps: {
|
|
59072
|
-
type: Object,
|
|
59073
|
-
default: void 0
|
|
59074
|
-
},
|
|
59075
|
-
messageUploadProps: {
|
|
59076
|
-
type: Object,
|
|
59077
|
-
default: void 0
|
|
59078
|
-
},
|
|
59079
|
-
messageButtonProps: {
|
|
59080
|
-
type: Object,
|
|
59081
|
-
default: void 0
|
|
59082
|
-
},
|
|
59083
|
-
footerInputProps: {
|
|
59084
|
-
type: Object,
|
|
59085
|
-
default: void 0
|
|
59086
|
-
},
|
|
59087
|
-
footerButtonProps: {
|
|
59088
|
-
type: Object,
|
|
59089
|
-
default: void 0
|
|
59090
|
-
},
|
|
59091
|
-
footerUploadProps: {
|
|
59092
|
-
type: Object,
|
|
59093
|
-
default: void 0
|
|
59094
|
-
},
|
|
59095
|
-
footerUploadTriggerProps: {
|
|
59096
|
-
type: Object,
|
|
59097
|
-
default: void 0
|
|
59098
|
-
},
|
|
59099
|
-
footerIconProps: {
|
|
59100
|
-
type: Object,
|
|
59101
|
-
default: void 0
|
|
59102
|
-
},
|
|
59103
|
-
footerSuffixIconProps: {
|
|
59104
|
-
type: Object,
|
|
59105
|
-
default: void 0
|
|
59106
|
-
},
|
|
59107
|
-
emptyProps: {
|
|
59108
|
-
type: Object,
|
|
59109
|
-
default: void 0
|
|
59110
|
-
},
|
|
59111
|
-
retryText: {
|
|
59112
|
-
type: String,
|
|
59113
|
-
default: void 0
|
|
59114
|
-
},
|
|
59115
|
-
typingText: {
|
|
59116
|
-
type: String,
|
|
59117
|
-
default: void 0
|
|
59118
|
-
},
|
|
59119
|
-
closeButtonText: {
|
|
59120
|
-
type: String,
|
|
59121
|
-
default: void 0
|
|
59122
|
-
},
|
|
59123
|
-
shareButtonTooltip: {
|
|
59124
|
-
type: String,
|
|
59125
|
-
default: void 0
|
|
59126
|
-
},
|
|
59127
|
-
profileButtonTooltip: {
|
|
59128
|
-
type: String,
|
|
59129
|
-
default: void 0
|
|
59130
|
-
},
|
|
59131
|
-
unreadNotificationText: {
|
|
59132
|
-
type: String,
|
|
59133
|
-
default: void 0
|
|
59134
|
-
},
|
|
59135
|
-
chatItemsLoading: {
|
|
59136
|
-
type: Boolean,
|
|
59137
|
-
default: false
|
|
59138
|
-
},
|
|
59139
|
-
chatItemsLoadingCount: {
|
|
59140
|
-
type: Number,
|
|
59141
|
-
default: 10
|
|
59142
|
-
},
|
|
59143
|
-
messagesLoading: {
|
|
59144
|
-
type: Boolean,
|
|
59145
|
-
default: false
|
|
59146
|
-
},
|
|
59147
|
-
messagesLoadingCount: {
|
|
59148
|
-
type: Number,
|
|
59149
|
-
default: 10
|
|
59150
|
-
},
|
|
59151
|
-
height: {
|
|
59152
|
-
type: [String, Number],
|
|
59153
|
-
default: 800
|
|
59154
|
-
},
|
|
59155
|
-
onChatSelect: {
|
|
59156
|
-
type: Function,
|
|
59157
|
-
default: void 0
|
|
59158
|
-
},
|
|
59159
|
-
onMessageRetry: {
|
|
59160
|
-
type: Function,
|
|
59161
|
-
default: void 0
|
|
59162
|
-
},
|
|
59163
|
-
bubbleActions: {
|
|
59164
|
-
type: Array,
|
|
59165
|
-
default: void 0
|
|
59166
|
-
},
|
|
59167
|
-
onChatClose: {
|
|
59168
|
-
type: Function,
|
|
59169
|
-
default: void 0
|
|
59170
|
-
},
|
|
59171
|
-
onChatShare: {
|
|
59172
|
-
type: Function,
|
|
59173
|
-
default: void 0
|
|
59174
|
-
},
|
|
59175
|
-
onUserProfile: {
|
|
59176
|
-
type: Function,
|
|
59177
|
-
default: void 0
|
|
59178
|
-
},
|
|
59179
|
-
onAttachmentUpload: {
|
|
59180
|
-
type: Function,
|
|
59181
|
-
default: void 0
|
|
59182
|
-
},
|
|
59183
|
-
onAttachmentDownload: {
|
|
59184
|
-
type: Function,
|
|
59185
|
-
default: void 0
|
|
59186
|
-
},
|
|
59187
|
-
onFilterChange: {
|
|
59188
|
-
type: Function,
|
|
59189
|
-
default: void 0
|
|
59190
|
-
},
|
|
59191
|
-
onFooterInputChange: {
|
|
59192
|
-
type: Function,
|
|
59193
|
-
default: void 0
|
|
59194
|
-
},
|
|
59195
|
-
onNetworkError: {
|
|
59196
|
-
type: Function,
|
|
59197
|
-
default: void 0
|
|
59198
|
-
},
|
|
59199
|
-
onUploadError: {
|
|
59200
|
-
type: Function,
|
|
59201
|
-
default: void 0
|
|
59202
|
-
},
|
|
59203
|
-
onSendError: {
|
|
59204
|
-
type: Function,
|
|
59205
|
-
default: void 0
|
|
59206
|
-
},
|
|
59207
|
-
onChatItemsScrollToTop: {
|
|
59208
|
-
type: Function,
|
|
59209
|
-
default: void 0
|
|
59210
|
-
},
|
|
59211
|
-
onChatItemsScrollToBottom: {
|
|
59212
|
-
type: Function,
|
|
59213
|
-
default: void 0
|
|
59214
|
-
},
|
|
59215
|
-
onMessagesScrollToTop: {
|
|
59216
|
-
type: Function,
|
|
59217
|
-
default: void 0
|
|
59218
|
-
},
|
|
59219
|
-
onMessagesScrollToBottom: {
|
|
59220
|
-
type: Function,
|
|
59221
|
-
default: void 0
|
|
59222
|
-
}
|
|
59223
|
-
};
|
|
59224
59258
|
var _UChat = defineComponent({
|
|
59225
59259
|
name: "Chat",
|
|
59226
59260
|
props: chatProps,
|
|
59227
59261
|
emits: [
|
|
59228
59262
|
"update:selectedChatId",
|
|
59263
|
+
"update:inputValue",
|
|
59229
59264
|
"message-send",
|
|
59230
59265
|
"message-retry",
|
|
59231
59266
|
"attachment-upload",
|
|
@@ -59346,6 +59381,14 @@ var _UChat = defineComponent({
|
|
|
59346
59381
|
const mergedSelectedChatIdRef = computed(() => {
|
|
59347
59382
|
return props.selectedChatId !== void 0 ? props.selectedChatId : uncontrolledSelectedChatIdRef.value;
|
|
59348
59383
|
});
|
|
59384
|
+
const uncontrolledInputValueRef = ref(props.inputValue ?? "");
|
|
59385
|
+
const mergedInputValueRef = computed(() => {
|
|
59386
|
+
return props.inputValue !== void 0 ? props.inputValue : uncontrolledInputValueRef.value;
|
|
59387
|
+
});
|
|
59388
|
+
const handleInputValueChange = (value) => {
|
|
59389
|
+
uncontrolledInputValueRef.value = value;
|
|
59390
|
+
emit("update:inputValue", value);
|
|
59391
|
+
};
|
|
59349
59392
|
const selectedChatRef = computed(() => {
|
|
59350
59393
|
return props.chatItems?.find(
|
|
59351
59394
|
(item) => item.id === mergedSelectedChatIdRef.value
|
|
@@ -59459,6 +59502,8 @@ var _UChat = defineComponent({
|
|
|
59459
59502
|
chatItemsRef: toRef(props, "chatItems"),
|
|
59460
59503
|
selectedChatIdRef: mergedSelectedChatIdRef,
|
|
59461
59504
|
selectedChatRef,
|
|
59505
|
+
inputValueRef: mergedInputValueRef,
|
|
59506
|
+
handleInputValueChange,
|
|
59462
59507
|
messagesRef: filteredMessagesRef,
|
|
59463
59508
|
typingChatIdsRef: toRef(props, "typingChatIds"),
|
|
59464
59509
|
chatItemsLoadingRef: toRef(props, "chatItemsLoading"),
|
|
@@ -117631,7 +117676,7 @@ function useThemeVars() {
|
|
|
117631
117676
|
});
|
|
117632
117677
|
}
|
|
117633
117678
|
|
|
117634
|
-
var version = "2.3.
|
|
117679
|
+
var version = "2.3.4";
|
|
117635
117680
|
|
|
117636
117681
|
function create({
|
|
117637
117682
|
componentPrefix = "U",
|