@box/threaded-annotations 4.5.3 → 4.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/esm/lib/components/message-editor/hooks/useMessageEditor.js +1 -1
  2. package/dist/esm/lib/components/message-editor/hooks/useMessagePost.js +1 -1
  3. package/dist/esm/lib/components/message-editor/message-editor.js +1 -1
  4. package/dist/esm/lib/components/v2/message-editor/hooks/useMessageSubmit.js +1 -1
  5. package/dist/esm/lib/components/v2/message-editor/message-editor.js +1 -1
  6. package/dist/esm/lib/components/v2/message-editor/subcomponents/post-button.js +1 -1
  7. package/dist/esm/lib/utils/is-submit-shortcut.js +1 -0
  8. package/dist/i18n/bn-IN.js +5 -0
  9. package/dist/i18n/da-DK.js +5 -0
  10. package/dist/i18n/de-DE.js +5 -0
  11. package/dist/i18n/es-419.js +5 -0
  12. package/dist/i18n/es-ES.js +5 -0
  13. package/dist/i18n/fi-FI.js +5 -0
  14. package/dist/i18n/fr-CA.js +5 -0
  15. package/dist/i18n/fr-FR.js +5 -0
  16. package/dist/i18n/hi-IN.js +5 -0
  17. package/dist/i18n/it-IT.js +5 -0
  18. package/dist/i18n/ko-KR.js +5 -0
  19. package/dist/i18n/nb-NO.js +5 -0
  20. package/dist/i18n/nl-NL.js +5 -0
  21. package/dist/i18n/pl-PL.js +5 -0
  22. package/dist/i18n/pt-BR.js +5 -0
  23. package/dist/i18n/ru-RU.js +5 -0
  24. package/dist/i18n/sv-SE.js +5 -0
  25. package/dist/i18n/tr-TR.js +5 -0
  26. package/dist/i18n/zh-CN.js +5 -0
  27. package/dist/i18n/zh-TW.js +5 -0
  28. package/dist/types/lib/components/message-editor/hooks/useMessageEditor.d.ts +5 -1
  29. package/dist/types/lib/components/message-editor/message-editor.d.ts +1 -1
  30. package/dist/types/lib/components/v2/message-editor/subcomponents/post-button.d.ts +3 -1
  31. package/dist/types/lib/utils/is-submit-shortcut.d.ts +12 -0
  32. package/package.json +1 -1
