stream-chat-react-native-core 5.27.0-beta.5 → 5.27.0-beta.6

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 (63) hide show
  1. package/lib/commonjs/components/MessageInput/SendButton.js +1 -1
  2. package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
  3. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +73 -56
  4. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  5. package/lib/commonjs/i18n/en.json +1 -1
  6. package/lib/commonjs/i18n/es.json +28 -28
  7. package/lib/commonjs/i18n/fr.json +28 -28
  8. package/lib/commonjs/i18n/he.json +28 -28
  9. package/lib/commonjs/i18n/hi.json +28 -28
  10. package/lib/commonjs/i18n/it.json +28 -28
  11. package/lib/commonjs/i18n/ja.json +7 -7
  12. package/lib/commonjs/i18n/ko.json +5 -5
  13. package/lib/commonjs/i18n/nl.json +5 -5
  14. package/lib/commonjs/i18n/pt-BR.json +5 -5
  15. package/lib/commonjs/i18n/ru.json +5 -5
  16. package/lib/commonjs/i18n/tr.json +5 -5
  17. package/lib/commonjs/version.json +1 -1
  18. package/lib/module/components/MessageInput/SendButton.js +1 -1
  19. package/lib/module/components/MessageInput/SendButton.js.map +1 -1
  20. package/lib/module/contexts/messageInputContext/MessageInputContext.js +73 -56
  21. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  22. package/lib/module/i18n/en.json +1 -1
  23. package/lib/module/i18n/es.json +28 -28
  24. package/lib/module/i18n/fr.json +28 -28
  25. package/lib/module/i18n/he.json +28 -28
  26. package/lib/module/i18n/hi.json +28 -28
  27. package/lib/module/i18n/it.json +28 -28
  28. package/lib/module/i18n/ja.json +7 -7
  29. package/lib/module/i18n/ko.json +5 -5
  30. package/lib/module/i18n/nl.json +5 -5
  31. package/lib/module/i18n/pt-BR.json +5 -5
  32. package/lib/module/i18n/ru.json +5 -5
  33. package/lib/module/i18n/tr.json +5 -5
  34. package/lib/module/version.json +1 -1
  35. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +3 -1
  36. package/lib/typescript/i18n/en.json +1 -1
  37. package/lib/typescript/i18n/es.json +28 -28
  38. package/lib/typescript/i18n/fr.json +28 -28
  39. package/lib/typescript/i18n/he.json +28 -28
  40. package/lib/typescript/i18n/hi.json +28 -28
  41. package/lib/typescript/i18n/it.json +28 -28
  42. package/lib/typescript/i18n/ja.json +7 -7
  43. package/lib/typescript/i18n/ko.json +5 -5
  44. package/lib/typescript/i18n/nl.json +5 -5
  45. package/lib/typescript/i18n/pt-BR.json +5 -5
  46. package/lib/typescript/i18n/ru.json +5 -5
  47. package/lib/typescript/i18n/tr.json +5 -5
  48. package/package.json +1 -1
  49. package/src/components/MessageInput/SendButton.tsx +1 -1
  50. package/src/contexts/messageInputContext/MessageInputContext.tsx +9 -3
  51. package/src/i18n/en.json +1 -1
  52. package/src/i18n/es.json +28 -28
  53. package/src/i18n/fr.json +28 -28
  54. package/src/i18n/he.json +28 -28
  55. package/src/i18n/hi.json +28 -28
  56. package/src/i18n/it.json +28 -28
  57. package/src/i18n/ja.json +7 -7
  58. package/src/i18n/ko.json +5 -5
  59. package/src/i18n/nl.json +5 -5
  60. package/src/i18n/pt-BR.json +5 -5
  61. package/src/i18n/ru.json +5 -5
  62. package/src/i18n/tr.json +5 -5
  63. package/src/version.json +1 -1
