stream-chat-react 10.22.1 → 10.22.3
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/browser.full-bundle.js +41 -18
- package/dist/browser.full-bundle.js.map +1 -1
- package/dist/browser.full-bundle.min.js +5 -5
- package/dist/browser.full-bundle.min.js.map +1 -1
- package/dist/components/AutoCompleteTextarea/Textarea.d.ts +1 -0
- package/dist/components/AutoCompleteTextarea/Textarea.d.ts.map +1 -1
- package/dist/components/AutoCompleteTextarea/Textarea.js +10 -8
- package/dist/components/Gallery/ModalGallery.d.ts.map +1 -1
- package/dist/components/Gallery/ModalGallery.js +11 -1
- package/dist/css/v2/index.css +1 -1
- package/dist/css/v2/index.layout.css +1 -1
- package/dist/index.cjs.js +40 -17
- package/dist/index.cjs.js.map +1 -1
- package/dist/scss/v2/AttachmentList/AttachmentList-layout.scss +1 -0
- package/dist/scss/v2/vendor/react-image-gallery.scss +19 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/AutoCompleteTextarea/Textarea.jsx"],"names":[],"mappings":"AAmBA;IACE;;;;;;;MAOE;
|
|
1
|
+
{"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/components/AutoCompleteTextarea/Textarea.jsx"],"names":[],"mappings":"AAmBA;IACE;;;;;;;MAOE;IA8WF;;OAEG;IACH;;;aAMC;IArXD,wBA6BC;IAbC;;;;;;;;;;;;MAYC;IAIH;;;aAOE;IAGF,2BAOE;IAEF,8CAKE;IAEF,+BAIE;IAEF;;;;;;OAMG;IACH,8CAC6E;IAE7E,qCAUE;IAEF,+BAcE;IAEF,qBAQE;IAEF,yBA6BE;IAEF,mCAqEE;IAEF,qEAuBE;IAEF,sEA2DE;IAEF,uDAQE;IAEF,mCA0CE;IAEF,6CAQE;IAYF;;OAEG;IACH,+BAQE;IAEF;;MA6CE;IAEF,mCAME;IAEF,iCA+EE;IAEF,iCASE;IAGF,yCA0BE;IAEF,6BAAmD;IAEnD,qCAiBE;IAEF;;;;;;;;MAoCE;IAEF,uCAEE;IADA,iBAA0B;IAG5B,oDA6CC;IAED,sBA6EC;IATS,oDAAsB;CAUjC"}
|
|
@@ -492,6 +492,7 @@ var ReactTextareaAutocomplete = /** @class */ (function (_super) {
|
|
|
492
492
|
currentTrigger: null,
|
|
493
493
|
data: null,
|
|
494
494
|
dataLoading: false,
|
|
495
|
+
isComposing: false,
|
|
495
496
|
left: null,
|
|
496
497
|
selectionEnd: 0,
|
|
497
498
|
selectionStart: 0,
|
|
@@ -513,14 +514,15 @@ var ReactTextareaAutocomplete = /** @class */ (function (_super) {
|
|
|
513
514
|
};
|
|
514
515
|
ReactTextareaAutocomplete.prototype.renderSuggestionListContainer = function () {
|
|
515
516
|
var _a = this.props, disableMentions = _a.disableMentions, dropdownClassName = _a.dropdownClassName, dropdownStyle = _a.dropdownStyle, itemClassName = _a.itemClassName, itemStyle = _a.itemStyle, listClassName = _a.listClassName, SuggestionItem = _a.SuggestionItem, _b = _a.SuggestionList, SuggestionList = _b === void 0 ? DefaultSuggestionList : _b;
|
|
517
|
+
var isComposing = this.state.isComposing;
|
|
516
518
|
var triggerProps = this.getTriggerProps();
|
|
517
|
-
if (
|
|
518
|
-
triggerProps.
|
|
519
|
-
!
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
}
|
|
523
|
-
|
|
519
|
+
if (isComposing ||
|
|
520
|
+
!triggerProps.values ||
|
|
521
|
+
!triggerProps.currentTrigger ||
|
|
522
|
+
(disableMentions && triggerProps.currentTrigger === '@'))
|
|
523
|
+
return null;
|
|
524
|
+
return (React.createElement("div", { className: clsx('rta__autocomplete', 'str-chat__suggestion-list-container', dropdownClassName), ref: this.setDropdownRef, style: dropdownStyle },
|
|
525
|
+
React.createElement(SuggestionList, __assign({ className: clsx('str-chat__suggestion-list', listClassName), dropdownScroll: this._dropdownScroll, itemClassName: clsx('str-chat__suggestion-list-item', itemClassName), itemStyle: itemStyle, onSelect: this._onSelect, SuggestionItem: SuggestionItem }, triggerProps))));
|
|
524
526
|
};
|
|
525
527
|
ReactTextareaAutocomplete.prototype.render = function () {
|
|
526
528
|
var _this = this;
|
|
@@ -546,7 +548,7 @@ var ReactTextareaAutocomplete = /** @class */ (function (_super) {
|
|
|
546
548
|
}, onClick: function (e) {
|
|
547
549
|
_this._onClickAndBlurHandler(e);
|
|
548
550
|
onClick === null || onClick === void 0 ? void 0 : onClick(e);
|
|
549
|
-
}, onFocus: function (e) {
|
|
551
|
+
}, onCompositionEnd: function () { return _this.setState(function (pv) { return (__assign(__assign({}, pv), { isComposing: false })); }); }, onCompositionStart: function () { return _this.setState(function (pv) { return (__assign(__assign({}, pv), { isComposing: true })); }); }, onFocus: function (e) {
|
|
550
552
|
var _a, _b;
|
|
551
553
|
(_b = (_a = _this.props).onFocus) === null || _b === void 0 ? void 0 : _b.call(_a, e);
|
|
552
554
|
onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalGallery.d.ts","sourceRoot":"","sources":["../../../src/components/Gallery/ModalGallery.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ModalGallery.d.ts","sourceRoot":"","sources":["../../../src/components/Gallery/ModalGallery.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAEnE,oBAAY,iBAAiB,CAC3B,kBAAkB,SAAS,yBAAyB,GAAG,yBAAyB,IAC9E;IACF,4CAA4C;IAC5C,MAAM,EAAE,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC;IACzC,kCAAkC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAYF,eAAO,MAAM,YAAY,iJA+BxB,CAAC"}
|
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
import React, { useMemo } from 'react';
|
|
2
2
|
import ImageGallery from 'react-image-gallery';
|
|
3
|
+
import { BaseImage } from './BaseImage';
|
|
3
4
|
import { useTranslationContext } from '../../context';
|
|
5
|
+
var onError = function (e) {
|
|
6
|
+
// Prevent having alt attribute on img as the img takes the height of the alt text
|
|
7
|
+
// instead of the CSS / element width & height when the CSS mask (fallback) is applied.
|
|
8
|
+
e.target.alt = '';
|
|
9
|
+
};
|
|
10
|
+
var renderItem = function (_a) {
|
|
11
|
+
var original = _a.original, originalAlt = _a.originalAlt;
|
|
12
|
+
return (React.createElement(BaseImage, { alt: originalAlt, className: 'image-gallery-image', onError: onError, src: original }));
|
|
13
|
+
};
|
|
4
14
|
export var ModalGallery = function (props) {
|
|
5
15
|
var images = props.images, index = props.index;
|
|
6
16
|
var t = useTranslationContext('ModalGallery').t;
|
|
@@ -14,5 +24,5 @@ export var ModalGallery = function (props) {
|
|
|
14
24
|
};
|
|
15
25
|
});
|
|
16
26
|
}, [images]);
|
|
17
|
-
return (React.createElement(ImageGallery, { items: formattedArray, showIndex: true, showPlayButton: false, showThumbnails: false, startIndex: index }));
|
|
27
|
+
return (React.createElement(ImageGallery, { items: formattedArray, renderItem: renderItem, showIndex: true, showPlayButton: false, showThumbnails: false, startIndex: index }));
|
|
18
28
|
};
|