stream-chat-react 12.9.0 → 12.10.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/components/Attachment/components/WaveProgressBar.js +1 -1
- package/dist/components/Attachment/hooks/useAudioController.d.ts +1 -1
- package/dist/components/Attachment/hooks/useAudioController.js +1 -1
- package/dist/components/AutoCompleteTextarea/Textarea.js +0 -4
- package/dist/components/AutoCompleteTextarea/utils.js +1 -5
- package/dist/components/Channel/Channel.js +3 -2
- package/dist/components/Channel/channelState.d.ts +1 -3
- package/dist/components/Channel/channelState.js +1 -1
- package/dist/components/Channel/hooks/useIsMounted.d.ts +1 -1
- package/dist/components/ChannelList/hooks/useChannelListShape.js +2 -2
- package/dist/components/ChannelList/hooks/useMobileNavigation.d.ts +1 -1
- package/dist/components/ChannelList/hooks/usePaginatedChannels.js +1 -1
- package/dist/components/ChannelSearch/SearchBar.d.ts +1 -1
- package/dist/components/ChannelSearch/SearchInput.d.ts +1 -1
- package/dist/components/ChannelSearch/hooks/useChannelSearch.js +1 -1
- package/dist/components/Chat/hooks/useChat.js +1 -1
- package/dist/components/Gallery/BaseImage.d.ts +1 -3
- package/dist/components/Gallery/Gallery.js +10 -2
- package/dist/components/Gallery/ModalGallery.js +5 -4
- package/dist/components/InfiniteScrollPaginator/InfiniteScroll.js +4 -4
- package/dist/components/MessageActions/hooks/useMessageActionsBoxPopper.d.ts +1 -1
- package/dist/components/MessageInput/hooks/useMessageInputText.d.ts +1 -1
- package/dist/components/MessageInput/hooks/useMessageInputText.js +2 -2
- package/dist/components/MessageInput/hooks/useTimeElapsed.js +1 -1
- package/dist/components/MessageList/MessageList.js +0 -1
- package/dist/components/MessageList/VirtualizedMessageList.d.ts +1 -1
- package/dist/components/MessageList/VirtualizedMessageList.js +2 -2
- package/dist/components/MessageList/hooks/MessageList/useMessageListScrollManager.js +1 -1
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useMessageSetKey.js +1 -1
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.d.ts +1 -1
- package/dist/components/MessageList/hooks/VirtualizedMessageList/usePrependMessagesCount.js +2 -2
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useScrollToBottomOnNewMessage.js +1 -1
- package/dist/components/MessageList/hooks/useMarkRead.d.ts +2 -4
- package/dist/components/MessageList/hooks/useMarkRead.js +14 -16
- package/dist/context/VirtualizedMessageListContext.d.ts +13 -0
- package/dist/context/VirtualizedMessageListContext.js +7 -0
- package/dist/experimental/index.browser.cjs.map +2 -2
- package/dist/experimental/index.node.cjs.map +2 -2
- package/dist/index.browser.cjs +572 -178
- package/dist/index.browser.cjs.map +4 -4
- package/dist/index.node.cjs +836 -197
- package/dist/index.node.cjs.map +4 -4
- package/package.json +12 -15
package/dist/index.node.cjs
CHANGED
|
@@ -416,6 +416,311 @@ var require_extend = __commonJS({
|
|
|
416
416
|
}
|
|
417
417
|
});
|
|
418
418
|
|
|
419
|
+
// node_modules/react-markdown/node_modules/react-is/cjs/react-is.production.min.js
|
|
420
|
+
var require_react_is_production_min = __commonJS({
|
|
421
|
+
"node_modules/react-markdown/node_modules/react-is/cjs/react-is.production.min.js"(exports2) {
|
|
422
|
+
"use strict";
|
|
423
|
+
var b = Symbol.for("react.element");
|
|
424
|
+
var c = Symbol.for("react.portal");
|
|
425
|
+
var d = Symbol.for("react.fragment");
|
|
426
|
+
var e2 = Symbol.for("react.strict_mode");
|
|
427
|
+
var f = Symbol.for("react.profiler");
|
|
428
|
+
var g = Symbol.for("react.provider");
|
|
429
|
+
var h2 = Symbol.for("react.context");
|
|
430
|
+
var k = Symbol.for("react.server_context");
|
|
431
|
+
var l = Symbol.for("react.forward_ref");
|
|
432
|
+
var m = Symbol.for("react.suspense");
|
|
433
|
+
var n = Symbol.for("react.suspense_list");
|
|
434
|
+
var p = Symbol.for("react.memo");
|
|
435
|
+
var q = Symbol.for("react.lazy");
|
|
436
|
+
var t2 = Symbol.for("react.offscreen");
|
|
437
|
+
var u2;
|
|
438
|
+
u2 = Symbol.for("react.module.reference");
|
|
439
|
+
function v(a2) {
|
|
440
|
+
if ("object" === typeof a2 && null !== a2) {
|
|
441
|
+
var r = a2.$$typeof;
|
|
442
|
+
switch (r) {
|
|
443
|
+
case b:
|
|
444
|
+
switch (a2 = a2.type, a2) {
|
|
445
|
+
case d:
|
|
446
|
+
case f:
|
|
447
|
+
case e2:
|
|
448
|
+
case m:
|
|
449
|
+
case n:
|
|
450
|
+
return a2;
|
|
451
|
+
default:
|
|
452
|
+
switch (a2 = a2 && a2.$$typeof, a2) {
|
|
453
|
+
case k:
|
|
454
|
+
case h2:
|
|
455
|
+
case l:
|
|
456
|
+
case q:
|
|
457
|
+
case p:
|
|
458
|
+
case g:
|
|
459
|
+
return a2;
|
|
460
|
+
default:
|
|
461
|
+
return r;
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
case c:
|
|
465
|
+
return r;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
exports2.ContextConsumer = h2;
|
|
470
|
+
exports2.ContextProvider = g;
|
|
471
|
+
exports2.Element = b;
|
|
472
|
+
exports2.ForwardRef = l;
|
|
473
|
+
exports2.Fragment = d;
|
|
474
|
+
exports2.Lazy = q;
|
|
475
|
+
exports2.Memo = p;
|
|
476
|
+
exports2.Portal = c;
|
|
477
|
+
exports2.Profiler = f;
|
|
478
|
+
exports2.StrictMode = e2;
|
|
479
|
+
exports2.Suspense = m;
|
|
480
|
+
exports2.SuspenseList = n;
|
|
481
|
+
exports2.isAsyncMode = function() {
|
|
482
|
+
return false;
|
|
483
|
+
};
|
|
484
|
+
exports2.isConcurrentMode = function() {
|
|
485
|
+
return false;
|
|
486
|
+
};
|
|
487
|
+
exports2.isContextConsumer = function(a2) {
|
|
488
|
+
return v(a2) === h2;
|
|
489
|
+
};
|
|
490
|
+
exports2.isContextProvider = function(a2) {
|
|
491
|
+
return v(a2) === g;
|
|
492
|
+
};
|
|
493
|
+
exports2.isElement = function(a2) {
|
|
494
|
+
return "object" === typeof a2 && null !== a2 && a2.$$typeof === b;
|
|
495
|
+
};
|
|
496
|
+
exports2.isForwardRef = function(a2) {
|
|
497
|
+
return v(a2) === l;
|
|
498
|
+
};
|
|
499
|
+
exports2.isFragment = function(a2) {
|
|
500
|
+
return v(a2) === d;
|
|
501
|
+
};
|
|
502
|
+
exports2.isLazy = function(a2) {
|
|
503
|
+
return v(a2) === q;
|
|
504
|
+
};
|
|
505
|
+
exports2.isMemo = function(a2) {
|
|
506
|
+
return v(a2) === p;
|
|
507
|
+
};
|
|
508
|
+
exports2.isPortal = function(a2) {
|
|
509
|
+
return v(a2) === c;
|
|
510
|
+
};
|
|
511
|
+
exports2.isProfiler = function(a2) {
|
|
512
|
+
return v(a2) === f;
|
|
513
|
+
};
|
|
514
|
+
exports2.isStrictMode = function(a2) {
|
|
515
|
+
return v(a2) === e2;
|
|
516
|
+
};
|
|
517
|
+
exports2.isSuspense = function(a2) {
|
|
518
|
+
return v(a2) === m;
|
|
519
|
+
};
|
|
520
|
+
exports2.isSuspenseList = function(a2) {
|
|
521
|
+
return v(a2) === n;
|
|
522
|
+
};
|
|
523
|
+
exports2.isValidElementType = function(a2) {
|
|
524
|
+
return "string" === typeof a2 || "function" === typeof a2 || a2 === d || a2 === f || a2 === e2 || a2 === m || a2 === n || a2 === t2 || "object" === typeof a2 && null !== a2 && (a2.$$typeof === q || a2.$$typeof === p || a2.$$typeof === g || a2.$$typeof === h2 || a2.$$typeof === l || a2.$$typeof === u2 || void 0 !== a2.getModuleId) ? true : false;
|
|
525
|
+
};
|
|
526
|
+
exports2.typeOf = v;
|
|
527
|
+
}
|
|
528
|
+
});
|
|
529
|
+
|
|
530
|
+
// node_modules/react-markdown/node_modules/react-is/cjs/react-is.development.js
|
|
531
|
+
var require_react_is_development = __commonJS({
|
|
532
|
+
"node_modules/react-markdown/node_modules/react-is/cjs/react-is.development.js"(exports2) {
|
|
533
|
+
"use strict";
|
|
534
|
+
if (process.env.NODE_ENV !== "production") {
|
|
535
|
+
(function() {
|
|
536
|
+
"use strict";
|
|
537
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
|
|
538
|
+
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
|
|
539
|
+
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
540
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
|
|
541
|
+
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
|
|
542
|
+
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
|
|
543
|
+
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
|
|
544
|
+
var REACT_SERVER_CONTEXT_TYPE = Symbol.for("react.server_context");
|
|
545
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
|
|
546
|
+
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
|
|
547
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
|
|
548
|
+
var REACT_MEMO_TYPE = Symbol.for("react.memo");
|
|
549
|
+
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
|
|
550
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
|
|
551
|
+
var enableScopeAPI = false;
|
|
552
|
+
var enableCacheElement = false;
|
|
553
|
+
var enableTransitionTracing = false;
|
|
554
|
+
var enableLegacyHidden = false;
|
|
555
|
+
var enableDebugTracing = false;
|
|
556
|
+
var REACT_MODULE_REFERENCE;
|
|
557
|
+
{
|
|
558
|
+
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
|
|
559
|
+
}
|
|
560
|
+
function isValidElementType(type) {
|
|
561
|
+
if (typeof type === "string" || typeof type === "function") {
|
|
562
|
+
return true;
|
|
563
|
+
}
|
|
564
|
+
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
|
|
565
|
+
return true;
|
|
566
|
+
}
|
|
567
|
+
if (typeof type === "object" && type !== null) {
|
|
568
|
+
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
569
|
+
// types supported by any Flight configuration anywhere since
|
|
570
|
+
// we don't know which Flight build this will end up being used
|
|
571
|
+
// with.
|
|
572
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
|
|
573
|
+
return true;
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
return false;
|
|
577
|
+
}
|
|
578
|
+
function typeOf(object) {
|
|
579
|
+
if (typeof object === "object" && object !== null) {
|
|
580
|
+
var $$typeof = object.$$typeof;
|
|
581
|
+
switch ($$typeof) {
|
|
582
|
+
case REACT_ELEMENT_TYPE:
|
|
583
|
+
var type = object.type;
|
|
584
|
+
switch (type) {
|
|
585
|
+
case REACT_FRAGMENT_TYPE:
|
|
586
|
+
case REACT_PROFILER_TYPE:
|
|
587
|
+
case REACT_STRICT_MODE_TYPE:
|
|
588
|
+
case REACT_SUSPENSE_TYPE:
|
|
589
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
590
|
+
return type;
|
|
591
|
+
default:
|
|
592
|
+
var $$typeofType = type && type.$$typeof;
|
|
593
|
+
switch ($$typeofType) {
|
|
594
|
+
case REACT_SERVER_CONTEXT_TYPE:
|
|
595
|
+
case REACT_CONTEXT_TYPE:
|
|
596
|
+
case REACT_FORWARD_REF_TYPE:
|
|
597
|
+
case REACT_LAZY_TYPE:
|
|
598
|
+
case REACT_MEMO_TYPE:
|
|
599
|
+
case REACT_PROVIDER_TYPE:
|
|
600
|
+
return $$typeofType;
|
|
601
|
+
default:
|
|
602
|
+
return $$typeof;
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
case REACT_PORTAL_TYPE:
|
|
606
|
+
return $$typeof;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
return void 0;
|
|
610
|
+
}
|
|
611
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
612
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
613
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
614
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
615
|
+
var Fragment2 = REACT_FRAGMENT_TYPE;
|
|
616
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
617
|
+
var Memo = REACT_MEMO_TYPE;
|
|
618
|
+
var Portal2 = REACT_PORTAL_TYPE;
|
|
619
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
620
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
621
|
+
var Suspense2 = REACT_SUSPENSE_TYPE;
|
|
622
|
+
var SuspenseList = REACT_SUSPENSE_LIST_TYPE;
|
|
623
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
624
|
+
var hasWarnedAboutDeprecatedIsConcurrentMode = false;
|
|
625
|
+
function isAsyncMode(object) {
|
|
626
|
+
{
|
|
627
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
628
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
629
|
+
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.");
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
return false;
|
|
633
|
+
}
|
|
634
|
+
function isConcurrentMode(object) {
|
|
635
|
+
{
|
|
636
|
+
if (!hasWarnedAboutDeprecatedIsConcurrentMode) {
|
|
637
|
+
hasWarnedAboutDeprecatedIsConcurrentMode = true;
|
|
638
|
+
console["warn"]("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.");
|
|
639
|
+
}
|
|
640
|
+
}
|
|
641
|
+
return false;
|
|
642
|
+
}
|
|
643
|
+
function isContextConsumer(object) {
|
|
644
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
645
|
+
}
|
|
646
|
+
function isContextProvider(object) {
|
|
647
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
648
|
+
}
|
|
649
|
+
function isElement2(object) {
|
|
650
|
+
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
651
|
+
}
|
|
652
|
+
function isForwardRef(object) {
|
|
653
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
654
|
+
}
|
|
655
|
+
function isFragment(object) {
|
|
656
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
657
|
+
}
|
|
658
|
+
function isLazy(object) {
|
|
659
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
660
|
+
}
|
|
661
|
+
function isMemo(object) {
|
|
662
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
663
|
+
}
|
|
664
|
+
function isPortal(object) {
|
|
665
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
666
|
+
}
|
|
667
|
+
function isProfiler(object) {
|
|
668
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
669
|
+
}
|
|
670
|
+
function isStrictMode(object) {
|
|
671
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
672
|
+
}
|
|
673
|
+
function isSuspense(object) {
|
|
674
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
675
|
+
}
|
|
676
|
+
function isSuspenseList(object) {
|
|
677
|
+
return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;
|
|
678
|
+
}
|
|
679
|
+
exports2.ContextConsumer = ContextConsumer;
|
|
680
|
+
exports2.ContextProvider = ContextProvider;
|
|
681
|
+
exports2.Element = Element;
|
|
682
|
+
exports2.ForwardRef = ForwardRef;
|
|
683
|
+
exports2.Fragment = Fragment2;
|
|
684
|
+
exports2.Lazy = Lazy;
|
|
685
|
+
exports2.Memo = Memo;
|
|
686
|
+
exports2.Portal = Portal2;
|
|
687
|
+
exports2.Profiler = Profiler;
|
|
688
|
+
exports2.StrictMode = StrictMode;
|
|
689
|
+
exports2.Suspense = Suspense2;
|
|
690
|
+
exports2.SuspenseList = SuspenseList;
|
|
691
|
+
exports2.isAsyncMode = isAsyncMode;
|
|
692
|
+
exports2.isConcurrentMode = isConcurrentMode;
|
|
693
|
+
exports2.isContextConsumer = isContextConsumer;
|
|
694
|
+
exports2.isContextProvider = isContextProvider;
|
|
695
|
+
exports2.isElement = isElement2;
|
|
696
|
+
exports2.isForwardRef = isForwardRef;
|
|
697
|
+
exports2.isFragment = isFragment;
|
|
698
|
+
exports2.isLazy = isLazy;
|
|
699
|
+
exports2.isMemo = isMemo;
|
|
700
|
+
exports2.isPortal = isPortal;
|
|
701
|
+
exports2.isProfiler = isProfiler;
|
|
702
|
+
exports2.isStrictMode = isStrictMode;
|
|
703
|
+
exports2.isSuspense = isSuspense;
|
|
704
|
+
exports2.isSuspenseList = isSuspenseList;
|
|
705
|
+
exports2.isValidElementType = isValidElementType;
|
|
706
|
+
exports2.typeOf = typeOf;
|
|
707
|
+
})();
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
});
|
|
711
|
+
|
|
712
|
+
// node_modules/react-markdown/node_modules/react-is/index.js
|
|
713
|
+
var require_react_is = __commonJS({
|
|
714
|
+
"node_modules/react-markdown/node_modules/react-is/index.js"(exports2, module2) {
|
|
715
|
+
"use strict";
|
|
716
|
+
if (process.env.NODE_ENV === "production") {
|
|
717
|
+
module2.exports = require_react_is_production_min();
|
|
718
|
+
} else {
|
|
719
|
+
module2.exports = require_react_is_development();
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
});
|
|
723
|
+
|
|
419
724
|
// node_modules/inline-style-parser/index.js
|
|
420
725
|
var require_inline_style_parser = __commonJS({
|
|
421
726
|
"node_modules/inline-style-parser/index.js"(exports2, module2) {
|
|
@@ -10270,13 +10575,293 @@ var require_disallow_node = __commonJS({
|
|
|
10270
10575
|
}
|
|
10271
10576
|
});
|
|
10272
10577
|
|
|
10578
|
+
// node_modules/react-is/cjs/react-is.production.min.js
|
|
10579
|
+
var require_react_is_production_min2 = __commonJS({
|
|
10580
|
+
"node_modules/react-is/cjs/react-is.production.min.js"(exports2) {
|
|
10581
|
+
"use strict";
|
|
10582
|
+
var b = "function" === typeof Symbol && Symbol.for;
|
|
10583
|
+
var c = b ? Symbol.for("react.element") : 60103;
|
|
10584
|
+
var d = b ? Symbol.for("react.portal") : 60106;
|
|
10585
|
+
var e2 = b ? Symbol.for("react.fragment") : 60107;
|
|
10586
|
+
var f = b ? Symbol.for("react.strict_mode") : 60108;
|
|
10587
|
+
var g = b ? Symbol.for("react.profiler") : 60114;
|
|
10588
|
+
var h2 = b ? Symbol.for("react.provider") : 60109;
|
|
10589
|
+
var k = b ? Symbol.for("react.context") : 60110;
|
|
10590
|
+
var l = b ? Symbol.for("react.async_mode") : 60111;
|
|
10591
|
+
var m = b ? Symbol.for("react.concurrent_mode") : 60111;
|
|
10592
|
+
var n = b ? Symbol.for("react.forward_ref") : 60112;
|
|
10593
|
+
var p = b ? Symbol.for("react.suspense") : 60113;
|
|
10594
|
+
var q = b ? Symbol.for("react.suspense_list") : 60120;
|
|
10595
|
+
var r = b ? Symbol.for("react.memo") : 60115;
|
|
10596
|
+
var t2 = b ? Symbol.for("react.lazy") : 60116;
|
|
10597
|
+
var v = b ? Symbol.for("react.block") : 60121;
|
|
10598
|
+
var w = b ? Symbol.for("react.fundamental") : 60117;
|
|
10599
|
+
var x = b ? Symbol.for("react.responder") : 60118;
|
|
10600
|
+
var y = b ? Symbol.for("react.scope") : 60119;
|
|
10601
|
+
function z(a2) {
|
|
10602
|
+
if ("object" === typeof a2 && null !== a2) {
|
|
10603
|
+
var u2 = a2.$$typeof;
|
|
10604
|
+
switch (u2) {
|
|
10605
|
+
case c:
|
|
10606
|
+
switch (a2 = a2.type, a2) {
|
|
10607
|
+
case l:
|
|
10608
|
+
case m:
|
|
10609
|
+
case e2:
|
|
10610
|
+
case g:
|
|
10611
|
+
case f:
|
|
10612
|
+
case p:
|
|
10613
|
+
return a2;
|
|
10614
|
+
default:
|
|
10615
|
+
switch (a2 = a2 && a2.$$typeof, a2) {
|
|
10616
|
+
case k:
|
|
10617
|
+
case n:
|
|
10618
|
+
case t2:
|
|
10619
|
+
case r:
|
|
10620
|
+
case h2:
|
|
10621
|
+
return a2;
|
|
10622
|
+
default:
|
|
10623
|
+
return u2;
|
|
10624
|
+
}
|
|
10625
|
+
}
|
|
10626
|
+
case d:
|
|
10627
|
+
return u2;
|
|
10628
|
+
}
|
|
10629
|
+
}
|
|
10630
|
+
}
|
|
10631
|
+
function A(a2) {
|
|
10632
|
+
return z(a2) === m;
|
|
10633
|
+
}
|
|
10634
|
+
exports2.AsyncMode = l;
|
|
10635
|
+
exports2.ConcurrentMode = m;
|
|
10636
|
+
exports2.ContextConsumer = k;
|
|
10637
|
+
exports2.ContextProvider = h2;
|
|
10638
|
+
exports2.Element = c;
|
|
10639
|
+
exports2.ForwardRef = n;
|
|
10640
|
+
exports2.Fragment = e2;
|
|
10641
|
+
exports2.Lazy = t2;
|
|
10642
|
+
exports2.Memo = r;
|
|
10643
|
+
exports2.Portal = d;
|
|
10644
|
+
exports2.Profiler = g;
|
|
10645
|
+
exports2.StrictMode = f;
|
|
10646
|
+
exports2.Suspense = p;
|
|
10647
|
+
exports2.isAsyncMode = function(a2) {
|
|
10648
|
+
return A(a2) || z(a2) === l;
|
|
10649
|
+
};
|
|
10650
|
+
exports2.isConcurrentMode = A;
|
|
10651
|
+
exports2.isContextConsumer = function(a2) {
|
|
10652
|
+
return z(a2) === k;
|
|
10653
|
+
};
|
|
10654
|
+
exports2.isContextProvider = function(a2) {
|
|
10655
|
+
return z(a2) === h2;
|
|
10656
|
+
};
|
|
10657
|
+
exports2.isElement = function(a2) {
|
|
10658
|
+
return "object" === typeof a2 && null !== a2 && a2.$$typeof === c;
|
|
10659
|
+
};
|
|
10660
|
+
exports2.isForwardRef = function(a2) {
|
|
10661
|
+
return z(a2) === n;
|
|
10662
|
+
};
|
|
10663
|
+
exports2.isFragment = function(a2) {
|
|
10664
|
+
return z(a2) === e2;
|
|
10665
|
+
};
|
|
10666
|
+
exports2.isLazy = function(a2) {
|
|
10667
|
+
return z(a2) === t2;
|
|
10668
|
+
};
|
|
10669
|
+
exports2.isMemo = function(a2) {
|
|
10670
|
+
return z(a2) === r;
|
|
10671
|
+
};
|
|
10672
|
+
exports2.isPortal = function(a2) {
|
|
10673
|
+
return z(a2) === d;
|
|
10674
|
+
};
|
|
10675
|
+
exports2.isProfiler = function(a2) {
|
|
10676
|
+
return z(a2) === g;
|
|
10677
|
+
};
|
|
10678
|
+
exports2.isStrictMode = function(a2) {
|
|
10679
|
+
return z(a2) === f;
|
|
10680
|
+
};
|
|
10681
|
+
exports2.isSuspense = function(a2) {
|
|
10682
|
+
return z(a2) === p;
|
|
10683
|
+
};
|
|
10684
|
+
exports2.isValidElementType = function(a2) {
|
|
10685
|
+
return "string" === typeof a2 || "function" === typeof a2 || a2 === e2 || a2 === m || a2 === g || a2 === f || a2 === p || a2 === q || "object" === typeof a2 && null !== a2 && (a2.$$typeof === t2 || a2.$$typeof === r || a2.$$typeof === h2 || a2.$$typeof === k || a2.$$typeof === n || a2.$$typeof === w || a2.$$typeof === x || a2.$$typeof === y || a2.$$typeof === v);
|
|
10686
|
+
};
|
|
10687
|
+
exports2.typeOf = z;
|
|
10688
|
+
}
|
|
10689
|
+
});
|
|
10690
|
+
|
|
10691
|
+
// node_modules/react-is/cjs/react-is.development.js
|
|
10692
|
+
var require_react_is_development2 = __commonJS({
|
|
10693
|
+
"node_modules/react-is/cjs/react-is.development.js"(exports2) {
|
|
10694
|
+
"use strict";
|
|
10695
|
+
if (process.env.NODE_ENV !== "production") {
|
|
10696
|
+
(function() {
|
|
10697
|
+
"use strict";
|
|
10698
|
+
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
10699
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
|
|
10700
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
|
|
10701
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
|
|
10702
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
|
|
10703
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
|
|
10704
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
|
|
10705
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
|
|
10706
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
|
|
10707
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
|
|
10708
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
|
|
10709
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
|
|
10710
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
|
|
10711
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
|
|
10712
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
|
|
10713
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
|
|
10714
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
|
|
10715
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
|
|
10716
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
|
|
10717
|
+
function isValidElementType(type) {
|
|
10718
|
+
return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
10719
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
10720
|
+
}
|
|
10721
|
+
function typeOf(object) {
|
|
10722
|
+
if (typeof object === "object" && object !== null) {
|
|
10723
|
+
var $$typeof = object.$$typeof;
|
|
10724
|
+
switch ($$typeof) {
|
|
10725
|
+
case REACT_ELEMENT_TYPE:
|
|
10726
|
+
var type = object.type;
|
|
10727
|
+
switch (type) {
|
|
10728
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
10729
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
10730
|
+
case REACT_FRAGMENT_TYPE:
|
|
10731
|
+
case REACT_PROFILER_TYPE:
|
|
10732
|
+
case REACT_STRICT_MODE_TYPE:
|
|
10733
|
+
case REACT_SUSPENSE_TYPE:
|
|
10734
|
+
return type;
|
|
10735
|
+
default:
|
|
10736
|
+
var $$typeofType = type && type.$$typeof;
|
|
10737
|
+
switch ($$typeofType) {
|
|
10738
|
+
case REACT_CONTEXT_TYPE:
|
|
10739
|
+
case REACT_FORWARD_REF_TYPE:
|
|
10740
|
+
case REACT_LAZY_TYPE:
|
|
10741
|
+
case REACT_MEMO_TYPE:
|
|
10742
|
+
case REACT_PROVIDER_TYPE:
|
|
10743
|
+
return $$typeofType;
|
|
10744
|
+
default:
|
|
10745
|
+
return $$typeof;
|
|
10746
|
+
}
|
|
10747
|
+
}
|
|
10748
|
+
case REACT_PORTAL_TYPE:
|
|
10749
|
+
return $$typeof;
|
|
10750
|
+
}
|
|
10751
|
+
}
|
|
10752
|
+
return void 0;
|
|
10753
|
+
}
|
|
10754
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
10755
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
10756
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
10757
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
10758
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
10759
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
10760
|
+
var Fragment2 = REACT_FRAGMENT_TYPE;
|
|
10761
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
10762
|
+
var Memo = REACT_MEMO_TYPE;
|
|
10763
|
+
var Portal2 = REACT_PORTAL_TYPE;
|
|
10764
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
10765
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
10766
|
+
var Suspense2 = REACT_SUSPENSE_TYPE;
|
|
10767
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
10768
|
+
function isAsyncMode(object) {
|
|
10769
|
+
{
|
|
10770
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
10771
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
10772
|
+
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
|
|
10773
|
+
}
|
|
10774
|
+
}
|
|
10775
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
10776
|
+
}
|
|
10777
|
+
function isConcurrentMode(object) {
|
|
10778
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
10779
|
+
}
|
|
10780
|
+
function isContextConsumer(object) {
|
|
10781
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
10782
|
+
}
|
|
10783
|
+
function isContextProvider(object) {
|
|
10784
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
10785
|
+
}
|
|
10786
|
+
function isElement2(object) {
|
|
10787
|
+
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
10788
|
+
}
|
|
10789
|
+
function isForwardRef(object) {
|
|
10790
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
10791
|
+
}
|
|
10792
|
+
function isFragment(object) {
|
|
10793
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
10794
|
+
}
|
|
10795
|
+
function isLazy(object) {
|
|
10796
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
10797
|
+
}
|
|
10798
|
+
function isMemo(object) {
|
|
10799
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
10800
|
+
}
|
|
10801
|
+
function isPortal(object) {
|
|
10802
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
10803
|
+
}
|
|
10804
|
+
function isProfiler(object) {
|
|
10805
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
10806
|
+
}
|
|
10807
|
+
function isStrictMode(object) {
|
|
10808
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
10809
|
+
}
|
|
10810
|
+
function isSuspense(object) {
|
|
10811
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
10812
|
+
}
|
|
10813
|
+
exports2.AsyncMode = AsyncMode;
|
|
10814
|
+
exports2.ConcurrentMode = ConcurrentMode;
|
|
10815
|
+
exports2.ContextConsumer = ContextConsumer;
|
|
10816
|
+
exports2.ContextProvider = ContextProvider;
|
|
10817
|
+
exports2.Element = Element;
|
|
10818
|
+
exports2.ForwardRef = ForwardRef;
|
|
10819
|
+
exports2.Fragment = Fragment2;
|
|
10820
|
+
exports2.Lazy = Lazy;
|
|
10821
|
+
exports2.Memo = Memo;
|
|
10822
|
+
exports2.Portal = Portal2;
|
|
10823
|
+
exports2.Profiler = Profiler;
|
|
10824
|
+
exports2.StrictMode = StrictMode;
|
|
10825
|
+
exports2.Suspense = Suspense2;
|
|
10826
|
+
exports2.isAsyncMode = isAsyncMode;
|
|
10827
|
+
exports2.isConcurrentMode = isConcurrentMode;
|
|
10828
|
+
exports2.isContextConsumer = isContextConsumer;
|
|
10829
|
+
exports2.isContextProvider = isContextProvider;
|
|
10830
|
+
exports2.isElement = isElement2;
|
|
10831
|
+
exports2.isForwardRef = isForwardRef;
|
|
10832
|
+
exports2.isFragment = isFragment;
|
|
10833
|
+
exports2.isLazy = isLazy;
|
|
10834
|
+
exports2.isMemo = isMemo;
|
|
10835
|
+
exports2.isPortal = isPortal;
|
|
10836
|
+
exports2.isProfiler = isProfiler;
|
|
10837
|
+
exports2.isStrictMode = isStrictMode;
|
|
10838
|
+
exports2.isSuspense = isSuspense;
|
|
10839
|
+
exports2.isValidElementType = isValidElementType;
|
|
10840
|
+
exports2.typeOf = typeOf;
|
|
10841
|
+
})();
|
|
10842
|
+
}
|
|
10843
|
+
}
|
|
10844
|
+
});
|
|
10845
|
+
|
|
10846
|
+
// node_modules/react-is/index.js
|
|
10847
|
+
var require_react_is2 = __commonJS({
|
|
10848
|
+
"node_modules/react-is/index.js"(exports2, module2) {
|
|
10849
|
+
"use strict";
|
|
10850
|
+
if (process.env.NODE_ENV === "production") {
|
|
10851
|
+
module2.exports = require_react_is_production_min2();
|
|
10852
|
+
} else {
|
|
10853
|
+
module2.exports = require_react_is_development2();
|
|
10854
|
+
}
|
|
10855
|
+
}
|
|
10856
|
+
});
|
|
10857
|
+
|
|
10273
10858
|
// node_modules/mml-react/node_modules/react-markdown/lib/ast-to-react.js
|
|
10274
10859
|
var require_ast_to_react = __commonJS({
|
|
10275
10860
|
"node_modules/mml-react/node_modules/react-markdown/lib/ast-to-react.js"(exports2, module2) {
|
|
10276
10861
|
"use strict";
|
|
10277
|
-
var
|
|
10862
|
+
var React210 = require("react");
|
|
10278
10863
|
var xtend = require_immutable();
|
|
10279
|
-
var ReactIs2 =
|
|
10864
|
+
var ReactIs2 = require_react_is2();
|
|
10280
10865
|
function astToReact(node2, options) {
|
|
10281
10866
|
var parent = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
10282
10867
|
var index3 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0;
|
|
@@ -10301,7 +10886,7 @@ var require_ast_to_react = __commonJS({
|
|
|
10301
10886
|
throw new Error("Renderer for type `".concat(node2.type, "` not defined or is not renderable"));
|
|
10302
10887
|
}
|
|
10303
10888
|
var nodeProps = getNodeProps(node2, key, options, renderer, parent, index3);
|
|
10304
|
-
return
|
|
10889
|
+
return React210.createElement(renderer, nodeProps, nodeProps.children || resolveChildren() || void 0);
|
|
10305
10890
|
function resolveChildren() {
|
|
10306
10891
|
return node2.children && node2.children.map(function(childNode, i) {
|
|
10307
10892
|
return astToReact(childNode, options, {
|
|
@@ -10315,7 +10900,7 @@ var require_ast_to_react = __commonJS({
|
|
|
10315
10900
|
var props = {
|
|
10316
10901
|
key
|
|
10317
10902
|
};
|
|
10318
|
-
var isSimpleRenderer = typeof renderer === "string" || renderer ===
|
|
10903
|
+
var isSimpleRenderer = typeof renderer === "string" || renderer === React210.Fragment;
|
|
10319
10904
|
if (opts.sourcePos && node2.position) {
|
|
10320
10905
|
props["data-sourcepos"] = flattenPosition2(node2.position);
|
|
10321
10906
|
}
|
|
@@ -10468,14 +11053,14 @@ var require_ast_to_react = __commonJS({
|
|
|
10468
11053
|
function mergeNodeChildren(node2, parsedChildren) {
|
|
10469
11054
|
var el = node2.element;
|
|
10470
11055
|
if (Array.isArray(el)) {
|
|
10471
|
-
var Fragment2 =
|
|
10472
|
-
return
|
|
11056
|
+
var Fragment2 = React210.Fragment || "div";
|
|
11057
|
+
return React210.createElement(Fragment2, null, el);
|
|
10473
11058
|
}
|
|
10474
11059
|
if (el.props.children || parsedChildren) {
|
|
10475
|
-
var children =
|
|
10476
|
-
return
|
|
11060
|
+
var children = React210.Children.toArray(el.props.children).concat(parsedChildren);
|
|
11061
|
+
return React210.cloneElement(el, null, children);
|
|
10477
11062
|
}
|
|
10478
|
-
return
|
|
11063
|
+
return React210.cloneElement(el, null);
|
|
10479
11064
|
}
|
|
10480
11065
|
function flattenPosition2(pos) {
|
|
10481
11066
|
return [pos.start.line, ":", pos.start.column, "-", pos.end.line, ":", pos.end.column].map(String).join("");
|
|
@@ -10599,9 +11184,9 @@ var require_renderers = __commonJS({
|
|
|
10599
11184
|
"node_modules/mml-react/node_modules/react-markdown/lib/renderers.js"(exports2, module2) {
|
|
10600
11185
|
"use strict";
|
|
10601
11186
|
var xtend = require_immutable();
|
|
10602
|
-
var
|
|
10603
|
-
var supportsStringRender = parseInt((
|
|
10604
|
-
var createElement =
|
|
11187
|
+
var React210 = require("react");
|
|
11188
|
+
var supportsStringRender = parseInt((React210.version || "16").slice(0, 2), 10) >= 16;
|
|
11189
|
+
var createElement = React210.createElement;
|
|
10605
11190
|
module2.exports = {
|
|
10606
11191
|
break: "br",
|
|
10607
11192
|
paragraph: "p",
|
|
@@ -10637,7 +11222,7 @@ var require_renderers = __commonJS({
|
|
|
10637
11222
|
}
|
|
10638
11223
|
function Root(props) {
|
|
10639
11224
|
var className = props.className;
|
|
10640
|
-
var root2 = !className &&
|
|
11225
|
+
var root2 = !className && React210.Fragment || "div";
|
|
10641
11226
|
return createElement(root2, className ? {
|
|
10642
11227
|
className
|
|
10643
11228
|
} : null, props.children);
|
|
@@ -10693,7 +11278,7 @@ var require_renderers = __commonJS({
|
|
|
10693
11278
|
var dangerous = props.allowDangerousHtml || props.escapeHtml === false;
|
|
10694
11279
|
var tag = props.isBlock ? "div" : "span";
|
|
10695
11280
|
if (!dangerous) {
|
|
10696
|
-
return createElement(
|
|
11281
|
+
return createElement(React210.Fragment || tag, null, props.value);
|
|
10697
11282
|
}
|
|
10698
11283
|
var nodeProps = {
|
|
10699
11284
|
dangerouslySetInnerHTML: {
|
|
@@ -10703,7 +11288,7 @@ var require_renderers = __commonJS({
|
|
|
10703
11288
|
return createElement(tag, nodeProps);
|
|
10704
11289
|
}
|
|
10705
11290
|
function ParsedHtml(props) {
|
|
10706
|
-
return props["data-sourcepos"] ?
|
|
11291
|
+
return props["data-sourcepos"] ? React210.cloneElement(props.element, {
|
|
10707
11292
|
"data-sourcepos": props["data-sourcepos"]
|
|
10708
11293
|
}) : props.element;
|
|
10709
11294
|
}
|
|
@@ -18555,8 +19140,8 @@ var require_mml_react_cjs_development = __commonJS({
|
|
|
18555
19140
|
function _interopDefault(ex) {
|
|
18556
19141
|
return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex;
|
|
18557
19142
|
}
|
|
18558
|
-
var
|
|
18559
|
-
var React__default = _interopDefault(
|
|
19143
|
+
var React210 = require("react");
|
|
19144
|
+
var React__default = _interopDefault(React210);
|
|
18560
19145
|
var parseXml = _interopDefault(require_src());
|
|
18561
19146
|
var dayjs = _interopDefault(require("dayjs"));
|
|
18562
19147
|
var sanitizeUrl4 = require("@braintree/sanitize-url");
|
|
@@ -19341,8 +19926,8 @@ var require_mml_react_cjs_development = __commonJS({
|
|
|
19341
19926
|
className: "mml-carousel__track"
|
|
19342
19927
|
}, React__default.createElement("div", {
|
|
19343
19928
|
className: "mml-carousel__slides"
|
|
19344
|
-
},
|
|
19345
|
-
return
|
|
19929
|
+
}, React210.Children.map(children, function(child) {
|
|
19930
|
+
return React210.cloneElement(child, {
|
|
19346
19931
|
className: "mml-carousel__slide",
|
|
19347
19932
|
slideWidth
|
|
19348
19933
|
});
|
|
@@ -19386,7 +19971,7 @@ var require_mml_react_cjs_development = __commonJS({
|
|
|
19386
19971
|
};
|
|
19387
19972
|
var Input = function Input2(_ref) {
|
|
19388
19973
|
var name = _ref.name, label = _ref.label, _ref$value = _ref.value, value = _ref$value === void 0 ? "" : _ref$value, _ref$type = _ref.type, type = _ref$type === void 0 ? "text" : _ref$type, _ref$placeholder = _ref.placeholder, placeholder = _ref$placeholder === void 0 ? "" : _ref$placeholder;
|
|
19389
|
-
var _useState =
|
|
19974
|
+
var _useState = React210.useState(value), state = _useState[0], setState = _useState[1];
|
|
19390
19975
|
var id = "mml-" + name;
|
|
19391
19976
|
return React__default.createElement(React__default.Fragment, null, label && React__default.createElement("label", {
|
|
19392
19977
|
className: "mml-card-header",
|
|
@@ -19516,7 +20101,7 @@ var require_mml_react_cjs_development = __commonJS({
|
|
|
19516
20101
|
};
|
|
19517
20102
|
var Number2 = function Number3(_ref) {
|
|
19518
20103
|
var name = _ref.name, value = _ref.value;
|
|
19519
|
-
var _useState =
|
|
20104
|
+
var _useState = React210.useState(parseInt("" + value, 10) || 0), state = _useState[0], setState = _useState[1];
|
|
19520
20105
|
return React__default.createElement("div", {
|
|
19521
20106
|
className: "mml-number"
|
|
19522
20107
|
}, React__default.createElement("input", {
|
|
@@ -19553,7 +20138,7 @@ var require_mml_react_cjs_development = __commonJS({
|
|
|
19553
20138
|
var VIRTUOSO_START_INDEX = 1e4;
|
|
19554
20139
|
var DatePickerSelect = function DatePickerSelect2(props) {
|
|
19555
20140
|
var onChange = props.onChange, icalFilter = props.icalFilter, getItemData2 = props.getItemData, itemClassName = props.itemClassName, interval = props.interval, format = props.format, value = props.value;
|
|
19556
|
-
var generateItems =
|
|
20141
|
+
var generateItems = React210.useCallback(function(quantity, firstIdx) {
|
|
19557
20142
|
return Array(quantity).fill(true).map(function(_, idx) {
|
|
19558
20143
|
return getItemData2({
|
|
19559
20144
|
interval,
|
|
@@ -19565,11 +20150,11 @@ var require_mml_react_cjs_development = __commonJS({
|
|
|
19565
20150
|
return !icalFilter || icalFilter && icalFilter(newItem.value);
|
|
19566
20151
|
});
|
|
19567
20152
|
}, [interval, format, value, icalFilter, getItemData2]);
|
|
19568
|
-
var _useState =
|
|
19569
|
-
var _useState2 =
|
|
19570
|
-
var initialIndexOffset =
|
|
19571
|
-
var _useState3 =
|
|
19572
|
-
var handleClick =
|
|
20153
|
+
var _useState = React210.useState(generateItems(ITEMS_PER_PAGE * 2, -ITEMS_PER_PAGE)), items = _useState[0], setItems = _useState[1];
|
|
20154
|
+
var _useState2 = React210.useState(VIRTUOSO_START_INDEX), firstItemIndex = _useState2[0], setFirstItemIndex = _useState2[1];
|
|
20155
|
+
var initialIndexOffset = React210.useRef(INITIAL_INDEX);
|
|
20156
|
+
var _useState3 = React210.useState(null), selectedIdx = _useState3[0], setSelectedIdx = _useState3[1];
|
|
20157
|
+
var handleClick = React210.useCallback(function(item) {
|
|
19573
20158
|
onChange(item.value);
|
|
19574
20159
|
var firstItemIndex2 = initialIndexOffset.current || 0;
|
|
19575
20160
|
var nextFirstItemIdx = firstItemIndex2 - INITIAL_INDEX - ITEMS_PER_PAGE;
|
|
@@ -19583,12 +20168,12 @@ var require_mml_react_cjs_development = __commonJS({
|
|
|
19583
20168
|
}
|
|
19584
20169
|
setSelectedIdx(item.idx);
|
|
19585
20170
|
}, [setItems, generateItems, initialIndexOffset, onChange]);
|
|
19586
|
-
var appendItems =
|
|
20171
|
+
var appendItems = React210.useCallback(function(lastItemIndex) {
|
|
19587
20172
|
setItems(function(items2) {
|
|
19588
20173
|
return [].concat(items2, generateItems(ITEMS_PER_PAGE, lastItemIndex));
|
|
19589
20174
|
});
|
|
19590
20175
|
}, [setItems, generateItems]);
|
|
19591
|
-
var prependItems =
|
|
20176
|
+
var prependItems = React210.useCallback(function() {
|
|
19592
20177
|
var firstItemIndex2 = initialIndexOffset.current || 0;
|
|
19593
20178
|
var nextFirstItemIdx = firstItemIndex2 - INITIAL_INDEX - ITEMS_PER_PAGE;
|
|
19594
20179
|
if (initialIndexOffset) {
|
|
@@ -19600,7 +20185,7 @@ var require_mml_react_cjs_development = __commonJS({
|
|
|
19600
20185
|
setFirstItemIndex(firstItemIndex2 - ITEMS_PER_PAGE);
|
|
19601
20186
|
return false;
|
|
19602
20187
|
}, [setItems, generateItems, initialIndexOffset]);
|
|
19603
|
-
|
|
20188
|
+
React210.useEffect(function() {
|
|
19604
20189
|
if (value) {
|
|
19605
20190
|
var initialSelectedIdx = null;
|
|
19606
20191
|
for (var i = 0; i < items.length; i++) {
|
|
@@ -19670,7 +20255,7 @@ var require_mml_react_cjs_development = __commonJS({
|
|
|
19670
20255
|
};
|
|
19671
20256
|
var DatePicker = function DatePicker2(_ref) {
|
|
19672
20257
|
var name = _ref.name, selected = _ref.selected, dateInterval = _ref.dateInterval, timeInterval = _ref.timeInterval, dateFormat = _ref.dateFormat, timeFormat = _ref.timeFormat, fullDay = _ref.fullDay, icalFilter = _ref.icalFilter;
|
|
19673
|
-
var _useState =
|
|
20258
|
+
var _useState = React210.useState(selected), date = _useState[0], setDate = _useState[1];
|
|
19674
20259
|
var handleChangeDate = function handleChangeDate2(value) {
|
|
19675
20260
|
setDate(function(prevDate) {
|
|
19676
20261
|
return prevDate.set("date", value.get("date")).set("month", value.get("month")).set("year", value.get("year"));
|
|
@@ -19750,14 +20335,14 @@ var require_mml_react_cjs_development = __commonJS({
|
|
|
19750
20335
|
}();
|
|
19751
20336
|
var Scheduler = function Scheduler2(_ref2) {
|
|
19752
20337
|
var name = _ref2.name, selected = _ref2.selected, icalAvailability = _ref2.icalAvailability, _ref2$duration = _ref2.duration, duration = _ref2$duration === void 0 ? 30 : _ref2$duration, _ref2$dateInterval = _ref2.dateInterval, dateInterval = _ref2$dateInterval === void 0 ? 1 : _ref2$dateInterval, _ref2$timeInterval = _ref2.timeInterval, timeInterval = _ref2$timeInterval === void 0 ? 30 : _ref2$timeInterval, _ref2$dateFormat = _ref2.dateFormat, dateFormat = _ref2$dateFormat === void 0 ? "ddd MMM DD" : _ref2$dateFormat, _ref2$timeFormat = _ref2.timeFormat, timeFormat = _ref2$timeFormat === void 0 ? "hh:mm A" : _ref2$timeFormat, _ref2$fullDay = _ref2.fullDay, fullDay = _ref2$fullDay === void 0 ? false : _ref2$fullDay;
|
|
19753
|
-
var _useState =
|
|
19754
|
-
var _useState2 =
|
|
19755
|
-
var _useState3 =
|
|
20338
|
+
var _useState = React210.useState(false), loading = _useState[0], setLoading = _useState[1];
|
|
20339
|
+
var _useState2 = React210.useState(""), error = _useState2[0], setError = _useState2[1];
|
|
20340
|
+
var _useState3 = React210.useState(function() {
|
|
19756
20341
|
return function() {
|
|
19757
20342
|
return true;
|
|
19758
20343
|
};
|
|
19759
20344
|
}), icalFilter = _useState3[0], setIcalFilter = _useState3[1];
|
|
19760
|
-
|
|
20345
|
+
React210.useEffect(function() {
|
|
19761
20346
|
if (!icalAvailability) return;
|
|
19762
20347
|
setLoading(true);
|
|
19763
20348
|
setupIcalFilter(icalAvailability, duration).then(setIcalFilter)["catch"](function(err) {
|
|
@@ -19961,13 +20546,13 @@ var require_mml_react_cjs_development = __commonJS({
|
|
|
19961
20546
|
}
|
|
19962
20547
|
var MML2 = function MML3(_ref) {
|
|
19963
20548
|
var source = _ref.source, onSubmit = _ref.onSubmit, converters2 = _ref.converters, _ref$theme = _ref.theme, theme = _ref$theme === void 0 ? "" : _ref$theme, _ref$className = _ref.className, className = _ref$className === void 0 ? "" : _ref$className, _ref$Loading = _ref.Loading, Loading$1 = _ref$Loading === void 0 ? Loading : _ref$Loading, _ref$Error = _ref.Error, Error2 = _ref$Error === void 0 ? Error$1 : _ref$Error, _ref$Success = _ref.Success, Success$1 = _ref$Success === void 0 ? Success : _ref$Success;
|
|
19964
|
-
var _useState =
|
|
19965
|
-
var _useState2 =
|
|
20549
|
+
var _useState = React210.useState(""), error = _useState[0], setError = _useState[1];
|
|
20550
|
+
var _useState2 = React210.useState({
|
|
19966
20551
|
loading: false,
|
|
19967
20552
|
error: "",
|
|
19968
20553
|
success: ""
|
|
19969
20554
|
}), submitState = _useState2[0], setSubmitState = _useState2[1];
|
|
19970
|
-
var tree =
|
|
20555
|
+
var tree = React210.useMemo(function() {
|
|
19971
20556
|
try {
|
|
19972
20557
|
return Parse(source, converters2);
|
|
19973
20558
|
} catch (e2) {
|
|
@@ -19976,7 +20561,7 @@ var require_mml_react_cjs_development = __commonJS({
|
|
|
19976
20561
|
return null;
|
|
19977
20562
|
}
|
|
19978
20563
|
}, [source, converters2]);
|
|
19979
|
-
var handleSubmit =
|
|
20564
|
+
var handleSubmit = React210.useCallback(/* @__PURE__ */ function() {
|
|
19980
20565
|
var _ref2 = _asyncToGenerator(/* @__PURE__ */ runtime_1.mark(function _callee(event) {
|
|
19981
20566
|
var state;
|
|
19982
20567
|
return runtime_1.wrap(function _callee$(_context) {
|
|
@@ -21566,7 +22151,7 @@ var WaveProgressBar = ({
|
|
|
21566
22151
|
const isDragging = (0, import_react27.useRef)(false);
|
|
21567
22152
|
const [root2, setRoot] = (0, import_react27.useState)(null);
|
|
21568
22153
|
const [trackAxisX, setTrackAxisX] = (0, import_react27.useState)();
|
|
21569
|
-
const lastRootWidth = (0, import_react27.useRef)();
|
|
22154
|
+
const lastRootWidth = (0, import_react27.useRef)(void 0);
|
|
21570
22155
|
const handleDragStart = (e2) => {
|
|
21571
22156
|
e2.preventDefault();
|
|
21572
22157
|
if (!progressIndicator) return;
|
|
@@ -21687,7 +22272,7 @@ var useAudioController = ({
|
|
|
21687
22272
|
const [canPlayRecord, setCanPlayRecord] = (0, import_react28.useState)(true);
|
|
21688
22273
|
const [secondsElapsed, setSecondsElapsed] = (0, import_react28.useState)(0);
|
|
21689
22274
|
const [playbackRateIndex, setPlaybackRateIndex] = (0, import_react28.useState)(0);
|
|
21690
|
-
const playTimeout = (0, import_react28.useRef)();
|
|
22275
|
+
const playTimeout = (0, import_react28.useRef)(void 0);
|
|
21691
22276
|
const audioRef = (0, import_react28.useRef)(null);
|
|
21692
22277
|
const registerError = (0, import_react28.useCallback)(
|
|
21693
22278
|
(e2) => {
|
|
@@ -23075,19 +23660,22 @@ var ModalGallery = (props) => {
|
|
|
23075
23660
|
source: imageSrc
|
|
23076
23661
|
};
|
|
23077
23662
|
}),
|
|
23078
|
-
|
|
23079
|
-
[images]
|
|
23663
|
+
[images, t2]
|
|
23080
23664
|
);
|
|
23081
|
-
return
|
|
23082
|
-
|
|
23083
|
-
|
|
23084
|
-
|
|
23085
|
-
|
|
23086
|
-
|
|
23087
|
-
|
|
23088
|
-
|
|
23089
|
-
|
|
23090
|
-
|
|
23665
|
+
return (
|
|
23666
|
+
// ignore the TS error as react-image-gallery was on @types/react@18 while stream-chat-react being upgraded to React 19 (https://github.com/xiaolin/react-image-gallery/issues/809)
|
|
23667
|
+
// @ts-expect-error
|
|
23668
|
+
/* @__PURE__ */ import_react39.default.createElement(
|
|
23669
|
+
import_react_image_gallery.default,
|
|
23670
|
+
{
|
|
23671
|
+
items: formattedArray,
|
|
23672
|
+
renderItem,
|
|
23673
|
+
showIndex: true,
|
|
23674
|
+
showPlayButton: false,
|
|
23675
|
+
showThumbnails: false,
|
|
23676
|
+
startIndex: index3
|
|
23677
|
+
}
|
|
23678
|
+
)
|
|
23091
23679
|
);
|
|
23092
23680
|
};
|
|
23093
23681
|
|
|
@@ -23123,7 +23711,11 @@ var UnMemoizedGallery = (props) => {
|
|
|
23123
23711
|
backgroundImage: `url(${images[lastImageIndexInPreview].previewUrl || images[lastImageIndexInPreview].image_url || images[lastImageIndexInPreview].thumb_url})`,
|
|
23124
23712
|
...image2.style
|
|
23125
23713
|
},
|
|
23126
|
-
...innerRefs?.current && {
|
|
23714
|
+
...innerRefs?.current && {
|
|
23715
|
+
ref: (r) => {
|
|
23716
|
+
innerRefs.current[i] = r;
|
|
23717
|
+
}
|
|
23718
|
+
}
|
|
23127
23719
|
},
|
|
23128
23720
|
/* @__PURE__ */ import_react40.default.createElement("p", null, t2("{{ imageCount }} more", {
|
|
23129
23721
|
imageCount: images.length - countImagesDisplayedInPreview
|
|
@@ -23143,7 +23735,11 @@ var UnMemoizedGallery = (props) => {
|
|
|
23143
23735
|
src: (0, import_sanitize_url2.sanitizeUrl)(image2.previewUrl || image2.image_url || image2.thumb_url),
|
|
23144
23736
|
style: image2.style,
|
|
23145
23737
|
title: image2?.fallback || imageFallbackTitle,
|
|
23146
|
-
...innerRefs?.current && {
|
|
23738
|
+
...innerRefs?.current && {
|
|
23739
|
+
ref: (r) => {
|
|
23740
|
+
innerRefs.current[i] = r;
|
|
23741
|
+
}
|
|
23742
|
+
}
|
|
23147
23743
|
}
|
|
23148
23744
|
)
|
|
23149
23745
|
)
|
|
@@ -34529,7 +35125,7 @@ function rehypeFilter(options) {
|
|
|
34529
35125
|
|
|
34530
35126
|
// node_modules/react-markdown/lib/ast-to-react.js
|
|
34531
35127
|
var import_react48 = __toESM(require("react"), 1);
|
|
34532
|
-
var import_react_is = __toESM(
|
|
35128
|
+
var import_react_is = __toESM(require_react_is(), 1);
|
|
34533
35129
|
|
|
34534
35130
|
// node_modules/hast-util-whitespace/index.js
|
|
34535
35131
|
function whitespace(thing) {
|
|
@@ -37748,11 +38344,9 @@ var import_react62 = __toESM(require("react"));
|
|
|
37748
38344
|
var import_prop_types2 = __toESM(require("prop-types"));
|
|
37749
38345
|
var import_react_textarea_autosize = __toESM(require("react-textarea-autosize"));
|
|
37750
38346
|
var import_textarea_caret = __toESM(require("textarea-caret"));
|
|
37751
|
-
var import_react_is3 = require("react-is");
|
|
37752
38347
|
var import_clsx17 = __toESM(require("clsx"));
|
|
37753
38348
|
|
|
37754
38349
|
// src/components/AutoCompleteTextarea/utils.js
|
|
37755
|
-
var import_react_is2 = require("react-is");
|
|
37756
38350
|
var DEFAULT_CARET_POSITION = "next";
|
|
37757
38351
|
function defaultScrollToItem(container, item) {
|
|
37758
38352
|
if (!item) return;
|
|
@@ -37779,10 +38373,7 @@ var triggerPropsCheck = ({ trigger }) => {
|
|
|
37779
38373
|
return Error("Invalid prop trigger. Keys of the object has to be string / one character.");
|
|
37780
38374
|
}
|
|
37781
38375
|
const triggerSetting = settings;
|
|
37782
|
-
const { callback,
|
|
37783
|
-
if (!(0, import_react_is2.isValidElementType)(component)) {
|
|
37784
|
-
return Error("Invalid prop trigger: component should be defined.");
|
|
37785
|
-
}
|
|
38376
|
+
const { callback, dataProvider, output } = triggerSetting;
|
|
37786
38377
|
if (!dataProvider || typeof dataProvider !== "function") {
|
|
37787
38378
|
return Error("Invalid prop trigger: dataProvider should be defined.");
|
|
37788
38379
|
}
|
|
@@ -38315,9 +38906,6 @@ See https://github.com/webscopeio/react-textarea-autocomplete#trigger-type for m
|
|
|
38315
38906
|
if (!Array.isArray(data)) {
|
|
38316
38907
|
throw new Error("Trigger provider has to provide an array!");
|
|
38317
38908
|
}
|
|
38318
|
-
if (!(0, import_react_is3.isValidElementType)(component)) {
|
|
38319
|
-
throw new Error("Component should be defined!");
|
|
38320
|
-
}
|
|
38321
38909
|
if (currentTrigger !== this.state.currentTrigger) return;
|
|
38322
38910
|
if (!data.length) {
|
|
38323
38911
|
this._closeAutocomplete();
|
|
@@ -38702,7 +39290,7 @@ ReactTextareaAutocomplete.propTypes = {
|
|
|
38702
39290
|
};
|
|
38703
39291
|
|
|
38704
39292
|
// src/components/Channel/Channel.tsx
|
|
38705
|
-
var
|
|
39293
|
+
var import_react258 = __toESM(require("react"));
|
|
38706
39294
|
var import_lodash23 = __toESM(require("lodash.debounce"));
|
|
38707
39295
|
var import_lodash24 = __toESM(require("lodash.defaultsdeep"));
|
|
38708
39296
|
var import_lodash25 = __toESM(require("lodash.throttle"));
|
|
@@ -38710,7 +39298,7 @@ var import_nanoid11 = require("nanoid");
|
|
|
38710
39298
|
var import_clsx64 = __toESM(require("clsx"));
|
|
38711
39299
|
|
|
38712
39300
|
// src/components/Channel/channelState.ts
|
|
38713
|
-
var
|
|
39301
|
+
var makeChannelReducer = () => (state, action) => {
|
|
38714
39302
|
switch (action.type) {
|
|
38715
39303
|
case "closeThread": {
|
|
38716
39304
|
return {
|
|
@@ -42586,13 +43174,13 @@ var useMessageInputText = (props, state, dispatch, findAndEnqueueURLsToEnrich) =
|
|
|
42586
43174
|
const { channel } = useChannelStateContext("useMessageInputText");
|
|
42587
43175
|
const { additionalTextareaProps, focus, parent, publishTypingEvent = true } = props;
|
|
42588
43176
|
const { text: text5 } = state;
|
|
42589
|
-
const textareaRef = (0, import_react75.useRef)();
|
|
43177
|
+
const textareaRef = (0, import_react75.useRef)(void 0);
|
|
42590
43178
|
(0, import_react75.useEffect)(() => {
|
|
42591
43179
|
if (focus && textareaRef.current) {
|
|
42592
43180
|
textareaRef.current.focus();
|
|
42593
43181
|
}
|
|
42594
43182
|
}, [focus]);
|
|
42595
|
-
const newCursorPosition = (0, import_react75.useRef)();
|
|
43183
|
+
const newCursorPosition = (0, import_react75.useRef)(void 0);
|
|
42596
43184
|
const insertText = (0, import_react75.useCallback)(
|
|
42597
43185
|
(textToInsert) => {
|
|
42598
43186
|
const { maxLength } = additionalTextareaProps || {};
|
|
@@ -44602,7 +45190,7 @@ var usePaginatedChannels = (client, filters, sort, options, activeChannelHandler
|
|
|
44602
45190
|
} = useChatContext("usePaginatedChannels");
|
|
44603
45191
|
const [channels, setChannels] = (0, import_react90.useState)([]);
|
|
44604
45192
|
const [hasNextPage, setHasNextPage] = (0, import_react90.useState)(true);
|
|
44605
|
-
const lastRecoveryTimestamp = (0, import_react90.useRef)();
|
|
45193
|
+
const lastRecoveryTimestamp = (0, import_react90.useRef)(void 0);
|
|
44606
45194
|
const recoveryThrottleInterval = recoveryThrottleIntervalMs < MIN_RECOVER_LOADED_CHANNELS_THROTTLE_INTERVAL_IN_MS ? MIN_RECOVER_LOADED_CHANNELS_THROTTLE_INTERVAL_IN_MS : recoveryThrottleIntervalMs ?? RECOVER_LOADED_CHANNELS_THROTTLE_INTERVAL_IN_MS;
|
|
44607
45195
|
const filterString = (0, import_react90.useMemo)(() => JSON.stringify(filters), [filters]);
|
|
44608
45196
|
const sortString = (0, import_react90.useMemo)(() => JSON.stringify(sort), [sort]);
|
|
@@ -44704,7 +45292,7 @@ var useChannelSearch = ({
|
|
|
44704
45292
|
const [query, setQuery] = (0, import_react91.useState)("");
|
|
44705
45293
|
const [results, setResults] = (0, import_react91.useState)([]);
|
|
44706
45294
|
const [searching, setSearching] = (0, import_react91.useState)(false);
|
|
44707
|
-
const searchQueryPromiseInProgress = (0, import_react91.useRef)();
|
|
45295
|
+
const searchQueryPromiseInProgress = (0, import_react91.useRef)(void 0);
|
|
44708
45296
|
const shouldIgnoreQueryResults = (0, import_react91.useRef)(false);
|
|
44709
45297
|
const inputRef = (0, import_react91.useRef)(null);
|
|
44710
45298
|
const searchBarRef = (0, import_react91.useRef)(null);
|
|
@@ -45731,8 +46319,8 @@ var usePrepareShapeHandlers = ({
|
|
|
45731
46319
|
sort
|
|
45732
46320
|
}) => {
|
|
45733
46321
|
const defaults = useChannelListShapeDefaults();
|
|
45734
|
-
const defaultHandleChannelListShapeRef = (0, import_react101.useRef)();
|
|
45735
|
-
const customHandleChannelListShapeRef = (0, import_react101.useRef)();
|
|
46322
|
+
const defaultHandleChannelListShapeRef = (0, import_react101.useRef)(void 0);
|
|
46323
|
+
const customHandleChannelListShapeRef = (0, import_react101.useRef)(void 0);
|
|
45736
46324
|
customHandleChannelListShapeRef.current = (event) => {
|
|
45737
46325
|
customHandleChannelListShape?.({ defaults, event, setChannels });
|
|
45738
46326
|
};
|
|
@@ -50369,7 +50957,7 @@ var import_react194 = __toESM(require("react"));
|
|
|
50369
50957
|
var import_react193 = require("react");
|
|
50370
50958
|
var useTimeElapsed = ({ startOnMount } = {}) => {
|
|
50371
50959
|
const [secondsElapsed, setSecondsElapsed] = (0, import_react193.useState)(0);
|
|
50372
|
-
const updateInterval = (0, import_react193.useRef)();
|
|
50960
|
+
const updateInterval = (0, import_react193.useRef)(void 0);
|
|
50373
50961
|
const startCounter = (0, import_react193.useCallback)(() => {
|
|
50374
50962
|
if (updateInterval.current) return;
|
|
50375
50963
|
updateInterval.current = setInterval(() => {
|
|
@@ -52594,7 +53182,7 @@ function useMessageListScrollManager(params) {
|
|
|
52594
53182
|
offsetHeight: 0,
|
|
52595
53183
|
scrollHeight: 0
|
|
52596
53184
|
});
|
|
52597
|
-
const messages = (0, import_react230.useRef)();
|
|
53185
|
+
const messages = (0, import_react230.useRef)(void 0);
|
|
52598
53186
|
const scrollTop = (0, import_react230.useRef)(0);
|
|
52599
53187
|
(0, import_react230.useLayoutEffect)(() => {
|
|
52600
53188
|
const prevMeasures = measures.current;
|
|
@@ -52802,25 +53390,26 @@ var useUnreadMessagesNotification = ({
|
|
|
52802
53390
|
|
|
52803
53391
|
// src/components/MessageList/hooks/useMarkRead.ts
|
|
52804
53392
|
var import_react235 = require("react");
|
|
53393
|
+
var hasReadLastMessage = (channel, userId) => {
|
|
53394
|
+
const latestMessageIdInChannel = channel.state.latestMessages.slice(-1)[0]?.id;
|
|
53395
|
+
const lastReadMessageIdServer = channel.state.read[userId]?.last_read_message_id;
|
|
53396
|
+
return latestMessageIdInChannel === lastReadMessageIdServer;
|
|
53397
|
+
};
|
|
52805
53398
|
var useMarkRead = ({
|
|
52806
53399
|
isMessageListScrolledToBottom,
|
|
52807
53400
|
messageListIsThread,
|
|
52808
|
-
unreadCount,
|
|
52809
53401
|
wasMarkedUnread
|
|
52810
53402
|
}) => {
|
|
52811
53403
|
const { client } = useChatContext("useMarkRead");
|
|
52812
53404
|
const { markRead, setChannelUnreadUiState } = useChannelActionContext("useMarkRead");
|
|
52813
53405
|
const { channel } = useChannelStateContext("useMarkRead");
|
|
52814
|
-
const previousRenderMessageListScrolledToBottom = (0, import_react235.useRef)(isMessageListScrolledToBottom);
|
|
52815
53406
|
(0, import_react235.useEffect)(() => {
|
|
52816
|
-
const shouldMarkRead = (
|
|
53407
|
+
const shouldMarkRead = () => !document.hidden && !wasMarkedUnread && !messageListIsThread && isMessageListScrolledToBottom && client.user?.id && !hasReadLastMessage(channel, client.user.id);
|
|
52817
53408
|
const onVisibilityChange = () => {
|
|
52818
|
-
if (shouldMarkRead(
|
|
53409
|
+
if (shouldMarkRead()) markRead();
|
|
52819
53410
|
};
|
|
52820
53411
|
const handleMessageNew = (event) => {
|
|
52821
|
-
const isOwnMessage = event.user?.id && event.user.id === client.user?.id;
|
|
52822
53412
|
const mainChannelUpdated = !event.message?.parent_id || event.message?.show_in_channel;
|
|
52823
|
-
if (isOwnMessage) return;
|
|
52824
53413
|
if (!isMessageListScrolledToBottom || wasMarkedUnread || document.hidden) {
|
|
52825
53414
|
setChannelUnreadUiState((prev) => {
|
|
52826
53415
|
const previousUnreadCount = prev?.unread_messages ?? 0;
|
|
@@ -52835,15 +53424,15 @@ var useMarkRead = ({
|
|
|
52835
53424
|
unread_messages: previousUnreadCount + 1
|
|
52836
53425
|
};
|
|
52837
53426
|
});
|
|
52838
|
-
} else if (mainChannelUpdated && shouldMarkRead(
|
|
53427
|
+
} else if (mainChannelUpdated && shouldMarkRead()) {
|
|
52839
53428
|
markRead();
|
|
52840
53429
|
}
|
|
52841
53430
|
};
|
|
52842
53431
|
channel.on("message.new", handleMessageNew);
|
|
52843
53432
|
document.addEventListener("visibilitychange", onVisibilityChange);
|
|
52844
|
-
|
|
52845
|
-
|
|
52846
|
-
|
|
53433
|
+
if (shouldMarkRead()) {
|
|
53434
|
+
markRead();
|
|
53435
|
+
}
|
|
52847
53436
|
return () => {
|
|
52848
53437
|
channel.off("message.new", handleMessageNew);
|
|
52849
53438
|
document.removeEventListener("visibilitychange", onVisibilityChange);
|
|
@@ -52855,7 +53444,6 @@ var useMarkRead = ({
|
|
|
52855
53444
|
markRead,
|
|
52856
53445
|
messageListIsThread,
|
|
52857
53446
|
setChannelUnreadUiState,
|
|
52858
|
-
unreadCount,
|
|
52859
53447
|
wasMarkedUnread
|
|
52860
53448
|
]);
|
|
52861
53449
|
};
|
|
@@ -52999,10 +53587,10 @@ var InfiniteScroll = (props) => {
|
|
|
52999
53587
|
const loadPreviousPageFn = loadPreviousPage || loadMore;
|
|
53000
53588
|
const hasNextPageFlag = hasNextPage || hasMoreNewer;
|
|
53001
53589
|
const hasPreviousPageFlag = hasPreviousPage || hasMore;
|
|
53002
|
-
const scrollComponent = (0, import_react240.useRef)();
|
|
53003
|
-
const previousOffset = (0, import_react240.useRef)();
|
|
53004
|
-
const previousReverseOffset = (0, import_react240.useRef)();
|
|
53005
|
-
const scrollListenerRef = (0, import_react240.useRef)();
|
|
53590
|
+
const scrollComponent = (0, import_react240.useRef)(void 0);
|
|
53591
|
+
const previousOffset = (0, import_react240.useRef)(void 0);
|
|
53592
|
+
const previousReverseOffset = (0, import_react240.useRef)(void 0);
|
|
53593
|
+
const scrollListenerRef = (0, import_react240.useRef)(void 0);
|
|
53006
53594
|
scrollListenerRef.current = () => {
|
|
53007
53595
|
const element3 = scrollComponent.current;
|
|
53008
53596
|
if (!element3 || element3.offsetParent === null) {
|
|
@@ -53408,7 +53996,6 @@ var MessageListWithContext = (props) => {
|
|
|
53408
53996
|
useMarkRead({
|
|
53409
53997
|
isMessageListScrolledToBottom,
|
|
53410
53998
|
messageListIsThread: threadList,
|
|
53411
|
-
unreadCount: channelUnreadUiState?.unread_messages ?? 0,
|
|
53412
53999
|
wasMarkedUnread: !!channelUnreadUiState?.first_unread_message_id
|
|
53413
54000
|
});
|
|
53414
54001
|
const { messageGroupStyles, messages: enrichedMessages } = useEnrichedMessages({
|
|
@@ -53626,7 +54213,7 @@ var ScrollToBottomButton = import_react247.default.memo(
|
|
|
53626
54213
|
);
|
|
53627
54214
|
|
|
53628
54215
|
// src/components/MessageList/VirtualizedMessageList.tsx
|
|
53629
|
-
var
|
|
54216
|
+
var import_react257 = __toESM(require("react"));
|
|
53630
54217
|
var import_react_virtuoso2 = require("react-virtuoso");
|
|
53631
54218
|
|
|
53632
54219
|
// src/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.ts
|
|
@@ -53670,8 +54257,10 @@ var STATUSES_EXCLUDED_FROM_PREPEND = {
|
|
|
53670
54257
|
};
|
|
53671
54258
|
function usePrependedMessagesCount(messages, hasDateSeparator) {
|
|
53672
54259
|
const firstRealMessageIndex = hasDateSeparator ? 1 : 0;
|
|
53673
|
-
const firstMessageOnFirstLoadedPage = (0, import_react249.useRef)();
|
|
53674
|
-
const previousFirstMessageOnFirstLoadedPage = (0, import_react249.useRef)(
|
|
54260
|
+
const firstMessageOnFirstLoadedPage = (0, import_react249.useRef)(void 0);
|
|
54261
|
+
const previousFirstMessageOnFirstLoadedPage = (0, import_react249.useRef)(
|
|
54262
|
+
void 0
|
|
54263
|
+
);
|
|
53675
54264
|
const previousNumItemsPrepended = (0, import_react249.useRef)(0);
|
|
53676
54265
|
const numItemsPrepended = (0, import_react249.useMemo)(() => {
|
|
53677
54266
|
if (!messages || !messages.length) {
|
|
@@ -53753,7 +54342,7 @@ var useMessageSetKey = ({
|
|
|
53753
54342
|
messages
|
|
53754
54343
|
}) => {
|
|
53755
54344
|
const [messageSetKey, setMessageSetKey] = (0, import_react252.useState)(+/* @__PURE__ */ new Date());
|
|
53756
|
-
const firstMessageId = (0, import_react252.useRef)();
|
|
54345
|
+
const firstMessageId = (0, import_react252.useRef)(void 0);
|
|
53757
54346
|
(0, import_react252.useEffect)(() => {
|
|
53758
54347
|
const continuousSet = messages?.find((message) => message.id === firstMessageId.current);
|
|
53759
54348
|
if (!continuousSet) {
|
|
@@ -53774,7 +54363,7 @@ var useScrollToBottomOnNewMessage = ({
|
|
|
53774
54363
|
scrollToLatestMessageOnFocus
|
|
53775
54364
|
}) => {
|
|
53776
54365
|
const [newMessagesReceivedInBackground, setNewMessagesReceivedInBackground] = (0, import_react253.useState)(false);
|
|
53777
|
-
const scrollToBottomIfConfigured = (0, import_react253.useRef)();
|
|
54366
|
+
const scrollToBottomIfConfigured = (0, import_react253.useRef)(void 0);
|
|
53778
54367
|
scrollToBottomIfConfigured.current = (event) => {
|
|
53779
54368
|
if (!scrollToLatestMessageOnFocus || !newMessagesReceivedInBackground || event.target !== window) {
|
|
53780
54369
|
return;
|
|
@@ -53964,6 +54553,14 @@ var messageRenderer = (virtuosoIndex, _data, virtuosoContext) => {
|
|
|
53964
54553
|
));
|
|
53965
54554
|
};
|
|
53966
54555
|
|
|
54556
|
+
// src/context/VirtualizedMessageListContext.tsx
|
|
54557
|
+
var import_react256 = __toESM(require("react"));
|
|
54558
|
+
var VirtualizedMessageListContext = (0, import_react256.createContext)(void 0);
|
|
54559
|
+
var VirtualizedMessageListContextProvider = ({
|
|
54560
|
+
children,
|
|
54561
|
+
value
|
|
54562
|
+
}) => /* @__PURE__ */ import_react256.default.createElement(VirtualizedMessageListContext.Provider, { value }, children);
|
|
54563
|
+
|
|
53967
54564
|
// src/components/MessageList/VirtualizedMessageList.tsx
|
|
53968
54565
|
function captureResizeObserverExceededError(e2) {
|
|
53969
54566
|
if (e2.message === "ResizeObserver loop completed with undelivered notifications." || e2.message === "ResizeObserver loop limit exceeded") {
|
|
@@ -53971,7 +54568,7 @@ function captureResizeObserverExceededError(e2) {
|
|
|
53971
54568
|
}
|
|
53972
54569
|
}
|
|
53973
54570
|
function useCaptureResizeObserverExceededError() {
|
|
53974
|
-
(0,
|
|
54571
|
+
(0, import_react257.useEffect)(() => {
|
|
53975
54572
|
window.addEventListener("error", captureResizeObserverExceededError);
|
|
53976
54573
|
return () => {
|
|
53977
54574
|
window.removeEventListener("error", captureResizeObserverExceededError);
|
|
@@ -54058,8 +54655,8 @@ var VirtualizedMessageListWithContext = (props) => {
|
|
|
54058
54655
|
} = useComponentContext("VirtualizedMessageList");
|
|
54059
54656
|
const MessageUIComponent = MessageUIComponentFromProps || MessageUIComponentFromContext;
|
|
54060
54657
|
const { client, customClasses } = useChatContext("VirtualizedMessageList");
|
|
54061
|
-
const virtuoso = (0,
|
|
54062
|
-
const lastRead = (0,
|
|
54658
|
+
const virtuoso = (0, import_react257.useRef)(null);
|
|
54659
|
+
const lastRead = (0, import_react257.useMemo)(() => channel.lastRead?.(), [channel]);
|
|
54063
54660
|
const {
|
|
54064
54661
|
show: showUnreadMessagesNotification,
|
|
54065
54662
|
toggleShowUnreadMessagesNotification
|
|
@@ -54071,7 +54668,7 @@ var VirtualizedMessageListWithContext = (props) => {
|
|
|
54071
54668
|
const { giphyPreviewMessage, setGiphyPreviewMessage } = useGiphyPreview(
|
|
54072
54669
|
separateGiphyPreview
|
|
54073
54670
|
);
|
|
54074
|
-
const processedMessages = (0,
|
|
54671
|
+
const processedMessages = (0, import_react257.useMemo)(() => {
|
|
54075
54672
|
if (typeof messages === "undefined") {
|
|
54076
54673
|
return [];
|
|
54077
54674
|
}
|
|
@@ -54103,11 +54700,11 @@ var VirtualizedMessageListWithContext = (props) => {
|
|
|
54103
54700
|
returnAllReadData,
|
|
54104
54701
|
userID: client.userID
|
|
54105
54702
|
});
|
|
54106
|
-
const lastReceivedMessageId = (0,
|
|
54703
|
+
const lastReceivedMessageId = (0, import_react257.useMemo)(() => getLastReceived(processedMessages), [
|
|
54107
54704
|
processedMessages
|
|
54108
54705
|
]);
|
|
54109
54706
|
const groupStylesFn = groupStyles || getGroupStyles;
|
|
54110
|
-
const messageGroupStyles = (0,
|
|
54707
|
+
const messageGroupStyles = (0, import_react257.useMemo)(
|
|
54111
54708
|
() => processedMessages.reduce((acc, message, i) => {
|
|
54112
54709
|
const style = groupStylesFn(
|
|
54113
54710
|
message,
|
|
@@ -54133,10 +54730,9 @@ var VirtualizedMessageListWithContext = (props) => {
|
|
|
54133
54730
|
useMarkRead({
|
|
54134
54731
|
isMessageListScrolledToBottom,
|
|
54135
54732
|
messageListIsThread: !!threadList,
|
|
54136
|
-
unreadCount: channelUnreadUiState?.unread_messages ?? 0,
|
|
54137
54733
|
wasMarkedUnread: !!channelUnreadUiState?.first_unread_message_id
|
|
54138
54734
|
});
|
|
54139
|
-
const scrollToBottom = (0,
|
|
54735
|
+
const scrollToBottom = (0, import_react257.useCallback)(async () => {
|
|
54140
54736
|
if (hasMoreNewer) {
|
|
54141
54737
|
await jumpToLatestMessage();
|
|
54142
54738
|
return;
|
|
@@ -54158,7 +54754,7 @@ var VirtualizedMessageListWithContext = (props) => {
|
|
|
54158
54754
|
const numItemsPrepended = usePrependedMessagesCount(processedMessages, !disableDateSeparator);
|
|
54159
54755
|
const { messageSetKey } = useMessageSetKey({ messages });
|
|
54160
54756
|
const shouldForceScrollToBottom = useShouldForceScrollToBottom(processedMessages, client.userID);
|
|
54161
|
-
const handleItemsRendered = (0,
|
|
54757
|
+
const handleItemsRendered = (0, import_react257.useMemo)(
|
|
54162
54758
|
() => makeItemsRenderedHandler([toggleShowUnreadMessagesNotification], processedMessages),
|
|
54163
54759
|
[processedMessages, toggleShowUnreadMessagesNotification]
|
|
54164
54760
|
);
|
|
@@ -54171,7 +54767,7 @@ var VirtualizedMessageListWithContext = (props) => {
|
|
|
54171
54767
|
}
|
|
54172
54768
|
return isAtBottom ? stickToBottomScrollBehavior : false;
|
|
54173
54769
|
};
|
|
54174
|
-
const computeItemKey2 = (0,
|
|
54770
|
+
const computeItemKey2 = (0, import_react257.useCallback)(
|
|
54175
54771
|
(index3, _, { numItemsPrepended: numItemsPrepended2, processedMessages: processedMessages2 }) => processedMessages2[calculateItemIndex(index3, numItemsPrepended2)].id,
|
|
54176
54772
|
[]
|
|
54177
54773
|
);
|
|
@@ -54188,7 +54784,7 @@ var VirtualizedMessageListWithContext = (props) => {
|
|
|
54188
54784
|
loadMore?.(messageLimit);
|
|
54189
54785
|
}
|
|
54190
54786
|
};
|
|
54191
|
-
(0,
|
|
54787
|
+
(0, import_react257.useEffect)(() => {
|
|
54192
54788
|
let scrollTimeout;
|
|
54193
54789
|
if (highlightedMessageId) {
|
|
54194
54790
|
const index3 = findMessageIndex(processedMessages, highlightedMessageId);
|
|
@@ -54204,7 +54800,7 @@ var VirtualizedMessageListWithContext = (props) => {
|
|
|
54204
54800
|
}, [highlightedMessageId, processedMessages]);
|
|
54205
54801
|
if (!processedMessages) return null;
|
|
54206
54802
|
const dialogManagerId = threadList ? "virtualized-message-list-dialog-manager-thread" : "virtualized-message-list-dialog-manager";
|
|
54207
|
-
return /* @__PURE__ */
|
|
54803
|
+
return /* @__PURE__ */ import_react257.default.createElement(VirtualizedMessageListContextProvider, { value: { scrollToBottom } }, /* @__PURE__ */ import_react257.default.createElement(MessageListMainPanel2, null, /* @__PURE__ */ import_react257.default.createElement(DialogManagerProvider, { id: dialogManagerId }, !threadList && showUnreadMessagesNotification && /* @__PURE__ */ import_react257.default.createElement(UnreadMessagesNotification2, { unreadCount: channelUnreadUiState?.unread_messages }), /* @__PURE__ */ import_react257.default.createElement("div", { className: customClasses?.virtualizedMessageList || "str-chat__virtual-list" }, /* @__PURE__ */ import_react257.default.createElement(
|
|
54208
54804
|
import_react_virtuoso2.Virtuoso,
|
|
54209
54805
|
{
|
|
54210
54806
|
atBottomStateChange,
|
|
@@ -54269,7 +54865,7 @@ var VirtualizedMessageListWithContext = (props) => {
|
|
|
54269
54865
|
...scrollSeekPlaceHolder ? { scrollSeek: scrollSeekPlaceHolder } : {},
|
|
54270
54866
|
...defaultItemHeight ? { defaultItemHeight } : {}
|
|
54271
54867
|
}
|
|
54272
|
-
))), TypingIndicator2 && /* @__PURE__ */
|
|
54868
|
+
))), TypingIndicator2 && /* @__PURE__ */ import_react257.default.createElement(TypingIndicator2, null)), /* @__PURE__ */ import_react257.default.createElement(
|
|
54273
54869
|
MessageListNotifications2,
|
|
54274
54870
|
{
|
|
54275
54871
|
hasNewMessages: newMessagesNotification,
|
|
@@ -54281,7 +54877,7 @@ var VirtualizedMessageListWithContext = (props) => {
|
|
|
54281
54877
|
threadList,
|
|
54282
54878
|
unreadCount: threadList ? void 0 : channelUnreadUiState?.unread_messages
|
|
54283
54879
|
}
|
|
54284
|
-
), giphyPreviewMessage && /* @__PURE__ */
|
|
54880
|
+
), giphyPreviewMessage && /* @__PURE__ */ import_react257.default.createElement(GiphyPreviewMessage2, { message: giphyPreviewMessage }));
|
|
54285
54881
|
};
|
|
54286
54882
|
function VirtualizedMessageList(props) {
|
|
54287
54883
|
const {
|
|
@@ -54303,7 +54899,7 @@ function VirtualizedMessageList(props) {
|
|
|
54303
54899
|
suppressAutoscroll
|
|
54304
54900
|
} = useChannelStateContext("VirtualizedMessageList");
|
|
54305
54901
|
const messages = props.messages || contextMessages;
|
|
54306
|
-
return /* @__PURE__ */
|
|
54902
|
+
return /* @__PURE__ */ import_react257.default.createElement(
|
|
54307
54903
|
VirtualizedMessageListWithContext,
|
|
54308
54904
|
{
|
|
54309
54905
|
channel,
|
|
@@ -54494,7 +55090,7 @@ var ChannelContainer = ({
|
|
|
54494
55090
|
customClasses
|
|
54495
55091
|
});
|
|
54496
55092
|
const className = (0, import_clsx64.default)(chatClass, theme, channelClass, additionalClassName);
|
|
54497
|
-
return /* @__PURE__ */
|
|
55093
|
+
return /* @__PURE__ */ import_react258.default.createElement("div", { id: CHANNEL_CONTAINER_ID, ...props, className }, children);
|
|
54498
55094
|
};
|
|
54499
55095
|
var UnMemoizedChannel = (props) => {
|
|
54500
55096
|
const {
|
|
@@ -54508,15 +55104,15 @@ var UnMemoizedChannel = (props) => {
|
|
|
54508
55104
|
);
|
|
54509
55105
|
const channel = propsChannel || contextChannel;
|
|
54510
55106
|
if (channelsQueryState.queryInProgress === "reload" && LoadingIndicator2) {
|
|
54511
|
-
return /* @__PURE__ */
|
|
55107
|
+
return /* @__PURE__ */ import_react258.default.createElement(ChannelContainer, null, /* @__PURE__ */ import_react258.default.createElement(LoadingIndicator2, null));
|
|
54512
55108
|
}
|
|
54513
55109
|
if (channelsQueryState.error && LoadingErrorIndicator2) {
|
|
54514
|
-
return /* @__PURE__ */
|
|
55110
|
+
return /* @__PURE__ */ import_react258.default.createElement(ChannelContainer, null, /* @__PURE__ */ import_react258.default.createElement(LoadingErrorIndicator2, { error: channelsQueryState.error }));
|
|
54515
55111
|
}
|
|
54516
55112
|
if (!channel?.cid) {
|
|
54517
|
-
return /* @__PURE__ */
|
|
55113
|
+
return /* @__PURE__ */ import_react258.default.createElement(ChannelContainer, null, EmptyPlaceholder2);
|
|
54518
55114
|
}
|
|
54519
|
-
return /* @__PURE__ */
|
|
55115
|
+
return /* @__PURE__ */ import_react258.default.createElement(ChannelInner, { ...props, channel, key: channel.cid });
|
|
54520
55116
|
};
|
|
54521
55117
|
var ChannelInner = (props) => {
|
|
54522
55118
|
const {
|
|
@@ -54542,7 +55138,7 @@ var ChannelInner = (props) => {
|
|
|
54542
55138
|
optionalMessageInputProps = {},
|
|
54543
55139
|
skipMessageDataMemoization
|
|
54544
55140
|
} = props;
|
|
54545
|
-
const channelQueryOptions = (0,
|
|
55141
|
+
const channelQueryOptions = (0, import_react258.useMemo)(
|
|
54546
55142
|
() => (0, import_lodash24.default)(propChannelQueryOptions, {
|
|
54547
55143
|
messages: { limit: DEFAULT_INITIAL_CHANNEL_PAGE_SIZE }
|
|
54548
55144
|
}),
|
|
@@ -54558,12 +55154,13 @@ var ChannelInner = (props) => {
|
|
|
54558
55154
|
const chatContainerClass = getChatContainerClass(customClasses?.chatContainer);
|
|
54559
55155
|
const windowsEmojiClass = useImageFlagEmojisOnWindowsClass();
|
|
54560
55156
|
const thread = useThreadContext();
|
|
54561
|
-
const [channelConfig, setChannelConfig] = (0,
|
|
54562
|
-
const [notifications, setNotifications] = (0,
|
|
54563
|
-
const [quotedMessage, setQuotedMessage] = (0,
|
|
54564
|
-
const [channelUnreadUiState, _setChannelUnreadUiState] = (0,
|
|
54565
|
-
const notificationTimeouts = (0,
|
|
54566
|
-
const
|
|
55157
|
+
const [channelConfig, setChannelConfig] = (0, import_react258.useState)(channel.getConfig());
|
|
55158
|
+
const [notifications, setNotifications] = (0, import_react258.useState)([]);
|
|
55159
|
+
const [quotedMessage, setQuotedMessage] = (0, import_react258.useState)();
|
|
55160
|
+
const [channelUnreadUiState, _setChannelUnreadUiState] = (0, import_react258.useState)();
|
|
55161
|
+
const notificationTimeouts = (0, import_react258.useRef)([]);
|
|
55162
|
+
const channelReducer = (0, import_react258.useMemo)(() => makeChannelReducer(), []);
|
|
55163
|
+
const [state, dispatch] = (0, import_react258.useReducer)(
|
|
54567
55164
|
channelReducer,
|
|
54568
55165
|
// channel.initialized === false if client.channel().query() was not called, e.g. ChannelList is not used
|
|
54569
55166
|
// => Channel will call channel.watch() in useLayoutEffect => state.loading is used to signal the watch() call state
|
|
@@ -54574,9 +55171,9 @@ var ChannelInner = (props) => {
|
|
|
54574
55171
|
}
|
|
54575
55172
|
);
|
|
54576
55173
|
const isMounted = useIsMounted();
|
|
54577
|
-
const originalTitle = (0,
|
|
54578
|
-
const lastRead = (0,
|
|
54579
|
-
const online = (0,
|
|
55174
|
+
const originalTitle = (0, import_react258.useRef)("");
|
|
55175
|
+
const lastRead = (0, import_react258.useRef)(void 0);
|
|
55176
|
+
const online = (0, import_react258.useRef)(true);
|
|
54580
55177
|
const channelCapabilitiesArray = channel.data?.own_capabilities;
|
|
54581
55178
|
const throttledCopyStateFromChannel = (0, import_lodash25.default)(
|
|
54582
55179
|
() => dispatch({ channel, type: "copyStateFromChannelOnEvent" }),
|
|
@@ -54586,14 +55183,14 @@ var ChannelInner = (props) => {
|
|
|
54586
55183
|
trailing: true
|
|
54587
55184
|
}
|
|
54588
55185
|
);
|
|
54589
|
-
const setChannelUnreadUiState = (0,
|
|
55186
|
+
const setChannelUnreadUiState = (0, import_react258.useMemo)(
|
|
54590
55187
|
() => (0, import_lodash25.default)(_setChannelUnreadUiState, 200, {
|
|
54591
55188
|
leading: true,
|
|
54592
55189
|
trailing: false
|
|
54593
55190
|
}),
|
|
54594
55191
|
[]
|
|
54595
55192
|
);
|
|
54596
|
-
const markRead = (0,
|
|
55193
|
+
const markRead = (0, import_react258.useMemo)(
|
|
54597
55194
|
() => (0, import_lodash25.default)(
|
|
54598
55195
|
async (options) => {
|
|
54599
55196
|
const { updateChannelUiUnreadState = true } = options ?? {};
|
|
@@ -54688,7 +55285,7 @@ var ChannelInner = (props) => {
|
|
|
54688
55285
|
}
|
|
54689
55286
|
throttledCopyStateFromChannel();
|
|
54690
55287
|
};
|
|
54691
|
-
(0,
|
|
55288
|
+
(0, import_react258.useLayoutEffect)(() => {
|
|
54692
55289
|
let errored = false;
|
|
54693
55290
|
let done = false;
|
|
54694
55291
|
(async () => {
|
|
@@ -54754,16 +55351,16 @@ var ChannelInner = (props) => {
|
|
|
54754
55351
|
channelConfig?.read_events,
|
|
54755
55352
|
initializeOnMount
|
|
54756
55353
|
]);
|
|
54757
|
-
(0,
|
|
55354
|
+
(0, import_react258.useEffect)(() => {
|
|
54758
55355
|
if (!state.thread) return;
|
|
54759
55356
|
const message = state.messages?.find((m) => m.id === state.thread?.id);
|
|
54760
55357
|
if (message) dispatch({ message, type: "setThread" });
|
|
54761
55358
|
}, [state.messages, state.thread]);
|
|
54762
|
-
const addNotification = (0,
|
|
55359
|
+
const addNotification = (0, import_react258.useMemo)(
|
|
54763
55360
|
() => makeAddNotifications(setNotifications, notificationTimeouts.current),
|
|
54764
55361
|
[]
|
|
54765
55362
|
);
|
|
54766
|
-
const loadMoreFinished = (0,
|
|
55363
|
+
const loadMoreFinished = (0, import_react258.useCallback)(
|
|
54767
55364
|
(0, import_lodash23.default)(
|
|
54768
55365
|
(hasMore, messages) => {
|
|
54769
55366
|
if (!isMounted.current) return;
|
|
@@ -54824,8 +55421,8 @@ var ChannelInner = (props) => {
|
|
|
54824
55421
|
});
|
|
54825
55422
|
return queryResponse.messages.length;
|
|
54826
55423
|
};
|
|
54827
|
-
const clearHighlightedMessageTimeoutId = (0,
|
|
54828
|
-
const jumpToMessage = (0,
|
|
55424
|
+
const clearHighlightedMessageTimeoutId = (0, import_react258.useRef)(null);
|
|
55425
|
+
const jumpToMessage = (0, import_react258.useCallback)(
|
|
54829
55426
|
async (messageId, messageLimit = DEFAULT_JUMP_TO_PAGE_SIZE, highlightDuration = DEFAULT_HIGHLIGHT_DURATION) => {
|
|
54830
55427
|
dispatch({ loadingMore: true, type: "setLoadingMore" });
|
|
54831
55428
|
await channel.state.loadMessageIntoState(messageId, void 0, messageLimit);
|
|
@@ -54845,14 +55442,14 @@ var ChannelInner = (props) => {
|
|
|
54845
55442
|
},
|
|
54846
55443
|
[channel, loadMoreFinished]
|
|
54847
55444
|
);
|
|
54848
|
-
const jumpToLatestMessage = (0,
|
|
55445
|
+
const jumpToLatestMessage = (0, import_react258.useCallback)(async () => {
|
|
54849
55446
|
await channel.state.loadMessageIntoState("latest");
|
|
54850
55447
|
loadMoreFinished(channel.state.messagePagination.hasPrev, channel.state.messages);
|
|
54851
55448
|
dispatch({
|
|
54852
55449
|
type: "jumpToLatestMessage"
|
|
54853
55450
|
});
|
|
54854
55451
|
}, [channel, loadMoreFinished]);
|
|
54855
|
-
const jumpToFirstUnreadMessage = (0,
|
|
55452
|
+
const jumpToFirstUnreadMessage = (0, import_react258.useCallback)(
|
|
54856
55453
|
async (queryMessageLimit = DEFAULT_JUMP_TO_PAGE_SIZE, highlightDuration = DEFAULT_HIGHLIGHT_DURATION) => {
|
|
54857
55454
|
if (!channelUnreadUiState?.unread_messages) return;
|
|
54858
55455
|
let lastReadMessageId = channelUnreadUiState?.last_read_message_id;
|
|
@@ -54957,7 +55554,7 @@ var ChannelInner = (props) => {
|
|
|
54957
55554
|
},
|
|
54958
55555
|
[addNotification, channel, loadMoreFinished, t2, channelUnreadUiState]
|
|
54959
55556
|
);
|
|
54960
|
-
const deleteMessage = (0,
|
|
55557
|
+
const deleteMessage = (0, import_react258.useCallback)(
|
|
54961
55558
|
async (message) => {
|
|
54962
55559
|
if (!message?.id) {
|
|
54963
55560
|
throw new Error("Cannot delete a message - missing message ID.");
|
|
@@ -55106,7 +55703,7 @@ var ChannelInner = (props) => {
|
|
|
55106
55703
|
event?.preventDefault();
|
|
55107
55704
|
dispatch({ type: "closeThread" });
|
|
55108
55705
|
};
|
|
55109
|
-
const loadMoreThreadFinished = (0,
|
|
55706
|
+
const loadMoreThreadFinished = (0, import_react258.useCallback)(
|
|
55110
55707
|
(0, import_lodash23.default)(
|
|
55111
55708
|
(threadHasMore, threadMessages) => {
|
|
55112
55709
|
dispatch({
|
|
@@ -55167,7 +55764,7 @@ var ChannelInner = (props) => {
|
|
|
55167
55764
|
videoAttachmentSizeHandler: props.videoAttachmentSizeHandler || getVideoAttachmentConfiguration,
|
|
55168
55765
|
watcher_count: state.watcherCount
|
|
55169
55766
|
});
|
|
55170
|
-
const channelActionContextValue = (0,
|
|
55767
|
+
const channelActionContextValue = (0, import_react258.useMemo)(
|
|
55171
55768
|
() => ({
|
|
55172
55769
|
addNotification,
|
|
55173
55770
|
closeThread,
|
|
@@ -55208,7 +55805,7 @@ var ChannelInner = (props) => {
|
|
|
55208
55805
|
setChannelUnreadUiState
|
|
55209
55806
|
]
|
|
55210
55807
|
);
|
|
55211
|
-
const componentContextValue = (0,
|
|
55808
|
+
const componentContextValue = (0, import_react258.useMemo)(
|
|
55212
55809
|
() => ({
|
|
55213
55810
|
Attachment: props.Attachment,
|
|
55214
55811
|
AttachmentPreviewList: props.AttachmentPreviewList,
|
|
@@ -55336,26 +55933,26 @@ var ChannelInner = (props) => {
|
|
|
55336
55933
|
typing
|
|
55337
55934
|
});
|
|
55338
55935
|
if (state.error) {
|
|
55339
|
-
return /* @__PURE__ */
|
|
55936
|
+
return /* @__PURE__ */ import_react258.default.createElement(ChannelContainer, null, /* @__PURE__ */ import_react258.default.createElement(LoadingErrorIndicator2, { error: state.error }));
|
|
55340
55937
|
}
|
|
55341
55938
|
if (state.loading) {
|
|
55342
|
-
return /* @__PURE__ */
|
|
55939
|
+
return /* @__PURE__ */ import_react258.default.createElement(ChannelContainer, null, /* @__PURE__ */ import_react258.default.createElement(LoadingIndicator2, null));
|
|
55343
55940
|
}
|
|
55344
55941
|
if (!channel.watch) {
|
|
55345
|
-
return /* @__PURE__ */
|
|
55942
|
+
return /* @__PURE__ */ import_react258.default.createElement(ChannelContainer, null, /* @__PURE__ */ import_react258.default.createElement("div", null, t2("Channel Missing")));
|
|
55346
55943
|
}
|
|
55347
|
-
return /* @__PURE__ */
|
|
55944
|
+
return /* @__PURE__ */ import_react258.default.createElement(ChannelContainer, { className: windowsEmojiClass }, /* @__PURE__ */ import_react258.default.createElement(ChannelStateProvider, { value: channelStateContextValue }, /* @__PURE__ */ import_react258.default.createElement(ChannelActionProvider, { value: channelActionContextValue }, /* @__PURE__ */ import_react258.default.createElement(WithComponents, { overrides: componentContextValue }, /* @__PURE__ */ import_react258.default.createElement(TypingProvider, { value: typingContextValue }, /* @__PURE__ */ import_react258.default.createElement("div", { className: `${chatContainerClass}` }, dragAndDropWindow && /* @__PURE__ */ import_react258.default.createElement(DropzoneProvider, { ...optionalMessageInputProps }, children), !dragAndDropWindow && /* @__PURE__ */ import_react258.default.createElement(import_react258.default.Fragment, null, children)))))));
|
|
55348
55945
|
};
|
|
55349
|
-
var Channel =
|
|
55946
|
+
var Channel = import_react258.default.memo(UnMemoizedChannel);
|
|
55350
55947
|
|
|
55351
55948
|
// src/components/ChannelHeader/ChannelHeader.tsx
|
|
55352
|
-
var
|
|
55949
|
+
var import_react260 = __toESM(require("react"));
|
|
55353
55950
|
|
|
55354
55951
|
// src/components/ChannelHeader/icons.tsx
|
|
55355
|
-
var
|
|
55952
|
+
var import_react259 = __toESM(require("react"));
|
|
55356
55953
|
var MenuIcon2 = ({ title }) => {
|
|
55357
55954
|
const { t: t2 } = useTranslationContext("MenuIcon");
|
|
55358
|
-
return /* @__PURE__ */
|
|
55955
|
+
return /* @__PURE__ */ import_react259.default.createElement("svg", { "data-testid": "menu-icon", viewBox: "0 0 448 512", xmlns: "http://www.w3.org/2000/svg" }, /* @__PURE__ */ import_react259.default.createElement("title", null, title ?? t2("Menu")), /* @__PURE__ */ import_react259.default.createElement(
|
|
55359
55956
|
"path",
|
|
55360
55957
|
{
|
|
55361
55958
|
d: "M0 88C0 74.75 10.75 64 24 64H424C437.3 64 448 74.75 448 88C448 101.3 437.3 112 424 112H24C10.75 112 0 101.3 0 88zM0 248C0 234.7 10.75 224 24 224H424C437.3 224 448 234.7 448 248C448 261.3 437.3 272 424 272H24C10.75 272 0 261.3 0 248zM424 432H24C10.75 432 0 421.3 0 408C0 394.7 10.75 384 24 384H424C437.3 384 448 394.7 448 408C448 421.3 437.3 432 424 432z",
|
|
@@ -55382,15 +55979,15 @@ var ChannelHeader = (props) => {
|
|
|
55382
55979
|
overrideTitle
|
|
55383
55980
|
});
|
|
55384
55981
|
const { member_count, subtitle } = channel?.data || {};
|
|
55385
|
-
return /* @__PURE__ */
|
|
55982
|
+
return /* @__PURE__ */ import_react260.default.createElement("div", { className: "str-chat__channel-header" }, /* @__PURE__ */ import_react260.default.createElement(
|
|
55386
55983
|
"button",
|
|
55387
55984
|
{
|
|
55388
55985
|
"aria-label": t2("aria/Menu"),
|
|
55389
55986
|
className: "str-chat__header-hamburger",
|
|
55390
55987
|
onClick: openMobileNav
|
|
55391
55988
|
},
|
|
55392
|
-
/* @__PURE__ */
|
|
55393
|
-
), /* @__PURE__ */
|
|
55989
|
+
/* @__PURE__ */ import_react260.default.createElement(MenuIcon3, null)
|
|
55990
|
+
), /* @__PURE__ */ import_react260.default.createElement(
|
|
55394
55991
|
Avatar2,
|
|
55395
55992
|
{
|
|
55396
55993
|
className: "str-chat__avatar--channel-header",
|
|
@@ -55398,35 +55995,35 @@ var ChannelHeader = (props) => {
|
|
|
55398
55995
|
image: displayImage,
|
|
55399
55996
|
name: displayTitle
|
|
55400
55997
|
}
|
|
55401
|
-
), /* @__PURE__ */
|
|
55998
|
+
), /* @__PURE__ */ import_react260.default.createElement("div", { className: "str-chat__channel-header-end" }, /* @__PURE__ */ import_react260.default.createElement("p", { className: "str-chat__channel-header-title" }, displayTitle, " ", live && /* @__PURE__ */ import_react260.default.createElement("span", { className: "str-chat__header-livestream-livelabel" }, t2("live"))), subtitle && /* @__PURE__ */ import_react260.default.createElement("p", { className: "str-chat__channel-header-subtitle" }, subtitle), /* @__PURE__ */ import_react260.default.createElement("p", { className: "str-chat__channel-header-info" }, !live && !!member_count && member_count > 0 && /* @__PURE__ */ import_react260.default.createElement(import_react260.default.Fragment, null, t2("{{ memberCount }} members", {
|
|
55402
55999
|
memberCount: member_count
|
|
55403
56000
|
}), ",", " "), t2("{{ watcherCount }} online", { watcherCount: watcher_count }))));
|
|
55404
56001
|
};
|
|
55405
56002
|
|
|
55406
56003
|
// src/components/Chat/Chat.tsx
|
|
55407
|
-
var
|
|
56004
|
+
var import_react264 = __toESM(require("react"));
|
|
55408
56005
|
|
|
55409
56006
|
// src/components/Chat/hooks/useChat.ts
|
|
55410
|
-
var
|
|
56007
|
+
var import_react261 = require("react");
|
|
55411
56008
|
var useChat = ({
|
|
55412
56009
|
client,
|
|
55413
56010
|
defaultLanguage = "en",
|
|
55414
56011
|
i18nInstance,
|
|
55415
56012
|
initialNavOpen
|
|
55416
56013
|
}) => {
|
|
55417
|
-
const [translators, setTranslators] = (0,
|
|
56014
|
+
const [translators, setTranslators] = (0, import_react261.useState)({
|
|
55418
56015
|
t: (key) => key,
|
|
55419
56016
|
tDateTimeParser: defaultDateTimeParser,
|
|
55420
56017
|
userLanguage: "en"
|
|
55421
56018
|
});
|
|
55422
|
-
const [channel, setChannel] = (0,
|
|
55423
|
-
const [mutes, setMutes] = (0,
|
|
55424
|
-
const [navOpen, setNavOpen] = (0,
|
|
55425
|
-
const [latestMessageDatesByChannels, setLatestMessageDatesByChannels] = (0,
|
|
56019
|
+
const [channel, setChannel] = (0, import_react261.useState)();
|
|
56020
|
+
const [mutes, setMutes] = (0, import_react261.useState)([]);
|
|
56021
|
+
const [navOpen, setNavOpen] = (0, import_react261.useState)(initialNavOpen);
|
|
56022
|
+
const [latestMessageDatesByChannels, setLatestMessageDatesByChannels] = (0, import_react261.useState)({});
|
|
55426
56023
|
const clientMutes = client.user?.mutes || [];
|
|
55427
56024
|
const closeMobileNav = () => setNavOpen(false);
|
|
55428
56025
|
const openMobileNav = () => setTimeout(() => setNavOpen(true), 100);
|
|
55429
|
-
const appSettings = (0,
|
|
56026
|
+
const appSettings = (0, import_react261.useRef)(null);
|
|
55430
56027
|
const getAppSettings = () => {
|
|
55431
56028
|
if (appSettings.current) {
|
|
55432
56029
|
return appSettings.current;
|
|
@@ -55434,11 +56031,11 @@ var useChat = ({
|
|
|
55434
56031
|
appSettings.current = client.getAppSettings();
|
|
55435
56032
|
return appSettings.current;
|
|
55436
56033
|
};
|
|
55437
|
-
(0,
|
|
56034
|
+
(0, import_react261.useEffect)(() => {
|
|
55438
56035
|
if (!client) return;
|
|
55439
56036
|
const userAgent = client.getUserAgent();
|
|
55440
56037
|
if (!userAgent.includes("stream-chat-react")) {
|
|
55441
|
-
client.setUserAgent(`stream-chat-react-12.
|
|
56038
|
+
client.setUserAgent(`stream-chat-react-12.10.0-${userAgent}`);
|
|
55442
56039
|
}
|
|
55443
56040
|
client.threads.registerSubscriptions();
|
|
55444
56041
|
client.polls.registerSubscriptions();
|
|
@@ -55447,7 +56044,7 @@ var useChat = ({
|
|
|
55447
56044
|
client.polls.unregisterSubscriptions();
|
|
55448
56045
|
};
|
|
55449
56046
|
}, [client]);
|
|
55450
|
-
(0,
|
|
56047
|
+
(0, import_react261.useEffect)(() => {
|
|
55451
56048
|
setMutes(clientMutes);
|
|
55452
56049
|
const handleEvent = (event) => {
|
|
55453
56050
|
setMutes(event.me?.mutes || []);
|
|
@@ -55455,7 +56052,7 @@ var useChat = ({
|
|
|
55455
56052
|
client.on("notification.mutes_updated", handleEvent);
|
|
55456
56053
|
return () => client.off("notification.mutes_updated", handleEvent);
|
|
55457
56054
|
}, [clientMutes?.length]);
|
|
55458
|
-
(0,
|
|
56055
|
+
(0, import_react261.useEffect)(() => {
|
|
55459
56056
|
let userLanguage = client.user?.language;
|
|
55460
56057
|
if (!userLanguage) {
|
|
55461
56058
|
const browserLanguage = window.navigator.language.slice(0, 2);
|
|
@@ -55472,7 +56069,7 @@ var useChat = ({
|
|
|
55472
56069
|
});
|
|
55473
56070
|
});
|
|
55474
56071
|
}, [i18nInstance]);
|
|
55475
|
-
const setActiveChannel = (0,
|
|
56072
|
+
const setActiveChannel = (0, import_react261.useCallback)(
|
|
55476
56073
|
async (activeChannel, watchers = {}, event) => {
|
|
55477
56074
|
if (event && event.preventDefault) event.preventDefault();
|
|
55478
56075
|
if (activeChannel && Object.keys(watchers).length) {
|
|
@@ -55483,7 +56080,7 @@ var useChat = ({
|
|
|
55483
56080
|
},
|
|
55484
56081
|
[]
|
|
55485
56082
|
);
|
|
55486
|
-
(0,
|
|
56083
|
+
(0, import_react261.useEffect)(() => {
|
|
55487
56084
|
setLatestMessageDatesByChannels({});
|
|
55488
56085
|
}, [client.user?.id]);
|
|
55489
56086
|
return {
|
|
@@ -55500,7 +56097,7 @@ var useChat = ({
|
|
|
55500
56097
|
};
|
|
55501
56098
|
|
|
55502
56099
|
// src/components/Chat/hooks/useCreateChatContext.ts
|
|
55503
|
-
var
|
|
56100
|
+
var import_react262 = require("react");
|
|
55504
56101
|
var useCreateChatContext = (value) => {
|
|
55505
56102
|
const {
|
|
55506
56103
|
channel,
|
|
@@ -55524,7 +56121,7 @@ var useCreateChatContext = (value) => {
|
|
|
55524
56121
|
const clientValues = `${client.clientID}${Object.keys(client.activeChannels).length}${Object.keys(client.listeners).length}${client.mutedChannels.length}
|
|
55525
56122
|
${client.user?.id}`;
|
|
55526
56123
|
const mutedUsersLength = mutes.length;
|
|
55527
|
-
const chatContext = (0,
|
|
56124
|
+
const chatContext = (0, import_react262.useMemo)(
|
|
55528
56125
|
() => ({
|
|
55529
56126
|
channel,
|
|
55530
56127
|
channelsQueryState,
|
|
@@ -55557,10 +56154,10 @@ var useCreateChatContext = (value) => {
|
|
|
55557
56154
|
};
|
|
55558
56155
|
|
|
55559
56156
|
// src/components/Chat/hooks/useChannelsQueryState.ts
|
|
55560
|
-
var
|
|
56157
|
+
var import_react263 = require("react");
|
|
55561
56158
|
var useChannelsQueryState = () => {
|
|
55562
|
-
const [error, setError] = (0,
|
|
55563
|
-
const [queryInProgress, setQueryInProgress] = (0,
|
|
56159
|
+
const [error, setError] = (0, import_react263.useState)(null);
|
|
56160
|
+
const [queryInProgress, setQueryInProgress] = (0, import_react263.useState)("uninitialized");
|
|
55564
56161
|
return {
|
|
55565
56162
|
error,
|
|
55566
56163
|
queryInProgress,
|
|
@@ -55611,11 +56208,11 @@ var Chat = (props) => {
|
|
|
55611
56208
|
useImageFlagEmojisOnWindows
|
|
55612
56209
|
});
|
|
55613
56210
|
if (!translators.t) return null;
|
|
55614
|
-
return /* @__PURE__ */
|
|
56211
|
+
return /* @__PURE__ */ import_react264.default.createElement(ChatProvider, { value: chatContextValue }, /* @__PURE__ */ import_react264.default.createElement(TranslationProvider, { value: translators }, children));
|
|
55615
56212
|
};
|
|
55616
56213
|
|
|
55617
56214
|
// src/components/Chat/hooks/useCreateChatClient.ts
|
|
55618
|
-
var
|
|
56215
|
+
var import_react265 = require("react");
|
|
55619
56216
|
var import_stream_chat6 = require("stream-chat");
|
|
55620
56217
|
var useCreateChatClient = ({
|
|
55621
56218
|
apiKey,
|
|
@@ -55623,13 +56220,13 @@ var useCreateChatClient = ({
|
|
|
55623
56220
|
tokenOrProvider,
|
|
55624
56221
|
userData
|
|
55625
56222
|
}) => {
|
|
55626
|
-
const [chatClient, setChatClient] = (0,
|
|
55627
|
-
const [cachedUserData, setCachedUserData] = (0,
|
|
56223
|
+
const [chatClient, setChatClient] = (0, import_react265.useState)(null);
|
|
56224
|
+
const [cachedUserData, setCachedUserData] = (0, import_react265.useState)(userData);
|
|
55628
56225
|
if (userData.id !== cachedUserData.id) {
|
|
55629
56226
|
setCachedUserData(userData);
|
|
55630
56227
|
}
|
|
55631
|
-
const [cachedOptions] = (0,
|
|
55632
|
-
(0,
|
|
56228
|
+
const [cachedOptions] = (0, import_react265.useState)(options);
|
|
56229
|
+
(0, import_react265.useEffect)(() => {
|
|
55633
56230
|
const client = new import_stream_chat6.StreamChat(apiKey, void 0, cachedOptions);
|
|
55634
56231
|
let didUserConnectInterrupt = false;
|
|
55635
56232
|
const connectionPromise = client.connectUser(cachedUserData, tokenOrProvider).then(() => {
|
|
@@ -55647,17 +56244,17 @@ var useCreateChatClient = ({
|
|
|
55647
56244
|
};
|
|
55648
56245
|
|
|
55649
56246
|
// src/components/Thread/Thread.tsx
|
|
55650
|
-
var
|
|
56247
|
+
var import_react270 = __toESM(require("react"));
|
|
55651
56248
|
var import_clsx65 = __toESM(require("clsx"));
|
|
55652
56249
|
|
|
55653
56250
|
// src/components/Thread/ThreadHeader.tsx
|
|
55654
|
-
var
|
|
56251
|
+
var import_react267 = __toESM(require("react"));
|
|
55655
56252
|
|
|
55656
56253
|
// src/components/Thread/icons.tsx
|
|
55657
|
-
var
|
|
56254
|
+
var import_react266 = __toESM(require("react"));
|
|
55658
56255
|
var CloseIcon3 = ({ title }) => {
|
|
55659
56256
|
const { t: t2 } = useTranslationContext("CloseIcon");
|
|
55660
|
-
return /* @__PURE__ */
|
|
56257
|
+
return /* @__PURE__ */ import_react266.default.createElement(
|
|
55661
56258
|
"svg",
|
|
55662
56259
|
{
|
|
55663
56260
|
"data-testid": "close-no-outline",
|
|
@@ -55665,8 +56262,8 @@ var CloseIcon3 = ({ title }) => {
|
|
|
55665
56262
|
viewBox: "0 0 24 24",
|
|
55666
56263
|
xmlns: "http://www.w3.org/2000/svg"
|
|
55667
56264
|
},
|
|
55668
|
-
/* @__PURE__ */
|
|
55669
|
-
/* @__PURE__ */
|
|
56265
|
+
/* @__PURE__ */ import_react266.default.createElement("title", null, title ?? t2("Close")),
|
|
56266
|
+
/* @__PURE__ */ import_react266.default.createElement(
|
|
55670
56267
|
"path",
|
|
55671
56268
|
{
|
|
55672
56269
|
d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",
|
|
@@ -55686,7 +56283,7 @@ var ThreadHeader = (props) => {
|
|
|
55686
56283
|
overrideImage,
|
|
55687
56284
|
overrideTitle
|
|
55688
56285
|
});
|
|
55689
|
-
return /* @__PURE__ */
|
|
56286
|
+
return /* @__PURE__ */ import_react267.default.createElement("div", { className: "str-chat__thread-header" }, /* @__PURE__ */ import_react267.default.createElement("div", { className: "str-chat__thread-header-details" }, /* @__PURE__ */ import_react267.default.createElement("div", { className: "str-chat__thread-header-title" }, t2("Thread")), /* @__PURE__ */ import_react267.default.createElement("div", { className: "str-chat__thread-header-subtitle" }, displayTitle)), /* @__PURE__ */ import_react267.default.createElement(
|
|
55690
56287
|
"button",
|
|
55691
56288
|
{
|
|
55692
56289
|
"aria-label": t2("aria/Close thread"),
|
|
@@ -55694,20 +56291,20 @@ var ThreadHeader = (props) => {
|
|
|
55694
56291
|
"data-testid": "close-button",
|
|
55695
56292
|
onClick: closeThread
|
|
55696
56293
|
},
|
|
55697
|
-
/* @__PURE__ */
|
|
56294
|
+
/* @__PURE__ */ import_react267.default.createElement(CloseIcon3, null)
|
|
55698
56295
|
));
|
|
55699
56296
|
};
|
|
55700
56297
|
|
|
55701
56298
|
// src/components/Thread/ThreadHead.tsx
|
|
55702
|
-
var
|
|
56299
|
+
var import_react269 = __toESM(require("react"));
|
|
55703
56300
|
|
|
55704
56301
|
// src/components/Thread/ThreadStart.tsx
|
|
55705
|
-
var
|
|
56302
|
+
var import_react268 = __toESM(require("react"));
|
|
55706
56303
|
var ThreadStart = () => {
|
|
55707
56304
|
const { thread } = useChannelStateContext("ThreadStart");
|
|
55708
56305
|
const { t: t2 } = useTranslationContext("ThreadStart");
|
|
55709
56306
|
if (!thread?.reply_count) return null;
|
|
55710
|
-
return /* @__PURE__ */
|
|
56307
|
+
return /* @__PURE__ */ import_react268.default.createElement("div", { className: "str-chat__thread-start" }, t2("replyCount", { count: thread.reply_count }));
|
|
55711
56308
|
};
|
|
55712
56309
|
|
|
55713
56310
|
// src/components/Thread/ThreadHead.tsx
|
|
@@ -55715,7 +56312,7 @@ var ThreadHead = (props) => {
|
|
|
55715
56312
|
const { ThreadStart: ThreadStart2 = ThreadStart } = useComponentContext(
|
|
55716
56313
|
"ThreadHead"
|
|
55717
56314
|
);
|
|
55718
|
-
return /* @__PURE__ */
|
|
56315
|
+
return /* @__PURE__ */ import_react269.default.createElement("div", { className: "str-chat__parent-message-li" }, /* @__PURE__ */ import_react269.default.createElement(Message, { initialMessage: true, threadList: true, ...props }), /* @__PURE__ */ import_react269.default.createElement(ThreadStart2, null));
|
|
55719
56316
|
};
|
|
55720
56317
|
|
|
55721
56318
|
// src/components/Thread/Thread.tsx
|
|
@@ -55725,7 +56322,7 @@ var Thread = (props) => {
|
|
|
55725
56322
|
if (!thread && !threadInstance || channelConfig?.replies === false) return null;
|
|
55726
56323
|
return (
|
|
55727
56324
|
// FIXME: TS is having trouble here as at least one of the two would always be defined
|
|
55728
|
-
/* @__PURE__ */
|
|
56325
|
+
/* @__PURE__ */ import_react270.default.createElement(ThreadInner, { ...props, key: `thread-${(thread ?? threadInstance)?.id}-${channel?.cid}` })
|
|
55729
56326
|
);
|
|
55730
56327
|
};
|
|
55731
56328
|
var selector6 = (nextValue) => ({
|
|
@@ -55770,7 +56367,7 @@ var ThreadInner = (props) => {
|
|
|
55770
56367
|
const FallbackMessage = virtualized && VirtualMessage ? VirtualMessage : ContextMessage;
|
|
55771
56368
|
const MessageUIComponent = ThreadMessage || FallbackMessage;
|
|
55772
56369
|
const ThreadMessageList = virtualized ? VirtualizedMessageList : MessageList;
|
|
55773
|
-
(0,
|
|
56370
|
+
(0, import_react270.useEffect)(() => {
|
|
55774
56371
|
if (thread?.id && thread?.reply_count) {
|
|
55775
56372
|
loadMoreThread();
|
|
55776
56373
|
}
|
|
@@ -55792,7 +56389,7 @@ var ThreadInner = (props) => {
|
|
|
55792
56389
|
const threadClass = customClasses?.thread || (0, import_clsx65.default)("str-chat__thread-container str-chat__thread", {
|
|
55793
56390
|
"str-chat__thread--virtualized": virtualized
|
|
55794
56391
|
});
|
|
55795
|
-
const head = /* @__PURE__ */
|
|
56392
|
+
const head = /* @__PURE__ */ import_react270.default.createElement(
|
|
55796
56393
|
ThreadHead2,
|
|
55797
56394
|
{
|
|
55798
56395
|
key: messageAsThread.id,
|
|
@@ -55801,7 +56398,7 @@ var ThreadInner = (props) => {
|
|
|
55801
56398
|
...additionalParentMessageProps
|
|
55802
56399
|
}
|
|
55803
56400
|
);
|
|
55804
|
-
return /* @__PURE__ */
|
|
56401
|
+
return /* @__PURE__ */ import_react270.default.createElement("div", { className: threadClass }, /* @__PURE__ */ import_react270.default.createElement(ThreadHeader2, { closeThread, thread: messageAsThread }), /* @__PURE__ */ import_react270.default.createElement(
|
|
55805
56402
|
ThreadMessageList,
|
|
55806
56403
|
{
|
|
55807
56404
|
disableDateSeparator: !enableDateSeparator,
|
|
@@ -55813,7 +56410,7 @@ var ThreadInner = (props) => {
|
|
|
55813
56410
|
...threadProps,
|
|
55814
56411
|
...virtualized ? additionalVirtualizedMessageListProps : additionalMessageListProps
|
|
55815
56412
|
}
|
|
55816
|
-
), /* @__PURE__ */
|
|
56413
|
+
), /* @__PURE__ */ import_react270.default.createElement(
|
|
55817
56414
|
MessageInput,
|
|
55818
56415
|
{
|
|
55819
56416
|
focus: autoFocus,
|
|
@@ -55827,12 +56424,12 @@ var ThreadInner = (props) => {
|
|
|
55827
56424
|
};
|
|
55828
56425
|
|
|
55829
56426
|
// src/components/Window/Window.tsx
|
|
55830
|
-
var
|
|
56427
|
+
var import_react271 = __toESM(require("react"));
|
|
55831
56428
|
var import_clsx66 = __toESM(require("clsx"));
|
|
55832
56429
|
var UnMemoizedWindow = (props) => {
|
|
55833
56430
|
const { children, thread: propThread } = props;
|
|
55834
56431
|
const { thread: contextThread } = useChannelStateContext("Window");
|
|
55835
|
-
return /* @__PURE__ */
|
|
56432
|
+
return /* @__PURE__ */ import_react271.default.createElement(
|
|
55836
56433
|
"div",
|
|
55837
56434
|
{
|
|
55838
56435
|
className: (0, import_clsx66.default)("str-chat__main-panel", {
|
|
@@ -55842,7 +56439,7 @@ var UnMemoizedWindow = (props) => {
|
|
|
55842
56439
|
children
|
|
55843
56440
|
);
|
|
55844
56441
|
};
|
|
55845
|
-
var Window =
|
|
56442
|
+
var Window = import_react271.default.memo(UnMemoizedWindow);
|
|
55846
56443
|
// Annotate the CommonJS export names for ESM import in node:
|
|
55847
56444
|
0 && (module.exports = {
|
|
55848
56445
|
ACTIONS_NOT_WORKING_IN_THREAD,
|
|
@@ -56234,5 +56831,47 @@ is-buffer/index.js:
|
|
|
56234
56831
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
56235
56832
|
* @license MIT
|
|
56236
56833
|
*)
|
|
56834
|
+
|
|
56835
|
+
react-is/cjs/react-is.production.min.js:
|
|
56836
|
+
(**
|
|
56837
|
+
* @license React
|
|
56838
|
+
* react-is.production.min.js
|
|
56839
|
+
*
|
|
56840
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
56841
|
+
*
|
|
56842
|
+
* This source code is licensed under the MIT license found in the
|
|
56843
|
+
* LICENSE file in the root directory of this source tree.
|
|
56844
|
+
*)
|
|
56845
|
+
|
|
56846
|
+
react-is/cjs/react-is.development.js:
|
|
56847
|
+
(**
|
|
56848
|
+
* @license React
|
|
56849
|
+
* react-is.development.js
|
|
56850
|
+
*
|
|
56851
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
56852
|
+
*
|
|
56853
|
+
* This source code is licensed under the MIT license found in the
|
|
56854
|
+
* LICENSE file in the root directory of this source tree.
|
|
56855
|
+
*)
|
|
56856
|
+
|
|
56857
|
+
react-is/cjs/react-is.production.min.js:
|
|
56858
|
+
(** @license React v16.13.1
|
|
56859
|
+
* react-is.production.min.js
|
|
56860
|
+
*
|
|
56861
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
56862
|
+
*
|
|
56863
|
+
* This source code is licensed under the MIT license found in the
|
|
56864
|
+
* LICENSE file in the root directory of this source tree.
|
|
56865
|
+
*)
|
|
56866
|
+
|
|
56867
|
+
react-is/cjs/react-is.development.js:
|
|
56868
|
+
(** @license React v16.13.1
|
|
56869
|
+
* react-is.development.js
|
|
56870
|
+
*
|
|
56871
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
56872
|
+
*
|
|
56873
|
+
* This source code is licensed under the MIT license found in the
|
|
56874
|
+
* LICENSE file in the root directory of this source tree.
|
|
56875
|
+
*)
|
|
56237
56876
|
*/
|
|
56238
56877
|
//# sourceMappingURL=index.node.cjs.map
|