@azure/communication-react 1.2.3-alpha-202205170014.0 → 1.2.3-alpha-202205180014.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.
@@ -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.2.3-alpha-202205170014.0';
194
+ var telemetryVersion = '1.2.3-alpha-202205180014.0';
195
195
 
196
196
  // Copyright (c) Microsoft Corporation.
197
197
  /**
@@ -2031,7 +2031,8 @@ const _FileCard = (props) => {
2031
2031
  width: '12rem',
2032
2032
  background: theme.palette.neutralLighter,
2033
2033
  borderRadius: theme.effects.roundedCorner4,
2034
- border: `${_pxToRem(1)} solid ${theme.palette.neutralQuaternary}`
2034
+ border: `${_pxToRem(1)} solid ${theme.palette.neutralQuaternary}`,
2035
+ cursor: 'pointer'
2035
2036
  });
2036
2037
  const fileInfoWrapperClassName = react.mergeStyles({
2037
2038
  padding: _pxToRem(12),
@@ -2063,7 +2064,9 @@ const _FileCard = (props) => {
2063
2064
  height: _pxToRem(progressBarThicknessPx)
2064
2065
  }
2065
2066
  };
2066
- return (React__default['default'].createElement(react.Stack, { className: containerClassName },
2067
+ return (React__default['default'].createElement(react.Stack, { className: containerClassName, onClick: () => {
2068
+ props.actionHandler && props.actionHandler();
2069
+ } },
2067
2070
  React__default['default'].createElement(react.Stack, { horizontal: true, horizontalAlign: "space-between", verticalAlign: "center", className: fileInfoWrapperClassName },
2068
2071
  React__default['default'].createElement(react.Stack, null,
2069
2072
  React__default['default'].createElement(react.Icon, Object.assign({}, reactFileTypeIcons.getFileTypeIconProps({
@@ -2073,9 +2076,7 @@ const _FileCard = (props) => {
2073
2076
  })))),
2074
2077
  React__default['default'].createElement(react.Stack, { className: fileNameContainerClassName },
2075
2078
  React__default['default'].createElement(react.Text, { className: fileNameTextClassName }, fileName)),
2076
- React__default['default'].createElement(react.Stack, { verticalAlign: "center", className: actionIconClassName, onClick: () => {
2077
- props.actionHandler && props.actionHandler();
2078
- } }, actionIcon && actionIcon)),
2079
+ React__default['default'].createElement(react.Stack, { verticalAlign: "center", className: actionIconClassName }, actionIcon && actionIcon)),
2079
2080
  showProgressIndicator && React__default['default'].createElement(react.ProgressIndicator, { percentComplete: progress, styles: progressIndicatorStyles })));
2080
2081
  };
2081
2082
 
@@ -15447,7 +15448,7 @@ const CallWithChatControlBar = (props) => {
15447
15448
  isEnabled$1(options.cameraButton) && (React__default['default'].createElement(Camera, { displayType: options.displayType, styles: commonButtonStyles, splitButtonsForDeviceSelection: !props.mobileView })),
15448
15449
  props.mobileView && isEnabled$1(options === null || options === void 0 ? void 0 : options.chatButton) && chatButton,
15449
15450
  isEnabled$1(options.screenShareButton) && (React__default['default'].createElement(ScreenShare, { option: options.screenShareButton, displayType: options.displayType, styles: screenShareButtonStyles })),
15450
- props.mobileView && (React__default['default'].createElement(MoreButton, { "data-ui-id": "call-with-chat-composite-more-button", strings: moreButtonStrings, onClick: props.onMoreButtonClicked })),
15451
+ props.mobileView && (React__default['default'].createElement(MoreButton, { "data-ui-id": "call-with-chat-composite-more-button", strings: moreButtonStrings, onClick: props.onMoreButtonClicked, disabled: props.disableButtonsForLobbyPage })),
15451
15452
  React__default['default'].createElement(EndCall, { displayType: "compact", styles: endCallButtonStyles })))))),
15452
15453
  !props.mobileView && (React__default['default'].createElement(react.Stack, { horizontal: true, className: !props.mobileView ? react.mergeStyles(desktopButtonContainerStyle) : undefined },
15453
15454
  isEnabled$1(options === null || options === void 0 ? void 0 : options.peopleButton) && (React__default['default'].createElement(PeopleButton, { checked: props.peopleButtonChecked, showLabel: true, onClick: props.onPeopleButtonClicked, "data-ui-id": "call-with-chat-composite-people-button", disabled: props.disableButtonsForLobbyPage, strings: peopleButtonStrings, styles: commonButtonStyles })),
@@ -16434,10 +16435,20 @@ const CallWithChatScreen = (props) => {
16434
16435
  const closePane = React.useCallback(() => {
16435
16436
  setActivePane('none');
16436
16437
  }, [setActivePane]);
16438
+ const chatProps = React.useMemo(() => {
16439
+ return {
16440
+ adapter: new CallWithChatBackedChatAdapter(callWithChatAdapter)
16441
+ };
16442
+ }, [callWithChatAdapter]);
16443
+ const modalLayerHostId = reactHooks.useId('modalLayerhost');
16444
+ const isInLobbyOrConnecting = currentPage === 'lobby';
16445
+ const hasJoinedCall = !!(currentPage && hasJoinedCallFn(currentPage, currentCallState !== null && currentCallState !== void 0 ? currentCallState : 'None'));
16446
+ const showControlBar = isInLobbyOrConnecting || hasJoinedCall;
16447
+ const isMobileWithActivePane = mobileView && activePane !== 'none';
16437
16448
  /** Constant setting of id for the parent stack of the composite */
