@azure/communication-react 1.9.0-alpha-202310190013 → 1.9.0-alpha-202310201708
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/dist/communication-react.d.ts +89 -53
- package/dist/dist-cjs/communication-react/index.js +652 -390
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/MockCallAdapter.d.ts +61 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/MockCallAdapter.js +255 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/MockCallAdapter.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +38 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +1 -80
- package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/index.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.d.ts +84 -23
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js +8 -5
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +3 -0
- package/dist/dist-esm/react-composites/src/composites/common/icons.js +4 -2
- package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +0 -79
- package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/index.d.ts +1 -2
- package/dist/dist-esm/react-composites/src/composites/index.js.map +1 -1
- package/package.json +13 -13
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +0 -17
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +0 -35
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.9.0-alpha-
|
|
1
|
+
{"version":3,"file":"telemetryVersion.js","sourceRoot":"","sources":["../../../../../acs-ui-common/src/telemetryVersion.js"],"names":[],"mappings":";AAAA,uCAAuC;AACvC,kCAAkC;AAElC,wCAAwC;AAExC,MAAM,CAAC,OAAO,GAAG,0BAA0B,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n// GENERATED FILE. DO NOT EDIT MANUALLY.\n\nmodule.exports = '1.9.0-alpha-202310201708';\n"]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { AudioDeviceInfo, Call, DtmfTone, ParticipantRole, PermissionConstraints, VideoDeviceInfo } from '@azure/communication-calling';
|
|
2
|
+
import { EnvironmentInfo } from '@azure/communication-calling';
|
|
3
|
+
import type { CallAdapter, CallAdapterState } from './adapter';
|
|
4
|
+
/**
|
|
5
|
+
* Temporary copy of the packages/react-composites/tests/browser/call/app/mocks/MockCallAdapter.ts
|
|
6
|
+
* @internal
|
|
7
|
+
*/
|
|
8
|
+
export declare class _MockCallAdapter implements CallAdapter {
|
|
9
|
+
constructor(testState: {
|
|
10
|
+
askDevicePermission?: (constrain: PermissionConstraints) => Promise<void>;
|
|
11
|
+
localParticipantRole?: ParticipantRole;
|
|
12
|
+
});
|
|
13
|
+
state: CallAdapterState;
|
|
14
|
+
private emitter;
|
|
15
|
+
setState(state: CallAdapterState): void;
|
|
16
|
+
addParticipant(): Promise<void>;
|
|
17
|
+
onStateChange(handler: (state: CallAdapterState) => void): void;
|
|
18
|
+
offStateChange(handler: (state: CallAdapterState) => void): void;
|
|
19
|
+
allowUnsupportedBrowserVersion(): void;
|
|
20
|
+
getState(): CallAdapterState;
|
|
21
|
+
dispose(): void;
|
|
22
|
+
joinCall(): Call | undefined;
|
|
23
|
+
leaveCall(): Promise<void>;
|
|
24
|
+
startCamera(): Promise<void>;
|
|
25
|
+
stopCamera(): Promise<void>;
|
|
26
|
+
mute(): Promise<void>;
|
|
27
|
+
unmute(): Promise<void>;
|
|
28
|
+
startCall(): Call | undefined;
|
|
29
|
+
holdCall(): Promise<void>;
|
|
30
|
+
resumeCall(): Promise<void>;
|
|
31
|
+
startScreenShare(): Promise<void>;
|
|
32
|
+
stopScreenShare(): Promise<void>;
|
|
33
|
+
raiseHand(): Promise<void>;
|
|
34
|
+
lowerHand(): Promise<void>;
|
|
35
|
+
removeParticipant(): Promise<void>;
|
|
36
|
+
createStreamView(): Promise<void>;
|
|
37
|
+
disposeStreamView(): Promise<void>;
|
|
38
|
+
disposeScreenShareStreamView(): Promise<void>;
|
|
39
|
+
disposeLocalVideoStreamView(): Promise<void>;
|
|
40
|
+
disposeRemoteVideoStreamView(): Promise<void>;
|
|
41
|
+
askDevicePermission(constrain: PermissionConstraints): Promise<void>;
|
|
42
|
+
queryCameras(): Promise<VideoDeviceInfo[]>;
|
|
43
|
+
queryMicrophones(): Promise<AudioDeviceInfo[]>;
|
|
44
|
+
querySpeakers(): Promise<AudioDeviceInfo[]>;
|
|
45
|
+
setCamera(): Promise<void>;
|
|
46
|
+
setMicrophone(): Promise<void>;
|
|
47
|
+
setSpeaker(): Promise<void>;
|
|
48
|
+
sendDtmfTone(dtmfTone: DtmfTone): Promise<void>;
|
|
49
|
+
on(): void;
|
|
50
|
+
off(): void;
|
|
51
|
+
getEnvironmentInfo(): Promise<EnvironmentInfo>;
|
|
52
|
+
startCaptions(): Promise<void>;
|
|
53
|
+
setCaptionLanguage(): Promise<void>;
|
|
54
|
+
setSpokenLanguage(): Promise<void>;
|
|
55
|
+
stopCaptions(): Promise<void>;
|
|
56
|
+
startVideoBackgroundEffect(): Promise<void>;
|
|
57
|
+
stopVideoBackgroundEffects(): Promise<void>;
|
|
58
|
+
updateBackgroundPickerImages(): void;
|
|
59
|
+
updateSelectedVideoBackgroundEffect(): void;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=MockCallAdapter.d.ts.map
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
5
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
6
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
7
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
8
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
9
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
/* @conditional-compile-remove(teams-identity-support) */
|
|
13
|
+
import { CallKind } from '@azure/communication-calling';
|
|
14
|
+
import { EventEmitter } from 'events';
|
|
15
|
+
/**
|
|
16
|
+
* Temporary copy of the packages/react-composites/tests/browser/call/app/mocks/MockCallAdapter.ts
|
|
17
|
+
* @internal
|
|
18
|
+
*/
|
|
19
|
+
// TODO: Remove this simplified copy of the MockCallAdapter when the original MockCallAdapter is moved to fake-backends package and can be imported
|
|
20
|
+
export class _MockCallAdapter {
|
|
21
|
+
constructor(testState) {
|
|
22
|
+
this.emitter = new EventEmitter();
|
|
23
|
+
this.state = Object.assign({}, createDefaultCallAdapterState(/* @conditional-compile-remove(rooms) */ testState.localParticipantRole));
|
|
24
|
+
if (testState.askDevicePermission) {
|
|
25
|
+
this.askDevicePermission = testState.askDevicePermission;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
setState(state) {
|
|
29
|
+
this.state = state;
|
|
30
|
+
this.emitter.emit('stateChanged', state);
|
|
31
|
+
}
|
|
32
|
+
addParticipant() {
|
|
33
|
+
throw Error('addParticipant not implemented');
|
|
34
|
+
}
|
|
35
|
+
onStateChange(handler) {
|
|
36
|
+
this.emitter.addListener('stateChanged', handler);
|
|
37
|
+
}
|
|
38
|
+
offStateChange(handler) {
|
|
39
|
+
this.emitter.removeListener('stateChanged', handler);
|
|
40
|
+
}
|
|
41
|
+
allowUnsupportedBrowserVersion() {
|
|
42
|
+
throw Error('allowWithUnsupportedBrowserVersion not implemented');
|
|
43
|
+
}
|
|
44
|
+
getState() {
|
|
45
|
+
return this.state;
|
|
46
|
+
}
|
|
47
|
+
dispose() {
|
|
48
|
+
throw Error('dispose not implemented');
|
|
49
|
+
}
|
|
50
|
+
joinCall() {
|
|
51
|
+
throw Error('joinCall not implemented');
|
|
52
|
+
}
|
|
53
|
+
leaveCall() {
|
|
54
|
+
throw Error('leaveCall not implemented');
|
|
55
|
+
}
|
|
56
|
+
startCamera() {
|
|
57
|
+
throw Error('leaveCall not implemented');
|
|
58
|
+
}
|
|
59
|
+
stopCamera() {
|
|
60
|
+
throw Error('stopCamera not implemented');
|
|
61
|
+
}
|
|
62
|
+
mute() {
|
|
63
|
+
throw Error('mute not implemented');
|
|
64
|
+
}
|
|
65
|
+
unmute() {
|
|
66
|
+
throw Error('unmute not implemented');
|
|
67
|
+
}
|
|
68
|
+
startCall() {
|
|
69
|
+
throw Error('startCall not implemented');
|
|
70
|
+
}
|
|
71
|
+
holdCall() {
|
|
72
|
+
return Promise.resolve();
|
|
73
|
+
}
|
|
74
|
+
resumeCall() {
|
|
75
|
+
return Promise.resolve();
|
|
76
|
+
}
|
|
77
|
+
startScreenShare() {
|
|
78
|
+
throw Error('startScreenShare not implemented');
|
|
79
|
+
}
|
|
80
|
+
stopScreenShare() {
|
|
81
|
+
throw Error('stopScreenShare not implemented');
|
|
82
|
+
}
|
|
83
|
+
/* @conditional-compile-remove(raise-hand) */
|
|
84
|
+
raiseHand() {
|
|
85
|
+
throw Error('raiseHand not implemented');
|
|
86
|
+
}
|
|
87
|
+
/* @conditional-compile-remove(raise-hand) */
|
|
88
|
+
lowerHand() {
|
|
89
|
+
throw Error('lowerHand not implemented');
|
|
90
|
+
}
|
|
91
|
+
removeParticipant() {
|
|
92
|
+
throw Error('removeParticipant not implemented');
|
|
93
|
+
}
|
|
94
|
+
createStreamView() {
|
|
95
|
+
throw Error('createStreamView not implemented');
|
|
96
|
+
}
|
|
97
|
+
disposeStreamView() {
|
|
98
|
+
return Promise.resolve();
|
|
99
|
+
}
|
|
100
|
+
disposeScreenShareStreamView() {
|
|
101
|
+
return Promise.resolve();
|
|
102
|
+
}
|
|
103
|
+
disposeLocalVideoStreamView() {
|
|
104
|
+
return Promise.resolve();
|
|
105
|
+
}
|
|
106
|
+
disposeRemoteVideoStreamView() {
|
|
107
|
+
return Promise.resolve();
|
|
108
|
+
}
|
|
109
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
110
|
+
askDevicePermission(constrain) {
|
|
111
|
+
throw Error('askDevicePermission not implemented');
|
|
112
|
+
}
|
|
113
|
+
queryCameras() {
|
|
114
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
115
|
+
return [];
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
queryMicrophones() {
|
|
119
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
120
|
+
return [];
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
querySpeakers() {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
return [];
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
setCamera() {
|
|
129
|
+
throw Error('setCamera not implemented');
|
|
130
|
+
}
|
|
131
|
+
setMicrophone() {
|
|
132
|
+
throw Error('setMicrophone not implemented');
|
|
133
|
+
}
|
|
134
|
+
setSpeaker() {
|
|
135
|
+
throw Error('setSpeaker not implemented');
|
|
136
|
+
}
|
|
137
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
138
|
+
sendDtmfTone(dtmfTone) {
|
|
139
|
+
throw Error('sendDtmfTone not implemented');
|
|
140
|
+
}
|
|
141
|
+
on() {
|
|
142
|
+
throw Error('on not implemented');
|
|
143
|
+
}
|
|
144
|
+
off() {
|
|
145
|
+
throw Error('off not implemented');
|
|
146
|
+
}
|
|
147
|
+
/* @conditional-compile-remove(PSTN-calls) */
|
|
148
|
+
getEnvironmentInfo() {
|
|
149
|
+
throw Error('getEnvironmentInfo not implemented');
|
|
150
|
+
}
|
|
151
|
+
/* @conditional-compile-remove(close-captions) */
|
|
152
|
+
startCaptions() {
|
|
153
|
+
throw Error('start captions not implemented');
|
|
154
|
+
}
|
|
155
|
+
/* @conditional-compile-remove(close-captions) */
|
|
156
|
+
setCaptionLanguage() {
|
|
157
|
+
throw Error('setCaptionLanguage not implemented');
|
|
158
|
+
}
|
|
159
|
+
/* @conditional-compile-remove(close-captions) */
|
|
160
|
+
setSpokenLanguage() {
|
|
161
|
+
throw Error('setSpokenLanguage not implemented');
|
|
162
|
+
}
|
|
163
|
+
/* @conditional-compile-remove(close-captions) */
|
|
164
|
+
stopCaptions() {
|
|
165
|
+
throw Error('stopCaptions not implemented');
|
|
166
|
+
}
|
|
167
|
+
/* @conditional-compile-remove(video-background-effects) */
|
|
168
|
+
startVideoBackgroundEffect() {
|
|
169
|
+
throw new Error('startVideoBackgroundEffect not implemented.');
|
|
170
|
+
}
|
|
171
|
+
/* @conditional-compile-remove(video-background-effects) */
|
|
172
|
+
stopVideoBackgroundEffects() {
|
|
173
|
+
throw new Error('stopVideoBackgroundEffects not implemented.');
|
|
174
|
+
}
|
|
175
|
+
/* @conditional-compile-remove(video-background-effects) */
|
|
176
|
+
updateBackgroundPickerImages() {
|
|
177
|
+
throw new Error('updateBackgroundPickerImages not implemented.');
|
|
178
|
+
}
|
|
179
|
+
/* @conditional-compile-remove(video-background-effects) */
|
|
180
|
+
updateSelectedVideoBackgroundEffect() {
|
|
181
|
+
throw new Error('updateSelectedVideoBackgroundEffect not implemented.');
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Default call adapter state that the {@link _MockCallAdapter} class is initialized with an optional role.
|
|
186
|
+
*/
|
|
187
|
+
const createDefaultCallAdapterState = (role) => {
|
|
188
|
+
return {
|
|
189
|
+
displayName: 'Agnes Thompson',
|
|
190
|
+
isLocalPreviewMicrophoneEnabled: true,
|
|
191
|
+
page: 'call',
|
|
192
|
+
call: {
|
|
193
|
+
id: 'call1',
|
|
194
|
+
/* @conditional-compile-remove(teams-identity-support) */
|
|
195
|
+
kind: CallKind.Call,
|
|
196
|
+
callerInfo: { displayName: 'caller', identifier: { kind: 'communicationUser', communicationUserId: '1' } },
|
|
197
|
+
direction: 'Incoming',
|
|
198
|
+
transcription: { isTranscriptionActive: false },
|
|
199
|
+
recording: { isRecordingActive: false },
|
|
200
|
+
startTime: new Date(500000000000),
|
|
201
|
+
endTime: new Date(500000000000),
|
|
202
|
+
diagnostics: { network: { latest: {} }, media: { latest: {} } },
|
|
203
|
+
state: 'Connected',
|
|
204
|
+
localVideoStreams: [],
|
|
205
|
+
isMuted: false,
|
|
206
|
+
isScreenSharingOn: false,
|
|
207
|
+
remoteParticipants: {},
|
|
208
|
+
remoteParticipantsEnded: {},
|
|
209
|
+
/* @conditional-compile-remove(raise-hand) */
|
|
210
|
+
raiseHand: { raisedHands: [] },
|
|
211
|
+
/* @conditional-compile-remove(rooms) */
|
|
212
|
+
role,
|
|
213
|
+
/* @conditional-compile-remove(close-captions) */
|
|
214
|
+
captionsFeature: {
|
|
215
|
+
captions: [],
|
|
216
|
+
supportedSpokenLanguages: [],
|
|
217
|
+
supportedCaptionLanguages: [],
|
|
218
|
+
currentCaptionLanguage: '',
|
|
219
|
+
currentSpokenLanguage: '',
|
|
220
|
+
isCaptionsFeatureActive: false,
|
|
221
|
+
startCaptionsInProgress: false
|
|
222
|
+
},
|
|
223
|
+
/* @conditional-compile-remove(call-transfer) */
|
|
224
|
+
transfer: {
|
|
225
|
+
acceptedTransfers: {}
|
|
226
|
+
},
|
|
227
|
+
/* @conditional-compile-remove(optimal-video-count) */
|
|
228
|
+
optimalVideoCount: {
|
|
229
|
+
maxRemoteVideoStreams: 4
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
userId: { kind: 'communicationUser', communicationUserId: '1' },
|
|
233
|
+
devices: {
|
|
234
|
+
isSpeakerSelectionAvailable: true,
|
|
235
|
+
selectedCamera: { id: 'camera1', name: '1st Camera', deviceType: 'UsbCamera' },
|
|
236
|
+
cameras: [{ id: 'camera1', name: '1st Camera', deviceType: 'UsbCamera' }],
|
|
237
|
+
selectedMicrophone: {
|
|
238
|
+
id: 'microphone1',
|
|
239
|
+
name: '1st Microphone',
|
|
240
|
+
deviceType: 'Microphone',
|
|
241
|
+
isSystemDefault: true
|
|
242
|
+
},
|
|
243
|
+
microphones: [{ id: 'microphone1', name: '1st Microphone', deviceType: 'Microphone', isSystemDefault: true }],
|
|
244
|
+
selectedSpeaker: { id: 'speaker1', name: '1st Speaker', deviceType: 'Speaker', isSystemDefault: true },
|
|
245
|
+
speakers: [{ id: 'speaker1', name: '1st Speaker', deviceType: 'Speaker', isSystemDefault: true }],
|
|
246
|
+
unparentedViews: [],
|
|
247
|
+
deviceAccess: { video: true, audio: true }
|
|
248
|
+
},
|
|
249
|
+
isTeamsCall: false,
|
|
250
|
+
/* @conditional-compile-remove(rooms) */
|
|
251
|
+
isRoomsCall: false,
|
|
252
|
+
latestErrors: {}
|
|
253
|
+
};
|
|
254
|
+
};
|
|
255
|
+
//# sourceMappingURL=MockCallAdapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MockCallAdapter.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallComposite/MockCallAdapter.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAUlC,yDAAyD;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAGxD,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGtC;;;GAGG;AACH,mJAAmJ;AACnJ,MAAM,OAAO,gBAAgB;IAC3B,YAAY,SAGX;QAYO,YAAO,GAAG,IAAI,YAAY,EAAE,CAAC;QAXnC,IAAI,CAAC,KAAK,qBACL,6BAA6B,CAAC,wCAAwC,CAAC,SAAS,CAAC,oBAAoB,CAAC,CAC1G,CAAC;QAEF,IAAI,SAAS,CAAC,mBAAmB,EAAE;YACjC,IAAI,CAAC,mBAAmB,GAAG,SAAS,CAAC,mBAAmB,CAAC;SAC1D;IACH,CAAC;IAMD,QAAQ,CAAC,KAAuB;QAC9B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC;IAC3C,CAAC;IAED,cAAc;QACZ,MAAM,KAAK,CAAC,gCAAgC,CAAC,CAAC;IAChD,CAAC;IACD,aAAa,CAAC,OAA0C;QACtD,IAA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EAAE,YAAY;gBACxB,eAAe,EAAE,IAAI;aACtB;YACD,WAAW,EAAE,CAAC,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;YAC7G,eAAe,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE;YACtG,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,IAAI,EAAE,CAAC;YACjG,eAAe,EAAE,EAAE;YACnB,YAAY,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE;SAC3C;QACD,WAAW,EAAE,KAAK;QAClB,wCAAwC;QACxC,WAAW,EAAE,KAAK;QAClB,YAAY,EAAE,EAAE;KACjB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n AudioDeviceInfo,\n Call,\n DtmfTone,\n ParticipantRole,\n PermissionConstraints,\n VideoDeviceInfo\n} from '@azure/communication-calling';\n/* @conditional-compile-remove(teams-identity-support) */\nimport { CallKind } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\nimport { EventEmitter } from 'events';\nimport type { CallAdapter, CallAdapterState } from './adapter';\n\n/**\n * Temporary copy of the packages/react-composites/tests/browser/call/app/mocks/MockCallAdapter.ts\n * @internal\n */\n// TODO: Remove this simplified copy of the MockCallAdapter when the original MockCallAdapter is moved to fake-backends package and can be imported\nexport class _MockCallAdapter implements CallAdapter {\n constructor(testState: {\n askDevicePermission?: (constrain: PermissionConstraints) => Promise<void>;\n localParticipantRole?: ParticipantRole;\n }) {\n this.state = {\n ...createDefaultCallAdapterState(/* @conditional-compile-remove(rooms) */ testState.localParticipantRole)\n };\n\n if (testState.askDevicePermission) {\n this.askDevicePermission = testState.askDevicePermission;\n }\n }\n\n state: CallAdapterState;\n\n private emitter = new EventEmitter();\n\n setState(state: CallAdapterState): void {\n this.state = state;\n this.emitter.emit('stateChanged', state);\n }\n\n addParticipant(): Promise<void> {\n throw Error('addParticipant not implemented');\n }\n onStateChange(handler: (state: CallAdapterState) => void): void {\n this.emitter.addListener('stateChanged', handler);\n }\n offStateChange(handler: (state: CallAdapterState) => void): void {\n this.emitter.removeListener('stateChanged', handler);\n }\n allowUnsupportedBrowserVersion(): void {\n throw Error('allowWithUnsupportedBrowserVersion not implemented');\n }\n getState(): CallAdapterState {\n return this.state;\n }\n dispose(): void {\n throw Error('dispose not implemented');\n }\n joinCall(): Call | undefined {\n throw Error('joinCall not implemented');\n }\n leaveCall(): Promise<void> {\n throw Error('leaveCall not implemented');\n }\n startCamera(): Promise<void> {\n throw Error('leaveCall not implemented');\n }\n stopCamera(): Promise<void> {\n throw Error('stopCamera not implemented');\n }\n mute(): Promise<void> {\n throw Error('mute not implemented');\n }\n unmute(): Promise<void> {\n throw Error('unmute not implemented');\n }\n startCall(): Call | undefined {\n throw Error('startCall not implemented');\n }\n holdCall(): Promise<void> {\n return Promise.resolve();\n }\n resumeCall(): Promise<void> {\n return Promise.resolve();\n }\n startScreenShare(): Promise<void> {\n throw Error('startScreenShare not implemented');\n }\n stopScreenShare(): Promise<void> {\n throw Error('stopScreenShare not implemented');\n }\n /* @conditional-compile-remove(raise-hand) */\n raiseHand(): Promise<void> {\n throw Error('raiseHand not implemented');\n }\n /* @conditional-compile-remove(raise-hand) */\n lowerHand(): Promise<void> {\n throw Error('lowerHand not implemented');\n }\n removeParticipant(): Promise<void> {\n throw Error('removeParticipant not implemented');\n }\n createStreamView(): Promise<void> {\n throw Error('createStreamView not implemented');\n }\n disposeStreamView(): Promise<void> {\n return Promise.resolve();\n }\n disposeScreenShareStreamView(): Promise<void> {\n return Promise.resolve();\n }\n disposeLocalVideoStreamView(): Promise<void> {\n return Promise.resolve();\n }\n disposeRemoteVideoStreamView(): Promise<void> {\n return Promise.resolve();\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n askDevicePermission(constrain: PermissionConstraints): Promise<void> {\n throw Error('askDevicePermission not implemented');\n }\n async queryCameras(): Promise<VideoDeviceInfo[]> {\n return [];\n }\n async queryMicrophones(): Promise<AudioDeviceInfo[]> {\n return [];\n }\n async querySpeakers(): Promise<AudioDeviceInfo[]> {\n return [];\n }\n setCamera(): Promise<void> {\n throw Error('setCamera not implemented');\n }\n setMicrophone(): Promise<void> {\n throw Error('setMicrophone not implemented');\n }\n setSpeaker(): Promise<void> {\n throw Error('setSpeaker not implemented');\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n sendDtmfTone(dtmfTone: DtmfTone): Promise<void> {\n throw Error('sendDtmfTone not implemented');\n }\n on(): void {\n throw Error('on not implemented');\n }\n off(): void {\n throw Error('off not implemented');\n }\n /* @conditional-compile-remove(PSTN-calls) */\n getEnvironmentInfo(): Promise<EnvironmentInfo> {\n throw Error('getEnvironmentInfo not implemented');\n }\n\n /* @conditional-compile-remove(close-captions) */\n startCaptions(): Promise<void> {\n throw Error('start captions not implemented');\n }\n\n /* @conditional-compile-remove(close-captions) */\n setCaptionLanguage(): Promise<void> {\n throw Error('setCaptionLanguage not implemented');\n }\n\n /* @conditional-compile-remove(close-captions) */\n setSpokenLanguage(): Promise<void> {\n throw Error('setSpokenLanguage not implemented');\n }\n\n /* @conditional-compile-remove(close-captions) */\n stopCaptions(): Promise<void> {\n throw Error('stopCaptions not implemented');\n }\n /* @conditional-compile-remove(video-background-effects) */\n startVideoBackgroundEffect(): Promise<void> {\n throw new Error('startVideoBackgroundEffect not implemented.');\n }\n\n /* @conditional-compile-remove(video-background-effects) */\n stopVideoBackgroundEffects(): Promise<void> {\n throw new Error('stopVideoBackgroundEffects not implemented.');\n }\n /* @conditional-compile-remove(video-background-effects) */\n updateBackgroundPickerImages(): void {\n throw new Error('updateBackgroundPickerImages not implemented.');\n }\n /* @conditional-compile-remove(video-background-effects) */\n public updateSelectedVideoBackgroundEffect(): void {\n throw new Error('updateSelectedVideoBackgroundEffect not implemented.');\n }\n}\n\n/**\n * Default call adapter state that the {@link _MockCallAdapter} class is initialized with an optional role.\n */\nconst createDefaultCallAdapterState = (role?: ParticipantRole): CallAdapterState => {\n return {\n displayName: 'Agnes Thompson',\n isLocalPreviewMicrophoneEnabled: true,\n page: 'call',\n call: {\n id: 'call1',\n /* @conditional-compile-remove(teams-identity-support) */\n kind: CallKind.Call,\n callerInfo: { displayName: 'caller', identifier: { kind: 'communicationUser', communicationUserId: '1' } },\n direction: 'Incoming',\n transcription: { isTranscriptionActive: false },\n recording: { isRecordingActive: false },\n startTime: new Date(500000000000),\n endTime: new Date(500000000000),\n diagnostics: { network: { latest: {} }, media: { latest: {} } },\n state: 'Connected',\n localVideoStreams: [],\n isMuted: false,\n isScreenSharingOn: false,\n remoteParticipants: {},\n remoteParticipantsEnded: {},\n /* @conditional-compile-remove(raise-hand) */\n raiseHand: { raisedHands: [] },\n /* @conditional-compile-remove(rooms) */\n role,\n /* @conditional-compile-remove(close-captions) */\n captionsFeature: {\n captions: [],\n supportedSpokenLanguages: [],\n supportedCaptionLanguages: [],\n currentCaptionLanguage: '',\n currentSpokenLanguage: '',\n isCaptionsFeatureActive: false,\n startCaptionsInProgress: false\n },\n /* @conditional-compile-remove(call-transfer) */\n transfer: {\n acceptedTransfers: {}\n },\n /* @conditional-compile-remove(optimal-video-count) */\n optimalVideoCount: {\n maxRemoteVideoStreams: 4\n }\n },\n userId: { kind: 'communicationUser', communicationUserId: '1' },\n devices: {\n isSpeakerSelectionAvailable: true,\n selectedCamera: { id: 'camera1', name: '1st Camera', deviceType: 'UsbCamera' },\n cameras: [{ id: 'camera1', name: '1st Camera', deviceType: 'UsbCamera' }],\n selectedMicrophone: {\n id: 'microphone1',\n name: '1st Microphone',\n deviceType: 'Microphone',\n isSystemDefault: true\n },\n microphones: [{ id: 'microphone1', name: '1st Microphone', deviceType: 'Microphone', isSystemDefault: true }],\n selectedSpeaker: { id: 'speaker1', name: '1st Speaker', deviceType: 'Speaker', isSystemDefault: true },\n speakers: [{ id: 'speaker1', name: '1st Speaker', deviceType: 'Speaker', isSystemDefault: true }],\n unparentedViews: [],\n deviceAccess: { video: true, audio: true }\n },\n isTeamsCall: false,\n /* @conditional-compile-remove(rooms) */\n isRoomsCall: false,\n latestErrors: {}\n };\n};\n"]}
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js
CHANGED
|
@@ -8,7 +8,6 @@ import { ControlBar, DevicesButton } from "../../../../../react-components/src";
|
|
|
8
8
|
import { HoldButton } from "../../../../../react-components/src";
|
|
9
9
|
import React, { useMemo } from 'react';
|
|
10
10
|
import { Camera } from './buttons/Camera';
|
|
11
|
-
import { generateCustomControlBarButtons, onFetchCustomButtonPropsTrampoline } from './buttons/Custom';
|
|
12
11
|
import { Devices } from './buttons/Devices';
|
|
13
12
|
import { EndCall } from './buttons/EndCall';
|
|
14
13
|
import { Microphone } from './buttons/Microphone';
|
|
@@ -35,12 +34,14 @@ import { RaiseHand } from './buttons/RaiseHand';
|
|
|
35
34
|
/* @conditional-compile-remove(raise-hand) */
|
|
36
35
|
import { RaiseHandButton } from "../../../../../react-components/src";
|
|
37
36
|
import { _generateDefaultDeviceMenuProps } from "../../../../../react-components/src";
|
|
37
|
+
import { CUSTOM_BUTTON_OPTIONS, generateCustomCallControlBarButton, generateCustomCallDesktopOverflowButtons, onFetchCustomButtonPropsTrampoline } from '../../common/ControlBar/CustomButton';
|
|
38
38
|
// Enforce a background color on control bar to ensure it matches the composite background color.
|
|
39
39
|
const controlBarStyles = memoizeFunction((background) => ({ root: { background: background } }));
|
|
40
40
|
/**
|
|
41
41
|
* @private
|
|
42
42
|
*/
|
|
43
43
|
export const CallControls = (props) => {
|
|
44
|
+
var _a;
|
|
44
45
|
const options = useMemo(() => (typeof props.options === 'boolean' ? {} : props.options), [props.options]);
|
|
45
46
|
/* @conditional-compile-remove(PSTN-calls) */
|
|
46
47
|
const adapter = useAdapter();
|
|
@@ -144,12 +145,13 @@ export const CallControls = (props) => {
|
|
|
144
145
|
}
|
|
145
146
|
return items;
|
|
146
147
|
};
|
|
148
|
+
const customDrawerButtons = useMemo(() => generateCustomCallDesktopOverflowButtons(onFetchCustomButtonPropsTrampoline(typeof options === 'object' ? options : undefined), typeof options === 'object' ? options.displayType : undefined), [options]);
|
|
147
149
|
const moreButtonMenuItems = moreButtonContextualMenuItems();
|
|
148
150
|
let showMoreButton = isEnabled(options === null || options === void 0 ? void 0 : options.moreButton) && moreButtonMenuItems.length > 0;
|
|
149
151
|
if (showMoreButton) {
|
|
150
152
|
numberOfButtons++;
|
|
151
153
|
}
|
|
152
|
-
const customButtons = useMemo(() =>
|
|
154
|
+
const customButtons = useMemo(() => generateCustomCallControlBarButton(onFetchCustomButtonPropsTrampoline(options), options === null || options === void 0 ? void 0 : options.displayType), [options]);
|
|
153
155
|
numberOfButtons += React.Children.count(customButtons['primary']) + React.Children.count(customButtons['secondary']);
|
|
154
156
|
let showDevicesButtonInControlBar = isEnabled(options === null || options === void 0 ? void 0 : options.devicesButton);
|
|
155
157
|
if (showDevicesButtonInControlBar && (props.isMobile ? numberOfButtons < 5 : true)) {
|
|
@@ -205,6 +207,32 @@ export const CallControls = (props) => {
|
|
|
205
207
|
['data-ui-id']: 'call-composite-more-menu-raise-hand-button'
|
|
206
208
|
});
|
|
207
209
|
}
|
|
210
|
+
// Custom Buttons in More Button Menu should always be the last items pushed into the moreButtonMenuItems array
|
|
211
|
+
if (customDrawerButtons['primary']) {
|
|
212
|
+
customDrawerButtons['primary']
|
|
213
|
+
.slice(props.isMobile
|
|
214
|
+
? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS
|
|
215
|
+
: CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS)
|
|
216
|
+
.forEach((element) => {
|
|
217
|
+
moreButtonMenuItems.push(Object.assign({ itemProps: {
|
|
218
|
+
styles: buttonFlyoutIncreasedSizeStyles
|
|
219
|
+
} }, element));
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
if (customDrawerButtons['secondary']) {
|
|
223
|
+
customDrawerButtons['secondary'].forEach((element) => {
|
|
224
|
+
moreButtonMenuItems.push(Object.assign({ itemProps: {
|
|
225
|
+
styles: buttonFlyoutIncreasedSizeStyles
|
|
226
|
+
} }, element));
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
if (customDrawerButtons['overflow']) {
|
|
230
|
+
customDrawerButtons['overflow'].forEach((element) => {
|
|
231
|
+
moreButtonMenuItems.push(Object.assign({ itemProps: {
|
|
232
|
+
styles: buttonFlyoutIncreasedSizeStyles
|
|
233
|
+
} }, element));
|
|
234
|
+
});
|
|
235
|
+
}
|
|
208
236
|
/* @conditional-compile-remove(PSTN-calls) */
|
|
209
237
|
const [showDialpad, setShowDialpad] = useState(false);
|
|
210
238
|
const theme = useTheme();
|
|
@@ -228,10 +256,16 @@ export const CallControls = (props) => {
|
|
|
228
256
|
showParticipantsButtonInControlBar && (React.createElement(Participants, { option: options === null || options === void 0 ? void 0 : options.participantsButton, callInvitationURL: props.callInvitationURL, onFetchParticipantMenuItems: props.onFetchParticipantMenuItems, displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, isMobile: props.isMobile, disabled: isDisabled(options === null || options === void 0 ? void 0 : options.participantsButton) })) && (
|
|
229
257
|
/* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */
|
|
230
258
|
React.createElement(People, { checked: props.peopleButtonChecked, ariaLabel: peopleButtonStrings === null || peopleButtonStrings === void 0 ? void 0 : peopleButtonStrings.label, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact', onClick: props.onPeopleButtonClicked, "data-ui-id": "call-composite-people-button", strings: peopleButtonStrings, disabled: isDisabled(options === null || options === void 0 ? void 0 : options.participantsButton) })),
|
|
231
|
-
showDevicesButtonInControlBar && (React.createElement(Devices, { displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, disabled: isDisabled(options === null || options === void 0 ? void 0 : options.devicesButton) })),
|
|
259
|
+
showDevicesButtonInControlBar && (React.createElement(Devices, { displayType: options === null || options === void 0 ? void 0 : options.displayType, increaseFlyoutItemSize: props.increaseFlyoutItemSize, disabled: isDisabled(options === null || options === void 0 ? void 0 : options.devicesButton) })), (_a = customButtons['primary']) === null || _a === void 0 ? void 0 :
|
|
260
|
+
_a.slice(0, props.isMobile
|
|
261
|
+
? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS
|
|
262
|
+
: CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS).map((CustomButton, i) => {
|
|
263
|
+
return (React.createElement(CustomButton, { key: `primary-custom-button-${i}`,
|
|
264
|
+
// styles={commonButtonStyles}
|
|
265
|
+
showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact' }));
|
|
266
|
+
}),
|
|
232
267
|
/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */
|
|
233
268
|
showMoreButton && (React.createElement(MoreButton, { "data-ui-id": "common-call-composite-more-button", strings: moreButtonStrings, menuIconProps: { hidden: true }, menuProps: { items: moreButtonMenuItems }, showLabel: (options === null || options === void 0 ? void 0 : options.displayType) !== 'compact' })),
|
|
234
|
-
customButtons['primary'],
|
|
235
269
|
isEnabled(options === null || options === void 0 ? void 0 : options.endCallButton) && React.createElement(EndCall, { displayType: options === null || options === void 0 ? void 0 : options.displayType })))));
|
|
236
270
|
};
|
|
237
271
|
const isEnabled = (option) => option !== false;
|
package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CallControls.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallControls.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGnE,6CAA6C;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAgC,4CAAmC;AACrG,6CAA6C,CAAC,mDAAmD;AACjG,OAAO,EAAE,UAAU,EAAE,4CAAmC;AACxD,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,+BAA+B,EAAE,kCAAkC,EAAE,MAAM,kBAAkB,CAAC;AACvG,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,2FAA2F;AAC3F,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,6CAA6C,CAAC,mDAAmD,CAAC,iDAAiD,CAAC,6CAA6C;AACjM,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,6CAA6C,CAAC,mDAAmD,CAAC,iDAAiD,CAAC,6CAA6C;AACjM,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,6CAA6C,CAAC,mDAA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,CACP,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAe,EAAW,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC;AAEjE,eAAe;AACf,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAA0B,EAAW,EAAE;IAC3E,wCAAwC;IACxC,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC,WAAW,CAAC;IAEtC,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { memoizeFunction, Stack, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { IContextualMenuItem } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useState } from 'react';\nimport { _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { ControlBar, DevicesButton, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButton } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { Camera } from './buttons/Camera';\nimport { generateCustomControlBarButtons, onFetchCustomButtonPropsTrampoline } from './buttons/Custom';\nimport { Devices } from './buttons/Devices';\nimport { EndCall } from './buttons/EndCall';\nimport { Microphone } from './buttons/Microphone';\nimport { Participants } from './buttons/Participants';\nimport { ScreenShare } from './buttons/ScreenShare';\nimport { ContainerRectProps } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { People } from './buttons/People';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { MoreButton } from '../../common/MoreButton';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(raise-hand) */\nimport { usePropsFor } from '../hooks/usePropsFor';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\nimport { callControlsContainerStyles } from '../styles/CallPage.styles';\nimport { CommonCallAdapter } from '../adapter';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHand } from './buttons/RaiseHand';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHandButton, RaiseHandButtonProps } from '@internal/react-components';\nimport { _generateDefaultDeviceMenuProps } from '@internal/react-components';\n/**\n * @private\n */\nexport type CallControlsProps = {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n peopleButtonChecked?: boolean;\n onPeopleButtonClicked?: () => void;\n callInvitationURL?: string;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: boolean | CallControlOptions;\n /**\n * Option to increase the height of the button flyout menu items from 36px to 48px.\n * Recommended for mobile devices.\n */\n increaseFlyoutItemSize?: boolean;\n isMobile?: boolean;\n displayVertical?: boolean;\n};\n\n// Enforce a background color on control bar to ensure it matches the composite background color.\nconst controlBarStyles = memoizeFunction((background: string) => ({ root: { background: background } }));\n\n/**\n * @private\n */\nexport const CallControls = (props: CallControlsProps & ContainerRectProps): JSX.Element => {\n const options = useMemo(() => (typeof props.options === 'boolean' ? {} : props.options), [props.options]);\n /* @conditional-compile-remove(PSTN-calls) */\n const adapter = useAdapter();\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\n const localeStrings = useLocale();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const peopleButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.peopleButtonLabel,\n tooltipOffContent: localeStrings.strings.call.peopleButtonTooltipOpen,\n tooltipOnContent: localeStrings.strings.call.peopleButtonTooltipClose\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\n const moreButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.moreButtonCallingLabel,\n tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */\n const dialpadStrings = useMemo(\n () => ({\n dialpadModalAriaLabel: localeStrings.strings.call.dialpadModalAriaLabel,\n dialpadCloseModalButtonAriaLabel: localeStrings.strings.call.dialpadCloseModalButtonAriaLabel,\n placeholderText: localeStrings.strings.call.dtmfDialpadPlaceholderText\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const holdButtonProps = usePropsFor(HoldButton);\n\n /* @conditional-compile-remove(raise-hand) */\n const raiseHandButtonProps = usePropsFor(RaiseHandButton) as RaiseHandButtonProps;\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n const devicesButtonProps = usePropsFor(DevicesButton);\n\n let numberOfButtons = 0;\n\n const screenShareButtonIsEnabled = isEnabled(options?.screenShareButton);\n if (screenShareButtonIsEnabled) {\n numberOfButtons++;\n }\n\n const microphoneButtonIsEnabled = isEnabled(options?.microphoneButton);\n if (microphoneButtonIsEnabled) {\n numberOfButtons++;\n }\n\n const cameraButtonIsEnabled = isEnabled(options?.cameraButton);\n if (cameraButtonIsEnabled) {\n numberOfButtons++;\n }\n\n if (isEnabled(options?.endCallButton)) {\n numberOfButtons++;\n }\n\n const showParticipantsButtonInControlBar =\n isEnabled(options?.participantsButton) &&\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n !props.isMobile;\n if (showParticipantsButtonInControlBar) {\n numberOfButtons++;\n }\n\n const moreButtonContextualMenuItems = (): IContextualMenuItem[] => {\n const items: IContextualMenuItem[] = [];\n\n if (props.isMobile && props.onPeopleButtonClicked && isEnabled(options?.participantsButton)) {\n items.push({\n key: 'peopleButtonKey',\n text: localeStrings.component.strings.participantsButton.label,\n onClick: () => {\n if (props.onPeopleButtonClicked) {\n props.onPeopleButtonClicked();\n }\n },\n iconProps: { iconName: 'ControlButtonParticipantsContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.participantsButton),\n ['data-ui-id']: 'call-composite-more-menu-people-button'\n });\n }\n\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n if (!isRoomsCallTrampoline(adapter)) {\n items.push({\n key: 'holdButtonKey',\n text: localeStrings.component.strings.holdButton.tooltipOffContent,\n onClick: () => {\n holdButtonProps.onToggleHold();\n },\n iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.holdButton),\n ['data-ui-id']: 'hold-button'\n });\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n // dtmf tone sending only works for 1:1 PSTN call\n if (alternateCallerId) {\n items.push({\n key: 'showDialpadKey',\n text: localeStrings.strings.call.openDtmfDialpadLabel,\n onClick: () => {\n setShowDialpad(true);\n },\n iconProps: { iconName: 'PeoplePaneOpenDialpad', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n }\n });\n }\n\n return items;\n };\n\n const moreButtonMenuItems = moreButtonContextualMenuItems();\n let showMoreButton = isEnabled(options?.moreButton) && moreButtonMenuItems.length > 0;\n if (showMoreButton) {\n numberOfButtons++;\n }\n\n const customButtons = useMemo(\n () => generateCustomControlBarButtons(onFetchCustomButtonPropsTrampoline(options), options?.displayType),\n [options]\n );\n\n numberOfButtons += React.Children.count(customButtons['primary']) + React.Children.count(customButtons['secondary']);\n\n let showDevicesButtonInControlBar = isEnabled(options?.devicesButton);\n if (showDevicesButtonInControlBar && (props.isMobile ? numberOfButtons < 5 : true)) {\n numberOfButtons++;\n } else {\n showDevicesButtonInControlBar = false;\n\n showMoreButton = isEnabled(options?.moreButton);\n }\n\n /* @conditional-compile-remove(raise-hand) */\n const raiseHandButtonIsEnabled = isEnabled(options?.raiseHandButton);\n /* @conditional-compile-remove(raise-hand) */\n let showRaiseHandButtonInControlBar = raiseHandButtonIsEnabled;\n /* @conditional-compile-remove(raise-hand) */\n if (showRaiseHandButtonInControlBar && (props.isMobile ? numberOfButtons < 5 : true)) {\n numberOfButtons++;\n } else {\n // If more button is not present but enabled then replace previous button (devices button) with more button\n if (!showMoreButton && isEnabled(options?.moreButton)) {\n showMoreButton = true;\n showDevicesButtonInControlBar = false;\n }\n\n showRaiseHandButtonInControlBar = false;\n }\n\n if (!showDevicesButtonInControlBar) {\n const devicesButtonMenu = _generateDefaultDeviceMenuProps(\n devicesButtonProps,\n localeStrings.component.strings.devicesButton\n );\n moreButtonMenuItems.push({\n key: 'devicesButtonKey',\n text: localeStrings.component.strings.devicesButton.label,\n iconProps: { iconName: 'ControlButtonOptions', styles: { root: { lineHeight: 0 } } },\n subMenuProps: devicesButtonMenu,\n ['data-ui-id']: 'call-composite-more-menu-devices-button'\n });\n }\n\n /* @conditional-compile-remove(raise-hand) */\n if (!showRaiseHandButtonInControlBar) {\n moreButtonMenuItems.push({\n key: 'raiseHandButtonKey',\n text: raiseHandButtonProps.checked\n ? localeStrings.component.strings.raiseHandButton.onLabel\n : localeStrings.component.strings.raiseHandButton.offLabel,\n onClick: () => {\n if (raiseHandButtonProps.onToggleRaiseHand) {\n raiseHandButtonProps.onToggleRaiseHand();\n }\n },\n iconProps: { iconName: 'RaiseHandContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.raiseHandButton),\n ['data-ui-id']: 'call-composite-more-menu-raise-hand-button'\n });\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n const [showDialpad, setShowDialpad] = useState(false);\n\n const theme = useTheme();\n\n // when props.options is false then we want to hide the whole control bar.\n if (props.options === false) {\n return <></>;\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n const onDismissDialpad = (): void => {\n setShowDialpad(false);\n };\n\n return (\n <Stack horizontalAlign=\"center\" className={callControlsContainerStyles}>\n {\n /* @conditional-compile-remove(PSTN-calls) */\n <SendDtmfDialpad\n isMobile={!!props.isMobile}\n strings={dialpadStrings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n />\n }\n <Stack.Item>\n {/*\n Note: We use the layout=\"horizontal\" instead of dockedBottom because of how we position the\n control bar. The control bar exists in a Stack below the MediaGallery. The MediaGallery is\n set to grow and fill the remaining space not taken up by the ControlBar. If we were to use\n dockedBottom it has position absolute and would therefore float on top of the media gallery,\n occluding some of its content.\n */}\n <ControlBar\n layout={props.displayVertical ? 'vertical' : 'horizontal'}\n styles={controlBarStyles(theme.semanticColors.bodyBackground)}\n >\n {microphoneButtonIsEnabled && (\n <Microphone displayType={options?.displayType} disabled={isDisabled(options?.microphoneButton)} />\n )}\n {cameraButtonIsEnabled && (\n <Camera displayType={options?.displayType} disabled={isDisabled(options?.cameraButton)} />\n )}\n {\n /* @conditional-compile-remove(raise-hand) */ showRaiseHandButtonInControlBar && (\n <RaiseHand displayType={options?.displayType} />\n )\n }\n {screenShareButtonIsEnabled && (\n <ScreenShare\n option={options?.screenShareButton}\n displayType={options?.displayType}\n disabled={isDisabled(options?.screenShareButton)}\n />\n )}\n {showParticipantsButtonInControlBar && (\n <Participants\n option={options?.participantsButton}\n callInvitationURL={props.callInvitationURL}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n isMobile={props.isMobile}\n disabled={isDisabled(options?.participantsButton)}\n />\n ) && (\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n <People\n checked={props.peopleButtonChecked}\n ariaLabel={peopleButtonStrings?.label}\n showLabel={options?.displayType !== 'compact'}\n onClick={props.onPeopleButtonClicked}\n data-ui-id=\"call-composite-people-button\"\n strings={peopleButtonStrings}\n disabled={isDisabled(options?.participantsButton)}\n />\n )}\n {showDevicesButtonInControlBar && (\n <Devices\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n disabled={isDisabled(options?.devicesButton)}\n />\n )}\n {\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\n showMoreButton && (\n <MoreButton\n data-ui-id=\"common-call-composite-more-button\"\n strings={moreButtonStrings}\n menuIconProps={{ hidden: true }}\n menuProps={{ items: moreButtonMenuItems }}\n showLabel={options?.displayType !== 'compact'}\n />\n )\n }\n {customButtons['primary']}\n {isEnabled(options?.endCallButton) && <EndCall displayType={options?.displayType} />}\n </ControlBar>\n </Stack.Item>\n </Stack>\n );\n};\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n\n/** @private */\nexport const isRoomsCallTrampoline = (adapter: CommonCallAdapter): boolean => {\n /* @conditional-compile-remove(rooms) */\n return adapter.getState().isRoomsCall;\n\n return false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
|
|
1
|
+
{"version":3,"file":"CallControls.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallControls.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAGnE,6CAA6C;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,aAAa,EAAgC,4CAAmC;AACrG,6CAA6C,CAAC,mDAAmD;AACjG,OAAO,EAAE,UAAU,EAAE,4CAAmC;AACxD,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAEpD,2FAA2F;AAC3F,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,6CAA6C,CAAC,mDAAmD,CAAC,iDAAiD,CAAC,6CAA6C;AACjM,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,6CAA6C,CAAC,mDAAmD,CAAC,iDAAiD,CAAC,6CAA6C;AACjM,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,6CAA6C,CAAC,mDAAmD,CAAC,6CAA6C;AAC/I,OAAO,EAAE,W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AU,kBACE,mCAAmC,EAC9C,OAAO,EAAE,iBAAiB,EAC1B,aAAa,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAC/B,SAAS,EAAE,EAAE,KAAK,EAAE,mBAAmB,EAAE,EACzC,SAAS,EAAE,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,MAAK,SAAS,GAC7C,CACH;gBAEF,SAAS,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,aAAa,CAAC,IAAI,oBAAC,OAAO,IAAC,WAAW,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,WAAW,GAAI,CACzE,CACF,CACP,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,SAAS,GAAG,CAAC,MAAe,EAAW,EAAE,CAAC,MAAM,KAAK,KAAK,CAAC;AAEjE,eAAe;AACf,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,OAA0B,EAAW,EAAE;IAC3E,wCAAwC;IACxC,OAAO,OAAO,CAAC,QAAQ,EAAE,CAAC,WAAW,CAAC;IAEtC,OAAO,KAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { memoizeFunction, Stack, useTheme } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { IContextualMenuItem } from '@fluentui/react';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useState } from 'react';\nimport { _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { ControlBar, DevicesButton, ParticipantMenuItemsCallback } from '@internal/react-components';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\nimport { HoldButton } from '@internal/react-components';\nimport React, { useMemo } from 'react';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { Camera } from './buttons/Camera';\nimport { Devices } from './buttons/Devices';\nimport { EndCall } from './buttons/EndCall';\nimport { Microphone } from './buttons/Microphone';\nimport { Participants } from './buttons/Participants';\nimport { ScreenShare } from './buttons/ScreenShare';\nimport { ContainerRectProps } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\nimport { People } from './buttons/People';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { useLocale } from '../../localization';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { MoreButton } from '../../common/MoreButton';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(raise-hand) */\nimport { usePropsFor } from '../hooks/usePropsFor';\n/* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\nimport { buttonFlyoutIncreasedSizeStyles } from '../styles/Buttons.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { SendDtmfDialpad } from '../../common/SendDtmfDialpad';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\nimport { callControlsContainerStyles } from '../styles/CallPage.styles';\nimport { CommonCallAdapter } from '../adapter';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHand } from './buttons/RaiseHand';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaiseHandButton, RaiseHandButtonProps } from '@internal/react-components';\nimport { _generateDefaultDeviceMenuProps } from '@internal/react-components';\nimport {\n CUSTOM_BUTTON_OPTIONS,\n generateCustomCallControlBarButton,\n generateCustomCallDesktopOverflowButtons,\n onFetchCustomButtonPropsTrampoline\n} from '../../common/ControlBar/CustomButton';\n/**\n * @private\n */\nexport type CallControlsProps = {\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n peopleButtonChecked?: boolean;\n onPeopleButtonClicked?: () => void;\n callInvitationURL?: string;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n options?: boolean | CallControlOptions;\n /**\n * Option to increase the height of the button flyout menu items from 36px to 48px.\n * Recommended for mobile devices.\n */\n increaseFlyoutItemSize?: boolean;\n isMobile?: boolean;\n displayVertical?: boolean;\n};\n\n// Enforce a background color on control bar to ensure it matches the composite background color.\nconst controlBarStyles = memoizeFunction((background: string) => ({ root: { background: background } }));\n\n/**\n * @private\n */\nexport const CallControls = (props: CallControlsProps & ContainerRectProps): JSX.Element => {\n const options = useMemo(() => (typeof props.options === 'boolean' ? {} : props.options), [props.options]);\n /* @conditional-compile-remove(PSTN-calls) */\n const adapter = useAdapter();\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\n const localeStrings = useLocale();\n\n /* @conditional-compile-remove(one-to-n-calling) @conditional-compile-remove(PSTN-calls) */\n const peopleButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.peopleButtonLabel,\n tooltipOffContent: localeStrings.strings.call.peopleButtonTooltipOpen,\n tooltipOnContent: localeStrings.strings.call.peopleButtonTooltipClose\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\n const moreButtonStrings = useMemo(\n () => ({\n label: localeStrings.strings.call.moreButtonCallingLabel,\n tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */\n const dialpadStrings = useMemo(\n () => ({\n dialpadModalAriaLabel: localeStrings.strings.call.dialpadModalAriaLabel,\n dialpadCloseModalButtonAriaLabel: localeStrings.strings.call.dialpadCloseModalButtonAriaLabel,\n placeholderText: localeStrings.strings.call.dtmfDialpadPlaceholderText\n }),\n [localeStrings]\n );\n\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n const holdButtonProps = usePropsFor(HoldButton);\n\n /* @conditional-compile-remove(raise-hand) */\n const raiseHandButtonProps = usePropsFor(RaiseHandButton) as RaiseHandButtonProps;\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\n\n const devicesButtonProps = usePropsFor(DevicesButton);\n\n let numberOfButtons = 0;\n\n const screenShareButtonIsEnabled = isEnabled(options?.screenShareButton);\n if (screenShareButtonIsEnabled) {\n numberOfButtons++;\n }\n\n const microphoneButtonIsEnabled = isEnabled(options?.microphoneButton);\n if (microphoneButtonIsEnabled) {\n numberOfButtons++;\n }\n\n const cameraButtonIsEnabled = isEnabled(options?.cameraButton);\n if (cameraButtonIsEnabled) {\n numberOfButtons++;\n }\n\n if (isEnabled(options?.endCallButton)) {\n numberOfButtons++;\n }\n\n const showParticipantsButtonInControlBar =\n isEnabled(options?.participantsButton) &&\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n !props.isMobile;\n if (showParticipantsButtonInControlBar) {\n numberOfButtons++;\n }\n\n const moreButtonContextualMenuItems = (): IContextualMenuItem[] => {\n const items: IContextualMenuItem[] = [];\n\n if (props.isMobile && props.onPeopleButtonClicked && isEnabled(options?.participantsButton)) {\n items.push({\n key: 'peopleButtonKey',\n text: localeStrings.component.strings.participantsButton.label,\n onClick: () => {\n if (props.onPeopleButtonClicked) {\n props.onPeopleButtonClicked();\n }\n },\n iconProps: { iconName: 'ControlButtonParticipantsContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.participantsButton),\n ['data-ui-id']: 'call-composite-more-menu-people-button'\n });\n }\n\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n if (!isRoomsCallTrampoline(adapter)) {\n items.push({\n key: 'holdButtonKey',\n text: localeStrings.component.strings.holdButton.tooltipOffContent,\n onClick: () => {\n holdButtonProps.onToggleHold();\n },\n iconProps: { iconName: 'HoldCallContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.holdButton),\n ['data-ui-id']: 'hold-button'\n });\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n // dtmf tone sending only works for 1:1 PSTN call\n if (alternateCallerId) {\n items.push({\n key: 'showDialpadKey',\n text: localeStrings.strings.call.openDtmfDialpadLabel,\n onClick: () => {\n setShowDialpad(true);\n },\n iconProps: { iconName: 'PeoplePaneOpenDialpad', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n }\n });\n }\n return items;\n };\n\n const customDrawerButtons = useMemo(\n () =>\n generateCustomCallDesktopOverflowButtons(\n onFetchCustomButtonPropsTrampoline(typeof options === 'object' ? options : undefined),\n typeof options === 'object' ? options.displayType : undefined\n ),\n [options]\n );\n\n const moreButtonMenuItems = moreButtonContextualMenuItems();\n let showMoreButton = isEnabled(options?.moreButton) && moreButtonMenuItems.length > 0;\n if (showMoreButton) {\n numberOfButtons++;\n }\n\n const customButtons = useMemo(\n () => generateCustomCallControlBarButton(onFetchCustomButtonPropsTrampoline(options), options?.displayType),\n [options]\n );\n\n numberOfButtons += React.Children.count(customButtons['primary']) + React.Children.count(customButtons['secondary']);\n\n let showDevicesButtonInControlBar = isEnabled(options?.devicesButton);\n if (showDevicesButtonInControlBar && (props.isMobile ? numberOfButtons < 5 : true)) {\n numberOfButtons++;\n } else {\n showDevicesButtonInControlBar = false;\n\n showMoreButton = isEnabled(options?.moreButton);\n }\n\n /* @conditional-compile-remove(raise-hand) */\n const raiseHandButtonIsEnabled = isEnabled(options?.raiseHandButton);\n /* @conditional-compile-remove(raise-hand) */\n let showRaiseHandButtonInControlBar = raiseHandButtonIsEnabled;\n /* @conditional-compile-remove(raise-hand) */\n if (showRaiseHandButtonInControlBar && (props.isMobile ? numberOfButtons < 5 : true)) {\n numberOfButtons++;\n } else {\n // If more button is not present but enabled then replace previous button (devices button) with more button\n if (!showMoreButton && isEnabled(options?.moreButton)) {\n showMoreButton = true;\n showDevicesButtonInControlBar = false;\n }\n\n showRaiseHandButtonInControlBar = false;\n }\n\n if (!showDevicesButtonInControlBar) {\n const devicesButtonMenu = _generateDefaultDeviceMenuProps(\n devicesButtonProps,\n localeStrings.component.strings.devicesButton\n );\n moreButtonMenuItems.push({\n key: 'devicesButtonKey',\n text: localeStrings.component.strings.devicesButton.label,\n iconProps: { iconName: 'ControlButtonOptions', styles: { root: { lineHeight: 0 } } },\n subMenuProps: devicesButtonMenu,\n ['data-ui-id']: 'call-composite-more-menu-devices-button'\n });\n }\n\n /* @conditional-compile-remove(raise-hand) */\n if (!showRaiseHandButtonInControlBar) {\n moreButtonMenuItems.push({\n key: 'raiseHandButtonKey',\n text: raiseHandButtonProps.checked\n ? localeStrings.component.strings.raiseHandButton.onLabel\n : localeStrings.component.strings.raiseHandButton.offLabel,\n onClick: () => {\n if (raiseHandButtonProps.onToggleRaiseHand) {\n raiseHandButtonProps.onToggleRaiseHand();\n }\n },\n iconProps: { iconName: 'RaiseHandContextualMenuItem', styles: { root: { lineHeight: 0 } } },\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n disabled: isDisabled(options?.raiseHandButton),\n ['data-ui-id']: 'call-composite-more-menu-raise-hand-button'\n });\n }\n\n // Custom Buttons in More Button Menu should always be the last items pushed into the moreButtonMenuItems array\n if (customDrawerButtons['primary']) {\n customDrawerButtons['primary']\n .slice(\n props.isMobile\n ? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS\n : CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS\n )\n .forEach((element) => {\n moreButtonMenuItems.push({\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n ...element\n });\n });\n }\n if (customDrawerButtons['secondary']) {\n customDrawerButtons['secondary'].forEach((element) => {\n moreButtonMenuItems.push({\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n ...element\n });\n });\n }\n if (customDrawerButtons['overflow']) {\n customDrawerButtons['overflow'].forEach((element) => {\n moreButtonMenuItems.push({\n itemProps: {\n styles: buttonFlyoutIncreasedSizeStyles\n },\n ...element\n });\n });\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n const [showDialpad, setShowDialpad] = useState(false);\n\n const theme = useTheme();\n\n // when props.options is false then we want to hide the whole control bar.\n if (props.options === false) {\n return <></>;\n }\n\n /* @conditional-compile-remove(PSTN-calls) */\n const onDismissDialpad = (): void => {\n setShowDialpad(false);\n };\n\n return (\n <Stack horizontalAlign=\"center\" className={callControlsContainerStyles}>\n {\n /* @conditional-compile-remove(PSTN-calls) */\n <SendDtmfDialpad\n isMobile={!!props.isMobile}\n strings={dialpadStrings}\n showDialpad={showDialpad}\n onDismissDialpad={onDismissDialpad}\n />\n }\n <Stack.Item>\n {/*\n Note: We use the layout=\"horizontal\" instead of dockedBottom because of how we position the\n control bar. The control bar exists in a Stack below the MediaGallery. The MediaGallery is\n set to grow and fill the remaining space not taken up by the ControlBar. If we were to use\n dockedBottom it has position absolute and would therefore float on top of the media gallery,\n occluding some of its content.\n */}\n <ControlBar\n layout={props.displayVertical ? 'vertical' : 'horizontal'}\n styles={controlBarStyles(theme.semanticColors.bodyBackground)}\n >\n {microphoneButtonIsEnabled && (\n <Microphone displayType={options?.displayType} disabled={isDisabled(options?.microphoneButton)} />\n )}\n {cameraButtonIsEnabled && (\n <Camera displayType={options?.displayType} disabled={isDisabled(options?.cameraButton)} />\n )}\n {\n /* @conditional-compile-remove(raise-hand) */ showRaiseHandButtonInControlBar && (\n <RaiseHand displayType={options?.displayType} />\n )\n }\n {screenShareButtonIsEnabled && (\n <ScreenShare\n option={options?.screenShareButton}\n displayType={options?.displayType}\n disabled={isDisabled(options?.screenShareButton)}\n />\n )}\n {showParticipantsButtonInControlBar && (\n <Participants\n option={options?.participantsButton}\n callInvitationURL={props.callInvitationURL}\n onFetchParticipantMenuItems={props.onFetchParticipantMenuItems}\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n isMobile={props.isMobile}\n disabled={isDisabled(options?.participantsButton)}\n />\n ) && (\n /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(PSTN-calls) */\n <People\n checked={props.peopleButtonChecked}\n ariaLabel={peopleButtonStrings?.label}\n showLabel={options?.displayType !== 'compact'}\n onClick={props.onPeopleButtonClicked}\n data-ui-id=\"call-composite-people-button\"\n strings={peopleButtonStrings}\n disabled={isDisabled(options?.participantsButton)}\n />\n )}\n {showDevicesButtonInControlBar && (\n <Devices\n displayType={options?.displayType}\n increaseFlyoutItemSize={props.increaseFlyoutItemSize}\n disabled={isDisabled(options?.devicesButton)}\n />\n )}\n {customButtons['primary']\n ?.slice(\n 0,\n props.isMobile\n ? CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_MOBILE_CUSTOM_BUTTONS\n : CUSTOM_BUTTON_OPTIONS.MAX_PRIMARY_DESKTOP_CUSTOM_BUTTONS\n )\n .map((CustomButton, i) => {\n return (\n <CustomButton\n key={`primary-custom-button-${i}`}\n // styles={commonButtonStyles}\n showLabel={options?.displayType !== 'compact'}\n />\n );\n })}\n {\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */ /* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(raise-hand) */\n showMoreButton && (\n <MoreButton\n data-ui-id=\"common-call-composite-more-button\"\n strings={moreButtonStrings}\n menuIconProps={{ hidden: true }}\n menuProps={{ items: moreButtonMenuItems }}\n showLabel={options?.displayType !== 'compact'}\n />\n )\n }\n {isEnabled(options?.endCallButton) && <EndCall displayType={options?.displayType} />}\n </ControlBar>\n </Stack.Item>\n </Stack>\n );\n};\n\nconst isEnabled = (option: unknown): boolean => option !== false;\n\n/** @private */\nexport const isRoomsCallTrampoline = (adapter: CommonCallAdapter): boolean => {\n /* @conditional-compile-remove(rooms) */\n return adapter.getState().isRoomsCall;\n\n return false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
|
|
@@ -4,7 +4,6 @@ export type { DeviceCheckOptions } from './CallComposite';
|
|
|
4
4
|
export type { RemoteVideoTileMenuOptions } from './CallComposite';
|
|
5
5
|
export type { LocalVideoTileOptions } from './CallComposite';
|
|
6
6
|
export type { CallControlOptions } from './types/CallControlOptions';
|
|
7
|
-
export type { CustomCallControlButtonCallbackArgs, CustomCallControlButtonProps, CustomControlButtonProps } from './types/CallControlOptions';
|
|
8
7
|
export * from './Strings';
|
|
9
8
|
export { createAzureCommunicationCallAdapter, createAzureCommunicationCallAdapterFromClient, useAzureCommunicationCallAdapter } from './adapter';
|
|
10
9
|
export { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';
|
|
@@ -20,4 +19,5 @@ export type { CaptionsReceivedListener, IsCaptionsActiveChangedListener, IsCapti
|
|
|
20
19
|
export type { TransferRequestedListener } from './adapter';
|
|
21
20
|
export type { CapabilitiesChangedListener } from './adapter';
|
|
22
21
|
export type { CapabilityChangedNotificationStrings } from './components/CapabilitiesChangedNotificationBar';
|
|
22
|
+
export * from './MockCallAdapter';
|
|
23
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -5,4 +5,5 @@ export * from './Strings';
|
|
|
5
5
|
export { createAzureCommunicationCallAdapter, createAzureCommunicationCallAdapterFromClient, useAzureCommunicationCallAdapter } from './adapter';
|
|
6
6
|
/* @conditional-compile-remove(teams-identity-support) */
|
|
7
7
|
export { createTeamsCallAdapter, createTeamsCallAdapterFromClient, useTeamsCallAdapter } from './adapter';
|
|
8
|
+
export * from './MockCallAdapter';
|
|
8
9
|
//# sourceMappingURL=index.js.map
|