@azure/communication-react 1.7.0-alpha-202308120012 → 1.7.0-alpha-202308160012
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 +1 -0
- package/dist/dist-cjs/communication-react/index.js +56 -22
- 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/calling-component-bindings/src/participantListSelector.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/StatefulChatThreadClient.js +2 -1
- package/dist/dist-esm/chat-stateful-client/src/StatefulChatThreadClient.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +23 -13
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.d.ts +9 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js +8 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/baseSelectors.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/deviceCountSelector.d.ts +11 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/deviceCountSelector.js +14 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/deviceCountSelector.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js +11 -7
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/DesktopMoreButton.js.map +1 -1
- package/package.json +13 -13
@@ -5029,6 +5029,7 @@ export declare const createAzureCommunicationCallWithChatAdapter: ({ userId, dis
|
|
5029
5029
|
* Create a {@link CallWithChatAdapter} using the provided {@link StatefulChatClient} and {@link StatefulCallClient}.
|
5030
5030
|
*
|
5031
5031
|
* Useful if you want to keep a reference to {@link StatefulChatClient} and {@link StatefulCallClient}.
|
5032
|
+
* Please note that chatThreadClient has to be created by StatefulChatClient via chatClient.getChatThreadClient(chatThreadId) API.
|
5032
5033
|
* Consider using {@link createAzureCommunicationCallWithChatAdapter} for a simpler API.
|
5033
5034
|
*
|
5034
5035
|
* @public
|
@@ -178,7 +178,7 @@ const _isValidIdentifier = (identifier) => {
|
|
178
178
|
// Copyright (c) Microsoft Corporation.
|
179
179
|
// Licensed under the MIT license.
|
180
180
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
181
|
-
var telemetryVersion = '1.7.0-alpha-
|
181
|
+
var telemetryVersion = '1.7.0-alpha-202308160012';
|
182
182
|
|
183
183
|
// Copyright (c) Microsoft Corporation.
|
184
184
|
/**
|
@@ -19430,6 +19430,7 @@ class ProxyChatThreadClient {
|
|
19430
19430
|
}
|
19431
19431
|
case 'sendMessage': {
|
19432
19432
|
return this._context.withAsyncErrorTeedToState((...args) => __awaiter$m(this, void 0, void 0, function* () {
|
19433
|
+
var _a;
|
19433
19434
|
// Retry logic?
|
19434
19435
|
const [request, options] = args;
|
19435
19436
|
const { content } = request;
|
@@ -19438,7 +19439,7 @@ class ProxyChatThreadClient {
|
|
19438
19439
|
content: { message: content },
|
19439
19440
|
clientMessageId,
|
19440
19441
|
id: '',
|
19441
|
-
type: 'text',
|
19442
|
+
type: (_a = options === null || options === void 0 ? void 0 : options.type) !== null && _a !== void 0 ? _a : 'text',
|
19442
19443
|
sequenceId: '',
|
19443
19444
|
version: '',
|
19444
19445
|
createdOn: new Date(),
|
@@ -22659,6 +22660,14 @@ const getIsScreenShareOn = (state) => { var _a, _b; return (_b = (_a = state.cal
|
|
22659
22660
|
* @private
|
22660
22661
|
*/
|
22661
22662
|
const getIsPreviewCameraOn = (state) => _isPreviewOn(state.devices);
|
22663
|
+
/**
|
22664
|
+
* @private
|
22665
|
+
*/
|
22666
|
+
const getMicrophones = (state) => state.devices.microphones;
|
22667
|
+
/**
|
22668
|
+
* @private
|
22669
|
+
*/
|
22670
|
+
const getCameras = (state) => state.devices.cameras;
|
22662
22671
|
/**
|
22663
22672
|
* @private
|
22664
22673
|
*/
|
@@ -23293,6 +23302,14 @@ const DesktopMoreButton = (props) => {
|
|
23293
23302
|
tooltipOffContent: localeStrings.strings.callWithChat.moreDrawerButtonTooltip
|
23294
23303
|
}), [localeStrings]);
|
23295
23304
|
const moreButtonContextualMenuItems = [];
|
23305
|
+
/* @conditional-compile-remove(close-captions) */ /* @conditional-compile-remove(gallery-layouts) */
|
23306
|
+
const menuSubIconStyleSet = {
|
23307
|
+
root: {
|
23308
|
+
height: 'unset',
|
23309
|
+
lineHeight: '100%',
|
23310
|
+
width: '1.25rem'
|
23311
|
+
}
|
23312
|
+
};
|
23296
23313
|
/*@conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */
|
23297
23314
|
moreButtonContextualMenuItems.push({
|
23298
23315
|
key: 'holdButtonKey',
|
@@ -23310,13 +23327,6 @@ const DesktopMoreButton = (props) => {
|
|
23310
23327
|
/* @conditional-compile-remove(close-captions) */
|
23311
23328
|
if (props.isCaptionsSupported) {
|
23312
23329
|
const captionsContextualMenuItems = [];
|
23313
|
-
const menuSubIconStyleSet = {
|
23314
|
-
root: {
|
23315
|
-
height: 'unset',
|
23316
|
-
lineHeight: '100%',
|
23317
|
-
width: '1.25rem'
|
23318
|
-
}
|
23319
|
-
};
|
23320
23330
|
moreButtonContextualMenuItems.push({
|
23321
23331
|
key: 'liveCaptionsKey',
|
23322
23332
|
id: 'common-call-composite-captions-button',
|
@@ -23403,6 +23413,9 @@ const DesktopMoreButton = (props) => {
|
|
23403
23413
|
itemProps: {
|
23404
23414
|
styles: buttonFlyoutIncreasedSizeStyles
|
23405
23415
|
},
|
23416
|
+
submenuIconProps: {
|
23417
|
+
styles: menuSubIconStyleSet
|
23418
|
+
},
|
23406
23419
|
text: localeStrings.strings.call.moreButtonGalleryControlLabel,
|
23407
23420
|
subMenuProps: {
|
23408
23421
|
items: [
|
@@ -27624,6 +27637,17 @@ const containerStyles = {
|
|
27624
27637
|
}
|
27625
27638
|
};
|
27626
27639
|
|
27640
|
+
// Copyright (c) Microsoft Corporation.
|
27641
|
+
/**
|
27642
|
+
* @private
|
27643
|
+
*/
|
27644
|
+
const deviceCountSelector = reselect.createSelector([getCameras, getMicrophones], (cameras, microphones) => {
|
27645
|
+
return {
|
27646
|
+
camerasCount: cameras.length,
|
27647
|
+
microphonesCount: microphones.length
|
27648
|
+
};
|
27649
|
+
});
|
27650
|
+
|
27627
27651
|
// Copyright (c) Microsoft Corporation.
|
27628
27652
|
// Licensed under the MIT license.
|
27629
27653
|
var __awaiter$7 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
|
@@ -27640,6 +27664,28 @@ const isShowing = (overrideSidePane) => {
|
|
27640
27664
|
};
|
27641
27665
|
const MainScreen = (props) => {
|
27642
27666
|
var _a, _b, _c, _d, _e;
|
27667
|
+
const adapter = useAdapter();
|
27668
|
+
const { camerasCount, microphonesCount } = useSelector$1(deviceCountSelector);
|
27669
|
+
const hasCameras = camerasCount > 0;
|
27670
|
+
const hasMicrophones = microphonesCount > 0;
|
27671
|
+
React.useEffect(() => {
|
27672
|
+
(() => __awaiter$7(void 0, void 0, void 0, function* () {
|
27673
|
+
var _a;
|
27674
|
+
const constrain = getQueryOptions({
|
27675
|
+
/* @conditional-compile-remove(rooms) */ role: (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role
|
27676
|
+
});
|
27677
|
+
yield adapter.askDevicePermission(constrain);
|
27678
|
+
adapter.queryCameras();
|
27679
|
+
adapter.queryMicrophones();
|
27680
|
+
adapter.querySpeakers();
|
27681
|
+
}))();
|
27682
|
+
}, [
|
27683
|
+
adapter,
|
27684
|
+
// Ensure we re-ask for permissions if the number of devices goes from 0 -> n during a call
|
27685
|
+
// as we cannot request permissions when there are no devices.
|
27686
|
+
hasCameras,
|
27687
|
+
hasMicrophones
|
27688
|
+
]);
|
27643
27689
|
const { callInvitationUrl, onRenderAvatar, onFetchAvatarPersonaData, onFetchParticipantMenuItems } = props;
|
27644
27690
|
const page = useSelector$1(getPage);
|
27645
27691
|
const endedCall = useSelector$1(getEndedCall);
|
@@ -27671,7 +27717,6 @@ const MainScreen = (props) => {
|
|
27671
27717
|
setTrackedErrors((prev) => trackErrorAsDismissed(error.type, prev));
|
27672
27718
|
}, []);
|
27673
27719
|
const latestErrors = React.useMemo(() => filterLatestErrors(activeErrors, trackedErrors), [activeErrors, trackedErrors]);
|
27674
|
-
const adapter = useAdapter();
|
27675
27720
|
const locale = useLocale();
|
27676
27721
|
const palette = useTheme().palette;
|
27677
27722
|
const leavePageStyle = React.useMemo(() => leavingPageStyle(palette), [palette]);
|
@@ -27755,18 +27800,6 @@ const CallComposite = (props) => React__default['default'].createElement(CallCom
|
|
27755
27800
|
/** @private */
|
27756
27801
|
const CallCompositeInner = (props) => {
|
27757
27802
|
const { adapter, callInvitationUrl, onFetchAvatarPersonaData, onFetchParticipantMenuItems, options, formFactor = 'desktop' } = props;
|
27758
|
-
React.useEffect(() => {
|
27759
|
-
(() => __awaiter$7(void 0, void 0, void 0, function* () {
|
27760
|
-
var _a;
|
27761
|
-
const constrain = getQueryOptions({
|
27762
|
-
/* @conditional-compile-remove(rooms) */ role: (_a = adapter.getState().call) === null || _a === void 0 ? void 0 : _a.role
|
27763
|
-
});
|
27764
|
-
yield adapter.askDevicePermission(constrain);
|
27765
|
-
adapter.queryCameras();
|
27766
|
-
adapter.queryMicrophones();
|
27767
|
-
adapter.querySpeakers();
|
27768
|
-
}))();
|
27769
|
-
}, [adapter]);
|
27770
27803
|
const mobileView = formFactor === 'mobile';
|
27771
27804
|
const modalLayerHostId = reactHooks.useId('modalLayerhost');
|
27772
27805
|
const mainScreenContainerClassName = React.useMemo(() => {
|
@@ -30679,6 +30712,7 @@ beforeDispose) => {
|
|
30679
30712
|
* Create a {@link CallWithChatAdapter} using the provided {@link StatefulChatClient} and {@link StatefulCallClient}.
|
30680
30713
|
*
|
30681
30714
|
* Useful if you want to keep a reference to {@link StatefulChatClient} and {@link StatefulCallClient}.
|
30715
|
+
* Please note that chatThreadClient has to be created by StatefulChatClient via chatClient.getChatThreadClient(chatThreadId) API.
|
30682
30716
|
* Consider using {@link createAzureCommunicationCallWithChatAdapter} for a simpler API.
|
30683
30717
|
*
|
30684
30718
|
* @public
|