16438
16449
  const compositeParentDivId = reactHooks.useId('callWithChatCompositeParentDiv-internal');
16439
16450
  const toggleChat = React.useCallback(() => {
16440
- if (activePane === 'chat') {
16451
+ if (activePane === 'chat' || !hasJoinedCall) {
16441
16452
  setActivePane('none');
16442
16453
  }
16443
16454
  else {
@@ -16456,21 +16467,25 @@ const CallWithChatScreen = (props) => {
16456
16467
  clearInterval(chatFocusTimeout);
16457
16468
  }, 300);
16458
16469
  }
16459
- }, [activePane, setActivePane, compositeParentDivId]);
16470
+ }, [activePane, setActivePane, compositeParentDivId, hasJoinedCall]);
16460
16471
  const togglePeople = React.useCallback(() => {
16461
- if (activePane === 'people') {
16472
+ if (activePane === 'people' || !hasJoinedCall) {
16462
16473
  setActivePane('none');
16463
16474
  }
16464
16475
  else {
16465
16476
  setActivePane('people');
16466
16477
  }
16467
- }, [activePane, setActivePane]);
16478
+ }, [activePane, setActivePane, hasJoinedCall]);
16468
16479
  const selectChat = React.useCallback(() => {
16469
- setActivePane('chat');
16470
- }, [setActivePane]);
16480
+ if (hasJoinedCall) {
16481
+ setActivePane('chat');
16482
+ }
16483
+ }, [setActivePane, hasJoinedCall]);
16471
16484
  const selectPeople = React.useCallback(() => {
16472
- setActivePane('people');
16473
- }, [setActivePane]);
16485
+ if (hasJoinedCall) {
16486
+ setActivePane('people');
16487
+ }
16488
+ }, [setActivePane, hasJoinedCall]);
16474
16489
  const [showDrawer, setShowDrawer] = React.useState(false);
16475
16490
  const onMoreButtonClicked = React.useCallback(() => {
16476
16491
  closePane();
@@ -16483,16 +16498,6 @@ const CallWithChatScreen = (props) => {
16483
16498
  setShowDrawer(false);
16484
16499
  togglePeople();
16485
16500
  }, [togglePeople]);
16486
- const chatProps = React.useMemo(() => {
16487
- return {
16488
- adapter: new CallWithChatBackedChatAdapter(callWithChatAdapter)
16489
- };
16490
- }, [callWithChatAdapter]);
16491
- const modalLayerHostId = reactHooks.useId('modalLayerhost');
16492
- const isInLobbyOrConnecting = currentPage === 'lobby';
16493
- const hasJoinedCall = !!(currentPage && hasJoinedCallFn(currentPage, currentCallState !== null && currentCallState !== void 0 ? currentCallState : 'None'));
16494
- const showControlBar = isInLobbyOrConnecting || hasJoinedCall;
16495
- const isMobileWithActivePane = mobileView && activePane !== 'none';
16496
16501
  return (React__default['default'].createElement("div", { ref: containerRef, className: react.mergeStyles(containerDivStyles) },
16497
16502
  React__default['default'].createElement(react.Stack, { verticalFill: true, grow: true, styles: compositeOuterContainerStyles, id: compositeParentDivId },
16498
16503
  React__default['default'].createElement(react.Stack, { horizontal: true, grow: true },