@azure/communication-react 1.17.0-alpha-202405160013 → 1.17.0-alpha-202405180013

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 (153) hide show
  1. package/dist/communication-react.d.ts +1 -1
  2. package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-LLjD-Jp0.js → ChatMessageComponentAsRichTextEditBox-r0U_8d3I.js} +22 -17
  3. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-r0U_8d3I.js.map +1 -0
  4. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-D7SB5NwN.js → RichTextSendBoxWrapper-DNlYAgO2.js} +6 -8
  5. package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-D7SB5NwN.js.map → RichTextSendBoxWrapper-DNlYAgO2.js.map} +1 -1
  6. package/dist/dist-cjs/communication-react/{index-CfI_of00.js → index-BLj9R9ms.js} +939 -526
  7. package/dist/dist-cjs/communication-react/index-BLj9R9ms.js.map +1 -0
  8. package/dist/dist-cjs/communication-react/index.js +5 -7
  9. package/dist/dist-cjs/communication-react/index.js.map +1 -1
  10. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
  11. package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
  12. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js +1 -6
  13. package/dist/dist-esm/calling-component-bindings/src/utils/videoGalleryUtils.js.map +1 -1
  14. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js +1 -1
  15. package/dist/dist-esm/calling-component-bindings/src/videoGallerySelector.js.map +1 -1
  16. package/dist/dist-esm/calling-stateful-client/src/CallClientState.d.ts +1 -1
  17. package/dist/dist-esm/calling-stateful-client/src/CallClientState.js.map +1 -1
  18. package/dist/dist-esm/calling-stateful-client/src/CallContext.js +0 -4
  19. package/dist/dist-esm/calling-stateful-client/src/CallContext.js.map +1 -1
  20. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js +0 -3
  21. package/dist/dist-esm/calling-stateful-client/src/CallSubscriber.js.map +1 -1
  22. package/dist/dist-esm/calling-stateful-client/src/Converter.js +0 -1
  23. package/dist/dist-esm/calling-stateful-client/src/Converter.js.map +1 -1
  24. package/dist/dist-esm/calling-stateful-client/src/PPTLiveSubscriber.js +0 -2
  25. package/dist/dist-esm/calling-stateful-client/src/PPTLiveSubscriber.js.map +1 -1
  26. package/dist/dist-esm/calling-stateful-client/src/index-public.js.map +1 -1
  27. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +17 -10
  28. package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
  29. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +1 -1
  30. package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
  31. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +9 -0
  32. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +29 -0
  33. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +1 -0
  34. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +1 -1
  35. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +15 -20
  36. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +1 -1
  37. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +12 -0
  38. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +23 -0
  39. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +1 -0
  40. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +15 -0
  41. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +39 -0
  42. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +1 -0
  43. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +24 -0
  44. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +66 -0
  45. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +1 -0
  46. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +20 -0
  47. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +46 -0
  48. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +1 -0
  49. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +29 -0
  50. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +71 -0
  51. package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +1 -0
  52. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +7 -10
  53. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +170 -91
  54. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
  55. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -1
  56. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +29 -12
  57. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
  58. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +12 -46
  59. package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
  60. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +19 -0
  61. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +209 -0
  62. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +1 -0
  63. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +7 -0
  64. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +49 -0
  65. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +1 -0
  66. package/dist/dist-esm/react-components/src/components/RichTextEditor/{Buttons → Toolbar}/Table/RichTextInsertTablePane.d.ts +2 -2
  67. package/dist/dist-esm/react-components/src/components/RichTextEditor/{Buttons → Toolbar}/Table/RichTextInsertTablePane.js +3 -3
  68. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +1 -0
  69. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +6 -0
  70. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +13 -0
  71. package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +1 -0
  72. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +1 -1
  73. package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +1 -1
  74. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js +1 -4
  75. package/dist/dist-esm/react-components/src/components/VideoGallery/RemoteScreenShare.js.map +1 -1
  76. package/dist/dist-esm/react-components/src/components/VideoGallery.js +1 -3
  77. package/dist/dist-esm/react-components/src/components/VideoGallery.js.map +1 -1
  78. package/dist/dist-esm/react-components/src/components/VideoTile.js +0 -1
  79. package/dist/dist-esm/react-components/src/components/VideoTile.js.map +1 -1
  80. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +3 -1
  81. package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
  82. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +3 -3
  83. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +4 -5
  84. package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
  85. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +37 -0
  86. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +60 -0
  87. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +1 -0
  88. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +11 -0
  89. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +95 -0
  90. package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +1 -1
  91. package/dist/dist-esm/react-components/src/components/utils.d.ts +1 -1
  92. package/dist/dist-esm/react-components/src/components/utils.js +1 -3
  93. package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
  94. package/dist/dist-esm/react-components/src/localization/locales/ar-SA/strings.json +22 -1
  95. package/dist/dist-esm/react-components/src/localization/locales/cs-CZ/strings.json +22 -1
  96. package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +22 -1
  97. package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +22 -1
  98. package/dist/dist-esm/react-components/src/localization/locales/en-US/strings.json +2 -1
  99. package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +22 -1
  100. package/dist/dist-esm/react-components/src/localization/locales/fi-FI/strings.json +23 -2
  101. package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +31 -10
  102. package/dist/dist-esm/react-components/src/localization/locales/he-IL/strings.json +22 -1
  103. package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +22 -1
  104. package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +31 -10
  105. package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +31 -10
  106. package/dist/dist-esm/react-components/src/localization/locales/nb-NO/strings.json +22 -1
  107. package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +22 -1
  108. package/dist/dist-esm/react-components/src/localization/locales/pl-PL/strings.json +22 -1
  109. package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +31 -10
  110. package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +22 -1
  111. package/dist/dist-esm/react-components/src/localization/locales/sv-SE/strings.json +22 -1
  112. package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +22 -1
  113. package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +30 -9
  114. package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +24 -3
  115. package/dist/dist-esm/react-composites/src/composites/localization/locales/ar-SA/strings.json +4 -0
  116. package/dist/dist-esm/react-composites/src/composites/localization/locales/cs-CZ/strings.json +4 -0
  117. package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +4 -0
  118. package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +4 -0
  119. package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +4 -0
  120. package/dist/dist-esm/react-composites/src/composites/localization/locales/fi-FI/strings.json +4 -0
  121. package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +4 -0
  122. package/dist/dist-esm/react-composites/src/composites/localization/locales/he-IL/strings.json +4 -0
  123. package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +4 -0
  124. package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +4 -0
  125. package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +4 -0
  126. package/dist/dist-esm/react-composites/src/composites/localization/locales/nb-NO/strings.json +4 -0
  127. package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +4 -0
  128. package/dist/dist-esm/react-composites/src/composites/localization/locales/pl-PL/strings.json +4 -0
  129. package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +4 -0
  130. package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +4 -0
  131. package/dist/dist-esm/react-composites/src/composites/localization/locales/sv-SE/strings.json +4 -0
  132. package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +4 -0
  133. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +4 -0
  134. package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +4 -0
  135. package/package.json +6 -8
  136. package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-LLjD-Jp0.js.map +0 -1
  137. package/dist/dist-cjs/communication-react/index-CfI_of00.js.map +0 -1
  138. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.d.ts +0 -7
  139. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.js +0 -86
  140. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.js.map +0 -1
  141. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.d.ts +0 -7
  142. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.js +0 -55
  143. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.js.map +0 -1
  144. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTablePane.js.map +0 -1
  145. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.d.ts +0 -8
  146. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.js +0 -66
  147. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.js.map +0 -1
  148. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/insertTableAction.d.ts +0 -9
  149. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/insertTableAction.js +0 -56
  150. package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/insertTableAction.js.map +0 -1
  151. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorStringsUtils.d.ts +0 -15
  152. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorStringsUtils.js +0 -39
  153. package/dist/dist-esm/react-components/src/components/utils/RichTextEditorStringsUtils.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"TextFieldWithMention.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/TextFieldWithMention/TextFieldWithMention.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAa,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAA+B,MAAM,iBAAiB,CAAC;AAEzE,OAAO,EAAE,qCAAqC,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAEL,0BAA0B,EAC1B,+BAA+B,EAC/B,sBAAsB,EACtB,kCAAkC,EAClC,wBAAwB,EACxB,8BAA8B,EAC9B,eAAe,EACf,UAAU,EACX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAwB,eAAe,EAAW,MAAM,mBAAmB,CAAC;AAEnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAE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B,yBAAyB;oBACzB,qBAAqB;iBACtB,CAAC,CAAC;YACL,CAAC,EACD,SAAS,EAAE,GAAG,EAAE;gBACd,4BAA4B,EAAE,CAAC;YACjC,CAAC,EACD,YAAY,EAAE,GAAG,EAAE;gBACjB,0BAA0B,EAAE,CAAC;YAC/B,CAAC,EACD,WAAW,EAAE,CAAC,KAAK,EAAE,EAAE;gBACrB,YAAY,CAAC;oBACX,KAAK;oBACL,mBAAmB;oBACnB,iBAAiB;oBACjB,yBAAyB;oBACzB,qBAAqB;iBACtB,CAAC,CAAC;YACL,CAAC,EACD,UAAU,EAAE,GAAG,EAAE;gBACf,4BAA4B,CAAC;YAC/B,CAAC,EACD,MAAM,EAAE,GAAG,EAAE;gBACX,iFAAiF;gBACjF,uDAAuD;gBACvD,sCAAsC,CAAC,KAAK,CAAC,CAAC;YAChD,CAAC,EACD,SAAS,EAAE,kBAAkB,EAC7B,UAAU,EAAE,WAAW,IACvB,CACD,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useState, FormEvent, useCallback, useRef } from 'react';\nimport { useEffect, useMemo } from 'react';\nimport { useLocale } from '../../localization';\nimport { Announcer } from '../Announcer';\nimport { TextField, ITextField, ITextFieldProps } from '@fluentui/react';\n\nimport { isEnterKeyEventFromCompositionSession, nullToUndefined } from '../utils';\nimport {\n TagData,\n findMentionTagForSelection,\n findNewSelectionIndexForMention,\n findStringsDiffIndexes,\n getDisplayNameForMentionSuggestion,\n getValidatedIndexInRange,\n htmlStringForMentionSuggestion,\n textToTagParser,\n updateHTML\n} from './mentionTagUtils';\n\nimport { Caret } from 'textarea-caret-ts';\n\nimport { MentionLookupOptions, _MentionPopover, Mention } from '../MentionPopover';\n\nimport { useDebouncedCallback } from 'use-debounce';\n\nconst DEFAULT_MENTION_TRIGGER = '@';\n\n/**\n * Props for the TextFieldWithMention component.\n *\n * @private\n */\nexport interface TextFieldWithMentionProps {\n textFieldProps: ITextFieldProps;\n dataUiId?: string;\n textValue: string; // This could be plain text or HTML.\n onChange: (event?: FormEvent<HTMLInputElement | HTMLTextAreaElement>, newValue?: string) => void;\n onKeyDown?: (ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;\n onEnterKeyDown?: () => void;\n textFieldRef?: React.RefObject<ITextField>;\n supportNewline?: boolean;\n mentionLookupOptions?: MentionLookupOptions;\n}\n\n/**\n * @private\n */\nexport const TextFieldWithMention = (props: TextFieldWithMentionProps): JSX.Element => {\n const {\n textFieldProps,\n dataUiId,\n textValue,\n onChange,\n textFieldRef,\n onKeyDown,\n onEnterKeyDown,\n supportNewline,\n mentionLookupOptions\n } = props;\n const inputBoxRef = useRef<HTMLDivElement>(null);\n\n // Current suggestion list, provided by the callback\n const [mentionSuggestions, setMentionSuggestions] = useState<Mention[]>([]);\n\n // Current suggestion list, provided by the callback\n const [activeSuggestionIndex, setActiveSuggestionIndex] = useState<number | undefined>(undefined);\n\n // Index of the current trigger character in the text field\n const [currentTriggerStartIndex, setCurrentTriggerStartIndex] = useState<number>(-1);\n\n const [inputTextValue, setInputTextValue] = useState<string>('');\n\n // Internal value for text value prop\n const [internalTextValue, setInternalTextValue] = useState<string>('');\n\n const [tagsValue, setTagsValue] = useState<TagData[]>([]);\n\n // Index of the previous selection start in the text field\n const [selectionStartValue, setSelectionStartValue] = useState<number | undefined>();\n\n // Index of the previous selection end in the text field\n const [selectionEndValue, setSelectionEndValue] = useState<number | undefined>();\n\n // Boolean value to check if onMouseDown event should be handled during select as selection range\n // for onMouseDown event is not updated yet and the selection range for mouse click/taps will be\n // updated in onSelect event if needed.\n const [shouldHandleOnMouseDownDuringSelect, setShouldHandleOnMouseDownDuringSelect] = useState<boolean>(true);\n\n // Boolean flag to check if mouse/touch move event should be handled\n const [shouldHandleMoveEvent, setShouldHandleMoveEvent] = useState<boolean>(false);\n\n // Indexes of start of touch/mouse selection\n const [interactionStartSelection, setInteractionStartSelection] = useState<\n { start: number | undefined; end: number | undefined } | undefined\n >();\n\n // Caret position in the text field\n const [caretPosition, setCaretPosition] = useState<Caret.Position | undefined>(undefined);\n\n // Index of where the caret is in the text field\n const [caretIndex, setCaretIndex] = useState<number | undefined>(undefined);\n\n const localeStrings = useLocale().strings;\n\n // Set mention suggestions\n const updateMentionSuggestions = useCallback(\n (suggestions: Mention[]) => {\n setMentionSuggestions(suggestions);\n },\n [setMentionSuggestions]\n );\n\n useEffect(() => {\n setInternalTextValue(textValue);\n // update mention suggestions before the next render cycle\n updateMentionSuggestions([]);\n }, [textValue, updateMentionSuggestions]);\n\n // Parse the text and get the plain text version to display in the input box\n useEffect(() => {\n const trigger = mentionLookupOptions?.trigger || DEFAULT_MENTION_TRIGGER;\n const parsedHTMLData = textToTagParser(internalTextValue, trigger);\n setInputTextValue(parsedHTMLData.plainText);\n setTagsValue(parsedHTMLData.tags);\n updateMentionSuggestions([]);\n }, [internalTextValue, mentionLookupOptions?.trigger, updateMentionSuggestions]);\n\n useEffect(() => {\n // effect for caret index update\n if (caretIndex === undefined || textFieldRef === undefined || textFieldRef?.current === undefined) {\n return;\n }\n // get validated caret index between 0 and inputTextValue.length otherwise caret will be set to incorrect index\n const updatedCaretIndex = getValidatedIndexInRange({\n min: 0,\n max: inputTextValue.length,\n currentValue: caretIndex\n });\n textFieldRef?.current?.setSelectionRange(updatedCaretIndex, updatedCaretIndex);\n setSelectionStartValue(updatedCaretIndex);\n setSelectionEndValue(updatedCaretIndex);\n }, [caretIndex, inputTextValue, textFieldRef, setSelectionStartValue, setSelectionEndValue]);\n\n const onSuggestionSelected = useCallback(\n (suggestion: Mention) => {\n let selectionEnd = textFieldRef?.current?.selectionEnd || -1;\n if (selectionEnd < 0) {\n selectionEnd = 0;\n } else if (selectionEnd > inputTextValue.length) {\n selectionEnd = inputTextValue.length;\n }\n const oldPlainText = inputTextValue;\n const mention = htmlStringForMentionSuggestion(suggestion, localeStrings);\n\n // update plain text with the mention html text\n const triggerText = mentionLookupOptions?.trigger ?? DEFAULT_MENTION_TRIGGER;\n // update html text with updated plain text\n const updatedContent = updateHTML({\n htmlText: internalTextValue,\n oldPlainText,\n tags: tagsValue,\n startIndex: currentTriggerStartIndex,\n oldPlainTextEndIndex: selectionEnd,\n change: mention,\n mentionTrigger: triggerText\n });\n\n setInternalTextValue(updatedContent.updatedHTML);\n const displayName = getDisplayNameForMentionSuggestion(suggestion, localeStrings);\n const newCaretIndex = currentTriggerStartIndex + displayName.length + triggerText.length;\n // move the caret in the text field to the end of the mention plain text\n setCaretIndex(newCaretIndex);\n setSelectionEndValue(newCaretIndex);\n setSelectionStartValue(newCaretIndex);\n setCurrentTriggerStartIndex(-1);\n updateMentionSuggestions([]);\n // set focus back to text field\n textFieldRef?.current?.focus();\n setActiveSuggestionIndex(undefined);\n onChange && onChange(undefined, updatedContent.updatedHTML);\n },\n [\n textFieldRef,\n inputTextValue,\n currentTriggerStartIndex,\n mentionLookupOptions?.trigger,\n onChange,\n internalTextValue,\n tagsValue,\n updateMentionSuggestions,\n localeStrings\n ]\n );\n\n const onTextFieldKeyDown = useCallback(\n (ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n // caretIndex should be set to undefined when the user is typing\n setCaretIndex(undefined);\n // shouldHandleOnMouseDownDuringSelect should be set to false after the last mouse down event.\n // it shouldn't be updated in onMouseUp\n // as onMouseUp can be triggered before or after onSelect event\n // because its order depends on mouse events not selection.\n setShouldHandleOnMouseDownDuringSelect(false);\n\n if (isEnterKeyEventFromCompositionSession(ev)) {\n return;\n }\n let isActiveSuggestionIndexUpdated = false;\n if (mentionSuggestions.length > 0) {\n if (ev.key === 'ArrowUp') {\n ev.preventDefault();\n const newActiveIndex =\n activeSuggestionIndex === undefined\n ? mentionSuggestions.length - 1\n : Math.max(activeSuggestionIndex - 1, 0);\n setActiveSuggestionIndex(newActiveIndex);\n isActiveSuggestionIndexUpdated = true;\n } else if (ev.key === 'ArrowDown') {\n ev.preventDefault();\n const newActiveIndex =\n activeSuggestionIndex === undefined\n ? 0\n : Math.min(activeSuggestionIndex + 1, mentionSuggestions.length - 1);\n setActiveSuggestionIndex(newActiveIndex);\n isActiveSuggestionIndexUpdated = true;\n } else if (ev.key === 'Escape') {\n updateMentionSuggestions([]);\n // reset active suggestion index when suggestions are closed\n setActiveSuggestionIndex(undefined);\n isActiveSuggestionIndexUpdated = true;\n }\n }\n if (ev.key === 'Enter' && (ev.shiftKey === false || !supportNewline)) {\n ev.preventDefault();\n\n // If we are looking up a mention, select the focused suggestion\n if (mentionSuggestions.length > 0 && activeSuggestionIndex !== undefined) {\n const selectedMention = mentionSuggestions[activeSuggestionIndex];\n if (selectedMention) {\n onSuggestionSelected(selectedMention);\n return;\n }\n }\n\n onEnterKeyDown && onEnterKeyDown();\n } else if (!isActiveSuggestionIndexUpdated) {\n // Update the active suggestion index if the user is typing,\n // otherwise the focus will be lost\n setActiveSuggestionIndex(undefined);\n }\n onKeyDown && onKeyDown(ev);\n },\n [\n onEnterKeyDown,\n onKeyDown,\n supportNewline,\n mentionSuggestions,\n activeSuggestionIndex,\n onSuggestionSelected,\n updateMentionSuggestions\n ]\n );\n\n const debouncedQueryUpdate = useDebouncedCallback(async (query: string) => {\n let suggestions = (await mentionLookupOptions?.onQueryUpdated(query)) ?? [];\n suggestions = suggestions.filter((suggestion) => suggestion.displayText.trim() !== '');\n if (suggestions.length === 0) {\n setActiveSuggestionIndex(undefined);\n } else if (activeSuggestionIndex === undefined) {\n // Set the active to the first, if it's not already set\n setActiveSuggestionIndex(0);\n }\n updateMentionSuggestions(suggestions);\n }, 500);\n\n // Update selections index in mention to navigate by words\n const updateSelectionIndexesWithMentionIfNeeded = useCallback(\n ({\n event,\n inputTextValue,\n selectionEndValue,\n selectionStartValue,\n tagsValue\n }: {\n event: FormEvent<HTMLInputElement | HTMLTextAreaElement>;\n inputTextValue: string;\n selectionEndValue?: number;\n selectionStartValue?: number;\n tagsValue: TagData[];\n }): void => {\n let updatedStartIndex = event.currentTarget.selectionStart;\n let updatedEndIndex = event.currentTarget.selectionEnd;\n if (\n event.currentTarget.selectionStart === event.currentTarget.selectionEnd &&\n event.currentTarget.selectionStart !== null &&\n event.currentTarget.selectionStart !== -1\n ) {\n // just a caret movement/usual typing or deleting\n const mentionTag = findMentionTagForSelection(tagsValue, event.currentTarget.selectionStart);\n // don't include boundary cases to show correct selection, otherwise it will show selection at mention boundaries\n if (\n mentionTag !== undefined &&\n mentionTag.plainTextBeginIndex !== undefined &&\n event.currentTarget.selectionStart > mentionTag.plainTextBeginIndex &&\n event.currentTarget.selectionStart < (mentionTag.plainTextEndIndex ?? mentionTag.plainTextBeginIndex)\n ) {\n // get updated selection index\n const newSelectionIndex = findNewSelectionIndexForMention({\n tag: mentionTag,\n textValue: inputTextValue,\n currentSelectionIndex: event.currentTarget.selectionStart,\n previousSelectionIndex: selectionStartValue ?? inputTextValue.length\n });\n updatedStartIndex = newSelectionIndex;\n updatedEndIndex = newSelectionIndex;\n }\n } else if (event.currentTarget.selectionStart !== event.currentTarget.selectionEnd) {\n // Both e.currentTarget.selectionStart !== selectionStartValue and e.currentTarget.selectionEnd !== selectionEndValue can be true when a user selects a text by double click\n if (event.currentTarget.selectionStart !== null && event.currentTarget.selectionStart !== selectionStartValue) {\n // the selection start is changed\n const mentionTag = findMentionTagForSelection(tagsValue, event.currentTarget.selectionStart);\n // don't include boundary cases to show correct selection, otherwise it will show selection at mention boundaries\n if (\n mentionTag !== undefined &&\n mentionTag.plainTextBeginIndex !== undefined &&\n event.currentTarget.selectionStart > mentionTag.plainTextBeginIndex &&\n event.currentTarget.selectionStart < (mentionTag.plainTextEndIndex ?? mentionTag.plainTextBeginIndex)\n ) {\n updatedStartIndex = findNewSelectionIndexForMention({\n tag: mentionTag,\n textValue: inputTextValue,\n currentSelectionIndex: event.currentTarget.selectionStart,\n previousSelectionIndex: selectionStartValue ?? inputTextValue.length\n });\n }\n }\n if (event.currentTarget.selectionEnd !== null && event.currentTarget.selectionEnd !== selectionEndValue) {\n // the selection end is changed\n const mentionTag = findMentionTagForSelection(tagsValue, event.currentTarget.selectionEnd);\n // don't include boundary cases to show correct selection, otherwise it will show selection at mention boundaries\n if (\n mentionTag !== undefined &&\n mentionTag.plainTextBeginIndex !== undefined &&\n event.currentTarget.selectionEnd > mentionTag.plainTextBeginIndex &&\n event.currentTarget.selectionEnd < (mentionTag.plainTextEndIndex ?? mentionTag.plainTextBeginIndex)\n ) {\n updatedEndIndex = findNewSelectionIndexForMention({\n tag: mentionTag,\n textValue: inputTextValue,\n currentSelectionIndex: event.currentTarget.selectionEnd,\n previousSelectionIndex: selectionEndValue ?? inputTextValue.length\n });\n }\n }\n }\n // e.currentTarget.selectionDirection should be set to handle shift + arrow keys\n if (event.currentTarget.selectionDirection === null) {\n event.currentTarget.setSelectionRange(updatedStartIndex, updatedEndIndex);\n } else {\n event.currentTarget.setSelectionRange(\n updatedStartIndex,\n updatedEndIndex,\n event.currentTarget.selectionDirection\n );\n }\n setSelectionStartValue(nullToUndefined(updatedStartIndex));\n setSelectionEndValue(nullToUndefined(updatedEndIndex));\n },\n [setSelectionStartValue, setSelectionEndValue]\n );\n\n const handleOnSelect = useCallback(\n ({\n event,\n inputTextValue,\n tags,\n shouldHandleOnMouseDownDuringSelect,\n selectionStartValue,\n selectionEndValue,\n interactionStartSelection\n }: {\n event: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>;\n inputTextValue: string;\n tags: TagData[];\n shouldHandleOnMouseDownDuringSelect: boolean;\n selectionStartValue?: number;\n selectionEndValue?: number;\n interactionStartSelection?: { start: number | undefined; end: number | undefined };\n }): void => {\n if (event.currentTarget.selectionStart === 0 && event.currentTarget.selectionEnd === inputTextValue.length) {\n // entire text is selected, no need to change anything\n setSelectionStartValue(event.currentTarget.selectionStart);\n setSelectionEndValue(event.currentTarget.selectionEnd);\n setInteractionStartSelection(undefined);\n setShouldHandleOnMouseDownDuringSelect(false);\n } else if (shouldHandleOnMouseDownDuringSelect) {\n if (\n interactionStartSelection !== undefined &&\n (interactionStartSelection.start !== event.currentTarget.selectionStart ||\n interactionStartSelection.end !== event.currentTarget.selectionEnd)\n ) {\n // selection was changed by mouse\n // for mouse selection only, it's possible to start selection in the middle of a word in a mention\n // because of this when event.currentTarget.selectionStart === mouseMoveStartPoint.start\n // selectionStartValue for updateSelectionIndexesWithMentionIfNeeded should be set\n // to the end of the input to mimic selection from right to left for the left selection index\n const updatedSelectionStartValue =\n event.currentTarget.selectionStart === interactionStartSelection.start\n ? inputTextValue.length\n : interactionStartSelection.start;\n // selectionStart is always less than selectionEnd so sometimes selectionEnd is user's start of the selection\n // so when event.currentTarget.selectionEnd === mouseMoveStartPoint.end\n // selectionEndValue for updateSelectionIndexesWithMentionIfNeeded should be set\n // to the beginning of the input to mimic selection from left to right for the right selection index\n const updatedSelectionEndValue =\n event.currentTarget.selectionEnd === interactionStartSelection.end ? 0 : interactionStartSelection.end;\n updateSelectionIndexesWithMentionIfNeeded({\n event,\n inputTextValue,\n selectionStartValue: updatedSelectionStartValue,\n selectionEndValue: updatedSelectionEndValue,\n tagsValue: tags\n });\n setInteractionStartSelection(undefined);\n setShouldHandleOnMouseDownDuringSelect(false);\n } else if (event.currentTarget.selectionStart !== null && event.currentTarget.selectionEnd !== null) {\n // on select was triggered by mouse down/up with no movement\n const mentionTag = findMentionTagForSelection(tags, event.currentTarget.selectionStart);\n if (mentionTag !== undefined && mentionTag.plainTextBeginIndex !== undefined) {\n // handle mention click by selecting the whole mention\n // if the selection is not on the bounds of the mention\n // disable selection for clicks on mention bounds\n const mentionEndIndex = mentionTag.plainTextEndIndex ?? mentionTag.plainTextBeginIndex;\n\n if (\n event.currentTarget.selectionStart !== event.currentTarget.selectionEnd &&\n event.currentTarget.selectionEnd > mentionEndIndex\n ) {\n // handle triple click when the text starts from mention\n if (event.currentTarget.selectionDirection === null) {\n event.currentTarget.setSelectionRange(mentionTag.plainTextBeginIndex, event.currentTarget.selectionEnd);\n } else {\n event.currentTarget.setSelectionRange(\n mentionTag.plainTextBeginIndex,\n event.currentTarget.selectionEnd,\n event.currentTarget.selectionDirection\n );\n }\n setSelectionStartValue(mentionTag.plainTextBeginIndex);\n setSelectionEndValue(event.currentTarget.selectionEnd);\n } else if (\n event.currentTarget.selectionStart !== event.currentTarget.selectionEnd ||\n (event.currentTarget.selectionStart !== mentionTag.plainTextBeginIndex &&\n event.currentTarget.selectionStart !== mentionEndIndex)\n ) {\n if (event.currentTarget.selectionDirection === null) {\n event.currentTarget.setSelectionRange(mentionTag.plainTextBeginIndex, mentionEndIndex);\n } else {\n event.currentTarget.setSelectionRange(\n mentionTag.plainTextBeginIndex,\n mentionEndIndex,\n event.currentTarget.selectionDirection\n );\n }\n setSelectionStartValue(mentionTag.plainTextBeginIndex);\n setSelectionEndValue(mentionEndIndex);\n } else {\n // bounds of the mention were selected\n setSelectionStartValue(event.currentTarget.selectionStart);\n setSelectionEndValue(event.currentTarget.selectionEnd);\n }\n } else {\n // not a mention tag\n setSelectionStartValue(event.currentTarget.selectionStart);\n setSelectionEndValue(nullToUndefined(event.currentTarget.selectionEnd));\n }\n setInteractionStartSelection(undefined);\n }\n } else {\n // selection was changed by keyboard\n updateSelectionIndexesWithMentionIfNeeded({\n event,\n inputTextValue,\n selectionStartValue,\n selectionEndValue,\n tagsValue: tags\n });\n }\n },\n [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]\n );\n\n type HandleOnChangeProps = {\n currentSelectionEnd?: number;\n currentSelectionStart?: number;\n currentTriggerStartIndex: number;\n event: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>;\n htmlTextValue: string;\n inputTextValue: string;\n previousSelectionEnd?: number;\n previousSelectionStart?: number;\n tagsValue: TagData[];\n updatedValue?: string;\n };\n\n const handleOnChange = useCallback(\n async ({\n currentSelectionEnd,\n currentSelectionStart,\n currentTriggerStartIndex,\n event,\n htmlTextValue,\n inputTextValue,\n previousSelectionEnd,\n previousSelectionStart,\n tagsValue,\n updatedValue\n }: HandleOnChangeProps): Promise<void> => {\n debouncedQueryUpdate.cancel();\n if (event.currentTarget === null) {\n return;\n }\n // handle backspace change\n // onSelect is not called for backspace as selection is not changed and local caret index is outdated\n setCaretIndex(undefined);\n const newValue = updatedValue ?? '';\n const triggerText = mentionLookupOptions?.trigger ?? DEFAULT_MENTION_TRIGGER;\n\n const newTextLength = newValue.length;\n // updating indexes to set between 0 and text length, otherwise selectionRange won't be set correctly\n const currentSelectionEndValue = getValidatedIndexInRange({\n min: 0,\n max: newTextLength,\n currentValue: currentSelectionEnd\n });\n const currentSelectionStartValue = getValidatedIndexInRange({\n min: 0,\n max: newTextLength,\n currentValue: currentSelectionStart\n });\n const previousSelectionStartValue = getValidatedIndexInRange({\n min: 0,\n max: inputTextValue.length,\n currentValue: previousSelectionStart\n });\n const previousSelectionEndValue = getValidatedIndexInRange({\n min: 0,\n max: inputTextValue.length,\n currentValue: previousSelectionEnd\n });\n\n // If we are enabled for lookups,\n if (mentionLookupOptions !== undefined) {\n // Look at the range of the change for a trigger character\n const triggerPriorIndex = newValue.lastIndexOf(triggerText, currentSelectionEndValue - 1);\n // Update the caret position, used for positioning the suggestions popover\n const textField = event.currentTarget;\n const relativePosition = Caret.getRelativePosition(textField);\n if (textField.scrollHeight > textField.clientHeight) {\n relativePosition.top -= textField.scrollTop;\n }\n setCaretPosition(relativePosition);\n if (triggerPriorIndex !== undefined) {\n // trigger is found\n const symbolBeforeTrigger = newValue.substring(triggerPriorIndex - 1, triggerPriorIndex);\n const isSpaceBeforeTrigger = symbolBeforeTrigger === ' ';\n // check if \\r (Carriage Return), \\n (Line Feed) or \\r\\n (End Of Line) is before the trigger\n const isNewLineBeforeTrigger = /\\r|\\n/.exec(symbolBeforeTrigger);\n const wordAtSelection = newValue.substring(triggerPriorIndex, currentSelectionEndValue);\n let tagIndex = currentTriggerStartIndex;\n if (!isSpaceBeforeTrigger && triggerPriorIndex !== 0 && isNewLineBeforeTrigger === null) {\n // no space before the trigger, it's not a beginning of the line and no new line before <- continuation of the previous word\n tagIndex = -1;\n setCurrentTriggerStartIndex(tagIndex);\n } else if (wordAtSelection === triggerText) {\n // start of the mention\n tagIndex = currentSelectionEndValue - triggerText.length;\n if (tagIndex < 0) {\n tagIndex = 0;\n }\n setCurrentTriggerStartIndex(tagIndex);\n }\n if (tagIndex === -1) {\n updateMentionSuggestions([]);\n } else {\n // In the middle of a @mention lookup\n if (tagIndex > -1) {\n const query = wordAtSelection.substring(triggerText.length, wordAtSelection.length);\n if (query !== undefined) {\n await debouncedQueryUpdate(query);\n }\n }\n }\n }\n }\n\n const { changeStart, oldChangeEnd, newChangeEnd } = findStringsDiffIndexes({\n oldText: inputTextValue,\n newText: newValue,\n previousSelectionStart: previousSelectionStartValue,\n previousSelectionEnd: previousSelectionEndValue,\n currentSelectionStart: currentSelectionStartValue,\n currentSelectionEnd: currentSelectionEndValue\n });\n\n const change = newValue.substring(changeStart, newChangeEnd);\n const updatedContent = updateHTML({\n htmlText: htmlTextValue,\n oldPlainText: inputTextValue,\n tags: tagsValue,\n startIndex: changeStart,\n oldPlainTextEndIndex: oldChangeEnd,\n change,\n mentionTrigger: triggerText\n });\n setInternalTextValue(updatedContent.updatedHTML);\n\n // update caret index if needed\n if (updatedContent.updatedSelectionIndex !== undefined) {\n setCaretIndex(updatedContent.updatedSelectionIndex);\n setSelectionEndValue(updatedContent.updatedSelectionIndex);\n setSelectionStartValue(updatedContent.updatedSelectionIndex);\n }\n\n onChange && onChange(event, updatedContent.updatedHTML);\n },\n [debouncedQueryUpdate, mentionLookupOptions, onChange, updateMentionSuggestions]\n );\n\n // Adjust the selection range based on a mouse / touch interaction\n const handleOnMove = useCallback(\n ({\n event,\n selectionStartValue,\n selectionEndValue,\n interactionStartSelection,\n shouldHandleMoveEvent\n }: {\n event: React.UIEvent<HTMLInputElement | HTMLTextAreaElement>;\n selectionStartValue: number | undefined;\n selectionEndValue: number | undefined;\n interactionStartSelection: { start: number | undefined; end: number | undefined } | undefined;\n shouldHandleMoveEvent: boolean;\n }) => {\n if (\n shouldHandleMoveEvent &&\n interactionStartSelection === undefined &&\n (event.currentTarget.selectionStart !== selectionStartValue ||\n event.currentTarget.selectionEnd !== selectionEndValue)\n ) {\n setInteractionStartSelection({\n start: nullToUndefined(event.currentTarget.selectionStart),\n end: nullToUndefined(event.currentTarget.selectionEnd)\n });\n }\n },\n []\n );\n\n // Adjust the selection range based on a mouse / touch interaction\n const handleOnInteractionStarted = useCallback(() => {\n // reset caret index as a new selection is started or cursor position will be changed\n setCaretIndex(undefined);\n setInteractionStartSelection(undefined);\n setShouldHandleMoveEvent(true);\n setShouldHandleOnMouseDownDuringSelect(true);\n }, []);\n\n // Adjust the selection range based on a mouse / touch interaction\n const handleOnInteractionCompleted = useCallback(() => {\n setShouldHandleMoveEvent(false);\n }, []);\n\n const announcerText = useMemo(() => {\n if (activeSuggestionIndex === undefined) {\n return undefined;\n }\n const currentMention = mentionSuggestions[activeSuggestionIndex ?? 0];\n return currentMention?.displayText.length > 0\n ? currentMention?.displayText\n : localeStrings.participantItem.displayNamePlaceholder;\n }, [activeSuggestionIndex, mentionSuggestions, localeStrings.participantItem.displayNamePlaceholder]);\n\n return (\n <>\n {mentionSuggestions.length > 0 && (\n <_MentionPopover\n suggestions={mentionSuggestions}\n activeSuggestionIndex={activeSuggestionIndex}\n target={inputBoxRef}\n targetPositionOffset={caretPosition}\n onRenderSuggestionItem={mentionLookupOptions?.onRenderSuggestionItem}\n onSuggestionSelected={onSuggestionSelected}\n onDismiss={() => {\n updateMentionSuggestions([]);\n }}\n />\n )}\n {announcerText !== undefined && <Announcer announcementString={announcerText} ariaLive={'polite'} />}\n <TextField\n {...textFieldProps}\n data-ui-id={dataUiId}\n value={inputTextValue}\n onChange={(e, newValue) => {\n // Remove when switching to react 17+, currently needed because of https://legacy.reactjs.org/docs/legacy-event-pooling.html\n // Prevents React from resetting event's properties\n e.persist();\n setInputTextValue(newValue ?? '');\n handleOnChange({\n event: e,\n tagsValue,\n htmlTextValue: internalTextValue,\n inputTextValue,\n currentTriggerStartIndex,\n previousSelectionStart: nullToUndefined(selectionStartValue),\n previousSelectionEnd: nullToUndefined(selectionEndValue),\n currentSelectionStart: nullToUndefined(e.currentTarget.selectionStart),\n currentSelectionEnd: nullToUndefined(e.currentTarget.selectionEnd),\n updatedValue: newValue\n });\n }}\n onSelect={(e) => {\n // update selection if needed\n if (caretIndex !== undefined) {\n // sometimes setting selectionRage in effect for updating caretIndex doesn't work as expected and\n // onSelect still returns outdated value for cursor position\n // e.g. when user select some text and a first name in a mention then delete or type something else\n if (caretIndex !== e.currentTarget.selectionStart || caretIndex !== e.currentTarget.selectionEnd) {\n e.currentTarget.setSelectionRange(caretIndex, caretIndex);\n }\n // caret index should not be set to undefined here\n // as it will cause issues when suggestion is selected by mouse\n // caret index will be set to undefined during keyboard/mouse or touch interactions\n return;\n }\n handleOnSelect({\n event: e,\n inputTextValue,\n shouldHandleOnMouseDownDuringSelect,\n selectionEndValue,\n selectionStartValue,\n tags: tagsValue,\n interactionStartSelection\n });\n }}\n onMouseDown={() => {\n // as events order is onMouseDown -> onMouseMove -> onMouseUp -> onSelect -> onClick\n // onClick and onMouseDown can't handle clicking on mention event because\n // onMouseDown doesn't have correct selectionRange yet and\n // onClick already has wrong range as it's called after onSelect that updates the selection range\n // so we need to handle onMouseDown to prevent onSelect default behavior\n handleOnInteractionStarted();\n }}\n onMouseMove={(event) => {\n handleOnMove({\n event,\n selectionStartValue,\n selectionEndValue,\n interactionStartSelection,\n shouldHandleMoveEvent\n });\n }}\n onMouseUp={() => {\n handleOnInteractionCompleted();\n }}\n onTouchStart={() => {\n handleOnInteractionStarted();\n }}\n onTouchMove={(event) => {\n handleOnMove({\n event,\n selectionStartValue,\n selectionEndValue,\n interactionStartSelection,\n shouldHandleMoveEvent\n });\n }}\n onTouchEnd={() => {\n handleOnInteractionCompleted;\n }}\n onBlur={() => {\n // setup shouldHandleOnMouseDownDuringSelect to false when text field loses focus\n // as the click should be handled by text field anymore\n setShouldHandleOnMouseDownDuringSelect(false);\n }}\n onKeyDown={onTextFieldKeyDown}\n elementRef={inputBoxRef}\n />\n </>\n );\n};\n"]}
