@azure/communication-react 1.3.3-alpha-202209140018.0 → 1.3.3-alpha-202209160028.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.
Files changed (80) hide show
  1. package/dist/communication-react.d.ts +118 -4
  2. package/dist/dist-cjs/communication-react/index.js +377 -86
  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/calling-component-bindings/src/handlers/createHandlers.d.ts +8 -4
  7. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js +26 -5
  8. package/dist/dist-esm/calling-component-bindings/src/handlers/createHandlers.js.map +1 -1
  9. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +1 -0
  10. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  11. package/dist/dist-esm/communication-react/src/index.d.ts +5 -0
  12. package/dist/dist-esm/communication-react/src/index.js +4 -0
  13. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  14. package/dist/dist-esm/react-components/src/components/DomainPermissions.d.ts +45 -0
  15. package/dist/dist-esm/react-components/src/components/DomainPermissions.js +42 -0
  16. package/dist/dist-esm/react-components/src/components/DomainPermissions.js.map +1 -0
  17. package/dist/dist-esm/react-components/src/components/ParticipantList.js +3 -6
  18. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  19. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.d.ts +32 -0
  20. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js +33 -0
  21. package/dist/dist-esm/react-components/src/components/UnsupportedBrowser.js.map +1 -0
  22. package/dist/dist-esm/react-components/src/components/index.d.ts +4 -0
  23. package/dist/dist-esm/react-components/src/components/index.js +4 -0
  24. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  25. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.d.ts +30 -0
  26. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js +74 -0
  27. package/dist/dist-esm/react-components/src/components/styles/DomainPermissions.styles.js.map +1 -0
  28. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.d.ts +22 -0
  29. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.js +53 -0
  30. package/dist/dist-esm/react-components/src/components/styles/UnsupportedBrowser.styles.js.map +1 -0
  31. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +6 -0
  32. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  33. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +10 -0
  34. package/dist/dist-esm/react-components/src/theming/icons.d.ts +2 -0
  35. package/dist/dist-esm/react-components/src/theming/icons.js +40 -1
  36. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  37. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +12 -2
  38. package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
  39. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.d.ts +16 -0
  40. package/dist/dist-esm/react-composites/src/composites/CallComposite/Strings.js.map +1 -1
  41. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +3 -3
  42. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +6 -1
  43. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  44. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +4 -3
  45. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js +3 -1
  46. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  47. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js +16 -34
  48. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallArrangement.js.map +1 -1
  49. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.d.ts +2 -7
  50. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js +3 -4
  51. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallPane.js.map +1 -1
  52. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.d.ts +16 -0
  53. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.js +38 -0
  54. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useSidePaneState.js.map +1 -0
  55. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +3 -2
  56. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +26 -4
  57. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  58. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatPane.js.map +1 -1
  59. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +3 -2
  60. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +8 -1
  61. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  62. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +3 -2
  63. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  64. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +3 -2
  65. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +13 -4
  66. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  67. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.d.ts +2 -2
  68. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleButton.js.map +1 -1
  69. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.d.ts +2 -2
  70. package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.js.map +1 -1
  71. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.d.ts +2 -2
  72. package/dist/dist-esm/react-composites/src/composites/common/CallingDialpad.js.map +1 -1
  73. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.d.ts +2 -2
  74. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js +6 -11
  75. package/dist/dist-esm/react-composites/src/composites/common/PeoplePaneContent.js.map +1 -1
  76. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +4 -0
  77. package/dist/dist-esm/react-composites/src/composites/common/icons.js +3 -1
  78. package/dist/dist-esm/react-composites/src/composites/common/icons.js.map +1 -1
  79. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-US/strings.json +4 -0
  80. package/package.json +8 -8
