@@ -16,7 +16,6 @@ import {
16
16
gridItemCompToGridItems ,
17
17
Layers ,
18
18
isNumeric ,
19
- EditorContext ,
20
19
withMethodExposing ,
21
20
eventHandlerControl ,
22
21
DrawerStyle ,
@@ -26,19 +25,23 @@ import {
26
25
Drawer ,
27
26
changeChildAction ,
28
27
HintPlaceHolder ,
29
- styled ,
28
+ // styledm,
29
+ // DrawerWrapper,
30
30
BackgroundColorContext ,
31
31
ContainerCompBuilder ,
32
32
closeEvent ,
33
33
MeetingEventHandlerControl ,
34
34
} 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";
35
38
36
39
const EventOptions = [ closeEvent ] as const ;
37
40
import { 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
+ // `;
42
45
import AgoraRTC , {
43
46
type ICameraVideoTrack ,
44
47
type IMicrophoneAudioTrack ,
@@ -80,7 +83,7 @@ let screenShareStream: ILocalVideoTrack;
80
83
let userId : UID | null | undefined ;
81
84
let rtmChannelResponse : RtmChannel ;
82
85
let rtmClient : RtmClient ;
83
- // const ButtonStyle = styled (Button)`
86
+ // const ButtonStyle = styledm (Button)`
84
87
// position: absolute;
85
88
// left: 0;
86
89
// top: 0;
@@ -209,6 +212,7 @@ const CanvasContainerID = "__canvas_container__";
209
212
const meetingControllerChildren = {
210
213
visible : withDefault ( BooleanStateControl , "false" ) ,
211
214
onEvent : eventHandlerControl ( EventOptions ) ,
215
+ onMeetingEvent : MeetingEventHandlerControl ,
212
216
width : StringControl ,
213
217
height : StringControl ,
214
218
autoHeight : AutoHeightControl ,
@@ -219,12 +223,11 @@ const meetingControllerChildren = {
219
223
meetingActive : withDefault ( BooleanStateControl , "false" ) ,
220
224
audioControl : withDefault ( BooleanStateControl , "false" ) ,
221
225
videoControl : withDefault ( BooleanStateControl , "true" ) ,
222
- onMeetingEvent : MeetingEventHandlerControl ,
223
226
endCall : withDefault ( BooleanStateControl , "false" ) ,
224
227
sharing : withDefault ( BooleanStateControl , "false" ) ,
225
228
appId : withDefault ( StringControl , trans ( "meeting.appid" ) ) ,
226
- participants : stateComp ( [ ] ) ,
227
- usersScreenShared : stateComp ( [ ] ) ,
229
+ participants : stateComp < JSONValue > ( [ ] ) ,
230
+ usersScreenShared : stateComp < JSONValue > ( [ ] ) ,
228
231
localUser : jsonObjectExposingStateControl ( "" ) ,
229
232
localUserID : withDefault (
230
233
stringStateControl ( trans ( "meeting.localUserID" ) ) ,
@@ -236,7 +239,7 @@ const meetingControllerChildren = {
236
239
) ,
237
240
rtmToken : stringStateControl ( trans ( "meeting.rtmToken" ) ) ,
238
241
rtcToken : stringStateControl ( trans ( "meeting.rtcToken" ) ) ,
239
- messages : stateComp ( [ ] ) ,
242
+ messages : stateComp < JSONValue > ( [ ] ) ,
240
243
} ;
241
244
let MTComp = ( function ( ) {
242
245
return new ContainerCompBuilder (
@@ -483,74 +486,74 @@ let MTComp = (function () {
483
486
484
487
return (
485
488
< 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" ) ;
517
527
}
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
531
534
onClick={() => {
532
535
props.visible.onChange(false);
533
536
}}
534
537
>
535
538
<CloseOutlined />
536
539
</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> */ }
549
552
</ BackgroundColorContext . Provider >
550
553
) ;
551
554
}
552
555
)
553
- . setPropertyViewFn ( ( children :any ) => (
556
+ . setPropertyViewFn ( ( children : any ) => (
554
557
< >
555
558
{ /* {(EditorContext.editorModeStatus === "logic" ||
556
559
EditorContext.editorModeStatus === "both") && (
@@ -701,6 +704,12 @@ MTComp = withMethodExposing(MTComp, [
701
704
params : [ ] ,
702
705
} ,
703
706
execute : async ( comp : any , values : any ) => {
707
+ console . log ( "startMeeting " , {
708
+ user : userId + "" ,
709
+ audiostatus : false ,
710
+ speaking : false ,
711
+ streamingVideo : true ,
712
+ } ) ;
704
713
if ( comp . children . meetingActive . getView ( ) . value ) return ;
705
714
userId =
706
715
comp . children . localUserID . getView ( ) . value === ""
@@ -712,6 +721,12 @@ MTComp = withMethodExposing(MTComp, [
712
721
speaking : false ,
713
722
streamingVideo : true ,
714
723
} ) ;
724
+ console . log ( "startMeeting localUser " , {
725
+ user : userId + "" ,
726
+ audiostatus : false ,
727
+ speaking : false ,
728
+ streamingVideo : true ,
729
+ } ) ;
715
730
716
731
comp . children . localUser . children . value . dispatch (
717
732
changeChildAction (
0 commit comments