@azure/communication-react 1.17.0-alpha-202405170014 → 1.17.0-alpha-202405220013
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dist-cjs/communication-react/{ChatMessageComponentAsRichTextEditBox-BLFNaheX.js → ChatMessageComponentAsRichTextEditBox-CDsn-zU7.js} +22 -17
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-CDsn-zU7.js.map +1 -0
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BhTpuspw.js → RichTextSendBoxWrapper-Dm4S2bpT.js} +6 -8
- package/dist/dist-cjs/communication-react/{RichTextSendBoxWrapper-BhTpuspw.js.map → RichTextSendBoxWrapper-Dm4S2bpT.js.map} +1 -1
- package/dist/dist-cjs/communication-react/{index-C9I6Mcil.js → index-DO36MBbq.js} +907 -480
- package/dist/dist-cjs/communication-react/index-DO36MBbq.js.map +1 -0
- package/dist/dist-cjs/communication-react/index.js +5 -7
- package/dist/dist-cjs/communication-react/index.js.map +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js +1 -1
- package/dist/dist-esm/acs-ui-common/src/telemetryVersion.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js +17 -10
- package/dist/dist-esm/react-components/src/components/ChatMessage/MyMessageComponents/ChatMessageComponentAsRichTextEditBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +1 -1
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/MessageStatusIcon.js +1 -3
- package/dist/dist-esm/react-components/src/components/MessageStatusIcon.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/ReactionButton.js +1 -1
- package/dist/dist-esm/react-components/src/components/ReactionButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.d.ts +9 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js +29 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/ContextMenuPlugin.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js +15 -20
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/CopyPastePlugin.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.d.ts +12 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js +23 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/KeyboardInputPlugin.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.d.ts +15 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js +39 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/PlaceholderPlugin.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.d.ts +24 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js +66 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/RichTextToolbarPlugin.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.d.ts +20 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js +46 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/TableEditContextMenuProvider.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.d.ts +29 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js +71 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Plugins/UpdateContentPlugin.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.d.ts +7 -10
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js +170 -91
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextEditor.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.d.ts +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js +29 -12
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextInputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js +12 -46
- package/dist/dist-esm/react-components/src/components/RichTextEditor/RichTextSendBox.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.d.ts +19 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js +209 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/RichTextToolbar.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.d.ts +7 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js +49 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTableCommandBarItem.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/{Buttons → Toolbar}/Table/RichTextInsertTablePane.d.ts +2 -2
- package/dist/dist-esm/react-components/src/components/RichTextEditor/{Buttons → Toolbar}/Table/RichTextInsertTablePane.js +3 -3
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextInsertTablePane.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.d.ts +6 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js +13 -0
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Toolbar/Table/RichTextToolbarTableIcon.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js +1 -1
- package/dist/dist-esm/react-components/src/components/TextFieldWithMention/TextFieldWithMention.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.d.ts +5 -7
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.d.ts +5 -3
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +2 -8
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js +3 -1
- package/dist/dist-esm/react-components/src/components/styles/MessageThread.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.d.ts +3 -3
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js +4 -5
- package/dist/dist-esm/react-components/src/components/styles/RichTextEditor.styles.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.d.ts +37 -0
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js +60 -0
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorUtils.js.map +1 -0
- package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.d.ts +11 -0
- package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js +95 -0
- package/dist/dist-esm/react-components/src/components/utils/RichTextTableUtils.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/utils.d.ts +1 -1
- package/dist/dist-esm/react-components/src/components/utils.js +1 -3
- package/dist/dist-esm/react-components/src/components/utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js +7 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/SidePane/useVideoEffectsPane.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.d.ts +4 -1
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js +3 -3
- package/dist/dist-esm/react-composites/src/composites/common/VideoEffectsPane.js.map +1 -1
- package/package.json +6 -8
- package/dist/dist-cjs/communication-react/ChatMessageComponentAsRichTextEditBox-BLFNaheX.js.map +0 -1
- package/dist/dist-cjs/communication-react/index-C9I6Mcil.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.d.ts +0 -7
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.js +0 -86
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/RichTextRibbonButtons.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.d.ts +0 -7
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.js +0 -55
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTableButton.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextInsertTablePane.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.d.ts +0 -8
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.js +0 -66
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/RichTextTableContextMenu.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/insertTableAction.d.ts +0 -9
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/insertTableAction.js +0 -56
- package/dist/dist-esm/react-components/src/components/RichTextEditor/Buttons/Table/insertTableAction.js.map +0 -1
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorStringsUtils.d.ts +0 -15
- package/dist/dist-esm/react-components/src/components/utils/RichTextEditorStringsUtils.js +0 -39
- 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;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,EAC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A0B,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/Text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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"]}
|
package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { IStyle } from '@fluentui/react';
|
2
|
+
import React from 'react';
|
3
3
|
import { _VideoEffectsItemProps } from './VideoEffectsItem';
|
4
4
|
/**
|
5
5
|
* Props for {@link _VideoBackgroundEffectsPicker}
|
@@ -40,13 +40,11 @@ export interface _VideoBackgroundEffectsPickerProps {
|
|
40
40
|
*/
|
41
41
|
styles?: _VideoBackgroundEffectsPickerStyles;
|
42
42
|
/**
|
43
|
-
*
|
44
|
-
* If not, jest tries to cleanup after the first render pass, but the component throws an error because
|
45
|
-
* it tries to display a tooltip after that render pass and after the component is cleaned up.
|
46
|
-
*
|
47
|
-
* This can be removed once: https://github.com/microsoft/fluentui/issues/30896 is fixed.
|
43
|
+
* Imperative handle for calling focus()
|
48
44
|
*/
|
49
|
-
|
45
|
+
componentRef?: React.RefObject<{
|
46
|
+
focus: () => void;
|
47
|
+
}>;
|
50
48
|
}
|
51
49
|
/**
|
52
50
|
* Option for the {@link _VideoBackgroundEffectsPicker}.
|
package/dist/dist-esm/react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.js
CHANGED
@@ -45,7 +45,7 @@ export const _VideoBackgroundEffectsPicker = (props) => {
|
|
45
45
|
return (React.createElement(Stack, { className: mergeStyles((_a = props.styles) === null || _a === void 0 ? void 0 : _a.rowRoot), wrap: props.itemsPerRow === 'wrap', horizontal: true, key: rowIndex, tokens: { childrenGap: '0.5rem' }, "data-ui-id": "video-effects-picker-row" },
|
46
46
|
options.map((option, i) => {
|
47
47
|
if (i === 0 && rowIndex === 0) {
|
48
|
-
return (React.createElement(_VideoEffectsItem, Object.assign({}, option, { itemKey: option.itemKey, key: option.itemKey,
|
48
|
+
return (React.createElement(_VideoEffectsItem, Object.assign({}, option, { itemKey: option.itemKey, key: option.itemKey, componentRef: props.componentRef })));
|
49
49
|
}
|
50
50
|
return React.createElement(_VideoEffectsItem, Object.assign({}, option, { itemKey: option.itemKey, key: option.itemKey }));
|
51
51
|
}),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VideoBackgroundEffectsPicker.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAA0B,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;
|
1
|
+
{"version":3,"file":"VideoBackgroundEffectsPicker.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoEffects/VideoBackgroundEffectsPicker.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAU,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAA0B,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,qCAAqC,EAAE,MAAM,2BAA2B,CAAC;AAkFlF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,KAAyC,EAAe,EAAE;;IACtG,MAAM,CAAC,oCAAoC,EAAE,uCAAuC,CAAC,GAAG,KAAK,CAAC,QAAQ,CAEpG,KAAK,CAAC,wBAAwB,CAAC,CAAC;IAElC,+EAA+E;IAC/E,WAAW,CAAC;QACV,IAAI,EAAE,8BAA8B;QACpC,KAAK;QACL,eAAe,EAAE;YACf,YAAY,EAAE,UAAU;YACxB,SAAS,EAAE,mBAAmB;YAC9B,gBAAgB,EAAE,0BAA0B;SAC7C;KACF,CAAC,CAAC;IAEH,MAAM,cAAc,GAAG,MAAA,KAAK,CAAC,iBAAiB,mCAAI,oCAAoC,CAAC;IACvF,MAAM,iBAAiB,GAAG,CAAC,iBAAyB,EAAQ,EAAE;;QAC5D,uCAAuC,CAAC,iBAAiB,CAAC,CAAC;QAC3D,MAAA,KAAK,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pC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;oBACzB,IAAI,CAAC,KAAK,CAAC,IAAI,QAAQ,KAAK,CAAC,EAAE,CAAC;wBAC9B,OAAO,CACL,oBAAC,iBAAiB,oBACZ,MAAM,IACV,OAAO,EAAE,MAAM,CAAC,OAAO,EACvB,GAAG,EAAE,MAAM,CAAC,OAAO,EACnB,YAAY,EAAE,KAAK,CAAC,YAAY,IAChC,CACH,CAAC;oBACJ,CAAC;oBACD,OAAO,oBAAC,iBAAiB,oBAAK,MAAM,IAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE,MAAM,CAAC,OAAO,IAAI,CAAC;gBACzF,CAAC,CAAC;gBACD,SAAS,GAAG,CAAC;oBACZ,QAAQ,KAAK,YAAY,CAAC,MAAM,GAAG,CAAC;oBACpC,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CAClD,oBAAC,KAAK,IACJ,GAAG,EAAE,KAAK,EACV,MAAM,EAAE,qCAAqC,gBAClC,2BAA2B,GACtC,CACH,CAAC,CACE,CACT,CAAA;SAAA,CAAC,CACI,CACT,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IStyle, Label, mergeStyles, Stack } from '@fluentui/react';\nimport { useWarnings } from '@fluentui/react-hooks';\nimport React from 'react';\nimport { chunk } from '../utils';\nimport { _VideoEffectsItem, _VideoEffectsItemProps } from './VideoEffectsItem';\nimport { hiddenVideoEffectsItemContainerStyles } from './VideoEffectsItem.styles';\n\n/**\n * Props for {@link _VideoBackgroundEffectsPicker}\n * @internal\n */\nexport interface _VideoBackgroundEffectsPickerProps {\n /**\n * The options to display in the picker.\n */\n options: _VideoBackgroundEffectChoiceOption[];\n\n /**\n * The key of the current selected Video Background Effect.\n * If you provide this, you must maintain selection state by observing onChange events and passing a new value in when changed.\n */\n selectedEffectKey?: string;\n\n /**\n * Callback to invoke when a Video Background Effect is selected.\n * @param effectKey - The key of the Video Background Effect that was selected.\n */\n onChange?: (effectKey: string) => void;\n\n /**\n * The key of the Video Background Effect that is initially selected.\n * Only provide this if the picker is an uncontrolled component;\n * otherwise, use the `selectedEffectKey` property.\n */\n defaultSelectedEffectKey?: string;\n\n /**\n * The label to display for the picker.\n */\n label?: string;\n\n /**\n * The number of items to display per row.\n * @default 3\n */\n itemsPerRow?: 'wrap' | number;\n\n /**\n * Styles for the picker.\n */\n styles?: _VideoBackgroundEffectsPickerStyles;\n\n /**\n * Imperative handle for calling focus()\n */\n componentRef?: React.RefObject<{\n focus: () => void;\n }>;\n}\n\n/**\n * Option for the {@link _VideoBackgroundEffectsPicker}.\n * @internal\n */\nexport type _VideoBackgroundEffectChoiceOption = _VideoEffectsItemProps;\n\n/**\n * Styles for the {@link _VideoBackgroundEffectsPicker}.\n * @internal\n */\nexport interface _VideoBackgroundEffectsPickerStyles {\n /**\n * Styles for the root element.\n */\n root?: IStyle;\n\n /**\n * Styles for the label.\n */\n label?: IStyle;\n\n /**\n * Styles for the root of each row element.\n */\n rowRoot?: IStyle;\n}\n\n/**\n * Picker for choosing a Video Background Effect.\n *\n * @remarks\n * This functions similar to a radio group of buttons, where the user can select one of the options.\n *\n * @internal\n */\nexport const _VideoBackgroundEffectsPicker = (props: _VideoBackgroundEffectsPickerProps): JSX.Element => {\n const [componentControlledSelectedEffectKey, setComponentControlledSelectedEffectKey] = React.useState<\n string | undefined\n >(props.defaultSelectedEffectKey);\n\n // Warn the developer if they use the component in an incorrect controlled way.\n useWarnings({\n name: 'VideoBackgroundEffectsPicker',\n props,\n controlledUsage: {\n onChangeProp: 'onChange',\n valueProp: 'selectedEffectKey',\n defaultValueProp: 'defaultSelectedEffectKey'\n }\n });\n\n const selectedEffect = props.selectedEffectKey ?? componentControlledSelectedEffectKey;\n const setSelectedEffect = (selectedEffectKey: string): void => {\n setComponentControlledSelectedEffectKey(selectedEffectKey);\n props.onChange?.(selectedEffectKey);\n };\n\n const convertedOptions: _VideoEffectsItemProps[] = props.options.map((option) => ({\n isSelected: option.itemKey === selectedEffect,\n onSelect: () => setSelectedEffect(option.itemKey),\n ...option\n }));\n\n const itemsPerRow = props.itemsPerRow ?? 3;\n const optionsByRow = itemsPerRow === 'wrap' ? [convertedOptions] : chunk(convertedOptions, itemsPerRow);\n\n // If the final row is not full, fill it with hidden items to ensure layout.\n const fillCount = itemsPerRow === 'wrap' ? 0 : itemsPerRow - optionsByRow[optionsByRow.length - 1].length;\n\n return (\n <Stack tokens={{ childrenGap: '0.5rem' }}>\n <Label className={mergeStyles(props.styles?.label)}>{props.label}</Label>\n {optionsByRow.map((options, rowIndex) => (\n <Stack\n className={mergeStyles(props.styles?.rowRoot)}\n wrap={props.itemsPerRow === 'wrap'}\n horizontal\n key={rowIndex}\n tokens={{ childrenGap: '0.5rem' }}\n data-ui-id=\"video-effects-picker-row\"\n >\n {options.map((option, i) => {\n if (i === 0 && rowIndex === 0) {\n return (\n <_VideoEffectsItem\n {...option}\n itemKey={option.itemKey}\n key={option.itemKey}\n componentRef={props.componentRef}\n />\n );\n }\n return <_VideoEffectsItem {...option} itemKey={option.itemKey} key={option.itemKey} />;\n })}\n {fillCount > 0 &&\n rowIndex === optionsByRow.length - 1 &&\n Array.from({ length: fillCount }).map((_, index) => (\n <Stack\n key={index}\n styles={hiddenVideoEffectsItemContainerStyles}\n data-ui-id=\"video-effects-hidden-item\"\n />\n ))}\n </Stack>\n ))}\n </Stack>\n );\n};\n"]}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
/// <reference types="react" />
|
2
1
|
import { IIconProps, IStyle, ITooltipHostProps } from '@fluentui/react';
|
2
|
+
import React from 'react';
|
3
3
|
/**
|
4
4
|
* Props for {@link _VideoEffectsItem}
|
5
5
|
*
|
@@ -60,9 +60,11 @@ export interface _VideoEffectsItemProps {
|
|
60
60
|
*/
|
61
61
|
styles?: _VideoEffectsItemStyles;
|
62
62
|
/**
|
63
|
-
*
|
63
|
+
* Imperative handle for calling focus()
|
64
64
|
*/
|
65
|
-
|
65
|
+
componentRef?: React.RefObject<{
|
66
|
+
focus: () => void;
|
67
|
+
}>;
|
66
68
|
}
|
67
69
|
/**
|
68
70
|
* Styles for {@link _VideoEffectsItem}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
// Copyright (c) Microsoft Corporation.
|
2
2
|
// Licensed under the MIT License.
|
3
3
|
import { DefaultButton, Icon, mergeStyles, Stack, Text, TooltipHost, useTheme } from '@fluentui/react';
|
4
|
-
import React, { useCallback
|
4
|
+
import React, { useCallback } from 'react';
|
5
5
|
import { videoEffectsItemContainerStyles } from './VideoEffectsItem.styles';
|
6
6
|
/**
|
7
7
|
* A component for displaying a Video Background Effect Option.
|
@@ -22,15 +22,9 @@ export const _VideoEffectsItem = (props) => {
|
|
22
22
|
disabled,
|
23
23
|
backgroundImage
|
24
24
|
}), [backgroundImage, disabled, isSelected, theme]);
|
25
|
-
const componentRef = React.createRef();
|
26
|
-
useEffect(() => {
|
27
|
-
if (props.focusOnMount && componentRef.current) {
|
28
|
-
componentRef.current.focus();
|
29
|
-
}
|
30
|
-
}, [componentRef, props.focusOnMount]);
|
31
25
|
return (React.createElement(TooltipHost, Object.assign({}, props.tooltipProps),
|
32
26
|
React.createElement(Stack, { key: props.itemKey, className: mergeStyles((_f = props.styles) === null || _f === void 0 ? void 0 : _f.root), verticalAlign: "center", horizontalAlign: "center", "data-ui-id": `video-effects-item`, "aria-label": (_g = props.ariaLabel) !== null && _g !== void 0 ? _g : props.itemKey, "aria-disabled": props.disabled },
|
33
|
-
React.createElement(DefaultButton, { styles: containerStyles(), onClick: disabled ? undefined : () => { var _a; return (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.itemKey); }, componentRef:
|
27
|
+
React.createElement(DefaultButton, { styles: containerStyles(), onClick: disabled ? undefined : () => { var _a; return (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.itemKey); }, componentRef: props.componentRef },
|
34
28
|
React.createElement(Stack, { horizontalAlign: 'center' },
|
35
29
|
props.iconProps && (React.createElement(Stack.Item, { className: iconContainerStyles },
|
36
30
|
React.createElement(Icon, Object.assign({}, props.iconProps)))),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"VideoEffectsItem.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoEffects/VideoEffectsItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,aAAa,EAEb,IAAI,EAIJ,WAAW,EACX,KAAK,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,
|
1
|
+
{"version":3,"file":"VideoEffectsItem.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/VideoEffects/VideoEffectsItem.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EACL,aAAa,EAEb,IAAI,EAIJ,WAAW,EACX,KAAK,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,EAAE,+BAA+B,EAAE,MAAM,2BAA2B,CAAC;AAqG5E;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAA6B,EAAe,EAAE;;IAC9E,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,UAAU,GAAG,MAAA,KAAK,CAAC,UAAU,mCAAI,KAAK,CAAC;IAC7C,MAAM,QAAQ,GAAG,MAAA,KAAK,CAAC,QAAQ,mCAAI,KAAK,CAAC;IACzC,MAAM,eAAe,GAAG,MAAA,KAAK,CAAC,eAAe,0CAAE,GAAG,CAAC;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d;oBACA,KAAK,CAAC,KAAK,IAAI,CACd,oBAAC,KAAK,CAAC,IAAI,IAAC,SAAS,EAAE,mBAAmB;wBACxC,oBAAC,IAAI,IAAC,OAAO,EAAC,OAAO,IAAE,KAAK,CAAC,KAAK,CAAQ,CAC/B,CACd,CACK,CACM,CACV,CACI,CACf,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport {\n DefaultButton,\n IButton,\n Icon,\n IIconProps,\n IStyle,\n ITooltipHostProps,\n mergeStyles,\n Stack,\n Text,\n TooltipHost,\n useTheme\n} from '@fluentui/react';\nimport React, { useCallback } from 'react';\nimport { videoEffectsItemContainerStyles } from './VideoEffectsItem.styles';\n\n/**\n * Props for {@link _VideoEffectsItem}\n *\n * @internal\n */\nexport interface _VideoEffectsItemProps {\n /**\n * The key of the Video Background Effect.\n * This is used to identify the Video Background Effect and is returned in the onChange event.\n * It must be unique within the set of options.\n * @example 'blur'\n */\n itemKey: string;\n\n /**\n * The text to display for the Video effects item.\n */\n title?: string;\n\n /**\n * Whether the Video effects item is currently in the selected state.\n * @default false\n */\n isSelected?: boolean;\n\n /**\n * Callback to invoke when the Video effects item is selected.\n */\n onSelect?: (key: string) => void;\n\n /**\n * Whether the Video effects item is disabled.\n * @default false\n */\n disabled?: boolean;\n\n /**\n * The icon to display for the Video effects item.\n * @default undefined (no icon)\n */\n iconProps?: IIconProps;\n\n /**\n * Properties to have a Tooltip display when hovering over the Video effects item.\n * @default undefined (no tooltip)\n */\n tooltipProps?: ITooltipHostProps;\n\n /**\n * Aria label for the Video effects item.\n */\n ariaLabel?: string;\n\n /**\n * Background to display for the Video effects item.\n * @default undefined (no background image)\n */\n backgroundProps?: {\n /**\n * The URL of the background image.\n */\n url: string;\n };\n\n /**\n * Styles for the Video effects item.\n */\n styles?: _VideoEffectsItemStyles;\n\n /**\n * Imperative handle for calling focus()\n */\n componentRef?: React.RefObject<{\n focus: () => void;\n }>;\n}\n\n/**\n * Styles for {@link _VideoEffectsItem}\n *\n * @internal\n */\nexport interface _VideoEffectsItemStyles {\n /**\n * Styles for the container of the Video effects item.\n */\n root: IStyle;\n\n /**\n * Styles for the container of the icon of the Video effects item.\n */\n iconContainer: IStyle;\n\n /**\n * Styles for the text container of the Video effects item.\n */\n textContainer: IStyle;\n}\n\n/**\n * A component for displaying a Video Background Effect Option.\n *\n * @internal\n */\nexport const _VideoEffectsItem = (props: _VideoEffectsItemProps): JSX.Element => {\n const theme = useTheme();\n const isSelected = props.isSelected ?? false;\n const disabled = props.disabled ?? false;\n const backgroundImage = props.backgroundProps?.url;\n const iconContainerStyles = mergeStyles({ height: '1.25rem' }, props.styles?.iconContainer);\n const textContainerStyles = mergeStyles({ height: '1.25rem' }, props.styles?.textContainer);\n\n const containerStyles = useCallback(\n () =>\n videoEffectsItemContainerStyles({\n theme,\n isSelected,\n disabled,\n backgroundImage\n }),\n [backgroundImage, disabled, isSelected, theme]\n );\n\n return (\n <TooltipHost {...props.tooltipProps}>\n <Stack\n key={props.itemKey}\n className={mergeStyles(props.styles?.root)}\n verticalAlign=\"center\"\n horizontalAlign=\"center\"\n data-ui-id={`video-effects-item`}\n aria-label={props.ariaLabel ?? props.itemKey}\n aria-disabled={props.disabled}\n >\n <DefaultButton\n styles={containerStyles()}\n onClick={disabled ? undefined : () => props.onSelect?.(props.itemKey)}\n componentRef={props.componentRef as React.RefObject<IButton>}\n >\n <Stack horizontalAlign={'center'}>\n {props.iconProps && (\n <Stack.Item className={iconContainerStyles}>\n <Icon {...props.iconProps} />\n </Stack.Item>\n )}\n {props.title && (\n <Stack.Item className={textContainerStyles}>\n <Text variant=\"small\">{props.title}</Text>\n </Stack.Item>\n )}\n </Stack>\n </DefaultButton>\n </Stack>\n </TooltipHost>\n );\n};\n"]}
|
@@ -176,7 +176,9 @@ export const useChatMessageStyles = makeStyles({
|
|
176
176
|
}, '& video': {
|
177
177
|
maxWidth: '100% !important', // Add !important to make sure it won't be overridden by style defined in element
|
178
178
|
height: 'auto !important'
|
179
|
-
}, '& p': Object.assign({}, shorthands.marginBlock('0.125rem')), '& blockquote': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ backgroundColor: tokens.colorBrandBackgroundInverted, clear: 'left', minHeight: '2.25rem', width: 'fit-content', marginTop: '7px', marginRight: '0px', marginLeft: '0px', marginBottom: '7px', paddingTop: '7px', paddingRight: '15px', paddingLeft: '15px', paddingBottom: '7px' }, shorthands.border('solid')), shorthands.borderRadius('4px')), shorthands.borderWidth('1px')), shorthands.borderColor(tokens.colorNeutralStroke1Selected)), { borderLeftWidth: '4px' })
|
179
|
+
}, '& p': Object.assign({}, shorthands.marginBlock('0.125rem')), '& blockquote': Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ backgroundColor: tokens.colorBrandBackgroundInverted, clear: 'left', minHeight: '2.25rem', width: 'fit-content', marginTop: '7px', marginRight: '0px', marginLeft: '0px', marginBottom: '7px', paddingTop: '7px', paddingRight: '15px', paddingLeft: '15px', paddingBottom: '7px' }, shorthands.border('solid')), shorthands.borderRadius('4px')), shorthands.borderWidth('1px')), shorthands.borderColor(tokens.colorNeutralStroke1Selected)), { borderLeftWidth: '4px' }), '& code': {
|
180
|
+
whiteSpace: 'pre-wrap'
|
181
|
+
} }),
|
180
182
|
bodyWithPlaceholderImage: {
|
181
183
|
'& img[src=""]': {
|
182
184
|
display: 'block',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MessageThread.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/MessageThread.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAiB,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAE5E,OAAO,EAAE,iCAAiC,EAAE,MAAM,iCAAiC,CAAC;AAEpF,OAAO,EAAE,6BAA6B,EAAE,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AAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;IACvC,WAAW,EAAE,OAAO;CACrB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IButtonStyles, mergeStyles } from '@fluentui/react';\nimport { makeStyles, shorthands, tokens } from '@fluentui/react-components';\nimport { CSSProperties } from 'react';\nimport { MESSAGE_STATUS_INDICATOR_SIZE_REM } from './MessageStatusIndicator.styles';\nimport { ComponentSlotStyle } from '../../types';\nimport { _ATTACHMENT_CARD_MARGIN_IN_PX, _ATTACHMENT_CARD_WIDTH_IN_REM } from './AttachmentCard.styles';\n\n// Minimum chat bubble width. This matches the minimum chat bubble width from FluentUI\n// that can contain a message and a timestamp.\nconst CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM = 6.25;\n\n// Chat messages should span just short of the width of the container.\n// When calculating the width of a message we also must take into account\n// the width of the avatar/gutter and the gap between the message and avatar/gutter.\nconst AVATAR_WIDTH_REM = 2;\nconst AVATAR_MARGIN_LEFT = 2.5;\nconst AVATAR_MESSAGE_GAP_REM = 0.125;\nconst MESSAGE_AMOUNT_OUT_FROM_EDGE_REM = 2;\n\n// Avatars should display on top of chat messages when the chat thread is narrow\nconst MESSAGE_AVATAR_OVERLAP_REM = 0.925;\nconst CHAT_MESSAGE_ZINDEX = 1;\nconst AVATAR_ZINDEX = 2;\n// new message button should be on top of chat message\nconst NEW_MESSAGE_BUTTON_ZINDEX = 2;\n\n/**\n * @private\n */\nexport const messageThreadContainerStyle = mergeStyles({\n height: '100%',\n width: '100%',\n maxHeight: '100%',\n overflow: 'auto',\n position: 'relative',\n alignSelf: 'center'\n});\n\n/**\n * @private\n */\nexport const messageThreadWrapperContainerStyle = mergeStyles({\n height: '100%',\n width: '100%',\n position: 'relative'\n});\n\n/**\n * @private\n */\nexport const noMessageStatusStyle = mergeStyles({\n // This should match the size of the message status indicator icon to ensure\n // multiple messages sent by the user are aligned correctly.\n width: `${MESSAGE_STATUS_INDICATOR_SIZE_REM}rem`\n});\n\n/**\n * @private\n */\nexport const useChatStyles = makeStyles({\n root: {\n // chat components sets max width value to 1056px, override it to 100%\n maxWidth: '100%',\n paddingTop: '0.8rem',\n paddingBottom: '0.5rem',\n paddingRight: '0.6rem',\n paddingLeft: '0.6rem',\n ...shorthands.border('none'),\n ...shorthands.overflow('auto'),\n // `height: 100%` ensures that the Chat component covers 100% of it's parents height\n // to prevent intermittent scrollbars when GIFs are present in the chat.\n height: '100%',\n\n '& a:link': {\n color: tokens.colorBrandForegroundLink\n },\n '& a:visited': {\n color: tokens.colorBrandForegroundLinkHover\n },\n '& a:hover': {\n color: tokens.colorBrandForegroundLinkHover\n }\n }\n});\n\n/**\n * @private\n */\nexport const useChatMessageRenderStyles = makeStyles({\n rootCommon: {\n '&:focus-visible': {\n ...shorthands.outline('0')\n }\n },\n rootMessage: {\n ...shorthands.padding('0'),\n ...shorthands.margin('0'),\n maxWidth: '100%',\n minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem`\n },\n rootMyMessage: {\n gridTemplateColumns: 'auto fit-content(0)',\n gridTemplateAreas: `\n \"body status\"\n `,\n columnGap: '0',\n gridGap: '0',\n ...shorthands.padding('0'),\n marginTop: '0',\n marginRight: '0',\n marginBottom: '0',\n marginLeft: '50px',\n width: `calc(100% - 50px)`\n },\n bodyCommon: {\n ...shorthands.padding('0'),\n marginRight: '0',\n marginBottom: '0',\n backgroundColor: 'transparent',\n maxWidth: '100%',\n minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem`\n },\n bodyMyMessage: {\n width: '100%',\n marginTop: '0'\n },\n bodyWithoutAvatar: {\n marginLeft: `${AVATAR_MARGIN_LEFT}rem`,\n marginTop: '0'\n },\n bodyWithAvatar: {\n marginLeft: `0`,\n marginTop: '0.75rem'\n },\n avatarNoOverlap: {\n width: `calc(100% - ${AVATAR_WIDTH_REM + MESSAGE_AMOUNT_OUT_FROM_EDGE_REM + AVATAR_MESSAGE_GAP_REM}rem)`\n },\n avatarOverlap: {\n width: `calc(100% - ${AVATAR_WIDTH_REM + MESSAGE_AMOUNT_OUT_FROM_EDGE_REM - MESSAGE_AVATAR_OVERLAP_REM}rem)`\n }\n});\n\n/**\n * @private\n */\nexport const useChatMyMessageStyles = makeStyles({\n root: {\n // The first column's width should be set to 1fr\n // because otherwise rich text editor's width will grow indefinitely\n gridTemplateColumns: '1fr auto',\n gridTemplateAreas: `\n \". actions\"\n \"body body\"\n `,\n gridGap: '0',\n columnGap: '0',\n paddingTop: '0',\n marginLeft: '0',\n '&:focus-visible': {\n ...shorthands.outline('0')\n }\n },\n body: {\n paddingBottom: '10px',\n marginTop: '1rem',\n maxWidth: '100%',\n minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem`,\n marginLeft: '0rem',\n // This makes message bubble show border in high contrast mode making each message distinguishable\n ...shorthands.border('1px', 'solid', 'transparent'),\n\n '&:hover ~ .fui-ChatMyMessage__actions': {\n visibility: 'visible'\n },\n '&:focus ~ .fui-ChatMyMessage__actions': {\n visibility: 'visible'\n },\n '& msft-mention': {\n color: tokens.colorStatusWarningBackground3,\n fontWeight: 600\n }\n },\n bodyAttached: {\n marginTop: '0.125rem'\n },\n menu: {\n boxShadow: tokens.shadow4,\n backgroundColor: tokens.colorNeutralBackground1,\n marginRight: '1px',\n position: 'absolute',\n top: '-2px',\n right: '0',\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n zIndex: 1,\n lineHeight: tokens.lineHeightBase100,\n visibility: 'hidden',\n\n '&:hover, &:focus': {\n cursor: 'pointer',\n visibility: 'visible'\n }\n },\n menuAttached: {\n top: '-18px'\n },\n menuHidden: {\n visibility: 'hidden'\n },\n menuVisible: {\n visibility: 'visible'\n },\n multipleAttachments: {\n width: '100%',\n maxWidth: `${(_ATTACHMENT_CARD_WIDTH_IN_REM + _ATTACHMENT_CARD_MARGIN_IN_PX) * 2}rem`\n }\n});\n\n/**\n * @private\n */\nexport const newMessageButtonContainerStyle = mergeStyles({\n position: 'absolute',\n zIndex: NEW_MESSAGE_BUTTON_ZINDEX,\n bottom: 0,\n right: '1.5rem'\n});\n\n/**\n * @private\n */\nexport const chatMessageDateStyle: CSSProperties = {\n fontWeight: 600\n};\n\n/**\n * @private\n */\nexport const useChatMessageStyles = makeStyles({\n root: {\n paddingTop: '0',\n '&:focus-visible': {\n ...shorthands.outline('0')\n }\n },\n body: {\n maxWidth: '100%',\n minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem`,\n marginRight: '0rem',\n paddingBottom: '10px',\n zIndex: CHAT_MESSAGE_ZINDEX,\n // This makes message bubble show border in high contrast mode making each message distinguishable\n ...shorthands.border('1px', 'solid', 'transparent'),\n '& > div:first-of-type': {\n flexWrap: 'wrap'\n },\n '& msft-mention': {\n color: tokens.colorStatusWarningBackground3,\n fontWeight: tokens.fontWeightSemibold\n },\n '& img': {\n maxWidth: '100% !important', // Add !important to make sure it won't be overridden by style defined in element\n height: 'auto !important'\n },\n '& video': {\n maxWidth: '100% !important', // Add !important to make sure it won't be overridden by style defined in element\n height: 'auto !important'\n },\n '& p': {\n // Deal with awkward padding seen in messages from Teams.\n // For more info see https://github.com/Azure/communication-ui-library/pull/1507\n ...shorthands.marginBlock('0.125rem')\n },\n '& blockquote': {\n backgroundColor: tokens.colorBrandBackgroundInverted,\n clear: 'left',\n minHeight: '2.25rem',\n width: 'fit-content',\n marginTop: '7px',\n marginRight: '0px',\n marginLeft: '0px',\n marginBottom: '7px',\n paddingTop: '7px',\n paddingRight: '15px',\n paddingLeft: '15px',\n paddingBottom: '7px',\n ...shorthands.border('solid'),\n ...shorthands.borderRadius('4px'),\n ...shorthands.borderWidth('1px'),\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n borderLeftWidth: '4px'\n }\n },\n bodyWithPlaceholderImage: {\n '& img[src=\"\"]': {\n display: 'block',\n position: 'relative',\n marginBottom: '5px'\n },\n '& img[src=\"\"]:after': {\n backgroundColor: tokens.colorNeutralBackground1Selected,\n content: `url(\"data:image/gif;base64,R0lGODlhAQABAAAAACw=\")`,\n backgroundSize: 'center',\n position: 'absolute',\n width: '100%',\n height: '100%',\n top: '0',\n left: '0',\n display: 'block'\n }\n },\n bodyWithoutAvatar: {\n marginTop: '0.125rem'\n },\n bodyWithAvatar: {\n marginTop: `0.375rem`\n },\n avatarNoOverlap: {\n marginLeft: `${-AVATAR_MARGIN_LEFT + AVATAR_MESSAGE_GAP_REM}rem`\n },\n avatarOverlap: {\n marginLeft: `${-AVATAR_MARGIN_LEFT - MESSAGE_AVATAR_OVERLAP_REM}rem`\n },\n multipleAttachments: {\n width: `${(_ATTACHMENT_CARD_WIDTH_IN_REM + _ATTACHMENT_CARD_MARGIN_IN_PX) * 2}rem`\n }\n});\n\n/**\n * @private\n */\nexport const useChatMessageCommonStyles = makeStyles({\n body: {\n '& table': {\n backgroundColor: tokens.colorBrandBackgroundInverted,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n borderCollapse: 'collapse',\n tableLayout: 'auto',\n width: '100%',\n\n '& tr': {\n ...shorthands.border('1px', 'solid', `${tokens.colorNeutralStroke1Selected}`),\n\n '& td': {\n ...shorthands.border('1px', 'solid', `${tokens.colorNeutralStroke1Selected}`),\n wordBreak: 'normal',\n paddingTop: '0px',\n paddingRight: '5px'\n }\n }\n }\n },\n failed: {\n //TODO: can we reuse a theme color here?\n backgroundColor: 'rgba(168, 0, 0, 0.2)'\n },\n blocked: {\n maxWidth: '100%',\n minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem`,\n marginRight: '0rem',\n color: tokens.colorNeutralForeground2,\n\n // This makes message bubble show border in high contrast mode making each message distinguishable\n ...shorthands.border('1px', 'solid', 'transparent'),\n '& i': {\n paddingTop: '0.25rem'\n },\n\n '& p': {\n // Deal with awkward padding seen in messages from Teams.\n // For more info see https://github.com/Azure/communication-ui-library/pull/1507\n ...shorthands.marginBlock('0.125rem'),\n paddingRight: '0.75rem',\n fontStyle: 'italic'\n },\n\n '& a': {\n ...shorthands.marginBlock('0.125rem'),\n fontStyle: 'normal',\n color: tokens.colorBrandForegroundLink,\n ...shorthands.textDecoration('none')\n }\n }\n});\n\n/**\n * @private\n */\nexport const gutterWithAvatar: ComponentSlotStyle = {\n paddingTop: '1.65rem',\n width: `${AVATAR_WIDTH_REM}rem`,\n position: 'relative',\n float: 'left',\n display: 'block',\n visibility: 'visible',\n zIndex: AVATAR_ZINDEX\n};\n\n/**\n * @private\n */\nexport const gutterWithHiddenAvatar: ComponentSlotStyle = {\n ...gutterWithAvatar,\n visibility: 'hidden',\n // we use this hidden avatar just as a width placeholder\n // the placeholder is needed for responsive bubble width\n height: 0\n};\n\n/**\n * @private\n */\nexport const newMessageButtonStyle = mergeStyles({\n float: 'right',\n width: 'fit-content'\n});\n\n/**\n * @private\n */\nexport const buttonWithIconStyles: IButtonStyles = {\n textContainer: {\n display: 'contents'\n }\n};\n\n/**\n * @private\n */\nexport const loadPreviousMessageButtonStyle = mergeStyles({\n border: 'none',\n minHeight: '1.5rem',\n '&:hover': { background: 'none' },\n '&:active': { background: 'none' }\n});\n\n/**\n * @private\n */\nexport const DownIconStyle = mergeStyles({\n marginRight: '0.5em'\n});\n"]}
|
1
|
+
{"version":3,"file":"MessageThread.styles.js","sourceRoot":"","sources":["../../../../../../../react-components/src/components/styles/MessageThread.styles.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;AAElC,OAAO,EAAiB,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAE5E,OAAO,EAAE,iCAAiC,EAAE,MAAM,iCAAiC,CAAC;AAEpF,OAAO,EAAE,6BAA6B,EAAE,6BAA6B,EAAE,MAAM,yBAAyB,CAAC;AAEvG,sFAAsF;AACtF,8CAA8C;AAC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;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CAAC;IACvC,WAAW,EAAE,OAAO;CACrB,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT License.\n\nimport { IButtonStyles, mergeStyles } from '@fluentui/react';\nimport { makeStyles, shorthands, tokens } from '@fluentui/react-components';\nimport { CSSProperties } from 'react';\nimport { MESSAGE_STATUS_INDICATOR_SIZE_REM } from './MessageStatusIndicator.styles';\nimport { ComponentSlotStyle } from '../../types';\nimport { _ATTACHMENT_CARD_MARGIN_IN_PX, _ATTACHMENT_CARD_WIDTH_IN_REM } from './AttachmentCard.styles';\n\n// Minimum chat bubble width. This matches the minimum chat bubble width from FluentUI\n// that can contain a message and a timestamp.\nconst CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM = 6.25;\n\n// Chat messages should span just short of the width of the container.\n// When calculating the width of a message we also must take into account\n// the width of the avatar/gutter and the gap between the message and avatar/gutter.\nconst AVATAR_WIDTH_REM = 2;\nconst AVATAR_MARGIN_LEFT = 2.5;\nconst AVATAR_MESSAGE_GAP_REM = 0.125;\nconst MESSAGE_AMOUNT_OUT_FROM_EDGE_REM = 2;\n\n// Avatars should display on top of chat messages when the chat thread is narrow\nconst MESSAGE_AVATAR_OVERLAP_REM = 0.925;\nconst CHAT_MESSAGE_ZINDEX = 1;\nconst AVATAR_ZINDEX = 2;\n// new message button should be on top of chat message\nconst NEW_MESSAGE_BUTTON_ZINDEX = 2;\n\n/**\n * @private\n */\nexport const messageThreadContainerStyle = mergeStyles({\n height: '100%',\n width: '100%',\n maxHeight: '100%',\n overflow: 'auto',\n position: 'relative',\n alignSelf: 'center'\n});\n\n/**\n * @private\n */\nexport const messageThreadWrapperContainerStyle = mergeStyles({\n height: '100%',\n width: '100%',\n position: 'relative'\n});\n\n/**\n * @private\n */\nexport const noMessageStatusStyle = mergeStyles({\n // This should match the size of the message status indicator icon to ensure\n // multiple messages sent by the user are aligned correctly.\n width: `${MESSAGE_STATUS_INDICATOR_SIZE_REM}rem`\n});\n\n/**\n * @private\n */\nexport const useChatStyles = makeStyles({\n root: {\n // chat components sets max width value to 1056px, override it to 100%\n maxWidth: '100%',\n paddingTop: '0.8rem',\n paddingBottom: '0.5rem',\n paddingRight: '0.6rem',\n paddingLeft: '0.6rem',\n ...shorthands.border('none'),\n ...shorthands.overflow('auto'),\n // `height: 100%` ensures that the Chat component covers 100% of it's parents height\n // to prevent intermittent scrollbars when GIFs are present in the chat.\n height: '100%',\n\n '& a:link': {\n color: tokens.colorBrandForegroundLink\n },\n '& a:visited': {\n color: tokens.colorBrandForegroundLinkHover\n },\n '& a:hover': {\n color: tokens.colorBrandForegroundLinkHover\n }\n }\n});\n\n/**\n * @private\n */\nexport const useChatMessageRenderStyles = makeStyles({\n rootCommon: {\n '&:focus-visible': {\n ...shorthands.outline('0')\n }\n },\n rootMessage: {\n ...shorthands.padding('0'),\n ...shorthands.margin('0'),\n maxWidth: '100%',\n minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem`\n },\n rootMyMessage: {\n gridTemplateColumns: 'auto fit-content(0)',\n gridTemplateAreas: `\n \"body status\"\n `,\n columnGap: '0',\n gridGap: '0',\n ...shorthands.padding('0'),\n marginTop: '0',\n marginRight: '0',\n marginBottom: '0',\n marginLeft: '50px',\n width: `calc(100% - 50px)`\n },\n bodyCommon: {\n ...shorthands.padding('0'),\n marginRight: '0',\n marginBottom: '0',\n backgroundColor: 'transparent',\n maxWidth: '100%',\n minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem`\n },\n bodyMyMessage: {\n width: '100%',\n marginTop: '0'\n },\n bodyWithoutAvatar: {\n marginLeft: `${AVATAR_MARGIN_LEFT}rem`,\n marginTop: '0'\n },\n bodyWithAvatar: {\n marginLeft: `0`,\n marginTop: '0.75rem'\n },\n avatarNoOverlap: {\n width: `calc(100% - ${AVATAR_WIDTH_REM + MESSAGE_AMOUNT_OUT_FROM_EDGE_REM + AVATAR_MESSAGE_GAP_REM}rem)`\n },\n avatarOverlap: {\n width: `calc(100% - ${AVATAR_WIDTH_REM + MESSAGE_AMOUNT_OUT_FROM_EDGE_REM - MESSAGE_AVATAR_OVERLAP_REM}rem)`\n }\n});\n\n/**\n * @private\n */\nexport const useChatMyMessageStyles = makeStyles({\n root: {\n // The first column's width should be set to 1fr\n // because otherwise rich text editor's width will grow indefinitely\n gridTemplateColumns: '1fr auto',\n gridTemplateAreas: `\n \". actions\"\n \"body body\"\n `,\n gridGap: '0',\n columnGap: '0',\n paddingTop: '0',\n marginLeft: '0',\n '&:focus-visible': {\n ...shorthands.outline('0')\n }\n },\n body: {\n paddingBottom: '10px',\n marginTop: '1rem',\n maxWidth: '100%',\n minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem`,\n marginLeft: '0rem',\n // This makes message bubble show border in high contrast mode making each message distinguishable\n ...shorthands.border('1px', 'solid', 'transparent'),\n\n '&:hover ~ .fui-ChatMyMessage__actions': {\n visibility: 'visible'\n },\n '&:focus ~ .fui-ChatMyMessage__actions': {\n visibility: 'visible'\n },\n '& msft-mention': {\n color: tokens.colorStatusWarningBackground3,\n fontWeight: 600\n }\n },\n bodyAttached: {\n marginTop: '0.125rem'\n },\n menu: {\n boxShadow: tokens.shadow4,\n backgroundColor: tokens.colorNeutralBackground1,\n marginRight: '1px',\n position: 'absolute',\n top: '-2px',\n right: '0',\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n zIndex: 1,\n lineHeight: tokens.lineHeightBase100,\n visibility: 'hidden',\n\n '&:hover, &:focus': {\n cursor: 'pointer',\n visibility: 'visible'\n }\n },\n menuAttached: {\n top: '-18px'\n },\n menuHidden: {\n visibility: 'hidden'\n },\n menuVisible: {\n visibility: 'visible'\n },\n multipleAttachments: {\n width: '100%',\n maxWidth: `${(_ATTACHMENT_CARD_WIDTH_IN_REM + _ATTACHMENT_CARD_MARGIN_IN_PX) * 2}rem`\n }\n});\n\n/**\n * @private\n */\nexport const newMessageButtonContainerStyle = mergeStyles({\n position: 'absolute',\n zIndex: NEW_MESSAGE_BUTTON_ZINDEX,\n bottom: 0,\n right: '1.5rem'\n});\n\n/**\n * @private\n */\nexport const chatMessageDateStyle: CSSProperties = {\n fontWeight: 600\n};\n\n/**\n * @private\n */\nexport const useChatMessageStyles = makeStyles({\n root: {\n paddingTop: '0',\n '&:focus-visible': {\n ...shorthands.outline('0')\n }\n },\n body: {\n maxWidth: '100%',\n minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem`,\n marginRight: '0rem',\n paddingBottom: '10px',\n zIndex: CHAT_MESSAGE_ZINDEX,\n // This makes message bubble show border in high contrast mode making each message distinguishable\n ...shorthands.border('1px', 'solid', 'transparent'),\n '& > div:first-of-type': {\n flexWrap: 'wrap'\n },\n '& msft-mention': {\n color: tokens.colorStatusWarningBackground3,\n fontWeight: tokens.fontWeightSemibold\n },\n '& img': {\n maxWidth: '100% !important', // Add !important to make sure it won't be overridden by style defined in element\n height: 'auto !important'\n },\n '& video': {\n maxWidth: '100% !important', // Add !important to make sure it won't be overridden by style defined in element\n height: 'auto !important'\n },\n '& p': {\n // Deal with awkward padding seen in messages from Teams.\n // For more info see https://github.com/Azure/communication-ui-library/pull/1507\n ...shorthands.marginBlock('0.125rem')\n },\n '& blockquote': {\n backgroundColor: tokens.colorBrandBackgroundInverted,\n clear: 'left',\n minHeight: '2.25rem',\n width: 'fit-content',\n marginTop: '7px',\n marginRight: '0px',\n marginLeft: '0px',\n marginBottom: '7px',\n paddingTop: '7px',\n paddingRight: '15px',\n paddingLeft: '15px',\n paddingBottom: '7px',\n ...shorthands.border('solid'),\n ...shorthands.borderRadius('4px'),\n ...shorthands.borderWidth('1px'),\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n borderLeftWidth: '4px'\n },\n '& code': {\n whiteSpace: 'pre-wrap'\n }\n },\n bodyWithPlaceholderImage: {\n '& img[src=\"\"]': {\n display: 'block',\n position: 'relative',\n marginBottom: '5px'\n },\n '& img[src=\"\"]:after': {\n backgroundColor: tokens.colorNeutralBackground1Selected,\n content: `url(\"data:image/gif;base64,R0lGODlhAQABAAAAACw=\")`,\n backgroundSize: 'center',\n position: 'absolute',\n width: '100%',\n height: '100%',\n top: '0',\n left: '0',\n display: 'block'\n }\n },\n bodyWithoutAvatar: {\n marginTop: '0.125rem'\n },\n bodyWithAvatar: {\n marginTop: `0.375rem`\n },\n avatarNoOverlap: {\n marginLeft: `${-AVATAR_MARGIN_LEFT + AVATAR_MESSAGE_GAP_REM}rem`\n },\n avatarOverlap: {\n marginLeft: `${-AVATAR_MARGIN_LEFT - MESSAGE_AVATAR_OVERLAP_REM}rem`\n },\n multipleAttachments: {\n width: `${(_ATTACHMENT_CARD_WIDTH_IN_REM + _ATTACHMENT_CARD_MARGIN_IN_PX) * 2}rem`\n }\n});\n\n/**\n * @private\n */\nexport const useChatMessageCommonStyles = makeStyles({\n body: {\n '& table': {\n backgroundColor: tokens.colorBrandBackgroundInverted,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Selected),\n borderCollapse: 'collapse',\n tableLayout: 'auto',\n width: '100%',\n\n '& tr': {\n ...shorthands.border('1px', 'solid', `${tokens.colorNeutralStroke1Selected}`),\n\n '& td': {\n ...shorthands.border('1px', 'solid', `${tokens.colorNeutralStroke1Selected}`),\n wordBreak: 'normal',\n paddingTop: '0px',\n paddingRight: '5px'\n }\n }\n }\n },\n failed: {\n //TODO: can we reuse a theme color here?\n backgroundColor: 'rgba(168, 0, 0, 0.2)'\n },\n blocked: {\n maxWidth: '100%',\n minWidth: `${CHAT_MESSAGE_CONTAINER_MIN_WIDTH_REM}rem`,\n marginRight: '0rem',\n color: tokens.colorNeutralForeground2,\n\n // This makes message bubble show border in high contrast mode making each message distinguishable\n ...shorthands.border('1px', 'solid', 'transparent'),\n '& i': {\n paddingTop: '0.25rem'\n },\n\n '& p': {\n // Deal with awkward padding seen in messages from Teams.\n // For more info see https://github.com/Azure/communication-ui-library/pull/1507\n ...shorthands.marginBlock('0.125rem'),\n paddingRight: '0.75rem',\n fontStyle: 'italic'\n },\n\n '& a': {\n ...shorthands.marginBlock('0.125rem'),\n fontStyle: 'normal',\n color: tokens.colorBrandForegroundLink,\n ...shorthands.textDecoration('none')\n }\n }\n});\n\n/**\n * @private\n */\nexport const gutterWithAvatar: ComponentSlotStyle = {\n paddingTop: '1.65rem',\n width: `${AVATAR_WIDTH_REM}rem`,\n position: 'relative',\n float: 'left',\n display: 'block',\n visibility: 'visible',\n zIndex: AVATAR_ZINDEX\n};\n\n/**\n * @private\n */\nexport const gutterWithHiddenAvatar: ComponentSlotStyle = {\n ...gutterWithAvatar,\n visibility: 'hidden',\n // we use this hidden avatar just as a width placeholder\n // the placeholder is needed for responsive bubble width\n height: 0\n};\n\n/**\n * @private\n */\nexport const newMessageButtonStyle = mergeStyles({\n float: 'right',\n width: 'fit-content'\n});\n\n/**\n * @private\n */\nexport const buttonWithIconStyles: IButtonStyles = {\n textContainer: {\n display: 'contents'\n }\n};\n\n/**\n * @private\n */\nexport const loadPreviousMessageButtonStyle = mergeStyles({\n border: 'none',\n minHeight: '1.5rem',\n '&:hover': { background: 'none' },\n '&:active': { background: 'none' }\n});\n\n/**\n * @private\n */\nexport const DownIconStyle = mergeStyles({\n marginRight: '0.5em'\n});\n"]}
|
@@ -30,11 +30,11 @@ export declare const ribbonOverflowButtonStyle: (theme: Theme) => Partial<IConte
|
|
30
30
|
/**
|
31
31
|
* @private
|
32
32
|
*/
|
33
|
-
export declare const
|
33
|
+
export declare const toolbarButtonStyle: (theme: Theme) => Partial<IButtonStyles>;
|
34
34
|
/**
|
35
35
|
* @private
|
36
36
|
*/
|
37
|
-
export declare const
|
37
|
+
export declare const toolbarTableButtonStyle: (theme: Theme) => Partial<IButtonStyles>;
|
38
38
|
/**
|
39
39
|
* @private
|
40
40
|
*/
|
@@ -42,7 +42,7 @@ export declare const ribbonDividerStyle: (theme: Theme) => string;
|
|
42
42
|
/**
|
43
43
|
* @private
|
44
44
|
*/
|
45
|
-
export declare const
|
45
|
+
export declare const richTextToolbarStyle: Partial<ICommandBarStyles>;
|
46
46
|
/**
|
47
47
|
* @private
|
48
48
|
*/
|