@azure/communication-react 1.13.0-alpha-202402220012 → 1.13.0-alpha-202402240011

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 (130) hide show
  1. package/dist/communication-react.d.ts +67 -11
  2. package/dist/dist-cjs/communication-react/index.js +426 -110
  3. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  4. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  5. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  6. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.d.ts +5 -4
  7. package/dist/dist-esm/calling-component-bindings/src/baseSelectors.js.map +1 -1
  8. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.d.ts +5 -5
  9. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js +1 -1
  10. package/dist/dist-esm/calling-component-bindings/src/captionsSelector.js.map +1 -1
  11. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.d.ts +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js +2 -2
  13. package/dist/dist-esm/calling-component-bindings/src/handlers/createCommonHandlers.js.map +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/index.d.ts +1 -0
  15. package/dist/dist-esm/calling-component-bindings/src/index.js.map +1 -1
  16. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js +1 -1
  17. package/dist/dist-esm/calling-component-bindings/src/utils/participantListSelectorUtils.js.map +1 -1
  18. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.d.ts +3 -1
  19. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +5 -4
  20. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  21. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +4 -4
  22. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  23. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +1 -1
  24. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  25. package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js +1 -1
  26. package/dist/dist-esm/chat-stateful-client/src/ResourceDownloadQueue.js.map +1 -1
  27. package/dist/dist-esm/communication-react/src/index.d.ts +1 -0
  28. package/dist/dist-esm/communication-react/src/index.js.map +1 -1
  29. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.d.ts +7 -7
  30. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js +11 -17
  31. package/dist/dist-esm/react-components/src/components/CaptionsSettingsModal.js.map +1 -1
  32. package/dist/dist-esm/react-components/src/components/Dialpad/DTMFToneGenerator.d.ts +7 -0
  33. package/dist/dist-esm/react-components/src/components/Dialpad/DTMFToneGenerator.js.map +1 -1
  34. package/dist/dist-esm/react-components/src/components/Dialpad/Dialpad.js.map +1 -1
  35. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js +3 -3
  36. package/dist/dist-esm/react-components/src/components/LocalVideoTile.js.map +1 -1
  37. package/dist/dist-esm/react-components/src/components/MessageStatusIcon.d.ts +19 -0
  38. package/dist/dist-esm/react-components/src/components/MessageStatusIcon.js +20 -0
  39. package/dist/dist-esm/react-components/src/components/MessageStatusIcon.js.map +1 -0
  40. package/dist/dist-esm/react-components/src/components/MessageStatusIndicator.js +4 -64
  41. package/dist/dist-esm/react-components/src/components/MessageStatusIndicator.js.map +1 -1
  42. package/dist/dist-esm/react-components/src/components/MessageStatusIndicatorInternal.d.ts +42 -0
  43. package/dist/dist-esm/react-components/src/components/MessageStatusIndicatorInternal.js +73 -0
  44. package/dist/dist-esm/react-components/src/components/MessageStatusIndicatorInternal.js.map +1 -0
  45. package/dist/dist-esm/react-components/src/components/MessageThread.js +36 -4
  46. package/dist/dist-esm/react-components/src/components/MessageThread.js.map +1 -1
  47. package/dist/dist-esm/react-components/src/components/ModalClone/ModalClone.js.map +1 -1
  48. package/dist/dist-esm/react-components/src/components/ParticipantItem.d.ts +2 -0
  49. package/dist/dist-esm/react-components/src/components/ParticipantItem.js.map +1 -1
  50. package/dist/dist-esm/react-components/src/components/ParticipantList.js +4 -8
  51. package/dist/dist-esm/react-components/src/components/ParticipantList.js.map +1 -1
  52. package/dist/dist-esm/react-components/src/components/RTE/RTEInputBoxComponent.d.ts +2 -0
  53. package/dist/dist-esm/react-components/src/components/RTE/RTEInputBoxComponent.js +1 -1
  54. package/dist/dist-esm/react-components/src/components/RTE/RTEInputBoxComponent.js.map +1 -1
  55. package/dist/dist-esm/react-components/src/components/RTE/RTERibbonButtons.d.ts +12 -0
  56. package/dist/dist-esm/react-components/src/components/RTE/RTERibbonButtons.js +86 -0
  57. package/dist/dist-esm/react-components/src/components/RTE/RTERibbonButtons.js.map +1 -0
  58. package/dist/dist-esm/react-components/src/components/RTE/RTESendBox.d.ts +39 -4
  59. package/dist/dist-esm/react-components/src/components/RTE/RTESendBox.js +10 -5
  60. package/dist/dist-esm/react-components/src/components/RTE/RTESendBox.js.map +1 -1
  61. package/dist/dist-esm/react-components/src/components/RTE/RichTextEditor.d.ts +2 -0
  62. package/dist/dist-esm/react-components/src/components/RTE/RichTextEditor.js +52 -20
  63. package/dist/dist-esm/react-components/src/components/RTE/RichTextEditor.js.map +1 -1
  64. package/dist/dist-esm/react-components/src/components/ReactionButton.d.ts +1 -1
  65. package/dist/dist-esm/react-components/src/components/ReactionButton.js +1 -1
  66. package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
  67. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.d.ts +1 -1
  68. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js +4 -6
  69. package/dist/dist-esm/react-components/src/components/RemoteVideoTile.js.map +1 -1
  70. package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.d.ts +4 -6
  71. package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js +21 -11
  72. package/dist/dist-esm/react-components/src/components/Survey/TagsSurvey/TagsSurvey.js.map +1 -1
  73. package/dist/dist-esm/react-components/src/components/VideoGallery/utils/videoGalleryLayoutUtils.js.map +1 -1
  74. package/dist/dist-esm/react-components/src/components/VideoGallery.d.ts +2 -0
  75. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  76. package/dist/dist-esm/react-components/src/components/VideoTile.js +1 -1
  77. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  78. package/dist/dist-esm/react-components/src/components/index.d.ts +2 -2
  79. package/dist/dist-esm/react-components/src/components/index.js +1 -1
  80. package/dist/dist-esm/react-components/src/components/index.js.map +1 -1
  81. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +13 -0
  82. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +112 -0
  83. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
  84. package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.d.ts +2 -2
  85. package/dist/dist-esm/react-components/src/components/utils/videoTileStylesUtils.js.map +1 -1
  86. package/dist/dist-esm/react-components/src/components/utils.d.ts +8 -1
  87. package/dist/dist-esm/react-components/src/components/utils.js +8 -0
  88. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  89. package/dist/dist-esm/react-components/src/index.d.ts +1 -1
  90. package/dist/dist-esm/react-components/src/index.js.map +1 -1
  91. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.d.ts +3 -2
  92. package/dist/dist-esm/react-components/src/localization/LocalizationProvider.js.map +1 -1
  93. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +21 -4
  94. package/dist/dist-esm/react-components/src/localization/locales/utils.js +5 -1
  95. package/dist/dist-esm/react-components/src/localization/locales/utils.js.map +1 -1
  96. package/dist/dist-esm/react-components/src/theming/icons.d.ts +8 -0
  97. package/dist/dist-esm/react-components/src/theming/icons.js +19 -1
  98. package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
  99. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.d.ts +21 -0
  100. package/dist/dist-esm/react-components/src/types/CaptionsAvailableLanguageStrings.js.map +1 -1
  101. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.d.ts +1 -1
  102. package/dist/dist-esm/react-components/src/types/ParticipantListParticipant.js.map +1 -1
  103. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.d.ts +1 -1
  104. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +7 -3
  105. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
  106. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.d.ts +1 -1
  107. package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/CallAdapter.js.map +1 -1
  108. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js +2 -2
  109. package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalAndRemotePIP.js.map +1 -1
  110. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js +2 -2
  111. package/dist/dist-esm/react-composites/src/composites/CallComposite/hooks/useHandlers.js.map +1 -1
  112. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +1 -1
  113. package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
  114. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.d.ts +1 -1
  115. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js +3 -3
  116. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/AzureCommunicationCallWithChatAdapter.js.map +1 -1
  117. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.d.ts +1 -1
  118. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatAdapter.js.map +1 -1
  119. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.d.ts +1 -1
  120. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js +1 -1
  121. package/dist/dist-esm/react-composites/src/composites/CallWithChatComposite/adapter/CallWithChatBackedCallAdapter.js.map +1 -1
  122. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js +1 -1
  123. package/dist/dist-esm/react-composites/src/composites/ChatComposite/ChatScreen.js.map +1 -1
  124. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js +3 -5
  125. package/dist/dist-esm/react-composites/src/composites/common/Drawer/MoreDrawer.js.map +1 -1
  126. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js +5 -2
  127. package/dist/dist-esm/react-composites/src/composites/common/ModalLocalAndRemotePIP.js.map +1 -1
  128. package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +8 -0
  129. package/dist/tsdoc-metadata.json +1 -1
  130. package/package.json +7 -7