@@ -33,7 +33,7 @@ var SendButtonWithContext = function SendButtonWithContext(props) {
33
33
  onPress: disabled ? function () {
34
34
  return null;
35
35
  } : function () {
36
- return sendMessage(undefined);
36
+ return sendMessage();
37
37
  },
38
38
  style: [sendButton],
39
39
  testID: "send-button",
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_MessageInputContext","_ThemeContext","_Search","_SendRight","_SendUp","_this","_jsxFileName","SendButtonWithContext","props","_props$disabled","disabled","giphyActive","sendMessage","_useTheme","useTheme","_useTheme$theme","theme","_useTheme$theme$color","colors","accent_blue","grey_gainsboro","_useTheme$theme$messa","messageInput","searchIcon","sendButton","sendRightIcon","sendUpIcon","createElement","Pressable","onPress","undefined","style","testID","__self","__source","fileName","lineNumber","columnNumber","Search","_extends2","pathFill","SendRight","SendUp","areEqual","prevProps","nextProps","prevDisabled","prevGiphyActive","prevSendMessage","nextDisabled","nextGiphyActive","nextSendMessage","disabledEqual","giphyActiveEqual","sendMessageEqual","MemoizedSendButton","React","memo","SendButton","_useMessageInputConte","useMessageInputContext","exports","displayName"],"sources":["SendButton.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Pressable } from 'react-native';\n\nimport {\n MessageInputContextValue,\n useMessageInputContext,\n} from '../../contexts/messageInputContext/MessageInputContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { Search } from '../../icons/Search';\nimport { SendRight } from '../../icons/SendRight';\nimport { SendUp } from '../../icons/SendUp';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\ntype SendButtonPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<MessageInputContextValue<StreamChatGenerics>, 'giphyActive' | 'sendMessage'> & {\n /** Disables the button */ disabled: boolean;\n};\n\nconst SendButtonWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: SendButtonPropsWithContext<StreamChatGenerics>,\n) => {\n const { disabled = false, giphyActive, sendMessage } = props;\n const {\n theme: {\n colors: { accent_blue, grey_gainsboro },\n messageInput: { searchIcon, sendButton, sendRightIcon, sendUpIcon },\n },\n } = useTheme();\n\n return (\n <Pressable\n disabled={disabled}\n onPress={disabled ? () => null : () => sendMessage(undefined)}\n style={[sendButton]}\n testID='send-button'\n >\n {giphyActive && <Search pathFill={disabled ? grey_gainsboro : accent_blue} {...searchIcon} />}\n {!giphyActive && disabled && <SendRight pathFill={grey_gainsboro} {...sendRightIcon} />}\n {!giphyActive && !disabled && <SendUp pathFill={accent_blue} {...sendUpIcon} />}\n </Pressable>\n );\n};\n\nconst areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(\n prevProps: SendButtonPropsWithContext<StreamChatGenerics>,\n nextProps: SendButtonPropsWithContext<StreamChatGenerics>,\n) => {\n const {\n disabled: prevDisabled,\n giphyActive: prevGiphyActive,\n sendMessage: prevSendMessage,\n } = prevProps;\n const {\n disabled: nextDisabled,\n giphyActive: nextGiphyActive,\n sendMessage: nextSendMessage,\n } = nextProps;\n\n const disabledEqual = prevDisabled === nextDisabled;\n if (!disabledEqual) return false;\n\n const giphyActiveEqual = prevGiphyActive === nextGiphyActive;\n if (!giphyActiveEqual) return false;\n\n const sendMessageEqual = prevSendMessage === nextSendMessage;\n if (!sendMessageEqual) return false;\n\n return true;\n};\n\nconst MemoizedSendButton = React.memo(\n SendButtonWithContext,\n areEqual,\n) as typeof SendButtonWithContext;\n\nexport type SendButtonProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<SendButtonPropsWithContext<StreamChatGenerics>>;\n\n/**\n * UI Component for send button in MessageInput component.\n */\nexport const SendButton = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: SendButtonProps<StreamChatGenerics>,\n) => {\n const { giphyActive, sendMessage } = useMessageInputContext<StreamChatGenerics>();\n\n return (\n <MemoizedSendButton\n {...{ giphyActive, sendMessage }}\n {...props}\n {...{ disabled: props.disabled || false }}\n />\n );\n};\n\nSendButton.displayName = 'SendButton{messageInput}';\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAF,OAAA;AAIA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAA4C,IAAA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G,eAAe;EAC5D,IAAI,CAACG,gBAAgB,EAAE,OAAO,KAAK;EAEnC,OAAO,IAAI;AACb,CAAC;AAED,IAAMC,kBAAkB,GAAGC,iBAAK,CAACC,IAAI,CACnClD,qBAAqB,EACrBoC,QACF,CAAiC;AAS1B,IAAMe,UAAU,GAAG,SAAbA,UAAUA,CAGrBlD,KAA0C,EACvC;EACH,IAAAmD,qBAAA,GAAqC,IAAAC,2CAAsB,EAAqB,CAAC;IAAzEjD,WAAW,GAAAgD,qBAAA,CAAXhD,WAAW;IAAEC,WAAW,GAAA+C,qBAAA,CAAX/C,WAAW;EAEhC,OACEhB,MAAA,YAAA+B,aAAA,CAAC4B,kBAAkB,MAAAhB,SAAA;IACX5B,WAAW,EAAXA,WAAW;IAAEC,WAAW,EAAXA;EAAW,GAC1BJ,KAAK;IACHE,QAAQ,EAAEF,KAAK,CAACE,QAAQ,IAAI,KAAK;IAAAuB,MAAA,EAAA5B,KAAA;IAAA6B,QAAA;MAAAC,QAAA,EAAA7B,YAAA;MAAA8B,UAAA;MAAAC,YAAA;IAAA;EAAA,EACxC,CAAC;AAEN,CAAC;AAACwB,OAAA,CAAAH,UAAA,GAAAA,UAAA;AAEFA,UAAU,CAACI,WAAW,GAAG,0BAA0B"}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_MessageInputContext","_ThemeContext","_Search","_SendRight","_SendUp","_this","_jsxFileName","SendButtonWithContext","props","_props$disabled","disabled","giphyActive","sendMessage","_useTheme","useTheme","_useTheme$theme","theme","_useTheme$theme$color","colors","accent_blue","grey_gainsboro","_useTheme$theme$messa","messageInput","searchIcon","sendButton","sendRightIcon","sendUpIcon","createElement","Pressable","onPress","style","testID","__self","__source","fileName","lineNumber","columnNumber","Search","_extends2","pathFill","SendRight","SendUp","areEqual","prevProps","nextProps","prevDisabled","prevGiphyActive","prevSendMessage","nextDisabled","nextGiphyActive","nextSendMessage","disabledEqual","giphyActiveEqual","sendMessageEqual","MemoizedSendButton","React","memo","SendButton","_useMessageInputConte","useMessageInputContext","exports","displayName"],"sources":["SendButton.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Pressable } from 'react-native';\n\nimport {\n MessageInputContextValue,\n useMessageInputContext,\n} from '../../contexts/messageInputContext/MessageInputContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { Search } from '../../icons/Search';\nimport { SendRight } from '../../icons/SendRight';\nimport { SendUp } from '../../icons/SendUp';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\n\ntype SendButtonPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<MessageInputContextValue<StreamChatGenerics>, 'giphyActive' | 'sendMessage'> & {\n /** Disables the button */ disabled: boolean;\n};\n\nconst SendButtonWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: SendButtonPropsWithContext<StreamChatGenerics>,\n) => {\n const { disabled = false, giphyActive, sendMessage } = props;\n const {\n theme: {\n colors: { accent_blue, grey_gainsboro },\n messageInput: { searchIcon, sendButton, sendRightIcon, sendUpIcon },\n },\n } = useTheme();\n\n return (\n <Pressable\n disabled={disabled}\n onPress={disabled ? () => null : () => sendMessage()}\n style={[sendButton]}\n testID='send-button'\n >\n {giphyActive && <Search pathFill={disabled ? grey_gainsboro : accent_blue} {...searchIcon} />}\n {!giphyActive && disabled && <SendRight pathFill={grey_gainsboro} {...sendRightIcon} />}\n {!giphyActive && !disabled && <SendUp pathFill={accent_blue} {...sendUpIcon} />}\n </Pressable>\n );\n};\n\nconst areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(\n prevProps: SendButtonPropsWithContext<StreamChatGenerics>,\n nextProps: SendButtonPropsWithContext<StreamChatGenerics>,\n) => {\n const {\n disabled: prevDisabled,\n giphyActive: prevGiphyActive,\n sendMessage: prevSendMessage,\n } = prevProps;\n const {\n disabled: nextDisabled,\n giphyActive: nextGiphyActive,\n sendMessage: nextSendMessage,\n } = nextProps;\n\n const disabledEqual = prevDisabled === nextDisabled;\n if (!disabledEqual) return false;\n\n const giphyActiveEqual = prevGiphyActive === nextGiphyActive;\n if (!giphyActiveEqual) return false;\n\n const sendMessageEqual = prevSendMessage === nextSendMessage;\n if (!sendMessageEqual) return false;\n\n return true;\n};\n\nconst MemoizedSendButton = React.memo(\n SendButtonWithContext,\n areEqual,\n) as typeof SendButtonWithContext;\n\nexport type SendButtonProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<SendButtonPropsWithContext<StreamChatGenerics>>;\n\n/**\n * UI Component for send button in MessageInput component.\n */\nexport const SendButton = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: SendButtonProps<StreamChatGenerics>,\n) => {\n const { giphyActive, sendMessage } = useMessageInputContext<StreamChatGenerics>();\n\n return (\n <MemoizedSendButton\n {...{ giphyActive, sendMessage }}\n {...props}\n {...{ disabled: props.disabled || false }}\n />\n );\n};\n\nSendButton.displayName = 'SendButton{messageInput}';\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,oBAAA,GAAAF,OAAA;AAIA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAA4C,IAAAO,KAAA;EAAAC,YAAA;AAU5C,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAGzBC,KAAqD,EAClD;EACH,IAAAC,eAAA,GAAuDD,KAAK,CAApDE,QAAQ;IAARA,QAAQ,GAAAD,eAAA,cAAG,KAAK,GAAAA,eAAA;IAAEE,WAAW,GAAkBH,KAAK,CAAlCG,WAAW;IAAEC,WAAW,GAAKJ,KAAK,CAArBI,WAAW;EAClD,IAAAC,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D,WAAW,GAAA+C,qBAAA,CAAX/C,WAAW;IAAEC,WAAW,GAAA8C,qBAAA,CAAX9C,WAAW;EAEhC,OACEhB,MAAA,YAAA+B,aAAA,CAAC2B,kBAAkB,MAAAhB,SAAA;IACX3B,WAAW,EAAXA,WAAW;IAAEC,WAAW,EAAXA;EAAW,GAC1BJ,KAAK;IACHE,QAAQ,EAAEF,KAAK,CAACE,QAAQ,IAAI,KAAK;IAAAsB,MAAA,EAAA3B,KAAA;IAAA4B,QAAA;MAAAC,QAAA,EAAA5B,YAAA;MAAA6B,UAAA;MAAAC,YAAA;IAAA;EAAA,EACxC,CAAC;AAEN,CAAC;AAACwB,OAAA,CAAAH,UAAA,GAAAA,UAAA;AAEFA,UAAU,CAACI,WAAW,GAAG,0BAA0B"}
@@ -361,25 +361,42 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
361
361
  }
