@@ -14,11 +14,11 @@ import { eventHandlerControl } from "comps/controls/eventHandlerControl";
1414import { styleControl } from "comps/controls/styleControl" ;
1515import {
1616 AnimationStyle ,
17- ChatBoxV2ContainerStyle ,
18- ChatBoxV2SidebarStyle ,
19- ChatBoxV2HeaderStyle ,
20- ChatBoxV2MessageStyle ,
21- ChatBoxV2InputStyle ,
17+ ChatBoxContainerStyle ,
18+ ChatBoxSidebarStyle ,
19+ ChatBoxHeaderStyle ,
20+ ChatBoxMessageStyle ,
21+ ChatBoxInputStyle ,
2222} from "comps/controls/styleControlConstants" ;
2323import { hiddenPropertyView } from "comps/utils/propertyUtils" ;
2424import { EditorContext } from "comps/editorState" ;
@@ -32,66 +32,66 @@ import type { ChatRoom, PendingRoomInvite } from "./store";
3232
3333const ChatEvents = [
3434 {
35- label : trans ( "chatBoxV2 .messageSent" ) ,
35+ label : trans ( "chatBox .messageSent" ) ,
3636 value : "messageSent" ,
37- description : trans ( "chatBoxV2 .messageSentDesc" ) ,
37+ description : trans ( "chatBox .messageSentDesc" ) ,
3838 } ,
3939 {
40- label : trans ( "chatBoxV2 .startTyping" ) ,
40+ label : trans ( "chatBox .startTyping" ) ,
4141 value : "startTyping" ,
42- description : trans ( "chatBoxV2 .startTypingDesc" ) ,
42+ description : trans ( "chatBox .startTypingDesc" ) ,
4343 } ,
4444 {
45- label : trans ( "chatBoxV2 .stopTyping" ) ,
45+ label : trans ( "chatBox .stopTyping" ) ,
4646 value : "stopTyping" ,
47- description : trans ( "chatBoxV2 .stopTypingDesc" ) ,
47+ description : trans ( "chatBox .stopTypingDesc" ) ,
4848 } ,
4949 {
50- label : trans ( "chatBoxV2 .roomSwitch" ) ,
50+ label : trans ( "chatBox .roomSwitch" ) ,
5151 value : "roomSwitch" ,
52- description : trans ( "chatBoxV2 .roomSwitchDesc" ) ,
52+ description : trans ( "chatBox .roomSwitchDesc" ) ,
5353 } ,
5454 {
55- label : trans ( "chatBoxV2 .roomJoin" ) ,
55+ label : trans ( "chatBox .roomJoin" ) ,
5656 value : "roomJoin" ,
57- description : trans ( "chatBoxV2 .roomJoinDesc" ) ,
57+ description : trans ( "chatBox .roomJoinDesc" ) ,
5858 } ,
5959 {
60- label : trans ( "chatBoxV2 .roomLeave" ) ,
60+ label : trans ( "chatBox .roomLeave" ) ,
6161 value : "roomLeave" ,
62- description : trans ( "chatBoxV2 .roomLeaveDesc" ) ,
62+ description : trans ( "chatBox .roomLeaveDesc" ) ,
6363 } ,
6464 {
65- label : trans ( "chatBoxV2 .roomCreate" ) ,
65+ label : trans ( "chatBox .roomCreate" ) ,
6666 value : "roomCreate" ,
67- description : trans ( "chatBoxV2 .roomCreateDesc" ) ,
67+ description : trans ( "chatBox .roomCreateDesc" ) ,
6868 } ,
6969 {
70- label : trans ( "chatBoxV2 .inviteSend" ) ,
70+ label : trans ( "chatBox .inviteSend" ) ,
7171 value : "inviteSend" ,
72- description : trans ( "chatBoxV2 .inviteSendDesc" ) ,
72+ description : trans ( "chatBox .inviteSendDesc" ) ,
7373 } ,
7474 {
75- label : trans ( "chatBoxV2 .inviteAccept" ) ,
75+ label : trans ( "chatBox .inviteAccept" ) ,
7676 value : "inviteAccept" ,
77- description : trans ( "chatBoxV2 .inviteAcceptDesc" ) ,
77+ description : trans ( "chatBox .inviteAcceptDesc" ) ,
7878 } ,
7979 {
80- label : trans ( "chatBoxV2 .inviteDecline" ) ,
80+ label : trans ( "chatBox .inviteDecline" ) ,
8181 value : "inviteDecline" ,
82- description : trans ( "chatBoxV2 .inviteDeclineDesc" ) ,
82+ description : trans ( "chatBox .inviteDeclineDesc" ) ,
8383 } ,
8484] as const ;
8585
8686// ─── Children map ────────────────────────────────────────────────────────────
8787
8888const childrenMap = {
8989 // ── Chat content ─────────────────────────────────────────────────
90- chatTitle : stringExposingStateControl ( "chatTitle" , trans ( "chatBoxV2 .chatTitleDefault" ) ) ,
90+ chatTitle : stringExposingStateControl ( "chatTitle" , trans ( "chatBox .chatTitleDefault" ) ) ,
9191 showHeader : withDefault ( BoolControl , true ) ,
9292 messages : jsonArrayControl ( [ ] ) ,
9393 currentUserId : withDefault ( StringControl , "user_1" ) ,
94- currentUserName : withDefault ( StringControl , trans ( "chatBoxV2 .currentUserNameDefault" ) ) ,
94+ currentUserName : withDefault ( StringControl , trans ( "chatBox .currentUserNameDefault" ) ) ,
9595 typingUsers : jsonArrayControl ( [ ] ) ,
9696 isAiThinking : withDefault ( BoolControl , false ) ,
9797 lastSentMessageText : stringExposingStateControl ( "lastSentMessageText" , "" ) ,
@@ -119,12 +119,12 @@ const childrenMap = {
119119 // ── Style / layout ────────────────────────────────────────────────
120120 autoHeight : AutoHeightControl ,
121121 onEvent : eventHandlerControl ( ChatEvents ) ,
122- style : styleControl ( ChatBoxV2ContainerStyle , "style" ) ,
122+ style : styleControl ( ChatBoxContainerStyle , "style" ) ,
123123 animationStyle : styleControl ( AnimationStyle , "animationStyle" ) ,
124- sidebarStyle : styleControl ( ChatBoxV2SidebarStyle , "sidebarStyle" ) ,
125- headerStyle : styleControl ( ChatBoxV2HeaderStyle , "headerStyle" ) ,
126- messageStyle : styleControl ( ChatBoxV2MessageStyle , "messageStyle" ) ,
127- inputStyle : styleControl ( ChatBoxV2InputStyle , "inputStyle" ) ,
124+ sidebarStyle : styleControl ( ChatBoxSidebarStyle , "sidebarStyle" ) ,
125+ headerStyle : styleControl ( ChatBoxHeaderStyle , "headerStyle" ) ,
126+ messageStyle : styleControl ( ChatBoxMessageStyle , "messageStyle" ) ,
127+ inputStyle : styleControl ( ChatBoxInputStyle , "inputStyle" ) ,
128128} ;
129129
130130// ─── Property panel ──────────────────────────────────────────────────────────
@@ -137,62 +137,62 @@ const ChatBoxPropertyView = React.memo((props: { children: any }) => {
137137 < >
138138 < Section name = { sectionNames . basic } >
139139 { children . chatTitle . propertyView ( {
140- label : trans ( "chatBoxV2 .chatTitleLabel" ) ,
141- tooltip : trans ( "chatBoxV2 .chatTitleTooltip" ) ,
140+ label : trans ( "chatBox .chatTitleLabel" ) ,
141+ tooltip : trans ( "chatBox .chatTitleTooltip" ) ,
142142 } ) }
143143 { children . messages . propertyView ( {
144- label : trans ( "chatBoxV2 .messagesLabel" ) ,
145- tooltip : trans ( "chatBoxV2 .messagesTooltip" ) ,
144+ label : trans ( "chatBox .messagesLabel" ) ,
145+ tooltip : trans ( "chatBox .messagesTooltip" ) ,
146146 } ) }
147147 { children . currentUserId . propertyView ( {
148- label : trans ( "chatBoxV2 .currentUserIdLabel" ) ,
149- tooltip : trans ( "chatBoxV2 .currentUserIdTooltip" ) ,
148+ label : trans ( "chatBox .currentUserIdLabel" ) ,
149+ tooltip : trans ( "chatBox .currentUserIdTooltip" ) ,
150150 } ) }
151151 { children . currentUserName . propertyView ( {
152- label : trans ( "chatBoxV2 .currentUserNameLabel" ) ,
153- tooltip : trans ( "chatBoxV2 .currentUserNameTooltip" ) ,
152+ label : trans ( "chatBox .currentUserNameLabel" ) ,
153+ tooltip : trans ( "chatBox .currentUserNameTooltip" ) ,
154154 } ) }
155155 </ Section >
156156
157- < Section name = { trans ( "chatBoxV2 .roomsPanelSection" ) } >
158- { children . showRoomsPanel . propertyView ( { label : trans ( "chatBoxV2 .showRoomsPanelLabel" ) } ) }
157+ < Section name = { trans ( "chatBox .roomsPanelSection" ) } >
158+ { children . showRoomsPanel . propertyView ( { label : trans ( "chatBox .showRoomsPanelLabel" ) } ) }
159159 { children . roomsPanelWidth . propertyView ( {
160- label : trans ( "chatBoxV2 .panelWidthLabel" ) ,
161- tooltip : trans ( "chatBoxV2 .panelWidthTooltip" ) ,
160+ label : trans ( "chatBox .panelWidthLabel" ) ,
161+ tooltip : trans ( "chatBox .panelWidthTooltip" ) ,
162162 } ) }
163163 { children . rooms . propertyView ( {
164- label : trans ( "chatBoxV2 .roomsLabel" ) ,
165- tooltip : trans ( "chatBoxV2 .roomsTooltip" ) ,
164+ label : trans ( "chatBox .roomsLabel" ) ,
165+ tooltip : trans ( "chatBox .roomsTooltip" ) ,
166166 } ) }
167167 { children . currentRoomId . propertyView ( {
168- label : trans ( "chatBoxV2 .currentRoomIdLabel" ) ,
169- tooltip : trans ( "chatBoxV2 .currentRoomIdTooltip" ) ,
168+ label : trans ( "chatBox .currentRoomIdLabel" ) ,
169+ tooltip : trans ( "chatBox .currentRoomIdTooltip" ) ,
170170 } ) }
171171 { children . pendingInvites . propertyView ( {
172- label : trans ( "chatBoxV2 .pendingInvitesLabel" ) ,
173- tooltip : trans ( "chatBoxV2 .pendingInvitesTooltip" ) ,
172+ label : trans ( "chatBox .pendingInvitesLabel" ) ,
173+ tooltip : trans ( "chatBox .pendingInvitesTooltip" ) ,
174174 } ) }
175- { children . allowRoomCreation . propertyView ( { label : trans ( "chatBoxV2 .allowRoomCreationLabel" ) } ) }
176- { children . allowRoomSearch . propertyView ( { label : trans ( "chatBoxV2 .allowRoomSearchLabel" ) } ) }
175+ { children . allowRoomCreation . propertyView ( { label : trans ( "chatBox .allowRoomCreationLabel" ) } ) }
176+ { children . allowRoomSearch . propertyView ( { label : trans ( "chatBox .allowRoomSearchLabel" ) } ) }
177177 </ Section >
178178
179- < Section name = { trans ( "chatBoxV2 .realTimeSection" ) } >
179+ < Section name = { trans ( "chatBox .realTimeSection" ) } >
180180 { children . typingUsers . propertyView ( {
181- label : trans ( "chatBoxV2 .typingUsersLabel" ) ,
182- tooltip : trans ( "chatBoxV2 .typingUsersTooltip" ) ,
181+ label : trans ( "chatBox .typingUsersLabel" ) ,
182+ tooltip : trans ( "chatBox .typingUsersTooltip" ) ,
183183 } ) }
184184 { children . isAiThinking . propertyView ( {
185- label : trans ( "chatBoxV2 .aiIsThinkingLabel" ) ,
186- tooltip : trans ( "chatBoxV2 .aiIsThinkingTooltip" ) ,
185+ label : trans ( "chatBox .aiIsThinkingLabel" ) ,
186+ tooltip : trans ( "chatBox .aiIsThinkingTooltip" ) ,
187187 } ) }
188188 { children . onlineUsers . propertyView ( {
189- label : trans ( "chatBoxV2 .onlineUsersLabel" ) ,
190- tooltip : trans ( "chatBoxV2 .onlineUsersTooltip" ) ,
189+ label : trans ( "chatBox .onlineUsersLabel" ) ,
190+ tooltip : trans ( "chatBox .onlineUsersTooltip" ) ,
191191 } ) }
192192 </ Section >
193193
194- < Section name = { trans ( "chatBoxV2 .displaySection" ) } >
195- { children . showHeader . propertyView ( { label : trans ( "chatBoxV2 .showHeaderLabel" ) } ) }
194+ < Section name = { trans ( "chatBox .displaySection" ) } >
195+ { children . showHeader . propertyView ( { label : trans ( "chatBox .showHeaderLabel" ) } ) }
196196 </ Section >
197197
198198 { [ "logic" , "both" ] . includes ( editorMode ) && (
@@ -210,16 +210,16 @@ const ChatBoxPropertyView = React.memo((props: { children: any }) => {
210210 < Section name = { sectionNames . style } >
211211 { children . style . getPropertyView ( ) }
212212 </ Section >
213- < Section name = { trans ( "chatBoxV2 .sidebarStyleSection" ) } >
213+ < Section name = { trans ( "chatBox .sidebarStyleSection" ) } >
214214 { children . sidebarStyle . getPropertyView ( ) }
215215 </ Section >
216- < Section name = { trans ( "chatBoxV2 .headerStyleSection" ) } >
216+ < Section name = { trans ( "chatBox .headerStyleSection" ) } >
217217 { children . headerStyle . getPropertyView ( ) }
218218 </ Section >
219- < Section name = { trans ( "chatBoxV2 .messageStyleSection" ) } >
219+ < Section name = { trans ( "chatBox .messageStyleSection" ) } >
220220 { children . messageStyle . getPropertyView ( ) }
221221 </ Section >
222- < Section name = { trans ( "chatBoxV2 .inputStyleSection" ) } >
222+ < Section name = { trans ( "chatBox .inputStyleSection" ) } >
223223 { children . inputStyle . getPropertyView ( ) }
224224 </ Section >
225225 < Section name = { sectionNames . animationStyle } hasTooltip = { true } >
@@ -231,11 +231,11 @@ const ChatBoxPropertyView = React.memo((props: { children: any }) => {
231231 ) ;
232232} ) ;
233233
234- ChatBoxPropertyView . displayName = "ChatBoxV2PropertyView " ;
234+ ChatBoxPropertyView . displayName = "ChatBoxPropertyView " ;
235235
236236// ─── Component ───────────────────────────────────────────────────────────────
237237
238- let ChatBoxV2Tmp = ( function ( ) {
238+ let ChatBoxTmp = ( function ( ) {
239239 return new UICompBuilder ( childrenMap , ( props ) => {
240240 const messages = Array . isArray ( props . messages ) ? props . messages : [ ] ;
241241 const rooms = ( Array . isArray ( props . rooms ) ? props . rooms : [ ] ) as unknown as ChatRoom [ ] ;
@@ -327,41 +327,41 @@ let ChatBoxV2Tmp = (function () {
327327 . build ( ) ;
328328} ) ( ) ;
329329
330- ChatBoxV2Tmp = class extends ChatBoxV2Tmp {
330+ ChatBoxTmp = class extends ChatBoxTmp {
331331 override autoHeight ( ) : boolean {
332332 return this . children . autoHeight . getView ( ) ;
333333 }
334334} ;
335335
336- export const ChatBoxV2Comp = withExposingConfigs ( ChatBoxV2Tmp , [
337- new NameConfig ( "chatTitle" , trans ( "chatBoxV2 .chatTitleExposed" ) ) ,
336+ export const ChatBoxComp = withExposingConfigs ( ChatBoxTmp , [
337+ new NameConfig ( "chatTitle" , trans ( "chatBox .chatTitleExposed" ) ) ,
338338 new NameConfig (
339339 "lastSentMessageText" ,
340- trans ( "chatBoxV2 .lastSentMessageTextExposed" ) ,
340+ trans ( "chatBox .lastSentMessageTextExposed" ) ,
341341 ) ,
342- new NameConfig ( "messageText" , trans ( "chatBoxV2 .messageTextExposed" ) ) ,
343- new NameConfig ( "currentRoomId" , trans ( "chatBoxV2 .currentRoomIdExposed" ) ) ,
342+ new NameConfig ( "messageText" , trans ( "chatBox .messageTextExposed" ) ) ,
343+ new NameConfig ( "currentRoomId" , trans ( "chatBox .currentRoomIdExposed" ) ) ,
344344 new NameConfig (
345345 "pendingRoomId" ,
346- trans ( "chatBoxV2 .pendingRoomIdExposed" ) ,
346+ trans ( "chatBox .pendingRoomIdExposed" ) ,
347347 ) ,
348- new NameConfig ( "newRoomName" , trans ( "chatBoxV2 .newRoomNameExposed" ) ) ,
348+ new NameConfig ( "newRoomName" , trans ( "chatBox .newRoomNameExposed" ) ) ,
349349 new NameConfig (
350350 "newRoomType" ,
351- trans ( "chatBoxV2 .newRoomTypeExposed" ) ,
351+ trans ( "chatBox .newRoomTypeExposed" ) ,
352352 ) ,
353- new NameConfig ( "newRoomDescription" , trans ( "chatBoxV2 .newRoomDescriptionExposed" ) ) ,
353+ new NameConfig ( "newRoomDescription" , trans ( "chatBox .newRoomDescriptionExposed" ) ) ,
354354 new NameConfig (
355355 "newRoomLlmQuery" ,
356- trans ( "chatBoxV2 .newRoomLlmQueryExposed" ) ,
356+ trans ( "chatBox .newRoomLlmQueryExposed" ) ,
357357 ) ,
358358 new NameConfig (
359359 "inviteTargetUserId" ,
360- trans ( "chatBoxV2 .inviteTargetUserIdExposed" ) ,
360+ trans ( "chatBox .inviteTargetUserIdExposed" ) ,
361361 ) ,
362362 new NameConfig (
363363 "pendingInviteId" ,
364- trans ( "chatBoxV2 .pendingInviteIdExposed" ) ,
364+ trans ( "chatBox .pendingInviteIdExposed" ) ,
365365 ) ,
366366 NameConfigHidden ,
367367] ) ;
0 commit comments