@azure/communication-react 1.5.1-alpha-202305030013 → 1.5.1-alpha-202305050017

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 (110) hide show
  1. package/CHANGELOG.beta.md +9 -1
  2. package/dist/dist-cjs/communication-react/index.js +1902 -1847
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/react-components/src/components/Caption.js +1 -2
  7. package/dist/dist-esm/react-components/src/components/Caption.js.map +1 -1
  8. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js +3 -2
  9. package/dist/dist-esm/react-components/src/components/styles/Captions.style.js.map +1 -1
  10. package/dist/dist-esm/react-components/src/theming/icons.js +12 -5
  11. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  12. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +12 -0
  13. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +33 -19
  14. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  15. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.d.ts +4 -0
  16. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +76 -65
  17. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  18. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js +2 -3
  19. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallControls.js.map +1 -1
  20. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js +16 -3
  21. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalPreview.js.map +1 -1
  22. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.d.ts +14 -0
  23. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js +63 -0
  24. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePane.js.map +1 -0
  25. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePaneProvider.d.ts +58 -0
  26. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePaneProvider.js +31 -0
  27. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/SidePaneProvider.js.map +1 -0
  28. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.d.ts +17 -0
  29. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js +43 -0
  30. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/usePeoplePane.js.map +1 -0
  31. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.d.ts +9 -0
  32. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +81 -0
  33. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -0
  34. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.d.ts +0 -1
  35. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js +2 -2
  36. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/buttons/Custom.js.map +1 -1
  37. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.d.ts +4 -0
  38. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js +2 -4
  39. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/CallPage.js.map +1 -1
  40. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +2 -0
  41. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +35 -29
  42. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
  43. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.d.ts +4 -0
  44. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js +1 -3
  45. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/HoldPage.js.map +1 -1
  46. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.d.ts +4 -0
  47. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +1 -3
  48. package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
  49. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/videoBackgroundErrorsSelector.d.ts +1 -1
  50. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/videoBackgroundErrorsSelector.js +1 -1
  51. package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/videoBackgroundErrorsSelector.js.map +1 -1
  52. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.d.ts +2 -0
  53. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +4 -0
  54. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
  55. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.d.ts +9 -1
  56. package/dist/dist-esm/react-composites/src/composites/CallComposite/types/CallControlOptions.js.map +1 -1
  57. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +12 -0
  58. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +13 -0
  59. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  60. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js +116 -162
  61. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
  62. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{ChatButton.d.ts → ChatButton/ChatButton.d.ts} +1 -1
  63. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{ChatButton.js → ChatButton/ChatButton.js} +1 -1
  64. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButton.js.map +1 -0
  65. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{ChatButtonWithUnreadMessagesBadge.d.ts → ChatButton/ChatButtonWithUnreadMessagesBadge.d.ts} +2 -2
  66. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{ChatButtonWithUnreadMessagesBadge.js → ChatButton/ChatButtonWithUnreadMessagesBadge.js} +3 -3
  67. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/ChatButtonWithUnreadMessagesBadge.js.map +1 -0
  68. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton/NotificationIcon.js.map +1 -0
  69. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js +2 -2
  70. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  71. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js +1 -1
  72. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
  73. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.d.ts +4 -5
  74. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js +11 -24
  75. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CommonCallControlBar.js.map +1 -1
  76. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js +5 -2
  77. package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -1
  78. package/dist/dist-esm/react-composites/src/composites/common/ConvertContextualMenuItemToDrawerMenuItem.js.map +1 -0
  79. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +0 -9
  80. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +32 -12
  81. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  82. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.d.ts +4 -4
  83. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js +27 -2
  84. package/dist/dist-esm/react-composites/src/composites/common/SidePaneHeader.js.map +1 -1
  85. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.d.ts +8 -5
  86. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js +11 -2
  87. package/dist/dist-esm/react-composites/src/composites/common/TabHeader.js.map +1 -1
  88. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +3 -15
  89. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +16 -34
  90. package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
  91. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.d.ts +8 -0
  92. package/dist/dist-esm/react-composites/src/composites/common/types/CommonCallControlOptions.js.map +1 -1
  93. package/package.json +10 -10
  94. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.d.ts +0 -24
  95. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js +0 -80
  96. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js.map +0 -1
  97. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.d.ts +0 -16
  98. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.js +0 -38
  99. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.js.map +0 -1
  100. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.d.ts +0 -34
  101. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js +0 -90
  102. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js.map +0 -1
  103. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButton.js.map +0 -1
  104. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ChatButtonWithUnreadMessagesBadge.js.map +0 -1
  105. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/ConvertContextualMenuItemToDrawerMenuItem.js.map +0 -1
  106. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/NotificationIcon.js.map +0 -1
  107. /package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{NotificationIcon.d.ts → ChatButton/NotificationIcon.d.ts} +0 -0
  108. /package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/{NotificationIcon.js → ChatButton/NotificationIcon.js} +0 -0
  109. /package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/ConvertContextualMenuItemToDrawerMenuItem.d.ts +0 -0
  110. /package/dist/dist-esm/react-composites/src/composites/{CallWithChatComposite → common}/ConvertContextualMenuItemToDrawerMenuItem.js +0 -0