362
362
  };
363
363
  var sendMessage = function () {
364
- var _ref3 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee3(customMessageData) {
365
- var linkInfos, prevText, attachments, _loop, _iterator3, _step3, _image, _ret, _iterator4, _step4, _file3, message, updatedMessage, updateMessagePromise;
364
+ var _ref3 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee3() {
365
+ var _ref4,
366
+ customMessageData,
367
+ linkInfos,
368
+ prevText,
369
+ attachments,
370
+ _loop,
371
+ _iterator3,
372
+ _step3,
373
+ _image,
374
+ _ret,
375
+ _iterator4,
376
+ _step4,
377
+ _file3,
378
+ message,
379
+ updatedMessage,
380
+ updateMessagePromise,
381
+ _args3 = arguments;
366
382
  return _regenerator["default"].wrap(function _callee3$(_context3) {
367
383
  while (1) switch (_context3.prev = _context3.next) {
368
384
  case 0:
385
+ _ref4 = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : {}, customMessageData = _ref4.customMessageData;
369
386
  if (!sending.current) {
370
- _context3.next = 2;
387
+ _context3.next = 3;
371
388
  break;
372
389
  }
373
390
  return _context3.abrupt("return");
374
- case 2:
391
+ case 3:
375
392
  linkInfos = (0, _parseLinks.parseLinksFromText)(text);
376
393
  if (!(!channelCapabities.sendLinks && linkInfos.length > 0)) {
377
- _context3.next = 6;
394
+ _context3.next = 7;
378
395
  break;
379
396
  }
380
397
  _reactNative.Alert.alert(t('Links are disabled'), t('Sending links is not allowed in this conversation'));
381
398
  return _context3.abrupt("return");
382
- case 6:
399
+ case 7:
383
400
  sending.current = true;
384
401
  startCooldown();
385
402
  prevText = giphyEnabled && giphyActive ? "/giphy " + text : text;
@@ -442,77 +459,77 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
442
459
  }, _callee2);
443
460
  });
444
461
  _iterator3 = _createForOfIteratorHelperLoose(imageUploads);
445
- case 14:
462
+ case 15:
446
463
  if ((_step3 = _iterator3()).done) {
447
- _context3.next = 24;
464
+ _context3.next = 25;
448
465
  break;
449
466
  }
450
467
  _image = _step3.value;
451
- return _context3.delegateYield(_loop(_image), "t0", 17);
452
- case 17:
468
+ return _context3.delegateYield(_loop(_image), "t0", 18);
469
+ case 18:
453
470
  _ret = _context3.t0;
454
471
  if (!(_ret === "continue")) {
455
- _context3.next = 20;
472
+ _context3.next = 21;
456
473
  break;
457
474
  }
458
- return _context3.abrupt("continue", 22);
459
- case 20:
475
+ return _context3.abrupt("continue", 23);
476
+ case 21:
460
477
  if (!((0, _typeof2["default"])(_ret) === "object")) {
461
- _context3.next = 22;
478
+ _context3.next = 23;
462
479
  break;
463
480
  }
464
481
  return _context3.abrupt("return", _ret.v);
465
- case 22:
466
- _context3.next = 14;
482
+ case 23:
483
+ _context3.next = 15;
467
484
  break;
468
- case 24:
469
- _iterator4 = _createForOfIteratorHelperLoose(fileUploads);
470
485
  case 25:
486
+ _iterator4 = _createForOfIteratorHelperLoose(fileUploads);
487
+ case 26:
471
488
  if ((_step4 = _iterator4()).done) {
472
- _context3.next = 40;
489
+ _context3.next = 41;
473
490
  break;
474
491
  }
475
492
  _file3 = _step4.value;
476
493
  if (!enableOfflineSupport) {
477
- _context3.next = 32;
494
+ _context3.next = 33;
478
495
  break;
479
496
  }
480
497
  if (!(_file3.state === _utils.FileState.NOT_SUPPORTED)) {
481
- _context3.next = 30;
498
+ _context3.next = 31;
482
499
  break;
483
500
  }
484
501
  return _context3.abrupt("return");
485
- case 30:
502
+ case 31:
486
503
  attachments.push(mapFileUploadToAttachment(_file3));
487
- return _context3.abrupt("continue", 38);
488
- case 32:
504
+ return _context3.abrupt("continue", 39);
505
+ case 33:
489
506
  if (!(!_file3 || _file3.state === _utils.FileState.UPLOAD_FAILED)) {
490
- _context3.next = 34;
507
+ _context3.next = 35;
491
508
  break;
492
509
  }
493
- return _context3.abrupt("continue", 38);
494
- case 34:
510
+ return _context3.abrupt("continue", 39);
511
+ case 35:
495
512
  if (!(_file3.state === _utils.FileState.UPLOADING)) {
496
- _context3.next = 37;
513
+ _context3.next = 38;
497
514
  break;
498
515
  }
499
516
  sending.current = false;
500
517
  return _context3.abrupt("return");
501
- case 37:
518
+ case 38:
502
519
  if (_file3.state === _utils.FileState.UPLOADED || _file3.state === _utils.FileState.FINISHED) {
503
520
  attachments.push(mapFileUploadToAttachment(_file3));
504
521
  }
505
- case 38:
506
- _context3.next = 25;
522
+ case 39:
523
+ _context3.next = 26;
507
524
  break;
508
- case 40:
525
+ case 41:
509
526
  if (!(!prevText && attachments.length === 0)) {
510
- _context3.next = 43;
527
+ _context3.next = 44;
511
528
  break;
512
529
  }
513
530
  sending.current = false;
514
531
  return _context3.abrupt("return");
515
- case 43:
532
+ case 44:
516
533
  message = value.editing;
517
534
  if (message && message.type !== 'error') {
518
535
  updatedMessage = (0, _extends2["default"])({}, message, {
@@ -551,13 +568,13 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
551
568
  console.log('Failed to send message');
552
569
  }
553
570
  }
554
- case 45:
571
+ case 46:
555
572
  case "end":
556
573
  return _context3.stop();
557
574
  }
558
575
  }, _callee3);