@@ -1 +1 @@
1
- {"version":3,"file":"CallArrangement.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallArrangement.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,sDAA6C;AACjE,OAAO,EACL,iBAAiB,EAEjB,mBAAmB,EACnB,kBAAkB,EAClB,QAAQ,EAER,QAAQ,EACT,4CAAmC;AACpC,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/C,mDAAmD;AACnD,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAG9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,C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AC1B,mDAAmD;oBACnD,mBAAmB,EAAE,UAAU,KAAK,QAAQ;oBAC5C,mDAAmD;oBACnD,qBAAqB,EAAE,YAAY,IACnC,CACS,CACd,CACG,CACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,mDAAmD;AACnD,MAAM,6BAA6B,GAAG,CAAC,YAA2C,EAAW,EAAE;IAC7F,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,IAAI,EAAE;QACvD,OAAO,IAAI,CAAC;KACb;IACD,IAAI,YAAY,KAAK,KAAK,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,YAAY,CAAC,kBAAkB,KAAK,KAAK,CAAC;AACnD,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport {\n _ComplianceBanner,\n _ComplianceBannerProps,\n _useContainerHeight,\n _useContainerWidth,\n ErrorBar,\n ErrorBarProps,\n useTheme\n} from '@internal/react-components';\nimport React, { useMemo, useRef } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { useCallback, useState } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { containerDivStyles } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallControls, CallControlsProps } from '../components/CallControls';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { useSelector } from '../hooks/useSelector';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { callStatusSelector } from '../selectors/callStatusSelector';\nimport {\n callControlsContainerStyles,\n notificationsContainerStyles,\n containerStyleDesktop,\n containerStyleMobile,\n mediaGalleryContainerStyles,\n galleryParentContainerStyles,\n bannerNotificationStyles\n} from '../styles/CallPage.styles';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { CallControlOptions } from '../types/CallControlOptions';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { CallPane, CallPaneOption } from './CallPane';\nimport { MutedNotification, MutedNotificationProps } from './MutedNotification';\n\n/**\n * @private\n */\nexport interface CallArrangementProps {\n complianceBannerProps: _ComplianceBannerProps;\n errorBarProps: ErrorBarProps | false;\n mutedNotificationProps?: MutedNotificationProps;\n callControlProps: CallControlsProps;\n onRenderGalleryContent: () => JSX.Element;\n dataUiId: string;\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n}\n\n/**\n * @private\n */\nexport const CallArrangement = (props: CallArrangementProps): JSX.Element => {\n const containerClassName = useMemo(() => {\n return props.mobileView ? containerStyleMobile : containerStyleDesktop;\n }, [props.mobileView]);\n\n const theme = useTheme();\n const callGalleryStyles = useMemo(\n () => galleryParentContainerStyles(theme.palette.neutralLighterAlt),\n [theme.palette.neutralLighterAlt]\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(one-to-n-calling) */\n const [activePane, setActivePane] = useState<CallPaneOption>('none');\n /* @conditional-compile-remove(one-to-n-calling) */\n const { callStatus } = useSelector(callStatusSelector);\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const closePane = useCallback(() => {\n setActivePane('none');\n }, [setActivePane]);\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const isMobileWithActivePane = props.mobileView && activePane !== 'none';\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const togglePeople = useCallback(() => {\n if (activePane === 'people' || !_isInCall(callStatus)) {\n setActivePane('none');\n } else {\n setActivePane('people');\n }\n }, [activePane, setActivePane, callStatus]);\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const selectPeople = useCallback(() => {\n if (_isInCall(callStatus)) {\n setActivePane('people');\n }\n }, [setActivePane, callStatus]);\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const callCompositeContainerCSS = useMemo(() => {\n return { display: isMobileWithActivePane ? 'none' : 'flex' };\n }, [isMobileWithActivePane]);\n\n // To be removed once feature is out of beta, replace with callCompositeContainerCSS\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const callCompositeContainerFlex = () => {\n /* @conditional-compile-remove(one-to-n-calling) */\n return callCompositeContainerCSS;\n return { display: 'flex' };\n };\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const callPaneContent = useCallback((): JSX.Element => {\n if (adapter && _isInCall(callStatus) && activePane === 'people') {\n return (\n <CallPane\n callAdapter={adapter}\n onClose={closePane}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.callControlProps?.onFetchParticipantMenuItems}\n onPeopleButtonClicked={\n showShowPeopleTabHeaderButton(props.callControlProps.options) ? selectPeople : undefined\n }\n callControls={\n typeof props.callControlProps.options !== 'boolean' ? props.callControlProps.options : undefined\n }\n modalLayerHostId={props.modalLayerHostId}\n activePane={activePane}\n mobileView={props.mobileView}\n inviteLink={props.callControlProps.callInvitationURL}\n />\n );\n }\n return <></>;\n }, [\n activePane,\n adapter,\n callStatus,\n closePane,\n props.callControlProps.callInvitationURL,\n props.callControlProps?.onFetchParticipantMenuItems,\n props.callControlProps.options,\n props.mobileView,\n props.modalLayerHostId,\n props.onFetchAvatarPersonaData,\n selectPeople\n ]);\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)}>\n <Stack verticalFill horizontalAlign=\"stretch\" className={containerClassName} data-ui-id={props.dataUiId}>\n <Stack horizontal grow>\n <Stack.Item styles={notificationsContainerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <_ComplianceBanner {...props.complianceBannerProps} />\n </Stack>\n {props.errorBarProps !== false && (\n <Stack styles={bannerNotificationStyles}>\n <ErrorBar {...props.errorBarProps} />\n </Stack>\n )}\n {!!props.mutedNotificationProps && <MutedNotification {...props.mutedNotificationProps} />}\n </Stack.Item>\n <Stack.Item grow style={callCompositeContainerFlex()}>\n <Stack.Item styles={callGalleryStyles} grow>\n {props.onRenderGalleryContent && (\n <Stack verticalFill styles={mediaGalleryContainerStyles}>\n {props.onRenderGalleryContent()}\n </Stack>\n )}\n </Stack.Item>\n </Stack.Item>\n {/* @conditional-compile-remove(one-to-n-calling) */ callPaneContent()}\n </Stack>\n {props.callControlProps?.options !== false &&\n /* @conditional-compile-remove(one-to-n-calling) */ !isMobileWithActivePane && (\n <Stack.Item className={callControlsContainerStyles}>\n <CallControls\n {...props.callControlProps}\n containerWidth={containerWidth}\n containerHeight={containerHeight}\n isMobile={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n peopleButtonChecked={activePane === 'people'}\n /* @conditional-compile-remove(one-to-n-calling) */\n onPeopleButtonClicked={togglePeople}\n />\n </Stack.Item>\n )}\n </Stack>\n </div>\n );\n};\n\n/* @conditional-compile-remove(one-to-n-calling) */\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CallControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.participantsButton !== false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
1
+ {"version":3,"file":"CallArrangement.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallArrangement.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAErD,OAAO,EACL,iBAAiB,EAEjB,mBAAmB,EACnB,kBAAkB,EAClB,QAAQ,EAER,QAAQ,EACT,4CAAmC;AACpC,wCAAwC;AACxC,OAAO,EAAE,eAAe,EAAE,4CAAmC;AAC7D,OAAO,KAAK,EAAE,EAAE,OAAO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CAAC,KAAK,CAAC,sBAAsB,IAAI,oBAAC,iBAAiB,oBAAK,KAAK,CAAC,sBAAsB,EAAI,CAC5F;gBACb,oBAAC,KAAK,CAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,0BAA0B,EAAE;oBAClD,oBAAC,KAAK,CAAC,IAAI,IAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,UACxC,KAAK,CAAC,sBAAsB,IAAI,CAC/B,oBAAC,KAAK,IAAC,YAAY,QAAC,MAAM,EAAE,2BAA2B,IACpD,KAAK,CAAC,sBAAsB,EAAE,CACzB,CACT,CACU,CACF;gBACwC,eAAe,EAAE,CAChE;YACP,CAAA,MAAA,KAAK,CAAC,gBAAgB,0CAAE,OAAO,MAAK,KAAK;gBACxC,mDAAmD,CAAC,CAAC,sBAAsB,IAAI,CAC7E,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,2BAA2B;gBAChD,oBAAC,YAAY,oBACP,KAAK,CAAC,gBAAgB,IAC1B,cAAc,EAAE,cAAc,EAC9B,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,KAAK,CAAC,UAAU;oBAC1B,mDAAmD;oBACnD,mBAAmB,EAAE,UAAU,KAAK,QAAQ;oBAC5C,mDAAmD;oBACnD,qBAAqB,EAAE,gBAAgB,IACvC,CACS,CACd,CACG,CACJ,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,mDAAmD;AACnD,MAAM,6BAA6B,GAAG,CAAC,YAA2C,EAAW,EAAE;IAC7F,IAAI,YAAY,KAAK,SAAS,IAAI,YAAY,KAAK,IAAI,EAAE;QACvD,OAAO,IAAI,CAAC;KACb;IACD,IAAI,YAAY,KAAK,KAAK,EAAE;QAC1B,OAAO,KAAK,CAAC;KACd;IACD,OAAO,YAAY,CAAC,kBAAkB,KAAK,KAAK,CAAC;AACnD,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport {\n _ComplianceBanner,\n _ComplianceBannerProps,\n _useContainerHeight,\n _useContainerWidth,\n ErrorBar,\n ErrorBarProps,\n useTheme\n} from '@internal/react-components';\n/* @conditional-compile-remove(rooms) */\nimport { _usePermissions } from '@internal/react-components';\nimport React, { useMemo, useRef } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { useCallback } from 'react';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport { containerDivStyles } from '../../common/ContainerRectProps';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { CallControls, CallControlsProps } from '../components/CallControls';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { useSidePaneState } from '../hooks/useSidePaneState';\nimport {\n callControlsContainerStyles,\n notificationsContainerStyles,\n containerStyleDesktop,\n containerStyleMobile,\n mediaGalleryContainerStyles,\n galleryParentContainerStyles,\n bannerNotificationStyles\n} from '../styles/CallPage.styles';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { CallControlOptions } from '../types/CallControlOptions';\n/* @conditional-compile-remove(one-to-n-calling) */\nimport { CallPane } from './CallPane';\nimport { MutedNotification, MutedNotificationProps } from './MutedNotification';\n\n/**\n * @private\n */\nexport interface CallArrangementProps {\n complianceBannerProps: _ComplianceBannerProps;\n errorBarProps: ErrorBarProps | false;\n mutedNotificationProps?: MutedNotificationProps;\n callControlProps: CallControlsProps;\n onRenderGalleryContent: () => JSX.Element;\n dataUiId: string;\n mobileView: boolean;\n /* @conditional-compile-remove(one-to-n-calling) */\n modalLayerHostId: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n}\n\n/**\n * @private\n */\nexport const CallArrangement = (props: CallArrangementProps): JSX.Element => {\n const containerClassName = useMemo(() => {\n return props.mobileView ? containerStyleMobile : containerStyleDesktop;\n }, [props.mobileView]);\n\n const theme = useTheme();\n const callGalleryStyles = useMemo(\n () => galleryParentContainerStyles(theme.palette.neutralLighterAlt),\n [theme.palette.neutralLighterAlt]\n );\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const adapter = useAdapter();\n /* @conditional-compile-remove(one-to-n-calling) */\n const { activePane, closePane, openPeoplePane, togglePeoplePane } = useSidePaneState();\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const isMobileWithActivePane = props.mobileView && activePane;\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const callCompositeContainerCSS = useMemo(() => {\n return { display: isMobileWithActivePane ? 'none' : 'flex' };\n }, [isMobileWithActivePane]);\n\n // To be removed once feature is out of beta, replace with callCompositeContainerCSS\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const callCompositeContainerFlex = () => {\n /* @conditional-compile-remove(one-to-n-calling) */\n return callCompositeContainerCSS;\n return { display: 'flex' };\n };\n\n /* @conditional-compile-remove(one-to-n-calling) */\n const callPaneContent = useCallback((): JSX.Element => {\n if (adapter && activePane === 'people') {\n return (\n <CallPane\n callAdapter={adapter}\n onClose={closePane}\n onFetchAvatarPersonaData={props.onFetchAvatarPersonaData}\n onFetchParticipantMenuItems={props.callControlProps?.onFetchParticipantMenuItems}\n onPeopleButtonClicked={\n showShowPeopleTabHeaderButton(props.callControlProps.options) ? openPeoplePane : undefined\n }\n callControls={\n typeof props.callControlProps.options !== 'boolean' ? props.callControlProps.options : undefined\n }\n modalLayerHostId={props.modalLayerHostId}\n activePane={activePane}\n mobileView={props.mobileView}\n inviteLink={props.callControlProps.callInvitationURL}\n />\n );\n }\n return <></>;\n }, [\n activePane,\n adapter,\n closePane,\n props.callControlProps.callInvitationURL,\n props.callControlProps?.onFetchParticipantMenuItems,\n props.callControlProps.options,\n props.mobileView,\n props.modalLayerHostId,\n props.onFetchAvatarPersonaData,\n openPeoplePane\n ]);\n\n /* @conditional-compile-remove(rooms) */\n const rolePermissions = _usePermissions();\n\n let canUnmute = true;\n /* @conditional-compile-remove(rooms) */\n canUnmute = rolePermissions.microphoneButton;\n\n return (\n <div ref={containerRef} className={mergeStyles(containerDivStyles)}>\n <Stack verticalFill horizontalAlign=\"stretch\" className={containerClassName} data-ui-id={props.dataUiId}>\n <Stack horizontal grow>\n <Stack.Item styles={notificationsContainerStyles}>\n <Stack styles={bannerNotificationStyles}>\n <_ComplianceBanner {...props.complianceBannerProps} />\n </Stack>\n {props.errorBarProps !== false && (\n <Stack styles={bannerNotificationStyles}>\n <ErrorBar {...props.errorBarProps} />\n </Stack>\n )}\n {canUnmute && !!props.mutedNotificationProps && <MutedNotification {...props.mutedNotificationProps} />}\n </Stack.Item>\n <Stack.Item grow style={callCompositeContainerFlex()}>\n <Stack.Item styles={callGalleryStyles} grow>\n {props.onRenderGalleryContent && (\n <Stack verticalFill styles={mediaGalleryContainerStyles}>\n {props.onRenderGalleryContent()}\n </Stack>\n )}\n </Stack.Item>\n </Stack.Item>\n {/* @conditional-compile-remove(one-to-n-calling) */ callPaneContent()}\n </Stack>\n {props.callControlProps?.options !== false &&\n /* @conditional-compile-remove(one-to-n-calling) */ !isMobileWithActivePane && (\n <Stack.Item className={callControlsContainerStyles}>\n <CallControls\n {...props.callControlProps}\n containerWidth={containerWidth}\n containerHeight={containerHeight}\n isMobile={props.mobileView}\n /* @conditional-compile-remove(one-to-n-calling) */\n peopleButtonChecked={activePane === 'people'}\n /* @conditional-compile-remove(one-to-n-calling) */\n onPeopleButtonClicked={togglePeoplePane}\n />\n </Stack.Item>\n )}\n </Stack>\n </div>\n );\n};\n\n/* @conditional-compile-remove(one-to-n-calling) */\nconst showShowPeopleTabHeaderButton = (callControls?: boolean | CallControlOptions): boolean => {\n if (callControls === undefined || callControls === true) {\n return true;\n }\n if (callControls === false) {\n return false;\n }\n return callControls.participantsButton !== false;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../react-components/src\""]}
@@ -2,6 +2,7 @@
2
2
  import { ParticipantMenuItemsCallback } from "../../../../../react-components/src";