1
+ {"version":3,"file":"TextFieldWithMention.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/TextFieldWithMention/TextFieldWithMention.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAa,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,SAAS,EAA+B,MAAM,iBAAiB,CAAC;AAEzE,OAAO,EAAE,qCAAqC,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,EAEL,0BAA0B,EAC1B,+BAA+B,EAC/B,sBAAsB,EACtB,kCAAkC,EAClC,wBAAwB,EACxB,8BAA8B,EAC9B,eAAe,EACf,UAAU,EACX,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,OAAO,EAAwB,eAAe,EAAW,MAAM,mBAAmB,CAAC;AAEnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,uBAAuB,GAAG,GAAG,CAAC;AAmBpC;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,KAAgC,EAAe,EAAE;IACpF,MAAM,EACJ,cAAc,EACd,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,SAAS,EACT,cAAc,EACd,cAAc,EACd,oBAAoB,EACrB,GAAG,KAAK,CAAC;IACV,MAAM,WAAW,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAEjD,oDAAoD;IACpD,M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BAAqB;iBACtB,CAAC,CAAC;YACL,CAAC,EACD,UAAU,EAAE,GAAG,EAAE;gBACf,4BAA4B,CAAC;YAC/B,CAAC,EACD,MAAM,EAAE,GAAG,EAAE;gBACX,iFAAiF;gBACjF,uDAAuD;gBACvD,sCAAsC,CAAC,KAAK,CAAC,CAAC;YAChD,CAAC,EACD,SAAS,EAAE,kBAAkB,EAC7B,UAAU,EAAE,WAAW,IACvB,CACD,CACJ,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport React, { useState, FormEvent, useCallback, useRef } from 'react';\nimport { useEffect, useMemo } from 'react';\nimport { useLocale } from '../../localization';\nimport { Announcer } from '../Announcer';\nimport { TextField, ITextField, ITextFieldProps } from '@fluentui/react';\n\nimport { isEnterKeyEventFromCompositionSession, nullToUndefined } from '../utils';\nimport {\n TagData,\n findMentionTagForSelection,\n findNewSelectionIndexForMention,\n findStringsDiffIndexes,\n getDisplayNameForMentionSuggestion,\n getValidatedIndexInRange,\n htmlStringForMentionSuggestion,\n textToTagParser,\n updateHTML\n} from './mentionTagUtils';\n\nimport { Caret } from 'textarea-caret-ts';\n\nimport { MentionLookupOptions, _MentionPopover, Mention } from '../MentionPopover';\n\nimport { useDebouncedCallback } from 'use-debounce';\n\nconst DEFAULT_MENTION_TRIGGER = '@';\n\n/**\n * Props for the TextFieldWithMention component.\n *\n * @private\n */\nexport interface TextFieldWithMentionProps {\n textFieldProps: ITextFieldProps;\n dataUiId?: string;\n textValue: string; // This could be plain text or HTML.\n onChange: (event?: FormEvent<HTMLInputElement | HTMLTextAreaElement>, newValue?: string) => void;\n onKeyDown?: (ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;\n onEnterKeyDown?: () => void;\n textFieldRef?: React.RefObject<ITextField>;\n supportNewline?: boolean;\n mentionLookupOptions?: MentionLookupOptions;\n}\n\n/**\n * @private\n */\nexport const TextFieldWithMention = (props: TextFieldWithMentionProps): JSX.Element => {\n const {\n textFieldProps,\n dataUiId,\n textValue,\n onChange,\n textFieldRef,\n onKeyDown,\n onEnterKeyDown,\n supportNewline,\n mentionLookupOptions\n } = props;\n const inputBoxRef = useRef<HTMLDivElement>(null);\n\n // Current suggestion list, provided by the callback\n const [mentionSuggestions, setMentionSuggestions] = useState<Mention[]>([]);\n\n // Current suggestion list, provided by the callback\n const [activeSuggestionIndex, setActiveSuggestionIndex] = useState<number | undefined>(undefined);\n\n // Index of the current trigger character in the text field\n const [currentTriggerStartIndex, setCurrentTriggerStartIndex] = useState<number>(-1);\n\n const [inputTextValue, setInputTextValue] = useState<string>('');\n\n // Internal value for text value prop\n const [internalTextValue, setInternalTextValue] = useState<string>('');\n\n const [tagsValue, setTagsValue] = useState<TagData[]>([]);\n\n // Index of the previous selection start in the text field\n const [selectionStartValue, setSelectionStartValue] = useState<number | undefined>();\n\n // Index of the previous selection end in the text field\n const [selectionEndValue, setSelectionEndValue] = useState<number | undefined>();\n\n // Boolean value to check if onMouseDown event should be handled during select as selection range\n // for onMouseDown event is not updated yet and the selection range for mouse click/taps will be\n // updated in onSelect event if needed.\n const [shouldHandleOnMouseDownDuringSelect, setShouldHandleOnMouseDownDuringSelect] = useState<boolean>(true);\n\n // Boolean flag to check if mouse/touch move event should be handled\n const [shouldHandleMoveEvent, setShouldHandleMoveEvent] = useState<boolean>(false);\n\n // Indexes of start of touch/mouse selection\n const [interactionStartSelection, setInteractionStartSelection] = useState<\n { start: number | undefined; end: number | undefined } | undefined\n >();\n\n // Caret position in the text field\n const [caretPosition, setCaretPosition] = useState<Caret.Position | undefined>(undefined);\n\n // Index of where the caret is in the text field\n const [caretIndex, setCaretIndex] = useState<number | undefined>(undefined);\n\n const localeStrings = useLocale().strings;\n\n // Set mention suggestions\n const updateMentionSuggestions = useCallback(\n (suggestions: Mention[]) => {\n setMentionSuggestions(suggestions);\n },\n [setMentionSuggestions]\n );\n\n useEffect(() => {\n setInternalTextValue(textValue);\n // update mention suggestions before the next render cycle\n updateMentionSuggestions([]);\n }, [textValue, updateMentionSuggestions]);\n\n // Parse the text and get the plain text version to display in the input box\n useEffect(() => {\n const trigger = mentionLookupOptions?.trigger || DEFAULT_MENTION_TRIGGER;\n const parsedHTMLData = textToTagParser(internalTextValue, trigger);\n setInputTextValue(parsedHTMLData.plainText);\n setTagsValue(parsedHTMLData.tags);\n updateMentionSuggestions([]);\n }, [internalTextValue, mentionLookupOptions?.trigger, updateMentionSuggestions]);\n\n useEffect(() => {\n // effect for caret index update\n if (caretIndex === undefined || textFieldRef === undefined || textFieldRef?.current === undefined) {\n return;\n }\n // get validated caret index between 0 and inputTextValue.length otherwise caret will be set to incorrect index\n const updatedCaretIndex = getValidatedIndexInRange({\n min: 0,\n max: inputTextValue.length,\n currentValue: caretIndex\n });\n textFieldRef?.current?.setSelectionRange(updatedCaretIndex, updatedCaretIndex);\n setSelectionStartValue(updatedCaretIndex);\n setSelectionEndValue(updatedCaretIndex);\n }, [caretIndex, inputTextValue, textFieldRef, setSelectionStartValue, setSelectionEndValue]);\n\n const onSuggestionSelected = useCallback(\n (suggestion: Mention) => {\n let selectionEnd = textFieldRef?.current?.selectionEnd || -1;\n if (selectionEnd < 0) {\n selectionEnd = 0;\n } else if (selectionEnd > inputTextValue.length) {\n selectionEnd = inputTextValue.length;\n }\n const oldPlainText = inputTextValue;\n const mention = htmlStringForMentionSuggestion(suggestion, localeStrings);\n\n // update plain text with the mention html text\n const triggerText = mentionLookupOptions?.trigger ?? DEFAULT_MENTION_TRIGGER;\n // update html text with updated plain text\n const updatedContent = updateHTML({\n htmlText: internalTextValue,\n oldPlainText,\n tags: tagsValue,\n startIndex: currentTriggerStartIndex,\n oldPlainTextEndIndex: selectionEnd,\n change: mention,\n mentionTrigger: triggerText\n });\n\n setInternalTextValue(updatedContent.updatedHTML);\n const displayName = getDisplayNameForMentionSuggestion(suggestion, localeStrings);\n const newCaretIndex = currentTriggerStartIndex + displayName.length + triggerText.length;\n // move the caret in the text field to the end of the mention plain text\n setCaretIndex(newCaretIndex);\n setSelectionEndValue(newCaretIndex);\n setSelectionStartValue(newCaretIndex);\n setCurrentTriggerStartIndex(-1);\n updateMentionSuggestions([]);\n // set focus back to text field\n textFieldRef?.current?.focus();\n setActiveSuggestionIndex(undefined);\n onChange && onChange(undefined, updatedContent.updatedHTML);\n },\n [\n textFieldRef,\n inputTextValue,\n currentTriggerStartIndex,\n mentionLookupOptions?.trigger,\n onChange,\n internalTextValue,\n tagsValue,\n updateMentionSuggestions,\n localeStrings\n ]\n );\n\n const onTextFieldKeyDown = useCallback(\n (ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n // caretIndex should be set to undefined when the user is typing\n setCaretIndex(undefined);\n // shouldHandleOnMouseDownDuringSelect should be set to false after the last mouse down event.\n // it shouldn't be updated in onMouseUp\n // as onMouseUp can be triggered before or after onSelect event\n // because its order depends on mouse events not selection.\n setShouldHandleOnMouseDownDuringSelect(false);\n\n if (isEnterKeyEventFromCompositionSession(ev.nativeEvent)) {\n return;\n }\n let isActiveSuggestionIndexUpdated = false;\n if (mentionSuggestions.length > 0) {\n if (ev.key === 'ArrowUp') {\n ev.preventDefault();\n const newActiveIndex =\n activeSuggestionIndex === undefined\n ? mentionSuggestions.length - 1\n : Math.max(activeSuggestionIndex - 1, 0);\n setActiveSuggestionIndex(newActiveIndex);\n isActiveSuggestionIndexUpdated = true;\n } else if (ev.key === 'ArrowDown') {\n ev.preventDefault();\n const newActiveIndex =\n activeSuggestionIndex === undefined\n ? 0\n : Math.min(activeSuggestionIndex + 1, mentionSuggestions.length - 1);\n setActiveSuggestionIndex(newActiveIndex);\n isActiveSuggestionIndexUpdated = true;\n } else if (ev.key === 'Escape') {\n updateMentionSuggestions([]);\n // reset active suggestion index when suggestions are closed\n setActiveSuggestionIndex(undefined);\n isActiveSuggestionIndexUpdated = true;\n }\n }\n if (ev.key === 'Enter' && (ev.shiftKey === false || !supportNewline)) {\n ev.preventDefault();\n\n // If we are looking up a mention, select the focused suggestion\n if (mentionSuggestions.length > 0 && activeSuggestionIndex !== undefined) {\n const selectedMention = mentionSuggestions[activeSuggestionIndex];\n if (selectedMention) {\n onSuggestionSelected(selectedMention);\n return;\n }\n }\n\n onEnterKeyDown && onEnterKeyDown();\n } else if (!isActiveSuggestionIndexUpdated) {\n // Update the active suggestion index if the user is typing,\n // otherwise the focus will be lost\n setActiveSuggestionIndex(undefined);\n }\n onKeyDown && onKeyDown(ev);\n },\n [\n onEnterKeyDown,\n onKeyDown,\n supportNewline,\n mentionSuggestions,\n activeSuggestionIndex,\n onSuggestionSelected,\n updateMentionSuggestions\n ]\n );\n\n const debouncedQueryUpdate = useDebouncedCallback(async (query: string) => {\n let suggestions = (await mentionLookupOptions?.onQueryUpdated(query)) ?? [];\n suggestions = suggestions.filter((suggestion) => suggestion.displayText.trim() !== '');\n if (suggestions.length === 0) {\n setActiveSuggestionIndex(undefined);\n } else if (activeSuggestionIndex === undefined) {\n // Set the active to the first, if it's not already set\n setActiveSuggestionIndex(0);\n }\n updateMentionSuggestions(suggestions);\n }, 500);\n\n // Update selections index in mention to navigate by words\n const updateSelectionIndexesWithMentionIfNeeded = useCallback(\n ({\n event,\n inputTextValue,\n selectionEndValue,\n selectionStartValue,\n tagsValue\n }: {\n event: FormEvent<HTMLInputElement | HTMLTextAreaElement>;\n inputTextValue: string;\n selectionEndValue?: number;\n selectionStartValue?: number;\n tagsValue: TagData[];\n }): void => {\n let updatedStartIndex = event.currentTarget.selectionStart;\n let updatedEndIndex = event.currentTarget.selectionEnd;\n if (\n event.currentTarget.selectionStart === event.currentTarget.selectionEnd &&\n event.currentTarget.selectionStart !== null &&\n event.currentTarget.selectionStart !== -1\n ) {\n // just a caret movement/usual typing or deleting\n const mentionTag = findMentionTagForSelection(tagsValue, event.currentTarget.selectionStart);\n // don't include boundary cases to show correct selection, otherwise it will show selection at mention boundaries\n if (\n mentionTag !== undefined &&\n mentionTag.plainTextBeginIndex !== undefined &&\n event.currentTarget.selectionStart > mentionTag.plainTextBeginIndex &&\n event.currentTarget.selectionStart < (mentionTag.plainTextEndIndex ?? mentionTag.plainTextBeginIndex)\n ) {\n // get updated selection index\n const newSelectionIndex = findNewSelectionIndexForMention({\n tag: mentionTag,\n textValue: inputTextValue,\n currentSelectionIndex: event.currentTarget.selectionStart,\n previousSelectionIndex: selectionStartValue ?? inputTextValue.length\n });\n updatedStartIndex = newSelectionIndex;\n updatedEndIndex = newSelectionIndex;\n }\n } else if (event.currentTarget.selectionStart !== event.currentTarget.selectionEnd) {\n // Both e.currentTarget.selectionStart !== selectionStartValue and e.currentTarget.selectionEnd !== selectionEndValue can be true when a user selects a text by double click\n if (event.currentTarget.selectionStart !== null && event.currentTarget.selectionStart !== selectionStartValue) {\n // the selection start is changed\n const mentionTag = findMentionTagForSelection(tagsValue, event.currentTarget.selectionStart);\n // don't include boundary cases to show correct selection, otherwise it will show selection at mention boundaries\n if (\n mentionTag !== undefined &&\n mentionTag.plainTextBeginIndex !== undefined &&\n event.currentTarget.selectionStart > mentionTag.plainTextBeginIndex &&\n event.currentTarget.selectionStart < (mentionTag.plainTextEndIndex ?? mentionTag.plainTextBeginIndex)\n ) {\n updatedStartIndex = findNewSelectionIndexForMention({\n tag: mentionTag,\n textValue: inputTextValue,\n currentSelectionIndex: event.currentTarget.selectionStart,\n previousSelectionIndex: selectionStartValue ?? inputTextValue.length\n });\n }\n }\n if (event.currentTarget.selectionEnd !== null && event.currentTarget.selectionEnd !== selectionEndValue) {\n // the selection end is changed\n const mentionTag = findMentionTagForSelection(tagsValue, event.currentTarget.selectionEnd);\n // don't include boundary cases to show correct selection, otherwise it will show selection at mention boundaries\n if (\n mentionTag !== undefined &&\n mentionTag.plainTextBeginIndex !== undefined &&\n event.currentTarget.selectionEnd > mentionTag.plainTextBeginIndex &&\n event.currentTarget.selectionEnd < (mentionTag.plainTextEndIndex ?? mentionTag.plainTextBeginIndex)\n ) {\n updatedEndIndex = findNewSelectionIndexForMention({\n tag: mentionTag,\n textValue: inputTextValue,\n currentSelectionIndex: event.currentTarget.selectionEnd,\n previousSelectionIndex: selectionEndValue ?? inputTextValue.length\n });\n }\n }\n }\n // e.currentTarget.selectionDirection should be set to handle shift + arrow keys\n if (event.currentTarget.selectionDirection === null) {\n event.currentTarget.setSelectionRange(updatedStartIndex, updatedEndIndex);\n } else {\n event.currentTarget.setSelectionRange(\n updatedStartIndex,\n updatedEndIndex,\n event.currentTarget.selectionDirection\n );\n }\n setSelectionStartValue(nullToUndefined(updatedStartIndex));\n setSelectionEndValue(nullToUndefined(updatedEndIndex));\n },\n [setSelectionStartValue, setSelectionEndValue]\n );\n\n const handleOnSelect = useCallback(\n ({\n event,\n inputTextValue,\n tags,\n shouldHandleOnMouseDownDuringSelect,\n selectionStartValue,\n selectionEndValue,\n interactionStartSelection\n }: {\n event: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>;\n inputTextValue: string;\n tags: TagData[];\n shouldHandleOnMouseDownDuringSelect: boolean;\n selectionStartValue?: number;\n selectionEndValue?: number;\n interactionStartSelection?: { start: number | undefined; end: number | undefined };\n }): void => {\n if (event.currentTarget.selectionStart === 0 && event.currentTarget.selectionEnd === inputTextValue.length) {\n // entire text is selected, no need to change anything\n setSelectionStartValue(event.currentTarget.selectionStart);\n setSelectionEndValue(event.currentTarget.selectionEnd);\n setInteractionStartSelection(undefined);\n setShouldHandleOnMouseDownDuringSelect(false);\n } else if (shouldHandleOnMouseDownDuringSelect) {\n if (\n interactionStartSelection !== undefined &&\n (interactionStartSelection.start !== event.currentTarget.selectionStart ||\n interactionStartSelection.end !== event.currentTarget.selectionEnd)\n ) {\n // selection was changed by mouse\n // for mouse selection only, it's possible to start selection in the middle of a word in a mention\n // because of this when event.currentTarget.selectionStart === mouseMoveStartPoint.start\n // selectionStartValue for updateSelectionIndexesWithMentionIfNeeded should be set\n // to the end of the input to mimic selection from right to left for the left selection index\n const updatedSelectionStartValue =\n event.currentTarget.selectionStart === interactionStartSelection.start\n ? inputTextValue.length\n : interactionStartSelection.start;\n // selectionStart is always less than selectionEnd so sometimes selectionEnd is user's start of the selection\n // so when event.currentTarget.selectionEnd === mouseMoveStartPoint.end\n // selectionEndValue for updateSelectionIndexesWithMentionIfNeeded should be set\n // to the beginning of the input to mimic selection from left to right for the right selection index\n const updatedSelectionEndValue =\n event.currentTarget.selectionEnd === interactionStartSelection.end ? 0 : interactionStartSelection.end;\n updateSelectionIndexesWithMentionIfNeeded({\n event,\n inputTextValue,\n selectionStartValue: updatedSelectionStartValue,\n selectionEndValue: updatedSelectionEndValue,\n tagsValue: tags\n });\n setInteractionStartSelection(undefined);\n setShouldHandleOnMouseDownDuringSelect(false);\n } else if (event.currentTarget.selectionStart !== null && event.currentTarget.selectionEnd !== null) {\n // on select was triggered by mouse down/up with no movement\n const mentionTag = findMentionTagForSelection(tags, event.currentTarget.selectionStart);\n if (mentionTag !== undefined && mentionTag.plainTextBeginIndex !== undefined) {\n // handle mention click by selecting the whole mention\n // if the selection is not on the bounds of the mention\n // disable selection for clicks on mention bounds\n const mentionEndIndex = mentionTag.plainTextEndIndex ?? mentionTag.plainTextBeginIndex;\n\n if (\n event.currentTarget.selectionStart !== event.currentTarget.selectionEnd &&\n event.currentTarget.selectionEnd > mentionEndIndex\n ) {\n // handle triple click when the text starts from mention\n if (event.currentTarget.selectionDirection === null) {\n event.currentTarget.setSelectionRange(mentionTag.plainTextBeginIndex, event.currentTarget.selectionEnd);\n } else {\n event.currentTarget.setSelectionRange(\n mentionTag.plainTextBeginIndex,\n event.currentTarget.selectionEnd,\n event.currentTarget.selectionDirection\n );\n }\n setSelectionStartValue(mentionTag.plainTextBeginIndex);\n setSelectionEndValue(event.currentTarget.selectionEnd);\n } else if (\n event.currentTarget.selectionStart !== event.currentTarget.selectionEnd ||\n (event.currentTarget.selectionStart !== mentionTag.plainTextBeginIndex &&\n event.currentTarget.selectionStart !== mentionEndIndex)\n ) {\n if (event.currentTarget.selectionDirection === null) {\n event.currentTarget.setSelectionRange(mentionTag.plainTextBeginIndex, mentionEndIndex);\n } else {\n event.currentTarget.setSelectionRange(\n mentionTag.plainTextBeginIndex,\n mentionEndIndex,\n event.currentTarget.selectionDirection\n );\n }\n setSelectionStartValue(mentionTag.plainTextBeginIndex);\n setSelectionEndValue(mentionEndIndex);\n } else {\n // bounds of the mention were selected\n setSelectionStartValue(event.currentTarget.selectionStart);\n setSelectionEndValue(event.currentTarget.selectionEnd);\n }\n } else {\n // not a mention tag\n setSelectionStartValue(event.currentTarget.selectionStart);\n setSelectionEndValue(nullToUndefined(event.currentTarget.selectionEnd));\n }\n setInteractionStartSelection(undefined);\n }\n } else {\n // selection was changed by keyboard\n updateSelectionIndexesWithMentionIfNeeded({\n event,\n inputTextValue,\n selectionStartValue,\n selectionEndValue,\n tagsValue: tags\n });\n }\n },\n [updateSelectionIndexesWithMentionIfNeeded, setSelectionStartValue, setSelectionEndValue]\n );\n\n type HandleOnChangeProps = {\n currentSelectionEnd?: number;\n currentSelectionStart?: number;\n currentTriggerStartIndex: number;\n event: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>;\n htmlTextValue: string;\n inputTextValue: string;\n previousSelectionEnd?: number;\n previousSelectionStart?: number;\n tagsValue: TagData[];\n updatedValue?: string;\n };\n\n const handleOnChange = useCallback(\n async ({\n currentSelectionEnd,\n currentSelectionStart,\n currentTriggerStartIndex,\n event,\n htmlTextValue,\n inputTextValue,\n previousSelectionEnd,\n previousSelectionStart,\n tagsValue,\n updatedValue\n }: HandleOnChangeProps): Promise<void> => {\n debouncedQueryUpdate.cancel();\n if (event.currentTarget === null) {\n return;\n }\n // handle backspace change\n // onSelect is not called for backspace as selection is not changed and local caret index is outdated\n setCaretIndex(undefined);\n const newValue = updatedValue ?? '';\n const triggerText = mentionLookupOptions?.trigger ?? DEFAULT_MENTION_TRIGGER;\n\n const newTextLength = newValue.length;\n // updating indexes to set between 0 and text length, otherwise selectionRange won't be set correctly\n const currentSelectionEndValue = getValidatedIndexInRange({\n min: 0,\n max: newTextLength,\n currentValue: currentSelectionEnd\n });\n const currentSelectionStartValue = getValidatedIndexInRange({\n min: 0,\n max: newTextLength,\n currentValue: currentSelectionStart\n });\n const previousSelectionStartValue = getValidatedIndexInRange({\n min: 0,\n max: inputTextValue.length,\n currentValue: previousSelectionStart\n });\n const previousSelectionEndValue = getValidatedIndexInRange({\n min: 0,\n max: inputTextValue.length,\n currentValue: previousSelectionEnd\n });\n\n // If we are enabled for lookups,\n if (mentionLookupOptions !== undefined) {\n // Look at the range of the change for a trigger character\n const triggerPriorIndex = newValue.lastIndexOf(triggerText, currentSelectionEndValue - 1);\n // Update the caret position, used for positioning the suggestions popover\n const textField = event.currentTarget;\n const relativePosition = Caret.getRelativePosition(textField);\n if (textField.scrollHeight > textField.clientHeight) {\n relativePosition.top -= textField.scrollTop;\n }\n setCaretPosition(relativePosition);\n if (triggerPriorIndex !== undefined) {\n // trigger is found\n const symbolBeforeTrigger = newValue.substring(triggerPriorIndex - 1, triggerPriorIndex);\n const isSpaceBeforeTrigger = symbolBeforeTrigger === ' ';\n // check if \\r (Carriage Return), \\n (Line Feed) or \\r\\n (End Of Line) is before the trigger\n const isNewLineBeforeTrigger = /\\r|\\n/.exec(symbolBeforeTrigger);\n const wordAtSelection = newValue.substring(triggerPriorIndex, currentSelectionEndValue);\n let tagIndex = currentTriggerStartIndex;\n if (!isSpaceBeforeTrigger && triggerPriorIndex !== 0 && isNewLineBeforeTrigger === null) {\n // no space before the trigger, it's not a beginning of the line and no new line before <- continuation of the previous word\n tagIndex = -1;\n setCurrentTriggerStartIndex(tagIndex);\n } else if (wordAtSelection === triggerText) {\n // start of the mention\n tagIndex = currentSelectionEndValue - triggerText.length;\n if (tagIndex < 0) {\n tagIndex = 0;\n }\n setCurrentTriggerStartIndex(tagIndex);\n }\n if (tagIndex === -1) {\n updateMentionSuggestions([]);\n } else {\n // In the middle of a @mention lookup\n if (tagIndex > -1) {\n const query = wordAtSelection.substring(triggerText.length, wordAtSelection.length);\n if (query !== undefined) {\n await debouncedQueryUpdate(query);\n }\n }\n }\n }\n }\n\n const { changeStart, oldChangeEnd, newChangeEnd } = findStringsDiffIndexes({\n oldText: inputTextValue,\n newText: newValue,\n previousSelectionStart: previousSelectionStartValue,\n previousSelectionEnd: previousSelectionEndValue,\n currentSelectionStart: currentSelectionStartValue,\n currentSelectionEnd: currentSelectionEndValue\n });\n\n const change = newValue.substring(changeStart, newChangeEnd);\n const updatedContent = updateHTML({\n htmlText: htmlTextValue,\n oldPlainText: inputTextValue,\n tags: tagsValue,\n startIndex: changeStart,\n oldPlainTextEndIndex: oldChangeEnd,\n change,\n mentionTrigger: triggerText\n });\n setInternalTextValue(updatedContent.updatedHTML);\n\n // update caret index if needed\n if (updatedContent.updatedSelectionIndex !== undefined) {\n setCaretIndex(updatedContent.updatedSelectionIndex);\n setSelectionEndValue(updatedContent.updatedSelectionIndex);\n setSelectionStartValue(updatedContent.updatedSelectionIndex);\n }\n\n onChange && onChange(event, updatedContent.updatedHTML);\n },\n [debouncedQueryUpdate, mentionLookupOptions, onChange, updateMentionSuggestions]\n );\n\n // Adjust the selection range based on a mouse / touch interaction\n const handleOnMove = useCallback(\n ({\n event,\n selectionStartValue,\n selectionEndValue,\n interactionStartSelection,\n shouldHandleMoveEvent\n }: {\n event: React.UIEvent<HTMLInputElement | HTMLTextAreaElement>;\n selectionStartValue: number | undefined;\n selectionEndValue: number | undefined;\n interactionStartSelection: { start: number | undefined; end: number | undefined } | undefined;\n shouldHandleMoveEvent: boolean;\n }) => {\n if (\n shouldHandleMoveEvent &&\n interactionStartSelection === undefined &&\n (event.currentTarget.selectionStart !== selectionStartValue ||\n event.currentTarget.selectionEnd !== selectionEndValue)\n ) {\n setInteractionStartSelection({\n start: nullToUndefined(event.currentTarget.selectionStart),\n end: nullToUndefined(event.currentTarget.selectionEnd)\n });\n }\n },\n []\n );\n\n // Adjust the selection range based on a mouse / touch interaction\n const handleOnInteractionStarted = useCallback(() => {\n // reset caret index as a new selection is started or cursor position will be changed\n setCaretIndex(undefined);\n setInteractionStartSelection(undefined);\n setShouldHandleMoveEvent(true);\n setShouldHandleOnMouseDownDuringSelect(true);\n }, []);\n\n // Adjust the selection range based on a mouse / touch interaction\n const handleOnInteractionCompleted = useCallback(() => {\n setShouldHandleMoveEvent(false);\n }, []);\n\n const announcerText = useMemo(() => {\n if (activeSuggestionIndex === undefined) {\n return undefined;\n }\n const currentMention = mentionSuggestions[activeSuggestionIndex ?? 0];\n return currentMention?.displayText.length > 0\n ? currentMention?.displayText\n : localeStrings.participantItem.displayNamePlaceholder;\n }, [activeSuggestionIndex, mentionSuggestions, localeStrings.participantItem.displayNamePlaceholder]);\n\n return (\n <>\n {mentionSuggestions.length > 0 && (\n <_MentionPopover\n suggestions={mentionSuggestions}\n activeSuggestionIndex={activeSuggestionIndex}\n target={inputBoxRef}\n targetPositionOffset={caretPosition}\n onRenderSuggestionItem={mentionLookupOptions?.onRenderSuggestionItem}\n onSuggestionSelected={onSuggestionSelected}\n onDismiss={() => {\n updateMentionSuggestions([]);\n }}\n />\n )}\n {announcerText !== undefined && <Announcer announcementString={announcerText} ariaLive={'polite'} />}\n <TextField\n {...textFieldProps}\n data-ui-id={dataUiId}\n value={inputTextValue}\n onChange={(e, newValue) => {\n // Remove when switching to react 17+, currently needed because of https://legacy.reactjs.org/docs/legacy-event-pooling.html\n // Prevents React from resetting event's properties\n e.persist();\n setInputTextValue(newValue ?? '');\n handleOnChange({\n event: e,\n tagsValue,\n htmlTextValue: internalTextValue,\n inputTextValue,\n currentTriggerStartIndex,\n previousSelectionStart: nullToUndefined(selectionStartValue),\n previousSelectionEnd: nullToUndefined(selectionEndValue),\n currentSelectionStart: nullToUndefined(e.currentTarget.selectionStart),\n currentSelectionEnd: nullToUndefined(e.currentTarget.selectionEnd),\n updatedValue: newValue\n });\n }}\n onSelect={(e) => {\n // update selection if needed\n if (caretIndex !== undefined) {\n // sometimes setting selectionRage in effect for updating caretIndex doesn't work as expected and\n // onSelect still returns outdated value for cursor position\n // e.g. when user select some text and a first name in a mention then delete or type something else\n if (caretIndex !== e.currentTarget.selectionStart || caretIndex !== e.currentTarget.selectionEnd) {\n e.currentTarget.setSelectionRange(caretIndex, caretIndex);\n }\n // caret index should not be set to undefined here\n // as it will cause issues when suggestion is selected by mouse\n // caret index will be set to undefined during keyboard/mouse or touch interactions\n return;\n }\n handleOnSelect({\n event: e,\n inputTextValue,\n shouldHandleOnMouseDownDuringSelect,\n selectionEndValue,\n selectionStartValue,\n tags: tagsValue,\n interactionStartSelection\n });\n }}\n onMouseDown={() => {\n // as events order is onMouseDown -> onMouseMove -> onMouseUp -> onSelect -> onClick\n // onClick and onMouseDown can't handle clicking on mention event because\n // onMouseDown doesn't have correct selectionRange yet and\n // onClick already has wrong range as it's called after onSelect that updates the selection range\n // so we need to handle onMouseDown to prevent onSelect default behavior\n handleOnInteractionStarted();\n }}\n onMouseMove={(event) => {\n handleOnMove({\n event,\n selectionStartValue,\n selectionEndValue,\n interactionStartSelection,\n shouldHandleMoveEvent\n });\n }}\n onMouseUp={() => {\n handleOnInteractionCompleted();\n }}\n onTouchStart={() => {\n handleOnInteractionStarted();\n }}\n onTouchMove={(event) => {\n handleOnMove({\n event,\n selectionStartValue,\n selectionEndValue,\n interactionStartSelection,\n shouldHandleMoveEvent\n });\n }}\n onTouchEnd={() => {\n handleOnInteractionCompleted;\n }}\n onBlur={() => {\n // setup shouldHandleOnMouseDownDuringSelect to false when text field loses focus\n // as the click should be handled by text field anymore\n setShouldHandleOnMouseDownDuringSelect(false);\n }}\n onKeyDown={onTextFieldKeyDown}\n elementRef={inputBoxRef}\n />\n </>\n );\n};\n"]}
@@ -14,9 +14,7 @@ import { MeetingReactionOverlay } from '../MeetingReactionOverlay';
14
14
  * https://reactjs.org/docs/react-api.html#reactmemo