559
576
  }));
560
- return function sendMessage(_x) {
577
+ return function sendMessage() {
561
578
  return _ref3.apply(this, arguments);
562
579
  };
563
580
  }();
@@ -625,7 +642,7 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
625
642
  };
626
643
  var triggerSettings = getTriggerSettings();
627
644
  var updateMessage = function () {
628
- var _ref4 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee4() {
645
+ var _ref5 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee4() {
629
646
  return _regenerator["default"].wrap(function _callee4$(_context4) {
630
647
  while (1) switch (_context4.prev = _context4.next) {
631
648
  case 0:
@@ -655,7 +672,7 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
655
672
  }, _callee4, null, [[0, 8]]);
656
673
  }));
657
674
  return function updateMessage() {
658
- return _ref4.apply(this, arguments);
675
+ return _ref5.apply(this, arguments);
659
676
  };
660
677
  }();
661
678
  var regexCondition = /File (extension \.\w{2,4}|type \S+) is not supported/;
@@ -696,12 +713,12 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
696
713
  }
697
714
  };
698
715
  var uploadFile = function () {
699
- var _ref6 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee5(_ref5) {
716
+ var _ref7 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee5(_ref6) {
700
717
  var newFile, file, id, response, _file$mimeType, compressedUri, extraData;
701
718
  return _regenerator["default"].wrap(function _callee5$(_context5) {
702
719
  while (1) switch (_context5.prev = _context5.next) {
703
720
  case 0:
704
- newFile = _ref5.newFile;
721
+ newFile = _ref6.newFile;
705
722
  file = newFile.file, id = newFile.id;
706
723
  setFileUploads(getUploadSetStateAction(id, _utils.FileState.UPLOADING));
707
724
  response = {};
@@ -768,19 +785,19 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
768
785
  }
769
786
  }, _callee5, null, [[4, 30]]);
770
787
  }));
