sceyt-chat-react-uikit 1.6.6-beta.3 → 1.6.6-beta.4
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/components/ChannelDetails/DetailsTab/index.d.ts +2 -1
- package/index.js +13 -2
- package/index.modern.js +13 -2
- package/package.json +1 -1
|
@@ -42,6 +42,7 @@ interface IProps {
|
|
|
42
42
|
tabItemsFontSize?: string;
|
|
43
43
|
tabItemsLineHeight?: string;
|
|
44
44
|
tabItemsMinWidth?: string;
|
|
45
|
+
onTabChange?: () => void;
|
|
45
46
|
}
|
|
46
|
-
declare const DetailsTab: ({ channel, theme, activeTab, checkActionPermission, setActiveTab, linkPreviewIcon, linkPreviewHoverIcon, linkPreviewTitleColor, linkPreviewColor, linkPreviewHoverBackgroundColor, voicePreviewPlayIcon, voicePreviewPlayHoverIcon, voicePreviewPauseIcon, voicePreviewPauseHoverIcon, voicePreviewTitleColor, voicePreviewDateAndTimeColor, voicePreviewHoverBackgroundColor, filePreviewIcon, filePreviewHoverIcon, filePreviewTitleColor, filePreviewSizeColor, filePreviewHoverBackgroundColor, filePreviewDownloadIcon, fileNameFontSize, fileNameLineHeight, fileSizeFontSize, fileSizeLineHeight, showChangeMemberRole, showKickMember, showKickAndBlockMember, showMakeMemberAdmin, memberHoverBackgroundColor, addMemberFontSize, addMemberIcon, memberNameFontSize, memberAvatarSize, memberPresenceFontSize, borderColor, tabItemsFontSize, tabItemsLineHeight, tabItemsMinWidth }: IProps) => React.JSX.Element;
|
|
47
|
+
declare const DetailsTab: ({ channel, theme, activeTab, checkActionPermission, setActiveTab, linkPreviewIcon, linkPreviewHoverIcon, linkPreviewTitleColor, linkPreviewColor, linkPreviewHoverBackgroundColor, voicePreviewPlayIcon, voicePreviewPlayHoverIcon, voicePreviewPauseIcon, voicePreviewPauseHoverIcon, voicePreviewTitleColor, voicePreviewDateAndTimeColor, voicePreviewHoverBackgroundColor, filePreviewIcon, filePreviewHoverIcon, filePreviewTitleColor, filePreviewSizeColor, filePreviewHoverBackgroundColor, filePreviewDownloadIcon, fileNameFontSize, fileNameLineHeight, fileSizeFontSize, fileSizeLineHeight, showChangeMemberRole, showKickMember, showKickAndBlockMember, showMakeMemberAdmin, memberHoverBackgroundColor, addMemberFontSize, addMemberIcon, memberNameFontSize, memberAvatarSize, memberPresenceFontSize, borderColor, tabItemsFontSize, tabItemsLineHeight, tabItemsMinWidth, onTabChange }: IProps) => React.JSX.Element;
|
|
47
48
|
export default DetailsTab;
|
package/index.js
CHANGED
|
@@ -36734,7 +36734,8 @@ var DetailsTab = function DetailsTab(_ref) {
|
|
|
36734
36734
|
borderColor = _ref.borderColor,
|
|
36735
36735
|
tabItemsFontSize = _ref.tabItemsFontSize,
|
|
36736
36736
|
tabItemsLineHeight = _ref.tabItemsLineHeight,
|
|
36737
|
-
tabItemsMinWidth = _ref.tabItemsMinWidth
|
|
36737
|
+
tabItemsMinWidth = _ref.tabItemsMinWidth,
|
|
36738
|
+
onTabChange = _ref.onTabChange;
|
|
36738
36739
|
var _useColor = useColors(),
|
|
36739
36740
|
accentColor = _useColor[THEME_COLORS.ACCENT],
|
|
36740
36741
|
textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY],
|
|
@@ -36747,6 +36748,7 @@ var DetailsTab = function DetailsTab(_ref) {
|
|
|
36747
36748
|
var displayMemberText = memberDisplayText && memberDisplayText[channel.type] ? memberDisplayText[channel.type] + "s" : channel.type === DEFAULT_CHANNEL_TYPE.BROADCAST || channel.type === DEFAULT_CHANNEL_TYPE.PUBLIC ? 'subscribers' : 'members';
|
|
36748
36749
|
var handleTabClick = function handleTabClick(tabIndex) {
|
|
36749
36750
|
if (activeTab !== tabIndex) {
|
|
36751
|
+
onTabChange === null || onTabChange === void 0 ? void 0 : onTabChange();
|
|
36750
36752
|
dispatch(emptyChannelAttachmentsAC());
|
|
36751
36753
|
setActiveTab(tabIndex);
|
|
36752
36754
|
}
|
|
@@ -37296,6 +37298,14 @@ var Details = function Details(_ref) {
|
|
|
37296
37298
|
setChannelDetailsHeight(detailsContainer.offsetHeight);
|
|
37297
37299
|
}
|
|
37298
37300
|
}, []);
|
|
37301
|
+
var handleTabChange = function handleTabChange() {
|
|
37302
|
+
if (detailsRef.current) {
|
|
37303
|
+
detailsRef.current.scrollTo({
|
|
37304
|
+
top: 350,
|
|
37305
|
+
behavior: 'smooth'
|
|
37306
|
+
});
|
|
37307
|
+
}
|
|
37308
|
+
};
|
|
37299
37309
|
return /*#__PURE__*/React__default.createElement(Container$t, {
|
|
37300
37310
|
backgroundColor: backgroundColor,
|
|
37301
37311
|
mounted: mounted,
|
|
@@ -37471,7 +37481,8 @@ var Details = function Details(_ref) {
|
|
|
37471
37481
|
borderColor: bordersColor,
|
|
37472
37482
|
tabItemsFontSize: tabItemsFontSize,
|
|
37473
37483
|
tabItemsLineHeight: tabItemsLineHeight,
|
|
37474
|
-
tabItemsMinWidth: tabItemsMinWidth
|
|
37484
|
+
tabItemsMinWidth: tabItemsMinWidth,
|
|
37485
|
+
onTabChange: handleTabChange
|
|
37475
37486
|
}))));
|
|
37476
37487
|
};
|
|
37477
37488
|
var Container$t = styled__default.div(_templateObject$T || (_templateObject$T = _taggedTemplateLiteralLoose(["\n flex: 0 0 auto;\n width: 0;\n border-left: 1px solid ", ";\n //transition: all 0.1s;\n ", "\n background-color: ", ";\n}\n"])), function (props) {
|
package/index.modern.js
CHANGED
|
@@ -36711,7 +36711,8 @@ var DetailsTab = function DetailsTab(_ref) {
|
|
|
36711
36711
|
borderColor = _ref.borderColor,
|
|
36712
36712
|
tabItemsFontSize = _ref.tabItemsFontSize,
|
|
36713
36713
|
tabItemsLineHeight = _ref.tabItemsLineHeight,
|
|
36714
|
-
tabItemsMinWidth = _ref.tabItemsMinWidth
|
|
36714
|
+
tabItemsMinWidth = _ref.tabItemsMinWidth,
|
|
36715
|
+
onTabChange = _ref.onTabChange;
|
|
36715
36716
|
var _useColor = useColors(),
|
|
36716
36717
|
accentColor = _useColor[THEME_COLORS.ACCENT],
|
|
36717
36718
|
textSecondary = _useColor[THEME_COLORS.TEXT_SECONDARY],
|
|
@@ -36724,6 +36725,7 @@ var DetailsTab = function DetailsTab(_ref) {
|
|
|
36724
36725
|
var displayMemberText = memberDisplayText && memberDisplayText[channel.type] ? memberDisplayText[channel.type] + "s" : channel.type === DEFAULT_CHANNEL_TYPE.BROADCAST || channel.type === DEFAULT_CHANNEL_TYPE.PUBLIC ? 'subscribers' : 'members';
|
|
36725
36726
|
var handleTabClick = function handleTabClick(tabIndex) {
|
|
36726
36727
|
if (activeTab !== tabIndex) {
|
|
36728
|
+
onTabChange === null || onTabChange === void 0 ? void 0 : onTabChange();
|
|
36727
36729
|
dispatch(emptyChannelAttachmentsAC());
|
|
36728
36730
|
setActiveTab(tabIndex);
|
|
36729
36731
|
}
|
|
@@ -37273,6 +37275,14 @@ var Details = function Details(_ref) {
|
|
|
37273
37275
|
setChannelDetailsHeight(detailsContainer.offsetHeight);
|
|
37274
37276
|
}
|
|
37275
37277
|
}, []);
|
|
37278
|
+
var handleTabChange = function handleTabChange() {
|
|
37279
|
+
if (detailsRef.current) {
|
|
37280
|
+
detailsRef.current.scrollTo({
|
|
37281
|
+
top: 350,
|
|
37282
|
+
behavior: 'smooth'
|
|
37283
|
+
});
|
|
37284
|
+
}
|
|
37285
|
+
};
|
|
37276
37286
|
return /*#__PURE__*/React__default.createElement(Container$t, {
|
|
37277
37287
|
backgroundColor: backgroundColor,
|
|
37278
37288
|
mounted: mounted,
|
|
@@ -37448,7 +37458,8 @@ var Details = function Details(_ref) {
|
|
|
37448
37458
|
borderColor: bordersColor,
|
|
37449
37459
|
tabItemsFontSize: tabItemsFontSize,
|
|
37450
37460
|
tabItemsLineHeight: tabItemsLineHeight,
|
|
37451
|
-
tabItemsMinWidth: tabItemsMinWidth
|
|
37461
|
+
tabItemsMinWidth: tabItemsMinWidth,
|
|
37462
|
+
onTabChange: handleTabChange
|
|
37452
37463
|
}))));
|
|
37453
37464
|
};
|
|
37454
37465
|
var Container$t = styled.div(_templateObject$T || (_templateObject$T = _taggedTemplateLiteralLoose(["\n flex: 0 0 auto;\n width: 0;\n border-left: 1px solid ", ";\n //transition: all 0.1s;\n ", "\n background-color: ", ";\n}\n"])), function (props) {
|