@azure/communication-react 1.25.0-alpha-202502270016 → 1.25.0-alpha-202503010018

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.
Files changed (28) hide show
  1. package/dist/communication-react.d.ts +11 -0
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-D-c4G2X8.js → ChatMessageComponentAsRichTextEditBox-DEdvPfmC.js} +2 -2
  3. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-D-c4G2X8.js.map → ChatMessageComponentAsRichTextEditBox-DEdvPfmC.js.map} +1 -1
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DZ0B-aeu.js → RichTextSendBoxWrapper-DZguqCTU.js} +2 -2
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-DZ0B-aeu.js.map → RichTextSendBoxWrapper-DZguqCTU.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-BJy8rF6U.js → index-SCfhjUoF.js} +41 -21
  7. package/dist/dist-cjs/communication-react/index-SCfhjUoF.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js +3 -5
  12. package/dist/dist-esm/calling-component-bindings/src/errorBarSelector.js.map +1 -1
  13. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js +3 -5
  14. package/dist/dist-esm/calling-component-bindings/src/notificationStackSelector.js.map +1 -1
  15. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +9 -0
  16. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js +8 -1
  17. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  18. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js +2 -2
  19. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js.map +1 -1
  20. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteScreenShare.styles.d.ts +5 -0
  21. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteScreenShare.styles.js +6 -0
  22. package/dist/dist-esm/react-components/src/components/VideoGallery/styles/RemoteScreenShare.styles.js.map +1 -1
  23. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +14 -3
  24. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  25. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +2 -0
  26. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  27. package/package.json +1 -1
  28. package/dist/dist-cjs/communication-react/index-BJy8rF6U.js.map +0 -1
@@ -131,7 +131,7 @@ class CallContext {
131
131
  this.emitter.off('callEnded', handler);
132
132
  }
133
133
  updateClientState(clientState) {
134
- var _a;
134
+ var _a, _b, _c;
135
135
  let call = this.callId ? clientState.calls[this.callId] : undefined;
136
136
  const latestEndedCall = clientState.callsEnded ? findLatestEndedCall(clientState.callsEnded) : undefined;
137
137
  // As the state is transitioning to a new state, trigger appropriate callback events.
@@ -155,14 +155,25 @@ class CallContext {
155
155
  const newPage = getCallCompositePage(call, latestEndedCall, transferCall, isReturningFromBreakoutRoom,
156
156
  /* @conditional-compile-remove(unsupported-browser) */ environmentInfo);
157
157
  if (!IsCallEndedPage(oldPage) && IsCallEndedPage(newPage)) {
158
- this.emitter.emit('callEnded', { callId: this.callId });
158
+ /**
159
+ * We want to make sure that the id of the call that is ending
160
+ * is the same as the call in the adapter as this is a scenario where
161
+ * the call has ended and not been transferred and report the codes for this call.
162
+ */
163
+ if (this.callId === (latestEndedCall === null || latestEndedCall === void 0 ? void 0 : latestEndedCall.id)) {
164
+ this.emitter.emit('callEnded', {
165
+ callId: latestEndedCall === null || latestEndedCall === void 0 ? void 0 : latestEndedCall.id,
166
+ code: (_a = latestEndedCall === null || latestEndedCall === void 0 ? void 0 : latestEndedCall.callEndReason) === null || _a === void 0 ? void 0 : _a.code,
167
+ subCode: (_b = latestEndedCall === null || latestEndedCall === void 0 ? void 0 : latestEndedCall.callEndReason) === null || _b === void 0 ? void 0 : _b.subCode
168
+ });
169
+ }
159
170
  // Reset the callId to undefined as the call has ended.
160
171
  this.setCurrentCallId(undefined);
161
172
  // Make sure that the call is set to undefined in the state.
162
173
  call = undefined;
163
174
  }
164
175
  if (this.state.page) {
165
- this.setState(Object.assign(Object.assign({}, this.state), { userId: clientState.userId, displayName: (_a = clientState.callAgent) === null || _a === void 0 ? void 0 : _a.displayName, call, page: newPage, endedCall: latestEndedCall, devices: clientState.deviceManager, latestErrors: clientState.latestErrors,
176
+ this.setState(Object.assign(Object.assign({}, this.state), { userId: clientState.userId, displayName: (_c = clientState.callAgent) === null || _c === void 0 ? void 0 : _c.displayName, call, page: newPage, endedCall: latestEndedCall, devices: clientState.deviceManager, latestErrors: clientState.latestErrors,
166
177
  /* @conditional-compile-remove(breakout-rooms) */ latestNotifications: clientState.latestNotifications, cameraStatus: (call === null || call === void 0 ? void 0 : call.localVideoStreams.find((s) => s.mediaStreamType === 'Video')) ||
167
178
  clientState.deviceManager.unparentedViews.find((s) => s.mediaStreamType === 'Video')
168
179
  ? 'On'