@uzum-tech/ui 2.3.7 → 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 +186 -180
- 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 +18 -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
|
@@ -8,38 +8,19 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
-
var t = {};
|
|
13
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
-
t[p] = s[p];
|
|
15
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
-
t[p[i]] = s[p[i]];
|
|
19
|
-
}
|
|
20
|
-
return t;
|
|
21
|
-
};
|
|
22
11
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
23
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
24
13
|
};
|
|
25
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
15
|
exports.chatMainAreaProps = void 0;
|
|
27
16
|
const vue_1 = require("vue");
|
|
28
|
-
const icons_1 = require("../../_internal/icons");
|
|
29
17
|
const _mixins_1 = require("../../_mixins");
|
|
30
|
-
const _utils_1 = require("../../_utils");
|
|
31
18
|
const markdown_1 = require("../../_utils/markdown");
|
|
32
|
-
const button_1 = require("../../button");
|
|
33
|
-
const flex_1 = require("../../flex");
|
|
34
|
-
const icon_1 = require("../../icon");
|
|
35
|
-
const input_1 = require("../../input");
|
|
36
|
-
const list_1 = require("../../list");
|
|
37
19
|
const safe_top_scrollbar_1 = require("../../safe-top-scrollbar");
|
|
38
|
-
const tooltip_1 = require("../../tooltip");
|
|
39
|
-
const typography_1 = require("../../typography");
|
|
40
|
-
const upload_1 = require("../../upload");
|
|
41
20
|
const styles_1 = require("../styles");
|
|
42
|
-
const
|
|
21
|
+
const ChatFooter_1 = __importDefault(require("./ChatParts/ChatFooter/ChatFooter"));
|
|
22
|
+
const ChatHeader_1 = __importDefault(require("./ChatParts/ChatHeader/ChatHeader"));
|
|
23
|
+
const ChatMessagesArea_1 = __importDefault(require("./ChatParts/ChatMessagesArea/ChatMessagesArea"));
|
|
43
24
|
const interface_1 = require("./interface");
|
|
44
25
|
const index_cssr_1 = __importDefault(require("./styles/index.cssr"));
|
|
45
26
|
const SENDING_DELAY = 100;
|
|
@@ -61,6 +42,12 @@ exports.chatMainAreaProps = Object.assign(Object.assign({}, _mixins_1.useTheme.p
|
|
|
61
42
|
}, loadingCount: {
|
|
62
43
|
type: Number,
|
|
63
44
|
default: 10
|
|
45
|
+
}, disabled: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: false
|
|
48
|
+
}, legacyInput: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false
|
|
64
51
|
}, headerButtonProps: {
|
|
65
52
|
type: Object,
|
|
66
53
|
default: undefined
|
|
@@ -170,63 +157,60 @@ exports.chatMainAreaProps = Object.assign(Object.assign({}, _mixins_1.useTheme.p
|
|
|
170
157
|
exports.default = (0, vue_1.defineComponent)({
|
|
171
158
|
name: 'ChatMainArea',
|
|
172
159
|
props: exports.chatMainAreaProps,
|
|
173
|
-
setup(props
|
|
174
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20;
|
|
160
|
+
setup(props) {
|
|
161
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22;
|
|
175
162
|
const UChat = (0, vue_1.inject)(interface_1.chatInjectionKey, null);
|
|
176
163
|
const isStandalone = !UChat;
|
|
177
164
|
const { mergedClsPrefixRef } = (0, _mixins_1.useConfig)(props);
|
|
178
165
|
const mergedThemeRef = (_a = UChat === null || UChat === void 0 ? void 0 : UChat.mergedThemeRef) !== null && _a !== void 0 ? _a : (0, _mixins_1.useTheme)('Chat', '-chat', index_cssr_1.default, styles_1.chatLight, props, mergedClsPrefixRef);
|
|
179
166
|
const { localeRef } = (0, _mixins_1.useLocale)('Chat');
|
|
180
167
|
const selectedChatRef = (_b = UChat === null || UChat === void 0 ? void 0 : UChat.selectedChatRef) !== null && _b !== void 0 ? _b : (0, vue_1.toRef)(props, 'selectedChat');
|
|
181
|
-
const
|
|
182
|
-
const
|
|
183
|
-
const
|
|
184
|
-
const
|
|
185
|
-
const
|
|
186
|
-
const
|
|
187
|
-
const
|
|
188
|
-
const
|
|
189
|
-
const
|
|
190
|
-
const
|
|
191
|
-
const
|
|
192
|
-
const
|
|
193
|
-
const
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
const
|
|
200
|
-
const
|
|
201
|
-
const
|
|
202
|
-
const
|
|
203
|
-
const
|
|
204
|
-
const
|
|
205
|
-
const
|
|
206
|
-
const
|
|
207
|
-
const
|
|
208
|
-
const
|
|
209
|
-
const
|
|
210
|
-
const notificationsShownSetRef = (_2 = UChat === null || UChat === void 0 ? void 0 : UChat.notificationsShownSetRef) !== null && _2 !== void 0 ? _2 : (0, vue_1.ref)(new Set());
|
|
211
|
-
const unreadCountsBeforeReadRef = (_3 = UChat === null || UChat === void 0 ? void 0 : UChat.unreadCountsBeforeReadRef) !== null && _3 !== void 0 ? _3 : (0, vue_1.ref)({});
|
|
212
|
-
const markNotificationShown = (_4 = UChat === null || UChat === void 0 ? void 0 : UChat.markNotificationShown) !== null && _4 !== void 0 ? _4 : ((chatId) => {
|
|
168
|
+
const legacyInputRef = (_c = UChat === null || UChat === void 0 ? void 0 : UChat.legacyInputRef) !== null && _c !== void 0 ? _c : (0, vue_1.toRef)(props, 'legacyInput');
|
|
169
|
+
const disabledRef = (_d = UChat === null || UChat === void 0 ? void 0 : UChat.disabledRef) !== null && _d !== void 0 ? _d : (0, vue_1.toRef)(props, 'disabled');
|
|
170
|
+
const messagesRef = (_e = UChat === null || UChat === void 0 ? void 0 : UChat.messagesRef) !== null && _e !== void 0 ? _e : (0, vue_1.toRef)(props, 'messages');
|
|
171
|
+
const typingChatIdsRef = (_f = UChat === null || UChat === void 0 ? void 0 : UChat.typingChatIdsRef) !== null && _f !== void 0 ? _f : (0, vue_1.toRef)(props, 'typingChatIds');
|
|
172
|
+
const messagesLoadingRef = (_g = UChat === null || UChat === void 0 ? void 0 : UChat.messagesLoadingRef) !== null && _g !== void 0 ? _g : (0, vue_1.toRef)(props, 'loading');
|
|
173
|
+
const messagesLoadingCountRef = (_h = UChat === null || UChat === void 0 ? void 0 : UChat.messagesLoadingCountRef) !== null && _h !== void 0 ? _h : (0, vue_1.toRef)(props, 'loadingCount');
|
|
174
|
+
const headerButtonPropsRef = (_j = UChat === null || UChat === void 0 ? void 0 : UChat.headerButtonPropsRef) !== null && _j !== void 0 ? _j : (0, vue_1.toRef)(props, 'headerButtonProps');
|
|
175
|
+
const headerIconPropsRef = (_k = UChat === null || UChat === void 0 ? void 0 : UChat.headerIconPropsRef) !== null && _k !== void 0 ? _k : (0, vue_1.toRef)(props, 'headerIconProps');
|
|
176
|
+
const headerShareButtonPropsRef = (_l = UChat === null || UChat === void 0 ? void 0 : UChat.headerShareButtonPropsRef) !== null && _l !== void 0 ? _l : (0, vue_1.toRef)(props, 'headerShareButtonProps');
|
|
177
|
+
const headerProfileButtonPropsRef = (_m = UChat === null || UChat === void 0 ? void 0 : UChat.headerProfileButtonPropsRef) !== null && _m !== void 0 ? _m : (0, vue_1.toRef)(props, 'headerProfileButtonProps');
|
|
178
|
+
const headerCloseButtonPropsRef = (_o = UChat === null || UChat === void 0 ? void 0 : UChat.headerCloseButtonPropsRef) !== null && _o !== void 0 ? _o : (0, vue_1.toRef)(props, 'headerCloseButtonProps');
|
|
179
|
+
const headerShareIconPropsRef = (_p = UChat === null || UChat === void 0 ? void 0 : UChat.headerShareIconPropsRef) !== null && _p !== void 0 ? _p : (0, vue_1.toRef)(props, 'headerShareIconProps');
|
|
180
|
+
const headerProfileIconPropsRef = (_q = UChat === null || UChat === void 0 ? void 0 : UChat.headerProfileIconPropsRef) !== null && _q !== void 0 ? _q : (0, vue_1.toRef)(props, 'headerProfileIconProps');
|
|
181
|
+
const messageUploadPropsRef = (_r = UChat === null || UChat === void 0 ? void 0 : UChat.messageUploadPropsRef) !== null && _r !== void 0 ? _r : (0, vue_1.toRef)(props, 'messageUploadProps');
|
|
182
|
+
const footerInputPropsRef = (_s = UChat === null || UChat === void 0 ? void 0 : UChat.footerInputPropsRef) !== null && _s !== void 0 ? _s : (0, vue_1.toRef)(props, 'footerInputProps');
|
|
183
|
+
const footerButtonPropsRef = (_t = UChat === null || UChat === void 0 ? void 0 : UChat.footerButtonPropsRef) !== null && _t !== void 0 ? _t : (0, vue_1.toRef)(props, 'footerButtonProps');
|
|
184
|
+
const footerUploadPropsRef = (_u = UChat === null || UChat === void 0 ? void 0 : UChat.footerUploadPropsRef) !== null && _u !== void 0 ? _u : (0, vue_1.toRef)(props, 'footerUploadProps');
|
|
185
|
+
const footerIconPropsRef = (_v = UChat === null || UChat === void 0 ? void 0 : UChat.footerIconPropsRef) !== null && _v !== void 0 ? _v : (0, vue_1.toRef)(props, 'footerIconProps');
|
|
186
|
+
const footerSuffixIconPropsRef = (_w = UChat === null || UChat === void 0 ? void 0 : UChat.footerSuffixIconPropsRef) !== null && _w !== void 0 ? _w : (0, vue_1.toRef)(props, 'footerSuffixIconProps');
|
|
187
|
+
const inputPlaceholderRef = (_x = UChat === null || UChat === void 0 ? void 0 : UChat.inputPlaceholderRef) !== null && _x !== void 0 ? _x : (0, vue_1.computed)(() => { var _a; return (_a = props.inputPlaceholder) !== null && _a !== void 0 ? _a : localeRef.value.inputPlaceholder; });
|
|
188
|
+
const retryTextRef = (_y = UChat === null || UChat === void 0 ? void 0 : UChat.retryTextRef) !== null && _y !== void 0 ? _y : (0, vue_1.computed)(() => { var _a; return (_a = props.retryText) !== null && _a !== void 0 ? _a : localeRef.value.retryText; });
|
|
189
|
+
const typingTextRef = (_z = UChat === null || UChat === void 0 ? void 0 : UChat.typingTextRef) !== null && _z !== void 0 ? _z : (0, vue_1.computed)(() => { var _a; return (_a = props.typingText) !== null && _a !== void 0 ? _a : localeRef.value.typingText; });
|
|
190
|
+
const closeButtonTextRef = (_0 = UChat === null || UChat === void 0 ? void 0 : UChat.closeButtonTextRef) !== null && _0 !== void 0 ? _0 : (0, vue_1.computed)(() => { var _a; return (_a = props.closeButtonText) !== null && _a !== void 0 ? _a : localeRef.value.closeButtonText; });
|
|
191
|
+
const shareButtonTooltipRef = (_1 = UChat === null || UChat === void 0 ? void 0 : UChat.shareButtonTooltipRef) !== null && _1 !== void 0 ? _1 : (0, vue_1.computed)(() => { var _a; return (_a = props.shareButtonTooltip) !== null && _a !== void 0 ? _a : localeRef.value.shareButtonTooltip; });
|
|
192
|
+
const profileButtonTooltipRef = (_2 = UChat === null || UChat === void 0 ? void 0 : UChat.profileButtonTooltipRef) !== null && _2 !== void 0 ? _2 : (0, vue_1.computed)(() => { var _a; return (_a = props.profileButtonTooltip) !== null && _a !== void 0 ? _a : localeRef.value.profileButtonTooltip; });
|
|
193
|
+
const unreadNotificationTextRef = (_3 = UChat === null || UChat === void 0 ? void 0 : UChat.unreadNotificationTextRef) !== null && _3 !== void 0 ? _3 : (0, vue_1.computed)(() => { var _a; return (_a = props.unreadNotificationText) !== null && _a !== void 0 ? _a : localeRef.value.unreadNotificationText; });
|
|
194
|
+
const notificationsShownSetRef = (_4 = UChat === null || UChat === void 0 ? void 0 : UChat.notificationsShownSetRef) !== null && _4 !== void 0 ? _4 : (0, vue_1.ref)(new Set());
|
|
195
|
+
const unreadCountsBeforeReadRef = (_5 = UChat === null || UChat === void 0 ? void 0 : UChat.unreadCountsBeforeReadRef) !== null && _5 !== void 0 ? _5 : (0, vue_1.ref)({});
|
|
196
|
+
const markNotificationShown = (_6 = UChat === null || UChat === void 0 ? void 0 : UChat.markNotificationShown) !== null && _6 !== void 0 ? _6 : ((chatId) => {
|
|
213
197
|
notificationsShownSetRef.value.add(chatId);
|
|
214
198
|
notificationsShownSetRef.value = new Set(notificationsShownSetRef.value);
|
|
215
199
|
});
|
|
216
|
-
const editMessageIdRef = (
|
|
217
|
-
const startEditingMessageRef = (
|
|
218
|
-
const bubbleActionsRef = (
|
|
219
|
-
const markdownRef = (
|
|
220
|
-
const markdownOptionsRef = (
|
|
221
|
-
const handleMessageSend = (
|
|
222
|
-
const handleMessageRetry = (
|
|
223
|
-
const handleFooterInputChange = (
|
|
224
|
-
const onAttachmentUpload = (
|
|
225
|
-
const onChatClose = (
|
|
226
|
-
const onChatShare = (
|
|
227
|
-
const onUserProfile = (
|
|
228
|
-
const onMessagesScrollToTop = (
|
|
229
|
-
const onMessagesScrollToBottom = (
|
|
200
|
+
const editMessageIdRef = (_7 = UChat === null || UChat === void 0 ? void 0 : UChat.editMessageIdRef) !== null && _7 !== void 0 ? _7 : (0, vue_1.ref)(null);
|
|
201
|
+
const startEditingMessageRef = (_8 = UChat === null || UChat === void 0 ? void 0 : UChat.startEditingMessage) !== null && _8 !== void 0 ? _8 : (0, vue_1.ref)();
|
|
202
|
+
const bubbleActionsRef = (_9 = UChat === null || UChat === void 0 ? void 0 : UChat.bubbleActionsRef) !== null && _9 !== void 0 ? _9 : (0, vue_1.toRef)(props, 'bubbleActions');
|
|
203
|
+
const markdownRef = (_10 = UChat === null || UChat === void 0 ? void 0 : UChat.markdownRef) !== null && _10 !== void 0 ? _10 : (0, vue_1.toRef)(props, 'markdown');
|
|
204
|
+
const markdownOptionsRef = (_11 = UChat === null || UChat === void 0 ? void 0 : UChat.markdownOptionsRef) !== null && _11 !== void 0 ? _11 : (0, vue_1.toRef)(props, 'markdownOptions');
|
|
205
|
+
const handleMessageSend = (_12 = UChat === null || UChat === void 0 ? void 0 : UChat.handleMessageSend) !== null && _12 !== void 0 ? _12 : ((content, attachments) => { var _a; return (_a = props.onMessageSend) === null || _a === void 0 ? void 0 : _a.call(props, content, attachments); });
|
|
206
|
+
const handleMessageRetry = (_13 = UChat === null || UChat === void 0 ? void 0 : UChat.handleMessageRetry) !== null && _13 !== void 0 ? _13 : ((message) => { var _a; return (_a = props.onMessageRetry) === null || _a === void 0 ? void 0 : _a.call(props, message); });
|
|
207
|
+
const handleFooterInputChange = (_14 = UChat === null || UChat === void 0 ? void 0 : UChat.handleFooterInputChange) !== null && _14 !== void 0 ? _14 : ((value, chatId) => { var _a; return (_a = props.onFooterInputChange) === null || _a === void 0 ? void 0 : _a.call(props, value, chatId); });
|
|
208
|
+
const onAttachmentUpload = (_15 = UChat === null || UChat === void 0 ? void 0 : UChat.onAttachmentUpload) !== null && _15 !== void 0 ? _15 : (0, vue_1.toRef)(props, 'onAttachmentUpload');
|
|
209
|
+
const onChatClose = (_16 = UChat === null || UChat === void 0 ? void 0 : UChat.onChatClose) !== null && _16 !== void 0 ? _16 : (0, vue_1.toRef)(props, 'onChatClose');
|
|
210
|
+
const onChatShare = (_17 = UChat === null || UChat === void 0 ? void 0 : UChat.onChatShare) !== null && _17 !== void 0 ? _17 : (0, vue_1.toRef)(props, 'onChatShare');
|
|
211
|
+
const onUserProfile = (_18 = UChat === null || UChat === void 0 ? void 0 : UChat.onUserProfile) !== null && _18 !== void 0 ? _18 : (0, vue_1.toRef)(props, 'onUserProfile');
|
|
212
|
+
const onMessagesScrollToTop = (_19 = UChat === null || UChat === void 0 ? void 0 : UChat.onMessagesScrollToTop) !== null && _19 !== void 0 ? _19 : (0, vue_1.toRef)(props, 'onMessagesScrollToTop');
|
|
213
|
+
const onMessagesScrollToBottom = (_20 = UChat === null || UChat === void 0 ? void 0 : UChat.onMessagesScrollToBottom) !== null && _20 !== void 0 ? _20 : (0, vue_1.toRef)(props, 'onMessagesScrollToBottom');
|
|
230
214
|
const cssVarsRef = (0, vue_1.computed)(() => {
|
|
231
215
|
const { common: { cubicBezierEaseInOut, brandPrimary500, staticGreen, staticRed, textPrimary, textSecondary, textTertiary }, self: { backgroundColor, borderColor, sidebarItemSubtitleColor, mainBackgroundColor, headerBackgroundColor, headerBorderColor, headerTitleColor, messageBubbleBackgroundColorOwn, messageBubbleBackgroundColorOther, messageBubbleTextColorOwn, messageBubbleTextColorOther, messageTimeColor, messageStatusColor, attachmentBackgroundColorOwn, attachmentBackgroundColorOther, footerBackgroundColor, footerBorderColor, inputBackgroundColor, inputBorderColor, inputSuffixColor, unreadNotificationBackgroundColor, unreadNotificationTextColor, typingIndicatorColor, dateSeparatorColor, dateSeparatorBackgroundColor, borderRadius, errorColor } } = mergedThemeRef.value;
|
|
232
216
|
return {
|
|
@@ -267,9 +251,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
267
251
|
});
|
|
268
252
|
const themeClassHandle = (0, _mixins_1.useThemeClass)('chat-main-area', (0, vue_1.computed)(() => ''), cssVarsRef, props);
|
|
269
253
|
const messagesBodyRef = (0, vue_1.ref)();
|
|
270
|
-
const
|
|
271
|
-
const
|
|
272
|
-
const handleInputValueChange = (_20 = UChat === null || UChat === void 0 ? void 0 : UChat.handleInputValueChange) !== null && _20 !== void 0 ? _20 : ((value) => {
|
|
254
|
+
const uncontrolledInputValueRef = (0, vue_1.ref)((_21 = props.inputValue) !== null && _21 !== void 0 ? _21 : '');
|
|
255
|
+
const handleInputValueChange = (_22 = UChat === null || UChat === void 0 ? void 0 : UChat.handleInputValueChange) !== null && _22 !== void 0 ? _22 : ((value) => {
|
|
273
256
|
var _a;
|
|
274
257
|
uncontrolledInputValueRef.value = value;
|
|
275
258
|
(_a = props['onUpdate:inputValue']) === null || _a === void 0 ? void 0 : _a.call(props, value);
|
|
@@ -299,11 +282,6 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
299
282
|
return 0;
|
|
300
283
|
return messagesRef.value.filter(msg => !msg.isOwn && msg.status === interface_1.MessageStatus.UNREAD).length;
|
|
301
284
|
});
|
|
302
|
-
const isTyping = (0, vue_1.computed)(() => {
|
|
303
|
-
if (!selectedChatRef.value || !typingChatIdsRef.value)
|
|
304
|
-
return false;
|
|
305
|
-
return typingChatIdsRef.value.includes(selectedChatRef.value.id);
|
|
306
|
-
});
|
|
307
285
|
const showNotificationManually = (0, vue_1.ref)(false);
|
|
308
286
|
const hasUnreadMessages = (0, vue_1.ref)(false);
|
|
309
287
|
const unreadCountOnOpen = (0, vue_1.ref)(0);
|
|
@@ -429,78 +407,6 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
429
407
|
element.scrollTop = element.scrollHeight;
|
|
430
408
|
}
|
|
431
409
|
}
|
|
432
|
-
const toKeyString = (value) => {
|
|
433
|
-
if (typeof value === 'symbol')
|
|
434
|
-
return value.toString();
|
|
435
|
-
if (typeof value === 'function') {
|
|
436
|
-
const result = value();
|
|
437
|
-
return typeof result === 'string' || typeof result === 'number'
|
|
438
|
-
? String(result)
|
|
439
|
-
: '';
|
|
440
|
-
}
|
|
441
|
-
return value != null ? String(value) : '';
|
|
442
|
-
};
|
|
443
|
-
const renderHeader = () => {
|
|
444
|
-
const chat = selectedChatRef.value;
|
|
445
|
-
const keyId = toKeyString(chat === null || chat === void 0 ? void 0 : chat.id);
|
|
446
|
-
const keyTitle = toKeyString(chat === null || chat === void 0 ? void 0 : chat.title);
|
|
447
|
-
return ((0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-main__header` },
|
|
448
|
-
(0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-main__header-inner` },
|
|
449
|
-
(0, vue_1.h)("div", { class: `${mergedClsPrefixRef.value}-chat-main__header-title-wrap` },
|
|
450
|
-
(0, vue_1.h)(typography_1.UText, { key: `${keyId}-${keyTitle}`, variant: "heading-s-bold", class: `${mergedClsPrefixRef.value}-chat-main__header-title`, theme: mergedThemeRef.value.peers.Typography, themeOverrides: mergedThemeRef.value.peerOverrides.Typography }, {
|
|
451
|
-
default: () => { var _a, _b; return (_b = (_a = selectedChatRef.value) === null || _a === void 0 ? void 0 : _a.title) !== null && _b !== void 0 ? _b : ''; }
|
|
452
|
-
}),
|
|
453
|
-
isTyping.value && ((0, vue_1.h)(typography_1.UText, { class: [
|
|
454
|
-
`${mergedClsPrefixRef.value}-chat-main__header-subtitle`,
|
|
455
|
-
'typing'
|
|
456
|
-
], variant: "body-m-medium" }, {
|
|
457
|
-
default: () => { var _a; return (_a = typingTextRef.value) !== null && _a !== void 0 ? _a : ''; }
|
|
458
|
-
}))),
|
|
459
|
-
(0, vue_1.h)(flex_1.UFlex, { align: "center", size: "small", class: `${mergedClsPrefixRef.value}-chat-main__header-actions` }, {
|
|
460
|
-
default: () => (0, _utils_1.resolveSlot)(slots.headerActions, () => {
|
|
461
|
-
const shareButtonProps = Object.assign(Object.assign({}, headerButtonPropsRef.value), headerShareButtonPropsRef.value);
|
|
462
|
-
const profileButtonProps = Object.assign(Object.assign({}, headerButtonPropsRef.value), headerProfileButtonPropsRef.value);
|
|
463
|
-
const closeButtonProps = Object.assign(Object.assign({}, headerButtonPropsRef.value), headerCloseButtonPropsRef.value);
|
|
464
|
-
const shareIconProps = Object.assign(Object.assign({}, headerIconPropsRef.value), headerShareIconPropsRef.value);
|
|
465
|
-
const profileIconProps = Object.assign(Object.assign({}, headerIconPropsRef.value), headerProfileIconPropsRef.value);
|
|
466
|
-
const buttons = [];
|
|
467
|
-
buttons.push((0, vue_1.h)(tooltip_1.UTooltip, null, {
|
|
468
|
-
trigger: () => ((0, vue_1.h)(button_1.UButton, Object.assign({ secondary: true, circle: true, size: "large" }, shareButtonProps, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides.Button, onClick: () => { var _a; return (_a = onChatShare === null || onChatShare === void 0 ? void 0 : onChatShare.value) === null || _a === void 0 ? void 0 : _a.call(onChatShare); } }), {
|
|
469
|
-
default: () => ((0, vue_1.h)(icon_1.UIcon, Object.assign({ size: 20 }, shareIconProps, { theme: mergedThemeRef.value.peers.HeaderShareIcon, themeOverrides: mergedThemeRef.value.peerOverrides
|
|
470
|
-
.HeaderShareIcon }), {
|
|
471
|
-
default: () => (0, vue_1.h)(icons_1.ArrowHookUpRight, null)
|
|
472
|
-
}))
|
|
473
|
-
})),
|
|
474
|
-
default: () => shareButtonTooltipRef.value
|
|
475
|
-
}));
|
|
476
|
-
buttons.push((0, vue_1.h)(tooltip_1.UTooltip, null, {
|
|
477
|
-
trigger: () => ((0, vue_1.h)(button_1.UButton, Object.assign({ secondary: true, circle: true, size: "large" }, profileButtonProps, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides.Button, onClick: () => { var _a; return (_a = onUserProfile === null || onUserProfile === void 0 ? void 0 : onUserProfile.value) === null || _a === void 0 ? void 0 : _a.call(onUserProfile); } }), {
|
|
478
|
-
default: () => ((0, vue_1.h)(icon_1.UIcon, Object.assign({ size: 20 }, profileIconProps, { theme: mergedThemeRef.value.peers
|
|
479
|
-
.HeaderProfileIcon, themeOverrides: mergedThemeRef.value.peerOverrides
|
|
480
|
-
.HeaderProfileIcon }), {
|
|
481
|
-
default: () => (0, vue_1.h)(icons_1.PersonNote, null)
|
|
482
|
-
}))
|
|
483
|
-
})),
|
|
484
|
-
default: () => profileButtonTooltipRef.value
|
|
485
|
-
}));
|
|
486
|
-
buttons.push((0, vue_1.h)(button_1.UButton, Object.assign({ type: "primary", size: "large", round: true }, closeButtonProps, { theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides.Button, onClick: () => { var _a; return (_a = onChatClose === null || onChatClose === void 0 ? void 0 : onChatClose.value) === null || _a === void 0 ? void 0 : _a.call(onChatClose); } }), {
|
|
487
|
-
default: () => closeButtonTextRef.value
|
|
488
|
-
}));
|
|
489
|
-
return buttons;
|
|
490
|
-
})
|
|
491
|
-
}))));
|
|
492
|
-
};
|
|
493
|
-
const renderMessages = () => {
|
|
494
|
-
var _a;
|
|
495
|
-
return ((0, vue_1.h)(ChatMessages_1.default, { messages: messagesRef.value, loading: messagesLoadingRef.value, loadingCount: messagesLoadingCountRef.value, typingChatIds: typingChatIdsRef.value, selectedChatId: (_a = selectedChatRef.value) === null || _a === void 0 ? void 0 : _a.id, typingText: typingTextRef.value, retryText: retryTextRef.value, uploadProps: messageUploadPropsRef.value, showUnreadNotification: showUnreadNotification.value, unreadNotificationText: unreadNotificationTextRef.value, unreadNotificationCount: unreadCountOnOpen.value, markdown: markdownRef.value, markdownOptions: markdownOptionsRef.value, onMessageRetry: handleMessageRetry }, {
|
|
496
|
-
messageAttachment: slots.messageAttachment,
|
|
497
|
-
messageAttachmentTitle: slots.messageAttachmentTitle,
|
|
498
|
-
messageAttachmentSubtitle: slots.messageAttachmentSubtitle,
|
|
499
|
-
messageStatus: slots.messageStatus,
|
|
500
|
-
messageAfterContent: slots.messageAfterContent,
|
|
501
|
-
bubbleActions: slots.bubbleActions
|
|
502
|
-
}));
|
|
503
|
-
};
|
|
504
410
|
const startEditingMessage = (message) => {
|
|
505
411
|
editingMessage.value = message;
|
|
506
412
|
if (editMessageIdRef) {
|
|
@@ -643,76 +549,25 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
643
549
|
};
|
|
644
550
|
}
|
|
645
551
|
};
|
|
646
|
-
const
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
return ((0, vue_1.h)(list_1.UListItem, { header: { text: localeRef.value.editingTitle }, description: { text: ((_a = editingMessage.value) === null || _a === void 0 ? void 0 : _a.content) || '' } }, {
|
|
654
|
-
suffix: () => ((0, vue_1.h)(button_1.UButton, { text: true, circle: true, size: "small", onClick: cancelEditingMessage, theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides.Button }, {
|
|
655
|
-
icon: () => ((0, vue_1.h)(icon_1.UIcon, { size: 16 }, {
|
|
656
|
-
default: () => (0, vue_1.h)(icons_1.CloseIcon, null)
|
|
657
|
-
}))
|
|
658
|
-
}))
|
|
659
|
-
}));
|
|
660
|
-
}
|
|
661
|
-
})));
|
|
552
|
+
const uploadChangeRef = (0, vue_1.computed)(() => handleOnChange());
|
|
553
|
+
const uploadFileListUpdateRef = (0, vue_1.computed)(() => (uploadChangeRef.value ? undefined : handleFileListUpdate));
|
|
554
|
+
const handleFooterUpdateValue = (value) => {
|
|
555
|
+
inputValue.value = value;
|
|
556
|
+
if (selectedChatRef.value) {
|
|
557
|
+
chatInputs.value[selectedChatRef.value.id] = value;
|
|
558
|
+
}
|
|
662
559
|
};
|
|
663
|
-
const
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
default: () => ((0, vue_1.h)(flex_1.UFlex, { align: "end", size: "small", wrap: false, class: `${mergedClsPrefixRef.value}-chat-main__input-container` }, {
|
|
667
|
-
default: () => ((0, vue_1.h)(vue_1.Fragment, null,
|
|
668
|
-
props.showAttachButton && ((0, vue_1.h)(upload_1.UUploadTrigger, { abstract: true }, {
|
|
669
|
-
default: ({ handleClick }) => {
|
|
670
|
-
var _a;
|
|
671
|
-
return ((0, vue_1.h)(button_1.UButton, Object.assign({ secondary: true, size: "large", class: `${mergedClsPrefixRef.value}-chat-main__attach-btn` }, footerButtonPropsRef.value, { disabled: ((_a = footerInputPropsRef.value) === null || _a === void 0 ? void 0 : _a.disabled)
|
|
672
|
-
|| !!(editMessageIdRef === null || editMessageIdRef === void 0 ? void 0 : editMessageIdRef.value), theme: mergedThemeRef.value.peers.Button, themeOverrides: mergedThemeRef.value.peerOverrides.Button, onClick: handleClick }), {
|
|
673
|
-
default: () => ((0, vue_1.h)(icon_1.UIcon, Object.assign({ size: 24 }, footerIconPropsRef.value, { theme: mergedThemeRef.value.peers
|
|
674
|
-
.FooterAttachIcon, themeOverrides: mergedThemeRef.value.peerOverrides
|
|
675
|
-
.FooterAttachIcon }), {
|
|
676
|
-
default: () => (0, _utils_1.resolveSlot)(slots.footerAttachIcon, () => [(0, vue_1.h)(icons_1.AttachIcon, null)])
|
|
677
|
-
}))
|
|
678
|
-
}));
|
|
679
|
-
}
|
|
680
|
-
})),
|
|
681
|
-
(0, vue_1.h)(input_1.UInput, Object.assign({ ref: "inputRef", value: inputValue.value, placeholder: inputPlaceholderRef.value, class: `${mergedClsPrefixRef.value}-chat-main__input`, theme: mergedThemeRef.value.peers.Input, themeOverrides: mergedThemeRef.value.peerOverrides.Input, type: "textarea", autosize: {
|
|
682
|
-
minRows: 1,
|
|
683
|
-
maxRows: 5
|
|
684
|
-
}, onUpdateValue: (value) => {
|
|
685
|
-
inputValue.value = value;
|
|
686
|
-
if (selectedChatRef.value) {
|
|
687
|
-
chatInputs.value[selectedChatRef.value.id] = value;
|
|
688
|
-
}
|
|
689
|
-
}, onKeydown: (e) => {
|
|
690
|
-
var _a, _b;
|
|
691
|
-
(_b = (_a = footerInputPropsRef.value) === null || _a === void 0 ? void 0 : _a.onKeydown) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
692
|
-
if (e.key === 'Enter' && !e.shiftKey) {
|
|
693
|
-
e.preventDefault();
|
|
694
|
-
e.stopPropagation();
|
|
695
|
-
void handleSendMessage();
|
|
696
|
-
}
|
|
697
|
-
} }, safeFooterInputPropsRef.value), {
|
|
698
|
-
prefix: () => renderEditingBlock(),
|
|
699
|
-
suffix: () => ((0, vue_1.h)(icon_1.UIcon, Object.assign({ size: 24, class: `${mergedClsPrefixRef.value}-chat-main__input-suffix` }, footerSuffixIconPropsRef.value, { theme: mergedThemeRef.value.peers.FooterSuffixIcon, themeOverrides: mergedThemeRef.value.peerOverrides
|
|
700
|
-
.FooterSuffixIcon, onClick: () => {
|
|
701
|
-
void handleSendMessage();
|
|
702
|
-
} }), {
|
|
703
|
-
default: () => (0, _utils_1.resolveSlot)(slots.footerSuffixIcon, () => [
|
|
704
|
-
(0, vue_1.h)(icons_1.SendFilled, null)
|
|
705
|
-
])
|
|
706
|
-
}))
|
|
707
|
-
})))
|
|
708
|
-
}))
|
|
709
|
-
})));
|
|
560
|
+
const handleFooterSend = (value) => {
|
|
561
|
+
handleFooterUpdateValue(value);
|
|
562
|
+
void handleSendMessage();
|
|
710
563
|
};
|
|
711
564
|
if (isStandalone) {
|
|
712
565
|
(0, vue_1.provide)(interface_1.chatInjectionKey, {
|
|
713
566
|
mergedClsPrefixRef,
|
|
714
567
|
mergedThemeRef,
|
|
715
568
|
selectedChatRef,
|
|
569
|
+
legacyInputRef,
|
|
570
|
+
disabledRef,
|
|
716
571
|
inputValueRef: inputValue,
|
|
717
572
|
handleInputValueChange,
|
|
718
573
|
messagesRef,
|
|
@@ -739,6 +594,8 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
739
594
|
shareButtonTooltipRef,
|
|
740
595
|
profileButtonTooltipRef,
|
|
741
596
|
unreadNotificationTextRef,
|
|
597
|
+
markdownRef,
|
|
598
|
+
markdownOptionsRef,
|
|
742
599
|
notificationsShownSetRef,
|
|
743
600
|
unreadCountsBeforeReadRef,
|
|
744
601
|
markNotificationShown,
|
|
@@ -764,17 +621,20 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
764
621
|
themeClass: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.themeClass,
|
|
765
622
|
onRender: themeClassHandle === null || themeClassHandle === void 0 ? void 0 : themeClassHandle.onRender,
|
|
766
623
|
isStandalone,
|
|
767
|
-
renderHeader,
|
|
768
|
-
renderMessages,
|
|
769
|
-
renderEditingBlock,
|
|
770
|
-
renderFooter,
|
|
771
624
|
messagesBodyRef,
|
|
772
|
-
inputRef,
|
|
773
625
|
inputValue,
|
|
626
|
+
attachmentFileList,
|
|
627
|
+
editingMessage,
|
|
628
|
+
showUnreadNotification,
|
|
629
|
+
unreadCountOnOpen,
|
|
630
|
+
uploadChange: uploadChangeRef,
|
|
631
|
+
uploadFileListUpdate: uploadFileListUpdateRef,
|
|
774
632
|
handleSendMessage,
|
|
633
|
+
handleFooterUpdateValue,
|
|
634
|
+
handleFooterSend,
|
|
635
|
+
cancelEditingMessage,
|
|
775
636
|
handleMessagesScroll,
|
|
776
|
-
scrollToBottom
|
|
777
|
-
editingMessage
|
|
637
|
+
scrollToBottom
|
|
778
638
|
};
|
|
779
639
|
},
|
|
780
640
|
render() {
|
|
@@ -785,11 +645,21 @@ exports.default = (0, vue_1.defineComponent)({
|
|
|
785
645
|
`${mergedClsPrefix}-chat-main`,
|
|
786
646
|
this.isStandalone && `${mergedClsPrefix}-chat-main--standalone`
|
|
787
647
|
] },
|
|
788
|
-
!this.isStandalone && this.
|
|
648
|
+
!this.isStandalone && ((0, vue_1.h)(ChatHeader_1.default, null, { actions: this.$slots.headerActions })),
|
|
789
649
|
(0, vue_1.h)(safe_top_scrollbar_1.USafeTopScrollbar, { ref: "messagesBodyRef", class: `${mergedClsPrefix}-chat-main__body`, onScroll: this.handleMessagesScroll }, {
|
|
790
|
-
default: () => this.
|
|
650
|
+
default: () => ((0, vue_1.h)(ChatMessagesArea_1.default, { showUnreadNotification: this.showUnreadNotification, unreadNotificationCount: this.unreadCountOnOpen }, {
|
|
651
|
+
messageAttachment: this.$slots.messageAttachment,
|
|
652
|
+
messageAttachmentTitle: this.$slots.messageAttachmentTitle,
|
|
653
|
+
messageAttachmentSubtitle: this.$slots.messageAttachmentSubtitle,
|
|
654
|
+
messageStatus: this.$slots.messageStatus,
|
|
655
|
+
messageAfterContent: this.$slots.messageAfterContent,
|
|
656
|
+
bubbleActions: this.$slots.bubbleActions
|
|
657
|
+
}))
|
|
791
658
|
}),
|
|
792
|
-
this.
|
|
659
|
+
(0, vue_1.h)(ChatFooter_1.default, { value: this.inputValue, editingMessage: this.editingMessage, showAttachButton: this.showAttachButton, fileList: this.attachmentFileList, onUpdateFileList: this.uploadFileListUpdate, onUploadChange: this.uploadChange, onUpdateValue: this.handleFooterUpdateValue, onSend: this.handleFooterSend, onCancelEditing: this.cancelEditingMessage }, {
|
|
660
|
+
attachIcon: this.$slots.footerAttachIcon,
|
|
661
|
+
suffixIcon: this.$slots.footerSuffixIcon
|
|
662
|
+
})));
|
|
793
663
|
if (!this.isStandalone) {
|
|
794
664
|
return mainArea;
|
|
795
665
|
}
|