@azure/communication-react 1.22.0-alpha-202411190017 → 1.22.0-alpha-202411210017

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (24) hide show
  1. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BUGbN3hN.js → ChatMessageComponentAsRichTextEditBox-Dw8hzKEb.js} +2 -2
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BUGbN3hN.js.map → ChatMessageComponentAsRichTextEditBox-Dw8hzKEb.js.map} +1 -1
  3. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BDeLfzgC.js → RichTextSendBoxWrapper-De-8bhRs.js} +2 -2
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BDeLfzgC.js.map → RichTextSendBoxWrapper-De-8bhRs.js.map} +1 -1
  5. package/dist/dist-cjs/communication-react/{index-DpDZlDJC.js → index-DVP3RFKN.js} +27 -18
  6. package/dist/dist-cjs/communication-react/index-DVP3RFKN.js.map +1 -0
  7. package/dist/dist-cjs/communication-react/index.js +1 -1
  8. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  9. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  10. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  12. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js +4 -3
  13. package/dist/dist-esm/react-components/src/components/DevicePermissions/SitePermissionsScaffolding.js.map +1 -1
  14. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js +2 -1
  15. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js.map +1 -1
  16. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js +8 -1
  17. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/CallReadinessModal.js.map +1 -1
  18. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ExpandedLocalVideoTile.js +2 -3
  19. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/ExpandedLocalVideoTile.js.map +1 -1
  20. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/ExpandedLocalVideoTile.styles.d.ts +2 -2
  21. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/ExpandedLocalVideoTile.styles.js +5 -4
  22. package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/ExpandedLocalVideoTile.styles.js.map +1 -1
  23. package/package.json +1 -1
  24. package/dist/dist-cjs/communication-react/index-DpDZlDJC.js.map +0 -1
@@ -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;AAW5D,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,cAAc,CAAC;AAsB5D,MAAM,IAAI,GAAkB,EAA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;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 dataUiId?: string;\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 dataUiId\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={dataUiId}\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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AAC,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 dataUiId?: string;\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 dataUiId\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={dataUiId}\n // enableAriaHiddenSiblings is handled by the Popup\n {...(props.focusTrapZoneProps ?? {})}\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"]}
@@ -109,7 +109,14 @@ export const CallReadinessModal = (props) => {
109
109
  main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }
110
110
  }, layerProps: { hostId: props.modalLayerHostId }, isOpen: isPermissionsModalDismissed, isBlocking: false, onDismiss: () => {
111
111
  setIsPermissionsModalDismissed(false);
112
- }, overlay: { styles: { root: { background: 'rgba(0,0,0,0.4)' } } } }, modal()));
112
+ }, overlay: { styles: { root: { background: 'rgba(0,0,0,0.4)' } } }, forceFocusInsideTrap: true, focusTrapZoneProps: {
113
+ disabled: false,
114
+ onKeyDown: (ev) => {
115
+ if (ev.key === 'Escape') {
116
+ setIsPermissionsModalDismissed(false);
117
+ }
118
+ }
119
+ } }, modal()));
113
120
  }