@@ -1,90 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- // Copyright (c) Microsoft Corporation.
11
- // Licensed under the MIT license.
12
- import { Stack } from '@fluentui/react';
13
- import { _DrawerMenu, useTheme } from "../../../../react-components/src";
14
- import React, { useMemo, useState } from 'react';
15
- import { CallAdapterProvider } from '../CallComposite/adapter/CallAdapterProvider';
16
- import { ChatComposite } from '../ChatComposite';
17
- import { paneBodyContainer, scrollableContainer, scrollableContainerContents } from '../common/styles/ParticipantContainer.styles';
18
- import { SidePaneHeader } from '../common/SidePaneHeader';
19
- import { useCallWithChatCompositeStrings } from './hooks/useCallWithChatCompositeStrings';
20
- import { ModalLocalAndRemotePIP } from '../common/ModalLocalAndRemotePIP';
21
- import { PeoplePaneContent } from '../common/PeoplePaneContent';
22
- import { TabHeader } from '../common/TabHeader';
23
- import { getPipStyles } from '../common/styles/ModalLocalAndRemotePIP.styles';
24
- import { useMinMaxDragPosition } from '../common/utils';
25
- import { availableSpaceStyles, hiddenStyles, sidePaneStyles, sidePaneTokens } from '../common/styles/Pane.styles';
26
- import { isDisabled } from '../CallComposite/utils';
27
- import { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';
28
- /**
29
- * Pane that is used to store chat and people for CallWithChat composite
30
- * @private
31
- */
32
- export const CallWithChatPane = (props) => {
33
- var _a, _b;
34
- const [drawerMenuItems, setDrawerMenuItems] = useState([]);
35
- const hidden = props.activePane === 'none';
36
- const paneStyles = hidden ? hiddenStyles : props.mobileView ? availableSpaceStyles : sidePaneStyles;
37
- const callWithChatStrings = useCallWithChatCompositeStrings();
38
- const theme = useTheme();
39
- /* @conditional-compile-remove(PSTN-calls) */
40
- const alternateCallerId = props.callAdapter.getState().alternateCallerId;
41
- const header = props.activePane === 'none' ? null : props.mobileView ? (React.createElement(TabHeader, Object.assign({}, props, { strings: callWithChatStrings, activeTab: props.activePane, disableChatButton: isDisabled((_a = props.callControls) === null || _a === void 0 ? void 0 : _a.chatButton), disablePeopleButton: isDisabled((_b = props.callControls) === null || _b === void 0 ? void 0 : _b.peopleButton) }))) : (React.createElement(SidePaneHeader, Object.assign({}, props, { strings: callWithChatStrings, headingText: props.activePane === 'chat'
42
- ? callWithChatStrings.chatPaneTitle
43
- : props.activePane === 'people'
44
- ? callWithChatStrings.peoplePaneTitle
45
- : '' })));
46
- const chatContent = (React.createElement(ChatComposite, Object.assign({}, props.chatCompositeProps, { adapter: props.chatAdapter, fluentTheme: theme, options: {
47
- topic: false,
48
- /* @conditional-compile-remove(chat-composite-participant-pane) */
49
- participantPane: false,
50
- /* @conditional-compile-remove(file-sharing) */
51
- fileSharing: props.fileSharing
52
- }, onFetchAvatarPersonaData: props.onFetchAvatarPersonaData })));
53
- /**
54
- * In a CallWithChat when a participant is removed, we must remove them from both
55
- * the call and the chat thread.
56
- */
57
- const removeParticipantFromCallWithChat = (participantId) => __awaiter(void 0, void 0, void 0, function* () {
58
- yield props.callAdapter.removeParticipant(participantId);
59
- yield props.chatAdapter.removeParticipant(participantId);
60
- });
61
- /* @conditional-compile-remove(PSTN-calls) */
62
- const addParticipantToCall = (participant, options) => __awaiter(void 0, void 0, void 0, function* () {
63
- yield props.callAdapter.addParticipant(participant, options);
64
- });
65
- const peopleContent = (React.createElement(CallAdapterProvider, { adapter: props.callAdapter },
66
- React.createElement(PeoplePaneContent, Object.assign({ active: props.activePane === 'people' }, props, { onRemoveParticipant: removeParticipantFromCallWithChat, setDrawerMenuItems: setDrawerMenuItems, strings: callWithChatStrings,
67
- /* @conditional-compile-remove(PSTN-calls) */
68
- onAddParticipant: addParticipantToCall,
69
- /* @conditional-compile-remove(PSTN-calls) */
70
- alternateCallerId: alternateCallerId }))));
71
- const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId, props.rtl);
72
- const pipStyles = useMemo(() => getPipStyles(theme), [theme]);
73
- const dataUiId = props.activePane === 'chat'
74
- ? 'call-with-chat-composite-chat-pane'
75
- : props.activePane === 'people'
76
- ? 'call-with-chat-composite-people-pane'
77
- : '';
78
- return (React.createElement(Stack, { verticalFill: true, grow: true, styles: paneStyles, "data-ui-id": dataUiId, tokens: props.mobileView ? {} : sidePaneTokens },
79
- header,
80
- React.createElement(Stack.Item, { verticalFill: true, grow: true, styles: paneBodyContainer },
81
- React.createElement(Stack, { horizontal: true, styles: scrollableContainer },
82
- React.createElement(Stack.Item, { verticalFill: true, styles: scrollableContainerContents },
83
- React.createElement(Stack, { styles: props.activePane === 'chat' ? availableSpaceStyles : hiddenStyles }, chatContent),
84
- props.activePane === 'people' && peopleContent))),
85
- props.mobileView && (React.createElement(CallAdapterProvider, { adapter: props.callAdapter },
86
- React.createElement(ModalLocalAndRemotePIP, { modalLayerHostId: props.modalLayerHostId, hidden: hidden, styles: pipStyles, minDragPosition: minMaxDragPosition.minDragPosition, maxDragPosition: minMaxDragPosition.maxDragPosition }))),
87
- drawerMenuItems.length > 0 && (React.createElement(Stack, { styles: drawerContainerStyles() },
88
- React.createElement(_DrawerMenu, { onLightDismiss: () => setDrawerMenuItems([]), items: drawerMenuItems })))));
89
- };
90
- //# sourceMappingURL=CallWithChatPane.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CallWithChatPane.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/CallWithChatPane.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EACL,WAAW,EAKX,QAAQ,EACT,yCAAmC;AACpC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AACnF,OAAO,EAAe,aAAa,EAAsB,MAAM,kBAAkB,CAAC;AAElF,OAAO,EACL,iBAAiB,EACjB,mBAAmB,EACnB,2BAA2B,EAC5B,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAKhD,OAAO,EAAE,YAAY,EAAE,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,oBAAoB,EAAE,YAA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EACd,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,kBAAkB,CAAC,eAAe,EACnD,eAAe,EAAE,kBAAkB,CAAC,eAAe,GACnD,CACkB,CACvB;QACA,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,CAC7B,oBAAC,KAAK,IAAC,MAAM,EAAE,qBAAqB,EAAE;YACpC,oBAAC,WAAW,IAAC,cAAc,EAAE,GAAG,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,eAAe,GAAI,CAC/E,CACT,CACK,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\nimport { Stack } from '@fluentui/react';\nimport {\n _DrawerMenu,\n _DrawerMenuItemProps,\n _useContainerHeight,\n _useContainerWidth,\n ParticipantMenuItemsCallback,\n useTheme\n} from '@internal/react-components';\nimport React, { useMemo, useState } from 'react';\nimport { CallAdapter } from '../CallComposite';\nimport { CallAdapterProvider } from '../CallComposite/adapter/CallAdapterProvider';\nimport { ChatAdapter, ChatComposite, ChatCompositeProps } from '../ChatComposite';\nimport { AvatarPersonaDataCallback } from '../common/AvatarPersona';\nimport {\n paneBodyContainer,\n scrollableContainer,\n scrollableContainerContents\n} from '../common/styles/ParticipantContainer.styles';\nimport { SidePaneHeader } from '../common/SidePaneHeader';\nimport { useCallWithChatCompositeStrings } from './hooks/useCallWithChatCompositeStrings';\nimport { ModalLocalAndRemotePIP } from '../common/ModalLocalAndRemotePIP';\nimport { PeoplePaneContent } from '../common/PeoplePaneContent';\n\nimport { TabHeader } from '../common/TabHeader';\n/* @conditional-compile-remove(file-sharing) */\nimport { FileSharingOptions } from '../ChatComposite';\nimport { _ICoordinates } from '@internal/react-components';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { getPipStyles } from '../common/styles/ModalLocalAndRemotePIP.styles';\nimport { useMinMaxDragPosition } from '../common/utils';\nimport { availableSpaceStyles, hiddenStyles, sidePaneStyles, sidePaneTokens } from '../common/styles/Pane.styles';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { PhoneNumberIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\nimport { CallWithChatControlOptions } from './CallWithChatComposite';\nimport { isDisabled } from '../CallComposite/utils';\nimport { drawerContainerStyles } from '../CallComposite/styles/CallComposite.styles';\n\n/**\n * Pane that is used to store chat and people for CallWithChat composite\n * @private\n */\nexport const CallWithChatPane = (props: {\n chatCompositeProps: Partial<ChatCompositeProps>;\n callAdapter: CallAdapter;\n chatAdapter: ChatAdapter;\n onClose: () => void;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n onChatButtonClicked?: () => void;\n onPeopleButtonClicked?: () => void;\n modalLayerHostId: string;\n activePane: CallWithChatPaneOption;\n mobileView?: boolean;\n inviteLink?: string;\n /* @conditional-compile-remove(file-sharing) */\n fileSharing?: FileSharingOptions;\n rtl?: boolean;\n callControls?: CallWithChatControlOptions;\n}): JSX.Element => {\n const [drawerMenuItems, setDrawerMenuItems] = useState<_DrawerMenuItemProps[]>([]);\n\n const hidden = props.activePane === 'none';\n const paneStyles = hidden ? hiddenStyles : props.mobileView ? availableSpaceStyles : sidePaneStyles;\n\n const callWithChatStrings = useCallWithChatCompositeStrings();\n const theme = useTheme();\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = props.callAdapter.getState().alternateCallerId;\n\n const header =\n props.activePane === 'none' ? null : props.mobileView ? (\n <TabHeader\n {...props}\n strings={callWithChatStrings}\n activeTab={props.activePane}\n disableChatButton={isDisabled(props.callControls?.chatButton)}\n disablePeopleButton={isDisabled(props.callControls?.peopleButton)}\n />\n ) : (\n <SidePaneHeader\n {...props}\n strings={callWithChatStrings}\n headingText={\n props.activePane === 'chat'\n ? callWithChatStrings.chatPaneTitle\n : props.activePane === 'people'\n ? callWithChatStrings.peoplePaneTitle\n : ''\n }\n />\n );\n\n const chatContent = (\n <ChatComposite\n {...props.chatCompositeProps}\n adapter={props.chatAdapter}\n fluentTheme={theme}\n options={{\n topic: false,\n /* @conditional-compile-remove(chat-composite-participant-pane) */\n participantPane: false,\n /* @conditional-compile-remove(file-sharing) */\n fileSharing: props.fileSharing\n }}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n />\n );\n\n /**\n * In a CallWithChat when a participant is removed, we must remove them from both\n * the call and the chat thread.\n */\n const removeParticipantFromCallWithChat = async (participantId: string): Promise<void> => {\n await props.callAdapter.removeParticipant(participantId);\n await props.chatAdapter.removeParticipant(participantId);\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const addParticipantToCall = async (\n participant: PhoneNumberIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n await props.callAdapter.addParticipant(participant, options);\n };\n\n const peopleContent = (\n <CallAdapterProvider adapter={props.callAdapter}>\n <PeoplePaneContent\n active={props.activePane === 'people'}\n {...props}\n onRemoveParticipant={removeParticipantFromCallWithChat}\n setDrawerMenuItems={setDrawerMenuItems}\n strings={callWithChatStrings}\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant={addParticipantToCall}\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId={alternateCallerId}\n />\n </CallAdapterProvider>\n );\n\n const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId, props.rtl);\n\n const pipStyles = useMemo(() => getPipStyles(theme), [theme]);\n\n const dataUiId =\n props.activePane === 'chat'\n ? 'call-with-chat-composite-chat-pane'\n : props.activePane === 'people'\n ? 'call-with-chat-composite-people-pane'\n : '';\n\n return (\n <Stack verticalFill grow styles={paneStyles} data-ui-id={dataUiId} tokens={props.mobileView ? {} : sidePaneTokens}>\n {header}\n <Stack.Item verticalFill grow styles={paneBodyContainer}>\n <Stack horizontal styles={scrollableContainer}>\n <Stack.Item verticalFill styles={scrollableContainerContents}>\n <Stack styles={props.activePane === 'chat' ? availableSpaceStyles : hiddenStyles}>{chatContent}</Stack>\n {props.activePane === 'people' && peopleContent}\n </Stack.Item>\n </Stack>\n </Stack.Item>\n {props.mobileView && (\n <CallAdapterProvider adapter={props.callAdapter}>\n <ModalLocalAndRemotePIP\n modalLayerHostId={props.modalLayerHostId}\n hidden={hidden}\n styles={pipStyles}\n minDragPosition={minMaxDragPosition.minDragPosition}\n maxDragPosition={minMaxDragPosition.maxDragPosition}\n />\n </CallAdapterProvider>\n )}\n {drawerMenuItems.length > 0 && (\n <Stack styles={drawerContainerStyles()}>\n <_DrawerMenu onLightDismiss={() => setDrawerMenuItems([])} items={drawerMenuItems} />\n </Stack>\n )}\n </Stack>\n );\n};\n\n/**\n * Active tab option type for {@link CallWithChatPane} component\n * @private\n */\nexport type CallWithChatPaneOption = 'none' | 'chat' | 'people';\n\"../../../../react-components/src\"\"../../../../acs-ui-common/src\""]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatButton.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/ChatButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,gBAAgB,EAAiD,QAAQ,EAAE,yCAAmC;AACvH,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElD;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAA4B,EAAe,EAAE;IACtE,MAAM,OAAO,mBAAK,KAAK,EAAE,KAAK,CAAC,KAAK,IAAK,KAAK,CAAC,OAAO,CAAE,CAAC;IACzD,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,MAAM,GAA2B,OAAO,CAC5C,GAAG,EAAE;;QACH,OAAA,eAAe,CACb;YACE,WAAW,EAAE;gBACX,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY;aACvC;SACF,EACD,MAAA,KAAK,CAAC,MAAM,mCAAI,EAAE,CACnB,CAAA;KAAA,EACH,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,CAC3C,CAAC;IACF,OAAO,CACL,oBAAC,gBAAgB,oBACX,KAAK,IACT,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,MAAM,EAAE,MAAM,IACd,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useMemo } from 'react';\nimport { ControlBarButton, ControlBarButtonProps, ControlBarButtonStyles, useTheme } from '@internal/react-components';\nimport { concatStyleSets } from '@fluentui/react';\n\n/**\n * @private\n */\nexport const ChatButton = (props: ControlBarButtonProps): JSX.Element => {\n const strings = { label: props.label, ...props.strings };\n const theme = useTheme();\n const styles: ControlBarButtonStyles = useMemo(\n () =>\n concatStyleSets(\n {\n rootChecked: {\n background: theme.palette.neutralLight\n }\n },\n props.styles ?? {}\n ),\n [props.styles, theme.palette.neutralLight]\n );\n return (\n <ControlBarButton\n {...props}\n labelKey={'chatButtonLabelKey'}\n strings={strings}\n onClick={props.onClick}\n styles={styles}\n />\n );\n};\n\"../../../../react-components/src\""]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ChatButtonWithUnreadMessagesBadge.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/ChatButtonWithUnreadMessagesBadge.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAGlC,OAAO,EAAgB,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,sCAAgC;AAExD,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA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C,iBAAiB,EAAE,gCAAgC,CAAC,CAAC;QAEpE,OAAO,GAAG,EAAE;YACV,WAAW,CAAC,GAAG,CAAC,iBAAiB,EAAE,gCAAgC,CAAC,CAAC;QACvE,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,WAAW,EAAE,0BAA0B,EAAE,iBAAiB,EAAE,uBAAuB,CAAC,CAAC,CAAC;IAE1F,OAAO,CACL,oBAAC,UAAU,oBACL,KAAK,kBACE,sCAAsC,EACjD,eAAe,EAAE,kBAAkB,EACnC,cAAc,EAAE,cAAc,EAC9B,OAAO,EAAE,WAAW,IACpB,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,+BAA+B,GAAiB;IACpD,IAAI,EAAE;QACJ,OAAO,EAAE,QAAQ;QACjB,QAAQ,EAAE,UAAU;KACrB;CACF,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { ChatMessage } from '@azure/communication-chat';\nimport { IStackStyles, Stack } from '@fluentui/react';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { ControlBarButtonProps } from '@internal/react-components';\nimport React, { useCallback, useMemo, useState } from 'react';\nimport { useEffect } from 'react';\nimport { ChatAdapter } from '../ChatComposite';\nimport { CallWithChatCompositeIcon } from '../common/icons';\nimport { ChatButton } from './ChatButton';\nimport { useCallWithChatCompositeStrings } from './hooks/useCallWithChatCompositeStrings';\nimport { NotificationIcon } from './NotificationIcon';\n\n/**\n * @private\n */\nexport interface ChatButtonWithUnreadMessagesBadgeProps extends ControlBarButtonProps {\n chatAdapter: ChatAdapter;\n isChatPaneVisible: boolean;\n newMessageLabel?: string;\n}\n\n/**\n * Helper function to determine if the message in the event is a valid one from a user.\n * Display name is used since system messages will not have one.\n */\nconst validNewChatMessage = (message): boolean =>\n !!message.senderDisplayName && (message.type === 'text' || message.type === 'html');\n\nconst filledIcon = <CallWithChatCompositeIcon iconName={'ControlBarChatButtonActive'} />;\nconst regularIcon = <CallWithChatCompositeIcon iconName={'ControlBarChatButtonInactive'} />;\n\n/**\n * @private\n */\nexport const ChatButtonWithUnreadMessagesBadge = (props: ChatButtonWithUnreadMessagesBadgeProps): JSX.Element => {\n const { chatAdapter, isChatPaneVisible, newMessageLabel } = props;\n const [unreadChatMessagesCount, setUnreadChatMessagesCount] = useState<number>(0);\n\n const baseIcon = props.showLabel ? regularIcon : filledIcon;\n const callWithChatStrings = useCallWithChatCompositeStrings();\n\n const numberOfMsgToolTip =\n props.strings?.tooltipOffContent && unreadChatMessagesCount > 0\n ? _formatString(callWithChatStrings.chatButtonTooltipClosedWithMessageCount, {\n unreadMessagesCount: `${unreadChatMessagesCount}`\n })\n : undefined;\n\n const chatStrings = useMemo(\n () => ({\n label: props.strings?.label,\n tooltipOffContent: numberOfMsgToolTip ? numberOfMsgToolTip : props.strings?.tooltipOffContent,\n tooltipOnContent: props.strings?.tooltipOnContent\n }),\n [numberOfMsgToolTip, props.strings?.label, props.strings?.tooltipOffContent, props.strings?.tooltipOnContent]\n );\n const onRenderOnIcon = useCallback(() => baseIcon, [baseIcon]);\n const notificationOnIcon = useCallback((): JSX.Element => {\n return (\n <Stack styles={chatNotificationContainerStyles}>\n {unreadChatMessagesCount > 0 && (\n <NotificationIcon chatMessagesCount={unreadChatMessagesCount} label={newMessageLabel} />\n )}\n {baseIcon}\n </Stack>\n );\n }, [unreadChatMessagesCount, newMessageLabel, baseIcon]);\n\n useEffect(() => {\n if (isChatPaneVisible) {\n setUnreadChatMessagesCount(0);\n return;\n }\n const incrementUnreadChatMessagesCount = (event: { message: ChatMessage }): void => {\n if (!isChatPaneVisible && validNewChatMessage(event.message)) {\n setUnreadChatMessagesCount(unreadChatMessagesCount + 1);\n }\n };\n chatAdapter.on('messageReceived', incrementUnreadChatMessagesCount);\n\n return () => {\n chatAdapter.off('messageReceived', incrementUnreadChatMessagesCount);\n };\n }, [chatAdapter, setUnreadChatMessagesCount, isChatPaneVisible, unreadChatMessagesCount]);\n\n return (\n <ChatButton\n {...props}\n data-ui-id=\"call-with-chat-composite-chat-button\"\n onRenderOffIcon={notificationOnIcon}\n onRenderOnIcon={onRenderOnIcon}\n strings={chatStrings}\n />\n );\n};\n\nconst chatNotificationContainerStyles: IStackStyles = {\n root: {\n display: 'inline',\n position: 'relative'\n }\n};\n\"../../../../acs-ui-common/src\"\"../../../../react-components/src\""]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConvertContextualMenuItemToDrawerMenuItem.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/ConvertContextualMenuItemToDrawerMenuItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,yCAAyC,GAAG,CACvD,cAAmC,EACnC,qBAAiC,EACX,EAAE;IACxB,OAAO;QACL,OAAO,EAAE,cAAc,CAAC,GAAG;QAC3B,WAAW,EAAE,GAAG,EAAE;;YAChB,MAAA,cAAc,CAAC,OAAO,+CAAtB,cAAc,CAAY,CAAC;YAC3B,qBAAqB,EAAE,CAAC;QAC1B,CAAC;QACD,SAAS,EAAE,cAAc,CAAC,SAAS;QACnC,IAAI,EAAE,cAAc,CAAC,IAAI;QACzB,QAAQ,EAAE,cAAc,CAAC,QAAQ;KAClC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { IContextualMenuItem } from '@fluentui/react';\nimport { _DrawerMenuItemProps } from '@internal/react-components';\n\n/**\n * Convert IContextualMenuItem to _DrawerMenuItemProps\n * @param contextualMenu - IContextualMenuItem to convert\n * @param onDrawerMenuItemClick - callback to call when converted DrawerMenuItem is clicked\n * @returns DrawerMenuItem\n * @private\n */\nexport const convertContextualMenuItemToDrawerMenuItem = (\n contextualMenu: IContextualMenuItem,\n onDrawerMenuItemClick: () => void\n): _DrawerMenuItemProps => {\n return {\n itemKey: contextualMenu.key,\n onItemClick: () => {\n contextualMenu.onClick?.();\n onDrawerMenuItemClick();\n },\n iconProps: contextualMenu.iconProps,\n text: contextualMenu.text,\n disabled: contextualMenu.disabled\n };\n};\n\"../../../../react-components/src\""]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NotificationIcon.js","sourceRoot":"","sources":["../../../../../../../react-composites/src/composites/CallWithChatComposite/NotificationIcon.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAqC,eAAe,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AAS5G;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAe,EAAE;IAC5E,MAAM,EAAE,iBAAiB,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAC3C,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,YAAY,GAAG,CAAC,gBAAgB,EAAe,EAAE;QACrD,IAAI,gBAAgB,GAAG,CAAC,EAAE;YACxB,OAAO,yCAAK,CAAC;SACd;aAAM;YACL,MAAM,oBAAoB,GAAG,gBAAgB,GAAG,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC;YAC5E,OAAO,CACL,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,gBAAc,oBAAoB,GAAG,KAAK,EAAE,MAAM,EAAE,sBAAsB,CAAC,KAAK,CAAC,IAClG,oBAAoB,CAChB,CACR,CAAC;SACH;IACH,CAAC,CAAC;IAEF,OAAO,CACL,oBAAC,KAAK,kBACO,kDAAkD,EAC7D,eAAe,EAAC,QAAQ,EACxB,aAAa,EAAC,QAAQ,EACtB,MAAM,EAAE,+BAA+B,CAAC,KAAK,CAAC;QAE9C,oBAAC,KAAK,QAAE,YAAY,CAAC,iBAAiB,CAAC,CAAS,CAC1C,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,KAAK,CAAC;AACzC,MAAM,mBAAmB,GAAG,CAAC,CAAC;AAE9B,MAAM,+BAA+B,GAAG,eAAe,CACrD,CAAC,KAAa,EAAe,EAAE,CAAC,CAAC;IAC/B,IAAI,EAAE;QACJ,YAAY,EAAE,GAAG,mBAAmB,KAAK;QACzC,MAAM,EAAE,GAAG,mBAAmB,KAAK;QACnC,QAAQ,EAAE,GAAG,mBAAmB,KAAK;QACrC,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,YAAY;QACtC,MAAM,EAAE,uBAAuB;QAC/B,OAAO,EAAE,GAAG,0BAA0B,KAAK;QAE3C,kEAAkE;QAClE,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,IAAI,GAAG,GAAG,0BAA0B,GAAG,CAAC,KAAK;QAClD,IAAI,EAAE,GAAG,GAAG,GAAG,0BAA0B,GAAG,CAAC,KAAK;KACnD;CACF,CAAC,CACH,CAAC;AAEF,MAAM,sBAAsB,GAAG,eAAe,CAC5C,CAAC,KAAa,EAAgB,EAAE,CAAC,CAAC;IAChC,IAAI,EAAE;QACJ,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ;KACtC;CACF,CAAC,CACH,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React from 'react';\nimport { IIconStyles, IStackStyles, ITheme, memoizeFunction, Stack, useTheme, Text } from '@fluentui/react';\n\n/**\n * @private\n */\nexport type NotificationIconProps = {\n chatMessagesCount: number;\n label?: string;\n};\n/**\n * @private\n */\nexport const NotificationIcon = (props: NotificationIconProps): JSX.Element => {\n const { chatMessagesCount, label } = props;\n const theme = useTheme();\n const renderNumber = (numberOfMessages): JSX.Element => {\n if (numberOfMessages < 1) {\n return <></>;\n } else {\n const textNumberOfMessages = numberOfMessages < 9 ? numberOfMessages : '9+';\n return (\n <Text role={'status'} aria-label={textNumberOfMessages + label} styles={notificationTextStyles(theme)}>\n {textNumberOfMessages}\n </Text>\n );\n }\n };\n\n return (\n <Stack\n data-ui-id=\"call-with-chat-composite-chat-button-unread-icon\"\n horizontalAlign=\"center\"\n verticalAlign=\"center\"\n styles={notificationIconContainerStyles(theme)}\n >\n <Stack>{renderNumber(chatMessagesCount)}</Stack>\n </Stack>\n );\n};\n\nconst notificationIconPaddingREM = 0.225;\nconst notificationSizeREM = 1;\n\nconst notificationIconContainerStyles = memoizeFunction(\n (theme: ITheme): IIconStyles => ({\n root: {\n borderRadius: `${notificationSizeREM}rem`, // Create a css circle. This should match the height.\n height: `${notificationSizeREM}rem`,\n minWidth: `${notificationSizeREM}rem`, // use min-width over width as we want to extend the width of the notification icon when contents is more than one character (e.g. 9+)\n background: theme.palette.themePrimary,\n border: `0.0625rem solid white`, // border should always be white\n padding: `${notificationIconPaddingREM}rem`,\n\n // positioning to place the badge within the button appropriately.\n position: 'absolute',\n top: `-${0.5 - notificationIconPaddingREM / 2}rem`,\n left: `${0.5 + notificationIconPaddingREM / 2}rem`\n }\n })\n);\n\nconst notificationTextStyles = memoizeFunction(\n (theme: ITheme): IStackStyles => ({\n root: {\n color: 'white',\n fontSize: theme.fonts.xSmall.fontSize\n }\n })\n);\n"]}