@voicenter-team/voicenter-ui-plus 3.4.7 → 3.4.8
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/README.md +558 -558
- package/library/assets/assets/sass/main.css +1 -1
- package/library/assets/components/VcChatComposer/VcChatComposer.css +1 -1
- package/library/assets/components/VcFileUploader/VcFileUploaderSimple.css +1 -1
- package/library/assets/components/VcMessage/VcMessage.css +1 -1
- package/library/assets/components/VcMessage/VcMessageMeta.css +1 -0
- package/library/assets/components/VcMessage/content/VcMessageVideoBlock.css +1 -0
- package/library/assets/components/VcMessagesWrapper/VcMessagesWrapper.css +1 -1
- package/library/components/VcChatComposer/VcChatComposer.vue.mjs +38 -27
- package/library/components/VcChatComposer/richText.mjs +8 -0
- package/library/components/VcCheckbox/VcCheckbox.vue.mjs +1 -1
- package/library/components/VcCheckbox/VcCheckboxButton.vue.mjs +1 -1
- package/library/components/VcDatePicker/VcDatePicker.vue.mjs +1 -1
- package/library/components/VcDropdown/VcDropdownItem.vue.mjs +1 -1
- package/library/components/VcExcelUploader/VcExcelFileUploader.vue.mjs +1 -0
- package/library/components/VcExcelUploader/VcFileImportResultBindData.vue.mjs +1 -1
- package/library/components/VcFileUploader/VcFileUploaderSimple.vue.mjs +1 -1
- package/library/components/VcForm/VcForm.vue.mjs +1 -1
- package/library/components/VcForm/VcFormItem.vue.mjs +1 -1
- package/library/components/VcHtmlEditor/VcHtmlEditorToolbar.vue.mjs +1 -1
- package/library/components/VcInput/VcInput.vue.mjs +1 -1
- package/library/components/VcMdEditor/VcMdEditor.vue.mjs +1 -1
- package/library/components/VcMdEditor/VcMdEditorToolbar.vue.mjs +1 -1
- package/library/components/VcMessage/VcMessage.vue.mjs +65 -40
- package/library/components/VcMessage/VcMessageMeta.vue.mjs +49 -0
- package/library/components/VcMessage/VcMessageMeta.vue3.mjs +5 -0
- package/library/components/VcMessage/content/VcMessageAudioBlock.vue.mjs +3 -9
- package/library/components/VcMessage/content/VcMessageImageBlock.vue.mjs +1 -1
- package/library/components/VcMessage/content/VcMessageVideoBlock.vue.mjs +60 -0
- package/library/components/VcMessage/content/VcMessageVideoBlock.vue3.mjs +5 -0
- package/library/components/VcMessage/content/formatDuration.mjs +10 -0
- package/library/components/VcMessage/content/messageContentComponents.mjs +8 -5
- package/library/components/VcMessage/reactions/VcMessageReactionBar.vue.mjs +1 -1
- package/library/components/VcMessagesWrapper/VcMessagesWrapper.vue.mjs +167 -63
- package/library/components/VcMessagesWrapper/VcMessagesWrapperRow.vue.mjs +83 -0
- package/library/components/VcMessagesWrapper/VcMessagesWrapperRow.vue2.mjs +4 -0
- package/library/components/VcRadio/VcRadio.vue.mjs +1 -1
- package/library/components/VcSelect/VcSelect.vue.mjs +1 -1
- package/library/components/VcSlider/VcSlider.vue.mjs +1 -1
- package/library/index.mjs.gz +0 -0
- package/library/localization/index.mjs.gz +0 -0
- package/library/localization/locales/en.json.mjs +8 -1
- package/library/plugin.mjs.gz +0 -0
- package/library/style.css +9 -5
- package/library/style.css.br +0 -0
- package/library/style.css.gz +0 -0
- package/library/theme/index.mjs.gz +0 -0
- package/library/types/components/VcChatComposer/VcChatComposer.vue.d.ts +29 -2
- package/library/types/components/VcExcelUploader/VcExcelFileUploader.vue.d.ts +1 -2
- package/library/types/components/VcMessage/VcMessage.vue.d.ts +20 -2
- package/library/types/components/VcMessage/VcMessageMeta.vue.d.ts +24 -0
- package/library/types/components/VcMessage/content/VcMessageVideoBlock.vue.d.ts +24 -0
- package/library/types/components/VcMessage/content/formatDuration.d.ts +4 -0
- package/library/types/components/VcMessagesWrapper/VcMessagesWrapper.vue.d.ts +20 -2
- package/library/types/components/VcMessagesWrapper/VcMessagesWrapperRow.vue.d.ts +49 -0
- package/library/types/components/VcModal/VcConfirmModal.vue.d.ts +1 -1
- package/library/types/localization/locales/en.json.d.ts +194 -187
- package/library/types/types/VcChatComposer.types.d.ts +3 -2
- package/library/types/types/VcMessage.types.d.ts +48 -3
- package/library/types/types/VcMessagesWrapper.types.d.ts +30 -1
- package/library/utils/jsonSchema/index.mjs.gz +0 -0
- package/package.json +215 -215
- package/tailwind.config.js +192 -192
- /package/library/assets/node_modules/element-plus/theme-chalk/src/{date-picker.css → tooltip.css} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, toRef, openBlock, createBlock, unref, normalizeClass, withCtx, renderSlot } from "vue";
|
|
2
2
|
import { ElCheckbox } from "element-plus";
|
|
3
|
-
import '../../assets/node_modules/element-plus/theme-chalk/src/popover.css';import '../../assets/node_modules/element-plus/theme-chalk/src/transfer.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tree.css';import '../../assets/node_modules/element-plus/theme-chalk/src/text.css';import '../../assets/node_modules/element-plus/theme-chalk/src/slider.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/
|
|
3
|
+
import '../../assets/node_modules/element-plus/theme-chalk/src/popover.css';import '../../assets/node_modules/element-plus/theme-chalk/src/transfer.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tree.css';import '../../assets/node_modules/element-plus/theme-chalk/src/text.css';import '../../assets/node_modules/element-plus/theme-chalk/src/slider.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tooltip.css';import '../../assets/node_modules/element-plus/theme-chalk/src/date-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox-button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox-group.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio-button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio-group.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio.css';import '../../assets/node_modules/element-plus/theme-chalk/src/select.css';import '../../assets/node_modules/element-plus/theme-chalk/src/option-group.css';import '../../assets/node_modules/element-plus/theme-chalk/src/option.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tag.css';import '../../assets/node_modules/element-plus/theme-chalk/src/autocomplete.css';import '../../assets/node_modules/element-plus/theme-chalk/src/popper.css';import '../../assets/node_modules/element-plus/theme-chalk/src/scrollbar.css';import '../../assets/node_modules/element-plus/theme-chalk/src/input-number.css';import '../../assets/node_modules/element-plus/theme-chalk/src/input.css';import '../../assets/node_modules/element-plus/theme-chalk/src/form-item.css';import '../../assets/node_modules/element-plus/theme-chalk/src/form.css';import '../../assets/node_modules/element-plus/theme-chalk/src/base.css';
|
|
4
4
|
import '../../assets/components/VcCheckbox/VcCheckbox.css';/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, toRef, openBlock, createBlock, unref, normalizeClass, withCtx, renderSlot } from "vue";
|
|
2
2
|
import { ElCheckboxButton } from "element-plus";
|
|
3
|
-
import '../../assets/node_modules/element-plus/theme-chalk/src/popover.css';import '../../assets/node_modules/element-plus/theme-chalk/src/transfer.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tree.css';import '../../assets/node_modules/element-plus/theme-chalk/src/text.css';import '../../assets/node_modules/element-plus/theme-chalk/src/slider.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/
|
|
3
|
+
import '../../assets/node_modules/element-plus/theme-chalk/src/popover.css';import '../../assets/node_modules/element-plus/theme-chalk/src/transfer.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tree.css';import '../../assets/node_modules/element-plus/theme-chalk/src/text.css';import '../../assets/node_modules/element-plus/theme-chalk/src/slider.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tooltip.css';import '../../assets/node_modules/element-plus/theme-chalk/src/date-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox-button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox-group.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio-button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio-group.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio.css';import '../../assets/node_modules/element-plus/theme-chalk/src/select.css';import '../../assets/node_modules/element-plus/theme-chalk/src/option-group.css';import '../../assets/node_modules/element-plus/theme-chalk/src/option.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tag.css';import '../../assets/node_modules/element-plus/theme-chalk/src/autocomplete.css';import '../../assets/node_modules/element-plus/theme-chalk/src/popper.css';import '../../assets/node_modules/element-plus/theme-chalk/src/scrollbar.css';import '../../assets/node_modules/element-plus/theme-chalk/src/input-number.css';import '../../assets/node_modules/element-plus/theme-chalk/src/input.css';import '../../assets/node_modules/element-plus/theme-chalk/src/form-item.css';import '../../assets/node_modules/element-plus/theme-chalk/src/form.css';import '../../assets/node_modules/element-plus/theme-chalk/src/base.css';
|
|
4
4
|
import '../../assets/components/VcCheckbox/VcCheckboxButton.css';/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, markRaw, h, openBlock, createBlock, unref, mergeProps, createSlots, withCtx, renderSlot } from "vue";
|
|
2
2
|
import { ElDatePicker } from "element-plus";
|
|
3
|
-
import '../../assets/components/VcIcon/VcIcon.css';import '../../assets/node_modules/element-plus/theme-chalk/src/
|
|
3
|
+
import '../../assets/components/VcIcon/VcIcon.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tooltip.css';import '../../assets/node_modules/element-plus/theme-chalk/src/date-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/scrollbar.css';import '../../assets/node_modules/element-plus/theme-chalk/src/input.css';import '../../assets/node_modules/element-plus/theme-chalk/src/popper.css';import '../../assets/node_modules/element-plus/theme-chalk/src/base.css';
|
|
4
4
|
import '../../assets/components/VcDatePicker/VcDatePicker.css';/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, openBlock, createBlock, unref, mergeProps, withCtx, createElementVNode, normalizeClass, renderSlot, createCommentVNode, toDisplayString } from "vue";
|
|
2
2
|
import { ElDropdownItem } from "element-plus";
|
|
3
|
-
import '../../assets/components/VcIcon/VcIcon.css';import '../../assets/node_modules/element-plus/theme-chalk/src/
|
|
3
|
+
import '../../assets/components/VcIcon/VcIcon.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tooltip.css';import '../../assets/node_modules/element-plus/theme-chalk/src/base.css';
|
|
4
4
|
import '../../assets/components/VcDropdown/VcDropdownItem.css';/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
import _sfc_main$1 from "../VcIcon/VcIcon.vue.mjs";
|
|
@@ -426,6 +426,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
426
426
|
"780px": "90vw",
|
|
427
427
|
"680px": "98vw"
|
|
428
428
|
},
|
|
429
|
+
"dismissable-mask": false,
|
|
429
430
|
"data-test-name": "excel-file-import-modal",
|
|
430
431
|
"content-class": "wizard-modal-content h-full !max-h-full !p-0",
|
|
431
432
|
onClose: onCancel
|
|
@@ -2,7 +2,7 @@ import { defineComponent, ref, computed, openBlock, createElementBlock, createEl
|
|
|
2
2
|
import _sfc_main$1 from "./VcFileImportResultBindDataTable.vue.mjs";
|
|
3
3
|
import _sfc_main$2 from "./VcFileImportErrorsCard.vue.mjs";
|
|
4
4
|
import '../../assets/components/VcExcelUploader/VcFileImportErrorsCard.css';/* empty css */
|
|
5
|
-
const _hoisted_1 = { class: "w-full flex h-full gap-3 lg:gap-0 flex-wrap self-start" };
|
|
5
|
+
const _hoisted_1 = { class: "w-full flex h-full gap-3 lg:gap-0 flex-wrap lg:flex-nowrap self-start" };
|
|
6
6
|
const _hoisted_2 = { class: "w-full lg:w-7/12 md:px-10 h-full" };
|
|
7
7
|
const _hoisted_3 = { class: "w-full lg:w-5/12 md:px-10 h-full" };
|
|
8
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _sfc_main from "./VcFileUploaderSimple.vue2.mjs";
|
|
2
2
|
import '../../assets/components/VcFileUploader/VcFileUploaderSimple.css';/* empty css */
|
|
3
3
|
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
4
|
-
const VcFileUploaderSimple = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
4
|
+
const VcFileUploaderSimple = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b70649fc"]]);
|
|
5
5
|
export {
|
|
6
6
|
VcFileUploaderSimple as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, inject, ref, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot } from "vue";
|
|
2
2
|
import { convertToUnit } from "../../utils/helpers.mjs";
|
|
3
3
|
import { ElForm } from "element-plus";
|
|
4
|
-
import '../../assets/node_modules/element-plus/theme-chalk/src/popover.css';import '../../assets/node_modules/element-plus/theme-chalk/src/transfer.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tree.css';import '../../assets/node_modules/element-plus/theme-chalk/src/text.css';import '../../assets/node_modules/element-plus/theme-chalk/src/slider.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/
|
|
4
|
+
import '../../assets/node_modules/element-plus/theme-chalk/src/popover.css';import '../../assets/node_modules/element-plus/theme-chalk/src/transfer.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tree.css';import '../../assets/node_modules/element-plus/theme-chalk/src/text.css';import '../../assets/node_modules/element-plus/theme-chalk/src/slider.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tooltip.css';import '../../assets/node_modules/element-plus/theme-chalk/src/date-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox-button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox-group.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio-button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio-group.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio.css';import '../../assets/node_modules/element-plus/theme-chalk/src/select.css';import '../../assets/node_modules/element-plus/theme-chalk/src/option-group.css';import '../../assets/node_modules/element-plus/theme-chalk/src/option.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tag.css';import '../../assets/node_modules/element-plus/theme-chalk/src/autocomplete.css';import '../../assets/node_modules/element-plus/theme-chalk/src/popper.css';import '../../assets/node_modules/element-plus/theme-chalk/src/scrollbar.css';import '../../assets/node_modules/element-plus/theme-chalk/src/input-number.css';import '../../assets/node_modules/element-plus/theme-chalk/src/input.css';import '../../assets/node_modules/element-plus/theme-chalk/src/form-item.css';import '../../assets/node_modules/element-plus/theme-chalk/src/form.css';import '../../assets/node_modules/element-plus/theme-chalk/src/base.css';/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, inject, ref, computed, openBlock, createBlock, unref, mergeProps, withCtx, renderSlot, normalizeClass, createSlots, createCommentVNode, createElementBlock, Fragment } from "vue";
|
|
2
2
|
import { ElFormItem } from "element-plus";
|
|
3
|
-
import '../../assets/components/VcForm/UiComponents/VcInputLabel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/popover.css';import '../../assets/node_modules/element-plus/theme-chalk/src/transfer.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tree.css';import '../../assets/node_modules/element-plus/theme-chalk/src/text.css';import '../../assets/node_modules/element-plus/theme-chalk/src/slider.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/
|
|
3
|
+
import '../../assets/components/VcForm/UiComponents/VcInputLabel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/popover.css';import '../../assets/node_modules/element-plus/theme-chalk/src/transfer.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tree.css';import '../../assets/node_modules/element-plus/theme-chalk/src/text.css';import '../../assets/node_modules/element-plus/theme-chalk/src/slider.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tooltip.css';import '../../assets/node_modules/element-plus/theme-chalk/src/date-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox-button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox-group.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio-button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio-group.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio.css';import '../../assets/node_modules/element-plus/theme-chalk/src/select.css';import '../../assets/node_modules/element-plus/theme-chalk/src/option-group.css';import '../../assets/node_modules/element-plus/theme-chalk/src/option.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tag.css';import '../../assets/node_modules/element-plus/theme-chalk/src/autocomplete.css';import '../../assets/node_modules/element-plus/theme-chalk/src/popper.css';import '../../assets/node_modules/element-plus/theme-chalk/src/scrollbar.css';import '../../assets/node_modules/element-plus/theme-chalk/src/input-number.css';import '../../assets/node_modules/element-plus/theme-chalk/src/input.css';import '../../assets/node_modules/element-plus/theme-chalk/src/form-item.css';import '../../assets/node_modules/element-plus/theme-chalk/src/form.css';import '../../assets/node_modules/element-plus/theme-chalk/src/base.css';
|
|
4
4
|
import '../../assets/components/VcForm/VcFormItem.css';/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, Fragment, renderList, unref, toDisplayString, createBlock, createTextVNode, createCommentVNode } from "vue";
|
|
2
2
|
import { ElTooltip } from "element-plus";
|
|
3
|
-
import '../../assets/components/VcIcon/VcIcon.css';import '../../assets/components/VcButton/VcButtonIcon.css';import '../../assets/components/VcButton/VcButton.css';import '../../assets/components/VcPopover/VcPopover.css';import '../../assets/node_modules/element-plus/theme-chalk/src/
|
|
3
|
+
import '../../assets/components/VcIcon/VcIcon.css';import '../../assets/components/VcButton/VcButtonIcon.css';import '../../assets/components/VcButton/VcButton.css';import '../../assets/components/VcPopover/VcPopover.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tooltip.css';import '../../assets/node_modules/element-plus/theme-chalk/src/popper.css';import '../../assets/node_modules/element-plus/theme-chalk/src/base.css';/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
import { htmlHeadingMenuItems, htmlInsertMenuItems, getParameterDisplayLabel } from "./htmlEditor.config.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, withDirectives, openBlock, createBlock, unref, mergeProps, createSlots, withCtx, createVNode, normalizeStyle, normalizeClass, createCommentVNode } from "vue";
|
|
2
2
|
import { ElInput } from "element-plus";
|
|
3
|
-
import '../../assets/components/VcIcon/VcIcon.css';import '../../assets/node_modules/element-plus/theme-chalk/src/popover.css';import '../../assets/node_modules/element-plus/theme-chalk/src/transfer.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tree.css';import '../../assets/node_modules/element-plus/theme-chalk/src/text.css';import '../../assets/node_modules/element-plus/theme-chalk/src/slider.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/
|
|
3
|
+
import '../../assets/components/VcIcon/VcIcon.css';import '../../assets/node_modules/element-plus/theme-chalk/src/popover.css';import '../../assets/node_modules/element-plus/theme-chalk/src/transfer.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tree.css';import '../../assets/node_modules/element-plus/theme-chalk/src/text.css';import '../../assets/node_modules/element-plus/theme-chalk/src/slider.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker.css';import '../../assets/node_modules/element-plus/theme-chalk/src/color-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tooltip.css';import '../../assets/node_modules/element-plus/theme-chalk/src/date-picker-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox-button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox-group.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio-button.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio-group.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio.css';import '../../assets/node_modules/element-plus/theme-chalk/src/select.css';import '../../assets/node_modules/element-plus/theme-chalk/src/option-group.css';import '../../assets/node_modules/element-plus/theme-chalk/src/option.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tag.css';import '../../assets/node_modules/element-plus/theme-chalk/src/autocomplete.css';import '../../assets/node_modules/element-plus/theme-chalk/src/popper.css';import '../../assets/node_modules/element-plus/theme-chalk/src/scrollbar.css';import '../../assets/node_modules/element-plus/theme-chalk/src/input-number.css';import '../../assets/node_modules/element-plus/theme-chalk/src/input.css';import '../../assets/node_modules/element-plus/theme-chalk/src/form-item.css';import '../../assets/node_modules/element-plus/theme-chalk/src/form.css';import '../../assets/node_modules/element-plus/theme-chalk/src/base.css';
|
|
4
4
|
import '../../assets/components/VcInput/VcInput.css';/* empty css */
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineComponent, useAttrs, ref, computed, onMounted, nextTick, openBlock, createBlock, unref, withCtx, createVNode, createElementVNode, normalizeStyle, normalizeClass, createElementBlock, createCommentVNode, mergeProps, isRef } from "vue";
|
|
2
2
|
import { MilkdownProvider } from "@milkdown/vue";
|
|
3
3
|
import _sfc_main$3 from "./VcMdEditorContent.vue.mjs";
|
|
4
|
-
import '../../assets/components/VcButton/VcButtonIcon.css';import '../../assets/node_modules/element-plus/theme-chalk/src/
|
|
4
|
+
import '../../assets/components/VcButton/VcButtonIcon.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tooltip.css';import '../../assets/node_modules/element-plus/theme-chalk/src/popper.css';import '../../assets/node_modules/element-plus/theme-chalk/src/base.css';import '../../assets/components/VcMdEditor/VcMdEditorContent.css';/* empty css */
|
|
5
5
|
import { useVModel } from "@vueuse/core";
|
|
6
6
|
import { convertToUnit } from "../../utils/helpers.mjs";
|
|
7
7
|
import { markdown } from "@codemirror/lang-markdown";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, computed, openBlock, createElementBlock, createElementVNode, createVNode, withCtx, Fragment, renderList, unref, toDisplayString, createBlock, createCommentVNode, nextTick } from "vue";
|
|
2
2
|
import _sfc_main$1 from "../VcPopover/VcPopover.vue.mjs";
|
|
3
|
-
import '../../assets/components/VcIcon/VcIcon.css';import '../../assets/components/VcButton/VcButton.css';import '../../assets/node_modules/element-plus/theme-chalk/src/
|
|
3
|
+
import '../../assets/components/VcIcon/VcIcon.css';import '../../assets/components/VcButton/VcButton.css';import '../../assets/node_modules/element-plus/theme-chalk/src/tooltip.css';import '../../assets/node_modules/element-plus/theme-chalk/src/popper.css';import '../../assets/node_modules/element-plus/theme-chalk/src/cascader-panel.css';import '../../assets/node_modules/element-plus/theme-chalk/src/virtual-list.css';import '../../assets/node_modules/element-plus/theme-chalk/src/scrollbar.css';import '../../assets/node_modules/element-plus/theme-chalk/src/radio.css';import '../../assets/node_modules/element-plus/theme-chalk/src/checkbox.css';import '../../assets/node_modules/element-plus/theme-chalk/src/base.css';import '../../assets/components/VcPopover/VcPopover.css';/* empty css */
|
|
4
4
|
import { headingMenuItems, listMenuItems, advancedMenuItems } from "./mdEditor.config.mjs";
|
|
5
5
|
import { isGroupParameter } from "../../types/VcMdEditor.types.mjs";
|
|
6
6
|
import { ElCascaderPanel, ElTooltip } from "element-plus";
|
|
@@ -1,42 +1,40 @@
|
|
|
1
1
|
import '../../assets/components/VcMessage/VcMessage.css';
|
|
2
|
-
import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeClass,
|
|
2
|
+
import { defineComponent, ref, computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, toDisplayString, createElementVNode, createBlock, resolveDynamicComponent, unref, Fragment, renderList, withCtx, createVNode } from "vue";
|
|
3
3
|
import { Ellipsis } from "@lucide/vue";
|
|
4
|
-
import _sfc_main$
|
|
5
|
-
import '../../assets/components/VcMessage/reactions/VcMessageReactionBar.css';import '../../assets/components/VcMessage/reactions/VcMessageEmojiPicker.css';import '../../assets/components/VcIcon/VcIcon.css';import '../../assets/components/VcDropdown/VcDropdown.css';import '../../assets/components/VcButton/VcButtonIcon.css';/* empty css */
|
|
6
|
-
import _sfc_main$
|
|
4
|
+
import _sfc_main$4 from "../VcButton/VcButtonIcon.vue.mjs";
|
|
5
|
+
import '../../assets/components/VcMessage/reactions/VcMessageReactionBar.css';import '../../assets/components/VcMessage/reactions/VcMessageEmojiPicker.css';import '../../assets/components/VcMessage/VcMessageMeta.css';import '../../assets/components/VcIcon/VcIcon.css';import '../../assets/components/VcDropdown/VcDropdown.css';import '../../assets/components/VcButton/VcButtonIcon.css';/* empty css */
|
|
6
|
+
import _sfc_main$5 from "../VcDropdown/VcDropdown.vue.mjs";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import _sfc_main$
|
|
8
|
+
import _sfc_main$6 from "../VcIcon/VcIcon.vue.mjs";
|
|
9
9
|
/* empty css */
|
|
10
10
|
import { messageContentComponents } from "./content/messageContentComponents.mjs";
|
|
11
|
-
import _sfc_main$
|
|
11
|
+
import _sfc_main$1 from "./VcMessageMeta.vue.mjs";
|
|
12
|
+
/* empty css */
|
|
13
|
+
import _sfc_main$3 from "./reactions/VcMessageEmojiPicker.vue.mjs";
|
|
12
14
|
/* empty css */
|
|
13
|
-
import _sfc_main$
|
|
15
|
+
import _sfc_main$2 from "./reactions/VcMessageReactionBar.vue.mjs";
|
|
14
16
|
/* empty css */
|
|
15
17
|
import { DEFAULT_REACTION_EMOJIS } from "./reactions/emojis.mjs";
|
|
16
18
|
import { tVU } from "../../localization/index.mjs";
|
|
17
19
|
const _hoisted_1 = {
|
|
18
20
|
key: 0,
|
|
19
|
-
class: "vc-
|
|
21
|
+
class: "vc-message__header"
|
|
20
22
|
};
|
|
21
|
-
const _hoisted_2 = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class: "vc-message__content"
|
|
23
|
+
const _hoisted_2 = {
|
|
24
|
+
key: 1,
|
|
25
|
+
class: "vc-message__deleted"
|
|
25
26
|
};
|
|
27
|
+
const _hoisted_3 = { class: "vc-message__reply-author" };
|
|
26
28
|
const _hoisted_4 = {
|
|
27
|
-
key:
|
|
28
|
-
class: "vc-
|
|
29
|
+
key: 4,
|
|
30
|
+
class: "vc-message__caption"
|
|
29
31
|
};
|
|
30
32
|
const _hoisted_5 = {
|
|
31
|
-
key:
|
|
32
|
-
class: "vc-message__edited"
|
|
33
|
-
};
|
|
34
|
-
const _hoisted_6 = {
|
|
35
|
-
key: 5,
|
|
33
|
+
key: 7,
|
|
36
34
|
class: "vc-message__toolbar"
|
|
37
35
|
};
|
|
38
|
-
const
|
|
39
|
-
const
|
|
36
|
+
const _hoisted_6 = { class: "vc-dropdown-item__content-inner vc-message__menu-item" };
|
|
37
|
+
const _hoisted_7 = {
|
|
40
38
|
key: 1,
|
|
41
39
|
class: "vc-message__menu-shortcut"
|
|
42
40
|
};
|
|
@@ -52,6 +50,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
50
|
reactionEmojis: { default: () => DEFAULT_REACTION_EMOJIS },
|
|
53
51
|
edited: { type: Boolean, default: false },
|
|
54
52
|
deleted: { type: Boolean, default: false },
|
|
53
|
+
status: { default: void 0 },
|
|
55
54
|
editedLabel: { default: void 0 },
|
|
56
55
|
deletedLabel: { default: void 0 }
|
|
57
56
|
},
|
|
@@ -62,11 +61,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
62
61
|
const isMenuOpen = ref(false);
|
|
63
62
|
const isPickerOpen = ref(false);
|
|
64
63
|
const isMedia = computed(() => {
|
|
64
|
+
var _a, _b;
|
|
65
|
+
return !props.deleted && (((_a = props.content) == null ? void 0 : _a.type) === "image" || ((_b = props.content) == null ? void 0 : _b.type) === "video");
|
|
66
|
+
});
|
|
67
|
+
const caption = computed(() => {
|
|
65
68
|
var _a;
|
|
66
|
-
|
|
69
|
+
if (props.deleted || !props.content || props.content.type === "text") {
|
|
70
|
+
return "";
|
|
71
|
+
}
|
|
72
|
+
return ((_a = props.content.caption) == null ? void 0 : _a.trim()) ?? "";
|
|
67
73
|
});
|
|
68
74
|
const moreOptionsLabel = computed(() => tVU.t("voicenterUi.message.moreOptions"));
|
|
69
75
|
const editedText = computed(() => props.editedLabel || tVU.t("voicenterUi.message.edited"));
|
|
76
|
+
const hasMeta = computed(() => !props.deleted && (props.edited || !!props.status));
|
|
77
|
+
const metaEditedText = computed(() => props.edited ? editedText.value : "");
|
|
70
78
|
const deletedText = computed(() => props.deletedLabel || tVU.t("voicenterUi.message.deleted"));
|
|
71
79
|
const additionalOptionsFlat = computed(() => props.additionalOptions.flat());
|
|
72
80
|
const hasAdditionalOptions = computed(() => additionalOptionsFlat.value.length > 0);
|
|
@@ -103,41 +111,58 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
103
111
|
return openBlock(), createElementBlock("div", {
|
|
104
112
|
class: normalizeClass([[`vc-message--align-${__props.align}`, { "is--menu-open": isMenuOpen.value || isPickerOpen.value, "is--deleted": __props.deleted, "is--media": isMedia.value }], "vc-message"])
|
|
105
113
|
}, [
|
|
106
|
-
|
|
114
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
115
|
+
renderSlot(_ctx.$slots, "header")
|
|
116
|
+
])) : createCommentVNode("", true),
|
|
117
|
+
__props.deleted ? (openBlock(), createElementBlock("div", _hoisted_2, toDisplayString(deletedText.value), 1)) : createCommentVNode("", true),
|
|
107
118
|
__props.reply && !__props.deleted ? (openBlock(), createElementBlock("button", {
|
|
108
|
-
key:
|
|
119
|
+
key: 2,
|
|
109
120
|
type: "button",
|
|
110
121
|
class: "vc-message__reply",
|
|
111
122
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("reply-click"))
|
|
112
123
|
}, [
|
|
113
|
-
createElementVNode("span",
|
|
124
|
+
createElementVNode("span", _hoisted_3, toDisplayString(__props.reply.author), 1),
|
|
114
125
|
(openBlock(), createBlock(resolveDynamicComponent(unref(messageContentComponents)[__props.reply.content.type]), {
|
|
115
126
|
content: __props.reply.content,
|
|
116
127
|
preview: "",
|
|
117
128
|
class: "vc-message__reply-content"
|
|
118
129
|
}, null, 8, ["content"]))
|
|
119
130
|
])) : createCommentVNode("", true),
|
|
120
|
-
__props.content && !__props.deleted ? (openBlock(), createElementBlock("div",
|
|
131
|
+
__props.content && !__props.deleted ? (openBlock(), createElementBlock("div", {
|
|
132
|
+
key: 3,
|
|
133
|
+
class: normalizeClass([{ "is--captioned": caption.value }, "vc-message__content"])
|
|
134
|
+
}, [
|
|
121
135
|
(openBlock(), createBlock(resolveDynamicComponent(unref(messageContentComponents)[__props.content.type]), {
|
|
122
136
|
content: __props.content,
|
|
123
137
|
onContentClick: _cache[1] || (_cache[1] = ($event) => emit("content-click", __props.content))
|
|
124
138
|
}, null, 40, ["content"])),
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
139
|
+
hasMeta.value && isMedia.value && !caption.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
140
|
+
key: 0,
|
|
141
|
+
"edited-text": metaEditedText.value,
|
|
142
|
+
status: __props.status,
|
|
143
|
+
class: "vc-message__meta"
|
|
144
|
+
}, null, 8, ["edited-text", "status"])) : createCommentVNode("", true)
|
|
145
|
+
], 2)) : createCommentVNode("", true),
|
|
146
|
+
caption.value ? (openBlock(), createElementBlock("div", _hoisted_4, toDisplayString(caption.value), 1)) : createCommentVNode("", true),
|
|
147
|
+
hasMeta.value && (!isMedia.value || caption.value) ? (openBlock(), createBlock(_sfc_main$1, {
|
|
148
|
+
key: 5,
|
|
149
|
+
"edited-text": metaEditedText.value,
|
|
150
|
+
status: __props.status,
|
|
151
|
+
class: "vc-message__meta"
|
|
152
|
+
}, null, 8, ["edited-text", "status"])) : createCommentVNode("", true),
|
|
153
|
+
__props.reactions.length && !__props.deleted ? (openBlock(), createBlock(_sfc_main$2, {
|
|
154
|
+
key: 6,
|
|
130
155
|
reactions: __props.reactions,
|
|
131
156
|
emojis: __props.reactionEmojis,
|
|
132
157
|
class: "vc-message__reactions",
|
|
133
158
|
onToggle: _cache[2] || (_cache[2] = ($event) => emit("reaction-toggle", $event))
|
|
134
159
|
}, null, 8, ["reactions", "emojis"])) : createCommentVNode("", true),
|
|
135
|
-
hasToolbar.value && !__props.deleted ? (openBlock(), createElementBlock("div",
|
|
160
|
+
hasToolbar.value && !__props.deleted ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
136
161
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.options, (option) => {
|
|
137
162
|
return openBlock(), createElementBlock(Fragment, {
|
|
138
163
|
key: option.event
|
|
139
164
|
}, [
|
|
140
|
-
option.emojiPicker ? (openBlock(), createBlock(_sfc_main$
|
|
165
|
+
option.emojiPicker ? (openBlock(), createBlock(_sfc_main$3, {
|
|
141
166
|
key: 0,
|
|
142
167
|
emojis: __props.reactionEmojis,
|
|
143
168
|
disabled: option.disabled,
|
|
@@ -146,7 +171,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
146
171
|
onClose: _cache[5] || (_cache[5] = ($event) => isPickerOpen.value = false)
|
|
147
172
|
}, {
|
|
148
173
|
trigger: withCtx(({ isOpen }) => [
|
|
149
|
-
createVNode(_sfc_main$
|
|
174
|
+
createVNode(_sfc_main$4, {
|
|
150
175
|
icon: option.icon,
|
|
151
176
|
color: option.color || "secondary",
|
|
152
177
|
disabled: option.disabled,
|
|
@@ -157,7 +182,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
157
182
|
}, null, 8, ["icon", "color", "disabled", "title", "aria-label", "aria-expanded"])
|
|
158
183
|
]),
|
|
159
184
|
_: 2
|
|
160
|
-
}, 1032, ["emojis", "disabled"])) : (openBlock(), createBlock(_sfc_main$
|
|
185
|
+
}, 1032, ["emojis", "disabled"])) : (openBlock(), createBlock(_sfc_main$4, {
|
|
161
186
|
key: 1,
|
|
162
187
|
icon: option.icon,
|
|
163
188
|
color: option.color || "secondary",
|
|
@@ -168,7 +193,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
168
193
|
}, null, 8, ["icon", "color", "disabled", "title", "aria-label", "onClick"]))
|
|
169
194
|
], 64);
|
|
170
195
|
}), 128)),
|
|
171
|
-
hasAdditionalOptions.value ? (openBlock(), createBlock(_sfc_main$
|
|
196
|
+
hasAdditionalOptions.value ? (openBlock(), createBlock(_sfc_main$5, {
|
|
172
197
|
key: 0,
|
|
173
198
|
options: dropdownOptions.value,
|
|
174
199
|
placement: __props.align === "end" ? "bottom-end" : "bottom-start",
|
|
@@ -180,8 +205,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
180
205
|
onVisibleChange: _cache[6] || (_cache[6] = ($event) => isMenuOpen.value = $event)
|
|
181
206
|
}, {
|
|
182
207
|
"dropdown-item": withCtx(({ item }) => [
|
|
183
|
-
createElementVNode("div",
|
|
184
|
-
item.icon ? (openBlock(), createBlock(_sfc_main$
|
|
208
|
+
createElementVNode("div", _hoisted_6, [
|
|
209
|
+
item.icon ? (openBlock(), createBlock(_sfc_main$6, {
|
|
185
210
|
key: 0,
|
|
186
211
|
icon: item.icon,
|
|
187
212
|
class: normalizeClass(item.iconClass)
|
|
@@ -189,11 +214,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
189
214
|
createElementVNode("span", {
|
|
190
215
|
class: normalizeClass([item.labelClass, "vc-message__menu-label"])
|
|
191
216
|
}, toDisplayString(item.label), 3),
|
|
192
|
-
getShortcut(item.value) ? (openBlock(), createElementBlock("span",
|
|
217
|
+
getShortcut(item.value) ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(getShortcut(item.value)), 1)) : createCommentVNode("", true)
|
|
193
218
|
])
|
|
194
219
|
]),
|
|
195
220
|
default: withCtx(() => [
|
|
196
|
-
createVNode(_sfc_main$
|
|
221
|
+
createVNode(_sfc_main$4, {
|
|
197
222
|
icon: unref(Ellipsis),
|
|
198
223
|
title: moreOptionsLabel.value,
|
|
199
224
|
"aria-label": moreOptionsLabel.value,
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import '../../assets/components/VcMessage/VcMessageMeta.css';
|
|
2
|
+
import { defineComponent, computed, openBlock, createElementBlock, toDisplayString, createCommentVNode, normalizeClass, createVNode } from "vue";
|
|
3
|
+
import { CircleAlert, CheckCheck, Check, Clock } from "@lucide/vue";
|
|
4
|
+
import _sfc_main$1 from "../VcIcon/VcIcon.vue.mjs";
|
|
5
|
+
import '../../assets/components/VcIcon/VcIcon.css';/* empty css */
|
|
6
|
+
import { tVU } from "../../localization/index.mjs";
|
|
7
|
+
const _hoisted_1 = { class: "vc-message-meta" };
|
|
8
|
+
const _hoisted_2 = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "vc-message-meta__edited"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_3 = ["title", "aria-label"];
|
|
13
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
|
+
__name: "VcMessageMeta",
|
|
15
|
+
props: {
|
|
16
|
+
editedText: {},
|
|
17
|
+
status: {}
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const STATUS_ICONS = {
|
|
21
|
+
pending: Clock,
|
|
22
|
+
sent: Check,
|
|
23
|
+
delivered: CheckCheck,
|
|
24
|
+
read: CheckCheck,
|
|
25
|
+
failed: CircleAlert
|
|
26
|
+
};
|
|
27
|
+
const props = __props;
|
|
28
|
+
const statusText = computed(() => props.status ? tVU.t(`voicenterUi.message.status.${props.status}`) : "");
|
|
29
|
+
return (_ctx, _cache) => {
|
|
30
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
31
|
+
__props.editedText ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(__props.editedText), 1)) : createCommentVNode("", true),
|
|
32
|
+
__props.status ? (openBlock(), createElementBlock("span", {
|
|
33
|
+
key: 1,
|
|
34
|
+
class: normalizeClass([`is--${__props.status}`, "vc-message-meta__status"]),
|
|
35
|
+
title: statusText.value,
|
|
36
|
+
"aria-label": statusText.value,
|
|
37
|
+
role: "img"
|
|
38
|
+
}, [
|
|
39
|
+
createVNode(_sfc_main$1, {
|
|
40
|
+
icon: STATUS_ICONS[__props.status]
|
|
41
|
+
}, null, 8, ["icon"])
|
|
42
|
+
], 10, _hoisted_3)) : createCommentVNode("", true)
|
|
43
|
+
]);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
_sfc_main as default
|
|
49
|
+
};
|
|
@@ -6,6 +6,7 @@ import '../../../assets/components/VcSoundplayer/VcSoundPlayer.css';import '../.
|
|
|
6
6
|
import _sfc_main$2 from "../../VcSoundplayer/VcSoundPlayer.vue.mjs";
|
|
7
7
|
/* empty css */
|
|
8
8
|
import { tVU } from "../../../localization/index.mjs";
|
|
9
|
+
import { formatDuration } from "./formatDuration.mjs";
|
|
9
10
|
const _hoisted_1 = {
|
|
10
11
|
key: 0,
|
|
11
12
|
class: "vc-message-audio-block is--preview"
|
|
@@ -22,15 +23,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
23
|
},
|
|
23
24
|
setup(__props) {
|
|
24
25
|
const props = __props;
|
|
25
|
-
const label = computed(() => tVU.t("voicenterUi.message.audio"));
|
|
26
|
-
const duration = computed(() =>
|
|
27
|
-
const seconds = props.content.duration;
|
|
28
|
-
if (!seconds) {
|
|
29
|
-
return "";
|
|
30
|
-
}
|
|
31
|
-
const rounded = Math.round(seconds);
|
|
32
|
-
return `${Math.floor(rounded / 60)}:${String(rounded % 60).padStart(2, "0")}`;
|
|
33
|
-
});
|
|
26
|
+
const label = computed(() => props.content.caption || tVU.t("voicenterUi.message.audio"));
|
|
27
|
+
const duration = computed(() => formatDuration(props.content.duration));
|
|
34
28
|
return (_ctx, _cache) => {
|
|
35
29
|
return __props.preview ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
36
30
|
createVNode(_sfc_main$1, {
|
|
@@ -18,7 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
18
18
|
setup(__props, { emit: __emit }) {
|
|
19
19
|
const props = __props;
|
|
20
20
|
const emit = __emit;
|
|
21
|
-
const label = computed(() => props.content.alt || tVU.t("voicenterUi.message.image"));
|
|
21
|
+
const label = computed(() => props.content.caption || props.content.alt || tVU.t("voicenterUi.message.image"));
|
|
22
22
|
const sizeStyle = computed(() => {
|
|
23
23
|
const { width, height } = props.content;
|
|
24
24
|
return {
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import '../../../assets/components/VcMessage/content/VcMessageVideoBlock.css';
|
|
2
|
+
import { defineComponent, computed, openBlock, createElementBlock, createVNode, unref, createElementVNode, toDisplayString, createCommentVNode, normalizeStyle } from "vue";
|
|
3
|
+
import { Video } from "@lucide/vue";
|
|
4
|
+
import _sfc_main$1 from "../../VcIcon/VcIcon.vue.mjs";
|
|
5
|
+
import '../../../assets/components/VcIcon/VcIcon.css';/* empty css */
|
|
6
|
+
import { tVU } from "../../../localization/index.mjs";
|
|
7
|
+
import { formatDuration } from "./formatDuration.mjs";
|
|
8
|
+
const _hoisted_1 = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "vc-message-video-block is--preview"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_2 = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "vc-message-video-block__duration"
|
|
15
|
+
};
|
|
16
|
+
const _hoisted_3 = ["src", "poster", "width", "height"];
|
|
17
|
+
const MAX_WIDTH = "20rem";
|
|
18
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
|
+
__name: "VcMessageVideoBlock",
|
|
20
|
+
props: {
|
|
21
|
+
content: {},
|
|
22
|
+
preview: { type: Boolean }
|
|
23
|
+
},
|
|
24
|
+
setup(__props) {
|
|
25
|
+
const props = __props;
|
|
26
|
+
const label = computed(() => props.content.caption || tVU.t("voicenterUi.message.video"));
|
|
27
|
+
const duration = computed(() => formatDuration(props.content.duration));
|
|
28
|
+
const sizeStyle = computed(() => {
|
|
29
|
+
const { width, height } = props.content;
|
|
30
|
+
return {
|
|
31
|
+
width: width ? `min(${width}px, ${MAX_WIDTH})` : MAX_WIDTH,
|
|
32
|
+
aspectRatio: width && height ? `${width} / ${height}` : void 0
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
return (_ctx, _cache) => {
|
|
36
|
+
return __props.preview ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
37
|
+
createVNode(_sfc_main$1, {
|
|
38
|
+
icon: unref(Video),
|
|
39
|
+
class: "vc-message-video-block__icon"
|
|
40
|
+
}, null, 8, ["icon"]),
|
|
41
|
+
createElementVNode("span", null, toDisplayString(label.value), 1),
|
|
42
|
+
duration.value ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(duration.value), 1)) : createCommentVNode("", true)
|
|
43
|
+
])) : (openBlock(), createElementBlock("video", {
|
|
44
|
+
key: 1,
|
|
45
|
+
src: __props.content.url,
|
|
46
|
+
poster: __props.content.poster,
|
|
47
|
+
width: __props.content.width,
|
|
48
|
+
height: __props.content.height,
|
|
49
|
+
style: normalizeStyle(sizeStyle.value),
|
|
50
|
+
controls: "",
|
|
51
|
+
playsinline: "",
|
|
52
|
+
preload: "metadata",
|
|
53
|
+
class: "vc-message-video-block"
|
|
54
|
+
}, null, 12, _hoisted_3));
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
export {
|
|
59
|
+
_sfc_main as default
|
|
60
|
+
};
|