stream-chat-react 11.19.0 → 11.21.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.
- package/dist/{Window-8c5139ab.js → Window-6c9f7581.js} +176 -119
- package/dist/browser.full-bundle.js +175 -115
- package/dist/browser.full-bundle.js.map +1 -1
- package/dist/browser.full-bundle.min.js +4 -4
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/components/Channel/Channel.d.ts.map +1 -1
- package/dist/components/Channel/Channel.js +14 -12
- package/dist/components/ChatAutoComplete/ChatAutoComplete.d.ts.map +1 -1
- package/dist/components/ChatAutoComplete/ChatAutoComplete.js +1 -1
- package/dist/components/DateSeparator/DateSeparator.d.ts +2 -1
- package/dist/components/DateSeparator/DateSeparator.d.ts.map +1 -1
- package/dist/components/DateSeparator/DateSeparator.js +4 -8
- package/dist/components/Emojis/index.cjs.js +13 -13
- package/dist/components/EventComponent/EventComponent.d.ts +2 -1
- package/dist/components/EventComponent/EventComponent.d.ts.map +1 -1
- package/dist/components/EventComponent/EventComponent.js +4 -8
- package/dist/components/Gallery/Gallery.d.ts.map +1 -1
- package/dist/components/Gallery/Gallery.js +1 -1
- package/dist/components/Gallery/Image.js +1 -1
- package/dist/components/Message/MessageSimple.js +1 -1
- package/dist/components/Message/MessageStatus.d.ts +3 -0
- package/dist/components/Message/MessageStatus.d.ts.map +1 -1
- package/dist/components/Message/MessageStatus.js +21 -18
- package/dist/components/Message/MessageTimestamp.d.ts +2 -3
- package/dist/components/Message/MessageTimestamp.d.ts.map +1 -1
- package/dist/components/Message/Timestamp.d.ts +2 -3
- package/dist/components/Message/Timestamp.d.ts.map +1 -1
- package/dist/components/Message/Timestamp.js +6 -3
- package/dist/components/Message/utils.d.ts.map +1 -1
- package/dist/components/Message/utils.js +7 -4
- package/dist/components/MessageBounce/MessageBounceModal.js +1 -1
- package/dist/components/MessageInput/MessageInput.d.ts +2 -0
- package/dist/components/MessageInput/MessageInput.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useCreateMessageInputContext.d.ts.map +1 -1
- package/dist/components/MessageInput/hooks/useCreateMessageInputContext.js +3 -1
- package/dist/components/MessageList/VirtualizedMessageList.d.ts +2 -2
- package/dist/components/MessageList/VirtualizedMessageList.d.ts.map +1 -1
- package/dist/components/MessageList/VirtualizedMessageList.js +2 -1
- package/dist/components/MessageList/VirtualizedMessageListComponents.d.ts.map +1 -1
- package/dist/components/MessageList/VirtualizedMessageListComponents.js +2 -2
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.d.ts +1 -1
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.d.ts.map +1 -1
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.js +5 -3
- package/dist/components/MessageList/renderMessages.js +1 -1
- package/dist/components/Modal/Modal.d.ts +3 -1
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/components/Modal/Modal.js +3 -2
- package/dist/components/Reactions/ReactionsListModal.d.ts.map +1 -1
- package/dist/components/Reactions/ReactionsListModal.js +1 -1
- package/dist/constants/limits.d.ts +1 -0
- package/dist/constants/limits.d.ts.map +1 -1
- package/dist/constants/limits.js +1 -0
- package/dist/i18n/Streami18n.d.ts +7 -0
- package/dist/i18n/Streami18n.d.ts.map +1 -1
- package/dist/i18n/Streami18n.js +16 -3
- package/dist/i18n/de.json +3 -0
- package/dist/i18n/en.json +3 -0
- package/dist/i18n/es.json +3 -0
- package/dist/i18n/fr.json +3 -0
- package/dist/i18n/hi.json +3 -0
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n/index.d.ts.map +1 -1
- package/dist/i18n/it.json +3 -0
- package/dist/i18n/ja.json +3 -0
- package/dist/i18n/ko.json +3 -0
- package/dist/i18n/nl.json +3 -0
- package/dist/i18n/pt.json +3 -0
- package/dist/i18n/ru.json +3 -0
- package/dist/i18n/tr.json +3 -0
- package/dist/i18n/utils.d.ts +18 -5
- package/dist/i18n/utils.d.ts.map +1 -1
- package/dist/i18n/utils.js +43 -2
- package/dist/index.cjs.js +20 -17
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
export var useCreateMessageInputContext = function (value) {
|
|
3
|
-
var additionalTextareaProps = value.additionalTextareaProps, asyncMessagesMultiSendEnabled = value.asyncMessagesMultiSendEnabled, attachments = value.attachments, audioRecordingEnabled = value.audioRecordingEnabled, autocompleteTriggers = value.autocompleteTriggers, cancelURLEnrichment = value.cancelURLEnrichment, clearEditingState = value.clearEditingState, closeCommandsList = value.closeCommandsList, closeMentionsList = value.closeMentionsList, cooldownInterval = value.cooldownInterval, cooldownRemaining = value.cooldownRemaining, disabled = value.disabled, disableMentions = value.disableMentions, dismissLinkPreview = value.dismissLinkPreview, doFileUploadRequest = value.doFileUploadRequest, doImageUploadRequest = value.doImageUploadRequest, emojiSearchIndex = value.emojiSearchIndex, errorHandler = value.errorHandler, fileOrder = value.fileOrder, fileUploads = value.fileUploads, findAndEnqueueURLsToEnrich = value.findAndEnqueueURLsToEnrich, focus = value.focus, grow = value.grow, handleChange = value.handleChange, handleSubmit = value.handleSubmit, hideSendButton = value.hideSendButton, imageOrder = value.imageOrder, imageUploads = value.imageUploads, insertText = value.insertText, isUploadEnabled = value.isUploadEnabled, linkPreviews = value.linkPreviews, maxFilesLeft = value.maxFilesLeft, maxRows = value.maxRows, mentionAllAppUsers = value.mentionAllAppUsers, mentioned_users = value.mentioned_users, mentionQueryParams = value.mentionQueryParams, message = value.message, noFiles = value.noFiles, numberOfUploads = value.numberOfUploads, onPaste = value.onPaste, onSelectUser = value.onSelectUser, openCommandsList = value.openCommandsList, openMentionsList = value.openMentionsList, overrideSubmitHandler = value.overrideSubmitHandler, parent = value.parent, publishTypingEvent = value.publishTypingEvent, recordingController = value.recordingController, removeAttachments = value.removeAttachments, removeFile = value.removeFile, removeImage = value.removeImage, setCooldownRemaining = value.setCooldownRemaining, setText = value.setText, shouldSubmit = value.shouldSubmit, showCommandsList = value.showCommandsList, showMentionsList = value.showMentionsList, text = value.text, textareaRef = value.textareaRef, uploadAttachment = value.uploadAttachment, uploadFile = value.uploadFile, uploadImage = value.uploadImage, uploadNewFiles = value.uploadNewFiles, upsertAttachments = value.upsertAttachments, useMentionsTransliteration = value.useMentionsTransliteration;
|
|
3
|
+
var additionalTextareaProps = value.additionalTextareaProps, asyncMessagesMultiSendEnabled = value.asyncMessagesMultiSendEnabled, attachments = value.attachments, audioRecordingEnabled = value.audioRecordingEnabled, autocompleteTriggers = value.autocompleteTriggers, cancelURLEnrichment = value.cancelURLEnrichment, clearEditingState = value.clearEditingState, closeCommandsList = value.closeCommandsList, closeMentionsList = value.closeMentionsList, cooldownInterval = value.cooldownInterval, cooldownRemaining = value.cooldownRemaining, disabled = value.disabled, disableMentions = value.disableMentions, dismissLinkPreview = value.dismissLinkPreview, doFileUploadRequest = value.doFileUploadRequest, doImageUploadRequest = value.doImageUploadRequest, emojiSearchIndex = value.emojiSearchIndex, errorHandler = value.errorHandler, fileOrder = value.fileOrder, fileUploads = value.fileUploads, findAndEnqueueURLsToEnrich = value.findAndEnqueueURLsToEnrich, focus = value.focus, grow = value.grow, handleChange = value.handleChange, handleSubmit = value.handleSubmit, hideSendButton = value.hideSendButton, imageOrder = value.imageOrder, imageUploads = value.imageUploads, insertText = value.insertText, isUploadEnabled = value.isUploadEnabled, linkPreviews = value.linkPreviews, maxFilesLeft = value.maxFilesLeft, maxRows = value.maxRows, mentionAllAppUsers = value.mentionAllAppUsers, mentioned_users = value.mentioned_users, mentionQueryParams = value.mentionQueryParams, message = value.message, minRows = value.minRows, noFiles = value.noFiles, numberOfUploads = value.numberOfUploads, onPaste = value.onPaste, onSelectUser = value.onSelectUser, openCommandsList = value.openCommandsList, openMentionsList = value.openMentionsList, overrideSubmitHandler = value.overrideSubmitHandler, parent = value.parent, publishTypingEvent = value.publishTypingEvent, recordingController = value.recordingController, removeAttachments = value.removeAttachments, removeFile = value.removeFile, removeImage = value.removeImage, setCooldownRemaining = value.setCooldownRemaining, setText = value.setText, shouldSubmit = value.shouldSubmit, showCommandsList = value.showCommandsList, showMentionsList = value.showMentionsList, text = value.text, textareaRef = value.textareaRef, uploadAttachment = value.uploadAttachment, uploadFile = value.uploadFile, uploadImage = value.uploadImage, uploadNewFiles = value.uploadNewFiles, upsertAttachments = value.upsertAttachments, useMentionsTransliteration = value.useMentionsTransliteration;
|
|
4
4
|
var editing = message === null || message === void 0 ? void 0 : message.editing;
|
|
5
5
|
var fileUploadsValue = Object.entries(fileUploads)
|
|
6
6
|
// eslint-disable-next-line
|
|
@@ -57,6 +57,7 @@ export var useCreateMessageInputContext = function (value) {
|
|
|
57
57
|
mentioned_users: mentioned_users,
|
|
58
58
|
mentionQueryParams: mentionQueryParams,
|
|
59
59
|
message: message,
|
|
60
|
+
minRows: minRows,
|
|
60
61
|
noFiles: noFiles,
|
|
61
62
|
numberOfUploads: numberOfUploads,
|
|
62
63
|
onPaste: onPaste,
|
|
@@ -102,6 +103,7 @@ export var useCreateMessageInputContext = function (value) {
|
|
|
102
103
|
isUploadEnabled,
|
|
103
104
|
linkPreviewsValue,
|
|
104
105
|
mentionedUsersLength,
|
|
106
|
+
minRows,
|
|
105
107
|
parentId,
|
|
106
108
|
publishTypingEvent,
|
|
107
109
|
recordingController,
|
|
@@ -8,7 +8,7 @@ import { ChatContextValue } from '../../context/ChatContext';
|
|
|
8
8
|
import { ComponentContextValue } from '../../context/ComponentContext';
|
|
9
9
|
import type { UserResponse } from 'stream-chat';
|
|
10
10
|
import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
|
|
11
|
-
type VirtualizedMessageListPropsForContext = 'additionalMessageInputProps' | 'closeReactionSelectorOnClick' | 'customMessageActions' | 'customMessageRenderer' | 'head' | 'loadingMore' | 'Message' | 'messageActions' | 'shouldGroupByUser' | 'reactionDetailsSort' | 'sortReactions' | 'sortReactionDetails' | 'threadList';
|
|
11
|
+
type VirtualizedMessageListPropsForContext = 'additionalMessageInputProps' | 'closeReactionSelectorOnClick' | 'customMessageActions' | 'customMessageRenderer' | 'formatDate' | 'head' | 'loadingMore' | 'Message' | 'messageActions' | 'shouldGroupByUser' | 'reactionDetailsSort' | 'sortReactions' | 'sortReactionDetails' | 'threadList';
|
|
12
12
|
/**
|
|
13
13
|
* Context object provided to some Virtuoso props that are functions (components rendered by Virtuoso and other functions)
|
|
14
14
|
*/
|
|
@@ -36,7 +36,7 @@ export type VirtuosoContext<StreamChatGenerics extends DefaultStreamChatGenerics
|
|
|
36
36
|
/** The number of unread messages in the current channel. */
|
|
37
37
|
unreadMessageCount?: number;
|
|
38
38
|
};
|
|
39
|
-
type PropsDrilledToMessage = 'additionalMessageInputProps' | 'customMessageActions' | 'messageActions' | 'reactionDetailsSort' | 'sortReactions' | 'sortReactionDetails';
|
|
39
|
+
type PropsDrilledToMessage = 'additionalMessageInputProps' | 'customMessageActions' | 'formatDate' | 'messageActions' | 'reactionDetailsSort' | 'sortReactions' | 'sortReactionDetails';
|
|
40
40
|
export type VirtualizedMessageListProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Partial<Pick<MessageProps<StreamChatGenerics>, PropsDrilledToMessage>> & {
|
|
41
41
|
/** Additional props to be passed the underlying [`react-virtuoso` virtualized list dependency](https://virtuoso.dev/virtuoso-api-reference/) */
|
|
42
42
|
additionalVirtuosoProps?: VirtuosoProps<UnknownType, VirtuosoContext<StreamChatGenerics>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedMessageList.d.ts","sourceRoot":"","sources":["../../../src/components/MessageList/VirtualizedMessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAA2C,MAAM,OAAO,CAAC;AAClF,OAAO,EAEL,uBAAuB,EACvB,0BAA0B,EAE1B,cAAc,EACd,aAAa,EACd,MAAM,gBAAgB,CAAC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uB,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IAC5E,2GAA2G;IAC3G,iBAAiB,EAAE,aAAa,CAAC,kBAAkB,CAAC,EAAE,CAAC;IACvD,yHAAyH;IACzH,WAAW,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IACvC,4GAA4G;IAC5G,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,YAAY,CAAC,EAAE,IAAI,CAAC;IACpB;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,4DAA4D;IAC5D,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;
|
|
1
|
+
{"version":3,"file":"VirtualizedMessageList.d.ts","sourceRoot":"","sources":["../../../src/components/MessageList/VirtualizedMessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAA2C,MAAM,OAAO,CAAC;AAClF,OAAO,EAEL,uBAAuB,EACvB,0BAA0B,EAE1B,cAAc,EACd,aAAa,EACd,MAAM,gBAAgB,CAAC;AAkBxB,OAAO,EAGL,UAAU,EAEV,qBAAqB,EACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAiB,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAalF,OAAO,EACL,yBAAyB,EAE1B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAGL,aAAa,EAEd,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAkB,MAAM,2BAA2B,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAuB,MAAM,gCAAgC,CAAC;AAE5F,OAAO,KAAK,EAA+C,YAAY,EAAE,MAAM,aAAa,CAAC;AAC7F,OAAO,KAAK,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhF,KAAK,qCAAqC,GACtC,6BAA6B,GAC7B,8BAA8B,GAC9B,sBAAsB,GACtB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AC;AAEF;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,EAChF,KAAK,EAAE,2BAA2B,CAAC,kBAAkB,CAAC,qBAyCvD"}
|
|
@@ -48,7 +48,7 @@ function calculateInitialTopMostItemIndex(messages, highlightedMessageId) {
|
|
|
48
48
|
}
|
|
49
49
|
var VirtualizedMessageListWithContext = function (props) {
|
|
50
50
|
var _a, _b;
|
|
51
|
-
var additionalMessageInputProps = props.additionalMessageInputProps, _c = props.additionalVirtuosoProps, additionalVirtuosoProps = _c === void 0 ? {} : _c, channel = props.channel, channelUnreadUiState = props.channelUnreadUiState, closeReactionSelectorOnClick = props.closeReactionSelectorOnClick, customMessageActions = props.customMessageActions, customMessageRenderer = props.customMessageRenderer, defaultItemHeight = props.defaultItemHeight, _d = props.disableDateSeparator, disableDateSeparator = _d === void 0 ? true : _d, groupStyles = props.groupStyles, hasMoreNewer = props.hasMoreNewer, head = props.head, _e = props.hideDeletedMessages, hideDeletedMessages = _e === void 0 ? false : _e, _f = props.hideNewMessageSeparator, hideNewMessageSeparator = _f === void 0 ? false : _f, highlightedMessageId = props.highlightedMessageId, jumpToLatestMessage = props.jumpToLatestMessage, loadingMore = props.loadingMore, loadMore = props.loadMore, loadMoreNewer = props.loadMoreNewer, MessageUIComponentFromProps = props.Message, messageActions = props.messageActions, _g = props.messageLimit, messageLimit = _g === void 0 ? DEFAULT_NEXT_CHANNEL_PAGE_SIZE : _g, messages = props.messages, notifications = props.notifications,
|
|
51
|
+
var additionalMessageInputProps = props.additionalMessageInputProps, _c = props.additionalVirtuosoProps, additionalVirtuosoProps = _c === void 0 ? {} : _c, channel = props.channel, channelUnreadUiState = props.channelUnreadUiState, closeReactionSelectorOnClick = props.closeReactionSelectorOnClick, customMessageActions = props.customMessageActions, customMessageRenderer = props.customMessageRenderer, defaultItemHeight = props.defaultItemHeight, _d = props.disableDateSeparator, disableDateSeparator = _d === void 0 ? true : _d, formatDate = props.formatDate, groupStyles = props.groupStyles, hasMoreNewer = props.hasMoreNewer, head = props.head, _e = props.hideDeletedMessages, hideDeletedMessages = _e === void 0 ? false : _e, _f = props.hideNewMessageSeparator, hideNewMessageSeparator = _f === void 0 ? false : _f, highlightedMessageId = props.highlightedMessageId, jumpToLatestMessage = props.jumpToLatestMessage, loadingMore = props.loadingMore, loadMore = props.loadMore, loadMoreNewer = props.loadMoreNewer, MessageUIComponentFromProps = props.Message, messageActions = props.messageActions, _g = props.messageLimit, messageLimit = _g === void 0 ? DEFAULT_NEXT_CHANNEL_PAGE_SIZE : _g, messages = props.messages, notifications = props.notifications,
|
|
52
52
|
// TODO: refactor to scrollSeekPlaceHolderConfiguration and components.ScrollSeekPlaceholder, like the Virtuoso Component
|
|
53
53
|
_h = props.overscan,
|
|
54
54
|
// TODO: refactor to scrollSeekPlaceHolderConfiguration and components.ScrollSeekPlaceholder, like the Virtuoso Component
|
|
@@ -214,6 +214,7 @@ var VirtualizedMessageListWithContext = function (props) {
|
|
|
214
214
|
customMessageRenderer: customMessageRenderer,
|
|
215
215
|
DateSeparator: DateSeparator,
|
|
216
216
|
firstUnreadMessageId: channelUnreadUiState === null || channelUnreadUiState === void 0 ? void 0 : channelUnreadUiState.first_unread_message_id,
|
|
217
|
+
formatDate: formatDate,
|
|
217
218
|
head: head,
|
|
218
219
|
lastReadDate: channelUnreadUiState === null || channelUnreadUiState === void 0 ? void 0 : channelUnreadUiState.last_read,
|
|
219
220
|
lastReadMessageId: channelUnreadUiState === null || channelUnreadUiState === void 0 ? void 0 : channelUnreadUiState.last_read_message_id,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedMessageListComponents.d.ts","sourceRoot":"","sources":["../../../src/components/MessageList/VirtualizedMessageListComponents.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAMrD,OAAO,EAAE,aAAa,EAAuB,MAAM,eAAe,CAAC;AAInE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhF,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,UAElF;AAED,wBAAgB,uBAAuB,CAAC,iBAAiB,EAAE,MAAM,UAEhE;AAED,eAAO,MAAM,wBAAwB,0JAGuC,IAAI,uGAG7D,SAAS,WAAW,CAAC,EAAE,UAUjC,CAAC;AAEV,KAAK,4BAA4B,CAC/B,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E;IACF,OAAO,CAAC,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAC;CAC/C,CAAC;AAGF,eAAO,MAAM,IAAI;;;;;;;0EAyBhB,CAAC;AACF,eAAO,MAAM,MAAM,gLAgBlB,CAAC;AACF,eAAO,MAAM,gBAAgB,yKAe5B,CAAC;AACF,eAAO,MAAM,MAAM,kHAKlB,CAAC;AACF,eAAO,MAAM,eAAe,oGAGX,MAAM,SACd,WAAW,
|
|
1
|
+
{"version":3,"file":"VirtualizedMessageListComponents.d.ts","sourceRoot":"","sources":["../../../src/components/MessageList/VirtualizedMessageListComponents.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAMrD,OAAO,EAAE,aAAa,EAAuB,MAAM,eAAe,CAAC;AAInE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,KAAK,EAAE,yBAAyB,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAIhF,wBAAgB,kBAAkB,CAAC,aAAa,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,UAElF;AAED,wBAAgB,uBAAuB,CAAC,iBAAiB,EAAE,MAAM,UAEhE;AAED,eAAO,MAAM,wBAAwB,0JAGuC,IAAI,uGAG7D,SAAS,WAAW,CAAC,EAAE,UAUjC,CAAC;AAEV,KAAK,4BAA4B,CAC/B,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E;IACF,OAAO,CAAC,EAAE,eAAe,CAAC,kBAAkB,CAAC,CAAC;CAC/C,CAAC;AAGF,eAAO,MAAM,IAAI;;;;;;;0EAyBhB,CAAC;AACF,eAAO,MAAM,MAAM,gLAgBlB,CAAC;AACF,eAAO,MAAM,gBAAgB,yKAe5B,CAAC;AACF,eAAO,MAAM,MAAM,kHAKlB,CAAC;AACF,eAAO,MAAM,eAAe,oGAGX,MAAM,SACd,WAAW,mFAoHnB,CAAC"}
|
|
@@ -62,7 +62,7 @@ export var Footer = function () {
|
|
|
62
62
|
};
|
|
63
63
|
export var messageRenderer = function (virtuosoIndex, _data, virtuosoContext) {
|
|
64
64
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
65
|
-
var additionalMessageInputProps = virtuosoContext.additionalMessageInputProps, closeReactionSelectorOnClick = virtuosoContext.closeReactionSelectorOnClick, customMessageActions = virtuosoContext.customMessageActions, customMessageRenderer = virtuosoContext.customMessageRenderer, DateSeparator = virtuosoContext.DateSeparator, firstUnreadMessageId = virtuosoContext.firstUnreadMessageId, lastReadDate = virtuosoContext.lastReadDate, lastReadMessageId = virtuosoContext.lastReadMessageId, lastReceivedMessageId = virtuosoContext.lastReceivedMessageId, MessageUIComponent = virtuosoContext.Message, messageActions = virtuosoContext.messageActions, MessageSystem = virtuosoContext.MessageSystem, numItemsPrepended = virtuosoContext.numItemsPrepended, ownMessagesReadByOthers = virtuosoContext.ownMessagesReadByOthers, messageList = virtuosoContext.processedMessages, reactionDetailsSort = virtuosoContext.reactionDetailsSort, shouldGroupByUser = virtuosoContext.shouldGroupByUser, sortReactionDetails = virtuosoContext.sortReactionDetails, sortReactions = virtuosoContext.sortReactions, _h = virtuosoContext.unreadMessageCount, unreadMessageCount = _h === void 0 ? 0 : _h, UnreadMessagesSeparator = virtuosoContext.UnreadMessagesSeparator, virtuosoRef = virtuosoContext.virtuosoRef;
|
|
65
|
+
var additionalMessageInputProps = virtuosoContext.additionalMessageInputProps, closeReactionSelectorOnClick = virtuosoContext.closeReactionSelectorOnClick, customMessageActions = virtuosoContext.customMessageActions, customMessageRenderer = virtuosoContext.customMessageRenderer, DateSeparator = virtuosoContext.DateSeparator, firstUnreadMessageId = virtuosoContext.firstUnreadMessageId, formatDate = virtuosoContext.formatDate, lastReadDate = virtuosoContext.lastReadDate, lastReadMessageId = virtuosoContext.lastReadMessageId, lastReceivedMessageId = virtuosoContext.lastReceivedMessageId, MessageUIComponent = virtuosoContext.Message, messageActions = virtuosoContext.messageActions, MessageSystem = virtuosoContext.MessageSystem, numItemsPrepended = virtuosoContext.numItemsPrepended, ownMessagesReadByOthers = virtuosoContext.ownMessagesReadByOthers, messageList = virtuosoContext.processedMessages, reactionDetailsSort = virtuosoContext.reactionDetailsSort, shouldGroupByUser = virtuosoContext.shouldGroupByUser, sortReactionDetails = virtuosoContext.sortReactionDetails, sortReactions = virtuosoContext.sortReactions, _h = virtuosoContext.unreadMessageCount, unreadMessageCount = _h === void 0 ? 0 : _h, UnreadMessagesSeparator = virtuosoContext.UnreadMessagesSeparator, virtuosoRef = virtuosoContext.virtuosoRef;
|
|
66
66
|
var streamMessageIndex = calculateItemIndex(virtuosoIndex, numItemsPrepended);
|
|
67
67
|
if (customMessageRenderer) {
|
|
68
68
|
return customMessageRenderer(messageList, streamMessageIndex);
|
|
@@ -103,7 +103,7 @@ export var messageRenderer = function (virtuosoIndex, _data, virtuosoContext) {
|
|
|
103
103
|
return (React.createElement(React.Fragment, null,
|
|
104
104
|
showUnreadSeparatorAbove && (React.createElement("div", { className: 'str-chat__unread-messages-separator-wrapper' },
|
|
105
105
|
React.createElement(UnreadMessagesSeparator, { unreadCount: unreadMessageCount }))),
|
|
106
|
-
React.createElement(Message, { additionalMessageInputProps: additionalMessageInputProps, autoscrollToBottom: (_g = virtuosoRef.current) === null || _g === void 0 ? void 0 : _g.autoscrollToBottom, closeReactionSelectorOnClick: closeReactionSelectorOnClick, customMessageActions: customMessageActions, endOfGroup: endOfGroup, firstOfGroup: firstOfGroup, groupedByUser: groupedByUser, lastReceivedId: lastReceivedMessageId, message: message, Message: MessageUIComponent, messageActions: messageActions, reactionDetailsSort: reactionDetailsSort, readBy: ownMessagesReadByOthers[message.id] || [], sortReactionDetails: sortReactionDetails, sortReactions: sortReactions }),
|
|
106
|
+
React.createElement(Message, { additionalMessageInputProps: additionalMessageInputProps, autoscrollToBottom: (_g = virtuosoRef.current) === null || _g === void 0 ? void 0 : _g.autoscrollToBottom, closeReactionSelectorOnClick: closeReactionSelectorOnClick, customMessageActions: customMessageActions, endOfGroup: endOfGroup, firstOfGroup: firstOfGroup, formatDate: formatDate, groupedByUser: groupedByUser, lastReceivedId: lastReceivedMessageId, message: message, Message: MessageUIComponent, messageActions: messageActions, reactionDetailsSort: reactionDetailsSort, readBy: ownMessagesReadByOthers[message.id] || [], sortReactionDetails: sortReactionDetails, sortReactions: sortReactions }),
|
|
107
107
|
showUnreadSeparatorBelow && (React.createElement("div", { className: 'str-chat__unread-messages-separator-wrapper' },
|
|
108
108
|
React.createElement(UnreadMessagesSeparator, { unreadCount: unreadMessageCount })))));
|
|
109
109
|
};
|
|
@@ -2,6 +2,6 @@ import type { StreamMessage } from '../../../../context/ChannelStateContext';
|
|
|
2
2
|
import type { DefaultStreamChatGenerics } from '../../../../types/types';
|
|
3
3
|
export declare const useGiphyPreview: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(separateGiphyPreview: boolean) => {
|
|
4
4
|
giphyPreviewMessage: StreamMessage<StreamChatGenerics> | undefined;
|
|
5
|
-
setGiphyPreviewMessage: import("react").Dispatch<import("react").SetStateAction<StreamMessage<StreamChatGenerics> | undefined
|
|
5
|
+
setGiphyPreviewMessage: import("react").Dispatch<import("react").SetStateAction<StreamMessage<StreamChatGenerics> | undefined>> | undefined;
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=useGiphyPreview.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGiphyPreview.d.ts","sourceRoot":"","sources":["../../../../../src/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAE7E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEzE,eAAO,MAAM,eAAe,2GAGJ,OAAO;;;
|
|
1
|
+
{"version":3,"file":"useGiphyPreview.d.ts","sourceRoot":"","sources":["../../../../../src/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AAE7E,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAEzE,eAAO,MAAM,eAAe,2GAGJ,OAAO;;;CAyB9B,CAAC"}
|
|
@@ -13,7 +13,9 @@ export var useGiphyPreview = function (separateGiphyPreview) {
|
|
|
13
13
|
if (separateGiphyPreview)
|
|
14
14
|
client.on('message.new', handleEvent);
|
|
15
15
|
return function () { return client.off('message.new', handleEvent); };
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
}, [client, separateGiphyPreview]);
|
|
17
|
+
return {
|
|
18
|
+
giphyPreviewMessage: giphyPreviewMessage,
|
|
19
|
+
setGiphyPreviewMessage: separateGiphyPreview ? setGiphyPreviewMessage : undefined,
|
|
20
|
+
};
|
|
19
21
|
};
|
|
@@ -19,7 +19,7 @@ export function defaultRenderMessages(_a) {
|
|
|
19
19
|
React.createElement(HeaderComponent, null)));
|
|
20
20
|
}
|
|
21
21
|
else if (message.type === 'system') {
|
|
22
|
-
renderedMessages.push(React.createElement("li", { key: message.id || message.created_at },
|
|
22
|
+
renderedMessages.push(React.createElement("li", { "data-message-id": message.id, key: message.id || message.created_at },
|
|
23
23
|
React.createElement(MessageSystem, { message: message })));
|
|
24
24
|
}
|
|
25
25
|
else {
|
|
@@ -2,8 +2,10 @@ import React, { PropsWithChildren } from 'react';
|
|
|
2
2
|
export type ModalProps = {
|
|
3
3
|
/** If true, modal is opened or visible. */
|
|
4
4
|
open: boolean;
|
|
5
|
+
/** Custom class to be applied to the modal root div */
|
|
6
|
+
className?: string;
|
|
5
7
|
/** Callback handler for closing of modal. */
|
|
6
8
|
onClose?: (event: React.KeyboardEvent | React.MouseEvent<HTMLButtonElement | HTMLDivElement>) => void;
|
|
7
9
|
};
|
|
8
|
-
export declare const Modal: ({ children, onClose, open }: PropsWithChildren<ModalProps>) => React.JSX.Element | null;
|
|
10
|
+
export declare const Modal: ({ children, className, onClose, open }: PropsWithChildren<ModalProps>) => React.JSX.Element | null;
|
|
9
11
|
//# sourceMappingURL=Modal.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAqB,MAAM,OAAO,CAAC;AAOpE,MAAM,MAAM,UAAU,GAAG;IACvB,2CAA2C;IAC3C,IAAI,EAAE,OAAO,CAAC;IACd,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,OAAO,CAAC,EAAE,CACR,KAAK,EAAE,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,UAAU,CAAC,iBAAiB,GAAG,cAAc,CAAC,KAC9E,IAAI,CAAC;CACX,CAAC;AAEF,eAAO,MAAM,KAAK,2CAA4C,kBAAkB,UAAU,CAAC,6BAmD1F,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
1
2
|
import React, { useEffect, useRef } from 'react';
|
|
2
3
|
import { FocusScope } from '@react-aria/focus';
|
|
3
4
|
import { CloseIconRound } from './icons';
|
|
4
5
|
import { useChatContext, useTranslationContext } from '../../context';
|
|
5
6
|
export var Modal = function (_a) {
|
|
6
|
-
var children = _a.children, onClose = _a.onClose, open = _a.open;
|
|
7
|
+
var children = _a.children, className = _a.className, onClose = _a.onClose, open = _a.open;
|
|
7
8
|
var t = useTranslationContext('Modal').t;
|
|
8
9
|
var themeVersion = useChatContext('Modal').themeVersion;
|
|
9
10
|
var innerRef = useRef(null);
|
|
@@ -27,7 +28,7 @@ export var Modal = function (_a) {
|
|
|
27
28
|
}, [onClose, open]);
|
|
28
29
|
if (!open)
|
|
29
30
|
return null;
|
|
30
|
-
return (React.createElement("div", { className: 'str-chat__modal str-chat__modal--open', onClick: handleClick },
|
|
31
|
+
return (React.createElement("div", { className: clsx('str-chat__modal str-chat__modal--open', className), onClick: handleClick },
|
|
31
32
|
React.createElement(FocusScope, { autoFocus: true, contain: true },
|
|
32
33
|
React.createElement("button", { className: 'str-chat__modal__close-button', ref: closeRef, title: t('Close') },
|
|
33
34
|
themeVersion === '2' && React.createElement(CloseIconRound, null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactionsListModal.d.ts","sourceRoot":"","sources":["../../../src/components/Reactions/ReactionsListModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAExF,OAAO,EAAS,UAAU,EAAE,MAAM,UAAU,CAAC;AAI7C,OAAO,EAAE,mBAAmB,EAAqB,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D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K,uBAAuB,CAC1B,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E,UAAU,GACZ,OAAO,CACL,IAAI,CAAC,mBAAmB,CAAC,kBAAkB,CAAC,EAAE,sBAAsB,GAAG,qBAAqB,CAAC,CAC9F,GAAG;IACF,SAAS,EAAE,eAAe,EAAE,CAAC;IAC7B,oBAAoB,EAAE,YAAY,CAAC,kBAAkB,CAAC,CAAC;IACvD,4BAA4B,CAAC,EAAE,CAAC,YAAY,EAAE,YAAY,CAAC,kBAAkB,CAAC,KAAK,IAAI,CAAC;IACxF,IAAI,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,CAAC;IACxC,qCAAqC;IACrC,mBAAmB,CAAC,EAAE,yBAAyB,CAAC,kBAAkB,CAAC,CAAC;CACrE,CAAC;AAIJ,wBAAgB,kBAAkB,CAChC,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,EAChF,EACA,oBAAoB,EACpB,4BAA4B,EAC5B,mBAAmB,EAAE,uBAAuB,EAC5C,SAAS,EACT,oBAAoB,EACpB,mBAAmB,EAAE,uBAAuB,EAC5C,GAAG,UAAU,EACd,EAAE,uBAAuB,CAAC,kBAAkB,CAAC,qBAyF7C"}
|
|
@@ -29,7 +29,7 @@ export function ReactionsListModal(_a) {
|
|
|
29
29
|
? __spreadArray([], reactionDetails, true).sort(legacySortReactionDetails)
|
|
30
30
|
: reactionDetails;
|
|
31
31
|
}, [legacySortReactionDetails, reactionDetails]);
|
|
32
|
-
return (React.createElement(Modal, __assign({}, modalProps),
|
|
32
|
+
return (React.createElement(Modal, __assign({}, modalProps, { className: clsx('str-chat__message-reactions-details-modal', modalProps.className) }),
|
|
33
33
|
React.createElement("div", { className: 'str-chat__message-reactions-details', "data-testid": 'reactions-list-modal' },
|
|
34
34
|
React.createElement("div", { className: 'str-chat__message-reactions-details-reaction-types' }, reactions.map(function (_a) {
|
|
35
35
|
var EmojiComponent = _a.EmojiComponent, reactionCount = _a.reactionCount, reactionType = _a.reactionType;
|
|
@@ -4,4 +4,5 @@ export declare const DEFAULT_JUMP_TO_PAGE_SIZE = 100;
|
|
|
4
4
|
export declare const DEFAULT_THREAD_PAGE_SIZE = 50;
|
|
5
5
|
export declare const DEFAULT_LOAD_PAGE_SCROLL_THRESHOLD = 250;
|
|
6
6
|
export declare const DEFAULT_UPLOAD_SIZE_LIMIT_BYTES: number;
|
|
7
|
+
export declare const DEFAULT_HIGHLIGHT_DURATION = 500;
|
|
7
8
|
//# sourceMappingURL=limits.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../src/constants/limits.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iCAAiC,KAAK,CAAC;AACpD,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAClD,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAC7C,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,kCAAkC,MAAM,CAAC;AACtD,eAAO,MAAM,+BAA+B,QAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"limits.d.ts","sourceRoot":"","sources":["../../src/constants/limits.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iCAAiC,KAAK,CAAC;AACpD,eAAO,MAAM,8BAA8B,MAAM,CAAC;AAClD,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAC7C,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAC3C,eAAO,MAAM,kCAAkC,MAAM,CAAC;AACtD,eAAO,MAAM,+BAA+B,QAAoB,CAAC;AACjE,eAAO,MAAM,0BAA0B,MAAM,CAAC"}
|
package/dist/constants/limits.js
CHANGED
|
@@ -2,6 +2,7 @@ import { TFunction } from 'i18next';
|
|
|
2
2
|
import Dayjs from 'dayjs';
|
|
3
3
|
import type momentTimezone from 'moment-timezone';
|
|
4
4
|
import type { TranslationLanguages } from 'stream-chat';
|
|
5
|
+
import type { CustomFormatters, PredefinedFormatters } from './utils';
|
|
5
6
|
import type { TDateTimeParser } from '../context/TranslationContext';
|
|
6
7
|
import type { UnknownType } from '../types/types';
|
|
7
8
|
import { enTranslations } from './translations';
|
|
@@ -33,6 +34,7 @@ export type Streami18nOptions = {
|
|
|
33
34
|
};
|
|
34
35
|
debug?: boolean;
|
|
35
36
|
disableDateTimeTranslations?: boolean;
|
|
37
|
+
formatters?: Partial<PredefinedFormatters> & CustomFormatters;
|
|
36
38
|
language?: TranslationLanguages;
|
|
37
39
|
logger?: (message?: string) => void;
|
|
38
40
|
parseMissingKeyHandler?: (key: string, defaultValue?: string) => string;
|
|
@@ -67,12 +69,14 @@ export declare class Streami18n {
|
|
|
67
69
|
logger: (msg?: string) => void;
|
|
68
70
|
currentLanguage: TranslationLanguages;
|
|
69
71
|
DateTimeParser: DateTimeParserModule;
|
|
72
|
+
formatters: PredefinedFormatters & CustomFormatters;
|
|
70
73
|
isCustomDateTimeParser: boolean;
|
|
71
74
|
i18nextConfig: {
|
|
72
75
|
debug: boolean;
|
|
73
76
|
fallbackLng: false;
|
|
74
77
|
interpolation: {
|
|
75
78
|
escapeValue: boolean;
|
|
79
|
+
formatSeparator: string;
|
|
76
80
|
};
|
|
77
81
|
keySeparator: false;
|
|
78
82
|
lng: string;
|
|
@@ -244,6 +248,9 @@ export declare class Streami18n {
|
|
|
244
248
|
searchResultsCount_one: string;
|
|
245
249
|
searchResultsCount_other: string;
|
|
246
250
|
"this content could not be displayed": string;
|
|
251
|
+
"timestamp/DateSeparator": string;
|
|
252
|
+
"timestamp/MessageTimestamp": string;
|
|
253
|
+
"timestamp/SystemMessage": string;
|
|
247
254
|
unreadMessagesSeparatorText_one: string;
|
|
248
255
|
unreadMessagesSeparatorText_other: string;
|
|
249
256
|
"{{ commaSeparatedUsers }} and {{ moreCount }} more": string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Streami18n.d.ts","sourceRoot":"","sources":["../../src/i18n/Streami18n.ts"],"names":[],"mappings":"AAAA,OAAa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oBAAoB;IAmBhD,2BAA2B,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI;CAG7D"}
|
package/dist/i18n/Streami18n.js
CHANGED
|
@@ -8,9 +8,8 @@ import localeData from 'dayjs/plugin/localeData';
|
|
|
8
8
|
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
9
9
|
import utc from 'dayjs/plugin/utc';
|
|
10
10
|
import timezone from 'dayjs/plugin/timezone';
|
|
11
|
+
import { predefinedFormatters } from './utils';
|
|
11
12
|
import { deTranslations, enTranslations, esTranslations, frTranslations, hiTranslations, itTranslations, jaTranslations, koTranslations, nlTranslations, ptTranslations, ruTranslations, trTranslations, } from './translations';
|
|
12
|
-
var defaultNS = 'translation';
|
|
13
|
-
var defaultLng = 'en';
|
|
14
13
|
import 'dayjs/locale/de';
|
|
15
14
|
import 'dayjs/locale/es';
|
|
16
15
|
import 'dayjs/locale/fr';
|
|
@@ -26,6 +25,8 @@ import 'dayjs/locale/tr';
|
|
|
26
25
|
// So As a last step I am going to import english locale
|
|
27
26
|
// to make sure I don't mess up language at other places in app.
|
|
28
27
|
import 'dayjs/locale/en';
|
|
28
|
+
var defaultNS = 'translation';
|
|
29
|
+
var defaultLng = 'en';
|
|
29
30
|
Dayjs.extend(updateLocale);
|
|
30
31
|
Dayjs.extend(utc);
|
|
31
32
|
Dayjs.extend(timezone);
|
|
@@ -418,6 +419,7 @@ var Streami18n = /** @class */ (function () {
|
|
|
418
419
|
* with moment, when setLanguage is called.
|
|
419
420
|
* */
|
|
420
421
|
this.dayjsLocales = {};
|
|
422
|
+
this.formatters = predefinedFormatters;
|
|
421
423
|
this.localeExists = function (language) {
|
|
422
424
|
if (_this.isCustomDateTimeParser)
|
|
423
425
|
return true;
|
|
@@ -444,6 +446,7 @@ var Streami18n = /** @class */ (function () {
|
|
|
444
446
|
this.currentLanguage = finalOptions.language;
|
|
445
447
|
this.DateTimeParser = finalOptions.DateTimeParser;
|
|
446
448
|
this.timezone = finalOptions.timezone;
|
|
449
|
+
this.formatters = __assign(__assign({}, predefinedFormatters), options === null || options === void 0 ? void 0 : options.formatters);
|
|
447
450
|
try {
|
|
448
451
|
if (this.DateTimeParser && isDayJs(this.DateTimeParser)) {
|
|
449
452
|
this.DateTimeParser.extend(LocalizedFormat);
|
|
@@ -473,7 +476,7 @@ var Streami18n = /** @class */ (function () {
|
|
|
473
476
|
this.i18nextConfig = {
|
|
474
477
|
debug: finalOptions.debug,
|
|
475
478
|
fallbackLng: false,
|
|
476
|
-
interpolation: { escapeValue: false },
|
|
479
|
+
interpolation: { escapeValue: false, formatSeparator: '|' },
|
|
477
480
|
keySeparator: false,
|
|
478
481
|
lng: this.currentLanguage,
|
|
479
482
|
nsSeparator: false,
|
|
@@ -512,6 +515,7 @@ var Streami18n = /** @class */ (function () {
|
|
|
512
515
|
Streami18n.prototype.init = function () {
|
|
513
516
|
return __awaiter(this, void 0, void 0, function () {
|
|
514
517
|
var _a, error_1;
|
|
518
|
+
var _this = this;
|
|
515
519
|
return __generator(this, function (_b) {
|
|
516
520
|
switch (_b.label) {
|
|
517
521
|
case 0:
|
|
@@ -524,6 +528,15 @@ var Streami18n = /** @class */ (function () {
|
|
|
524
528
|
case 2:
|
|
525
529
|
_a.t = _b.sent();
|
|
526
530
|
this.initialized = true;
|
|
531
|
+
if (this.formatters) {
|
|
532
|
+
Object.entries(this.formatters).forEach(function (_a) {
|
|
533
|
+
var _b;
|
|
534
|
+
var name = _a[0], formatterFactory = _a[1];
|
|
535
|
+
if (!formatterFactory)
|
|
536
|
+
return;
|
|
537
|
+
(_b = _this.i18nInstance.services.formatter) === null || _b === void 0 ? void 0 : _b.add(name, formatterFactory(_this));
|
|
538
|
+
});
|
|
539
|
+
}
|
|
527
540
|
return [3 /*break*/, 4];
|
|
528
541
|
case 3:
|
|
529
542
|
error_1 = _b.sent();
|
package/dist/i18n/de.json
CHANGED
|
@@ -122,6 +122,9 @@
|
|
|
122
122
|
"searchResultsCount_one": "1 Ergebnis",
|
|
123
123
|
"searchResultsCount_other": "{{ count }} Ergebnisse",
|
|
124
124
|
"this content could not be displayed": "Dieser Inhalt konnte nicht angezeigt werden",
|
|
125
|
+
"timestamp/DateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
126
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(calendar: true; format: h:mmA) }}",
|
|
127
|
+
"timestamp/SystemMessage": "{{ timestamp | timestampFormatter(format: dddd L) }}",
|
|
125
128
|
"unban-command-args": "[@Benutzername]",
|
|
126
129
|
"unban-command-description": "Einen Benutzer entbannen",
|
|
127
130
|
"unmute-command-args": "[@Benutzername]",
|
package/dist/i18n/en.json
CHANGED
|
@@ -116,6 +116,9 @@
|
|
|
116
116
|
"searchResultsCount_one": "1 result",
|
|
117
117
|
"searchResultsCount_other": "{{ count }} results",
|
|
118
118
|
"this content could not be displayed": "this content could not be displayed",
|
|
119
|
+
"timestamp/DateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
120
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(calendar: true; format: h:mmA) }}",
|
|
121
|
+
"timestamp/SystemMessage": "{{ timestamp | timestampFormatter(format: dddd L) }}",
|
|
119
122
|
"unreadMessagesSeparatorText_one": "1 unread message",
|
|
120
123
|
"unreadMessagesSeparatorText_other": "{{count}} unread messages",
|
|
121
124
|
"{{ commaSeparatedUsers }} and {{ moreCount }} more": "{{ commaSeparatedUsers }} and {{ moreCount }} more",
|
package/dist/i18n/es.json
CHANGED
|
@@ -124,6 +124,9 @@
|
|
|
124
124
|
"searchResultsCount_one": "1 resultado",
|
|
125
125
|
"searchResultsCount_other": "{{ count }} resultados",
|
|
126
126
|
"this content could not be displayed": "este contenido no se pudo mostrar",
|
|
127
|
+
"timestamp/DateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
128
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(calendar: true; format: h:mmA) }}",
|
|
129
|
+
"timestamp/SystemMessage": "{{ timestamp | timestampFormatter(format: dddd L) }}",
|
|
127
130
|
"unban-command-args": "[@usuario]",
|
|
128
131
|
"unban-command-description": "Quitar la prohibición a un usuario",
|
|
129
132
|
"unmute-command-args": "[@usuario]",
|
package/dist/i18n/fr.json
CHANGED
|
@@ -124,6 +124,9 @@
|
|
|
124
124
|
"searchResultsCount_one": "1 résultat",
|
|
125
125
|
"searchResultsCount_other": "{{ count }} résultats",
|
|
126
126
|
"this content could not be displayed": "ce contenu n'a pu être affiché",
|
|
127
|
+
"timestamp/DateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
128
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(calendar: true; format: h:mmA) }}",
|
|
129
|
+
"timestamp/SystemMessage": "{{ timestamp | timestampFormatter(format: dddd L) }}",
|
|
127
130
|
"unban-command-args": "[@nomdutilisateur]",
|
|
128
131
|
"unban-command-description": "Débannir un utilisateur",
|
|
129
132
|
"unmute-command-args": "[@nomdutilisateur]",
|
package/dist/i18n/hi.json
CHANGED
|
@@ -123,6 +123,9 @@
|
|
|
123
123
|
"searchResultsCount_one": "1 परिणाम",
|
|
124
124
|
"searchResultsCount_other": "{{ count }} परिणाम",
|
|
125
125
|
"this content could not be displayed": "यह कॉन्टेंट लोड नहीं हो पाया",
|
|
126
|
+
"timestamp/DateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
127
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(calendar: true; format: h:mmA) }}",
|
|
128
|
+
"timestamp/SystemMessage": "{{ timestamp | timestampFormatter(format: dddd L) }}",
|
|
126
129
|
"unban-command-args": "[@उपयोगकर्तनाम]",
|
|
127
130
|
"unban-command-description": "एक उपयोगकर्ता को प्रतिषेध से मुक्त करें",
|
|
128
131
|
"unmute-command-args": "[@उपयोगकर्तनाम]",
|
package/dist/i18n/index.d.ts
CHANGED
package/dist/i18n/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,YAAY,EAAE,gBAAgB,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/i18n/it.json
CHANGED
|
@@ -124,6 +124,9 @@
|
|
|
124
124
|
"searchResultsCount_one": "1 risultato",
|
|
125
125
|
"searchResultsCount_other": "{{ count }} risultati",
|
|
126
126
|
"this content could not be displayed": "questo contenuto non puó essere mostrato",
|
|
127
|
+
"timestamp/DateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
128
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(calendar: true; format: h:mmA) }}",
|
|
129
|
+
"timestamp/SystemMessage": "{{ timestamp | timestampFormatter(format: dddd L) }}",
|
|
127
130
|
"unban-command-args": "[@nomeutente]",
|
|
128
131
|
"unban-command-description": "Togliere il divieto a un utente",
|
|
129
132
|
"unmute-command-args": "[@nomeutente]",
|
package/dist/i18n/ja.json
CHANGED
|
@@ -122,6 +122,9 @@
|
|
|
122
122
|
"searchResultsCount_one": "1件の結果",
|
|
123
123
|
"searchResultsCount_other": "{{ count }}件の結果",
|
|
124
124
|
"this content could not be displayed": "このコンテンツは表示できませんでした",
|
|
125
|
+
"timestamp/DateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
126
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(calendar: true; format: h:mmA) }}",
|
|
127
|
+
"timestamp/SystemMessage": "{{ timestamp | timestampFormatter(format: dddd L) }}",
|
|
125
128
|
"unban-command-args": "[@ユーザ名]",
|
|
126
129
|
"unban-command-description": "ユーザーの禁止を解除する",
|
|
127
130
|
"unmute-command-args": "[@ユーザ名]",
|
package/dist/i18n/ko.json
CHANGED
|
@@ -122,6 +122,9 @@
|
|
|
122
122
|
"searchResultsCount_one": "1개의 결과",
|
|
123
123
|
"searchResultsCount_other": "{{ count }}개 결과",
|
|
124
124
|
"this content could not be displayed": "이 콘텐츠를 표시할 수 없습니다",
|
|
125
|
+
"timestamp/DateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
126
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(calendar: true; format: h:mmA) }}",
|
|
127
|
+
"timestamp/SystemMessage": "{{ timestamp | timestampFormatter(format: dddd L) }}",
|
|
125
128
|
"unban-command-args": "[@사용자이름]",
|
|
126
129
|
"unban-command-description": "사용자 차단 해제",
|
|
127
130
|
"unmute-command-args": "[@사용자이름]",
|
package/dist/i18n/nl.json
CHANGED
|
@@ -122,6 +122,9 @@
|
|
|
122
122
|
"searchResultsCount_one": "1 resultaat",
|
|
123
123
|
"searchResultsCount_other": "{{ count }} resultaten",
|
|
124
124
|
"this content could not be displayed": "Deze inhoud kan niet weergegeven worden",
|
|
125
|
+
"timestamp/DateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
126
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(calendar: true; format: h:mmA) }}",
|
|
127
|
+
"timestamp/SystemMessage": "{{ timestamp | timestampFormatter(format: dddd L) }}",
|
|
125
128
|
"unban-command-args": "[@gebruikersnaam]",
|
|
126
129
|
"unban-command-description": "Een gebruiker debannen",
|
|
127
130
|
"unmute-command-args": "[@gebruikersnaam]",
|
package/dist/i18n/pt.json
CHANGED
|
@@ -124,6 +124,9 @@
|
|
|
124
124
|
"searchResultsCount_one": "1 resultado",
|
|
125
125
|
"searchResultsCount_other": "{{ count }} resultados",
|
|
126
126
|
"this content could not be displayed": "este conteúdo não pôde ser exibido",
|
|
127
|
+
"timestamp/DateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
128
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(calendar: true; format: h:mmA) }}",
|
|
129
|
+
"timestamp/SystemMessage": "{{ timestamp | timestampFormatter(format: dddd L) }}",
|
|
127
130
|
"unban-command-args": "[@nomedeusuário]",
|
|
128
131
|
"unban-command-description": "Desbanir um usuário",
|
|
129
132
|
"unmute-command-args": "[@nomedeusuário]",
|
package/dist/i18n/ru.json
CHANGED
|
@@ -126,6 +126,9 @@
|
|
|
126
126
|
"searchResultsCount_one": "1 результат",
|
|
127
127
|
"searchResultsCount_other": "{{ count }} результатов",
|
|
128
128
|
"this content could not be displayed": "Этот контент не может быть отображен в данный момент",
|
|
129
|
+
"timestamp/DateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
130
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(calendar: true; format: h:mmA) }}",
|
|
131
|
+
"timestamp/SystemMessage": "{{ timestamp | timestampFormatter(format: dddd L) }}",
|
|
129
132
|
"unban-command-args": "[@имяпользователя]",
|
|
130
133
|
"unban-command-description": "Разблокировать пользователя",
|
|
131
134
|
"unmute-command-args": "[@имяпользователя]",
|
package/dist/i18n/tr.json
CHANGED
|
@@ -122,6 +122,9 @@
|
|
|
122
122
|
"searchResultsCount_one": "1 sonuç",
|
|
123
123
|
"searchResultsCount_other": "{{ count }} sonuç",
|
|
124
124
|
"this content could not be displayed": "bu içerik gösterilemiyor",
|
|
125
|
+
"timestamp/DateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
126
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(calendar: true; format: h:mmA) }}",
|
|
127
|
+
"timestamp/SystemMessage": "{{ timestamp | timestampFormatter(format: dddd L) }}",
|
|
125
128
|
"unban-command-args": "[@kullanıcıadı]",
|
|
126
129
|
"unban-command-description": "Bir kullanıcının yasağını kaldır",
|
|
127
130
|
"unmute-command-args": "[@kullanıcıadı]",
|
package/dist/i18n/utils.d.ts
CHANGED
|
@@ -1,13 +1,26 @@
|
|
|
1
1
|
import { MessageContextValue, TDateTimeParser } from '../context';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import type { TFunction } from 'i18next';
|
|
3
|
+
import type { Streami18n } from './Streami18n';
|
|
4
|
+
export type TimestampFormatterOptions = {
|
|
5
|
+
calendar?: boolean | null;
|
|
6
|
+
calendarFormats?: Record<string, string> | null;
|
|
7
|
+
format?: string | null;
|
|
8
|
+
};
|
|
9
|
+
type DateFormatterOptions = TimestampFormatterOptions & {
|
|
5
10
|
formatDate?: MessageContextValue['formatDate'];
|
|
6
11
|
messageCreatedAt?: string | Date;
|
|
12
|
+
t?: TFunction;
|
|
7
13
|
tDateTimeParser?: TDateTimeParser;
|
|
8
|
-
|
|
14
|
+
timestampTranslationKey?: string;
|
|
15
|
+
};
|
|
9
16
|
export declare const notValidDateWarning = "MessageTimestamp was called without a message, or message has invalid created_at date.";
|
|
10
17
|
export declare const noParsingFunctionWarning = "MessageTimestamp was called but there is no datetime parsing function available";
|
|
11
|
-
export declare function getDateString({ calendar, format, formatDate, messageCreatedAt, tDateTimeParser, }: DateFormatterOptions): string | number | null;
|
|
18
|
+
export declare function getDateString({ calendar, calendarFormats, format, formatDate, messageCreatedAt, t, tDateTimeParser, timestampTranslationKey, }: DateFormatterOptions): string | number | null;
|
|
19
|
+
export type FormatterFactory<V> = (streamI18n: Streami18n) => (value: V, lng: string | undefined, options: Record<string, unknown>) => string;
|
|
20
|
+
export type CustomFormatters = Record<string, FormatterFactory<any>>;
|
|
21
|
+
export type PredefinedFormatters = {
|
|
22
|
+
timestampFormatter: FormatterFactory<string | Date>;
|
|
23
|
+
};
|
|
24
|
+
export declare const predefinedFormatters: PredefinedFormatters;
|
|
12
25
|
export {};
|
|
13
26
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/i18n/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/i18n/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,mBAAmB,EACnB,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB,UAAU,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/i18n/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,mBAAmB,EACnB,eAAe,EAChB,MAAM,YAAY,CAAC;AAEpB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,MAAM,MAAM,yBAAyB,GAAG;IAEtC,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAE1B,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAEhD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC;AAEF,KAAK,oBAAoB,GAAG,yBAAyB,GAAG;IACtD,UAAU,CAAC,EAAE,mBAAmB,CAAC,YAAY,CAAC,CAAC;IAC/C,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,CAAC,CAAC,EAAE,SAAS,CAAC;IACd,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC;AAEF,eAAO,MAAM,mBAAmB,2FAC0D,CAAC;AAC3F,eAAO,MAAM,wBAAwB,oFAC8C,CAAC;AAEpF,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,eAAe,EACf,MAAM,EACN,UAAU,EACV,gBAAgB,EAChB,CAAC,EACD,eAAe,EACf,uBAAuB,GACxB,EAAE,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAsD/C;AAED,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAChC,UAAU,EAAE,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