@uzum-tech/ui 2.4.0 → 2.4.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 +173 -76
- package/dist/index.mjs +174 -77
- package/dist/index.prod.js +3 -3
- package/dist/index.prod.mjs +3 -3
- package/es/_utils/index.d.ts +1 -1
- package/es/_utils/index.mjs +1 -1
- package/es/_utils/markdown/constants.d.ts +1 -0
- package/es/_utils/markdown/constants.mjs +1 -0
- package/es/_utils/markdown/index.d.ts +1 -1
- package/es/_utils/markdown/index.mjs +1 -1
- package/es/_utils/markdown/render-markdown.d.ts +3 -0
- package/es/_utils/markdown/render-markdown.mjs +18 -3
- package/es/_utils/vue/index.d.ts +1 -0
- package/es/_utils/vue/index.mjs +1 -0
- package/es/_utils/vue/resolve-reactive.d.ts +3 -0
- package/es/_utils/vue/resolve-reactive.mjs +9 -0
- package/es/chat/src/ChatListItems.mjs +16 -11
- package/es/chat/src/ChatMainArea.mjs +2 -1
- package/es/chat/src/ChatMessages.d.ts +1 -1
- package/es/chat/src/ChatMessages.mjs +6 -5
- package/es/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.mjs +1 -2
- package/es/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.mjs +2 -1
- package/es/chat/src/ChatParts/ChatHeader/ChatHeader.mjs +3 -6
- package/es/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.mjs +2 -1
- package/es/chat/src/interface.d.ts +17 -34
- package/es/chat/src/styles/index.cssr.mjs +11 -12
- package/es/chat/styles/light.mjs +2 -1
- package/es/chat/tests/utils/constants.d.ts +12 -0
- package/es/chat/tests/utils/constants.mjs +12 -0
- package/es/chat/tests/utils/create-chat-item-mock.d.ts +2 -0
- package/es/chat/tests/utils/create-chat-item-mock.mjs +9 -0
- package/es/chat/tests/utils/create-chat-message-mock.d.ts +2 -0
- package/es/chat/tests/utils/create-chat-message-mock.mjs +13 -0
- package/es/components.d.ts +87 -4
- package/es/config-provider/src/ConfigProvider.mjs +6 -2
- package/es/editor/index.d.ts +1 -1
- package/es/editor/src/Editor.d.ts +26 -0
- package/es/editor/src/Editor.mjs +25 -3
- package/es/editor/src/EditorParts/EditorContent/EditorContent.d.ts +24 -0
- package/es/editor/src/EditorParts/EditorContent/interface.d.ts +12 -0
- package/es/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +24 -0
- package/es/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.mjs +2 -0
- package/es/editor/src/EditorParts/EditorToolbar/interface.d.ts +12 -0
- package/es/editor/src/EditorParts/SendButton/SendButton.mjs +3 -1
- package/es/editor/src/composables/use-editor-css-vars.mjs +8 -0
- package/es/editor/src/extensions.d.ts +1 -1
- package/es/editor/src/extensions.mjs +8 -2
- package/es/editor/src/interface.d.ts +19 -1
- package/es/editor/src/interface.mjs +1 -0
- package/es/editor/src/styles/index.cssr.mjs +14 -2
- package/es/editor/styles/dark.d.ts +4 -0
- package/es/editor/styles/light.d.ts +8 -0
- package/es/editor/styles/light.mjs +4 -0
- package/es/locales/common/enUS.d.ts +1 -0
- package/es/locales/common/enUS.mjs +1 -0
- package/es/locales/common/ruRU.mjs +6 -7
- package/es/locales/common/uzUZ.mjs +1 -0
- package/es/locales/common/zhCN.mjs +1 -0
- package/es/locales/utils/date-locale.d.ts +2 -0
- package/es/locales/utils/date-locale.mjs +8 -0
- package/es/message-bubble/src/MessageBubble.d.ts +19 -10
- package/es/message-bubble/src/MessageBubble.mjs +21 -24
- package/es/message-bubble/src/interface.d.ts +9 -5
- package/es/message-bubble/src/interface.mjs +7 -3
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/_utils/index.d.ts +1 -1
- package/lib/_utils/index.js +3 -1
- package/lib/_utils/markdown/constants.d.ts +1 -0
- package/lib/_utils/markdown/constants.js +2 -1
- package/lib/_utils/markdown/index.d.ts +1 -1
- package/lib/_utils/markdown/index.js +4 -1
- package/lib/_utils/markdown/render-markdown.d.ts +3 -0
- package/lib/_utils/markdown/render-markdown.js +20 -2
- package/lib/_utils/vue/index.d.ts +1 -0
- package/lib/_utils/vue/index.js +4 -1
- package/lib/_utils/vue/resolve-reactive.d.ts +3 -0
- package/lib/_utils/vue/resolve-reactive.js +17 -0
- package/lib/chat/src/ChatListItems.js +20 -17
- package/lib/chat/src/ChatMainArea.js +2 -2
- package/lib/chat/src/ChatMessages.d.ts +1 -1
- package/lib/chat/src/ChatMessages.js +6 -5
- package/lib/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.js +2 -2
- package/lib/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.js +4 -1
- package/lib/chat/src/ChatParts/ChatHeader/ChatHeader.js +2 -2
- package/lib/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.js +2 -2
- package/lib/chat/src/interface.d.ts +17 -34
- package/lib/chat/src/styles/index.cssr.js +11 -12
- package/lib/chat/styles/light.js +3 -1
- package/lib/chat/tests/utils/constants.d.ts +12 -0
- package/lib/chat/tests/utils/constants.js +15 -0
- package/lib/chat/tests/utils/create-chat-item-mock.d.ts +2 -0
- package/lib/chat/tests/utils/create-chat-item-mock.js +10 -0
- package/lib/chat/tests/utils/create-chat-message-mock.d.ts +2 -0
- package/lib/chat/tests/utils/create-chat-message-mock.js +14 -0
- package/lib/components.d.ts +87 -4
- package/lib/config-provider/src/ConfigProvider.js +7 -4
- package/lib/editor/index.d.ts +1 -1
- package/lib/editor/src/Editor.d.ts +28 -2
- package/lib/editor/src/Editor.js +22 -2
- package/lib/editor/src/EditorParts/EditorContent/EditorContent.d.ts +24 -0
- package/lib/editor/src/EditorParts/EditorContent/interface.d.ts +12 -0
- package/lib/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +24 -0
- package/lib/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.js +1 -1
- package/lib/editor/src/EditorParts/EditorToolbar/interface.d.ts +12 -0
- package/lib/editor/src/EditorParts/SendButton/SendButton.js +1 -1
- package/lib/editor/src/composables/use-editor-css-vars.js +5 -1
- package/lib/editor/src/extensions.d.ts +1 -1
- package/lib/editor/src/extensions.js +8 -3
- package/lib/editor/src/interface.d.ts +19 -1
- package/lib/editor/src/interface.js +1 -1
- package/lib/editor/src/styles/index.cssr.js +14 -2
- package/lib/editor/styles/dark.d.ts +4 -0
- package/lib/editor/styles/light.d.ts +8 -0
- package/lib/editor/styles/light.js +4 -0
- package/lib/locales/common/enUS.d.ts +1 -0
- package/lib/locales/common/enUS.js +1 -0
- package/lib/locales/common/ruRU.js +6 -7
- package/lib/locales/common/uzUZ.js +1 -0
- package/lib/locales/common/zhCN.js +1 -0
- package/lib/locales/utils/date-locale.d.ts +2 -0
- package/lib/locales/utils/date-locale.js +14 -0
- package/lib/message-bubble/src/MessageBubble.d.ts +19 -10
- package/lib/message-bubble/src/MessageBubble.js +26 -25
- package/lib/message-bubble/src/interface.d.ts +9 -5
- package/lib/message-bubble/src/interface.js +6 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +26 -9
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, getCurrentInstance, ref, h as h$1, inject, computed, shallowRef, readonly, watch, onMounted, onBeforeUnmount, onBeforeMount, reactive, onActivated, onDeactivated, createTextVNode, Fragment as Fragment$1, Comment, provide, withDirectives, Teleport, toRef, nextTick, renderSlot, mergeProps, vShow, isVNode, watchEffect, Transition, TransitionGroup, useId, shallowReadonly, toValue, getCurrentScope, onScopeDispose, unref, toRaw, cloneVNode, Text as Text$2, onUnmounted, onBeforeUpdate, onUpdated, normalizeStyle, isReactive, toRefs, warn as warn$4, markRaw, customRef, isProxy, renderList, createApp } from 'vue';
|
|
1
|
+
import { defineComponent, getCurrentInstance, ref, h as h$1, inject, computed, shallowRef, readonly, watch, onMounted, onBeforeUnmount, onBeforeMount, reactive, onActivated, onDeactivated, createTextVNode, Fragment as Fragment$1, Comment, provide, withDirectives, Teleport, toRef, nextTick, renderSlot, mergeProps, vShow, isRef, isVNode, watchEffect, Transition, TransitionGroup, useId, shallowReadonly, toValue, getCurrentScope, onScopeDispose, unref, toRaw, cloneVNode, Text as Text$2, onUnmounted, onBeforeUpdate, onUpdated, normalizeStyle, isReactive, toRefs, warn as warn$4, markRaw, customRef, isProxy, renderList, createApp } from 'vue';
|
|
2
2
|
|
|
3
3
|
function UzumUiResolver() {
|
|
4
4
|
return {
|
|
@@ -11102,6 +11102,15 @@ function render$2(r, ...args) {
|
|
|
11102
11102
|
}
|
|
11103
11103
|
}
|
|
11104
11104
|
|
|
11105
|
+
function resolveReactiveContent(content) {
|
|
11106
|
+
const value = isRef(content) ? content.value : typeof content === "function" ? content() : content;
|
|
11107
|
+
return value instanceof Date ? value.toString() : value;
|
|
11108
|
+
}
|
|
11109
|
+
function resolveReactiveText(content) {
|
|
11110
|
+
const value = resolveReactiveContent(content);
|
|
11111
|
+
return typeof value === "string" ? value : "";
|
|
11112
|
+
}
|
|
11113
|
+
|
|
11105
11114
|
function ensureValidVNode(vnodes) {
|
|
11106
11115
|
return vnodes.some(child => {
|
|
11107
11116
|
if (!isVNode(child)) {
|
|
@@ -11437,6 +11446,7 @@ const enUS$1 = {
|
|
|
11437
11446
|
uploading: "Uploading"
|
|
11438
11447
|
},
|
|
11439
11448
|
Editor: {
|
|
11449
|
+
placeholder: "Type a message...",
|
|
11440
11450
|
sendTooltip: "Send",
|
|
11441
11451
|
boldTooltip: "Bold",
|
|
11442
11452
|
strikethroughTooltip: "Strikethrough",
|
|
@@ -11522,17 +11532,15 @@ const ruRu = {
|
|
|
11522
11532
|
datePlaceholder: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0434\u0430\u0442\u0443",
|
|
11523
11533
|
datetimePlaceholder: "\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0434\u0430\u0442\u0443 \u0438 \u0432\u0440\u0435\u043C\u044F",
|
|
11524
11534
|
monthPlaceholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043C\u0435\u0441\u044F\u0446",
|
|
11525
|
-
|
|
11526
|
-
|
|
11527
|
-
|
|
11528
|
-
weekPlaceholder: "Select Week",
|
|
11535
|
+
yearPlaceholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0433\u043E\u0434",
|
|
11536
|
+
quarterPlaceholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043A\u0432\u0430\u0440\u0442\u0430\u043B",
|
|
11537
|
+
weekPlaceholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u0435\u0434\u0435\u043B\u044E",
|
|
11529
11538
|
startDatePlaceholder: "\u0414\u0430\u0442\u0430 \u043D\u0430\u0447\u0430\u043B\u0430",
|
|
11530
11539
|
endDatePlaceholder: "\u0414\u0430\u0442\u0430 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F",
|
|
11531
11540
|
startDatetimePlaceholder: "\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F \u043D\u0430\u0447\u0430\u043B\u0430",
|
|
11532
11541
|
endDatetimePlaceholder: "\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F",
|
|
11533
|
-
|
|
11534
|
-
|
|
11535
|
-
endMonthPlaceholder: "End Month",
|
|
11542
|
+
startMonthPlaceholder: "\u041C\u0435\u0441\u044F\u0446 \u043D\u0430\u0447\u0430\u043B\u0430",
|
|
11543
|
+
endMonthPlaceholder: "\u041C\u0435\u0441\u044F\u0446 \u043E\u043A\u043E\u043D\u0447\u0430\u043D\u0438\u044F",
|
|
11536
11544
|
monthBeforeYear: true,
|
|
11537
11545
|
firstDayOfWeek: 0,
|
|
11538
11546
|
today: "\u0421\u0435\u0433\u043E\u0434\u043D\u044F"
|
|
@@ -11626,6 +11634,7 @@ const ruRu = {
|
|
|
11626
11634
|
uploading: "\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044F"
|
|
11627
11635
|
},
|
|
11628
11636
|
Editor: {
|
|
11637
|
+
placeholder: "\u041D\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435...",
|
|
11629
11638
|
sendTooltip: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C",
|
|
11630
11639
|
boldTooltip: "\u0416\u0438\u0440\u043D\u044B\u0439",
|
|
11631
11640
|
strikethroughTooltip: "\u0417\u0430\u0447\u0451\u0440\u043A\u043D\u0443\u0442\u044B\u0439",
|
|
@@ -11810,6 +11819,7 @@ const uzUZ = {
|
|
|
11810
11819
|
uploading: "Yuklanmoqda"
|
|
11811
11820
|
},
|
|
11812
11821
|
Editor: {
|
|
11822
|
+
placeholder: "Xabar yozing...",
|
|
11813
11823
|
sendTooltip: "Yuborish",
|
|
11814
11824
|
boldTooltip: "Qalin",
|
|
11815
11825
|
strikethroughTooltip: "Chizib o'tilgan",
|
|
@@ -11994,6 +12004,7 @@ const zhCN$1 = {
|
|
|
11994
12004
|
uploading: "\u4E0A\u4F20\u4E2D"
|
|
11995
12005
|
},
|
|
11996
12006
|
Editor: {
|
|
12007
|
+
placeholder: "\u8F93\u5165\u6D88\u606F...",
|
|
11997
12008
|
sendTooltip: "\u53D1\u9001",
|
|
11998
12009
|
boldTooltip: "\u52A0\u7C97",
|
|
11999
12010
|
strikethroughTooltip: "\u5220\u9664\u7EBF",
|
|
@@ -45879,7 +45890,6 @@ const chatInputLight = {
|
|
|
45879
45890
|
...originalInputSelf,
|
|
45880
45891
|
color: elementsTertiary,
|
|
45881
45892
|
colorFocus: elementsTertiary,
|
|
45882
|
-
heightMedium: "45px",
|
|
45883
45893
|
border: "none",
|
|
45884
45894
|
borderFocus: "none",
|
|
45885
45895
|
borderHover: "none",
|
|
@@ -45977,6 +45987,8 @@ function createSendButtonThemeOverrides(themeVars) {
|
|
|
45977
45987
|
colorPressed: "transparent",
|
|
45978
45988
|
colorFocus: "transparent",
|
|
45979
45989
|
colorDisabled: "transparent",
|
|
45990
|
+
rippleColor: themeVars.sendButtonRippleColor,
|
|
45991
|
+
waveOpacity: themeVars.sendButtonWaveOpacity,
|
|
45980
45992
|
textColor: themeVars.sendButtonColor,
|
|
45981
45993
|
textColorHover: themeVars.sendButtonColor,
|
|
45982
45994
|
textColorPressed: themeVars.sendButtonColor,
|
|
@@ -51609,6 +51621,7 @@ function createClampHeadingRule(maxLevel) {
|
|
|
51609
51621
|
};
|
|
51610
51622
|
}
|
|
51611
51623
|
|
|
51624
|
+
const MARKDOWN_OPTIONS_KEYS_SEPARATOR = "|";
|
|
51612
51625
|
const HTML_COMMENT_REGEX = /<!--[\s\S]*?-->/g;
|
|
51613
51626
|
const HTML_CDATA_REGEX = /<!\[CDATA\[[\s\S]*?\]\]>/g;
|
|
51614
51627
|
const HTML_RAW_BLOCK_REGEX = /<(script|style|iframe|object|embed|template|svg|math|noscript)\b[^>]*>[\s\S]*?<\/\1\s*>/gi;
|
|
@@ -51796,12 +51809,21 @@ function normalizeOptions(options) {
|
|
|
51796
51809
|
breaks: options?.breaks ?? true
|
|
51797
51810
|
};
|
|
51798
51811
|
}
|
|
51812
|
+
function getMarkdownOptionsKey(options) {
|
|
51813
|
+
const tags = {
|
|
51814
|
+
features: [...new Set(options.features)].sort().join(","),
|
|
51815
|
+
maxHeadingLevel: String(options.maxHeadingLevel),
|
|
51816
|
+
breaks: options.breaks ? "1" : "0"
|
|
51817
|
+
};
|
|
51818
|
+
return [tags.features, tags.maxHeadingLevel, tags.breaks].join(MARKDOWN_OPTIONS_KEYS_SEPARATOR);
|
|
51819
|
+
}
|
|
51799
51820
|
function getMarkdownRenderer(options) {
|
|
51800
51821
|
const normalizedOptions = normalizeOptions(options);
|
|
51801
|
-
const
|
|
51822
|
+
const key = getMarkdownOptionsKey(normalizedOptions);
|
|
51823
|
+
const instance = rendererCache.get(key);
|
|
51802
51824
|
if (!instance) {
|
|
51803
51825
|
const renderer = createMarkdownRenderer(normalizedOptions);
|
|
51804
|
-
rendererCache.set(
|
|
51826
|
+
rendererCache.set(key, renderer);
|
|
51805
51827
|
return renderer;
|
|
51806
51828
|
}
|
|
51807
51829
|
return instance;
|
|
@@ -54251,6 +54273,8 @@ function self$M(vars) {
|
|
|
54251
54273
|
toolbarDividerColor: elementsQuaternary,
|
|
54252
54274
|
toolbarButtonColorActive: elementsQuaternary,
|
|
54253
54275
|
toolbarButtonColorHover: elementsQuaternary,
|
|
54276
|
+
toolbarButtonRippleColor: elementsQuaternary,
|
|
54277
|
+
toolbarButtonWaveOpacity: "0.6",
|
|
54254
54278
|
toolbarIconColorDisabled: elementsQuinary,
|
|
54255
54279
|
toolbarIconColorActive: brandPrimary500,
|
|
54256
54280
|
toolbarIconColorHover: textPrimary,
|
|
@@ -54260,6 +54284,8 @@ function self$M(vars) {
|
|
|
54260
54284
|
placeholderColor: textTertiary,
|
|
54261
54285
|
sendButtonColor: brandPrimary400,
|
|
54262
54286
|
sendButtonColorDisabled: elementsQuinary,
|
|
54287
|
+
sendButtonRippleColor: brandPrimary400,
|
|
54288
|
+
sendButtonWaveOpacity: "0.6",
|
|
54263
54289
|
sendButtonIconSize: iconMedium,
|
|
54264
54290
|
blockTypeTriggerHeight: heightMini,
|
|
54265
54291
|
blockTypeTriggerPadding: "0 8px 0 0",
|
|
@@ -58704,11 +58730,11 @@ const messageBubbleProps = {
|
|
|
58704
58730
|
default: false
|
|
58705
58731
|
},
|
|
58706
58732
|
title: {
|
|
58707
|
-
type: [String, Function],
|
|
58733
|
+
type: [String, Object, Function],
|
|
58708
58734
|
default: void 0
|
|
58709
58735
|
},
|
|
58710
58736
|
content: {
|
|
58711
|
-
type: [String, Function],
|
|
58737
|
+
type: [String, Object, Function],
|
|
58712
58738
|
default: void 0
|
|
58713
58739
|
},
|
|
58714
58740
|
markdown: {
|
|
@@ -58719,8 +58745,12 @@ const messageBubbleProps = {
|
|
|
58719
58745
|
type: Object,
|
|
58720
58746
|
default: void 0
|
|
58721
58747
|
},
|
|
58748
|
+
markdownProps: {
|
|
58749
|
+
type: Object,
|
|
58750
|
+
default: void 0
|
|
58751
|
+
},
|
|
58722
58752
|
timestamp: {
|
|
58723
|
-
type: [String, Number, Date, Function],
|
|
58753
|
+
type: [String, Number, Date, Object, Function],
|
|
58724
58754
|
default: void 0
|
|
58725
58755
|
},
|
|
58726
58756
|
status: {
|
|
@@ -60663,8 +60693,14 @@ var _UMessageBubble = defineComponent({
|
|
|
60663
60693
|
status: props.status,
|
|
60664
60694
|
attachments: normalizedAttachmentsRef.value
|
|
60665
60695
|
}));
|
|
60696
|
+
const resolvedContentRef = computed(
|
|
60697
|
+
() => resolveReactiveContent(props.content)
|
|
60698
|
+
);
|
|
60699
|
+
const resolvedTitleRef = computed(
|
|
60700
|
+
() => resolveReactiveContent(props.title)
|
|
60701
|
+
);
|
|
60666
60702
|
const markdownContent = computed(() => {
|
|
60667
|
-
const content =
|
|
60703
|
+
const content = resolvedContentRef.value;
|
|
60668
60704
|
return props.markdown && typeof content === "string" ? content : null;
|
|
60669
60705
|
});
|
|
60670
60706
|
const markdownActive = computed(
|
|
@@ -60753,20 +60789,11 @@ var _UMessageBubble = defineComponent({
|
|
|
60753
60789
|
}
|
|
60754
60790
|
result.push({
|
|
60755
60791
|
key: action.key,
|
|
60756
|
-
label:
|
|
60792
|
+
label: () => resolveReactiveContent(action.label)
|
|
60757
60793
|
});
|
|
60758
60794
|
}
|
|
60759
60795
|
return result;
|
|
60760
60796
|
});
|
|
60761
|
-
const resolveRenderContent = (content) => {
|
|
60762
|
-
if (typeof content === "function") {
|
|
60763
|
-
return content();
|
|
60764
|
-
}
|
|
60765
|
-
if (content instanceof Date) {
|
|
60766
|
-
return content.toString();
|
|
60767
|
-
}
|
|
60768
|
-
return content;
|
|
60769
|
-
};
|
|
60770
60797
|
const getThumbnailUrl = (attachment) => {
|
|
60771
60798
|
const url = [attachment.preview, attachment.thumbnail].find(
|
|
60772
60799
|
(value) => typeof value === "string"
|
|
@@ -60871,10 +60898,10 @@ var _UMessageBubble = defineComponent({
|
|
|
60871
60898
|
const hasBubbleActionsConfig = Boolean(
|
|
60872
60899
|
props.actions && props.actions.length > 0
|
|
60873
60900
|
);
|
|
60874
|
-
const hasTitle = Boolean(
|
|
60901
|
+
const hasTitle = Boolean(resolvedTitleRef.value || slots.title);
|
|
60875
60902
|
const afterContentSlot = slots.afterContent || slots["after-content"];
|
|
60876
60903
|
const hasAfterContent = Boolean(afterContentSlot);
|
|
60877
|
-
const hasVisibleTextContent = markdownActive.value ? markdownHtmlRef.value !== null : Boolean(
|
|
60904
|
+
const hasVisibleTextContent = markdownActive.value ? markdownHtmlRef.value !== null : Boolean(resolvedContentRef.value);
|
|
60878
60905
|
const hasContentInsideBubble = Boolean(
|
|
60879
60906
|
hasVisibleTextContent || slots.default || hasAfterContent || hasTitle || normalizedAttachmentsRef.value.length > 1
|
|
60880
60907
|
);
|
|
@@ -60892,19 +60919,23 @@ var _UMessageBubble = defineComponent({
|
|
|
60892
60919
|
class: `${mergedClsPrefixRef.value}-message-bubble__title`,
|
|
60893
60920
|
variant: "body-l-semi-bold"
|
|
60894
60921
|
},
|
|
60895
|
-
|
|
60922
|
+
{
|
|
60923
|
+
default: () => slots.title ? slots.title(messagePayloadRef.value) : resolvedTitleRef.value
|
|
60924
|
+
}
|
|
60896
60925
|
),
|
|
60897
60926
|
normalizedAttachmentsRef.value.length > 0 && renderAttachment(true),
|
|
60898
60927
|
(hasVisibleTextContent || slots.default) && (slots.default ? /* @__PURE__ */ h$1("div", { class: `${mergedClsPrefixRef.value}-message-bubble__text` }, slots.default(messagePayloadRef.value)) : markdownHtmlRef.value !== null ? /* @__PURE__ */ h$1(
|
|
60899
60928
|
"div",
|
|
60900
60929
|
{
|
|
60930
|
+
...props.markdownProps,
|
|
60901
60931
|
class: [
|
|
60902
60932
|
`${mergedClsPrefixRef.value}-message-bubble__text`,
|
|
60903
|
-
`${mergedClsPrefixRef.value}-message-bubble__markdown
|
|
60933
|
+
`${mergedClsPrefixRef.value}-message-bubble__markdown`,
|
|
60934
|
+
props.markdownProps?.class
|
|
60904
60935
|
],
|
|
60905
60936
|
innerHTML: markdownHtmlRef.value
|
|
60906
60937
|
}
|
|
60907
|
-
) : /* @__PURE__ */ h$1("div", { class: `${mergedClsPrefixRef.value}-message-bubble__text` },
|
|
60938
|
+
) : /* @__PURE__ */ h$1("div", { class: `${mergedClsPrefixRef.value}-message-bubble__text` }, resolvedContentRef.value)),
|
|
60908
60939
|
hasAfterContent && /* @__PURE__ */ h$1(
|
|
60909
60940
|
"div",
|
|
60910
60941
|
{
|
|
@@ -61009,7 +61040,7 @@ var _UMessageBubble = defineComponent({
|
|
|
61009
61040
|
{
|
|
61010
61041
|
class: `${mergedClsPrefixRef.value}-message-bubble__time`
|
|
61011
61042
|
},
|
|
61012
|
-
|
|
61043
|
+
resolveReactiveContent(props.timestamp)
|
|
61013
61044
|
), props.isOwn && props.status && /* @__PURE__ */ h$1(
|
|
61014
61045
|
"div",
|
|
61015
61046
|
{
|
|
@@ -61050,10 +61081,14 @@ var _UMessageBubble = defineComponent({
|
|
|
61050
61081
|
displayMarkdown ? markdownHtmlRef.value && /* @__PURE__ */ h$1(
|
|
61051
61082
|
"span",
|
|
61052
61083
|
{
|
|
61053
|
-
|
|
61084
|
+
...props.markdownProps,
|
|
61085
|
+
class: [
|
|
61086
|
+
`${mergedClsPrefixRef.value}-message-bubble__markdown`,
|
|
61087
|
+
props.markdownProps?.class
|
|
61088
|
+
],
|
|
61054
61089
|
innerHTML: markdownHtmlRef.value
|
|
61055
61090
|
}
|
|
61056
|
-
) :
|
|
61091
|
+
) : resolvedContentRef.value && /* @__PURE__ */ h$1("span", null, resolvedContentRef.value)
|
|
61057
61092
|
);
|
|
61058
61093
|
};
|
|
61059
61094
|
return {
|
|
@@ -61710,6 +61745,7 @@ var style$19 = cB("chat", `
|
|
|
61710
61745
|
padding: 16px 0px;
|
|
61711
61746
|
`), cE("input", `
|
|
61712
61747
|
flex: 1;
|
|
61748
|
+
--u-chat-input-padding-vertical: calc((var(--u-height) - var(--u-line-height-textarea)) / 2);
|
|
61713
61749
|
`, [c$1(".u-input-wrapper", `
|
|
61714
61750
|
flex-wrap: wrap;
|
|
61715
61751
|
padding: 0 4px;
|
|
@@ -61717,34 +61753,32 @@ var style$19 = cB("chat", `
|
|
|
61717
61753
|
`, [c$1(".u-input__prefix", `
|
|
61718
61754
|
width: 100%;
|
|
61719
61755
|
margin: 0;
|
|
61720
|
-
margin-top: 4px;
|
|
61721
61756
|
white-space: wrap;
|
|
61722
|
-
`, [c$1("
|
|
61757
|
+
`, [c$1("&:has(*)", `
|
|
61758
|
+
margin-top: 4px;
|
|
61759
|
+
`), c$1("ul", `
|
|
61723
61760
|
border-top-left-radius: 12px;
|
|
61724
61761
|
border-top-right-radius: 12px;
|
|
61725
61762
|
`), c$1("li", `
|
|
61726
61763
|
padding: 12px;
|
|
61727
|
-
`)]), c$1(".u-input__textarea-el", `
|
|
61728
|
-
padding-top:
|
|
61729
|
-
padding-
|
|
61730
|
-
|
|
61731
|
-
`), c$1(".u-input__placeholder", `
|
|
61732
|
-
padding-top: 12px;
|
|
61764
|
+
`)]), c$1(".u-input__textarea-el, .u-input__textarea-mirror, .u-input__placeholder", `
|
|
61765
|
+
padding-top: var(--u-chat-input-padding-vertical);
|
|
61766
|
+
padding-bottom: var(--u-chat-input-padding-vertical);
|
|
61767
|
+
`), c$1(".u-input__textarea-el, .u-input__placeholder", `
|
|
61733
61768
|
padding-left: 12px;
|
|
61734
61769
|
padding-right: 48px;
|
|
61735
61770
|
`)])]), cE("editing-block", `
|
|
61736
61771
|
width: 100%;
|
|
61737
61772
|
`), cE("input-suffix", `
|
|
61738
61773
|
position: absolute;
|
|
61739
|
-
right:
|
|
61740
|
-
bottom:
|
|
61774
|
+
right: 8px;
|
|
61775
|
+
bottom: 10px;
|
|
61741
61776
|
color: var(--u-input-suffix-color) !important;
|
|
61742
61777
|
cursor: pointer;
|
|
61743
|
-
margin-right: 4px;
|
|
61744
61778
|
`), cE("attach-btn", `
|
|
61745
61779
|
margin-left: 4px;
|
|
61746
61780
|
flex-shrink: 0;
|
|
61747
|
-
padding: 0
|
|
61781
|
+
padding: 0 10px;
|
|
61748
61782
|
`)]), c$1("*", `
|
|
61749
61783
|
box-sizing: border-box;
|
|
61750
61784
|
`), c$1(".u-list-item .u-list-item__text", `
|
|
@@ -61816,7 +61850,6 @@ var ChatAttachmentButton = defineComponent({
|
|
|
61816
61850
|
Button,
|
|
61817
61851
|
{
|
|
61818
61852
|
secondary: true,
|
|
61819
|
-
size: "large",
|
|
61820
61853
|
class: `${mergedClsPrefix}-chat-main__attach-btn`,
|
|
61821
61854
|
disabled: this.mergedDisabled,
|
|
61822
61855
|
theme: mergedTheme.peers.Button,
|
|
@@ -61828,7 +61861,7 @@ var ChatAttachmentButton = defineComponent({
|
|
|
61828
61861
|
default: () => /* @__PURE__ */ h$1(
|
|
61829
61862
|
UIcon$1,
|
|
61830
61863
|
{
|
|
61831
|
-
size:
|
|
61864
|
+
size: 20,
|
|
61832
61865
|
theme: mergedTheme.peers.FooterAttachIcon,
|
|
61833
61866
|
themeOverrides: mergedTheme.peerOverrides.FooterAttachIcon,
|
|
61834
61867
|
...this.mergedIconProps
|
|
@@ -62572,7 +62605,9 @@ var ChatEditingBlock = defineComponent({
|
|
|
62572
62605
|
_UListItem,
|
|
62573
62606
|
{
|
|
62574
62607
|
header: { text: this.mergedTitle },
|
|
62575
|
-
description: {
|
|
62608
|
+
description: {
|
|
62609
|
+
text: resolveReactiveText(this.message?.content)
|
|
62610
|
+
}
|
|
62576
62611
|
},
|
|
62577
62612
|
{
|
|
62578
62613
|
suffix: () => /* @__PURE__ */ h$1(
|
|
@@ -82580,6 +82615,8 @@ function useEditorCssVars(themeRef, themeVarsRef) {
|
|
|
82580
82615
|
toolbarDividerColor,
|
|
82581
82616
|
toolbarButtonColorActive,
|
|
82582
82617
|
toolbarButtonColorHover,
|
|
82618
|
+
toolbarButtonRippleColor,
|
|
82619
|
+
toolbarButtonWaveOpacity,
|
|
82583
82620
|
toolbarIconColorDisabled,
|
|
82584
82621
|
toolbarIconColorActive,
|
|
82585
82622
|
toolbarIconColorHover,
|
|
@@ -82588,6 +82625,8 @@ function useEditorCssVars(themeRef, themeVarsRef) {
|
|
|
82588
82625
|
contentTextColor,
|
|
82589
82626
|
placeholderColor,
|
|
82590
82627
|
sendButtonColor,
|
|
82628
|
+
sendButtonRippleColor,
|
|
82629
|
+
sendButtonWaveOpacity,
|
|
82591
82630
|
blockTypeMenuWidth,
|
|
82592
82631
|
blockTypeMenuColor,
|
|
82593
82632
|
blockTypeMenuBorderColor,
|
|
@@ -82616,6 +82655,8 @@ function useEditorCssVars(themeRef, themeVarsRef) {
|
|
|
82616
82655
|
"--u-editor-toolbar-divider-color": toolbarDividerColor,
|
|
82617
82656
|
"--u-editor-toolbar-button-color-active": toolbarButtonColorActive,
|
|
82618
82657
|
"--u-editor-toolbar-button-color-hover": toolbarButtonColorHover,
|
|
82658
|
+
"--u-editor-toolbar-button-ripple-color": toolbarButtonRippleColor,
|
|
82659
|
+
"--u-editor-toolbar-button-wave-opacity": toolbarButtonWaveOpacity,
|
|
82619
82660
|
"--u-editor-toolbar-icon-color-disabled": toolbarIconColorDisabled,
|
|
82620
82661
|
"--u-editor-toolbar-icon-color-active": toolbarIconColorActive,
|
|
82621
82662
|
"--u-editor-toolbar-icon-color-hover": toolbarIconColorHover,
|
|
@@ -82624,6 +82665,8 @@ function useEditorCssVars(themeRef, themeVarsRef) {
|
|
|
82624
82665
|
"--u-editor-content-text-color": contentTextColor,
|
|
82625
82666
|
"--u-editor-placeholder-color": placeholderColor,
|
|
82626
82667
|
"--u-editor-send-button-color": sendButtonColor,
|
|
82668
|
+
"--u-editor-send-button-ripple-color": sendButtonRippleColor,
|
|
82669
|
+
"--u-editor-send-button-wave-opacity": sendButtonWaveOpacity,
|
|
82627
82670
|
"--u-editor-block-type-menu-width": blockTypeMenuWidth,
|
|
82628
82671
|
"--u-editor-block-type-menu-color": blockTypeMenuColor,
|
|
82629
82672
|
"--u-editor-block-type-menu-border-color": blockTypeMenuBorderColor,
|
|
@@ -82691,6 +82734,7 @@ const editorProps = {
|
|
|
82691
82734
|
type: Array,
|
|
82692
82735
|
default: () => []
|
|
82693
82736
|
},
|
|
82737
|
+
nodeProps: Object,
|
|
82694
82738
|
onSend: [Function, Array],
|
|
82695
82739
|
onFocus: [Function, Array],
|
|
82696
82740
|
onBlur: [Function, Array],
|
|
@@ -82716,10 +82760,14 @@ var style$16 = c$1([cB("editor", `
|
|
|
82716
82760
|
`), cE("toolbar-block-type", `
|
|
82717
82761
|
width: 71px;
|
|
82718
82762
|
`)]), cE("content-wrapper", `
|
|
82763
|
+
position: relative;
|
|
82764
|
+
box-sizing: border-box;
|
|
82719
82765
|
display: flex;
|
|
82720
|
-
align-items:
|
|
82766
|
+
align-items: center;
|
|
82721
82767
|
gap: 8px;
|
|
82722
|
-
|
|
82768
|
+
min-height: 40px;
|
|
82769
|
+
padding: 6px 10px;
|
|
82770
|
+
padding-right: 24px;
|
|
82723
82771
|
border: 2px solid var(--u-editor-border-color);
|
|
82724
82772
|
border-bottom-left-radius: 12px;
|
|
82725
82773
|
border-bottom-right-radius: 12px;
|
|
@@ -82728,6 +82776,10 @@ var style$16 = c$1([cB("editor", `
|
|
|
82728
82776
|
min-width: 0;
|
|
82729
82777
|
height: auto;
|
|
82730
82778
|
`), cE("send-button", `
|
|
82779
|
+
position: absolute;
|
|
82780
|
+
align-items: flex-start;
|
|
82781
|
+
right: 6px;
|
|
82782
|
+
top: 6px;
|
|
82731
82783
|
flex-shrink: 0;
|
|
82732
82784
|
`)]), cE("content", `
|
|
82733
82785
|
white-space: normal;
|
|
@@ -82818,7 +82870,7 @@ var SendButton = defineComponent({
|
|
|
82818
82870
|
...this.buttonProps
|
|
82819
82871
|
},
|
|
82820
82872
|
{
|
|
82821
|
-
icon: () => /* @__PURE__ */ h$1(UIcon$1, { ...this.iconProps }, {
|
|
82873
|
+
icon: () => /* @__PURE__ */ h$1(UIcon$1, { ...this.iconProps, size: 20 }, {
|
|
82822
82874
|
default: () => this.$slots.icon?.() ?? /* @__PURE__ */ h$1(SendFilled, null)
|
|
82823
82875
|
})
|
|
82824
82876
|
}
|
|
@@ -84754,6 +84806,8 @@ function useEditorToolbarCustomization() {
|
|
|
84754
84806
|
colorPressed: themeVars.toolbarButtonColorActive,
|
|
84755
84807
|
colorFocus: active ? themeVars.toolbarButtonColorActive : "transparent",
|
|
84756
84808
|
colorDisabled: "transparent",
|
|
84809
|
+
rippleColor: themeVars.toolbarButtonRippleColor,
|
|
84810
|
+
waveOpacity: themeVars.toolbarButtonWaveOpacity,
|
|
84757
84811
|
textColor: active ? themeVars.toolbarIconColorActive : themeVars.toolbarIconColor,
|
|
84758
84812
|
textColorHover: active ? themeVars.toolbarIconColorActive : themeVars.toolbarIconColorHover,
|
|
84759
84813
|
textColorPressed: themeVars.toolbarIconColorActive,
|
|
@@ -93000,6 +93054,7 @@ function createEditorExtensions({
|
|
|
93000
93054
|
placeholder = "",
|
|
93001
93055
|
markdownOptions,
|
|
93002
93056
|
extensions = [],
|
|
93057
|
+
nodeProps,
|
|
93003
93058
|
maxLength,
|
|
93004
93059
|
onSendShortcut
|
|
93005
93060
|
} = {}) {
|
|
@@ -93018,8 +93073,12 @@ function createEditorExtensions({
|
|
|
93018
93073
|
heading: features.has("heading") && {
|
|
93019
93074
|
levels: headingLevels
|
|
93020
93075
|
},
|
|
93021
|
-
bulletList: features.has("bulletList") && {
|
|
93022
|
-
|
|
93076
|
+
bulletList: features.has("bulletList") && {
|
|
93077
|
+
HTMLAttributes: nodeProps?.bulletList ?? {}
|
|
93078
|
+
},
|
|
93079
|
+
orderedList: features.has("orderedList") && {
|
|
93080
|
+
HTMLAttributes: nodeProps?.orderedList ?? {}
|
|
93081
|
+
},
|
|
93023
93082
|
blockquote: features.has("blockquote") && {},
|
|
93024
93083
|
horizontalRule: features.has("divider") && {},
|
|
93025
93084
|
listItem: lists && {},
|
|
@@ -93124,15 +93183,21 @@ var _UEditor = defineComponent({
|
|
|
93124
93183
|
toRef(props, "value"),
|
|
93125
93184
|
uncontrolledValueRef
|
|
93126
93185
|
);
|
|
93186
|
+
const parserRef = shallowRef();
|
|
93187
|
+
const parserKeyRef = shallowRef();
|
|
93127
93188
|
const serializer = createMarkdownSerializer(props.markdownOptions);
|
|
93128
93189
|
const sourceMarkdownRef = ref(mergedValueRef.value ?? "");
|
|
93129
93190
|
const loadedDocumentRef = ref(null);
|
|
93130
93191
|
const editableRef = computed(() => !props.disabled && !props.readonly);
|
|
93192
|
+
const mergedPlaceholderRef = computed(
|
|
93193
|
+
() => props.placeholder ?? localeRef.value.placeholder
|
|
93194
|
+
);
|
|
93131
93195
|
const editorRef = useEditor({
|
|
93132
93196
|
extensions: createEditorExtensions({
|
|
93133
|
-
placeholder:
|
|
93197
|
+
placeholder: () => mergedPlaceholderRef.value,
|
|
93134
93198
|
markdownOptions: props.markdownOptions,
|
|
93135
93199
|
extensions: props.extensions,
|
|
93200
|
+
nodeProps: props.nodeProps,
|
|
93136
93201
|
maxLength: props.maxLength,
|
|
93137
93202
|
onSendShortcut: props.sendOnEnter ? handleSend : void 0
|
|
93138
93203
|
}),
|
|
@@ -93170,13 +93235,22 @@ var _UEditor = defineComponent({
|
|
|
93170
93235
|
if (props["onUpdate:value"])
|
|
93171
93236
|
call(props["onUpdate:value"], value);
|
|
93172
93237
|
}
|
|
93238
|
+
function getParser(instance) {
|
|
93239
|
+
const normalizedOptions = normalizeOptions(props.markdownOptions);
|
|
93240
|
+
const key = getMarkdownOptionsKey(normalizedOptions);
|
|
93241
|
+
if (!parserRef.value || parserKeyRef.value !== key) {
|
|
93242
|
+
parserKeyRef.value = key;
|
|
93243
|
+
parserRef.value = createMarkdownParser(
|
|
93244
|
+
instance.schema,
|
|
93245
|
+
props.markdownOptions
|
|
93246
|
+
);
|
|
93247
|
+
}
|
|
93248
|
+
return parserRef.value;
|
|
93249
|
+
}
|
|
93173
93250
|
function setMarkdown(markdown, instance = editorRef.value, addToHistory = true) {
|
|
93174
93251
|
if (!instance)
|
|
93175
93252
|
return;
|
|
93176
|
-
const document =
|
|
93177
|
-
instance.schema,
|
|
93178
|
-
props.markdownOptions
|
|
93179
|
-
).parse(markdown);
|
|
93253
|
+
const document = getParser(instance).parse(markdown);
|
|
93180
93254
|
sourceMarkdownRef.value = markdown;
|
|
93181
93255
|
loadedDocumentRef.value = document;
|
|
93182
93256
|
instance.chain().setMeta("addToHistory", addToHistory).setContent(document.toJSON(), { emitUpdate: false }).run();
|
|
@@ -93206,6 +93280,12 @@ var _UEditor = defineComponent({
|
|
|
93206
93280
|
watch(editableRef, (editable) => {
|
|
93207
93281
|
editorRef.value?.setEditable(editable);
|
|
93208
93282
|
});
|
|
93283
|
+
watch(mergedPlaceholderRef, () => {
|
|
93284
|
+
const editor = editorRef.value;
|
|
93285
|
+
if (!editor)
|
|
93286
|
+
return;
|
|
93287
|
+
editor.view.dispatch(editor.state.tr.setMeta("addToHistory", false));
|
|
93288
|
+
});
|
|
93209
93289
|
function focus() {
|
|
93210
93290
|
editorRef.value?.commands.focus();
|
|
93211
93291
|
}
|
|
@@ -93488,6 +93568,7 @@ var ChatLegacyInput = defineComponent({
|
|
|
93488
93568
|
UInput$1,
|
|
93489
93569
|
{
|
|
93490
93570
|
ref: "inputInstRef",
|
|
93571
|
+
size: "small",
|
|
93491
93572
|
value: this.value,
|
|
93492
93573
|
placeholder: this.mergedPlaceholder,
|
|
93493
93574
|
class: `${mergedClsPrefix}-chat-main__input`,
|
|
@@ -93507,7 +93588,7 @@ var ChatLegacyInput = defineComponent({
|
|
|
93507
93588
|
suffix: () => /* @__PURE__ */ h$1(
|
|
93508
93589
|
UIcon$1,
|
|
93509
93590
|
{
|
|
93510
|
-
size:
|
|
93591
|
+
size: 20,
|
|
93511
93592
|
class: `${mergedClsPrefix}-chat-main__input-suffix`,
|
|
93512
93593
|
theme: mergedTheme.peers.FooterSuffixIcon,
|
|
93513
93594
|
themeOverrides: mergedTheme.peerOverrides.FooterSuffixIcon,
|
|
@@ -93837,7 +93918,7 @@ var ChatHeader = defineComponent({
|
|
|
93837
93918
|
render() {
|
|
93838
93919
|
const { mergedClsPrefix, mergedTheme, selectedChat } = this;
|
|
93839
93920
|
const keyId = this.toKeyString(selectedChat?.id);
|
|
93840
|
-
const keyTitle =
|
|
93921
|
+
const keyTitle = resolveReactiveText(selectedChat?.title);
|
|
93841
93922
|
const renderDefaultActions = () => [
|
|
93842
93923
|
/* @__PURE__ */ h$1(_UTooltip, null, {
|
|
93843
93924
|
trigger: () => /* @__PURE__ */ h$1(
|
|
@@ -93923,7 +94004,7 @@ var ChatHeader = defineComponent({
|
|
|
93923
94004
|
themeOverrides: mergedTheme.peerOverrides.Typography
|
|
93924
94005
|
},
|
|
93925
94006
|
{
|
|
93926
|
-
default: () => selectedChat?.title
|
|
94007
|
+
default: () => resolveReactiveContent(selectedChat?.title)
|
|
93927
94008
|
}
|
|
93928
94009
|
), this.typing && /* @__PURE__ */ h$1(
|
|
93929
94010
|
_UText,
|
|
@@ -94146,7 +94227,7 @@ var _UChatMessages = defineComponent({
|
|
|
94146
94227
|
}));
|
|
94147
94228
|
};
|
|
94148
94229
|
const renderDateSeparator = (date) => {
|
|
94149
|
-
return /* @__PURE__ */ h$1("div", { class: `${mergedClsPrefixRef.value}-chat-main__date-separator` }, /* @__PURE__ */ h$1("span", null, date));
|
|
94230
|
+
return /* @__PURE__ */ h$1("div", { class: `${mergedClsPrefixRef.value}-chat-main__date-separator` }, /* @__PURE__ */ h$1("span", null, resolveReactiveContent(date)));
|
|
94150
94231
|
};
|
|
94151
94232
|
const renderUnreadNotification = () => {
|
|
94152
94233
|
const count = props.unreadNotificationCount ?? unreadMessagesCount.value;
|
|
@@ -94328,14 +94409,14 @@ var _UChatMessages = defineComponent({
|
|
|
94328
94409
|
let currentDate = "";
|
|
94329
94410
|
let unreadNotificationInserted = false;
|
|
94330
94411
|
this.messages?.forEach((message, index) => {
|
|
94331
|
-
const
|
|
94332
|
-
if (
|
|
94412
|
+
const messageDateText = resolveReactiveText(message.date);
|
|
94413
|
+
if (messageDateText !== currentDate) {
|
|
94333
94414
|
messagesWithDates.push({
|
|
94334
94415
|
type: "date-separator",
|
|
94335
|
-
date:
|
|
94416
|
+
date: message.date,
|
|
94336
94417
|
id: `date-${String(index)}`
|
|
94337
94418
|
});
|
|
94338
|
-
currentDate =
|
|
94419
|
+
currentDate = messageDateText;
|
|
94339
94420
|
}
|
|
94340
94421
|
if (!unreadNotificationInserted && !message.isOwn && message.status === MessageStatus.UNREAD && this.showUnreadNotification) {
|
|
94341
94422
|
messagesWithDates.push({
|
|
@@ -95035,7 +95116,7 @@ var _UChatMainArea = defineComponent({
|
|
|
95035
95116
|
if (editMessageIdRef) {
|
|
95036
95117
|
editMessageIdRef.value = message.id;
|
|
95037
95118
|
}
|
|
95038
|
-
inputValue.value =
|
|
95119
|
+
inputValue.value = resolveReactiveText(message.content);
|
|
95039
95120
|
attachmentFileList.value = [];
|
|
95040
95121
|
uploadedAttachmentsMap.value.clear();
|
|
95041
95122
|
};
|
|
@@ -95501,10 +95582,9 @@ var _UChatListItems = defineComponent({
|
|
|
95501
95582
|
const renderChatItem = (item) => {
|
|
95502
95583
|
const isSelected = props.selectedChatId === item.id;
|
|
95503
95584
|
const isTyping = props.typingChatIds?.includes(item.id) ?? false;
|
|
95504
|
-
const
|
|
95505
|
-
const
|
|
95506
|
-
const
|
|
95507
|
-
const keySubtitle = toKeyString(subtitle);
|
|
95585
|
+
const keyId = toKeyString(item.id);
|
|
95586
|
+
const keyTitle = resolveReactiveText(item.title);
|
|
95587
|
+
const keySubtitle = resolveReactiveText(item.subtitle);
|
|
95508
95588
|
return /* @__PURE__ */ h$1(
|
|
95509
95589
|
_UListItem,
|
|
95510
95590
|
{
|
|
@@ -95540,7 +95620,10 @@ var _UChatListItems = defineComponent({
|
|
|
95540
95620
|
variant: "body-l-medium"
|
|
95541
95621
|
},
|
|
95542
95622
|
{
|
|
95543
|
-
default: () =>
|
|
95623
|
+
default: () => {
|
|
95624
|
+
const title = resolveReactiveContent(item.title);
|
|
95625
|
+
return typeof title === "string" ? sanitizeMarkdown(title) : title;
|
|
95626
|
+
}
|
|
95544
95627
|
}
|
|
95545
95628
|
),
|
|
95546
95629
|
description: () => /* @__PURE__ */ h$1(
|
|
@@ -95553,7 +95636,13 @@ var _UChatListItems = defineComponent({
|
|
|
95553
95636
|
variant: "body-m-medium"
|
|
95554
95637
|
},
|
|
95555
95638
|
{
|
|
95556
|
-
default: () =>
|
|
95639
|
+
default: () => {
|
|
95640
|
+
if (isTyping) {
|
|
95641
|
+
return mergedTypingTextRef.value;
|
|
95642
|
+
}
|
|
95643
|
+
const subTitle = resolveReactiveContent(item.subtitle);
|
|
95644
|
+
return typeof subTitle === "string" ? sanitizeMarkdown(subTitle) : subTitle;
|
|
95645
|
+
}
|
|
95557
95646
|
}
|
|
95558
95647
|
),
|
|
95559
95648
|
suffix: () => {
|
|
@@ -95570,7 +95659,7 @@ var _UChatListItems = defineComponent({
|
|
|
95570
95659
|
{
|
|
95571
95660
|
class: `${mergedClsPrefixRef.value}-chat-sidebar__item-time`
|
|
95572
95661
|
},
|
|
95573
|
-
item.datetime
|
|
95662
|
+
resolveReactiveContent(item.datetime)
|
|
95574
95663
|
), /* @__PURE__ */ h$1(
|
|
95575
95664
|
"div",
|
|
95576
95665
|
{
|
|
@@ -98910,6 +98999,11 @@ var UColorPicker$1 = defineComponent({
|
|
|
98910
98999
|
}
|
|
98911
99000
|
});
|
|
98912
99001
|
|
|
99002
|
+
const dateLocales = [dateEnUs, dateRuRU, dateUzUZ, dateZhCN];
|
|
99003
|
+
function resolveDateLocale(name) {
|
|
99004
|
+
return dateLocales.find(dateLocale => dateLocale.name === name);
|
|
99005
|
+
}
|
|
99006
|
+
|
|
98913
99007
|
const configProviderProps = {
|
|
98914
99008
|
abstract: Boolean,
|
|
98915
99009
|
bordered: {
|
|
@@ -99210,10 +99304,13 @@ var UConfigProvider$1 = defineComponent({
|
|
|
99210
99304
|
}),
|
|
99211
99305
|
mergedDateLocaleRef: computed(() => {
|
|
99212
99306
|
const {
|
|
99213
|
-
dateLocale
|
|
99307
|
+
dateLocale,
|
|
99308
|
+
locale
|
|
99214
99309
|
} = props;
|
|
99215
99310
|
if (dateLocale === null) return;
|
|
99216
|
-
|
|
99311
|
+
if (dateLocale !== void 0) return dateLocale;
|
|
99312
|
+
if (locale !== void 0) return locale === null ? void 0 : resolveDateLocale(locale.name);
|
|
99313
|
+
return UConfigProvider?.mergedDateLocaleRef.value;
|
|
99217
99314
|
}),
|
|
99218
99315
|
mergedHljsRef: computed(() => {
|
|
99219
99316
|
const {
|
|
@@ -154676,7 +154773,7 @@ function useThemeVars() {
|
|
|
154676
154773
|
});
|
|
154677
154774
|
}
|
|
154678
154775
|
|
|
154679
|
-
var version = "2.4.
|
|
154776
|
+
var version = "2.4.2";
|
|
154680
154777
|
|
|
154681
154778
|
function create({
|
|
154682
154779
|
componentPrefix = "U",
|