@ndscnj/roomkit-web-vue3 25.12.24142 → 25.12.24152

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ndscnj/roomkit-web-vue3",
3
- "version": "25.12.24142",
3
+ "version": "25.12.24152",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.mjs",
6
6
  "types": "./es/index.d.ts",
@@ -1,6 +0,0 @@
1
- declare const VoteControl: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
- "show-overlay": (...args: any[]) => void;
3
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
4
- "onShow-overlay"?: ((...args: any[]) => any) | undefined;
5
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any> | import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
- export default VoteControl;
@@ -1,6 +0,0 @@
1
- declare const VoteControl: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
2
- "show-overlay": (...args: any[]) => void;
3
- }, string, import('vue').PublicProps, Readonly<{}> & Readonly<{
4
- "onShow-overlay"?: ((...args: any[]) => any) | undefined;
5
- }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any> | import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
6
- export default VoteControl;
@@ -1,122 +0,0 @@
1
- <template>
2
- <div>
3
- <div v-if="moreControlConfig.visible" class="more-control-container">
4
- <icon-button
5
- v-tap="showMore"
6
- :is-active="sidebarName === 'more'"
7
- :title="t('More')"
8
- >
9
- <IconExtension size="24" />
10
- </icon-button>
11
- </div>
12
- <div v-if="showMoreContent" ref="moreContentRef" class="show-more-content">
13
- <div class="control-compent">
14
- <chat-control
15
- v-if="roomStore.isSpeakAfterTakingSeatMode"
16
- @click="handleControlClick('chatControl')"
17
- />
18
- <contact-control @click="handleControlClick('contactControl')" />
19
- <invite-control
20
- @show-overlay="handleShowOverlay"
21
- @click="handleControlClick('inviteControl')"
22
- />
23
- </div>
24
- <div v-tap="handleCancelControl" class="close">{{ t('Cancel') }}</div>
25
- </div>
26
- </div>
27
- </template>
28
- <script setup lang="ts">
29
- import { ref, onMounted, onUnmounted, defineEmits } from 'vue';
30
- import { IconExtension } from '@tencentcloud/uikit-base-component-vue3';
31
- import IconButton from '../../common/base/IconButton.vue';
32
- import userVoteControl from './useVoteControlHooks';
33
- import ChatControl from '../ChatControl.vue';
34
- import InviteControl from '../InviteControl.vue';
35
- import ContactControl from '../ContactControl.vue';
36
- import { useRoomStore } from '../../../stores/room';
37
- import bus from '../../../hooks/useMitt';
38
- import vTap from '../../../directives/vTap';
39
- import { roomService } from '../../../services';
40
-
41
- const moreControlConfig = roomService.getComponentConfig('MoreControl');
42
- const showMoreContent = ref(false);
43
- const moreContentRef = ref();
44
-
45
- const { t, sidebarName } = userVoteControl();
46
- const roomStore = useRoomStore();
47
- const emit = defineEmits(['show-overlay']);
48
- function showMore() {
49
- showMoreContent.value = true;
50
- }
51
-
52
- function handleCancelControl() {
53
- showMoreContent.value = false;
54
- }
55
- function handleControlClick(name: string) {
56
- bus.emit('experience-communication', name);
57
- }
58
-
59
- function handleShowOverlay(data: { name: string; visible: boolean }) {
60
- showMoreContent.value = false;
61
- emit('show-overlay', data);
62
- }
63
-
64
- function handleDocumentClick(event: MouseEvent) {
65
- if (showMoreContent.value && !moreContentRef.value.contains(event.target)) {
66
- showMoreContent.value = false;
67
- }
68
- }
69
-
70
- onMounted(() => {
71
- document?.addEventListener('click', handleDocumentClick, true);
72
- });
73
-
74
- onUnmounted(() => {
75
- document?.removeEventListener('click', handleDocumentClick, true);
76
- });
77
- </script>
78
- <style lang="scss" scoped>
79
- .show-more-content {
80
- position: absolute;
81
- bottom: 15px;
82
- left: 5%;
83
- width: 90%;
84
- height: 17vh;
85
- padding: 10px;
86
- border-radius: 13px;
87
- animation-name: popup;
88
- animation-duration: 200ms;
89
- background-color: var(--bg-color-operate);
90
- }
91
-
92
- @keyframes popup {
93
- from {
94
- bottom: 0;
95
- }
96
-
97
- to {
98
- bottom: 15px;
99
- }
100
- }
101
-
102
- .control-compent {
103
- display: flex;
104
- }
105
-
106
- .close {
107
- position: relative;
108
- top: 10%;
109
- display: flex;
110
- align-items: center;
111
- justify-content: center;
112
- width: 100%;
113
- padding: 10px;
114
- font-style: normal;
115
- font-weight: 400;
116
- line-height: 24px;
117
- text-align: center;
118
- border-radius: 8px;
119
- color: var(--text-color-primary);
120
- background-color: var(--button-color-secondary-default);
121
- }
122
- </style>
@@ -1,31 +0,0 @@
1
- <template>
2
- <div v-if="moreControlConfig.visible" class="vote-control-container">
3
- <icon-button
4
- :is-active="sidebarName === 'vote'"
5
- :title="t('Vote')"
6
- @click-icon="toggleMoreSidebar"
7
- >
8
- <IconMore size="24" />
9
- </icon-button>
10
- </div>
11
- </template>
12
- <script setup lang="ts">
13
- import { IconMore } from '@tencentcloud/uikit-base-component-vue3';
14
- import IconButton from '../../common/base/IconButton.vue';
15
- import userMoreControl from './useMoreControlHooks';
16
- import { roomService } from '../../../services';
17
-
18
- const moreControlConfig = roomService.getComponentConfig('VoteControl');
19
- const { t, basicStore, sidebarName } = userMoreControl();
20
-
21
- function toggleMoreSidebar() {
22
- if (basicStore.setSidebarOpenStatus && basicStore.sidebarName === 'vote') {
23
- basicStore.setSidebarOpenStatus(false);
24
- basicStore.setSidebarName('');
25
- return;
26
- }
27
- basicStore.setSidebarOpenStatus(true);
28
- basicStore.setSidebarName('vote');
29
- }
30
- </script>
31
- <style lang="scss" scoped></style>
@@ -1,8 +0,0 @@
1
- import VoteControlH5 from './VoteControlH5.vue';
2
- import VoteControlPc from './VoteControlPC.vue';
3
-
4
- import { isMobile } from '../../../utils/environment';
5
-
6
- const VoteControl = isMobile ? VoteControlH5 : VoteControlPc;
7
-
8
- export default VoteControl;
@@ -1,23 +0,0 @@
1
- import { computed } from 'vue';
2
- import { useBasicStore } from '../../../stores/basic';
3
- import { storeToRefs } from 'pinia';
4
- import { useI18n } from '../../../locales';
5
- import { ICON_NAME } from '../../../constants/icon';
6
-
7
- export default function useControl() {
8
- const { t } = useI18n();
9
-
10
- const basicStore = useBasicStore();
11
- const { sidebarName } = storeToRefs(basicStore);
12
-
13
- const iconName = computed(() =>
14
- sidebarName.value === 'vote' ? ICON_NAME.MoreActive : ICON_NAME.More
15
- );
16
-
17
- return {
18
- t,
19
- basicStore,
20
- iconName,
21
- sidebarName,
22
- };
23
- }