771
- return function uploadFile(_x2) {
772
- return _ref6.apply(this, arguments);
788
+ return function uploadFile(_x) {
789
+ return _ref7.apply(this, arguments);
773
790
  };
774
791
  }();
775
792
  var uploadImage = function () {
776
- var _ref8 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee6(_ref7) {
793
+ var _ref9 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee6(_ref8) {
777
794
  var _file$name;
778
- var newImage, _ref9, file, id, response, uri, filename, compressedUri, contentType, newImageUploads;
795
+ var newImage, _ref10, file, id, response, uri, filename, compressedUri, contentType, newImageUploads;
779
796
  return _regenerator["default"].wrap(function _callee6$(_context6) {
780
797
  while (1) switch (_context6.prev = _context6.next) {
781
798
  case 0:
782
- newImage = _ref7.newImage;
783
- _ref9 = newImage || {}, file = _ref9.file, id = _ref9.id;
799
+ newImage = _ref8.newImage;
800
+ _ref10 = newImage || {}, file = _ref10.file, id = _ref10.id;
784
801
  if (file) {
785
802
  _context6.next = 4;
786
803
  break;
@@ -872,12 +889,12 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
872
889
  }
873
890
  }, _callee6, null, [[7, 32]]);
874
891
  }));
875
- return function uploadImage(_x3) {
876
- return _ref8.apply(this, arguments);
892
+ return function uploadImage(_x2) {
893
+ return _ref9.apply(this, arguments);
877
894
  };
878
895
  }();
879
896
  var uploadNewFile = function () {
880
- var _ref10 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee7(file) {
897
+ var _ref11 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee7(file) {
881
898
  var id, isBlockedFileExtension, isBlockedFileMimeType, fileState, newFile;
882
899
  return _regenerator["default"].wrap(function _callee7$(_context7) {
883
900
  while (1) switch (_context7.prev = _context7.next) {
@@ -918,12 +935,12 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
918
935
  }
919
936
  }, _callee7);
920
937
  }));
921
- return function uploadNewFile(_x4) {
922
- return _ref10.apply(this, arguments);
938
+ return function uploadNewFile(_x3) {
939
+ return _ref11.apply(this, arguments);
923
940
  };
924
941
  }();
925
942
  var uploadNewImage = function () {
926
- var _ref11 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee8(image) {
943
+ var _ref12 = (0, _asyncToGenerator2["default"])(_regenerator["default"].mark(function _callee8(image) {
927
944
  var id, isBlockedImageMimeType, isBlockedImageExtension, imageState, newImage;
928
945
  return _regenerator["default"].wrap(function _callee8$(_context8) {
929
946
  while (1) switch (_context8.prev = _context8.next) {
@@ -964,8 +981,8 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
964
981
  }
965
982
  }, _callee8);
966
983
  }));
967
- return function uploadNewImage(_x5) {
968
- return _ref11.apply(this, arguments);
984
+ return function uploadNewImage(_x4) {
985
+ return _ref12.apply(this, arguments);
969
986
  };
970
987
  }();
971
988
  var messageInputContext = (0, _useCreateMessageInputContext.useCreateMessageInputContext)((0, _extends2["default"])({
@@ -1024,7 +1041,7 @@ var MessageInputProvider = function MessageInputProvider(_ref) {
1024
1041
  __self: _this,
1025
1042
  __source: {
1026
1043
  fileName: _jsxFileName,
1027
- lineNumber: 1225,
1044
+ lineNumber: 1231,
1028
1045
  columnNumber: 5
1029
1046
  }
1030
1047
  }, children);
@@ -1045,7 +1062,7 @@ var withMessageInputContext = function withMessageInputContext(Component) {
1045
1062
  __self: _this,
1046
1063
  __source: {
1047
1064
  fileName: _jsxFileName,
1048
- lineNumber: 1265,
1065
+ lineNumber: 1271,
1049
1066
  columnNumber: 12
1050
1067
  }
1051
1068
  }));