@uzum-tech/ui 1.8.0 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +198 -71
- package/dist/index.prod.js +2 -2
- package/es/chat/index.d.ts +2 -1
- package/es/chat/index.js +1 -0
- package/es/chat/src/Chat.js +1 -0
- package/es/chat/src/ChatListItems.d.ts +1759 -4
- package/es/chat/src/ChatListItems.js +13 -12
- package/es/chat/src/ChatMessages.d.ts +1760 -4
- package/es/chat/src/ChatMessages.js +27 -10
- package/es/chat/src/ChatParts/MainArea.js +10 -10
- package/es/chat/src/ChatParts/Sidebar.js +2 -2
- package/es/chat/src/interface.d.ts +4 -0
- package/es/chat/src/styles/index.cssr.js +13 -14
- package/es/chat/styles/light.d.ts +1 -1
- package/es/chat/styles/light.js +15 -3
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/chat/index.d.ts +2 -1
- package/lib/chat/index.js +5 -1
- package/lib/chat/src/Chat.js +1 -0
- package/lib/chat/src/ChatListItems.d.ts +1759 -4
- package/lib/chat/src/ChatListItems.js +11 -10
- package/lib/chat/src/ChatMessages.d.ts +1760 -4
- package/lib/chat/src/ChatMessages.js +25 -8
- package/lib/chat/src/ChatParts/MainArea.js +10 -10
- package/lib/chat/src/ChatParts/Sidebar.js +2 -2
- package/lib/chat/src/interface.d.ts +4 -0
- package/lib/chat/src/styles/index.cssr.js +13 -14
- package/lib/chat/styles/light.d.ts +1 -1
- package/lib/chat/styles/light.js +15 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +1 -1
package/dist/index.js
CHANGED
|
@@ -58045,6 +58045,12 @@
|
|
|
58045
58045
|
ChatMessageType2["MARK"] = "mark";
|
|
58046
58046
|
return ChatMessageType2;
|
|
58047
58047
|
})(ChatMessageType || {});
|
|
58048
|
+
var ChatMarkType = /* @__PURE__ */(ChatMarkType2 => {
|
|
58049
|
+
ChatMarkType2["SYSTEM"] = "system";
|
|
58050
|
+
ChatMarkType2["EVENT"] = "event";
|
|
58051
|
+
ChatMarkType2["DIVIDER"] = "divider";
|
|
58052
|
+
return ChatMarkType2;
|
|
58053
|
+
})(ChatMarkType || {});
|
|
58048
58054
|
const chatInjectionKey = createInjectionKey("chat");
|
|
58049
58055
|
|
|
58050
58056
|
var commonVars = {
|
|
@@ -59740,7 +59746,6 @@
|
|
|
59740
59746
|
max-height: 100%;
|
|
59741
59747
|
min-height: 0;
|
|
59742
59748
|
display: flex;
|
|
59743
|
-
overflow: hidden;
|
|
59744
59749
|
box-sizing: border-box;
|
|
59745
59750
|
.u-list-item__text {
|
|
59746
59751
|
grid-template-columns: 1fr !important;
|
|
@@ -59749,7 +59754,6 @@
|
|
|
59749
59754
|
height: 100%;
|
|
59750
59755
|
max-height: 100%;
|
|
59751
59756
|
min-height: 0;
|
|
59752
|
-
overflow: hidden;
|
|
59753
59757
|
}
|
|
59754
59758
|
`, [cB("chat-sidebar", `
|
|
59755
59759
|
max-width: 388px;
|
|
@@ -59760,7 +59764,6 @@
|
|
|
59760
59764
|
background-color: var(--u-sidebar-background-color);
|
|
59761
59765
|
border: 1px solid var(--u-sidebar-border-color);
|
|
59762
59766
|
border-radius: 20px;
|
|
59763
|
-
overflow: hidden;
|
|
59764
59767
|
`, [cE("header", `
|
|
59765
59768
|
flex-shrink: 0;
|
|
59766
59769
|
`), cE("header-container", `
|
|
@@ -59874,7 +59877,6 @@
|
|
|
59874
59877
|
`), cE("item-status sup", `
|
|
59875
59878
|
padding: 2px 6px 2px 5px;
|
|
59876
59879
|
height: 22px;
|
|
59877
|
-
--u-color: var(--u-unread-notification-background-color);
|
|
59878
59880
|
`), cE("item-status-icon", `
|
|
59879
59881
|
color: var(--u-sidebar-item-time-color);
|
|
59880
59882
|
`, [cM("read", `
|
|
@@ -59896,7 +59898,6 @@
|
|
|
59896
59898
|
height: 100%;
|
|
59897
59899
|
max-height: 100%;
|
|
59898
59900
|
min-height: 0;
|
|
59899
|
-
overflow: hidden;
|
|
59900
59901
|
`, [cE("header", `
|
|
59901
59902
|
border-bottom: 1px solid var(--u-border-color);
|
|
59902
59903
|
width: 100%;
|
|
@@ -59912,7 +59913,7 @@
|
|
|
59912
59913
|
color: var(--u-unread-notification-text-color);
|
|
59913
59914
|
padding: 6px 12px;
|
|
59914
59915
|
text-align: center;
|
|
59915
|
-
font-size:
|
|
59916
|
+
font-size: 14px;
|
|
59916
59917
|
font-weight: 500;
|
|
59917
59918
|
margin: 8px 0;
|
|
59918
59919
|
display: flex;
|
|
@@ -59946,8 +59947,19 @@
|
|
|
59946
59947
|
color: var(--u-date-separator-color);
|
|
59947
59948
|
padding: 4px 12px;
|
|
59948
59949
|
border-radius: 12px;
|
|
59949
|
-
font-size:
|
|
59950
|
+
font-size: 14px;
|
|
59950
59951
|
font-weight: 500;
|
|
59952
|
+
`)]), cE("mark", `
|
|
59953
|
+
display: flex;
|
|
59954
|
+
justify-content: center;
|
|
59955
|
+
margin: 12px 0;
|
|
59956
|
+
width: 100%;
|
|
59957
|
+
`, [c$1("span", `
|
|
59958
|
+
padding: 6px 12px;
|
|
59959
|
+
border-radius: 8px;
|
|
59960
|
+
color: var(--u-text-color-secondary);
|
|
59961
|
+
background-color: var(--u-date-separator-background-color);
|
|
59962
|
+
text-align: center;
|
|
59951
59963
|
`)]), cE("message", `
|
|
59952
59964
|
display: flex;
|
|
59953
59965
|
margin-bottom: 8px;
|
|
@@ -60063,13 +60075,6 @@
|
|
|
60063
60075
|
`), cE("input", `
|
|
60064
60076
|
flex: 1;
|
|
60065
60077
|
margin-right: 4px;
|
|
60066
|
-
--u-color: #F3F4F6 !important;
|
|
60067
|
-
--u-color-focus: #F3F4F6 !important;
|
|
60068
|
-
--u-border: none !important;
|
|
60069
|
-
--u-border-focus: none !important;
|
|
60070
|
-
--u-border-hover: none !important;
|
|
60071
|
-
--u-box-shadow: none !important;
|
|
60072
|
-
--u-box-shadow-focus: none !important;
|
|
60073
60078
|
`), cE("attach-btn", `
|
|
60074
60079
|
margin-left: 4px;
|
|
60075
60080
|
flex-shrink: 0;
|
|
@@ -60086,6 +60091,40 @@
|
|
|
60086
60091
|
background-color: var(--u-attachment-background-color-other);
|
|
60087
60092
|
`)]);
|
|
60088
60093
|
|
|
60094
|
+
const chatInputLight = {
|
|
60095
|
+
...inputLight,
|
|
60096
|
+
self(vars) {
|
|
60097
|
+
const originalInputSelf = self$1e(vars);
|
|
60098
|
+
const {
|
|
60099
|
+
elementsTertiary
|
|
60100
|
+
} = vars;
|
|
60101
|
+
return {
|
|
60102
|
+
...originalInputSelf,
|
|
60103
|
+
color: elementsTertiary,
|
|
60104
|
+
colorFocus: elementsTertiary,
|
|
60105
|
+
border: "none",
|
|
60106
|
+
borderFocus: "none",
|
|
60107
|
+
borderHover: "none",
|
|
60108
|
+
boxShadow: "none",
|
|
60109
|
+
boxShadowFocus: "none"
|
|
60110
|
+
};
|
|
60111
|
+
}
|
|
60112
|
+
};
|
|
60113
|
+
const chatBadgeLight = {
|
|
60114
|
+
...badgeLight,
|
|
60115
|
+
self(vars) {
|
|
60116
|
+
const originalBadgeSelf = self$19(vars);
|
|
60117
|
+
const {
|
|
60118
|
+
brandPrimary400,
|
|
60119
|
+
elementsSecondary
|
|
60120
|
+
} = vars;
|
|
60121
|
+
return {
|
|
60122
|
+
...originalBadgeSelf,
|
|
60123
|
+
color: brandPrimary400,
|
|
60124
|
+
textColor: elementsSecondary
|
|
60125
|
+
};
|
|
60126
|
+
}
|
|
60127
|
+
};
|
|
60089
60128
|
const self$6 = vars => {
|
|
60090
60129
|
const {
|
|
60091
60130
|
borderRadiusLarge,
|
|
@@ -60135,7 +60174,7 @@
|
|
|
60135
60174
|
unreadNotificationTextColor: elementsSecondary,
|
|
60136
60175
|
typingIndicatorColor: textSecondary,
|
|
60137
60176
|
dateSeparatorColor: textTertiary,
|
|
60138
|
-
dateSeparatorBackgroundColor:
|
|
60177
|
+
dateSeparatorBackgroundColor: "transparent",
|
|
60139
60178
|
borderRadius: borderRadiusLarge,
|
|
60140
60179
|
errorColor: staticRed
|
|
60141
60180
|
};
|
|
@@ -60144,11 +60183,11 @@
|
|
|
60144
60183
|
name: "Chat",
|
|
60145
60184
|
common: derived,
|
|
60146
60185
|
peers: {
|
|
60147
|
-
Input:
|
|
60186
|
+
Input: chatInputLight,
|
|
60148
60187
|
Empty: emptyLight,
|
|
60149
60188
|
Select: selectLight,
|
|
60150
60189
|
Avatar: avatarLight,
|
|
60151
|
-
Badge:
|
|
60190
|
+
Badge: chatBadgeLight,
|
|
60152
60191
|
Button: buttonLight,
|
|
60153
60192
|
Icon: iconLight,
|
|
60154
60193
|
List: listLight,
|
|
@@ -60235,17 +60274,10 @@
|
|
|
60235
60274
|
var UChatListItems = vue.defineComponent({
|
|
60236
60275
|
name: "ChatListItems",
|
|
60237
60276
|
props: chatListItemsProps,
|
|
60238
|
-
|
|
60239
|
-
|
|
60277
|
+
setup(props, { slots }) {
|
|
60278
|
+
const UChat = vue.inject(chatInjectionKey, null);
|
|
60240
60279
|
const { mergedClsPrefixRef } = useConfig(props);
|
|
60241
|
-
const themeRef = useTheme(
|
|
60242
|
-
"Chat",
|
|
60243
|
-
"-chat",
|
|
60244
|
-
style$12,
|
|
60245
|
-
chatLight,
|
|
60246
|
-
props,
|
|
60247
|
-
mergedClsPrefixRef
|
|
60248
|
-
);
|
|
60280
|
+
const themeRef = UChat?.mergedThemeRef ?? useTheme("Chat", "-chat", style$12, chatLight, props, mergedClsPrefixRef);
|
|
60249
60281
|
const { localeRef } = useLocale("Chat");
|
|
60250
60282
|
const cssVarsRef = vue.computed(() => {
|
|
60251
60283
|
const {
|
|
@@ -60307,7 +60339,6 @@
|
|
|
60307
60339
|
() => props.typingText ?? localeRef.value.typingText
|
|
60308
60340
|
);
|
|
60309
60341
|
const handleChatSelect = (chatId) => {
|
|
60310
|
-
emit("chat-select", chatId);
|
|
60311
60342
|
props.onChatSelect?.(chatId);
|
|
60312
60343
|
};
|
|
60313
60344
|
const renderChatItem = (item) => {
|
|
@@ -60333,7 +60364,9 @@
|
|
|
60333
60364
|
{
|
|
60334
60365
|
size: "medium",
|
|
60335
60366
|
src: typeof item.avatar === "string" ? item.avatar : void 0,
|
|
60336
|
-
...props.avatarProps
|
|
60367
|
+
...props.avatarProps,
|
|
60368
|
+
theme: themeRef.value.peers.Avatar,
|
|
60369
|
+
themeOverrides: themeRef.value.peerOverrides.Avatar
|
|
60337
60370
|
},
|
|
60338
60371
|
{
|
|
60339
60372
|
default: () => typeof item.avatar === "function" ? item.avatar() : typeof item.title === "string" ? item.title.charAt(0)?.toUpperCase() : "?"
|
|
@@ -60393,14 +60426,18 @@
|
|
|
60393
60426
|
class: [
|
|
60394
60427
|
`${mergedClsPrefixRef.value}-chat-sidebar__item-status-icon`,
|
|
60395
60428
|
`${mergedClsPrefixRef.value}-chat-sidebar__item-status-icon--${item.messageStatus}`
|
|
60396
|
-
]
|
|
60429
|
+
],
|
|
60430
|
+
theme: themeRef.value.peers.Icon,
|
|
60431
|
+
themeOverrides: themeRef.value.peerOverrides.Icon
|
|
60397
60432
|
}
|
|
60398
60433
|
) : null),
|
|
60399
60434
|
!lastMessageIsOwn && hasUnreadIncoming && /* @__PURE__ */ vue.h(
|
|
60400
60435
|
UBadge,
|
|
60401
60436
|
{
|
|
60402
60437
|
value: displayUnreadCount,
|
|
60403
|
-
...props.badgeProps
|
|
60438
|
+
...props.badgeProps,
|
|
60439
|
+
theme: themeRef.value.peers.Badge,
|
|
60440
|
+
themeOverrides: themeRef.value.peerOverrides.Badge
|
|
60404
60441
|
}
|
|
60405
60442
|
)
|
|
60406
60443
|
)
|
|
@@ -60411,6 +60448,7 @@
|
|
|
60411
60448
|
};
|
|
60412
60449
|
return {
|
|
60413
60450
|
mergedClsPrefixRef,
|
|
60451
|
+
mergedTheme: themeRef,
|
|
60414
60452
|
renderChatItem,
|
|
60415
60453
|
cssVars: cssVarsRef,
|
|
60416
60454
|
themeClass: themeClassHandle?.themeClass,
|
|
@@ -60422,26 +60460,49 @@
|
|
|
60422
60460
|
const { mergedClsPrefixRef, renderChatItem } = this;
|
|
60423
60461
|
const content = (() => {
|
|
60424
60462
|
if (this.loading) {
|
|
60425
|
-
return /* @__PURE__ */ vue.h(
|
|
60426
|
-
|
|
60427
|
-
|
|
60428
|
-
|
|
60429
|
-
|
|
60430
|
-
|
|
60431
|
-
|
|
60432
|
-
|
|
60433
|
-
|
|
60434
|
-
|
|
60463
|
+
return /* @__PURE__ */ vue.h(
|
|
60464
|
+
UList,
|
|
60465
|
+
{
|
|
60466
|
+
loading: true,
|
|
60467
|
+
theme: this.mergedTheme.peers.List,
|
|
60468
|
+
themeOverrides: this.mergedTheme.peerOverrides.List
|
|
60469
|
+
},
|
|
60470
|
+
{
|
|
60471
|
+
default: () => Array.from({ length: this.loadingCount || 10 }).map(
|
|
60472
|
+
(_, index) => /* @__PURE__ */ vue.h(
|
|
60473
|
+
UListItem,
|
|
60474
|
+
{
|
|
60475
|
+
key: index,
|
|
60476
|
+
avatar: { icon: PersonOutline },
|
|
60477
|
+
description: { text: "Loading..." },
|
|
60478
|
+
header: { text: "Loading..." }
|
|
60479
|
+
}
|
|
60480
|
+
)
|
|
60435
60481
|
)
|
|
60436
|
-
|
|
60437
|
-
|
|
60482
|
+
}
|
|
60483
|
+
);
|
|
60438
60484
|
}
|
|
60439
60485
|
if (this.chatItems?.length) {
|
|
60440
|
-
return /* @__PURE__ */ vue.h(
|
|
60441
|
-
|
|
60442
|
-
|
|
60486
|
+
return /* @__PURE__ */ vue.h(
|
|
60487
|
+
UList,
|
|
60488
|
+
{
|
|
60489
|
+
showIcon: false,
|
|
60490
|
+
theme: this.mergedTheme.peers.List,
|
|
60491
|
+
themeOverrides: this.mergedTheme.peerOverrides.List
|
|
60492
|
+
},
|
|
60493
|
+
{
|
|
60494
|
+
default: () => this.chatItems?.map((item) => renderChatItem(item))
|
|
60495
|
+
}
|
|
60496
|
+
);
|
|
60443
60497
|
}
|
|
60444
|
-
return /* @__PURE__ */ vue.h(
|
|
60498
|
+
return /* @__PURE__ */ vue.h(
|
|
60499
|
+
UEmpty,
|
|
60500
|
+
{
|
|
60501
|
+
...this.emptyProps,
|
|
60502
|
+
theme: this.mergedTheme.peers.Empty,
|
|
60503
|
+
themeOverrides: this.mergedTheme.peerOverrides.Empty
|
|
60504
|
+
}
|
|
60505
|
+
);
|
|
60445
60506
|
})();
|
|
60446
60507
|
return /* @__PURE__ */ vue.h(
|
|
60447
60508
|
"div",
|
|
@@ -60485,6 +60546,7 @@
|
|
|
60485
60546
|
const { slots } = this;
|
|
60486
60547
|
const {
|
|
60487
60548
|
mergedClsPrefixRef,
|
|
60549
|
+
mergedThemeRef,
|
|
60488
60550
|
chatItemsRef,
|
|
60489
60551
|
chatItemsLoadingRef,
|
|
60490
60552
|
chatItemsLoadingCountRef,
|
|
@@ -60513,7 +60575,15 @@
|
|
|
60513
60575
|
{
|
|
60514
60576
|
class: `${mergedClsPrefixRef.value}-chat-sidebar__header-main`
|
|
60515
60577
|
},
|
|
60516
|
-
slots.sidebarHeaderMain?.() || /* @__PURE__ */ vue.h(
|
|
60578
|
+
slots.sidebarHeaderMain?.() || /* @__PURE__ */ vue.h(
|
|
60579
|
+
USelect,
|
|
60580
|
+
{
|
|
60581
|
+
round: true,
|
|
60582
|
+
size: "tiny",
|
|
60583
|
+
theme: mergedThemeRef.value.peers.Select,
|
|
60584
|
+
themeOverrides: mergedThemeRef.value.peerOverrides.Select
|
|
60585
|
+
}
|
|
60586
|
+
)
|
|
60517
60587
|
), /* @__PURE__ */ vue.h(
|
|
60518
60588
|
"div",
|
|
60519
60589
|
{
|
|
@@ -64450,17 +64520,10 @@
|
|
|
64450
64520
|
var UChatMessages = vue.defineComponent({
|
|
64451
64521
|
name: "ChatMessages",
|
|
64452
64522
|
props: chatMessagesProps,
|
|
64453
|
-
|
|
64454
|
-
|
|
64523
|
+
setup(props, { slots }) {
|
|
64524
|
+
const UChat = vue.inject(chatInjectionKey, null);
|
|
64455
64525
|
const { mergedClsPrefixRef } = useConfig(props);
|
|
64456
|
-
const themeRef = useTheme(
|
|
64457
|
-
"Chat",
|
|
64458
|
-
"-chat",
|
|
64459
|
-
style$12,
|
|
64460
|
-
chatLight,
|
|
64461
|
-
props,
|
|
64462
|
-
mergedClsPrefixRef
|
|
64463
|
-
);
|
|
64526
|
+
const themeRef = UChat?.mergedThemeRef ?? useTheme("Chat", "-chat", style$12, chatLight, props, mergedClsPrefixRef);
|
|
64464
64527
|
const { localeRef } = useLocale("Chat");
|
|
64465
64528
|
const cssVarsRef = vue.computed(() => {
|
|
64466
64529
|
const {
|
|
@@ -64549,7 +64612,6 @@
|
|
|
64549
64612
|
).length;
|
|
64550
64613
|
});
|
|
64551
64614
|
const handleMessageRetry = (message) => {
|
|
64552
|
-
emit("message-retry", message);
|
|
64553
64615
|
props.onMessageRetry?.(message);
|
|
64554
64616
|
};
|
|
64555
64617
|
const renderDateSeparator = (date) => {
|
|
@@ -64565,6 +64627,20 @@
|
|
|
64565
64627
|
/* @__PURE__ */ vue.h("span", null, count, " ", mergedUnreadNotificationTextRef.value)
|
|
64566
64628
|
);
|
|
64567
64629
|
};
|
|
64630
|
+
const renderMarkMessage = (message) => {
|
|
64631
|
+
const markTypeClass = message.markType === ChatMarkType.SYSTEM ? "system" : message.markType === ChatMarkType.EVENT ? "event" : "divider";
|
|
64632
|
+
return /* @__PURE__ */ vue.h(
|
|
64633
|
+
"div",
|
|
64634
|
+
{
|
|
64635
|
+
key: message.id,
|
|
64636
|
+
class: [
|
|
64637
|
+
`${mergedClsPrefixRef.value}-chat-main__mark`,
|
|
64638
|
+
`${mergedClsPrefixRef.value}-chat-main__mark--${markTypeClass}`
|
|
64639
|
+
]
|
|
64640
|
+
},
|
|
64641
|
+
message.content && /* @__PURE__ */ vue.h("span", null, message.content)
|
|
64642
|
+
);
|
|
64643
|
+
};
|
|
64568
64644
|
const renderMessage = (message) => {
|
|
64569
64645
|
const isOwn = message.isOwn;
|
|
64570
64646
|
const attachments = message.attachment ? Array.isArray(message.attachment) ? message.attachment : [message.attachment] : [];
|
|
@@ -64641,7 +64717,9 @@
|
|
|
64641
64717
|
{
|
|
64642
64718
|
size: 16,
|
|
64643
64719
|
component: statusIconMapper[MessageStatus.RETRY],
|
|
64644
|
-
class: `${mergedClsPrefixRef.value}-chat-main__message-retry-icon
|
|
64720
|
+
class: `${mergedClsPrefixRef.value}-chat-main__message-retry-icon`,
|
|
64721
|
+
theme: themeRef.value.peers.Icon,
|
|
64722
|
+
themeOverrides: themeRef.value.peerOverrides.Icon
|
|
64645
64723
|
}
|
|
64646
64724
|
),
|
|
64647
64725
|
/* @__PURE__ */ vue.h(
|
|
@@ -64672,7 +64750,9 @@
|
|
|
64672
64750
|
`${mergedClsPrefixRef.value}-chat-main__message-status-icon--${String(
|
|
64673
64751
|
message.status
|
|
64674
64752
|
)}`
|
|
64675
|
-
]
|
|
64753
|
+
],
|
|
64754
|
+
theme: themeRef.value.peers.Icon,
|
|
64755
|
+
themeOverrides: themeRef.value.peerOverrides.Icon
|
|
64676
64756
|
}
|
|
64677
64757
|
)
|
|
64678
64758
|
))
|
|
@@ -64759,7 +64839,9 @@
|
|
|
64759
64839
|
};
|
|
64760
64840
|
return {
|
|
64761
64841
|
mergedClsPrefixRef,
|
|
64842
|
+
mergedTheme: themeRef,
|
|
64762
64843
|
renderMessage,
|
|
64844
|
+
renderMarkMessage,
|
|
64763
64845
|
renderTypingIndicator,
|
|
64764
64846
|
renderSkeletonMessage,
|
|
64765
64847
|
renderDateSeparator,
|
|
@@ -64774,6 +64856,7 @@
|
|
|
64774
64856
|
const {
|
|
64775
64857
|
mergedClsPrefixRef,
|
|
64776
64858
|
renderMessage,
|
|
64859
|
+
renderMarkMessage,
|
|
64777
64860
|
renderTypingIndicator,
|
|
64778
64861
|
renderSkeletonMessage,
|
|
64779
64862
|
renderDateSeparator,
|
|
@@ -64879,7 +64962,11 @@
|
|
|
64879
64962
|
if (item.type === "unread-notification") {
|
|
64880
64963
|
return renderUnreadNotification();
|
|
64881
64964
|
}
|
|
64882
|
-
|
|
64965
|
+
const message = item;
|
|
64966
|
+
if (message.type === ChatMessageType.MARK) {
|
|
64967
|
+
return renderMarkMessage(message);
|
|
64968
|
+
}
|
|
64969
|
+
return renderMessage(message);
|
|
64883
64970
|
}
|
|
64884
64971
|
), isTyping && renderTypingIndicator())
|
|
64885
64972
|
)
|
|
@@ -64894,6 +64981,7 @@
|
|
|
64894
64981
|
setup(_, { slots }) {
|
|
64895
64982
|
const {
|
|
64896
64983
|
mergedClsPrefixRef,
|
|
64984
|
+
mergedThemeRef,
|
|
64897
64985
|
selectedChatRef,
|
|
64898
64986
|
messagesRef,
|
|
64899
64987
|
typingChatIdsRef,
|
|
@@ -65030,7 +65118,9 @@
|
|
|
65030
65118
|
UText,
|
|
65031
65119
|
{
|
|
65032
65120
|
variant: "heading-s-bold",
|
|
65033
|
-
class: `${mergedClsPrefixRef.value}-chat-main__header-title
|
|
65121
|
+
class: `${mergedClsPrefixRef.value}-chat-main__header-title`,
|
|
65122
|
+
theme: mergedThemeRef.value.peers.Typography,
|
|
65123
|
+
themeOverrides: mergedThemeRef.value.peerOverrides.Typography
|
|
65034
65124
|
},
|
|
65035
65125
|
{
|
|
65036
65126
|
default: () => selectedChatRef.value?.title || "Select a chat"
|
|
@@ -65051,12 +65141,23 @@
|
|
|
65051
65141
|
circle: true,
|
|
65052
65142
|
size: "large",
|
|
65053
65143
|
...headerButtonPropsRef.value,
|
|
65144
|
+
theme: mergedThemeRef.value.peers.Button,
|
|
65145
|
+
themeOverrides: mergedThemeRef.value.peerOverrides.Button,
|
|
65054
65146
|
onClick: () => onChatShare?.value?.()
|
|
65055
65147
|
},
|
|
65056
65148
|
{
|
|
65057
|
-
default: () => /* @__PURE__ */ vue.h(
|
|
65058
|
-
|
|
65059
|
-
|
|
65149
|
+
default: () => /* @__PURE__ */ vue.h(
|
|
65150
|
+
UIcon,
|
|
65151
|
+
{
|
|
65152
|
+
size: 20,
|
|
65153
|
+
...headerIconPropsRef.value,
|
|
65154
|
+
theme: mergedThemeRef.value.peers.Icon,
|
|
65155
|
+
themeOverrides: mergedThemeRef.value.peerOverrides.Icon
|
|
65156
|
+
},
|
|
65157
|
+
{
|
|
65158
|
+
default: () => /* @__PURE__ */ vue.h(ArrowHookUpRight, null)
|
|
65159
|
+
}
|
|
65160
|
+
)
|
|
65060
65161
|
}
|
|
65061
65162
|
),
|
|
65062
65163
|
/* @__PURE__ */ vue.h(
|
|
@@ -65066,12 +65167,23 @@
|
|
|
65066
65167
|
circle: true,
|
|
65067
65168
|
size: "large",
|
|
65068
65169
|
...headerButtonPropsRef.value,
|
|
65170
|
+
theme: mergedThemeRef.value.peers.Button,
|
|
65171
|
+
themeOverrides: mergedThemeRef.value.peerOverrides.Button,
|
|
65069
65172
|
onClick: () => onUserProfile?.value?.()
|
|
65070
65173
|
},
|
|
65071
65174
|
{
|
|
65072
|
-
default: () => /* @__PURE__ */ vue.h(
|
|
65073
|
-
|
|
65074
|
-
|
|
65175
|
+
default: () => /* @__PURE__ */ vue.h(
|
|
65176
|
+
UIcon,
|
|
65177
|
+
{
|
|
65178
|
+
size: 20,
|
|
65179
|
+
...headerIconPropsRef.value,
|
|
65180
|
+
theme: mergedThemeRef.value.peers.Icon,
|
|
65181
|
+
themeOverrides: mergedThemeRef.value.peerOverrides.Icon
|
|
65182
|
+
},
|
|
65183
|
+
{
|
|
65184
|
+
default: () => /* @__PURE__ */ vue.h(PersonNote, null)
|
|
65185
|
+
}
|
|
65186
|
+
)
|
|
65075
65187
|
}
|
|
65076
65188
|
),
|
|
65077
65189
|
/* @__PURE__ */ vue.h(
|
|
@@ -65081,6 +65193,8 @@
|
|
|
65081
65193
|
size: "large",
|
|
65082
65194
|
round: true,
|
|
65083
65195
|
...headerButtonPropsRef.value,
|
|
65196
|
+
theme: mergedThemeRef.value.peers.Button,
|
|
65197
|
+
themeOverrides: mergedThemeRef.value.peerOverrides.Button,
|
|
65084
65198
|
onClick: () => onChatClose?.value?.()
|
|
65085
65199
|
},
|
|
65086
65200
|
{
|
|
@@ -65232,6 +65346,8 @@
|
|
|
65232
65346
|
size: "large",
|
|
65233
65347
|
class: `${mergedClsPrefixRef.value}-chat-main__attach-btn`,
|
|
65234
65348
|
...footerButtonPropsRef.value,
|
|
65349
|
+
theme: mergedThemeRef.value.peers.Button,
|
|
65350
|
+
themeOverrides: mergedThemeRef.value.peerOverrides.Button,
|
|
65235
65351
|
onClick: handleClick
|
|
65236
65352
|
},
|
|
65237
65353
|
{
|
|
@@ -65239,7 +65355,9 @@
|
|
|
65239
65355
|
UIcon,
|
|
65240
65356
|
{
|
|
65241
65357
|
size: 24,
|
|
65242
|
-
...footerIconPropsRef.value
|
|
65358
|
+
...footerIconPropsRef.value,
|
|
65359
|
+
theme: mergedThemeRef.value.peers.Icon,
|
|
65360
|
+
themeOverrides: mergedThemeRef.value.peerOverrides.Icon
|
|
65243
65361
|
},
|
|
65244
65362
|
{
|
|
65245
65363
|
default: () => /* @__PURE__ */ vue.h(AttachIcon, null)
|
|
@@ -65255,6 +65373,8 @@
|
|
|
65255
65373
|
placeholder: inputPlaceholderRef.value,
|
|
65256
65374
|
class: `${mergedClsPrefixRef.value}-chat-main__input`,
|
|
65257
65375
|
...footerInputPropsRef.value,
|
|
65376
|
+
theme: mergedThemeRef.value.peers.Input,
|
|
65377
|
+
themeOverrides: mergedThemeRef.value.peerOverrides.Input,
|
|
65258
65378
|
onUpdateValue: (value) => {
|
|
65259
65379
|
inputValue.value = value;
|
|
65260
65380
|
if (selectedChatRef.value) {
|
|
@@ -65708,6 +65828,7 @@
|
|
|
65708
65828
|
);
|
|
65709
65829
|
vue.provide(chatInjectionKey, {
|
|
65710
65830
|
mergedClsPrefixRef,
|
|
65831
|
+
mergedThemeRef: themeRef,
|
|
65711
65832
|
chatItemsRef: vue.toRef(props, "chatItems"),
|
|
65712
65833
|
selectedChatIdRef: mergedSelectedChatIdRef,
|
|
65713
65834
|
selectedChatRef,
|
|
@@ -129355,6 +129476,9 @@
|
|
|
129355
129476
|
|
|
129356
129477
|
var components = /*#__PURE__*/Object.freeze({
|
|
129357
129478
|
__proto__: null,
|
|
129479
|
+
ChatMarkType: ChatMarkType,
|
|
129480
|
+
ChatMessageType: ChatMessageType,
|
|
129481
|
+
MessageStatus: MessageStatus,
|
|
129358
129482
|
NA: a,
|
|
129359
129483
|
NP: p,
|
|
129360
129484
|
UActionCard: ActionCard,
|
|
@@ -129645,7 +129769,7 @@
|
|
|
129645
129769
|
watermarkProps: watermarkProps
|
|
129646
129770
|
});
|
|
129647
129771
|
|
|
129648
|
-
var version = "1.8.
|
|
129772
|
+
var version = "1.8.1";
|
|
129649
129773
|
|
|
129650
129774
|
function create({
|
|
129651
129775
|
componentPrefix = "U",
|
|
@@ -130450,6 +130574,9 @@
|
|
|
130450
130574
|
};
|
|
130451
130575
|
}
|
|
130452
130576
|
|
|
130577
|
+
exports.ChatMarkType = ChatMarkType;
|
|
130578
|
+
exports.ChatMessageType = ChatMessageType;
|
|
130579
|
+
exports.MessageStatus = MessageStatus;
|
|
130453
130580
|
exports.NA = a;
|
|
130454
130581
|
exports.NP = p;
|
|
130455
130582
|
exports.UActionCard = ActionCard;
|