@azure/communication-react 1.11.0-alpha-202312060012 → 1.11.0-alpha-202312080012
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.
- package/dist/communication-react.d.ts +66 -63
- package/dist/dist-cjs/communication-react/index.js +203 -124
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetry.js +3 -1
- package/dist/dist-esm/acs-ui-common/src/telemetry.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/calling-component-bindings/src/getRemoteParticipantsExcludingConsumers.d.ts +1 -22
- package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +2 -2
- package/dist/dist-esm/calling-component-bindings/src/handlers/createTeamsCallHandlers.d.ts +2 -2
- package/dist/dist-esm/calling-component-bindings/src/utils/callUtils.d.ts +2 -2
- package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +2 -2
- package/dist/dist-esm/calling-stateful-client/src/CallContext.d.ts +2 -2
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js +22 -7
- package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +23 -45
- package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.d.ts +9 -11
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js +28 -13
- package/dist/dist-esm/calling-stateful-client/src/InternalCallContext.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StatefulCallClient.d.ts +2 -2
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js +52 -40
- package/dist/dist-esm/calling-stateful-client/src/StreamUtils.js.map +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.d.ts +1 -1
- package/dist/dist-esm/calling-stateful-client/src/StreamUtilsLogging.js.map +1 -1
- package/dist/dist-esm/chat-stateful-client/src/StatefulChatClient.d.ts +3 -3
- package/dist/dist-esm/chat-stateful-client/src/convertChatMessage.d.ts +1 -1
- package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedListMessages.d.ts +1 -1
- package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedListParticipants.d.ts +1 -1
- package/dist/dist-esm/chat-stateful-client/src/iterators/createDecoratedListThreads.d.ts +1 -1
- package/dist/dist-esm/communication-react/src/mergedHooks.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/DevicesButton.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/Drawer/DrawerMenu.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ErrorBar.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/FileCard.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.d.ts +2 -0
- package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.js +2 -2
- package/dist/dist-esm/react-components/src/components/LocalVideoCameraButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/LocalVideoTile.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery/styles/FloatingLocalVideo.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/VideoGallery.js +8 -6
- package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +14 -0
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js +3 -3
- package/dist/dist-esm/react-components/src/components/styles/VideoGallery.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/common.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/utils/getParticipantsWhoHaveReadMessage.d.ts +4 -4
- package/dist/dist-esm/react-components/src/components/utils/keyboardNavigation.d.ts +1 -2
- package/dist/dist-esm/react-components/src/components/utils.d.ts +1 -1
- package/dist/dist-esm/react-components/src/theming/v9ThemeShim.d.ts +1 -1
- package/dist/dist-esm/react-components/src/theming/v9ThemeShim.js +1 -1
- package/dist/dist-esm/react-components/src/theming/v9ThemeShim.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.d.ts +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/CallComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LobbyTile.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LobbyTile.js +8 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LobbyTile.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +1 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/LobbyPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/LocalVideoTileSelector.d.ts +1 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/activeVideoBackgroundEffectSelector.d.ts +1 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/callStatusSelector.d.ts +1 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/capabilitiesChangedInfoAndRoleSelector.d.ts +1 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/complianceBannerSelector.d.ts +1 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/deviceCountSelector.d.ts +1 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/devicePermissionSelector.d.ts +1 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/dominantRemoteParticipantSelector.d.ts +1 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/lobbySelector.d.ts +1 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localAndRemotePIPSelector.d.ts +1 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localPreviewSelector.d.ts +1 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/localVideoStreamSelector.d.ts +1 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mediaGallerySelector.d.ts +2 -46
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/mutedNotificationSelector.d.ts +1 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/selectors/networkReconnectTileSelector.d.ts +1 -23
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.d.ts +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +3 -2
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallPage.styles.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.d.ts +5 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.js +6 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/LobbyTile.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +9 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +8 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/useConsoleErrors.d.ts +6 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/useConsoleErrors.js +31 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/useConsoleErrors.js.map +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.d.ts +3 -3
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/CallWithChatComposite.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +6 -6
- package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedChatAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatHeader.d.ts +3 -10
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/adapter/AzureCommunicationFileUploadAdapter.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/ChatComposite/selectors/fileUploadsSelector.d.ts +1 -8
- package/dist/dist-esm/react-composites/src/composites/common/AddPeopleDropdown.styles.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.d.ts +4 -4
- package/dist/dist-esm/react-composites/src/composites/common/ControlBar/CustomButton.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ConvertContextualMenuItemToDrawerMenuItem.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +45 -45
- package/dist/dist-esm/react-composites/src/composites/common/styles/Pane.styles.d.ts +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/utils.d.ts +1 -1
- package/package.json +1 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ErrorBar.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/ErrorBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAoB,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAEL,YAAY,EACZ,+BAA+B,EAC/B,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACf,MAAM,SAAS,CAAC;AAiPjB;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAe,EAAE;;IAC5D,MAAM,aAAa,GAAG,SAAS,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC;IACnD,MAAM,OAAO,GAAG,MAAA,KAAK,CAAC,OAAO,mCAAI,aAAa,CAAC;IAE/C,MAAM,8BAA8B,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC;IAE7D,sDAAsD;IACtD,yDAAyD;IACzD,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;IAEpD,MAAM,CAAC,eAAe,EAAE,kBAAk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AC,sBAAsB,EACtD,gBAAgB,EAAE,EAAE,QAAQ,EAAE,eAAe,EAAE,KAE9C,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CACT,CACd,CAAC,CACI,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect, useRef, useState } from 'react';\nimport { IMessageBarProps, MessageBar, Stack } from '@fluentui/react';\nimport { useLocale } from '../localization';\nimport {\n DismissedError,\n dismissError,\n dropDismissalsForInactiveErrors,\n errorsToShow,\n messageBarIconProps,\n messageBarType\n} from './utils';\n\n/**\n * Props for {@link ErrorBar}.\n *\n * In addition to the following, {@link ErrorBar} forwards all\n * {@link @fluentui/react#IMessageBarProps} to the underlying {@link @fluentui/react#MessageBar}.\n *\n * @public\n */\nexport interface ErrorBarProps extends IMessageBarProps {\n /**\n * Strings shown on the UI on errors.\n */\n strings?: ErrorBarStrings;\n\n /**\n * Currently active errors.\n */\n activeErrorMessages: ActiveErrorMessage[];\n\n /**\n * If set, errors with {@link ActiveErrorMessage.timestamp} older than the time this component is mounted\n * are not shown.\n *\n * This is useful when using the {@link ErrorBar} with a stateful client that handles more than one call\n * or chat thread. Set this prop to ignore errors from previous call or chat.\n *\n * @defaultValue false\n */\n ignorePremountErrors?: boolean;\n\n /**\n * Callback called when the dismiss button is triggered.\n * Use this to control errors shown when they dismissed by the user.\n */\n onDismissError?: (dismissedError: ActiveErrorMessage) => void;\n}\n\n/**\n * All strings that may be shown on the UI in the {@link ErrorBar}.\n *\n * @public\n */\nexport interface ErrorBarStrings {\n /**\n * Unable to reach Chat service.\n *\n * This can mean:\n * - Incorrect Azure Communication Services endpoint was provided.\n * - User's network connection is down.\n */\n unableToReachChatService: string;\n\n /**\n * User does not have access to the Chat service.\n * This usually means that either the Azure Communication Services endpiont or the token provided are incorrect.\n */\n accessDenied: string;\n\n /**\n * User is no longer on the thread.\n *\n * See also: {@link ErrorBarStrings.sendMessageNotInChatThread} for a more specific error.\n */\n userNotInChatThread: string;\n\n /**\n * Sending message failed because user is no longer on the thread.\n */\n sendMessageNotInChatThread: string;\n\n /**\n * A generic message when sending message fails.\n * Prefer more specific error strings when possible.\n */\n sendMessageGeneric: string;\n\n /**\n * A generic message when starting video fails.\n */\n startVideoGeneric: string;\n\n /**\n * A generic message when starting video fails.\n */\n stopVideoGeneric: string;\n\n /**\n * A generic message when muting microphone fails.\n */\n muteGeneric: string;\n\n /**\n * A generic message when unmuting microphone fails.\n */\n unmuteGeneric: string;\n\n /**\n * A generic message when starting screenshare fails.\n */\n startScreenShareGeneric: string;\n\n /**\n * A generic message when stopping screenshare fails.\n */\n stopScreenShareGeneric: string;\n\n /**\n * Message shown when poor network quality is detected during a call.\n */\n callNetworkQualityLow: string;\n\n /**\n * Message shown on failure to detect audio output devices.\n */\n callNoSpeakerFound: string;\n\n /**\n * Message shown on failure to detect audio input devices.\n */\n callNoMicrophoneFound: string;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system.\n */\n callMicrophoneAccessDenied: string;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system, for safari browsers\n */\n callMicrophoneAccessDeniedSafari: string;\n\n /**\n * Message shown when microphone is muted by the system (not by local or remote participants)\n */\n callMicrophoneMutedBySystem: string;\n\n /**\n * Message shown when microphone is unmuted by the system (not by local or remote participants).\n * This typically occurs if the system recovers from an unexpected mute.\n */\n callMicrophoneUnmutedBySystem: string;\n\n /**\n * Mac OS specific message shown when microphone can be enumerated but access is\n * blocked by the system.\n */\n callMacOsMicrophoneAccessDenied: string;\n\n /**\n * Message shown when poor network causes local video stream to be frozen.\n */\n callLocalVideoFreeze: string;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system.\n */\n callCameraAccessDenied: string;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system, for safari browsers\n */\n callCameraAccessDeniedSafari: string;\n\n /**\n * Message shown when local video fails to start because camera is already in use by\n * another applciation.\n */\n callCameraAlreadyInUse: string;\n\n /**\n * Message shown when local video is stopped by the system (not by local or remote participants)\n */\n callVideoStoppedBySystem: string;\n\n /**\n * Message shown when local video was recovered by the system (not by the local participant)\n */\n callVideoRecoveredBySystem: string;\n\n /**\n * Mac OS specific message shown when system denies access to camera.\n */\n callMacOsCameraAccessDenied: string;\n\n /**\n * Mac OS specific message shown when system denies sharing local screen on a call.\n */\n callMacOsScreenShareAccessDenied: string;\n /**\n * Dimiss errorbar button aria label read by screen reader accessibility tools\n */\n dismissButtonAriaLabel?: string;\n\n /**\n * An error message when joining a call fails.\n */\n failedToJoinCallGeneric?: string;\n\n /**\n * An error message when joining a call fails specifically due to an invalid meeting link.\n */\n failedToJoinCallInvalidMeetingLink?: string;\n /**\n * Error bar string letting you know remote participants see a frozen stream for you.\n */\n cameraFrozenForRemoteParticipants?: string;\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Unable to start effect\n */\n unableToStartVideoEffect?: string;\n}\n\n/**\n * All errors that can be shown in the {@link ErrorBar}.\n *\n * @public\n */\nexport type ErrorType = keyof ErrorBarStrings;\n\n/**\n * Active error messages to be shown via {@link ErrorBar}.\n *\n * @public\n */\nexport interface ActiveErrorMessage {\n /**\n * Type of error that is active.\n */\n type: ErrorType;\n /**\n * The latest timestamp when this error was observed.\n *\n * When available, this is used to track errors that have already been seen and dismissed\n * by the user.\n */\n timestamp?: Date;\n}\n\n/**\n * A component to show error messages on the UI.\n * All strings that can be shown are accepted as the {@link ErrorBarProps.strings} so that they can be localized.\n * Active errors are selected by {@link ErrorBarProps.activeErrorMessages}.\n *\n * This component internally tracks dismissed by the user.\n * * Errors that have an associated timestamp: The error is shown on the UI again if it occurs after being dismissed.\n * * Errors that do not have a timestamp: The error is dismissed until it disappears from the props.\n * If the error recurs, it is shown in the UI.\n *\n * Uses {@link @fluentui/react#MessageBar} UI element.\n *\n * @public\n */\nexport const ErrorBar = (props: ErrorBarProps): JSX.Element => {\n const localeStrings = useLocale().strings.errorBar;\n const strings = props.strings ?? localeStrings;\n\n const trackDismissedErrorsInternally = !props.onDismissError;\n\n // Timestamp for when this comopnent is first mounted.\n // Never updated through the lifecycle of this component.\n const mountTimestamp = useRef(new Date(Date.now()));\n\n const [dismissedErrors, setDismissedErrors] = useState<DismissedError[]>([]);\n\n // dropDismissalsForInactiveErrors only returns a new object if `dismissedErrors` actually changes.\n // Without this behaviour, this `useEffect` block would cause a render loop.\n useEffect(() => {\n trackDismissedErrorsInternally &&\n setDismissedErrors(dropDismissalsForInactiveErrors(props.activeErrorMessages, dismissedErrors));\n }, [props.activeErrorMessages, dismissedErrors, trackDismissedErrorsInternally]);\n\n const toShow = errorsToShow(\n props.activeErrorMessages,\n dismissedErrors,\n props.ignorePremountErrors ? mountTimestamp.current : undefined\n );\n\n return (\n <Stack data-ui-id=\"error-bar-stack\">\n {toShow.map((error) => (\n <MessageBar\n {...props}\n styles={{\n innerText: {\n alignSelf: 'center'\n },\n icon: {\n height: 0\n },\n content: {\n lineHeight: 'inherit'\n },\n dismissal: {\n height: 0,\n paddingTop: '0.8rem'\n }\n }}\n key={error.type}\n messageBarType={messageBarType(error.type)}\n messageBarIconProps={messageBarIconProps(error.type)}\n onDismiss={() =>\n trackDismissedErrorsInternally\n ? setDismissedErrors(dismissError(dismissedErrors, error))\n : props.onDismissError?.(error)\n }\n dismissButtonAriaLabel={strings.dismissButtonAriaLabel}\n dismissIconProps={{ iconName: 'ErrorBarClear' }}\n >\n {strings[error.type]}\n </MessageBar>\n ))}\n </Stack>\n );\n};\n"]}
|
1
|
+
{"version":3,"file":"ErrorBar.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/ErrorBar.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAoB,UAAU,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,SAAS,EA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Q;aACpB;YACD,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC;aACV;YACD,OAAO,EAAE;gBACP,UAAU,EAAE,SAAS;aACtB;YACD,SAAS,EAAE;gBACT,MAAM,EAAE,CAAC;gBACT,UAAU,EAAE,QAAQ;aACrB;SACF,EACD,GAAG,EAAE,KAAK,CAAC,IAAI,EACf,cAAc,EAAE,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,EAC1C,mBAAmB,EAAE,mBAAmB,CAAC,KAAK,CAAC,IAAI,CAAC,EACpD,SAAS,EAAE,GAAG,EAAE;;YACd,OAAA,8BAA8B;gBAC5B,CAAC,CAAC,kBAAkB,CAAC,YAAY,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;gBAC1D,CAAC,CAAC,MAAA,KAAK,CAAC,cAAc,sDAAG,KAAK,CAAC,CAAA;SAAA,EAEnC,sBAAsB,EAAE,OAAO,CAAC,sBAAsB,EACtD,gBAAgB,EAAE,EAAE,QAAQ,EAAE,eAAe,EAAE,KAE9C,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CACT,CACd,CAAC,CACI,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect, useRef, useState } from 'react';\nimport { IMessageBarProps, MessageBar, Stack } from '@fluentui/react';\nimport { useLocale } from '../localization';\nimport {\n DismissedError,\n dismissError,\n dropDismissalsForInactiveErrors,\n errorsToShow,\n messageBarIconProps,\n messageBarType\n} from './utils';\n\n/**\n * Props for {@link ErrorBar}.\n *\n * In addition to the following, {@link ErrorBar} forwards all\n * {@link @fluentui/react#IMessageBarProps} to the underlying {@link @fluentui/react#MessageBar}.\n *\n * @public\n */\nexport interface ErrorBarProps extends IMessageBarProps {\n /**\n * Strings shown on the UI on errors.\n */\n strings?: ErrorBarStrings;\n\n /**\n * Currently active errors.\n */\n activeErrorMessages: ActiveErrorMessage[];\n\n /**\n * If set, errors with {@link ActiveErrorMessage.timestamp} older than the time this component is mounted\n * are not shown.\n *\n * This is useful when using the {@link ErrorBar} with a stateful client that handles more than one call\n * or chat thread. Set this prop to ignore errors from previous call or chat.\n *\n * @defaultValue false\n */\n ignorePremountErrors?: boolean;\n\n /**\n * Callback called when the dismiss button is triggered.\n * Use this to control errors shown when they dismissed by the user.\n */\n onDismissError?: (dismissedError: ActiveErrorMessage) => void;\n}\n\n/**\n * All strings that may be shown on the UI in the {@link ErrorBar}.\n *\n * @public\n */\nexport interface ErrorBarStrings {\n /**\n * Unable to reach Chat service.\n *\n * This can mean:\n * - Incorrect Azure Communication Services endpoint was provided.\n * - User's network connection is down.\n */\n unableToReachChatService: string;\n\n /**\n * User does not have access to the Chat service.\n * This usually means that either the Azure Communication Services endpiont or the token provided are incorrect.\n */\n accessDenied: string;\n\n /**\n * User is no longer on the thread.\n *\n * See also: {@link ErrorBarStrings.sendMessageNotInChatThread} for a more specific error.\n */\n userNotInChatThread: string;\n\n /**\n * Sending message failed because user is no longer on the thread.\n */\n sendMessageNotInChatThread: string;\n\n /**\n * A generic message when sending message fails.\n * Prefer more specific error strings when possible.\n */\n sendMessageGeneric: string;\n\n /**\n * A generic message when starting video fails.\n */\n startVideoGeneric: string;\n\n /**\n * A generic message when starting video fails.\n */\n stopVideoGeneric: string;\n\n /**\n * A generic message when muting microphone fails.\n */\n muteGeneric: string;\n\n /**\n * A generic message when unmuting microphone fails.\n */\n unmuteGeneric: string;\n\n /**\n * A generic message when starting screenshare fails.\n */\n startScreenShareGeneric: string;\n\n /**\n * A generic message when stopping screenshare fails.\n */\n stopScreenShareGeneric: string;\n\n /**\n * Message shown when poor network quality is detected during a call.\n */\n callNetworkQualityLow: string;\n\n /**\n * Message shown on failure to detect audio output devices.\n */\n callNoSpeakerFound: string;\n\n /**\n * Message shown on failure to detect audio input devices.\n */\n callNoMicrophoneFound: string;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system.\n */\n callMicrophoneAccessDenied: string;\n\n /**\n * Message shown when microphone can be enumerated but access is blocked by the system, for safari browsers\n */\n callMicrophoneAccessDeniedSafari: string;\n\n /**\n * Message shown when microphone is muted by the system (not by local or remote participants)\n */\n callMicrophoneMutedBySystem: string;\n\n /**\n * Message shown when microphone is unmuted by the system (not by local or remote participants).\n * This typically occurs if the system recovers from an unexpected mute.\n */\n callMicrophoneUnmutedBySystem: string;\n\n /**\n * Mac OS specific message shown when microphone can be enumerated but access is\n * blocked by the system.\n */\n callMacOsMicrophoneAccessDenied: string;\n\n /**\n * Message shown when poor network causes local video stream to be frozen.\n */\n callLocalVideoFreeze: string;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system.\n */\n callCameraAccessDenied: string;\n\n /**\n * Message shown when camera can be enumerated but access is blocked by the system, for safari browsers\n */\n callCameraAccessDeniedSafari: string;\n\n /**\n * Message shown when local video fails to start because camera is already in use by\n * another applciation.\n */\n callCameraAlreadyInUse: string;\n\n /**\n * Message shown when local video is stopped by the system (not by local or remote participants)\n */\n callVideoStoppedBySystem: string;\n\n /**\n * Message shown when local video was recovered by the system (not by the local participant)\n */\n callVideoRecoveredBySystem: string;\n\n /**\n * Mac OS specific message shown when system denies access to camera.\n */\n callMacOsCameraAccessDenied: string;\n\n /**\n * Mac OS specific message shown when system denies sharing local screen on a call.\n */\n callMacOsScreenShareAccessDenied: string;\n /**\n * Dimiss errorbar button aria label read by screen reader accessibility tools\n */\n dismissButtonAriaLabel?: string;\n\n /**\n * An error message when joining a call fails.\n */\n failedToJoinCallGeneric?: string;\n\n /**\n * An error message when joining a call fails specifically due to an invalid meeting link.\n */\n failedToJoinCallInvalidMeetingLink?: string;\n /**\n * Error bar string letting you know remote participants see a frozen stream for you.\n */\n cameraFrozenForRemoteParticipants?: string;\n /* @conditional-compile-remove(video-background-effects) */\n /**\n * Unable to start effect\n */\n unableToStartVideoEffect?: string;\n}\n\n/**\n * All errors that can be shown in the {@link ErrorBar}.\n *\n * @public\n */\nexport type ErrorType = keyof ErrorBarStrings;\n\n/**\n * Active error messages to be shown via {@link ErrorBar}.\n *\n * @public\n */\nexport interface ActiveErrorMessage {\n /**\n * Type of error that is active.\n */\n type: ErrorType;\n /**\n * The latest timestamp when this error was observed.\n *\n * When available, this is used to track errors that have already been seen and dismissed\n * by the user.\n */\n timestamp?: Date;\n}\n\n/**\n * A component to show error messages on the UI.\n * All strings that can be shown are accepted as the {@link ErrorBarProps.strings} so that they can be localized.\n * Active errors are selected by {@link ErrorBarProps.activeErrorMessages}.\n *\n * This component internally tracks dismissed by the user.\n * * Errors that have an associated timestamp: The error is shown on the UI again if it occurs after being dismissed.\n * * Errors that do not have a timestamp: The error is dismissed until it disappears from the props.\n * If the error recurs, it is shown in the UI.\n *\n * Uses {@link @fluentui/react#MessageBar} UI element.\n *\n * @public\n */\nexport const ErrorBar = (props: ErrorBarProps): JSX.Element => {\n const localeStrings = useLocale().strings.errorBar;\n const strings = props.strings ?? localeStrings;\n\n const trackDismissedErrorsInternally = !props.onDismissError;\n\n // Timestamp for when this comopnent is first mounted.\n // Never updated through the lifecycle of this component.\n const mountTimestamp = useRef(new Date(Date.now()));\n\n const [dismissedErrors, setDismissedErrors] = useState<DismissedError[]>([]);\n\n // dropDismissalsForInactiveErrors only returns a new object if `dismissedErrors` actually changes.\n // Without this behaviour, this `useEffect` block would cause a render loop.\n useEffect(() => {\n trackDismissedErrorsInternally &&\n setDismissedErrors(dropDismissalsForInactiveErrors(props.activeErrorMessages, dismissedErrors));\n }, [props.activeErrorMessages, dismissedErrors, trackDismissedErrorsInternally]);\n\n const toShow = errorsToShow(\n props.activeErrorMessages,\n dismissedErrors,\n props.ignorePremountErrors ? mountTimestamp.current : undefined\n );\n\n return (\n <Stack data-ui-id=\"error-bar-stack\">\n {toShow.map((error) => (\n <MessageBar\n {...props}\n styles={{\n innerText: {\n alignSelf: 'center'\n },\n icon: {\n height: 0\n },\n content: {\n lineHeight: 'inherit'\n },\n dismissal: {\n height: 0,\n paddingTop: '0.8rem'\n }\n }}\n key={error.type}\n messageBarType={messageBarType(error.type)}\n messageBarIconProps={messageBarIconProps(error.type)}\n onDismiss={() =>\n trackDismissedErrorsInternally\n ? setDismissedErrors(dismissError(dismissedErrors, error))\n : props.onDismissError?.(error)\n }\n dismissButtonAriaLabel={strings.dismissButtonAriaLabel}\n dismissIconProps={{ iconName: 'ErrorBarClear' }}\n >\n {strings[error.type]}\n </MessageBar>\n ))}\n </Stack>\n );\n};\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"FileCard.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/FileCard.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO;AACL,iDAAiD;AACjD,IAAI,EAIJ,WAAW,EACX,iBAAiB,EACjB,KAAK,EACL,IAAI,EACJ,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,mCAAgC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,kCAAkC,EAAE,MAAM,gBAAgB,CAAC;AAkCpE;;;GAGG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAe,EAAE;;IAC9D,MAAM,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC;IAChE,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAqB,SAAS,CAAC,CAAC;IACtF,MAAM,aAAa,GAAG,kCAAkC,EAAE,CAAC;IAC3D,MAAM,mBAAmB,GAAG,MAAA,MAAA,KAAK,CAAC,OAAO,0CAAE,SAAS,mCAAI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AE,OAAO,KAAK,CAAC,OAAO,CAAC,cAAc,IAAI,KAAK,CAAC,OAAO,CAAC,cAAc,EAAE;SACpF;QACD,WAAW,EAAE;YACX,MAAM,EAAE,QAAQ,CAAC,sBAAsB,CAAC;SACzC;KACF,CAAC;IAEF,OAAO,CACL,kDAAwB,IAAI;QAC1B,oBAAC,SAAS,IAAC,kBAAkB,EAAE,eAAe,EAAE,QAAQ,EAAE,QAAQ,GAAI;QACtE,oBAAC,KAAK,IACJ,SAAS,EAAE,kBAAkB,EAC7B,OAAO,EAAE,GAAG,EAAE;;gBACZ,MAAA,KAAK,CAAC,aAAa,qDAAI,CAAC;YAC1B,CAAC;YAED,oBAAC,KAAK,IAAC,UAAU,QAAC,eAAe,EAAC,eAAe,EAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,wBAAwB;gBAC1G,oBAAC,KAAK;oBAEJ,oBAAC,IAAI,kBACS,eAAe,EAC3B,QAAQ,EACN,oBAAoB,CAAC;4BACnB,SAAS,EAAE,aAAa;4BACxB,IAAI,EAAE,EAAE;4BACR,aAAa,EAAE,KAAK;yBACrB,CAAC,CAAC,QAAQ,GAEb,CACI;gBACR,oBAAC,KAAK,IAAC,SAAS,EAAE,0BAA0B;oBAC1C,oBAAC,IAAI,IAAC,SAAS,EAAE,qBAAqB,IAAG,QAAQ,CAAQ,CACnD;gBACR,oBAAC,KAAK,IAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,mBAAmB,IACzD,UAAU,IAAI,UAAU,CACnB,CACF;YACP,qBAAqB,IAAI,oBAAC,iBAAiB,IAAC,eAAe,EAAE,QAAQ,EAAE,MAAM,EAAE,uBAAuB,GAAI,CACrG,CACJ,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n // eslint-disable-next-line no-restricted-imports\n Icon,\n IProgressIndicatorStyleProps,\n IProgressIndicatorStyles,\n IStyleFunctionOrObject,\n mergeStyles,\n ProgressIndicator,\n Stack,\n Text,\n useTheme\n} from '@fluentui/react';\nimport { getFileTypeIconProps } from '@fluentui/react-file-type-icons';\nimport React from 'react';\nimport { _pxToRem } from '@internal/acs-ui-common';\nimport { Announcer } from './Announcer';\nimport { useEffect, useState } from 'react';\nimport { _FileUploadCardsStrings } from './FileUploadCards';\nimport { useLocaleFileCardStringsTrampoline } from './utils/common';\n\n/**\n * @internal\n * _FileCard Component Props.\n */\nexport interface _FileCardProps {\n /**\n * File name.\n */\n fileName: string;\n /**\n * Extension of the file used for rendering the file icon.\n */\n fileExtension: string;\n /**\n * File upload progress percentage between 0 and 1.\n * File transfer progress indicator is only shown when the value is greater than 0 and less than 1.\n */\n progress?: number;\n /**\n * Icon to display for actions like download, upload, etc. along the file name.\n */\n actionIcon?: JSX.Element;\n /**\n * Function that runs when actionIcon is clicked\n */\n actionHandler?: () => void;\n /**\n * Optional arialabel strings for file cards\n */\n strings?: _FileUploadCardsStrings;\n}\n\n/**\n * @internal\n * A component for displaying a file card with file icon and progress bar.\n */\nexport const _FileCard = (props: _FileCardProps): JSX.Element => {\n const { fileName, fileExtension, progress, actionIcon } = props;\n const theme = useTheme();\n const [announcerString, setAnnouncerString] = useState<string | undefined>(undefined);\n const localeStrings = useLocaleFileCardStringsTrampoline();\n const uploadStartedString = props.strings?.uploading ?? localeStrings.uploading;\n const uploadCompletedString = props.strings?.uploadCompleted ?? localeStrings.uploadCompleted;\n\n const showProgressIndicator = progress !== undefined && progress > 0 && progress < 1;\n\n useEffect(() => {\n if (showProgressIndicator) {\n setAnnouncerString(`${uploadStartedString} ${fileName}`);\n } else if (progress === 1) {\n setAnnouncerString(`${fileName} ${uploadCompletedString}`);\n } else {\n setAnnouncerString(undefined);\n }\n }, [progress, showProgressIndicator, fileName, uploadStartedString, uploadCompletedString]);\n\n const progressBarThicknessPx = 4;\n\n const containerClassName = mergeStyles({\n width: '12rem',\n background: theme.palette.neutralLighter,\n borderRadius: theme.effects.roundedCorner4,\n border: `${_pxToRem(1)} solid ${theme.palette.neutralQuaternary}`,\n cursor: 'pointer'\n });\n\n const fileInfoWrapperClassName = mergeStyles({\n padding: _pxToRem(12),\n // To make space for the progress indicator.\n paddingBottom: showProgressIndicator ? _pxToRem(12 - progressBarThicknessPx * 2) : _pxToRem(12)\n });\n\n const fileNameContainerClassName = mergeStyles({\n paddingLeft: _pxToRem(4),\n minWidth: '75%',\n maxWidth: '75%'\n });\n\n const fileNameTextClassName = mergeStyles({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n lineHeight: 'normal',\n whiteSpace: 'nowrap',\n paddingRight: _pxToRem(4)\n });\n\n const actionIconClassName = mergeStyles({\n cursor: 'pointer'\n });\n\n const progressIndicatorStyles: IStyleFunctionOrObject<IProgressIndicatorStyleProps, IProgressIndicatorStyles> = {\n itemProgress: {\n padding: `${_pxToRem(progressBarThicknessPx - 1)} 0`, // item progress height won't apply without an explicit padding\n // To make the progress indicator border curve along the bottom of file card.\n borderRadius: `0 0 ${theme.effects.roundedCorner4} ${theme.effects.roundedCorner4}`\n },\n progressBar: {\n height: _pxToRem(progressBarThicknessPx)\n }\n };\n\n return (\n <div data-is-focusable={true}>\n <Announcer announcementString={announcerString} ariaLive={'polite'} />\n <Stack\n className={containerClassName}\n onClick={() => {\n props.actionHandler?.();\n }}\n >\n <Stack horizontal horizontalAlign=\"space-between\" verticalAlign=\"center\" className={fileInfoWrapperClassName}>\n <Stack>\n {/* We are not using <ChatCompositeIcon /> here as we currently do not support customizing these filetype icons. */}\n <Icon\n data-ui-id={'filetype-icon'}\n iconName={\n getFileTypeIconProps({\n extension: fileExtension,\n size: 24,\n imageFileType: 'svg'\n }).iconName\n }\n />\n </Stack>\n <Stack className={fileNameContainerClassName}>\n <Text className={fileNameTextClassName}>{fileName}</Text>\n </Stack>\n <Stack verticalAlign=\"center\" className={actionIconClassName}>\n {actionIcon && actionIcon}\n </Stack>\n </Stack>\n {showProgressIndicator && <ProgressIndicator percentComplete={progress} styles={progressIndicatorStyles} />}\n </Stack>\n </div>\n );\n};\n\"../../../acs-ui-common/src\""]}
|
@@ -14,6 +14,8 @@ export interface LocalVideoCameraCycleButtonProps {
|
|
14
14
|
label?: string;
|
15
15
|
/** description for local video camera switcher */
|
16
16
|
ariaDescription?: string;
|
17
|
+
/** control to enable large button mode */
|
18
|
+
size?: 'small' | 'large';
|
17
19
|
}
|
18
20
|
/**
|
19
21
|
* local video tile camera cycle button - for use on mobile screens only.
|
@@ -8,9 +8,9 @@ import { localVideoCameraCycleButtonStyles } from './styles/VideoGallery.styles'
|
|
8
8
|
* @internal
|
9
9
|
*/
|
10
10
|
export const LocalVideoCameraCycleButton = (props) => {
|
11
|
-
const { cameras, selectedCamera, onSelectCamera, label, ariaDescription } = props;
|
11
|
+
const { cameras, selectedCamera, onSelectCamera, label, ariaDescription, size } = props;
|
12
12
|
const theme = useTheme();
|
13
|
-
return (React.createElement(IconButton, { "data-ui-id": 'local-camera-switcher-button', styles: localVideoCameraCycleButtonStyles(theme), iconProps: { iconName: 'LocalCameraSwitch' }, ariaLabel: label, ariaDescription: ariaDescription, "aria-live": 'polite', onClick: () => {
|
13
|
+
return (React.createElement(IconButton, { "data-ui-id": 'local-camera-switcher-button', styles: localVideoCameraCycleButtonStyles(theme, size), iconProps: { iconName: 'LocalCameraSwitch' }, ariaLabel: label, ariaDescription: ariaDescription, "aria-live": 'polite', onClick: () => {
|
14
14
|
if (cameras && cameras.length > 1 && selectedCamera !== undefined) {
|
15
15
|
const index = cameras.findIndex((camera) => selectedCamera.id === camera.id);
|
16
16
|
const newCamera = cameras[(index + 1) % cameras.length];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LocalVideoCameraButton.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/LocalVideoCameraButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;
|
1
|
+
{"version":3,"file":"LocalVideoCameraButton.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/LocalVideoCameraButton.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACvD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,iCAAiC,EAAE,MAAM,8BAA8B,CAAC;AAoBjF;;;GAGG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,KAAuC,EAAe,EAAE;IAClG,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACxF,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IAEzB,OAAO,CACL,oBAAC,UAAU,kBACG,8BAA8B,EAC1C,MAAM,EAAE,iCAAiC,CAAC,KAAK,EAAE,IAAI,CAAC,EACtD,SAAS,EAAE,EAAE,QAAQ,EAAE,mBAAmB,EAAE,EAC5C,SAAS,EAAE,KAAK,EAChB,eAAe,EAAE,eAAe,eACrB,QAAQ,EACnB,OAAO,EAAE,GAAG,EAAE;YACZ,IAAI,OAAO,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,IAAI,cAAc,KAAK,SAAS,EAAE;gBACjE,MAAM,KAAK,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC;gBAC7E,MAAM,SAAS,GAAG,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;gBACxD,IAAI,cAAc,KAAK,SAAS,EAAE;oBAChC,cAAc,CAAC,SAAS,CAAC,CAAC;iBAC3B;aACF;QACH,CAAC,GACD,CACH,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IconButton, useTheme } from '@fluentui/react';\nimport React from 'react';\nimport { OptionsDevice } from './DevicesButton';\nimport { localVideoCameraCycleButtonStyles } from './styles/VideoGallery.styles';\n\n/**\n * @public\n */\nexport interface LocalVideoCameraCycleButtonProps {\n /** Array of cameras available to the user. */\n cameras?: OptionsDevice[];\n /** Currently selected camera in the local video stream. */\n selectedCamera?: OptionsDevice;\n /** callback function to change video feed. */\n onSelectCamera?: (device: OptionsDevice) => Promise<void>;\n /** label for local video camera switcher */\n label?: string;\n /** description for local video camera switcher */\n ariaDescription?: string;\n /** control to enable large button mode */\n size?: 'small' | 'large';\n}\n\n/**\n * local video tile camera cycle button - for use on mobile screens only.\n * @internal\n */\nexport const LocalVideoCameraCycleButton = (props: LocalVideoCameraCycleButtonProps): JSX.Element => {\n const { cameras, selectedCamera, onSelectCamera, label, ariaDescription, size } = props;\n const theme = useTheme();\n\n return (\n <IconButton\n data-ui-id={'local-camera-switcher-button'}\n styles={localVideoCameraCycleButtonStyles(theme, size)}\n iconProps={{ iconName: 'LocalCameraSwitch' }}\n ariaLabel={label}\n ariaDescription={ariaDescription}\n aria-live={'polite'}\n onClick={() => {\n if (cameras && cameras.length > 1 && selectedCamera !== undefined) {\n const index = cameras.findIndex((camera) => selectedCamera.id === camera.id);\n const newCamera = cameras[(index + 1) % cameras.length];\n if (onSelectCamera !== undefined) {\n onSelectCamera(newCamera);\n }\n }\n }}\n />\n );\n};\n"]}
|
@@ -10,7 +10,7 @@ import { RaisedHand } from '../types';
|
|
10
10
|
*/
|
11
11
|
export declare const _LocalVideoTile: React.MemoExoticComponent<(props: {
|
12
12
|
userId?: string | undefined;
|
13
|
-
onCreateLocalStreamView?: ((options?: VideoStreamOptions
|
13
|
+
onCreateLocalStreamView?: ((options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>) | undefined;
|
14
14
|
onDisposeLocalStreamView?: (() => void) | undefined;
|
15
15
|
isAvailable?: boolean | undefined;
|
16
16
|
isMuted?: boolean | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ModalClone.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/ModalClone/ModalClone.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,qCAAqC;AACrC,sDAAsD;AACtD,qEAAqE;AACrE,sEAAsE;AACtE,uDAAuD;AAEvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC9G,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,IAAI,EAOJ,QAAQ,EACR,KAAK,EACL,eAAe,EACf,WAAW,EACX,EAAE,EACF,OAAO,EACP,KAAK,EACL,cAAc,EACd,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAU5D,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,cAAc,CAAC;AAsB5D,MAAM,IAAI,GAAkB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAE3C,MAAM,aAAa,GAAkC;IACnD,MAAM,EAAE,KAAK;IACb,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE,EAAE;IACb,kBAAkB,EAAE,EAAE;IACtB,wBAAwB,EAAE,IAAI;CAC/B,CAAC;AAEF,MAAM,kBAAkB,GAAG,kBAAkB,EAAkC,CAAC;AAEhF,MAAM,YAAY,GAAG,CAAC,E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AAC,SAAS;aAChD;YACD,cAAc;gBACZ,OAAO,iBAAiB,KAAK,QAAQ;gBACrC,aAAa,IAAI;gBACf,GAAG,EAAE,iBAAiB;aACvB;YACH,mBAAmB,IAAI;gBACrB,MAAM,EAAE,MAAM;aACf;YACD,kBAAkB;SACnB;QACD,iBAAiB,EAAE;YACjB,UAAU,CAAC,iBAAiB;YAC5B;gBACE,SAAS,EAAE,MAAM;gBACjB,QAAQ,EAAE,CAAC;gBACX,SAAS,EAAE,OAAO;gBAClB,SAAS,EAAE;oBACT,CAAC,+CAA+C,CAAC,EAAE;wBACjD,SAAS,EAAE,iBAAiB;qBAC7B;iBACF;aACF;YACD,0BAA0B;SAC3B;QACD,KAAK,EAAE,UAAU,IAAI;YACnB,cAAc;YACd,UAAU,CAAC,KAAK;YAChB;gBACE,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,OAAO;gBACd,MAAM,EAAE,OAAO;aAChB;SACF;QACD,yBAAyB,EAAE;YACzB,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,QAAQ;YACxB,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,SAAS;SACnB;QACD,gBAAgB,EAAE;YAChB,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,QAAQ;YACnC,KAAK,EAAE,MAAM;SACd;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB;AAChB,MAAM,CAAC,MAAM,WAAW,GAAkD,MAAM,CAI9E,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE;IACjC,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,0BAA0B,CAAC;CACxD,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAG,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable react/prop-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport * as React from 'react';\nimport { useBoolean, useMergedRefs, useConst, useSetTimeout, useId, useUnmount } from '@fluentui/react-hooks';\nimport {\n allowOverscrollOnElement,\n allowScrollOnElement,\n AnimationVariables,\n classNamesFunction,\n DirectionalHint,\n elementContains,\n EventGroup,\n FocusTrapZone,\n getGlobalClassNames,\n getPropsWithDefaults,\n Icon,\n IDragOptions,\n IFocusTrapZone,\n ILayerProps,\n IModalProps,\n IModalStyleProps,\n IModalStyles,\n KeyCodes,\n Layer,\n memoizeFunction,\n mergeStyles,\n on,\n Overlay,\n Popup,\n ResponsiveMode,\n styled,\n useResponsiveMode,\n ZIndexes\n} from '@fluentui/react';\nimport { useWindow } from '@fluentui/react-window-provider';\n\n// @TODO - need to change this to a panel whenever the breakpoint is under medium (verify the spec)\n\n/** @internal */\nexport interface _ExtendedIModalProps extends IModalProps {\n minDragPosition?: _ICoordinates;\n maxDragPosition?: _ICoordinates;\n}\n\nconst animationDuration = AnimationVariables.durationValue2;\n/** @internal */\nexport type _ICoordinates = { x: number; y: number };\n\ninterface IModalInternalState {\n onModalCloseTimer: number;\n allowTouchBodyScroll?: boolean;\n scrollableContent: HTMLDivElement | null;\n lastSetCoordinates: _ICoordinates;\n /** Minimum clamped position, if dragging and clamping (`dragOptions.keepInBounds`) are enabled */\n minPosition?: _ICoordinates;\n /** Maximum clamped position, if dragging and clamping (`dragOptions.keepInBounds`) are enabled */\n maxPosition?: _ICoordinates;\n events: EventGroup;\n /** Ensures we dispose the same keydown callback as was registered */\n disposeOnKeyDown?: () => void;\n /** Ensures we dispose the same keyup callback as was registered (also tracks whether keyup has been registered) */\n disposeOnKeyUp?: () => void;\n isInKeyboardMoveMode?: boolean;\n hasBeenOpened?: boolean;\n}\n\nconst ZERO: _ICoordinates = { x: 0, y: 0 };\n\nconst DEFAULT_PROPS: Partial<_ExtendedIModalProps> = {\n isOpen: false,\n isDarkOverlay: true,\n className: '',\n containerClassName: '',\n enableAriaHiddenSiblings: true\n};\n\nconst getModalClassNames = classNamesFunction<IModalStyleProps, IModalStyles>();\n\nconst getMoveDelta = (ev: React.KeyboardEvent<HTMLElement>): number => {\n let delta = 10;\n if (ev.shiftKey) {\n if (!ev.ctrlKey) {\n delta = 50;\n }\n } else if (ev.ctrlKey) {\n delta = 1;\n }\n\n return delta;\n};\n\nconst useComponentRef = (props: IModalProps, focusTrapZone: React.RefObject<IFocusTrapZone>) => {\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n focus() {\n if (focusTrapZone.current) {\n focusTrapZone.current.focus();\n }\n }\n }),\n [focusTrapZone]\n );\n};\n\nconst ModalBase: React.FunctionComponent<_ExtendedIModalProps> = React.forwardRef<HTMLDivElement, _ExtendedIModalProps>(\n (propsWithoutDefaults, ref) => {\n const props = getPropsWithDefaults(DEFAULT_PROPS, propsWithoutDefaults);\n const {\n allowTouchBodyScroll,\n className,\n children,\n containerClassName,\n scrollableContentClassName,\n elementToFocusOnDismiss,\n firstFocusableSelector,\n forceFocusInsideTrap,\n ignoreExternalFocusing,\n isBlocking,\n isAlert,\n isClickableOutsideFocusTrap,\n isDarkOverlay,\n onDismiss,\n layerProps,\n overlay,\n isOpen,\n titleAriaId,\n styles,\n subtitleAriaId,\n theme,\n topOffsetFixed,\n responsiveMode,\n onLayerDidMount,\n isModeless,\n dragOptions,\n onDismissed,\n minDragPosition,\n maxDragPosition\n } = props;\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const focusTrapZone = React.useRef<IFocusTrapZone>(null);\n const focusTrapZoneElm = React.useRef<HTMLDivElement>(null);\n const mergedRef = useMergedRefs(rootRef, ref);\n\n const modalResponsiveMode = useResponsiveMode(mergedRef);\n\n const focusTrapZoneId = useId('ModalFocusTrapZone');\n\n const win = useWindow();\n\n const { setTimeout, clearTimeout } = useSetTimeout();\n\n const [isModalOpen, setIsModalOpen] = React.useState(isOpen);\n const [isVisible, setIsVisible] = React.useState(isOpen);\n const [coordinates, setCoordinates] = React.useState<_ICoordinates>(ZERO);\n const [modalRectangleTop, setModalRectangleTop] = React.useState<number | undefined>();\n\n const [isModalMenuOpen, { toggle: toggleModalMenuOpen, setFalse: setModalMenuClose }] = useBoolean(false);\n\n const internalState = useConst<IModalInternalState>(() => ({\n onModalCloseTimer: 0,\n allowTouchBodyScroll,\n scrollableContent: null,\n lastSetCoordinates: ZERO,\n events: new EventGroup({})\n }));\n\n const { keepInBounds } = dragOptions || ({} as IDragOptions);\n const isAlertRole = isAlert ?? (isBlocking && !isModeless);\n\n const layerClassName = layerProps === undefined ? '' : layerProps.className;\n const classNames = getModalClassNames(styles, {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n theme: theme!,\n className,\n containerClassName,\n scrollableContentClassName,\n isOpen,\n isVisible,\n hasBeenOpened: internalState.hasBeenOpened,\n modalRectangleTop,\n topOffsetFixed,\n isModeless,\n layerClassName,\n windowInnerHeight: win?.innerHeight,\n isDefaultDragHandle: dragOptions && !dragOptions.dragHandleSelector\n });\n\n const mergedLayerProps: ILayerProps = {\n eventBubblingEnabled: false,\n ...layerProps,\n onLayerDidMount: layerProps && layerProps.onLayerDidMount ? layerProps.onLayerDidMount : onLayerDidMount,\n insertFirst: isModeless,\n className: classNames.layer\n };\n\n // Allow the user to scroll within the modal but not on the body\n const allowScrollOnModal = React.useCallback(\n (elt: HTMLDivElement | null): void => {\n if (elt) {\n if (internalState.allowTouchBodyScroll) {\n allowOverscrollOnElement(elt, internalState.events);\n } else {\n allowScrollOnElement(elt, internalState.events);\n }\n } else {\n internalState.events.off(internalState.scrollableContent);\n }\n internalState.scrollableContent = elt;\n },\n [internalState]\n );\n\n const registerInitialModalPosition = (): void => {\n const dialogMain = focusTrapZoneElm.current;\n const modalRectangle = dialogMain?.getBoundingClientRect();\n\n if (modalRectangle) {\n if (topOffsetFixed) {\n setModalRectangleTop(modalRectangle.top);\n }\n\n if (keepInBounds) {\n // x/y are unavailable in IE, so use the equivalent left/top\n internalState.minPosition = minDragPosition ?? { x: -modalRectangle.left, y: -modalRectangle.top };\n internalState.maxPosition = maxDragPosition ?? { x: modalRectangle.left, y: modalRectangle.top };\n\n // Make sure the initial co-ordinates are within clamp bounds.\n setCoordinates({\n x: getClampedAxis('x', coordinates.x),\n y: getClampedAxis('y', coordinates.y)\n });\n }\n }\n };\n\n /**\n * Clamps an axis to a specified min and max position.\n *\n * @param axis A string that represents the axis (x/y).\n * @param position The position on the axis.\n */\n const getClampedAxis = React.useCallback(\n (axis: keyof _ICoordinates, position: number) => {\n const { minPosition, maxPosition } = internalState;\n if (keepInBounds && minPosition && maxPosition) {\n position = Math.max(minPosition[axis], position);\n position = Math.min(maxPosition[axis], position);\n }\n return position;\n },\n [keepInBounds, internalState]\n );\n\n const handleModalClose = (): void => {\n internalState.lastSetCoordinates = ZERO;\n\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = false;\n setIsModalOpen(false);\n setCoordinates(ZERO);\n\n internalState.disposeOnKeyUp?.();\n\n onDismissed?.();\n };\n\n const handleDragStart = React.useCallback((): void => {\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = false;\n }, [internalState, setModalMenuClose]);\n\n const handleDrag = React.useCallback(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (ev: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: any): void => {\n setCoordinates((prevValue) => ({\n x: getClampedAxis('x', prevValue.x + dragData.delta.x),\n y: getClampedAxis('y', prevValue.y + dragData.delta.y)\n }));\n },\n [getClampedAxis]\n );\n\n const handleDragStop = React.useCallback((): void => {\n if (focusTrapZone.current) {\n focusTrapZone.current.focus();\n }\n }, []);\n\n const handleEnterKeyboardMoveMode = () => {\n // We need a global handleKeyDown event when we are in the move mode so that we can\n // handle the key presses and the components inside the modal do not get the events\n const handleKeyDown = (ev: React.KeyboardEvent<HTMLElement>): void => {\n if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) {\n // CTRL + ALT + SPACE is handled during keyUp\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n const newLocal = ev.altKey || ev.keyCode === KeyCodes.escape;\n if (isModalMenuOpen && newLocal) {\n setModalMenuClose();\n }\n\n if (internalState.isInKeyboardMoveMode && (ev.keyCode === KeyCodes.escape || ev.keyCode === KeyCodes.enter)) {\n internalState.isInKeyboardMoveMode = false;\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n if (internalState.isInKeyboardMoveMode) {\n let handledEvent = true;\n const delta = getMoveDelta(ev);\n\n switch (ev.keyCode) {\n /* eslint-disable no-fallthrough */\n case KeyCodes.escape:\n setCoordinates(internalState.lastSetCoordinates);\n case KeyCodes.enter: {\n // TODO: determine if fallthrough was intentional\n /* eslint-enable no-fallthrough */\n internalState.lastSetCoordinates = ZERO;\n // setIsInKeyboardMoveMode(false);\n break;\n }\n case KeyCodes.up: {\n setCoordinates((prevValue) => ({ x: prevValue.x, y: getClampedAxis('y', prevValue.y - delta) }));\n break;\n }\n case KeyCodes.down: {\n setCoordinates((prevValue) => ({ x: prevValue.x, y: getClampedAxis('y', prevValue.y + delta) }));\n break;\n }\n case KeyCodes.left: {\n setCoordinates((prevValue) => ({ x: getClampedAxis('x', prevValue.x - delta), y: prevValue.y }));\n break;\n }\n case KeyCodes.right: {\n setCoordinates((prevValue) => ({ x: getClampedAxis('x', prevValue.x + delta), y: prevValue.y }));\n break;\n }\n default: {\n handledEvent = false;\n }\n }\n if (handledEvent) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n }\n };\n\n internalState.lastSetCoordinates = coordinates;\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = true;\n\n internalState.events.on(win, 'keydown', handleKeyDown, true /* useCapture */);\n internalState.disposeOnKeyDown = () => {\n internalState.events.off(win, 'keydown', handleKeyDown, true /* useCapture */);\n internalState.disposeOnKeyDown = undefined;\n };\n };\n\n const handleExitKeyboardMoveMode = () => {\n internalState.lastSetCoordinates = ZERO;\n internalState.isInKeyboardMoveMode = false;\n internalState.disposeOnKeyDown?.();\n };\n\n const registerForKeyUp = (): void => {\n const handleKeyUp = (ev: React.KeyboardEvent<HTMLElement>): void => {\n // Needs to handle the CTRL + ALT + SPACE key during keyup due to FireFox bug:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143\n if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) {\n if (elementContains(internalState.scrollableContent, ev.target as HTMLElement)) {\n toggleModalMenuOpen();\n ev.preventDefault();\n ev.stopPropagation();\n }\n }\n };\n\n if (!internalState.disposeOnKeyUp) {\n internalState.events.on(win, 'keyup', handleKeyUp, true /* useCapture */);\n internalState.disposeOnKeyUp = () => {\n internalState.events.off(win, 'keyup', handleKeyUp, true /* useCapture */);\n internalState.disposeOnKeyUp = undefined;\n };\n }\n };\n\n React.useEffect(() => {\n clearTimeout(internalState.onModalCloseTimer);\n // Opening the dialog\n if (isOpen) {\n // This must be done after the modal content has rendered\n requestAnimationFrame(() => setTimeout(registerInitialModalPosition, 0));\n\n setIsModalOpen(true);\n\n // Add a keyUp handler for all key up events once the dialog is open.\n if (dragOptions) {\n registerForKeyUp();\n }\n\n internalState.hasBeenOpened = true;\n setIsVisible(true);\n }\n\n // Closing the dialog\n if (!isOpen && isModalOpen) {\n internalState.onModalCloseTimer = setTimeout(handleModalClose, parseFloat(animationDuration) * 1000);\n setIsVisible(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- should only run if isModalOpen or isOpen mutates or if min/max drag bounds are updated.\n }, [isModalOpen, isOpen, minDragPosition, maxDragPosition]);\n\n useUnmount(() => {\n internalState.events.dispose();\n });\n\n useComponentRef(props, focusTrapZone);\n\n const modalContent = (\n <FocusTrapZone\n disabled={true}\n id={focusTrapZoneId}\n ref={focusTrapZoneElm}\n componentRef={focusTrapZone}\n className={classNames.main}\n elementToFocusOnDismiss={elementToFocusOnDismiss}\n isClickableOutsideFocusTrap={isModeless || isClickableOutsideFocusTrap || !isBlocking}\n ignoreExternalFocusing={ignoreExternalFocusing}\n forceFocusInsideTrap={forceFocusInsideTrap && !isModeless}\n firstFocusableSelector={firstFocusableSelector}\n focusPreviouslyFocusedInnerElement\n onBlur={internalState.isInKeyboardMoveMode ? handleExitKeyboardMoveMode : undefined}\n data-ui-id={props['data-ui-id']}\n // enableAriaHiddenSiblings is handled by the Popup\n >\n {dragOptions && internalState.isInKeyboardMoveMode && (\n <div className={classNames.keyboardMoveIconContainer}>\n {dragOptions.keyboardMoveIconProps ? (\n <Icon {...dragOptions.keyboardMoveIconProps} />\n ) : (\n <Icon iconName=\"move\" className={classNames.keyboardMoveIcon} />\n )}\n </div>\n )}\n <div ref={allowScrollOnModal} className={classNames.scrollableContent} data-is-scrollable>\n {dragOptions && isModalMenuOpen && (\n <dragOptions.menu\n items={[\n { key: 'move', text: dragOptions.moveMenuItemText, onClick: handleEnterKeyboardMoveMode },\n { key: 'close', text: dragOptions.closeMenuItemText, onClick: handleModalClose }\n ]}\n onDismiss={setModalMenuClose}\n alignTargetEdge\n coverTarget\n directionalHint={DirectionalHint.topLeftEdge}\n directionalHintFixed\n shouldFocusOnMount\n target={internalState.scrollableContent}\n />\n )}\n {children}\n </div>\n </FocusTrapZone>\n );\n\n return (\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n (isModalOpen && modalResponsiveMode! >= (responsiveMode || ResponsiveMode.small) && (\n <Layer ref={mergedRef} {...mergedLayerProps}>\n <Popup\n role={isAlertRole ? 'alertdialog' : 'dialog'}\n ariaLabelledBy={titleAriaId}\n ariaDescribedBy={subtitleAriaId}\n // onDismiss={onDismiss}\n shouldRestoreFocus={!ignoreExternalFocusing}\n // Modeless modals shouldn't hide siblings.\n // Popup will automatically handle this based on the aria-modal setting.\n // enableAriaHiddenSiblings={enableAriaHiddenSiblings}\n aria-modal={!isModeless}\n >\n <div className={classNames.root} role={!isModeless ? 'document' : undefined}>\n {!isModeless && (\n <Overlay\n aria-hidden={true}\n isDarkThemed={isDarkOverlay}\n onClick={isBlocking ? undefined : onDismiss}\n allowTouchBodyScroll={allowTouchBodyScroll}\n {...overlay}\n />\n )}\n {dragOptions ? (\n <DraggableZone\n handleSelector={dragOptions.dragHandleSelector || `#${focusTrapZoneId}`}\n preventDragSelector=\"button\"\n onStart={handleDragStart}\n onDragChange={handleDrag}\n onStop={handleDragStop}\n position={coordinates}\n >\n {modalContent}\n </DraggableZone>\n ) : (\n modalContent\n )}\n </div>\n </Popup>\n </Layer>\n )) ||\n null\n );\n }\n);\nModalBase.displayName = 'ModalBase';\n\ninterface IDraggableZoneStyles {\n root: string;\n}\n\nconst getDraggableZoneClassNames = memoizeFunction((className: string, isDragging: boolean): IDraggableZoneStyles => {\n return {\n root: mergeStyles(\n className,\n isDragging && {\n touchAction: 'none',\n selectors: {\n '& *': {\n userSelect: 'none'\n }\n }\n }\n )\n };\n});\n\ninterface IDragData {\n position: _ICoordinates;\n lastPosition?: _ICoordinates;\n delta: _ICoordinates;\n}\n\ninterface IDraggableZoneProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Specifies a selector to be used as the handle that initiates drag\n */\n handleSelector?: string;\n\n /**\n * Specifies a selector to be used to prevent drag initialization.\n * For example, if you do not want buttons inside of your handleSelector\n * to have the cursor change to move or to allow users to select from buttons,\n * you could pass button here (the close button in the header of a dialog is a concrete example)\n */\n preventDragSelector?: string;\n\n /**\n * the X and Y coordinates to use as an offest to position the draggable content\n */\n position?: _ICoordinates;\n\n /**\n * Callback for when dragging starts\n */\n onStart?: (event: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: IDragData) => void;\n\n /**\n * Callback for when the drag changes, while dragging\n */\n onDragChange?: (event: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: IDragData) => void;\n\n /**\n * Callback for when dragging stops\n */\n onStop?: (event: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: IDragData) => void;\n}\n\ninterface IDraggableZoneState {\n isDragging: boolean;\n position: _ICoordinates;\n lastPosition?: _ICoordinates;\n}\n\nconst eventMapping = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// These are needed so that we can generalize the events\n// and so we have access to clientX and clientY in the touch events\ntype MouseTouchEvent<T> = React.MouseEvent<T> & React.TouchEvent<T> & Event;\n\nclass DraggableZone extends React.Component<IDraggableZoneProps, IDraggableZoneState> {\n private _touchId?: number;\n private _currentEventType = eventMapping.mouse;\n private _events: (() => void)[] = [];\n\n constructor(props: IDraggableZoneProps) {\n super(props);\n\n this.state = {\n isDragging: false,\n position: this.props.position || { x: 0, y: 0 },\n lastPosition: undefined\n };\n }\n\n public componentDidUpdate(prevProps: IDraggableZoneProps) {\n if (this.props.position && (!prevProps.position || this.props.position !== prevProps.position)) {\n this.setState({ position: this.props.position });\n }\n }\n\n public componentWillUnmount() {\n this._events.forEach((dispose) => dispose());\n }\n\n public render() {\n const child: any = React.Children.only(this.props.children);\n const { props } = child;\n const { position } = this.props;\n const { position: statePosition, isDragging } = this.state;\n let x = statePosition.x;\n let y = statePosition.y;\n\n if (position && !isDragging) {\n x = position.x;\n y = position.y;\n }\n\n return React.cloneElement(child, {\n style: {\n ...props.style,\n transform: `translate(${x}px, ${y}px)`\n },\n className: getDraggableZoneClassNames(props.className, this.state.isDragging).root,\n onMouseDown: this._onMouseDown,\n onMouseUp: this._onMouseUp,\n onTouchStart: this._onTouchStart,\n onTouchEnd: this._onTouchEnd\n });\n }\n\n private _onMouseDown = (event: MouseTouchEvent<HTMLElement>) => {\n const onMouseDown = (React.Children.only(this.props.children) as any).props.onMouseDown;\n if (onMouseDown) {\n onMouseDown(event);\n }\n\n this._currentEventType = eventMapping.mouse;\n return this._onDragStart(event);\n };\n\n private _onMouseUp = (event: MouseTouchEvent<HTMLElement>) => {\n const onMouseUp = (React.Children.only(this.props.children) as any).props.onMouseUp;\n if (onMouseUp) {\n onMouseUp(event);\n }\n\n this._currentEventType = eventMapping.mouse;\n return this._onDragStop(event);\n };\n\n private _onTouchStart = (event: MouseTouchEvent<HTMLElement>) => {\n const onTouchStart = (React.Children.only(this.props.children) as any).props.onTouchStart;\n if (onTouchStart) {\n onTouchStart(event);\n }\n\n this._currentEventType = eventMapping.touch;\n return this._onDragStart(event);\n };\n\n private _onTouchEnd = (event: MouseTouchEvent<HTMLElement>) => {\n const onTouchEnd = (React.Children.only(this.props.children) as any).props.onTouchEnd;\n if (onTouchEnd) {\n onTouchEnd(event);\n }\n\n this._currentEventType = eventMapping.touch;\n this._onDragStop(event);\n };\n\n private _onDragStart = (event: MouseTouchEvent<HTMLElement>) => {\n // Only handle left click for dragging\n if (typeof event.button === 'number' && event.button !== 0) {\n return false;\n }\n\n // If the target doesn't match the handleSelector OR\n // if the target does match the preventDragSelector, bail out\n if (\n (this.props.handleSelector && !this._matchesSelector(event.target as HTMLElement, this.props.handleSelector)) ||\n (this.props.preventDragSelector &&\n this._matchesSelector(event.target as HTMLElement, this.props.preventDragSelector))\n ) {\n return;\n }\n\n // Remember the touch identifier if this is a touch event so we can\n // distinguish between individual touches in multitouch scenarios\n // by remembering which touch point we were given\n this._touchId = this._getTouchId(event);\n\n const position = this._getControlPosition(event);\n if (position === undefined) {\n return;\n }\n\n const dragData = this._createDragDataFromPosition(position);\n this.props.onStart && this.props.onStart(event, dragData);\n\n this.setState({\n isDragging: true,\n lastPosition: position\n });\n\n // hook up the appropriate mouse/touch events to the body to ensure\n // smooth dragging\n this._events = [\n on(document.body, this._currentEventType.move, this._onDrag, true /* use capture phase */),\n on(document.body, this._currentEventType.stop, this._onDragStop, true /* use capture phase */)\n ];\n\n return;\n };\n\n private _onDrag = (event: any) => {\n // Prevent scrolling on mobile devices\n if (event.type === 'touchmove') {\n event.preventDefault();\n }\n\n const position = this._getControlPosition(event);\n if (!position) {\n return;\n }\n\n // create the updated drag data from the position data\n const updatedData = this._createUpdatedDragData(this._createDragDataFromPosition(position));\n const updatedPosition = updatedData.position;\n\n this.props.onDragChange && this.props.onDragChange(event, updatedData);\n\n this.setState({\n position: updatedPosition,\n lastPosition: position\n });\n };\n\n private _onDragStop = (event: any) => {\n if (!this.state.isDragging) {\n return;\n }\n\n const position = this._getControlPosition(event);\n if (!position) {\n return;\n }\n\n const baseDragData = this._createDragDataFromPosition(position);\n\n // Set dragging to false and reset the lastPosition\n this.setState({\n isDragging: false,\n lastPosition: undefined\n });\n\n this.props.onStop && this.props.onStop(event, baseDragData);\n\n if (this.props.position) {\n this.setState({\n position: this.props.position\n });\n }\n\n // Remove event handlers\n this._events.forEach((dispose) => dispose());\n };\n\n /**\n * Get the control position based off the event that fired\n * @param event - The event to get offsets from\n */\n private _getControlPosition(event: MouseTouchEvent<HTMLElement>): _ICoordinates | undefined {\n const touchObj = this._getActiveTouch(event);\n\n // did we get the right touch?\n if (this._touchId !== undefined && !touchObj) {\n return undefined;\n }\n\n const eventToGetOffset = touchObj || event;\n return {\n x: eventToGetOffset.clientX,\n y: eventToGetOffset.clientY\n };\n }\n\n /**\n * Get the active touch point that we have saved from the event's TouchList\n * @param event - The event used to get the TouchList for the active touch point\n */\n private _getActiveTouch(event: MouseTouchEvent<HTMLElement>): React.Touch | undefined {\n return (\n (event.targetTouches && this._findTouchInTouchList(event.targetTouches)) ||\n (event.changedTouches && this._findTouchInTouchList(event.changedTouches))\n );\n }\n\n /**\n * Get the initial touch identifier associated with the given event\n * @param event - The event that contains the TouchList\n */\n private _getTouchId(event: MouseTouchEvent<HTMLElement>): number | undefined {\n const touch: React.Touch | undefined =\n (event.targetTouches && event.targetTouches[0]) || (event.changedTouches && event.changedTouches[0]);\n\n if (touch) {\n return touch.identifier;\n }\n\n return;\n }\n\n /**\n * Returns if an element (or any of the element's parents) match the given selector\n */\n private _matchesSelector(element: HTMLElement | null, selector: string): boolean {\n if (!element || element === document.body) {\n return false;\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n const matchesSelectorFn: Function =\n element.matches || element.webkitMatchesSelector || (element as any).msMatchesSelector; /* for IE */\n\n if (!matchesSelectorFn) {\n return false;\n }\n\n return matchesSelectorFn.call(element, selector) || this._matchesSelector(element.parentElement, selector);\n }\n\n /**\n * Attempts to find the Touch that matches the identifier we stored in dragStart\n * @param touchList The TouchList to look for the stored identifier from dragStart\n */\n private _findTouchInTouchList(touchList: React.TouchList): React.Touch | undefined {\n if (this._touchId === undefined) {\n return;\n }\n\n for (let i = 0; i < touchList.length; i++) {\n if (touchList[i].identifier === this._touchId) {\n return touchList[i];\n }\n }\n\n return undefined;\n }\n\n /**\n * Create DragData based off of the last known position and the new position passed in\n * @param position The new position as part of the drag\n */\n private _createDragDataFromPosition(position: _ICoordinates): IDragData {\n const { lastPosition } = this.state;\n\n // If we have no lastPosition, use the given position\n // for last position\n if (lastPosition === undefined) {\n return {\n delta: { x: 0, y: 0 },\n lastPosition: position,\n position\n };\n }\n\n return {\n delta: {\n x: position.x - lastPosition.x,\n y: position.y - lastPosition.y\n },\n lastPosition,\n position\n };\n }\n\n /**\n * Creates an updated DragData based off the current position and given baseDragData\n * @param baseDragData The base DragData (from _createDragDataFromPosition) used to calculate the updated positions\n */\n private _createUpdatedDragData(baseDragData: IDragData): IDragData {\n const { position } = this.state;\n return {\n position: {\n x: position.x + baseDragData.delta.x,\n y: position.y + baseDragData.delta.y\n },\n delta: baseDragData.delta,\n lastPosition: position\n };\n }\n}\n\nconst globalClassNames = {\n root: 'ms-Modal',\n main: 'ms-Dialog-main',\n scrollableContent: 'ms-Modal-scrollableContent',\n isOpen: 'is-open',\n layer: 'ms-Modal-Layer'\n};\n\nconst getStyles = (props: IModalStyleProps): IModalStyles => {\n const {\n className,\n containerClassName,\n scrollableContentClassName,\n isOpen,\n isVisible,\n hasBeenOpened,\n modalRectangleTop,\n theme,\n topOffsetFixed,\n isModeless,\n layerClassName,\n isDefaultDragHandle,\n windowInnerHeight\n } = props;\n const { palette, effects, fonts } = theme;\n\n const classNames = getGlobalClassNames(globalClassNames, theme);\n\n return {\n root: [\n classNames.root,\n fonts.medium,\n {\n backgroundColor: 'transparent',\n position: isModeless ? 'absolute' : 'fixed',\n height: '100%',\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n opacity: 0,\n pointerEvents: 'none',\n transition: `opacity ${animationDuration}`\n },\n topOffsetFixed &&\n typeof modalRectangleTop === 'number' &&\n hasBeenOpened && {\n alignItems: 'flex-start'\n },\n isOpen && classNames.isOpen,\n isVisible && {\n opacity: 1,\n pointerEvents: 'auto'\n },\n className\n ],\n main: [\n classNames.main,\n {\n boxShadow: effects.elevation64,\n borderRadius: effects.roundedCorner2,\n backgroundColor: palette.white,\n boxSizing: 'border-box',\n position: 'relative',\n textAlign: 'left',\n outline: '3px solid transparent',\n maxHeight: 'calc(100% - 32px)',\n maxWidth: 'calc(100% - 32px)',\n minHeight: '176px',\n minWidth: '288px',\n overflowY: 'auto',\n zIndex: isModeless ? ZIndexes.Layer : undefined\n },\n topOffsetFixed &&\n typeof modalRectangleTop === 'number' &&\n hasBeenOpened && {\n top: modalRectangleTop\n },\n isDefaultDragHandle && {\n cursor: 'move'\n },\n containerClassName\n ],\n scrollableContent: [\n classNames.scrollableContent,\n {\n overflowY: 'auto',\n flexGrow: 1,\n maxHeight: '100vh',\n selectors: {\n ['@supports (-webkit-overflow-scrolling: touch)']: {\n maxHeight: windowInnerHeight\n }\n }\n },\n scrollableContentClassName\n ],\n layer: isModeless && [\n layerClassName,\n classNames.layer,\n {\n position: 'static',\n width: 'unset',\n height: 'unset'\n }\n ],\n keyboardMoveIconContainer: {\n position: 'absolute',\n display: 'flex',\n justifyContent: 'center',\n width: '100%',\n padding: '3px 0px'\n },\n keyboardMoveIcon: {\n fontSize: fonts.xLargePlus.fontSize,\n width: '24px'\n }\n };\n};\n\n/** @internal */\nexport const _ModalClone: React.FunctionComponent<_ExtendedIModalProps> = styled<\n _ExtendedIModalProps,\n IModalStyleProps,\n IModalStyles\n>(ModalBase, getStyles, undefined, {\n scope: 'Modal',\n fields: ['theme', 'styles', 'enableAriaHiddenSiblings']\n});\n_ModalClone.displayName = 'Modal';\n"]}
|
1
|
+
{"version":3,"file":"ModalClone.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/ModalClone/ModalClone.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,qCAAqC;AACrC,sDAAsD;AACtD,qEAAqE;AACrE,sEAAsE;AACtE,uDAAuD;AAEvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC9G,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,IAAI,EAOJ,QAAQ,EACR,KAAK,EACL,eAAe,EACf,WAAW,EACX,EAAE,EACF,OAAO,EACP,KAAK,EACL,cAAc,EACd,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAU5D,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,cAAc,CAAC;AAsB5D,MAAM,IAAI,GAAkB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAE3C,MAAM,aAAa,GAAkC;IACnD,MAAM,EAAE,KAAK;IACb,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE,EAAE;IACb,kBAAkB,EAAE,EAAE;IACtB,wBAAwB,EAAE,IAAI;CAC/B,CAAC;AAEF,MAAM,kBAAkB,GAAG,kBAAkB,EAAkC,CAAC;AAEhF,MAAM,YAAY,GAAG,CAAC,EAAoC,EAAU,EAAE;IACpE,IAAI,KAAK,GAAG,EAA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,IAAI;gBACf,GAAG,EAAE,iBAAiB;aACvB;YACH,mBAAmB,IAAI;gBACrB,MAAM,EAAE,MAAM;aACf;YACD,kBAAkB;SACnB;QACD,iBAAiB,EAAE;YACjB,UAAU,CAAC,iBAAiB;YAC5B;gBACE,SAAS,EAAE,MAAM;gBACjB,QAAQ,EAAE,CAAC;gBACX,SAAS,EAAE,OAAO;gBAClB,SAAS,EAAE;oBACT,CAAC,+CAA+C,CAAC,EAAE;wBACjD,SAAS,EAAE,iBAAiB;qBAC7B;iBACF;aACF;YACD,0BAA0B;SAC3B;QACD,KAAK,EAAE,UAAU,IAAI;YACnB,cAAc;YACd,UAAU,CAAC,KAAK;YAChB;gBACE,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,OAAO;gBACd,MAAM,EAAE,OAAO;aAChB;SACF;QACD,yBAAyB,EAAE;YACzB,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,QAAQ;YACxB,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,SAAS;SACnB;QACD,gBAAgB,EAAE;YAChB,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,QAAQ;YACnC,KAAK,EAAE,MAAM;SACd;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB;AAChB,MAAM,CAAC,MAAM,WAAW,GAAkD,MAAM,CAI9E,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE;IACjC,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,0BAA0B,CAAC;CACxD,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAG,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable react/prop-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport * as React from 'react';\nimport { useBoolean, useMergedRefs, useConst, useSetTimeout, useId, useUnmount } from '@fluentui/react-hooks';\nimport {\n allowOverscrollOnElement,\n allowScrollOnElement,\n AnimationVariables,\n classNamesFunction,\n DirectionalHint,\n elementContains,\n EventGroup,\n FocusTrapZone,\n getGlobalClassNames,\n getPropsWithDefaults,\n Icon,\n IDragOptions,\n IFocusTrapZone,\n ILayerProps,\n IModalProps,\n IModalStyleProps,\n IModalStyles,\n KeyCodes,\n Layer,\n memoizeFunction,\n mergeStyles,\n on,\n Overlay,\n Popup,\n ResponsiveMode,\n styled,\n useResponsiveMode,\n ZIndexes\n} from '@fluentui/react';\nimport { useWindow } from '@fluentui/react-window-provider';\n\n// @TODO - need to change this to a panel whenever the breakpoint is under medium (verify the spec)\n\n/** @internal */\nexport interface _ExtendedIModalProps extends IModalProps {\n minDragPosition?: _ICoordinates;\n maxDragPosition?: _ICoordinates;\n}\n\nconst animationDuration = AnimationVariables.durationValue2;\n/** @internal */\nexport type _ICoordinates = { x: number; y: number };\n\ninterface IModalInternalState {\n onModalCloseTimer: number;\n allowTouchBodyScroll?: boolean;\n scrollableContent: HTMLDivElement | null;\n lastSetCoordinates: _ICoordinates;\n /** Minimum clamped position, if dragging and clamping (`dragOptions.keepInBounds`) are enabled */\n minPosition?: _ICoordinates;\n /** Maximum clamped position, if dragging and clamping (`dragOptions.keepInBounds`) are enabled */\n maxPosition?: _ICoordinates;\n events: EventGroup;\n /** Ensures we dispose the same keydown callback as was registered */\n disposeOnKeyDown?: () => void;\n /** Ensures we dispose the same keyup callback as was registered (also tracks whether keyup has been registered) */\n disposeOnKeyUp?: () => void;\n isInKeyboardMoveMode?: boolean;\n hasBeenOpened?: boolean;\n}\n\nconst ZERO: _ICoordinates = { x: 0, y: 0 };\n\nconst DEFAULT_PROPS: Partial<_ExtendedIModalProps> = {\n isOpen: false,\n isDarkOverlay: true,\n className: '',\n containerClassName: '',\n enableAriaHiddenSiblings: true\n};\n\nconst getModalClassNames = classNamesFunction<IModalStyleProps, IModalStyles>();\n\nconst getMoveDelta = (ev: React.KeyboardEvent<HTMLElement>): number => {\n let delta = 10;\n if (ev.shiftKey) {\n if (!ev.ctrlKey) {\n delta = 50;\n }\n } else if (ev.ctrlKey) {\n delta = 1;\n }\n\n return delta;\n};\n\nconst useComponentRef = (props: IModalProps, focusTrapZone: React.RefObject<IFocusTrapZone>) => {\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n focus() {\n if (focusTrapZone.current) {\n focusTrapZone.current.focus();\n }\n }\n }),\n [focusTrapZone]\n );\n};\n\nconst ModalBase: React.FunctionComponent<_ExtendedIModalProps> = React.forwardRef<HTMLDivElement, _ExtendedIModalProps>(\n (propsWithoutDefaults, ref) => {\n const props = getPropsWithDefaults(DEFAULT_PROPS, propsWithoutDefaults);\n const {\n allowTouchBodyScroll,\n className,\n children,\n containerClassName,\n scrollableContentClassName,\n elementToFocusOnDismiss,\n firstFocusableSelector,\n forceFocusInsideTrap,\n ignoreExternalFocusing,\n isBlocking,\n isAlert,\n isClickableOutsideFocusTrap,\n isDarkOverlay,\n onDismiss,\n layerProps,\n overlay,\n isOpen,\n titleAriaId,\n styles,\n subtitleAriaId,\n theme,\n topOffsetFixed,\n responsiveMode,\n onLayerDidMount,\n isModeless,\n dragOptions,\n onDismissed,\n minDragPosition,\n maxDragPosition\n } = props;\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const focusTrapZone = React.useRef<IFocusTrapZone>(null);\n const focusTrapZoneElm = React.useRef<HTMLDivElement>(null);\n const mergedRef = useMergedRefs(rootRef, ref);\n\n const modalResponsiveMode = useResponsiveMode(mergedRef);\n\n const focusTrapZoneId = useId('ModalFocusTrapZone');\n\n const win = useWindow();\n\n const { setTimeout, clearTimeout } = useSetTimeout();\n\n const [isModalOpen, setIsModalOpen] = React.useState(isOpen);\n const [isVisible, setIsVisible] = React.useState(isOpen);\n const [coordinates, setCoordinates] = React.useState<_ICoordinates>(ZERO);\n const [modalRectangleTop, setModalRectangleTop] = React.useState<number | undefined>();\n\n const [isModalMenuOpen, { toggle: toggleModalMenuOpen, setFalse: setModalMenuClose }] = useBoolean(false);\n\n const internalState = useConst<IModalInternalState>(() => ({\n onModalCloseTimer: 0,\n allowTouchBodyScroll,\n scrollableContent: null,\n lastSetCoordinates: ZERO,\n events: new EventGroup({})\n }));\n\n const { keepInBounds } = dragOptions || ({} as IDragOptions);\n const isAlertRole = isAlert ?? (isBlocking && !isModeless);\n\n const layerClassName = layerProps === undefined ? '' : layerProps.className;\n const classNames = getModalClassNames(styles, {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n theme: theme!,\n className,\n containerClassName,\n scrollableContentClassName,\n isOpen,\n isVisible,\n hasBeenOpened: internalState.hasBeenOpened,\n modalRectangleTop,\n topOffsetFixed,\n isModeless,\n layerClassName,\n windowInnerHeight: win?.innerHeight,\n isDefaultDragHandle: dragOptions && !dragOptions.dragHandleSelector\n });\n\n const mergedLayerProps: ILayerProps = {\n eventBubblingEnabled: false,\n ...layerProps,\n onLayerDidMount: layerProps && layerProps.onLayerDidMount ? layerProps.onLayerDidMount : onLayerDidMount,\n insertFirst: isModeless,\n className: classNames.layer\n };\n\n // Allow the user to scroll within the modal but not on the body\n const allowScrollOnModal = React.useCallback(\n (elt: HTMLDivElement | null): void => {\n if (elt) {\n if (internalState.allowTouchBodyScroll) {\n allowOverscrollOnElement(elt, internalState.events);\n } else {\n allowScrollOnElement(elt, internalState.events);\n }\n } else {\n internalState.events.off(internalState.scrollableContent);\n }\n internalState.scrollableContent = elt;\n },\n [internalState]\n );\n\n const registerInitialModalPosition = (): void => {\n const dialogMain = focusTrapZoneElm.current;\n const modalRectangle = dialogMain?.getBoundingClientRect();\n\n if (modalRectangle) {\n if (topOffsetFixed) {\n setModalRectangleTop(modalRectangle.top);\n }\n\n if (keepInBounds) {\n // x/y are unavailable in IE, so use the equivalent left/top\n internalState.minPosition = minDragPosition ?? { x: -modalRectangle.left, y: -modalRectangle.top };\n internalState.maxPosition = maxDragPosition ?? { x: modalRectangle.left, y: modalRectangle.top };\n\n // Make sure the initial co-ordinates are within clamp bounds.\n setCoordinates({\n x: getClampedAxis('x', coordinates.x),\n y: getClampedAxis('y', coordinates.y)\n });\n }\n }\n };\n\n /**\n * Clamps an axis to a specified min and max position.\n *\n * @param axis A string that represents the axis (x/y).\n * @param position The position on the axis.\n */\n const getClampedAxis = React.useCallback(\n (axis: keyof _ICoordinates, position: number) => {\n const { minPosition, maxPosition } = internalState;\n if (keepInBounds && minPosition && maxPosition) {\n position = Math.max(minPosition[axis], position);\n position = Math.min(maxPosition[axis], position);\n }\n return position;\n },\n [keepInBounds, internalState]\n );\n\n const handleModalClose = (): void => {\n internalState.lastSetCoordinates = ZERO;\n\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = false;\n setIsModalOpen(false);\n setCoordinates(ZERO);\n\n internalState.disposeOnKeyUp?.();\n\n onDismissed?.();\n };\n\n const handleDragStart = React.useCallback((): void => {\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = false;\n }, [internalState, setModalMenuClose]);\n\n const handleDrag = React.useCallback(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (ev: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: any): void => {\n setCoordinates((prevValue) => ({\n x: getClampedAxis('x', prevValue.x + dragData.delta.x),\n y: getClampedAxis('y', prevValue.y + dragData.delta.y)\n }));\n },\n [getClampedAxis]\n );\n\n const handleDragStop = React.useCallback((): void => {\n if (focusTrapZone.current) {\n focusTrapZone.current.focus();\n }\n }, []);\n\n const handleEnterKeyboardMoveMode = () => {\n // We need a global handleKeyDown event when we are in the move mode so that we can\n // handle the key presses and the components inside the modal do not get the events\n const handleKeyDown = (ev: React.KeyboardEvent<HTMLElement>): void => {\n if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) {\n // CTRL + ALT + SPACE is handled during keyUp\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n const newLocal = ev.altKey || ev.keyCode === KeyCodes.escape;\n if (isModalMenuOpen && newLocal) {\n setModalMenuClose();\n }\n\n if (internalState.isInKeyboardMoveMode && (ev.keyCode === KeyCodes.escape || ev.keyCode === KeyCodes.enter)) {\n internalState.isInKeyboardMoveMode = false;\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n if (internalState.isInKeyboardMoveMode) {\n let handledEvent = true;\n const delta = getMoveDelta(ev);\n\n switch (ev.keyCode) {\n /* eslint-disable no-fallthrough */\n case KeyCodes.escape:\n setCoordinates(internalState.lastSetCoordinates);\n case KeyCodes.enter: {\n // TODO: determine if fallthrough was intentional\n /* eslint-enable no-fallthrough */\n internalState.lastSetCoordinates = ZERO;\n // setIsInKeyboardMoveMode(false);\n break;\n }\n case KeyCodes.up: {\n setCoordinates((prevValue) => ({ x: prevValue.x, y: getClampedAxis('y', prevValue.y - delta) }));\n break;\n }\n case KeyCodes.down: {\n setCoordinates((prevValue) => ({ x: prevValue.x, y: getClampedAxis('y', prevValue.y + delta) }));\n break;\n }\n case KeyCodes.left: {\n setCoordinates((prevValue) => ({ x: getClampedAxis('x', prevValue.x - delta), y: prevValue.y }));\n break;\n }\n case KeyCodes.right: {\n setCoordinates((prevValue) => ({ x: getClampedAxis('x', prevValue.x + delta), y: prevValue.y }));\n break;\n }\n default: {\n handledEvent = false;\n }\n }\n if (handledEvent) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n }\n };\n\n internalState.lastSetCoordinates = coordinates;\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = true;\n\n internalState.events.on(win, 'keydown', handleKeyDown, true /* useCapture */);\n internalState.disposeOnKeyDown = () => {\n internalState.events.off(win, 'keydown', handleKeyDown, true /* useCapture */);\n internalState.disposeOnKeyDown = undefined;\n };\n };\n\n const handleExitKeyboardMoveMode = () => {\n internalState.lastSetCoordinates = ZERO;\n internalState.isInKeyboardMoveMode = false;\n internalState.disposeOnKeyDown?.();\n };\n\n const registerForKeyUp = (): void => {\n const handleKeyUp = (ev: React.KeyboardEvent<HTMLElement>): void => {\n // Needs to handle the CTRL + ALT + SPACE key during keyup due to FireFox bug:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143\n if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) {\n if (elementContains(internalState.scrollableContent, ev.target as HTMLElement)) {\n toggleModalMenuOpen();\n ev.preventDefault();\n ev.stopPropagation();\n }\n }\n };\n\n if (!internalState.disposeOnKeyUp) {\n internalState.events.on(win, 'keyup', handleKeyUp, true /* useCapture */);\n internalState.disposeOnKeyUp = () => {\n internalState.events.off(win, 'keyup', handleKeyUp, true /* useCapture */);\n internalState.disposeOnKeyUp = undefined;\n };\n }\n };\n\n React.useEffect(() => {\n clearTimeout(internalState.onModalCloseTimer);\n // Opening the dialog\n if (isOpen) {\n // This must be done after the modal content has rendered\n requestAnimationFrame(() => setTimeout(registerInitialModalPosition, 0));\n\n setIsModalOpen(true);\n\n // Add a keyUp handler for all key up events once the dialog is open.\n if (dragOptions) {\n registerForKeyUp();\n }\n\n internalState.hasBeenOpened = true;\n setIsVisible(true);\n }\n\n // Closing the dialog\n if (!isOpen && isModalOpen) {\n internalState.onModalCloseTimer = setTimeout(handleModalClose, parseFloat(animationDuration) * 1000);\n setIsVisible(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- should only run if isModalOpen or isOpen mutates or if min/max drag bounds are updated.\n }, [isModalOpen, isOpen, minDragPosition, maxDragPosition]);\n\n useUnmount(() => {\n internalState.events.dispose();\n });\n\n useComponentRef(props, focusTrapZone);\n\n const modalContent = (\n <FocusTrapZone\n disabled={true}\n id={focusTrapZoneId}\n ref={focusTrapZoneElm}\n componentRef={focusTrapZone}\n className={classNames.main}\n elementToFocusOnDismiss={elementToFocusOnDismiss}\n isClickableOutsideFocusTrap={isModeless || isClickableOutsideFocusTrap || !isBlocking}\n ignoreExternalFocusing={ignoreExternalFocusing}\n forceFocusInsideTrap={forceFocusInsideTrap && !isModeless}\n firstFocusableSelector={firstFocusableSelector}\n focusPreviouslyFocusedInnerElement\n onBlur={internalState.isInKeyboardMoveMode ? handleExitKeyboardMoveMode : undefined}\n data-ui-id={props['data-ui-id']}\n // enableAriaHiddenSiblings is handled by the Popup\n >\n {dragOptions && internalState.isInKeyboardMoveMode && (\n <div className={classNames.keyboardMoveIconContainer}>\n {dragOptions.keyboardMoveIconProps ? (\n <Icon {...dragOptions.keyboardMoveIconProps} />\n ) : (\n <Icon iconName=\"move\" className={classNames.keyboardMoveIcon} />\n )}\n </div>\n )}\n <div ref={allowScrollOnModal} className={classNames.scrollableContent} data-is-scrollable>\n {dragOptions && isModalMenuOpen && (\n <dragOptions.menu\n items={[\n { key: 'move', text: dragOptions.moveMenuItemText, onClick: handleEnterKeyboardMoveMode },\n { key: 'close', text: dragOptions.closeMenuItemText, onClick: handleModalClose }\n ]}\n onDismiss={setModalMenuClose}\n alignTargetEdge\n coverTarget\n directionalHint={DirectionalHint.topLeftEdge}\n directionalHintFixed\n shouldFocusOnMount\n target={internalState.scrollableContent}\n />\n )}\n {children}\n </div>\n </FocusTrapZone>\n );\n\n return (\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n (isModalOpen && modalResponsiveMode! >= (responsiveMode || ResponsiveMode.small) && (\n <Layer ref={mergedRef} {...mergedLayerProps}>\n <Popup\n role={isAlertRole ? 'alertdialog' : 'dialog'}\n ariaLabelledBy={titleAriaId}\n ariaDescribedBy={subtitleAriaId}\n // onDismiss={onDismiss}\n shouldRestoreFocus={!ignoreExternalFocusing}\n // Modeless modals shouldn't hide siblings.\n // Popup will automatically handle this based on the aria-modal setting.\n // enableAriaHiddenSiblings={enableAriaHiddenSiblings}\n aria-modal={!isModeless}\n >\n <div className={classNames.root} role={!isModeless ? 'document' : undefined}>\n {!isModeless && (\n <Overlay\n aria-hidden={true}\n isDarkThemed={isDarkOverlay}\n onClick={isBlocking ? undefined : onDismiss}\n allowTouchBodyScroll={allowTouchBodyScroll}\n {...overlay}\n />\n )}\n {dragOptions ? (\n <DraggableZone\n handleSelector={dragOptions.dragHandleSelector || `#${focusTrapZoneId}`}\n preventDragSelector=\"button\"\n onStart={handleDragStart}\n onDragChange={handleDrag}\n onStop={handleDragStop}\n position={coordinates}\n >\n {modalContent}\n </DraggableZone>\n ) : (\n modalContent\n )}\n </div>\n </Popup>\n </Layer>\n )) ||\n null\n );\n }\n);\nModalBase.displayName = 'ModalBase';\n\ninterface IDraggableZoneStyles {\n root: string;\n}\n\nconst getDraggableZoneClassNames = memoizeFunction((className: string, isDragging: boolean): IDraggableZoneStyles => {\n return {\n root: mergeStyles(\n className,\n isDragging && {\n touchAction: 'none',\n selectors: {\n '& *': {\n userSelect: 'none'\n }\n }\n }\n )\n };\n});\n\ninterface IDragData {\n position: _ICoordinates;\n lastPosition?: _ICoordinates;\n delta: _ICoordinates;\n}\n\ninterface IDraggableZoneProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Specifies a selector to be used as the handle that initiates drag\n */\n handleSelector?: string;\n\n /**\n * Specifies a selector to be used to prevent drag initialization.\n * For example, if you do not want buttons inside of your handleSelector\n * to have the cursor change to move or to allow users to select from buttons,\n * you could pass button here (the close button in the header of a dialog is a concrete example)\n */\n preventDragSelector?: string;\n\n /**\n * the X and Y coordinates to use as an offest to position the draggable content\n */\n position?: _ICoordinates;\n\n /**\n * Callback for when dragging starts\n */\n onStart?: (event: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: IDragData) => void;\n\n /**\n * Callback for when the drag changes, while dragging\n */\n onDragChange?: (event: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: IDragData) => void;\n\n /**\n * Callback for when dragging stops\n */\n onStop?: (event: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: IDragData) => void;\n}\n\ninterface IDraggableZoneState {\n isDragging: boolean;\n position: _ICoordinates;\n lastPosition?: _ICoordinates;\n}\n\nconst eventMapping = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// These are needed so that we can generalize the events\n// and so we have access to clientX and clientY in the touch events\ntype MouseTouchEvent<T> = React.MouseEvent<T> & React.TouchEvent<T> & Event;\n\nclass DraggableZone extends React.Component<IDraggableZoneProps, IDraggableZoneState> {\n private _touchId?: number;\n private _currentEventType = eventMapping.mouse;\n private _events: (() => void)[] = [];\n\n constructor(props: IDraggableZoneProps) {\n super(props);\n\n this.state = {\n isDragging: false,\n position: this.props.position || { x: 0, y: 0 },\n lastPosition: undefined\n };\n }\n\n public componentDidUpdate(prevProps: IDraggableZoneProps) {\n if (this.props.position && (!prevProps.position || this.props.position !== prevProps.position)) {\n this.setState({ position: this.props.position });\n }\n }\n\n public componentWillUnmount() {\n this._events.forEach((dispose) => dispose());\n }\n\n public render() {\n const child: any = React.Children.only(this.props.children);\n const { props } = child;\n const { position } = this.props;\n const { position: statePosition, isDragging } = this.state;\n let x = statePosition.x;\n let y = statePosition.y;\n\n if (position && !isDragging) {\n x = position.x;\n y = position.y;\n }\n\n return React.cloneElement(child, {\n style: {\n ...props.style,\n transform: `translate(${x}px, ${y}px)`\n },\n className: getDraggableZoneClassNames(props.className, this.state.isDragging).root,\n onMouseDown: this._onMouseDown,\n onMouseUp: this._onMouseUp,\n onTouchStart: this._onTouchStart,\n onTouchEnd: this._onTouchEnd\n });\n }\n\n private _onMouseDown = (event: MouseTouchEvent<HTMLElement>) => {\n const onMouseDown = (React.Children.only(this.props.children) as any).props.onMouseDown;\n if (onMouseDown) {\n onMouseDown(event);\n }\n\n this._currentEventType = eventMapping.mouse;\n return this._onDragStart(event);\n };\n\n private _onMouseUp = (event: MouseTouchEvent<HTMLElement>) => {\n const onMouseUp = (React.Children.only(this.props.children) as any).props.onMouseUp;\n if (onMouseUp) {\n onMouseUp(event);\n }\n\n this._currentEventType = eventMapping.mouse;\n return this._onDragStop(event);\n };\n\n private _onTouchStart = (event: MouseTouchEvent<HTMLElement>) => {\n const onTouchStart = (React.Children.only(this.props.children) as any).props.onTouchStart;\n if (onTouchStart) {\n onTouchStart(event);\n }\n\n this._currentEventType = eventMapping.touch;\n return this._onDragStart(event);\n };\n\n private _onTouchEnd = (event: MouseTouchEvent<HTMLElement>) => {\n const onTouchEnd = (React.Children.only(this.props.children) as any).props.onTouchEnd;\n if (onTouchEnd) {\n onTouchEnd(event);\n }\n\n this._currentEventType = eventMapping.touch;\n this._onDragStop(event);\n };\n\n private _onDragStart = (event: MouseTouchEvent<HTMLElement>) => {\n // Only handle left click for dragging\n if (typeof event.button === 'number' && event.button !== 0) {\n return false;\n }\n\n // If the target doesn't match the handleSelector OR\n // if the target does match the preventDragSelector, bail out\n if (\n (this.props.handleSelector && !this._matchesSelector(event.target as HTMLElement, this.props.handleSelector)) ||\n (this.props.preventDragSelector &&\n this._matchesSelector(event.target as HTMLElement, this.props.preventDragSelector))\n ) {\n return;\n }\n\n // Remember the touch identifier if this is a touch event so we can\n // distinguish between individual touches in multitouch scenarios\n // by remembering which touch point we were given\n this._touchId = this._getTouchId(event);\n\n const position = this._getControlPosition(event);\n if (position === undefined) {\n return;\n }\n\n const dragData = this._createDragDataFromPosition(position);\n this.props.onStart && this.props.onStart(event, dragData);\n\n this.setState({\n isDragging: true,\n lastPosition: position\n });\n\n // hook up the appropriate mouse/touch events to the body to ensure\n // smooth dragging\n this._events = [\n on(document.body, this._currentEventType.move, this._onDrag, true /* use capture phase */),\n on(document.body, this._currentEventType.stop, this._onDragStop, true /* use capture phase */)\n ];\n\n return;\n };\n\n private _onDrag = (event: any) => {\n // Prevent scrolling on mobile devices\n if (event.type === 'touchmove') {\n event.preventDefault();\n }\n\n const position = this._getControlPosition(event);\n if (!position) {\n return;\n }\n\n // create the updated drag data from the position data\n const updatedData = this._createUpdatedDragData(this._createDragDataFromPosition(position));\n const updatedPosition = updatedData.position;\n\n this.props.onDragChange && this.props.onDragChange(event, updatedData);\n\n this.setState({\n position: updatedPosition,\n lastPosition: position\n });\n };\n\n private _onDragStop = (event: any) => {\n if (!this.state.isDragging) {\n return;\n }\n\n const position = this._getControlPosition(event);\n if (!position) {\n return;\n }\n\n const baseDragData = this._createDragDataFromPosition(position);\n\n // Set dragging to false and reset the lastPosition\n this.setState({\n isDragging: false,\n lastPosition: undefined\n });\n\n this.props.onStop && this.props.onStop(event, baseDragData);\n\n if (this.props.position) {\n this.setState({\n position: this.props.position\n });\n }\n\n // Remove event handlers\n this._events.forEach((dispose) => dispose());\n };\n\n /**\n * Get the control position based off the event that fired\n * @param event - The event to get offsets from\n */\n private _getControlPosition(event: MouseTouchEvent<HTMLElement>): _ICoordinates | undefined {\n const touchObj = this._getActiveTouch(event);\n\n // did we get the right touch?\n if (this._touchId !== undefined && !touchObj) {\n return undefined;\n }\n\n const eventToGetOffset = touchObj || event;\n return {\n x: eventToGetOffset.clientX,\n y: eventToGetOffset.clientY\n };\n }\n\n /**\n * Get the active touch point that we have saved from the event's TouchList\n * @param event - The event used to get the TouchList for the active touch point\n */\n private _getActiveTouch(event: MouseTouchEvent<HTMLElement>): React.Touch | undefined {\n return (\n (event.targetTouches && this._findTouchInTouchList(event.targetTouches)) ||\n (event.changedTouches && this._findTouchInTouchList(event.changedTouches))\n );\n }\n\n /**\n * Get the initial touch identifier associated with the given event\n * @param event - The event that contains the TouchList\n */\n private _getTouchId(event: MouseTouchEvent<HTMLElement>): number | undefined {\n const touch: React.Touch | undefined =\n (event.targetTouches && event.targetTouches[0]) || (event.changedTouches && event.changedTouches[0]);\n\n if (touch) {\n return touch.identifier;\n }\n\n return;\n }\n\n /**\n * Returns if an element (or any of the element's parents) match the given selector\n */\n private _matchesSelector(element: HTMLElement | null, selector: string): boolean {\n if (!element || element === document.body) {\n return false;\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n const matchesSelectorFn: Function =\n element.matches || element.webkitMatchesSelector || (element as any).msMatchesSelector; /* for IE */\n\n if (!matchesSelectorFn) {\n return false;\n }\n\n return matchesSelectorFn.call(element, selector) || this._matchesSelector(element.parentElement, selector);\n }\n\n /**\n * Attempts to find the Touch that matches the identifier we stored in dragStart\n * @param touchList The TouchList to look for the stored identifier from dragStart\n */\n private _findTouchInTouchList(touchList: React.TouchList): React.Touch | undefined {\n if (this._touchId === undefined) {\n return;\n }\n\n for (let i = 0; i < touchList.length; i++) {\n if (touchList[i].identifier === this._touchId) {\n return touchList[i];\n }\n }\n\n return undefined;\n }\n\n /**\n * Create DragData based off of the last known position and the new position passed in\n * @param position The new position as part of the drag\n */\n private _createDragDataFromPosition(position: _ICoordinates): IDragData {\n const { lastPosition } = this.state;\n\n // If we have no lastPosition, use the given position\n // for last position\n if (lastPosition === undefined) {\n return {\n delta: { x: 0, y: 0 },\n lastPosition: position,\n position\n };\n }\n\n return {\n delta: {\n x: position.x - lastPosition.x,\n y: position.y - lastPosition.y\n },\n lastPosition,\n position\n };\n }\n\n /**\n * Creates an updated DragData based off the current position and given baseDragData\n * @param baseDragData The base DragData (from _createDragDataFromPosition) used to calculate the updated positions\n */\n private _createUpdatedDragData(baseDragData: IDragData): IDragData {\n const { position } = this.state;\n return {\n position: {\n x: position.x + baseDragData.delta.x,\n y: position.y + baseDragData.delta.y\n },\n delta: baseDragData.delta,\n lastPosition: position\n };\n }\n}\n\nconst globalClassNames = {\n root: 'ms-Modal',\n main: 'ms-Dialog-main',\n scrollableContent: 'ms-Modal-scrollableContent',\n isOpen: 'is-open',\n layer: 'ms-Modal-Layer'\n};\n\nconst getStyles = (props: IModalStyleProps): IModalStyles => {\n const {\n className,\n containerClassName,\n scrollableContentClassName,\n isOpen,\n isVisible,\n hasBeenOpened,\n modalRectangleTop,\n theme,\n topOffsetFixed,\n isModeless,\n layerClassName,\n isDefaultDragHandle,\n windowInnerHeight\n } = props;\n const { palette, effects, fonts } = theme;\n\n const classNames = getGlobalClassNames(globalClassNames, theme);\n\n return {\n root: [\n classNames.root,\n fonts.medium,\n {\n backgroundColor: 'transparent',\n position: isModeless ? 'absolute' : 'fixed',\n height: '100%',\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n opacity: 0,\n pointerEvents: 'none',\n transition: `opacity ${animationDuration}`\n },\n topOffsetFixed &&\n typeof modalRectangleTop === 'number' &&\n hasBeenOpened && {\n alignItems: 'flex-start'\n },\n isOpen && classNames.isOpen,\n isVisible && {\n opacity: 1,\n pointerEvents: 'auto'\n },\n className\n ],\n main: [\n classNames.main,\n {\n boxShadow: effects.elevation64,\n borderRadius: effects.roundedCorner2,\n backgroundColor: palette.white,\n boxSizing: 'border-box',\n position: 'relative',\n textAlign: 'left',\n outline: '3px solid transparent',\n maxHeight: 'calc(100% - 32px)',\n maxWidth: 'calc(100% - 32px)',\n minHeight: '176px',\n minWidth: '288px',\n overflowY: 'auto',\n zIndex: isModeless ? ZIndexes.Layer : undefined\n },\n topOffsetFixed &&\n typeof modalRectangleTop === 'number' &&\n hasBeenOpened && {\n top: modalRectangleTop\n },\n isDefaultDragHandle && {\n cursor: 'move'\n },\n containerClassName\n ],\n scrollableContent: [\n classNames.scrollableContent,\n {\n overflowY: 'auto',\n flexGrow: 1,\n maxHeight: '100vh',\n selectors: {\n ['@supports (-webkit-overflow-scrolling: touch)']: {\n maxHeight: windowInnerHeight\n }\n }\n },\n scrollableContentClassName\n ],\n layer: isModeless && [\n layerClassName,\n classNames.layer,\n {\n position: 'static',\n width: 'unset',\n height: 'unset'\n }\n ],\n keyboardMoveIconContainer: {\n position: 'absolute',\n display: 'flex',\n justifyContent: 'center',\n width: '100%',\n padding: '3px 0px'\n },\n keyboardMoveIcon: {\n fontSize: fonts.xLargePlus.fontSize,\n width: '24px'\n }\n };\n};\n\n/** @internal */\nexport const _ModalClone: React.FunctionComponent<_ExtendedIModalProps> = styled<\n _ExtendedIModalProps,\n IModalStyleProps,\n IModalStyles\n>(ModalBase, getStyles, undefined, {\n scope: 'Modal',\n fields: ['theme', 'styles', 'enableAriaHiddenSiblings']\n});\n_ModalClone.displayName = 'Modal';\n"]}
|
@@ -11,7 +11,7 @@ import { VideoGalleryStrings } from './VideoGallery';
|
|
11
11
|
export declare const _RemoteVideoTile: React.MemoExoticComponent<(props: {
|
12
12
|
userId: string;
|
13
13
|
remoteParticipant: VideoGalleryRemoteParticipant;
|
14
|
-
onCreateRemoteStreamView?: ((userId: string, options?: VideoStreamOptions
|
14
|
+
onCreateRemoteStreamView?: ((userId: string, options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>) | undefined;
|
15
15
|
onDisposeRemoteStreamView?: ((userId: string) => Promise<void>) | undefined;
|
16
16
|
isAvailable?: boolean | undefined;
|
17
17
|
isReceiving?: boolean | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RemoteVideoTile.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/RemoteVideoTile.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAwB,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,sDAAsD;AACtD,OAAO,EAAiB,WAAW,EAAE,MAAM,OAAO,CAAC;AASnD,OAAO,EAAE,WAAW,EAAwB,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AACpH,OAAO,EAEL,uCAAuC,EACxC,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AACjG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,qDAAqD;AACrD,OAAO,EAAE,aAAa,EAAE,mCAAgC;AACxD,qDAAqD;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM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;;gBAChB,MAAA,IAAI,CAAC,OAAO,+CAAZ,IAAI,CAAY,CAAC;gBACjB,cAAc,aAAd,cAAc,uBAAd,cAAc,EAAI,CAAC;YACrB,CAAC;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IContextualMenuProps, Layer, Stack } from '@fluentui/react';\nimport React, { useMemo } from 'react';\n/* @conditional-compile-remove(pinned-participants) */\nimport { KeyboardEvent, useCallback } from 'react';\nimport {\n CreateVideoStreamViewResult,\n OnRenderAvatarCallback,\n ParticipantState,\n VideoGalleryRemoteParticipant,\n VideoStreamOptions,\n ViewScalingMode\n} from '../types';\nimport { _DrawerMenu, _DrawerMenuItemProps } from './Drawer';\nimport { StreamMedia } from './StreamMedia';\nimport { VideoGalleryStrings } from './VideoGallery';\nimport { drawerMenuWrapperStyles, remoteVideoTileWrapperStyle } from './VideoGallery/styles/RemoteVideoTile.styles';\nimport {\n RemoteVideoStreamLifecycleMaintainerProps,\n useRemoteVideoStreamLifecycleMaintainer\n} from './VideoGallery/useVideoStreamLifecycleMaintainer';\nimport { useVideoTileContextualMenuProps } from './VideoGallery/useVideoTileContextualMenuProps';\nimport { VideoTile } from './VideoTile';\n/* @conditional-compile-remove(hide-attendee-name) */\nimport { _formatString } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(hide-attendee-name) */\nimport { useLocale } from '../localization';\n\n/**\n * A memoized version of VideoTile for rendering remote participants. React.memo is used for a performance\n * boost by memoizing the same rendered component to avoid rerendering a VideoTile when its position in the\n * array changes causing a rerender in the parent component. https://reactjs.org/docs/react-api.html#reactmemo\n *\n * @internal\n */\nexport const _RemoteVideoTile = React.memo(\n (props: {\n userId: string;\n remoteParticipant: VideoGalleryRemoteParticipant;\n onCreateRemoteStreamView?: (\n userId: string,\n options?: VideoStreamOptions\n ) => Promise<void | CreateVideoStreamViewResult>;\n onDisposeRemoteStreamView?: (userId: string) => Promise<void>;\n isAvailable?: boolean;\n isReceiving?: boolean;\n isScreenSharingOn?: boolean; // TODO: Remove this once onDisposeRemoteStreamView no longer disposes of screen share stream\n renderElement?: HTMLElement;\n remoteVideoViewOptions?: VideoStreamOptions;\n onRenderAvatar?: OnRenderAvatarCallback;\n showMuteIndicator?: boolean;\n showLabel?: boolean;\n personaMinSize?: number;\n strings?: VideoGalleryStrings;\n participantState?: ParticipantState;\n menuKind?: 'contextual' | 'drawer';\n drawerMenuHostId?: string;\n onPinParticipant?: (userId: string) => void;\n onUnpinParticipant?: (userId: string) => void;\n onUpdateScalingMode?: (userId: string, scalingMode: ViewScalingMode) => void;\n isPinned?: boolean;\n disablePinMenuItem?: boolean;\n toggleAnnouncerString?: (announcerString: string) => void;\n }) => {\n const {\n isAvailable,\n isReceiving = true, // default to true to prevent any breaking change\n isScreenSharingOn,\n onCreateRemoteStreamView,\n onDisposeRemoteStreamView,\n remoteVideoViewOptions,\n renderElement,\n userId,\n onRenderAvatar,\n showMuteIndicator,\n remoteParticipant,\n participantState,\n menuKind,\n isPinned,\n onPinParticipant,\n onUnpinParticipant,\n onUpdateScalingMode,\n disablePinMenuItem,\n toggleAnnouncerString,\n strings\n } = props;\n\n const remoteVideoStreamProps: RemoteVideoStreamLifecycleMaintainerProps = useMemo(\n () => ({\n isMirrored: remoteVideoViewOptions?.isMirrored,\n isScreenSharingOn,\n isStreamAvailable: isAvailable,\n isStreamReceiving: isReceiving,\n onCreateRemoteStreamView,\n onDisposeRemoteStreamView,\n remoteParticipantId: userId,\n renderElementExists: !!renderElement,\n scalingMode: remoteVideoViewOptions?.scalingMode\n }),\n [\n isAvailable,\n isReceiving,\n isScreenSharingOn,\n onCreateRemoteStreamView,\n onDisposeRemoteStreamView,\n remoteVideoViewOptions?.isMirrored,\n remoteVideoViewOptions?.scalingMode,\n renderElement,\n userId\n ]\n );\n\n // Handle creating, destroying and updating the video stream as necessary\n const createVideoStreamResult = useRemoteVideoStreamLifecycleMaintainer(remoteVideoStreamProps);\n const contextualMenuProps = useVideoTileContextualMenuProps({\n remoteParticipant,\n view: createVideoStreamResult?.view,\n /* @conditional-compile-remove(pinned-participants) */\n strings: { ...props.strings },\n isPinned,\n onPinParticipant,\n onUnpinParticipant,\n onUpdateScalingMode,\n disablePinMenuItem,\n toggleAnnouncerString\n });\n\n const videoTileContextualMenuProps = useMemo(() => {\n if (menuKind !== 'contextual') {\n return {};\n }\n return videoTileContextualMenuPropsTrampoline(contextualMenuProps);\n }, [contextualMenuProps, menuKind]);\n\n const showLoadingIndicator = isAvailable && isReceiving === false && participantState !== 'Disconnected';\n\n const [drawerMenuItemProps, setDrawerMenuItemProps] = React.useState<_DrawerMenuItemProps[]>([]);\n\n const renderVideoStreamElement = useMemo(() => {\n // Checking if renderElement is well defined or not as calling SDK has a number of video streams limitation which\n // implies that, after their threshold, all streams have no child (blank video)\n if (!renderElement || !renderElement.childElementCount) {\n // Returning `undefined` results in the placeholder with avatar being shown\n return undefined;\n }\n\n return (\n <StreamMedia videoStreamElement={renderElement} loadingState={showLoadingIndicator ? 'loading' : 'none'} />\n );\n }, [renderElement, showLoadingIndicator]);\n\n /* @conditional-compile-remove(pinned-participants) */\n const onKeyDown = useCallback(\n (e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n setDrawerMenuItemProps(\n convertContextualMenuItemsToDrawerMenuItemProps(contextualMenuProps, () => setDrawerMenuItemProps([]))\n );\n }\n },\n [setDrawerMenuItemProps, contextualMenuProps]\n );\n\n let displayName = remoteParticipant.displayName || strings?.displayNamePlaceholder;\n /* @conditional-compile-remove(hide-attendee-name) */\n const attendeeRoleString = useLocale().strings.AttendeeRole;\n\n /* @conditional-compile-remove(hide-attendee-name) */\n const formatDisplayName = (): string | undefined => {\n if (displayName && attendeeRoleString) {\n return _formatString(displayName, { AttendeeRole: attendeeRoleString });\n }\n return displayName;\n };\n\n /* @conditional-compile-remove(hide-attendee-name) */\n displayName = formatDisplayName();\n return (\n <Stack\n /* @conditional-compile-remove(pinned-participants) */\n tabIndex={menuKind === 'drawer' ? 0 : undefined}\n /* @conditional-compile-remove(pinned-participants) */\n onKeyDown={menuKind === 'drawer' ? onKeyDown : undefined}\n style={remoteVideoTileWrapperStyle}\n >\n <VideoTile\n key={userId}\n userId={userId}\n initialsName={remoteParticipant.displayName ?? ''}\n renderElement={renderVideoStreamElement}\n displayName={displayName}\n onRenderPlaceholder={onRenderAvatar}\n isMuted={remoteParticipant.isMuted}\n /* @conditional-compile-remove(raise-hand) */\n raisedHand={remoteParticipant.raisedHand}\n isSpeaking={remoteParticipant.isSpeaking}\n showMuteIndicator={showMuteIndicator}\n personaMinSize={props.personaMinSize}\n showLabel={props.showLabel}\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n participantState={participantState}\n {...videoTileContextualMenuProps}\n /* @conditional-compile-remove(pinned-participants) */\n isPinned={props.isPinned}\n /* @conditional-compile-remove(pinned-participants) */\n onLongTouch={() =>\n setDrawerMenuItemProps(\n convertContextualMenuItemsToDrawerMenuItemProps(contextualMenuProps, () => setDrawerMenuItemProps([]))\n )\n }\n />\n {drawerMenuItemProps.length > 0 && (\n <Layer hostId={props.drawerMenuHostId}>\n <Stack styles={drawerMenuWrapperStyles}>\n <_DrawerMenu\n onLightDismiss={() => setDrawerMenuItemProps([])}\n items={drawerMenuItemProps}\n heading={remoteParticipant.displayName}\n />\n </Stack>\n </Layer>\n )}\n </Stack>\n );\n }\n);\n\nconst videoTileContextualMenuPropsTrampoline = (\n contextualMenuProps?: IContextualMenuProps\n): { contextualMenu?: IContextualMenuProps } => {\n if (!contextualMenuProps) {\n return {};\n }\n /* @conditional-compile-remove(pinned-participants) */\n return {\n contextualMenu: contextualMenuProps\n };\n\n return {};\n};\n\n/* @conditional-compile-remove(pinned-participants) */\nconst convertContextualMenuItemsToDrawerMenuItemProps = (\n contextualMenuProps?: IContextualMenuProps,\n onLightDismiss?: () => void\n): _DrawerMenuItemProps[] => {\n if (!contextualMenuProps) {\n return [];\n }\n return contextualMenuProps.items.map((item) => {\n return {\n itemKey: item.key,\n text: item.text,\n iconProps: item.iconProps,\n disabled: item.disabled,\n onItemClick: () => {\n item.onClick?.();\n onLightDismiss?.();\n }\n };\n });\n};\n\"../../../acs-ui-common/src\""]}
|
1
|
+
{"version":3,"file":"RemoteVideoTile.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/RemoteVideoTile.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAwB,KAAK,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,sDAAsD;AACtD,OAAO,EAAiB,WAAW,EAAE,MAAM,OAAO,CAAC;AASnD,OAAO,EAAE,WAAW,EAAwB,MAAM,UAAU,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AACpH,OAAO,EAEL,uCAAuC,EACxC,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,+BAA+B,EAAE,MAAM,gDAAgD,CAAC;AACjG,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,qDAAqD;AACrD,OAAO,EAAE,aAAa,EAAE,mCAAgC;AACxD,qDAAqD;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,CAAC,IAAI,CACxC,CAAC,KA2BA,EAAE,EAAE;;IACH,MAAM,EACJ,WAAW,EACX,WAAW,GAAG,IAAI,EAAE,iDAAiD;IACrE,iBAAiB,EACjB,wBAAwB,EACxB,yBAAyB,EACzB,sBAAsB,EACtB,aAAa,EACb,MAAM,EACN,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,gBA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QACD,mBAAmB,CAAC,MAAM,GAAG,CAAC,IAAI,CACjC,oBAAC,KAAK,IAAC,MAAM,EAAE,KAAK,CAAC,gBAAgB;YACnC,oBAAC,KAAK,IAAC,MAAM,EAAE,uBAAuB;gBACpC,oBAAC,WAAW,IACV,cAAc,EAAE,GAAG,EAAE,CAAC,sBAAsB,CAAC,EAAE,CAAC,EAChD,KAAK,EAAE,mBAAmB,EAC1B,OAAO,EAAE,iBAAiB,CAAC,WAAW,GACtC,CACI,CACF,CACT,CACK,CACT,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,sCAAsC,GAAG,CAC7C,mBAA0C,EACC,EAAE;IAC7C,IAAI,CAAC,mBAAmB,EAAE;QACxB,OAAO,EAAE,CAAC;KACX;IACD,sDAAsD;IACtD,OAAO;QACL,cAAc,EAAE,mBAAmB;KACpC,CAAC;IAEF,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC;AAEF,sDAAsD;AACtD,MAAM,+CAA+C,GAAG,CACtD,mBAA0C,EAC1C,cAA2B,EACH,EAAE;IAC1B,IAAI,CAAC,mBAAmB,EAAE;QACxB,OAAO,EAAE,CAAC;KACX;IACD,OAAO,mBAAmB,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QAC5C,OAAO;YACL,OAAO,EAAE,IAAI,CAAC,GAAG;YACjB,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,WAAW,EAAE,GAAG,EAAE;;gBAChB,MAAA,IAAI,CAAC,OAAO,oDAAI,CAAC;gBACjB,cAAc,aAAd,cAAc,uBAAd,cAAc,EAAI,CAAC;YACrB,CAAC;SACF,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IContextualMenuProps, Layer, Stack } from '@fluentui/react';\nimport React, { useMemo } from 'react';\n/* @conditional-compile-remove(pinned-participants) */\nimport { KeyboardEvent, useCallback } from 'react';\nimport {\n CreateVideoStreamViewResult,\n OnRenderAvatarCallback,\n ParticipantState,\n VideoGalleryRemoteParticipant,\n VideoStreamOptions,\n ViewScalingMode\n} from '../types';\nimport { _DrawerMenu, _DrawerMenuItemProps } from './Drawer';\nimport { StreamMedia } from './StreamMedia';\nimport { VideoGalleryStrings } from './VideoGallery';\nimport { drawerMenuWrapperStyles, remoteVideoTileWrapperStyle } from './VideoGallery/styles/RemoteVideoTile.styles';\nimport {\n RemoteVideoStreamLifecycleMaintainerProps,\n useRemoteVideoStreamLifecycleMaintainer\n} from './VideoGallery/useVideoStreamLifecycleMaintainer';\nimport { useVideoTileContextualMenuProps } from './VideoGallery/useVideoTileContextualMenuProps';\nimport { VideoTile } from './VideoTile';\n/* @conditional-compile-remove(hide-attendee-name) */\nimport { _formatString } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(hide-attendee-name) */\nimport { useLocale } from '../localization';\n\n/**\n * A memoized version of VideoTile for rendering remote participants. React.memo is used for a performance\n * boost by memoizing the same rendered component to avoid rerendering a VideoTile when its position in the\n * array changes causing a rerender in the parent component. https://reactjs.org/docs/react-api.html#reactmemo\n *\n * @internal\n */\nexport const _RemoteVideoTile = React.memo(\n (props: {\n userId: string;\n remoteParticipant: VideoGalleryRemoteParticipant;\n onCreateRemoteStreamView?: (\n userId: string,\n options?: VideoStreamOptions\n ) => Promise<void | CreateVideoStreamViewResult>;\n onDisposeRemoteStreamView?: (userId: string) => Promise<void>;\n isAvailable?: boolean;\n isReceiving?: boolean;\n isScreenSharingOn?: boolean; // TODO: Remove this once onDisposeRemoteStreamView no longer disposes of screen share stream\n renderElement?: HTMLElement;\n remoteVideoViewOptions?: VideoStreamOptions;\n onRenderAvatar?: OnRenderAvatarCallback;\n showMuteIndicator?: boolean;\n showLabel?: boolean;\n personaMinSize?: number;\n strings?: VideoGalleryStrings;\n participantState?: ParticipantState;\n menuKind?: 'contextual' | 'drawer';\n drawerMenuHostId?: string;\n onPinParticipant?: (userId: string) => void;\n onUnpinParticipant?: (userId: string) => void;\n onUpdateScalingMode?: (userId: string, scalingMode: ViewScalingMode) => void;\n isPinned?: boolean;\n disablePinMenuItem?: boolean;\n toggleAnnouncerString?: (announcerString: string) => void;\n }) => {\n const {\n isAvailable,\n isReceiving = true, // default to true to prevent any breaking change\n isScreenSharingOn,\n onCreateRemoteStreamView,\n onDisposeRemoteStreamView,\n remoteVideoViewOptions,\n renderElement,\n userId,\n onRenderAvatar,\n showMuteIndicator,\n remoteParticipant,\n participantState,\n menuKind,\n isPinned,\n onPinParticipant,\n onUnpinParticipant,\n onUpdateScalingMode,\n disablePinMenuItem,\n toggleAnnouncerString,\n strings\n } = props;\n\n const remoteVideoStreamProps: RemoteVideoStreamLifecycleMaintainerProps = useMemo(\n () => ({\n isMirrored: remoteVideoViewOptions?.isMirrored,\n isScreenSharingOn,\n isStreamAvailable: isAvailable,\n isStreamReceiving: isReceiving,\n onCreateRemoteStreamView,\n onDisposeRemoteStreamView,\n remoteParticipantId: userId,\n renderElementExists: !!renderElement,\n scalingMode: remoteVideoViewOptions?.scalingMode\n }),\n [\n isAvailable,\n isReceiving,\n isScreenSharingOn,\n onCreateRemoteStreamView,\n onDisposeRemoteStreamView,\n remoteVideoViewOptions?.isMirrored,\n remoteVideoViewOptions?.scalingMode,\n renderElement,\n userId\n ]\n );\n\n // Handle creating, destroying and updating the video stream as necessary\n const createVideoStreamResult = useRemoteVideoStreamLifecycleMaintainer(remoteVideoStreamProps);\n const contextualMenuProps = useVideoTileContextualMenuProps({\n remoteParticipant,\n view: createVideoStreamResult?.view,\n /* @conditional-compile-remove(pinned-participants) */\n strings: { ...props.strings },\n isPinned,\n onPinParticipant,\n onUnpinParticipant,\n onUpdateScalingMode,\n disablePinMenuItem,\n toggleAnnouncerString\n });\n\n const videoTileContextualMenuProps = useMemo(() => {\n if (menuKind !== 'contextual') {\n return {};\n }\n return videoTileContextualMenuPropsTrampoline(contextualMenuProps);\n }, [contextualMenuProps, menuKind]);\n\n const showLoadingIndicator = isAvailable && isReceiving === false && participantState !== 'Disconnected';\n\n const [drawerMenuItemProps, setDrawerMenuItemProps] = React.useState<_DrawerMenuItemProps[]>([]);\n\n const renderVideoStreamElement = useMemo(() => {\n // Checking if renderElement is well defined or not as calling SDK has a number of video streams limitation which\n // implies that, after their threshold, all streams have no child (blank video)\n if (!renderElement || !renderElement.childElementCount) {\n // Returning `undefined` results in the placeholder with avatar being shown\n return undefined;\n }\n\n return (\n <StreamMedia videoStreamElement={renderElement} loadingState={showLoadingIndicator ? 'loading' : 'none'} />\n );\n }, [renderElement, showLoadingIndicator]);\n\n /* @conditional-compile-remove(pinned-participants) */\n const onKeyDown = useCallback(\n (e: KeyboardEvent) => {\n if (e.key === 'Enter') {\n setDrawerMenuItemProps(\n convertContextualMenuItemsToDrawerMenuItemProps(contextualMenuProps, () => setDrawerMenuItemProps([]))\n );\n }\n },\n [setDrawerMenuItemProps, contextualMenuProps]\n );\n\n let displayName = remoteParticipant.displayName || strings?.displayNamePlaceholder;\n /* @conditional-compile-remove(hide-attendee-name) */\n const attendeeRoleString = useLocale().strings.AttendeeRole;\n\n /* @conditional-compile-remove(hide-attendee-name) */\n const formatDisplayName = (): string | undefined => {\n if (displayName && attendeeRoleString) {\n return _formatString(displayName, { AttendeeRole: attendeeRoleString });\n }\n return displayName;\n };\n\n /* @conditional-compile-remove(hide-attendee-name) */\n displayName = formatDisplayName();\n return (\n <Stack\n /* @conditional-compile-remove(pinned-participants) */\n tabIndex={menuKind === 'drawer' ? 0 : undefined}\n /* @conditional-compile-remove(pinned-participants) */\n onKeyDown={menuKind === 'drawer' ? onKeyDown : undefined}\n style={remoteVideoTileWrapperStyle}\n >\n <VideoTile\n key={userId}\n userId={userId}\n initialsName={remoteParticipant.displayName ?? ''}\n renderElement={renderVideoStreamElement}\n displayName={displayName}\n onRenderPlaceholder={onRenderAvatar}\n isMuted={remoteParticipant.isMuted}\n /* @conditional-compile-remove(raise-hand) */\n raisedHand={remoteParticipant.raisedHand}\n isSpeaking={remoteParticipant.isSpeaking}\n showMuteIndicator={showMuteIndicator}\n personaMinSize={props.personaMinSize}\n showLabel={props.showLabel}\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n participantState={participantState}\n {...videoTileContextualMenuProps}\n /* @conditional-compile-remove(pinned-participants) */\n isPinned={props.isPinned}\n /* @conditional-compile-remove(pinned-participants) */\n onLongTouch={() =>\n setDrawerMenuItemProps(\n convertContextualMenuItemsToDrawerMenuItemProps(contextualMenuProps, () => setDrawerMenuItemProps([]))\n )\n }\n />\n {drawerMenuItemProps.length > 0 && (\n <Layer hostId={props.drawerMenuHostId}>\n <Stack styles={drawerMenuWrapperStyles}>\n <_DrawerMenu\n onLightDismiss={() => setDrawerMenuItemProps([])}\n items={drawerMenuItemProps}\n heading={remoteParticipant.displayName}\n />\n </Stack>\n </Layer>\n )}\n </Stack>\n );\n }\n);\n\nconst videoTileContextualMenuPropsTrampoline = (\n contextualMenuProps?: IContextualMenuProps\n): { contextualMenu?: IContextualMenuProps } => {\n if (!contextualMenuProps) {\n return {};\n }\n /* @conditional-compile-remove(pinned-participants) */\n return {\n contextualMenu: contextualMenuProps\n };\n\n return {};\n};\n\n/* @conditional-compile-remove(pinned-participants) */\nconst convertContextualMenuItemsToDrawerMenuItemProps = (\n contextualMenuProps?: IContextualMenuProps,\n onLightDismiss?: () => void\n): _DrawerMenuItemProps[] => {\n if (!contextualMenuProps) {\n return [];\n }\n return contextualMenuProps.items.map((item) => {\n return {\n itemKey: item.key,\n text: item.text,\n iconProps: item.iconProps,\n disabled: item.disabled,\n onItemClick: () => {\n item.onClick?.();\n onLightDismiss?.();\n }\n };\n });\n};\n\"../../../acs-ui-common/src\""]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VideoBackgroundEffectsPicker.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAA0B,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AA2ElF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,KAAyC,EAAe,EAAE;;IACtG,MAAM,CAAC,oCAAoC,EAAE,uCAAuC,CAAC,GAAG,KAAK,CAAC,QAAQ,CAEpG,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAElC,+EAA+E;IAC/E,WAAW,CAAC;QACV,IAAI,EAAE,8BAA8B;QACpC,KAAK;QACL,eAAe,EAAE;YACf,YAAY,EAAE,UAAU;YACxB,SAAS,EAAE,mBAAmB;YAC9B,gBAAgB,EAAE,0BAA0B;SAC7C;KACF,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,MAAA,KAAK,CAAC,iBAAiB,mCAAI,oCAAoC,CAAC;IACvF,MAAM,iBAAiB,GAAG,CAAC,iBAAyB,EAAQ,EAAE;;QAC5D,uCAAuC,CAAC,iBAAiB,CAAC,CAAC;QAC3D,MAAA,KAAK,CAAC,QAAQ
|
1
|
+
{"version":3,"file":"VideoBackgroundEffectsPicker.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,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ACzF,CAAC,CAAC;gBACD,SAAS,GAAG,CAAC;oBACZ,QAAQ,KAAK,YAAY,CAAC,MAAM,GAAG,CAAC;oBACpC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAClD,oBAAC,KAAK,IACJ,GAAG,EAAE,KAAK,EACV,MAAM,EAAE,qCAAqC,gBAClC,2BAA2B,GACtC,CACH,CAAC,CACE,CACT,CAAA;SAAA,CAAC,CACI,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IStyle, Label, mergeStyles, Stack } from '@fluentui/react';\nimport { useWarnings } from '@fluentui/react-hooks';\nimport React from 'react';\nimport { chunk } from '../utils';\nimport { _VideoEffectsItem, _VideoEffectsItemProps } from './VideoEffectsItem';\nimport { hiddenVideoEffectsItemContainerStyles } from './VideoEffectsItem.styles';\n\n/**\n * Props for {@link _VideoBackgroundEffectsPicker}\n * @internal\n */\nexport interface _VideoBackgroundEffectsPickerProps {\n /**\n * The options to display in the picker.\n */\n options: _VideoBackgroundEffectChoiceOption[];\n\n /**\n * The key of the current selected Video Background Effect.\n * If you provide this, you must maintain selection state by observing onChange events and passing a new value in when changed.\n */\n selectedEffectKey?: string;\n\n /**\n * Callback to invoke when a Video Background Effect is selected.\n * @param effectKey - The key of the Video Background Effect that was selected.\n */\n onChange?: (effectKey: string) => void;\n\n /**\n * The key of the Video Background Effect that is initially selected.\n * Only provide this if the picker is an uncontrolled component;\n * otherwise, use the `selectedEffectKey` property.\n */\n defaultSelectedEffectKey?: string;\n\n /**\n * The label to display for the picker.\n */\n label?: string;\n\n /**\n * The number of items to display per row.\n * @default 3\n */\n itemsPerRow?: 'wrap' | number;\n\n /**\n * Styles for the picker.\n */\n styles?: _VideoBackgroundEffectsPickerStyles;\n}\n\n/**\n * Option for the {@link _VideoBackgroundEffectsPicker}.\n * @internal\n */\nexport type _VideoBackgroundEffectChoiceOption = _VideoEffectsItemProps;\n\n/**\n * Styles for the {@link _VideoBackgroundEffectsPicker}.\n * @internal\n */\nexport interface _VideoBackgroundEffectsPickerStyles {\n /**\n * Styles for the root element.\n */\n root?: IStyle;\n\n /**\n * Styles for the label.\n */\n label?: IStyle;\n\n /**\n * Styles for the root of each row element.\n */\n rowRoot?: IStyle;\n}\n\n/**\n * Picker for choosing a Video Background Effect.\n *\n * @remarks\n * This functions similar to a radio group of buttons, where the user can select one of the options.\n *\n * @internal\n */\nexport const _VideoBackgroundEffectsPicker = (props: _VideoBackgroundEffectsPickerProps): JSX.Element => {\n const [componentControlledSelectedEffectKey, setComponentControlledSelectedEffectKey] = React.useState<\n string | undefined\n >(props.defaultSelectedEffectKey);\n\n // Warn the developer if they use the component in an incorrect controlled way.\n useWarnings({\n name: 'VideoBackgroundEffectsPicker',\n props,\n controlledUsage: {\n onChangeProp: 'onChange',\n valueProp: 'selectedEffectKey',\n defaultValueProp: 'defaultSelectedEffectKey'\n }\n });\n\n const selectedEffect = props.selectedEffectKey ?? componentControlledSelectedEffectKey;\n const setSelectedEffect = (selectedEffectKey: string): void => {\n setComponentControlledSelectedEffectKey(selectedEffectKey);\n props.onChange?.(selectedEffectKey);\n };\n\n const convertedOptions: _VideoEffectsItemProps[] = props.options.map((option) => ({\n isSelected: option.itemKey === selectedEffect,\n onSelect: () => setSelectedEffect(option.itemKey),\n ...option\n }));\n\n const itemsPerRow = props.itemsPerRow ?? 3;\n const optionsByRow = itemsPerRow === 'wrap' ? [convertedOptions] : chunk(convertedOptions, itemsPerRow);\n\n // If the final row is not full, fill it with hidden items to ensure layout.\n const fillCount = itemsPerRow === 'wrap' ? 0 : itemsPerRow - optionsByRow[optionsByRow.length - 1].length;\n\n return (\n <Stack tokens={{ childrenGap: '0.5rem' }}>\n <Label className={mergeStyles(props.styles?.label)}>{props.label}</Label>\n {optionsByRow.map((options, rowIndex) => (\n <Stack\n className={mergeStyles(props.styles?.rowRoot)}\n wrap={props.itemsPerRow === 'wrap'}\n horizontal\n key={rowIndex}\n tokens={{ childrenGap: '0.5rem' }}\n data-ui-id=\"video-effects-picker-row\"\n >\n {options.map((option, i) => {\n if (i === 0 && rowIndex === 0) {\n return (\n <_VideoEffectsItem {...option} itemKey={option.itemKey} key={option.itemKey} focusOnMount={true} />\n );\n }\n return <_VideoEffectsItem {...option} itemKey={option.itemKey} key={option.itemKey} />;\n })}\n {fillCount > 0 &&\n rowIndex === optionsByRow.length - 1 &&\n Array.from({ length: fillCount }).map((_, index) => (\n <Stack\n key={index}\n styles={hiddenVideoEffectsItemContainerStyles}\n data-ui-id=\"video-effects-hidden-item\"\n />\n ))}\n </Stack>\n ))}\n </Stack>\n );\n};\n"]}
|