114
121
  else {
115
122
  return React.createElement(React.Fragment, null);
@@ -1 +1 @@
1
- {"version":3,"file":"CallReadinessModal.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallReadinessModal.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,iDAAiD;AACjD,OAAO,EACL,kCAAkC,EAClC,qBAAqB,EACrB,yBAAyB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AAE,QAAQ,EAAE,OAAO,EAAE;oBAC3B,IAAI,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,uBAAuB,EAAE;iBAC5F,EACD,UAAU,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,gBAAgB,EAAE,EAC9C,MAAM,EAAE,2BAA2B,EACnC,UAAU,EAAE,KAAK,EACjB,SAAS,EAAE,GAAG,EAAE;oBACd,8BAA8B,CAAC,KAAK,CAAC,CAAC;gBACxC,CAAC,EACD,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,EAAE,IAE/D,KAAK,EAAE,CACI,CACf,CACA,CACJ,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAgB,EAAE;IAC7D,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport {\n CameraAndMicrophoneSitePermissions,\n CameraSitePermissions,\n MicrophoneSitePermissions,\n _DrawerSurface\n} from '@internal/react-components';\n/* @conditional-compile-remove(call-readiness) */\nimport { _ModalClone } from '@internal/react-components';\n/* @conditional-compile-remove(call-readiness) */\nimport { drawerContainerStyles } from '../styles/CallComposite.styles';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(unsupported-browser) */\nimport { _isSafari } from '../utils';\n/* @conditional-compile-remove(call-readiness) */\nconst DRAWER_HIGH_Z_BAND = 99; // setting z index to 99 so that it sit above all components\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * Modal that guides user through enabling their camera and mic access\n * @private\n */\nexport const CallReadinessModal = (props: {\n mobileView: boolean;\n modalLayerHostId: string;\n permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n };\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo?: EnvironmentInfo;\n isPermissionsModalDismissed: boolean;\n setIsPermissionsModalDismissed: (dismissedState: boolean) => void;\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n doNotPromptCamera: boolean;\n}): JSX.Element => {\n const {\n mobileView,\n permissionsState,\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo,\n isPermissionsModalDismissed,\n setIsPermissionsModalDismissed,\n onPermissionsTroubleshootingClick\n } = props;\n const onLightDismissTriggered = (): void => {\n // do nothing here\n // only way to dismiss this drawer is clicking on allow access which will leads to device permission prompt\n };\n\n // On Safari browser with 2 options: don't allow/never for this website again, when don't allow is clicked, permissionAPI returns prompt and PermissionGranted from calling sdk returns false (the right value)\n const videoState: PermissionState = permissionsState.camera;\n const audioState: PermissionState = permissionsState.microphone;\n\n const showModal =\n (!props.doNotPromptCamera && videoState === 'denied') ||\n (!props.doNotPromptCamera && videoState === 'prompt') ||\n audioState === 'denied' ||\n audioState === 'prompt';\n /* @conditional-compile-remove(unsupported-browser) */\n const isSafari = _isSafari(environmentInfo);\n\n const modal: undefined | (() => JSX.Element) = !showModal\n ? undefined\n : () => {\n // if both video and audio permission are not set\n if (videoState === 'prompt' && !props.doNotPromptCamera && audioState === 'prompt') {\n return (\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"request\"\n />\n );\n }\n // if audio permission is set up but video is not\n else if (videoState === 'prompt' && !props.doNotPromptCamera) {\n return (\n <CameraSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n onContinueAnywayClick={() => {\n setIsPermissionsModalDismissed(false);\n }}\n kind=\"request\"\n />\n );\n }\n // if video permission is set up but audio is not\n else if (audioState === 'prompt') {\n return (\n <MicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"request\"\n />\n );\n }\n // if both video and audio are denied\n else if (videoState === 'denied' && !props.doNotPromptCamera && audioState === 'denied') {\n return (\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n }\n // if only video is denied\n else if (videoState === 'denied' && !props.doNotPromptCamera) {\n return (\n <CameraSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n onContinueAnywayClick={() => {\n setIsPermissionsModalDismissed(false);\n }}\n kind=\"denied\"\n />\n );\n }\n // if only audio is denied\n else {\n return (\n <MicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n }\n };\n\n if (mobileView && modal !== undefined) {\n return (\n <>\n {isPermissionsModalDismissed && (\n <_DrawerSurface\n disableMaxHeight={true}\n onLightDismiss={onLightDismissTriggered}\n styles={drawerContainerStyles(DRAWER_HIGH_Z_BAND)}\n >\n {modal()}\n </_DrawerSurface>\n )}\n </>\n );\n } else if (!mobileView && modal !== undefined) {\n return (\n <_ModalClone\n styles={{\n root: { position: 'unset' },\n main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }\n }}\n layerProps={{ hostId: props.modalLayerHostId }}\n isOpen={isPermissionsModalDismissed}\n isBlocking={false}\n onDismiss={() => {\n setIsPermissionsModalDismissed(false);\n }}\n overlay={{ styles: { root: { background: 'rgba(0,0,0,0.4)' } } }}\n >\n {modal()}\n </_ModalClone>\n );\n } else {\n return <></>;\n }\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * Modal that guides user through enabling their camera and mic access\n * This is used when permission API is not supported\n * @private\n */\nexport const CallReadinessModalFallBack = (props: {\n mobileView: boolean;\n checkPermissionModalShowing: boolean;\n permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n };\n modalLayerHostId: string;\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo?: EnvironmentInfo;\n isPermissionsModalDismissed: boolean;\n setIsPermissionsModalDismissed: (dismissedState: boolean) => void;\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n}): JSX.Element => {\n const {\n mobileView,\n checkPermissionModalShowing,\n permissionsState,\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo,\n isPermissionsModalDismissed,\n setIsPermissionsModalDismissed,\n onPermissionsTroubleshootingClick\n } = props;\n const onLightDismissTriggered = (): void => {\n // do nothing here\n // only way to dismiss this drawer is clicking on allow access which will leads to device permission prompt\n };\n\n const videoState = permissionsState.camera;\n const audioState = permissionsState.microphone;\n\n // When permissions are not set, do nothing here\n // When permissions are set to denied, show helper screen\n const showModal = videoState === 'denied' || audioState === 'denied';\n\n /* @conditional-compile-remove(unsupported-browser) */\n const isSafari = _isSafari(environmentInfo);\n\n const modal: undefined | (() => JSX.Element) = !showModal\n ? undefined\n : () => {\n if (videoState === 'denied' && audioState === 'denied') {\n return (\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n } else if (videoState === 'denied' && audioState === 'granted') {\n return (\n <CameraSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n onContinueAnywayClick={() => {\n setIsPermissionsModalDismissed(false);\n }}\n kind=\"denied\"\n />\n );\n } else {\n return (\n <MicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n }\n };\n\n if (mobileView) {\n return (\n <>\n {(checkPermissionModalShowing || audioState === 'prompt' || videoState === 'prompt') && (\n <_DrawerSurface\n disableMaxHeight={true}\n onLightDismiss={onLightDismissTriggered}\n styles={drawerContainerStyles(DRAWER_HIGH_Z_BAND)}\n >\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"check\"\n />\n </_DrawerSurface>\n )}\n {isPermissionsModalDismissed && !checkPermissionModalShowing && modal !== undefined && (\n <_DrawerSurface\n disableMaxHeight={true}\n onLightDismiss={onLightDismissTriggered}\n styles={drawerContainerStyles(DRAWER_HIGH_Z_BAND)}\n >\n {modal()}\n </_DrawerSurface>\n )}\n </>\n );\n } else {\n return (\n <>\n {(checkPermissionModalShowing || audioState === 'prompt' || videoState === 'prompt') && (\n <_ModalClone\n styles={{\n root: { position: 'unset' },\n main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }\n }}\n layerProps={{ hostId: props.modalLayerHostId }}\n isOpen={isPermissionsModalDismissed}\n isBlocking={false}\n onDismiss={() => {\n setIsPermissionsModalDismissed(false);\n }}\n overlay={{ styles: { root: { background: 'rgba(0,0,0,0.4)' } } }}\n >\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"check\"\n />\n </_ModalClone>\n )}\n\n {!checkPermissionModalShowing && modal !== undefined && (\n <_ModalClone\n styles={{\n root: { position: 'unset' },\n main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }\n }}\n layerProps={{ hostId: props.modalLayerHostId }}\n isOpen={isPermissionsModalDismissed}\n isBlocking={false}\n onDismiss={() => {\n setIsPermissionsModalDismissed(false);\n }}\n overlay={{ styles: { root: { background: 'rgba(0,0,0,0.4)' } } }}\n >\n {modal()}\n </_ModalClone>\n )}\n </>\n );\n }\n};\n\n/**\n * Placeholder for conditional compile\n * @private\n */\nexport const CallReadinessModalPlaceHolder = (): JSX.Element => {\n return <></>;\n};\n"]}
1
+ {"version":3,"file":"CallReadinessModal.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/CallReadinessModal.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAA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W,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAC1C,sBAAsB,EACpB,iCAAiC;wBAC/B,CAAC,CAAC,GAAG,EAAE;4BACH,iCAAiC,CAAC,gBAAgB,CAAC,CAAC;wBACtD,CAAC;wBACH,CAAC,CAAC,SAAS,EAEf,IAAI,EAAC,OAAO,GACZ,CACU,CACf;YAEA,CAAC,2BAA2B,IAAI,KAAK,KAAK,SAAS,IAAI,CACtD,oBAAC,WAAW,IACV,MAAM,EAAE;oBACN,IAAI,EAAE,EAAE,QAAQ,EAAE,OAAO,EAAE;oBAC3B,IAAI,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE,uBAAuB,EAAE;iBAC5F,EACD,UAAU,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,gBAAgB,EAAE,EAC9C,MAAM,EAAE,2BAA2B,EACnC,UAAU,EAAE,KAAK,EACjB,SAAS,EAAE,GAAG,EAAE;oBACd,8BAA8B,CAAC,KAAK,CAAC,CAAC;gBACxC,CAAC,EACD,OAAO,EAAE,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,EAAE,IAE/D,KAAK,EAAE,CACI,CACf,CACA,CACJ,CAAC;IACJ,CAAC;AACH,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAgB,EAAE;IAC7D,OAAO,yCAAK,CAAC;AACf,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\n/* @conditional-compile-remove(call-readiness) */\nimport {\n CameraAndMicrophoneSitePermissions,\n CameraSitePermissions,\n MicrophoneSitePermissions,\n _DrawerSurface\n} from '@internal/react-components';\n/* @conditional-compile-remove(call-readiness) */\nimport { _ModalClone } from '@internal/react-components';\n/* @conditional-compile-remove(call-readiness) */\nimport { drawerContainerStyles } from '../styles/CallComposite.styles';\n/* @conditional-compile-remove(unsupported-browser) */\nimport { EnvironmentInfo } from '@azure/communication-calling';\n/* @conditional-compile-remove(call-readiness) */ /* @conditional-compile-remove(unsupported-browser) */\nimport { _isSafari } from '../utils';\n/* @conditional-compile-remove(call-readiness) */\nconst DRAWER_HIGH_Z_BAND = 99; // setting z index to 99 so that it sit above all components\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * Modal that guides user through enabling their camera and mic access\n * @private\n */\nexport const CallReadinessModal = (props: {\n mobileView: boolean;\n modalLayerHostId: string;\n permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n };\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo?: EnvironmentInfo;\n isPermissionsModalDismissed: boolean;\n setIsPermissionsModalDismissed: (dismissedState: boolean) => void;\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n doNotPromptCamera: boolean;\n}): JSX.Element => {\n const {\n mobileView,\n permissionsState,\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo,\n isPermissionsModalDismissed,\n setIsPermissionsModalDismissed,\n onPermissionsTroubleshootingClick\n } = props;\n const onLightDismissTriggered = (): void => {\n // do nothing here\n // only way to dismiss this drawer is clicking on allow access which will leads to device permission prompt\n };\n\n // On Safari browser with 2 options: don't allow/never for this website again, when don't allow is clicked, permissionAPI returns prompt and PermissionGranted from calling sdk returns false (the right value)\n const videoState: PermissionState = permissionsState.camera;\n const audioState: PermissionState = permissionsState.microphone;\n\n const showModal =\n (!props.doNotPromptCamera && videoState === 'denied') ||\n (!props.doNotPromptCamera && videoState === 'prompt') ||\n audioState === 'denied' ||\n audioState === 'prompt';\n /* @conditional-compile-remove(unsupported-browser) */\n const isSafari = _isSafari(environmentInfo);\n\n const modal: undefined | (() => JSX.Element) = !showModal\n ? undefined\n : () => {\n // if both video and audio permission are not set\n if (videoState === 'prompt' && !props.doNotPromptCamera && audioState === 'prompt') {\n return (\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"request\"\n />\n );\n }\n // if audio permission is set up but video is not\n else if (videoState === 'prompt' && !props.doNotPromptCamera) {\n return (\n <CameraSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n onContinueAnywayClick={() => {\n setIsPermissionsModalDismissed(false);\n }}\n kind=\"request\"\n />\n );\n }\n // if video permission is set up but audio is not\n else if (audioState === 'prompt') {\n return (\n <MicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"request\"\n />\n );\n }\n // if both video and audio are denied\n else if (videoState === 'denied' && !props.doNotPromptCamera && audioState === 'denied') {\n return (\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n }\n // if only video is denied\n else if (videoState === 'denied' && !props.doNotPromptCamera) {\n return (\n <CameraSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n onContinueAnywayClick={() => {\n setIsPermissionsModalDismissed(false);\n }}\n kind=\"denied\"\n />\n );\n }\n // if only audio is denied\n else {\n return (\n <MicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n }\n };\n\n if (mobileView && modal !== undefined) {\n return (\n <>\n {isPermissionsModalDismissed && (\n <_DrawerSurface\n disableMaxHeight={true}\n onLightDismiss={onLightDismissTriggered}\n styles={drawerContainerStyles(DRAWER_HIGH_Z_BAND)}\n >\n {modal()}\n </_DrawerSurface>\n )}\n </>\n );\n } else if (!mobileView && modal !== undefined) {\n return (\n <_ModalClone\n styles={{\n root: { position: 'unset' },\n main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }\n }}\n layerProps={{ hostId: props.modalLayerHostId }}\n isOpen={isPermissionsModalDismissed}\n isBlocking={false}\n onDismiss={() => {\n setIsPermissionsModalDismissed(false);\n }}\n overlay={{ styles: { root: { background: 'rgba(0,0,0,0.4)' } } }}\n forceFocusInsideTrap={true}\n focusTrapZoneProps={{\n disabled: false,\n onKeyDown: (ev: React.KeyboardEvent<HTMLElement>) => {\n if (ev.key === 'Escape') {\n setIsPermissionsModalDismissed(false);\n }\n }\n }}\n >\n {modal()}\n </_ModalClone>\n );\n } else {\n return <></>;\n }\n};\n\n/* @conditional-compile-remove(call-readiness) */\n/**\n * Modal that guides user through enabling their camera and mic access\n * This is used when permission API is not supported\n * @private\n */\nexport const CallReadinessModalFallBack = (props: {\n mobileView: boolean;\n checkPermissionModalShowing: boolean;\n permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n };\n modalLayerHostId: string;\n /* @conditional-compile-remove(unsupported-browser) */\n environmentInfo?: EnvironmentInfo;\n isPermissionsModalDismissed: boolean;\n setIsPermissionsModalDismissed: (dismissedState: boolean) => void;\n onPermissionsTroubleshootingClick?: (permissionsState: {\n camera: PermissionState;\n microphone: PermissionState;\n }) => void;\n}): JSX.Element => {\n const {\n mobileView,\n checkPermissionModalShowing,\n permissionsState,\n /* @conditional-compile-remove(unsupported-browser) */ environmentInfo,\n isPermissionsModalDismissed,\n setIsPermissionsModalDismissed,\n onPermissionsTroubleshootingClick\n } = props;\n const onLightDismissTriggered = (): void => {\n // do nothing here\n // only way to dismiss this drawer is clicking on allow access which will leads to device permission prompt\n };\n\n const videoState = permissionsState.camera;\n const audioState = permissionsState.microphone;\n\n // When permissions are not set, do nothing here\n // When permissions are set to denied, show helper screen\n const showModal = videoState === 'denied' || audioState === 'denied';\n\n /* @conditional-compile-remove(unsupported-browser) */\n const isSafari = _isSafari(environmentInfo);\n\n const modal: undefined | (() => JSX.Element) = !showModal\n ? undefined\n : () => {\n if (videoState === 'denied' && audioState === 'denied') {\n return (\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n } else if (videoState === 'denied' && audioState === 'granted') {\n return (\n <CameraSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n onContinueAnywayClick={() => {\n setIsPermissionsModalDismissed(false);\n }}\n kind=\"denied\"\n />\n );\n } else {\n return (\n <MicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"denied\"\n />\n );\n }\n };\n\n if (mobileView) {\n return (\n <>\n {(checkPermissionModalShowing || audioState === 'prompt' || videoState === 'prompt') && (\n <_DrawerSurface\n disableMaxHeight={true}\n onLightDismiss={onLightDismissTriggered}\n styles={drawerContainerStyles(DRAWER_HIGH_Z_BAND)}\n >\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"check\"\n />\n </_DrawerSurface>\n )}\n {isPermissionsModalDismissed && !checkPermissionModalShowing && modal !== undefined && (\n <_DrawerSurface\n disableMaxHeight={true}\n onLightDismiss={onLightDismissTriggered}\n styles={drawerContainerStyles(DRAWER_HIGH_Z_BAND)}\n >\n {modal()}\n </_DrawerSurface>\n )}\n </>\n );\n } else {\n return (\n <>\n {(checkPermissionModalShowing || audioState === 'prompt' || videoState === 'prompt') && (\n <_ModalClone\n styles={{\n root: { position: 'unset' },\n main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }\n }}\n layerProps={{ hostId: props.modalLayerHostId }}\n isOpen={isPermissionsModalDismissed}\n isBlocking={false}\n onDismiss={() => {\n setIsPermissionsModalDismissed(false);\n }}\n overlay={{ styles: { root: { background: 'rgba(0,0,0,0.4)' } } }}\n >\n <CameraAndMicrophoneSitePermissions\n appName={'app'}\n /* @conditional-compile-remove(unsupported-browser) */\n browserHint={isSafari ? 'safari' : 'unset'}\n onTroubleshootingClick={\n onPermissionsTroubleshootingClick\n ? () => {\n onPermissionsTroubleshootingClick(permissionsState);\n }\n : undefined\n }\n kind=\"check\"\n />\n </_ModalClone>\n )}\n\n {!checkPermissionModalShowing && modal !== undefined && (\n <_ModalClone\n styles={{\n root: { position: 'unset' },\n main: { position: 'absolute', left: '50%', top: '50%', transform: 'translate(-50%, -50%)' }\n }}\n layerProps={{ hostId: props.modalLayerHostId }}\n isOpen={isPermissionsModalDismissed}\n isBlocking={false}\n onDismiss={() => {\n setIsPermissionsModalDismissed(false);\n }}\n overlay={{ styles: { root: { background: 'rgba(0,0,0,0.4)' } } }}\n >\n {modal()}\n </_ModalClone>\n )}\n </>\n );\n }\n};\n\n/**\n * Placeholder for conditional compile\n * @private\n */\nexport const CallReadinessModalPlaceHolder = (): JSX.Element => {\n return <></>;\n};\n"]}
@@ -2,7 +2,7 @@
2
2
  // Licensed under the MIT License.
