sceyt-chat-react-uikit 1.7.2-beta.8 → 1.7.2-beta.9
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/index.js +20 -48
- package/index.modern.js +20 -29
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -1,24 +1,5 @@
|
|
|
1
1
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
2
2
|
|
|
3
|
-
function _interopNamespace(e) {
|
|
4
|
-
if (e && e.__esModule) { return e; } else {
|
|
5
|
-
var n = {};
|
|
6
|
-
if (e) {
|
|
7
|
-
Object.keys(e).forEach(function (k) {
|
|
8
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
9
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
10
|
-
enumerable: true,
|
|
11
|
-
get: function () {
|
|
12
|
-
return e[k];
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
n['default'] = e;
|
|
18
|
-
return n;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
3
|
var React = require('react');
|
|
23
4
|
var React__default = _interopDefault(React);
|
|
24
5
|
var reactRedux = require('react-redux');
|
|
@@ -44,6 +25,7 @@ var LexicalOnChangePlugin = require('@lexical/react/LexicalOnChangePlugin');
|
|
|
44
25
|
var ReactDOM = require('react-dom');
|
|
45
26
|
var LexicalTypeaheadMenuPlugin = require('@lexical/react/LexicalTypeaheadMenuPlugin');
|
|
46
27
|
var offset = require('@lexical/offset');
|
|
28
|
+
var MicRecorder = _interopDefault(require('mic-recorder-to-mp3'));
|
|
47
29
|
var LexicalHistoryPlugin = require('@lexical/react/LexicalHistoryPlugin');
|
|
48
30
|
|
|
49
31
|
// src/utils/formatProdErrorMessage.ts
|
|
@@ -26555,7 +26537,10 @@ function ReactionsPopup(_ref) {
|
|
|
26555
26537
|
}, reactions.map(function (reaction) {
|
|
26556
26538
|
return /*#__PURE__*/React__default.createElement(ReactionItem$1, {
|
|
26557
26539
|
key: reaction.id,
|
|
26558
|
-
hoverBackgroundColor: backgroundHovered
|
|
26540
|
+
hoverBackgroundColor: backgroundHovered,
|
|
26541
|
+
onClick: function onClick() {
|
|
26542
|
+
return handleAddDeleteEmoji(reaction.key);
|
|
26543
|
+
}
|
|
26559
26544
|
}, /*#__PURE__*/React__default.createElement(AvatarWrapper, null, /*#__PURE__*/React__default.createElement(Avatar, {
|
|
26560
26545
|
name: reaction.user.firstName || reaction.user.id,
|
|
26561
26546
|
image: reaction.user.avatarUrl,
|
|
@@ -26566,11 +26551,7 @@ function ReactionsPopup(_ref) {
|
|
|
26566
26551
|
color: textPrimary
|
|
26567
26552
|
}, makeUsername(reaction.user.id === user.id ? reaction.user : contactsMap[reaction.user.id], reaction.user, getFromContacts)), /*#__PURE__*/React__default.createElement(SubTitle, {
|
|
26568
26553
|
color: textSecondary
|
|
26569
|
-
}, reaction.user.presence && reaction.user.presence.state === USER_PRESENCE_STATUS.ONLINE ? 'Online' : reaction.user.presence && reaction.user.presence.lastActiveAt && userLastActiveDateFormat(reaction.user.presence.lastActiveAt))), /*#__PURE__*/React__default.createElement(ReactionKey,
|
|
26570
|
-
onClick: function onClick() {
|
|
26571
|
-
return handleAddDeleteEmoji(reaction.key);
|
|
26572
|
-
}
|
|
26573
|
-
}, reaction.key));
|
|
26554
|
+
}, reaction.user.presence && reaction.user.presence.state === USER_PRESENCE_STATUS.ONLINE ? 'Online' : reaction.user.presence && reaction.user.presence.lastActiveAt && userLastActiveDateFormat(reaction.user.presence.lastActiveAt))), /*#__PURE__*/React__default.createElement(ReactionKey, null, reaction.key));
|
|
26574
26555
|
})));
|
|
26575
26556
|
}
|
|
26576
26557
|
var Container$d = styled__default.div(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n position: absolute;\n /*right: ", ";*/\n right: ", ";\n /*left: ", ";*/\n left: ", ";\n top: ", ";\n bottom: ", ";\n width: 340px;\n height: ", "px;\n //overflow: ", ";\n overflow: hidden;\n max-height: 320px;\n background: ", ";\n //border: 1px solid #dfe0eb;\n box-shadow:\n 0 6px 24px -6px rgba(15, 34, 67, 0.12),\n 0px 1px 3px rgba(24, 23, 37, 0.14);\n box-sizing: border-box;\n //box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);\n border-radius: ", ";\n visibility: ", ";\n transition: all 0.2s;\n\n direction: initial;\n z-index: 12;\n &::after {\n content: '';\n position: absolute;\n width: 12px;\n height: 12px;\n\n right: ", ";\n left: ", ";\n top: ", ";\n bottom: ", ";\n transform: rotate(45deg);\n box-shadow: ", ";\n border-radius: 2px;\n visibility: ", ";\n transition-delay: 150ms;\n transition-property: visibility;\n\n background: ", ";\n }\n"])), function (props) {
|
|
@@ -26640,7 +26621,7 @@ var ReactionScoreItem = styled__default.div(_templateObject8$9 || (_templateObje
|
|
|
26640
26621
|
return props.active && !props.bubbleStyle && "\n &::after {\n content: '';\n position: absolute;\n left: 0;\n bottom: -13px;\n width: 100%;\n height: 2px;\n background-color: " + props.activeColor + ";\n border-radius: 2px;\n }\n ";
|
|
26641
26622
|
}, TabKey);
|
|
26642
26623
|
var ReactionKey = styled__default.span(_templateObject9$9 || (_templateObject9$9 = _taggedTemplateLiteralLoose(["\n font-family:\n apple color emoji,\n segoe ui emoji,\n noto color emoji,\n android emoji,\n emojisymbols,\n emojione mozilla,\n twemoji mozilla,\n segoe ui symbol;\n font-size: 20px;\n cursor: pointer;\n"])));
|
|
26643
|
-
var ReactionItem$1 = styled__default.li(_templateObject0$8 || (_templateObject0$8 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: 15px;\n padding: 6px 16px;\n transition: all 0.2s;\n\n &:hover {\n background-color: ", ";\n }\n\n & ", " {\n width: 10px;\n height: 10px;\n }\n"])), function (props) {
|
|
26624
|
+
var ReactionItem$1 = styled__default.li(_templateObject0$8 || (_templateObject0$8 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: 15px;\n padding: 6px 16px;\n transition: all 0.2s;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n\n & ", " {\n width: 10px;\n height: 10px;\n }\n"])), function (props) {
|
|
26644
26625
|
return props.hoverBackgroundColor;
|
|
26645
26626
|
}, UserStatus);
|
|
26646
26627
|
|
|
@@ -36506,29 +36487,20 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
36506
36487
|
}, [currentRecordedFile, currentChannelId]);
|
|
36507
36488
|
React.useEffect(function () {
|
|
36508
36489
|
if (!currentRecordedFile) {
|
|
36509
|
-
|
|
36510
|
-
|
|
36511
|
-
|
|
36512
|
-
|
|
36513
|
-
|
|
36514
|
-
|
|
36515
|
-
|
|
36516
|
-
|
|
36517
|
-
|
|
36518
|
-
|
|
36519
|
-
setRecorder(recorder);
|
|
36520
|
-
});
|
|
36521
|
-
}, function (e) {
|
|
36522
|
-
log.error('Failed to init mic-recorder-to-mp3', e);
|
|
36523
|
-
});
|
|
36524
|
-
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
36525
|
-
}
|
|
36526
|
-
}();
|
|
36527
|
-
return _temp5 && _temp5.then ? _temp5.then(function () {}) : void 0;
|
|
36528
|
-
} catch (e) {
|
|
36529
|
-
Promise.reject(e);
|
|
36490
|
+
try {
|
|
36491
|
+
if (!recorder) {
|
|
36492
|
+
try {
|
|
36493
|
+
var newRecorder = new MicRecorder({
|
|
36494
|
+
bitRate: 128
|
|
36495
|
+
});
|
|
36496
|
+
setRecorder(newRecorder);
|
|
36497
|
+
} catch (e) {
|
|
36498
|
+
log.error('Failed to init mic-recorder-to-mp3', e);
|
|
36499
|
+
}
|
|
36530
36500
|
}
|
|
36531
|
-
}
|
|
36501
|
+
} catch (e) {
|
|
36502
|
+
Promise.reject(e);
|
|
36503
|
+
}
|
|
36532
36504
|
}
|
|
36533
36505
|
}, [currentRecordedFile]);
|
|
36534
36506
|
React.useEffect(function () {
|
package/index.modern.js
CHANGED
|
@@ -20,6 +20,7 @@ import { OnChangePlugin } from '@lexical/react/LexicalOnChangePlugin';
|
|
|
20
20
|
import { createPortal } from 'react-dom';
|
|
21
21
|
import { useBasicTypeaheadTriggerMatch, LexicalTypeaheadMenuPlugin, MenuOption } from '@lexical/react/LexicalTypeaheadMenuPlugin';
|
|
22
22
|
import { $createOffsetView } from '@lexical/offset';
|
|
23
|
+
import MicRecorder from 'mic-recorder-to-mp3';
|
|
23
24
|
import { HistoryPlugin } from '@lexical/react/LexicalHistoryPlugin';
|
|
24
25
|
|
|
25
26
|
// src/utils/formatProdErrorMessage.ts
|
|
@@ -26534,7 +26535,10 @@ function ReactionsPopup(_ref) {
|
|
|
26534
26535
|
}, reactions.map(function (reaction) {
|
|
26535
26536
|
return /*#__PURE__*/React__default.createElement(ReactionItem$1, {
|
|
26536
26537
|
key: reaction.id,
|
|
26537
|
-
hoverBackgroundColor: backgroundHovered
|
|
26538
|
+
hoverBackgroundColor: backgroundHovered,
|
|
26539
|
+
onClick: function onClick() {
|
|
26540
|
+
return handleAddDeleteEmoji(reaction.key);
|
|
26541
|
+
}
|
|
26538
26542
|
}, /*#__PURE__*/React__default.createElement(AvatarWrapper, null, /*#__PURE__*/React__default.createElement(Avatar, {
|
|
26539
26543
|
name: reaction.user.firstName || reaction.user.id,
|
|
26540
26544
|
image: reaction.user.avatarUrl,
|
|
@@ -26545,11 +26549,7 @@ function ReactionsPopup(_ref) {
|
|
|
26545
26549
|
color: textPrimary
|
|
26546
26550
|
}, makeUsername(reaction.user.id === user.id ? reaction.user : contactsMap[reaction.user.id], reaction.user, getFromContacts)), /*#__PURE__*/React__default.createElement(SubTitle, {
|
|
26547
26551
|
color: textSecondary
|
|
26548
|
-
}, reaction.user.presence && reaction.user.presence.state === USER_PRESENCE_STATUS.ONLINE ? 'Online' : reaction.user.presence && reaction.user.presence.lastActiveAt && userLastActiveDateFormat(reaction.user.presence.lastActiveAt))), /*#__PURE__*/React__default.createElement(ReactionKey,
|
|
26549
|
-
onClick: function onClick() {
|
|
26550
|
-
return handleAddDeleteEmoji(reaction.key);
|
|
26551
|
-
}
|
|
26552
|
-
}, reaction.key));
|
|
26552
|
+
}, reaction.user.presence && reaction.user.presence.state === USER_PRESENCE_STATUS.ONLINE ? 'Online' : reaction.user.presence && reaction.user.presence.lastActiveAt && userLastActiveDateFormat(reaction.user.presence.lastActiveAt))), /*#__PURE__*/React__default.createElement(ReactionKey, null, reaction.key));
|
|
26553
26553
|
})));
|
|
26554
26554
|
}
|
|
26555
26555
|
var Container$d = styled.div(_templateObject$q || (_templateObject$q = _taggedTemplateLiteralLoose(["\n position: absolute;\n /*right: ", ";*/\n right: ", ";\n /*left: ", ";*/\n left: ", ";\n top: ", ";\n bottom: ", ";\n width: 340px;\n height: ", "px;\n //overflow: ", ";\n overflow: hidden;\n max-height: 320px;\n background: ", ";\n //border: 1px solid #dfe0eb;\n box-shadow:\n 0 6px 24px -6px rgba(15, 34, 67, 0.12),\n 0px 1px 3px rgba(24, 23, 37, 0.14);\n box-sizing: border-box;\n //box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);\n border-radius: ", ";\n visibility: ", ";\n transition: all 0.2s;\n\n direction: initial;\n z-index: 12;\n &::after {\n content: '';\n position: absolute;\n width: 12px;\n height: 12px;\n\n right: ", ";\n left: ", ";\n top: ", ";\n bottom: ", ";\n transform: rotate(45deg);\n box-shadow: ", ";\n border-radius: 2px;\n visibility: ", ";\n transition-delay: 150ms;\n transition-property: visibility;\n\n background: ", ";\n }\n"])), function (props) {
|
|
@@ -26619,7 +26619,7 @@ var ReactionScoreItem = styled.div(_templateObject8$9 || (_templateObject8$9 = _
|
|
|
26619
26619
|
return props.active && !props.bubbleStyle && "\n &::after {\n content: '';\n position: absolute;\n left: 0;\n bottom: -13px;\n width: 100%;\n height: 2px;\n background-color: " + props.activeColor + ";\n border-radius: 2px;\n }\n ";
|
|
26620
26620
|
}, TabKey);
|
|
26621
26621
|
var ReactionKey = styled.span(_templateObject9$9 || (_templateObject9$9 = _taggedTemplateLiteralLoose(["\n font-family:\n apple color emoji,\n segoe ui emoji,\n noto color emoji,\n android emoji,\n emojisymbols,\n emojione mozilla,\n twemoji mozilla,\n segoe ui symbol;\n font-size: 20px;\n cursor: pointer;\n"])));
|
|
26622
|
-
var ReactionItem$1 = styled.li(_templateObject0$8 || (_templateObject0$8 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: 15px;\n padding: 6px 16px;\n transition: all 0.2s;\n\n &:hover {\n background-color: ", ";\n }\n\n & ", " {\n width: 10px;\n height: 10px;\n }\n"])), function (props) {
|
|
26622
|
+
var ReactionItem$1 = styled.li(_templateObject0$8 || (_templateObject0$8 = _taggedTemplateLiteralLoose(["\n display: flex;\n align-items: center;\n font-size: 15px;\n padding: 6px 16px;\n transition: all 0.2s;\n cursor: pointer;\n\n &:hover {\n background-color: ", ";\n }\n\n & ", " {\n width: 10px;\n height: 10px;\n }\n"])), function (props) {
|
|
26623
26623
|
return props.hoverBackgroundColor;
|
|
26624
26624
|
}, UserStatus);
|
|
26625
26625
|
|
|
@@ -36485,29 +36485,20 @@ var AudioRecord = function AudioRecord(_ref) {
|
|
|
36485
36485
|
}, [currentRecordedFile, currentChannelId]);
|
|
36486
36486
|
useEffect(function () {
|
|
36487
36487
|
if (!currentRecordedFile) {
|
|
36488
|
-
|
|
36489
|
-
|
|
36490
|
-
|
|
36491
|
-
|
|
36492
|
-
|
|
36493
|
-
|
|
36494
|
-
|
|
36495
|
-
|
|
36496
|
-
|
|
36497
|
-
|
|
36498
|
-
setRecorder(recorder);
|
|
36499
|
-
});
|
|
36500
|
-
}, function (e) {
|
|
36501
|
-
log.error('Failed to init mic-recorder-to-mp3', e);
|
|
36502
|
-
});
|
|
36503
|
-
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
36504
|
-
}
|
|
36505
|
-
}();
|
|
36506
|
-
return _temp5 && _temp5.then ? _temp5.then(function () {}) : void 0;
|
|
36507
|
-
} catch (e) {
|
|
36508
|
-
Promise.reject(e);
|
|
36488
|
+
try {
|
|
36489
|
+
if (!recorder) {
|
|
36490
|
+
try {
|
|
36491
|
+
var newRecorder = new MicRecorder({
|
|
36492
|
+
bitRate: 128
|
|
36493
|
+
});
|
|
36494
|
+
setRecorder(newRecorder);
|
|
36495
|
+
} catch (e) {
|
|
36496
|
+
log.error('Failed to init mic-recorder-to-mp3', e);
|
|
36497
|
+
}
|
|
36509
36498
|
}
|
|
36510
|
-
}
|
|
36499
|
+
} catch (e) {
|
|
36500
|
+
Promise.reject(e);
|
|
36501
|
+
}
|
|
36511
36502
|
}
|
|
36512
36503
|
}, [currentRecordedFile]);
|
|
36513
36504
|
useEffect(function () {
|