stream-chat-react 13.0.0 → 13.0.2

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.
@@ -209,6 +209,7 @@ export declare class Streami18n {
209
209
  "Nobody will be able to vote in this poll anymore.": string;
210
210
  "Nothing yet...": string;
211
211
  Ok: string;
212
+ "Only numbers are allowed": string;
212
213
  "Open emoji picker": string;
213
214
  "Option already exists": string;
214
215
  Options: string;
package/dist/i18n/de.json CHANGED
@@ -79,6 +79,7 @@
79
79
  "Nobody will be able to vote in this poll anymore.": "Niemand kann mehr in dieser Umfrage abstimmen.",
80
80
  "Nothing yet...": "Noch nichts...",
81
81
  "Ok": "Ok",
82
+ "Only numbers are allowed": "Nur Zahlen sind erlaubt",
82
83
  "Open emoji picker": "Emoji-Auswahl öffnen",
83
84
  "Option already exists": "Option existiert bereits",
84
85
  "Options": "Optionen",
package/dist/i18n/en.json CHANGED
@@ -79,6 +79,7 @@
79
79
  "Nobody will be able to vote in this poll anymore.": "Nobody will be able to vote in this poll anymore.",
80
80
  "Nothing yet...": "Nothing yet...",
81
81
  "Ok": "Ok",
82
+ "Only numbers are allowed": "Only numbers are allowed",
82
83
  "Open emoji picker": "Open emoji picker",
83
84
  "Option already exists": "Option already exists",
84
85
  "Options": "Options",
package/dist/i18n/es.json CHANGED
@@ -79,6 +79,7 @@
79
79
  "Nobody will be able to vote in this poll anymore.": "Nadie podrá votar en esta encuesta.",
80
80
  "Nothing yet...": "Nada aún...",
81
81
  "Ok": "Ok",
82
+ "Only numbers are allowed": "Solo se permiten números",
82
83
  "Open emoji picker": "Abrir el selector de emojis",
83
84
  "Option already exists": "La opción ya existe",
84
85
  "Options": "Opciones",
package/dist/i18n/fr.json CHANGED
@@ -79,6 +79,7 @@
79
79
  "Nobody will be able to vote in this poll anymore.": "Personne ne pourra plus voter dans ce sondage.",
80
80
  "Nothing yet...": "Rien pour l'instant...",
81
81
  "Ok": "D'accord",
82
+ "Only numbers are allowed": "Seuls les chiffres sont autorisés",
82
83
  "Open emoji picker": "Ouvrir le sélecteur d'émojis",
83
84
  "Option already exists": "L'option existe déjà",
84
85
  "Options": "Options",
package/dist/i18n/hi.json CHANGED
@@ -80,6 +80,7 @@
80
80
  "Nobody will be able to vote in this poll anymore.": "अब कोई भी इस मतदान में मतदान नहीं कर सकेगा।",
81
81
  "Nothing yet...": "कोई मैसेज नहीं है",
82
82
  "Ok": "ठीक है",
83
+ "Only numbers are allowed": "केवल संख्याएँ अनुमत हैं",
83
84
  "Open emoji picker": "इमोजी पिकर खोलिये",
84
85
  "Option already exists": "विकल्प पहले से मौजूद है",
85
86
  "Options": "विकल्प",
package/dist/i18n/it.json CHANGED
@@ -79,6 +79,7 @@
79
79
  "Nobody will be able to vote in this poll anymore.": "Nessuno potrà più votare in questo sondaggio.",
80
80
  "Nothing yet...": "Ancora niente...",
81
81
  "Ok": "Ok",
82
+ "Only numbers are allowed": "Sono consentiti solo numeri",
82
83
  "Open emoji picker": "Apri il selettore di emoji",
83
84
  "Option already exists": "L'opzione esiste già",
84
85
  "Options": "Opzioni",
package/dist/i18n/ja.json CHANGED
@@ -79,6 +79,7 @@
79
79
  "Nobody will be able to vote in this poll anymore.": "この投票では、誰も投票できなくなります。",
80
80
  "Nothing yet...": "まだ何もありません...",
81
81
  "Ok": "OK",
82
+ "Only numbers are allowed": "数字のみ許可されています",
82
83
  "Open emoji picker": "絵文字ピッカーを開く",
83
84
  "Option already exists": "オプションは既に存在します",
84
85
  "Options": "オプション",
package/dist/i18n/ko.json CHANGED
@@ -79,7 +79,8 @@
79
79
  "Nobody will be able to vote in this poll anymore.": "이 투표에 더 이상 아무도 투표할 수 없습니다.",
80
80
  "Nothing yet...": "아직 아무것도...",
81
81
  "Ok": "확인",
82
- "Open emoji picker": "이모티콘 선택기 열기",
82
+ "Only numbers are allowed": "숫자만 입력 가능합니다",
83
+ "Open emoji picker": "이모지 선택기 열기",
83
84
  "Option already exists": "옵션이 이미 존재합니다",
84
85
  "Options": "옵션",
85
86
  "People matching": "일치하는 사람",
package/dist/i18n/nl.json CHANGED
@@ -79,7 +79,8 @@
79
79
  "Nobody will be able to vote in this poll anymore.": "Niemand kan meer stemmen in deze peiling.",
80
80
  "Nothing yet...": "Nog niets ...",
81
81
  "Ok": "Oké",
82
- "Open emoji picker": "Open emojipicker",
82
+ "Only numbers are allowed": "Alleen nummers zijn toegestaan",
83
+ "Open emoji picker": "Emoji-kiezer openen",
83
84
  "Option already exists": "Optie bestaat al",
84
85
  "Options": "Opties",
85
86
  "People matching": "Mensen die matchen",
package/dist/i18n/pt.json CHANGED
@@ -79,6 +79,7 @@
79
79
  "Nobody will be able to vote in this poll anymore.": "Ninguém mais poderá votar nesta pesquisa.",
80
80
  "Nothing yet...": "Nada ainda...",
81
81
  "Ok": "Ok",
82
+ "Only numbers are allowed": "Apenas números são permitidos",
82
83
  "Open emoji picker": "Abrir seletor de emoji",
83
84
  "Option already exists": "Opção já existe",
84
85
  "Options": "Opções",
package/dist/i18n/ru.json CHANGED
@@ -79,6 +79,7 @@
79
79
  "Nobody will be able to vote in this poll anymore.": "Никто больше не сможет голосовать в этом опросе.",
80
80
  "Nothing yet...": "Пока ничего нет...",
81
81
  "Ok": "Ок",
82
+ "Only numbers are allowed": "Разрешены только цифры",
82
83
  "Open emoji picker": "Открыть выбор смайлов",
83
84
  "Option already exists": "Вариант уже существует",
84
85
  "Options": "Варианты",
package/dist/i18n/tr.json CHANGED
@@ -79,6 +79,7 @@
79
79
  "Nobody will be able to vote in this poll anymore.": "Artık bu ankette kimse oy kullanamayacak.",
80
80
  "Nothing yet...": "Şimdilik hiçbir şey...",
81
81
  "Ok": "Tamam",
82
+ "Only numbers are allowed": "Sadece sayılar kullanılabilir",
82
83
  "Open emoji picker": "Emoji klavyesini aç",
83
84
  "Option already exists": "Seçenek zaten mevcut",
84
85
  "Options": "Seçenekler",
@@ -17583,6 +17583,7 @@ __export(src_exports, {
17583
17583
  useActionHandler: () => useActionHandler,
17584
17584
  useActiveThread: () => useActiveThread,
17585
17585
  useAttachmentManagerState: () => useAttachmentManagerState,
17586
+ useAudioController: () => useAudioController,
17586
17587
  useCanCreatePoll: () => useCanCreatePoll,
17587
17588
  useChannelActionContext: () => useChannelActionContext,
17588
17589
  useChannelDeletedListener: () => useChannelDeletedListener,
@@ -17667,7 +17668,7 @@ module.exports = __toCommonJS(src_exports);
17667
17668
 
17668
17669
  // src/components/Attachment/Attachment.tsx
17669
17670
  var import_react255 = __toESM(require("react"));
17670
- var import_stream_chat10 = require("stream-chat");
17671
+ var import_stream_chat11 = require("stream-chat");
17671
17672
 
17672
17673
  // src/components/Attachment/AttachmentContainer.tsx
17673
17674
  var import_react254 = __toESM(require("react"));
@@ -38680,12 +38681,13 @@ var PollHeader = () => {
38680
38681
  const { enforce_unique_vote, is_closed, max_votes_allowed, name: name2, options } = useStateStore(poll.state, pollStateSelector);
38681
38682
  const selectionInstructions = (0, import_react123.useMemo)(() => {
38682
38683
  if (is_closed) return t("Vote ended");
38683
- if (enforce_unique_vote) return t("Select one");
38684
+ if (enforce_unique_vote || options.length === 1) return t("Select one");
38684
38685
  if (max_votes_allowed)
38685
38686
  return t("Select up to {{count}}", {
38686
38687
  count: max_votes_allowed > options.length ? options.length : max_votes_allowed
38687
38688
  });
38688
- return t("Select one or more");
38689
+ if (options.length > 1) return t("Select one or more");
38690
+ return "";
38689
38691
  }, [is_closed, enforce_unique_vote, max_votes_allowed, options.length, t]);
38690
38692
  if (!name2) return;
38691
38693
  return /* @__PURE__ */ import_react123.default.createElement("div", { className: "str-chat__poll-header" }, /* @__PURE__ */ import_react123.default.createElement("div", { className: "str-chat__poll-title" }, name2), /* @__PURE__ */ import_react123.default.createElement("div", { className: "str-chat__poll-subtitle" }, selectionInstructions));
@@ -38765,36 +38767,46 @@ var FormDialog = ({
38765
38767
  await onSubmit(value);
38766
38768
  close();
38767
38769
  };
38768
- return /* @__PURE__ */ import_react125.default.createElement("div", { className: (0, import_clsx27.default)("str-chat__dialog str-chat__dialog--form", className) }, /* @__PURE__ */ import_react125.default.createElement("div", { className: "str-chat__dialog__body" }, title && /* @__PURE__ */ import_react125.default.createElement("div", { className: "str-chat__dialog__title" }, title), /* @__PURE__ */ import_react125.default.createElement("form", { autoComplete: "off" }, Object.entries(fields).map(([id, fieldConfig]) => /* @__PURE__ */ import_react125.default.createElement("div", { className: "str-chat__dialog__field", key: `dialog-field-${id}` }, fieldConfig.label && /* @__PURE__ */ import_react125.default.createElement(
38769
- "label",
38770
- {
38771
- className: (0, import_clsx27.default)(
38772
- `str-chat__dialog__title str-chat__dialog__title--${id}`
38773
- ),
38774
- htmlFor: id
38775
- },
38776
- fieldConfig.label
38777
- ), import_react125.default.createElement(fieldConfig.element, {
38778
- id,
38779
- ...fieldConfig.props,
38780
- onChange: handleChange,
38781
- value: value[id]
38782
- }), /* @__PURE__ */ import_react125.default.createElement(FieldError, { text: fieldErrors[id]?.message }))))), /* @__PURE__ */ import_react125.default.createElement("div", { className: "str-chat__dialog__controls" }, /* @__PURE__ */ import_react125.default.createElement(
38783
- "button",
38784
- {
38785
- className: "str-chat__dialog__controls-button str-chat__dialog__controls-button--cancel",
38786
- onClick: close
38787
- },
38788
- t("Cancel")
38789
- ), /* @__PURE__ */ import_react125.default.createElement(
38790
- "button",
38770
+ return /* @__PURE__ */ import_react125.default.createElement("div", { className: (0, import_clsx27.default)("str-chat__dialog str-chat__dialog--form", className) }, /* @__PURE__ */ import_react125.default.createElement("div", { className: "str-chat__dialog__body" }, title && /* @__PURE__ */ import_react125.default.createElement("div", { className: "str-chat__dialog__title" }, title), /* @__PURE__ */ import_react125.default.createElement(
38771
+ "form",
38791
38772
  {
38792
- className: "str-chat__dialog__controls-button str-chat__dialog__controls-button--submit",
38793
- disabled: Object.keys(fieldErrors).length > 0 || shouldDisableSubmitButton?.(value),
38794
- onClick: handleSubmit,
38795
- type: "submit"
38773
+ autoComplete: "off",
38774
+ onSubmit: (e) => {
38775
+ e.preventDefault();
38776
+ handleSubmit();
38777
+ }
38796
38778
  },
38797
- t("Send")
38779
+ Object.entries(fields).map(([id, fieldConfig]) => /* @__PURE__ */ import_react125.default.createElement("div", { className: "str-chat__dialog__field", key: `dialog-field-${id}` }, fieldConfig.label && /* @__PURE__ */ import_react125.default.createElement(
38780
+ "label",
38781
+ {
38782
+ className: (0, import_clsx27.default)(
38783
+ `str-chat__dialog__title str-chat__dialog__title--${id}`
38784
+ ),
38785
+ htmlFor: id
38786
+ },
38787
+ fieldConfig.label
38788
+ ), import_react125.default.createElement(fieldConfig.element, {
38789
+ id,
38790
+ ...fieldConfig.props,
38791
+ onChange: handleChange,
38792
+ value: value[id]
38793
+ }), /* @__PURE__ */ import_react125.default.createElement(FieldError, { text: fieldErrors[id]?.message }))),
38794
+ /* @__PURE__ */ import_react125.default.createElement("div", { className: "str-chat__dialog__controls" }, /* @__PURE__ */ import_react125.default.createElement(
38795
+ "button",
38796
+ {
38797
+ className: "str-chat__dialog__controls-button str-chat__dialog__controls-button--cancel",
38798
+ onClick: close
38799
+ },
38800
+ t("Cancel")
38801
+ ), /* @__PURE__ */ import_react125.default.createElement(
38802
+ "button",
38803
+ {
38804
+ className: "str-chat__dialog__controls-button str-chat__dialog__controls-button--submit",
38805
+ disabled: Object.keys(fieldErrors).length > 0 || shouldDisableSubmitButton?.(value),
38806
+ type: "submit"
38807
+ },
38808
+ t("Send")
38809
+ ))
38798
38810
  )));
38799
38811
  };
38800
38812
 
@@ -39495,7 +39507,7 @@ var PollOptionWithLatestVotes = ({
39495
39507
  // src/components/Poll/PollActions/PollResults/PollResults.tsx
39496
39508
  var pollStateSelector10 = (nextValue) => ({
39497
39509
  name: nextValue.name,
39498
- options: nextValue.options,
39510
+ options: [...nextValue.options],
39499
39511
  vote_counts_by_option: nextValue.vote_counts_by_option
39500
39512
  });
39501
39513
  var PollResults = ({ close }) => {
@@ -39764,9 +39776,15 @@ var MultipleAnswersField = () => {
39764
39776
  pollComposer.handleFieldBlur("max_votes_allowed");
39765
39777
  },
39766
39778
  onChange: (e) => {
39767
- pollComposer.updateFields({
39768
- max_votes_allowed: e.target.value
39769
- });
39779
+ const nativeFieldValidation = !e.target.validity.valid ? {
39780
+ max_votes_allowed: t("Only numbers are allowed")
39781
+ } : void 0;
39782
+ pollComposer.updateFields(
39783
+ {
39784
+ max_votes_allowed: !nativeFieldValidation ? e.target.value : pollComposer.max_votes_allowed
39785
+ },
39786
+ nativeFieldValidation
39787
+ );
39770
39788
  },
39771
39789
  placeholder: t("Maximum number of votes (from 2 to 10)"),
39772
39790
  type: "number",
@@ -40833,6 +40851,7 @@ var de_default = {
40833
40851
  "Nobody will be able to vote in this poll anymore.": "Niemand kann mehr in dieser Umfrage abstimmen.",
40834
40852
  "Nothing yet...": "Noch nichts...",
40835
40853
  Ok: "Ok",
40854
+ "Only numbers are allowed": "Nur Zahlen sind erlaubt",
40836
40855
  "Open emoji picker": "Emoji-Auswahl \xF6ffnen",
40837
40856
  "Option already exists": "Option existiert bereits",
40838
40857
  Options: "Optionen",
@@ -41045,6 +41064,7 @@ var en_default = {
41045
41064
  "Nobody will be able to vote in this poll anymore.": "Nobody will be able to vote in this poll anymore.",
41046
41065
  "Nothing yet...": "Nothing yet...",
41047
41066
  Ok: "Ok",
41067
+ "Only numbers are allowed": "Only numbers are allowed",
41048
41068
  "Open emoji picker": "Open emoji picker",
41049
41069
  "Option already exists": "Option already exists",
41050
41070
  Options: "Options",
@@ -41247,6 +41267,7 @@ var es_default = {
41247
41267
  "Nobody will be able to vote in this poll anymore.": "Nadie podr\xE1 votar en esta encuesta.",
41248
41268
  "Nothing yet...": "Nada a\xFAn...",
41249
41269
  Ok: "Ok",
41270
+ "Only numbers are allowed": "Solo se permiten n\xFAmeros",
41250
41271
  "Open emoji picker": "Abrir el selector de emojis",
41251
41272
  "Option already exists": "La opci\xF3n ya existe",
41252
41273
  Options: "Opciones",
@@ -41467,6 +41488,7 @@ var fr_default = {
41467
41488
  "Nobody will be able to vote in this poll anymore.": "Personne ne pourra plus voter dans ce sondage.",
41468
41489
  "Nothing yet...": "Rien pour l'instant...",
41469
41490
  Ok: "D'accord",
41491
+ "Only numbers are allowed": "Seuls les chiffres sont autoris\xE9s",
41470
41492
  "Open emoji picker": "Ouvrir le s\xE9lecteur d'\xE9mojis",
41471
41493
  "Option already exists": "L'option existe d\xE9j\xE0",
41472
41494
  Options: "Options",
@@ -41688,6 +41710,7 @@ var hi_default = {
41688
41710
  "Nobody will be able to vote in this poll anymore.": "\u0905\u092C \u0915\u094B\u0908 \u092D\u0940 \u0907\u0938 \u092E\u0924\u0926\u093E\u0928 \u092E\u0947\u0902 \u092E\u0924\u0926\u093E\u0928 \u0928\u0939\u0940\u0902 \u0915\u0930 \u0938\u0915\u0947\u0917\u093E\u0964",
41689
41711
  "Nothing yet...": "\u0915\u094B\u0908 \u092E\u0948\u0938\u0947\u091C \u0928\u0939\u0940\u0902 \u0939\u0948",
41690
41712
  Ok: "\u0920\u0940\u0915 \u0939\u0948",
41713
+ "Only numbers are allowed": "\u0915\u0947\u0935\u0932 \u0938\u0902\u0916\u094D\u092F\u093E\u090F\u0901 \u0905\u0928\u0941\u092E\u0924 \u0939\u0948\u0902",
41691
41714
  "Open emoji picker": "\u0907\u092E\u094B\u091C\u0940 \u092A\u093F\u0915\u0930 \u0916\u094B\u0932\u093F\u092F\u0947",
41692
41715
  "Option already exists": "\u0935\u093F\u0915\u0932\u094D\u092A \u092A\u0939\u0932\u0947 \u0938\u0947 \u092E\u094C\u091C\u0942\u0926 \u0939\u0948",
41693
41716
  Options: "\u0935\u093F\u0915\u0932\u094D\u092A",
@@ -41900,6 +41923,7 @@ var it_default = {
41900
41923
  "Nobody will be able to vote in this poll anymore.": "Nessuno potr\xE0 pi\xF9 votare in questo sondaggio.",
41901
41924
  "Nothing yet...": "Ancora niente...",
41902
41925
  Ok: "Ok",
41926
+ "Only numbers are allowed": "Sono consentiti solo numeri",
41903
41927
  "Open emoji picker": "Apri il selettore di emoji",
41904
41928
  "Option already exists": "L'opzione esiste gi\xE0",
41905
41929
  Options: "Opzioni",
@@ -42120,6 +42144,7 @@ var ja_default = {
42120
42144
  "Nobody will be able to vote in this poll anymore.": "\u3053\u306E\u6295\u7968\u3067\u306F\u3001\u8AB0\u3082\u6295\u7968\u3067\u304D\u306A\u304F\u306A\u308A\u307E\u3059\u3002",
42121
42145
  "Nothing yet...": "\u307E\u3060\u4F55\u3082\u3042\u308A\u307E\u305B\u3093...",
42122
42146
  Ok: "OK",
42147
+ "Only numbers are allowed": "\u6570\u5B57\u306E\u307F\u8A31\u53EF\u3055\u308C\u3066\u3044\u307E\u3059",
42123
42148
  "Open emoji picker": "\u7D75\u6587\u5B57\u30D4\u30C3\u30AB\u30FC\u3092\u958B\u304F",
42124
42149
  "Option already exists": "\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u65E2\u306B\u5B58\u5728\u3057\u307E\u3059",
42125
42150
  Options: "\u30AA\u30D7\u30B7\u30E7\u30F3",
@@ -42326,7 +42351,8 @@ var ko_default = {
42326
42351
  "Nobody will be able to vote in this poll anymore.": "\uC774 \uD22C\uD45C\uC5D0 \uB354 \uC774\uC0C1 \uC544\uBB34\uB3C4 \uD22C\uD45C\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",
42327
42352
  "Nothing yet...": "\uC544\uC9C1 \uC544\uBB34\uAC83\uB3C4...",
42328
42353
  Ok: "\uD655\uC778",
42329
- "Open emoji picker": "\uC774\uBAA8\uD2F0\uCF58 \uC120\uD0DD\uAE30 \uC5F4\uAE30",
42354
+ "Only numbers are allowed": "\uC22B\uC790\uB9CC \uC785\uB825 \uAC00\uB2A5\uD569\uB2C8\uB2E4",
42355
+ "Open emoji picker": "\uC774\uBAA8\uC9C0 \uC120\uD0DD\uAE30 \uC5F4\uAE30",
42330
42356
  "Option already exists": "\uC635\uC158\uC774 \uC774\uBBF8 \uC874\uC7AC\uD569\uB2C8\uB2E4",
42331
42357
  Options: "\uC635\uC158",
42332
42358
  "People matching": "\uC77C\uCE58\uD558\uB294 \uC0AC\uB78C",
@@ -42532,7 +42558,8 @@ var nl_default = {
42532
42558
  "Nobody will be able to vote in this poll anymore.": "Niemand kan meer stemmen in deze peiling.",
42533
42559
  "Nothing yet...": "Nog niets ...",
42534
42560
  Ok: "Ok\xE9",
42535
- "Open emoji picker": "Open emojipicker",
42561
+ "Only numbers are allowed": "Alleen nummers zijn toegestaan",
42562
+ "Open emoji picker": "Emoji-kiezer openen",
42536
42563
  "Option already exists": "Optie bestaat al",
42537
42564
  Options: "Opties",
42538
42565
  "People matching": "Mensen die matchen",
@@ -42744,6 +42771,7 @@ var pt_default = {
42744
42771
  "Nobody will be able to vote in this poll anymore.": "Ningu\xE9m mais poder\xE1 votar nesta pesquisa.",
42745
42772
  "Nothing yet...": "Nada ainda...",
42746
42773
  Ok: "Ok",
42774
+ "Only numbers are allowed": "Apenas n\xFAmeros s\xE3o permitidos",
42747
42775
  "Open emoji picker": "Abrir seletor de emoji",
42748
42776
  "Option already exists": "Op\xE7\xE3o j\xE1 existe",
42749
42777
  Options: "Op\xE7\xF5es",
@@ -42964,6 +42992,7 @@ var ru_default = {
42964
42992
  "Nobody will be able to vote in this poll anymore.": "\u041D\u0438\u043A\u0442\u043E \u0431\u043E\u043B\u044C\u0448\u0435 \u043D\u0435 \u0441\u043C\u043E\u0436\u0435\u0442 \u0433\u043E\u043B\u043E\u0441\u043E\u0432\u0430\u0442\u044C \u0432 \u044D\u0442\u043E\u043C \u043E\u043F\u0440\u043E\u0441\u0435.",
42965
42993
  "Nothing yet...": "\u041F\u043E\u043A\u0430 \u043D\u0438\u0447\u0435\u0433\u043E \u043D\u0435\u0442...",
42966
42994
  Ok: "\u041E\u043A",
42995
+ "Only numbers are allowed": "\u0420\u0430\u0437\u0440\u0435\u0448\u0435\u043D\u044B \u0442\u043E\u043B\u044C\u043A\u043E \u0446\u0438\u0444\u0440\u044B",
42967
42996
  "Open emoji picker": "\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432\u044B\u0431\u043E\u0440 \u0441\u043C\u0430\u0439\u043B\u043E\u0432",
42968
42997
  "Option already exists": "\u0412\u0430\u0440\u0438\u0430\u043D\u0442 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442",
42969
42998
  Options: "\u0412\u0430\u0440\u0438\u0430\u043D\u0442\u044B",
@@ -43192,6 +43221,7 @@ var tr_default = {
43192
43221
  "Nobody will be able to vote in this poll anymore.": "Art\u0131k bu ankette kimse oy kullanamayacak.",
43193
43222
  "Nothing yet...": "\u015Eimdilik hi\xE7bir \u015Fey...",
43194
43223
  Ok: "Tamam",
43224
+ "Only numbers are allowed": "Sadece say\u0131lar kullan\u0131labilir",
43195
43225
  "Open emoji picker": "Emoji klavyesini a\xE7",
43196
43226
  "Option already exists": "Se\xE7enek zaten mevcut",
43197
43227
  Options: "Se\xE7enekler",
@@ -46654,7 +46684,7 @@ var AttachmentSelector = ({
46654
46684
 
46655
46685
  // src/components/MessageInput/AttachmentPreviewList/AttachmentPreviewList.tsx
46656
46686
  var import_react228 = __toESM(require("react"));
46657
- var import_stream_chat8 = require("stream-chat");
46687
+ var import_stream_chat9 = require("stream-chat");
46658
46688
 
46659
46689
  // src/components/MessageInput/AttachmentPreviewList/UnsupportedAttachmentPreview.tsx
46660
46690
  var import_react211 = __toESM(require("react"));
@@ -47813,6 +47843,23 @@ var useTextareaRef = (props) => {
47813
47843
 
47814
47844
  // src/components/MessageInput/hooks/useSubmitHandler.ts
47815
47845
  var import_react225 = require("react");
47846
+ var import_stream_chat8 = require("stream-chat");
47847
+ var takeStateSnapshot = (messageComposer) => {
47848
+ const textComposerState = messageComposer.textComposer.state.getLatestValue();
47849
+ const attachmentManagerState = messageComposer.attachmentManager.state.getLatestValue();
47850
+ const linkPreviewsManagerState = messageComposer.linkPreviewsManager.state.getLatestValue();
47851
+ const pollComposerState = messageComposer.pollComposer.state.getLatestValue();
47852
+ const customDataManagerState = messageComposer.customDataManager.state.getLatestValue();
47853
+ const state = messageComposer.state.getLatestValue();
47854
+ return () => {
47855
+ messageComposer.state.next(state);
47856
+ messageComposer.textComposer.state.next(textComposerState);
47857
+ messageComposer.attachmentManager.state.next(attachmentManagerState);
47858
+ messageComposer.linkPreviewsManager.state.next(linkPreviewsManagerState);
47859
+ messageComposer.pollComposer.state.next(pollComposerState);
47860
+ messageComposer.customDataManager.state.next(customDataManagerState);
47861
+ };
47862
+ };
47816
47863
  var useSubmitHandler = (props) => {
47817
47864
  const { clearEditingState, overrideSubmitHandler } = props;
47818
47865
  const { addNotification, editMessage, sendMessage } = useChannelActionContext("useSubmitHandler");
@@ -47832,7 +47879,17 @@ var useSubmitHandler = (props) => {
47832
47879
  addNotification(t("Edit message request failed"), "error");
47833
47880
  }
47834
47881
  } else {
47882
+ const restoreComposerStateSnapshot = takeStateSnapshot(messageComposer);
47835
47883
  try {
47884
+ const sentPollMessage = !!message.poll_id;
47885
+ if (sentPollMessage) {
47886
+ messageComposer.state.partialNext({
47887
+ id: import_stream_chat8.MessageComposer.generateId(),
47888
+ pollId: null
47889
+ });
47890
+ } else {
47891
+ messageComposer.clear();
47892
+ }
47836
47893
  if (overrideSubmitHandler) {
47837
47894
  await overrideSubmitHandler({
47838
47895
  cid: messageComposer.channel.cid,
@@ -47843,10 +47900,10 @@ var useSubmitHandler = (props) => {
47843
47900
  } else {
47844
47901
  await sendMessage({ localMessage, message, options: sendOptions });
47845
47902
  }
47846
- messageComposer.clear();
47847
47903
  if (messageComposer.config.text.publishTypingEvents)
47848
47904
  await messageComposer.channel.stopTyping();
47849
47905
  } catch (err) {
47906
+ restoreComposerStateSnapshot();
47850
47907
  addNotification(t("Send message request failed"), "error");
47851
47908
  }
47852
47909
  }
@@ -48007,8 +48064,8 @@ var AttachmentPreviewList = ({
48007
48064
  "data-testid": "attachment-list-scroll-container"
48008
48065
  },
48009
48066
  attachments.map((attachment) => {
48010
- if ((0, import_stream_chat8.isScrapedContent)(attachment)) return null;
48011
- if ((0, import_stream_chat8.isLocalVoiceRecordingAttachment)(attachment)) {
48067
+ if ((0, import_stream_chat9.isScrapedContent)(attachment)) return null;
48068
+ if ((0, import_stream_chat9.isLocalVoiceRecordingAttachment)(attachment)) {
48012
48069
  return /* @__PURE__ */ import_react228.default.createElement(
48013
48070
  VoiceRecordingPreview2,
48014
48071
  {
@@ -48018,7 +48075,7 @@ var AttachmentPreviewList = ({
48018
48075
  removeAttachments: messageComposer.attachmentManager.removeAttachments
48019
48076
  }
48020
48077
  );
48021
- } else if ((0, import_stream_chat8.isLocalAudioAttachment)(attachment)) {
48078
+ } else if ((0, import_stream_chat9.isLocalAudioAttachment)(attachment)) {
48022
48079
  return /* @__PURE__ */ import_react228.default.createElement(
48023
48080
  AudioAttachmentPreview,
48024
48081
  {
@@ -48028,7 +48085,7 @@ var AttachmentPreviewList = ({
48028
48085
  removeAttachments: messageComposer.attachmentManager.removeAttachments
48029
48086
  }
48030
48087
  );
48031
- } else if ((0, import_stream_chat8.isLocalVideoAttachment)(attachment)) {
48088
+ } else if ((0, import_stream_chat9.isLocalVideoAttachment)(attachment)) {
48032
48089
  return /* @__PURE__ */ import_react228.default.createElement(
48033
48090
  VideoAttachmentPreview,
48034
48091
  {
@@ -48038,7 +48095,7 @@ var AttachmentPreviewList = ({
48038
48095
  removeAttachments: messageComposer.attachmentManager.removeAttachments
48039
48096
  }
48040
48097
  );
48041
- } else if ((0, import_stream_chat8.isLocalImageAttachment)(attachment)) {
48098
+ } else if ((0, import_stream_chat9.isLocalImageAttachment)(attachment)) {
48042
48099
  return /* @__PURE__ */ import_react228.default.createElement(
48043
48100
  ImageAttachmentPreview2,
48044
48101
  {
@@ -48048,7 +48105,7 @@ var AttachmentPreviewList = ({
48048
48105
  removeAttachments: messageComposer.attachmentManager.removeAttachments
48049
48106
  }
48050
48107
  );
48051
- } else if ((0, import_stream_chat8.isLocalFileAttachment)(attachment)) {
48108
+ } else if ((0, import_stream_chat9.isLocalFileAttachment)(attachment)) {
48052
48109
  return /* @__PURE__ */ import_react228.default.createElement(
48053
48110
  FileAttachmentPreview2,
48054
48111
  {
@@ -48058,7 +48115,7 @@ var AttachmentPreviewList = ({
48058
48115
  removeAttachments: messageComposer.attachmentManager.removeAttachments
48059
48116
  }
48060
48117
  );
48061
- } else if ((0, import_stream_chat8.isLocalAttachment)(attachment)) {
48118
+ } else if ((0, import_stream_chat9.isLocalAttachment)(attachment)) {
48062
48119
  return /* @__PURE__ */ import_react228.default.createElement(
48063
48120
  UnsupportedAttachmentPreview2,
48064
48121
  {
@@ -48228,10 +48285,10 @@ var QuotedMessagePreview = ({
48228
48285
  // src/components/MessageInput/LinkPreviewList.tsx
48229
48286
  var import_clsx57 = __toESM(require("clsx"));
48230
48287
  var import_react234 = __toESM(require("react"));
48231
- var import_stream_chat9 = require("stream-chat");
48288
+ var import_stream_chat10 = require("stream-chat");
48232
48289
  var linkPreviewsManagerStateSelector = (state) => ({
48233
48290
  linkPreviews: Array.from(state.previews.values()).filter(
48234
- (preview) => import_stream_chat9.LinkPreviewsManager.previewIsLoaded(preview) || import_stream_chat9.LinkPreviewsManager.previewIsLoading(preview)
48291
+ (preview) => import_stream_chat10.LinkPreviewsManager.previewIsLoaded(preview) || import_stream_chat10.LinkPreviewsManager.previewIsLoading(preview)
48235
48292
  )
48236
48293
  });
48237
48294
  var messageComposerStateSelector = (state) => ({
@@ -48256,13 +48313,13 @@ var LinkPreviewCard = ({ linkPreview }) => {
48256
48313
  const { linkPreviewsManager } = useMessageComposer();
48257
48314
  const { handleEnter, handleLeave, tooltipVisible } = useEnterLeaveHandlers();
48258
48315
  const [referenceElement, setReferenceElement] = (0, import_react234.useState)(null);
48259
- if (!import_stream_chat9.LinkPreviewsManager.previewIsLoaded(linkPreview) && !import_stream_chat9.LinkPreviewsManager.previewIsLoading(linkPreview))
48316
+ if (!import_stream_chat10.LinkPreviewsManager.previewIsLoaded(linkPreview) && !import_stream_chat10.LinkPreviewsManager.previewIsLoading(linkPreview))
48260
48317
  return null;
48261
48318
  return /* @__PURE__ */ import_react234.default.createElement(
48262
48319
  "div",
48263
48320
  {
48264
48321
  className: (0, import_clsx57.default)("str-chat__link-preview-card", {
48265
- "str-chat__link-preview-card--loading": import_stream_chat9.LinkPreviewsManager.previewIsLoading(linkPreview)
48322
+ "str-chat__link-preview-card--loading": import_stream_chat10.LinkPreviewsManager.previewIsLoading(linkPreview)
48266
48323
  }),
48267
48324
  "data-testid": "link-preview-card"
48268
48325
  },
@@ -48491,7 +48548,7 @@ var TextareaComposer = ({
48491
48548
  closeSuggestionsOnClickOutside,
48492
48549
  containerClassName,
48493
48550
  listClassName,
48494
- maxRows: maxRowsProp = 1,
48551
+ maxRows: maxRowsProp,
48495
48552
  minRows: minRowsProp,
48496
48553
  onBlur,
48497
48554
  onChange,
@@ -48514,7 +48571,7 @@ var TextareaComposer = ({
48514
48571
  shouldSubmit: shouldSubmitContext,
48515
48572
  textareaRef
48516
48573
  } = useMessageInputContext();
48517
- const maxRows = maxRowsProp ?? maxRowsContext;
48574
+ const maxRows = maxRowsProp ?? maxRowsContext ?? 1;
48518
48575
  const minRows = minRowsProp ?? minRowsContext;
48519
48576
  const placeholder = placeholderProp ?? additionalTextareaProps?.placeholder;
48520
48577
  const shouldSubmit = shouldSubmitProp ?? shouldSubmitContext ?? defaultShouldSubmit;
@@ -48558,13 +48615,11 @@ var TextareaComposer = ({
48558
48615
  onKeyDown(event);
48559
48616
  return;
48560
48617
  }
48561
- if (event.key === "Enter") {
48562
- event.preventDefault();
48563
- }
48564
48618
  if (textComposer.suggestions && textComposer.suggestions.searchSource.items?.length) {
48565
48619
  if (event.key === "Escape") return textComposer.closeSuggestions();
48566
48620
  const loadedItems = textComposer.suggestions.searchSource.items;
48567
48621
  if (event.key === "Enter") {
48622
+ event.preventDefault();
48568
48623
  textComposer.handleSelect(loadedItems[focusedItemIndex]);
48569
48624
  }
48570
48625
  if (event.key === "ArrowUp") {
@@ -49570,9 +49625,9 @@ var renderGroupedAttachments = ({
49570
49625
  ...rest
49571
49626
  }) => {
49572
49627
  const uploadedImages = attachments.filter(
49573
- (attachment) => (0, import_stream_chat10.isImageAttachment)(attachment)
49628
+ (attachment) => (0, import_stream_chat11.isImageAttachment)(attachment)
49574
49629
  );
49575
- const containers = attachments.filter((attachment) => !(0, import_stream_chat10.isImageAttachment)(attachment)).reduce(
49630
+ const containers = attachments.filter((attachment) => !(0, import_stream_chat11.isImageAttachment)(attachment)).reduce(
49576
49631
  (typeMap, attachment) => {
49577
49632
  const attachmentType = getAttachmentType(attachment);
49578
49633
  const Container = CONTAINER_MAP[attachmentType];
@@ -49624,15 +49679,15 @@ var renderGroupedAttachments = ({
49624
49679
  return containers;
49625
49680
  };
49626
49681
  var getAttachmentType = (attachment) => {
49627
- if ((0, import_stream_chat10.isScrapedContent)(attachment)) {
49682
+ if ((0, import_stream_chat11.isScrapedContent)(attachment)) {
49628
49683
  return "card";
49629
- } else if ((0, import_stream_chat10.isVideoAttachment)(attachment, SUPPORTED_VIDEO_FORMATS)) {
49684
+ } else if ((0, import_stream_chat11.isVideoAttachment)(attachment, SUPPORTED_VIDEO_FORMATS)) {
49630
49685
  return "media";
49631
- } else if ((0, import_stream_chat10.isAudioAttachment)(attachment)) {
49686
+ } else if ((0, import_stream_chat11.isAudioAttachment)(attachment)) {
49632
49687
  return "audio";
49633
- } else if ((0, import_stream_chat10.isVoiceRecordingAttachment)(attachment)) {
49688
+ } else if ((0, import_stream_chat11.isVoiceRecordingAttachment)(attachment)) {
49634
49689
  return "voiceRecording";
49635
- } else if ((0, import_stream_chat10.isFileAttachment)(attachment, SUPPORTED_VIDEO_FORMATS)) {
49690
+ } else if ((0, import_stream_chat11.isFileAttachment)(attachment, SUPPORTED_VIDEO_FORMATS)) {
49636
49691
  return "file";
49637
49692
  }
49638
49693
  return "unsupported";
@@ -49644,7 +49699,7 @@ var import_clsx66 = __toESM(require("clsx"));
49644
49699
  var import_lodash20 = __toESM(require("lodash.debounce"));
49645
49700
  var import_lodash21 = __toESM(require("lodash.defaultsdeep"));
49646
49701
  var import_lodash22 = __toESM(require("lodash.throttle"));
49647
- var import_stream_chat11 = require("stream-chat");
49702
+ var import_stream_chat12 = require("stream-chat");
49648
49703
 
49649
49704
  // src/components/Channel/channelState.ts
49650
49705
  var makeChannelReducer = () => (state, action) => {
@@ -50797,7 +50852,7 @@ var ChannelInner = (props) => {
50797
50852
  });
50798
50853
  await doSendMessage({
50799
50854
  localMessage,
50800
- message: (0, import_stream_chat11.localMessageToNewMessagePayload)(localMessage)
50855
+ message: (0, import_stream_chat12.localMessageToNewMessagePayload)(localMessage)
50801
50856
  });
50802
50857
  };
50803
50858
  const removeMessage = (message) => {
@@ -51109,7 +51164,7 @@ var ChannelHeader = (props) => {
51109
51164
 
51110
51165
  // src/components/Chat/Chat.tsx
51111
51166
  var import_react267 = __toESM(require("react"));
51112
- var import_stream_chat12 = require("stream-chat");
51167
+ var import_stream_chat13 = require("stream-chat");
51113
51168
 
51114
51169
  // src/components/Chat/hooks/useChat.ts
51115
51170
  var import_react264 = require("react");
@@ -51141,7 +51196,7 @@ var useChat = ({
51141
51196
  };
51142
51197
  (0, import_react264.useEffect)(() => {
51143
51198
  if (!client) return;
51144
- const version = "13.0.0";
51199
+ const version = "13.0.2";
51145
51200
  const userAgent = client.getUserAgent();
51146
51201
  if (!userAgent.includes("stream-chat-react")) {
51147
51202
  client.setUserAgent(`stream-chat-react-${version}-${userAgent}`);
@@ -51305,11 +51360,11 @@ var Chat = (props) => {
51305
51360
  } = useChat({ client, defaultLanguage, i18nInstance, initialNavOpen });
51306
51361
  const channelsQueryState = useChannelsQueryState();
51307
51362
  const searchController = (0, import_react267.useMemo)(
51308
- () => customChannelSearchController ?? new import_stream_chat12.SearchController({
51363
+ () => customChannelSearchController ?? new import_stream_chat13.SearchController({
51309
51364
  sources: [
51310
- new import_stream_chat12.ChannelSearchSource(client),
51311
- new import_stream_chat12.UserSearchSource(client),
51312
- new import_stream_chat12.MessageSearchSource(client)
51365
+ new import_stream_chat13.ChannelSearchSource(client),
51366
+ new import_stream_chat13.UserSearchSource(client),
51367
+ new import_stream_chat13.MessageSearchSource(client)
51313
51368
  ]
51314
51369
  }),
51315
51370
  [client, customChannelSearchController]
@@ -51337,7 +51392,7 @@ var Chat = (props) => {
51337
51392
 
51338
51393
  // src/components/Chat/hooks/useCreateChatClient.ts
51339
51394
  var import_react268 = require("react");
51340
- var import_stream_chat13 = require("stream-chat");
51395
+ var import_stream_chat14 = require("stream-chat");
51341
51396
  var useCreateChatClient = ({
51342
51397
  apiKey,
51343
51398
  options,
@@ -51351,7 +51406,7 @@ var useCreateChatClient = ({
51351
51406
  }
51352
51407
  const [cachedOptions] = (0, import_react268.useState)(options);
51353
51408
  (0, import_react268.useEffect)(() => {
51354
- const client = new import_stream_chat13.StreamChat(apiKey, void 0, cachedOptions);
51409
+ const client = new import_stream_chat14.StreamChat(apiKey, void 0, cachedOptions);
51355
51410
  let didUserConnectInterrupt = false;
51356
51411
  const connectionPromise = client.connectUser(cachedUserData, tokenOrProvider).then(() => {
51357
51412
  if (!didUserConnectInterrupt) setChatClient(client);