@uzum-tech/ui 2.4.1 → 2.4.3
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 +243 -74
- package/dist/index.mjs +244 -75
- package/dist/index.prod.js +3 -3
- package/dist/index.prod.mjs +3 -3
- package/es/_internal/selection/src/Selection.d.ts +27 -0
- package/es/_internal/selection/src/Selection.mjs +54 -26
- package/es/_internal/selection/src/SelectionParts/CounterPlaceholder/CounterPlaceholder.d.ts +35 -0
- package/es/_internal/selection/src/SelectionParts/CounterPlaceholder/CounterPlaceholder.mjs +15 -0
- package/es/_internal/selection/src/SelectionParts/CounterPlaceholder/counter-placeholder.types.d.ts +17 -0
- package/es/_internal/selection/src/SelectionParts/CounterPlaceholder/counter-placeholder.types.mjs +16 -0
- package/es/_internal/selection/src/styles/index.cssr.mjs +45 -4
- package/es/_internal/selection/styles/light.d.ts +6 -0
- package/es/_internal/selection/styles/light.mjs +3 -0
- 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/cascader/src/Cascader.d.ts +30 -0
- package/es/cascader/src/CascaderMenu.d.ts +6 -0
- package/es/cascader/src/CascaderOption.d.ts +6 -0
- package/es/cascader/src/CascaderSelectMenu.d.ts +6 -0
- package/es/cascader/src/CascaderSubmenu.d.ts +6 -0
- package/es/cascader/styles/light.d.ts +3 -0
- package/es/chat/src/Chat.d.ts +132 -0
- package/es/chat/src/ChatListItems.d.ts +45 -0
- package/es/chat/src/ChatListItems.mjs +16 -11
- package/es/chat/src/ChatMainArea.d.ts +45 -0
- package/es/chat/src/ChatMainArea.mjs +2 -1
- package/es/chat/src/ChatMessages.d.ts +46 -1
- package/es/chat/src/ChatMessages.mjs +6 -5
- package/es/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.d.ts +36 -0
- package/es/chat/src/ChatParts/ChatAttachmentButton/interface.d.ts +9 -0
- package/es/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.d.ts +36 -0
- package/es/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.mjs +2 -1
- package/es/chat/src/ChatParts/ChatEditingBlock/interface.d.ts +9 -0
- package/es/chat/src/ChatParts/ChatHeader/ChatHeader.d.ts +36 -0
- package/es/chat/src/ChatParts/ChatHeader/ChatHeader.mjs +3 -6
- package/es/chat/src/ChatParts/ChatHeader/interface.d.ts +9 -0
- package/es/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.d.ts +36 -0
- package/es/chat/src/ChatParts/ChatLegacyInput/interface.d.ts +9 -0
- package/es/chat/src/ChatParts/Sidebar.d.ts +12 -0
- package/es/chat/src/interface.d.ts +26 -34
- package/es/chat/styles/dark.d.ts +3 -0
- package/es/chat/styles/light.d.ts +3 -0
- 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 +457 -4
- package/es/data-table/src/DataTable.d.ts +24 -0
- package/es/data-table/src/HeaderButton/FilterButton.d.ts +12 -0
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +12 -0
- package/es/data-table/src/TableParts/Body.d.ts +12 -0
- package/es/data-table/src/TableParts/Header.d.ts +12 -0
- package/es/data-table/src/interface.d.ts +9 -0
- package/es/data-table/styles/light.d.ts +3 -0
- package/es/date-picker/src/DatePicker.d.ts +30 -0
- package/es/date-picker/src/panel/date.d.ts +6 -0
- package/es/date-picker/src/panel/daterange.d.ts +6 -0
- package/es/date-picker/src/panel/datetime.d.ts +6 -0
- package/es/date-picker/src/panel/datetimerange.d.ts +6 -0
- package/es/date-picker/src/panel/panelMonth.d.ts +24 -0
- package/es/date-picker/src/panel/panelMonthContent.d.ts +6 -0
- package/es/date-picker/src/panel/panelYear.d.ts +24 -0
- package/es/date-picker/src/panel/panelYearContent.d.ts +6 -0
- package/es/date-picker/src/panel/use-calendar.d.ts +6 -0
- package/es/date-picker/src/panel/use-dual-calendar.d.ts +6 -0
- package/es/date-picker/src/panel/use-panel-common.d.ts +6 -0
- package/es/date-picker/styles/light.d.ts +3 -0
- package/es/date-picker-v2/src/DatePickerV2.d.ts +30 -0
- package/es/date-picker-v2/styles/dark.d.ts +3 -0
- package/es/date-picker-v2/styles/light.d.ts +3 -0
- package/es/editor/src/Editor.d.ts +18 -0
- package/es/editor/src/Editor.mjs +14 -2
- package/es/editor/src/EditorParts/EditorContent/EditorContent.d.ts +18 -0
- package/es/editor/src/EditorParts/EditorContent/interface.d.ts +9 -0
- package/es/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +21 -0
- package/es/editor/src/EditorParts/EditorToolbar/interface.d.ts +9 -0
- package/es/editor/src/interface.d.ts +9 -0
- package/es/editor/styles/dark.d.ts +3 -0
- package/es/editor/styles/light.d.ts +3 -0
- package/es/message-bubble/src/MessageBubble.d.ts +10 -10
- package/es/message-bubble/src/MessageBubble.mjs +13 -17
- package/es/message-bubble/src/interface.d.ts +5 -5
- package/es/message-bubble/src/interface.mjs +3 -3
- package/es/pagination/src/Pagination.d.ts +24 -0
- package/es/pagination/src/interface.d.ts +9 -0
- package/es/pagination/styles/light.d.ts +3 -0
- package/es/select/src/Select.d.ts +24 -0
- package/es/select/src/Select.mjs +2 -1
- package/es/select/src/interface.d.ts +10 -0
- package/es/select/src/interface.mjs +1 -0
- package/es/select/src/styles/index.cssr.mjs +4 -1
- package/es/select/styles/light.d.ts +3 -0
- package/es/tree-select/src/TreeSelect.d.ts +30 -0
- package/es/tree-select/styles/light.d.ts +3 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/_internal/selection/src/Selection.d.ts +27 -0
- package/lib/_internal/selection/src/Selection.js +43 -35
- package/lib/_internal/selection/src/SelectionParts/CounterPlaceholder/CounterPlaceholder.d.ts +35 -0
- package/lib/_internal/selection/src/SelectionParts/CounterPlaceholder/CounterPlaceholder.js +13 -0
- package/lib/_internal/selection/src/SelectionParts/CounterPlaceholder/counter-placeholder.types.d.ts +17 -0
- package/lib/_internal/selection/src/SelectionParts/CounterPlaceholder/counter-placeholder.types.js +19 -0
- package/lib/_internal/selection/src/styles/index.cssr.js +45 -4
- package/lib/_internal/selection/styles/light.d.ts +6 -0
- package/lib/_internal/selection/styles/light.js +3 -0
- 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/cascader/src/Cascader.d.ts +30 -0
- package/lib/cascader/src/CascaderMenu.d.ts +6 -0
- package/lib/cascader/src/CascaderOption.d.ts +6 -0
- package/lib/cascader/src/CascaderSelectMenu.d.ts +6 -0
- package/lib/cascader/src/CascaderSubmenu.d.ts +6 -0
- package/lib/cascader/styles/light.d.ts +3 -0
- package/lib/chat/src/Chat.d.ts +132 -0
- package/lib/chat/src/ChatListItems.d.ts +45 -0
- package/lib/chat/src/ChatListItems.js +20 -17
- package/lib/chat/src/ChatMainArea.d.ts +45 -0
- package/lib/chat/src/ChatMainArea.js +2 -2
- package/lib/chat/src/ChatMessages.d.ts +46 -1
- package/lib/chat/src/ChatMessages.js +6 -5
- package/lib/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.d.ts +36 -0
- package/lib/chat/src/ChatParts/ChatAttachmentButton/interface.d.ts +9 -0
- package/lib/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.d.ts +36 -0
- package/lib/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.js +4 -1
- package/lib/chat/src/ChatParts/ChatEditingBlock/interface.d.ts +9 -0
- package/lib/chat/src/ChatParts/ChatHeader/ChatHeader.d.ts +36 -0
- package/lib/chat/src/ChatParts/ChatHeader/ChatHeader.js +2 -2
- package/lib/chat/src/ChatParts/ChatHeader/interface.d.ts +9 -0
- package/lib/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.d.ts +36 -0
- package/lib/chat/src/ChatParts/ChatLegacyInput/interface.d.ts +9 -0
- package/lib/chat/src/ChatParts/Sidebar.d.ts +12 -0
- package/lib/chat/src/interface.d.ts +26 -34
- package/lib/chat/styles/dark.d.ts +3 -0
- package/lib/chat/styles/light.d.ts +3 -0
- 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 +457 -4
- package/lib/data-table/src/DataTable.d.ts +24 -0
- package/lib/data-table/src/HeaderButton/FilterButton.d.ts +12 -0
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +12 -0
- package/lib/data-table/src/TableParts/Body.d.ts +12 -0
- package/lib/data-table/src/TableParts/Header.d.ts +12 -0
- package/lib/data-table/src/interface.d.ts +9 -0
- package/lib/data-table/styles/light.d.ts +3 -0
- package/lib/date-picker/src/DatePicker.d.ts +30 -0
- package/lib/date-picker/src/panel/date.d.ts +6 -0
- package/lib/date-picker/src/panel/daterange.d.ts +6 -0
- package/lib/date-picker/src/panel/datetime.d.ts +6 -0
- package/lib/date-picker/src/panel/datetimerange.d.ts +6 -0
- package/lib/date-picker/src/panel/panelMonth.d.ts +24 -0
- package/lib/date-picker/src/panel/panelMonthContent.d.ts +6 -0
- package/lib/date-picker/src/panel/panelYear.d.ts +24 -0
- package/lib/date-picker/src/panel/panelYearContent.d.ts +6 -0
- package/lib/date-picker/src/panel/use-calendar.d.ts +6 -0
- package/lib/date-picker/src/panel/use-dual-calendar.d.ts +6 -0
- package/lib/date-picker/src/panel/use-panel-common.d.ts +6 -0
- package/lib/date-picker/styles/light.d.ts +3 -0
- package/lib/date-picker-v2/src/DatePickerV2.d.ts +30 -0
- package/lib/date-picker-v2/styles/dark.d.ts +3 -0
- package/lib/date-picker-v2/styles/light.d.ts +3 -0
- package/lib/editor/src/Editor.d.ts +20 -2
- package/lib/editor/src/Editor.js +13 -1
- package/lib/editor/src/EditorParts/EditorContent/EditorContent.d.ts +18 -0
- package/lib/editor/src/EditorParts/EditorContent/interface.d.ts +9 -0
- package/lib/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +21 -0
- package/lib/editor/src/EditorParts/EditorToolbar/interface.d.ts +9 -0
- package/lib/editor/src/interface.d.ts +9 -0
- package/lib/editor/styles/dark.d.ts +3 -0
- package/lib/editor/styles/light.d.ts +3 -0
- package/lib/message-bubble/src/MessageBubble.d.ts +10 -10
- package/lib/message-bubble/src/MessageBubble.js +15 -19
- package/lib/message-bubble/src/interface.d.ts +5 -5
- package/lib/message-bubble/src/interface.js +3 -3
- package/lib/pagination/src/Pagination.d.ts +24 -0
- package/lib/pagination/src/interface.d.ts +9 -0
- package/lib/pagination/styles/light.d.ts +3 -0
- package/lib/select/src/Select.d.ts +24 -0
- package/lib/select/src/Select.js +5 -2
- package/lib/select/src/interface.d.ts +10 -0
- package/lib/select/src/interface.js +1 -1
- package/lib/select/src/styles/index.cssr.js +3 -0
- package/lib/select/styles/light.d.ts +3 -0
- package/lib/tree-select/src/TreeSelect.d.ts +30 -0
- package/lib/tree-select/styles/light.d.ts +3 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/web-types.json +17 -7
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)) {
|
|
@@ -27912,8 +27921,11 @@ function self$1s(vars) {
|
|
|
27912
27921
|
caretColorSecondary: elementsPrimary,
|
|
27913
27922
|
filterCounterTextColor: textSecondary,
|
|
27914
27923
|
filterCounterTextColorDisabled: textSecondary,
|
|
27924
|
+
filterCounterGap: "8px",
|
|
27925
|
+
filterSuffixWrapperGap: "4px",
|
|
27915
27926
|
arrowColorSecondary: elementsSecondary,
|
|
27916
27927
|
clearColorSecondary: elementsSecondary,
|
|
27928
|
+
loadingColorSecondary: elementsSecondary,
|
|
27917
27929
|
colorSecondary: elementsPrimary,
|
|
27918
27930
|
textColorSecondary: textQuaternary,
|
|
27919
27931
|
borderSecondary: "none",
|
|
@@ -27966,6 +27978,44 @@ cB("base-selection", [cM("rtl", `
|
|
|
27966
27978
|
left: 10px;
|
|
27967
27979
|
`)])]);
|
|
27968
27980
|
|
|
27981
|
+
const counterPlaceholderProps = {
|
|
27982
|
+
clsPrefix: {
|
|
27983
|
+
type: String,
|
|
27984
|
+
required: true
|
|
27985
|
+
},
|
|
27986
|
+
placeholder: {
|
|
27987
|
+
type: String,
|
|
27988
|
+
default: ""
|
|
27989
|
+
},
|
|
27990
|
+
placeholderHidden: {
|
|
27991
|
+
type: Boolean
|
|
27992
|
+
},
|
|
27993
|
+
input: {
|
|
27994
|
+
type: Object
|
|
27995
|
+
}
|
|
27996
|
+
};
|
|
27997
|
+
|
|
27998
|
+
var CounterPlaceholder = defineComponent({
|
|
27999
|
+
name: "CounterPlaceholder",
|
|
28000
|
+
props: counterPlaceholderProps,
|
|
28001
|
+
render() {
|
|
28002
|
+
return /* @__PURE__ */ h$1(
|
|
28003
|
+
"div",
|
|
28004
|
+
{
|
|
28005
|
+
class: `${this.clsPrefix}-base-selection-placeholder ${this.clsPrefix}-base-selection__counter-placeholder`
|
|
28006
|
+
},
|
|
28007
|
+
/* @__PURE__ */ h$1(
|
|
28008
|
+
"span",
|
|
28009
|
+
{
|
|
28010
|
+
style: this.placeholderHidden ? { visibility: "hidden" } : void 0
|
|
28011
|
+
},
|
|
28012
|
+
this.placeholder
|
|
28013
|
+
),
|
|
28014
|
+
this.input
|
|
28015
|
+
);
|
|
28016
|
+
}
|
|
28017
|
+
});
|
|
28018
|
+
|
|
27969
28019
|
function generateSecondaryStates(state) {
|
|
27970
28020
|
return [cB("base-selection-input", `
|
|
27971
28021
|
color: var(--u-text-color${state}-secondary);
|
|
@@ -27979,6 +28029,8 @@ function generateSecondaryStates(state) {
|
|
|
27979
28029
|
`)]), cB("base-selection-tags", `
|
|
27980
28030
|
background-color: var(--u-color${state}-secondary);
|
|
27981
28031
|
color: var(--u-text-color${state}-secondary);
|
|
28032
|
+
`), cB("base-selection-placeholder", `
|
|
28033
|
+
color: var(--u-text-color${state}-secondary);
|
|
27982
28034
|
`), cE("border,state-border", `
|
|
27983
28035
|
border: var(--u-border${state}-secondary);
|
|
27984
28036
|
`), cB("base-clear", [cE("clear", `
|
|
@@ -28026,12 +28078,11 @@ var style$1H = c$1([cB("base-selection", `
|
|
|
28026
28078
|
top: 50%;
|
|
28027
28079
|
transform: translateY(-50%);
|
|
28028
28080
|
right: var(--u-padding-right);
|
|
28081
|
+
gap: var(--u-suffix-wrapper-gap);
|
|
28029
28082
|
`, [cB("base-clear", `
|
|
28030
28083
|
font-size: var(--u-clear-size);
|
|
28031
28084
|
`)]), cE("filter-counter", `
|
|
28032
|
-
width:
|
|
28033
|
-
margin-left: 6px;
|
|
28034
|
-
padding-left: 2px;
|
|
28085
|
+
width: 13px;
|
|
28035
28086
|
text-align: center;
|
|
28036
28087
|
color: var(--u-filter-counter-text-color);
|
|
28037
28088
|
`), cB("base-suffix", `
|
|
@@ -28121,6 +28172,8 @@ var style$1H = c$1([cB("base-selection", `
|
|
|
28121
28172
|
color: var(--u-text-color);
|
|
28122
28173
|
`)]), cNotM("disabled", [cM("secondary", [cB("base-selection-placeholder", `
|
|
28123
28174
|
color: var(--u-text-color);
|
|
28175
|
+
`)]), cM("secondary-selected", [cB("base-selection-placeholder", `
|
|
28176
|
+
color: var(--u-text-color-secondary);
|
|
28124
28177
|
`)]), c$1("&:hover", [cE("state-border", `
|
|
28125
28178
|
box-shadow: var(--u-box-shadow-hover);
|
|
28126
28179
|
border: var(--u-border-hover);
|
|
@@ -28210,6 +28263,8 @@ var style$1H = c$1([cB("base-selection", `
|
|
|
28210
28263
|
caret-color: var(--u-caret-color-secondary);
|
|
28211
28264
|
`), cB("base-selection-tags", `
|
|
28212
28265
|
padding-right: calc(var(--u-padding-right) + var(--u-arrow-size) + 37px + var(--u-clear-size));
|
|
28266
|
+
`), cB("base-loading", `
|
|
28267
|
+
color: var(--u-loading-color-secondary);
|
|
28213
28268
|
`), cNotM("disabled", [c$1("&:hover", [generateSecondaryStates("-hover"), cB("base-clear", "--u-clear-color-hover: var(--u-clear-color-hover-secondary)")]), cM("focus", [generateSecondaryStates("-focus")]), cM("active", [generateSecondaryStates("-active")])])]), ["warning", "error"].map(status => cM(`${status}-status`, [cE("state-border", `border: var(--u-border-${status});`), cNotM("secondary-selected", [cNotM("disabled", [cNotM("filled", [cM("active", [cB("base-selection-label", `background-color: var(--u-color-active-${status});`), cB("base-selection-tags", `background-color: var(--u-color-active-${status});`)])])])]), cNotM("disabled", [cM("active", [cE("state-border", `
|
|
28214
28269
|
box-shadow: var(--u-box-shadow-active-${status});
|
|
28215
28270
|
border: var(--u-border-active-${status});
|
|
@@ -28228,7 +28283,42 @@ var style$1H = c$1([cB("base-selection", `
|
|
|
28228
28283
|
zIndex: 2,
|
|
28229
28284
|
borderRadius: "var(--u-border-radius)",
|
|
28230
28285
|
cursor: "wait"
|
|
28231
|
-
})])
|
|
28286
|
+
})]), cM("auto-width", [cB("base-selection-label, base-selection-tags", `
|
|
28287
|
+
width: 0;
|
|
28288
|
+
min-width: 100%;
|
|
28289
|
+
`), cE("sizer", `
|
|
28290
|
+
position: static;
|
|
28291
|
+
display: block;
|
|
28292
|
+
height: 0;
|
|
28293
|
+
padding-top: 0;
|
|
28294
|
+
padding-bottom: 0;
|
|
28295
|
+
overflow: hidden;
|
|
28296
|
+
visibility: hidden;
|
|
28297
|
+
`, [cB("base-account-option", [cE("wrap", `
|
|
28298
|
+
width: auto;
|
|
28299
|
+
flex-grow: 0;
|
|
28300
|
+
`)])]), cNotM("secondary-selected", [cB("base-selection-placeholder", `
|
|
28301
|
+
padding-right: calc(var(--u-padding-right) + var(--u-arrow-size) + 8px);
|
|
28302
|
+
`)]), cM("counter-selected", [cB("base-selection-tags", "width: auto;")])]), cM("counter-selected", [cB("base-selection-tags", `
|
|
28303
|
+
flex-wrap: nowrap;
|
|
28304
|
+
gap: var(--u-filter-counter-gap);
|
|
28305
|
+
padding-right: var(--u-padding-right);
|
|
28306
|
+
`), cE("counter-placeholder", `
|
|
28307
|
+
position: relative;
|
|
28308
|
+
flex: 1 1 auto;
|
|
28309
|
+
min-width: 0;
|
|
28310
|
+
white-space: nowrap;
|
|
28311
|
+
overflow: hidden;
|
|
28312
|
+
text-overflow: ellipsis;
|
|
28313
|
+
`, [cB("base-selection-input-tag", `
|
|
28314
|
+
position: absolute;
|
|
28315
|
+
top: 0;
|
|
28316
|
+
left: 0;
|
|
28317
|
+
`)]), cE("suffix-wrapper", `
|
|
28318
|
+
position: static;
|
|
28319
|
+
transform: none;
|
|
28320
|
+
flex-shrink: 0;
|
|
28321
|
+
`)])]), cB("base-selection-popover", `
|
|
28232
28322
|
margin-bottom: -3px;
|
|
28233
28323
|
display: flex;
|
|
28234
28324
|
flex-wrap: wrap;
|
|
@@ -28319,6 +28409,7 @@ var UInternalSelection = defineComponent({
|
|
|
28319
28409
|
round: Boolean,
|
|
28320
28410
|
counter: Boolean,
|
|
28321
28411
|
secondary: Boolean,
|
|
28412
|
+
autoWidth: Boolean,
|
|
28322
28413
|
account: Boolean
|
|
28323
28414
|
},
|
|
28324
28415
|
setup(props) {
|
|
@@ -28665,6 +28756,7 @@ var UInternalSelection = defineComponent({
|
|
|
28665
28756
|
// secondary
|
|
28666
28757
|
arrowColorSecondary,
|
|
28667
28758
|
clearColorSecondary,
|
|
28759
|
+
loadingColorSecondary,
|
|
28668
28760
|
colorSecondary,
|
|
28669
28761
|
textColorSecondary,
|
|
28670
28762
|
borderSecondary,
|
|
@@ -28680,6 +28772,8 @@ var UInternalSelection = defineComponent({
|
|
|
28680
28772
|
borderHoverSecondary,
|
|
28681
28773
|
filterCounterTextColor,
|
|
28682
28774
|
filterCounterTextColorDisabled,
|
|
28775
|
+
filterCounterGap,
|
|
28776
|
+
filterSuffixWrapperGap,
|
|
28683
28777
|
caretColorSecondary,
|
|
28684
28778
|
arrowColorActiveSecondary,
|
|
28685
28779
|
clearColorActiveSecondary,
|
|
@@ -28774,8 +28868,11 @@ var UInternalSelection = defineComponent({
|
|
|
28774
28868
|
"--u-caret-color-secondary": caretColorSecondary,
|
|
28775
28869
|
"--u-filter-counter-text-color": filterCounterTextColor,
|
|
28776
28870
|
"--u-filter-counter-text-color-disabled": filterCounterTextColorDisabled,
|
|
28871
|
+
"--u-filter-counter-gap": filterCounterGap,
|
|
28872
|
+
"--u-suffix-wrapper-gap": filterSuffixWrapperGap,
|
|
28777
28873
|
"--u-arrow-color-secondary": arrowColorSecondary,
|
|
28778
28874
|
"--u-clear-color-secondary": clearColorSecondary,
|
|
28875
|
+
"--u-loading-color-secondary": loadingColorSecondary,
|
|
28779
28876
|
"--u-color-secondary": colorSecondary,
|
|
28780
28877
|
"--u-text-color-secondary": textColorSecondary,
|
|
28781
28878
|
"--u-border-secondary": borderSecondary,
|
|
@@ -28887,7 +28984,16 @@ var UInternalSelection = defineComponent({
|
|
|
28887
28984
|
const maxTagCountNumeric = typeof maxTagCount === "number";
|
|
28888
28985
|
const useMaxTagCount = maxTagCountResponsive || maxTagCountNumeric;
|
|
28889
28986
|
const filterCounterEl = this.filterCounterVisible && !this.disabled ? /* @__PURE__ */ h$1("div", { class: [`${clsPrefix}-base-selection__filter-counter`] }, this.filterCounterLength) : null;
|
|
28890
|
-
const clear = this.
|
|
28987
|
+
const clear = this.filterCounterVisible && this.loading ? /* @__PURE__ */ h$1(
|
|
28988
|
+
UBaseLoading,
|
|
28989
|
+
{
|
|
28990
|
+
clsPrefix,
|
|
28991
|
+
class: `${clsPrefix}-base-suffix`,
|
|
28992
|
+
strokeWidth: 24,
|
|
28993
|
+
scale: 0.85,
|
|
28994
|
+
show: true
|
|
28995
|
+
}
|
|
28996
|
+
) : this.filterCounterClearable ? /* @__PURE__ */ h$1(
|
|
28891
28997
|
UBaseClear,
|
|
28892
28998
|
{
|
|
28893
28999
|
clsPrefix,
|
|
@@ -28895,22 +29001,35 @@ var UInternalSelection = defineComponent({
|
|
|
28895
29001
|
onClear: this.handleClear
|
|
28896
29002
|
}
|
|
28897
29003
|
) : null;
|
|
29004
|
+
const suffixShowArrow = this.showArrow || this.counter && this.filterCounterLength === 0;
|
|
29005
|
+
const suffixLoading = this.loading && !this.filterCounterVisible;
|
|
28898
29006
|
const suffix = /* @__PURE__ */ h$1(Wrapper, null, {
|
|
28899
|
-
default: () => /* @__PURE__ */ h$1("div", { class: [`${clsPrefix}-base-selection__suffix-wrapper`] }, /* @__PURE__ */ h$1(
|
|
29007
|
+
default: () => /* @__PURE__ */ h$1("div", { class: [`${clsPrefix}-base-selection__suffix-wrapper`] }, suffixShowArrow ? /* @__PURE__ */ h$1(
|
|
28900
29008
|
Suffix,
|
|
28901
29009
|
{
|
|
28902
29010
|
clsPrefix,
|
|
28903
|
-
loading:
|
|
28904
|
-
showArrow:
|
|
29011
|
+
loading: suffixLoading,
|
|
29012
|
+
showArrow: suffixShowArrow,
|
|
28905
29013
|
showClear: this.showSuffixClear,
|
|
28906
29014
|
onClear: this.handleClear
|
|
28907
29015
|
},
|
|
28908
29016
|
{
|
|
28909
29017
|
default: () => [this.$slots.arrow?.()]
|
|
28910
29018
|
}
|
|
28911
|
-
), filterCounterEl, clear)
|
|
29019
|
+
) : null, filterCounterEl, clear)
|
|
28912
29020
|
});
|
|
28913
29021
|
let body;
|
|
29022
|
+
const renderVisibleLabel = () => {
|
|
29023
|
+
if (renderTag) {
|
|
29024
|
+
return renderTag({
|
|
29025
|
+
option: this.selectedOption,
|
|
29026
|
+
handleClose: () => {
|
|
29027
|
+
}
|
|
29028
|
+
});
|
|
29029
|
+
}
|
|
29030
|
+
const label = renderLabel ? renderLabel(this.selectedOption, true) : render$2(this.label, this.selectedOption, true);
|
|
29031
|
+
return account ? /* @__PURE__ */ h$1(UBaseAccountOption, { ...this.selectedOption, label }) : label;
|
|
29032
|
+
};
|
|
28914
29033
|
if (multiple) {
|
|
28915
29034
|
const { labelField } = this;
|
|
28916
29035
|
const createTag = (option) => {
|
|
@@ -29025,7 +29144,7 @@ var UInternalSelection = defineComponent({
|
|
|
29025
29144
|
);
|
|
29026
29145
|
}
|
|
29027
29146
|
}
|
|
29028
|
-
const tags = this.filterCounterVisible ?
|
|
29147
|
+
const tags = this.filterCounterVisible ? null : maxTagCountResponsive ? filterable ? /* @__PURE__ */ h$1(
|
|
29029
29148
|
VOverflow,
|
|
29030
29149
|
{
|
|
29031
29150
|
ref: "overflowRef",
|
|
@@ -29072,7 +29191,7 @@ var UInternalSelection = defineComponent({
|
|
|
29072
29191
|
themeOverrides: this.mergedTheme.peerOverrides.Popover,
|
|
29073
29192
|
...ellipsisTagPopoverProps
|
|
29074
29193
|
} : null;
|
|
29075
|
-
const showPlaceholder = this.selected ? false : this.active ? !this.pattern && !this.isComposing : true;
|
|
29194
|
+
const showPlaceholder = this.selected && !this.filterCounterVisible ? false : this.active ? !this.pattern && !this.isComposing : true;
|
|
29076
29195
|
const placeholder = showPlaceholder ? /* @__PURE__ */ h$1(
|
|
29077
29196
|
"div",
|
|
29078
29197
|
{
|
|
@@ -29080,14 +29199,24 @@ var UInternalSelection = defineComponent({
|
|
|
29080
29199
|
},
|
|
29081
29200
|
/* @__PURE__ */ h$1("div", { class: `${clsPrefix}-base-selection-placeholder__inner` }, this.placeholder)
|
|
29082
29201
|
) : null;
|
|
29202
|
+
const counterPlaceholderHidden = !!(this.pattern || this.isComposing);
|
|
29203
|
+
const counterPlaceholder = this.filterCounterVisible ? /* @__PURE__ */ h$1(
|
|
29204
|
+
CounterPlaceholder,
|
|
29205
|
+
{
|
|
29206
|
+
clsPrefix,
|
|
29207
|
+
placeholder: this.placeholder,
|
|
29208
|
+
"placeholder-hidden": counterPlaceholderHidden,
|
|
29209
|
+
input
|
|
29210
|
+
}
|
|
29211
|
+
) : null;
|
|
29083
29212
|
const popoverTrigger = filterable ? /* @__PURE__ */ h$1(
|
|
29084
29213
|
"div",
|
|
29085
29214
|
{
|
|
29086
29215
|
ref: "patternInputWrapperRef",
|
|
29087
29216
|
class: `${clsPrefix}-base-selection-tags`
|
|
29088
29217
|
},
|
|
29089
|
-
tags,
|
|
29090
|
-
maxTagCountResponsive ? null : input,
|
|
29218
|
+
counterPlaceholder ?? tags,
|
|
29219
|
+
counterPlaceholder || maxTagCountResponsive ? null : input,
|
|
29091
29220
|
suffix
|
|
29092
29221
|
) : /* @__PURE__ */ h$1(
|
|
29093
29222
|
"div",
|
|
@@ -29096,7 +29225,7 @@ var UInternalSelection = defineComponent({
|
|
|
29096
29225
|
class: `${clsPrefix}-base-selection-tags`,
|
|
29097
29226
|
tabindex: disabled ? void 0 : 0
|
|
29098
29227
|
},
|
|
29099
|
-
tags,
|
|
29228
|
+
counterPlaceholder ?? tags,
|
|
29100
29229
|
suffix
|
|
29101
29230
|
);
|
|
29102
29231
|
body = /* @__PURE__ */ h$1(Fragment$1, null, useMaxTagCount ? /* @__PURE__ */ h$1(
|
|
@@ -29110,13 +29239,8 @@ var UInternalSelection = defineComponent({
|
|
|
29110
29239
|
trigger: () => popoverTrigger,
|
|
29111
29240
|
default: renderPopover
|
|
29112
29241
|
}
|
|
29113
|
-
) : popoverTrigger, placeholder);
|
|
29242
|
+
) : popoverTrigger, counterPlaceholder ? null : placeholder);
|
|
29114
29243
|
} else {
|
|
29115
|
-
let children;
|
|
29116
|
-
if (this.label !== void 0) {
|
|
29117
|
-
const label = renderLabel ? renderLabel(this.selectedOption, true) : render$2(this.label, this.selectedOption, true);
|
|
29118
|
-
children = account && /* @__PURE__ */ h$1(UBaseAccountOption, { ...this.selectedOption, label }) || label;
|
|
29119
|
-
}
|
|
29120
29244
|
if (filterable) {
|
|
29121
29245
|
const hasInput = this.pattern || this.isComposing;
|
|
29122
29246
|
const isAccountFocused = this.patternInputFocused && this.account;
|
|
@@ -29153,11 +29277,7 @@ var UInternalSelection = defineComponent({
|
|
|
29153
29277
|
class: `${clsPrefix}-base-selection-label__render-label ${clsPrefix}-base-selection-overlay`,
|
|
29154
29278
|
key: "input"
|
|
29155
29279
|
},
|
|
29156
|
-
/* @__PURE__ */ h$1("div", { class: `${clsPrefix}-base-selection-overlay__wrapper` },
|
|
29157
|
-
option: this.selectedOption,
|
|
29158
|
-
handleClose: () => {
|
|
29159
|
-
}
|
|
29160
|
-
}) : children)
|
|
29280
|
+
/* @__PURE__ */ h$1("div", { class: `${clsPrefix}-base-selection-overlay__wrapper` }, renderVisibleLabel())
|
|
29161
29281
|
) : null,
|
|
29162
29282
|
showPlaceholder ? /* @__PURE__ */ h$1(
|
|
29163
29283
|
"div",
|
|
@@ -29184,11 +29304,7 @@ var UInternalSelection = defineComponent({
|
|
|
29184
29304
|
title: getTitleAttribute(this.label),
|
|
29185
29305
|
key: "input"
|
|
29186
29306
|
},
|
|
29187
|
-
/* @__PURE__ */ h$1("div", { class: `${clsPrefix}-base-selection-input__content` },
|
|
29188
|
-
option: this.selectedOption,
|
|
29189
|
-
handleClose: () => {
|
|
29190
|
-
}
|
|
29191
|
-
}) : children)
|
|
29307
|
+
/* @__PURE__ */ h$1("div", { class: `${clsPrefix}-base-selection-input__content` }, renderVisibleLabel())
|
|
29192
29308
|
) : /* @__PURE__ */ h$1(
|
|
29193
29309
|
"div",
|
|
29194
29310
|
{
|
|
@@ -29213,10 +29329,12 @@ var UInternalSelection = defineComponent({
|
|
|
29213
29329
|
[`${clsPrefix}-base-selection--active`]: this.active,
|
|
29214
29330
|
[`${clsPrefix}-base-selection--secondary`]: this.secondary,
|
|
29215
29331
|
[`${clsPrefix}-base-selection--secondary-selected`]: this.secondary && this.selected,
|
|
29332
|
+
[`${clsPrefix}-base-selection--counter-selected`]: this.filterCounterVisible,
|
|
29216
29333
|
[`${clsPrefix}-base-selection--selected`]: this.selected || this.active && this.pattern,
|
|
29217
29334
|
[`${clsPrefix}-base-selection--disabled`]: this.disabled,
|
|
29218
29335
|
[`${clsPrefix}-base-selection--multiple`]: this.multiple,
|
|
29219
29336
|
[`${clsPrefix}-base-selection--filled`]: this.filled,
|
|
29337
|
+
[`${clsPrefix}-base-selection--auto-width`]: this.autoWidth,
|
|
29220
29338
|
[`${clsPrefix}-base-selection--skeleton`]: this.loadingSkeleton,
|
|
29221
29339
|
// focus is not controlled by selection itself since it always need
|
|
29222
29340
|
// to be managed together with menu. provide :focus style will cause
|
|
@@ -29245,6 +29363,19 @@ var UInternalSelection = defineComponent({
|
|
|
29245
29363
|
}
|
|
29246
29364
|
) : [
|
|
29247
29365
|
body,
|
|
29366
|
+
this.autoWidth ? /* @__PURE__ */ h$1(
|
|
29367
|
+
"div",
|
|
29368
|
+
{
|
|
29369
|
+
"aria-hidden": "true",
|
|
29370
|
+
class: [
|
|
29371
|
+
`${clsPrefix}-base-selection-overlay`,
|
|
29372
|
+
`${clsPrefix}-base-selection-placeholder`,
|
|
29373
|
+
`${clsPrefix}-base-selection__sizer`
|
|
29374
|
+
]
|
|
29375
|
+
},
|
|
29376
|
+
/* @__PURE__ */ h$1("div", null, this.placeholder),
|
|
29377
|
+
!this.multiple && this.selectedOption ? /* @__PURE__ */ h$1("div", null, renderVisibleLabel()) : null
|
|
29378
|
+
) : null,
|
|
29248
29379
|
bordered ? /* @__PURE__ */ h$1("div", { class: `${clsPrefix}-base-selection__border` }) : null,
|
|
29249
29380
|
bordered ? /* @__PURE__ */ h$1("div", { class: `${clsPrefix}-base-selection__state-border` }) : null
|
|
29250
29381
|
]
|
|
@@ -51612,6 +51743,7 @@ function createClampHeadingRule(maxLevel) {
|
|
|
51612
51743
|
};
|
|
51613
51744
|
}
|
|
51614
51745
|
|
|
51746
|
+
const MARKDOWN_OPTIONS_KEYS_SEPARATOR = "|";
|
|
51615
51747
|
const HTML_COMMENT_REGEX = /<!--[\s\S]*?-->/g;
|
|
51616
51748
|
const HTML_CDATA_REGEX = /<!\[CDATA\[[\s\S]*?\]\]>/g;
|
|
51617
51749
|
const HTML_RAW_BLOCK_REGEX = /<(script|style|iframe|object|embed|template|svg|math|noscript)\b[^>]*>[\s\S]*?<\/\1\s*>/gi;
|
|
@@ -51799,12 +51931,21 @@ function normalizeOptions(options) {
|
|
|
51799
51931
|
breaks: options?.breaks ?? true
|
|
51800
51932
|
};
|
|
51801
51933
|
}
|
|
51934
|
+
function getMarkdownOptionsKey(options) {
|
|
51935
|
+
const tags = {
|
|
51936
|
+
features: [...new Set(options.features)].sort().join(","),
|
|
51937
|
+
maxHeadingLevel: String(options.maxHeadingLevel),
|
|
51938
|
+
breaks: options.breaks ? "1" : "0"
|
|
51939
|
+
};
|
|
51940
|
+
return [tags.features, tags.maxHeadingLevel, tags.breaks].join(MARKDOWN_OPTIONS_KEYS_SEPARATOR);
|
|
51941
|
+
}
|
|
51802
51942
|
function getMarkdownRenderer(options) {
|
|
51803
51943
|
const normalizedOptions = normalizeOptions(options);
|
|
51804
|
-
const
|
|
51944
|
+
const key = getMarkdownOptionsKey(normalizedOptions);
|
|
51945
|
+
const instance = rendererCache.get(key);
|
|
51805
51946
|
if (!instance) {
|
|
51806
51947
|
const renderer = createMarkdownRenderer(normalizedOptions);
|
|
51807
|
-
rendererCache.set(
|
|
51948
|
+
rendererCache.set(key, renderer);
|
|
51808
51949
|
return renderer;
|
|
51809
51950
|
}
|
|
51810
51951
|
return instance;
|
|
@@ -58711,11 +58852,11 @@ const messageBubbleProps = {
|
|
|
58711
58852
|
default: false
|
|
58712
58853
|
},
|
|
58713
58854
|
title: {
|
|
58714
|
-
type: [String, Function],
|
|
58855
|
+
type: [String, Object, Function],
|
|
58715
58856
|
default: void 0
|
|
58716
58857
|
},
|
|
58717
58858
|
content: {
|
|
58718
|
-
type: [String, Function],
|
|
58859
|
+
type: [String, Object, Function],
|
|
58719
58860
|
default: void 0
|
|
58720
58861
|
},
|
|
58721
58862
|
markdown: {
|
|
@@ -58731,7 +58872,7 @@ const messageBubbleProps = {
|
|
|
58731
58872
|
default: void 0
|
|
58732
58873
|
},
|
|
58733
58874
|
timestamp: {
|
|
58734
|
-
type: [String, Number, Date, Function],
|
|
58875
|
+
type: [String, Number, Date, Object, Function],
|
|
58735
58876
|
default: void 0
|
|
58736
58877
|
},
|
|
58737
58878
|
status: {
|
|
@@ -60674,8 +60815,14 @@ var _UMessageBubble = defineComponent({
|
|
|
60674
60815
|
status: props.status,
|
|
60675
60816
|
attachments: normalizedAttachmentsRef.value
|
|
60676
60817
|
}));
|
|
60818
|
+
const resolvedContentRef = computed(
|
|
60819
|
+
() => resolveReactiveContent(props.content)
|
|
60820
|
+
);
|
|
60821
|
+
const resolvedTitleRef = computed(
|
|
60822
|
+
() => resolveReactiveContent(props.title)
|
|
60823
|
+
);
|
|
60677
60824
|
const markdownContent = computed(() => {
|
|
60678
|
-
const content =
|
|
60825
|
+
const content = resolvedContentRef.value;
|
|
60679
60826
|
return props.markdown && typeof content === "string" ? content : null;
|
|
60680
60827
|
});
|
|
60681
60828
|
const markdownActive = computed(
|
|
@@ -60764,20 +60911,11 @@ var _UMessageBubble = defineComponent({
|
|
|
60764
60911
|
}
|
|
60765
60912
|
result.push({
|
|
60766
60913
|
key: action.key,
|
|
60767
|
-
label:
|
|
60914
|
+
label: () => resolveReactiveContent(action.label)
|
|
60768
60915
|
});
|
|
60769
60916
|
}
|
|
60770
60917
|
return result;
|
|
60771
60918
|
});
|
|
60772
|
-
const resolveRenderContent = (content) => {
|
|
60773
|
-
if (typeof content === "function") {
|
|
60774
|
-
return content();
|
|
60775
|
-
}
|
|
60776
|
-
if (content instanceof Date) {
|
|
60777
|
-
return content.toString();
|
|
60778
|
-
}
|
|
60779
|
-
return content;
|
|
60780
|
-
};
|
|
60781
60919
|
const getThumbnailUrl = (attachment) => {
|
|
60782
60920
|
const url = [attachment.preview, attachment.thumbnail].find(
|
|
60783
60921
|
(value) => typeof value === "string"
|
|
@@ -60882,10 +61020,10 @@ var _UMessageBubble = defineComponent({
|
|
|
60882
61020
|
const hasBubbleActionsConfig = Boolean(
|
|
60883
61021
|
props.actions && props.actions.length > 0
|
|
60884
61022
|
);
|
|
60885
|
-
const hasTitle = Boolean(
|
|
61023
|
+
const hasTitle = Boolean(resolvedTitleRef.value || slots.title);
|
|
60886
61024
|
const afterContentSlot = slots.afterContent || slots["after-content"];
|
|
60887
61025
|
const hasAfterContent = Boolean(afterContentSlot);
|
|
60888
|
-
const hasVisibleTextContent = markdownActive.value ? markdownHtmlRef.value !== null : Boolean(
|
|
61026
|
+
const hasVisibleTextContent = markdownActive.value ? markdownHtmlRef.value !== null : Boolean(resolvedContentRef.value);
|
|
60889
61027
|
const hasContentInsideBubble = Boolean(
|
|
60890
61028
|
hasVisibleTextContent || slots.default || hasAfterContent || hasTitle || normalizedAttachmentsRef.value.length > 1
|
|
60891
61029
|
);
|
|
@@ -60903,7 +61041,9 @@ var _UMessageBubble = defineComponent({
|
|
|
60903
61041
|
class: `${mergedClsPrefixRef.value}-message-bubble__title`,
|
|
60904
61042
|
variant: "body-l-semi-bold"
|
|
60905
61043
|
},
|
|
60906
|
-
|
|
61044
|
+
{
|
|
61045
|
+
default: () => slots.title ? slots.title(messagePayloadRef.value) : resolvedTitleRef.value
|
|
61046
|
+
}
|
|
60907
61047
|
),
|
|
60908
61048
|
normalizedAttachmentsRef.value.length > 0 && renderAttachment(true),
|
|
60909
61049
|
(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(
|
|
@@ -60917,7 +61057,7 @@ var _UMessageBubble = defineComponent({
|
|
|
60917
61057
|
],
|
|
60918
61058
|
innerHTML: markdownHtmlRef.value
|
|
60919
61059
|
}
|
|
60920
|
-
) : /* @__PURE__ */ h$1("div", { class: `${mergedClsPrefixRef.value}-message-bubble__text` },
|
|
61060
|
+
) : /* @__PURE__ */ h$1("div", { class: `${mergedClsPrefixRef.value}-message-bubble__text` }, resolvedContentRef.value)),
|
|
60921
61061
|
hasAfterContent && /* @__PURE__ */ h$1(
|
|
60922
61062
|
"div",
|
|
60923
61063
|
{
|
|
@@ -61022,7 +61162,7 @@ var _UMessageBubble = defineComponent({
|
|
|
61022
61162
|
{
|
|
61023
61163
|
class: `${mergedClsPrefixRef.value}-message-bubble__time`
|
|
61024
61164
|
},
|
|
61025
|
-
|
|
61165
|
+
resolveReactiveContent(props.timestamp)
|
|
61026
61166
|
), props.isOwn && props.status && /* @__PURE__ */ h$1(
|
|
61027
61167
|
"div",
|
|
61028
61168
|
{
|
|
@@ -61070,7 +61210,7 @@ var _UMessageBubble = defineComponent({
|
|
|
61070
61210
|
],
|
|
61071
61211
|
innerHTML: markdownHtmlRef.value
|
|
61072
61212
|
}
|
|
61073
|
-
) :
|
|
61213
|
+
) : resolvedContentRef.value && /* @__PURE__ */ h$1("span", null, resolvedContentRef.value)
|
|
61074
61214
|
);
|
|
61075
61215
|
};
|
|
61076
61216
|
return {
|
|
@@ -62587,7 +62727,9 @@ var ChatEditingBlock = defineComponent({
|
|
|
62587
62727
|
_UListItem,
|
|
62588
62728
|
{
|
|
62589
62729
|
header: { text: this.mergedTitle },
|
|
62590
|
-
description: {
|
|
62730
|
+
description: {
|
|
62731
|
+
text: resolveReactiveText(this.message?.content)
|
|
62732
|
+
}
|
|
62591
62733
|
},
|
|
62592
62734
|
{
|
|
62593
62735
|
suffix: () => /* @__PURE__ */ h$1(
|
|
@@ -83623,6 +83765,7 @@ const selectProps = {
|
|
|
83623
83765
|
round: Boolean,
|
|
83624
83766
|
counter: Boolean,
|
|
83625
83767
|
secondary: Boolean,
|
|
83768
|
+
autoWidth: Boolean,
|
|
83626
83769
|
/** deprecated */
|
|
83627
83770
|
onChange: [Function, Array],
|
|
83628
83771
|
items: Array,
|
|
@@ -83636,6 +83779,9 @@ var style$14 = c$1([cB("select", `
|
|
|
83636
83779
|
position: relative;
|
|
83637
83780
|
`, [cE("trigger-wrapper", `
|
|
83638
83781
|
width: 100%;
|
|
83782
|
+
`), cM("auto-width", `
|
|
83783
|
+
width: fit-content;
|
|
83784
|
+
max-width: 100%;
|
|
83639
83785
|
`)]), cB("select-menu", `
|
|
83640
83786
|
margin: 4px 0;
|
|
83641
83787
|
box-shadow: var(--u-menu-box-shadow);
|
|
@@ -84446,7 +84592,10 @@ var _USelect = defineComponent({
|
|
|
84446
84592
|
"div",
|
|
84447
84593
|
{
|
|
84448
84594
|
ref: "selfElRef",
|
|
84449
|
-
class:
|
|
84595
|
+
class: [
|
|
84596
|
+
`${this.mergedClsPrefix}-select`,
|
|
84597
|
+
this.autoWidth && `${this.mergedClsPrefix}-select--auto-width`
|
|
84598
|
+
],
|
|
84450
84599
|
onKeydown: this.$slots.trigger ? this.handleSelfKeydown : void 0
|
|
84451
84600
|
},
|
|
84452
84601
|
/* @__PURE__ */ h$1(Binder, null, {
|
|
@@ -84517,6 +84666,7 @@ var _USelect = defineComponent({
|
|
|
84517
84666
|
round: this.round,
|
|
84518
84667
|
counter: this.counter,
|
|
84519
84668
|
secondary: this.secondary,
|
|
84669
|
+
autoWidth: this.autoWidth,
|
|
84520
84670
|
account: this.account,
|
|
84521
84671
|
tagField: this.tagField,
|
|
84522
84672
|
renderTagLabel: this.renderTagLabel,
|
|
@@ -93163,6 +93313,8 @@ var _UEditor = defineComponent({
|
|
|
93163
93313
|
toRef(props, "value"),
|
|
93164
93314
|
uncontrolledValueRef
|
|
93165
93315
|
);
|
|
93316
|
+
const parserRef = shallowRef();
|
|
93317
|
+
const parserKeyRef = shallowRef();
|
|
93166
93318
|
const serializer = createMarkdownSerializer(props.markdownOptions);
|
|
93167
93319
|
const sourceMarkdownRef = ref(mergedValueRef.value ?? "");
|
|
93168
93320
|
const loadedDocumentRef = ref(null);
|
|
@@ -93213,13 +93365,22 @@ var _UEditor = defineComponent({
|
|
|
93213
93365
|
if (props["onUpdate:value"])
|
|
93214
93366
|
call(props["onUpdate:value"], value);
|
|
93215
93367
|
}
|
|
93368
|
+
function getParser(instance) {
|
|
93369
|
+
const normalizedOptions = normalizeOptions(props.markdownOptions);
|
|
93370
|
+
const key = getMarkdownOptionsKey(normalizedOptions);
|
|
93371
|
+
if (!parserRef.value || parserKeyRef.value !== key) {
|
|
93372
|
+
parserKeyRef.value = key;
|
|
93373
|
+
parserRef.value = createMarkdownParser(
|
|
93374
|
+
instance.schema,
|
|
93375
|
+
props.markdownOptions
|
|
93376
|
+
);
|
|
93377
|
+
}
|
|
93378
|
+
return parserRef.value;
|
|
93379
|
+
}
|
|
93216
93380
|
function setMarkdown(markdown, instance = editorRef.value, addToHistory = true) {
|
|
93217
93381
|
if (!instance)
|
|
93218
93382
|
return;
|
|
93219
|
-
const document =
|
|
93220
|
-
instance.schema,
|
|
93221
|
-
props.markdownOptions
|
|
93222
|
-
).parse(markdown);
|
|
93383
|
+
const document = getParser(instance).parse(markdown);
|
|
93223
93384
|
sourceMarkdownRef.value = markdown;
|
|
93224
93385
|
loadedDocumentRef.value = document;
|
|
93225
93386
|
instance.chain().setMeta("addToHistory", addToHistory).setContent(document.toJSON(), { emitUpdate: false }).run();
|
|
@@ -93887,7 +94048,7 @@ var ChatHeader = defineComponent({
|
|
|
93887
94048
|
render() {
|
|
93888
94049
|
const { mergedClsPrefix, mergedTheme, selectedChat } = this;
|
|
93889
94050
|
const keyId = this.toKeyString(selectedChat?.id);
|
|
93890
|
-
const keyTitle =
|
|
94051
|
+
const keyTitle = resolveReactiveText(selectedChat?.title);
|
|
93891
94052
|
const renderDefaultActions = () => [
|
|
93892
94053
|
/* @__PURE__ */ h$1(_UTooltip, null, {
|
|
93893
94054
|
trigger: () => /* @__PURE__ */ h$1(
|
|
@@ -93973,7 +94134,7 @@ var ChatHeader = defineComponent({
|
|
|
93973
94134
|
themeOverrides: mergedTheme.peerOverrides.Typography
|
|
93974
94135
|
},
|
|
93975
94136
|
{
|
|
93976
|
-
default: () => selectedChat?.title
|
|
94137
|
+
default: () => resolveReactiveContent(selectedChat?.title)
|
|
93977
94138
|
}
|
|
93978
94139
|
), this.typing && /* @__PURE__ */ h$1(
|
|
93979
94140
|
_UText,
|
|
@@ -94196,7 +94357,7 @@ var _UChatMessages = defineComponent({
|
|
|
94196
94357
|
}));
|
|
94197
94358
|
};
|
|
94198
94359
|
const renderDateSeparator = (date) => {
|
|
94199
|
-
return /* @__PURE__ */ h$1("div", { class: `${mergedClsPrefixRef.value}-chat-main__date-separator` }, /* @__PURE__ */ h$1("span", null, date));
|
|
94360
|
+
return /* @__PURE__ */ h$1("div", { class: `${mergedClsPrefixRef.value}-chat-main__date-separator` }, /* @__PURE__ */ h$1("span", null, resolveReactiveContent(date)));
|
|
94200
94361
|
};
|
|
94201
94362
|
const renderUnreadNotification = () => {
|
|
94202
94363
|
const count = props.unreadNotificationCount ?? unreadMessagesCount.value;
|
|
@@ -94378,14 +94539,14 @@ var _UChatMessages = defineComponent({
|
|
|
94378
94539
|
let currentDate = "";
|
|
94379
94540
|
let unreadNotificationInserted = false;
|
|
94380
94541
|
this.messages?.forEach((message, index) => {
|
|
94381
|
-
const
|
|
94382
|
-
if (
|
|
94542
|
+
const messageDateText = resolveReactiveText(message.date);
|
|
94543
|
+
if (messageDateText !== currentDate) {
|
|
94383
94544
|
messagesWithDates.push({
|
|
94384
94545
|
type: "date-separator",
|
|
94385
|
-
date:
|
|
94546
|
+
date: message.date,
|
|
94386
94547
|
id: `date-${String(index)}`
|
|
94387
94548
|
});
|
|
94388
|
-
currentDate =
|
|
94549
|
+
currentDate = messageDateText;
|
|
94389
94550
|
}
|
|
94390
94551
|
if (!unreadNotificationInserted && !message.isOwn && message.status === MessageStatus.UNREAD && this.showUnreadNotification) {
|
|
94391
94552
|
messagesWithDates.push({
|
|
@@ -95085,7 +95246,7 @@ var _UChatMainArea = defineComponent({
|
|
|
95085
95246
|
if (editMessageIdRef) {
|
|
95086
95247
|
editMessageIdRef.value = message.id;
|
|
95087
95248
|
}
|
|
95088
|
-
inputValue.value =
|
|
95249
|
+
inputValue.value = resolveReactiveText(message.content);
|
|
95089
95250
|
attachmentFileList.value = [];
|
|
95090
95251
|
uploadedAttachmentsMap.value.clear();
|
|
95091
95252
|
};
|
|
@@ -95551,10 +95712,9 @@ var _UChatListItems = defineComponent({
|
|
|
95551
95712
|
const renderChatItem = (item) => {
|
|
95552
95713
|
const isSelected = props.selectedChatId === item.id;
|
|
95553
95714
|
const isTyping = props.typingChatIds?.includes(item.id) ?? false;
|
|
95554
|
-
const
|
|
95555
|
-
const
|
|
95556
|
-
const
|
|
95557
|
-
const keySubtitle = toKeyString(subtitle);
|
|
95715
|
+
const keyId = toKeyString(item.id);
|
|
95716
|
+
const keyTitle = resolveReactiveText(item.title);
|
|
95717
|
+
const keySubtitle = resolveReactiveText(item.subtitle);
|
|
95558
95718
|
return /* @__PURE__ */ h$1(
|
|
95559
95719
|
_UListItem,
|
|
95560
95720
|
{
|
|
@@ -95590,7 +95750,10 @@ var _UChatListItems = defineComponent({
|
|
|
95590
95750
|
variant: "body-l-medium"
|
|
95591
95751
|
},
|
|
95592
95752
|
{
|
|
95593
|
-
default: () =>
|
|
95753
|
+
default: () => {
|
|
95754
|
+
const title = resolveReactiveContent(item.title);
|
|
95755
|
+
return typeof title === "string" ? sanitizeMarkdown(title) : title;
|
|
95756
|
+
}
|
|
95594
95757
|
}
|
|
95595
95758
|
),
|
|
95596
95759
|
description: () => /* @__PURE__ */ h$1(
|
|
@@ -95603,7 +95766,13 @@ var _UChatListItems = defineComponent({
|
|
|
95603
95766
|
variant: "body-m-medium"
|
|
95604
95767
|
},
|
|
95605
95768
|
{
|
|
95606
|
-
default: () =>
|
|
95769
|
+
default: () => {
|
|
95770
|
+
if (isTyping) {
|
|
95771
|
+
return mergedTypingTextRef.value;
|
|
95772
|
+
}
|
|
95773
|
+
const subTitle = resolveReactiveContent(item.subtitle);
|
|
95774
|
+
return typeof subTitle === "string" ? sanitizeMarkdown(subTitle) : subTitle;
|
|
95775
|
+
}
|
|
95607
95776
|
}
|
|
95608
95777
|
),
|
|
95609
95778
|
suffix: () => {
|
|
@@ -95620,7 +95789,7 @@ var _UChatListItems = defineComponent({
|
|
|
95620
95789
|
{
|
|
95621
95790
|
class: `${mergedClsPrefixRef.value}-chat-sidebar__item-time`
|
|
95622
95791
|
},
|
|
95623
|
-
item.datetime
|
|
95792
|
+
resolveReactiveContent(item.datetime)
|
|
95624
95793
|
), /* @__PURE__ */ h$1(
|
|
95625
95794
|
"div",
|
|
95626
95795
|
{
|
|
@@ -154734,7 +154903,7 @@ function useThemeVars() {
|
|
|
154734
154903
|
});
|
|
154735
154904
|
}
|
|
154736
154905
|
|
|
154737
|
-
var version = "2.4.
|
|
154906
|
+
var version = "2.4.3";
|
|
154738
154907
|
|
|
154739
154908
|
function create({
|
|
154740
154909
|
componentPrefix = "U",
|