stream-chat-react 13.13.0 → 13.13.1

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 (42) hide show
  1. package/dist/components/Attachment/AttachmentActions.js +7 -2
  2. package/dist/components/Chat/hooks/useChat.js +1 -1
  3. package/dist/components/Message/ReminderNotification.js +2 -2
  4. package/dist/components/Message/hooks/useMuteHandler.js +2 -2
  5. package/dist/components/MessageInput/AttachmentPreviewList/AttachmentPreviewList.js +1 -1
  6. package/dist/components/MessageInput/AttachmentPreviewList/FileAttachmentPreview.d.ts +2 -1
  7. package/dist/components/MessageInput/AttachmentPreviewList/FileAttachmentPreview.js +3 -2
  8. package/dist/components/MessageInput/AttachmentPreviewList/ImageAttachmentPreview.js +1 -1
  9. package/dist/components/MessageInput/AttachmentPreviewList/VoiceRecordingPreview.js +1 -1
  10. package/dist/components/MessageInput/SendButton.js +3 -1
  11. package/dist/components/Poll/PollCreationDialog/MultipleAnswersField.js +6 -2
  12. package/dist/components/Poll/PollCreationDialog/NameField.js +5 -2
  13. package/dist/components/Poll/PollCreationDialog/OptionFieldSet.js +6 -2
  14. package/dist/components/TextareaComposer/SuggestionList/CommandItem.js +21 -3
  15. package/dist/css/v2/index.css +1 -1
  16. package/dist/css/v2/index.layout.css +1 -1
  17. package/dist/experimental/Search/SearchResults/SearchResultsHeader.js +7 -2
  18. package/dist/experimental/Search/SearchResults/SearchSourceResultsLoadingIndicator.js +3 -1
  19. package/dist/experimental/index.browser.cjs +18 -2
  20. package/dist/experimental/index.browser.cjs.map +2 -2
  21. package/dist/experimental/index.node.cjs +18 -2
  22. package/dist/experimental/index.node.cjs.map +2 -2
  23. package/dist/i18n/Streami18n.d.ts +90 -78
  24. package/dist/i18n/de.json +91 -89
  25. package/dist/i18n/en.json +91 -79
  26. package/dist/i18n/es.json +99 -97
  27. package/dist/i18n/fr.json +99 -97
  28. package/dist/i18n/hi.json +91 -89
  29. package/dist/i18n/it.json +99 -97
  30. package/dist/i18n/ja.json +88 -86
  31. package/dist/i18n/ko.json +88 -86
  32. package/dist/i18n/nl.json +91 -89
  33. package/dist/i18n/pt.json +99 -97
  34. package/dist/i18n/ru.json +104 -102
  35. package/dist/i18n/tr.json +91 -89
  36. package/dist/index.browser.cjs +1607 -1518
  37. package/dist/index.browser.cjs.map +2 -2
  38. package/dist/index.node.cjs +1607 -1518
  39. package/dist/index.node.cjs.map +2 -2
  40. package/dist/scss/v2/Message/Message-layout.scss +1 -0
  41. package/dist/scss/v2/Poll/Poll-layout.scss +4 -0
  42. package/package.json +7 -7
@@ -1,5 +1,5 @@
1
1
  import clsx from 'clsx';
2
- import React from 'react';
2
+ import React, { useMemo } from 'react';
3
3
  import { useSearchContext } from '../SearchContext';
4
4
  import { useTranslationContext } from '../../../context';
5
5
  import { useStateStore } from '../../../store';
@@ -11,6 +11,11 @@ const SearchSourceFilterButton = ({ source }) => {
11
11
  const { searchController } = useSearchContext();
12
12
  const { isActive } = useStateStore(source.state, searchSourceStateSelector);
13
13
  const label = `search-results-header-filter-source-button-label--${source.type}`;
14
+ const knownLabels = useMemo(() => ({
15
+ 'search-results-header-filter-source-button-label--channels': t('search-results-header-filter-source-button-label--channels'),
16
+ 'search-results-header-filter-source-button-label--messages': t('search-results-header-filter-source-button-label--messages'),
17
+ 'search-results-header-filter-source-button-label--users': t('search-results-header-filter-source-button-label--users'),
18
+ }), [t]);
14
19
  return (React.createElement("button", { "aria-label": t('aria/Search results header filter button'), className: clsx('str-chat__search-results-header__filter-source-button', {
15
20
  'str-chat__search-results-header__filter-source-button--active': isActive,
16
21
  }), key: label, onClick: () => {
@@ -22,7 +27,7 @@ const SearchSourceFilterButton = ({ source }) => {
22
27
  if (searchController.searchQuery && !source.items?.length)
23
28
  source.search(searchController.searchQuery);
24
29
  }
25
- } }, t(label)));
30
+ } }, knownLabels[label] ?? t(label)));
26
31
  };
27
32
  export const SearchResultsHeader = () => {
28
33
  const { searchController } = useSearchContext();
@@ -4,5 +4,7 @@ import { useSearchSourceResultsContext } from '../SearchSourceResultsContext';
4
4
  export const SearchSourceResultsLoadingIndicator = () => {
5
5
  const { t } = useTranslationContext();
6
6
  const { searchSource } = useSearchSourceResultsContext();
7
- return (React.createElement("div", { className: 'str-chat__search-source-results__loading-indicator', "data-testid": 'search-loading-indicator' }, t(`Searching for ${searchSource.type}...`)));
7
+ return (React.createElement("div", { className: 'str-chat__search-source-results__loading-indicator', "data-testid": 'search-loading-indicator' }, t('Searching for {{ searchSourceType }}...', {
8
+ searchSourceType: searchSource.type,
9
+ })));
8
10
  };
@@ -15488,7 +15488,9 @@ var SearchSourceResultsLoadingIndicator = () => {
15488
15488
  className: "str-chat__search-source-results__loading-indicator",
15489
15489
  "data-testid": "search-loading-indicator"
15490
15490
  },
15491
- t(`Searching for ${searchSource.type}...`)
15491
+ t("Searching for {{ searchSourceType }}...", {
15492
+ searchSourceType: searchSource.type
15493
+ })
15492
15494
  );
15493
15495
  };
15494
15496
 
@@ -15604,6 +15606,20 @@ var SearchSourceFilterButton = ({ source }) => {
15604
15606
  const { searchController } = useSearchContext();
15605
15607
  const { isActive } = useStateStore(source.state, searchSourceStateSelector4);
15606
15608
  const label = `search-results-header-filter-source-button-label--${source.type}`;
15609
+ const knownLabels = (0, import_react53.useMemo)(
15610
+ () => ({
15611
+ "search-results-header-filter-source-button-label--channels": t(
15612
+ "search-results-header-filter-source-button-label--channels"
15613
+ ),
15614
+ "search-results-header-filter-source-button-label--messages": t(
15615
+ "search-results-header-filter-source-button-label--messages"
15616
+ ),
15617
+ "search-results-header-filter-source-button-label--users": t(
15618
+ "search-results-header-filter-source-button-label--users"
15619
+ )
15620
+ }),
15621
+ [t]
15622
+ );
15607
15623
  return /* @__PURE__ */ import_react53.default.createElement(
15608
15624
  "button",
15609
15625
  {
@@ -15622,7 +15638,7 @@ var SearchSourceFilterButton = ({ source }) => {
15622
15638
  }
15623
15639
  }
15624
15640
  },
15625
- t(label)
15641
+ knownLabels[label] ?? t(label)
15626
15642
  );
15627
15643
  };
15628
15644
  var SearchResultsHeader = () => {