sceyt-chat-react-uikit 1.8.3-beta.4 → 1.8.3-beta.5
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/index.d.ts +2 -2
- package/index.js +56 -8
- package/index.modern.js +55 -9
- package/package.json +1 -1
package/components/index.d.ts
CHANGED
|
@@ -18,9 +18,9 @@ import DropDown from '../common/dropdown';
|
|
|
18
18
|
import { THEME_COLORS } from '../UIHelper/constants';
|
|
19
19
|
import { OGMetadata } from './Message/OGMetadata';
|
|
20
20
|
import PollMessage from './Message/PollMessage';
|
|
21
|
-
import { createOrGetDirectChannel, switchChannelActiveChannel, handleSendMessage, handleGetMessage } from 'helpers/methods';
|
|
21
|
+
import { createOrGetDirectChannel, switchChannelActiveChannel, handleSendMessage, handleGetMessage, blockUsers, unBlockUsers } from 'helpers/methods';
|
|
22
22
|
import { MESSAGE_TYPE } from 'types/enum';
|
|
23
|
-
export { SceytChat, ChannelList, Channel, Chat, ChatHeader, MessageList, SendMessage, ChannelDetails, MessagesScrollToBottomButton, MessagesScrollToUnreadMentionsButton, CreateChannel, ChannelSearch, Avatar, DropDown, Attachment, PollMessage, OGMetadata, EmojisPopup, FrequentlyEmojis, SceytChatUIKitTheme, ThemeMode, THEME_COLORS, MESSAGE_TYPE, handleSendMessage, handleGetMessage, createOrGetDirectChannel, switchChannelActiveChannel };
|
|
23
|
+
export { SceytChat, ChannelList, Channel, Chat, ChatHeader, MessageList, SendMessage, ChannelDetails, MessagesScrollToBottomButton, MessagesScrollToUnreadMentionsButton, CreateChannel, ChannelSearch, Avatar, DropDown, Attachment, PollMessage, OGMetadata, EmojisPopup, FrequentlyEmojis, SceytChatUIKitTheme, ThemeMode, THEME_COLORS, MESSAGE_TYPE, handleSendMessage, handleGetMessage, createOrGetDirectChannel, switchChannelActiveChannel, blockUsers, unBlockUsers };
|
|
24
24
|
declare global {
|
|
25
25
|
interface Window {
|
|
26
26
|
sceytTabNotifications: any;
|
package/index.js
CHANGED
|
@@ -13449,19 +13449,21 @@ var getContactsAC = function getContactsAC() {
|
|
|
13449
13449
|
payload: {}
|
|
13450
13450
|
};
|
|
13451
13451
|
};
|
|
13452
|
-
var blockUserAC = function blockUserAC(userIds) {
|
|
13452
|
+
var blockUserAC = function blockUserAC(userIds, callback) {
|
|
13453
13453
|
return {
|
|
13454
13454
|
type: BLOCK_USERS,
|
|
13455
13455
|
payload: {
|
|
13456
|
-
userIds: userIds
|
|
13456
|
+
userIds: userIds,
|
|
13457
|
+
callback: callback
|
|
13457
13458
|
}
|
|
13458
13459
|
};
|
|
13459
13460
|
};
|
|
13460
|
-
var unblockUserAC = function unblockUserAC(userIds) {
|
|
13461
|
+
var unblockUserAC = function unblockUserAC(userIds, callback) {
|
|
13461
13462
|
return {
|
|
13462
13463
|
type: UNBLOCK_USERS,
|
|
13463
13464
|
payload: {
|
|
13464
|
-
userIds: userIds
|
|
13465
|
+
userIds: userIds,
|
|
13466
|
+
callback: callback
|
|
13465
13467
|
}
|
|
13466
13468
|
};
|
|
13467
13469
|
};
|
|
@@ -24632,14 +24634,14 @@ function getContacts() {
|
|
|
24632
24634
|
}, _marked$5, null, [[0, 4]]);
|
|
24633
24635
|
}
|
|
24634
24636
|
function blockUser(action) {
|
|
24635
|
-
var SceytChatClient, payload, userIds, blockedUsers, activeChannelId, activeChannel, isDirectChannel, directChannelUser, _iterator, _step, _updateUserStatusOnMa, _updateMembersPresenc, _updateUserStatusOnCh, user, _t2;
|
|
24637
|
+
var SceytChatClient, payload, userIds, callback, blockedUsers, activeChannelId, activeChannel, isDirectChannel, directChannelUser, _iterator, _step, _updateUserStatusOnMa, _updateMembersPresenc, _updateUserStatusOnCh, user, _payload, _callback, _t2;
|
|
24636
24638
|
return _regenerator().w(function (_context2) {
|
|
24637
24639
|
while (1) switch (_context2.p = _context2.n) {
|
|
24638
24640
|
case 0:
|
|
24639
24641
|
_context2.p = 0;
|
|
24640
24642
|
SceytChatClient = getClient();
|
|
24641
24643
|
payload = action.payload;
|
|
24642
|
-
userIds = payload.userIds;
|
|
24644
|
+
userIds = payload.userIds, callback = payload.callback;
|
|
24643
24645
|
_context2.n = 1;
|
|
24644
24646
|
return effects.call(SceytChatClient.blockUsers, userIds);
|
|
24645
24647
|
case 1:
|
|
@@ -24718,26 +24720,34 @@ function blockUser(action) {
|
|
|
24718
24720
|
_context2.n = 6;
|
|
24719
24721
|
break;
|
|
24720
24722
|
case 12:
|
|
24723
|
+
if (callback) {
|
|
24724
|
+
callback(blockedUsers);
|
|
24725
|
+
}
|
|
24721
24726
|
_context2.n = 14;
|
|
24722
24727
|
break;
|
|
24723
24728
|
case 13:
|
|
24724
24729
|
_context2.p = 13;
|
|
24725
24730
|
_t2 = _context2.v;
|
|
24726
24731
|
log.error('error in block users', _t2.message);
|
|
24732
|
+
_payload = action.payload;
|
|
24733
|
+
_callback = _payload.callback;
|
|
24734
|
+
if (_callback) {
|
|
24735
|
+
_callback(null, _t2);
|
|
24736
|
+
}
|
|
24727
24737
|
case 14:
|
|
24728
24738
|
return _context2.a(2);
|
|
24729
24739
|
}
|
|
24730
24740
|
}, _marked2$4, null, [[0, 13]]);
|
|
24731
24741
|
}
|
|
24732
24742
|
function unblockUser(action) {
|
|
24733
|
-
var SceytChatClient, payload, userIds, unblockedUsers, activeChannelId, activeChannel, isDirectChannel, directChannelUser, _iterator2, _step2, _updateUserStatusOnMa2, _updateMembersPresenc2, _updateUserStatusOnCh2, user, updateData, _t3;
|
|
24743
|
+
var SceytChatClient, payload, userIds, callback, unblockedUsers, activeChannelId, activeChannel, isDirectChannel, directChannelUser, _iterator2, _step2, _updateUserStatusOnMa2, _updateMembersPresenc2, _updateUserStatusOnCh2, user, updateData, _payload2, _callback2, _t3;
|
|
24734
24744
|
return _regenerator().w(function (_context3) {
|
|
24735
24745
|
while (1) switch (_context3.p = _context3.n) {
|
|
24736
24746
|
case 0:
|
|
24737
24747
|
_context3.p = 0;
|
|
24738
24748
|
SceytChatClient = getClient();
|
|
24739
24749
|
payload = action.payload;
|
|
24740
|
-
userIds = payload.userIds;
|
|
24750
|
+
userIds = payload.userIds, callback = payload.callback;
|
|
24741
24751
|
_context3.n = 1;
|
|
24742
24752
|
return effects.call(SceytChatClient.unblockUsers, userIds);
|
|
24743
24753
|
case 1:
|
|
@@ -24817,12 +24827,20 @@ function unblockUser(action) {
|
|
|
24817
24827
|
_context3.n = 6;
|
|
24818
24828
|
break;
|
|
24819
24829
|
case 12:
|
|
24830
|
+
if (callback) {
|
|
24831
|
+
callback(unblockedUsers);
|
|
24832
|
+
}
|
|
24820
24833
|
_context3.n = 14;
|
|
24821
24834
|
break;
|
|
24822
24835
|
case 13:
|
|
24823
24836
|
_context3.p = 13;
|
|
24824
24837
|
_t3 = _context3.v;
|
|
24825
24838
|
log.error('error in unblock users', _t3.message);
|
|
24839
|
+
_payload2 = action.payload;
|
|
24840
|
+
_callback2 = _payload2.callback;
|
|
24841
|
+
if (_callback2) {
|
|
24842
|
+
_callback2(null, _t3);
|
|
24843
|
+
}
|
|
24826
24844
|
case 14:
|
|
24827
24845
|
return _context3.a(2);
|
|
24828
24846
|
}
|
|
@@ -53023,6 +53041,34 @@ var handleSendMessage = function handleSendMessage(message, channelId, connectio
|
|
|
53023
53041
|
var handleGetMessage = function handleGetMessage(channelId, messageId) {
|
|
53024
53042
|
return store.dispatch(getMessageAC(channelId, messageId));
|
|
53025
53043
|
};
|
|
53044
|
+
var blockUsers = function blockUsers(userIds, callback) {
|
|
53045
|
+
return new Promise(function (resolve, reject) {
|
|
53046
|
+
store.dispatch(blockUserAC(userIds, function (users, error) {
|
|
53047
|
+
if (error) {
|
|
53048
|
+
reject(error);
|
|
53049
|
+
} else {
|
|
53050
|
+
if (callback) {
|
|
53051
|
+
callback(users);
|
|
53052
|
+
}
|
|
53053
|
+
resolve(users);
|
|
53054
|
+
}
|
|
53055
|
+
}));
|
|
53056
|
+
});
|
|
53057
|
+
};
|
|
53058
|
+
var unBlockUsers = function unBlockUsers(userIds, callback) {
|
|
53059
|
+
return new Promise(function (resolve, reject) {
|
|
53060
|
+
store.dispatch(unblockUserAC(userIds, function (users, error) {
|
|
53061
|
+
if (error) {
|
|
53062
|
+
reject(error);
|
|
53063
|
+
} else {
|
|
53064
|
+
if (callback) {
|
|
53065
|
+
callback(users);
|
|
53066
|
+
}
|
|
53067
|
+
resolve(users);
|
|
53068
|
+
}
|
|
53069
|
+
}));
|
|
53070
|
+
});
|
|
53071
|
+
};
|
|
53026
53072
|
|
|
53027
53073
|
exports.Attachment = Attachment$1;
|
|
53028
53074
|
exports.Avatar = Avatar;
|
|
@@ -53046,9 +53092,11 @@ exports.PollMessage = PollMessage;
|
|
|
53046
53092
|
exports.SceytChat = SceytChatContainer;
|
|
53047
53093
|
exports.SendMessage = SendMessageInput;
|
|
53048
53094
|
exports.THEME_COLORS = THEME_COLORS;
|
|
53095
|
+
exports.blockUsers = blockUsers;
|
|
53049
53096
|
exports.createOrGetDirectChannel = createOrGetDirectChannel;
|
|
53050
53097
|
exports.handleGetMessage = handleGetMessage;
|
|
53051
53098
|
exports.handleSendMessage = handleSendMessage;
|
|
53052
53099
|
exports.switchChannelActiveChannel = switchChannelActiveChannel;
|
|
53053
53100
|
exports.trimReactMessage = trimReactMessage;
|
|
53101
|
+
exports.unBlockUsers = unBlockUsers;
|
|
53054
53102
|
//# sourceMappingURL=index.js.map
|
package/index.modern.js
CHANGED
|
@@ -13448,19 +13448,21 @@ var getContactsAC = function getContactsAC() {
|
|
|
13448
13448
|
payload: {}
|
|
13449
13449
|
};
|
|
13450
13450
|
};
|
|
13451
|
-
var blockUserAC = function blockUserAC(userIds) {
|
|
13451
|
+
var blockUserAC = function blockUserAC(userIds, callback) {
|
|
13452
13452
|
return {
|
|
13453
13453
|
type: BLOCK_USERS,
|
|
13454
13454
|
payload: {
|
|
13455
|
-
userIds: userIds
|
|
13455
|
+
userIds: userIds,
|
|
13456
|
+
callback: callback
|
|
13456
13457
|
}
|
|
13457
13458
|
};
|
|
13458
13459
|
};
|
|
13459
|
-
var unblockUserAC = function unblockUserAC(userIds) {
|
|
13460
|
+
var unblockUserAC = function unblockUserAC(userIds, callback) {
|
|
13460
13461
|
return {
|
|
13461
13462
|
type: UNBLOCK_USERS,
|
|
13462
13463
|
payload: {
|
|
13463
|
-
userIds: userIds
|
|
13464
|
+
userIds: userIds,
|
|
13465
|
+
callback: callback
|
|
13464
13466
|
}
|
|
13465
13467
|
};
|
|
13466
13468
|
};
|
|
@@ -24631,14 +24633,14 @@ function getContacts() {
|
|
|
24631
24633
|
}, _marked$5, null, [[0, 4]]);
|
|
24632
24634
|
}
|
|
24633
24635
|
function blockUser(action) {
|
|
24634
|
-
var SceytChatClient, payload, userIds, blockedUsers, activeChannelId, activeChannel, isDirectChannel, directChannelUser, _iterator, _step, _updateUserStatusOnMa, _updateMembersPresenc, _updateUserStatusOnCh, user, _t2;
|
|
24636
|
+
var SceytChatClient, payload, userIds, callback, blockedUsers, activeChannelId, activeChannel, isDirectChannel, directChannelUser, _iterator, _step, _updateUserStatusOnMa, _updateMembersPresenc, _updateUserStatusOnCh, user, _payload, _callback, _t2;
|
|
24635
24637
|
return _regenerator().w(function (_context2) {
|
|
24636
24638
|
while (1) switch (_context2.p = _context2.n) {
|
|
24637
24639
|
case 0:
|
|
24638
24640
|
_context2.p = 0;
|
|
24639
24641
|
SceytChatClient = getClient();
|
|
24640
24642
|
payload = action.payload;
|
|
24641
|
-
userIds = payload.userIds;
|
|
24643
|
+
userIds = payload.userIds, callback = payload.callback;
|
|
24642
24644
|
_context2.n = 1;
|
|
24643
24645
|
return call(SceytChatClient.blockUsers, userIds);
|
|
24644
24646
|
case 1:
|
|
@@ -24717,26 +24719,34 @@ function blockUser(action) {
|
|
|
24717
24719
|
_context2.n = 6;
|
|
24718
24720
|
break;
|
|
24719
24721
|
case 12:
|
|
24722
|
+
if (callback) {
|
|
24723
|
+
callback(blockedUsers);
|
|
24724
|
+
}
|
|
24720
24725
|
_context2.n = 14;
|
|
24721
24726
|
break;
|
|
24722
24727
|
case 13:
|
|
24723
24728
|
_context2.p = 13;
|
|
24724
24729
|
_t2 = _context2.v;
|
|
24725
24730
|
log.error('error in block users', _t2.message);
|
|
24731
|
+
_payload = action.payload;
|
|
24732
|
+
_callback = _payload.callback;
|
|
24733
|
+
if (_callback) {
|
|
24734
|
+
_callback(null, _t2);
|
|
24735
|
+
}
|
|
24726
24736
|
case 14:
|
|
24727
24737
|
return _context2.a(2);
|
|
24728
24738
|
}
|
|
24729
24739
|
}, _marked2$4, null, [[0, 13]]);
|
|
24730
24740
|
}
|
|
24731
24741
|
function unblockUser(action) {
|
|
24732
|
-
var SceytChatClient, payload, userIds, unblockedUsers, activeChannelId, activeChannel, isDirectChannel, directChannelUser, _iterator2, _step2, _updateUserStatusOnMa2, _updateMembersPresenc2, _updateUserStatusOnCh2, user, updateData, _t3;
|
|
24742
|
+
var SceytChatClient, payload, userIds, callback, unblockedUsers, activeChannelId, activeChannel, isDirectChannel, directChannelUser, _iterator2, _step2, _updateUserStatusOnMa2, _updateMembersPresenc2, _updateUserStatusOnCh2, user, updateData, _payload2, _callback2, _t3;
|
|
24733
24743
|
return _regenerator().w(function (_context3) {
|
|
24734
24744
|
while (1) switch (_context3.p = _context3.n) {
|
|
24735
24745
|
case 0:
|
|
24736
24746
|
_context3.p = 0;
|
|
24737
24747
|
SceytChatClient = getClient();
|
|
24738
24748
|
payload = action.payload;
|
|
24739
|
-
userIds = payload.userIds;
|
|
24749
|
+
userIds = payload.userIds, callback = payload.callback;
|
|
24740
24750
|
_context3.n = 1;
|
|
24741
24751
|
return call(SceytChatClient.unblockUsers, userIds);
|
|
24742
24752
|
case 1:
|
|
@@ -24816,12 +24826,20 @@ function unblockUser(action) {
|
|
|
24816
24826
|
_context3.n = 6;
|
|
24817
24827
|
break;
|
|
24818
24828
|
case 12:
|
|
24829
|
+
if (callback) {
|
|
24830
|
+
callback(unblockedUsers);
|
|
24831
|
+
}
|
|
24819
24832
|
_context3.n = 14;
|
|
24820
24833
|
break;
|
|
24821
24834
|
case 13:
|
|
24822
24835
|
_context3.p = 13;
|
|
24823
24836
|
_t3 = _context3.v;
|
|
24824
24837
|
log.error('error in unblock users', _t3.message);
|
|
24838
|
+
_payload2 = action.payload;
|
|
24839
|
+
_callback2 = _payload2.callback;
|
|
24840
|
+
if (_callback2) {
|
|
24841
|
+
_callback2(null, _t3);
|
|
24842
|
+
}
|
|
24825
24843
|
case 14:
|
|
24826
24844
|
return _context3.a(2);
|
|
24827
24845
|
}
|
|
@@ -53022,6 +53040,34 @@ var handleSendMessage = function handleSendMessage(message, channelId, connectio
|
|
|
53022
53040
|
var handleGetMessage = function handleGetMessage(channelId, messageId) {
|
|
53023
53041
|
return store.dispatch(getMessageAC(channelId, messageId));
|
|
53024
53042
|
};
|
|
53043
|
+
var blockUsers = function blockUsers(userIds, callback) {
|
|
53044
|
+
return new Promise(function (resolve, reject) {
|
|
53045
|
+
store.dispatch(blockUserAC(userIds, function (users, error) {
|
|
53046
|
+
if (error) {
|
|
53047
|
+
reject(error);
|
|
53048
|
+
} else {
|
|
53049
|
+
if (callback) {
|
|
53050
|
+
callback(users);
|
|
53051
|
+
}
|
|
53052
|
+
resolve(users);
|
|
53053
|
+
}
|
|
53054
|
+
}));
|
|
53055
|
+
});
|
|
53056
|
+
};
|
|
53057
|
+
var unBlockUsers = function unBlockUsers(userIds, callback) {
|
|
53058
|
+
return new Promise(function (resolve, reject) {
|
|
53059
|
+
store.dispatch(unblockUserAC(userIds, function (users, error) {
|
|
53060
|
+
if (error) {
|
|
53061
|
+
reject(error);
|
|
53062
|
+
} else {
|
|
53063
|
+
if (callback) {
|
|
53064
|
+
callback(users);
|
|
53065
|
+
}
|
|
53066
|
+
resolve(users);
|
|
53067
|
+
}
|
|
53068
|
+
}));
|
|
53069
|
+
});
|
|
53070
|
+
};
|
|
53025
53071
|
|
|
53026
|
-
export { Attachment$1 as Attachment, Avatar, Channel, ChannelDetailsContainer as ChannelDetails, ChannelList, ChannelSearch, Chat, ChatHeader, CreateChannel, DropDown, EmojisPopup, FrequentlyEmojis, MESSAGE_TYPE, MessagesContainer as MessageList, MessageStatusIcon, MessageTextFormat, MessagesScrollToBottomButton, MessagesScrollToUnreadMentionsButton, OGMetadata, PollMessage, SceytChatContainer as SceytChat, SendMessageInput as SendMessage, THEME_COLORS, createOrGetDirectChannel, handleGetMessage, handleSendMessage, switchChannelActiveChannel, trimReactMessage };
|
|
53072
|
+
export { Attachment$1 as Attachment, Avatar, Channel, ChannelDetailsContainer as ChannelDetails, ChannelList, ChannelSearch, Chat, ChatHeader, CreateChannel, DropDown, EmojisPopup, FrequentlyEmojis, MESSAGE_TYPE, MessagesContainer as MessageList, MessageStatusIcon, MessageTextFormat, MessagesScrollToBottomButton, MessagesScrollToUnreadMentionsButton, OGMetadata, PollMessage, SceytChatContainer as SceytChat, SendMessageInput as SendMessage, THEME_COLORS, blockUsers, createOrGetDirectChannel, handleGetMessage, handleSendMessage, switchChannelActiveChannel, trimReactMessage, unBlockUsers };
|
|
53027
53073
|
//# sourceMappingURL=index.modern.js.map
|