15
15
  */
16
16
  export const RemoteScreenShare = React.memo((props) => {
17
- const { userId, displayName, isMuted, renderElement, onCreateRemoteStreamView, onDisposeRemoteStreamView, isReceiving, participantVideoScalingMode, reactionResources, localParticipant, remoteParticipants,
18
- /* @conditional-compile-remove(ppt-live) */
19
- isPPTLive } = props;
17
+ const { userId, displayName, isMuted, renderElement, onCreateRemoteStreamView, onDisposeRemoteStreamView, isReceiving, participantVideoScalingMode, reactionResources, localParticipant, remoteParticipants, isPPTLive } = props;
20
18
  const locale = useLocale();
21
19
  if (!renderElement) {
22
20
  /**
@@ -40,7 +38,6 @@ export const RemoteScreenShare = React.memo((props) => {
40
38
  participant: displayName
41
39
  })
42
40
  : '';
43
- /* @conditional-compile-remove(ppt-live) */
44
41
  if (isPPTLive) {
45
42
  return (React.createElement(VideoTile, { renderElement: renderElement ? (React.createElement(StreamMedia, { videoStreamElement: renderElement, loadingState: isReceiving === false ? 'loading' : 'none' })) : undefined, onRenderPlaceholder: () => React.createElement(LoadingSpinner, { loadingMessage: loadingMessage }), overlay: reactionResources && (React.createElement(MeetingReactionOverlay, { reactionResources: reactionResources, localParticipant: localParticipant, remoteParticipants: remoteParticipants, overlayMode: "screen-share" })) }));
46
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"RemoteScreenShare.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/RemoteScreenShare.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzC,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,sCAAgC;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEnE;;;;GAIG;AACH,MAAM,CAAC,MAAM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IACrB,iBAAiB,EAAE,iBAAiB,EACpC,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,EACtC,WAAW,EAAC,cAAc,GAC1B,CACH,GAEH,CACH,CAAC;IACJ,CAAC;IAED,OAAO,CACL,oBAAC,SAAS,IACR,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,OAAO,EAChB,aAAa,EACX,aAAa,CAAC,CAAC,CAAC,CACd,oBAAC,WAAW,IAAC,kBAAkB,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,KAAK,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,GAAI,CAC7G,CAAC,CAAC,CAAC,SAAS,EAEf,mBAAmB,EAAE,GAAG,EAAE,CAAC,oBAAC,cAAc,IAAC,cAAc,EAAE,cAAc,GAAI,EAC7E,OAAO,EACL,iBAAiB,IAAI,CACnB,oBAAC,sBAAsB,IACrB,iBAAiB,EAAE,iBAAiB,EACpC,gBAAgB,EAAE,gBAAgB,EAClC,kBAAkB,EAAE,kBAAkB,EACtC,WAAW,EAAC,cAAc,GAC1B,CACH,GAEH,CACH,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,KAAiC,EAAe,EAAE;IACxE,OAAO,CACL,oBAAC,KAAK,IAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,YAAY;QACnD,oBAAC,OAAO,IAAC,KAAK,EAAE,KAAK,CAAC,cAAc,EAAE,IAAI,EAAE,WAAW,CAAC,MAAM,eAAa,WAAW,GAAI,CACpF,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Spinner, SpinnerSize, Stack } from '@fluentui/react';\nimport React, { useEffect } from 'react';\nimport { useLocale } from '../../localization';\nimport { StreamMedia } from '../StreamMedia';\nimport { VideoTile } from '../VideoTile';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '../../types';\nimport { ReactionResources, VideoGalleryLocalParticipant, VideoGalleryRemoteParticipant } from '../../types';\nimport { loadingStyle } from './styles/RemoteScreenShare.styles';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { MeetingReactionOverlay } from '../MeetingReactionOverlay';\n\n/**\n * A memoized version of VideoTile for rendering the remote screen share stream. React.memo is used for a performance\n * boost by memoizing the same rendered component to avoid rerendering this when the parent component rerenders.\n * https://reactjs.org/docs/react-api.html#reactmemo\n */\nexport const RemoteScreenShare = React.memo(\n (props: {\n userId: string;\n displayName?: string;\n onCreateRemoteStreamView?: (\n userId: string,\n options?: VideoStreamOptions\n ) => Promise<void | CreateVideoStreamViewResult>;\n onDisposeRemoteStreamView?: (userId: string) => Promise<void>;\n isAvailable?: boolean;\n isReceiving?: boolean;\n isMuted?: boolean;\n isSpeaking?: boolean;\n renderElement?: HTMLElement;\n participantVideoScalingMode?: VideoStreamOptions;\n reactionResources?: ReactionResources;\n localParticipant?: VideoGalleryLocalParticipant;\n remoteParticipants?: VideoGalleryRemoteParticipant[];\n /* @conditional-compile-remove(ppt-live) */\n isPPTLive?: boolean;\n }) => {\n const {\n userId,\n displayName,\n isMuted,\n renderElement,\n onCreateRemoteStreamView,\n onDisposeRemoteStreamView,\n isReceiving,\n participantVideoScalingMode,\n reactionResources,\n localParticipant,\n remoteParticipants,\n /* @conditional-compile-remove(ppt-live) */\n isPPTLive\n } = props;\n const locale = useLocale();\n\n if (!renderElement) {\n /**\n * TODO: We need to pass in the scaling mode of the screen share participant to this function because when we\n * call this it will recreate both streams (video and screen share) and we need to make sure that the scaling\n * mode is the same as before we started the screen share.\n *\n * We should deprecate the current function and replace it with a\n * createRemoteScreenShareStreamView and createRemoteVideoStreamView.\n */\n onCreateRemoteStreamView && onCreateRemoteStreamView(userId, participantVideoScalingMode);\n }\n\n useEffect(() => {\n return () => {\n // TODO: Isolate disposing behaviors for screenShare and videoStream\n onDisposeRemoteStreamView && onDisposeRemoteStreamView(userId);\n };\n }, [onDisposeRemoteStreamView, userId]);\n\n const loadingMessage = displayName\n ? _formatString(locale.strings.videoGallery.screenShareLoadingMessage, {\n participant: displayName\n })\n : '';\n /* @conditional-compile-remove(ppt-live) */\n if (isPPTLive) {\n return (\n <VideoTile\n renderElement={\n renderElement ? (\n <StreamMedia\n videoStreamElement={renderElement}\n loadingState={isReceiving === false ? 'loading' : 'none'}\n />\n ) : undefined\n }\n onRenderPlaceholder={() => <LoadingSpinner loadingMessage={loadingMessage} />}\n overlay={\n reactionResources && (\n <MeetingReactionOverlay\n reactionResources={reactionResources}\n localParticipant={localParticipant}\n remoteParticipants={remoteParticipants}\n overlayMode=\"screen-share\"\n />\n )\n }\n />\n );\n }\n\n return (\n <VideoTile\n displayName={displayName}\n isMuted={isMuted}\n renderElement={\n renderElement ? (\n <StreamMedia videoStreamElement={renderElement} loadingState={isReceiving === false ? 'loading' : 'none'} />\n ) : undefined\n }\n onRenderPlaceholder={() => <LoadingSpinner loadingMessage={loadingMessage} />}\n overlay={\n reactionResources && (\n <MeetingReactionOverlay\n reactionResources={reactionResources}\n localParticipant={localParticipant}\n remoteParticipants={remoteParticipants}\n overlayMode=\"screen-share\"\n />\n )\n }\n />\n );\n }\n);\n\nconst LoadingSpinner = (props: { loadingMessage: string }): JSX.Element => {\n return (\n <Stack verticalAlign=\"center\" className={loadingStyle}>\n <Spinner label={props.loadingMessage} size={SpinnerSize.xSmall} aria-live={'assertive'} />\n </Stack>\n );\n};\n"]}
1
+ {"version":3,"file":"RemoteScreenShare.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoGallery/RemoteScreenShare.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9D,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,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CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { Spinner, SpinnerSize, Stack } from '@fluentui/react';\nimport React, { useEffect } from 'react';\nimport { useLocale } from '../../localization';\nimport { StreamMedia } from '../StreamMedia';\nimport { VideoTile } from '../VideoTile';\nimport { CreateVideoStreamViewResult, VideoStreamOptions } from '../../types';\nimport { ReactionResources, VideoGalleryLocalParticipant, VideoGalleryRemoteParticipant } from '../../types';\nimport { loadingStyle } from './styles/RemoteScreenShare.styles';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { MeetingReactionOverlay } from '../MeetingReactionOverlay';\n\n/**\n * A memoized version of VideoTile for rendering the remote screen share stream. React.memo is used for a performance\n * boost by memoizing the same rendered component to avoid rerendering this when the parent component rerenders.\n * https://reactjs.org/docs/react-api.html#reactmemo\n */\nexport const RemoteScreenShare = React.memo(\n (props: {\n userId: string;\n displayName?: string;\n onCreateRemoteStreamView?: (\n userId: string,\n options?: VideoStreamOptions\n ) => Promise<void | CreateVideoStreamViewResult>;\n onDisposeRemoteStreamView?: (userId: string) => Promise<void>;\n isAvailable?: boolean;\n isReceiving?: boolean;\n isMuted?: boolean;\n isSpeaking?: boolean;\n renderElement?: HTMLElement;\n participantVideoScalingMode?: VideoStreamOptions;\n reactionResources?: ReactionResources;\n localParticipant?: VideoGalleryLocalParticipant;\n remoteParticipants?: VideoGalleryRemoteParticipant[];\n isPPTLive?: boolean;\n }) => {\n const {\n userId,\n displayName,\n isMuted,\n renderElement,\n onCreateRemoteStreamView,\n onDisposeRemoteStreamView,\n isReceiving,\n participantVideoScalingMode,\n reactionResources,\n localParticipant,\n remoteParticipants,\n isPPTLive\n } = props;\n const locale = useLocale();\n\n if (!renderElement) {\n /**\n * TODO: We need to pass in the scaling mode of the screen share participant to this function because when we\n * call this it will recreate both streams (video and screen share) and we need to make sure that the scaling\n * mode is the same as before we started the screen share.\n *\n * We should deprecate the current function and replace it with a\n * createRemoteScreenShareStreamView and createRemoteVideoStreamView.\n */\n onCreateRemoteStreamView && onCreateRemoteStreamView(userId, participantVideoScalingMode);\n }\n\n useEffect(() => {\n return () => {\n // TODO: Isolate disposing behaviors for screenShare and videoStream\n onDisposeRemoteStreamView && onDisposeRemoteStreamView(userId);\n };\n }, [onDisposeRemoteStreamView, userId]);\n\n const loadingMessage = displayName\n ? _formatString(locale.strings.videoGallery.screenShareLoadingMessage, {\n participant: displayName\n })\n : '';\n if (isPPTLive) {\n return (\n <VideoTile\n renderElement={\n renderElement ? (\n <StreamMedia\n videoStreamElement={renderElement}\n loadingState={isReceiving === false ? 'loading' : 'none'}\n />\n ) : undefined\n }\n onRenderPlaceholder={() => <LoadingSpinner loadingMessage={loadingMessage} />}\n overlay={\n reactionResources && (\n <MeetingReactionOverlay\n reactionResources={reactionResources}\n localParticipant={localParticipant}\n remoteParticipants={remoteParticipants}\n overlayMode=\"screen-share\"\n />\n )\n }\n />\n );\n }\n\n return (\n <VideoTile\n displayName={displayName}\n isMuted={isMuted}\n renderElement={\n renderElement ? (\n <StreamMedia videoStreamElement={renderElement} loadingState={isReceiving === false ? 'loading' : 'none'} />\n ) : undefined\n }\n onRenderPlaceholder={() => <LoadingSpinner loadingMessage={loadingMessage} />}\n overlay={\n reactionResources && (\n <MeetingReactionOverlay\n reactionResources={reactionResources}\n localParticipant={localParticipant}\n remoteParticipants={remoteParticipants}\n overlayMode=\"screen-share\"\n />\n )\n }\n />\n );\n }\n);\n\nconst LoadingSpinner = (props: { loadingMessage: string }): JSX.Element => {\n return (\n <Stack verticalAlign=\"center\" className={loadingStyle}>\n <Spinner label={props.loadingMessage} size={SpinnerSize.xSmall} aria-live={'assertive'} />\n </Stack>\n );\n};\n"]}
@@ -273,9 +273,7 @@ export const VideoGallery = (props) => {
273
273
  ]);
