@azure/communication-react 1.3.2-alpha-202207120013.0 → 1.3.2-alpha-202207160015.0
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/CHANGELOG.md +3 -0
- package/dist/communication-react.d.ts +21 -2
- package/dist/dist-cjs/communication-react/index.js +41 -17
- 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/calling-stateful-client/src/CallClientState.d.ts +4 -0
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +3 -1
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +9 -0
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js +5 -2
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +5 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +32 -13
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +4 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts.map +1 -1
- package/package.json +10 -9
package/CHANGELOG.md
CHANGED
@@ -32,6 +32,9 @@ Wed, 29 Jun 2022 17:31:05 GMT
|
|
32
32
|
- Fix loading spinner size in small containers ([PR #1995](https://github.com/azure/communication-ui-library/pull/1995) by 2684369+JamesBurnside@users.noreply.github.com)
|
33
33
|
- Add aria labels and announcer to file sharing components to make file sharing meet accessibility standards ([PR #1960](https://github.com/azure/communication-ui-library/pull/1960) by 97124699+prabhjot-msft@users.noreply.github.com)
|
34
34
|
- Update Participant pane to be an overlay on top of message thread so it can be tapped into when opened ([PR #1943](https://github.com/azure/communication-ui-library/pull/1943) by 97124699+prabhjot-msft@users.noreply.github.com)
|
35
|
+
- Fix bug where the "New Message" button was getting hidden under messages ([PR #2046](https://github.com/Azure/communication-ui-library/pull/2046) by carolinecao@microsoft.com)
|
36
|
+
- Fix bug where Chat participant pane in chat composite mobile view causing overflow ([PR #2038](https://github.com/Azure/communication-ui-library/pull/2038) by anjulgarg@live.com)
|
37
|
+
- Fix bug where Chat message thread size is wrong and shows scrollbar when a gif image is shared ([PR #2037](https://github.com/Azure/communication-ui-library/pull/2037) by anjulgarg@live.com)
|
35
38
|
|
36
39
|
|
37
40
|
### Improvements
|
@@ -75,6 +75,7 @@ import { PropertyChangedEvent } from '@azure/communication-calling';
|
|
75
75
|
import { default as React_2 } from 'react';
|
76
76
|
import type { RemoteParticipant } from '@azure/communication-calling';
|
77
77
|
import { RemoteParticipantState as RemoteParticipantState_2 } from '@azure/communication-calling';
|
78
|
+
import { RoomCallLocator } from '@azure/communication-calling';
|
78
79
|
import { ScalingMode } from '@azure/communication-calling';
|
79
80
|
import { SendMessageOptions } from '@azure/communication-chat';
|
80
81
|
import { StartCallOptions } from '@azure/communication-calling';
|
@@ -254,6 +255,7 @@ export declare type AzureCommunicationCallAdapterArgs = {
|
|
254
255
|
displayName: string;
|
255
256
|
credential: CommunicationTokenCredential;
|
256
257
|
locator: CallAdapterLocator;
|
258
|
+
alternativeCallerId?: string;
|
257
259
|
};
|
258
260
|
|
259
261
|
/**
|
@@ -496,6 +498,10 @@ export declare type CallAdapterClientState = {
|
|
496
498
|
* Latest error encountered for each operation performed via the adapter.
|
497
499
|
*/
|
498
500
|
latestErrors: AdapterErrors;
|
501
|
+
/**
|
502
|
+
* Azure communications Phone number to make PSTN calls with.
|
503
|
+
*/
|
504
|
+
alternativeCallerId?: string;
|
499
505
|
};
|
500
506
|
|
501
507
|
/**
|
@@ -580,7 +586,7 @@ export declare interface CallAdapterDeviceManagement {
|
|
580
586
|
*
|
581
587
|
* @public
|
582
588
|
*/
|
583
|
-
export declare type CallAdapterLocator = TeamsMeetingLinkLocator | GroupCallLocator | /* @conditional-compile-remove(teams-adhoc-call) */ CallParticipantsLocator;
|
589
|
+
export declare type CallAdapterLocator = TeamsMeetingLinkLocator | GroupCallLocator | /* @conditional-compile-remove(rooms) */ RoomCallLocator | /* @conditional-compile-remove(teams-adhoc-call) */ CallParticipantsLocator;
|
584
590
|
|
585
591
|
/**
|
586
592
|
* {@link CallAdapter} state.
|
@@ -845,6 +851,10 @@ export declare interface CallClientState {
|
|
845
851
|
* See documentation of {@Link CallErrors} for details.
|
846
852
|
*/
|
847
853
|
latestErrors: CallErrors;
|
854
|
+
/**
|
855
|
+
* Stores an ACS aquired phone number for making PSTN calls.
|
856
|
+
*/
|
857
|
+
alternativeCallerId?: string;
|
848
858
|
}
|
849
859
|
|
850
860
|
/**
|
@@ -3329,7 +3339,7 @@ export declare interface ControlBarProps {
|
|
3329
3339
|
*
|
3330
3340
|
* @public
|
3331
3341
|
*/
|
3332
|
-
export declare const createAzureCommunicationCallAdapter: ({ userId, displayName, credential, locator }: AzureCommunicationCallAdapterArgs) => Promise<CallAdapter>;
|
3342
|
+
export declare const createAzureCommunicationCallAdapter: ({ userId, displayName, credential, locator, alternativeCallerId }: AzureCommunicationCallAdapterArgs) => Promise<CallAdapter>;
|
3333
3343
|
|
3334
3344
|
/**
|
3335
3345
|
* Create a {@link CallAdapter} using the provided {@link StatefulCallClient}.
|
@@ -6388,6 +6398,15 @@ export declare type StatefulCallClientArgs = {
|
|
6388
6398
|
* state. It is not used by StatefulCallClient.
|
6389
6399
|
*/
|
6390
6400
|
userId: CommunicationUserIdentifier;
|
6401
|
+
/**
|
6402
|
+
* A phone number in E.164 format that will be used to represent the callers identity. This number is required
|
6403
|
+
* to start a PSTN call.
|
6404
|
+
*
|
6405
|
+
* example: +11234567
|
6406
|
+
*
|
6407
|
+
* This is not a cached value from the headless calling client.
|
6408
|
+
*/
|
6409
|
+
alternativeCallerId?: string;
|
6391
6410
|
};
|
6392
6411
|
|
6393
6412
|
/**
|
@@ -191,7 +191,7 @@ const fromFlatCommunicationIdentifier = (id) => {
|
|
191
191
|
// Copyright (c) Microsoft Corporation.
|
192
192
|
// Licensed under the MIT license.
|
193
193
|
// GENERATED FILE. DO NOT EDIT MANUALLY.
|
194
|
-
var telemetryVersion = '1.3.2-alpha-
|
194
|
+
var telemetryVersion = '1.3.2-alpha-202207160015.0';
|
195
195
|
|
196
196
|
// Copyright (c) Microsoft Corporation.
|
197
197
|
/**
|
@@ -9192,7 +9192,8 @@ const MAX_CALL_HISTORY_LENGTH = 10;
|
|
9192
9192
|
* @private
|
9193
9193
|
*/
|
9194
9194
|
class CallContext$1 {
|
9195
|
-
constructor(userId, maxListeners = 50
|
9195
|
+
constructor(userId, maxListeners = 50,
|
9196
|
+
/* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId) {
|
9196
9197
|
this._callIdHistory = new CallIdHistory();
|
9197
9198
|
this._logger = logger.createClientLogger('communication-react:calling-context');
|
9198
9199
|
this._state = {
|
@@ -9209,6 +9210,7 @@ class CallContext$1 {
|
|
9209
9210
|
},
|
9210
9211
|
callAgent: undefined,
|
9211
9212
|
userId: userId,
|
9213
|
+
/* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId: alternativeCallerId,
|
9212
9214
|
latestErrors: {}
|
9213
9215
|
};
|
9214
9216
|
this._emitter = new EventEmitter__default['default']();
|
@@ -11189,7 +11191,9 @@ class ProxyCallClient {
|
|
11189
11191
|
// callAgent if the createCallAgent succeeds.
|
11190
11192
|
const callAgent = yield target.createCallAgent(...args);
|
11191
11193
|
this._callAgent = callAgentDeclaratify(callAgent, this._context, this._internalContext);
|
11192
|
-
this._context.setCallAgent({
|
11194
|
+
this._context.setCallAgent({
|
11195
|
+
displayName: this._callAgent.displayName
|
11196
|
+
});
|
11193
11197
|
return this._callAgent;
|
11194
11198
|
}), 'CallClient.createCallAgent');
|
11195
11199
|
}
|
@@ -11236,7 +11240,8 @@ class ProxyCallClient {
|
|
11236
11240
|
*/
|
11237
11241
|
const createStatefulCallClient = (args, options) => {
|
11238
11242
|
callingStatefulLogger.info(`Creating calling stateful client using library version: ${_getApplicationId()}`);
|
11239
|
-
return createStatefulCallClientWithDeps(new communicationCalling.CallClient(withTelemetryTag(options === null || options === void 0 ? void 0 : options.callClientOptions)), new CallContext$1(communicationCommon.getIdentifierKind(args.userId), options === null || options === void 0 ? void 0 : options.maxStateChangeListeners
|
11243
|
+
return createStatefulCallClientWithDeps(new communicationCalling.CallClient(withTelemetryTag(options === null || options === void 0 ? void 0 : options.callClientOptions)), new CallContext$1(communicationCommon.getIdentifierKind(args.userId), options === null || options === void 0 ? void 0 : options.maxStateChangeListeners,
|
11244
|
+
/* @conditional-compile-remove(PSTN-calls) */ args.alternativeCallerId), new InternalCallContext());
|
11240
11245
|
};
|
11241
11246
|
/**
|
11242
11247
|
* Package-internal version of createStatefulCallClient that allows dependency injection.
|
@@ -15943,20 +15948,33 @@ class AzureCommunicationCallAdapter {
|
|
15943
15948
|
const audioOptions = { muted: microphoneOn !== null && microphoneOn !== void 0 ? microphoneOn : !this.getState().isLocalPreviewMicrophoneEnabled };
|
15944
15949
|
// TODO: find a way to expose stream to here
|
15945
15950
|
const videoOptions = { localVideoStreams: this.localStream ? [this.localStream] : undefined };
|
15946
|
-
const
|
15947
|
-
const call = isTeamsMeeting
|
15948
|
-
? this.callAgent.join(this.locator, {
|
15949
|
-
audioOptions,
|
15950
|
-
videoOptions
|
15951
|
-
})
|
15952
|
-
: this.callAgent.join(this.locator, {
|
15953
|
-
audioOptions,
|
15954
|
-
videoOptions
|
15955
|
-
});
|
15951
|
+
const call = this._joinCall(audioOptions, videoOptions);
|
15956
15952
|
this.processNewCall(call);
|
15957
15953
|
return call;
|
15958
15954
|
});
|
15959
15955
|
}
|
15956
|
+
_joinCall(audioOptions, videoOptions) {
|
15957
|
+
const isTeamsMeeting = !('groupId' in this.locator);
|
15958
|
+
/* @conditional-compile-remove(rooms) */
|
15959
|
+
const isRoomsCall = !('roomId' in this.locator);
|
15960
|
+
if (isTeamsMeeting) {
|
15961
|
+
return this.callAgent.join(this.locator, {
|
15962
|
+
audioOptions,
|
15963
|
+
videoOptions
|
15964
|
+
});
|
15965
|
+
}
|
15966
|
+
/* @conditional-compile-remove(rooms) */
|
15967
|
+
if (isRoomsCall) {
|
15968
|
+
return this.callAgent.join(this.locator, {
|
15969
|
+
audioOptions,
|
15970
|
+
videoOptions
|
15971
|
+
});
|
15972
|
+
}
|
15973
|
+
return this.callAgent.join(this.locator, {
|
15974
|
+
audioOptions,
|
15975
|
+
videoOptions
|
15976
|
+
});
|
15977
|
+
}
|
15960
15978
|
createStreamView(remoteUserId, options) {
|
15961
15979
|
return __awaiter$4(this, void 0, void 0, function* () {
|
15962
15980
|
if (remoteUserId === undefined) {
|
@@ -16239,9 +16257,15 @@ class AzureCommunicationCallAdapter {
|
|
16239
16257
|
*
|
16240
16258
|
* @public
|
16241
16259
|
*/
|
16242
|
-
const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator
|
16243
|
-
|
16244
|
-
const
|
16260
|
+
const createAzureCommunicationCallAdapter = ({ userId, displayName, credential, locator,
|
16261
|
+
/* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId }) => __awaiter$4(void 0, void 0, void 0, function* () {
|
16262
|
+
const callClient = createStatefulCallClient({
|
16263
|
+
userId,
|
16264
|
+
/* @conditional-compile-remove(PSTN-calls) */ alternativeCallerId
|
16265
|
+
});
|
16266
|
+
const callAgent = yield callClient.createCallAgent(credential, {
|
16267
|
+
displayName
|
16268
|
+
});
|
16245
16269
|
const adapter = createAzureCommunicationCallAdapterFromClient(callClient, callAgent, locator);
|
16246
16270
|
return adapter;
|
16247
16271
|
});
|