@uzum-tech/ui 1.8.0 → 1.8.2
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 +378 -197
- package/dist/index.prod.js +3 -3
- package/es/_internal/scrollbar/src/Scrollbar.js +1 -1
- package/es/button/src/Button.d.ts +72 -0
- package/es/button/src/Button.js +13 -7
- package/es/button/src/styles/index.cssr.js +1 -2
- package/es/button/styles/light.d.ts +8 -0
- package/es/button/styles/light.js +7 -7
- package/es/calendar/src/Calendar.d.ts +80 -0
- package/es/calendar/styles/light.d.ts +8 -0
- package/es/chat/index.d.ts +2 -1
- package/es/chat/index.js +1 -0
- package/es/chat/src/Chat.d.ts +87 -7
- package/es/chat/src/Chat.js +12 -12
- package/es/chat/src/ChatListItems.d.ts +1847 -4
- package/es/chat/src/ChatListItems.js +16 -12
- package/es/chat/src/ChatMessages.d.ts +1848 -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 +14 -17
- package/es/chat/styles/dark.d.ts +8 -0
- package/es/chat/styles/light.d.ts +9 -1
- package/es/chat/styles/light.js +15 -3
- package/es/color-picker/src/ColorInputUnit.d.ts +8 -0
- package/es/color-picker/src/ColorPicker.d.ts +72 -0
- package/es/color-picker/styles/light.d.ts +8 -0
- package/es/data-table/src/DataTable.d.ts +56 -0
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +8 -0
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +8 -0
- package/es/data-table/src/TableParts/Body.d.ts +8 -0
- package/es/data-table/src/TableParts/Header.d.ts +8 -0
- package/es/data-table/src/interface.d.ts +24 -0
- package/es/data-table/styles/light.d.ts +8 -0
- package/es/date-picker/src/DatePicker.d.ts +168 -0
- package/es/date-picker/src/panel/date.d.ts +24 -0
- package/es/date-picker/src/panel/daterange.d.ts +24 -0
- package/es/date-picker/src/panel/datetime.d.ts +24 -0
- package/es/date-picker/src/panel/datetimerange.d.ts +24 -0
- package/es/date-picker/src/panel/panelMonth.d.ts +48 -0
- package/es/date-picker/src/panel/panelMonthContent.d.ts +24 -0
- package/es/date-picker/src/panel/panelYear.d.ts +48 -0
- package/es/date-picker/src/panel/panelYearContent.d.ts +24 -0
- package/es/date-picker/src/panel/use-calendar.d.ts +24 -0
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +24 -0
- package/es/date-picker/src/panel/use-panel-common.d.ts +24 -0
- package/es/date-picker/styles/light.d.ts +16 -0
- package/es/dialog/src/Dialog.d.ts +56 -0
- package/es/dialog/src/DialogProvider.d.ts +16 -0
- package/es/dialog/styles/light.d.ts +8 -0
- package/es/dynamic-input/src/DynamicInput.d.ts +80 -0
- package/es/dynamic-input/src/InputPreset.d.ts +8 -0
- package/es/dynamic-input/src/PairPreset.d.ts +8 -0
- package/es/dynamic-input/styles/light.d.ts +8 -0
- package/es/dynamic-tags/src/DynamicTags.d.ts +80 -0
- package/es/dynamic-tags/styles/light.d.ts +8 -0
- package/es/input-number/src/InputNumber.d.ts +80 -0
- package/es/input-number/styles/light.d.ts +8 -0
- package/es/legacy-transfer/src/Transfer.d.ts +80 -0
- package/es/legacy-transfer/src/TransferFilter.d.ts +8 -0
- package/es/legacy-transfer/src/TransferList.d.ts +8 -0
- package/es/legacy-transfer/src/TransferListItem.d.ts +8 -0
- package/es/legacy-transfer/styles/light.d.ts +8 -0
- package/es/modal/src/BodyWrapper.d.ts +16 -0
- package/es/modal/src/Modal.d.ts +72 -0
- package/es/modal/styles/light.d.ts +8 -0
- package/es/notification/src/Notification.d.ts +5 -0
- package/es/notification/src/Notification.js +16 -6
- package/es/notification/src/NotificationContainer.d.ts +12 -0
- package/es/notification/src/NotificationProvider.d.ts +108 -0
- package/es/notification/src/styles/index.cssr.js +12 -8
- package/es/notification/styles/light.d.ts +24 -0
- package/es/notification/styles/light.js +9 -8
- package/es/popconfirm/src/Popconfirm.d.ts +80 -0
- package/es/popconfirm/styles/light.d.ts +8 -0
- package/es/time-picker/src/Panel.d.ts +8 -0
- package/es/time-picker/src/TimePicker.d.ts +80 -0
- package/es/time-picker/styles/light.d.ts +8 -0
- package/es/transfer/src/Transfer.d.ts +80 -0
- package/es/transfer/src/TransferFilter.d.ts +8 -0
- package/es/transfer/src/TransferList.d.ts +8 -0
- package/es/transfer/src/TransferListItem.d.ts +8 -0
- package/es/transfer/styles/light.d.ts +8 -0
- package/es/upload/src/Upload.d.ts +90 -0
- package/es/upload/src/Upload.js +2 -1
- package/es/upload/src/UploadFile.d.ts +9 -0
- package/es/upload/src/UploadProgress.d.ts +9 -0
- package/es/upload/src/styles/index.cssr.js +1 -0
- package/es/upload/src/useUploadActionsRender.js +5 -1
- package/es/upload/styles/light.d.ts +10 -0
- package/es/upload/styles/light.js +6 -5
- package/es/version.d.ts +1 -1
- package/es/version.js +1 -1
- package/lib/_internal/scrollbar/src/Scrollbar.js +1 -1
- package/lib/button/src/Button.d.ts +72 -0
- package/lib/button/src/Button.js +13 -7
- package/lib/button/src/styles/index.cssr.js +1 -2
- package/lib/button/styles/light.d.ts +8 -0
- package/lib/button/styles/light.js +7 -7
- package/lib/calendar/src/Calendar.d.ts +80 -0
- package/lib/calendar/styles/light.d.ts +8 -0
- package/lib/chat/index.d.ts +2 -1
- package/lib/chat/index.js +5 -1
- package/lib/chat/src/Chat.d.ts +87 -7
- package/lib/chat/src/Chat.js +12 -12
- package/lib/chat/src/ChatListItems.d.ts +1847 -4
- package/lib/chat/src/ChatListItems.js +14 -10
- package/lib/chat/src/ChatMessages.d.ts +1848 -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 +14 -17
- package/lib/chat/styles/dark.d.ts +8 -0
- package/lib/chat/styles/light.d.ts +9 -1
- package/lib/chat/styles/light.js +15 -3
- package/lib/color-picker/src/ColorInputUnit.d.ts +8 -0
- package/lib/color-picker/src/ColorPicker.d.ts +72 -0
- package/lib/color-picker/styles/light.d.ts +8 -0
- package/lib/data-table/src/DataTable.d.ts +56 -0
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +8 -0
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +8 -0
- package/lib/data-table/src/TableParts/Body.d.ts +8 -0
- package/lib/data-table/src/TableParts/Header.d.ts +8 -0
- package/lib/data-table/src/interface.d.ts +24 -0
- package/lib/data-table/styles/light.d.ts +8 -0
- package/lib/date-picker/src/DatePicker.d.ts +168 -0
- package/lib/date-picker/src/panel/date.d.ts +24 -0
- package/lib/date-picker/src/panel/daterange.d.ts +24 -0
- package/lib/date-picker/src/panel/datetime.d.ts +24 -0
- package/lib/date-picker/src/panel/datetimerange.d.ts +24 -0
- package/lib/date-picker/src/panel/panelMonth.d.ts +48 -0
- package/lib/date-picker/src/panel/panelMonthContent.d.ts +24 -0
- package/lib/date-picker/src/panel/panelYear.d.ts +48 -0
- package/lib/date-picker/src/panel/panelYearContent.d.ts +24 -0
- package/lib/date-picker/src/panel/use-calendar.d.ts +24 -0
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +24 -0
- package/lib/date-picker/src/panel/use-panel-common.d.ts +24 -0
- package/lib/date-picker/styles/light.d.ts +16 -0
- package/lib/dialog/src/Dialog.d.ts +56 -0
- package/lib/dialog/src/DialogProvider.d.ts +16 -0
- package/lib/dialog/styles/light.d.ts +8 -0
- package/lib/dynamic-input/src/DynamicInput.d.ts +80 -0
- package/lib/dynamic-input/src/InputPreset.d.ts +8 -0
- package/lib/dynamic-input/src/PairPreset.d.ts +8 -0
- package/lib/dynamic-input/styles/light.d.ts +8 -0
- package/lib/dynamic-tags/src/DynamicTags.d.ts +80 -0
- package/lib/dynamic-tags/styles/light.d.ts +8 -0
- package/lib/input-number/src/InputNumber.d.ts +80 -0
- package/lib/input-number/styles/light.d.ts +8 -0
- package/lib/legacy-transfer/src/Transfer.d.ts +80 -0
- package/lib/legacy-transfer/src/TransferFilter.d.ts +8 -0
- package/lib/legacy-transfer/src/TransferList.d.ts +8 -0
- package/lib/legacy-transfer/src/TransferListItem.d.ts +8 -0
- package/lib/legacy-transfer/styles/light.d.ts +8 -0
- package/lib/modal/src/BodyWrapper.d.ts +16 -0
- package/lib/modal/src/Modal.d.ts +72 -0
- package/lib/modal/styles/light.d.ts +8 -0
- package/lib/notification/src/Notification.d.ts +5 -0
- package/lib/notification/src/Notification.js +14 -4
- package/lib/notification/src/NotificationContainer.d.ts +12 -0
- package/lib/notification/src/NotificationProvider.d.ts +108 -0
- package/lib/notification/src/styles/index.cssr.js +12 -8
- package/lib/notification/styles/light.d.ts +24 -0
- package/lib/notification/styles/light.js +9 -8
- package/lib/popconfirm/src/Popconfirm.d.ts +80 -0
- package/lib/popconfirm/styles/light.d.ts +8 -0
- package/lib/time-picker/src/Panel.d.ts +8 -0
- package/lib/time-picker/src/TimePicker.d.ts +80 -0
- package/lib/time-picker/styles/light.d.ts +8 -0
- package/lib/transfer/src/Transfer.d.ts +80 -0
- package/lib/transfer/src/TransferFilter.d.ts +8 -0
- package/lib/transfer/src/TransferList.d.ts +8 -0
- package/lib/transfer/src/TransferListItem.d.ts +8 -0
- package/lib/transfer/styles/light.d.ts +8 -0
- package/lib/upload/src/Upload.d.ts +90 -0
- package/lib/upload/src/Upload.js +2 -1
- package/lib/upload/src/UploadFile.d.ts +9 -0
- package/lib/upload/src/UploadProgress.d.ts +9 -0
- package/lib/upload/src/styles/index.cssr.js +1 -0
- package/lib/upload/src/useUploadActionsRender.js +5 -1
- package/lib/upload/styles/light.d.ts +10 -0
- package/lib/upload/styles/light.js +6 -5
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { h, defineComponent, computed } from 'vue';
|
|
2
|
-
import { MessageStatus } from './interface';
|
|
1
|
+
import { h, defineComponent, computed, inject } from 'vue';
|
|
2
|
+
import { MessageStatus, chatInjectionKey } from './interface';
|
|
3
3
|
import { UEmpty } from '../../empty';
|
|
4
4
|
import { UAvatar } from '../../avatar';
|
|
5
5
|
import { UListItem, UList } from '../../list';
|
|
@@ -9,6 +9,7 @@ import style from './styles/index.cssr';
|
|
|
9
9
|
import { chatLight } from '../styles';
|
|
10
10
|
import { useConfig, useTheme, useThemeClass, useLocale } from '../../_mixins';
|
|
11
11
|
import { CheckmarkDoneSharp, MdTime, PersonOutline, Refresh } from '../../_internal/icons';
|
|
12
|
+
import { UFlex } from '../../flex';
|
|
12
13
|
const statusIconMapper = {
|
|
13
14
|
[MessageStatus.READ]: CheckmarkDoneSharp,
|
|
14
15
|
[MessageStatus.PENDING]: MdTime,
|
|
@@ -52,10 +53,11 @@ export const chatListItemsProps = Object.assign(Object.assign({}, useTheme.props
|
|
|
52
53
|
export default defineComponent({
|
|
53
54
|
name: 'ChatListItems',
|
|
54
55
|
props: chatListItemsProps,
|
|
55
|
-
|
|
56
|
-
|
|
56
|
+
setup(props, { slots }) {
|
|
57
|
+
var _a;
|
|
58
|
+
const UChat = inject(chatInjectionKey, null);
|
|
57
59
|
const { mergedClsPrefixRef } = useConfig(props);
|
|
58
|
-
const themeRef = useTheme('Chat', '-chat', style, chatLight, props, mergedClsPrefixRef);
|
|
60
|
+
const themeRef = (_a = UChat === null || UChat === void 0 ? void 0 : UChat.mergedThemeRef) !== null && _a !== void 0 ? _a : useTheme('Chat', '-chat', style, chatLight, props, mergedClsPrefixRef);
|
|
59
61
|
const { localeRef } = useLocale('Chat');
|
|
60
62
|
const cssVarsRef = computed(() => {
|
|
61
63
|
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;
|
|
@@ -86,7 +88,6 @@ export default defineComponent({
|
|
|
86
88
|
const mergedTypingTextRef = computed(() => { var _a; return (_a = props.typingText) !== null && _a !== void 0 ? _a : localeRef.value.typingText; });
|
|
87
89
|
const handleChatSelect = (chatId) => {
|
|
88
90
|
var _a;
|
|
89
|
-
emit('chat-select', chatId);
|
|
90
91
|
(_a = props.onChatSelect) === null || _a === void 0 ? void 0 : _a.call(props, chatId);
|
|
91
92
|
};
|
|
92
93
|
const renderChatItem = (item) => {
|
|
@@ -101,7 +102,7 @@ export default defineComponent({
|
|
|
101
102
|
`${mergedClsPrefixRef.value}-chat-sidebar__item--selected`,
|
|
102
103
|
isTyping && `${mergedClsPrefixRef.value}-chat-sidebar__item--typing`
|
|
103
104
|
] }, {
|
|
104
|
-
prefix: () => (h(UAvatar, Object.assign({ size: "medium", src: typeof item.avatar === 'string' ? item.avatar : undefined }, props.avatarProps), {
|
|
105
|
+
prefix: () => (h(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 }), {
|
|
105
106
|
default: () => {
|
|
106
107
|
var _a;
|
|
107
108
|
return typeof item.avatar === 'function'
|
|
@@ -141,13 +142,14 @@ export default defineComponent({
|
|
|
141
142
|
statusIconMapper[item.messageStatus] ? (h(UIcon, { size: 16, component: statusIconMapper[item.messageStatus], class: [
|
|
142
143
|
`${mergedClsPrefixRef.value}-chat-sidebar__item-status-icon`,
|
|
143
144
|
`${mergedClsPrefixRef.value}-chat-sidebar__item-status-icon--${item.messageStatus}`
|
|
144
|
-
] })) : null),
|
|
145
|
-
!lastMessageIsOwn && hasUnreadIncoming && (h(UBadge, Object.assign({ value: displayUnreadCount }, props.badgeProps))))));
|
|
145
|
+
], theme: themeRef.value.peers.Icon, themeOverrides: themeRef.value.peerOverrides.Icon })) : null),
|
|
146
|
+
!lastMessageIsOwn && hasUnreadIncoming && (h(UBadge, Object.assign({ value: displayUnreadCount }, props.badgeProps, { theme: themeRef.value.peers.Badge, themeOverrides: themeRef.value.peerOverrides.Badge }))))));
|
|
146
147
|
}
|
|
147
148
|
}));
|
|
148
149
|
};
|
|
149
150
|
return {
|
|
150
151
|
mergedClsPrefixRef,
|
|
152
|
+
mergedTheme: themeRef,
|
|
151
153
|
renderChatItem,
|
|
152
154
|
cssVars: cssVarsRef,
|
|
153
155
|
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
@@ -161,16 +163,18 @@ export default defineComponent({
|
|
|
161
163
|
const content = (() => {
|
|
162
164
|
var _a;
|
|
163
165
|
if (this.loading) {
|
|
164
|
-
return (h(UList, { loading: true }, {
|
|
166
|
+
return (h(UList, { loading: true, theme: this.mergedTheme.peers.List, themeOverrides: this.mergedTheme.peerOverrides.List }, {
|
|
165
167
|
default: () => Array.from({ length: this.loadingCount || 10 }).map((_, index) => (h(UListItem, { key: index, avatar: { icon: PersonOutline }, description: { text: 'Loading...' }, header: { text: 'Loading...' } })))
|
|
166
168
|
}));
|
|
167
169
|
}
|
|
168
170
|
if ((_a = this.chatItems) === null || _a === void 0 ? void 0 : _a.length) {
|
|
169
|
-
return (h(UList, { showIcon: false }, {
|
|
171
|
+
return (h(UList, { showIcon: false, theme: this.mergedTheme.peers.List, themeOverrides: this.mergedTheme.peerOverrides.List }, {
|
|
170
172
|
default: () => { var _a; return (_a = this.chatItems) === null || _a === void 0 ? void 0 : _a.map((item) => renderChatItem(item)); }
|
|
171
173
|
}));
|
|
172
174
|
}
|
|
173
|
-
return h(
|
|
175
|
+
return (h(UFlex, { justify: "center", align: "center", vertical: true }, {
|
|
176
|
+
default: () => (h(UEmpty, Object.assign({}, this.emptyProps, { theme: this.mergedTheme.peers.Empty, themeOverrides: this.mergedTheme.peerOverrides.Empty })))
|
|
177
|
+
}));
|
|
174
178
|
})();
|
|
175
179
|
return (h("div", { class: [`${mergedClsPrefixRef}-chat`, this.themeClass], style: this.cssVars },
|
|
176
180
|
h("div", { class: `${mergedClsPrefixRef}-chat-sidebar`, style: {
|