3
3
  import { CallAdapter, CallControlOptions } from '../';
4
4
  import { AvatarPersonaDataCallback } from '../../common/AvatarPersona';
5
+ import { CallSidePaneOption } from '../hooks/useSidePaneState';
5
6
  /**
6
7
  * Pane that is used to store participants for Call composite
7
8
  * @private
@@ -14,16 +15,10 @@ export declare const CallPane: (props: {
14
15
  onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;
15
16
  onPeopleButtonClicked?: () => void;
16
17
  modalLayerHostId: string;
17
- activePane: CallPaneOption;
18
+ activePane: CallSidePaneOption;
18
19
  mobileView?: boolean;
19
20
  inviteLink?: string;
20
21
  rtl?: boolean;
21
22
  callControls?: CallControlOptions;
22
23
  }) => JSX.Element;
23
- /**
24
- * Active tab option type for {@link CallPane} component
25
- * @private
26
- */
27
- /** @beta */
28
- export declare type CallPaneOption = 'none' | 'people';
29
24
  //# sourceMappingURL=CallPane.d.ts.map
@@ -34,8 +34,7 @@ import { isDisabled } from '../utils';
34
34
  export const CallPane = (props) => {
35
35
  var _a;
36
36
  const [drawerMenuItems, setDrawerMenuItems] = useState([]);
37
- const hidden = props.activePane === 'none';
38
- const paneStyles = hidden ? hiddenStyles : props.mobileView ? availableSpaceStyles : sidePaneStyles;
37
+ const paneStyles = !props.activePane ? hiddenStyles : props.mobileView ? availableSpaceStyles : sidePaneStyles;
39
38
  const localeStrings = useLocale();
40
39
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
41
40
  const getStrings = () => {
@@ -45,7 +44,7 @@ export const CallPane = (props) => {
45
44
  };
46
45
  const strings = getStrings();
47
46
  const theme = useTheme();
48
- const header = props.activePane === 'none' ? null : props.mobileView ? (React.createElement(TabHeader, Object.assign({}, props, { strings: strings, activeTab: props.activePane, disablePeopleButton: isDisabled((_a = props.callControls) === null || _a === void 0 ? void 0 : _a.participantsButton) }))) : (React.createElement(SidePaneHeader, Object.assign({}, props, { strings: strings, headingText: props.activePane === 'people' ? strings.peoplePaneTitle : '' })));
47
+ const header = !props.activePane ? null : props.mobileView ? (React.createElement(TabHeader, Object.assign({}, props, { strings: strings, activeTab: props.activePane, disablePeopleButton: isDisabled((_a = props.callControls) === null || _a === void 0 ? void 0 : _a.participantsButton) }))) : (React.createElement(SidePaneHeader, Object.assign({}, props, { strings: strings, headingText: props.activePane === 'people' ? strings.peoplePaneTitle : '' })));
49
48
  /**
50
49
  * In a Call Composite when a participant is removed, we must remove them from the call.
51
50
  */
@@ -73,7 +72,7 @@ export const CallPane = (props) => {
73
72
  onAddParticipant: addParticipantToCall, setDrawerMenuItems: setDrawerMenuItems, strings: strings,
74
73
  /* @conditional-compile-remove(PSTN-calls) */
75
74
  alternateCallerId: alternateCallerId }))))))),
76
- props.mobileView && (React.createElement(ModalLocalAndRemotePIP, { callAdapter: props.callAdapter, modalLayerHostId: props.modalLayerHostId, hidden: hidden, styles: pipStyles, minDragPosition: minMaxDragPosition.minDragPosition, maxDragPosition: minMaxDragPosition.maxDragPosition })),
75
+ props.mobileView && (React.createElement(ModalLocalAndRemotePIP, { callAdapter: props.callAdapter, modalLayerHostId: props.modalLayerHostId, hidden: !props.activePane, styles: pipStyles, minDragPosition: minMaxDragPosition.minDragPosition, maxDragPosition: minMaxDragPosition.maxDragPosition })),
77
76
  drawerMenuItems.length > 0 && (React.createElement(Stack, { styles: drawerContainerStyles },
78
77
  React.createElement(_DrawerMenu, { onLightDismiss: () => setDrawerMenuItems([]), items: drawerMenuItems })))));
79
78
  };