274
274
  const screenShareParticipant = remoteParticipants.find((participant) => { var _a; return (_a = participant.screenShareStream) === null || _a === void 0 ? void 0 : _a.isAvailable; });
275
275
  const localScreenShareStreamComponent = React.createElement(LocalScreenShare, { localParticipant: localParticipant });
276
- const remoteScreenShareComponent = screenShareParticipant && (React.createElement(RemoteScreenShare, Object.assign({}, screenShareParticipant, { renderElement: (_b = screenShareParticipant.screenShareStream) === null || _b === void 0 ? void 0 : _b.renderElement, onCreateRemoteStreamView: onCreateRemoteStreamView, onDisposeRemoteStreamView: onDisposeRemoteScreenShareStreamView, isReceiving: (_c = screenShareParticipant.screenShareStream) === null || _c === void 0 ? void 0 : _c.isReceiving, participantVideoScalingMode: selectedScalingModeState[screenShareParticipant.userId], localParticipant: localParticipant, remoteParticipants: remoteParticipants, reactionResources: reactionResources,
277
- /* @conditional-compile-remove(ppt-live) */
278
- isPPTLive: !((_d = screenShareParticipant.screenShareStream) === null || _d === void 0 ? void 0 : _d.id) })));
276
+ const remoteScreenShareComponent = screenShareParticipant && (React.createElement(RemoteScreenShare, Object.assign({}, screenShareParticipant, { renderElement: (_b = screenShareParticipant.screenShareStream) === null || _b === void 0 ? void 0 : _b.renderElement, onCreateRemoteStreamView: onCreateRemoteStreamView, onDisposeRemoteStreamView: onDisposeRemoteScreenShareStreamView, isReceiving: (_c = screenShareParticipant.screenShareStream) === null || _c === void 0 ? void 0 : _c.isReceiving, participantVideoScalingMode: selectedScalingModeState[screenShareParticipant.userId], localParticipant: localParticipant, remoteParticipants: remoteParticipants, reactionResources: reactionResources, isPPTLive: !((_d = screenShareParticipant.screenShareStream) === null || _d === void 0 ? void 0 : _d.id) })));
279
277
  const screenShareComponent = remoteScreenShareComponent