3
3
  import React, { useEffect } from 'react';
4
4
  import { mergeStyles, Stack } from '@fluentui/react';
5
- import { StreamMedia, VideoTile, useTheme } from "../../../../../react-components/src";
5
+ import { StreamMedia, VideoTile } from "../../../../../react-components/src";
6
6
  import { containerStyles, overlayBackgroundStyles, overlayContentStyles, videoTileStyles } from '../styles/ExpandedLocalVideoTile.styles';
7
7
  const onRenderEmptyPlaceholder = () => React.createElement(React.Fragment, null);
8
8
  const localVideoViewOptions = {
@@ -17,7 +17,6 @@ export const ExpandedLocalVideoTile = (props) => {
17
17
  const videoStream = props.localParticipantVideoStream;
18
18
  const isVideoReady = (_a = videoStream === null || videoStream === void 0 ? void 0 : videoStream.isAvailable) !== null && _a !== void 0 ? _a : false;
19
19
  const renderElement = videoStream === null || videoStream === void 0 ? void 0 : videoStream.renderElement;
20
- const palette = useTheme().palette;
21
20
  useEffect(() => {
22
21
  if (videoStream && isVideoReady) {
23
22
  props.onCreateLocalStreamView &&
@@ -26,7 +25,7 @@ export const ExpandedLocalVideoTile = (props) => {
26
25
  }, [isVideoReady, videoStream, props, renderElement]);
27
26
  return (React.createElement(Stack, { horizontalAlign: "center", verticalAlign: "center", styles: containerStyles, grow: true },
28
27
  React.createElement(VideoTile, { styles: videoTileStyles, renderElement: renderElement ? React.createElement(StreamMedia, { videoStreamElement: renderElement }) : undefined, onRenderPlaceholder: onRenderEmptyPlaceholder }, props.overlayContent && (React.createElement(React.Fragment, null,
29
- React.createElement(Stack, { className: mergeStyles(overlayBackgroundStyles(palette, isVideoReady)) }),
28
+ React.createElement(Stack, { className: mergeStyles(overlayBackgroundStyles(isVideoReady)) }),
30
29
  React.createElement(Stack, { horizontalAlign: "center", verticalAlign: "center", className: mergeStyles(overlayContentStyles) }, props.overlayContent))))));
31
30
  };
32
31
  //# sourceMappingURL=ExpandedLocalVideoTile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandedLocalVideoTile.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/ExpandedLocalVideoTile.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EACL,WAAW,EAEX,SAAS,EACT,QAAQ,EAGT,4CAAmC;AACpC,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,oBAAoB,EACpB,eAAe,EAChB,MAAM,yCAAyC,CAAC;AAEjD,MAAM,wBAAwB,GAAG,GAAgB,EAAE,CAAC,yCAAK,CAAC;AAE1D,MAAM,qBAAqB,GAAG;IAC5B,WAAW,EAAE,MAAM;IACnB,UAAU,EAAE,IAAI;CACK,CAAC;AAWxB;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAkC,EAAe,EAAE;;IACxF,MAAM,WAAW,GAAG,KAAK,CAAC,2BAA2B,CAAC;IACtD,MAAM,YAAY,GAAG,MAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,WAAW,mCAAI,KAAK,CAAC;IACvD,MAAM,aAAa,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,aAAa,CAAC;IACjD,MAAM,OAAO,GAAG,QAAQ,EAAE,CAAC,OAAO,CAAC;IAEnC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,WAAW,IAAI,YAAY,EAAE,CAAC;YAChC,KAAK,CAAC,uBAAuB;gBAC3B,KAAK,CAAC,uBAAuB,CAAC,qBAAqB,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,GAAG,CAAC,CAAC,CAAC;QAClH,CAAC;IACH,CAAC,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC;IACtD,OAAO,CACL,oBAAC,KAAK,IAAC,eAAe,EAAC,QAAQ,EAAC,aAAa,EAAC,QAAQ,EAAC,MAAM,EAAE,eAAe,EAAE,IAAI;QAClF,oBAAC,SAAS,IACR,MAAM,EAAE,eAAe,EACvB,aAAa,EAAE,aAAa,CAAC,CAAC,CAAC,oBAAC,WAAW,IAAC,kBAAkB,EAAE,aAAa,GAAI,CAAC,CAAC,CAAC,SAAS,EAC7F,mBAAmB,EAAE,wBAAwB,IAE5C,KAAK,CAAC,cAAc,IAAI,CACvB;YACE,oBAAC,KAAK,IAAC,SAAS,EAAE,WAAW,CAAC,uBAAuB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,GAAI;YACjF,oBAAC,KAAK,IAAC,eAAe,EAAC,QAAQ,EAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,WAAW,CAAC,oBAAoB,CAAC,IAChG,KAAK,CAAC,cAAc,CACf,CACP,CACJ,CACS,CACN,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect } from 'react';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport {\n StreamMedia,\n VideoGalleryStream,\n VideoTile,\n useTheme,\n VideoStreamOptions,\n CreateVideoStreamViewResult\n} from '@internal/react-components';\nimport {\n containerStyles,\n overlayBackgroundStyles,\n overlayContentStyles,\n videoTileStyles\n} from '../styles/ExpandedLocalVideoTile.styles';\n\nconst onRenderEmptyPlaceholder = (): JSX.Element => <></>;\n\nconst localVideoViewOptions = {\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions;\n\n/**\n * @private\n */\nexport interface ExpandedLocalVideoTileProps {\n localParticipantVideoStream: VideoGalleryStream;\n onCreateLocalStreamView?: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;\n overlayContent?: JSX.Element;\n}\n\n/**\n * @private\n */\nexport const ExpandedLocalVideoTile = (props: ExpandedLocalVideoTileProps): JSX.Element => {\n const videoStream = props.localParticipantVideoStream;\n const isVideoReady = videoStream?.isAvailable ?? false;\n const renderElement = videoStream?.renderElement;\n const palette = useTheme().palette;\n\n useEffect(() => {\n if (videoStream && isVideoReady) {\n props.onCreateLocalStreamView &&\n props.onCreateLocalStreamView(localVideoViewOptions).catch((err) => console.log('Can not render video', err));\n }\n }, [isVideoReady, videoStream, props, renderElement]);\n return (\n <Stack horizontalAlign=\"center\" verticalAlign=\"center\" styles={containerStyles} grow>\n <VideoTile\n styles={videoTileStyles}\n renderElement={renderElement ? <StreamMedia videoStreamElement={renderElement} /> : undefined}\n onRenderPlaceholder={onRenderEmptyPlaceholder}\n >\n {props.overlayContent && (\n <>\n <Stack className={mergeStyles(overlayBackgroundStyles(palette, isVideoReady))} />\n <Stack horizontalAlign=\"center\" verticalAlign=\"center\" className={mergeStyles(overlayContentStyles)}>\n {props.overlayContent}\n </Stack>\n </>\n )}\n </VideoTile>\n </Stack>\n );\n};\n"]}
1
+ {"version":3,"file":"ExpandedLocalVideoTile.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/components/ExpandedLocalVideoTile.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,i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B,EAAE,wBAAwB,IAE5C,KAAK,CAAC,cAAc,IAAI,CACvB;YACE,oBAAC,KAAK,IAAC,SAAS,EAAE,WAAW,CAAC,uBAAuB,CAAC,YAAY,CAAC,CAAC,GAAI;YACxE,oBAAC,KAAK,IAAC,eAAe,EAAC,QAAQ,EAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,WAAW,CAAC,oBAAoB,CAAC,IAChG,KAAK,CAAC,cAAc,CACf,CACP,CACJ,CACS,CACN,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useEffect } from 'react';\nimport { mergeStyles, Stack } from '@fluentui/react';\nimport {\n StreamMedia,\n VideoGalleryStream,\n VideoTile,\n VideoStreamOptions,\n CreateVideoStreamViewResult\n} from '@internal/react-components';\nimport {\n containerStyles,\n overlayBackgroundStyles,\n overlayContentStyles,\n videoTileStyles\n} from '../styles/ExpandedLocalVideoTile.styles';\n\nconst onRenderEmptyPlaceholder = (): JSX.Element => <></>;\n\nconst localVideoViewOptions = {\n scalingMode: 'Crop',\n isMirrored: true\n} as VideoStreamOptions;\n\n/**\n * @private\n */\nexport interface ExpandedLocalVideoTileProps {\n localParticipantVideoStream: VideoGalleryStream;\n onCreateLocalStreamView?: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;\n overlayContent?: JSX.Element;\n}\n\n/**\n * @private\n */\nexport const ExpandedLocalVideoTile = (props: ExpandedLocalVideoTileProps): JSX.Element => {\n const videoStream = props.localParticipantVideoStream;\n const isVideoReady = videoStream?.isAvailable ?? false;\n const renderElement = videoStream?.renderElement;\n\n useEffect(() => {\n if (videoStream && isVideoReady) {\n props.onCreateLocalStreamView &&\n props.onCreateLocalStreamView(localVideoViewOptions).catch((err) => console.log('Can not render video', err));\n }\n }, [isVideoReady, videoStream, props, renderElement]);\n return (\n <Stack horizontalAlign=\"center\" verticalAlign=\"center\" styles={containerStyles} grow>\n <VideoTile\n styles={videoTileStyles}\n renderElement={renderElement ? <StreamMedia videoStreamElement={renderElement} /> : undefined}\n onRenderPlaceholder={onRenderEmptyPlaceholder}\n >\n {props.overlayContent && (\n <>\n <Stack className={mergeStyles(overlayBackgroundStyles(isVideoReady))} />\n <Stack horizontalAlign=\"center\" verticalAlign=\"center\" className={mergeStyles(overlayContentStyles)}>\n {props.overlayContent}\n </Stack>\n </>\n )}\n </VideoTile>\n </Stack>\n );\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import { IStackStyles } from '@fluentui/react';
2
- import { IPalette, IStyle } from '@fluentui/react';
2
+ import { IStyle } from '@fluentui/react';
3
3
  /**
4
4
  * @private
5
5
  */
@@ -7,7 +7,7 @@ export declare const containerStyles: IStackStyles;
7
7
  /**
8
8
  * @private
9
9
  */
10
- export declare const overlayBackgroundStyles: (palette: IPalette, isVideoReady: boolean) => IStyle;
10
+ export declare const overlayBackgroundStyles: (isVideoReady: boolean) => IStyle;
11
11
  /**
12
12
  * @private
13
13
  */
@@ -11,19 +11,20 @@ export const containerStyles = {
11
11
  root: {
12
12
  height: '100%',
13
13
  width: '100%',
14
- position: 'relative'
14
+ position: 'relative',
15
+ padding: '0.5rem'
15
16
  }
16
17
  };
17
18
  /**
18
19
  * @private
19
20
  */
20
- export const overlayBackgroundStyles = (palette, isVideoReady) => {
21
+ export const overlayBackgroundStyles = (isVideoReady) => {
21
22
  return {
22
23
  position: 'absolute',
23
24
  height: '100%',
24
25
  width: '100%',
25
- background: isVideoReady ? 'black' : palette.neutralLighterAlt,
26
- opacity: isVideoReady ? 0.6 : 1,
26
+ background: isVideoReady ? 'black' : undefined,
27
+ opacity: isVideoReady ? 0.6 : undefined,
27
28
  zIndex: OVERLAY_BACKGROUND_ZINDEX
28
29
  };
29
30
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandedLocalVideoTile.styles.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/styles/ExpandedLocalVideoTile.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,2EAA2E;AAC3E,8DAA8D;AAC9D,MAAM,yBAAyB,GAAG,CAAC,CAAC;AACpC,MAAM,sBAAsB,GAAG,yBAAyB,GAAG,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAiB;IAC3C,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,UAAU;KACrB;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAyD,CAC3F,OAAO,EACP,YAAY,EACZ,EAAE;IACF,OAAO;QACL,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,iBAAiB;QAC9D,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAC/B,MAAM,EAAE,yBAAyB;KAClC,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAW;IAC1C,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,sBAAsB;CAC/B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;CACxC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IStackStyles } from '@fluentui/react';\nimport { IPalette, IStyle } from '@fluentui/react';\n\n// By default, absolute positioned elements are overlayed over static ones.\n// So we need to explicitly layer the background and contents.\nconst OVERLAY_BACKGROUND_ZINDEX = 0;\nconst OVERLAY_CONTENT_ZINDEX = OVERLAY_BACKGROUND_ZINDEX + 1;\n\n/**\n * @private\n */\nexport const containerStyles: IStackStyles = {\n root: {\n height: '100%',\n width: '100%',\n position: 'relative'\n }\n};\n\n/**\n * @private\n */\nexport const overlayBackgroundStyles: (palette: IPalette, isVideoReady: boolean) => IStyle = (\n palette,\n isVideoReady\n) => {\n return {\n position: 'absolute',\n height: '100%',\n width: '100%',\n background: isVideoReady ? 'black' : palette.neutralLighterAlt,\n opacity: isVideoReady ? 0.6 : 1,\n zIndex: OVERLAY_BACKGROUND_ZINDEX\n };\n};\n\n/**\n * @private\n */\nexport const overlayContentStyles: IStyle = {\n height: '100%',\n width: '100%',\n zIndex: OVERLAY_CONTENT_ZINDEX\n};\n\n/**\n * @private\n */\nexport const videoTileStyles = {\n root: { height: '100%', width: '100%' }\n};\n"]}
1
+ {"version":3,"file":"ExpandedLocalVideoTile.styles.js","sourceRoot":"","sources":["../../../../../../../../react-composites/src/composites/CallComposite/styles/ExpandedLocalVideoTile.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAKlC,2EAA2E;AAC3E,8DAA8D;AAC9D,MAAM,yBAAyB,GAAG,CAAC,CAAC;AACpC,MAAM,sBAAsB,GAAG,yBAAyB,GAAG,CAAC,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAiB;IAC3C,IAAI,EAAE;QACJ,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,QAAQ;KAClB;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAsC,CAAC,YAAY,EAAE,EAAE;IACzF,OAAO;QACL,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,MAAM;QACd,KAAK,EAAE,MAAM;QACb,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS;QAC9C,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS;QACvC,MAAM,EAAE,yBAAyB;KAClC,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAW;IAC1C,MAAM,EAAE,MAAM;IACd,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,sBAAsB;CAC/B,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;CACxC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IStackStyles } from '@fluentui/react';\nimport { IStyle } from '@fluentui/react';\n\n// By default, absolute positioned elements are overlayed over static ones.\n// So we need to explicitly layer the background and contents.\nconst OVERLAY_BACKGROUND_ZINDEX = 0;\nconst OVERLAY_CONTENT_ZINDEX = OVERLAY_BACKGROUND_ZINDEX + 1;\n\n/**\n * @private\n */\nexport const containerStyles: IStackStyles = {\n root: {\n height: '100%',\n width: '100%',\n position: 'relative',\n padding: '0.5rem'\n }\n};\n\n/**\n * @private\n */\nexport const overlayBackgroundStyles: (isVideoReady: boolean) => IStyle = (isVideoReady) => {\n return {\n position: 'absolute',\n height: '100%',\n width: '100%',\n background: isVideoReady ? 'black' : undefined,\n opacity: isVideoReady ? 0.6 : undefined,\n zIndex: OVERLAY_BACKGROUND_ZINDEX\n };\n};\n\n/**\n * @private\n */\nexport const overlayContentStyles: IStyle = {\n height: '100%',\n width: '100%',\n zIndex: OVERLAY_CONTENT_ZINDEX\n};\n\n/**\n * @private\n */\nexport const videoTileStyles = {\n root: { height: '100%', width: '100%' }\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/communication-react",
3
- "version": "1.22.0-alpha-202411190017",
3
+ "version": "1.22.0-alpha-202411210017",
4
4
  "sideEffects": false,
5
5
  "description": "React library for building modern communication user experiences utilizing Azure Communication Services",
6
6
  "keywords": [