@@ -16,7 +16,6 @@ import {
1616 gridItemCompToGridItems ,
1717 Layers ,
1818 isNumeric ,
19- EditorContext ,
2019 withMethodExposing ,
2120 eventHandlerControl ,
2221 DrawerStyle ,
@@ -26,19 +25,23 @@ import {
2625 Drawer ,
2726 changeChildAction ,
2827 HintPlaceHolder ,
29- styled ,
28+ // styledm,
29+ // DrawerWrapper,
3030 BackgroundColorContext ,
3131 ContainerCompBuilder ,
3232 closeEvent ,
3333 MeetingEventHandlerControl ,
3434} from "lowcoder-sdk" ;
35+ import { default as CloseOutlined } from "@ant-design/icons/CloseOutlined" ;
36+ import type { JSONValue } from "../../../../lowcoder/src/util/jsonTypes" ;
37+ // import { default as Button } from "antd/es/button";
3538
3639const EventOptions = [ closeEvent ] as const ;
3740import { trans } from "../../i18n/comps" ;
38- const DrawerWrapper = styled . div `
39- // Shield the mouse events of the lower layer, the mask can be closed in the edit mode to prevent the lower layer from sliding
40- pointer-events: auto;
41- ` ;
41+ // const DrawerWrapper = styledm .div`
42+ // // Shield the mouse events of the lower layer, the mask can be closed in the edit mode to prevent the lower layer from sliding
43+ // pointer-events: auto;
44+ // `;
4245import AgoraRTC , {
4346 type ICameraVideoTrack ,
4447 type IMicrophoneAudioTrack ,
@@ -80,7 +83,7 @@ let screenShareStream: ILocalVideoTrack;
8083let userId : UID | null | undefined ;
8184let rtmChannelResponse : RtmChannel ;
8285let rtmClient : RtmClient ;
83- // const ButtonStyle = styled (Button)`
86+ // const ButtonStyle = styledm (Button)`
8487// position: absolute;
8588// left: 0;
8689// top: 0;
@@ -209,6 +212,7 @@ const CanvasContainerID = "__canvas_container__";
209212const meetingControllerChildren = {
210213 visible : withDefault ( BooleanStateControl , "false" ) ,
211214 onEvent : eventHandlerControl ( EventOptions ) ,
215+ onMeetingEvent : MeetingEventHandlerControl ,
212216 width : StringControl ,
213217 height : StringControl ,
214218 autoHeight : AutoHeightControl ,
@@ -219,12 +223,11 @@ const meetingControllerChildren = {
219223 meetingActive : withDefault ( BooleanStateControl , "false" ) ,
220224 audioControl : withDefault ( BooleanStateControl , "false" ) ,
221225 videoControl : withDefault ( BooleanStateControl , "true" ) ,
222- onMeetingEvent : MeetingEventHandlerControl ,
223226 endCall : withDefault ( BooleanStateControl , "false" ) ,
224227 sharing : withDefault ( BooleanStateControl , "false" ) ,
225228 appId : withDefault ( StringControl , trans ( "meeting.appid" ) ) ,
226- participants : stateComp ( [ ] ) ,
227- usersScreenShared : stateComp ( [ ] ) ,
229+ participants : stateComp < JSONValue > ( [ ] ) ,
230+ usersScreenShared : stateComp < JSONValue > ( [ ] ) ,
228231 localUser : jsonObjectExposingStateControl ( "" ) ,
229232 localUserID : withDefault (
230233 stringStateControl ( trans ( "meeting.localUserID" ) ) ,
@@ -236,7 +239,7 @@ const meetingControllerChildren = {
236239 ) ,
237240 rtmToken : stringStateControl ( trans ( "meeting.rtmToken" ) ) ,
238241 rtcToken : stringStateControl ( trans ( "meeting.rtcToken" ) ) ,
239- messages : stateComp ( [ ] ) ,
242+ messages : stateComp < JSONValue > ( [ ] ) ,
240243} ;
241244let MTComp = ( function ( ) {
242245 return new ContainerCompBuilder (
@@ -483,74 +486,74 @@ let MTComp = (function () {
483486
484487 return (
485488 < BackgroundColorContext . Provider value = { props . style . background } >
486- < DrawerWrapper >
487- < Drawer
488- // resizable={resizable}
489- onResizeStop = { onResizeStop }
490- rootStyle = {
491- props . visible . value
492- ? { overflow : "auto" , pointerEvents : "auto" }
493- : { }
494- }
495- styles = { {
496- wrapper : {
497- maxHeight : "100%" ,
498- maxWidth : "100%" ,
499- } ,
500- body : {
501- padding : 0 ,
502- backgroundColor : props . style . background ,
503- } ,
504- } }
505- closable = { false }
506- placement = { props . placement }
507- open = { props . visible . value }
508- getContainer = { ( ) =>
509- document . querySelector ( `#${ CanvasContainerID } ` ) || document . body
510- }
511- footer = { null }
512- width = { transToPxSize ( props . width || DEFAULT_SIZE ) }
513- height = {
514- ! props . autoHeight
515- ? transToPxSize ( props . height || DEFAULT_SIZE )
516- : ""
489+ { /* <DrawerWrapper> */ }
490+ < Drawer
491+ // resizable={resizable}
492+ onResizeStop = { onResizeStop }
493+ rootStyle = {
494+ props . visible . value
495+ ? { overflow : "auto" , pointerEvents : "auto" }
496+ : { }
497+ }
498+ styles = { {
499+ wrapper : {
500+ maxHeight : "100%" ,
501+ maxWidth : "100%" ,
502+ } ,
503+ body : {
504+ padding : 0 ,
505+ backgroundColor : props . style . background ,
506+ } ,
507+ } }
508+ closable = { false }
509+ placement = { props . placement }
510+ open = { props . visible . value }
511+ getContainer = { ( ) =>
512+ document . querySelector ( `#${ CanvasContainerID } ` ) || document . body
513+ }
514+ footer = { null }
515+ width = { transToPxSize ( props . width || DEFAULT_SIZE ) }
516+ height = {
517+ ! props . autoHeight
518+ ? transToPxSize ( props . height || DEFAULT_SIZE )
519+ : ""
520+ }
521+ onClose = { ( e : any ) => {
522+ props . visible . onChange ( false ) ;
523+ } }
524+ afterOpenChange = { ( visible : any ) => {
525+ if ( ! visible ) {
526+ props . onEvent ( "close" ) ;
517527 }
518- onClose = { ( e : any ) => {
519- props . visible . onChange ( false ) ;
520- } }
521- afterOpenChange = { ( visible : any ) => {
522- if ( ! visible ) {
523- props . onEvent ( "close" ) ;
524- }
525- } }
526- zIndex = { Layers . drawer }
527- maskClosable = { props . maskClosable }
528- mask = { props . showMask }
529- >
530- { /* <ButtonStyle
528+ } }
529+ zIndex = { Layers . drawer }
530+ maskClosable = { props . maskClosable }
531+ mask = { props . showMask }
532+ >
533+ { /* <ButtonStyle
531534 onClick={() => {
532535 props.visible.onChange(false);
533536 }}
534537 >
535538 <CloseOutlined />
536539 </ButtonStyle> */ }
537- < InnerGrid
538- { ...otherContainerProps }
539- items = { gridItemCompToGridItems ( items ) }
540- autoHeight = { props . autoHeight }
541- minHeight = { isTopBom ? DEFAULT_SIZE + "px" : "100%" }
542- style = { { height : "100%" } }
543- containerPadding = { [ DEFAULT_PADDING , DEFAULT_PADDING ] }
544- hintPlaceholder = { HintPlaceHolder }
545- bgColor = { props . style . background }
546- />
547- </ Drawer >
548- </ DrawerWrapper >
540+ < InnerGrid
541+ { ...otherContainerProps }
542+ items = { gridItemCompToGridItems ( items ) }
543+ autoHeight = { props . autoHeight }
544+ minHeight = { isTopBom ? DEFAULT_SIZE + "px" : "100%" }
545+ style = { { height : "100%" } }
546+ containerPadding = { [ DEFAULT_PADDING , DEFAULT_PADDING ] }
547+ hintPlaceholder = { HintPlaceHolder }
548+ bgColor = { props . style . background }
549+ />
550+ </ Drawer >
551+ { /* </DrawerWrapper> */ }
549552 </ BackgroundColorContext . Provider >
550553 ) ;
551554 }
552555 )
553- . setPropertyViewFn ( ( children :any ) => (
556+ . setPropertyViewFn ( ( children : any ) => (
554557 < >
555558 { /* {(EditorContext.editorModeStatus === "logic" ||
556559 EditorContext.editorModeStatus === "both") && (
@@ -701,6 +704,12 @@ MTComp = withMethodExposing(MTComp, [
701704 params : [ ] ,
702705 } ,
703706 execute : async ( comp : any , values : any ) => {
707+ console . log ( "startMeeting " , {
708+ user : userId + "" ,
709+ audiostatus : false ,
710+ speaking : false ,
711+ streamingVideo : true ,
712+ } ) ;
704713 if ( comp . children . meetingActive . getView ( ) . value ) return ;
705714 userId =
706715 comp . children . localUserID . getView ( ) . value === ""
@@ -712,6 +721,12 @@ MTComp = withMethodExposing(MTComp, [
712721 speaking : false ,
713722 streamingVideo : true ,
714723 } ) ;
724+ console . log ( "startMeeting localUser " , {
725+ user : userId + "" ,
726+ audiostatus : false ,
727+ speaking : false ,
728+ streamingVideo : true ,
729+ } ) ;
715730
716731 comp . children . localUser . children . value . dispatch (
717732 changeChildAction (
0 commit comments