@azure/communication-react 1.5.1-alpha-202305170014 → 1.5.1-alpha-202305190012
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/communication-react.d.ts +4 -2
- package/dist/dist-cjs/communication-react/index.js +802 -568
- 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/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js +4 -4
- package/dist/dist-esm/calling-stateful-client/src/LocalVideoStreamVideoEffectsSubscriber.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/CameraButton.js +5 -3
- package/dist/dist-esm/react-components/src/components/CameraButton.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js +564 -364
- package/dist/dist-esm/react-components/src/components/InputBoxComponent.js.map +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js +1 -1
- package/dist/dist-esm/react-components/src/components/VideoEffects/VideoEffectsItem.js.map +1 -1
- package/dist/dist-esm/react-components/src/localization/locales/de-DE/strings.json +7 -2
- package/dist/dist-esm/react-components/src/localization/locales/en-GB/strings.json +7 -2
- package/dist/dist-esm/react-components/src/localization/locales/es-ES/strings.json +7 -2
- package/dist/dist-esm/react-components/src/localization/locales/fr-FR/strings.json +7 -2
- package/dist/dist-esm/react-components/src/localization/locales/it-IT/strings.json +7 -2
- package/dist/dist-esm/react-components/src/localization/locales/ja-JP/strings.json +7 -2
- package/dist/dist-esm/react-components/src/localization/locales/ko-KR/strings.json +7 -2
- package/dist/dist-esm/react-components/src/localization/locales/nl-NL/strings.json +7 -2
- package/dist/dist-esm/react-components/src/localization/locales/pt-BR/strings.json +7 -2
- package/dist/dist-esm/react-components/src/localization/locales/ru-RU/strings.json +7 -2
- package/dist/dist-esm/react-components/src/localization/locales/tr-TR/strings.json +7 -2
- package/dist/dist-esm/react-components/src/localization/locales/zh-CN/strings.json +7 -2
- package/dist/dist-esm/react-components/src/localization/locales/zh-TW/strings.json +7 -2
- package/dist/dist-esm/react-components/src/theming/icons.d.ts +2 -1
- package/dist/dist-esm/react-components/src/theming/icons.js +4 -2
- package/dist/dist-esm/react-components/src/theming/icons.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js +20 -4
- package/dist/dist-esm/react-composites/src/composites/CallComposite/adapter/AzureCommunicationCallAdapter.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.d.ts +1 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js +9 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/components/LocalDeviceSettings.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js +3 -11
- package/dist/dist-esm/react-composites/src/composites/CallComposite/pages/ConfigurationPage.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.d.ts +2 -0
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js +24 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/styles/CallConfiguration.styles.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.d.ts +9 -5
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js +15 -18
- package/dist/dist-esm/react-composites/src/composites/CallComposite/utils/Utils.js.map +1 -1
- package/dist/dist-esm/react-composites/src/composites/common/icons.d.ts +2 -1
- package/dist/dist-esm/react-composites/src/composites/localization/locales/de-DE/strings.json +5 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/en-GB/strings.json +5 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/es-ES/strings.json +5 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/fr-FR/strings.json +5 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/it-IT/strings.json +5 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ja-JP/strings.json +5 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ko-KR/strings.json +5 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/nl-NL/strings.json +5 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/pt-BR/strings.json +5 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/ru-RU/strings.json +5 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/tr-TR/strings.json +5 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-CN/strings.json +5 -0
- package/dist/dist-esm/react-composites/src/composites/localization/locales/zh-TW/strings.json +5 -0
- package/package.json +10 -10
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"InputBoxComponent.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/InputBoxComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAwB,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACnF,0CAA0C;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,0CAA0C;AAC1C,OAAO,EAAoB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EACL,KAAK,EACL,SAAS,EACT,WAAW,EAGX,eAAe,EACf,UAAU,EACV,WAAW,EAEZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,aAAa,EACb,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,EACvB,gBAAgB,EACjB,MAAM,kCAAkC,CAAC;AAC1C,0CAA0C;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,E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CAAC,GAAG,CAAC,CAAC;SAC7B;KACF;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useState, ReactNode, FormEvent, useCallback, useRef } from 'react';\n/* @conditional-compile-remove(mention) */\nimport { useEffect } from 'react';\n/* @conditional-compile-remove(mention) */\nimport { ComponentStrings, useLocale } from '../localization';\n\nimport {\n Stack,\n TextField,\n mergeStyles,\n IStyle,\n ITextField,\n concatStyleSets,\n IconButton,\n TooltipHost,\n ICalloutContentStyles\n} from '@fluentui/react';\nimport { BaseCustomStyles } from '../types';\nimport {\n inputBoxStyle,\n inputBoxWrapperStyle,\n inputButtonStyle,\n textFieldStyle,\n textContainerStyle,\n newLineButtonsContainerStyle,\n inputBoxNewLineSpaceAffordance,\n inputButtonTooltipStyle,\n iconWrapperStyle\n} from './styles/InputBoxComponent.style';\n/* @conditional-compile-remove(mention) */\nimport { Caret } from 'textarea-caret-ts';\nimport { isDarkThemed } from '../theming/themeUtils';\nimport { useTheme } from '../theming';\n/* @conditional-compile-remove(mention) */\nimport { MentionLookupOptions, _MentionPopover, Mention } from './MentionPopover';\n/* @conditional-compile-remove(mention) */\nimport { useDebouncedCallback } from 'use-debounce';\n/* @conditional-compile-remove(mention) */\nconst defaultMentionTrigger = '@';\n/**\n * @private\n */\nexport interface InputBoxStylesProps extends BaseCustomStyles {\n /** Styles for the text field. */\n textField?: IStyle;\n\n /** Styles for the system message; These styles will be ignored when a custom system message component is provided. */\n systemMessage?: IStyle;\n\n /** Styles for customizing the container of the text field */\n textFieldContainer?: IStyle;\n}\n\ntype InputBoxComponentProps = {\n children: ReactNode;\n /**\n * Inline child elements passed in. Setting to false will mean they are on a new line.\n */\n inlineChildren: boolean;\n 'data-ui-id'?: string;\n id?: string;\n textValue: string; // This could be plain text or HTML.\n onChange: (event?: FormEvent<HTMLInputElement | HTMLTextAreaElement>, newValue?: string) => void;\n textFieldRef?: React.RefObject<ITextField>;\n inputClassName?: string;\n placeholderText?: string;\n supportNewline?: boolean;\n maxLength: number;\n onKeyDown?: (ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;\n onEnterKeyDown?: () => void;\n errorMessage?: string | React.ReactElement;\n disabled?: boolean;\n styles?: InputBoxStylesProps;\n autoFocus?: 'sendBoxTextField';\n /* @conditional-compile-remove(mention) */\n mentionLookupOptions?: MentionLookupOptions;\n};\n\n/**\n * @private\n */\nexport const InputBoxComponent = (props: InputBoxComponentProps): JSX.Element => {\n const {\n styles,\n id,\n 'data-ui-id': dataUiId,\n textValue,\n onChange,\n textFieldRef,\n placeholderText,\n onKeyDown,\n onEnterKeyDown,\n supportNewline,\n inputClassName,\n errorMessage,\n disabled,\n children,\n /* @conditional-compile-remove(mention) */\n mentionLookupOptions\n } = props;\n const inputBoxRef = useRef<HTMLDivElement>(null);\n\n /* @conditional-compile-remove(mention) */\n // Current suggestion list, provided by the callback\n const [mentionSuggestions, setMentionSuggestions] = useState<Mention[]>([]);\n /* @conditional-compile-remove(mention) */\n // Current suggestion list, provided by the callback\n const [activeSuggestionIndex, setActiveSuggestionIndex] = useState<number | undefined>(undefined);\n\n /* @conditional-compile-remove(mention) */\n // Index of the current trigger character in the text field\n const [currentTriggerStartIndex, setCurrentTriggerStartIndex] = useState<number>(-1);\n /* @conditional-compile-remove(mention) */\n const [inputTextValue, setInputTextValue] = useState<string>('');\n /* @conditional-compile-remove(mention) */\n const [tagsValue, setTagsValue] = useState<TagData[]>([]);\n /* @conditional-compile-remove(mention) */\n const [selectionStartValue, setSelectionStartValue] = useState<number | null>(null);\n /* @conditional-compile-remove(mention) */\n const [selectionEndValue, setSelectionEndValue] = useState<number | null>(null);\n /* @conditional-compile-remove(mention) */\n const [shouldHandleOnMouseDownDuringSelect, setShouldHandleOnMouseDownDuringSelect] = useState<boolean>(true);\n\n /* @conditional-compile-remove(mention) */\n // Caret position in the text field\n const [caretPosition, setCaretPosition] = useState<Caret.Position | undefined>(undefined);\n /* @conditional-compile-remove(mention) */\n // Index of where the caret is in the text field\n const [caretIndex, setCaretIndex] = useState<number | undefined>(undefined);\n /* @conditional-compile-remove(mention) */\n const localeStrings = useLocale().strings;\n\n /* @conditional-compile-remove(mention) */\n const updateMentionSuggestions = useCallback(\n (suggestions: Mention[]) => {\n setMentionSuggestions(suggestions);\n if (caretIndex !== undefined) {\n textFieldRef?.current?.setSelectionEnd(caretIndex);\n }\n },\n [textFieldRef, caretIndex]\n );\n\n /* @conditional-compile-remove(mention) */\n // Parse the text and get the plain text version to display in the input box\n useEffect(() => {\n const trigger = mentionLookupOptions?.trigger || defaultMentionTrigger;\n const [tags, plainText] = textToTagParser(textValue, trigger);\n setInputTextValue(plainText);\n setTagsValue(tags);\n updateMentionSuggestions([]);\n }, [textValue, mentionLookupOptions?.trigger, updateMentionSuggestions]);\n\n const mergedRootStyle = mergeStyles(inputBoxWrapperStyle, styles?.root);\n const mergedTextFiledStyle = mergeStyles(\n inputBoxStyle,\n inputClassName,\n props.inlineChildren ? {} : inputBoxNewLineSpaceAffordance\n );\n\n const mergedTextContainerStyle = mergeStyles(textContainerStyle, styles?.textFieldContainer);\n const mergedTextFieldStyle = concatStyleSets(textFieldStyle, {\n fieldGroup: styles?.textField,\n errorMessage: styles?.systemMessage,\n suffix: {\n backgroundColor: 'transparent',\n // Remove empty space in the suffix area when adding newline-style buttons\n display: props.inlineChildren ? 'flex' : 'contents',\n padding: '0 0.25rem'\n }\n });\n\n const mergedChildrenStyle = mergeStyles(props.inlineChildren ? {} : newLineButtonsContainerStyle);\n\n /* @conditional-compile-remove(mention) */\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 newPlainText =\n inputTextValue.substring(0, currentTriggerStartIndex) + mention + inputTextValue.substring(selectionEnd);\n const triggerText = mentionLookupOptions?.trigger ?? defaultMentionTrigger;\n // update html text with updated plain text\n const [updatedHTML] = updateHTML(\n textValue,\n oldPlainText,\n newPlainText,\n tagsValue,\n currentTriggerStartIndex,\n selectionEnd,\n mention,\n triggerText\n );\n const displayName = getDisplayNameForMentionSuggestion(suggestion, localeStrings);\n // Move the caret in the text field to the end of the mention plain text\n setCaretIndex(selectionEnd + displayName.length);\n setCurrentTriggerStartIndex(-1);\n updateMentionSuggestions([]);\n setActiveSuggestionIndex(undefined);\n onChange && onChange(undefined, updatedHTML);\n },\n [\n textFieldRef,\n inputTextValue,\n currentTriggerStartIndex,\n mentionLookupOptions?.trigger,\n onChange,\n textValue,\n tagsValue,\n /* @conditional-compile-remove(mention) */\n updateMentionSuggestions,\n /* @conditional-compile-remove(mention) */\n localeStrings\n ]\n );\n\n const onTextFieldKeyDown = useCallback(\n (ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n // Uses KeyCode 229 and which code 229 to determine if the press of the enter key is from a composition session or not (Safari only)\n if (ev.nativeEvent.isComposing || ev.nativeEvent.keyCode === 229 || ev.nativeEvent.which === 229) {\n return;\n }\n if (ev.key === 'ArrowUp') {\n ev.preventDefault();\n /* @conditional-compile-remove(mention) */\n if (mentionSuggestions.length > 0) {\n const newActiveIndex =\n activeSuggestionIndex === undefined\n ? mentionSuggestions.length - 1\n : Math.max(activeSuggestionIndex - 1, 0);\n setActiveSuggestionIndex(newActiveIndex);\n }\n } else if (ev.key === 'ArrowDown') {\n ev.preventDefault();\n /* @conditional-compile-remove(mention) */\n if (mentionSuggestions.length > 0) {\n const newActiveIndex =\n activeSuggestionIndex === undefined\n ? 0\n : Math.min(activeSuggestionIndex + 1, mentionSuggestions.length - 1);\n setActiveSuggestionIndex(newActiveIndex);\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 /* @conditional-compile-remove(mention) */\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 }\n onKeyDown && onKeyDown(ev);\n },\n [\n onEnterKeyDown,\n onKeyDown,\n supportNewline,\n /* @conditional-compile-remove(mention) */\n mentionSuggestions,\n /* @conditional-compile-remove(mention) */\n activeSuggestionIndex,\n /* @conditional-compile-remove(mention) */\n onSuggestionSelected\n ]\n );\n\n const onRenderChildren = (): JSX.Element => {\n return (\n <Stack horizontal className={mergedChildrenStyle}>\n {children}\n </Stack>\n );\n };\n\n /* @conditional-compile-remove(mention) */\n const debouncedQueryUpdate = useDebouncedCallback(async (query: string) => {\n const suggestions = (await mentionLookupOptions?.onQueryUpdated(query)) ?? [];\n if (suggestions.length === 0) {\n setActiveSuggestionIndex(undefined);\n } else if (activeSuggestionIndex === undefined) {\n setActiveSuggestionIndex(0);\n }\n updateMentionSuggestions(suggestions);\n }, 500);\n\n /* @conditional-compile-remove(mention) */\n useEffect(() => {\n return () => {\n debouncedQueryUpdate.cancel();\n };\n }, [debouncedQueryUpdate]);\n\n /* @conditional-compile-remove(mention) */\n const handleOnChange = useCallback(\n async (event: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>, updatedValue?: string): Promise<void> => {\n const newValue = updatedValue ?? '';\n const triggerText = mentionLookupOptions?.trigger ?? defaultMentionTrigger;\n\n const newTextLength = newValue.length;\n let selectionEnd = textFieldRef?.current?.selectionEnd || -1;\n selectionEnd = Math.max(0, selectionEnd);\n selectionEnd = Math.min(selectionEnd, newTextLength - 1);\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, selectionEnd - 1);\n // Update the caret position, if not doing a lookup\n setCaretPosition(Caret.getRelativePosition(event.currentTarget));\n\n if (triggerPriorIndex !== undefined) {\n // trigger is found\n const isSpaceBeforeTrigger = newValue.substring(triggerPriorIndex - 1, triggerPriorIndex) === ' ';\n const wordAtSelection = newValue.substring(triggerPriorIndex, selectionEnd);\n let tagIndex = currentTriggerStartIndex;\n if (!isSpaceBeforeTrigger && triggerPriorIndex !== 0) {\n //no space before the trigger <- continuation of the previous word\n tagIndex = -1;\n setCurrentTriggerStartIndex(tagIndex);\n } else if (wordAtSelection === triggerText) {\n // start of the mention\n tagIndex = selectionEnd - triggerText.length;\n if (tagIndex < 0) {\n tagIndex = 0;\n }\n setCurrentTriggerStartIndex(tagIndex);\n }\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 let result = '';\n if (tagsValue.length === 0) {\n // no tags in the string, textValue is a sting\n result = newValue;\n } else {\n // there are tags in the text value, textValue is html string\n const { changeStart, oldChangeEnd, newChangeEnd } = findStringsDiffIndexes(\n inputTextValue,\n newValue,\n selectionEnd\n );\n // get updated html string\n const change = newValue.substring(changeStart, newChangeEnd);\n const [updatedHTML, updatedChangeNewEndIndex] = updateHTML(\n textValue,\n inputTextValue,\n newValue,\n tagsValue,\n changeStart,\n oldChangeEnd,\n change,\n triggerText\n );\n result = updatedHTML;\n if (updatedChangeNewEndIndex !== null) {\n if (\n (change.length === 1 && event.currentTarget.selectionStart === event.currentTarget.selectionEnd) || // simple input\n (change.length === 0 && newChangeEnd === changeStart) //delete\n ) {\n setCaretIndex(updatedChangeNewEndIndex);\n }\n }\n }\n\n onChange && onChange(event, result);\n },\n [\n onChange,\n mentionLookupOptions,\n tagsValue,\n textValue,\n inputTextValue,\n currentTriggerStartIndex,\n setCaretIndex,\n setCaretPosition,\n updateMentionSuggestions,\n debouncedQueryUpdate,\n textFieldRef\n ]\n );\n\n /* @conditional-compile-remove(mention) */\n const updateSelectionIndexesWithMentionIfNeeded = (\n event: FormEvent<HTMLInputElement | HTMLTextAreaElement>\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 const mentionTag = findMentionTagForSelection(tagsValue, event.currentTarget.selectionStart);\n if (mentionTag !== undefined && mentionTag.plainTextBeginIndex !== undefined) {\n if (selectionStartValue === null) {\n updatedStartIndex = mentionTag.plainTextBeginIndex;\n updatedEndIndex = mentionTag.plainTextEndIndex ?? mentionTag.plainTextBeginIndex;\n } else {\n const newSelectionIndex = findNewSelectionIndexForMention(\n mentionTag,\n inputTextValue,\n event.currentTarget.selectionStart,\n selectionStartValue\n );\n\n updatedStartIndex = newSelectionIndex;\n updatedEndIndex = newSelectionIndex;\n }\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 if (mentionTag !== undefined && mentionTag.plainTextBeginIndex !== undefined) {\n //TODO: here it takes -1 when it shouldn't, update selectionstart and end with mouse move and or touch move\n updatedStartIndex = findNewSelectionIndexForMention(\n mentionTag,\n inputTextValue,\n event.currentTarget.selectionStart,\n selectionStartValue ?? -1\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 if (mentionTag !== undefined && mentionTag.plainTextBeginIndex !== undefined) {\n //TODO: here it takes -1 when it shouldn't, update selectionstart and end with mouse move and or touch move\n updatedEndIndex = findNewSelectionIndexForMention(\n mentionTag,\n inputTextValue,\n event.currentTarget.selectionEnd,\n selectionEndValue ?? -1\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(updatedStartIndex, updatedEndIndex, event.currentTarget.selectionDirection);\n }\n setSelectionStartValue(updatedStartIndex);\n setSelectionEndValue(updatedEndIndex);\n };\n\n const getInputFieldTextValue = (): string => {\n /* @conditional-compile-remove(mention) */\n return inputTextValue;\n return textValue;\n };\n\n return (\n <Stack className={mergedRootStyle}>\n <div className={mergedTextContainerStyle}>\n {\n /* @conditional-compile-remove(mention) */ 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 }\n <TextField\n autoFocus={props.autoFocus === 'sendBoxTextField'}\n data-ui-id={dataUiId}\n multiline\n autoAdjustHeight\n multiple={false}\n resizable={false}\n componentRef={textFieldRef}\n id={id}\n inputClassName={mergedTextFiledStyle}\n placeholder={placeholderText}\n value={getInputFieldTextValue()}\n onChange={(e, newValue) => {\n /* @conditional-compile-remove(mention) */\n setInputTextValue(newValue ?? '');\n /* @conditional-compile-remove(mention) */\n handleOnChange(e, newValue);\n /* @conditional-compile-remove(mention) */\n return;\n onChange(e, newValue);\n }}\n /* @conditional-compile-remove(mention) */\n onSelect={(e) => {\n if (caretIndex !== undefined) {\n e.currentTarget.setSelectionRange(caretIndex, caretIndex);\n setCaretIndex(undefined);\n return;\n }\n //TODO: need to check to navigate before/after space correctly in tag + when selecting by mouse\n /* @conditional-compile-remove(mention) */\n if (\n shouldHandleOnMouseDownDuringSelect &&\n e.currentTarget.selectionStart !== null &&\n e.currentTarget.selectionStart === e.currentTarget.selectionEnd\n ) {\n // handle mention click\n const mentionTag = findMentionTagForSelection(tagsValue, e.currentTarget.selectionStart);\n if (mentionTag !== undefined && mentionTag.plainTextBeginIndex !== undefined) {\n if (e.currentTarget.selectionDirection === null) {\n e.currentTarget.setSelectionRange(\n mentionTag.plainTextBeginIndex,\n mentionTag.plainTextEndIndex ?? mentionTag.plainTextBeginIndex\n );\n } else {\n e.currentTarget.setSelectionRange(\n mentionTag.plainTextBeginIndex,\n mentionTag.plainTextEndIndex ?? mentionTag.plainTextBeginIndex,\n e.currentTarget.selectionDirection\n );\n }\n setSelectionStartValue(mentionTag.plainTextBeginIndex);\n setSelectionEndValue(mentionTag.plainTextEndIndex ?? mentionTag.plainTextBeginIndex);\n } else {\n setSelectionStartValue(e.currentTarget.selectionStart);\n setSelectionEndValue(e.currentTarget.selectionEnd);\n }\n } else {\n updateSelectionIndexesWithMentionIfNeeded(e);\n }\n /* @conditional-compile-remove(mention) */\n setShouldHandleOnMouseDownDuringSelect(false);\n }}\n onMouseDown={() => {\n // as events order is onMouseDown -> onSelect -> onClick\n // onClick and onMouseDown can't handle clicking on mention event because\n // onClick has wrong range as it's called after onSelect\n // onMouseDown doesn't have correct selectionRange yet\n // so we need to handle onMouseDown to prevent onSelect default behavior\n /* @conditional-compile-remove(mention) */\n setShouldHandleOnMouseDownDuringSelect(true);\n }}\n onTouchStart={() => {\n // see onMouseDown for more details\n /* @conditional-compile-remove(mention) */\n setShouldHandleOnMouseDownDuringSelect(true);\n }}\n autoComplete=\"off\"\n onKeyDown={onTextFieldKeyDown}\n styles={mergedTextFieldStyle}\n disabled={disabled}\n errorMessage={errorMessage}\n onRenderSuffix={onRenderChildren}\n elementRef={inputBoxRef}\n />\n </div>\n </Stack>\n );\n};\n\n/**\n * Props for displaying a send button besides the text input area.\n *\n * @private\n */\nexport type InputBoxButtonProps = {\n onRenderIcon: (isHover: boolean) => JSX.Element;\n onClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n className?: string;\n id?: string;\n ariaLabel?: string;\n tooltipContent?: string;\n};\n\n/**\n * @private\n */\nexport const InputBoxButton = (props: InputBoxButtonProps): JSX.Element => {\n const { onRenderIcon, onClick, ariaLabel, className, id, tooltipContent } = props;\n const [isHover, setIsHover] = useState(false);\n const mergedButtonStyle = mergeStyles(inputButtonStyle, className);\n\n const theme = useTheme();\n const calloutStyle: Partial<ICalloutContentStyles> = { root: { padding: 0 }, calloutMain: { padding: '0.5rem' } };\n\n // Place callout with no gap between it and the button.\n const calloutProps = {\n gapSpace: 0,\n styles: calloutStyle,\n backgroundColor: isDarkThemed(theme) ? theme.palette.neutralLighter : ''\n };\n return (\n <TooltipHost hostClassName={inputButtonTooltipStyle} content={tooltipContent} calloutProps={{ ...calloutProps }}>\n <IconButton\n className={mergedButtonStyle}\n ariaLabel={ariaLabel}\n onClick={onClick}\n id={id}\n onMouseEnter={() => {\n setIsHover(true);\n }}\n onMouseLeave={() => {\n setIsHover(false);\n }}\n // VoiceOver fix: Avoid icon from stealing focus when IconButton is double-tapped to send message by wrapping with Stack with pointerEvents style to none\n onRenderIcon={() => <Stack className={iconWrapperStyle}>{onRenderIcon(isHover)}</Stack>}\n />\n </TooltipHost>\n );\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Find mention tag if selection is inside of it\n *\n * @private\n */\nconst findMentionTagForSelection = (tags: TagData[], selection: number): TagData | undefined => {\n let mentionTag: TagData | undefined = undefined;\n for (let i = 0; i < tags.length; i++) {\n const tag = tags[i];\n let plainTextEndIndex = 0;\n if (tag.plainTextEndIndex !== undefined && tag.closeTagIdx !== undefined) {\n // close tag exists\n plainTextEndIndex = tag.plainTextEndIndex;\n } else if (tag.plainTextBeginIndex !== undefined) {\n //no close tag\n plainTextEndIndex = tag.plainTextBeginIndex;\n }\n if (tag.subTags !== undefined && tag.subTags.length !== 0) {\n const selectedTag = findMentionTagForSelection(tag.subTags, selection);\n if (selectedTag !== undefined) {\n mentionTag = selectedTag;\n break;\n }\n } else if (\n tag.tagType === 'msft-mention' &&\n tag.plainTextBeginIndex !== undefined &&\n tag.plainTextBeginIndex < selection &&\n selection < plainTextEndIndex\n ) {\n mentionTag = tag;\n break;\n }\n }\n return mentionTag;\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Go through tags and find a new the selection index if it is inside of a mention tag\n *\n * @private\n */\nconst findNewSelectionIndexForMention = (\n tag: TagData,\n textValue: string,\n selection: number,\n previousSelection: number\n): number => {\n if (\n tag.plainTextBeginIndex === undefined ||\n tag.tagType !== 'msft-mention' ||\n selection === previousSelection ||\n tag.plainTextEndIndex === undefined\n ) {\n return selection;\n }\n let spaceIndex = 0;\n if (selection <= previousSelection) {\n // the cursor is moved to the left\n spaceIndex = textValue.lastIndexOf(' ', selection ?? 0);\n if (spaceIndex === -1) {\n // no space before the selection\n spaceIndex = tag.plainTextBeginIndex;\n }\n } else {\n // the cursor is moved to the right\n spaceIndex = textValue.indexOf(' ', selection ?? 0);\n if (spaceIndex === -1) {\n // no space after the selection\n spaceIndex = tag.plainTextEndIndex ?? tag.plainTextBeginIndex;\n }\n }\n\n if (spaceIndex < tag.plainTextBeginIndex) {\n spaceIndex = tag.plainTextBeginIndex;\n } else if (spaceIndex > tag.plainTextEndIndex) {\n spaceIndex = tag.plainTextEndIndex;\n }\n return spaceIndex;\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Handle mention tag edit and by word deleting\n *\n * @private\n */\nconst handleMentionTagUpdate = (\n htmlText: string,\n oldPlainText: string,\n lastProcessedHTMLIndex: number,\n processedChange: string,\n tag: TagData,\n closeTagIdx: number,\n closeTagLength: number,\n plainTextEndIndex: number,\n startIndex: number,\n oldPlainTextEndIndex: number,\n mentionTagLength: number\n): [resultValue: string, updatedChange: string, htmlIndex: number, plainTextSelectionEndIndex: number | null] => {\n if (tag.tagType !== 'msft-mention' || tag.plainTextBeginIndex === undefined) {\n return ['', processedChange, lastProcessedHTMLIndex, null];\n }\n let result = '';\n let plainTextSelectionEndIndex: number | null = null;\n let rangeStart: number;\n let rangeEnd: number;\n // check if space symbol is handled in case if string looks like '<1 2 3>'\n let isSpaceLengthHandled = false;\n rangeStart = oldPlainText.lastIndexOf(' ', startIndex);\n if (rangeStart !== -1 && rangeStart !== undefined && rangeStart > tag.plainTextBeginIndex) {\n isSpaceLengthHandled = true;\n }\n rangeEnd = oldPlainText.indexOf(' ', oldPlainTextEndIndex);\n if (rangeEnd === -1 || rangeEnd === undefined) {\n // check if space symbol is not found\n rangeEnd = plainTextEndIndex;\n } else if (!isSpaceLengthHandled) {\n // +1 to include the space symbol\n rangeEnd += 1;\n }\n isSpaceLengthHandled = true;\n\n if (rangeStart === -1 || rangeStart === undefined || rangeStart < tag.plainTextBeginIndex) {\n rangeStart = tag.plainTextBeginIndex;\n }\n if (rangeEnd > plainTextEndIndex) {\n rangeEnd = plainTextEndIndex;\n }\n\n if (rangeStart === tag.plainTextBeginIndex && rangeEnd === plainTextEndIndex) {\n // the whole tag should be removed\n result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx) + processedChange;\n plainTextSelectionEndIndex = tag.plainTextBeginIndex + processedChange.length;\n processedChange = '';\n lastProcessedHTMLIndex = closeTagIdx + closeTagLength;\n } else {\n // only part of the tag should be removed\n let startChangeDiff = 0;\n let endChangeDiff = 0;\n // need to check only rangeStart > tag.plainTextBeginIndex as when rangeStart === tag.plainTextBeginIndex startChangeDiff = 0 and mentionTagLength shouldn't be subtracted\n if (rangeStart > tag.plainTextBeginIndex) {\n startChangeDiff = rangeStart - tag.plainTextBeginIndex - mentionTagLength;\n }\n endChangeDiff = rangeEnd - tag.plainTextBeginIndex - mentionTagLength;\n result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx + tag.openTagBody.length + startChangeDiff);\n // plainTextSelectionEndIndex = rangeStart + processedChange.length;\n lastProcessedHTMLIndex = tag.openTagIdx + tag.openTagBody.length + endChangeDiff;\n // processed change should not be changed as it should be added after the tag\n }\n return [result, processedChange, lastProcessedHTMLIndex, plainTextSelectionEndIndex];\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Go through the text and update it with the changed text\n *\n * @private\n */\nconst updateHTML = (\n htmlText: string,\n oldPlainText: string,\n newPlainText: string,\n tags: TagData[],\n startIndex: number,\n oldPlainTextEndIndex: number,\n change: string,\n mentionTrigger: string\n): [string, number | null] => {\n let result = '';\n if (tags.length === 0) {\n // no tags added yet\n return [newPlainText, null];\n }\n if (startIndex === 0 && oldPlainTextEndIndex === oldPlainText.length) {\n // the whole text is changed\n return [newPlainText, null];\n }\n let lastProcessedHTMLIndex = 0;\n // the value can be updated with empty string when the change covers more than 1 place (tag + before or after the tag)\n // in this case change won't be added as part of the tag\n // e.g.: change is before and partially in tag => change will be added before the tag and outdated text in the tag will be removed\n // e.g.: change is after and partially in tag => change will be added after the tag and outdated text in the tag will be removed\n // e.g.: change is on the beginning of the tag => change will be added before the tag\n // e.g.: change is on the end of the tag => change will be added to the tag if it's not mention and after the tag if it's mention\n let processedChange = change;\n // end tag plain text index of the last processed tag\n let lastProcessedPlainTextTagEndIndex = 0;\n // as some tags/text can be removed fully, selectionEnd should be updated correctly\n let changeNewEndIndex: number | null = null;\n\n for (let i = 0; i < tags.length; i++) {\n const tag = tags[i];\n if (tag.plainTextBeginIndex === undefined) {\n continue;\n }\n // all plain text indexes includes trigger length for the mention that shouldn't be included in\n // htmlText.substring because html strings don't include the trigger\n // mentionTagLength will be set only for 'msft-mention', otherwise should be 0\n let mentionTagLength = 0;\n let isMentionTag = false;\n if (tag.tagType === 'msft-mention') {\n mentionTagLength = mentionTrigger.length;\n isMentionTag = true;\n }\n\n //change start is before the open tag\n if (startIndex <= tag.plainTextBeginIndex) {\n // Math.max(lastProcessedPlainTextTagEndIndex, startIndex) is used as startIndex may not be in [[previous tag].plainTextEndIndex - tag.plainTextBeginIndex] range\n const startChangeDiff = tag.plainTextBeginIndex - Math.max(lastProcessedPlainTextTagEndIndex, startIndex);\n result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx - startChangeDiff) + processedChange;\n if (oldPlainTextEndIndex <= tag.plainTextBeginIndex) {\n // the whole change is before tag start\n // oldPlainTextEndIndex already includes mentionTag length\n const endChangeDiff = tag.plainTextBeginIndex - oldPlainTextEndIndex;\n lastProcessedHTMLIndex = tag.openTagIdx - endChangeDiff;\n processedChange = '';\n // the change is handled; exit\n break;\n } else {\n // change continues in the tag\n lastProcessedHTMLIndex = tag.openTagIdx;\n processedChange = '';\n // proceed to the next check\n }\n }\n let plainTextEndIndex = 0;\n let closeTagIdx = 0;\n let closeTagLength = 0;\n if (tag.plainTextEndIndex !== undefined && tag.closeTagIdx !== undefined) {\n // close tag exists\n plainTextEndIndex = tag.plainTextEndIndex;\n closeTagIdx = tag.closeTagIdx;\n // tag.tagType.length + </>\n closeTagLength = tag.tagType.length + 3;\n } else {\n // no close tag\n plainTextEndIndex = tag.plainTextBeginIndex;\n closeTagIdx = tag.openTagIdx + tag.openTagBody.length;\n closeTagLength = 0;\n }\n\n if (startIndex < plainTextEndIndex) {\n // change started before the end tag\n if (startIndex <= tag.plainTextBeginIndex && oldPlainTextEndIndex === plainTextEndIndex) {\n // the change is a tag or starts before the tag\n // tag should be removed, no matter if there are subtags\n result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx) + processedChange;\n processedChange = '';\n lastProcessedHTMLIndex = closeTagIdx + closeTagLength;\n // the change is handled; exit\n break;\n } else if (startIndex >= tag.plainTextBeginIndex && oldPlainTextEndIndex < plainTextEndIndex) {\n // edge case: the change is between tag\n if (isMentionTag) {\n if (change !== '') {\n // mention tag should be deleted when user tries to edit it\n result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx) + processedChange;\n changeNewEndIndex = tag.plainTextBeginIndex + processedChange.length;\n processedChange = '';\n lastProcessedHTMLIndex = closeTagIdx + closeTagLength;\n } else {\n const [resultValue, updatedChange, htmlIndex, plainTextSelectionEndIndex] = handleMentionTagUpdate(\n htmlText,\n oldPlainText,\n lastProcessedHTMLIndex,\n processedChange,\n tag,\n closeTagIdx,\n closeTagLength,\n plainTextEndIndex,\n startIndex,\n oldPlainTextEndIndex,\n mentionTagLength\n );\n result += resultValue;\n changeNewEndIndex = plainTextSelectionEndIndex;\n processedChange = updatedChange;\n lastProcessedHTMLIndex = htmlIndex;\n }\n // the change is handled; exit\n break;\n } else if (tag.subTags !== undefined && tag.subTags.length !== 0 && tag.content) {\n // with subtags\n // before the tag content\n const stringBefore = htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx + tag.openTagBody.length);\n lastProcessedHTMLIndex = closeTagIdx;\n const [content, updatedChangeNewEndIndex] = updateHTML(\n tag.content,\n oldPlainText,\n newPlainText,\n tag.subTags,\n startIndex - mentionTagLength,\n oldPlainTextEndIndex - mentionTagLength,\n processedChange,\n mentionTrigger\n );\n result += stringBefore + content;\n changeNewEndIndex = updatedChangeNewEndIndex;\n break;\n } else {\n // no subtags\n const startChangeDiff = startIndex - tag.plainTextBeginIndex - mentionTagLength;\n const endChangeDiff = oldPlainTextEndIndex - tag.plainTextBeginIndex - mentionTagLength;\n result +=\n htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx + tag.openTagBody.length + startChangeDiff) +\n processedChange;\n processedChange = '';\n lastProcessedHTMLIndex = tag.openTagIdx + tag.openTagBody.length + endChangeDiff;\n // the change is handled; exit\n break;\n }\n } else if (startIndex > tag.plainTextBeginIndex && oldPlainTextEndIndex > plainTextEndIndex) {\n //the change started in the tag but finishes somewhere further\n const startChangeDiff = startIndex - tag.plainTextBeginIndex - mentionTagLength;\n if (isMentionTag) {\n const [resultValue, updatedChange, htmlIndex] = handleMentionTagUpdate(\n htmlText,\n oldPlainText,\n lastProcessedHTMLIndex,\n oldPlainText.substring(startIndex, startIndex + 1) !== ' ' && change === '' ? ' ' : '', // if substring !== ' ' && change is empty -> the change should be \" \" and not empty string but \" \" wasn't included in change; otherwise the part of mention should be just deleted without processedChange update\n tag,\n closeTagIdx,\n closeTagLength,\n plainTextEndIndex,\n startIndex,\n oldPlainTextEndIndex,\n mentionTagLength\n );\n result += resultValue;\n lastProcessedHTMLIndex = htmlIndex;\n processedChange = updatedChange;\n // no need to handle plainTextSelectionEndIndex as the change will be added later\n // proceed with the next calculations\n } else if (tag.subTags !== undefined && tag.subTags.length !== 0 && tag.content !== undefined) {\n // with subtags\n // before the tag content\n const stringBefore = htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx + tag.openTagBody.length);\n lastProcessedHTMLIndex = closeTagIdx;\n const [content] = updateHTML(\n tag.content,\n oldPlainText,\n newPlainText,\n tag.subTags,\n startIndex - mentionTagLength,\n oldPlainTextEndIndex - mentionTagLength,\n '', // the part of the tag should be just deleted without processedChange update and change will be added after this tag\n mentionTrigger\n );\n result += stringBefore + content;\n // proceed with the next calculations\n } else {\n // no subtags\n result += htmlText.substring(\n lastProcessedHTMLIndex,\n tag.openTagIdx + tag.openTagBody.length + startChangeDiff\n );\n lastProcessedHTMLIndex = closeTagIdx;\n // proceed with the next calculations\n }\n } else if (startIndex < tag.plainTextBeginIndex && oldPlainTextEndIndex > plainTextEndIndex) {\n // the change starts before the tag and finishes after it\n // tag should be removed, no matter if there are subtags\n // no need to save anything between lastProcessedHTMLIndex and closeTagIdx + closeTagLength\n lastProcessedHTMLIndex = closeTagIdx + closeTagLength;\n // proceed with the next calculations\n } else if (startIndex === tag.plainTextBeginIndex && oldPlainTextEndIndex > plainTextEndIndex) {\n // the change starts in the tag and finishes after it\n // tag should be removed, no matter if there are subtags\n result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx);\n // processedChange shouldn't be updated as it will be added after the tag\n lastProcessedHTMLIndex = closeTagIdx + closeTagLength;\n // proceed with the next calculations\n } else if (startIndex < tag.plainTextBeginIndex && oldPlainTextEndIndex < plainTextEndIndex) {\n // the change starts before the tag and ends in a tag\n if (isMentionTag) {\n const [resultValue, , htmlIndex] = handleMentionTagUpdate(\n htmlText,\n oldPlainText,\n lastProcessedHTMLIndex,\n '', // the part of mention should be just deleted without processedChange update\n tag,\n closeTagIdx,\n closeTagLength,\n plainTextEndIndex,\n startIndex,\n oldPlainTextEndIndex,\n mentionTagLength\n );\n changeNewEndIndex = tag.plainTextBeginIndex;\n result += resultValue;\n lastProcessedHTMLIndex = htmlIndex;\n } else if (tag.subTags !== undefined && tag.subTags.length !== 0 && tag.content !== undefined) {\n // with subtags\n // before the tag content\n const stringBefore = htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx + tag.openTagBody.length);\n lastProcessedHTMLIndex = closeTagIdx;\n const [content] = updateHTML(\n tag.content,\n oldPlainText,\n newPlainText,\n tag.subTags,\n startIndex - mentionTagLength,\n oldPlainTextEndIndex - mentionTagLength,\n processedChange, // processedChange should equal '' and the part of the tag should be deleted as the change was handled before this tag\n mentionTrigger\n );\n result += stringBefore + content;\n } else {\n // no subtags\n result +=\n htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx + tag.openTagBody.length) + processedChange;\n processedChange = '';\n // oldPlainTextEndIndex already includes mentionTag length\n const endChangeDiff = plainTextEndIndex - oldPlainTextEndIndex;\n // as change may be before the end of the tag, we need to add the rest of the tag\n lastProcessedHTMLIndex = closeTagIdx - endChangeDiff;\n }\n // the change is handled; exit\n break;\n } else if (startIndex > tag.plainTextBeginIndex && oldPlainTextEndIndex === plainTextEndIndex) {\n // the change starts in the tag and ends at the end of a tag\n if (isMentionTag) {\n if (change !== '' && startIndex === plainTextEndIndex) {\n // non empty change at the end of the mention tag to be added after the mention tag\n result += htmlText.substring(lastProcessedHTMLIndex, closeTagIdx + closeTagLength) + processedChange;\n changeNewEndIndex = plainTextEndIndex + processedChange.length;\n processedChange = '';\n lastProcessedHTMLIndex = closeTagIdx + closeTagLength;\n } else if (change !== '') {\n // mention tag should be deleted when user tries to edit it\n result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx) + processedChange;\n changeNewEndIndex = tag.plainTextBeginIndex + processedChange.length;\n processedChange = '';\n lastProcessedHTMLIndex = closeTagIdx + closeTagLength;\n } else {\n const [resultValue, updatedChange, htmlIndex, plainTextSelectionEndIndex] = handleMentionTagUpdate(\n htmlText,\n oldPlainText,\n lastProcessedHTMLIndex,\n processedChange,\n tag,\n closeTagIdx,\n closeTagLength,\n plainTextEndIndex,\n startIndex,\n oldPlainTextEndIndex,\n mentionTagLength\n );\n result += resultValue;\n processedChange = updatedChange;\n lastProcessedHTMLIndex = htmlIndex;\n changeNewEndIndex = plainTextSelectionEndIndex;\n }\n // the change is handled; exit\n break;\n } else if (tag.subTags !== undefined && tag.subTags.length !== 0 && tag.content !== undefined) {\n // with subtags\n // before the tag content\n const stringBefore = htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx + tag.openTagBody.length);\n lastProcessedHTMLIndex = closeTagIdx;\n const [content, updatedChangeNewEndIndex] = updateHTML(\n tag.content,\n oldPlainText,\n newPlainText,\n tag.subTags,\n startIndex - mentionTagLength,\n oldPlainTextEndIndex - mentionTagLength,\n processedChange,\n mentionTrigger\n );\n result += stringBefore + content;\n changeNewEndIndex = updatedChangeNewEndIndex;\n break;\n } else {\n // no subtags\n const startChangeDiff = startIndex - tag.plainTextBeginIndex - mentionTagLength;\n result +=\n htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx + tag.openTagBody.length + startChangeDiff) +\n processedChange;\n processedChange = '';\n lastProcessedHTMLIndex = closeTagIdx;\n // the change is handled; exit\n break;\n }\n }\n lastProcessedPlainTextTagEndIndex = plainTextEndIndex;\n }\n\n if (i === tags.length - 1 && oldPlainTextEndIndex >= plainTextEndIndex) {\n // the last tag should handle the end of the change if needed\n // oldPlainTextEndIndex already includes mentionTag length\n const endChangeDiff = oldPlainTextEndIndex - plainTextEndIndex;\n if (startIndex >= plainTextEndIndex) {\n const startChangeDiff = startIndex - plainTextEndIndex;\n result +=\n htmlText.substring(lastProcessedHTMLIndex, closeTagIdx + closeTagLength + startChangeDiff) + processedChange;\n } else {\n result += htmlText.substring(lastProcessedHTMLIndex, closeTagIdx + closeTagLength) + processedChange;\n }\n processedChange = '';\n lastProcessedHTMLIndex = closeTagIdx + closeTagLength + endChangeDiff;\n // the change is handled; exit\n // break is not required here as this is the last element but added for consistency\n break;\n }\n }\n\n if (lastProcessedHTMLIndex < htmlText.length) {\n result += htmlText.substring(lastProcessedHTMLIndex);\n }\n\n return [result, changeNewEndIndex];\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Given the oldText and newText, find the start index, old end index and new end index for the changes\n *\n * @param oldText - the old text\n * @param newText - the new text\n * @param selectionEnd - the end of the selection\n * @returns change start index, old end index and new end index. The old and new end indexes are exclusive.\n * @private\n */\nconst findStringsDiffIndexes = (\n oldText: string,\n newText: string,\n selectionEnd: number // should be a valid position in the input field\n): { changeStart: number; oldChangeEnd: number; newChangeEnd: number } => {\n const newTextLength = newText.length;\n const oldTextLength = oldText.length;\n let changeStart = 0;\n let newChangeEnd = newTextLength;\n let oldChangeEnd = oldTextLength;\n const length = Math.min(newTextLength, oldTextLength, selectionEnd);\n\n for (let i = 0; i < length; i++) {\n if (newText[i] !== oldText[i]) {\n // the symbol with changeStart index is updated\n changeStart = i;\n break;\n } else if (i === length - 1 && newText[i] === oldText[i]) {\n // the symbol is added at the end of inputTextValue\n changeStart = length;\n break;\n }\n }\n if (oldTextLength < newTextLength) {\n //insert or replacement\n if (oldTextLength === changeStart) {\n // when change was at the end of string\n // Change is found\n newChangeEnd = newTextLength;\n oldChangeEnd = oldTextLength;\n } else {\n for (let i = 1; i < newTextLength && oldTextLength - i >= changeStart; i++) {\n newChangeEnd = newTextLength - i - 1;\n oldChangeEnd = oldTextLength - i - 1;\n\n if (newText[newChangeEnd] !== oldText[oldChangeEnd]) {\n // Change is found\n break;\n }\n }\n // make indexes exclusive\n newChangeEnd += 1;\n oldChangeEnd += 1;\n }\n } else if (oldTextLength > newTextLength) {\n //deletion or replacement\n if (newTextLength === changeStart) {\n // when change was at the end of string\n // Change is found\n newChangeEnd = newTextLength;\n oldChangeEnd = oldTextLength;\n } else {\n for (let i = 1; i < oldTextLength && newTextLength - i >= changeStart; i++) {\n newChangeEnd = newTextLength - i - 1;\n oldChangeEnd = oldTextLength - i - 1;\n if (newText[newChangeEnd] !== oldText[oldChangeEnd]) {\n // Change is found\n break;\n }\n }\n // make indexes exclusive\n newChangeEnd += 1;\n oldChangeEnd += 1;\n }\n } else {\n //replacement\n for (let i = 1; i < oldTextLength && oldTextLength - i >= changeStart; i++) {\n newChangeEnd = newTextLength - i - 1;\n oldChangeEnd = oldTextLength - i - 1;\n\n if (newText[newChangeEnd] !== oldText[oldChangeEnd]) {\n // Change is found\n break;\n }\n }\n // make indexes exclusive if they aren't equal to the length of the string\n if (newChangeEnd !== newText.length) {\n newChangeEnd += 1;\n }\n if (oldChangeEnd !== oldText.length) {\n oldChangeEnd += 1;\n }\n }\n return { changeStart, oldChangeEnd, newChangeEnd };\n};\n\n/* @conditional-compile-remove(mention) */\nconst htmlStringForMentionSuggestion = (suggestion: Mention, localeStrings: ComponentStrings): string => {\n const idHTML = ' id =\"' + suggestion.id + '\"';\n const displayTextHTML = ' displayText =\"' + suggestion.displayText + '\"';\n const displayText = getDisplayNameForMentionSuggestion(suggestion, localeStrings);\n return '<msft-mention' + idHTML + displayTextHTML + '>' + displayText + '</msft-mention>';\n};\n\n/* @conditional-compile-remove(mention) */\nconst getDisplayNameForMentionSuggestion = (suggestion: Mention, localeStrings: ComponentStrings): string => {\n const displayNamePlaceholder = localeStrings.participantItem.displayNamePlaceholder;\n return suggestion.displayText !== '' ? suggestion.displayText : displayNamePlaceholder ?? '';\n};\n\n/* @conditional-compile-remove(mention) */\ntype TagData = {\n tagType: string; // The type of tag (e.g. msft-mention)\n openTagIdx: number; // Start of the tag relative to the parent content\n openTagBody: string; // Complete open tag body\n content?: string; // All content between the open and close tags\n closeTagIdx?: number; // Start of the close tag relative to the parent content\n subTags?: TagData[]; // Any child tags\n plainTextBeginIndex?: number; // Absolute index of the open tag start should be in plain text\n plainTextEndIndex?: number; // Absolute index of the close tag start should be in plain text\n};\n\n/* @conditional-compile-remove(mention) */\ntype HtmlTagType = 'open' | 'close' | 'self-closing';\n/* @conditional-compile-remove(mention) */\ntype HtmlTag = {\n content: string;\n startIdx: number;\n type: HtmlTagType;\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Parse the text and return the tags and the plain text in one go\n * @param text - The text to parse for HTML tags\n * @param trigger The trigger to show for the msft-mention tag in plain text\n *\n * @returns An array of tags and the plain text representation\n */\nconst textToTagParser = (text: string, trigger: string): [TagData[], string] => {\n const tags: TagData[] = []; // Tags passed back to the caller\n const tagParseStack: TagData[] = []; // Local stack to use while parsing\n\n let plainTextRepresentation = '';\n\n let parseIndex = 0;\n while (parseIndex < text.length) {\n const foundHtmlTag = findNextHtmlTag(text, parseIndex);\n\n if (!foundHtmlTag) {\n if (parseIndex !== 0) {\n // Add the remaining text to the plain text representation\n plainTextRepresentation += text.substring(parseIndex);\n } else {\n plainTextRepresentation = text;\n }\n break;\n }\n\n if (foundHtmlTag.type === 'open' || foundHtmlTag.type === 'self-closing') {\n const nextTag = parseOpenTag(foundHtmlTag.content, foundHtmlTag.startIdx);\n // Add the plain text between the last tag and this one found\n plainTextRepresentation += text.substring(parseIndex, foundHtmlTag.startIdx);\n nextTag.plainTextBeginIndex = plainTextRepresentation.length;\n\n if (foundHtmlTag.type === 'open') {\n tagParseStack.push(nextTag);\n } else {\n nextTag.content = '';\n nextTag.plainTextBeginIndex = plainTextRepresentation.length;\n nextTag.plainTextEndIndex = plainTextRepresentation.length;\n addTag(nextTag, tagParseStack, tags);\n }\n }\n\n if (foundHtmlTag.type === 'close') {\n const currentOpenTag = tagParseStack.pop();\n const closeTagType = foundHtmlTag.content.substring(2, foundHtmlTag.content.length - 1).toLowerCase();\n\n if (currentOpenTag && currentOpenTag.tagType === closeTagType) {\n // Tag startIdx is absolute to the text. This is updated later to be relative to the parent tag\n currentOpenTag.content = text.substring(\n currentOpenTag.openTagIdx + currentOpenTag.openTagBody.length,\n foundHtmlTag.startIdx\n );\n\n // Insert the plain text pieces for the sub tags\n if (currentOpenTag.tagType === 'msft-mention') {\n plainTextRepresentation =\n plainTextRepresentation.slice(0, currentOpenTag.plainTextBeginIndex) +\n trigger +\n plainTextRepresentation.slice(currentOpenTag.plainTextBeginIndex);\n }\n\n if (!currentOpenTag.subTags) {\n plainTextRepresentation += currentOpenTag.content;\n } else if (currentOpenTag.subTags.length > 0) {\n // Add text after the last tag\n const lastSubTag = currentOpenTag.subTags[currentOpenTag.subTags.length - 1];\n const startOfRemainingText =\n (lastSubTag.closeTagIdx ?? lastSubTag.openTagIdx) + lastSubTag.tagType.length + 3;\n const trailingText = currentOpenTag.content.substring(startOfRemainingText);\n plainTextRepresentation += trailingText;\n }\n\n currentOpenTag.plainTextEndIndex = plainTextRepresentation.length;\n addTag(currentOpenTag, tagParseStack, tags);\n } else {\n console.error(\n 'Unexpected close tag found. Got \"' +\n closeTagType +\n '\" but expected \"' +\n tagParseStack[tagParseStack.length - 1]?.tagType +\n '\"'\n );\n }\n }\n\n // Update parsing index; move past the end of the close tag\n parseIndex = foundHtmlTag.startIdx + foundHtmlTag.content.length;\n } // While parseIndex < text.length loop\n\n return [tags, plainTextRepresentation];\n};\n\n/* @conditional-compile-remove(mention) */\nconst parseOpenTag = (tag: string, startIdx: number): TagData => {\n const tagType = tag\n .substring(1, tag.length - 1)\n .split(' ')[0]\n .toLowerCase()\n .replace('/', '');\n return {\n tagType,\n openTagIdx: startIdx,\n openTagBody: tag\n };\n};\n\n/* @conditional-compile-remove(mention) */\nconst findNextHtmlTag = (text: string, startIndex: number): HtmlTag | undefined => {\n const tagStartIndex = text.indexOf('<', startIndex);\n if (tagStartIndex === -1) {\n // No more tags\n return undefined;\n }\n const tagEndIndex = text.indexOf('>', tagStartIndex);\n if (tagEndIndex === -1) {\n // No close tag\n return undefined;\n }\n const tag = text.substring(tagStartIndex, tagEndIndex + 1);\n let type: HtmlTagType = 'open';\n if (tag[1] === '/') {\n type = 'close';\n } else if (tag[tag.length - 2] === '/') {\n type = 'self-closing';\n }\n return {\n content: tag,\n startIdx: tagStartIndex,\n type\n };\n};\n\n/* @conditional-compile-remove(mention) */\nconst addTag = (tag: TagData, parseStack: TagData[], tags: TagData[]): void => {\n // Add as sub-tag to the parent stack tag, if there is one\n const parentTag = parseStack[parseStack.length - 1];\n\n if (parentTag) {\n // Adjust the open tag index to be relative to the parent tag\n const parentContentStartIdx = parentTag.openTagIdx + parentTag.openTagBody.length;\n const relativeIdx = tag.openTagIdx - parentContentStartIdx;\n tag.openTagIdx = relativeIdx;\n }\n\n if (!tag.closeTagIdx) {\n // If the tag is self-closing, the close tag is the same as the open tag\n if (tag.openTagBody[tag.openTagBody.length - 2] === '/') {\n tag.closeTagIdx = tag.openTagIdx;\n } else {\n // Otherwise, the close tag index is the open tag index + the open tag body + the content length\n tag.closeTagIdx = tag.openTagIdx + tag.openTagBody.length + (tag.content ?? []).length;\n }\n }\n\n // Put the tag where it belongs\n if (!parentTag) {\n tags.push(tag);\n } else {\n if (!parentTag.subTags) {\n parentTag.subTags = [tag];\n } else {\n parentTag.subTags.push(tag);\n }\n }\n};\n"]}
|
1
|
+
{"version":3,"file":"InputBoxComponent.js","sourceRoot":"","sources":["../../../../../../react-components/src/components/InputBoxComponent.tsx"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,kCAAkC;;;;;;;;;;AAElC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAwB,WAAW,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACnF,0CAA0C;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,0CAA0C;AAC1C,OAAO,EAAoB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE9D,OAAO,EACL,KAAK,EACL,SAAS,EACT,WAAW,EAGX,eAAe,EACf,UAAU,EACV,WAAW,EAEZ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1C,MAAM,MAAM,GAAG,CAAC,GAAY,EAAE,UAAqB,EAAE,IAAe,EAAQ,EAAE;;IAC5E,0DAA0D;IAC1D,MAAM,SAAS,GAAG,UAAU,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAEpD,IAAI,SAAS,EAAE;QACb,6DAA6D;QAC7D,MAAM,qBAAqB,GAAG,SAAS,CAAC,UAAU,GAAG,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC;QAClF,MAAM,WAAW,GAAG,GAAG,CAAC,UAAU,GAAG,qBAAqB,CAAC;QAC3D,GAAG,CAAC,UAAU,GAAG,WAAW,CAAC;KAC9B;IAED,IAAI,CAAC,GAAG,CAAC,WAAW,EAAE;QACpB,wEAAwE;QACxE,IAAI,GAAG,CAAC,WAAW,CAAC,GAAG,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,EAAE;YACvD,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,UAAU,CAAC;SAClC;aAAM;YACL,gGAAgG;YAChG,GAAG,CAAC,WAAW,GAAG,GAAG,CAAC,UAAU,GAAG,GAAG,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,MAAA,GAAG,CAAC,OAAO,mCAAI,EAAE,CAAC,CAAC,MAAM,CAAC;SACxF;KACF;IAED,+BAA+B;IAC/B,IAAI,CAAC,SAAS,EAAE;QACd,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAChB;SAAM;QACL,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE;YACtB,SAAS,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC;SAC3B;aAAM;YACL,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;SAC7B;KACF;AACH,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport React, { useState, ReactNode, FormEvent, useCallback, useRef } from 'react';\n/* @conditional-compile-remove(mention) */\nimport { useEffect } from 'react';\n/* @conditional-compile-remove(mention) */\nimport { ComponentStrings, useLocale } from '../localization';\n\nimport {\n Stack,\n TextField,\n mergeStyles,\n IStyle,\n ITextField,\n concatStyleSets,\n IconButton,\n TooltipHost,\n ICalloutContentStyles\n} from '@fluentui/react';\nimport { BaseCustomStyles } from '../types';\nimport {\n inputBoxStyle,\n inputBoxWrapperStyle,\n inputButtonStyle,\n textFieldStyle,\n textContainerStyle,\n newLineButtonsContainerStyle,\n inputBoxNewLineSpaceAffordance,\n inputButtonTooltipStyle,\n iconWrapperStyle\n} from './styles/InputBoxComponent.style';\n/* @conditional-compile-remove(mention) */\nimport { Caret } from 'textarea-caret-ts';\nimport { isDarkThemed } from '../theming/themeUtils';\nimport { useTheme } from '../theming';\n/* @conditional-compile-remove(mention) */\nimport { MentionLookupOptions, _MentionPopover, Mention } from './MentionPopover';\n/* @conditional-compile-remove(mention) */\nimport { useDebouncedCallback } from 'use-debounce';\n/* @conditional-compile-remove(mention) */\nconst DEFAULT_MENTION_TRIGGER = '@';\n/* @conditional-compile-remove(mention) */\nconst MSFT_MENTION_TAG = 'msft-mention';\n\n/**\n * @private\n */\nexport interface InputBoxStylesProps extends BaseCustomStyles {\n /** Styles for the text field. */\n textField?: IStyle;\n\n /** Styles for the system message; These styles will be ignored when a custom system message component is provided. */\n systemMessage?: IStyle;\n\n /** Styles for customizing the container of the text field */\n textFieldContainer?: IStyle;\n}\n\ntype InputBoxComponentProps = {\n children: ReactNode;\n /**\n * Inline child elements passed in. Setting to false will mean they are on a new line.\n */\n inlineChildren: boolean;\n 'data-ui-id'?: string;\n id?: string;\n textValue: string; // This could be plain text or HTML.\n onChange: (event?: FormEvent<HTMLInputElement | HTMLTextAreaElement>, newValue?: string) => void;\n textFieldRef?: React.RefObject<ITextField>;\n inputClassName?: string;\n placeholderText?: string;\n supportNewline?: boolean;\n maxLength: number;\n onKeyDown?: (ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => void;\n onEnterKeyDown?: () => void;\n errorMessage?: string | React.ReactElement;\n disabled?: boolean;\n styles?: InputBoxStylesProps;\n autoFocus?: 'sendBoxTextField';\n /* @conditional-compile-remove(mention) */\n mentionLookupOptions?: MentionLookupOptions;\n};\n\n/**\n * @private\n */\nexport const InputBoxComponent = (props: InputBoxComponentProps): JSX.Element => {\n const {\n styles,\n id,\n 'data-ui-id': dataUiId,\n textValue,\n onChange,\n textFieldRef,\n placeholderText,\n onKeyDown,\n onEnterKeyDown,\n supportNewline,\n inputClassName,\n errorMessage,\n disabled,\n /* @conditional-compile-remove(mention) */\n mentionLookupOptions,\n children\n } = props;\n const inputBoxRef = useRef<HTMLDivElement>(null);\n\n /* @conditional-compile-remove(mention) */\n // Current suggestion list, provided by the callback\n const [mentionSuggestions, setMentionSuggestions] = useState<Mention[]>([]);\n /* @conditional-compile-remove(mention) */\n // Current suggestion list, provided by the callback\n const [activeSuggestionIndex, setActiveSuggestionIndex] = useState<number | undefined>(undefined);\n\n /* @conditional-compile-remove(mention) */\n // Index of the current trigger character in the text field\n const [currentTriggerStartIndex, setCurrentTriggerStartIndex] = useState<number>(-1);\n /* @conditional-compile-remove(mention) */\n const [inputTextValue, setInputTextValue] = useState<string>('');\n /* @conditional-compile-remove(mention) */\n const [tagsValue, setTagsValue] = useState<TagData[]>([]);\n /* @conditional-compile-remove(mention) */\n // Index of the previous selection start in the text field\n const [selectionStartValue, setSelectionStartValue] = useState<number | null>(null);\n /* @conditional-compile-remove(mention) */\n // Index of the previous selection end in the text field\n const [selectionEndValue, setSelectionEndValue] = useState<number | null>(null);\n /* @conditional-compile-remove(mention) */\n // Boolean value to check if onMouseDown event should be handled during select as selection range for onMouseDown event is not updated yet and the selection range for mouse click/taps will be updated in onSelect event if needed.\n const [shouldHandleOnMouseDownDuringSelect, setShouldHandleOnMouseDownDuringSelect] = useState<boolean>(true);\n\n /* @conditional-compile-remove(mention) */\n // Caret position in the text field\n const [caretPosition, setCaretPosition] = useState<Caret.Position | undefined>(undefined);\n /* @conditional-compile-remove(mention) */\n // Index of where the caret is in the text field\n const [caretIndex, setCaretIndex] = useState<number | undefined>(undefined);\n /* @conditional-compile-remove(mention) */\n const localeStrings = useLocale().strings;\n\n /* @conditional-compile-remove(mention) */\n // Set mention suggestions\n const updateMentionSuggestions = useCallback(\n (suggestions: Mention[]) => {\n setMentionSuggestions(suggestions);\n },\n [setMentionSuggestions]\n );\n\n /* @conditional-compile-remove(mention) */\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(textValue, trigger);\n setInputTextValue(parsedHTMLData.plainText);\n setTagsValue(parsedHTMLData.tags);\n updateMentionSuggestions([]);\n }, [textValue, mentionLookupOptions?.trigger, updateMentionSuggestions]);\n\n const mergedRootStyle = mergeStyles(inputBoxWrapperStyle, styles?.root);\n const mergedTextFiledStyle = mergeStyles(\n inputBoxStyle,\n inputClassName,\n props.inlineChildren ? {} : inputBoxNewLineSpaceAffordance\n );\n\n /* @conditional-compile-remove(mention) */\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.length, textFieldRef, setSelectionStartValue, setSelectionEndValue]);\n\n const mergedTextContainerStyle = mergeStyles(textContainerStyle, styles?.textFieldContainer);\n const mergedTextFieldStyle = concatStyleSets(textFieldStyle, {\n fieldGroup: styles?.textField,\n errorMessage: styles?.systemMessage,\n suffix: {\n backgroundColor: 'transparent',\n // Remove empty space in the suffix area when adding newline-style buttons\n display: props.inlineChildren ? 'flex' : 'contents',\n padding: '0 0.25rem'\n }\n });\n\n const mergedChildrenStyle = mergeStyles(props.inlineChildren ? {} : newLineButtonsContainerStyle);\n\n /* @conditional-compile-remove(mention) */\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 newPlainText =\n inputTextValue.substring(0, currentTriggerStartIndex) + mention + inputTextValue.substring(selectionEnd);\n const triggerText = mentionLookupOptions?.trigger ?? DEFAULT_MENTION_TRIGGER;\n // update html text with updated plain text\n const updatedContent = updateHTML({\n htmlText: textValue,\n oldPlainText,\n newPlainText,\n tags: tagsValue,\n startIndex: currentTriggerStartIndex,\n oldPlainTextEndIndex: selectionEnd,\n change: mention,\n mentionTrigger: triggerText\n });\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 textValue,\n tagsValue,\n /* @conditional-compile-remove(mention) */\n updateMentionSuggestions,\n /* @conditional-compile-remove(mention) */\n localeStrings\n ]\n );\n\n const onTextFieldKeyDown = useCallback(\n (ev: React.KeyboardEvent<HTMLInputElement | HTMLTextAreaElement>) => {\n /* @conditional-compile-remove(mention) */\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 /* @conditional-compile-remove(mention) */\n setShouldHandleOnMouseDownDuringSelect(false);\n // Uses KeyCode 229 and which code 229 to determine if the press of the enter key is from a composition session or not (Safari only)\n if (ev.nativeEvent.isComposing || ev.nativeEvent.keyCode === 229 || ev.nativeEvent.which === 229) {\n return;\n }\n if (ev.key === 'ArrowUp') {\n ev.preventDefault();\n /* @conditional-compile-remove(mention) */\n if (mentionSuggestions.length > 0) {\n const newActiveIndex =\n activeSuggestionIndex === undefined\n ? mentionSuggestions.length - 1\n : Math.max(activeSuggestionIndex - 1, 0);\n setActiveSuggestionIndex(newActiveIndex);\n }\n } else if (ev.key === 'ArrowDown') {\n ev.preventDefault();\n /* @conditional-compile-remove(mention) */\n if (mentionSuggestions.length > 0) {\n const newActiveIndex =\n activeSuggestionIndex === undefined\n ? 0\n : Math.min(activeSuggestionIndex + 1, mentionSuggestions.length - 1);\n setActiveSuggestionIndex(newActiveIndex);\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 /* @conditional-compile-remove(mention) */\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 }\n onKeyDown && onKeyDown(ev);\n },\n [\n onEnterKeyDown,\n onKeyDown,\n supportNewline,\n /* @conditional-compile-remove(mention) */\n mentionSuggestions,\n /* @conditional-compile-remove(mention) */\n activeSuggestionIndex,\n /* @conditional-compile-remove(mention) */\n onSuggestionSelected\n ]\n );\n\n const onRenderChildren = (): JSX.Element => {\n return (\n <Stack horizontal className={mergedChildrenStyle}>\n {children}\n </Stack>\n );\n };\n\n /* @conditional-compile-remove(mention) */\n const debouncedQueryUpdate = useDebouncedCallback(async (query?: string) => {\n if (query === undefined) {\n updateMentionSuggestions([]);\n return;\n }\n const suggestions = (await mentionLookupOptions?.onQueryUpdated(query)) ?? [];\n if (suggestions.length === 0) {\n setActiveSuggestionIndex(undefined);\n } else if (activeSuggestionIndex === undefined) {\n setActiveSuggestionIndex(0);\n }\n updateMentionSuggestions(suggestions);\n }, 500);\n\n /* @conditional-compile-remove(mention) */\n useEffect(() => {\n return () => {\n debouncedQueryUpdate.cancel();\n };\n }, [debouncedQueryUpdate]);\n\n /* @conditional-compile-remove(mention) */\n // Update selections index in mention to navigate by words\n const updateSelectionIndexesWithMentionIfNeeded = useCallback(\n (\n event: FormEvent<HTMLInputElement | HTMLTextAreaElement>,\n inputTextValue: string,\n selectionStartValue: number | null,\n selectionEndValue: number | null,\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(updatedStartIndex);\n setSelectionEndValue(updatedEndIndex);\n },\n [setSelectionStartValue, setSelectionEndValue]\n );\n\n /* @conditional-compile-remove(mention) */\n const handleOnSelect = useCallback(\n (\n event: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>,\n inputTextValue: string,\n tags: TagData[],\n shouldHandleOnMouseDownDuringSelect: boolean,\n selectionStartValue: number | null,\n selectionEndValue: number | null\n ): void => {\n /* @conditional-compile-remove(mention) */\n if (shouldHandleOnMouseDownDuringSelect && event.currentTarget.selectionStart !== null) {\n // on select was triggered by mouse down\n const mentionTag = findMentionTagForSelection(tags, event.currentTarget.selectionStart);\n if (mentionTag !== undefined && mentionTag.plainTextBeginIndex !== undefined) {\n // handle mention click\n if (event.currentTarget.selectionDirection === null) {\n event.currentTarget.setSelectionRange(\n mentionTag.plainTextBeginIndex,\n mentionTag.plainTextEndIndex ?? mentionTag.plainTextBeginIndex\n );\n } else {\n event.currentTarget.setSelectionRange(\n mentionTag.plainTextBeginIndex,\n mentionTag.plainTextEndIndex ?? mentionTag.plainTextBeginIndex,\n event.currentTarget.selectionDirection\n );\n }\n setSelectionStartValue(mentionTag.plainTextBeginIndex);\n setSelectionEndValue(mentionTag.plainTextEndIndex ?? mentionTag.plainTextBeginIndex);\n } else {\n setSelectionStartValue(event.currentTarget.selectionStart);\n setSelectionEndValue(event.currentTarget.selectionEnd);\n }\n } else {\n // selection was changed by keyboard\n updateSelectionIndexesWithMentionIfNeeded(event, inputTextValue, selectionStartValue, selectionEndValue, tags);\n }\n // don't set setShouldHandleOnMouseDownDuringSelect(false) here as setSelectionRange could trigger additional calls of onSelect event and they may not be handled correctly (because of setSelectionRange calls or rerender)\n },\n [updateSelectionIndexesWithMentionIfNeeded]\n );\n\n /* @conditional-compile-remove(mention) */\n const handleOnChange = useCallback(\n async (\n event: React.FormEvent<HTMLInputElement | HTMLTextAreaElement>,\n tagsValue: TagData[],\n htmlTextValue: string,\n inputTextValue: string,\n currentTriggerStartIndex: number,\n previousSelectionStart?: number,\n previousSelectionEnd?: number,\n currentSelectionStart?: number,\n currentSelectionEnd?: number,\n updatedValue?: string\n ): Promise<void> => {\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, if not doing a lookup\n setCaretPosition(Caret.getRelativePosition(event.currentTarget));\n\n if (triggerPriorIndex !== undefined) {\n // trigger is found\n const isSpaceBeforeTrigger = newValue.substring(triggerPriorIndex - 1, triggerPriorIndex) === ' ';\n const wordAtSelection = newValue.substring(triggerPriorIndex, currentSelectionEndValue);\n let tagIndex = currentTriggerStartIndex;\n if (!isSpaceBeforeTrigger && triggerPriorIndex !== 0) {\n //no space before the trigger <- 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 await debouncedQueryUpdate(undefined);\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 let result = '';\n if (tagsValue.length === 0) {\n // no tags in the string and newValue should be used as a result string\n result = newValue;\n } else {\n // there are tags in the text value and htmlTextValue is html string\n // find diff between old and new text\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 const change = newValue.substring(changeStart, newChangeEnd);\n // get updated html string\n const updatedContent = updateHTML({\n htmlText: htmlTextValue,\n oldPlainText: inputTextValue,\n newPlainText: newValue,\n tags: tagsValue,\n startIndex: changeStart,\n oldPlainTextEndIndex: oldChangeEnd,\n change,\n mentionTrigger: triggerText\n });\n result = updatedContent.updatedHTML;\n // update caret index if needed\n if (updatedContent.updatedSelectionIndex !== null) {\n setCaretIndex(updatedContent.updatedSelectionIndex);\n setSelectionEndValue(updatedContent.updatedSelectionIndex);\n setSelectionStartValue(updatedContent.updatedSelectionIndex);\n }\n }\n\n onChange && onChange(event, result);\n },\n [onChange, mentionLookupOptions, setCaretIndex, setCaretPosition, debouncedQueryUpdate]\n );\n\n const getInputFieldTextValue = (): string => {\n /* @conditional-compile-remove(mention) */\n return inputTextValue;\n return textValue;\n };\n\n return (\n <Stack className={mergedRootStyle}>\n <div className={mergedTextContainerStyle}>\n {\n /* @conditional-compile-remove(mention) */ 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 }\n <TextField\n autoFocus={props.autoFocus === 'sendBoxTextField'}\n data-ui-id={dataUiId}\n multiline\n autoAdjustHeight\n multiple={false}\n resizable={false}\n componentRef={textFieldRef}\n id={id}\n inputClassName={mergedTextFiledStyle}\n placeholder={placeholderText}\n value={getInputFieldTextValue()}\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 /* @conditional-compile-remove(mention) */\n // Prevents React from resetting event's properties\n e.persist();\n /* @conditional-compile-remove(mention) */\n setInputTextValue(newValue ?? '');\n /* @conditional-compile-remove(mention) */\n handleOnChange(\n e,\n tagsValue,\n textValue,\n inputTextValue,\n currentTriggerStartIndex,\n selectionStartValue === null ? undefined : selectionStartValue,\n selectionEndValue === null ? undefined : selectionEndValue,\n e.currentTarget.selectionStart === null ? undefined : e.currentTarget.selectionStart,\n e.currentTarget.selectionEnd === null ? undefined : e.currentTarget.selectionEnd,\n newValue\n );\n /* @conditional-compile-remove(mention) */\n return;\n onChange(e, newValue);\n }}\n /* @conditional-compile-remove(mention) */\n onSelect={(e) => {\n // update selection if needed\n if (caretIndex !== undefined) {\n setCaretIndex(undefined);\n // sometimes setting selectionRage in effect for updating caretIndex doesn't work as expected and onSelect should handle this case\n if (caretIndex !== e.currentTarget.selectionStart || caretIndex !== e.currentTarget.selectionEnd) {\n e.currentTarget.setSelectionRange(caretIndex, caretIndex);\n }\n return;\n }\n handleOnSelect(\n e,\n inputTextValue,\n tagsValue,\n shouldHandleOnMouseDownDuringSelect,\n selectionStartValue,\n selectionEndValue\n );\n }}\n /* @conditional-compile-remove(mention) */\n onMouseDown={() => {\n // as events order is onMouseDown -> 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 setShouldHandleOnMouseDownDuringSelect(true);\n }}\n /* @conditional-compile-remove(mention) */\n onTouchStart={() => {\n // see onMouseDown for more details\n setShouldHandleOnMouseDownDuringSelect(true);\n }}\n /* @conditional-compile-remove(mention) */\n onBlur={() => {\n // setup all flags to default values when text field loses focus\n setShouldHandleOnMouseDownDuringSelect(false);\n setCaretIndex(undefined);\n setSelectionStartValue(null);\n setSelectionEndValue(null);\n }}\n autoComplete=\"off\"\n onKeyDown={onTextFieldKeyDown}\n styles={mergedTextFieldStyle}\n disabled={disabled}\n errorMessage={errorMessage}\n onRenderSuffix={onRenderChildren}\n elementRef={inputBoxRef}\n />\n </div>\n </Stack>\n );\n};\n\n/**\n * Props for displaying a send button besides the text input area.\n *\n * @private\n */\nexport type InputBoxButtonProps = {\n onRenderIcon: (isHover: boolean) => JSX.Element;\n onClick: (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\n className?: string;\n id?: string;\n ariaLabel?: string;\n tooltipContent?: string;\n};\n\n/**\n * @private\n */\nexport const InputBoxButton = (props: InputBoxButtonProps): JSX.Element => {\n const { onRenderIcon, onClick, ariaLabel, className, id, tooltipContent } = props;\n const [isHover, setIsHover] = useState(false);\n const mergedButtonStyle = mergeStyles(inputButtonStyle, className);\n\n const theme = useTheme();\n const calloutStyle: Partial<ICalloutContentStyles> = { root: { padding: 0 }, calloutMain: { padding: '0.5rem' } };\n\n // Place callout with no gap between it and the button.\n const calloutProps = {\n gapSpace: 0,\n styles: calloutStyle,\n backgroundColor: isDarkThemed(theme) ? theme.palette.neutralLighter : ''\n };\n return (\n <TooltipHost hostClassName={inputButtonTooltipStyle} content={tooltipContent} calloutProps={{ ...calloutProps }}>\n <IconButton\n className={mergedButtonStyle}\n ariaLabel={ariaLabel}\n onClick={onClick}\n id={id}\n onMouseEnter={() => {\n setIsHover(true);\n }}\n onMouseLeave={() => {\n setIsHover(false);\n }}\n // VoiceOver fix: Avoid icon from stealing focus when IconButton is double-tapped to send message by wrapping with Stack with pointerEvents style to none\n onRenderIcon={() => <Stack className={iconWrapperStyle}>{onRenderIcon(isHover)}</Stack>}\n />\n </TooltipHost>\n );\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Props for finding a valid index in range.\n *\n * @private\n */\ntype ValidatedIndexRangeProps = {\n min: number;\n max: number;\n currentValue?: number;\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Get validated value for index between min and max values. If currentValue is not defined, -1 will be used instead.\n *\n * @private\n * @param props - Props for finding a valid index in range.\n * @returns Valid index in the range.\n */\nconst getValidatedIndexInRange = (props: ValidatedIndexRangeProps): number => {\n const { min, max, currentValue } = props;\n let updatedValue = currentValue ?? -1;\n updatedValue = Math.max(min, updatedValue);\n updatedValue = Math.min(updatedValue, max);\n return updatedValue;\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Find mention tag for selection if exists.\n *\n * @private\n * @param tags - Existing list of tags.\n * @param selection - Selection index.\n * @returns Mention tag if exists, otherwise undefined.\n */\nconst findMentionTagForSelection = (tags: TagData[], selection: number): TagData | undefined => {\n let mentionTag: TagData | undefined = undefined;\n for (let i = 0; i < tags.length; i++) {\n const tag = tags[i];\n\n const closingTagInfo = getTagClosingTagInfo(tag);\n if (tag.plainTextBeginIndex !== undefined && tag.plainTextBeginIndex > selection) {\n // no need to check further as the selection is before the tag\n break;\n } else if (\n tag.plainTextBeginIndex !== undefined &&\n tag.plainTextBeginIndex <= selection &&\n selection <= closingTagInfo.plainTextEndIndex\n ) {\n // no need to check if tag doesn't contain selection\n if (tag.subTags !== undefined && tag.subTags.length !== 0) {\n const selectedTag = findMentionTagForSelection(tag.subTags, selection);\n if (selectedTag !== undefined) {\n mentionTag = selectedTag;\n break;\n }\n } else if (tag.tagType === MSFT_MENTION_TAG) {\n mentionTag = tag;\n break;\n }\n }\n }\n return mentionTag;\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Props for finding new selection index for mention\n *\n * @private\n */\ntype NewSelectionIndexForMentionProps = {\n tag: TagData;\n textValue: string;\n currentSelectionIndex: number;\n previousSelectionIndex: number;\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Find a new the selection index.\n *\n * @private\n * @param props - Props for finding new selection index for mention.\n * @returns New selection index if it is inside of a mention tag, otherwise the current selection.\n */\nconst findNewSelectionIndexForMention = (props: NewSelectionIndexForMentionProps): number => {\n const { tag, textValue, currentSelectionIndex, previousSelectionIndex } = props;\n // check if this is a mention tag and selection should be updated\n if (\n tag.tagType !== MSFT_MENTION_TAG ||\n tag.plainTextBeginIndex === undefined ||\n currentSelectionIndex === previousSelectionIndex ||\n tag.plainTextEndIndex === undefined\n ) {\n return currentSelectionIndex;\n }\n let spaceIndex = 0;\n if (currentSelectionIndex <= previousSelectionIndex) {\n // the cursor is moved to the left, find the last index before the cursor\n spaceIndex = textValue.lastIndexOf(' ', currentSelectionIndex ?? 0);\n if (spaceIndex === -1) {\n // no space before the selection, use the beginning of the tag\n spaceIndex = tag.plainTextBeginIndex;\n }\n } else {\n // the cursor is moved to the right, find the fist index after the cursor\n spaceIndex = textValue.indexOf(' ', currentSelectionIndex ?? 0);\n if (spaceIndex === -1) {\n // no space after the selection, use the end of the tag\n spaceIndex = tag.plainTextEndIndex ?? tag.plainTextBeginIndex;\n }\n }\n spaceIndex = Math.max(tag.plainTextBeginIndex, spaceIndex);\n spaceIndex = Math.min(tag.plainTextEndIndex, spaceIndex);\n return spaceIndex;\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Props for mention update HTML function\n *\n * @private\n */\ntype MentionTagUpdateProps = {\n htmlText: string;\n oldPlainText: string;\n lastProcessedHTMLIndex: number;\n processedChange: string;\n change: string;\n tag: TagData;\n closeTagIdx: number;\n closeTagLength: number;\n plainTextEndIndex: number;\n startIndex: number;\n oldPlainTextEndIndex: number;\n mentionTagLength: number;\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Result for mention update HTML function\n *\n * @private\n */\ntype MentionTagUpdateResult = {\n result: string;\n updatedChange: string;\n htmlIndex: number;\n plainTextSelectionEndIndex: number | null;\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Handle mention tag edit and by word deleting\n *\n * @private\n * @param props - Props for mention update HTML function.\n * @returns Updated texts and indexes.\n */\nconst handleMentionTagUpdate = (props: MentionTagUpdateProps): MentionTagUpdateResult => {\n const {\n htmlText,\n oldPlainText,\n change,\n tag,\n closeTagIdx,\n closeTagLength,\n plainTextEndIndex,\n startIndex,\n oldPlainTextEndIndex,\n mentionTagLength\n } = props;\n let processedChange = props.processedChange;\n let lastProcessedHTMLIndex = props.lastProcessedHTMLIndex;\n if (tag.tagType !== MSFT_MENTION_TAG || tag.plainTextBeginIndex === undefined) {\n // not a mention tag\n return {\n result: '',\n updatedChange: processedChange,\n htmlIndex: lastProcessedHTMLIndex,\n plainTextSelectionEndIndex: null\n };\n }\n let result = '';\n let plainTextSelectionEndIndex: number | null = null;\n let rangeStart: number;\n let rangeEnd: number;\n // check if space symbol is handled in case if string looks like '<1 2 3>'\n let isSpaceLengthHandled = false;\n rangeStart = oldPlainText.lastIndexOf(' ', startIndex);\n if (rangeStart !== -1 && rangeStart !== undefined && rangeStart > tag.plainTextBeginIndex) {\n isSpaceLengthHandled = true;\n }\n rangeEnd = oldPlainText.indexOf(' ', oldPlainTextEndIndex);\n if (rangeEnd === -1 || rangeEnd === undefined) {\n // check if space symbol is not found\n rangeEnd = plainTextEndIndex;\n } else if (!isSpaceLengthHandled) {\n // +1 to include the space symbol\n rangeEnd += 1;\n }\n isSpaceLengthHandled = true;\n\n if (rangeStart === -1 || rangeStart === undefined || rangeStart < tag.plainTextBeginIndex) {\n // rangeStart should be at least equal to tag.plainTextBeginIndex\n rangeStart = tag.plainTextBeginIndex;\n }\n if (rangeEnd > plainTextEndIndex) {\n // rangeEnd should be at most equal to plainTextEndIndex\n rangeEnd = plainTextEndIndex;\n }\n if (rangeStart === tag.plainTextBeginIndex && rangeEnd === plainTextEndIndex) {\n // the whole tag should be removed\n result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx) + processedChange;\n plainTextSelectionEndIndex = tag.plainTextBeginIndex + processedChange.length;\n processedChange = '';\n lastProcessedHTMLIndex = closeTagIdx + closeTagLength;\n } else {\n // only part of the tag should be removed\n let startChangeDiff = 0;\n let endChangeDiff = 0;\n // need to check only rangeStart > tag.plainTextBeginIndex as when rangeStart === tag.plainTextBeginIndex startChangeDiff = 0 and mentionTagLength shouldn't be subtracted\n if (rangeStart > tag.plainTextBeginIndex) {\n startChangeDiff = rangeStart - tag.plainTextBeginIndex - mentionTagLength;\n }\n endChangeDiff = rangeEnd - tag.plainTextBeginIndex - mentionTagLength;\n result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx + tag.openTagBody.length + startChangeDiff);\n\n if (startIndex < tag.plainTextBeginIndex) {\n // if the change is before the tag, the selection should start from startIndex (rangeStart will be equal to tag.plainTextBeginIndex)\n plainTextSelectionEndIndex = startIndex + change.length;\n } else {\n // if the change is inside the tag, the selection should start with rangeStart\n plainTextSelectionEndIndex = rangeStart + processedChange.length;\n }\n lastProcessedHTMLIndex = tag.openTagIdx + tag.openTagBody.length + endChangeDiff;\n // processed change should not be changed as it should be added after the tag\n }\n return { result, updatedChange: processedChange, htmlIndex: lastProcessedHTMLIndex, plainTextSelectionEndIndex };\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Closing tag information\n *\n * @private\n */\ntype ClosingTagInfoResult = {\n plainTextEndIndex: number;\n closeTagIdx: number;\n closeTagLength: number;\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Get closing tag information if exists otherwise return information as for self closing tag\n *\n * @private\n * @param tag - Tag data.\n * @returns Closing tag information for the provided tag.\n */\nconst getTagClosingTagInfo = (tag: TagData): ClosingTagInfoResult => {\n let plainTextEndIndex = 0;\n let closeTagIdx = 0;\n let closeTagLength = 0;\n if (tag.plainTextEndIndex !== undefined && tag.closeTagIdx !== undefined) {\n // close tag exists\n plainTextEndIndex = tag.plainTextEndIndex;\n closeTagIdx = tag.closeTagIdx;\n // tag.tagType.length + </>\n closeTagLength = tag.tagType.length + 3;\n } else if (tag.plainTextBeginIndex !== undefined) {\n // no close tag\n plainTextEndIndex = tag.plainTextBeginIndex;\n closeTagIdx = tag.openTagIdx + tag.openTagBody.length;\n closeTagLength = 0;\n }\n return { plainTextEndIndex, closeTagIdx, closeTagLength };\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Props for update HTML function\n *\n * @private\n */\ntype UpdateHTMLProps = {\n htmlText: string;\n oldPlainText: string;\n newPlainText: string;\n tags: TagData[];\n startIndex: number;\n oldPlainTextEndIndex: number;\n change: string;\n mentionTrigger: string;\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Go through the text and update it with the changed text\n *\n * @private\n * @param props - Props for update HTML function.\n * @returns Updated HTML and selection index if the selection index should be set.\n */\nconst updateHTML = (props: UpdateHTMLProps): { updatedHTML: string; updatedSelectionIndex: number | null } => {\n const { htmlText, oldPlainText, newPlainText, tags, startIndex, oldPlainTextEndIndex, change, mentionTrigger } =\n props;\n if (tags.length === 0 || (startIndex === 0 && oldPlainTextEndIndex === oldPlainText.length - 1)) {\n // no tags added yet or the whole text is changed\n return { updatedHTML: newPlainText, updatedSelectionIndex: null };\n }\n let result = '';\n let lastProcessedHTMLIndex = 0;\n // the value can be updated with empty string when the change covers more than 1 place (tag + before or after the tag)\n // in this case change won't be added as part of the tag\n // e.g.: change is before and partially in tag => change will be added before the tag and outdated text in the tag will be removed\n // e.g.: change is after and partially in tag => change will be added after the tag and outdated text in the tag will be removed\n // e.g.: change is on the beginning of the tag => change will be added before the tag\n // e.g.: change is on the end of the tag => change will be added to the tag if it's not mention and after the tag if it's mention\n let processedChange = change;\n // end tag plain text index of the last processed tag\n let lastProcessedPlainTextTagEndIndex = 0;\n // as some tags/text can be removed fully, selection should be updated correctly\n let changeNewEndIndex: number | null = null;\n\n for (let i = 0; i < tags.length; i++) {\n const tag = tags[i];\n if (tag.plainTextBeginIndex === undefined) {\n continue;\n }\n // all plain text indexes includes trigger length for the mention that shouldn't be included in\n // htmlText.substring because html strings don't include the trigger\n // mentionTagLength will be set only for mention tag, otherwise should be 0\n let mentionTagLength = 0;\n let isMentionTag = false;\n if (tag.tagType === MSFT_MENTION_TAG) {\n mentionTagLength = mentionTrigger.length;\n isMentionTag = true;\n }\n if (startIndex <= tag.plainTextBeginIndex) {\n // change start is before the open tag\n // Math.max(lastProcessedPlainTextTagEndIndex, startIndex) is used as startIndex may not be in [[previous tag].plainTextEndIndex - tag.plainTextBeginIndex] range\n const startChangeDiff = tag.plainTextBeginIndex - Math.max(lastProcessedPlainTextTagEndIndex, startIndex);\n result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx - startChangeDiff) + processedChange;\n processedChange = '';\n if (oldPlainTextEndIndex <= tag.plainTextBeginIndex) {\n // the whole change is before tag start\n // mentionTag length can be ignored here as the change is before the tag\n const endChangeDiff = tag.plainTextBeginIndex - oldPlainTextEndIndex;\n lastProcessedHTMLIndex = tag.openTagIdx - endChangeDiff;\n // the change is handled; exit\n break;\n } else {\n // change continues in the tag\n lastProcessedHTMLIndex = tag.openTagIdx;\n // proceed to the next check\n }\n }\n const closingTagInfo = getTagClosingTagInfo(tag);\n if (startIndex <= closingTagInfo.plainTextEndIndex) {\n // change started before the end tag\n if (startIndex <= tag.plainTextBeginIndex && oldPlainTextEndIndex === closingTagInfo.plainTextEndIndex) {\n // the change is a tag or starts before the tag\n // tag should be removed, no matter if there are subtags\n result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx) + processedChange;\n processedChange = '';\n lastProcessedHTMLIndex = closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength;\n // the change is handled; exit\n break;\n } else if (startIndex >= tag.plainTextBeginIndex && oldPlainTextEndIndex <= closingTagInfo.plainTextEndIndex) {\n // the change is between the tag\n if (isMentionTag) {\n if (change !== '') {\n if (startIndex !== tag.plainTextBeginIndex && startIndex !== closingTagInfo.plainTextEndIndex) {\n // mention tag should be deleted when user tries to edit it in the middle\n result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx) + processedChange;\n changeNewEndIndex = tag.plainTextBeginIndex + processedChange.length;\n lastProcessedHTMLIndex = closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength;\n } else if (startIndex === tag.plainTextBeginIndex) {\n // non empty change at the beginning of the mention tag to be added before the mention tag\n result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx) + processedChange;\n changeNewEndIndex = tag.plainTextBeginIndex + processedChange.length;\n lastProcessedHTMLIndex = tag.openTagIdx;\n } else if (startIndex === closingTagInfo.plainTextEndIndex) {\n // non empty change at the end of the mention tag to be added after the mention tag\n result +=\n htmlText.substring(lastProcessedHTMLIndex, closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength) +\n processedChange;\n changeNewEndIndex = closingTagInfo.plainTextEndIndex + processedChange.length;\n lastProcessedHTMLIndex = closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength;\n }\n processedChange = '';\n } else {\n const updateMentionTagResult = handleMentionTagUpdate({\n htmlText,\n oldPlainText,\n lastProcessedHTMLIndex,\n processedChange,\n change,\n tag,\n closeTagIdx: closingTagInfo.closeTagIdx,\n closeTagLength: closingTagInfo.closeTagLength,\n plainTextEndIndex: closingTagInfo.plainTextEndIndex,\n startIndex,\n oldPlainTextEndIndex,\n mentionTagLength\n });\n result += updateMentionTagResult.result;\n changeNewEndIndex = updateMentionTagResult.plainTextSelectionEndIndex;\n processedChange = updateMentionTagResult.updatedChange;\n lastProcessedHTMLIndex = updateMentionTagResult.htmlIndex;\n }\n } else if (tag.subTags !== undefined && tag.subTags.length !== 0 && tag.content !== undefined) {\n // with subtags\n const stringBefore = htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx + tag.openTagBody.length);\n lastProcessedHTMLIndex = closingTagInfo.closeTagIdx;\n const updatedContent = updateHTML({\n htmlText: tag.content,\n oldPlainText,\n newPlainText,\n tags: tag.subTags,\n startIndex,\n oldPlainTextEndIndex,\n change: processedChange,\n mentionTrigger\n });\n result += stringBefore + updatedContent.updatedHTML;\n changeNewEndIndex = updatedContent.updatedSelectionIndex;\n } else {\n // no subtags\n const startChangeDiff = startIndex - tag.plainTextBeginIndex;\n result +=\n htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx + tag.openTagBody.length + startChangeDiff) +\n processedChange;\n processedChange = '';\n if (oldPlainTextEndIndex < closingTagInfo.plainTextEndIndex) {\n const endChangeDiff = oldPlainTextEndIndex - tag.plainTextBeginIndex;\n lastProcessedHTMLIndex = tag.openTagIdx + tag.openTagBody.length + endChangeDiff;\n } else if (oldPlainTextEndIndex === closingTagInfo.plainTextEndIndex) {\n lastProcessedHTMLIndex = closingTagInfo.closeTagIdx;\n }\n }\n // the change is handled; exit\n break;\n } else if (startIndex > tag.plainTextBeginIndex && oldPlainTextEndIndex > closingTagInfo.plainTextEndIndex) {\n // the change started in the tag but finishes somewhere further\n const startChangeDiff = startIndex - tag.plainTextBeginIndex - mentionTagLength;\n if (isMentionTag) {\n const updateMentionTagResult = handleMentionTagUpdate({\n htmlText,\n oldPlainText,\n lastProcessedHTMLIndex,\n processedChange: '',\n change,\n tag,\n closeTagIdx: closingTagInfo.closeTagIdx,\n closeTagLength: closingTagInfo.closeTagLength,\n plainTextEndIndex: closingTagInfo.plainTextEndIndex,\n startIndex,\n oldPlainTextEndIndex,\n mentionTagLength\n });\n result += updateMentionTagResult.result;\n lastProcessedHTMLIndex = updateMentionTagResult.htmlIndex;\n // no need to handle plainTextSelectionEndIndex as the change will be added later\n } else if (tag.subTags !== undefined && tag.subTags.length !== 0 && tag.content !== undefined) {\n // with subtags\n const stringBefore = htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx + tag.openTagBody.length);\n lastProcessedHTMLIndex = closingTagInfo.closeTagIdx;\n const updatedContent = updateHTML({\n htmlText: tag.content,\n oldPlainText,\n newPlainText,\n tags: tag.subTags,\n startIndex,\n oldPlainTextEndIndex,\n change: '', // the part of the tag should be just deleted without processedChange update and change will be added after this tag\n mentionTrigger\n });\n result += stringBefore + updatedContent.updatedHTML;\n } else {\n // no subtags\n result += htmlText.substring(\n lastProcessedHTMLIndex,\n tag.openTagIdx + tag.openTagBody.length + startChangeDiff\n );\n lastProcessedHTMLIndex = closingTagInfo.closeTagIdx;\n }\n // proceed with the next calculations\n } else if (startIndex < tag.plainTextBeginIndex && oldPlainTextEndIndex > closingTagInfo.plainTextEndIndex) {\n // the change starts before the tag and finishes after it\n // tag should be removed, no matter if there are subtags\n // no need to save anything between lastProcessedHTMLIndex and closeTagIdx + closeTagLength\n lastProcessedHTMLIndex = closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength;\n // proceed with the next calculations\n } else if (startIndex === tag.plainTextBeginIndex && oldPlainTextEndIndex > closingTagInfo.plainTextEndIndex) {\n // the change starts in the tag and finishes after it\n // tag should be removed, no matter if there are subtags\n result += htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx);\n // processedChange shouldn't be updated as it will be added after the tag\n lastProcessedHTMLIndex = closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength;\n // proceed with the next calculations\n } else if (startIndex < tag.plainTextBeginIndex && oldPlainTextEndIndex < closingTagInfo.plainTextEndIndex) {\n // the change starts before the tag and ends in a tag\n if (isMentionTag) {\n // mention tag\n const updateMentionTagResult = handleMentionTagUpdate({\n htmlText,\n oldPlainText,\n lastProcessedHTMLIndex,\n processedChange: '', // the part of mention should be just deleted without processedChange update\n change,\n tag,\n closeTagIdx: closingTagInfo.closeTagIdx,\n closeTagLength: closingTagInfo.closeTagLength,\n plainTextEndIndex: closingTagInfo.plainTextEndIndex,\n startIndex,\n oldPlainTextEndIndex,\n mentionTagLength\n });\n changeNewEndIndex = updateMentionTagResult.plainTextSelectionEndIndex;\n result += updateMentionTagResult.result;\n lastProcessedHTMLIndex = updateMentionTagResult.htmlIndex;\n } else if (tag.subTags !== undefined && tag.subTags.length !== 0 && tag.content !== undefined) {\n // with subtags\n const stringBefore = htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx + tag.openTagBody.length);\n lastProcessedHTMLIndex = closingTagInfo.closeTagIdx;\n const updatedContent = updateHTML({\n htmlText: tag.content,\n oldPlainText,\n newPlainText,\n tags: tag.subTags,\n startIndex,\n oldPlainTextEndIndex,\n change: processedChange, // processedChange should be equal '' and the part of the tag should be deleted as the change was handled before this tag\n mentionTrigger\n });\n processedChange = '';\n result += stringBefore + updatedContent.updatedHTML;\n } else {\n // no subtags\n result +=\n htmlText.substring(lastProcessedHTMLIndex, tag.openTagIdx + tag.openTagBody.length) + processedChange;\n processedChange = '';\n // oldPlainTextEndIndex already includes mentionTag length\n const endChangeDiff = closingTagInfo.plainTextEndIndex - oldPlainTextEndIndex;\n // as change may be before the end of the tag, we need to add the rest of the tag\n lastProcessedHTMLIndex = closingTagInfo.closeTagIdx - endChangeDiff;\n }\n // the change is handled; exit\n break;\n }\n lastProcessedPlainTextTagEndIndex = closingTagInfo.plainTextEndIndex;\n }\n\n if (i === tags.length - 1 && oldPlainTextEndIndex >= closingTagInfo.plainTextEndIndex) {\n // the last tag should handle the end of the change if needed\n // oldPlainTextEndIndex already includes mentionTag length\n const endChangeDiff = oldPlainTextEndIndex - closingTagInfo.plainTextEndIndex;\n if (startIndex >= closingTagInfo.plainTextEndIndex) {\n const startChangeDiff = startIndex - closingTagInfo.plainTextEndIndex;\n result +=\n htmlText.substring(\n lastProcessedHTMLIndex,\n closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength + startChangeDiff\n ) + processedChange;\n } else {\n result +=\n htmlText.substring(lastProcessedHTMLIndex, closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength) +\n processedChange;\n }\n processedChange = '';\n lastProcessedHTMLIndex = closingTagInfo.closeTagIdx + closingTagInfo.closeTagLength + endChangeDiff;\n // the change is handled; exit\n // break is not required here as this is the last element but added for consistency\n break;\n }\n }\n if (lastProcessedHTMLIndex < htmlText.length) {\n // add the rest of the html string\n result += htmlText.substring(lastProcessedHTMLIndex);\n }\n return { updatedHTML: result, updatedSelectionIndex: changeNewEndIndex };\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Props for finding strings diff indexes\n *\n * @private\n */\ntype DiffIndexesProps = {\n // the old text\n oldText: string;\n // the new text\n newText: string;\n // the start of previous selection, should be a valid position in the input field\n previousSelectionStart: number;\n // the end of previous selection, should be a valid position in the input field\n previousSelectionEnd: number;\n // the start of current selection, should be a valid position in the input field\n currentSelectionStart: number;\n // the end of current selection, should be a valid position in the input field\n currentSelectionEnd: number;\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Result of finding strings diff indexes function\n *\n * @private\n */\ntype DiffIndexesResult = {\n changeStart: number;\n oldChangeEnd: number;\n newChangeEnd: number;\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Given the oldText and newText, find the start index, old end index and new end index for the changes\n *\n * @private\n * @param props - Props for finding stings diff indexes function.\n * @returns Indexes for change start and ends in new and old texts. The old and new end indexes are exclusive.\n */\nconst findStringsDiffIndexes = (props: DiffIndexesProps): DiffIndexesResult => {\n const { oldText, newText, previousSelectionStart, previousSelectionEnd, currentSelectionStart, currentSelectionEnd } =\n props;\n const newTextLength = newText.length;\n const oldTextLength = oldText.length;\n // let changeStart = 0;\n let newChangeEnd = newTextLength;\n let oldChangeEnd = oldTextLength;\n const previousSelectionStartValue = previousSelectionStart > -1 ? previousSelectionStart : oldTextLength;\n const previousSelectionEndValue = previousSelectionEnd > -1 ? previousSelectionEnd : oldTextLength;\n const currentSelectionStartValue = currentSelectionStart > -1 ? currentSelectionStart : newTextLength;\n const currentSelectionEndValue = currentSelectionEnd > -1 ? currentSelectionEnd : newTextLength;\n const changeStart = Math.min(\n previousSelectionStartValue,\n previousSelectionEndValue,\n currentSelectionStartValue,\n currentSelectionEndValue,\n newTextLength,\n oldTextLength\n );\n\n if (oldTextLength < newTextLength) {\n //insert or replacement\n if (oldTextLength === changeStart) {\n // when change was at the end of string\n // change is found\n newChangeEnd = newTextLength;\n oldChangeEnd = oldTextLength;\n } else {\n for (let i = 1; i < newTextLength && oldTextLength - i >= changeStart; i++) {\n newChangeEnd = newTextLength - i - 1;\n oldChangeEnd = oldTextLength - i - 1;\n\n if (newText[newChangeEnd] !== oldText[oldChangeEnd]) {\n // change is found\n break;\n }\n }\n // make indexes exclusive\n newChangeEnd += 1;\n oldChangeEnd += 1;\n }\n } else if (oldTextLength > newTextLength) {\n //deletion or replacement\n if (newTextLength === changeStart) {\n // when change was at the end of string\n // change is found\n newChangeEnd = newTextLength;\n oldChangeEnd = oldTextLength;\n } else {\n for (let i = 1; i < oldTextLength && newTextLength - i >= changeStart; i++) {\n newChangeEnd = newTextLength - i - 1;\n oldChangeEnd = oldTextLength - i - 1;\n if (newText[newChangeEnd] !== oldText[oldChangeEnd]) {\n // change is found\n break;\n }\n }\n // make indexes exclusive\n newChangeEnd += 1;\n oldChangeEnd += 1;\n }\n } else {\n // replacement\n for (let i = 1; i < oldTextLength && oldTextLength - i >= changeStart; i++) {\n newChangeEnd = newTextLength - i - 1;\n oldChangeEnd = oldTextLength - i - 1;\n\n if (newText[newChangeEnd] !== oldText[oldChangeEnd]) {\n // change is found\n break;\n }\n }\n // make indexes exclusive if they aren't equal to the length of the string\n if (newChangeEnd !== newText.length) {\n newChangeEnd += 1;\n }\n if (oldChangeEnd !== oldText.length) {\n oldChangeEnd += 1;\n }\n }\n return { changeStart, oldChangeEnd, newChangeEnd };\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Get the html string for the mention suggestion.\n *\n * @private\n * @param suggestion - The mention suggestion.\n * @param localeStrings - The locale strings.\n * @returns The html string for the mention suggestion.\n */\nconst htmlStringForMentionSuggestion = (suggestion: Mention, localeStrings: ComponentStrings): string => {\n const idHTML = ' id =\"' + suggestion.id + '\"';\n const displayTextHTML = ' displayText =\"' + suggestion.displayText + '\"';\n const displayText = getDisplayNameForMentionSuggestion(suggestion, localeStrings);\n return '<' + MSFT_MENTION_TAG + idHTML + displayTextHTML + '>' + displayText + '</' + MSFT_MENTION_TAG + '>';\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Get display name for the mention suggestion.\n *\n * @private\n *\n * @param suggestion - The mention suggestion.\n * @param localeStrings - The locale strings.\n * @returns The display name for the mention suggestion or display name placeholder if display name is empty.\n */\nconst getDisplayNameForMentionSuggestion = (suggestion: Mention, localeStrings: ComponentStrings): string => {\n const displayNamePlaceholder = localeStrings.participantItem.displayNamePlaceholder;\n return suggestion.displayText !== '' ? suggestion.displayText : displayNamePlaceholder ?? '';\n};\n\n/* @conditional-compile-remove(mention) */\ntype TagData = {\n tagType: string; // The type of tag (e.g. msft-mention)\n openTagIdx: number; // Start of the tag relative to the parent content\n openTagBody: string; // Complete open tag body\n content?: string; // All content between the open and close tags\n closeTagIdx?: number; // Start of the close tag relative to the parent content\n subTags?: TagData[]; // Any child tags\n plainTextBeginIndex?: number; // Absolute index of the open tag start should be in plain text\n plainTextEndIndex?: number; // Absolute index of the close tag start should be in plain text\n};\n\n/* @conditional-compile-remove(mention) */\ntype HtmlTagType = 'open' | 'close' | 'self-closing';\n/* @conditional-compile-remove(mention) */\ntype HtmlTag = {\n content: string;\n startIdx: number;\n type: HtmlTagType;\n};\n\n/* @conditional-compile-remove(mention) */\n/**\n * Parse the text and return the tags and the plain text in one go\n * @private\n * @param text - The text to parse for HTML tags\n * @param trigger The trigger to show for the mention tag in plain text\n *\n * @returns An array of tags and the plain text representation\n */\nconst textToTagParser = (text: string, trigger: string): { tags: TagData[]; plainText: string } => {\n const tags: TagData[] = []; // Tags passed back to the caller\n const tagParseStack: TagData[] = []; // Local stack to use while parsing\n\n let plainTextRepresentation = '';\n\n let parseIndex = 0;\n while (parseIndex < text.length) {\n const foundHtmlTag = findNextHtmlTag(text, parseIndex);\n\n if (!foundHtmlTag) {\n if (parseIndex !== 0) {\n // Add the remaining text to the plain text representation\n plainTextRepresentation += text.substring(parseIndex);\n } else {\n plainTextRepresentation = text;\n }\n break;\n }\n\n if (foundHtmlTag.type === 'open' || foundHtmlTag.type === 'self-closing') {\n const nextTag = parseOpenTag(foundHtmlTag.content, foundHtmlTag.startIdx);\n // Add the plain text between the last tag and this one found\n plainTextRepresentation += text.substring(parseIndex, foundHtmlTag.startIdx);\n nextTag.plainTextBeginIndex = plainTextRepresentation.length;\n\n if (foundHtmlTag.type === 'open') {\n tagParseStack.push(nextTag);\n } else {\n nextTag.content = '';\n nextTag.plainTextBeginIndex = plainTextRepresentation.length;\n nextTag.plainTextEndIndex = plainTextRepresentation.length;\n addTag(nextTag, tagParseStack, tags);\n }\n }\n\n if (foundHtmlTag.type === 'close') {\n const currentOpenTag = tagParseStack.pop();\n const closeTagType = foundHtmlTag.content.substring(2, foundHtmlTag.content.length - 1).toLowerCase();\n\n if (currentOpenTag && currentOpenTag.tagType === closeTagType) {\n // Tag startIdx is absolute to the text. This is updated later to be relative to the parent tag\n currentOpenTag.content = text.substring(\n currentOpenTag.openTagIdx + currentOpenTag.openTagBody.length,\n foundHtmlTag.startIdx\n );\n\n // Insert the plain text pieces for the sub tags\n if (currentOpenTag.tagType === MSFT_MENTION_TAG) {\n plainTextRepresentation =\n plainTextRepresentation.slice(0, currentOpenTag.plainTextBeginIndex) +\n trigger +\n plainTextRepresentation.slice(currentOpenTag.plainTextBeginIndex);\n }\n\n if (!currentOpenTag.subTags) {\n plainTextRepresentation += currentOpenTag.content;\n } else if (currentOpenTag.subTags.length > 0) {\n // Add text after the last tag\n const lastSubTag = currentOpenTag.subTags[currentOpenTag.subTags.length - 1];\n const startOfRemainingText =\n (lastSubTag.closeTagIdx ?? lastSubTag.openTagIdx) + lastSubTag.tagType.length + 3;\n const trailingText = currentOpenTag.content.substring(startOfRemainingText);\n plainTextRepresentation += trailingText;\n }\n\n currentOpenTag.plainTextEndIndex = plainTextRepresentation.length;\n addTag(currentOpenTag, tagParseStack, tags);\n } else {\n console.error(\n 'Unexpected close tag found. Got \"' +\n closeTagType +\n '\" but expected \"' +\n tagParseStack[tagParseStack.length - 1]?.tagType +\n '\"'\n );\n }\n }\n\n // Update parsing index; move past the end of the close tag\n parseIndex = foundHtmlTag.startIdx + foundHtmlTag.content.length;\n } // While parseIndex < text.length loop\n\n return { tags, plainText: plainTextRepresentation };\n};\n\n/* @conditional-compile-remove(mention) */\nconst parseOpenTag = (tag: string, startIdx: number): TagData => {\n const tagType = tag\n .substring(1, tag.length - 1)\n .split(' ')[0]\n .toLowerCase()\n .replace('/', '');\n return {\n tagType,\n openTagIdx: startIdx,\n openTagBody: tag\n };\n};\n\n/* @conditional-compile-remove(mention) */\nconst findNextHtmlTag = (text: string, startIndex: number): HtmlTag | undefined => {\n const tagStartIndex = text.indexOf('<', startIndex);\n if (tagStartIndex === -1) {\n // No more tags\n return undefined;\n }\n const tagEndIndex = text.indexOf('>', tagStartIndex);\n if (tagEndIndex === -1) {\n // No close tag\n return undefined;\n }\n const tag = text.substring(tagStartIndex, tagEndIndex + 1);\n let type: HtmlTagType = 'open';\n if (tag[1] === '/') {\n type = 'close';\n } else if (tag[tag.length - 2] === '/') {\n type = 'self-closing';\n }\n return {\n content: tag,\n startIdx: tagStartIndex,\n type\n };\n};\n\n/* @conditional-compile-remove(mention) */\nconst addTag = (tag: TagData, parseStack: TagData[], tags: TagData[]): void => {\n // Add as sub-tag to the parent stack tag, if there is one\n const parentTag = parseStack[parseStack.length - 1];\n\n if (parentTag) {\n // Adjust the open tag index to be relative to the parent tag\n const parentContentStartIdx = parentTag.openTagIdx + parentTag.openTagBody.length;\n const relativeIdx = tag.openTagIdx - parentContentStartIdx;\n tag.openTagIdx = relativeIdx;\n }\n\n if (!tag.closeTagIdx) {\n // If the tag is self-closing, the close tag is the same as the open tag\n if (tag.openTagBody[tag.openTagBody.length - 2] === '/') {\n tag.closeTagIdx = tag.openTagIdx;\n } else {\n // Otherwise, the close tag index is the open tag index + the open tag body + the content length\n tag.closeTagIdx = tag.openTagIdx + tag.openTagBody.length + (tag.content ?? []).length;\n }\n }\n\n // Put the tag where it belongs\n if (!parentTag) {\n tags.push(tag);\n } else {\n if (!parentTag.subTags) {\n parentTag.subTags = [tag];\n } else {\n parentTag.subTags.push(tag);\n }\n }\n};\n"]}
|
@@ -22,7 +22,7 @@ export const _VideoEffectsItem = (props) => {
|
|
22
22
|
backgroundSize
|
23
23
|
}), [backgroundImage, disabled, isSelected, theme]);
|
24
24
|
return (React.createElement(TooltipHost, Object.assign({}, props.tooltipProps),
|
25
|
-
React.createElement(Stack, { key: props.key, className: mergeStyles((_d = props.styles) === null || _d === void 0 ? void 0 : _d.root), verticalAlign: "center", horizontalAlign: "center", styles: containerStyles, onClick: disabled ? undefined : () => { var _a; return (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.key); }, onKeyDown: disabled
|
25
|
+
React.createElement(Stack, { key: props.key, className: mergeStyles((_d = props.styles) === null || _d === void 0 ? void 0 : _d.root), verticalAlign: "center", horizontalAlign: "center", styles: containerStyles, "data-ui-id": `video-effects-item`, onClick: disabled ? undefined : () => { var _a; return (_a = props.onSelect) === null || _a === void 0 ? void 0 : _a.call(props, props.key); }, onKeyDown: disabled
|
26
26
|
? undefined
|
27
27
|
: (e) => {
|
28
28
|
var _a;
|
@@ -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,IAAI,EAMJ,WAAW,EACX,KAAK,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AA8F3C;;;;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;IAEnD,MAAM,eAAe,GAAG,WAAW,CACjC,GAAG,EAAE,CACH,+BAA+B,CAAC;QAC9B,KAAK;QACL,UAAU;QACV,QAAQ;QACR,eAAe;QACf,kBAAkB;QAClB,cAAc;KACf,CAAC,EACJ,CAAC,eAAe,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,CAAC,CAC/C,CAAC;IAEF,OAAO,CACL,oBAAC,WAAW,oBAAK,KAAK,CAAC,YAAY;QACjC,oBAAC,KAAK,IACJ,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,SAAS,EAAE,WAAW,CAAC,MAAA,KAAK,CAAC,MAAM,0CAAE,IAAI,CAAC,EAC1C,aAAa,EAAC,QAAQ,EACtB,eAAe,EAAC,QAAQ,EACxB,MAAM,EAAE,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,IAAI,EAMJ,WAAW,EACX,KAAK,EACL,IAAI,EACJ,WAAW,EACX,QAAQ,EACT,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AA8F3C;;;;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;IAEnD,MAAM,eAAe,GAAG,WAAW,CACjC,GAAG,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;gBACpB,SAAS,EAAE,YAAY;gBACvB,MAAM,EAAE,IAAI,CAAC,UAAU;oBACrB,CAAC,CAAC,GAAG,qBAAqB,UAAU,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE;oBACrE,CAAC,CAAC,GAAG,sBAAsB,UAAU,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE;gBAChF,MAAM,EAAE,MAAM;gBACd,KAAK,EAAE,MAAM;gBACb,YAAY,EAAE,SAAS;aACxB;YACD,QAAQ,EAAE;gBACR,QAAQ,EAAE;oBACR,MAAM,EACJ,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,UAAU;wBAC/B,CAAC,CAAC,GAAG,sBAAsB,UAAU,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,oBAAoB,EAAE;wBAC9E,CAAC,CAAC,GAAG,qBAAqB,UAAU,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE;iBAC1E;aACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC","sourcesContent":["// Copyright (c) Microsoft Corporation.\n// Licensed under the MIT license.\n\nimport {\n Icon,\n IIconProps,\n IStackStyles,\n IStyle,\n ITheme,\n ITooltipHostProps,\n mergeStyles,\n Stack,\n Text,\n TooltipHost,\n useTheme\n} from '@fluentui/react';\nimport React, { useCallback } from 'react';\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 key: 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/**\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\n const containerStyles = useCallback(\n () =>\n videoEffectsItemContainerStyles({\n theme,\n isSelected,\n disabled,\n backgroundImage,\n backgroundPosition,\n backgroundSize\n }),\n [backgroundImage, disabled, isSelected, theme]\n );\n\n return (\n <TooltipHost {...props.tooltipProps}>\n <Stack\n key={props.key}\n className={mergeStyles(props.styles?.root)}\n verticalAlign=\"center\"\n horizontalAlign=\"center\"\n styles={containerStyles}\n data-ui-id={`video-effects-item`}\n onClick={disabled ? undefined : () => props.onSelect?.(props.key)}\n onKeyDown={\n disabled\n ? undefined\n : (e) => {\n if (e.key === 'Enter' || e.key === ' ') {\n props.onSelect?.(props.key);\n }\n }\n }\n tabIndex={props.disabled ? -1 : 0}\n aria-label={props.ariaLabel}\n aria-disabled={props.disabled}\n role=\"button\"\n >\n {props.iconProps && (\n <Stack.Item styles={{ root: props.styles?.iconContainer }}>\n <Icon {...props.iconProps} />\n </Stack.Item>\n )}\n {props.title && (\n <Stack.Item styles={{ root: props.styles?.textContainer }}>\n <Text variant=\"small\">{props.title}</Text>\n </Stack.Item>\n )}\n </Stack>\n </TooltipHost>\n );\n};\n\nconst backgroundPosition = 'center';\nconst backgroundSize = 'cover';\n\nconst videoEffectsItemContainerStyles = (args: {\n theme: ITheme;\n isSelected: boolean;\n disabled: boolean;\n backgroundImage?: string;\n backgroundPosition?: string;\n backgroundSize?: string;\n}): IStackStyles => {\n const borderDefaultThickness = '1px';\n const borderActiveThickness = '2px';\n return {\n root: {\n background: args.disabled ? args.theme.palette.neutralQuaternaryAlt : undefined,\n backgroundImage: args.backgroundImage ? `url(${args.backgroundImage})` : undefined,\n backgroundPosition: args.backgroundPosition,\n backgroundSize: args.backgroundSize,\n borderRadius: '0.25rem',\n color: args.theme.palette.neutralPrimary,\n cursor: args.disabled ? 'default' : 'pointer',\n height: '3.375rem',\n position: 'relative', // Used for absolute positioning of :after\n width: '4.83rem',\n // Use :after to display a border element. This is used to prevent the background image\n // resizing when the border thichkness is changed. We also want the border to be inside\n // the frame of the container, i.e. we want it to expand inwards and not outwards when\n // border thickness changes from hover/selection.\n ':after': {\n content: '\"\"',\n position: 'absolute',\n boxSizing: 'border-box',\n border: args.isSelected\n ? `${borderActiveThickness} solid ${args.theme.palette.themePrimary}`\n : `${borderDefaultThickness} solid ${args.theme.palette.neutralQuaternaryAlt}`,\n height: '100%',\n width: '100%',\n borderRadius: '0.25rem'\n },\n ':hover': {\n ':after': {\n border:\n args.disabled && !args.isSelected\n ? `${borderDefaultThickness} solid ${args.theme.palette.neutralQuaternaryAlt}`\n : `${borderActiveThickness} solid ${args.theme.palette.themePrimary}`\n }\n }\n }\n };\n};\n"]}
|
@@ -25,6 +25,9 @@
|
|
25
25
|
"uploading": "Hochladen",
|
26
26
|
"uploadCompleted": "Upload abgeschlossen"
|
27
27
|
},
|
28
|
+
"mentionPopover": {
|
29
|
+
"mentionPopoverHeader": "Vorschläge"
|
30
|
+
},
|
28
31
|
"messageStatusIndicator": {
|
29
32
|
"deliveredAriaLabel": "Nachricht gesendet",
|
30
33
|
"deliveredTooltipText": "Gesendet",
|
@@ -56,7 +59,8 @@
|
|
56
59
|
"cameraActionTurnedOffAnnouncement": "Ihre Kamera wurde ausgeschaltet.",
|
57
60
|
"onSplitButtonPrimaryActionCamera": "Kamera ausschalten",
|
58
61
|
"offSplitButtonPrimaryActionCamera": "Kamera einschalten",
|
59
|
-
"cameraPrimaryActionSplitButtonTitle": "Kamera verwenden"
|
62
|
+
"cameraPrimaryActionSplitButtonTitle": "Kamera verwenden",
|
63
|
+
"videoEffectsMenuItemTitle": "Effekte"
|
60
64
|
},
|
61
65
|
"microphoneButton": {
|
62
66
|
"onLabel": "Stumm schalten",
|
@@ -170,7 +174,8 @@
|
|
170
174
|
"failedToJoinCallGeneric": "Fehler bei der Teilnahme am Anruf.",
|
171
175
|
"failedToJoinCallInvalidMeetingLink": "Teilnahme an Besprechung nicht möglich. Ungültiger Link.",
|
172
176
|
"startScreenSharingGeneric": "Beim Starten der Bildschirmfreigabe ist ein Problem aufgetreten.",
|
173
|
-
"cameraFrozenForRemoteParticipants": "Benutzer im Anruf haben Probleme, Ihr Video zu sehen. Überprüfen Sie Ihre Geräte und Ihr Netzwerk."
|
177
|
+
"cameraFrozenForRemoteParticipants": "Benutzer im Anruf haben Probleme, Ihr Video zu sehen. Überprüfen Sie Ihre Geräte und Ihr Netzwerk.",
|
178
|
+
"unableToStartVideoEffect": "Videoeffekt kann nicht angewendet werden."
|
174
179
|
},
|
175
180
|
"videoGallery": {
|
176
181
|
"screenIsBeingSharedMessage": "Sie teilen Ihren Bildschirm",
|