@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
|
@@ -58,10 +58,11 @@ exports.chatListItemsProps = Object.assign(Object.assign({}, _mixins_1.useTheme.
|
|
|
58
58
|
exports.default = (0, vue_1.defineComponent)({
|
|
59
59
|
name: 'ChatListItems',
|
|
60
60
|
props: exports.chatListItemsProps,
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
setup(props, { slots }) {
|
|
62
|
+
var _a;
|
|
63
|
+
const UChat = (0, vue_1.inject)(interface_1.chatInjectionKey, null);
|
|
63
64
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
64
|
-
const themeRef = (0, _mixins_1.useTheme)('Chat', '-chat', index_cssr_1.default, styles_1.chatLight, props, mergedClsPrefixRef);
|
|
65
|
+
const themeRef = (_a = UChat === null || UChat === void 0 ? void 0 : UChat.mergedThemeRef) !== null && _a !== void 0 ? _a : (0, _mixins_1.useTheme)('Chat', '-chat', index_cssr_1.default, styles_1.chatLight, props, mergedClsPrefixRef);
|
|
65
66
|
const { localeRef } = (0, _mixins_1.useLocale)('Chat');
|
|
66
67
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
67
68
|
const { common: { cubicBezierEaseInOut, brandPrimary500, staticGreen, staticRed, textPrimary, textSecondary, textTertiary }, self: { backgroundColor, borderColor, sidebarBackgroundColor, sidebarBorderColor, sidebarItemBackgroundColor, sidebarItemBackgroundColorHover, sidebarItemBackgroundColorSelected, sidebarItemTextColor, sidebarItemTextColorSelected, sidebarItemSubtitleColor, sidebarItemTimeColor, unreadNotificationBackgroundColor, borderRadius } } = themeRef.value;
|
|
@@ -92,7 +93,6 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
92
93
|
const mergedTypingTextRef = (0, vue_1.computed)(() => { var _a; return (_a = props.typingText) !== null && _a !== void 0 ? _a : localeRef.value.typingText; });
|
|
93
94
|
const handleChatSelect = (chatId) => {
|
|
94
95
|
var _a;
|
|
95
|
-
emit('chat-select', chatId);
|
|
96
96
|
(_a = props.onChatSelect) === null || _a === void 0 ? void 0 : _a.call(props, chatId);
|
|
97
97
|
};
|
|
98
98
|
const renderChatItem = (item) => {
|
|
@@ -107,7 +107,7 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
107
107
|
`${mergedClsPrefixRef.value}-chat-sidebar__item--selected`,
|
|
108
108
|
isTyping && `${mergedClsPrefixRef.value}-chat-sidebar__item--typing`
|
|
109
109
|
] }, {
|
|
110
|
-
prefix: () => ((0, vue_1.h)(avatar_1.UAvatar, Object.assign({ size: "medium", src: typeof item.avatar === 'string' ? item.avatar : undefined }, props.avatarProps), {
|
|
110
|
+
prefix: () => ((0, vue_1.h)(avatar_1.UAvatar, Object.assign({ size: "medium", src: typeof item.avatar === 'string' ? item.avatar : undefined }, props.avatarProps, { theme: themeRef.value.peers.Avatar, themeOverrides: themeRef.value.peerOverrides.Avatar }), {
|
|
111
111
|
default: () => {
|
|
112
112
|
var _a;
|
|
113
113
|
return typeof item.avatar === 'function'
|
|
@@ -147,13 +147,14 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
147
147
|
statusIconMapper[item.messageStatus] ? ((0, vue_1.h)(icon_1.UIcon, { size: 16, component: statusIconMapper[item.messageStatus], class: [
|
|
148
148
|
`${mergedClsPrefixRef.value}-chat-sidebar__item-status-icon`,
|
|
149
149
|
`${mergedClsPrefixRef.value}-chat-sidebar__item-status-icon--${item.messageStatus}`
|
|
150
|
-
] })) : null),
|
|
151
|
-
!lastMessageIsOwn && hasUnreadIncoming && ((0, vue_1.h)(badge_1.UBadge, Object.assign({ value: displayUnreadCount }, props.badgeProps))))));
|
|
150
|
+
], theme: themeRef.value.peers.Icon, themeOverrides: themeRef.value.peerOverrides.Icon })) : null),
|
|
151
|
+
!lastMessageIsOwn && hasUnreadIncoming && ((0, vue_1.h)(badge_1.UBadge, Object.assign({ value: displayUnreadCount }, props.badgeProps, { theme: themeRef.value.peers.Badge, themeOverrides: themeRef.value.peerOverrides.Badge }))))));
|
|
152
152
|
}
|
|
153
153
|
}));
|
|
154
154
|
};
|
|
155
155
|
return {
|
|
156
156
|
mergedClsPrefixRef,
|
|
157
|
+
mergedTheme: themeRef,
|
|
157
158
|
renderChatItem,
|
|
158
159
|
cssVars: cssVarsRef,
|
|
159
160
|
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
@@ -167,16 +168,16 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
167
168
|
const content = (() => {
|
|
168
169
|
var _a;
|
|
169
170
|
if (this.loading) {
|
|
170
|
-
return ((0, vue_1.h)(list_1.UList, { loading: true }, {
|
|
171
|
+
return ((0, vue_1.h)(list_1.UList, { loading: true, theme: this.mergedTheme.peers.List, themeOverrides: this.mergedTheme.peerOverrides.List }, {
|
|
171
172
|
default: () => Array.from({ length: this.loadingCount || 10 }).map((_, index) => ((0, vue_1.h)(list_1.UListItem, { key: index, avatar: { icon: icons_1.PersonOutline }, description: { text: 'Loading...' }, header: { text: 'Loading...' } })))
|
|
172
173
|
}));
|
|
173
174
|
}
|
|
174
175
|
if ((_a = this.chatItems) === null || _a === void 0 ? void 0 : _a.length) {
|
|
175
|
-
return ((0, vue_1.h)(list_1.UList, { showIcon: false }, {
|
|
176
|
+
return ((0, vue_1.h)(list_1.UList, { showIcon: false, theme: this.mergedTheme.peers.List, themeOverrides: this.mergedTheme.peerOverrides.List }, {
|
|
176
177
|
default: () => { var _a; return (_a = this.chatItems) === null || _a === void 0 ? void 0 : _a.map((item) => renderChatItem(item)); }
|
|
177
178
|
}));
|
|
178
179
|
}
|
|
179
|
-
return (0, vue_1.h)(empty_1.UEmpty, Object.assign({}, this.emptyProps));
|
|
180
|
+
return ((0, vue_1.h)(empty_1.UEmpty, Object.assign({}, this.emptyProps, { theme: this.mergedTheme.peers.Empty, themeOverrides: this.mergedTheme.peerOverrides.Empty })));
|
|
180
181
|
})();
|
|
181
182
|
return ((0, vue_1.h)("div", { class: [`${mergedClsPrefixRef}-chat`, this.themeClass], style: this.cssVars },
|
|
182
183
|
(0, vue_1.h)("div", { class: `${mergedClsPrefixRef}-chat-sidebar`, style: {
|