280
278
  ? remoteScreenShareComponent
281
279
  : localParticipant.isScreenSharingOn
@@ -1 +1 @@
1
- {"version":3,"file":"VideoGallery.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/VideoGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAU,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAA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EAAI,CAAC;QACnD,CAAC;QACD,IAAI,MAAM,KAAK,oBAAoB,EAAE,CAAC;YACpC,OAAO,oBAAC,wBAAwB,oBAAK,WAAW,EAAI,CAAC;QACvD,CAAC;QAED,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,OAAO,oBAAC,kBAAkB,oBAAK,WAAW,EAAI,CAAC;QACjD,CAAC;QACD,gDAAgD;QAChD,IAAI,MAAM,KAAK,cAAc,EAAE,CAAC;YAC9B,OAAO,oBAAC,kBAAkB,oBAAK,WAAW,EAAI,CAAC;QACjD,CAAC;QACD,OAAO,oBAAC,aAAa,oBAAK,WAAW,EAAI,CAAC;IAC5C,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,sBAAsB,CAAC,CAAC,CAAC;IAElD,OAAO,CACL;QACE,4GAA4G;QAC5G,EAAE,EAAE,wBAAwB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,gBAC/C,GAAG,CAAC,YAAY,EAC5B,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,WAAW,CAAC,yBAAyB,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,EAAE,YAAY,CAAC;QAE5E,kBAAkB;QACnB,oBAAC,SAAS,IAAC,kBAAkB,EAAE,kBAAkB,EAAE,QAAQ,EAAC,QAAQ,GAAG,CACnE,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { concatStyleSets, IStyle, mergeStyles, Stack } from '@fluentui/react';\nimport React, { useCallback, useMemo, useRef } from 'react';\nimport { GridLayoutStyles } from '.';\nimport { Announcer } from './Announcer';\nimport { useEffect } from 'react';\nimport { useLocale } from '../localization';\nimport { useTheme } from '../theming';\nimport {\n BaseCustomStyles,\n OnRenderAvatarCallback,\n VideoGalleryLocalParticipant,\n VideoGalleryRemoteParticipant,\n VideoStreamOptions,\n CreateVideoStreamViewResult\n} from '../types';\nimport { ViewScalingMode } from '../types';\nimport { HorizontalGalleryStyles } from './HorizontalGallery';\nimport { _RemoteVideoTile } from './RemoteVideoTile';\nimport { isNarrowWidth, _useContainerHeight, _useContainerWidth } from './utils/responsive';\nimport { LocalScreenShare } from './VideoGallery/LocalScreenShare';\nimport { RemoteScreenShare } from './VideoGallery/RemoteScreenShare';\nimport { LocalVideoCameraCycleButtonProps } from './LocalVideoCameraButton';\nimport { _ICoordinates, _ModalClone } from './ModalClone/ModalClone';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { _LocalVideoTile } from './LocalVideoTile';\nimport { DefaultLayout } from './VideoGallery/DefaultLayout';\nimport { FloatingLocalVideoLayout } from './VideoGallery/FloatingLocalVideoLayout';\nimport { useIdentifiers } from '../identifiers';\nimport { localVideoTileContainerStyles, videoGalleryOuterDivStyle } from './styles/VideoGallery.styles';\nimport { floatingLocalVideoTileStyle } from './VideoGallery/styles/FloatingLocalVideo.styles';\nimport { useId } from '@fluentui/react-hooks';\nimport { VerticalGalleryStyles } from './VerticalGallery';\nimport { SpeakerVideoLayout } from './VideoGallery/SpeakerVideoLayout';\nimport { FocusedContentLayout } from './VideoGallery/FocusContentLayout';\n/* @conditional-compile-remove(large-gallery) */\nimport { LargeGalleryLayout } from './VideoGallery/LargeGalleryLayout';\nimport { LayoutProps } from './VideoGallery/Layout';\nimport { ReactionResources } from '../types/ReactionTypes';\n\n/**\n * @private\n * Currently the Calling JS SDK supports up to 4 remote video streams\n */\nexport const DEFAULT_MAX_REMOTE_VIDEO_STREAMS = 4;\n\n/**\n * @private\n * Styles to disable the selectivity of a text in video gallery\n */\nexport const unselectable = {\n '-webkit-user-select': 'none',\n '-webkit-touch-callout': 'none',\n '-moz-user-select': 'none',\n '-ms-user-select': 'none',\n 'user-select': 'none'\n};\n/**\n * @private\n * Set aside only 6 dominant speakers for remaining audio participants\n */\nexport const MAX_AUDIO_DOMINANT_SPEAKERS = 6;\n/**\n * @private\n * Default remote video tile menu options\n */\nexport const DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS = {\n kind: 'contextual'\n};\n\n/**\n * @private\n * Maximum number of remote video tiles that can be pinned\n */\nexport const MAX_PINNED_REMOTE_VIDEO_TILES = 4;\n\n/**\n * All strings that may be shown on the UI in the {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoGalleryStrings {\n /** String to notify that local user is sharing their screen */\n screenIsBeingSharedMessage: string;\n /** String to show when remote screen share stream is loading */\n screenShareLoadingMessage: string;\n /** String for local video label. Default is \"You\" */\n localVideoLabel: string;\n /** String for local video camera switcher */\n localVideoCameraSwitcherLabel: string;\n /** String for announcing the local video tile can be moved by keyboard controls */\n localVideoMovementLabel: string;\n /** String for announcing the selected camera */\n localVideoSelectedDescription: string;\n /** placeholder text for participants who does not have a display name*/\n displayNamePlaceholder: string;\n /** Menu text shown in Video Tile contextual menu for setting a remote participants video to fit in frame */\n fitRemoteParticipantToFrame: string;\n /** Menu text shown in Video Tile contextual menu for setting a remote participants video to fill the frame */\n fillRemoteParticipantFrame: string;\n /** Menu text shown in Video Tile contextual menu for pinning a remote participant's video tile */\n pinParticipantForMe: string;\n /** Menu text shown in Video Tile contextual menu for unpinning a remote participant's video tile */\n unpinParticipantForMe: string;\n /** Aria label for pin participant menu item of remote participant's video tile */\n pinParticipantMenuItemAriaLabel: string;\n /** Aria label for unpin participant menu item of remote participant's video tile */\n unpinParticipantMenuItemAriaLabel: string;\n /** Aria label to announce when remote participant's video tile is pinned */\n pinnedParticipantAnnouncementAriaLabel: string;\n /** Aria label to announce when remote participant's video tile is unpinned */\n unpinnedParticipantAnnouncementAriaLabel: string;\n /* @conditional-compile-remove(spotlight) */\n /** Menu text shown in Video Tile contextual menu to start spotlight on participant's video tile */\n startSpotlightVideoTileMenuLabel: string;\n /* @conditional-compile-remove(spotlight) */\n /** Menu text shown in Video Tile contextual menu to add spotlight to participant's video tile */\n addSpotlightVideoTileMenuLabel: string;\n /* @conditional-compile-remove(spotlight) */\n /** Menu title for start spotlight menu item when spotlight limit is reached */\n spotlightLimitReachedMenuTitle: string;\n /* @conditional-compile-remove(spotlight) */\n /** Menu text shown in Video Tile contextual menu to stop spotlight on participant's video tile */\n stopSpotlightVideoTileMenuLabel: string;\n /* @conditional-compile-remove(spotlight) */\n /** Menu text shown in Video Tile contextual menu to stop spotlight on local user's video tile */\n stopSpotlightOnSelfVideoTileMenuLabel: string;\n /* @conditional-compile-remove(hide-attendee-name) */\n /** String for the attendee role */\n attendeeRole: string;\n}\n\n/**\n * @public\n */\nexport type VideoGalleryLayout =\n | 'default'\n | 'floatingLocalVideo'\n | 'speaker'\n | /* @conditional-compile-remove(large-gallery) */ 'largeGallery'\n | 'focusedContent';\n\n/**\n * {@link VideoGallery} Component Styles.\n * @public\n */\nexport interface VideoGalleryStyles extends BaseCustomStyles {\n /** Styles for the grid layout */\n gridLayout?: GridLayoutStyles;\n /** Styles for the horizontal gallery */\n horizontalGallery?: HorizontalGalleryStyles;\n /** Styles for the local video */\n localVideo?: IStyle;\n /** Styles for the vertical gallery */\n verticalGallery?: VerticalGalleryStyles;\n}\n\n/**\n * Different modes and positions of the overflow gallery in the VideoGallery\n *\n * @public\n */\nexport type OverflowGalleryPosition = 'horizontalBottom' | 'verticalRight' | 'horizontalTop';\n\n/**\n * different modes of the local video tile\n *\n * @public\n */\nexport type LocalVideoTileSize = '9:16' | '16:9' | 'hidden' | 'followDeviceOrientation';\n\n/**\n * Props for {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoGalleryProps {\n /**\n * Allows users to pass an object containing custom CSS styles for the gallery container.\n *\n * @Example\n * ```\n * <VideoGallery styles={{ root: { border: 'solid 1px red' } }} />\n * ```\n */\n styles?: VideoGalleryStyles;\n /** Layout of the video tiles. */\n layout?: VideoGalleryLayout;\n /** Local video particpant */\n localParticipant: VideoGalleryLocalParticipant;\n /** List of remote video particpants */\n remoteParticipants?: VideoGalleryRemoteParticipant[];\n /** List of dominant speaker userIds in the order of their dominance. 0th index is the most dominant. */\n dominantSpeakers?: string[];\n /** Local video view options */\n localVideoViewOptions?: VideoStreamOptions;\n /** Remote videos view options */\n remoteVideoViewOptions?: VideoStreamOptions;\n /** Callback to create the local video stream view */\n onCreateLocalStreamView?: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;\n /** Callback to dispose of the local video stream view */\n onDisposeLocalStreamView?: () => void;\n /** Callback to render the local video tile*/\n onRenderLocalVideoTile?: (localParticipant: VideoGalleryLocalParticipant) => JSX.Element;\n /** Callback to create a remote video stream view */\n onCreateRemoteStreamView?: (\n userId: string,\n options?: VideoStreamOptions\n ) => Promise<void | CreateVideoStreamViewResult>;\n /** Callback to render a remote video tile */\n onRenderRemoteVideoTile?: (remoteParticipant: VideoGalleryRemoteParticipant) => JSX.Element;\n /**\n * @deprecated use {@link onDisposeRemoteVideoStreamView} and {@link onDisposeRemoteScreenShareStreamView} instead\n *\n * Callback to dispose a remote video stream view\n */\n onDisposeRemoteStreamView?: (userId: string) => Promise<void>;\n /** Callback to dispose a remote video stream view */\n onDisposeRemoteVideoStreamView?: (userId: string) => Promise<void>;\n /** Callback to dispose a remote screen share stream view */\n onDisposeRemoteScreenShareStreamView?: (userId: string) => Promise<void>;\n /** Callback to render a particpant avatar */\n onRenderAvatar?: OnRenderAvatarCallback;\n /**\n * Whether to display the local video camera switcher button\n */\n showCameraSwitcherInLocalPreview?: boolean;\n /**\n * Whether to display a mute icon beside the user's display name.\n * @defaultValue `true`\n */\n showMuteIndicator?: boolean;\n /** Optional strings to override in component */\n strings?: Partial<VideoGalleryStrings>;\n /**\n * Maximum number of participant remote video streams that is rendered.\n * @defaultValue 4\n */\n maxRemoteVideoStreams?: number;\n /**\n * Camera control information for button to switch cameras.\n */\n localVideoCameraCycleButtonProps?: LocalVideoCameraCycleButtonProps;\n /**\n * List of pinned participant userIds.\n */\n pinnedParticipants?: string[];\n /**\n * This callback will be called when a participant video tile is pinned.\n */\n onPinParticipant?: (userId: string) => void;\n /**\n * This callback will be called when a participant video tile is un-pinned.\n */\n onUnpinParticipant?: (userId: string) => void;\n /* @conditional-compile-remove(spotlight) */\n /**\n * List of spotlighted participant userIds.\n */\n spotlightedParticipants?: string[];\n /* @conditional-compile-remove(spotlight) */\n /**\n * This callback is to start spotlight for local participant video tile.\n */\n onStartLocalSpotlight?: () => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n /**\n * This callback is to stop spotlight for local participant video tile.\n */\n onStartRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n /**\n * This callback is to start spotlight for remote participant video tiles.\n */\n onStopLocalSpotlight?: () => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n /**\n * This callback is to stop spotlight for remote participant video tiles.\n */\n onStopRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n /**\n * Maximum participants that can be spotlighted\n */\n maxParticipantsToSpotlight?: number;\n /**\n * Options for showing the remote video tile menu.\n *\n * @defaultValue \\{ kind: 'contextual' \\}\n */\n remoteVideoTileMenu?: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps;\n /**\n * Determines the layout of the overflowGallery inside the VideoGallery.\n * @defaultValue 'horizontalBottom'\n */\n overflowGalleryPosition?: OverflowGalleryPosition;\n /**\n * Determines the aspect ratio of local video tile in the video gallery.\n * @remarks 'followDeviceOrientation' will be responsive to the screen orientation and will change between 9:16 (portrait) and\n * 16:9 (landscape) aspect ratios.\n * @defaultValue 'followDeviceOrientation'\n */\n localVideoTileSize?: LocalVideoTileSize;\n /**\n * Reaction resources for like, heart, laugh, applause and surprised.\n */\n reactionResources?: ReactionResources;\n /**\n * Additional Options for Video Tiles\n */\n videoTilesOptions?: VideoTilesOptions;\n}\n\n/**\n * Options that apply to all Video Tiles in the {@link VideoGallery}\n *\n * @public\n */\nexport interface VideoTilesOptions {\n /**\n * Whether to always show the label background for the video tile\n */\n alwaysShowLabelBackground?: boolean;\n}\n\n/**\n * Properties for showing contextual menu for remote {@link VideoTile} components in {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoTileContextualMenuProps {\n /**\n * The menu property kind\n */\n kind: 'contextual';\n}\n\n/**\n * Properties for showing drawer menu on remote {@link VideoTile} long touch in {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoTileDrawerMenuProps {\n /**\n * The menu property kind\n */\n kind: 'drawer';\n /**\n * The optional id property provided on an element that the drawer menu should render within when a\n * remote participant video tile Drawer is shown. If an id is not provided, then a drawer menu will\n * render within the VideoGallery component.\n */\n hostId?: string;\n}\n/**\n * VideoGallery represents a layout of video tiles for a specific call.\n * It displays a {@link VideoTile} for the local user as well as for each remote participant who has joined the call.\n *\n * @public\n */\nexport const VideoGallery = (props: VideoGalleryProps): JSX.Element => {\n const {\n localParticipant,\n remoteParticipants = [],\n localVideoViewOptions,\n remoteVideoViewOptions,\n dominantSpeakers,\n onRenderLocalVideoTile,\n onRenderRemoteVideoTile,\n onCreateLocalStreamView,\n onDisposeLocalStreamView,\n onCreateRemoteStreamView,\n onDisposeRemoteScreenShareStreamView,\n onDisposeRemoteVideoStreamView,\n styles,\n layout,\n onRenderAvatar,\n showMuteIndicator,\n maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEO_STREAMS,\n showCameraSwitcherInLocalPreview,\n localVideoCameraCycleButtonProps,\n onPinParticipant: onPinParticipantHandler,\n onUnpinParticipant: onUnpinParticipantHandler,\n remoteVideoTileMenu = DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS,\n overflowGalleryPosition = 'horizontalBottom',\n localVideoTileSize = 'followDeviceOrientation',\n /* @conditional-compile-remove(spotlight) */\n spotlightedParticipants,\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlight,\n /* @conditional-compile-remove(spotlight) */\n maxParticipantsToSpotlight,\n reactionResources,\n videoTilesOptions\n } = props;\n\n const ids = useIdentifiers();\n const theme = useTheme();\n const localeStrings = useLocale().strings.videoGallery;\n const strings = useMemo(() => ({ ...localeStrings, ...props.strings }), [localeStrings, props.strings]);\n\n const drawerMenuHostIdFromProp =\n remoteVideoTileMenu && remoteVideoTileMenu.kind === 'drawer'\n ? (remoteVideoTileMenu as VideoTileDrawerMenuProps).hostId\n : undefined;\n const drawerMenuHostId = useId('drawerMenuHost', drawerMenuHostIdFromProp);\n\n const localTileNotInGrid = (layout === 'floatingLocalVideo' || layout === 'speaker') && remoteParticipants.length > 0;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n const isNarrow = containerWidth ? isNarrowWidth(containerWidth) : false;\n\n const [pinnedParticipantsState, setPinnedParticipantsState] = React.useState<string[]>([]);\n const [selectedScalingModeState, setselectedScalingModeState] = React.useState<Record<string, VideoStreamOptions>>(\n {}\n );\n\n const onUpdateScalingMode = useCallback(\n (remoteUserId: string, scalingMode: ViewScalingMode) => {\n setselectedScalingModeState((current) => ({\n ...current,\n [remoteUserId]: {\n scalingMode,\n isMirrored: remoteVideoViewOptions?.isMirrored\n }\n }));\n },\n [remoteVideoViewOptions?.isMirrored]\n );\n useEffect(() => {\n props.pinnedParticipants?.forEach((pinParticipant) => {\n if (!props.remoteParticipants?.find((t) => t.userId === pinParticipant)) {\n // warning will be logged in the console when invalid participant id is passed in pinned participants\n console.warn('Invalid pinned participant UserId :' + pinParticipant);\n }\n });\n }, [props.pinnedParticipants, props.remoteParticipants]);\n // Use pinnedParticipants from props but if it is not defined use the maintained state of pinned participants\n const pinnedParticipants = props.pinnedParticipants ?? pinnedParticipantsState;\n\n const showLocalVideoTileLabel =\n !((localTileNotInGrid && isNarrow) || localVideoTileSize === '9:16') || layout === 'default';\n /**\n * Utility function for memoized rendering of LocalParticipant.\n */\n const localVideoTile = useMemo((): JSX.Element | undefined => {\n if (localVideoTileSize === 'hidden') {\n return undefined;\n }\n if (onRenderLocalVideoTile) {\n return onRenderLocalVideoTile(localParticipant);\n }\n\n /* @conditional-compile-remove(spotlight) */\n const isSpotlighted = !!localParticipant.spotlight;\n\n const localVideoTileStyles = concatStyleSets(\n localTileNotInGrid ? floatingLocalVideoTileStyle : {},\n {\n root: { borderRadius: theme.effects.roundedCorner4 }\n },\n styles?.localVideo\n );\n\n const initialsName = !localParticipant.displayName ? '' : localParticipant.displayName;\n\n const showDisplayNameTrampoline = (): string => {\n return layout === 'default' ? strings.localVideoLabel : isNarrow ? '' : strings.localVideoLabel;\n return isNarrow ? '' : strings.localVideoLabel;\n };\n\n return (\n <Stack\n styles={localVideoTileContainerStyles}\n key=\"local-video-tile-key\"\n tabIndex={0}\n aria-label={strings.localVideoMovementLabel}\n role={'dialog'}\n >\n <_LocalVideoTile\n alwaysShowLabelBackground={videoTilesOptions?.alwaysShowLabelBackground}\n userId={localParticipant.userId}\n onCreateLocalStreamView={onCreateLocalStreamView}\n onDisposeLocalStreamView={onDisposeLocalStreamView}\n isAvailable={localParticipant?.videoStream?.isAvailable}\n isMuted={localParticipant.isMuted}\n renderElement={localParticipant?.videoStream?.renderElement}\n displayName={showDisplayNameTrampoline()}\n initialsName={initialsName}\n localVideoViewOptions={localVideoViewOptions}\n onRenderAvatar={onRenderAvatar}\n showLabel={showLocalVideoTileLabel}\n showMuteIndicator={showMuteIndicator}\n showCameraSwitcherInLocalPreview={showCameraSwitcherInLocalPreview}\n localVideoCameraCycleButtonProps={localVideoCameraCycleButtonProps}\n localVideoCameraSwitcherLabel={strings.localVideoCameraSwitcherLabel}\n localVideoSelectedDescription={strings.localVideoSelectedDescription}\n styles={localVideoTileStyles}\n raisedHand={localParticipant.raisedHand}\n reaction={localParticipant.reaction}\n /* @conditional-compile-remove(spotlight) */\n spotlightedParticipantUserIds={spotlightedParticipants}\n /* @conditional-compile-remove(spotlight) */\n isSpotlighted={isSpotlighted}\n /* @conditional-compile-remove(spotlight) */\n onStartSpotlight={onStartLocalSpotlight}\n /* @conditional-compile-remove(spotlight) */\n onStopSpotlight={onStopLocalSpotlight}\n /* @conditional-compile-remove(spotlight) */\n maxParticipantsToSpotlight={maxParticipantsToSpotlight}\n /* @conditional-compile-remove(spotlight) */\n menuKind={remoteVideoTileMenu ? (remoteVideoTileMenu.kind === 'drawer' ? 'drawer' : 'contextual') : undefined}\n /* @conditional-compile-remove(spotlight) */\n drawerMenuHostId={drawerMenuHostId}\n /* @conditional-compile-remove(spotlight) */\n strings={strings}\n reactionResources={reactionResources}\n />\n </Stack>\n );\n }, [\n isNarrow,\n localParticipant,\n localVideoCameraCycleButtonProps,\n localVideoViewOptions,\n onCreateLocalStreamView,\n onDisposeLocalStreamView,\n onRenderAvatar,\n onRenderLocalVideoTile,\n localTileNotInGrid,\n showCameraSwitcherInLocalPreview,\n showMuteIndicator,\n styles?.localVideo,\n theme.effects.roundedCorner4,\n localVideoTileSize,\n layout,\n showLocalVideoTileLabel,\n /* @conditional-compile-remove(spotlight) */\n spotlightedParticipants,\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight,\n /* @conditional-compile-remove(spotlight) */\n maxParticipantsToSpotlight,\n /* @conditional-compile-remove(spotlight) */\n remoteVideoTileMenu,\n /* @conditional-compile-remove(spotlight) */\n strings,\n /* @conditional-compile-remove(spotlight) */\n drawerMenuHostId,\n reactionResources,\n videoTilesOptions\n ]);\n\n const onPinParticipant = useCallback(\n (userId: string) => {\n if (pinnedParticipants.length >= MAX_PINNED_REMOTE_VIDEO_TILES) {\n return;\n }\n if (!pinnedParticipantsState.includes(userId)) {\n setPinnedParticipantsState(pinnedParticipantsState.concat(userId));\n }\n onPinParticipantHandler?.(userId);\n },\n [pinnedParticipants.length, pinnedParticipantsState, setPinnedParticipantsState, onPinParticipantHandler]\n );\n const onUnpinParticipant = useCallback(\n (userId: string) => {\n setPinnedParticipantsState(pinnedParticipantsState.filter((p) => p !== userId));\n onUnpinParticipantHandler?.(userId);\n },\n [pinnedParticipantsState, setPinnedParticipantsState, onUnpinParticipantHandler]\n );\n\n const [announcementString, setAnnouncementString] = React.useState<string>('');\n /**\n * sets the announcement string for VideoGallery actions so that the screenreader will trigger\n */\n const toggleAnnouncerString = useCallback(\n (announcement: string) => {\n setAnnouncementString(announcement);\n /**\n * Clears the announcer string after VideoGallery action allowing it to be re-announced.\n */\n setTimeout(() => {\n setAnnouncementString('');\n }, 3000);\n },\n [setAnnouncementString]\n );\n\n const defaultOnRenderVideoTile = useCallback(\n (participant: VideoGalleryRemoteParticipant, isVideoParticipant?: boolean) => {\n const remoteVideoStream = participant.videoStream;\n const selectedScalingMode = remoteVideoStream ? selectedScalingModeState[participant.userId] : undefined;\n let isPinned = pinnedParticipants?.includes(participant.userId);\n /* @conditional-compile-remove(spotlight) */\n const isSpotlighted = !!participant.spotlight;\n /* @conditional-compile-remove(spotlight) */\n isPinned = isSpotlighted ? false : isPinned;\n\n const createViewOptions = (): VideoStreamOptions | undefined => {\n if (selectedScalingMode) {\n return selectedScalingMode;\n }\n return remoteVideoStream?.streamSize &&\n remoteVideoStream.streamSize?.height > remoteVideoStream.streamSize?.width\n ? ({\n scalingMode: 'Fit',\n isMirrored: remoteVideoViewOptions?.isMirrored\n } as VideoStreamOptions)\n : remoteVideoViewOptions;\n };\n\n return (\n <_RemoteVideoTile\n alwaysShowLabelBackground={videoTilesOptions?.alwaysShowLabelBackground}\n streamId={remoteVideoStream?.id}\n key={participant.userId}\n userId={participant.userId}\n remoteParticipant={participant}\n onCreateRemoteStreamView={isVideoParticipant ? onCreateRemoteStreamView : undefined}\n onDisposeRemoteStreamView={isVideoParticipant ? onDisposeRemoteVideoStreamView : undefined}\n isAvailable={isVideoParticipant ? remoteVideoStream?.isAvailable : false}\n isReceiving={isVideoParticipant ? remoteVideoStream?.isReceiving : false}\n renderElement={isVideoParticipant ? remoteVideoStream?.renderElement : undefined}\n remoteVideoViewOptions={createViewOptions()}\n onRenderAvatar={onRenderAvatar}\n showMuteIndicator={showMuteIndicator}\n strings={strings}\n /* @conditional-compile-remove(PSTN-calls) */\n participantState={participant.state}\n menuKind={\n participant.userId === localParticipant.userId\n ? undefined\n : remoteVideoTileMenu\n ? remoteVideoTileMenu.kind === 'drawer'\n ? 'drawer'\n : 'contextual'\n : undefined\n }\n drawerMenuHostId={drawerMenuHostId}\n onPinParticipant={onPinParticipant}\n onUnpinParticipant={onUnpinParticipant}\n onUpdateScalingMode={onUpdateScalingMode}\n isPinned={isPinned}\n disablePinMenuItem={pinnedParticipants.length >= MAX_PINNED_REMOTE_VIDEO_TILES}\n toggleAnnouncerString={toggleAnnouncerString}\n /* @conditional-compile-remove(spotlight) */\n spotlightedParticipantUserIds={spotlightedParticipants}\n /* @conditional-compile-remove(spotlight) */\n isSpotlighted={isSpotlighted}\n /* @conditional-compile-remove(spotlight) */\n onStartSpotlight={onStartRemoteSpotlight}\n /* @conditional-compile-remove(spotlight) */\n onStopSpotlight={onStopRemoteSpotlight}\n /* @conditional-compile-remove(spotlight) */\n maxParticipantsToSpotlight={maxParticipantsToSpotlight}\n reactionResources={reactionResources}\n />\n );\n },\n [\n onCreateRemoteStreamView,\n onDisposeRemoteVideoStreamView,\n remoteVideoViewOptions,\n localParticipant,\n onRenderAvatar,\n showMuteIndicator,\n strings,\n drawerMenuHostId,\n remoteVideoTileMenu,\n selectedScalingModeState,\n pinnedParticipants,\n onPinParticipant,\n onUnpinParticipant,\n toggleAnnouncerString,\n onUpdateScalingMode,\n /* @conditional-compile-remove(spotlight) */ spotlightedParticipants,\n /* @conditional-compile-remove(spotlight) */ onStartRemoteSpotlight,\n /* @conditional-compile-remove(spotlight) */ onStopRemoteSpotlight,\n /* @conditional-compile-remove(spotlight) */ maxParticipantsToSpotlight,\n reactionResources,\n videoTilesOptions\n ]\n );\n\n const screenShareParticipant = remoteParticipants.find((participant) => participant.screenShareStream?.isAvailable);\n\n const localScreenShareStreamComponent = <LocalScreenShare localParticipant={localParticipant} />;\n\n const remoteScreenShareComponent = screenShareParticipant && (\n <RemoteScreenShare\n {...screenShareParticipant}\n renderElement={screenShareParticipant.screenShareStream?.renderElement}\n onCreateRemoteStreamView={onCreateRemoteStreamView}\n onDisposeRemoteStreamView={onDisposeRemoteScreenShareStreamView}\n isReceiving={screenShareParticipant.screenShareStream?.isReceiving}\n participantVideoScalingMode={selectedScalingModeState[screenShareParticipant.userId]}\n localParticipant={localParticipant}\n remoteParticipants={remoteParticipants}\n reactionResources={reactionResources}\n /* @conditional-compile-remove(ppt-live) */\n isPPTLive={!screenShareParticipant.screenShareStream?.id}\n />\n );\n\n const screenShareComponent = remoteScreenShareComponent\n ? remoteScreenShareComponent\n : localParticipant.isScreenSharingOn\n ? localScreenShareStreamComponent\n : undefined;\n\n const layoutProps = useMemo<LayoutProps>(\n () => ({\n remoteParticipants,\n localParticipant,\n screenShareComponent,\n showCameraSwitcherInLocalPreview,\n maxRemoteVideoStreams,\n dominantSpeakers,\n styles,\n onRenderRemoteParticipant: onRenderRemoteVideoTile ?? defaultOnRenderVideoTile,\n localVideoComponent: localVideoTile,\n parentWidth: containerWidth,\n parentHeight: containerHeight,\n pinnedParticipantUserIds: pinnedParticipants,\n overflowGalleryPosition,\n localVideoTileSize,\n /* @conditional-compile-remove(spotlight) */ spotlightedParticipantUserIds: spotlightedParticipants\n }),\n [\n remoteParticipants,\n localParticipant,\n screenShareComponent,\n showCameraSwitcherInLocalPreview,\n maxRemoteVideoStreams,\n dominantSpeakers,\n styles,\n localVideoTile,\n containerWidth,\n containerHeight,\n onRenderRemoteVideoTile,\n defaultOnRenderVideoTile,\n pinnedParticipants,\n overflowGalleryPosition,\n localVideoTileSize,\n /* @conditional-compile-remove(spotlight) */ spotlightedParticipants\n ]\n );\n\n const videoGalleryLayout = useMemo(() => {\n if (screenShareParticipant && layout === 'focusedContent') {\n return <FocusedContentLayout {...layoutProps} />;\n }\n if (layout === 'floatingLocalVideo') {\n return <FloatingLocalVideoLayout {...layoutProps} />;\n }\n\n if (layout === 'speaker') {\n return <SpeakerVideoLayout {...layoutProps} />;\n }\n /* @conditional-compile-remove(large-gallery) */\n if (layout === 'largeGallery') {\n return <LargeGalleryLayout {...layoutProps} />;\n }\n return <DefaultLayout {...layoutProps} />;\n }, [layout, layoutProps, screenShareParticipant]);\n\n return (\n <div\n // We don't assign an drawer menu host id to the VideoGallery when a drawerMenuHostId is assigned from props\n id={drawerMenuHostIdFromProp ? undefined : drawerMenuHostId}\n data-ui-id={ids.videoGallery}\n ref={containerRef}\n className={mergeStyles(videoGalleryOuterDivStyle, styles?.root, unselectable)}\n >\n {videoGalleryLayout}\n <Announcer announcementString={announcementString} ariaLive=\"polite\" />\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"VideoGallery.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/VideoGallery.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAE,eAAe,EAAU,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9E,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAWtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAIrE,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAA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AAwB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,gBAAgB,gBAC/C,GAAG,CAAC,YAAY,EAC5B,GAAG,EAAE,YAAY,EACjB,SAAS,EAAE,WAAW,CAAC,yBAAyB,EAAE,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,EAAE,YAAY,CAAC;QAE5E,kBAAkB;QACnB,oBAAC,SAAS,IAAC,kBAAkB,EAAE,kBAAkB,EAAE,QAAQ,EAAC,QAAQ,GAAG,CACnE,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { concatStyleSets, IStyle, mergeStyles, Stack } from '@fluentui/react';\nimport React, { useCallback, useMemo, useRef } from 'react';\nimport { GridLayoutStyles } from '.';\nimport { Announcer } from './Announcer';\nimport { useEffect } from 'react';\nimport { useLocale } from '../localization';\nimport { useTheme } from '../theming';\nimport {\n BaseCustomStyles,\n OnRenderAvatarCallback,\n VideoGalleryLocalParticipant,\n VideoGalleryRemoteParticipant,\n VideoStreamOptions,\n CreateVideoStreamViewResult\n} from '../types';\nimport { ViewScalingMode } from '../types';\nimport { HorizontalGalleryStyles } from './HorizontalGallery';\nimport { _RemoteVideoTile } from './RemoteVideoTile';\nimport { isNarrowWidth, _useContainerHeight, _useContainerWidth } from './utils/responsive';\nimport { LocalScreenShare } from './VideoGallery/LocalScreenShare';\nimport { RemoteScreenShare } from './VideoGallery/RemoteScreenShare';\nimport { LocalVideoCameraCycleButtonProps } from './LocalVideoCameraButton';\nimport { _ICoordinates, _ModalClone } from './ModalClone/ModalClone';\nimport { _formatString } from '@internal/acs-ui-common';\nimport { _LocalVideoTile } from './LocalVideoTile';\nimport { DefaultLayout } from './VideoGallery/DefaultLayout';\nimport { FloatingLocalVideoLayout } from './VideoGallery/FloatingLocalVideoLayout';\nimport { useIdentifiers } from '../identifiers';\nimport { localVideoTileContainerStyles, videoGalleryOuterDivStyle } from './styles/VideoGallery.styles';\nimport { floatingLocalVideoTileStyle } from './VideoGallery/styles/FloatingLocalVideo.styles';\nimport { useId } from '@fluentui/react-hooks';\nimport { VerticalGalleryStyles } from './VerticalGallery';\nimport { SpeakerVideoLayout } from './VideoGallery/SpeakerVideoLayout';\nimport { FocusedContentLayout } from './VideoGallery/FocusContentLayout';\n/* @conditional-compile-remove(large-gallery) */\nimport { LargeGalleryLayout } from './VideoGallery/LargeGalleryLayout';\nimport { LayoutProps } from './VideoGallery/Layout';\nimport { ReactionResources } from '../types/ReactionTypes';\n\n/**\n * @private\n * Currently the Calling JS SDK supports up to 4 remote video streams\n */\nexport const DEFAULT_MAX_REMOTE_VIDEO_STREAMS = 4;\n\n/**\n * @private\n * Styles to disable the selectivity of a text in video gallery\n */\nexport const unselectable = {\n '-webkit-user-select': 'none',\n '-webkit-touch-callout': 'none',\n '-moz-user-select': 'none',\n '-ms-user-select': 'none',\n 'user-select': 'none'\n};\n/**\n * @private\n * Set aside only 6 dominant speakers for remaining audio participants\n */\nexport const MAX_AUDIO_DOMINANT_SPEAKERS = 6;\n/**\n * @private\n * Default remote video tile menu options\n */\nexport const DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS = {\n kind: 'contextual'\n};\n\n/**\n * @private\n * Maximum number of remote video tiles that can be pinned\n */\nexport const MAX_PINNED_REMOTE_VIDEO_TILES = 4;\n\n/**\n * All strings that may be shown on the UI in the {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoGalleryStrings {\n /** String to notify that local user is sharing their screen */\n screenIsBeingSharedMessage: string;\n /** String to show when remote screen share stream is loading */\n screenShareLoadingMessage: string;\n /** String for local video label. Default is \"You\" */\n localVideoLabel: string;\n /** String for local video camera switcher */\n localVideoCameraSwitcherLabel: string;\n /** String for announcing the local video tile can be moved by keyboard controls */\n localVideoMovementLabel: string;\n /** String for announcing the selected camera */\n localVideoSelectedDescription: string;\n /** placeholder text for participants who does not have a display name*/\n displayNamePlaceholder: string;\n /** Menu text shown in Video Tile contextual menu for setting a remote participants video to fit in frame */\n fitRemoteParticipantToFrame: string;\n /** Menu text shown in Video Tile contextual menu for setting a remote participants video to fill the frame */\n fillRemoteParticipantFrame: string;\n /** Menu text shown in Video Tile contextual menu for pinning a remote participant's video tile */\n pinParticipantForMe: string;\n /** Menu text shown in Video Tile contextual menu for unpinning a remote participant's video tile */\n unpinParticipantForMe: string;\n /** Aria label for pin participant menu item of remote participant's video tile */\n pinParticipantMenuItemAriaLabel: string;\n /** Aria label for unpin participant menu item of remote participant's video tile */\n unpinParticipantMenuItemAriaLabel: string;\n /** Aria label to announce when remote participant's video tile is pinned */\n pinnedParticipantAnnouncementAriaLabel: string;\n /** Aria label to announce when remote participant's video tile is unpinned */\n unpinnedParticipantAnnouncementAriaLabel: string;\n /* @conditional-compile-remove(spotlight) */\n /** Menu text shown in Video Tile contextual menu to start spotlight on participant's video tile */\n startSpotlightVideoTileMenuLabel: string;\n /* @conditional-compile-remove(spotlight) */\n /** Menu text shown in Video Tile contextual menu to add spotlight to participant's video tile */\n addSpotlightVideoTileMenuLabel: string;\n /* @conditional-compile-remove(spotlight) */\n /** Menu title for start spotlight menu item when spotlight limit is reached */\n spotlightLimitReachedMenuTitle: string;\n /* @conditional-compile-remove(spotlight) */\n /** Menu text shown in Video Tile contextual menu to stop spotlight on participant's video tile */\n stopSpotlightVideoTileMenuLabel: string;\n /* @conditional-compile-remove(spotlight) */\n /** Menu text shown in Video Tile contextual menu to stop spotlight on local user's video tile */\n stopSpotlightOnSelfVideoTileMenuLabel: string;\n /* @conditional-compile-remove(hide-attendee-name) */\n /** String for the attendee role */\n attendeeRole: string;\n}\n\n/**\n * @public\n */\nexport type VideoGalleryLayout =\n | 'default'\n | 'floatingLocalVideo'\n | 'speaker'\n | /* @conditional-compile-remove(large-gallery) */ 'largeGallery'\n | 'focusedContent';\n\n/**\n * {@link VideoGallery} Component Styles.\n * @public\n */\nexport interface VideoGalleryStyles extends BaseCustomStyles {\n /** Styles for the grid layout */\n gridLayout?: GridLayoutStyles;\n /** Styles for the horizontal gallery */\n horizontalGallery?: HorizontalGalleryStyles;\n /** Styles for the local video */\n localVideo?: IStyle;\n /** Styles for the vertical gallery */\n verticalGallery?: VerticalGalleryStyles;\n}\n\n/**\n * Different modes and positions of the overflow gallery in the VideoGallery\n *\n * @public\n */\nexport type OverflowGalleryPosition = 'horizontalBottom' | 'verticalRight' | 'horizontalTop';\n\n/**\n * different modes of the local video tile\n *\n * @public\n */\nexport type LocalVideoTileSize = '9:16' | '16:9' | 'hidden' | 'followDeviceOrientation';\n\n/**\n * Props for {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoGalleryProps {\n /**\n * Allows users to pass an object containing custom CSS styles for the gallery container.\n *\n * @Example\n * ```\n * <VideoGallery styles={{ root: { border: 'solid 1px red' } }} />\n * ```\n */\n styles?: VideoGalleryStyles;\n /** Layout of the video tiles. */\n layout?: VideoGalleryLayout;\n /** Local video particpant */\n localParticipant: VideoGalleryLocalParticipant;\n /** List of remote video particpants */\n remoteParticipants?: VideoGalleryRemoteParticipant[];\n /** List of dominant speaker userIds in the order of their dominance. 0th index is the most dominant. */\n dominantSpeakers?: string[];\n /** Local video view options */\n localVideoViewOptions?: VideoStreamOptions;\n /** Remote videos view options */\n remoteVideoViewOptions?: VideoStreamOptions;\n /** Callback to create the local video stream view */\n onCreateLocalStreamView?: (options?: VideoStreamOptions) => Promise<void | CreateVideoStreamViewResult>;\n /** Callback to dispose of the local video stream view */\n onDisposeLocalStreamView?: () => void;\n /** Callback to render the local video tile*/\n onRenderLocalVideoTile?: (localParticipant: VideoGalleryLocalParticipant) => JSX.Element;\n /** Callback to create a remote video stream view */\n onCreateRemoteStreamView?: (\n userId: string,\n options?: VideoStreamOptions\n ) => Promise<void | CreateVideoStreamViewResult>;\n /** Callback to render a remote video tile */\n onRenderRemoteVideoTile?: (remoteParticipant: VideoGalleryRemoteParticipant) => JSX.Element;\n /**\n * @deprecated use {@link onDisposeRemoteVideoStreamView} and {@link onDisposeRemoteScreenShareStreamView} instead\n *\n * Callback to dispose a remote video stream view\n */\n onDisposeRemoteStreamView?: (userId: string) => Promise<void>;\n /** Callback to dispose a remote video stream view */\n onDisposeRemoteVideoStreamView?: (userId: string) => Promise<void>;\n /** Callback to dispose a remote screen share stream view */\n onDisposeRemoteScreenShareStreamView?: (userId: string) => Promise<void>;\n /** Callback to render a particpant avatar */\n onRenderAvatar?: OnRenderAvatarCallback;\n /**\n * Whether to display the local video camera switcher button\n */\n showCameraSwitcherInLocalPreview?: boolean;\n /**\n * Whether to display a mute icon beside the user's display name.\n * @defaultValue `true`\n */\n showMuteIndicator?: boolean;\n /** Optional strings to override in component */\n strings?: Partial<VideoGalleryStrings>;\n /**\n * Maximum number of participant remote video streams that is rendered.\n * @defaultValue 4\n */\n maxRemoteVideoStreams?: number;\n /**\n * Camera control information for button to switch cameras.\n */\n localVideoCameraCycleButtonProps?: LocalVideoCameraCycleButtonProps;\n /**\n * List of pinned participant userIds.\n */\n pinnedParticipants?: string[];\n /**\n * This callback will be called when a participant video tile is pinned.\n */\n onPinParticipant?: (userId: string) => void;\n /**\n * This callback will be called when a participant video tile is un-pinned.\n */\n onUnpinParticipant?: (userId: string) => void;\n /* @conditional-compile-remove(spotlight) */\n /**\n * List of spotlighted participant userIds.\n */\n spotlightedParticipants?: string[];\n /* @conditional-compile-remove(spotlight) */\n /**\n * This callback is to start spotlight for local participant video tile.\n */\n onStartLocalSpotlight?: () => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n /**\n * This callback is to stop spotlight for local participant video tile.\n */\n onStartRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n /**\n * This callback is to start spotlight for remote participant video tiles.\n */\n onStopLocalSpotlight?: () => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n /**\n * This callback is to stop spotlight for remote participant video tiles.\n */\n onStopRemoteSpotlight?: (userIds: string[]) => Promise<void>;\n /* @conditional-compile-remove(spotlight) */\n /**\n * Maximum participants that can be spotlighted\n */\n maxParticipantsToSpotlight?: number;\n /**\n * Options for showing the remote video tile menu.\n *\n * @defaultValue \\{ kind: 'contextual' \\}\n */\n remoteVideoTileMenu?: false | VideoTileContextualMenuProps | VideoTileDrawerMenuProps;\n /**\n * Determines the layout of the overflowGallery inside the VideoGallery.\n * @defaultValue 'horizontalBottom'\n */\n overflowGalleryPosition?: OverflowGalleryPosition;\n /**\n * Determines the aspect ratio of local video tile in the video gallery.\n * @remarks 'followDeviceOrientation' will be responsive to the screen orientation and will change between 9:16 (portrait) and\n * 16:9 (landscape) aspect ratios.\n * @defaultValue 'followDeviceOrientation'\n */\n localVideoTileSize?: LocalVideoTileSize;\n /**\n * Reaction resources for like, heart, laugh, applause and surprised.\n */\n reactionResources?: ReactionResources;\n /**\n * Additional Options for Video Tiles\n */\n videoTilesOptions?: VideoTilesOptions;\n}\n\n/**\n * Options that apply to all Video Tiles in the {@link VideoGallery}\n *\n * @public\n */\nexport interface VideoTilesOptions {\n /**\n * Whether to always show the label background for the video tile\n */\n alwaysShowLabelBackground?: boolean;\n}\n\n/**\n * Properties for showing contextual menu for remote {@link VideoTile} components in {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoTileContextualMenuProps {\n /**\n * The menu property kind\n */\n kind: 'contextual';\n}\n\n/**\n * Properties for showing drawer menu on remote {@link VideoTile} long touch in {@link VideoGallery}.\n *\n * @public\n */\nexport interface VideoTileDrawerMenuProps {\n /**\n * The menu property kind\n */\n kind: 'drawer';\n /**\n * The optional id property provided on an element that the drawer menu should render within when a\n * remote participant video tile Drawer is shown. If an id is not provided, then a drawer menu will\n * render within the VideoGallery component.\n */\n hostId?: string;\n}\n/**\n * VideoGallery represents a layout of video tiles for a specific call.\n * It displays a {@link VideoTile} for the local user as well as for each remote participant who has joined the call.\n *\n * @public\n */\nexport const VideoGallery = (props: VideoGalleryProps): JSX.Element => {\n const {\n localParticipant,\n remoteParticipants = [],\n localVideoViewOptions,\n remoteVideoViewOptions,\n dominantSpeakers,\n onRenderLocalVideoTile,\n onRenderRemoteVideoTile,\n onCreateLocalStreamView,\n onDisposeLocalStreamView,\n onCreateRemoteStreamView,\n onDisposeRemoteScreenShareStreamView,\n onDisposeRemoteVideoStreamView,\n styles,\n layout,\n onRenderAvatar,\n showMuteIndicator,\n maxRemoteVideoStreams = DEFAULT_MAX_REMOTE_VIDEO_STREAMS,\n showCameraSwitcherInLocalPreview,\n localVideoCameraCycleButtonProps,\n onPinParticipant: onPinParticipantHandler,\n onUnpinParticipant: onUnpinParticipantHandler,\n remoteVideoTileMenu = DEFAULT_REMOTE_VIDEO_TILE_MENU_OPTIONS,\n overflowGalleryPosition = 'horizontalBottom',\n localVideoTileSize = 'followDeviceOrientation',\n /* @conditional-compile-remove(spotlight) */\n spotlightedParticipants,\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStartRemoteSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStopRemoteSpotlight,\n /* @conditional-compile-remove(spotlight) */\n maxParticipantsToSpotlight,\n reactionResources,\n videoTilesOptions\n } = props;\n\n const ids = useIdentifiers();\n const theme = useTheme();\n const localeStrings = useLocale().strings.videoGallery;\n const strings = useMemo(() => ({ ...localeStrings, ...props.strings }), [localeStrings, props.strings]);\n\n const drawerMenuHostIdFromProp =\n remoteVideoTileMenu && remoteVideoTileMenu.kind === 'drawer'\n ? (remoteVideoTileMenu as VideoTileDrawerMenuProps).hostId\n : undefined;\n const drawerMenuHostId = useId('drawerMenuHost', drawerMenuHostIdFromProp);\n\n const localTileNotInGrid = (layout === 'floatingLocalVideo' || layout === 'speaker') && remoteParticipants.length > 0;\n\n const containerRef = useRef<HTMLDivElement>(null);\n const containerWidth = _useContainerWidth(containerRef);\n const containerHeight = _useContainerHeight(containerRef);\n const isNarrow = containerWidth ? isNarrowWidth(containerWidth) : false;\n\n const [pinnedParticipantsState, setPinnedParticipantsState] = React.useState<string[]>([]);\n const [selectedScalingModeState, setselectedScalingModeState] = React.useState<Record<string, VideoStreamOptions>>(\n {}\n );\n\n const onUpdateScalingMode = useCallback(\n (remoteUserId: string, scalingMode: ViewScalingMode) => {\n setselectedScalingModeState((current) => ({\n ...current,\n [remoteUserId]: {\n scalingMode,\n isMirrored: remoteVideoViewOptions?.isMirrored\n }\n }));\n },\n [remoteVideoViewOptions?.isMirrored]\n );\n useEffect(() => {\n props.pinnedParticipants?.forEach((pinParticipant) => {\n if (!props.remoteParticipants?.find((t) => t.userId === pinParticipant)) {\n // warning will be logged in the console when invalid participant id is passed in pinned participants\n console.warn('Invalid pinned participant UserId :' + pinParticipant);\n }\n });\n }, [props.pinnedParticipants, props.remoteParticipants]);\n // Use pinnedParticipants from props but if it is not defined use the maintained state of pinned participants\n const pinnedParticipants = props.pinnedParticipants ?? pinnedParticipantsState;\n\n const showLocalVideoTileLabel =\n !((localTileNotInGrid && isNarrow) || localVideoTileSize === '9:16') || layout === 'default';\n /**\n * Utility function for memoized rendering of LocalParticipant.\n */\n const localVideoTile = useMemo((): JSX.Element | undefined => {\n if (localVideoTileSize === 'hidden') {\n return undefined;\n }\n if (onRenderLocalVideoTile) {\n return onRenderLocalVideoTile(localParticipant);\n }\n\n /* @conditional-compile-remove(spotlight) */\n const isSpotlighted = !!localParticipant.spotlight;\n\n const localVideoTileStyles = concatStyleSets(\n localTileNotInGrid ? floatingLocalVideoTileStyle : {},\n {\n root: { borderRadius: theme.effects.roundedCorner4 }\n },\n styles?.localVideo\n );\n\n const initialsName = !localParticipant.displayName ? '' : localParticipant.displayName;\n\n const showDisplayNameTrampoline = (): string => {\n return layout === 'default' ? strings.localVideoLabel : isNarrow ? '' : strings.localVideoLabel;\n return isNarrow ? '' : strings.localVideoLabel;\n };\n\n return (\n <Stack\n styles={localVideoTileContainerStyles}\n key=\"local-video-tile-key\"\n tabIndex={0}\n aria-label={strings.localVideoMovementLabel}\n role={'dialog'}\n >\n <_LocalVideoTile\n alwaysShowLabelBackground={videoTilesOptions?.alwaysShowLabelBackground}\n userId={localParticipant.userId}\n onCreateLocalStreamView={onCreateLocalStreamView}\n onDisposeLocalStreamView={onDisposeLocalStreamView}\n isAvailable={localParticipant?.videoStream?.isAvailable}\n isMuted={localParticipant.isMuted}\n renderElement={localParticipant?.videoStream?.renderElement}\n displayName={showDisplayNameTrampoline()}\n initialsName={initialsName}\n localVideoViewOptions={localVideoViewOptions}\n onRenderAvatar={onRenderAvatar}\n showLabel={showLocalVideoTileLabel}\n showMuteIndicator={showMuteIndicator}\n showCameraSwitcherInLocalPreview={showCameraSwitcherInLocalPreview}\n localVideoCameraCycleButtonProps={localVideoCameraCycleButtonProps}\n localVideoCameraSwitcherLabel={strings.localVideoCameraSwitcherLabel}\n localVideoSelectedDescription={strings.localVideoSelectedDescription}\n styles={localVideoTileStyles}\n raisedHand={localParticipant.raisedHand}\n reaction={localParticipant.reaction}\n /* @conditional-compile-remove(spotlight) */\n spotlightedParticipantUserIds={spotlightedParticipants}\n /* @conditional-compile-remove(spotlight) */\n isSpotlighted={isSpotlighted}\n /* @conditional-compile-remove(spotlight) */\n onStartSpotlight={onStartLocalSpotlight}\n /* @conditional-compile-remove(spotlight) */\n onStopSpotlight={onStopLocalSpotlight}\n /* @conditional-compile-remove(spotlight) */\n maxParticipantsToSpotlight={maxParticipantsToSpotlight}\n /* @conditional-compile-remove(spotlight) */\n menuKind={remoteVideoTileMenu ? (remoteVideoTileMenu.kind === 'drawer' ? 'drawer' : 'contextual') : undefined}\n /* @conditional-compile-remove(spotlight) */\n drawerMenuHostId={drawerMenuHostId}\n /* @conditional-compile-remove(spotlight) */\n strings={strings}\n reactionResources={reactionResources}\n />\n </Stack>\n );\n }, [\n isNarrow,\n localParticipant,\n localVideoCameraCycleButtonProps,\n localVideoViewOptions,\n onCreateLocalStreamView,\n onDisposeLocalStreamView,\n onRenderAvatar,\n onRenderLocalVideoTile,\n localTileNotInGrid,\n showCameraSwitcherInLocalPreview,\n showMuteIndicator,\n styles?.localVideo,\n theme.effects.roundedCorner4,\n localVideoTileSize,\n layout,\n showLocalVideoTileLabel,\n /* @conditional-compile-remove(spotlight) */\n spotlightedParticipants,\n /* @conditional-compile-remove(spotlight) */\n onStartLocalSpotlight,\n /* @conditional-compile-remove(spotlight) */\n onStopLocalSpotlight,\n /* @conditional-compile-remove(spotlight) */\n maxParticipantsToSpotlight,\n /* @conditional-compile-remove(spotlight) */\n remoteVideoTileMenu,\n /* @conditional-compile-remove(spotlight) */\n strings,\n /* @conditional-compile-remove(spotlight) */\n drawerMenuHostId,\n reactionResources,\n videoTilesOptions\n ]);\n\n const onPinParticipant = useCallback(\n (userId: string) => {\n if (pinnedParticipants.length >= MAX_PINNED_REMOTE_VIDEO_TILES) {\n return;\n }\n if (!pinnedParticipantsState.includes(userId)) {\n setPinnedParticipantsState(pinnedParticipantsState.concat(userId));\n }\n onPinParticipantHandler?.(userId);\n },\n [pinnedParticipants.length, pinnedParticipantsState, setPinnedParticipantsState, onPinParticipantHandler]\n );\n const onUnpinParticipant = useCallback(\n (userId: string) => {\n setPinnedParticipantsState(pinnedParticipantsState.filter((p) => p !== userId));\n onUnpinParticipantHandler?.(userId);\n },\n [pinnedParticipantsState, setPinnedParticipantsState, onUnpinParticipantHandler]\n );\n\n const [announcementString, setAnnouncementString] = React.useState<string>('');\n /**\n * sets the announcement string for VideoGallery actions so that the screenreader will trigger\n */\n const toggleAnnouncerString = useCallback(\n (announcement: string) => {\n setAnnouncementString(announcement);\n /**\n * Clears the announcer string after VideoGallery action allowing it to be re-announced.\n */\n setTimeout(() => {\n setAnnouncementString('');\n }, 3000);\n },\n [setAnnouncementString]\n );\n\n const defaultOnRenderVideoTile = useCallback(\n (participant: VideoGalleryRemoteParticipant, isVideoParticipant?: boolean) => {\n const remoteVideoStream = participant.videoStream;\n const selectedScalingMode = remoteVideoStream ? selectedScalingModeState[participant.userId] : undefined;\n let isPinned = pinnedParticipants?.includes(participant.userId);\n /* @conditional-compile-remove(spotlight) */\n const isSpotlighted = !!participant.spotlight;\n /* @conditional-compile-remove(spotlight) */\n isPinned = isSpotlighted ? false : isPinned;\n\n const createViewOptions = (): VideoStreamOptions | undefined => {\n if (selectedScalingMode) {\n return selectedScalingMode;\n }\n return remoteVideoStream?.streamSize &&\n remoteVideoStream.streamSize?.height > remoteVideoStream.streamSize?.width\n ? ({\n scalingMode: 'Fit',\n isMirrored: remoteVideoViewOptions?.isMirrored\n } as VideoStreamOptions)\n : remoteVideoViewOptions;\n };\n\n return (\n <_RemoteVideoTile\n alwaysShowLabelBackground={videoTilesOptions?.alwaysShowLabelBackground}\n streamId={remoteVideoStream?.id}\n key={participant.userId}\n userId={participant.userId}\n remoteParticipant={participant}\n onCreateRemoteStreamView={isVideoParticipant ? onCreateRemoteStreamView : undefined}\n onDisposeRemoteStreamView={isVideoParticipant ? onDisposeRemoteVideoStreamView : undefined}\n isAvailable={isVideoParticipant ? remoteVideoStream?.isAvailable : false}\n isReceiving={isVideoParticipant ? remoteVideoStream?.isReceiving : false}\n renderElement={isVideoParticipant ? remoteVideoStream?.renderElement : undefined}\n remoteVideoViewOptions={createViewOptions()}\n onRenderAvatar={onRenderAvatar}\n showMuteIndicator={showMuteIndicator}\n strings={strings}\n /* @conditional-compile-remove(PSTN-calls) */\n participantState={participant.state}\n menuKind={\n participant.userId === localParticipant.userId\n ? undefined\n : remoteVideoTileMenu\n ? remoteVideoTileMenu.kind === 'drawer'\n ? 'drawer'\n : 'contextual'\n : undefined\n }\n drawerMenuHostId={drawerMenuHostId}\n onPinParticipant={onPinParticipant}\n onUnpinParticipant={onUnpinParticipant}\n onUpdateScalingMode={onUpdateScalingMode}\n isPinned={isPinned}\n disablePinMenuItem={pinnedParticipants.length >= MAX_PINNED_REMOTE_VIDEO_TILES}\n toggleAnnouncerString={toggleAnnouncerString}\n /* @conditional-compile-remove(spotlight) */\n spotlightedParticipantUserIds={spotlightedParticipants}\n /* @conditional-compile-remove(spotlight) */\n isSpotlighted={isSpotlighted}\n /* @conditional-compile-remove(spotlight) */\n onStartSpotlight={onStartRemoteSpotlight}\n /* @conditional-compile-remove(spotlight) */\n onStopSpotlight={onStopRemoteSpotlight}\n /* @conditional-compile-remove(spotlight) */\n maxParticipantsToSpotlight={maxParticipantsToSpotlight}\n reactionResources={reactionResources}\n />\n );\n },\n [\n onCreateRemoteStreamView,\n onDisposeRemoteVideoStreamView,\n remoteVideoViewOptions,\n localParticipant,\n onRenderAvatar,\n showMuteIndicator,\n strings,\n drawerMenuHostId,\n remoteVideoTileMenu,\n selectedScalingModeState,\n pinnedParticipants,\n onPinParticipant,\n onUnpinParticipant,\n toggleAnnouncerString,\n onUpdateScalingMode,\n /* @conditional-compile-remove(spotlight) */ spotlightedParticipants,\n /* @conditional-compile-remove(spotlight) */ onStartRemoteSpotlight,\n /* @conditional-compile-remove(spotlight) */ onStopRemoteSpotlight,\n /* @conditional-compile-remove(spotlight) */ maxParticipantsToSpotlight,\n reactionResources,\n videoTilesOptions\n ]\n );\n\n const screenShareParticipant = remoteParticipants.find((participant) => participant.screenShareStream?.isAvailable);\n\n const localScreenShareStreamComponent = <LocalScreenShare localParticipant={localParticipant} />;\n\n const remoteScreenShareComponent = screenShareParticipant && (\n <RemoteScreenShare\n {...screenShareParticipant}\n renderElement={screenShareParticipant.screenShareStream?.renderElement}\n onCreateRemoteStreamView={onCreateRemoteStreamView}\n onDisposeRemoteStreamView={onDisposeRemoteScreenShareStreamView}\n isReceiving={screenShareParticipant.screenShareStream?.isReceiving}\n participantVideoScalingMode={selectedScalingModeState[screenShareParticipant.userId]}\n localParticipant={localParticipant}\n remoteParticipants={remoteParticipants}\n reactionResources={reactionResources}\n isPPTLive={!screenShareParticipant.screenShareStream?.id}\n />\n );\n\n const screenShareComponent = remoteScreenShareComponent\n ? remoteScreenShareComponent\n : localParticipant.isScreenSharingOn\n ? localScreenShareStreamComponent\n : undefined;\n\n const layoutProps = useMemo<LayoutProps>(\n () => ({\n remoteParticipants,\n localParticipant,\n screenShareComponent,\n showCameraSwitcherInLocalPreview,\n maxRemoteVideoStreams,\n dominantSpeakers,\n styles,\n onRenderRemoteParticipant: onRenderRemoteVideoTile ?? defaultOnRenderVideoTile,\n localVideoComponent: localVideoTile,\n parentWidth: containerWidth,\n parentHeight: containerHeight,\n pinnedParticipantUserIds: pinnedParticipants,\n overflowGalleryPosition,\n localVideoTileSize,\n /* @conditional-compile-remove(spotlight) */ spotlightedParticipantUserIds: spotlightedParticipants\n }),\n [\n remoteParticipants,\n localParticipant,\n screenShareComponent,\n showCameraSwitcherInLocalPreview,\n maxRemoteVideoStreams,\n dominantSpeakers,\n styles,\n localVideoTile,\n containerWidth,\n containerHeight,\n onRenderRemoteVideoTile,\n defaultOnRenderVideoTile,\n pinnedParticipants,\n overflowGalleryPosition,\n localVideoTileSize,\n /* @conditional-compile-remove(spotlight) */ spotlightedParticipants\n ]\n );\n\n const videoGalleryLayout = useMemo(() => {\n if (screenShareParticipant && layout === 'focusedContent') {\n return <FocusedContentLayout {...layoutProps} />;\n }\n if (layout === 'floatingLocalVideo') {\n return <FloatingLocalVideoLayout {...layoutProps} />;\n }\n\n if (layout === 'speaker') {\n return <SpeakerVideoLayout {...layoutProps} />;\n }\n /* @conditional-compile-remove(large-gallery) */\n if (layout === 'largeGallery') {\n return <LargeGalleryLayout {...layoutProps} />;\n }\n return <DefaultLayout {...layoutProps} />;\n }, [layout, layoutProps, screenShareParticipant]);\n\n return (\n <div\n // We don't assign an drawer menu host id to the VideoGallery when a drawerMenuHostId is assigned from props\n id={drawerMenuHostIdFromProp ? undefined : drawerMenuHostId}\n data-ui-id={ids.videoGallery}\n ref={containerRef}\n className={mergeStyles(videoGalleryOuterDivStyle, styles?.root, unselectable)}\n >\n {videoGalleryLayout}\n <Announcer announcementString={announcementString} ariaLive=\"polite\" />\n </div>\n );\n};\n"]}
@@ -70,7 +70,6 @@ export const VideoTile = (props) => {
70
70
  const currentObserver = observer.current;
71
71
  return () => currentObserver.disconnect();
72
72
  }, [videoTileRef]);
73
- /* @conditional-compile-remove(ppt-live) */
74
73
  // TODO: Remove after calling sdk fix the keybaord focus
75
74
  useEffect(() => {
76
75
  // PPTLive display name is undefined, return as it is not screen share