@uzum-tech/ui 2.3.8 → 2.4.0
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 +63601 -32546
- package/dist/index.mjs +64856 -33810
- package/dist/index.prod.js +3 -3
- package/dist/index.prod.mjs +3 -3
- package/es/_internal/icons/Bold.d.ts +2 -0
- package/es/_internal/icons/Bold.mjs +29 -0
- package/es/_internal/icons/BulletList.d.ts +2 -0
- package/es/_internal/icons/BulletList.mjs +23 -0
- package/es/_internal/icons/HorizontalRule.d.ts +2 -0
- package/es/_internal/icons/HorizontalRule.mjs +14 -0
- package/es/_internal/icons/Italic.d.ts +2 -0
- package/es/_internal/icons/Italic.mjs +19 -0
- package/es/_internal/icons/NumberedList.d.ts +2 -0
- package/es/_internal/icons/NumberedList.mjs +23 -0
- package/es/_internal/icons/Quote.d.ts +2 -0
- package/es/_internal/icons/Quote.mjs +23 -0
- package/es/_internal/icons/SettingsLine.d.ts +2 -0
- package/es/_internal/icons/SettingsLine.mjs +19 -0
- package/es/_internal/icons/Strikethrough.d.ts +2 -0
- package/es/_internal/icons/Strikethrough.mjs +14 -0
- package/es/_internal/icons/index.d.ts +8 -0
- package/es/_internal/icons/index.mjs +8 -0
- package/es/_styles/markdown/markdown-content.cssr.d.ts +6 -0
- package/es/_styles/markdown/markdown-content.cssr.mjs +22 -0
- package/es/_utils/markdown/index.d.ts +3 -2
- package/es/_utils/markdown/index.mjs +2 -1
- package/es/_utils/markdown/render-markdown.d.ts +2 -1
- package/es/_utils/markdown/render-markdown.mjs +1 -1
- package/es/chat/src/Chat.d.ts +261 -24
- package/es/chat/src/Chat.mjs +2 -0
- package/es/chat/src/ChatMainArea.d.ts +81 -8
- package/es/chat/src/ChatMainArea.mjs +111 -355
- package/es/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.d.ts +9084 -0
- package/es/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.mjs +71 -0
- package/es/chat/src/ChatParts/ChatAttachmentButton/interface.d.ts +2645 -0
- package/es/chat/src/ChatParts/ChatAttachmentButton/interface.mjs +19 -0
- package/es/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.d.ts +9070 -0
- package/es/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.mjs +78 -0
- package/es/chat/src/ChatParts/ChatEditingBlock/interface.d.ts +2637 -0
- package/es/chat/src/ChatParts/ChatEditingBlock/interface.mjs +15 -0
- package/es/chat/src/ChatParts/ChatEditorInput/ChatEditorInput.d.ts +89 -0
- package/es/chat/src/ChatParts/ChatEditorInput/ChatEditorInput.mjs +63 -0
- package/es/chat/src/ChatParts/ChatEditorInput/interface.d.ts +42 -0
- package/es/chat/src/ChatParts/ChatEditorInput/interface.mjs +34 -0
- package/es/chat/src/ChatParts/ChatFooter/ChatFooter.d.ts +115 -0
- package/es/chat/src/ChatParts/ChatFooter/ChatFooter.mjs +99 -0
- package/es/chat/src/ChatParts/ChatFooter/interface.d.ts +56 -0
- package/es/chat/src/ChatParts/ChatFooter/interface.mjs +46 -0
- package/es/chat/src/ChatParts/ChatHeader/ChatHeader.d.ts +9205 -0
- package/es/chat/src/ChatParts/ChatHeader/ChatHeader.mjs +219 -0
- package/es/chat/src/ChatParts/ChatHeader/interface.d.ts +2694 -0
- package/es/chat/src/ChatParts/ChatHeader/interface.mjs +67 -0
- package/es/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.d.ts +9142 -0
- package/es/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.mjs +129 -0
- package/es/chat/src/ChatParts/ChatLegacyInput/interface.d.ts +2654 -0
- package/es/chat/src/ChatParts/ChatLegacyInput/interface.mjs +27 -0
- package/es/chat/src/ChatParts/ChatMessagesArea/ChatMessagesArea.d.ts +148 -0
- package/es/chat/src/ChatParts/ChatMessagesArea/ChatMessagesArea.mjs +92 -0
- package/es/chat/src/ChatParts/ChatMessagesArea/interface.d.ts +72 -0
- package/es/chat/src/ChatParts/ChatMessagesArea/interface.mjs +58 -0
- package/es/chat/src/interface.d.ts +7 -0
- package/es/chat/src/interface.mjs +4 -0
- package/es/chat/styles/light.d.ts +4 -0
- package/es/chat/styles/light.mjs +18 -0
- package/es/components.d.ts +12933 -32
- package/es/components.mjs +5 -0
- package/es/config-provider/src/internal-interface.d.ts +2 -0
- package/es/data-table/index.d.ts +1 -1
- package/es/data-table/src/ColumnSettings/ColumnSettingsDrawer.d.ts +156 -0
- package/es/data-table/src/ColumnSettings/ColumnSettingsDrawer.mjs +220 -0
- package/es/data-table/src/ColumnSettings/styles.cssr.d.ts +2 -0
- package/es/data-table/src/ColumnSettings/styles.cssr.mjs +25 -0
- package/es/data-table/src/DataTable.d.ts +60 -2
- package/es/data-table/src/DataTable.mjs +99 -23
- package/es/data-table/src/HeaderButton/FilterMenu.d.ts +14 -0
- package/es/data-table/src/interface.d.ts +53 -1
- package/es/data-table/src/interface.mjs +18 -1
- package/es/data-table/src/styles/index.cssr.mjs +17 -1
- package/es/data-table/src/use-column-settings.d.ts +2 -0
- package/es/data-table/src/use-column-settings.mjs +124 -0
- package/es/data-table/src/utils/column-utils.d.ts +2 -1
- package/es/data-table/src/utils/column-utils.mjs +6 -0
- package/es/editor/index.d.ts +10 -0
- package/es/editor/index.mjs +5 -0
- package/es/editor/src/Editor.d.ts +3896 -0
- package/es/editor/src/Editor.mjs +220 -0
- package/es/editor/src/EditorParts/BlockTypeSelect/BlockTypeSelect.d.ts +37 -0
- package/es/editor/src/EditorParts/BlockTypeSelect/BlockTypeSelect.mjs +63 -0
- package/es/editor/src/EditorParts/BlockTypeSelect/interface.d.ts +21 -0
- package/es/editor/src/EditorParts/BlockTypeSelect/interface.mjs +14 -0
- package/es/editor/src/EditorParts/EditorContent/EditorContent.d.ts +4078 -0
- package/es/editor/src/EditorParts/EditorContent/EditorContent.mjs +154 -0
- package/es/editor/src/EditorParts/EditorContent/index.d.ts +2 -0
- package/es/editor/src/EditorParts/EditorContent/index.mjs +2 -0
- package/es/editor/src/EditorParts/EditorContent/interface.d.ts +1906 -0
- package/es/editor/src/EditorParts/EditorContent/interface.mjs +17 -0
- package/es/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +4582 -0
- package/es/editor/src/EditorParts/EditorToolbar/EditorToolbar.mjs +170 -0
- package/es/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.d.ts +11 -0
- package/es/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.mjs +54 -0
- package/es/editor/src/EditorParts/EditorToolbar/index.d.ts +2 -0
- package/es/editor/src/EditorParts/EditorToolbar/index.mjs +2 -0
- package/es/editor/src/EditorParts/EditorToolbar/interface.d.ts +1912 -0
- package/es/editor/src/EditorParts/EditorToolbar/interface.mjs +18 -0
- package/es/editor/src/EditorParts/SendButton/SendButton.d.ts +23 -0
- package/es/editor/src/EditorParts/SendButton/SendButton.mjs +42 -0
- package/es/editor/src/EditorParts/SendButton/interface.d.ts +18 -0
- package/es/editor/src/EditorParts/SendButton/interface.mjs +8 -0
- package/es/editor/src/EditorParts/ToolbarButton/ToolbarButton.d.ts +32 -0
- package/es/editor/src/EditorParts/ToolbarButton/ToolbarButton.mjs +44 -0
- package/es/editor/src/EditorParts/ToolbarButton/interface.d.ts +20 -0
- package/es/editor/src/EditorParts/ToolbarButton/interface.mjs +13 -0
- package/es/editor/src/composables/use-editor-commands.d.ts +8 -0
- package/es/editor/src/composables/use-editor-commands.mjs +69 -0
- package/es/editor/src/composables/use-editor-css-vars.d.ts +4 -0
- package/es/editor/src/composables/use-editor-css-vars.mjs +81 -0
- package/es/editor/src/constants.d.ts +12 -0
- package/es/editor/src/constants.mjs +25 -0
- package/es/editor/src/extensions.d.ts +7 -0
- package/es/editor/src/extensions.mjs +129 -0
- package/es/editor/src/interface.d.ts +2019 -0
- package/es/editor/src/interface.mjs +52 -0
- package/es/editor/src/markdown/constants.d.ts +8 -0
- package/es/editor/src/markdown/constants.mjs +206 -0
- package/es/editor/src/markdown/editor-serializer.d.ts +9 -0
- package/es/editor/src/markdown/editor-serializer.mjs +18 -0
- package/es/editor/src/markdown/escape.d.ts +2 -0
- package/es/editor/src/markdown/escape.mjs +24 -0
- package/es/editor/src/markdown/html.d.ts +1 -0
- package/es/editor/src/markdown/html.mjs +4 -0
- package/es/editor/src/markdown/parser.d.ts +4 -0
- package/es/editor/src/markdown/parser.mjs +36 -0
- package/es/editor/src/markdown/serializer-state.d.ts +10 -0
- package/es/editor/src/markdown/serializer-state.mjs +12 -0
- package/es/editor/src/markdown/serializer.d.ts +3 -0
- package/es/editor/src/markdown/serializer.mjs +8 -0
- package/es/editor/src/styles/index.cssr.d.ts +2 -0
- package/es/editor/src/styles/index.cssr.mjs +119 -0
- package/es/editor/styles/dark.d.ts +630 -0
- package/es/editor/styles/dark.mjs +21 -0
- package/es/editor/styles/index.d.ts +3 -0
- package/es/editor/styles/index.mjs +2 -0
- package/es/editor/styles/light.d.ts +677 -0
- package/es/editor/styles/light.mjs +87 -0
- package/es/editor/tests/fixtures/round-trip.d.ts +12 -0
- package/es/editor/tests/fixtures/round-trip.mjs +98 -0
- package/es/editor/tests/utils.d.ts +7 -0
- package/es/editor/tests/utils.mjs +27 -0
- package/es/locales/common/enUS.d.ts +21 -0
- package/es/locales/common/enUS.mjs +22 -1
- package/es/locales/common/ruRU.mjs +22 -1
- package/es/locales/common/uzUZ.mjs +22 -1
- package/es/locales/common/zhCN.mjs +22 -1
- package/es/message-bubble/src/styles/index.cssr.mjs +4 -17
- package/es/styles.d.ts +1 -0
- package/es/styles.mjs +1 -0
- package/es/themes/dark.mjs +2 -0
- package/es/themes/light.mjs +2 -0
- package/es/version.d.ts +1 -1
- package/es/version.mjs +1 -1
- package/lib/_internal/icons/Bold.d.ts +2 -0
- package/lib/_internal/icons/Bold.js +13 -0
- package/lib/_internal/icons/BulletList.d.ts +2 -0
- package/lib/_internal/icons/BulletList.js +13 -0
- package/lib/_internal/icons/HorizontalRule.d.ts +2 -0
- package/lib/_internal/icons/HorizontalRule.js +10 -0
- package/lib/_internal/icons/Italic.d.ts +2 -0
- package/lib/_internal/icons/Italic.js +11 -0
- package/lib/_internal/icons/NumberedList.d.ts +2 -0
- package/lib/_internal/icons/NumberedList.js +13 -0
- package/lib/_internal/icons/Quote.d.ts +2 -0
- package/lib/_internal/icons/Quote.js +13 -0
- package/lib/_internal/icons/SettingsLine.d.ts +2 -0
- package/lib/_internal/icons/SettingsLine.js +11 -0
- package/lib/_internal/icons/Strikethrough.d.ts +2 -0
- package/lib/_internal/icons/Strikethrough.js +10 -0
- package/lib/_internal/icons/index.d.ts +8 -0
- package/lib/_internal/icons/index.js +18 -2
- package/lib/_styles/markdown/markdown-content.cssr.d.ts +6 -0
- package/lib/_styles/markdown/markdown-content.cssr.js +28 -0
- package/lib/_utils/markdown/index.d.ts +3 -2
- package/lib/_utils/markdown/index.js +4 -1
- package/lib/_utils/markdown/render-markdown.d.ts +2 -1
- package/lib/_utils/markdown/render-markdown.js +1 -0
- package/lib/chat/src/Chat.d.ts +261 -24
- package/lib/chat/src/Chat.js +2 -0
- package/lib/chat/src/ChatMainArea.d.ts +81 -8
- package/lib/chat/src/ChatMainArea.js +93 -223
- package/lib/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.d.ts +9084 -0
- package/lib/chat/src/ChatParts/ChatAttachmentButton/ChatAttachmentButton.js +52 -0
- package/lib/chat/src/ChatParts/ChatAttachmentButton/interface.d.ts +2645 -0
- package/lib/chat/src/ChatParts/ChatAttachmentButton/interface.js +17 -0
- package/lib/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.d.ts +9070 -0
- package/lib/chat/src/ChatParts/ChatEditingBlock/ChatEditingBlock.js +55 -0
- package/lib/chat/src/ChatParts/ChatEditingBlock/interface.d.ts +2637 -0
- package/lib/chat/src/ChatParts/ChatEditingBlock/interface.js +14 -0
- package/lib/chat/src/ChatParts/ChatEditorInput/ChatEditorInput.d.ts +89 -0
- package/lib/chat/src/ChatParts/ChatEditorInput/ChatEditorInput.js +45 -0
- package/lib/chat/src/ChatParts/ChatEditorInput/interface.d.ts +42 -0
- package/lib/chat/src/ChatParts/ChatEditorInput/interface.js +37 -0
- package/lib/chat/src/ChatParts/ChatFooter/ChatFooter.d.ts +115 -0
- package/lib/chat/src/ChatParts/ChatFooter/ChatFooter.js +66 -0
- package/lib/chat/src/ChatParts/ChatFooter/interface.d.ts +56 -0
- package/lib/chat/src/ChatParts/ChatFooter/interface.js +49 -0
- package/lib/chat/src/ChatParts/ChatHeader/ChatHeader.d.ts +9205 -0
- package/lib/chat/src/ChatParts/ChatHeader/ChatHeader.js +164 -0
- package/lib/chat/src/ChatParts/ChatHeader/interface.d.ts +2694 -0
- package/lib/chat/src/ChatParts/ChatHeader/interface.js +53 -0
- package/lib/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.d.ts +9142 -0
- package/lib/chat/src/ChatParts/ChatLegacyInput/ChatLegacyInput.js +98 -0
- package/lib/chat/src/ChatParts/ChatLegacyInput/interface.d.ts +2654 -0
- package/lib/chat/src/ChatParts/ChatLegacyInput/interface.js +23 -0
- package/lib/chat/src/ChatParts/ChatMessagesArea/ChatMessagesArea.d.ts +148 -0
- package/lib/chat/src/ChatParts/ChatMessagesArea/ChatMessagesArea.js +49 -0
- package/lib/chat/src/ChatParts/ChatMessagesArea/interface.d.ts +72 -0
- package/lib/chat/src/ChatParts/ChatMessagesArea/interface.js +61 -0
- package/lib/chat/src/interface.d.ts +7 -0
- package/lib/chat/src/interface.js +3 -0
- package/lib/chat/styles/light.d.ts +4 -0
- package/lib/chat/styles/light.js +19 -0
- package/lib/components.d.ts +12933 -32
- package/lib/components.js +17 -7
- package/lib/config-provider/src/internal-interface.d.ts +2 -0
- package/lib/data-table/index.d.ts +1 -1
- package/lib/data-table/src/ColumnSettings/ColumnSettingsDrawer.d.ts +156 -0
- package/lib/data-table/src/ColumnSettings/ColumnSettingsDrawer.js +181 -0
- package/lib/data-table/src/ColumnSettings/styles.cssr.d.ts +2 -0
- package/lib/data-table/src/ColumnSettings/styles.cssr.js +30 -0
- package/lib/data-table/src/DataTable.d.ts +60 -2
- package/lib/data-table/src/DataTable.js +65 -23
- package/lib/data-table/src/HeaderButton/FilterMenu.d.ts +14 -0
- package/lib/data-table/src/interface.d.ts +53 -1
- package/lib/data-table/src/interface.js +17 -2
- package/lib/data-table/src/styles/index.cssr.js +17 -1
- package/lib/data-table/src/use-column-settings.d.ts +2 -0
- package/lib/data-table/src/use-column-settings.js +144 -0
- package/lib/data-table/src/utils/column-utils.d.ts +2 -1
- package/lib/data-table/src/utils/column-utils.js +5 -0
- package/lib/editor/index.d.ts +10 -0
- package/lib/editor/index.js +19 -0
- package/lib/editor/src/Editor.d.ts +3896 -0
- package/lib/editor/src/Editor.js +216 -0
- package/lib/editor/src/EditorParts/BlockTypeSelect/BlockTypeSelect.d.ts +37 -0
- package/lib/editor/src/EditorParts/BlockTypeSelect/BlockTypeSelect.js +47 -0
- package/lib/editor/src/EditorParts/BlockTypeSelect/interface.d.ts +21 -0
- package/lib/editor/src/EditorParts/BlockTypeSelect/interface.js +17 -0
- package/lib/editor/src/EditorParts/EditorContent/EditorContent.d.ts +4078 -0
- package/lib/editor/src/EditorParts/EditorContent/EditorContent.js +121 -0
- package/lib/editor/src/EditorParts/EditorContent/index.d.ts +2 -0
- package/lib/editor/src/EditorParts/EditorContent/index.js +10 -0
- package/lib/editor/src/EditorParts/EditorContent/interface.d.ts +1906 -0
- package/lib/editor/src/EditorParts/EditorContent/interface.js +8 -0
- package/lib/editor/src/EditorParts/EditorToolbar/EditorToolbar.d.ts +4582 -0
- package/lib/editor/src/EditorParts/EditorToolbar/EditorToolbar.js +126 -0
- package/lib/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.d.ts +11 -0
- package/lib/editor/src/EditorParts/EditorToolbar/composables/use-editor-toolbar-customization.js +52 -0
- package/lib/editor/src/EditorParts/EditorToolbar/index.d.ts +2 -0
- package/lib/editor/src/EditorParts/EditorToolbar/index.js +10 -0
- package/lib/editor/src/EditorParts/EditorToolbar/interface.d.ts +1912 -0
- package/lib/editor/src/EditorParts/EditorToolbar/interface.js +11 -0
- package/lib/editor/src/EditorParts/SendButton/SendButton.d.ts +23 -0
- package/lib/editor/src/EditorParts/SendButton/SendButton.js +31 -0
- package/lib/editor/src/EditorParts/SendButton/interface.d.ts +18 -0
- package/lib/editor/src/EditorParts/SendButton/interface.js +11 -0
- package/lib/editor/src/EditorParts/ToolbarButton/ToolbarButton.d.ts +32 -0
- package/lib/editor/src/EditorParts/ToolbarButton/ToolbarButton.js +34 -0
- package/lib/editor/src/EditorParts/ToolbarButton/interface.d.ts +20 -0
- package/lib/editor/src/EditorParts/ToolbarButton/interface.js +16 -0
- package/lib/editor/src/composables/use-editor-commands.d.ts +8 -0
- package/lib/editor/src/composables/use-editor-commands.js +70 -0
- package/lib/editor/src/composables/use-editor-css-vars.d.ts +4 -0
- package/lib/editor/src/composables/use-editor-css-vars.js +46 -0
- package/lib/editor/src/constants.d.ts +12 -0
- package/lib/editor/src/constants.js +56 -0
- package/lib/editor/src/extensions.d.ts +7 -0
- package/lib/editor/src/extensions.js +136 -0
- package/lib/editor/src/interface.d.ts +2019 -0
- package/lib/editor/src/interface.js +22 -0
- package/lib/editor/src/markdown/constants.d.ts +8 -0
- package/lib/editor/src/markdown/constants.js +201 -0
- package/lib/editor/src/markdown/editor-serializer.d.ts +9 -0
- package/lib/editor/src/markdown/editor-serializer.js +20 -0
- package/lib/editor/src/markdown/escape.d.ts +2 -0
- package/lib/editor/src/markdown/escape.js +31 -0
- package/lib/editor/src/markdown/html.d.ts +1 -0
- package/lib/editor/src/markdown/html.js +9 -0
- package/lib/editor/src/markdown/parser.d.ts +4 -0
- package/lib/editor/src/markdown/parser.js +42 -0
- package/lib/editor/src/markdown/serializer-state.d.ts +10 -0
- package/lib/editor/src/markdown/serializer-state.js +16 -0
- package/lib/editor/src/markdown/serializer.d.ts +3 -0
- package/lib/editor/src/markdown/serializer.js +9 -0
- package/lib/editor/src/styles/index.cssr.d.ts +2 -0
- package/lib/editor/src/styles/index.cssr.js +124 -0
- package/lib/editor/styles/dark.d.ts +630 -0
- package/lib/editor/styles/dark.js +23 -0
- package/lib/editor/styles/index.d.ts +3 -0
- package/lib/editor/styles/index.js +10 -0
- package/lib/editor/styles/light.d.ts +677 -0
- package/lib/editor/styles/light.js +71 -0
- package/lib/editor/tests/fixtures/round-trip.d.ts +12 -0
- package/lib/editor/tests/fixtures/round-trip.js +125 -0
- package/lib/editor/tests/utils.d.ts +7 -0
- package/lib/editor/tests/utils.js +26 -0
- package/lib/locales/common/enUS.d.ts +21 -0
- package/lib/locales/common/enUS.js +22 -1
- package/lib/locales/common/ruRU.js +22 -1
- package/lib/locales/common/uzUZ.js +22 -1
- package/lib/locales/common/zhCN.js +22 -1
- package/lib/message-bubble/src/styles/index.cssr.js +4 -17
- package/lib/styles.d.ts +1 -0
- package/lib/styles.js +127 -125
- package/lib/themes/dark.js +136 -134
- package/lib/themes/light.js +136 -134
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +8 -1
- package/volar.d.ts +3 -0
- package/web-types.json +437 -2
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useTheme } from "../../../../_mixins/index.mjs";
|
|
2
|
+
export const chatEditingBlockProps = Object.assign(Object.assign({}, useTheme.props), {
|
|
3
|
+
message: {
|
|
4
|
+
type: Object,
|
|
5
|
+
default: null
|
|
6
|
+
},
|
|
7
|
+
title: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: undefined
|
|
10
|
+
},
|
|
11
|
+
onCancel: {
|
|
12
|
+
type: Function,
|
|
13
|
+
default: undefined
|
|
14
|
+
}
|
|
15
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { MarkdownOptions } from '@uzum-tech/ui';
|
|
2
|
+
import type { SlotsType } from 'vue';
|
|
3
|
+
import type { IconProps } from '../../../../icon';
|
|
4
|
+
import type { ChatEditorInputSlots } from './interface';
|
|
5
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
readonly value: {
|
|
7
|
+
readonly type: StringConstructor;
|
|
8
|
+
readonly default: "";
|
|
9
|
+
};
|
|
10
|
+
readonly placeholder: {
|
|
11
|
+
readonly type: StringConstructor;
|
|
12
|
+
readonly default: undefined;
|
|
13
|
+
};
|
|
14
|
+
readonly disabled: {
|
|
15
|
+
readonly type: BooleanConstructor;
|
|
16
|
+
readonly default: false;
|
|
17
|
+
};
|
|
18
|
+
readonly markdownOptions: {
|
|
19
|
+
readonly type: import("vue").PropType<MarkdownOptions>;
|
|
20
|
+
readonly default: undefined;
|
|
21
|
+
};
|
|
22
|
+
readonly maxRows: {
|
|
23
|
+
readonly type: NumberConstructor;
|
|
24
|
+
readonly default: 5;
|
|
25
|
+
};
|
|
26
|
+
readonly sendIconProps: {
|
|
27
|
+
readonly type: import("vue").PropType<Partial<IconProps>>;
|
|
28
|
+
readonly default: undefined;
|
|
29
|
+
};
|
|
30
|
+
readonly onUpdateValue: {
|
|
31
|
+
readonly type: import("vue").PropType<(value: string) => void>;
|
|
32
|
+
readonly default: undefined;
|
|
33
|
+
};
|
|
34
|
+
readonly onSend: {
|
|
35
|
+
readonly type: import("vue").PropType<(value: string) => void>;
|
|
36
|
+
readonly default: undefined;
|
|
37
|
+
};
|
|
38
|
+
}>, {
|
|
39
|
+
mergedClsPrefix: import("vue").Ref<string, string>;
|
|
40
|
+
mergedPlaceholder: import("vue").ComputedRef<string>;
|
|
41
|
+
mergedMarkdownOptions: import("vue").ComputedRef<MarkdownOptions | undefined>;
|
|
42
|
+
mergedDisabled: import("vue").ComputedRef<boolean>;
|
|
43
|
+
mergedSendIconProps: import("vue").ComputedRef<Partial<IconProps> | undefined>;
|
|
44
|
+
handleUpdateValue: (value: string) => void;
|
|
45
|
+
handleSend: (value: string) => void;
|
|
46
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
47
|
+
readonly value: {
|
|
48
|
+
readonly type: StringConstructor;
|
|
49
|
+
readonly default: "";
|
|
50
|
+
};
|
|
51
|
+
readonly placeholder: {
|
|
52
|
+
readonly type: StringConstructor;
|
|
53
|
+
readonly default: undefined;
|
|
54
|
+
};
|
|
55
|
+
readonly disabled: {
|
|
56
|
+
readonly type: BooleanConstructor;
|
|
57
|
+
readonly default: false;
|
|
58
|
+
};
|
|
59
|
+
readonly markdownOptions: {
|
|
60
|
+
readonly type: import("vue").PropType<MarkdownOptions>;
|
|
61
|
+
readonly default: undefined;
|
|
62
|
+
};
|
|
63
|
+
readonly maxRows: {
|
|
64
|
+
readonly type: NumberConstructor;
|
|
65
|
+
readonly default: 5;
|
|
66
|
+
};
|
|
67
|
+
readonly sendIconProps: {
|
|
68
|
+
readonly type: import("vue").PropType<Partial<IconProps>>;
|
|
69
|
+
readonly default: undefined;
|
|
70
|
+
};
|
|
71
|
+
readonly onUpdateValue: {
|
|
72
|
+
readonly type: import("vue").PropType<(value: string) => void>;
|
|
73
|
+
readonly default: undefined;
|
|
74
|
+
};
|
|
75
|
+
readonly onSend: {
|
|
76
|
+
readonly type: import("vue").PropType<(value: string) => void>;
|
|
77
|
+
readonly default: undefined;
|
|
78
|
+
};
|
|
79
|
+
}>> & Readonly<{}>, {
|
|
80
|
+
readonly placeholder: string;
|
|
81
|
+
readonly disabled: boolean;
|
|
82
|
+
readonly value: string;
|
|
83
|
+
readonly onUpdateValue: (value: string) => void;
|
|
84
|
+
readonly markdownOptions: MarkdownOptions;
|
|
85
|
+
readonly maxRows: number;
|
|
86
|
+
readonly sendIconProps: Partial<IconProps>;
|
|
87
|
+
readonly onSend: (value: string) => void;
|
|
88
|
+
}, SlotsType<ChatEditorInputSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
89
|
+
export default _default;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { computed, defineComponent, h, inject } from 'vue';
|
|
2
|
+
import { useConfig, useLocale } from "../../../../_mixins/index.mjs";
|
|
3
|
+
import { UEditor } from "../../../../editor/index.mjs";
|
|
4
|
+
import { chatInjectionKey } from "../../interface.mjs";
|
|
5
|
+
import { chatEditorInputProps } from "./interface.mjs";
|
|
6
|
+
export default defineComponent({
|
|
7
|
+
name: 'ChatEditorInput',
|
|
8
|
+
props: chatEditorInputProps,
|
|
9
|
+
slots: Object,
|
|
10
|
+
setup(props) {
|
|
11
|
+
const UChat = inject(chatInjectionKey, null);
|
|
12
|
+
const {
|
|
13
|
+
mergedClsPrefixRef
|
|
14
|
+
} = useConfig(props);
|
|
15
|
+
const {
|
|
16
|
+
localeRef
|
|
17
|
+
} = useLocale('Chat');
|
|
18
|
+
function handleUpdateValue(value) {
|
|
19
|
+
var _a;
|
|
20
|
+
(_a = props.onUpdateValue) === null || _a === void 0 ? void 0 : _a.call(props, value);
|
|
21
|
+
}
|
|
22
|
+
function handleSend(value) {
|
|
23
|
+
var _a;
|
|
24
|
+
(_a = props.onSend) === null || _a === void 0 ? void 0 : _a.call(props, value);
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
mergedClsPrefix: mergedClsPrefixRef,
|
|
28
|
+
mergedPlaceholder: computed(() => {
|
|
29
|
+
var _a, _b;
|
|
30
|
+
return (_b = (_a = UChat === null || UChat === void 0 ? void 0 : UChat.inputPlaceholderRef.value) !== null && _a !== void 0 ? _a : props.placeholder) !== null && _b !== void 0 ? _b : localeRef.value.inputPlaceholder;
|
|
31
|
+
}),
|
|
32
|
+
mergedMarkdownOptions: computed(() => {
|
|
33
|
+
var _a;
|
|
34
|
+
return (_a = UChat === null || UChat === void 0 ? void 0 : UChat.markdownOptionsRef.value) !== null && _a !== void 0 ? _a : props.markdownOptions;
|
|
35
|
+
}),
|
|
36
|
+
mergedDisabled: computed(() => {
|
|
37
|
+
var _a;
|
|
38
|
+
return props.disabled || !!(UChat === null || UChat === void 0 ? void 0 : UChat.disabledRef.value) || !!((_a = UChat === null || UChat === void 0 ? void 0 : UChat.editMessageIdRef) === null || _a === void 0 ? void 0 : _a.value);
|
|
39
|
+
}),
|
|
40
|
+
mergedSendIconProps: computed(() => {
|
|
41
|
+
var _a;
|
|
42
|
+
return (_a = UChat === null || UChat === void 0 ? void 0 : UChat.footerSuffixIconPropsRef.value) !== null && _a !== void 0 ? _a : props.sendIconProps;
|
|
43
|
+
}),
|
|
44
|
+
handleUpdateValue,
|
|
45
|
+
handleSend
|
|
46
|
+
};
|
|
47
|
+
},
|
|
48
|
+
render() {
|
|
49
|
+
return h(UEditor, {
|
|
50
|
+
value: this.value,
|
|
51
|
+
placeholder: this.mergedPlaceholder,
|
|
52
|
+
markdownOptions: this.mergedMarkdownOptions,
|
|
53
|
+
disabled: this.mergedDisabled,
|
|
54
|
+
class: `${this.mergedClsPrefix}-chat-main__editor`,
|
|
55
|
+
sendIconProps: this.mergedSendIconProps,
|
|
56
|
+
maxRows: this.maxRows,
|
|
57
|
+
onUpdateValue: this.handleUpdateValue,
|
|
58
|
+
onSend: this.handleSend
|
|
59
|
+
}, {
|
|
60
|
+
sendIcon: this.$slots.sendIcon
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { PropType, VNodeChild } from 'vue';
|
|
2
|
+
import type { ExtractPublicPropTypes } from '../../../../_utils';
|
|
3
|
+
import type { MarkdownOptions } from '../../../../_utils/markdown';
|
|
4
|
+
import type { IconProps } from '../../../../icon';
|
|
5
|
+
export interface ChatEditorInputSlots {
|
|
6
|
+
sendIcon?: () => VNodeChild;
|
|
7
|
+
}
|
|
8
|
+
export declare const chatEditorInputProps: {
|
|
9
|
+
readonly value: {
|
|
10
|
+
readonly type: StringConstructor;
|
|
11
|
+
readonly default: "";
|
|
12
|
+
};
|
|
13
|
+
readonly placeholder: {
|
|
14
|
+
readonly type: StringConstructor;
|
|
15
|
+
readonly default: undefined;
|
|
16
|
+
};
|
|
17
|
+
readonly disabled: {
|
|
18
|
+
readonly type: BooleanConstructor;
|
|
19
|
+
readonly default: false;
|
|
20
|
+
};
|
|
21
|
+
readonly markdownOptions: {
|
|
22
|
+
readonly type: PropType<MarkdownOptions>;
|
|
23
|
+
readonly default: undefined;
|
|
24
|
+
};
|
|
25
|
+
readonly maxRows: {
|
|
26
|
+
readonly type: NumberConstructor;
|
|
27
|
+
readonly default: 5;
|
|
28
|
+
};
|
|
29
|
+
readonly sendIconProps: {
|
|
30
|
+
readonly type: PropType<Partial<IconProps>>;
|
|
31
|
+
readonly default: undefined;
|
|
32
|
+
};
|
|
33
|
+
readonly onUpdateValue: {
|
|
34
|
+
readonly type: PropType<(value: string) => void>;
|
|
35
|
+
readonly default: undefined;
|
|
36
|
+
};
|
|
37
|
+
readonly onSend: {
|
|
38
|
+
readonly type: PropType<(value: string) => void>;
|
|
39
|
+
readonly default: undefined;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
export type ChatEditorInputProps = ExtractPublicPropTypes<typeof chatEditorInputProps>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export const chatEditorInputProps = {
|
|
2
|
+
value: {
|
|
3
|
+
type: String,
|
|
4
|
+
default: ''
|
|
5
|
+
},
|
|
6
|
+
placeholder: {
|
|
7
|
+
type: String,
|
|
8
|
+
default: undefined
|
|
9
|
+
},
|
|
10
|
+
disabled: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: false
|
|
13
|
+
},
|
|
14
|
+
markdownOptions: {
|
|
15
|
+
type: Object,
|
|
16
|
+
default: undefined
|
|
17
|
+
},
|
|
18
|
+
maxRows: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 5
|
|
21
|
+
},
|
|
22
|
+
sendIconProps: {
|
|
23
|
+
type: Object,
|
|
24
|
+
default: undefined
|
|
25
|
+
},
|
|
26
|
+
onUpdateValue: {
|
|
27
|
+
type: Function,
|
|
28
|
+
default: undefined
|
|
29
|
+
},
|
|
30
|
+
onSend: {
|
|
31
|
+
type: Function,
|
|
32
|
+
default: undefined
|
|
33
|
+
}
|
|
34
|
+
};
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import type { SlotsType } from 'vue';
|
|
2
|
+
import type { UploadProps } from '../../../../upload';
|
|
3
|
+
import type { ChatFooterSlots } from './interface';
|
|
4
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
5
|
+
readonly value: {
|
|
6
|
+
readonly type: StringConstructor;
|
|
7
|
+
readonly default: "";
|
|
8
|
+
};
|
|
9
|
+
readonly editingMessage: {
|
|
10
|
+
readonly type: import("vue").PropType<import("../../interface").ChatMessageData | null>;
|
|
11
|
+
readonly default: null;
|
|
12
|
+
};
|
|
13
|
+
readonly showAttachButton: {
|
|
14
|
+
readonly type: BooleanConstructor;
|
|
15
|
+
readonly default: true;
|
|
16
|
+
};
|
|
17
|
+
readonly fileList: {
|
|
18
|
+
readonly type: import("vue").PropType<import("../../../..").UploadFileInfo[]>;
|
|
19
|
+
readonly default: () => never[];
|
|
20
|
+
};
|
|
21
|
+
readonly uploadProps: {
|
|
22
|
+
readonly type: import("vue").PropType<Partial<UploadProps>>;
|
|
23
|
+
readonly default: undefined;
|
|
24
|
+
};
|
|
25
|
+
readonly legacy: {
|
|
26
|
+
readonly type: BooleanConstructor;
|
|
27
|
+
readonly default: undefined;
|
|
28
|
+
};
|
|
29
|
+
readonly onUpdateFileList: {
|
|
30
|
+
readonly type: import("vue").PropType<(fileList: import("../../../..").UploadFileInfo[]) => void>;
|
|
31
|
+
readonly default: undefined;
|
|
32
|
+
};
|
|
33
|
+
readonly onUploadChange: {
|
|
34
|
+
readonly type: import("vue").PropType<(data: import("../../../../upload/src/interface").OnChangePayload) => void>;
|
|
35
|
+
readonly default: undefined;
|
|
36
|
+
};
|
|
37
|
+
readonly onUpdateValue: {
|
|
38
|
+
readonly type: import("vue").PropType<(value: string) => void>;
|
|
39
|
+
readonly default: undefined;
|
|
40
|
+
};
|
|
41
|
+
readonly onSend: {
|
|
42
|
+
readonly type: import("vue").PropType<(value: string) => void>;
|
|
43
|
+
readonly default: undefined;
|
|
44
|
+
};
|
|
45
|
+
readonly onCancelEditing: {
|
|
46
|
+
readonly type: import("vue").PropType<VoidFunction>;
|
|
47
|
+
readonly default: undefined;
|
|
48
|
+
};
|
|
49
|
+
}>, {
|
|
50
|
+
mergedClsPrefix: import("vue").Ref<string, string>;
|
|
51
|
+
mergedLegacy: import("vue").ComputedRef<boolean>;
|
|
52
|
+
mergedUploadProps: import("vue").ComputedRef<Partial<UploadProps> | undefined>;
|
|
53
|
+
handleUpdateValue: (value: string) => void;
|
|
54
|
+
handleSend: (value: string) => void;
|
|
55
|
+
handleLegacySend: () => void;
|
|
56
|
+
handleCancelEditing: () => void;
|
|
57
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
58
|
+
readonly value: {
|
|
59
|
+
readonly type: StringConstructor;
|
|
60
|
+
readonly default: "";
|
|
61
|
+
};
|
|
62
|
+
readonly editingMessage: {
|
|
63
|
+
readonly type: import("vue").PropType<import("../../interface").ChatMessageData | null>;
|
|
64
|
+
readonly default: null;
|
|
65
|
+
};
|
|
66
|
+
readonly showAttachButton: {
|
|
67
|
+
readonly type: BooleanConstructor;
|
|
68
|
+
readonly default: true;
|
|
69
|
+
};
|
|
70
|
+
readonly fileList: {
|
|
71
|
+
readonly type: import("vue").PropType<import("../../../..").UploadFileInfo[]>;
|
|
72
|
+
readonly default: () => never[];
|
|
73
|
+
};
|
|
74
|
+
readonly uploadProps: {
|
|
75
|
+
readonly type: import("vue").PropType<Partial<UploadProps>>;
|
|
76
|
+
readonly default: undefined;
|
|
77
|
+
};
|
|
78
|
+
readonly legacy: {
|
|
79
|
+
readonly type: BooleanConstructor;
|
|
80
|
+
readonly default: undefined;
|
|
81
|
+
};
|
|
82
|
+
readonly onUpdateFileList: {
|
|
83
|
+
readonly type: import("vue").PropType<(fileList: import("../../../..").UploadFileInfo[]) => void>;
|
|
84
|
+
readonly default: undefined;
|
|
85
|
+
};
|
|
86
|
+
readonly onUploadChange: {
|
|
87
|
+
readonly type: import("vue").PropType<(data: import("../../../../upload/src/interface").OnChangePayload) => void>;
|
|
88
|
+
readonly default: undefined;
|
|
89
|
+
};
|
|
90
|
+
readonly onUpdateValue: {
|
|
91
|
+
readonly type: import("vue").PropType<(value: string) => void>;
|
|
92
|
+
readonly default: undefined;
|
|
93
|
+
};
|
|
94
|
+
readonly onSend: {
|
|
95
|
+
readonly type: import("vue").PropType<(value: string) => void>;
|
|
96
|
+
readonly default: undefined;
|
|
97
|
+
};
|
|
98
|
+
readonly onCancelEditing: {
|
|
99
|
+
readonly type: import("vue").PropType<VoidFunction>;
|
|
100
|
+
readonly default: undefined;
|
|
101
|
+
};
|
|
102
|
+
}>> & Readonly<{}>, {
|
|
103
|
+
readonly value: string;
|
|
104
|
+
readonly onUpdateValue: (value: string) => void;
|
|
105
|
+
readonly fileList: import("../../../..").UploadFileInfo[];
|
|
106
|
+
readonly onUpdateFileList: (fileList: import("../../../..").UploadFileInfo[]) => void;
|
|
107
|
+
readonly uploadProps: Partial<UploadProps>;
|
|
108
|
+
readonly legacy: boolean;
|
|
109
|
+
readonly showAttachButton: boolean;
|
|
110
|
+
readonly editingMessage: import("../../interface").ChatMessageData | null;
|
|
111
|
+
readonly onSend: (value: string) => void;
|
|
112
|
+
readonly onUploadChange: (data: import("../../../../upload/src/interface").OnChangePayload) => void;
|
|
113
|
+
readonly onCancelEditing: VoidFunction;
|
|
114
|
+
}, SlotsType<ChatFooterSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
115
|
+
export default _default;
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { computed, defineComponent, Fragment, h, inject } from 'vue';
|
|
2
|
+
import { useConfig } from "../../../../_mixins/index.mjs";
|
|
3
|
+
import { UFlex } from "../../../../flex/index.mjs";
|
|
4
|
+
import { UUpload } from "../../../../upload/index.mjs";
|
|
5
|
+
import { chatInjectionKey } from "../../interface.mjs";
|
|
6
|
+
import ChatAttachmentButton from "../ChatAttachmentButton/ChatAttachmentButton.mjs";
|
|
7
|
+
import ChatEditingBlock from "../ChatEditingBlock/ChatEditingBlock.mjs";
|
|
8
|
+
import ChatEditorInput from "../ChatEditorInput/ChatEditorInput.mjs";
|
|
9
|
+
import ChatLegacyInput from "../ChatLegacyInput/ChatLegacyInput.mjs";
|
|
10
|
+
import { chatFooterProps } from "./interface.mjs";
|
|
11
|
+
export default defineComponent({
|
|
12
|
+
name: 'ChatFooter',
|
|
13
|
+
props: chatFooterProps,
|
|
14
|
+
slots: Object,
|
|
15
|
+
setup(props) {
|
|
16
|
+
const UChat = inject(chatInjectionKey, null);
|
|
17
|
+
const {
|
|
18
|
+
mergedClsPrefixRef
|
|
19
|
+
} = useConfig(props);
|
|
20
|
+
function handleUpdateValue(value) {
|
|
21
|
+
var _a;
|
|
22
|
+
(_a = props.onUpdateValue) === null || _a === void 0 ? void 0 : _a.call(props, value);
|
|
23
|
+
}
|
|
24
|
+
function handleSend(value) {
|
|
25
|
+
var _a;
|
|
26
|
+
(_a = props.onSend) === null || _a === void 0 ? void 0 : _a.call(props, value);
|
|
27
|
+
}
|
|
28
|
+
function handleLegacySend() {
|
|
29
|
+
var _a;
|
|
30
|
+
(_a = props.onSend) === null || _a === void 0 ? void 0 : _a.call(props, props.value);
|
|
31
|
+
}
|
|
32
|
+
function handleCancelEditing() {
|
|
33
|
+
var _a;
|
|
34
|
+
(_a = props.onCancelEditing) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
mergedClsPrefix: mergedClsPrefixRef,
|
|
38
|
+
mergedLegacy: computed(() => {
|
|
39
|
+
var _a;
|
|
40
|
+
return (_a = UChat === null || UChat === void 0 ? void 0 : UChat.legacyInputRef.value) !== null && _a !== void 0 ? _a : !!props.legacy;
|
|
41
|
+
}),
|
|
42
|
+
mergedUploadProps: computed(() => {
|
|
43
|
+
var _a;
|
|
44
|
+
return (_a = UChat === null || UChat === void 0 ? void 0 : UChat.footerUploadPropsRef.value) !== null && _a !== void 0 ? _a : props.uploadProps;
|
|
45
|
+
}),
|
|
46
|
+
handleUpdateValue,
|
|
47
|
+
handleSend,
|
|
48
|
+
handleLegacySend,
|
|
49
|
+
handleCancelEditing
|
|
50
|
+
};
|
|
51
|
+
},
|
|
52
|
+
render() {
|
|
53
|
+
const {
|
|
54
|
+
mergedClsPrefix,
|
|
55
|
+
mergedLegacy
|
|
56
|
+
} = this;
|
|
57
|
+
const renderEditingBlock = () => h(ChatEditingBlock, {
|
|
58
|
+
message: this.editingMessage,
|
|
59
|
+
onCancel: this.handleCancelEditing
|
|
60
|
+
});
|
|
61
|
+
return h("div", {
|
|
62
|
+
class: `${mergedClsPrefix}-chat-main__footer`
|
|
63
|
+
}, h(UUpload, Object.assign({
|
|
64
|
+
abstract: true,
|
|
65
|
+
multiple: true,
|
|
66
|
+
defaultUpload: false,
|
|
67
|
+
fileList: this.fileList,
|
|
68
|
+
onUpdateFileList: this.onUpdateFileList
|
|
69
|
+
}, this.mergedUploadProps, {
|
|
70
|
+
onChange: this.onUploadChange
|
|
71
|
+
}), {
|
|
72
|
+
default: () => h(Fragment, null, !mergedLegacy && renderEditingBlock(), h(UFlex, {
|
|
73
|
+
align: "end",
|
|
74
|
+
size: "small",
|
|
75
|
+
wrap: false,
|
|
76
|
+
class: `${mergedClsPrefix}-chat-main__input-container`
|
|
77
|
+
}, {
|
|
78
|
+
default: () => h(Fragment, null, h(ChatAttachmentButton, {
|
|
79
|
+
show: this.showAttachButton
|
|
80
|
+
}, {
|
|
81
|
+
icon: this.$slots.attachIcon
|
|
82
|
+
}), mergedLegacy ? h(ChatLegacyInput, {
|
|
83
|
+
value: this.value,
|
|
84
|
+
onUpdateValue: this.handleUpdateValue,
|
|
85
|
+
onSend: this.handleLegacySend
|
|
86
|
+
}, {
|
|
87
|
+
prefix: renderEditingBlock,
|
|
88
|
+
suffixIcon: this.$slots.suffixIcon
|
|
89
|
+
}) : h(ChatEditorInput, {
|
|
90
|
+
value: this.value,
|
|
91
|
+
onUpdateValue: this.handleUpdateValue,
|
|
92
|
+
onSend: this.handleSend
|
|
93
|
+
}, {
|
|
94
|
+
sendIcon: this.$slots.suffixIcon
|
|
95
|
+
}))
|
|
96
|
+
}))
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { PropType, VNodeChild } from 'vue';
|
|
2
|
+
import type { ExtractPublicPropTypes } from '../../../../_utils';
|
|
3
|
+
import type { UploadFileInfo, UploadProps } from '../../../../upload';
|
|
4
|
+
import type { OnChangePayload } from '../../../../upload/src/interface';
|
|
5
|
+
import type { ChatMessageData } from '../../interface';
|
|
6
|
+
export interface ChatFooterSlots {
|
|
7
|
+
attachIcon?: () => VNodeChild;
|
|
8
|
+
suffixIcon?: () => VNodeChild;
|
|
9
|
+
}
|
|
10
|
+
export declare const chatFooterProps: {
|
|
11
|
+
readonly value: {
|
|
12
|
+
readonly type: StringConstructor;
|
|
13
|
+
readonly default: "";
|
|
14
|
+
};
|
|
15
|
+
readonly editingMessage: {
|
|
16
|
+
readonly type: PropType<ChatMessageData | null>;
|
|
17
|
+
readonly default: null;
|
|
18
|
+
};
|
|
19
|
+
readonly showAttachButton: {
|
|
20
|
+
readonly type: BooleanConstructor;
|
|
21
|
+
readonly default: true;
|
|
22
|
+
};
|
|
23
|
+
readonly fileList: {
|
|
24
|
+
readonly type: PropType<UploadFileInfo[]>;
|
|
25
|
+
readonly default: () => never[];
|
|
26
|
+
};
|
|
27
|
+
readonly uploadProps: {
|
|
28
|
+
readonly type: PropType<Partial<UploadProps>>;
|
|
29
|
+
readonly default: undefined;
|
|
30
|
+
};
|
|
31
|
+
readonly legacy: {
|
|
32
|
+
readonly type: BooleanConstructor;
|
|
33
|
+
readonly default: undefined;
|
|
34
|
+
};
|
|
35
|
+
readonly onUpdateFileList: {
|
|
36
|
+
readonly type: PropType<(fileList: UploadFileInfo[]) => void>;
|
|
37
|
+
readonly default: undefined;
|
|
38
|
+
};
|
|
39
|
+
readonly onUploadChange: {
|
|
40
|
+
readonly type: PropType<(data: OnChangePayload) => void>;
|
|
41
|
+
readonly default: undefined;
|
|
42
|
+
};
|
|
43
|
+
readonly onUpdateValue: {
|
|
44
|
+
readonly type: PropType<(value: string) => void>;
|
|
45
|
+
readonly default: undefined;
|
|
46
|
+
};
|
|
47
|
+
readonly onSend: {
|
|
48
|
+
readonly type: PropType<(value: string) => void>;
|
|
49
|
+
readonly default: undefined;
|
|
50
|
+
};
|
|
51
|
+
readonly onCancelEditing: {
|
|
52
|
+
readonly type: PropType<VoidFunction>;
|
|
53
|
+
readonly default: undefined;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
export type ChatFooterProps = ExtractPublicPropTypes<typeof chatFooterProps>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
export const chatFooterProps = {
|
|
2
|
+
value: {
|
|
3
|
+
type: String,
|
|
4
|
+
default: ''
|
|
5
|
+
},
|
|
6
|
+
editingMessage: {
|
|
7
|
+
type: Object,
|
|
8
|
+
default: null
|
|
9
|
+
},
|
|
10
|
+
showAttachButton: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
default: true
|
|
13
|
+
},
|
|
14
|
+
fileList: {
|
|
15
|
+
type: Array,
|
|
16
|
+
default: () => []
|
|
17
|
+
},
|
|
18
|
+
uploadProps: {
|
|
19
|
+
type: Object,
|
|
20
|
+
default: undefined
|
|
21
|
+
},
|
|
22
|
+
legacy: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: undefined
|
|
25
|
+
},
|
|
26
|
+
onUpdateFileList: {
|
|
27
|
+
type: Function,
|
|
28
|
+
default: undefined
|
|
29
|
+
},
|
|
30
|
+
onUploadChange: {
|
|
31
|
+
type: Function,
|
|
32
|
+
default: undefined
|
|
33
|
+
},
|
|
34
|
+
onUpdateValue: {
|
|
35
|
+
type: Function,
|
|
36
|
+
default: undefined
|
|
37
|
+
},
|
|
38
|
+
onSend: {
|
|
39
|
+
type: Function,
|
|
40
|
+
default: undefined
|
|
41
|
+
},
|
|
42
|
+
onCancelEditing: {
|
|
43
|
+
type: Function,
|
|
44
|
+
default: undefined
|
|
45
|
+
}
|
|
46
|
+
};
|