@@ -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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cAAc;gBACZ,OAAO,iBAAiB,KAAK,QAAQ;gBACrC,aAAa,IAAI;gBACf,GAAG,EAAE,iBAAiB;aACvB;YACH,mBAAmB,IAAI;gBACrB,MAAM,EAAE,MAAM;aACf;YACD,kBAAkB;SACnB;QACD,iBAAiB,EAAE;YACjB,UAAU,CAAC,iBAAiB;YAC5B;gBACE,SAAS,EAAE,MAAM;gBACjB,QAAQ,EAAE,CAAC;gBACX,SAAS,EAAE,OAAO;gBAClB,SAAS,EAAE;oBACT,CAAC,+CAA+C,CAAC,EAAE;wBACjD,SAAS,EAAE,iBAAiB;qBAC7B;iBACF;aACF;YACD,0BAA0B;SAC3B;QACD,KAAK,EAAE,UAAU,IAAI;YACnB,cAAc;YACd,UAAU,CAAC,KAAK;YAChB;gBACE,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,OAAO;gBACd,MAAM,EAAE,OAAO;aAChB;SACF;QACD,yBAAyB,EAAE;YACzB,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE,MAAM;YACf,cAAc,EAAE,QAAQ;YACxB,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,SAAS;SACnB;QACD,gBAAgB,EAAE;YAChB,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,QAAQ;YACnC,KAAK,EAAE,MAAM;SACd;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB;AAChB,MAAM,CAAC,MAAM,WAAW,GAAkD,MAAM,CAI9E,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE;IACjC,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,0BAA0B,CAAC;CACxD,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAG,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable react/prop-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport * as React from 'react';\nimport { useBoolean, useMergedRefs, useConst, useSetTimeout, useId, useUnmount } from '@fluentui/react-hooks';\nimport {\n allowOverscrollOnElement,\n allowScrollOnElement,\n AnimationVariables,\n classNamesFunction,\n DirectionalHint,\n elementContains,\n EventGroup,\n FocusTrapZone,\n getGlobalClassNames,\n getPropsWithDefaults,\n Icon,\n IDragOptions,\n IFocusTrapZone,\n ILayerProps,\n IModalProps,\n IModalStyleProps,\n IModalStyles,\n KeyCodes,\n Layer,\n memoizeFunction,\n mergeStyles,\n on,\n Overlay,\n Popup,\n ResponsiveMode,\n styled,\n useResponsiveMode,\n ZIndexes\n} from '@fluentui/react';\nimport { useWindow } from '@fluentui/react-window-provider';\n\n// @TODO - need to change this to a panel whenever the breakpoint is under medium (verify the spec)\n\n/** @internal */\nexport interface _ExtendedIModalProps extends IModalProps {\n minDragPosition?: _ICoordinates;\n maxDragPosition?: _ICoordinates;\n}\n\nconst animationDuration = AnimationVariables.durationValue2;\n/** @internal */\nexport type _ICoordinates = { x: number; y: number };\n\ninterface IModalInternalState {\n onModalCloseTimer: number;\n allowTouchBodyScroll?: boolean;\n scrollableContent: HTMLDivElement | null;\n lastSetCoordinates: _ICoordinates;\n /** Minimum clamped position, if dragging and clamping (`dragOptions.keepInBounds`) are enabled */\n minPosition?: _ICoordinates;\n /** Maximum clamped position, if dragging and clamping (`dragOptions.keepInBounds`) are enabled */\n maxPosition?: _ICoordinates;\n events: EventGroup;\n /** Ensures we dispose the same keydown callback as was registered */\n disposeOnKeyDown?: () => void;\n /** Ensures we dispose the same keyup callback as was registered (also tracks whether keyup has been registered) */\n disposeOnKeyUp?: () => void;\n isInKeyboardMoveMode?: boolean;\n hasBeenOpened?: boolean;\n}\n\nconst ZERO: _ICoordinates = { x: 0, y: 0 };\n\nconst DEFAULT_PROPS: Partial<_ExtendedIModalProps> = {\n isOpen: false,\n isDarkOverlay: true,\n className: '',\n containerClassName: '',\n enableAriaHiddenSiblings: true\n};\n\nconst getModalClassNames = classNamesFunction<IModalStyleProps, IModalStyles>();\n\nconst getMoveDelta = (ev: React.KeyboardEvent<HTMLElement>): number => {\n let delta = 10;\n if (ev.shiftKey) {\n if (!ev.ctrlKey) {\n delta = 50;\n }\n } else if (ev.ctrlKey) {\n delta = 1;\n }\n\n return delta;\n};\n\nconst useComponentRef = (props: IModalProps, focusTrapZone: React.RefObject<IFocusTrapZone>) => {\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n focus() {\n if (focusTrapZone.current) {\n focusTrapZone.current.focus();\n }\n }\n }),\n [focusTrapZone]\n );\n};\n\nconst ModalBase: React.FunctionComponent<_ExtendedIModalProps> = React.forwardRef<HTMLDivElement, _ExtendedIModalProps>(\n (propsWithoutDefaults, ref) => {\n const props = getPropsWithDefaults(DEFAULT_PROPS, propsWithoutDefaults);\n const {\n allowTouchBodyScroll,\n className,\n children,\n containerClassName,\n scrollableContentClassName,\n elementToFocusOnDismiss,\n firstFocusableSelector,\n forceFocusInsideTrap,\n ignoreExternalFocusing,\n isBlocking,\n isAlert,\n isClickableOutsideFocusTrap,\n isDarkOverlay,\n onDismiss,\n layerProps,\n overlay,\n isOpen,\n titleAriaId,\n styles,\n subtitleAriaId,\n theme,\n topOffsetFixed,\n responsiveMode,\n onLayerDidMount,\n isModeless,\n dragOptions,\n onDismissed,\n minDragPosition,\n maxDragPosition\n } = props;\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const focusTrapZone = React.useRef<IFocusTrapZone>(null);\n const focusTrapZoneElm = React.useRef<HTMLDivElement>(null);\n const mergedRef = useMergedRefs(rootRef, ref);\n\n const modalResponsiveMode = useResponsiveMode(mergedRef);\n\n const focusTrapZoneId = useId('ModalFocusTrapZone');\n\n const win = useWindow();\n\n const { setTimeout, clearTimeout } = useSetTimeout();\n\n const [isModalOpen, setIsModalOpen] = React.useState(isOpen);\n const [isVisible, setIsVisible] = React.useState(isOpen);\n const [coordinates, setCoordinates] = React.useState<_ICoordinates>(ZERO);\n const [modalRectangleTop, setModalRectangleTop] = React.useState<number | undefined>();\n\n const [isModalMenuOpen, { toggle: toggleModalMenuOpen, setFalse: setModalMenuClose }] = useBoolean(false);\n\n const internalState = useConst<IModalInternalState>(() => ({\n onModalCloseTimer: 0,\n allowTouchBodyScroll,\n scrollableContent: null,\n lastSetCoordinates: ZERO,\n events: new EventGroup({})\n }));\n\n const { keepInBounds } = dragOptions || ({} as IDragOptions);\n const isAlertRole = isAlert ?? (isBlocking && !isModeless);\n\n const layerClassName = layerProps === undefined ? '' : layerProps.className;\n const classNames = getModalClassNames(styles, {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n theme: theme!,\n className,\n containerClassName,\n scrollableContentClassName,\n isOpen,\n isVisible,\n hasBeenOpened: internalState.hasBeenOpened,\n modalRectangleTop,\n topOffsetFixed,\n isModeless,\n layerClassName,\n windowInnerHeight: win?.innerHeight,\n isDefaultDragHandle: dragOptions && !dragOptions.dragHandleSelector\n });\n\n const mergedLayerProps: ILayerProps = {\n eventBubblingEnabled: false,\n ...layerProps,\n onLayerDidMount: layerProps && layerProps.onLayerDidMount ? layerProps.onLayerDidMount : onLayerDidMount,\n insertFirst: isModeless,\n className: classNames.layer\n };\n\n // Allow the user to scroll within the modal but not on the body\n const allowScrollOnModal = React.useCallback(\n (elt: HTMLDivElement | null): void => {\n if (elt) {\n if (internalState.allowTouchBodyScroll) {\n allowOverscrollOnElement(elt, internalState.events);\n } else {\n allowScrollOnElement(elt, internalState.events);\n }\n } else {\n internalState.events.off(internalState.scrollableContent);\n }\n internalState.scrollableContent = elt;\n },\n [internalState]\n );\n\n const registerInitialModalPosition = (): void => {\n const dialogMain = focusTrapZoneElm.current;\n const modalRectangle = dialogMain?.getBoundingClientRect();\n\n if (modalRectangle) {\n if (topOffsetFixed) {\n setModalRectangleTop(modalRectangle.top);\n }\n\n if (keepInBounds) {\n // x/y are unavailable in IE, so use the equivalent left/top\n internalState.minPosition = minDragPosition ?? { x: -modalRectangle.left, y: -modalRectangle.top };\n internalState.maxPosition = maxDragPosition ?? { x: modalRectangle.left, y: modalRectangle.top };\n\n // Make sure the initial co-ordinates are within clamp bounds.\n setCoordinates({\n x: getClampedAxis('x', coordinates.x),\n y: getClampedAxis('y', coordinates.y)\n });\n }\n }\n };\n\n /**\n * Clamps an axis to a specified min and max position.\n *\n * @param axis A string that represents the axis (x/y).\n * @param position The position on the axis.\n */\n const getClampedAxis = React.useCallback(\n (axis: keyof _ICoordinates, position: number) => {\n const { minPosition, maxPosition } = internalState;\n if (keepInBounds && minPosition && maxPosition) {\n position = Math.max(minPosition[axis], position);\n position = Math.min(maxPosition[axis], position);\n }\n return position;\n },\n [keepInBounds, internalState]\n );\n\n const handleModalClose = (): void => {\n internalState.lastSetCoordinates = ZERO;\n\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = false;\n setIsModalOpen(false);\n setCoordinates(ZERO);\n\n internalState.disposeOnKeyUp?.();\n\n onDismissed?.();\n };\n\n const handleDragStart = React.useCallback((): void => {\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = false;\n }, [internalState, setModalMenuClose]);\n\n const handleDrag = React.useCallback(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (ev: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: any): void => {\n setCoordinates((prevValue) => ({\n x: getClampedAxis('x', prevValue.x + dragData.delta.x),\n y: getClampedAxis('y', prevValue.y + dragData.delta.y)\n }));\n },\n [getClampedAxis]\n );\n\n const handleDragStop = React.useCallback((): void => {\n if (focusTrapZone.current) {\n focusTrapZone.current.focus();\n }\n }, []);\n\n const handleEnterKeyboardMoveMode = () => {\n // We need a global handleKeyDown event when we are in the move mode so that we can\n // handle the key presses and the components inside the modal do not get the events\n const handleKeyDown = (ev: React.KeyboardEvent<HTMLElement>): void => {\n if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) {\n // CTRL + ALT + SPACE is handled during keyUp\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n const newLocal = ev.altKey || ev.keyCode === KeyCodes.escape;\n if (isModalMenuOpen && newLocal) {\n setModalMenuClose();\n }\n\n if (internalState.isInKeyboardMoveMode && (ev.keyCode === KeyCodes.escape || ev.keyCode === KeyCodes.enter)) {\n internalState.isInKeyboardMoveMode = false;\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n if (internalState.isInKeyboardMoveMode) {\n let handledEvent = true;\n const delta = getMoveDelta(ev);\n\n switch (ev.keyCode) {\n /* eslint-disable no-fallthrough */\n case KeyCodes.escape:\n setCoordinates(internalState.lastSetCoordinates);\n case KeyCodes.enter: {\n // TODO: determine if fallthrough was intentional\n /* eslint-enable no-fallthrough */\n internalState.lastSetCoordinates = ZERO;\n // setIsInKeyboardMoveMode(false);\n break;\n }\n case KeyCodes.up: {\n setCoordinates((prevValue) => ({ x: prevValue.x, y: getClampedAxis('y', prevValue.y - delta) }));\n break;\n }\n case KeyCodes.down: {\n setCoordinates((prevValue) => ({ x: prevValue.x, y: getClampedAxis('y', prevValue.y + delta) }));\n break;\n }\n case KeyCodes.left: {\n setCoordinates((prevValue) => ({ x: getClampedAxis('x', prevValue.x - delta), y: prevValue.y }));\n break;\n }\n case KeyCodes.right: {\n setCoordinates((prevValue) => ({ x: getClampedAxis('x', prevValue.x + delta), y: prevValue.y }));\n break;\n }\n default: {\n handledEvent = false;\n }\n }\n if (handledEvent) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n }\n };\n\n internalState.lastSetCoordinates = coordinates;\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = true;\n\n internalState.events.on(win, 'keydown', handleKeyDown, true /* useCapture */);\n internalState.disposeOnKeyDown = () => {\n internalState.events.off(win, 'keydown', handleKeyDown, true /* useCapture */);\n internalState.disposeOnKeyDown = undefined;\n };\n };\n\n const handleExitKeyboardMoveMode = () => {\n internalState.lastSetCoordinates = ZERO;\n internalState.isInKeyboardMoveMode = false;\n internalState.disposeOnKeyDown?.();\n };\n\n const registerForKeyUp = (): void => {\n const handleKeyUp = (ev: React.KeyboardEvent<HTMLElement>): void => {\n // Needs to handle the CTRL + ALT + SPACE key during keyup due to FireFox bug:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143\n if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) {\n if (elementContains(internalState.scrollableContent, ev.target as HTMLElement)) {\n toggleModalMenuOpen();\n ev.preventDefault();\n ev.stopPropagation();\n }\n }\n };\n\n if (!internalState.disposeOnKeyUp) {\n internalState.events.on(win, 'keyup', handleKeyUp, true /* useCapture */);\n internalState.disposeOnKeyUp = () => {\n internalState.events.off(win, 'keyup', handleKeyUp, true /* useCapture */);\n internalState.disposeOnKeyUp = undefined;\n };\n }\n };\n\n React.useEffect(() => {\n clearTimeout(internalState.onModalCloseTimer);\n // Opening the dialog\n if (isOpen) {\n // This must be done after the modal content has rendered\n requestAnimationFrame(() => setTimeout(registerInitialModalPosition, 0));\n\n setIsModalOpen(true);\n\n // Add a keyUp handler for all key up events once the dialog is open.\n if (dragOptions) {\n registerForKeyUp();\n }\n\n internalState.hasBeenOpened = true;\n setIsVisible(true);\n }\n\n // Closing the dialog\n if (!isOpen && isModalOpen) {\n internalState.onModalCloseTimer = setTimeout(handleModalClose, parseFloat(animationDuration) * 1000);\n setIsVisible(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- should only run if isModalOpen or isOpen mutates or if min/max drag bounds are updated.\n }, [isModalOpen, isOpen, minDragPosition, maxDragPosition]);\n\n useUnmount(() => {\n internalState.events.dispose();\n });\n\n useComponentRef(props, focusTrapZone);\n\n const modalContent = (\n <FocusTrapZone\n disabled={true}\n id={focusTrapZoneId}\n ref={focusTrapZoneElm}\n componentRef={focusTrapZone}\n className={classNames.main}\n elementToFocusOnDismiss={elementToFocusOnDismiss}\n isClickableOutsideFocusTrap={isModeless || isClickableOutsideFocusTrap || !isBlocking}\n ignoreExternalFocusing={ignoreExternalFocusing}\n forceFocusInsideTrap={forceFocusInsideTrap && !isModeless}\n firstFocusableSelector={firstFocusableSelector}\n focusPreviouslyFocusedInnerElement\n onBlur={internalState.isInKeyboardMoveMode ? handleExitKeyboardMoveMode : undefined}\n data-ui-id={props['data-ui-id']}\n // enableAriaHiddenSiblings is handled by the Popup\n >\n {dragOptions && internalState.isInKeyboardMoveMode && (\n <div className={classNames.keyboardMoveIconContainer}>\n {dragOptions.keyboardMoveIconProps ? (\n <Icon {...dragOptions.keyboardMoveIconProps} />\n ) : (\n <Icon iconName=\"move\" className={classNames.keyboardMoveIcon} />\n )}\n </div>\n )}\n <div ref={allowScrollOnModal} className={classNames.scrollableContent} data-is-scrollable>\n {dragOptions && isModalMenuOpen && (\n <dragOptions.menu\n items={[\n { key: 'move', text: dragOptions.moveMenuItemText, onClick: handleEnterKeyboardMoveMode },\n { key: 'close', text: dragOptions.closeMenuItemText, onClick: handleModalClose }\n ]}\n onDismiss={setModalMenuClose}\n alignTargetEdge\n coverTarget\n directionalHint={DirectionalHint.topLeftEdge}\n directionalHintFixed\n shouldFocusOnMount\n target={internalState.scrollableContent}\n />\n )}\n {children}\n </div>\n </FocusTrapZone>\n );\n\n return (\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n (isModalOpen && modalResponsiveMode! >= (responsiveMode || ResponsiveMode.small) && (\n <Layer ref={mergedRef} {...mergedLayerProps}>\n <Popup\n role={isAlertRole ? 'alertdialog' : 'dialog'}\n ariaLabelledBy={titleAriaId}\n ariaDescribedBy={subtitleAriaId}\n // onDismiss={onDismiss}\n shouldRestoreFocus={!ignoreExternalFocusing}\n // Modeless modals shouldn't hide siblings.\n // Popup will automatically handle this based on the aria-modal setting.\n // enableAriaHiddenSiblings={enableAriaHiddenSiblings}\n aria-modal={!isModeless}\n >\n <div className={classNames.root} role={!isModeless ? 'document' : undefined}>\n {!isModeless && (\n <Overlay\n aria-hidden={true}\n isDarkThemed={isDarkOverlay}\n onClick={isBlocking ? undefined : onDismiss}\n allowTouchBodyScroll={allowTouchBodyScroll}\n {...overlay}\n />\n )}\n {dragOptions ? (\n <DraggableZone\n handleSelector={dragOptions.dragHandleSelector || `#${focusTrapZoneId}`}\n preventDragSelector=\"button\"\n onStart={handleDragStart}\n onDragChange={handleDrag}\n onStop={handleDragStop}\n position={coordinates}\n >\n {modalContent}\n </DraggableZone>\n ) : (\n modalContent\n )}\n </div>\n </Popup>\n </Layer>\n )) ||\n null\n );\n }\n);\nModalBase.displayName = 'ModalBase';\n\ninterface IDraggableZoneStyles {\n root: string;\n}\n\nconst getDraggableZoneClassNames = memoizeFunction((className: string, isDragging: boolean): IDraggableZoneStyles => {\n return {\n root: mergeStyles(\n className,\n isDragging && {\n touchAction: 'none',\n selectors: {\n '& *': {\n userSelect: 'none'\n }\n }\n }\n )\n };\n});\n\ninterface IDragData {\n position: _ICoordinates;\n lastPosition?: _ICoordinates;\n delta: _ICoordinates;\n}\n\ninterface IDraggableZoneProps extends React.HTMLAttributes<HTMLDivElement> {\n /**\n * Specifies a selector to be used as the handle that initiates drag\n */\n handleSelector?: string;\n\n /**\n * Specifies a selector to be used to prevent drag initialization.\n * For example, if you do not want buttons inside of your handleSelector\n * to have the cursor change to move or to allow users to select from buttons,\n * you could pass button here (the close button in the header of a dialog is a concrete example)\n */\n preventDragSelector?: string;\n\n /**\n * the X and Y coordinates to use as an offest to position the draggable content\n */\n position?: _ICoordinates;\n\n /**\n * Callback for when dragging starts\n */\n onStart?: (event: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: IDragData) => void;\n\n /**\n * Callback for when the drag changes, while dragging\n */\n onDragChange?: (event: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: IDragData) => void;\n\n /**\n * Callback for when dragging stops\n */\n onStop?: (event: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: IDragData) => void;\n}\n\ninterface IDraggableZoneState {\n isDragging: boolean;\n position: _ICoordinates;\n lastPosition?: _ICoordinates;\n}\n\nconst eventMapping = {\n touch: {\n start: 'touchstart',\n move: 'touchmove',\n stop: 'touchend'\n },\n mouse: {\n start: 'mousedown',\n move: 'mousemove',\n stop: 'mouseup'\n }\n};\n\n// These are needed so that we can generalize the events\n// and so we have access to clientX and clientY in the touch events\ntype MouseTouchEvent<T> = React.MouseEvent<T> & React.TouchEvent<T> & Event;\n\nclass DraggableZone extends React.Component<IDraggableZoneProps, IDraggableZoneState> {\n private _touchId?: number;\n private _currentEventType = eventMapping.mouse;\n private _events: (() => void)[] = [];\n\n constructor(props: IDraggableZoneProps) {\n super(props);\n\n this.state = {\n isDragging: false,\n position: this.props.position || { x: 0, y: 0 },\n lastPosition: undefined\n };\n }\n\n public componentDidUpdate(prevProps: IDraggableZoneProps) {\n if (this.props.position && (!prevProps.position || this.props.position !== prevProps.position)) {\n this.setState({ position: this.props.position });\n }\n }\n\n public componentWillUnmount() {\n this._events.forEach((dispose) => dispose());\n }\n\n public render() {\n const child: any = React.Children.only(this.props.children);\n const { props } = child;\n const { position } = this.props;\n const { position: statePosition, isDragging } = this.state;\n let x = statePosition.x;\n let y = statePosition.y;\n\n if (position && !isDragging) {\n x = position.x;\n y = position.y;\n }\n\n return React.cloneElement(child, {\n style: {\n ...props.style,\n transform: `translate(${x}px, ${y}px)`\n },\n className: getDraggableZoneClassNames(props.className, this.state.isDragging).root,\n onMouseDown: this._onMouseDown,\n onMouseUp: this._onMouseUp,\n onTouchStart: this._onTouchStart,\n onTouchEnd: this._onTouchEnd\n });\n }\n\n private _onMouseDown = (event: MouseTouchEvent<HTMLElement>) => {\n const onMouseDown = (React.Children.only(this.props.children) as any).props.onMouseDown;\n if (onMouseDown) {\n onMouseDown(event);\n }\n\n this._currentEventType = eventMapping.mouse;\n return this._onDragStart(event);\n };\n\n private _onMouseUp = (event: MouseTouchEvent<HTMLElement>) => {\n const onMouseUp = (React.Children.only(this.props.children) as any).props.onMouseUp;\n if (onMouseUp) {\n onMouseUp(event);\n }\n\n this._currentEventType = eventMapping.mouse;\n return this._onDragStop(event);\n };\n\n private _onTouchStart = (event: MouseTouchEvent<HTMLElement>) => {\n const onTouchStart = (React.Children.only(this.props.children) as any).props.onTouchStart;\n if (onTouchStart) {\n onTouchStart(event);\n }\n\n this._currentEventType = eventMapping.touch;\n return this._onDragStart(event);\n };\n\n private _onTouchEnd = (event: MouseTouchEvent<HTMLElement>) => {\n const onTouchEnd = (React.Children.only(this.props.children) as any).props.onTouchEnd;\n if (onTouchEnd) {\n onTouchEnd(event);\n }\n\n this._currentEventType = eventMapping.touch;\n this._onDragStop(event);\n };\n\n private _onDragStart = (event: MouseTouchEvent<HTMLElement>) => {\n // Only handle left click for dragging\n if (typeof event.button === 'number' && event.button !== 0) {\n return false;\n }\n\n // If the target doesn't match the handleSelector OR\n // if the target does match the preventDragSelector, bail out\n if (\n (this.props.handleSelector && !this._matchesSelector(event.target as HTMLElement, this.props.handleSelector)) ||\n (this.props.preventDragSelector &&\n this._matchesSelector(event.target as HTMLElement, this.props.preventDragSelector))\n ) {\n return;\n }\n\n // Remember the touch identifier if this is a touch event so we can\n // distinguish between individual touches in multitouch scenarios\n // by remembering which touch point we were given\n this._touchId = this._getTouchId(event);\n\n const position = this._getControlPosition(event);\n if (position === undefined) {\n return;\n }\n\n const dragData = this._createDragDataFromPosition(position);\n this.props.onStart && this.props.onStart(event, dragData);\n\n this.setState({\n isDragging: true,\n lastPosition: position\n });\n\n // hook up the appropriate mouse/touch events to the body to ensure\n // smooth dragging\n this._events = [\n on(document.body, this._currentEventType.move, this._onDrag, true /* use capture phase */),\n on(document.body, this._currentEventType.stop, this._onDragStop, true /* use capture phase */)\n ];\n\n return;\n };\n\n private _onDrag = (event: any) => {\n // Prevent scrolling on mobile devices\n if (event.type === 'touchmove') {\n event.preventDefault();\n }\n\n const position = this._getControlPosition(event);\n if (!position) {\n return;\n }\n\n // create the updated drag data from the position data\n const updatedData = this._createUpdatedDragData(this._createDragDataFromPosition(position));\n const updatedPosition = updatedData.position;\n\n this.props.onDragChange && this.props.onDragChange(event, updatedData);\n\n this.setState({\n position: updatedPosition,\n lastPosition: position\n });\n };\n\n private _onDragStop = (event: any) => {\n if (!this.state.isDragging) {\n return;\n }\n\n const position = this._getControlPosition(event);\n if (!position) {\n return;\n }\n\n const baseDragData = this._createDragDataFromPosition(position);\n\n // Set dragging to false and reset the lastPosition\n this.setState({\n isDragging: false,\n lastPosition: undefined\n });\n\n this.props.onStop && this.props.onStop(event, baseDragData);\n\n if (this.props.position) {\n this.setState({\n position: this.props.position\n });\n }\n\n // Remove event handlers\n this._events.forEach((dispose) => dispose());\n };\n\n /**\n * Get the control position based off the event that fired\n * @param event - The event to get offsets from\n */\n private _getControlPosition(event: MouseTouchEvent<HTMLElement>): _ICoordinates | undefined {\n const touchObj = this._getActiveTouch(event);\n\n // did we get the right touch?\n if (this._touchId !== undefined && !touchObj) {\n return undefined;\n }\n\n const eventToGetOffset = touchObj || event;\n return {\n x: eventToGetOffset.clientX,\n y: eventToGetOffset.clientY\n };\n }\n\n /**\n * Get the active touch point that we have saved from the event's TouchList\n * @param event - The event used to get the TouchList for the active touch point\n */\n private _getActiveTouch(event: MouseTouchEvent<HTMLElement>): React.Touch | undefined {\n return (\n (event.targetTouches && this._findTouchInTouchList(event.targetTouches)) ||\n (event.changedTouches && this._findTouchInTouchList(event.changedTouches))\n );\n }\n\n /**\n * Get the initial touch identifier associated with the given event\n * @param event - The event that contains the TouchList\n */\n private _getTouchId(event: MouseTouchEvent<HTMLElement>): number | undefined {\n const touch: React.Touch | undefined =\n (event.targetTouches && event.targetTouches[0]) || (event.changedTouches && event.changedTouches[0]);\n\n if (touch) {\n return touch.identifier;\n }\n\n return;\n }\n\n /**\n * Returns if an element (or any of the element's parents) match the given selector\n */\n private _matchesSelector(element: HTMLElement | null, selector: string): boolean {\n if (!element || element === document.body) {\n return false;\n }\n\n // eslint-disable-next-line @typescript-eslint/ban-types\n const matchesSelectorFn: Function =\n element.matches || element.webkitMatchesSelector || (element as any).msMatchesSelector; /* for IE */\n\n if (!matchesSelectorFn) {\n return false;\n }\n\n return matchesSelectorFn.call(element, selector) || this._matchesSelector(element.parentElement, selector);\n }\n\n /**\n * Attempts to find the Touch that matches the identifier we stored in dragStart\n * @param touchList The TouchList to look for the stored identifier from dragStart\n */\n private _findTouchInTouchList(touchList: React.TouchList): React.Touch | undefined {\n if (this._touchId === undefined) {\n return;\n }\n\n for (let i = 0; i < touchList.length; i++) {\n if (touchList[i].identifier === this._touchId) {\n return touchList[i];\n }\n }\n\n return undefined;\n }\n\n /**\n * Create DragData based off of the last known position and the new position passed in\n * @param position The new position as part of the drag\n */\n private _createDragDataFromPosition(position: _ICoordinates): IDragData {\n const { lastPosition } = this.state;\n\n // If we have no lastPosition, use the given position\n // for last position\n if (lastPosition === undefined) {\n return {\n delta: { x: 0, y: 0 },\n lastPosition: position,\n position\n };\n }\n\n return {\n delta: {\n x: position.x - lastPosition.x,\n y: position.y - lastPosition.y\n },\n lastPosition,\n position\n };\n }\n\n /**\n * Creates an updated DragData based off the current position and given baseDragData\n * @param baseDragData The base DragData (from _createDragDataFromPosition) used to calculate the updated positions\n */\n private _createUpdatedDragData(baseDragData: IDragData): IDragData {\n const { position } = this.state;\n return {\n position: {\n x: position.x + baseDragData.delta.x,\n y: position.y + baseDragData.delta.y\n },\n delta: baseDragData.delta,\n lastPosition: position\n };\n }\n}\n\nconst globalClassNames = {\n root: 'ms-Modal',\n main: 'ms-Dialog-main',\n scrollableContent: 'ms-Modal-scrollableContent',\n isOpen: 'is-open',\n layer: 'ms-Modal-Layer'\n};\n\nconst getStyles = (props: IModalStyleProps): IModalStyles => {\n const {\n className,\n containerClassName,\n scrollableContentClassName,\n isOpen,\n isVisible,\n hasBeenOpened,\n modalRectangleTop,\n theme,\n topOffsetFixed,\n isModeless,\n layerClassName,\n isDefaultDragHandle,\n windowInnerHeight\n } = props;\n const { palette, effects, fonts } = theme;\n\n const classNames = getGlobalClassNames(globalClassNames, theme);\n\n return {\n root: [\n classNames.root,\n fonts.medium,\n {\n backgroundColor: 'transparent',\n position: isModeless ? 'absolute' : 'fixed',\n height: '100%',\n width: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n opacity: 0,\n pointerEvents: 'none',\n transition: `opacity ${animationDuration}`\n },\n topOffsetFixed &&\n typeof modalRectangleTop === 'number' &&\n hasBeenOpened && {\n alignItems: 'flex-start'\n },\n isOpen && classNames.isOpen,\n isVisible && {\n opacity: 1,\n pointerEvents: 'auto'\n },\n className\n ],\n main: [\n classNames.main,\n {\n boxShadow: effects.elevation64,\n borderRadius: effects.roundedCorner2,\n backgroundColor: palette.white,\n boxSizing: 'border-box',\n position: 'relative',\n textAlign: 'left',\n outline: '3px solid transparent',\n maxHeight: 'calc(100% - 32px)',\n maxWidth: 'calc(100% - 32px)',\n minHeight: '176px',\n minWidth: '288px',\n overflowY: 'auto',\n zIndex: isModeless ? ZIndexes.Layer : undefined\n },\n topOffsetFixed &&\n typeof modalRectangleTop === 'number' &&\n hasBeenOpened && {\n top: modalRectangleTop\n },\n isDefaultDragHandle && {\n cursor: 'move'\n },\n containerClassName\n ],\n scrollableContent: [\n classNames.scrollableContent,\n {\n overflowY: 'auto',\n flexGrow: 1,\n maxHeight: '100vh',\n selectors: {\n ['@supports (-webkit-overflow-scrolling: touch)']: {\n maxHeight: windowInnerHeight\n }\n }\n },\n scrollableContentClassName\n ],\n layer: isModeless && [\n layerClassName,\n classNames.layer,\n {\n position: 'static',\n width: 'unset',\n height: 'unset'\n }\n ],\n keyboardMoveIconContainer: {\n position: 'absolute',\n display: 'flex',\n justifyContent: 'center',\n width: '100%',\n padding: '3px 0px'\n },\n keyboardMoveIcon: {\n fontSize: fonts.xLargePlus.fontSize,\n width: '24px'\n }\n };\n};\n\n/** @internal */\nexport const _ModalClone: React.FunctionComponent<_ExtendedIModalProps> = styled<\n _ExtendedIModalProps,\n IModalStyleProps,\n IModalStyles\n>(ModalBase, getStyles, undefined, {\n scope: 'Modal',\n fields: ['theme', 'styles', 'enableAriaHiddenSiblings']\n});\n_ModalClone.displayName = 'Modal';\n"]}
1
+ {"version":3,"file":"ModalClone.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/ModalClone/ModalClone.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,qCAAqC;AACrC,sDAAsD;AACtD,qEAAqE;AACrE,sEAAsE;AACtE,uDAAuD;AAEvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC9G,OAAO,EACL,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,UAAU,EACV,aAAa,EACb,mBAAmB,EACnB,oBAAoB,EACpB,IAAI,EAOJ,QAAQ,EACR,KAAK,EACL,eAAe,EACf,WAAW,EACX,EAAE,EACF,OAAO,EACP,KAAK,EACL,cAAc,EACd,MAAM,EACN,iBAAiB,EACjB,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AAU5D,MAAM,iBAAiB,GAAG,kBAAkB,CAAC,cAAc,CAAC;AAsB5D,MAAM,IAAI,GAAkB,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC;AAE3C,MAAM,aAAa,GAAkC;IACnD,MAAM,EAAE,KAAK;IACb,aAAa,EAAE,IAAI;IACnB,SAAS,EAAE,EAAE;IACb,kBAAkB,EAAE,EAAE;IACtB,wBAAwB,EAAE,IAAI;CAC/B,CAAC;AAEF,MAAM,kBAAkB,GAAG,kBAAkB,EAAkC,CAAC;AAEhF,MAAM,YAAY,GAAG,CAAC,EAAoC,EAAU,EAAE;IACpE,IAAI,KAAK,GAAG,EAAE,CAAC;IACf,IAAI,EAAE,C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K,EAAE,MAAM;YACb,OAAO,EAAE,SAAS;SACnB;QACD,gBAAgB,EAAE;YAChB,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,QAAQ;YACnC,KAAK,EAAE,MAAM;SACd;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,gBAAgB;AAChB,MAAM,CAAC,MAAM,WAAW,GAAkD,MAAM,CAI9E,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE;IACjC,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,0BAA0B,CAAC;CACxD,CAAC,CAAC;AACH,WAAW,CAAC,WAAW,GAAG,OAAO,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\n/* eslint-disable react/prop-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable @typescript-eslint/explicit-function-return-type */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport * as React from 'react';\nimport { useBoolean, useMergedRefs, useConst, useSetTimeout, useId, useUnmount } from '@fluentui/react-hooks';\nimport {\n allowOverscrollOnElement,\n allowScrollOnElement,\n AnimationVariables,\n classNamesFunction,\n DirectionalHint,\n elementContains,\n EventGroup,\n FocusTrapZone,\n getGlobalClassNames,\n getPropsWithDefaults,\n Icon,\n IDragOptions,\n IFocusTrapZone,\n ILayerProps,\n IModalProps,\n IModalStyleProps,\n IModalStyles,\n KeyCodes,\n Layer,\n memoizeFunction,\n mergeStyles,\n on,\n Overlay,\n Popup,\n ResponsiveMode,\n styled,\n useResponsiveMode,\n ZIndexes\n} from '@fluentui/react';\nimport { useWindow } from '@fluentui/react-window-provider';\n\n// @TODO - need to change this to a panel whenever the breakpoint is under medium (verify the spec)\n\n/** @internal */\nexport interface _ExtendedIModalProps extends IModalProps {\n minDragPosition?: _ICoordinates;\n maxDragPosition?: _ICoordinates;\n}\n\nconst animationDuration = AnimationVariables.durationValue2;\n/** @internal */\nexport type _ICoordinates = { x: number; y: number };\n\ninterface IModalInternalState {\n onModalCloseTimer: number;\n allowTouchBodyScroll?: boolean;\n scrollableContent: HTMLDivElement | null;\n lastSetCoordinates: _ICoordinates;\n /** Minimum clamped position, if dragging and clamping (`dragOptions.keepInBounds`) are enabled */\n minPosition?: _ICoordinates;\n /** Maximum clamped position, if dragging and clamping (`dragOptions.keepInBounds`) are enabled */\n maxPosition?: _ICoordinates;\n events: EventGroup;\n /** Ensures we dispose the same keydown callback as was registered */\n disposeOnKeyDown?: () => void;\n /** Ensures we dispose the same keyup callback as was registered (also tracks whether keyup has been registered) */\n disposeOnKeyUp?: () => void;\n isInKeyboardMoveMode?: boolean;\n hasBeenOpened?: boolean;\n}\n\nconst ZERO: _ICoordinates = { x: 0, y: 0 };\n\nconst DEFAULT_PROPS: Partial<_ExtendedIModalProps> = {\n isOpen: false,\n isDarkOverlay: true,\n className: '',\n containerClassName: '',\n enableAriaHiddenSiblings: true\n};\n\nconst getModalClassNames = classNamesFunction<IModalStyleProps, IModalStyles>();\n\nconst getMoveDelta = (ev: React.KeyboardEvent<HTMLElement>): number => {\n let delta = 10;\n if (ev.shiftKey) {\n if (!ev.ctrlKey) {\n delta = 50;\n }\n } else if (ev.ctrlKey) {\n delta = 1;\n }\n\n return delta;\n};\n\nconst useComponentRef = (props: IModalProps, focusTrapZone: React.RefObject<IFocusTrapZone>) => {\n React.useImperativeHandle(\n props.componentRef,\n () => ({\n focus() {\n if (focusTrapZone.current) {\n focusTrapZone.current.focus();\n }\n }\n }),\n [focusTrapZone]\n );\n};\n\nconst ModalBase: React.FunctionComponent<_ExtendedIModalProps> = React.forwardRef<HTMLDivElement, _ExtendedIModalProps>(\n (propsWithoutDefaults, ref) => {\n const props = getPropsWithDefaults(DEFAULT_PROPS, propsWithoutDefaults);\n const {\n allowTouchBodyScroll,\n className,\n children,\n containerClassName,\n scrollableContentClassName,\n elementToFocusOnDismiss,\n firstFocusableSelector,\n forceFocusInsideTrap,\n ignoreExternalFocusing,\n isBlocking,\n isAlert,\n isClickableOutsideFocusTrap,\n isDarkOverlay,\n onDismiss,\n layerProps,\n overlay,\n isOpen,\n titleAriaId,\n styles,\n subtitleAriaId,\n theme,\n topOffsetFixed,\n responsiveMode,\n onLayerDidMount,\n isModeless,\n dragOptions,\n onDismissed,\n minDragPosition,\n maxDragPosition\n } = props;\n\n const rootRef = React.useRef<HTMLDivElement>(null);\n const focusTrapZone = React.useRef<IFocusTrapZone>(null);\n const focusTrapZoneElm = React.useRef<HTMLDivElement>(null);\n const mergedRef = useMergedRefs(rootRef, ref);\n\n const modalResponsiveMode = useResponsiveMode(mergedRef);\n\n const focusTrapZoneId = useId('ModalFocusTrapZone');\n\n const win = useWindow();\n\n const { setTimeout, clearTimeout } = useSetTimeout();\n\n const [isModalOpen, setIsModalOpen] = React.useState(isOpen);\n const [isVisible, setIsVisible] = React.useState(isOpen);\n const [coordinates, setCoordinates] = React.useState<_ICoordinates>(ZERO);\n const [modalRectangleTop, setModalRectangleTop] = React.useState<number | undefined>();\n\n const [isModalMenuOpen, { toggle: toggleModalMenuOpen, setFalse: setModalMenuClose }] = useBoolean(false);\n\n const internalState = useConst<IModalInternalState>(() => ({\n onModalCloseTimer: 0,\n allowTouchBodyScroll,\n scrollableContent: null,\n lastSetCoordinates: ZERO,\n events: new EventGroup({})\n }));\n\n const { keepInBounds } = dragOptions || ({} as IDragOptions);\n const isAlertRole = isAlert ?? (isBlocking && !isModeless);\n\n const layerClassName = layerProps === undefined ? '' : layerProps.className;\n const classNames = getModalClassNames(styles, {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n theme: theme!,\n className,\n containerClassName,\n scrollableContentClassName,\n isOpen,\n isVisible,\n hasBeenOpened: internalState.hasBeenOpened,\n modalRectangleTop,\n topOffsetFixed,\n isModeless,\n layerClassName,\n windowInnerHeight: win?.innerHeight,\n isDefaultDragHandle: dragOptions && !dragOptions.dragHandleSelector\n });\n\n const mergedLayerProps: ILayerProps = {\n eventBubblingEnabled: false,\n ...layerProps,\n onLayerDidMount: layerProps && layerProps.onLayerDidMount ? layerProps.onLayerDidMount : onLayerDidMount,\n insertFirst: isModeless,\n className: classNames.layer\n };\n\n // Allow the user to scroll within the modal but not on the body\n const allowScrollOnModal = React.useCallback(\n (elt: HTMLDivElement | null): void => {\n if (elt) {\n if (internalState.allowTouchBodyScroll) {\n allowOverscrollOnElement(elt, internalState.events);\n } else {\n allowScrollOnElement(elt, internalState.events);\n }\n } else {\n internalState.events.off(internalState.scrollableContent);\n }\n internalState.scrollableContent = elt;\n },\n [internalState]\n );\n\n const registerInitialModalPosition = (): void => {\n const dialogMain = focusTrapZoneElm.current;\n const modalRectangle = dialogMain?.getBoundingClientRect();\n\n if (modalRectangle) {\n if (topOffsetFixed) {\n setModalRectangleTop(modalRectangle.top);\n }\n\n if (keepInBounds) {\n // x/y are unavailable in IE, so use the equivalent left/top\n internalState.minPosition = minDragPosition ?? { x: -modalRectangle.left, y: -modalRectangle.top };\n internalState.maxPosition = maxDragPosition ?? { x: modalRectangle.left, y: modalRectangle.top };\n\n // Make sure the initial co-ordinates are within clamp bounds.\n setCoordinates({\n x: getClampedAxis('x', coordinates.x),\n y: getClampedAxis('y', coordinates.y)\n });\n }\n }\n };\n\n /**\n * Clamps an axis to a specified min and max position.\n *\n * @param axis A string that represents the axis (x/y).\n * @param position The position on the axis.\n */\n const getClampedAxis = React.useCallback(\n (axis: keyof _ICoordinates, position: number) => {\n const { minPosition, maxPosition } = internalState;\n if (keepInBounds && minPosition && maxPosition) {\n position = Math.max(minPosition[axis], position);\n position = Math.min(maxPosition[axis], position);\n }\n return position;\n },\n [keepInBounds, internalState]\n );\n\n const handleModalClose = (): void => {\n internalState.lastSetCoordinates = ZERO;\n\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = false;\n setIsModalOpen(false);\n setCoordinates(ZERO);\n\n internalState.disposeOnKeyUp?.();\n\n onDismissed?.();\n };\n\n const handleDragStart = React.useCallback((): void => {\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = false;\n }, [internalState, setModalMenuClose]);\n\n const handleDrag = React.useCallback(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (ev: React.MouseEvent<HTMLElement> & React.TouchEvent<HTMLElement>, dragData: any): void => {\n setCoordinates((prevValue) => ({\n x: getClampedAxis('x', prevValue.x + dragData.delta.x),\n y: getClampedAxis('y', prevValue.y + dragData.delta.y)\n }));\n },\n [getClampedAxis]\n );\n\n const handleDragStop = React.useCallback((): void => {\n if (focusTrapZone.current) {\n focusTrapZone.current.focus();\n }\n }, []);\n\n const handleEnterKeyboardMoveMode = () => {\n // We need a global handleKeyDown event when we are in the move mode so that we can\n // handle the key presses and the components inside the modal do not get the events\n const handleKeyDown = (ev: React.KeyboardEvent<HTMLElement>): void => {\n if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) {\n // CTRL + ALT + SPACE is handled during keyUp\n ev.preventDefault();\n ev.stopPropagation();\n return;\n }\n\n const newLocal = ev.altKey || ev.keyCode === KeyCodes.escape;\n if (isModalMenuOpen && newLocal) {\n setModalMenuClose();\n }\n\n if (internalState.isInKeyboardMoveMode && (ev.keyCode === KeyCodes.escape || ev.keyCode === KeyCodes.enter)) {\n internalState.isInKeyboardMoveMode = false;\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n if (internalState.isInKeyboardMoveMode) {\n let handledEvent = true;\n const delta = getMoveDelta(ev);\n\n switch (ev.keyCode) {\n /* eslint-disable no-fallthrough */\n case KeyCodes.escape:\n setCoordinates(internalState.lastSetCoordinates);\n case KeyCodes.enter: {\n // TODO: determine if fallthrough was intentional\n /* eslint-enable no-fallthrough */\n internalState.lastSetCoordinates = ZERO;\n // setIsInKeyboardMoveMode(false);\n break;\n }\n case KeyCodes.up: {\n setCoordinates((prevValue) => ({ x: prevValue.x, y: getClampedAxis('y', prevValue.y - delta) }));\n break;\n }\n case KeyCodes.down: {\n setCoordinates((prevValue) => ({ x: prevValue.x, y: getClampedAxis('y', prevValue.y + delta) }));\n break;\n }\n case KeyCodes.left: {\n setCoordinates((prevValue) => ({ x: getClampedAxis('x', prevValue.x - delta), y: prevValue.y }));\n break;\n }\n case KeyCodes.right: {\n setCoordinates((prevValue) => ({ x: getClampedAxis('x', prevValue.x + delta), y: prevValue.y }));\n break;\n }\n default: {\n handledEvent = false;\n }\n }\n if (handledEvent) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n }\n };\n\n internalState.lastSetCoordinates = coordinates;\n setModalMenuClose();\n internalState.isInKeyboardMoveMode = true;\n\n internalState.events.on(win, 'keydown', handleKeyDown, true /* useCapture */);\n internalState.disposeOnKeyDown = () => {\n internalState.events.off(win, 'keydown', handleKeyDown, true /* useCapture */);\n internalState.disposeOnKeyDown = undefined;\n };\n };\n\n const handleExitKeyboardMoveMode = () => {\n internalState.lastSetCoordinates = ZERO;\n internalState.isInKeyboardMoveMode = false;\n internalState.disposeOnKeyDown?.();\n };\n\n const registerForKeyUp = (): void => {\n const handleKeyUp = (ev: React.KeyboardEvent<HTMLElement>): void => {\n // Needs to handle the CTRL + ALT + SPACE key during keyup due to FireFox bug:\n // https://bugzilla.mozilla.org/show_bug.cgi?id=1220143\n if (ev.altKey && ev.ctrlKey && ev.keyCode === KeyCodes.space) {\n if (elementContains(internalState.scrollableContent, ev.target as HTMLElement)) {\n toggleModalMenuOpen();\n ev.preventDefault();\n ev.stopPropagation();\n }\n }\n };\n\n if (!internalState.disposeOnKeyUp) {\n internalState.events.on(win, 'keyup', handleKeyUp, true /* useCapture */);\n internalState.disposeOnKeyUp = () => {\n internalState.events.off(win, 'keyup', handleKeyUp, true /* useCapture */);\n internalState.disposeOnKeyUp = undefined;\n };\n }\n };\n\n React.useEffect(() => {\n clearTimeout(internalState.onModalCloseTimer);\n // Opening the dialog\n if (isOpen) {\n // This must be done after the modal content has rendered\n requestAnimationFrame(() => setTimeout(registerInitialModalPosition, 0));\n\n setIsModalOpen(true);\n\n // Add a keyUp handler for all key up events once the dialog is open.\n if (dragOptions) {\n registerForKeyUp();\n }\n\n internalState.hasBeenOpened = true;\n setIsVisible(true);\n }\n\n // Closing the dialog\n if (!isOpen && isModalOpen) {\n internalState.onModalCloseTimer = setTimeout(handleModalClose, parseFloat(animationDuration) * 1000);\n setIsVisible(false);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps -- should only run if isModalOpen or isOpen mutates or if min/max drag bounds are updated.\n }, [isModalOpen, isOpen, minDragPosition, maxDragPosition]);\n\n useUnmount(() => {\n internalState.events.dispose();\n });\n\n useComponentRef(props, focusTrapZone);\n\n const modalContent = (\n <FocusTrapZone\n disabled={true}\n id={focusTrapZoneId}\n ref={focusTrapZoneElm}\n componentRef={focusTrapZone}\n className={classNames.main}\n elementToFocusOnDismiss={elementToFocusOnDismiss}\n isClickableOutsideFocusTrap={isModeless || isClickableOutsideFocusTrap || !isBlocking}\n ignoreExternalFocusing={ignoreExternalFocusing}\n forceFocusInsideTrap={forceFocusInsideTrap && !isModeless}\n firstFocusableSelector={firstFocusableSelector}\n focusPreviouslyFocusedInnerElement\n onBlur={internalState.isInKeyboardMoveMode ? handleExitKeyboardMoveMode : undefined}\n data-ui-id={props['data-ui-id' as keyof _ExtendedIModalProps]}\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"]}
@@ -39,6 +39,8 @@ export interface ParticipantItemStrings {
39
39
  participantStateRinging?: string;
40
40
  /** String shown when `participantState` is `Hold` */
41
41
  participantStateHold?: string;
42
+ /** String for the attendee role */
43
+ attendeeRole: string;
42
44
  }