@@ -1 +1 @@
1
- import{useMentionContext}from"../../mention-component/mention-context.js";import{t as message_editor_module_default}from"../../../../../chunks/message-editor.module.js";import{CustomMention}from"../editor-extensions/custom-mention/custom-mention.js";import{createSuggestionOptions}from"../editor-extensions/custom-mention/custom-mention-suggestions.js";import{useMentionState}from"../editor-extensions/custom-mention/useMentionState.js";import{CustomParagraph}from"../editor-extensions/custom-paragraph.js";import{addPlaceholderToContent}from"../editor-extensions/custom-placeholder/custom-placeholder-utils.js";import{t as CustomPlaceholder}from"../../../../../chunks/custom-placeholder.js";import{useCallback,useRef,useState}from"react";import{useEditor}from"@tiptap/react";import Document from"@tiptap/extension-document";import Text from"@tiptap/extension-text";import{v4}from"uuid";var useMessageEditor=()=>{let userSelectorRef=useRef(null),editorRef=useRef(null),[isEditorEmpty,setIsEditorEmpty]=useState(!0),{isActive,query,command,suggestionCallbacks}=useMentionState(userSelectorRef),{closeAllPopovers,openPopoverForMentionId,fetchCollaboratorState}=useMentionContext(),editor=useEditor({shouldRerenderOnTransaction:!0,extensions:[Document,CustomParagraph,Text,CustomPlaceholder,...[{char:`@`,pluginKey:`mentionAt`},{char:`@`,pluginKey:`mentionAtJapanese`}].map(({char,pluginKey})=>CustomMention.extend({name:`mention`}).configure({suggestion:createSuggestionOptions(pluginKey,char,suggestionCallbacks)}))],autofocus:!0,editorProps:{attributes:{class:message_editor_module_default.editor}},onCreate:({editor:editorInstance})=>{editorRef.current=editorInstance.view.dom},onUpdate:({editor:editorInstance})=>{setIsEditorEmpty(editorInstance.isEmpty||editorInstance.getText().trim()===``),closeAllPopovers?.()}});return{editor,editorRef,isEditorEmpty,isActive,query,userSelectorRef,cleanEditor:useCallback(()=>{editor&&requestAnimationFrame(()=>{editor.isDestroyed||(editor.commands.setContent(``,{emitUpdate:!1}),addPlaceholderToContent(editor),setIsEditorEmpty(!0))})},[editor]),getEditorJsonContent:useCallback(()=>editor?editor.getJSON():null,[editor]),handleUserSelected:useCallback(async user=>{if(command){let mentionId=v4();command({mentionedUserName:user.name,mentionedUserId:user.id.toString(),mentionedUserEmail:user.email,mentionId}),(await fetchCollaboratorState?.(user)??!1)||openPopoverForMentionId?.(mentionId,user)}},[command,openPopoverForMentionId,fetchCollaboratorState])}};export{useMessageEditor};
1
+ import{useMentionContext}from"../../mention-component/mention-context.js";import{t as message_editor_module_default}from"../../../../../chunks/message-editor.module.js";import{CustomMention}from"../editor-extensions/custom-mention/custom-mention.js";import{createSuggestionOptions}from"../editor-extensions/custom-mention/custom-mention-suggestions.js";import{useMentionState}from"../editor-extensions/custom-mention/useMentionState.js";import{CustomParagraph}from"../editor-extensions/custom-paragraph.js";import{addPlaceholderToContent}from"../editor-extensions/custom-placeholder/custom-placeholder-utils.js";import{t as CustomPlaceholder}from"../../../../../chunks/custom-placeholder.js";import{getSubmitShortcutAriaKeyShortcuts,isSubmitShortcut}from"../../../utils/is-submit-shortcut.js";import{useCallback,useRef,useState}from"react";import{useEditor}from"@tiptap/react";import Document from"@tiptap/extension-document";import Text from"@tiptap/extension-text";import{v4}from"uuid";var useMessageEditor=({onSubmitShortcut})=>{let userSelectorRef=useRef(null),editorRef=useRef(null),[isEditorEmpty,setIsEditorEmpty]=useState(!0),{isActive,query,command,suggestionCallbacks}=useMentionState(userSelectorRef),{closeAllPopovers,openPopoverForMentionId,fetchCollaboratorState}=useMentionContext(),editor=useEditor({shouldRerenderOnTransaction:!0,extensions:[Document,CustomParagraph,Text,CustomPlaceholder,...[{char:`@`,pluginKey:`mentionAt`},{char:`@`,pluginKey:`mentionAtJapanese`}].map(({char,pluginKey})=>CustomMention.extend({name:`mention`}).configure({suggestion:createSuggestionOptions(pluginKey,char,suggestionCallbacks)}))],autofocus:!0,editorProps:{attributes:{"aria-keyshortcuts":getSubmitShortcutAriaKeyShortcuts(),class:message_editor_module_default.editor},handleKeyDown:(_view,event)=>isSubmitShortcut(event)?onSubmitShortcut():!1},onCreate:({editor:editorInstance})=>{editorRef.current=editorInstance.view.dom},onUpdate:({editor:editorInstance})=>{setIsEditorEmpty(editorInstance.isEmpty||editorInstance.getText().trim()===``),closeAllPopovers?.()}});return{editor,editorRef,isEditorEmpty,isActive,query,userSelectorRef,cleanEditor:useCallback(()=>{editor&&requestAnimationFrame(()=>{editor.isDestroyed||(editor.commands.setContent(``,{emitUpdate:!1}),addPlaceholderToContent(editor),setIsEditorEmpty(!0))})},[editor]),getEditorJsonContent:useCallback(()=>editor?editor.getJSON():null,[editor]),handleUserSelected:useCallback(async user=>{if(command){let mentionId=v4();command({mentionedUserName:user.name,mentionedUserId:user.id.toString(),mentionedUserEmail:user.email,mentionId}),(await fetchCollaboratorState?.(user)??!1)||openPopoverForMentionId?.(mentionId,user)}},[command,openPopoverForMentionId,fetchCollaboratorState])}};export{useMessageEditor};
@@ -1 +1 @@
1
- import{useMentionContext}from"../../mention-component/mention-context.js";import{getErrorMessage}from"../../../utils/getErrorMessage.js";import{useState}from"react";var useMessagePost=({onPost,onPostError,onPostSuccess,defaultErrorMessage=null,cleanEditor,getEditorJsonContent,onCancel})=>{let[isLoading,setIsLoading]=useState(!1),[errorMessage,setErrorMessage]=useState(null),{closeAllPopovers}=useMentionContext();return{isLoading,errorMessage,handlePost:async()=>{let content=getEditorJsonContent();try{setIsLoading(!0),setErrorMessage(null);let result=onPost(content),response=result instanceof Promise?await result:result;onPostSuccess?.(response),cleanEditor(),onCancel(!1)}catch(error){let callbackErrorMessage=onPostError?.(error);if(defaultErrorMessage){setErrorMessage(defaultErrorMessage);return}if(callbackErrorMessage){setErrorMessage(callbackErrorMessage);return}setErrorMessage(getErrorMessage(error))}finally{setIsLoading(!1),closeAllPopovers?.()}},clearError:()=>{setErrorMessage(null)}}};export{useMessagePost};
1
+ import{useMentionContext}from"../../mention-component/mention-context.js";import{getErrorMessage}from"../../../utils/getErrorMessage.js";import{useRef,useState}from"react";var useMessagePost=({onPost,onPostError,onPostSuccess,defaultErrorMessage=null,cleanEditor,getEditorJsonContent,onCancel})=>{let[isLoading,setIsLoading]=useState(!1),[errorMessage,setErrorMessage]=useState(null),isSubmittingRef=useRef(!1),{closeAllPopovers}=useMentionContext();return{isLoading,errorMessage,handlePost:async()=>{if(isSubmittingRef.current)return;let content=getEditorJsonContent();try{isSubmittingRef.current=!0,setIsLoading(!0),setErrorMessage(null);let result=onPost(content),response=result instanceof Promise?await result:result;onPostSuccess?.(response),cleanEditor(),onCancel(!1)}catch(error){let callbackErrorMessage=onPostError?.(error);if(defaultErrorMessage){setErrorMessage(defaultErrorMessage);return}if(callbackErrorMessage){setErrorMessage(callbackErrorMessage);return}setErrorMessage(getErrorMessage(error))}finally{isSubmittingRef.current=!1,setIsLoading(!1),closeAllPopovers?.()}},clearError:()=>{setErrorMessage(null)}}};export{useMessagePost};
@@ -1 +1 @@
1
- import{t as message_editor_module_default}from"../../../../chunks/message-editor.module.js";import{ErrorMessage}from"./error-message.js";import{MessageEditorContextProvider}from"./message-editor-context.js";import messages from"./messages.js";import{useMessageEditor}from"./hooks/useMessageEditor.js";import{useMessagePost}from"./hooks/useMessagePost.js";import{MessageEditorActions}from"./message-editor-actions.js";import{getMessageEditorState}from"./utils/getMessageEditorState.js";import clsx from"clsx";import{useEffect}from"react";import{useIntl}from"react-intl";import{jsx,jsxs}from"react/jsx-runtime";import{UserSelectorHeadless}from"@box/user-selector";import{EditorContent}from"@tiptap/react";var MessageEditor=({messageCount,onPost,onCancel,onPostError,onPostSuccess,disableCancel=!1,disablePost=!1,disableComponent=!1,defaultErrorMessage=``,userSelectorProps})=>{let intl=useIntl(),{editor,editorRef,isEditorEmpty,isActive,query,userSelectorRef,handleUserSelected,cleanEditor,getEditorJsonContent}=useMessageEditor(),{isLoading,errorMessage,handlePost}=useMessagePost({onPost,onPostError,onPostSuccess,defaultErrorMessage,cleanEditor,getEditorJsonContent,onCancel}),{disableEditor,isPostDisabled,isCancelDisabled}=getMessageEditorState({disablePost,disableCancel,disableComponent,isEditorEmpty,isLoading});useEffect(()=>{editor&&editor.setOptions({editable:!disableEditor})},[editor,disableEditor]);let anchorElement=jsx(`div`,{className:message_editor_module_default.anchorElement});return editor?jsx(MessageEditorContextProvider,{value:{messageCount},children:jsxs(`div`,{className:message_editor_module_default.messageEditor,children:[jsxs(`div`,{className:clsx(message_editor_module_default.editorContainer,{[message_editor_module_default.editorError]:errorMessage,[message_editor_module_default.editorDisabled]:disableEditor}),children:[jsx(EditorContent,{"aria-label":intl.formatMessage(messages.editorContentAriaLabel),editor}),jsx(UserSelectorHeadless,{ref:userSelectorRef,inputElementRef:editorRef,onSelectedUserChange:handleUserSelected,open:isActive,rootElement:anchorElement,value:query,...userSelectorProps,popoverContentContainerProps:{...userSelectorProps.popoverContentContainerProps,avoidCollisions:!1}})]}),errorMessage&&jsx(ErrorMessage,{errorMessage}),jsx(MessageEditorActions,{disableCancel:isCancelDisabled,disablePost:isPostDisabled,isLoading,onCancel,onPost:handlePost})]})}):null};export{MessageEditor};
1
+ import{t as message_editor_module_default}from"../../../../chunks/message-editor.module.js";import{ErrorMessage}from"./error-message.js";import{MessageEditorContextProvider}from"./message-editor-context.js";import messages from"./messages.js";import{useMessageEditor}from"./hooks/useMessageEditor.js";import{useMessagePost}from"./hooks/useMessagePost.js";import{MessageEditorActions}from"./message-editor-actions.js";import{getMessageEditorState}from"./utils/getMessageEditorState.js";import clsx from"clsx";import{useCallback,useEffect,useRef}from"react";import{useIntl}from"react-intl";import{jsx,jsxs}from"react/jsx-runtime";import{EditorContent}from"@tiptap/react";import{UserSelectorHeadless}from"@box/user-selector";var MessageEditor=({messageCount,onPost,onCancel,onPostError,onPostSuccess,disableCancel=!1,disablePost=!1,disableComponent=!1,defaultErrorMessage=``,userSelectorProps})=>{let intl=useIntl(),submitShortcutRef=useRef(()=>!1),{editor,editorRef,isEditorEmpty,isActive,query,userSelectorRef,handleUserSelected,cleanEditor,getEditorJsonContent}=useMessageEditor({onSubmitShortcut:useCallback(()=>submitShortcutRef.current(),[])}),{isLoading,errorMessage,handlePost}=useMessagePost({onPost,onPostError,onPostSuccess,defaultErrorMessage,cleanEditor,getEditorJsonContent,onCancel}),{disableEditor,isPostDisabled,isCancelDisabled}=getMessageEditorState({disablePost,disableCancel,disableComponent,isEditorEmpty,isLoading});submitShortcutRef.current=()=>isPostDisabled?!1:(handlePost().catch(()=>void 0),!0),useEffect(()=>{editor&&editor.setOptions({editable:!disableEditor})},[editor,disableEditor]);let anchorElement=jsx(`div`,{className:message_editor_module_default.anchorElement});return editor?jsx(MessageEditorContextProvider,{value:{messageCount},children:jsxs(`div`,{className:message_editor_module_default.messageEditor,children:[jsxs(`div`,{className:clsx(message_editor_module_default.editorContainer,{[message_editor_module_default.editorError]:errorMessage,[message_editor_module_default.editorDisabled]:disableEditor}),children:[jsx(EditorContent,{"aria-label":intl.formatMessage(messages.editorContentAriaLabel),editor}),jsx(UserSelectorHeadless,{ref:userSelectorRef,inputElementRef:editorRef,onSelectedUserChange:handleUserSelected,open:isActive,rootElement:anchorElement,value:query,...userSelectorProps,popoverContentContainerProps:{...userSelectorProps.popoverContentContainerProps,avoidCollisions:!1}})]}),errorMessage&&jsx(ErrorMessage,{errorMessage}),jsx(MessageEditorActions,{disableCancel:isCancelDisabled,disablePost:isPostDisabled,isLoading,onCancel,onPost:handlePost})]})}):null};export{MessageEditor};
@@ -1 +1 @@
1
- import{useMentionContext}from"../../../mention-component/mention-context.js";import{getErrorMessage}from"../../../../utils/getErrorMessage.js";import{useMessageEditorContext}from"../message-editor-context.js";var useMessageSubmit=({onSubmit,onSubmitError,onSuccess,cleanEditor,getEditorJsonContent})=>{let{setErrorMessage,setIsLoading}=useMessageEditorContext(),{closeAllPopovers}=useMentionContext();return{handleSubmit:async()=>{let content=getEditorJsonContent();try{setIsLoading(!0),setErrorMessage(null);let result=onSubmit(content);await(result instanceof Promise?result:Promise.resolve()),cleanEditor?.(),onSuccess?.()}catch(error){let callbackErrorMessage=onSubmitError?.(error);if(callbackErrorMessage){setErrorMessage(callbackErrorMessage);return}setErrorMessage(getErrorMessage(error))}finally{setIsLoading(!1),closeAllPopovers?.()}}}};export{useMessageSubmit};
1
+ import{useMentionContext}from"../../../mention-component/mention-context.js";import{getErrorMessage}from"../../../../utils/getErrorMessage.js";import{useMessageEditorContext}from"../message-editor-context.js";import{useRef}from"react";var useMessageSubmit=({onSubmit,onSubmitError,onSuccess,cleanEditor,getEditorJsonContent})=>{let{setErrorMessage,setIsLoading}=useMessageEditorContext(),{closeAllPopovers}=useMentionContext(),isSubmittingRef=useRef(!1);return{handleSubmit:async()=>{if(isSubmittingRef.current)return;let content=getEditorJsonContent();try{isSubmittingRef.current=!0,setIsLoading(!0),setErrorMessage(null);let result=onSubmit(content);await(result instanceof Promise?result:Promise.resolve()),cleanEditor?.(),onSuccess?.()}catch(error){let callbackErrorMessage=onSubmitError?.(error);if(callbackErrorMessage){setErrorMessage(callbackErrorMessage);return}setErrorMessage(getErrorMessage(error))}finally{isSubmittingRef.current=!1,setIsLoading(!1),closeAllPopovers?.()}}}};export{useMessageSubmit};
@@ -1 +1 @@
1
- import{THREADED_ANNOTATIONS_PORTAL}from"../../../v2/constants.js";import{useMentionContext}from"../../mention-component/mention-context.js";import{createSuggestionOptions}from"./editor-extensions/custom-mention/custom-mention-suggestions.js";import{MENTION_PLUGIN_KEY,normalizeMentionPastedText,normalizeMentionTextInput}from"./editor-extensions/custom-mention/mention-trigger-normalization.js";import{useMentionState}from"./editor-extensions/custom-mention/useMentionState.js";import{createMessageEditorExtensions}from"./editor-extensions/create-message-editor-extensions.js";import{useCharacterLimit}from"./hooks/useCharacterLimit.js";import{useEditorContainerState}from"./hooks/useEditorContainerState.js";import{useMentionUserSelection}from"./hooks/useMentionUserSelection.js";import{MessageEditorProvider,useMessageEditorContext}from"./message-editor-context.js";import messages from"./messages.js";import{t as message_editor_module_default}from"../../../../../chunks/message-editor2.module.js";import{CharacterLimitCounter}from"./subcomponents/character-limit-counter.js";import{EditButtons}from"./subcomponents/edit-buttons.js";import{ErrorMessage}from"./subcomponents/error-message.js";import{t as MessageEditorBubbleMenu}from"../../../../../chunks/message-editor-bubble-menu.js";import{PostButton}from"./subcomponents/post-button.js";import{t as TimestampToggle}from"../../../../../chunks/timestamp-toggle.js";import{MessageEditorVariant}from"./message-editor.types.js";import{VisuallyHidden}from"@box/blueprint-web";import clsx from"clsx";import{useCallback,useEffect,useMemo,useRef}from"react";import{useIntl}from"react-intl";import{Fragment,jsx,jsxs}from"react/jsx-runtime";import{UserSelectorHeadless}from"@box/user-selector";import{EditorContent,useEditor}from"@tiptap/react";var IS_APPLE_DEVICE=typeof navigator<`u`&&/Mac|iP(hone|ad|od)/.test(navigator.platform),getShortcutFormat=event=>{if(!(IS_APPLE_DEVICE?event.metaKey:event.ctrlKey))return null;if(event.shiftKey)return event.code===`Digit8`?`bulletList`:event.code===`Digit7`?`orderedList`:null;switch(event.key.toLowerCase()){case`b`:return`bold`;case`i`:return`italic`;case`u`:return`underline`;default:return null}},MessageEditorContent=props=>{let{autoFocus=!0,disableComponent=!1,initialContent,isFirstAnnotation=!1,isReply=!1,isRichTextEnabled=!1,maxCharacterCount,onFormatToggle,userSelectorProps,videoTimestamp}=props,userSelectorRef=useRef(null),editorContainerRef=useRef(null),editorViewportRef=useRef(null),editorRef=useRef(null),editorInstanceRef=useRef(null),onFormatToggleRef=useRef(onFormatToggle);onFormatToggleRef.current=onFormatToggle;let intl=useIntl(),{errorMessage,isLoading}=useMessageEditorContext(),{close:closeMentionDropdown,isActive,query,command,suggestionCallbacks}=useMentionState(userSelectorRef),{closeAllPopovers}=useMentionContext(),placeholderText=intl.formatMessage(isReply?messages.placeholderReply:messages.placeholderAddComment),isEditVariant=props.variant===MessageEditorVariant.EDIT_MESSAGE,editor=useEditor({shouldRerenderOnTransaction:!0,extensions:createMessageEditorExtensions({isRichTextEnabled,mentionSuggestion:createSuggestionOptions(MENTION_PLUGIN_KEY,`@`,suggestionCallbacks),placeholder:placeholderText}),autofocus:autoFocus,content:initialContent,editorProps:{attributes:{class:message_editor_module_default.editor},handleKeyDown:(view,event)=>{if(isRichTextEnabled){let format=getShortcutFormat(event),editorInstance=editorInstanceRef.current;if(format&&editorInstance?.isEditable){let wasActive=editorInstance.isActive(format);queueMicrotask(()=>{if(editorInstance.isDestroyed)return;let isFormatActive=editorInstance.isActive(format);isFormatActive!==wasActive&&onFormatToggleRef.current?.(format,isFormatActive)})}}return!1},handleTextInput:normalizeMentionTextInput,transformPastedText:normalizeMentionPastedText},onCreate:({editor:editorInstance})=>{editorInstanceRef.current=editorInstance,editorRef.current=editorInstance.view.dom,autoFocus&&editorInstance.commands.focus(`end`)},onUpdate:()=>{closeAllPopovers?.()}},[placeholderText,isRichTextEnabled]),{onUserSelected}=useMentionUserSelection(useMemo(()=>command&&editor&&!editor.isDestroyed?{command,editor}:null,[command,editor])),{exceedsSingleLine,hasScroll,isAtBottom}=useEditorContainerState(editorContainerRef,editor),characterLimitState=useCharacterLimit(editor,initialContent,maxCharacterCount),shouldApplyEditorFullWidth=isEditVariant||!isFirstAnnotation||isFirstAnnotation&&exceedsSingleLine,isEditorEmpty=!editor||editor?.isEmpty,disableEditor=disableComponent||isLoading,isCharacterLimitExceeded=(characterLimitState?.excess??0)>0,isPostDisabled=isEditorEmpty||disableEditor||isCharacterLimitExceeded,showCharacterLimitCounter=characterLimitState&&characterLimitState.excess>0&&shouldApplyEditorFullWidth;useEffect(()=>{editor&&editor.setEditable(!disableEditor)},[editor,disableEditor]),useEffect(()=>{if(!isCharacterLimitExceeded||!editorContainerRef.current||!initialContent)return;let innerFrameId=0,outerFrameId=requestAnimationFrame(()=>{innerFrameId=requestAnimationFrame(()=>{editorContainerRef.current?.scrollTo({top:editorContainerRef.current.scrollHeight})})});return()=>{cancelAnimationFrame(outerFrameId),cancelAnimationFrame(innerFrameId)}},[isCharacterLimitExceeded]),useEffect(()=>{!editor||initialContent===void 0||queueMicrotask(()=>{editor.isDestroyed||(editor.commands.setContent(initialContent??``,{emitUpdate:!1}),autoFocus&&editor.commands.focus(`end`))})},[initialContent]),useEffect(()=>{if(!isActive)return;let portalSelector=`[${Object.keys(THREADED_ANNOTATIONS_PORTAL)[0]}]`,isInsideEditorOrPortal=target=>{if(editorContainerRef.current?.contains(target))return!0;let portals=document.querySelectorAll(portalSelector);for(let portal of portals)if(portal.contains(target))return!0;return!1},handleClose=e=>{let target=e.target;!target||isInsideEditorOrPortal(target)||closeMentionDropdown()},frameId=requestAnimationFrame(()=>{document.addEventListener(`mousedown`,handleClose),document.addEventListener(`focusin`,handleClose)});return()=>{cancelAnimationFrame(frameId),document.removeEventListener(`mousedown`,handleClose),document.removeEventListener(`focusin`,handleClose)}},[closeMentionDropdown,isActive]);let handleFormatToggle=useCallback((format,isFormatActive)=>onFormatToggleRef.current?.(format,isFormatActive),[]),anchorElement=jsx(`div`,{className:message_editor_module_default.anchorElement});return jsx(`div`,{"data-no-expand":!0,className:message_editor_module_default.messageEditorWrapper,children:jsxs(`div`,{className:clsx(message_editor_module_default.messageEditor,{[message_editor_module_default.editorHasScroll]:hasScroll,[message_editor_module_default.editorEditMode]:isEditVariant,[message_editor_module_default.editorError]:errorMessage||isCharacterLimitExceeded,[message_editor_module_default.editorFirstAnnotation]:!isEditVariant&&isFirstAnnotation,[message_editor_module_default.editorCharacterLimitExceeded]:isCharacterLimitExceeded}),children:[jsxs(`div`,{ref:editorViewportRef,className:clsx(message_editor_module_default.editorViewport,{[message_editor_module_default.editorFullWidth]:shouldApplyEditorFullWidth}),children:[isRichTextEnabled&&jsx(MessageEditorBubbleMenu,{editor,menuAnchorRef:editorViewportRef,onFormatToggle:handleFormatToggle}),jsxs(`div`,{ref:editorContainerRef,className:message_editor_module_default.editorContainer,"aria-label":intl.formatMessage(messages.scrollContainerAriaLabel),children:[jsx(EditorContent,{"aria-label":intl.formatMessage(messages.editorContentAriaLabel),editor}),jsx(UserSelectorHeadless,{ref:userSelectorRef,inputElementRef:editorRef,onSelectedUserChange:onUserSelected,open:isActive,rootElement:anchorElement,value:query,...userSelectorProps,popoverContentContainerProps:{...userSelectorProps.popoverContentContainerProps,...THREADED_ANNOTATIONS_PORTAL,avoidCollisions:!0}})]}),hasScroll&&jsx(`div`,{className:clsx(message_editor_module_default.editorFade,{[message_editor_module_default.editorFadeHidden]:isAtBottom}),"aria-hidden":`true`})]}),jsx(`div`,{className:clsx(message_editor_module_default.actionsWrapper,{[message_editor_module_default.withTimestampToggle]:!!videoTimestamp}),children:jsxs(`div`,{className:clsx(message_editor_module_default.actionsWrapperInner,{[message_editor_module_default.scrolledToBottom]:isAtBottom,[message_editor_module_default.characterLimitExceeded]:isCharacterLimitExceeded}),children:[errorMessage&&jsx(ErrorMessage,{errorMessage}),characterLimitState&&characterLimitState.excess>0&&!shouldApplyEditorFullWidth&&jsx(VisuallyHidden,{role:`alert`,children:intl.formatMessage(messages.characterLimitExceeded,{excess:characterLimitState.excess})}),videoTimestamp&&jsx(TimestampToggle,{className:message_editor_module_default.timestampToggle,disabled:disableEditor,formattedTimestamp:videoTimestamp.formattedTimestamp,isPressed:videoTimestamp.isPressed,onChange:videoTimestamp.onPressedChange}),isEditVariant?jsxs(`div`,{className:message_editor_module_default.editActionsColumn,children:[showCharacterLimitCounter&&jsx(CharacterLimitCounter,{count:characterLimitState.count,excess:characterLimitState.excess,maxCount:characterLimitState.maxCount}),jsx(`div`,{className:message_editor_module_default.editActionsRow,children:jsx(EditButtons,{disabled:isPostDisabled,getEditorJsonContent:()=>editor?.getJSON(),onCancel:props.onEditCancel,onEditSuccess:props.onEditSuccess,onSave:props.onSave,onSaveError:props.onSaveError})})]}):jsxs(Fragment,{children:[showCharacterLimitCounter&&jsx(CharacterLimitCounter,{count:characterLimitState.count,excess:characterLimitState.excess,maxCount:characterLimitState.maxCount}),jsx(PostButton,{cleanEditor:()=>editor?.commands.setContent(``,{emitUpdate:!1}),disabled:isPostDisabled,getEditorJsonContent:()=>editor?.getJSON(),onPost:props.onPost,onPostError:props.onPostError,onPostSuccess:props.onPostSuccess})]})]})})]})})},MessageEditor=props=>jsx(MessageEditorProvider,{children:jsx(MessageEditorContent,{...props})});export{MessageEditor,MessageEditorVariant};
1
+ import{THREADED_ANNOTATIONS_PORTAL}from"../../../v2/constants.js";import{useMentionContext}from"../../mention-component/mention-context.js";import{getSubmitShortcutAriaKeyShortcuts,isSubmitShortcut}from"../../../utils/is-submit-shortcut.js";import{createSuggestionOptions}from"./editor-extensions/custom-mention/custom-mention-suggestions.js";import{MENTION_PLUGIN_KEY,normalizeMentionPastedText,normalizeMentionTextInput}from"./editor-extensions/custom-mention/mention-trigger-normalization.js";import{useMentionState}from"./editor-extensions/custom-mention/useMentionState.js";import{createMessageEditorExtensions}from"./editor-extensions/create-message-editor-extensions.js";import{useCharacterLimit}from"./hooks/useCharacterLimit.js";import{useEditorContainerState}from"./hooks/useEditorContainerState.js";import{useMentionUserSelection}from"./hooks/useMentionUserSelection.js";import{MessageEditorProvider,useMessageEditorContext}from"./message-editor-context.js";import messages from"./messages.js";import{t as message_editor_module_default}from"../../../../../chunks/message-editor2.module.js";import{CharacterLimitCounter}from"./subcomponents/character-limit-counter.js";import{EditButtons}from"./subcomponents/edit-buttons.js";import{ErrorMessage}from"./subcomponents/error-message.js";import{t as MessageEditorBubbleMenu}from"../../../../../chunks/message-editor-bubble-menu.js";import{PostButton}from"./subcomponents/post-button.js";import{t as TimestampToggle}from"../../../../../chunks/timestamp-toggle.js";import{MessageEditorVariant}from"./message-editor.types.js";import{VisuallyHidden}from"@box/blueprint-web";import clsx from"clsx";import{useCallback,useEffect,useMemo,useRef}from"react";import{useIntl}from"react-intl";import{Fragment,jsx,jsxs}from"react/jsx-runtime";import{EditorContent,useEditor}from"@tiptap/react";import{UserSelectorHeadless}from"@box/user-selector";var IS_APPLE_DEVICE=typeof navigator<`u`&&/Mac|iP(hone|ad|od)/.test(navigator.platform),getShortcutFormat=event=>{if(!(IS_APPLE_DEVICE?event.metaKey:event.ctrlKey))return null;if(event.shiftKey)return event.code===`Digit8`?`bulletList`:event.code===`Digit7`?`orderedList`:null;switch(event.key.toLowerCase()){case`b`:return`bold`;case`i`:return`italic`;case`u`:return`underline`;default:return null}},MessageEditorContent=props=>{let{autoFocus=!0,disableComponent=!1,initialContent,isFirstAnnotation=!1,isReply=!1,isRichTextEnabled=!1,maxCharacterCount,onFormatToggle,userSelectorProps,videoTimestamp}=props,userSelectorRef=useRef(null),editorContainerRef=useRef(null),editorViewportRef=useRef(null),editorRef=useRef(null),editorInstanceRef=useRef(null),postButtonRef=useRef(null),onFormatToggleRef=useRef(onFormatToggle);onFormatToggleRef.current=onFormatToggle;let intl=useIntl(),{errorMessage,isLoading}=useMessageEditorContext(),{close:closeMentionDropdown,isActive,query,command,suggestionCallbacks}=useMentionState(userSelectorRef),{closeAllPopovers}=useMentionContext(),placeholderText=intl.formatMessage(isReply?messages.placeholderReply:messages.placeholderAddComment),isEditVariant=props.variant===MessageEditorVariant.EDIT_MESSAGE,editor=useEditor({shouldRerenderOnTransaction:!0,extensions:createMessageEditorExtensions({isRichTextEnabled,mentionSuggestion:createSuggestionOptions(MENTION_PLUGIN_KEY,`@`,suggestionCallbacks),placeholder:placeholderText}),autofocus:autoFocus,content:initialContent,editorProps:{attributes:{"aria-keyshortcuts":getSubmitShortcutAriaKeyShortcuts(),class:message_editor_module_default.editor},handleKeyDown:(view,event)=>{if(!isEditVariant&&isSubmitShortcut(event)){let postButton=postButtonRef.current;return!postButton||postButton.disabled?!1:(postButton.click(),!0)}if(isRichTextEnabled){let format=getShortcutFormat(event),editorInstance=editorInstanceRef.current;if(format&&editorInstance?.isEditable){let wasActive=editorInstance.isActive(format);queueMicrotask(()=>{if(editorInstance.isDestroyed)return;let isFormatActive=editorInstance.isActive(format);isFormatActive!==wasActive&&onFormatToggleRef.current?.(format,isFormatActive)})}}return!1},handleTextInput:normalizeMentionTextInput,transformPastedText:normalizeMentionPastedText},onCreate:({editor:editorInstance})=>{editorInstanceRef.current=editorInstance,editorRef.current=editorInstance.view.dom,autoFocus&&editorInstance.commands.focus(`end`)},onUpdate:()=>{closeAllPopovers?.()}},[placeholderText,isRichTextEnabled,isEditVariant]),{onUserSelected}=useMentionUserSelection(useMemo(()=>command&&editor&&!editor.isDestroyed?{command,editor}:null,[command,editor])),{exceedsSingleLine,hasScroll,isAtBottom}=useEditorContainerState(editorContainerRef,editor),characterLimitState=useCharacterLimit(editor,initialContent,maxCharacterCount),shouldApplyEditorFullWidth=isEditVariant||!isFirstAnnotation||isFirstAnnotation&&exceedsSingleLine,isEditorEmpty=!editor||editor?.isEmpty,disableEditor=disableComponent||isLoading,isCharacterLimitExceeded=(characterLimitState?.excess??0)>0,isPostDisabled=isEditorEmpty||disableEditor||isCharacterLimitExceeded,showCharacterLimitCounter=characterLimitState&&characterLimitState.excess>0&&shouldApplyEditorFullWidth;useEffect(()=>{editor&&editor.setEditable(!disableEditor)},[editor,disableEditor]),useEffect(()=>{if(!isCharacterLimitExceeded||!editorContainerRef.current||!initialContent)return;let innerFrameId=0,outerFrameId=requestAnimationFrame(()=>{innerFrameId=requestAnimationFrame(()=>{editorContainerRef.current?.scrollTo({top:editorContainerRef.current.scrollHeight})})});return()=>{cancelAnimationFrame(outerFrameId),cancelAnimationFrame(innerFrameId)}},[isCharacterLimitExceeded]),useEffect(()=>{!editor||initialContent===void 0||queueMicrotask(()=>{editor.isDestroyed||(editor.commands.setContent(initialContent??``,{emitUpdate:!1}),autoFocus&&editor.commands.focus(`end`))})},[initialContent]),useEffect(()=>{if(!isActive)return;let portalSelector=`[${Object.keys(THREADED_ANNOTATIONS_PORTAL)[0]}]`,isInsideEditorOrPortal=target=>{if(editorContainerRef.current?.contains(target))return!0;let portals=document.querySelectorAll(portalSelector);for(let portal of portals)if(portal.contains(target))return!0;return!1},handleClose=e=>{let target=e.target;!target||isInsideEditorOrPortal(target)||closeMentionDropdown()},frameId=requestAnimationFrame(()=>{document.addEventListener(`mousedown`,handleClose),document.addEventListener(`focusin`,handleClose)});return()=>{cancelAnimationFrame(frameId),document.removeEventListener(`mousedown`,handleClose),document.removeEventListener(`focusin`,handleClose)}},[closeMentionDropdown,isActive]);let handleFormatToggle=useCallback((format,isFormatActive)=>onFormatToggleRef.current?.(format,isFormatActive),[]),anchorElement=jsx(`div`,{className:message_editor_module_default.anchorElement});return jsx(`div`,{"data-no-expand":!0,className:message_editor_module_default.messageEditorWrapper,children:jsxs(`div`,{className:clsx(message_editor_module_default.messageEditor,{[message_editor_module_default.editorHasScroll]:hasScroll,[message_editor_module_default.editorEditMode]:isEditVariant,[message_editor_module_default.editorError]:errorMessage||isCharacterLimitExceeded,[message_editor_module_default.editorFirstAnnotation]:!isEditVariant&&isFirstAnnotation,[message_editor_module_default.editorCharacterLimitExceeded]:isCharacterLimitExceeded}),children:[jsxs(`div`,{ref:editorViewportRef,className:clsx(message_editor_module_default.editorViewport,{[message_editor_module_default.editorFullWidth]:shouldApplyEditorFullWidth}),children:[isRichTextEnabled&&jsx(MessageEditorBubbleMenu,{editor,menuAnchorRef:editorViewportRef,onFormatToggle:handleFormatToggle}),jsxs(`div`,{ref:editorContainerRef,className:message_editor_module_default.editorContainer,"aria-label":intl.formatMessage(messages.scrollContainerAriaLabel),children:[jsx(EditorContent,{"aria-label":intl.formatMessage(messages.editorContentAriaLabel),editor}),jsx(UserSelectorHeadless,{ref:userSelectorRef,inputElementRef:editorRef,onSelectedUserChange:onUserSelected,open:isActive,rootElement:anchorElement,value:query,...userSelectorProps,popoverContentContainerProps:{...userSelectorProps.popoverContentContainerProps,...THREADED_ANNOTATIONS_PORTAL,avoidCollisions:!0}})]}),hasScroll&&jsx(`div`,{className:clsx(message_editor_module_default.editorFade,{[message_editor_module_default.editorFadeHidden]:isAtBottom}),"aria-hidden":`true`})]}),jsx(`div`,{className:clsx(message_editor_module_default.actionsWrapper,{[message_editor_module_default.withTimestampToggle]:!!videoTimestamp}),children:jsxs(`div`,{className:clsx(message_editor_module_default.actionsWrapperInner,{[message_editor_module_default.scrolledToBottom]:isAtBottom,[message_editor_module_default.characterLimitExceeded]:isCharacterLimitExceeded}),children:[errorMessage&&jsx(ErrorMessage,{errorMessage}),characterLimitState&&characterLimitState.excess>0&&!shouldApplyEditorFullWidth&&jsx(VisuallyHidden,{role:`alert`,children:intl.formatMessage(messages.characterLimitExceeded,{excess:characterLimitState.excess})}),videoTimestamp&&jsx(TimestampToggle,{className:message_editor_module_default.timestampToggle,disabled:disableEditor,formattedTimestamp:videoTimestamp.formattedTimestamp,isPressed:videoTimestamp.isPressed,onChange:videoTimestamp.onPressedChange}),isEditVariant?jsxs(`div`,{className:message_editor_module_default.editActionsColumn,children:[showCharacterLimitCounter&&jsx(CharacterLimitCounter,{count:characterLimitState.count,excess:characterLimitState.excess,maxCount:characterLimitState.maxCount}),jsx(`div`,{className:message_editor_module_default.editActionsRow,children:jsx(EditButtons,{disabled:isPostDisabled,getEditorJsonContent:()=>editor?.getJSON(),onCancel:props.onEditCancel,onEditSuccess:props.onEditSuccess,onSave:props.onSave,onSaveError:props.onSaveError})})]}):jsxs(Fragment,{children:[showCharacterLimitCounter&&jsx(CharacterLimitCounter,{count:characterLimitState.count,excess:characterLimitState.excess,maxCount:characterLimitState.maxCount}),jsx(PostButton,{buttonRef:postButtonRef,cleanEditor:()=>editor?.commands.setContent(``,{emitUpdate:!1}),disabled:isPostDisabled,getEditorJsonContent:()=>editor?.getJSON(),onPost:props.onPost,onPostError:props.onPostError,onPostSuccess:props.onPostSuccess})]})]})})]})})},MessageEditor=props=>jsx(MessageEditorProvider,{children:jsx(MessageEditorContent,{...props})});export{MessageEditor,MessageEditorVariant};
@@ -1 +1 @@
1
- import{THREADED_ANNOTATIONS_RESIN_TARGETS}from"../../../../v2/resin-targets.js";import{useMessageEditorContext}from"../message-editor-context.js";import messages from"../messages.js";import{useMessageSubmit}from"../hooks/useMessageSubmit.js";import{Button}from"@box/blueprint-web";import{useIntl}from"react-intl";import{jsx}from"react/jsx-runtime";import{ArrowUp}from"@box/blueprint-web-assets/icons/Medium";var PostButton=({disabled,onPost,onPostError,onPostSuccess,cleanEditor,getEditorJsonContent})=>{let{isLoading}=useMessageEditorContext(),{handleSubmit}=useMessageSubmit({onSubmit:onPost,onSubmitError:onPostError,onSuccess:onPostSuccess,cleanEditor,getEditorJsonContent}),intl=useIntl();return jsx(Button,{"aria-label":intl.formatMessage(messages.post),"data-resin-target":THREADED_ANNOTATIONS_RESIN_TARGETS.COMMENT_POST,disabled,endIcon:ArrowUp,loading:isLoading,loadingAriaLabel:intl.formatMessage(messages.postLoading),onClick:handleSubmit,size:`small`,variant:`primary`})};export{PostButton};
1
+ import{THREADED_ANNOTATIONS_RESIN_TARGETS}from"../../../../v2/resin-targets.js";import{useMessageEditorContext}from"../message-editor-context.js";import messages from"../messages.js";import{useMessageSubmit}from"../hooks/useMessageSubmit.js";import{Button}from"@box/blueprint-web";import{useIntl}from"react-intl";import{jsx}from"react/jsx-runtime";import{ArrowUp}from"@box/blueprint-web-assets/icons/Medium";var PostButton=({disabled,onPost,onPostError,onPostSuccess,cleanEditor,getEditorJsonContent,buttonRef})=>{let{isLoading}=useMessageEditorContext(),{handleSubmit}=useMessageSubmit({onSubmit:onPost,onSubmitError:onPostError,onSuccess:onPostSuccess,cleanEditor,getEditorJsonContent}),intl=useIntl();return jsx(Button,{"aria-label":intl.formatMessage(messages.post),"data-resin-target":THREADED_ANNOTATIONS_RESIN_TARGETS.COMMENT_POST,disabled,endIcon:ArrowUp,loading:isLoading,loadingAriaLabel:intl.formatMessage(messages.postLoading),onClick:handleSubmit,ref:buttonRef,size:`small`,variant:`primary`})};export{PostButton};
@@ -0,0 +1 @@
1
+ var getPlatform=()=>typeof navigator>`u`?``:navigator.platform,isAppleDevice=platform=>/Mac|iP(hone|ad|od)/.test(platform),getSubmitShortcutAriaKeyShortcuts=(platform=getPlatform())=>isAppleDevice(platform)?`Meta+Enter`:`Control+Enter`,isSubmitShortcut=(event,platform=getPlatform())=>event.key===`Enter`&&(isAppleDevice(platform)?event.metaKey:event.ctrlKey)&&!event.isComposing&&!event.repeat&&!event.altKey&&!event.shiftKey;export{getSubmitShortcutAriaKeyShortcuts,isSubmitShortcut};
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "বাতিল করুন বোতাম",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "আপনার মন্তব্য {excess,plural,one{#টি অক্ষরের} other{#টি অক্ষরের}} খুবই দীর্ঘ",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "বার্তা সম্পাদক",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "বোল্ড",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "বুলেট তালিকা",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "ইটালিক",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "সংখ্যাযুক্ত তালিকা",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "আন্ডারলাইন",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "একটি মন্তব্য যোগ করুন, উল্লেখ করতে @",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "বার্তা ইনপুট প্লেসহোল্ডার",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "একটি মন্তব্য লিখুন বা",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "Annuller-knap",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "Din kommentar er {excess,plural,one{# tegn} other{# tegn}} for lang",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "Rediger meddelelse",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "Fed",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "Punktopstilling",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "Kursiv",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "Nummereret liste",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "Understregning",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "Tilføj en kommentar, @ til at omtale",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "Pladsholder til meddelelsesinput",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "Skriv en kommentar eller",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "Schaltfläche „Abbrechen“",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "Ihr Kommentar ist {excess,plural,one{#Zeichen} other{#Zeichen}} zu lang",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "Nachrichteneditor",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "Fettgedruckt",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "Aufzählungsliste",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "Kursiv",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "Nummerierte Liste",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "Unterstreichen",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "Kommentar hinzufügen, @ um zu erwähnen",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "Platzhalter für die Nachrichteneingabe",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "Kommentar verfassen oder per",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "Botón Cancelar",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "Su comentario es {excess,plural,one{# carácter} many{# caracteres} other{# caracteres}} más largo",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "Editor de mensajes",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "Negrita",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "Lista de viñetas",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "Cursiva",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "Lista numerada",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "Subrayado",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "Agregue un comentario, añada @ para mencionar",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "Marcador de entrada de mensaje",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "Escriba un comentario o",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "Botón Cancelar",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "Su comentario es {excess,plural,one{# carácter} many{# caracteres} other{# caracteres}} más largo",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "Editor de mensajes",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "Negrita",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "Lista de viñetas",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "Cursiva",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "Lista numerada",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "Subrayado",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "Agregue un comentario, añada @ para mencionar",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "Marcador de entrada de mensaje",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "Escriba un comentario o",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "Peruuta-painike",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "Kommenttisi on {excess,plural,one{# merkki} other{# merkki}} liian pitkä",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "Viestin muokkaaja",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "Lihavointi",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "Luettelomerkkiluettelo",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "Kursiivi",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "Numeroitu luettelo",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "Alleviivaus",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "Lisää kommentti, @ mainitaksesi",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "Viestikentän paikkamerkki",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "Kirjoita kommentti tai",
@@ -19,6 +19,11 @@ export default {
19
19
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "Bouton Annuler",
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "Votre commentaire dépasse la limite de {excess,plural,one{# caractère} many{# caractères} other{# caractères}}",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "Éditeur de message",
22
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "Gras",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "Liste à puces",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "Italique",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "Liste numérotée",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "Souligner",
22
27
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "Ajouter un commentaire, @ pour mentionner",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "Zone de saisie de l'espace réservé",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "Écrire un commentaire ou",
@@ -19,6 +19,11 @@ export default {
19
19
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "Bouton Annuler",
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "Votre commentaire dépasse la limite de {excess,plural,one{# caractère} many{# caractères} other{# caractères}}",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "Éditeur de message",
22
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "Gras",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "Liste à puces",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "Italique",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "Liste numérotée",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "Souligner",
22
27
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "Ajouter un commentaire, @ pour mentionner",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "Zone de saisie de l'espace réservé",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "Écrire un commentaire ou",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "रद्द करें बटन",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "आपकी टिप्पणी, {excess,plural,one{# वर्ण} other{# वर्ण}} लंबी है",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "संदेश संपादक",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "बोल्ड",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "बिंदु सूची",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "इटैलिक",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "क्रमांकित सूची",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "रेखांकित करें",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "एक टिप्पणी जोड़ें, जिसमें @ का उल्लेख करें",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "संदेश इनपुट प्लेसहोल्डर",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "एक टिप्पणी लिखें या",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "Pulsante Annulla",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "Il tuo commento eccede il limite di lunghezza di {excess,plural,one{# carattere} many{# caratteri} other{# caratteri}}",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "Editor del messaggio",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "Grassetto",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "Elenco puntato",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "Corsivo",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "Elenco numerato",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "Sottolineato",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "Aggiungi un commento, @ per menzionare",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "Segnaposto per il messaggio",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "Scrivi un commento o",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "취소 버튼",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "코멘트 글자 수 제한을 {excess,plural,one{#자} other{#자}} 초과합니다",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "메시지 편집기",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "굵게",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "글머리 기호 목록",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "기울임꼴",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "번호 매기기 목록",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "밑줄",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "코멘트 추가, @를 사용하여 멘션 달기",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "메시지 입력 자리 표시자",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "코멘트 작성 또는",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "Avbryt-knapp",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "Kommentaren din er {excess,plural,one{# tegn} other{# tegn}} for lang",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "Meldingsredigerer",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "Fet",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "Punktliste",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "Kursiv",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "Nummerert liste",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "Understreking",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "Legg til en kommentar, @ for å nevne",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "Plassholder for meldingstekst",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "Skriv en kommentar eller ",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "Knop Annuleren",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "Uw opmerking heeft {excess,plural,one{# teken} other{# tekens}} te veel",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "Berichenteditor",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "Vetgedrukt",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "Opsomming",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "Cursief",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "Genummerde lijst",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "Onderstrepen",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "Voeg een opmerking toe, @ om te verwijzen",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "Tijdelijke aanduiding voor berichtinvoer",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "Schrijf een opmerking of",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "Przycisk anulowania",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "Twój komentarz jest za długi o {excess,plural,one{# znak} few{# znaki\t} many{# znaków} other{# znaku}}",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "Edytor wiadomości",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "Pogrubienie",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "Lista wypunktowana",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "Kursywa",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "Lista numerowana",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "Podkreślenie",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "Dodaj komentarz, @, aby wspomnieć",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "Tekst zastępczy wprowadzania wiadomości",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "Napisz komentarz lub",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "Botão Cancelar",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "Seu comentário é {excess,plural,one{# caractere} many{# caracteres} other{# caracteres}} longo demais",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "Editor de mensagens",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "Negrito",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "Lista com marcadores",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "Itálico",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "Lista numerada",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "Sublinhado",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "Adicionar um comentário, @ para mencionar",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "Espaço reservado para entrada de mensagens",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "Escrever um comentário ou",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "Кнопка отмены",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "Ваш комментарий превышает допустимую длину на {excess,plural,one{# символ} few{# символа} many{# символов} other{# символа}}",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "Редактор сообщений",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "Полужирный",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "Маркированный список",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "Курсив",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "Нумерованный список",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "Подчеркнутый",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "Добавить комментарий, @ для упоминания",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "Поле ввода сообщения",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "Оставьте комментарий или",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "Knappen Avbryt",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "Din kommentar är {excess,plural,one{# tecken} other{# tecken}} för lång",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "Redaktör för meddelande",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "Fet",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "Punktlista",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "Kursiv",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "Numrerad lista",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "Understruken",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "Lägg till en kommentar, @ för att nämna",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "Platshållare för inmatning av meddelande",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "Skriv en kommentar eller",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "İptal düğmesi",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "Yorumunuz fazladan {excess,plural,one{# karakter} other{# karakter}} içeriyor",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "Mesaj düzenleyici",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "Kalın",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "Madde işaretli liste",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "İtalik",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "Numaralı liste",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "Altı çizili",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "Bir yorum ekleyin, bahsetmek için @ ekleyin",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "Mesaj girişi yer tutucu",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "Bir yorum yazın veya",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "取消按钮",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "您的评论过长,超出 {excess,plural,other{# 个字符}}",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "消息编辑器",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "粗体",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "项目符号列表",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "斜体",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "编号列表",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "下划线",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "添加评论,@ 提及",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "消息输入占位符",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "书写评论或",
@@ -20,6 +20,11 @@ export default {
20
20
  "groupSharedFeatures.threadedAnnotations.messageEditor.cancelButtonAriaLabel": "取消按鈕",
21
21
  "groupSharedFeatures.threadedAnnotations.messageEditor.characterLimitExceeded": "您的留言 {excess,plural,one{# 個字元} other{# 個字元}}因此過長",
22
22
  "groupSharedFeatures.threadedAnnotations.messageEditor.editorContentAriaLabel": "訊息編輯器",
23
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBold": "粗體",
24
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatBulletList": "項目符號清單",
25
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatItalic": "斜體",
26
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatNumberedList": "編號清單",
27
+ "groupSharedFeatures.threadedAnnotations.messageEditor.formatUnderline": "底線",
23
28
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAddComment": "新增留言,用 @ 提及對方",
24
29
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderAriaLabel": "訊息輸入預留位置",
25
30
  "groupSharedFeatures.threadedAnnotations.messageEditor.placeholderPrefix": "撰寫留言或",
@@ -1,5 +1,8 @@
1
1
  import { HeadlessUserSelectorHandle, UserContactType } from '@box/user-selector';
2
- export declare const useMessageEditor: () => {
2
+ interface UseMessageEditorOptions {
3
+ onSubmitShortcut: () => boolean;
4
+ }
5
+ export declare const useMessageEditor: ({ onSubmitShortcut }: UseMessageEditorOptions) => {
3
6
  editor: import('@tiptap/core').Editor;
4
7
  editorRef: import('react').MutableRefObject<HTMLElement>;
5
8
  isEditorEmpty: boolean;
@@ -10,3 +13,4 @@ export declare const useMessageEditor: () => {
10
13
  getEditorJsonContent: () => import('@tiptap/core').DocumentType<Record<string, any>, import('@tiptap/core').NodeType<string, Record<string, any>, any, (import('@tiptap/core').NodeType<any, any, any, any> | import('@tiptap/core').TextType<import('@tiptap/core').MarkType<any, any>>)[]>[]>;
11
14
  handleUserSelected: (user: UserContactType) => Promise<void>;
12
15
  };
16
+ export {};
@@ -1,5 +1,5 @@
1
- import { HeadlessUserSelectorProps } from '@box/user-selector';
2
1
  import { JSONContent } from '@tiptap/react';
2
+ import { HeadlessUserSelectorProps } from '@box/user-selector';
3
3
  import { TextMessageType } from '../text-message/types';
4
4
  /**
5
5
  * Defines the properties for the MessageEditor component.
@@ -1,4 +1,5 @@
1
1
  import { JSONContent } from '@tiptap/react';
2
+ import { Ref } from 'react';
2
3
  import { TextMessageType } from '../../../../v2/types';
3
4
  export interface PostButtonProps {
4
5
  disabled?: boolean;
@@ -7,5 +8,6 @@ export interface PostButtonProps {
7
8
  onPostSuccess?: () => void;
8
9
  cleanEditor: () => void;
9
10
  getEditorJsonContent: () => JSONContent | null;
11
+ buttonRef?: Ref<HTMLButtonElement>;
10
12
  }
11
- export declare const PostButton: ({ disabled, onPost, onPostError, onPostSuccess, cleanEditor, getEditorJsonContent, }: PostButtonProps) => import("react/jsx-runtime").JSX.Element;
13
+ export declare const PostButton: ({ disabled, onPost, onPostError, onPostSuccess, cleanEditor, getEditorJsonContent, buttonRef, }: PostButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ interface KeyboardShortcutEvent {
2
+ altKey: boolean;
3
+ ctrlKey: boolean;
4
+ isComposing: boolean;
5
+ key: string;
6
+ metaKey: boolean;
7
+ repeat: boolean;
8
+ shiftKey: boolean;
9
+ }
10
+ export declare const getSubmitShortcutAriaKeyShortcuts: (platform?: string) => string;
11
+ export declare const isSubmitShortcut: (event: KeyboardShortcutEvent, platform?: string) => boolean;
12
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@box/threaded-annotations",
3
- "version": "4.5.3",
3
+ "version": "4.6.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "dependencies": {
6
6
  "@floating-ui/dom": "^1.6.0",