@@ -1 +1 @@
1
- {"version":3,"file":"CallPane.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallPane.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,uCAAuC;AACvC,kCAAkC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EACL,WAAW,EAKX,QAAQ,EACT,4CAAmC;AACpC,O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E,KAAK,CAAC,WAAW,EAC9B,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,EACxC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,kBAAkB,CAAC,eAAe,EACnD,eAAe,EAAE,kBAAkB,CAAC,eAAe,GACnD,CACH;QACA,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,CAC7B,oBAAC,KAAK,IAAC,MAAM,EAAE,qBAAqB;YAClC,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, CallControlOptions } from '../';\nimport { CallAdapterProvider } from '../adapter/CallAdapterProvider';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport {\n paneBodyContainer,\n scrollableContainer,\n scrollableContainerContents\n} from '../../common/styles/ParticipantContainer.styles';\nimport { SidePaneHeader } from '../../common/SidePaneHeader';\nimport { ModalLocalAndRemotePIP } from '../../common/ModalLocalAndRemotePIP';\nimport { PeoplePaneContent } from '../../common/PeoplePaneContent';\nimport { drawerContainerStyles } from '../styles/CallComposite.styles';\nimport { TabHeader } from '../../common/TabHeader';\nimport { _ICoordinates } from '@internal/react-components';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { useLocale } from '../../localization';\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 { CommunicationIdentifier } from '@azure/communication-common';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { AddPhoneNumberOptions } from '@azure/communication-calling';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\n\n/**\n * Pane that is used to store participants for Call composite\n * @private\n */\n/** @beta */\nexport const CallPane = (props: {\n callAdapter: CallAdapter;\n onClose: () => void;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n onPeopleButtonClicked?: () => void;\n modalLayerHostId: string;\n activePane: CallPaneOption;\n mobileView?: boolean;\n inviteLink?: string;\n rtl?: boolean;\n callControls?: CallControlOptions;\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 const localeStrings = useLocale();\n\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const getStrings = () => {\n /* @conditional-compile-remove(one-to-n-calling) */\n return localeStrings.strings.call;\n\n return localeStrings.strings.callWithChat;\n };\n\n const strings = getStrings();\n const theme = useTheme();\n\n const header =\n props.activePane === 'none' ? null : props.mobileView ? (\n <TabHeader\n {...props}\n strings={strings}\n activeTab={props.activePane}\n disablePeopleButton={isDisabled(props.callControls?.participantsButton)}\n />\n ) : (\n <SidePaneHeader\n {...props}\n strings={strings}\n headingText={props.activePane === 'people' ? strings.peoplePaneTitle : ''}\n />\n );\n\n /**\n * In a Call Composite when a participant is removed, we must remove them from the call.\n */\n const removeParticipantFromCall = async (participantId: string): Promise<void> => {\n await props.callAdapter.removeParticipant(participantId);\n };\n\n /* @conditional-compile-remove(PSTN-calls) */\n const addParticipantToCall = async (\n participant: CommunicationIdentifier,\n options?: AddPhoneNumberOptions\n ): Promise<void> => {\n await props.callAdapter.addParticipant(participant, options);\n };\n\n const minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId, props.rtl);\n\n const pipStyles = useMemo(() => getPipStyles(theme), [theme]);\n\n const dataUiId = props.activePane === 'people' ? 'call-composite-people-pane' : '';\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\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 === 'people' ? availableSpaceStyles : hiddenStyles}>\n <CallAdapterProvider adapter={props.callAdapter}>\n <PeoplePaneContent\n {...props}\n onRemoveParticipant={removeParticipantFromCall}\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant={addParticipantToCall}\n setDrawerMenuItems={setDrawerMenuItems}\n strings={strings}\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId={alternateCallerId}\n />\n </CallAdapterProvider>\n </Stack>\n </Stack.Item>\n </Stack>\n </Stack.Item>\n {props.mobileView && (\n <ModalLocalAndRemotePIP\n callAdapter={props.callAdapter}\n modalLayerHostId={props.modalLayerHostId}\n hidden={hidden}\n styles={pipStyles}\n minDragPosition={minMaxDragPosition.minDragPosition}\n maxDragPosition={minMaxDragPosition.maxDragPosition}\n />\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 CallPane} component\n * @private\n */\n/** @beta */\nexport type CallPaneOption = 'none' | 'people';\n\"../../../../../react-components/src\"\"../../../../../acs-ui-common/src\""]}
1
+ {"version":3,"file":"CallPane.js","sourceRoot":"","sources":["../../../../../../../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gCAChB,6CAA6C;gCAC7C,iBAAiB,EAAE,iBAAiB,IACpC,CACkB,CAChB,CACG,CACP,CACG;QACZ,KAAK,CAAC,UAAU,IAAI,CACnB,oBAAC,sBAAsB,IACrB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,EACxC,MAAM,EAAE,CAAC,KAAK,CAAC,UAAU,EACzB,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,kBAAkB,CAAC,eAAe,EACnD,eAAe,EAAE,kBAAkB,CAAC,eAAe,GACnD,CACH;QACA,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,CAC7B,oBAAC,KAAK,IAAC,MAAM,EAAE,qBAAqB;YAClC,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, CallControlOptions } from '../';\nimport { CallAdapterProvider } from '../adapter/CallAdapterProvider';\nimport { AvatarPersonaDataCallback } from '../../common/AvatarPersona';\nimport {\n paneBodyContainer,\n scrollableContainer,\n scrollableContainerContents\n} from '../../common/styles/ParticipantContainer.styles';\nimport { SidePaneHeader } from '../../common/SidePaneHeader';\nimport { ModalLocalAndRemotePIP } from '../../common/ModalLocalAndRemotePIP';\nimport { PeoplePaneContent } from '../../common/PeoplePaneContent';\nimport { drawerContainerStyles } from '../styles/CallComposite.styles';\nimport { TabHeader } from '../../common/TabHeader';\nimport { _ICoordinates } from '@internal/react-components';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { useLocale } from '../../localization';\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';\n/* @conditional-compile-remove(PSTN-calls) */\nimport { useAdapter } from '../adapter/CallAdapterProvider';\nimport { isDisabled } from '../utils';\nimport { CallSidePaneOption } from '../hooks/useSidePaneState';\n\n/**\n * Pane that is used to store participants for Call composite\n * @private\n */\n/** @beta */\nexport const CallPane = (props: {\n callAdapter: CallAdapter;\n onClose: () => void;\n onFetchAvatarPersonaData?: AvatarPersonaDataCallback;\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n onPeopleButtonClicked?: () => void;\n modalLayerHostId: string;\n activePane: CallSidePaneOption;\n mobileView?: boolean;\n inviteLink?: string;\n rtl?: boolean;\n callControls?: CallControlOptions;\n}): JSX.Element => {\n const [drawerMenuItems, setDrawerMenuItems] = useState<_DrawerMenuItemProps[]>([]);\n\n const paneStyles = !props.activePane ? hiddenStyles : props.mobileView ? availableSpaceStyles : sidePaneStyles;\n const localeStrings = useLocale();\n\n // eslint-disable-next-line @typescript-eslint/explicit-function-return-type\n const getStrings = () => {\n /* @conditional-compile-remove(one-to-n-calling) */\n return localeStrings.strings.call;\n\n return localeStrings.strings.callWithChat;\n };\n\n const strings = getStrings();\n const theme = useTheme();\n\n const header = !props.activePane ? null : props.mobileView ? (\n <TabHeader\n {...props}\n strings={strings}\n activeTab={props.activePane}\n disablePeopleButton={isDisabled(props.callControls?.participantsButton)}\n />\n ) : (\n <SidePaneHeader\n {...props}\n strings={strings}\n headingText={props.activePane === 'people' ? strings.peoplePaneTitle : ''}\n />\n );\n\n /**\n * In a Call Composite when a participant is removed, we must remove them from the call.\n */\n const removeParticipantFromCall = async (participantId: string): Promise<void> => {\n await props.callAdapter.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 minMaxDragPosition = useMinMaxDragPosition(props.modalLayerHostId, props.rtl);\n\n const pipStyles = useMemo(() => getPipStyles(theme), [theme]);\n\n const dataUiId = props.activePane === 'people' ? 'call-composite-people-pane' : '';\n\n /* @conditional-compile-remove(PSTN-calls) */\n const alternateCallerId = useAdapter().getState().alternateCallerId;\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 === 'people' ? availableSpaceStyles : hiddenStyles}>\n <CallAdapterProvider adapter={props.callAdapter}>\n <PeoplePaneContent\n {...props}\n onRemoveParticipant={removeParticipantFromCall}\n /* @conditional-compile-remove(PSTN-calls) */\n onAddParticipant={addParticipantToCall}\n setDrawerMenuItems={setDrawerMenuItems}\n strings={strings}\n /* @conditional-compile-remove(PSTN-calls) */\n alternateCallerId={alternateCallerId}\n />\n </CallAdapterProvider>\n </Stack>\n </Stack.Item>\n </Stack>\n </Stack.Item>\n {props.mobileView && (\n <ModalLocalAndRemotePIP\n callAdapter={props.callAdapter}\n modalLayerHostId={props.modalLayerHostId}\n hidden={!props.activePane}\n styles={pipStyles}\n minDragPosition={minMaxDragPosition.minDragPosition}\n maxDragPosition={minMaxDragPosition.maxDragPosition}\n />\n )}\n {drawerMenuItems.length > 0 && (\n <Stack styles={drawerContainerStyles}>\n <_DrawerMenu onLightDismiss={() => setDrawerMenuItems([])} items={drawerMenuItems} />\n </Stack>\n )}\n </Stack>\n );\n};\n\"../../../../../react-components/src\"\"../../../../../acs-ui-common/src\""]}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Active tab option type for {@link CallPane} component
3
+ * @private
4
+ */
5
+ /** @beta */
6
+ export declare type CallSidePaneOption = null | 'people';
7
+ /**
8
+ * @private
9
+ */
10
+ export declare const useSidePaneState: () => {
11
+ activePane: CallSidePaneOption;
12
+ closePane: () => void;
13
+ openPeoplePane: () => void;
14
+ togglePeoplePane: () => void;
15
+ };
16
+ //# sourceMappingURL=useSidePaneState.d.ts.map
@@ -0,0 +1,38 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT license.
3
+ import { _isInCall } from "../../../../../calling-component-bindings/src";
4
+ import { useCallback, useMemo, useState } from 'react';
5
+ import { callStatusSelector } from '../selectors/callStatusSelector';
6
+ import { useSelector } from './useSelector';
7
+ /**
8
+ * @private
9
+ */
10
+ export const useSidePaneState = () => {
11
+ const { callStatus } = useSelector(callStatusSelector);
12
+ const isInCall = _isInCall(callStatus);
13
+ const [chosenPane, setChosenPane] = useState(null);
14
+ const closePane = useCallback(() => {
15
+ setChosenPane(null);
16
+ }, [setChosenPane]);
17
+ const openPeoplePane = useCallback(() => {
18
+ setChosenPane('people');
19
+ }, []);
20
+ const togglePeoplePane = useCallback(() => {
21
+ if (chosenPane === 'people') {
22
+ closePane();
23
+ }
24
+ else {
25
+ openPeoplePane();
26
+ }
27
+ }, [chosenPane, closePane, openPeoplePane]);
28
+ // If we are not in a call, we should not show the people pane.
29
+ const activePane = chosenPane === 'people' && isInCall ? 'people' : null;
30
+ const memoizedReturnValue = useMemo(() => ({
31
+ activePane,
32
+ closePane,
33
+ openPeoplePane,
34
+ togglePeoplePane
35
+ }), [activePane, closePane, openPeoplePane, togglePeoplePane]);
36
+ return memoizedReturnValue;
37
+ };
38
+ //# sourceMappingURL=useSidePaneState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSidePaneState.js","sourceRoot":"","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,EAAE,CAAC,CAAC;QACL,UAAU;QACV,SAAS;QACT,cAAc;QACd,gBAAgB;KACjB,CAAC,EACF,CAAC,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,gBAAgB,CAAC,CAC1D,CAAC;IAEF,OAAO,mBAAmB,CAAC;AAC7B,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { _isInCall } from '@internal/calling-component-bindings';\nimport { useCallback, useMemo, useState } from 'react';\nimport { callStatusSelector } from '../selectors/callStatusSelector';\nimport { useSelector } from './useSelector';\n\n/**\n * Active tab option type for {@link CallPane} component\n * @private\n */\n/** @beta */\nexport type CallSidePaneOption = null | 'people';\n\n/**\n * @private\n */\nexport const useSidePaneState = (): {\n activePane: CallSidePaneOption;\n closePane: () => void;\n openPeoplePane: () => void;\n togglePeoplePane: () => void;\n} => {\n const { callStatus } = useSelector(callStatusSelector);\n const isInCall = _isInCall(callStatus);\n const [chosenPane, setChosenPane] = useState<CallSidePaneOption>(null);\n\n const closePane = useCallback(() => {\n setChosenPane(null);\n }, [setChosenPane]);\n\n const openPeoplePane = useCallback(() => {\n setChosenPane('people');\n }, []);\n\n const togglePeoplePane = useCallback(() => {\n if (chosenPane === 'people') {\n closePane();\n } else {\n openPeoplePane();\n }\n }, [chosenPane, closePane, openPeoplePane]);\n\n // If we are not in a call, we should not show the people pane.\n const activePane: CallSidePaneOption = chosenPane === 'people' && isInCall ? 'people' : null;\n\n const memoizedReturnValue = useMemo(\n () => ({\n activePane,\n closePane,\n openPeoplePane,\n togglePeoplePane\n }),\n [activePane, closePane, openPeoplePane, togglePeoplePane]\n );\n\n return memoizedReturnValue;\n};\n\"../../../../../calling-component-bindings/src\""]}
@@ -27,7 +27,7 @@ export declare const reduceCallControlsForMobile: (callControlOptions: CallContr
27
27
  */
28
28
  export declare const getCallCompositePage: (call: CallState | undefined, previousCall: CallState | undefined) => CallCompositePage;
29
29
  /** @private */
30
- export declare const IsCallEndedPage: (page: 'accessDeniedTeamsMeeting' | 'call' | 'configuration' | 'joinCallFailedDueToNoNetwork' | 'leftCall' | 'lobby' | 'removedFromCall' | /* @conditional-compile-remove(PSTN-calls) */ 'hold') => boolean;
30
+ export declare const IsCallEndedPage: (page: 'accessDeniedTeamsMeeting' | 'call' | 'configuration' | 'joinCallFailedDueToNoNetwork' | 'leftCall' | 'lobby' | 'removedFromCall' | /* @conditional-compile-remove(PSTN-calls) */ 'hold' | /* @conditional-compile-remove(rooms) */ 'roomNotFound' | /* @conditional-compile-remove(rooms) */ 'deniedPermissionToRoom') => boolean;
31
31
  /**
32
32
  * Creates a new call control options object and sets the correct values for disabling
33
33
  * the buttons provided in the `disabledControls` array.
@@ -40,12 +40,13 @@ export declare const IsCallEndedPage: (page: 'accessDeniedTeamsMeeting' | 'call'
40
40
  export declare const disableCallControls: (callControlOptions: CallControlOptions | boolean | undefined, disabledControls: (keyof CallControlOptions)[]) => CallControlOptions | boolean | undefined;
41
41
  /**
42
42
  * Check if a disabled object is provided for a button and returns if the button is disabled.
43
+ * A button is only disabled if is explicitly set to disabled.
43
44
  *
44
45
  * @param option
45
46
  * @returns whether a button is disabled
46
47
  * @private
47
48
  */
48
- export declare const isDisabled: (option?: boolean | {
49
+ export declare const isDisabled: (option: boolean | {
49
50
  disabled: boolean;
50
51
  } | undefined) => boolean;
51
52
  //# sourceMappingURL=Utils.d.ts.map
@@ -6,6 +6,10 @@ import { isPhoneNumberIdentifier } from '@azure/communication-common';
6
6
  const ACCESS_DENIED_TEAMS_MEETING_SUB_CODE = 5854;
7
7
  const REMOTE_PSTN_USER_HUNG_UP = 560000;
8
8
  const REMOVED_FROM_CALL_SUB_CODES = [5000, 5300, REMOTE_PSTN_USER_HUNG_UP];
9
+ /* @conditional-compile-remove(rooms) */
10
+ const ROOM_NOT_FOUND_SUB_CODE = 5751;
11
+ /* @conditional-compile-remove(rooms) */
12
+ const DENIED_PERMISSION_TO_ROOM_SUB_CODE = 5828;
9
13
  /**
10
14
  * @private
11
15
  */
@@ -48,9 +52,11 @@ var CallEndReasons;
48
52
  CallEndReasons[CallEndReasons["LEFT_CALL"] = 0] = "LEFT_CALL";
49
53
  CallEndReasons[CallEndReasons["ACCESS_DENIED"] = 1] = "ACCESS_DENIED";
50
54
  CallEndReasons[CallEndReasons["REMOVED_FROM_CALL"] = 2] = "REMOVED_FROM_CALL";
55
+ CallEndReasons[CallEndReasons["ROOM_NOT_FOUND"] = 3] = "ROOM_NOT_FOUND";
56
+ CallEndReasons[CallEndReasons["DENIED_PERMISSION_TO_ROOM"] = 4] = "DENIED_PERMISSION_TO_ROOM";
51
57
  })(CallEndReasons || (CallEndReasons = {}));
52
58
  const getCallEndReason = (call) => {
53
- var _a, _b, _c;
59
+ var _a, _b, _c, _d, _e;
54
60
  const remoteParticipantsEndedArray = Array.from(Object.values(call.remoteParticipantsEnded));
55
61
  /**
56
62
  * Handle the special case in a PSTN call where removing the last user kicks the caller out of the call.
@@ -70,6 +76,14 @@ const getCallEndReason = (call) => {
70
76
  if (((_c = call.callEndReason) === null || _c === void 0 ? void 0 : _c.subCode) && REMOVED_FROM_CALL_SUB_CODES.includes(call.callEndReason.subCode)) {
71
77
  return CallEndReasons.REMOVED_FROM_CALL;
72
78
  }
79
+ /* @conditional-compile-remove(rooms) */
80
+ if (((_d = call.callEndReason) === null || _d === void 0 ? void 0 : _d.subCode) && call.callEndReason.subCode === ROOM_NOT_FOUND_SUB_CODE) {
81
+ return CallEndReasons.ROOM_NOT_FOUND;
82
+ }
83
+ /* @conditional-compile-remove(rooms) */
84
+ if (((_e = call.callEndReason) === null || _e === void 0 ? void 0 : _e.subCode) && call.callEndReason.subCode === DENIED_PERMISSION_TO_ROOM_SUB_CODE) {
85
+ return CallEndReasons.DENIED_PERMISSION_TO_ROOM;
86
+ }
73
87
  if (call.callEndReason) {
74
88
  // No error codes match, assume the user simply left the call regularly
75
89
  return CallEndReasons.LEFT_CALL;
@@ -118,6 +132,13 @@ export const getCallCompositePage = (call, previousCall) => {
118
132
  }
119
133
  if (previousCall) {
120
134
  const reason = getCallEndReason(previousCall);
135
+ /* @conditional-compile-remove(rooms) */
136
+ switch (reason) {
137
+ case CallEndReasons.ROOM_NOT_FOUND:
138
+ return 'roomNotFound';
139
+ case CallEndReasons.DENIED_PERMISSION_TO_ROOM:
140
+ return 'deniedPermissionToRoom';
141
+ }
121
142
  switch (reason) {
122
143
  case CallEndReasons.ACCESS_DENIED:
123
144
  return 'accessDeniedTeamsMeeting';
@@ -177,15 +198,16 @@ export const disableCallControls = (callControlOptions, disabledControls) => {
177
198
  };
178
199
  /**
179
200
  * Check if a disabled object is provided for a button and returns if the button is disabled.
201
+ * A button is only disabled if is explicitly set to disabled.
180
202
  *
181
203
  * @param option
182
204
  * @returns whether a button is disabled
183
205
  * @private
184
206
  */
185
207
  export const isDisabled = (option) => {
186
- if (typeof option !== 'boolean') {
187
- return !!(option === null || option === void 0 ? void 0 : option.disabled);
208
+ if (option === undefined || typeof option === 'boolean') {
209
+ return false;
188
210
  }
189
- return option;
211
+ return option.disabled;
190
212
  };
191
213
  //# sourceMappingURL=Utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/utils/Utils.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAuC,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,sBAAsB,EAAE,sDAA6C;AAGvG,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,MAAM,oCAAoC,GAAG,IAAI,CAAC;AAClD,MAAM,wBAAwB,GAAG,MAAM,CAAC;AACxC,MAAM,2BAA2B,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,wBAAwB,CAAC,CAAC;AAE3E;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAuB,EAAW,EAAE;IAC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G,EAAE,GAAG,EAAE,EAAE;YAChD,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;YAC9B,OAAO,GAAG,CAAC;QACb,CAAC,EAAE,EAAE,CAAC,CAAC;KACR;SAAM;QACL,gBAAgB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAC/B,IAAI,UAAU,CAAC,GAAG,CAAC,KAAK,KAAK,EAAE;gBAC7B,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;aACtC;QACH,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAwC,EAAW,EAAE;IAC9E,IAAI,OAAO,MAAM,KAAK,SAAS,EAAE;QAC/B,OAAO,CAAC,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,QAAQ,CAAA,CAAC;KAC3B;IACD,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CallAdapterState, CallCompositePage, END_CALL_PAGES } from '../adapter/CallAdapter';\nimport { _isInCall, _isPreviewOn, _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { CallState } from '@internal/calling-stateful-client';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\n\nconst ACCESS_DENIED_TEAMS_MEETING_SUB_CODE = 5854;\nconst REMOTE_PSTN_USER_HUNG_UP = 560000;\nconst REMOVED_FROM_CALL_SUB_CODES = [5000, 5300, REMOTE_PSTN_USER_HUNG_UP];\n\n/**\n * @private\n */\nexport const isCameraOn = (state: CallAdapterState): boolean => {\n if (state.call) {\n const stream = state.call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');\n return !!stream;\n } else {\n if (state.devices.selectedCamera) {\n const previewOn = _isPreviewOn(state.devices);\n return previewOn;\n }\n }\n return false;\n};\n\n/**\n * Reduce the set of call controls visible on mobile.\n * For example do not show screenshare button.\n *\n * @private\n */\nexport const reduceCallControlsForMobile = (\n callControlOptions: CallControlOptions | boolean | undefined\n): CallControlOptions | false => {\n if (callControlOptions === false) {\n return false;\n }\n\n // Ensure call controls a valid object.\n const reduceCallControlOptions = callControlOptions === true ? {} : callControlOptions || {};\n\n // Set to compressed mode when composite is optimized for mobile\n reduceCallControlOptions.displayType = 'compact';\n\n // Do not show screen share button when composite is optimized for mobile unless the developer\n // has explicitly opted in.\n if (reduceCallControlOptions.screenShareButton !== true) {\n reduceCallControlOptions.screenShareButton = false;\n }\n\n return reduceCallControlOptions;\n};\n\nenum CallEndReasons {\n LEFT_CALL,\n ACCESS_DENIED,\n REMOVED_FROM_CALL\n}\n\nconst getCallEndReason = (call: CallState): CallEndReasons => {\n const remoteParticipantsEndedArray = Array.from(Object.values(call.remoteParticipantsEnded));\n /**\n * Handle the special case in a PSTN call where removing the last user kicks the caller out of the call.\n * The code and subcode is the same as when a user is removed from a teams interop call.\n * Hence, we look at the last remote participant removed to determine if the last participant removed was a phone number.\n * If yes, the caller was kicked out of the call, but we need to show them that they left the call.\n * Note: This check will only work for 1:1 PSTN Calls. The subcode is different for 1:N PSTN calls, and we do not need to handle that case.\n */\n if (\n remoteParticipantsEndedArray.length === 1 &&\n isPhoneNumberIdentifier(remoteParticipantsEndedArray[0].identifier) &&\n call.callEndReason?.subCode !== REMOTE_PSTN_USER_HUNG_UP\n ) {\n return CallEndReasons.LEFT_CALL;\n }\n\n if (call.callEndReason?.subCode && call.callEndReason.subCode === ACCESS_DENIED_TEAMS_MEETING_SUB_CODE) {\n return CallEndReasons.ACCESS_DENIED;\n }\n\n if (call.callEndReason?.subCode && REMOVED_FROM_CALL_SUB_CODES.includes(call.callEndReason.subCode)) {\n return CallEndReasons.REMOVED_FROM_CALL;\n }\n\n if (call.callEndReason) {\n // No error codes match, assume the user simply left the call regularly\n return CallEndReasons.LEFT_CALL;\n }\n\n throw new Error('No matching call end reason');\n};\n\n/**\n * Get the current call composite page based on the current call composite state\n *\n * @param Call - The current call state\n * @param previousCall - The state of the most recent previous call that has ended.\n *\n * @remarks - The previousCall state is needed to determine if the call has ended.\n * When the call ends a new call object is created, and so we must lookback at the\n * previous call state to understand how the call has ended. If there is no previous\n * call we know that this is a fresh call and can display the configuration page.\n *\n * @private\n */\nexport const getCallCompositePage = (\n call: CallState | undefined,\n previousCall: CallState | undefined\n): CallCompositePage => {\n // Must check for ongoing call *before* looking at any previous calls.\n // If the composite completes one call and joins another, the previous calls\n // will be populated, but not relevant for determining the page.\n if (call) {\n // `_isInLobbyOrConnecting` needs to be checked first because `_isInCall` also returns true when call is in lobby.\n if (_isInLobbyOrConnecting(call?.state)) {\n return 'lobby';\n // `LocalHold` needs to be checked before `isInCall` since it is also a state that's considered in call.\n } else if (call?.state === 'LocalHold') {\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return 'hold';\n return 'call';\n } else if (_isInCall(call?.state)) {\n return 'call';\n } else {\n // When the call object has been constructed after clicking , but before 'connecting' has been\n // set on the call object, we continue to show the configuration screen.\n // The call object does not correctly reflect local device state until `call.state` moves to `connecting`.\n // Moving to the 'lobby' page too soon leads to components that depend on the `call` object to show incorrect\n // transitional state.\n return 'configuration';\n }\n }\n\n if (previousCall) {\n const reason = getCallEndReason(previousCall);\n switch (reason) {\n case CallEndReasons.ACCESS_DENIED:\n return 'accessDeniedTeamsMeeting';\n case CallEndReasons.REMOVED_FROM_CALL:\n return 'removedFromCall';\n case CallEndReasons.LEFT_CALL:\n if (previousCall.diagnostics.network.latest.noNetwork) {\n return 'joinCallFailedDueToNoNetwork';\n }\n return 'leftCall';\n }\n }\n\n // No call state - show starting page (configuration)\n return 'configuration';\n};\n\n/** @private */\nexport const IsCallEndedPage = (\n /**\n * Explicitly listing the pages of this function intentionally.\n * This protects against adding a new composite page that should be marked as an callEndedPage.\n * EndCallPages are used to trigger onCallEnded events so this could easily be missed.\n * When you add a new composite page this will throw a compiler error. If this new page is an\n * EndCallPage ensure you update the END_CALL_PAGES. Afterwards update the `page` parameter\n * type below to allow your new page, i.e. add `| <your new page>\n */\n page:\n | 'accessDeniedTeamsMeeting'\n | 'call'\n | 'configuration'\n | 'joinCallFailedDueToNoNetwork'\n | 'leftCall'\n | 'lobby'\n | 'removedFromCall'\n | /* @conditional-compile-remove(PSTN-calls) */ 'hold'\n): boolean => END_CALL_PAGES.includes(page);\n\n/**\n * Creates a new call control options object and sets the correct values for disabling\n * the buttons provided in the `disabledControls` array.\n * Returns a new object without changing the original object.\n * @param callControlOptions options for the call control component that need to be modified.\n * @param disabledControls An array of controls to disable.\n * @returns a copy of callControlOptions with disabledControls disabled\n * @private\n */\nexport const disableCallControls = (\n callControlOptions: CallControlOptions | boolean | undefined,\n disabledControls: (keyof CallControlOptions)[]\n): CallControlOptions | boolean | undefined => {\n if (callControlOptions === false) {\n return false;\n }\n // Ensure we clone the prop if it is an object to ensure we do not mutate the original prop.\n let newOptions = (callControlOptions instanceof Object ? { ...callControlOptions } : callControlOptions) ?? {};\n if (newOptions === true || newOptions === undefined) {\n newOptions = disabledControls.reduce((acc, key) => {\n acc[key] = { disabled: true };\n return acc;\n }, {});\n } else {\n disabledControls.forEach((key) => {\n if (newOptions[key] !== false) {\n newOptions[key] = { disabled: true };\n }\n });\n }\n return newOptions;\n};\n\n/**\n * Check if a disabled object is provided for a button and returns if the button is disabled.\n *\n * @param option\n * @returns whether a button is disabled\n * @private\n */\nexport const isDisabled = (option?: boolean | { disabled: boolean }): boolean => {\n if (typeof option !== 'boolean') {\n return !!option?.disabled;\n }\n return option;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../calling-stateful-client/src\""]}
1
+ {"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/utils/Utils.ts"],"names":[],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AAC,CAAC;KACR;SAAM;QACL,gBAAgB,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YAC/B,IAAI,UAAU,CAAC,GAAG,CAAC,KAAK,KAAK,EAAE;gBAC7B,UAAU,CAAC,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;aACtC;QACH,CAAC,CAAC,CAAC;KACJ;IACD,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAmD,EAAW,EAAE;IACzF,IAAI,MAAM,KAAK,SAAS,IAAI,OAAO,MAAM,KAAK,SAAS,EAAE;QACvD,OAAO,KAAK,CAAC;KACd;IAED,OAAO,MAAM,CAAC,QAAQ,CAAC;AACzB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport { CallAdapterState, CallCompositePage, END_CALL_PAGES } from '../adapter/CallAdapter';\nimport { _isInCall, _isPreviewOn, _isInLobbyOrConnecting } from '@internal/calling-component-bindings';\nimport { CallControlOptions } from '../types/CallControlOptions';\nimport { CallState } from '@internal/calling-stateful-client';\nimport { isPhoneNumberIdentifier } from '@azure/communication-common';\n\nconst ACCESS_DENIED_TEAMS_MEETING_SUB_CODE = 5854;\nconst REMOTE_PSTN_USER_HUNG_UP = 560000;\nconst REMOVED_FROM_CALL_SUB_CODES = [5000, 5300, REMOTE_PSTN_USER_HUNG_UP];\n/* @conditional-compile-remove(rooms) */\nconst ROOM_NOT_FOUND_SUB_CODE = 5751;\n/* @conditional-compile-remove(rooms) */\nconst DENIED_PERMISSION_TO_ROOM_SUB_CODE = 5828;\n\n/**\n * @private\n */\nexport const isCameraOn = (state: CallAdapterState): boolean => {\n if (state.call) {\n const stream = state.call.localVideoStreams.find((stream) => stream.mediaStreamType === 'Video');\n return !!stream;\n } else {\n if (state.devices.selectedCamera) {\n const previewOn = _isPreviewOn(state.devices);\n return previewOn;\n }\n }\n return false;\n};\n\n/**\n * Reduce the set of call controls visible on mobile.\n * For example do not show screenshare button.\n *\n * @private\n */\nexport const reduceCallControlsForMobile = (\n callControlOptions: CallControlOptions | boolean | undefined\n): CallControlOptions | false => {\n if (callControlOptions === false) {\n return false;\n }\n\n // Ensure call controls a valid object.\n const reduceCallControlOptions = callControlOptions === true ? {} : callControlOptions || {};\n\n // Set to compressed mode when composite is optimized for mobile\n reduceCallControlOptions.displayType = 'compact';\n\n // Do not show screen share button when composite is optimized for mobile unless the developer\n // has explicitly opted in.\n if (reduceCallControlOptions.screenShareButton !== true) {\n reduceCallControlOptions.screenShareButton = false;\n }\n\n return reduceCallControlOptions;\n};\n\nenum CallEndReasons {\n LEFT_CALL,\n ACCESS_DENIED,\n REMOVED_FROM_CALL,\n ROOM_NOT_FOUND,\n DENIED_PERMISSION_TO_ROOM\n}\n\nconst getCallEndReason = (call: CallState): CallEndReasons => {\n const remoteParticipantsEndedArray = Array.from(Object.values(call.remoteParticipantsEnded));\n /**\n * Handle the special case in a PSTN call where removing the last user kicks the caller out of the call.\n * The code and subcode is the same as when a user is removed from a teams interop call.\n * Hence, we look at the last remote participant removed to determine if the last participant removed was a phone number.\n * If yes, the caller was kicked out of the call, but we need to show them that they left the call.\n * Note: This check will only work for 1:1 PSTN Calls. The subcode is different for 1:N PSTN calls, and we do not need to handle that case.\n */\n if (\n remoteParticipantsEndedArray.length === 1 &&\n isPhoneNumberIdentifier(remoteParticipantsEndedArray[0].identifier) &&\n call.callEndReason?.subCode !== REMOTE_PSTN_USER_HUNG_UP\n ) {\n return CallEndReasons.LEFT_CALL;\n }\n\n if (call.callEndReason?.subCode && call.callEndReason.subCode === ACCESS_DENIED_TEAMS_MEETING_SUB_CODE) {\n return CallEndReasons.ACCESS_DENIED;\n }\n\n if (call.callEndReason?.subCode && REMOVED_FROM_CALL_SUB_CODES.includes(call.callEndReason.subCode)) {\n return CallEndReasons.REMOVED_FROM_CALL;\n }\n\n /* @conditional-compile-remove(rooms) */\n if (call.callEndReason?.subCode && call.callEndReason.subCode === ROOM_NOT_FOUND_SUB_CODE) {\n return CallEndReasons.ROOM_NOT_FOUND;\n }\n\n /* @conditional-compile-remove(rooms) */\n if (call.callEndReason?.subCode && call.callEndReason.subCode === DENIED_PERMISSION_TO_ROOM_SUB_CODE) {\n return CallEndReasons.DENIED_PERMISSION_TO_ROOM;\n }\n\n if (call.callEndReason) {\n // No error codes match, assume the user simply left the call regularly\n return CallEndReasons.LEFT_CALL;\n }\n\n throw new Error('No matching call end reason');\n};\n\n/**\n * Get the current call composite page based on the current call composite state\n *\n * @param Call - The current call state\n * @param previousCall - The state of the most recent previous call that has ended.\n *\n * @remarks - The previousCall state is needed to determine if the call has ended.\n * When the call ends a new call object is created, and so we must lookback at the\n * previous call state to understand how the call has ended. If there is no previous\n * call we know that this is a fresh call and can display the configuration page.\n *\n * @private\n */\nexport const getCallCompositePage = (\n call: CallState | undefined,\n previousCall: CallState | undefined\n): CallCompositePage => {\n // Must check for ongoing call *before* looking at any previous calls.\n // If the composite completes one call and joins another, the previous calls\n // will be populated, but not relevant for determining the page.\n if (call) {\n // `_isInLobbyOrConnecting` needs to be checked first because `_isInCall` also returns true when call is in lobby.\n if (_isInLobbyOrConnecting(call?.state)) {\n return 'lobby';\n // `LocalHold` needs to be checked before `isInCall` since it is also a state that's considered in call.\n } else if (call?.state === 'LocalHold') {\n /* @conditional-compile-remove(PSTN-calls) */ /* @conditional-compile-remove(one-to-n-calling) */\n return 'hold';\n return 'call';\n } else if (_isInCall(call?.state)) {\n return 'call';\n } else {\n // When the call object has been constructed after clicking , but before 'connecting' has been\n // set on the call object, we continue to show the configuration screen.\n // The call object does not correctly reflect local device state until `call.state` moves to `connecting`.\n // Moving to the 'lobby' page too soon leads to components that depend on the `call` object to show incorrect\n // transitional state.\n return 'configuration';\n }\n }\n\n if (previousCall) {\n const reason = getCallEndReason(previousCall);\n /* @conditional-compile-remove(rooms) */\n switch (reason) {\n case CallEndReasons.ROOM_NOT_FOUND:\n return 'roomNotFound';\n case CallEndReasons.DENIED_PERMISSION_TO_ROOM:\n return 'deniedPermissionToRoom';\n }\n switch (reason) {\n case CallEndReasons.ACCESS_DENIED:\n return 'accessDeniedTeamsMeeting';\n case CallEndReasons.REMOVED_FROM_CALL:\n return 'removedFromCall';\n case CallEndReasons.LEFT_CALL:\n if (previousCall.diagnostics.network.latest.noNetwork) {\n return 'joinCallFailedDueToNoNetwork';\n }\n return 'leftCall';\n }\n }\n\n // No call state - show starting page (configuration)\n return 'configuration';\n};\n\n/** @private */\nexport const IsCallEndedPage = (\n /**\n * Explicitly listing the pages of this function intentionally.\n * This protects against adding a new composite page that should be marked as an callEndedPage.\n * EndCallPages are used to trigger onCallEnded events so this could easily be missed.\n * When you add a new composite page this will throw a compiler error. If this new page is an\n * EndCallPage ensure you update the END_CALL_PAGES. Afterwards update the `page` parameter\n * type below to allow your new page, i.e. add `| <your new page>\n */\n page:\n | 'accessDeniedTeamsMeeting'\n | 'call'\n | 'configuration'\n | 'joinCallFailedDueToNoNetwork'\n | 'leftCall'\n | 'lobby'\n | 'removedFromCall'\n | /* @conditional-compile-remove(PSTN-calls) */ 'hold'\n | /* @conditional-compile-remove(rooms) */ 'roomNotFound'\n | /* @conditional-compile-remove(rooms) */ 'deniedPermissionToRoom'\n): boolean => END_CALL_PAGES.includes(page);\n\n/**\n * Creates a new call control options object and sets the correct values for disabling\n * the buttons provided in the `disabledControls` array.\n * Returns a new object without changing the original object.\n * @param callControlOptions options for the call control component that need to be modified.\n * @param disabledControls An array of controls to disable.\n * @returns a copy of callControlOptions with disabledControls disabled\n * @private\n */\nexport const disableCallControls = (\n callControlOptions: CallControlOptions | boolean | undefined,\n disabledControls: (keyof CallControlOptions)[]\n): CallControlOptions | boolean | undefined => {\n if (callControlOptions === false) {\n return false;\n }\n // Ensure we clone the prop if it is an object to ensure we do not mutate the original prop.\n let newOptions = (callControlOptions instanceof Object ? { ...callControlOptions } : callControlOptions) ?? {};\n if (newOptions === true || newOptions === undefined) {\n newOptions = disabledControls.reduce((acc, key) => {\n acc[key] = { disabled: true };\n return acc;\n }, {});\n } else {\n disabledControls.forEach((key) => {\n if (newOptions[key] !== false) {\n newOptions[key] = { disabled: true };\n }\n });\n }\n return newOptions;\n};\n\n/**\n * Check if a disabled object is provided for a button and returns if the button is disabled.\n * A button is only disabled if is explicitly set to disabled.\n *\n * @param option\n * @returns whether a button is disabled\n * @private\n */\nexport const isDisabled = (option: boolean | { disabled: boolean } | undefined): boolean => {\n if (option === undefined || typeof option === 'boolean') {\n return false;\n }\n\n return option.disabled;\n};\n\"../../../../../calling-component-bindings/src\"\"../../../../../calling-stateful-client/src\""]}
@@ -1 +1 @@
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;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAE,SA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,UAAU,IAAI,CACnB,oBAAC,sBAAsB,IACrB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,EACxC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,kBAAkB,CAAC,eAAe,EACnD,eAAe,EAAE,kBAAkB,CAAC,eAAe,GACnD,CACH;QACA,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,CAC7B,oBAAC,KAAK,IAAC,MAAM,EAAE,qBAAqB;YAClC,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';\nimport { drawerContainerStyles } from './styles/CallWithChatCompositeStyles';\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 { CommunicationIdentifier } 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';\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: CommunicationIdentifier,\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 {...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 <Stack styles={props.activePane === 'people' ? availableSpaceStyles : hiddenStyles}>{peopleContent}</Stack>\n </Stack.Item>\n </Stack>\n </Stack.Item>\n {props.mobileView && (\n <ModalLocalAndRemotePIP\n callAdapter={props.callAdapter}\n modalLayerHostId={props.modalLayerHostId}\n hidden={hidden}\n styles={pipStyles}\n minDragPosition={minMaxDragPosition.minDragPosition}\n maxDragPosition={minMaxDragPosition.maxDragPosition}\n />\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
+ {"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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AC,oBAAoB,CAAC,CAAC,CAAC,YAAY,IAAG,WAAW,CAAS;oBACvG,oBAAC,KAAK,IAAC,MAAM,EAAE,KAAK,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,YAAY,IAAG,aAAa,CAAS,CAChG,CACP,CACG;QACZ,KAAK,CAAC,UAAU,IAAI,CACnB,oBAAC,sBAAsB,IACrB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,gBAAgB,EAAE,KAAK,CAAC,gBAAgB,EACxC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,SAAS,EACjB,eAAe,EAAE,kBAAkB,CAAC,eAAe,EACnD,eAAe,EAAE,kBAAkB,CAAC,eAAe,GACnD,CACH;QACA,eAAe,CAAC,MAAM,GAAG,CAAC,IAAI,CAC7B,oBAAC,KAAK,IAAC,MAAM,EAAE,qBAAqB;YAClC,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';\nimport { drawerContainerStyles } from './styles/CallWithChatCompositeStyles';\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';\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 {...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 <Stack styles={props.activePane === 'people' ? availableSpaceStyles : hiddenStyles}>{peopleContent}</Stack>\n </Stack.Item>\n </Stack>\n </Stack.Item>\n {props.mobileView && (\n <ModalLocalAndRemotePIP\n callAdapter={props.callAdapter}\n modalLayerHostId={props.modalLayerHostId}\n hidden={hidden}\n styles={pipStyles}\n minDragPosition={minMaxDragPosition.minDragPosition}\n maxDragPosition={minMaxDragPosition.maxDragPosition}\n />\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\""]}
@@ -8,7 +8,7 @@ import { FileUploadManager } from '../../ChatComposite';
8
8
  import { CallWithChatAdapter } from './CallWithChatAdapter';
9
9
  import { CallWithChatAdapterState } from '../state/CallWithChatAdapterState';
10
10
  import { CommunicationTokenCredential, CommunicationUserIdentifier } from '@azure/communication-common';
11
- import { CommunicationIdentifier } from '@azure/communication-common';
11
+ import { PhoneNumberIdentifier } from '@azure/communication-common';
12
12
  import { AdapterError } from '../../common/adapters';
13
13
  import { CallParticipantsLocator } from '../../CallComposite/adapter/AzureCommunicationCallAdapter';
14
14
  import { CallAdapterLocator } from '../../CallComposite/adapter/AzureCommunicationCallAdapter';
@@ -100,7 +100,8 @@ export declare class AzureCommunicationCallWithChatAdapter implements CallWithCh
100
100
  updateFileUploadMetadata: (id: string, metadata: FileMetadata) => void;
101
101
  holdCall(): Promise<void>;
102
102
  resumeCall(): Promise<void>;
103
- addParticipant(participant: CommunicationIdentifier, options?: AddPhoneNumberOptions): Promise<void>;
103
+ addParticipant(participant: PhoneNumberIdentifier, options?: AddPhoneNumberOptions): Promise<void>;
104
+ addParticipant(participant: CommunicationUserIdentifier): Promise<void>;
104
105
  sendDtmfTone(dtmfTone: DtmfTone): Promise<void>;
105
106
  on(event: 'callParticipantsJoined', listener: ParticipantsJoinedListener): void;
106
107
  on(event: 'callParticipantsLeft', listener: ParticipantsLeftListener): void;
@@ -13,6 +13,8 @@ import { createAzureCommunicationCallAdapter } from '../../CallComposite';
13
13
  import { callWithChatAdapterStateFromBackingStates, mergeCallAdapterStateIntoCallWithChatAdapterState, mergeChatAdapterStateIntoCallWithChatAdapterState } from '../state/CallWithChatAdapterState';
14
14
  import { createAzureCommunicationChatAdapter, createAzureCommunicationChatAdapterFromClient } from '../../ChatComposite/adapter/AzureCommunicationChatAdapter';
15
15
  import { EventEmitter } from 'events';
16
+ /* @conditional-compile-remove(PSTN-calls) */
17
+ import { isCommunicationUserIdentifier } from '@azure/communication-common';
16
18
  import { getChatThreadFromTeamsLink } from './parseTeamsUrl';
17
19
  import { createAzureCommunicationCallAdapterFromClient } from '../../CallComposite/adapter/AzureCommunicationCallAdapter';
18
20
  import { useEffect, useRef, useState } from 'react';
@@ -342,7 +344,12 @@ export class AzureCommunicationCallWithChatAdapter {
342
344
  /* @conditional-compile-remove(PSTN-calls) */
343
345
  addParticipant(participant, options) {
344
346
  return __awaiter(this, void 0, void 0, function* () {
345
- return yield this.callAdapter.addParticipant(participant, options);
347
+ if (isCommunicationUserIdentifier(participant)) {
348
+ return yield this.callAdapter.addParticipant(participant);
349
+ }
350
+ else {
351
+ return yield this.callAdapter.addParticipant(participant, options);
352
+ }
346
353
  });
347
354
  }
348
355
  /* @conditional-compile-remove(PSTN-calls) */