@azure/communication-react 1.5.1-alpha-202302220019 → 1.5.1-alpha-202302250014

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.
@@ -4601,6 +4601,8 @@ export declare const DEFAULT_COMPONENT_ICONS: {
4601
4601
  VideoTileScaleFill: JSX.Element;
4602
4602
  PinParticipant: JSX.Element;
4603
4603
  UnpinParticipant: JSX.Element;
4604
+ VerticalGalleryLeftButton: JSX.Element;
4605
+ VerticalGalleryRightButton: JSX.Element;
4604
4606
  };
4605
4607
 
4606
4608
  /**
@@ -4702,6 +4704,8 @@ export declare const DEFAULT_COMPOSITE_ICONS: {
4702
4704
  VideoTileScaleFill: JSX.Element;
4703
4705
  PinParticipant: JSX.Element;
4704
4706
  UnpinParticipant: JSX.Element;
4707
+ VerticalGalleryLeftButton: JSX.Element;
4708
+ VerticalGalleryRightButton: JSX.Element;
4705
4709
  };
4706
4710
 
4707
4711
  /**
@@ -161,7 +161,7 @@ const _toCommunicationIdentifier = (id) => {
161
161
  // Copyright (c) Microsoft Corporation.
162
162
  // Licensed under the MIT license.
163
163
  // GENERATED FILE. DO NOT EDIT MANUALLY.
164
- var telemetryVersion = '1.5.1-alpha-202302220019';
164
+ var telemetryVersion = '1.5.1-alpha-202302250014';
165
165
 
166
166
  // Copyright (c) Microsoft Corporation.
167
167
  /**
@@ -5364,7 +5364,11 @@ const DEFAULT_COMPONENT_ICONS = {
5364
5364
  /* @conditional-compile-remove(pinned-participants) */
5365
5365
  PinParticipant: React__default['default'].createElement(reactIcons.Pin16Regular, null),
5366
5366
  /* @conditional-compile-remove(pinned-participants) */
5367
- UnpinParticipant: React__default['default'].createElement(reactIcons.PinOff16Regular, null)
5367
+ UnpinParticipant: React__default['default'].createElement(reactIcons.PinOff16Regular, null),
5368
+ /* @conditional-compile-remove(vertical-gallery) */
5369
+ VerticalGalleryLeftButton: React__default['default'].createElement(reactIcons.ChevronLeft20Regular, null),
5370
+ /* @conditional-compile-remove(vertical-gallery) */
5371
+ VerticalGalleryRightButton: React__default['default'].createElement(reactIcons.ChevronRight20Regular, null)
5368
5372
  };
5369
5373
 
5370
5374
  // Copyright (c) Microsoft Corporation.
@@ -9589,6 +9593,28 @@ const childrenContainerStyle = {
9589
9593
  gap: `${HORIZONTAL_GALLERY_GAP}rem`
9590
9594
  };
9591
9595
 
9596
+ // Copyright (c) Microsoft Corporation.
9597
+ // Licensed under the MIT license.
9598
+ /**
9599
+ * Helper function to bucketize a given array of items into buckets of a specified size.
9600
+ *
9601
+ * @param arr array to bucketize
9602
+ * @param bucketSize number of children for each bucket
9603
+ * @returns nested array of given children
9604
+ *
9605
+ * @private
9606
+ */
9607
+ function bucketize(arr, bucketSize) {
9608
+ const bucketArray = [];
9609
+ if (bucketSize <= 0) {
9610
+ return bucketArray;
9611
+ }
9612
+ for (let i = 0; i < arr.length; i += bucketSize) {
9613
+ bucketArray.push(arr.slice(i, i + bucketSize));
9614
+ }
9615
+ return bucketArray;
9616
+ }
9617
+
9592
9618
  // Copyright (c) Microsoft Corporation.