43
45
  /**
44
46
  * Props for {@link ParticipantItem}.
@@ -1 +1 @@
1
- {"version":3,"file":"ParticipantItem.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/ParticipantItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,cAAc,EACd,eAAe,EACf,IAAI,EAGJ,WAAW,EACX,OAAO,EAEP,WAAW,EACX,KAAK,EACL,IAAI,EACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;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License.\n\nimport {\n ContextualMenu,\n DirectionalHint,\n Icon,\n IContextualMenuItem,\n IStyle,\n mergeStyles,\n Persona,\n PersonaPresence,\n PersonaSize,\n Stack,\n Text\n} from '@fluentui/react';\nimport React, { useMemo, useRef, useState } from 'react';\nimport { useIdentifiers } from '../identifiers';\nimport { useLocale } from '../localization';\nimport { useTheme } from '../theming';\nimport { BaseCustomStyles, OnRenderAvatarCallback } from '../types';\nimport {\n iconContainerStyle,\n iconStyles,\n meContainerStyle,\n menuButtonContainerStyle,\n participantItemContainerStyle,\n participantStateMaxWidth,\n participantStateStringStyles\n} from './styles/ParticipantItem.styles';\nimport { _preventDismissOnEvent as preventDismissOnEvent } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(one-to-n-calling) */\n/* @conditional-compile-remove(PSTN-calls) */\nimport { ParticipantState } from '../types';\nimport { useId } from '@fluentui/react-hooks';\n\n/**\n * Fluent styles for {@link ParticipantItem}.\n *\n * @public\n */\nexport interface ParticipantItemStyles extends BaseCustomStyles {\n /** Styles for the avatar. */\n avatar?: IStyle;\n /** Styles for the (You) string. */\n me?: IStyle;\n /** Styles for the container of the icon. */\n iconContainer?: IStyle;\n /** Styles for the menu. */\n menu?: IStyle;\n}\n\n/**\n * Strings of {@link ParticipantItem} that can be overridden.\n *\n * @public\n */\nexport interface ParticipantItemStrings {\n /** String shown when participant is me */\n isMeText: string;\n /** String shown when hovering over menu button */\n menuTitle: string;\n /** Label for the remove button in participant menu */\n removeButtonLabel: string;\n /** Label for the sharing icon in participant state stack */\n sharingIconLabel: string;\n /** Label for the muted icon in participant state stack */\n mutedIconLabel: string;\n /** placeholder text for participants who does not have a display name*/\n displayNamePlaceholder?: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n /** String shown when `participantState` is `Ringing` */\n participantStateRinging?: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n /** String shown when `participantState` is `Hold` */\n participantStateHold?: string;\n}\n\n/**\n * Props for {@link ParticipantItem}.\n *\n * @public\n */\nexport interface ParticipantItemProps {\n /** Unique User ID of the participant. This `userId` is available in the `onRenderAvatar` callback function */\n userId?: string;\n /** Name of participant. */\n displayName?: string;\n /** Optional indicator to show participant is the user. */\n me?: boolean;\n /** Optional callback returning a JSX element to override avatar. */\n onRenderAvatar?: OnRenderAvatarCallback;\n /** Optional array of IContextualMenuItem for contextual menu. */\n menuItems?: IContextualMenuItem[];\n /** Optional callback returning a JSX element rendered on the right portion of the ParticipantItem. Intended for adding icons. */\n onRenderIcon?: (props?: ParticipantItemProps) => JSX.Element | null;\n /** Optional PersonaPresence to show participant presence. This will not have an effect if property avatar is assigned. */\n presence?: PersonaPresence;\n /**\n * Allows users to pass in an object contains custom CSS styles.\n * @Example\n * ```\n * <ParticipantItem styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: ParticipantItemStyles;\n /**\n * Optional strings to override in component\n */\n strings?: Partial<ParticipantItemStrings>;\n /**\n * Optional callback when component is clicked\n */\n onClick?: (props?: ParticipantItemProps) => void;\n /** Optional value to determine if the tooltip should be shown for participants or not */\n showParticipantOverflowTooltip?: boolean;\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Optional value to determine and display a participants connection status.\n * For example, `Connecting`, `Ringing` etc.\n * The actual text that is displayed is determined by the localized string\n * corresponding to the provided participant state.\n * For example, `strings.participantStateConnecting` will be used if `participantState` is `Connecting`.\n */\n participantState?: ParticipantState;\n /**\n * Optional aria property that prefixes the ParticipantItems aria content\n * Takes in a unique id value of the element you would like to be read before the ParticipantItem.\n */\n ariaLabelledBy?: string;\n}\n\n/**\n * Component to render a calling or chat participant.\n *\n * Displays the participant's avatar, displayName and status as well as optional icons and context menu.\n *\n * @public\n */\nexport const ParticipantItem = (props: ParticipantItemProps): JSX.Element => {\n const {\n userId,\n displayName,\n onRenderAvatar,\n menuItems,\n onRenderIcon,\n presence,\n styles,\n me,\n onClick,\n showParticipantOverflowTooltip\n } = props;\n const [itemHovered, setItemHovered] = useState<boolean>(false);\n const [itemFocused, setItemFocused] = useState<boolean>(false);\n const [menuHidden, setMenuHidden] = useState<boolean>(true);\n const containerRef = useRef<HTMLDivElement>(null);\n const theme = useTheme();\n const localeStrings = useLocale().strings.participantItem;\n const ids = useIdentifiers();\n const uniqueId = useId();\n\n const strings = { ...localeStrings, ...props.strings };\n\n // For 'me' show empty name so avatar will get 'Person' icon, when there is no name\n const meAvatarText = displayName?.trim() || '';\n\n const avatarOptions = {\n text: me ? meAvatarText : displayName?.trim() || strings.displayNamePlaceholder,\n size: PersonaSize.size32,\n presence: presence,\n initialsTextColor: 'white',\n showOverflowTooltip: showParticipantOverflowTooltip,\n showUnknownPersonaCoin: !me && (!displayName?.trim() || displayName === strings.displayNamePlaceholder)\n };\n\n const avatar = onRenderAvatar ? (\n onRenderAvatar(userId ?? '', avatarOptions)\n ) : (\n <Persona\n className={mergeStyles(\n {\n // Prevents persona text from being vertically truncated if a global line height is less than 1.15.\n lineHeight: '1.15rem'\n },\n styles?.avatar\n )}\n {...avatarOptions}\n />\n );\n\n const meTextStyle = useMemo(\n () => mergeStyles(meContainerStyle, { color: theme.palette.neutralSecondary }, styles?.me),\n [theme.palette.neutralSecondary, styles?.me]\n );\n const contextualMenuStyle = useMemo(\n () => mergeStyles({ background: theme.palette.neutralLighterAlt }, styles?.menu),\n [theme.palette.neutralLighterAlt, styles?.menu]\n );\n const infoContainerStyle = useMemo(\n () =>\n mergeStyles(\n iconContainerStyle,\n { color: theme.palette.neutralTertiary, marginLeft: 'auto' },\n styles?.iconContainer\n ),\n [theme.palette.neutralTertiary, styles?.iconContainer]\n );\n\n const onDismissMenu = (): void => {\n setItemHovered(false);\n setItemFocused(false);\n setMenuHidden(true);\n };\n\n const menuButton = useMemo(\n () => (\n <Stack\n horizontal={true}\n horizontalAlign=\"end\"\n className={mergeStyles(menuButtonContainerStyle)}\n title={strings.menuTitle}\n data-ui-id={ids.participantItemMenuButton}\n >\n <Icon\n iconName={\n itemHovered || itemFocused || !menuHidden ? 'ParticipantItemOptionsHovered' : 'ParticipantItemOptions'\n }\n className={iconStyles}\n />\n </Stack>\n ),\n [strings.menuTitle, ids.participantItemMenuButton, itemHovered, itemFocused, menuHidden]\n );\n\n const participantStateString = participantStateStringTrampoline(props, strings);\n return (\n <div\n ref={containerRef}\n role={'menuitem'}\n data-is-focusable={true}\n data-ui-id=\"participant-item\"\n className={mergeStyles(\n participantItemContainerStyle({\n localparticipant: me,\n clickable: !!menuItems && menuItems.length > 0\n }),\n styles?.root\n )}\n onMouseEnter={() => setItemHovered(true)}\n onMouseLeave={() => setItemHovered(false)}\n onFocus={() => setItemFocused(true)}\n onBlur={() => setItemFocused(false)}\n onClick={() => {\n if (!participantStateString) {\n setItemHovered(true);\n setItemFocused(false);\n setMenuHidden(false);\n onClick?.(props);\n }\n if (!menuHidden) {\n onDismissMenu();\n }\n }}\n tabIndex={0}\n >\n <Stack\n horizontal\n className={mergeStyles({\n width: `calc(100% - ${\n !me && participantStateString ? participantStateMaxWidth : menuButtonContainerStyle.width\n })`,\n alignItems: 'center'\n })}\n id={uniqueId}\n aria-labelledby={`${props.ariaLabelledBy} ${uniqueId}`}\n >\n {avatar}\n {me && <Text className={meTextStyle}>{strings.isMeText}</Text>}\n <Stack horizontal className={mergeStyles(infoContainerStyle)}>\n {onRenderIcon && onRenderIcon(props)}\n </Stack>\n </Stack>\n {/* When the participantStateString has a value, we don't show the menu */}\n {!me && participantStateString ? (\n <Text data-ui-id=\"participant-item-state-string\" className={mergeStyles(participantStateStringStyles)}>\n {participantStateString}\n </Text>\n ) : (\n <div>\n {menuItems && menuItems.length > 0 && (\n <>\n {menuButton}\n <ContextualMenu\n items={menuItems}\n hidden={menuHidden}\n target={containerRef}\n onItemClick={onDismissMenu}\n onDismiss={onDismissMenu}\n directionalHint={DirectionalHint.bottomRightEdge}\n className={contextualMenuStyle}\n calloutProps={{\n preventDismissOnEvent\n }}\n />\n </>\n )}\n </div>\n )}\n </div>\n );\n};\n\nconst participantStateStringTrampoline = (\n props: ParticipantItemProps,\n strings: ParticipantItemStrings\n): string | undefined => {\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n return props.participantState === 'EarlyMedia' || props.participantState === 'Ringing'\n ? strings?.participantStateRinging\n : props.participantState === 'Hold'\n ? strings?.participantStateHold\n : undefined;\n\n return undefined;\n};\n"]}
1
+ {"version":3,"file":"ParticipantItem.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/ParticipantItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,cAAc,EACd,eAAe,EACf,IAAI,EAGJ,WAAW,EACX,OAAO,EAEP,WAAW,EACX,KAAK,EACL,IAAI,EACL,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EACL,kBAAkB,EAClB,UAAU,EACV,gBAAgB,EAChB,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACxB,4BAA4B,EAC7B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,sBAAsB,IAAI,qBAAqB,EAAE,mCAAgC;AAI1F,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAwG9C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAA2B,EAAe,EAAE;IAC1E,MAAM,EACJ,MAAM,EACN,WAAW,EACX,cAAc,EACd,SAAS,EACT,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,EAAE,EACF,OAAO,EACP,8BAA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AAW,EAAE,aAAa,EAC1B,SAAS,EAAE,aAAa,EACxB,eAAe,EAAE,eAAe,CAAC,eAAe,EAChD,SAAS,EAAE,mBAAmB,EAC9B,YAAY,EAAE;oBACZ,qBAAqB;iBACtB,GACD,CACD,CACJ,CACG,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gCAAgC,GAAG,CACvC,KAA2B,EAC3B,OAA+B,EACX,EAAE;IACtB,mDAAmD;IACnD,6CAA6C;IAC7C,OAAO,KAAK,CAAC,gBAAgB,KAAK,YAAY,IAAI,KAAK,CAAC,gBAAgB,KAAK,SAAS;QACpF,CAAC,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,uBAAuB;QAClC,CAAC,CAAC,KAAK,CAAC,gBAAgB,KAAK,MAAM;YACnC,CAAC,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,oBAAoB;YAC/B,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n ContextualMenu,\n DirectionalHint,\n Icon,\n IContextualMenuItem,\n IStyle,\n mergeStyles,\n Persona,\n PersonaPresence,\n PersonaSize,\n Stack,\n Text\n} from '@fluentui/react';\nimport React, { useMemo, useRef, useState } from 'react';\nimport { useIdentifiers } from '../identifiers';\nimport { useLocale } from '../localization';\nimport { useTheme } from '../theming';\nimport { BaseCustomStyles, OnRenderAvatarCallback } from '../types';\nimport {\n iconContainerStyle,\n iconStyles,\n meContainerStyle,\n menuButtonContainerStyle,\n participantItemContainerStyle,\n participantStateMaxWidth,\n participantStateStringStyles\n} from './styles/ParticipantItem.styles';\nimport { _preventDismissOnEvent as preventDismissOnEvent } from '@internal/acs-ui-common';\n/* @conditional-compile-remove(one-to-n-calling) */\n/* @conditional-compile-remove(PSTN-calls) */\nimport { ParticipantState } from '../types';\nimport { useId } from '@fluentui/react-hooks';\n\n/**\n * Fluent styles for {@link ParticipantItem}.\n *\n * @public\n */\nexport interface ParticipantItemStyles extends BaseCustomStyles {\n /** Styles for the avatar. */\n avatar?: IStyle;\n /** Styles for the (You) string. */\n me?: IStyle;\n /** Styles for the container of the icon. */\n iconContainer?: IStyle;\n /** Styles for the menu. */\n menu?: IStyle;\n}\n\n/**\n * Strings of {@link ParticipantItem} that can be overridden.\n *\n * @public\n */\nexport interface ParticipantItemStrings {\n /** String shown when participant is me */\n isMeText: string;\n /** String shown when hovering over menu button */\n menuTitle: string;\n /** Label for the remove button in participant menu */\n removeButtonLabel: string;\n /** Label for the sharing icon in participant state stack */\n sharingIconLabel: string;\n /** Label for the muted icon in participant state stack */\n mutedIconLabel: string;\n /** placeholder text for participants who does not have a display name*/\n displayNamePlaceholder?: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n /** String shown when `participantState` is `Ringing` */\n participantStateRinging?: string;\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n /** String shown when `participantState` is `Hold` */\n participantStateHold?: string;\n /* @conditional-compile-remove(hide-attendee-name) */\n /** String for the attendee role */\n attendeeRole: string;\n}\n\n/**\n * Props for {@link ParticipantItem}.\n *\n * @public\n */\nexport interface ParticipantItemProps {\n /** Unique User ID of the participant. This `userId` is available in the `onRenderAvatar` callback function */\n userId?: string;\n /** Name of participant. */\n displayName?: string;\n /** Optional indicator to show participant is the user. */\n me?: boolean;\n /** Optional callback returning a JSX element to override avatar. */\n onRenderAvatar?: OnRenderAvatarCallback;\n /** Optional array of IContextualMenuItem for contextual menu. */\n menuItems?: IContextualMenuItem[];\n /** Optional callback returning a JSX element rendered on the right portion of the ParticipantItem. Intended for adding icons. */\n onRenderIcon?: (props?: ParticipantItemProps) => JSX.Element | null;\n /** Optional PersonaPresence to show participant presence. This will not have an effect if property avatar is assigned. */\n presence?: PersonaPresence;\n /**\n * Allows users to pass in an object contains custom CSS styles.\n * @Example\n * ```\n * <ParticipantItem styles={{ root: { background: 'blue' } }} />\n * ```\n */\n styles?: ParticipantItemStyles;\n /**\n * Optional strings to override in component\n */\n strings?: Partial<ParticipantItemStrings>;\n /**\n * Optional callback when component is clicked\n */\n onClick?: (props?: ParticipantItemProps) => void;\n /** Optional value to determine if the tooltip should be shown for participants or not */\n showParticipantOverflowTooltip?: boolean;\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n /**\n * Optional value to determine and display a participants connection status.\n * For example, `Connecting`, `Ringing` etc.\n * The actual text that is displayed is determined by the localized string\n * corresponding to the provided participant state.\n * For example, `strings.participantStateConnecting` will be used if `participantState` is `Connecting`.\n */\n participantState?: ParticipantState;\n /**\n * Optional aria property that prefixes the ParticipantItems aria content\n * Takes in a unique id value of the element you would like to be read before the ParticipantItem.\n */\n ariaLabelledBy?: string;\n}\n\n/**\n * Component to render a calling or chat participant.\n *\n * Displays the participant's avatar, displayName and status as well as optional icons and context menu.\n *\n * @public\n */\nexport const ParticipantItem = (props: ParticipantItemProps): JSX.Element => {\n const {\n userId,\n displayName,\n onRenderAvatar,\n menuItems,\n onRenderIcon,\n presence,\n styles,\n me,\n onClick,\n showParticipantOverflowTooltip\n } = props;\n const [itemHovered, setItemHovered] = useState<boolean>(false);\n const [itemFocused, setItemFocused] = useState<boolean>(false);\n const [menuHidden, setMenuHidden] = useState<boolean>(true);\n const containerRef = useRef<HTMLDivElement>(null);\n const theme = useTheme();\n const localeStrings = useLocale().strings.participantItem;\n const ids = useIdentifiers();\n const uniqueId = useId();\n\n const strings = { ...localeStrings, ...props.strings };\n\n // For 'me' show empty name so avatar will get 'Person' icon, when there is no name\n const meAvatarText = displayName?.trim() || '';\n\n const avatarOptions = {\n text: me ? meAvatarText : displayName?.trim() || strings.displayNamePlaceholder,\n size: PersonaSize.size32,\n presence: presence,\n initialsTextColor: 'white',\n showOverflowTooltip: showParticipantOverflowTooltip,\n showUnknownPersonaCoin: !me && (!displayName?.trim() || displayName === strings.displayNamePlaceholder)\n };\n\n const avatar = onRenderAvatar ? (\n onRenderAvatar(userId ?? '', avatarOptions)\n ) : (\n <Persona\n className={mergeStyles(\n {\n // Prevents persona text from being vertically truncated if a global line height is less than 1.15.\n lineHeight: '1.15rem'\n },\n styles?.avatar\n )}\n {...avatarOptions}\n />\n );\n\n const meTextStyle = useMemo(\n () => mergeStyles(meContainerStyle, { color: theme.palette.neutralSecondary }, styles?.me),\n [theme.palette.neutralSecondary, styles?.me]\n );\n const contextualMenuStyle = useMemo(\n () => mergeStyles({ background: theme.palette.neutralLighterAlt }, styles?.menu),\n [theme.palette.neutralLighterAlt, styles?.menu]\n );\n const infoContainerStyle = useMemo(\n () =>\n mergeStyles(\n iconContainerStyle,\n { color: theme.palette.neutralTertiary, marginLeft: 'auto' },\n styles?.iconContainer\n ),\n [theme.palette.neutralTertiary, styles?.iconContainer]\n );\n\n const onDismissMenu = (): void => {\n setItemHovered(false);\n setItemFocused(false);\n setMenuHidden(true);\n };\n\n const menuButton = useMemo(\n () => (\n <Stack\n horizontal={true}\n horizontalAlign=\"end\"\n className={mergeStyles(menuButtonContainerStyle)}\n title={strings.menuTitle}\n data-ui-id={ids.participantItemMenuButton}\n >\n <Icon\n iconName={\n itemHovered || itemFocused || !menuHidden ? 'ParticipantItemOptionsHovered' : 'ParticipantItemOptions'\n }\n className={iconStyles}\n />\n </Stack>\n ),\n [strings.menuTitle, ids.participantItemMenuButton, itemHovered, itemFocused, menuHidden]\n );\n\n const participantStateString = participantStateStringTrampoline(props, strings);\n return (\n <div\n ref={containerRef}\n role={'menuitem'}\n data-is-focusable={true}\n data-ui-id=\"participant-item\"\n className={mergeStyles(\n participantItemContainerStyle({\n localparticipant: me,\n clickable: !!menuItems && menuItems.length > 0\n }),\n styles?.root\n )}\n onMouseEnter={() => setItemHovered(true)}\n onMouseLeave={() => setItemHovered(false)}\n onFocus={() => setItemFocused(true)}\n onBlur={() => setItemFocused(false)}\n onClick={() => {\n if (!participantStateString) {\n setItemHovered(true);\n setItemFocused(false);\n setMenuHidden(false);\n onClick?.(props);\n }\n if (!menuHidden) {\n onDismissMenu();\n }\n }}\n tabIndex={0}\n >\n <Stack\n horizontal\n className={mergeStyles({\n width: `calc(100% - ${\n !me && participantStateString ? participantStateMaxWidth : menuButtonContainerStyle.width\n })`,\n alignItems: 'center'\n })}\n id={uniqueId}\n aria-labelledby={`${props.ariaLabelledBy} ${uniqueId}`}\n >\n {avatar}\n {me && <Text className={meTextStyle}>{strings.isMeText}</Text>}\n <Stack horizontal className={mergeStyles(infoContainerStyle)}>\n {onRenderIcon && onRenderIcon(props)}\n </Stack>\n </Stack>\n {/* When the participantStateString has a value, we don't show the menu */}\n {!me && participantStateString ? (\n <Text data-ui-id=\"participant-item-state-string\" className={mergeStyles(participantStateStringStyles)}>\n {participantStateString}\n </Text>\n ) : (\n <div>\n {menuItems && menuItems.length > 0 && (\n <>\n {menuButton}\n <ContextualMenu\n items={menuItems}\n hidden={menuHidden}\n target={containerRef}\n onItemClick={onDismissMenu}\n onDismiss={onDismissMenu}\n directionalHint={DirectionalHint.bottomRightEdge}\n className={contextualMenuStyle}\n calloutProps={{\n preventDismissOnEvent\n }}\n />\n </>\n )}\n </div>\n )}\n </div>\n );\n};\n\nconst participantStateStringTrampoline = (\n props: ParticipantItemProps,\n strings: ParticipantItemStrings\n): string | undefined => {\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n return props.participantState === 'EarlyMedia' || props.participantState === 'Ringing'\n ? strings?.participantStateRinging\n : props.participantState === 'Hold'\n ? strings?.participantStateHold\n : undefined;\n\n return undefined;\n};\n"]}
@@ -13,7 +13,7 @@ import { useLocale } from '../localization';
13
13
  import { ParticipantItem } from './ParticipantItem';
14
14
  import { iconStyles, participantListItemStyle, participantListStyle } from './styles/ParticipantList.styles';
15
15
  import { _formatString } from "../../../acs-ui-common/src";
16
- const onRenderParticipantDefault = (participant, strings, myUserId, onRenderAvatar, createParticipantMenuItems, styles, onParticipantClick, showParticipantOverflowTooltip, participantAriaLabelledBy, theme, attendeeRoleString) => {
16
+ const onRenderParticipantDefault = (participant, strings, myUserId, onRenderAvatar, createParticipantMenuItems, styles, onParticipantClick, showParticipantOverflowTooltip, participantAriaLabelledBy, theme) => {
17
17
  const callingParticipant = participant;
18
18
  let presence = undefined;
19
19
  if (callingParticipant) {
@@ -23,8 +23,8 @@ const onRenderParticipantDefault = (participant, strings, myUserId, onRenderAvat
23
23
  let displayName = participant.displayName;
24
24
  /* @conditional-compile-remove(hide-attendee-name) */
25
25
  const formatDisplayName = () => {
26
- if (displayName && attendeeRoleString) {
27
- return _formatString(displayName, { AttendeeRole: attendeeRoleString });
26
+ if (displayName && strings.attendeeRole) {
27
+ return _formatString(displayName, { AttendeeRole: strings.attendeeRole });
28
28
  }
29
29
  return displayName;
30
30
  };
@@ -123,8 +123,6 @@ export const ParticipantList = (props) => {
123
123
  const participantItemStrings = useLocale().strings.participantItem;
124
124
  /* @conditional-compile-remove(total-participant-count) */
125
125
  const participantListStrings = useLocale().strings.ParticipantList;
126
- /* @conditional-compile-remove(hide-attendee-name) */
127
- const attendeeRoleString = useLocale().strings.AttendeeRole;
128
126
  const displayedParticipants = useMemo(() => {
129
127
  return onRenderParticipant ? participants : getParticipantsForDefaultRender(participants, excludeMe, myUserId);
130
128
  }, [participants, excludeMe, myUserId, onRenderParticipant]);
@@ -165,9 +163,7 @@ export const ParticipantList = (props) => {
165
163
  ? onRenderParticipant(participant)
166
164
  : onRenderParticipantDefault(participant, participantItemStrings, myUserId, onRenderAvatar, createParticipantMenuItems, participantItemStyles, props.onParticipantClick, showParticipantOverflowTooltip, participantAriaLabelledBy,
167
165
  /* @conditional-compile-remove(raise-hand) */
168
- theme,
169
- /* @conditional-compile-remove(hide-attendee-name) */
170
- attendeeRoleString)),
166
+ theme)),
171
167
  /* @conditional-compile-remove(total-participant-count) */ overflowParticipantCountString &&
172
168
  totalParticipantCount &&
173
169
  totalParticipantCount > displayedParticipants.length && (React.createElement(Text, { style: { fontWeight: 400, margin: '0.5rem' } }, _formatString(overflowParticipantCountString, {
@@ -1 +1 @@
1
- {"version":3,"file":"ParticipantList.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/ParticipantList.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,IAAI,EAGJ,KAAK,EACL,WAAW,EACX,eAAe,EACf,KAAK,EAEN,MAAM,iBAAiB,CAAC;AACzB,0DAA0D,CAAC,6CAA6C;AACxG,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACvC,6CAA6C;AAC7C,OAAO,EAAE,QAAQ,EAAgB,MAAM,YAAY,CAAC;AACpD,6CAA6C;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAS5C,OAAO,EAAE,eAAe,EAAiD,MAAM,mBAAmB,CAAC;AACnG,OAAO,EAAE,UAAU,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,mCAAgC;AAqFxD,MAAM,0BAA0B,GAAG,CACjC,WAAuC,EACvC,OAA+B,EAC/B,QAAiB,EACjB,cAAuC,EACvC,0BAA+F,EAC/F,MAAkC,EAClC,kBAAuE,EACvE,8BAAwC,EACxC,yBAAkC,EAClC,KAAa,EACb,kBAA2B,EACP,EAAE;IACtB,MAAM,kBAAkB,GAAG,WAA6C,CAAC;IAEzE,IAAI,QAAQ,GAAgC,SAAS,CAAC;IACtD,IAAI,kBAAkB,EAAE,CAAC;QACvB,QAAQ,GAAG,eAAe,CAAC,IAAI,CAAC;IAClC,CAAC;IAED,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qBAAqB,CAAC,MAAM,EAAE;SACzE,CAAC,CACG,CACR,CAEC,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n Icon,\n IContextualMenuItem,\n IContextualMenuItemStyles,\n merge,\n mergeStyles,\n PersonaPresence,\n Stack,\n Theme\n} from '@fluentui/react';\n/* @conditional-compile-remove(total-participant-count) */ /* @conditional-compile-remove(raise-hand) */\nimport { Text } from '@fluentui/react';\n/* @conditional-compile-remove(raise-hand) */\nimport { useTheme, CallingTheme } from '../theming';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaisedHandIcon } from './assets/RaisedHandIcon';\nimport React, { useCallback, useMemo } from 'react';\nimport { useIdentifiers } from '../identifiers';\nimport { useLocale } from '../localization';\nimport {\n BaseCustomStyles,\n CallParticipantListParticipant,\n OnRenderAvatarCallback,\n ParticipantListParticipant\n} from '../types';\n/* @conditional-compile-remove(raise-hand) */\nimport { CustomAvatarOptions } from '../types';\nimport { ParticipantItem, ParticipantItemStrings, ParticipantItemStyles } from './ParticipantItem';\nimport { iconStyles, participantListItemStyle, participantListStyle } from './styles/ParticipantList.styles';\nimport { _formatString } from '@internal/acs-ui-common';\n\n/**\n * Styles for the {@link ParticipantList} {@link ParticipantItem}.\n *\n * @public\n */\nexport interface ParticipantListItemStyles extends ParticipantItemStyles {\n /** Styles applied to the sub-menu of the {@link ParticipantList} {@link ParticipantItem}. */\n participantSubMenuItemsStyles?: IContextualMenuItemStyles;\n}\n\n/**\n * Styles for the {@link ParticipantList}.\n *\n * @public\n */\nexport interface ParticipantListStyles extends BaseCustomStyles {\n /** Styles for the {@link ParticipantList} {@link ParticipantItem}. */\n participantItemStyles?: ParticipantListItemStyles;\n}\n\n/* @conditional-compile-remove(total-participant-count) */\n/**\n * Strings for the {@link ParticipantList}.\n *\n * @beta\n */\nexport interface ParticipantListStrings {\n /**\n * String for rendering the count of participants not contained in the displayed participant list\n */\n overflowParticipantCount?: string;\n}\n\n/**\n * A callback for providing custom menu items for each participant in {@link ParticipantList}.\n *\n * @public\n */\nexport type ParticipantMenuItemsCallback = (\n participantUserId: string,\n userId?: string,\n defaultMenuItems?: IContextualMenuItem[]\n) => IContextualMenuItem[];\n\n/**\n * Props for {@link ParticipantList}.\n *\n * @public\n */\nexport type ParticipantListProps = {\n /** Participants in user call or chat */\n participants: ParticipantListParticipant[];\n /** User ID of user */\n myUserId?: string;\n /**\n * If set to `true`, excludes the local participant from the participant list with use of `myUserId` props (required in this case).\n *\n * @defaultValue `false`\n */\n excludeMe?: boolean;\n /** Optional callback to render each participant. If no callback is provided, each participant will be rendered with `ParticipantItem` */\n onRenderParticipant?: (participant: ParticipantListParticipant) => JSX.Element | null;\n /** Optional callback to render the avatar for each participant. This property will have no effect if `onRenderParticipant` is assigned. */\n onRenderAvatar?: OnRenderAvatarCallback;\n /** Optional callback to render the context menu for each participant */\n onRemoveParticipant?: (userId: string) => void;\n /** Optional callback to render custom menu items for each participant. */\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n /** Optional callback when rendered ParticipantItem is clicked */\n onParticipantClick?: (participant?: ParticipantListParticipant) => void;\n styles?: ParticipantListStyles;\n /** Optional value to determine if the tooltip should be shown for participants or not */\n showParticipantOverflowTooltip?: boolean;\n /* @conditional-compile-remove(total-participant-count) */\n /** Total number of people in the call. This number can be larger than the remote participant count. */\n totalParticipantCount?: number;\n /* @conditional-compile-remove(total-participant-count) */\n /** Strings for the participant list */\n strings?: ParticipantListStrings;\n /** Optional aria-labelledby prop that prefixes each ParticipantItem aria-label */\n participantAriaLabelledBy?: string;\n};\n\nconst onRenderParticipantDefault = (\n participant: ParticipantListParticipant,\n strings: ParticipantItemStrings,\n myUserId?: string,\n onRenderAvatar?: OnRenderAvatarCallback,\n createParticipantMenuItems?: (participant: ParticipantListParticipant) => IContextualMenuItem[],\n styles?: ParticipantListItemStyles,\n onParticipantClick?: (participant?: ParticipantListParticipant) => void,\n showParticipantOverflowTooltip?: boolean,\n participantAriaLabelledBy?: string,\n theme?: Theme,\n attendeeRoleString?: string\n): JSX.Element | null => {\n const callingParticipant = participant as CallParticipantListParticipant;\n\n let presence: PersonaPresence | undefined = undefined;\n if (callingParticipant) {\n presence = PersonaPresence.none;\n }\n\n const menuItems = createParticipantMenuItems && createParticipantMenuItems(participant);\n\n let displayName = participant.displayName;\n\n /* @conditional-compile-remove(hide-attendee-name) */\n const formatDisplayName = (): string | undefined => {\n if (displayName && attendeeRoleString) {\n return _formatString(displayName, { AttendeeRole: attendeeRoleString });\n }\n return displayName;\n };\n /* @conditional-compile-remove(hide-attendee-name) */\n displayName = formatDisplayName();\n\n /* @conditional-compile-remove(raise-hand) */\n const callingPalette = (theme as unknown as CallingTheme).callingPalette;\n\n const onRenderIcon =\n callingParticipant?.isScreenSharing ||\n callingParticipant?.isMuted ||\n /* @conditional-compile-remove(raise-hand) */ callingParticipant?.raisedHand\n ? () => (\n <Stack horizontal={true} tokens={{ childrenGap: '0.5rem' }}>\n {\n /* @conditional-compile-remove(raise-hand) */ callingParticipant.raisedHand && (\n <Stack\n horizontal={true}\n tokens={{ childrenGap: '0.2rem' }}\n style={{\n alignItems: 'center',\n padding: '0.1rem 0.2rem',\n backgroundColor: theme?.palette.neutralLighter,\n borderRadius: '0.3rem'\n }}\n >\n {callingParticipant.raisedHand.raisedHandOrderPosition && (\n <Stack.Item>\n <Text>{callingParticipant.raisedHand?.raisedHandOrderPosition}</Text>\n </Stack.Item>\n )}\n <Stack.Item>\n <RaisedHandIcon />\n </Stack.Item>\n </Stack>\n )\n }\n {callingParticipant.isScreenSharing && (\n <Icon\n iconName=\"ParticipantItemScreenShareStart\"\n className={iconStyles}\n ariaLabel={strings.sharingIconLabel}\n />\n )}\n {callingParticipant.isMuted && (\n <Icon iconName=\"ParticipantItemMicOff\" className={iconStyles} ariaLabel={strings.mutedIconLabel} />\n )}\n {\n /* @conditional-compile-remove(spotlight) */ callingParticipant.spotlight && (\n <Icon iconName=\"ParticipantItemSpotlighted\" className={iconStyles} />\n )\n }\n </Stack>\n )\n : () => null;\n\n /* @conditional-compile-remove(raise-hand) */\n const onRenderAvatarWithRaiseHand =\n callingParticipant?.raisedHand && onRenderAvatar\n ? (\n userId?: string,\n options?: CustomAvatarOptions,\n defaultOnRender?: (props: CustomAvatarOptions) => JSX.Element\n ) =>\n onRenderAvatar(\n userId,\n { ...options, styles: { root: { border: callingPalette.raiseHandGold } } },\n defaultOnRender\n )\n : onRenderAvatar;\n\n return (\n <ParticipantItem\n styles={styles}\n key={participant.userId}\n userId={participant.userId}\n displayName={displayName}\n me={myUserId ? participant.userId === myUserId : false}\n menuItems={menuItems}\n presence={presence}\n onRenderIcon={onRenderIcon}\n onRenderAvatar={onRenderAvatarWithRaiseHand}\n onClick={() => onParticipantClick?.(participant)}\n showParticipantOverflowTooltip={showParticipantOverflowTooltip}\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n participantState={callingParticipant.state}\n ariaLabelledBy={participantAriaLabelledBy}\n />\n );\n};\n\n/**\n * Sort participants by raised hand order position\n */\nconst sortParticipants = (participants: ParticipantListParticipant[]): ParticipantListParticipant[] => {\n /* @conditional-compile-remove(raise-hand) */\n const isParticipantListCallParticipant = function (participant: ParticipantListParticipant): boolean {\n return 'raisedHand' in participant;\n };\n\n /* @conditional-compile-remove(raise-hand) */\n participants.sort((a, b) => {\n if (!isParticipantListCallParticipant(a) || !isParticipantListCallParticipant(b)) {\n return 0;\n }\n const callA = a as CallParticipantListParticipant;\n const callB = b as CallParticipantListParticipant;\n if (callA.raisedHand && callB.raisedHand) {\n return callA.raisedHand.raisedHandOrderPosition - callB.raisedHand.raisedHandOrderPosition;\n } else if (callA.raisedHand) {\n return -1;\n } else if (callB.raisedHand) {\n return 1;\n }\n return 0;\n });\n return participants;\n};\n\nconst getParticipantsForDefaultRender = (\n participants: ParticipantListParticipant[],\n excludeMe: boolean,\n myUserId: string | undefined\n): ParticipantListParticipant[] => {\n if (!excludeMe || !myUserId) {\n return [...participants];\n }\n\n const userIndex = participants.map((p) => p.userId).indexOf(myUserId);\n\n if (userIndex === -1) {\n return [...participants];\n }\n\n const remoteParticipants = [...participants];\n remoteParticipants.splice(userIndex, 1);\n\n return remoteParticipants;\n};\n\n/**\n * Component to render all calling or chat participants.\n *\n * By default, each participant is rendered with {@link ParticipantItem}. See {@link ParticipantListProps.onRenderParticipant} to override.\n *\n * @public\n */\nexport const ParticipantList = (props: ParticipantListProps): JSX.Element => {\n const {\n excludeMe = false,\n myUserId,\n participants,\n onRemoveParticipant,\n onRenderAvatar,\n onRenderParticipant,\n onFetchParticipantMenuItems,\n showParticipantOverflowTooltip,\n /* @conditional-compile-remove(total-participant-count) */\n totalParticipantCount,\n /* @conditional-compile-remove(total-participant-count) */\n strings,\n participantAriaLabelledBy\n } = props;\n\n /* @conditional-compile-remove(raise-hand) */\n const theme = useTheme();\n const ids = useIdentifiers();\n const participantItemStrings = useLocale().strings.participantItem;\n /* @conditional-compile-remove(total-participant-count) */\n const participantListStrings = useLocale().strings.ParticipantList;\n /* @conditional-compile-remove(hide-attendee-name) */\n const attendeeRoleString = useLocale().strings.AttendeeRole;\n\n const displayedParticipants: ParticipantListParticipant[] = useMemo(() => {\n return onRenderParticipant ? participants : getParticipantsForDefaultRender(participants, excludeMe, myUserId);\n }, [participants, excludeMe, myUserId, onRenderParticipant]);\n\n sortParticipants(displayedParticipants);\n\n const createParticipantMenuItems = useCallback(\n (participant: ParticipantListParticipant): IContextualMenuItem[] => {\n let menuItems: IContextualMenuItem[] = [];\n\n const participantIsRemovable = participant.isRemovable;\n if (participant.userId !== myUserId && onRemoveParticipant && participantIsRemovable) {\n menuItems.push({\n key: 'remove',\n text: participantItemStrings.removeButtonLabel,\n onClick: () => onRemoveParticipant(participant.userId),\n itemProps: {\n styles: props.styles?.participantItemStyles?.participantSubMenuItemsStyles\n },\n 'data-ui-id': ids.participantListRemoveParticipantButton\n });\n }\n\n if (onFetchParticipantMenuItems) {\n menuItems = onFetchParticipantMenuItems(participant.userId, myUserId, menuItems);\n }\n\n return menuItems;\n },\n [\n ids.participantListRemoveParticipantButton,\n myUserId,\n onFetchParticipantMenuItems,\n onRemoveParticipant,\n props.styles?.participantItemStyles?.participantSubMenuItemsStyles,\n /* @conditional-compile-remove(raise-hand) */\n participantItemStrings.removeButtonLabel\n ]\n );\n\n const participantItemStyles = useMemo(\n () => merge(participantListItemStyle, props.styles?.participantItemStyles),\n [props.styles?.participantItemStyles]\n );\n\n /* @conditional-compile-remove(total-participant-count) */\n const overflowParticipantCountString =\n strings?.overflowParticipantCount ?? participantListStrings?.overflowParticipantCount;\n\n return (\n <Stack\n data-ui-id={ids.participantList}\n className={mergeStyles(participantListStyle, props.styles?.root)}\n role={'menu'}\n >\n {displayedParticipants.map((participant: ParticipantListParticipant) =>\n onRenderParticipant\n ? onRenderParticipant(participant)\n : onRenderParticipantDefault(\n participant,\n participantItemStrings,\n myUserId,\n onRenderAvatar,\n createParticipantMenuItems,\n participantItemStyles,\n props.onParticipantClick,\n showParticipantOverflowTooltip,\n participantAriaLabelledBy,\n /* @conditional-compile-remove(raise-hand) */\n theme,\n /* @conditional-compile-remove(hide-attendee-name) */\n attendeeRoleString\n )\n )}\n {\n /* @conditional-compile-remove(total-participant-count) */ overflowParticipantCountString &&\n totalParticipantCount &&\n totalParticipantCount > displayedParticipants.length && (\n <Text style={{ fontWeight: 400, margin: '0.5rem' }}>\n {_formatString(overflowParticipantCountString, {\n overflowCount: `${totalParticipantCount - displayedParticipants.length}`\n })}\n </Text>\n )\n }\n </Stack>\n );\n};\n"]}
1
+ {"version":3,"file":"ParticipantList.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/ParticipantList.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,IAAI,EAGJ,KAAK,EACL,WAAW,EACX,eAAe,EACf,KAAK,EAEN,MAAM,iBAAiB,CAAC;AACzB,0DAA0D,CAAC,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,aAAtB,sBAAsB,uBAAtB,sBAAsB,CAAE,wBAAwB,CAAC;IAExF,OAAO,CACL,oBAAC,KAAK,kBACQ,GAAG,CAAC,eAAe,EAC/B,SAAS,EAAE,WAAW,CAAC,oBAAoB,EAAE,MAAA,KAAK,CAAC,MAAM,0CAAE,IAAI,CAAC,EAChE,IAAI,EAAE,MAAM;QAEX,qBAAqB,CAAC,GAAG,CAAC,CAAC,WAAuC,EAAE,EAAE,CACrE,mBAAmB;YACjB,CAAC,CAAC,mBAAmB,CAAC,WAAW,CAAC;YAClC,CAAC,CAAC,0BAA0B,CACxB,WAAW,EACX,sBAAsB,EACtB,QAAQ,EACR,cAAc,EACd,0BAA0B,EAC1B,qBAAqB,EACrB,KAAK,CAAC,kBAAkB,EACxB,8BAA8B,EAC9B,yBAAyB;YACzB,6CAA6C;YAC7C,KAAK,CACN,CACN;QAEC,0DAA0D,CAAC,8BAA8B;YACvF,qBAAqB;YACrB,qBAAqB,GAAG,qBAAqB,CAAC,MAAM,IAAI,CACtD,oBAAC,IAAI,IAAC,KAAK,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,IAC/C,aAAa,CAAC,8BAA8B,EAAE;YAC7C,aAAa,EAAE,GAAG,qBAAqB,GAAG,qBAAqB,CAAC,MAAM,EAAE;SACzE,CAAC,CACG,CACR,CAEC,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n Icon,\n IContextualMenuItem,\n IContextualMenuItemStyles,\n merge,\n mergeStyles,\n PersonaPresence,\n Stack,\n Theme\n} from '@fluentui/react';\n/* @conditional-compile-remove(total-participant-count) */ /* @conditional-compile-remove(raise-hand) */\nimport { Text } from '@fluentui/react';\n/* @conditional-compile-remove(raise-hand) */\nimport { useTheme, CallingTheme } from '../theming';\n/* @conditional-compile-remove(raise-hand) */\nimport { RaisedHandIcon } from './assets/RaisedHandIcon';\nimport React, { useCallback, useMemo } from 'react';\nimport { useIdentifiers } from '../identifiers';\nimport { useLocale } from '../localization';\nimport {\n BaseCustomStyles,\n CallParticipantListParticipant,\n OnRenderAvatarCallback,\n ParticipantListParticipant\n} from '../types';\n/* @conditional-compile-remove(raise-hand) */\nimport { CustomAvatarOptions } from '../types';\nimport { ParticipantItem, ParticipantItemStrings, ParticipantItemStyles } from './ParticipantItem';\nimport { iconStyles, participantListItemStyle, participantListStyle } from './styles/ParticipantList.styles';\nimport { _formatString } from '@internal/acs-ui-common';\n\n/**\n * Styles for the {@link ParticipantList} {@link ParticipantItem}.\n *\n * @public\n */\nexport interface ParticipantListItemStyles extends ParticipantItemStyles {\n /** Styles applied to the sub-menu of the {@link ParticipantList} {@link ParticipantItem}. */\n participantSubMenuItemsStyles?: IContextualMenuItemStyles;\n}\n\n/**\n * Styles for the {@link ParticipantList}.\n *\n * @public\n */\nexport interface ParticipantListStyles extends BaseCustomStyles {\n /** Styles for the {@link ParticipantList} {@link ParticipantItem}. */\n participantItemStyles?: ParticipantListItemStyles;\n}\n\n/* @conditional-compile-remove(total-participant-count) */\n/**\n * Strings for the {@link ParticipantList}.\n *\n * @beta\n */\nexport interface ParticipantListStrings {\n /**\n * String for rendering the count of participants not contained in the displayed participant list\n */\n overflowParticipantCount?: string;\n}\n\n/**\n * A callback for providing custom menu items for each participant in {@link ParticipantList}.\n *\n * @public\n */\nexport type ParticipantMenuItemsCallback = (\n participantUserId: string,\n userId?: string,\n defaultMenuItems?: IContextualMenuItem[]\n) => IContextualMenuItem[];\n\n/**\n * Props for {@link ParticipantList}.\n *\n * @public\n */\nexport type ParticipantListProps = {\n /** Participants in user call or chat */\n participants: ParticipantListParticipant[];\n /** User ID of user */\n myUserId?: string;\n /**\n * If set to `true`, excludes the local participant from the participant list with use of `myUserId` props (required in this case).\n *\n * @defaultValue `false`\n */\n excludeMe?: boolean;\n /** Optional callback to render each participant. If no callback is provided, each participant will be rendered with `ParticipantItem` */\n onRenderParticipant?: (participant: ParticipantListParticipant) => JSX.Element | null;\n /** Optional callback to render the avatar for each participant. This property will have no effect if `onRenderParticipant` is assigned. */\n onRenderAvatar?: OnRenderAvatarCallback;\n /** Optional callback to render the context menu for each participant */\n onRemoveParticipant?: (userId: string) => void;\n /** Optional callback to render custom menu items for each participant. */\n onFetchParticipantMenuItems?: ParticipantMenuItemsCallback;\n /** Optional callback when rendered ParticipantItem is clicked */\n onParticipantClick?: (participant?: ParticipantListParticipant) => void;\n styles?: ParticipantListStyles;\n /** Optional value to determine if the tooltip should be shown for participants or not */\n showParticipantOverflowTooltip?: boolean;\n /* @conditional-compile-remove(total-participant-count) */\n /** Total number of people in the call. This number can be larger than the remote participant count. */\n totalParticipantCount?: number;\n /* @conditional-compile-remove(total-participant-count) */\n /** Strings for the participant list */\n strings?: ParticipantListStrings;\n /** Optional aria-labelledby prop that prefixes each ParticipantItem aria-label */\n participantAriaLabelledBy?: string;\n};\n\nconst onRenderParticipantDefault = (\n participant: ParticipantListParticipant,\n strings: ParticipantItemStrings,\n myUserId?: string,\n onRenderAvatar?: OnRenderAvatarCallback,\n createParticipantMenuItems?: (participant: ParticipantListParticipant) => IContextualMenuItem[],\n styles?: ParticipantListItemStyles,\n onParticipantClick?: (participant?: ParticipantListParticipant) => void,\n showParticipantOverflowTooltip?: boolean,\n participantAriaLabelledBy?: string,\n theme?: Theme\n): JSX.Element | null => {\n const callingParticipant = participant as CallParticipantListParticipant;\n\n let presence: PersonaPresence | undefined = undefined;\n if (callingParticipant) {\n presence = PersonaPresence.none;\n }\n\n const menuItems = createParticipantMenuItems && createParticipantMenuItems(participant);\n\n let displayName = participant.displayName;\n\n /* @conditional-compile-remove(hide-attendee-name) */\n const formatDisplayName = (): string | undefined => {\n if (displayName && strings.attendeeRole) {\n return _formatString(displayName, { AttendeeRole: strings.attendeeRole });\n }\n return displayName;\n };\n /* @conditional-compile-remove(hide-attendee-name) */\n displayName = formatDisplayName();\n\n /* @conditional-compile-remove(raise-hand) */\n const callingPalette = (theme as unknown as CallingTheme).callingPalette;\n\n const onRenderIcon =\n callingParticipant?.isScreenSharing ||\n callingParticipant?.isMuted ||\n /* @conditional-compile-remove(raise-hand) */ callingParticipant?.raisedHand\n ? () => (\n <Stack horizontal={true} tokens={{ childrenGap: '0.5rem' }}>\n {\n /* @conditional-compile-remove(raise-hand) */ callingParticipant.raisedHand && (\n <Stack\n horizontal={true}\n tokens={{ childrenGap: '0.2rem' }}\n style={{\n alignItems: 'center',\n padding: '0.1rem 0.2rem',\n backgroundColor: theme?.palette.neutralLighter,\n borderRadius: '0.3rem'\n }}\n >\n {callingParticipant.raisedHand.raisedHandOrderPosition && (\n <Stack.Item>\n <Text>{callingParticipant.raisedHand?.raisedHandOrderPosition}</Text>\n </Stack.Item>\n )}\n <Stack.Item>\n <RaisedHandIcon />\n </Stack.Item>\n </Stack>\n )\n }\n {callingParticipant.isScreenSharing && (\n <Icon\n iconName=\"ParticipantItemScreenShareStart\"\n className={iconStyles}\n ariaLabel={strings.sharingIconLabel}\n />\n )}\n {callingParticipant.isMuted && (\n <Icon iconName=\"ParticipantItemMicOff\" className={iconStyles} ariaLabel={strings.mutedIconLabel} />\n )}\n {\n /* @conditional-compile-remove(spotlight) */ callingParticipant.spotlight && (\n <Icon iconName=\"ParticipantItemSpotlighted\" className={iconStyles} />\n )\n }\n </Stack>\n )\n : () => null;\n\n /* @conditional-compile-remove(raise-hand) */\n const onRenderAvatarWithRaiseHand =\n callingParticipant?.raisedHand && onRenderAvatar\n ? (\n userId?: string,\n options?: CustomAvatarOptions,\n defaultOnRender?: (props: CustomAvatarOptions) => JSX.Element\n ) =>\n onRenderAvatar(\n userId,\n { ...options, styles: { root: { border: callingPalette.raiseHandGold } } },\n defaultOnRender\n )\n : onRenderAvatar;\n\n return (\n <ParticipantItem\n styles={styles}\n key={participant.userId}\n userId={participant.userId}\n displayName={displayName}\n me={myUserId ? participant.userId === myUserId : false}\n menuItems={menuItems}\n presence={presence}\n onRenderIcon={onRenderIcon}\n onRenderAvatar={onRenderAvatarWithRaiseHand}\n onClick={() => onParticipantClick?.(participant)}\n showParticipantOverflowTooltip={showParticipantOverflowTooltip}\n /* @conditional-compile-remove(one-to-n-calling) */\n /* @conditional-compile-remove(PSTN-calls) */\n participantState={callingParticipant.state}\n ariaLabelledBy={participantAriaLabelledBy}\n />\n );\n};\n\n/**\n * Sort participants by raised hand order position\n */\nconst sortParticipants = (participants: ParticipantListParticipant[]): ParticipantListParticipant[] => {\n /* @conditional-compile-remove(raise-hand) */\n const isParticipantListCallParticipant = function (participant: ParticipantListParticipant): boolean {\n return 'raisedHand' in participant;\n };\n\n /* @conditional-compile-remove(raise-hand) */\n participants.sort((a, b) => {\n if (!isParticipantListCallParticipant(a) || !isParticipantListCallParticipant(b)) {\n return 0;\n }\n const callA = a as CallParticipantListParticipant;\n const callB = b as CallParticipantListParticipant;\n if (callA.raisedHand && callB.raisedHand) {\n return callA.raisedHand.raisedHandOrderPosition - callB.raisedHand.raisedHandOrderPosition;\n } else if (callA.raisedHand) {\n return -1;\n } else if (callB.raisedHand) {\n return 1;\n }\n return 0;\n });\n return participants;\n};\n\nconst getParticipantsForDefaultRender = (\n participants: ParticipantListParticipant[],\n excludeMe: boolean,\n myUserId: string | undefined\n): ParticipantListParticipant[] => {\n if (!excludeMe || !myUserId) {\n return [...participants];\n }\n\n const userIndex = participants.map((p) => p.userId).indexOf(myUserId);\n\n if (userIndex === -1) {\n return [...participants];\n }\n\n const remoteParticipants = [...participants];\n remoteParticipants.splice(userIndex, 1);\n\n return remoteParticipants;\n};\n\n/**\n * Component to render all calling or chat participants.\n *\n * By default, each participant is rendered with {@link ParticipantItem}. See {@link ParticipantListProps.onRenderParticipant} to override.\n *\n * @public\n */\nexport const ParticipantList = (props: ParticipantListProps): JSX.Element => {\n const {\n excludeMe = false,\n myUserId,\n participants,\n onRemoveParticipant,\n onRenderAvatar,\n onRenderParticipant,\n onFetchParticipantMenuItems,\n showParticipantOverflowTooltip,\n /* @conditional-compile-remove(total-participant-count) */\n totalParticipantCount,\n /* @conditional-compile-remove(total-participant-count) */\n strings,\n participantAriaLabelledBy\n } = props;\n\n /* @conditional-compile-remove(raise-hand) */\n const theme = useTheme();\n const ids = useIdentifiers();\n const participantItemStrings = useLocale().strings.participantItem;\n /* @conditional-compile-remove(total-participant-count) */\n const participantListStrings = useLocale().strings.ParticipantList;\n\n const displayedParticipants: ParticipantListParticipant[] = useMemo(() => {\n return onRenderParticipant ? participants : getParticipantsForDefaultRender(participants, excludeMe, myUserId);\n }, [participants, excludeMe, myUserId, onRenderParticipant]);\n\n sortParticipants(displayedParticipants);\n\n const createParticipantMenuItems = useCallback(\n (participant: ParticipantListParticipant): IContextualMenuItem[] => {\n let menuItems: IContextualMenuItem[] = [];\n\n const participantIsRemovable = participant.isRemovable;\n if (participant.userId !== myUserId && onRemoveParticipant && participantIsRemovable) {\n menuItems.push({\n key: 'remove',\n text: participantItemStrings.removeButtonLabel,\n onClick: () => onRemoveParticipant(participant.userId),\n itemProps: {\n styles: props.styles?.participantItemStyles?.participantSubMenuItemsStyles\n },\n 'data-ui-id': ids.participantListRemoveParticipantButton\n });\n }\n\n if (onFetchParticipantMenuItems) {\n menuItems = onFetchParticipantMenuItems(participant.userId, myUserId, menuItems);\n }\n\n return menuItems;\n },\n [\n ids.participantListRemoveParticipantButton,\n myUserId,\n onFetchParticipantMenuItems,\n onRemoveParticipant,\n props.styles?.participantItemStyles?.participantSubMenuItemsStyles,\n /* @conditional-compile-remove(raise-hand) */\n participantItemStrings.removeButtonLabel\n ]\n );\n\n const participantItemStyles = useMemo(\n () => merge(participantListItemStyle, props.styles?.participantItemStyles),\n [props.styles?.participantItemStyles]\n );\n\n /* @conditional-compile-remove(total-participant-count) */\n const overflowParticipantCountString =\n strings?.overflowParticipantCount ?? participantListStrings?.overflowParticipantCount;\n\n return (\n <Stack\n data-ui-id={ids.participantList}\n className={mergeStyles(participantListStyle, props.styles?.root)}\n role={'menu'}\n >\n {displayedParticipants.map((participant: ParticipantListParticipant) =>\n onRenderParticipant\n ? onRenderParticipant(participant)\n : onRenderParticipantDefault(\n participant,\n participantItemStrings,\n myUserId,\n onRenderAvatar,\n createParticipantMenuItems,\n participantItemStyles,\n props.onParticipantClick,\n showParticipantOverflowTooltip,\n participantAriaLabelledBy,\n /* @conditional-compile-remove(raise-hand) */\n theme\n )\n )}\n {\n /* @conditional-compile-remove(total-participant-count) */ overflowParticipantCountString &&\n totalParticipantCount &&\n totalParticipantCount > displayedParticipants.length && (\n <Text style={{ fontWeight: 400, margin: '0.5rem' }}>\n {_formatString(overflowParticipantCountString, {\n overflowCount: `${totalParticipantCount - displayedParticipants.length}`\n })}\n </Text>\n )\n }\n </Stack>\n );\n};\n"]}
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { BaseCustomStyles } from '../../types';
3
3
  import { RichTextEditorComponentRef } from './RichTextEditor';
4
+ import { RichTextSendBoxStrings } from './RTESendBox';
4
5
  /**
5
6
  * @private
6
7
  */
@@ -14,6 +15,7 @@ export interface RTEInputBoxComponentProps {
14
15
  content: string;
15
16
  onChange: (newValue?: string) => void;
16
17
  editorComponentRef: React.RefObject<RichTextEditorComponentRef>;
18
+ strings: Partial<RichTextSendBoxStrings>;
17
19
  }
18
20
  /**
19
21
  * @private
@@ -8,6 +8,6 @@ import { RichTextEditor } from './RichTextEditor';
8
8
  export const RTEInputBoxComponent = (props) => {
9
9
  const { placeholderText, content, onChange, editorComponentRef } = props;
10
10
  return (React.createElement("div", null,
11
- React.createElement(RichTextEditor, { content: content, placeholderText: placeholderText, onChange: onChange, ref: editorComponentRef })));
11
+ React.createElement(RichTextEditor, { content: content, placeholderText: placeholderText, onChange: onChange, ref: editorComponentRef, strings: props.strings })));
12
12
  };
13
13
  //# sourceMappingURL=RTEInputBoxComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RTEInputBoxComponent.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/RTE/RTEInputBoxComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAA8B,MAAM,kBAAkB,CAAC;AAiB9E;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAgC,EAAe,EAAE;IACpF,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAC;IAEzE,OAAO,CACL;QACE,oBAAC,cAAc,IACb,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,kBAAkB,GACvB,CACE,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { BaseCustomStyles } from '../../types';\nimport { RichTextEditor, RichTextEditorComponentRef } from './RichTextEditor';\n\n/**\n * @private\n */\nexport interface RTEInputBoxComponentStylesProps extends BaseCustomStyles {}\n\n/**\n * @private\n */\nexport interface RTEInputBoxComponentProps {\n placeholderText?: string;\n content: string;\n onChange: (newValue?: string) => void;\n editorComponentRef: React.RefObject<RichTextEditorComponentRef>;\n}\n\n/**\n * @private\n */\nexport const RTEInputBoxComponent = (props: RTEInputBoxComponentProps): JSX.Element => {\n const { placeholderText, content, onChange, editorComponentRef } = props;\n\n return (\n <div>\n <RichTextEditor\n content={content}\n placeholderText={placeholderText}\n onChange={onChange}\n ref={editorComponentRef}\n />\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"RTEInputBoxComponent.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/RTE/RTEInputBoxComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAA8B,MAAM,kBAAkB,CAAC;AAmB9E;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAgC,EAAe,EAAE;IACpF,MAAM,EAAE,eAAe,EAAE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAC;IAEzE,OAAO,CACL;QACE,oBAAC,cAAc,IACb,OAAO,EAAE,OAAO,EAChB,eAAe,EAAE,eAAe,EAChC,QAAQ,EAAE,QAAQ,EAClB,GAAG,EAAE,kBAAkB,EACvB,OAAO,EAAE,KAAK,CAAC,OAAO,GACtB,CACE,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React from 'react';\nimport { BaseCustomStyles } from '../../types';\nimport { RichTextEditor, RichTextEditorComponentRef } from './RichTextEditor';\nimport { RichTextSendBoxStrings } from './RTESendBox';\n\n/**\n * @private\n */\nexport interface RTEInputBoxComponentStylesProps extends BaseCustomStyles {}\n\n/**\n * @private\n */\nexport interface RTEInputBoxComponentProps {\n placeholderText?: string;\n content: string;\n onChange: (newValue?: string) => void;\n editorComponentRef: React.RefObject<RichTextEditorComponentRef>;\n strings: Partial<RichTextSendBoxStrings>;\n}\n\n/**\n * @private\n */\nexport const RTEInputBoxComponent = (props: RTEInputBoxComponentProps): JSX.Element => {\n const { placeholderText, content, onChange, editorComponentRef } = props;\n\n return (\n <div>\n <RichTextEditor\n content={content}\n placeholderText={placeholderText}\n onChange={onChange}\n ref={editorComponentRef}\n strings={props.strings}\n />\n </div>\n );\n};\n"]}
@@ -0,0 +1,12 @@
1
+ import { Theme } from '@fluentui/react';
2
+ import { LocalizedStrings, RibbonButton } from 'roosterjs-react';
3
+ import { RichTextSendBoxStrings } from './RTESendBox';
4
+ /**
5
+ * @private
6
+ */
7
+ export declare const ribbonButtons: (theme: Theme) => RibbonButton<string>[];
8
+ /**
9
+ * @private
10
+ */
11
+ export declare const ribbonButtonsStrings: (strings: Partial<RichTextSendBoxStrings>) => LocalizedStrings<string>;
12
+ //# sourceMappingURL=RTERibbonButtons.d.ts.map