9593
9619
  /**
9594
9620
  * {@link HorizontalGallery} default children per page
@@ -9628,16 +9654,6 @@ const HorizontalGalleryNavigationButton = (props) => {
9628
9654
  const theme = useTheme();
9629
9655
  return (React__default['default'].createElement(react.DefaultButton, { className: react.mergeStyles(leftRightButtonStyles(theme), props.styles), onClick: props.onClick, disabled: props.disabled, "data-ui-id": props.identifier }, props.icon));
9630
9656
  };
9631
- function bucketize(arr, bucketSize) {
9632
- const bucketArray = [];
9633
- if (bucketSize <= 0) {
9634
- return bucketArray;
9635
- }
9636
- for (let i = 0; i < arr.length; i += bucketSize) {
9637
- bucketArray.push(arr.slice(i, i + bucketSize));
9638
- }
9639
- return bucketArray;
9640
- }
9641
9657
 
9642
9658
  // Copyright (c) Microsoft Corporation.
9643
9659
  /**
@@ -14439,7 +14455,8 @@ class EventSubscriber {
14439
14455
  });
14440
14456
  this.fetchLastParticipantMessage(event.threadId, 'participantAdded');
14441
14457
  };
14442
- // This is a hot fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK
14458
+ // This is a temporary fix that no participant message is received for onChatMessageReceived event, which should be handled by JS SDK.
14459
+ // Without the temporary fix, there are missing 'participant joined' and 'participant left' system messages in the chat thread.
14443
14460
  this.fetchLastParticipantMessage = (threadId, actionType) => __awaiter$i(this, void 0, void 0, function* () {
14444
14461
  var e_1, _a;
14445
14462
  try {
@@ -14465,7 +14482,13 @@ class EventSubscriber {
14465
14482
  return participant.id;
14466
14483
  });
14467
14484
  this.chatContext.deleteParticipants(event.threadId, participantIds);
14468
- this.fetchLastParticipantMessage(event.threadId, 'participantRemoved');
14485
+ // If the current user is removed from the thread, do not fetch the last participant message
14486
+ // as they no longer have access to the thread.
14487
+ const currentUserId = toFlatCommunicationIdentifier(this.chatContext.getState().userId);
14488
+ const wasCurrentUserRemoved = participantIds.find((id) => toFlatCommunicationIdentifier(id) === currentUserId);
14489
+ if (!wasCurrentUserRemoved) {
14490
+ this.fetchLastParticipantMessage(event.threadId, 'participantRemoved');
14491
+ }
14469
14492
  };
14470
14493
  this.onReadReceiptReceived = (event) => {
14471
14494
  const readReceipt = Object.assign(Object.assign({}, event), { sender: event.sender, readOn: new Date(event.readOn) });
@@ -16800,7 +16823,7 @@ const ParticipantListWithHeading = (props) => {
16800
16823
  }
16801
16824
  }), [theme.palette.neutralSecondary, theme.fonts.smallPlus.fontSize, props.isMobile]);
16802
16825
  return (React__default['default'].createElement(react.Stack, { className: participantListStack },
16803
- React__default['default'].createElement(react.Stack.Item, { styles: subheadingStyleThemed, "aria-Label": title }, title),
16826
+ React__default['default'].createElement(react.Stack.Item, { styles: subheadingStyleThemed, "aria-label": title }, title),
16804
16827
  React__default['default'].createElement(react.FocusZone, { className: participantListContainerStyle, shouldFocusOnMount: true },
16805
16828
  React__default['default'].createElement(ParticipantList, Object.assign({}, participantListProps, { styles: props.isMobile ? participantListMobileStyle : participantListStyle, onRenderAvatar: (userId, options) => (React__default['default'].createElement(React__default['default'].Fragment, null,
16806
16829
  React__default['default'].createElement(AvatarPersona, Object.assign({ "data-ui-id": "chat-composite-participant-custom-avatar", userId: userId }, options, { hidePersonaDetails: !!(options === null || options === void 0 ? void 0 : options.text) }, { dataProvider: onFetchAvatarPersonaData })),