@appquality/unguess-design-system 3.1.88-beta-attachments → 3.1.88-tooltip
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/CHANGELOG.md +253 -0
- package/build/index.d.ts +1 -0
- package/build/index.js +999 -577
- package/build/stories/buttons/button/index.stories.d.ts +0 -1
- package/build/stories/buttons/utils.d.ts +39 -39
- package/build/stories/chat/_types.d.ts +4 -2
- package/build/stories/chat/context/chatContext.d.ts +10 -5
- package/build/stories/chat/index.stories.d.ts +2 -2
- package/build/stories/chat/parts/ThumbnailContainer/DeleteThumbnailX.d.ts +1 -2
- package/build/stories/chat/parts/ThumbnailContainer/ImageThumbnail.d.ts +11 -0
- package/build/stories/chat/parts/ThumbnailContainer/VideoThumbnail.d.ts +11 -0
- package/build/stories/chat/parts/ThumbnailContainer/index.d.ts +2 -1
- package/build/stories/dropdowns/select/index.stories.d.ts +0 -1
- package/build/stories/editor/index.stories.d.ts +0 -1
- package/build/stories/highlight/_types.d.ts +40 -0
- package/build/stories/highlight/demo-parts/data.d.ts +49 -0
- package/build/stories/highlight/demo-parts/transcript-base.d.ts +5 -0
- package/build/stories/highlight/demo-parts/transcript-diarization.d.ts +5 -0
- package/build/stories/highlight/demo-parts/transcript-paragraph.d.ts +5 -0
- package/build/stories/highlight/highlightContext.d.ts +10 -0
- package/build/stories/highlight/index.d.ts +10 -0
- package/build/stories/highlight/index.stories.d.ts +22 -0
- package/build/stories/highlight/searchable.d.ts +4 -0
- package/build/stories/player/_types.d.ts +18 -0
- package/build/stories/player/index.stories.d.ts +1 -2
- package/build/stories/player/parts/bookmark.d.ts +2 -0
- package/build/stories/player/parts/controls.d.ts +7 -2
- package/build/stories/player/parts/controlsCenterGroup.d.ts +2 -1
- package/build/stories/player/parts/cutterButton.d.ts +6 -0
- package/build/stories/player/parts/progress.d.ts +11 -0
- package/build/stories/player/parts/progressContext.d.ts +16 -0
- package/build/stories/player/parts/timeLabel.d.ts +2 -2
- package/build/stories/tooltip/_types.d.ts +1 -0
- package/build/stories/tooltip/index.d.ts +1 -0
- package/build/stories/tooltip/index.stories.d.ts +1 -0
- package/package.json +4 -2
- package/build/stories/chat/parts/ThumbnailContainer/Thumbnail.d.ts +0 -14
- package/yarn-error.log +0 -17994
package/build/index.js
CHANGED
|
@@ -25,6 +25,7 @@ var sunburst = require('@nivo/sunburst');
|
|
|
25
25
|
var waffle = require('@nivo/waffle');
|
|
26
26
|
var line = require('@nivo/line');
|
|
27
27
|
var reactForms = require('@zendeskgarden/react-forms');
|
|
28
|
+
var uuid = require('uuid');
|
|
28
29
|
var react = require('@tiptap/react');
|
|
29
30
|
var reactTooltips = require('@zendeskgarden/react-tooltips');
|
|
30
31
|
var Typography = require('@tiptap/extension-typography');
|
|
@@ -37,13 +38,13 @@ var Mention = require('@tiptap/extension-mention');
|
|
|
37
38
|
var tippy = require('tippy.js');
|
|
38
39
|
var Image$2 = require('@tiptap/extension-image');
|
|
39
40
|
var Dropcursor = require('@tiptap/extension-dropcursor');
|
|
41
|
+
var reactGrid = require('@zendeskgarden/react-grid');
|
|
40
42
|
var reactModals = require('@zendeskgarden/react-modals');
|
|
41
43
|
var SlickSlider = require('react-slick');
|
|
42
44
|
var Video = require('@appquality/stream-player');
|
|
43
45
|
var containerUtilities = require('@zendeskgarden/container-utilities');
|
|
44
46
|
var reactColorpickers = require('@zendeskgarden/react-colorpickers');
|
|
45
47
|
var reactDropdowns = require('@zendeskgarden/react-dropdowns');
|
|
46
|
-
var reactGrid = require('@zendeskgarden/react-grid');
|
|
47
48
|
var formik = require('formik');
|
|
48
49
|
var reactChrome = require('@zendeskgarden/react-chrome');
|
|
49
50
|
var reactPagination = require('@zendeskgarden/react-pagination');
|
|
@@ -333,8 +334,8 @@ const UgContainerCard = styled__default["default"](reactNotifications.Well) `
|
|
|
333
334
|
`;
|
|
334
335
|
const ContainerCard = (props) => jsxRuntime.jsx(UgContainerCard, Object.assign({}, props));
|
|
335
336
|
|
|
336
|
-
var _a, _b, _c, _d, _e, _f, _g$
|
|
337
|
-
const components = Object.assign(Object.assign(Object.assign(Object.assign({}, reactTheming.DEFAULT_THEME.components), { chrome: Object.assign(Object.assign({}, (_a = reactTheming.DEFAULT_THEME.components) === null || _a === void 0 ? void 0 : _a.chrome), { header: Object.assign(Object.assign({}, (_c = (_b = reactTheming.DEFAULT_THEME.components) === null || _b === void 0 ? void 0 : _b.chrome) === null || _c === void 0 ? void 0 : _c.header), { height: "64px" }), nav: Object.assign(Object.assign({}, (_e = (_d = reactTheming.DEFAULT_THEME.components) === null || _d === void 0 ? void 0 : _d.chrome) === null || _e === void 0 ? void 0 : _e.nav), { openWidth: 240, closedWidth: 36, workspaceDropdownWidth: 192 }) }), notification: Object.assign(Object.assign({}, (_f = reactTheming.DEFAULT_THEME.components) === null || _f === void 0 ? void 0 : _f.notification), { card: Object.assign(Object.assign({}, (_h = (_g$
|
|
337
|
+
var _a, _b, _c, _d, _e, _f, _g$d, _h;
|
|
338
|
+
const components = Object.assign(Object.assign(Object.assign(Object.assign({}, reactTheming.DEFAULT_THEME.components), { chrome: Object.assign(Object.assign({}, (_a = reactTheming.DEFAULT_THEME.components) === null || _a === void 0 ? void 0 : _a.chrome), { header: Object.assign(Object.assign({}, (_c = (_b = reactTheming.DEFAULT_THEME.components) === null || _b === void 0 ? void 0 : _b.chrome) === null || _c === void 0 ? void 0 : _c.header), { height: "64px" }), nav: Object.assign(Object.assign({}, (_e = (_d = reactTheming.DEFAULT_THEME.components) === null || _d === void 0 ? void 0 : _d.chrome) === null || _e === void 0 ? void 0 : _e.nav), { openWidth: 240, closedWidth: 36, workspaceDropdownWidth: 192 }) }), notification: Object.assign(Object.assign({}, (_f = reactTheming.DEFAULT_THEME.components) === null || _f === void 0 ? void 0 : _f.notification), { card: Object.assign(Object.assign({}, (_h = (_g$d = reactTheming.DEFAULT_THEME.components) === null || _g$d === void 0 ? void 0 : _g$d.notification) === null || _h === void 0 ? void 0 : _h.well), { padding: "16px" }) }) }), cardCmponentStyle), { "text.primary": () => ({
|
|
338
339
|
color: getColor(colors.primaryHue, 600),
|
|
339
340
|
}), "text.success": () => ({
|
|
340
341
|
color: getColor(colors.successHue, 700),
|
|
@@ -841,48 +842,48 @@ Tag.Avatar = StyledAvatar;
|
|
|
841
842
|
Tag.Close = StyledClose;
|
|
842
843
|
Tag.SecondaryText = StyledSpan;
|
|
843
844
|
|
|
844
|
-
var _path$
|
|
845
|
-
function _extends$
|
|
846
|
-
const SvgUgSquare = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
845
|
+
var _path$F;
|
|
846
|
+
function _extends$S() { _extends$S = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$S.apply(this, arguments); }
|
|
847
|
+
const SvgUgSquare = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$S({
|
|
847
848
|
width: 24,
|
|
848
849
|
height: 24,
|
|
849
850
|
viewBox: "0 0 24 24",
|
|
850
851
|
fill: "none",
|
|
851
852
|
xmlns: "http://www.w3.org/2000/svg"
|
|
852
|
-
}, props), _path$
|
|
853
|
+
}, props), _path$F || (_path$F = /*#__PURE__*/React__namespace.createElement("path", {
|
|
853
854
|
d: "M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM18 19H6C5.45 19 5 18.55 5 18V6C5 5.45 5.45 5 6 5H18C18.55 5 19 5.45 19 6V18C19 18.55 18.55 19 18 19Z",
|
|
854
855
|
fill: "#E80C7A"
|
|
855
856
|
})));
|
|
856
857
|
|
|
857
|
-
var _path$
|
|
858
|
-
function _extends$
|
|
859
|
-
const SvgUgCircle = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
858
|
+
var _path$E;
|
|
859
|
+
function _extends$R() { _extends$R = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$R.apply(this, arguments); }
|
|
860
|
+
const SvgUgCircle = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$R({
|
|
860
861
|
width: 24,
|
|
861
862
|
height: 24,
|
|
862
863
|
viewBox: "0 0 24 24",
|
|
863
864
|
fill: "none",
|
|
864
865
|
xmlns: "http://www.w3.org/2000/svg"
|
|
865
|
-
}, props), _path$
|
|
866
|
+
}, props), _path$E || (_path$E = /*#__PURE__*/React__namespace.createElement("path", {
|
|
866
867
|
d: "M12 2C6.47 2 2 6.47 2 12C2 17.53 6.47 22 12 22C17.53 22 22 17.53 22 12C22 6.47 17.53 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z",
|
|
867
868
|
fill: "#FFCD1A"
|
|
868
869
|
})));
|
|
869
870
|
|
|
870
|
-
var _path$
|
|
871
|
-
function _extends$
|
|
872
|
-
const SvgUgTriangle = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
871
|
+
var _path$D;
|
|
872
|
+
function _extends$Q() { _extends$Q = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$Q.apply(this, arguments); }
|
|
873
|
+
const SvgUgTriangle = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$Q({
|
|
873
874
|
width: 24,
|
|
874
875
|
height: 24,
|
|
875
876
|
viewBox: "0 0 24 24",
|
|
876
877
|
fill: "none",
|
|
877
878
|
xmlns: "http://www.w3.org/2000/svg"
|
|
878
|
-
}, props), _path$
|
|
879
|
+
}, props), _path$D || (_path$D = /*#__PURE__*/React__namespace.createElement("path", {
|
|
879
880
|
d: "M11.9993 7.32625L18.3893 17.5563H5.60929L11.9993 7.32625ZM11.1493 4.91625L2.94929 18.0262C2.53929 18.6962 3.01929 19.5563 3.79929 19.5563H20.1993C20.9893 19.5563 21.4593 18.6962 21.0493 18.0262L12.8493 4.91625C12.4593 4.28625 11.5393 4.28625 11.1493 4.91625Z",
|
|
880
881
|
fill: "#7B0DFF"
|
|
881
882
|
})));
|
|
882
883
|
|
|
883
|
-
var _rect$4, _path$
|
|
884
|
-
function _extends$
|
|
885
|
-
const SvgCampaignCompleted = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
884
|
+
var _rect$4, _path$C, _path2$c, _path3$4;
|
|
885
|
+
function _extends$P() { _extends$P = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$P.apply(this, arguments); }
|
|
886
|
+
const SvgCampaignCompleted = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$P({
|
|
886
887
|
width: 24,
|
|
887
888
|
height: 24,
|
|
888
889
|
viewBox: "0 0 24 24",
|
|
@@ -893,10 +894,10 @@ const SvgCampaignCompleted = props => /*#__PURE__*/React__namespace.createElemen
|
|
|
893
894
|
height: 24,
|
|
894
895
|
rx: 12,
|
|
895
896
|
fill: "#F6F6F8"
|
|
896
|
-
})), _path$
|
|
897
|
+
})), _path$C || (_path$C = /*#__PURE__*/React__namespace.createElement("path", {
|
|
897
898
|
d: "M20.6953 5.73905C21.0148 5.41953 21.0148 4.90149 20.6953 4.58197C20.3758 4.26245 19.8577 4.26245 19.5382 4.58197L11.88 12.2402L10.0849 9.95981C9.80539 9.60476 9.29098 9.54352 8.93593 9.82303C8.58088 10.1025 8.51963 10.6169 8.79914 10.972L11.1642 13.9763C11.3089 14.16 11.5252 14.2731 11.7586 14.2869C11.9921 14.3008 12.2203 14.2141 12.3856 14.0487L20.6953 5.73905Z",
|
|
898
899
|
fill: "#50BF95"
|
|
899
|
-
})), _path2$
|
|
900
|
+
})), _path2$c || (_path2$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
900
901
|
d: "M3 12C3 7.02944 7.02944 3 12 3C13.3602 3 14.6521 3.3023 15.8102 3.84415C16.2195 4.03565 16.396 4.52268 16.2045 4.93196C16.013 5.34125 15.526 5.5178 15.1167 5.3263C14.1712 4.88391 13.1156 4.63636 12 4.63636C7.93318 4.63636 4.63636 7.93318 4.63636 12C4.63636 16.0668 7.93318 19.3636 12 19.3636C16.0668 19.3636 19.3636 16.0668 19.3636 12C19.3636 11.3631 19.283 10.7462 19.1317 10.1585C19.0191 9.72084 19.2826 9.27479 19.7202 9.16218C20.1578 9.04957 20.6038 9.31303 20.7165 9.75064C20.9017 10.4705 21 11.2243 21 12C21 16.9705 16.9705 21 12 21C7.02944 21 3 16.9705 3 12Z",
|
|
901
902
|
fill: "#50BF95"
|
|
902
903
|
})), _path3$4 || (_path3$4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -904,9 +905,9 @@ const SvgCampaignCompleted = props => /*#__PURE__*/React__namespace.createElemen
|
|
|
904
905
|
fill: "#007345"
|
|
905
906
|
})));
|
|
906
907
|
|
|
907
|
-
var _rect$3, _path$
|
|
908
|
-
function _extends$
|
|
909
|
-
const SvgCampaignLocked = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
908
|
+
var _rect$3, _path$B, _path2$b;
|
|
909
|
+
function _extends$O() { _extends$O = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$O.apply(this, arguments); }
|
|
910
|
+
const SvgCampaignLocked = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$O({
|
|
910
911
|
width: 24,
|
|
911
912
|
height: 24,
|
|
912
913
|
viewBox: "0 0 24 24",
|
|
@@ -917,21 +918,21 @@ const SvgCampaignLocked = props => /*#__PURE__*/React__namespace.createElement("
|
|
|
917
918
|
height: 24,
|
|
918
919
|
rx: 12,
|
|
919
920
|
fill: "#F6F6F8"
|
|
920
|
-
})), _path$
|
|
921
|
+
})), _path$B || (_path$B = /*#__PURE__*/React__namespace.createElement("path", {
|
|
921
922
|
fillRule: "evenodd",
|
|
922
923
|
clipRule: "evenodd",
|
|
923
924
|
d: "M13.55 19.0875C14.25 19.7875 15.1063 20.1375 16.1188 20.1375C17.1313 20.1375 17.9875 19.7875 18.6875 19.0875C19.3875 18.3875 19.7375 17.5312 19.7375 16.5187C19.7375 15.5062 19.3875 14.65 18.6875 13.95C17.9875 13.25 17.1313 12.9 16.1188 12.9C15.1063 12.9 14.25 13.25 13.55 13.95C12.85 14.65 12.5 15.5062 12.5 16.5187C12.5 17.5312 12.85 18.3875 13.55 19.0875ZM17.5062 18.2812C17.4187 18.2812 17.3375 18.25 17.2625 18.1875L15.7438 16.7812C15.6813 16.6687 15.65 16.6 15.65 16.575V14.55C15.65 14.4375 15.6875 14.3437 15.7625 14.2687C15.8375 14.1937 15.9313 14.1562 16.0438 14.1562C16.1563 14.1562 16.25 14.1937 16.325 14.2687C16.4 14.3437 16.4375 14.4375 16.4375 14.55V16.4813L17.7313 17.6625C17.8063 17.725 17.8469 17.8062 17.8531 17.9062C17.8594 18.0063 17.825 18.0938 17.75 18.1688C17.675 18.2438 17.5937 18.2812 17.5062 18.2812Z",
|
|
924
925
|
fill: "#D1820A"
|
|
925
|
-
})), _path2$
|
|
926
|
+
})), _path2$b || (_path2$b = /*#__PURE__*/React__namespace.createElement("path", {
|
|
926
927
|
fillRule: "evenodd",
|
|
927
928
|
clipRule: "evenodd",
|
|
928
929
|
d: "M6.125 19.5C5.8125 19.5 5.54688 19.3906 5.32812 19.1719C5.10938 18.9531 5 18.6875 5 18.375V10.2375C5 9.925 5.10938 9.65937 5.32812 9.44062C5.54688 9.22187 5.8125 9.1125 6.125 9.1125H7.4375V7.36875C7.4375 6.36875 7.78437 5.51562 8.47812 4.80937C9.17188 4.10312 10.0125 3.75 11 3.75C11.9875 3.75 12.8281 4.10312 13.5219 4.80937C14.2156 5.51562 14.5625 6.36875 14.5625 7.36875V9.1125H15.875C16.1875 9.1125 16.4531 9.22187 16.6719 9.44062C16.8906 9.65937 17 9.925 17 10.2375V11.8687C16.8125 11.8187 16.625 11.7875 16.4375 11.775C16.25 11.7625 16.0625 11.7625 15.875 11.775C14.6 11.825 13.5312 12.3094 12.6688 13.2281C11.8063 14.1469 11.375 15.2437 11.375 16.5187C11.375 17.0687 11.4688 17.5969 11.6562 18.1031C11.8438 18.6094 12.1063 19.075 12.4438 19.5H6.125ZM13.4375 9.1125H8.5625V7.36875C8.5625 6.68125 8.8 6.09375 9.275 5.60625C9.75 5.11875 10.325 4.875 11 4.875C11.675 4.875 12.25 5.11875 12.725 5.60625C13.2 6.09375 13.4375 6.68125 13.4375 7.36875V9.1125Z",
|
|
929
930
|
fill: "#F4AC1A"
|
|
930
931
|
})));
|
|
931
932
|
|
|
932
|
-
var _rect$2, _path$
|
|
933
|
-
function _extends$
|
|
934
|
-
const SvgCampaignIncoming = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
933
|
+
var _rect$2, _path$A, _path2$a;
|
|
934
|
+
function _extends$N() { _extends$N = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$N.apply(this, arguments); }
|
|
935
|
+
const SvgCampaignIncoming = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$N({
|
|
935
936
|
width: 24,
|
|
936
937
|
height: 24,
|
|
937
938
|
viewBox: "0 0 24 24",
|
|
@@ -942,13 +943,13 @@ const SvgCampaignIncoming = props => /*#__PURE__*/React__namespace.createElement
|
|
|
942
943
|
height: 24,
|
|
943
944
|
rx: 12,
|
|
944
945
|
fill: "#F6F6F8"
|
|
945
|
-
})), _path$
|
|
946
|
+
})), _path$A || (_path$A = /*#__PURE__*/React__namespace.createElement("path", {
|
|
946
947
|
d: "M11.2266 13.0313H14.997M11.2266 9.26075V13.0313V9.26075ZM11.2266 13.0313L20.121 5.03906L11.2266 13.0313Z",
|
|
947
948
|
stroke: "#024780",
|
|
948
949
|
strokeWidth: 1.5,
|
|
949
950
|
strokeLinecap: "round",
|
|
950
951
|
strokeLinejoin: "round"
|
|
951
|
-
})), _path2$
|
|
952
|
+
})), _path2$a || (_path2$a = /*#__PURE__*/React__namespace.createElement("path", {
|
|
952
953
|
d: "M15.4918 4.52347C14.4312 4.02725 13.2477 3.75003 11.9995 3.75003C7.44316 3.75003 3.74951 7.44368 3.74951 12C3.74951 16.5564 7.44316 20.25 11.9995 20.25C16.5558 20.25 20.2495 16.5564 20.2495 12C20.2495 11.2878 20.1593 10.5968 19.9896 9.93753",
|
|
953
954
|
stroke: "#53AFFA",
|
|
954
955
|
strokeWidth: 1.5,
|
|
@@ -956,9 +957,9 @@ const SvgCampaignIncoming = props => /*#__PURE__*/React__namespace.createElement
|
|
|
956
957
|
strokeLinejoin: "round"
|
|
957
958
|
})));
|
|
958
959
|
|
|
959
|
-
var _rect$1, _path$
|
|
960
|
-
function _extends$
|
|
961
|
-
const SvgCampaignProgress = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
960
|
+
var _rect$1, _path$z, _path2$9, _path3$3, _path4$1, _path5$1, _path6$1, _path7$1, _path8$1, _path9$1, _path10$1;
|
|
961
|
+
function _extends$M() { _extends$M = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$M.apply(this, arguments); }
|
|
962
|
+
const SvgCampaignProgress = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$M({
|
|
962
963
|
width: 24,
|
|
963
964
|
height: 24,
|
|
964
965
|
viewBox: "0 0 24 24",
|
|
@@ -969,10 +970,10 @@ const SvgCampaignProgress = props => /*#__PURE__*/React__namespace.createElement
|
|
|
969
970
|
height: 24,
|
|
970
971
|
rx: 12,
|
|
971
972
|
fill: "#F6F6F8"
|
|
972
|
-
})), _path$
|
|
973
|
+
})), _path$z || (_path$z = /*#__PURE__*/React__namespace.createElement("path", {
|
|
973
974
|
d: "M13.059 16.7647C13.059 16.1799 12.585 15.7059 12.0002 15.7059C11.4154 15.7059 10.9414 16.1799 10.9414 16.7647V19.9412C10.9414 20.5259 11.4154 21 12.0002 21C12.585 21 13.059 20.5259 13.059 19.9412V16.7647Z",
|
|
974
975
|
fill: "#D1820A"
|
|
975
|
-
})), _path2$
|
|
976
|
+
})), _path2$9 || (_path2$9 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
976
977
|
d: "M16.1149 14.6183C15.7014 14.2048 15.031 14.2048 14.6175 14.6183C14.204 15.0318 14.204 15.7022 14.6175 16.1157L16.8649 18.3631C17.2783 18.7766 17.9488 18.7766 18.3623 18.3631C18.7757 17.9496 18.7757 17.2792 18.3623 16.8657L16.1149 14.6183Z",
|
|
977
978
|
fill: "#D1820A"
|
|
978
979
|
})), _path3$3 || (_path3$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -1001,25 +1002,25 @@ const SvgCampaignProgress = props => /*#__PURE__*/React__namespace.createElement
|
|
|
1001
1002
|
fill: "#FFB65A"
|
|
1002
1003
|
})));
|
|
1003
1004
|
|
|
1004
|
-
var _g$
|
|
1005
|
-
function _extends$
|
|
1006
|
-
const SvgCampaignExperiential = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1005
|
+
var _g$c, _path$y, _path2$8, _path3$2, _path4, _path5, _path6, _path7, _path8, _path9, _path10, _path11;
|
|
1006
|
+
function _extends$L() { _extends$L = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$L.apply(this, arguments); }
|
|
1007
|
+
const SvgCampaignExperiential = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$L({
|
|
1007
1008
|
width: 24,
|
|
1008
1009
|
height: 24,
|
|
1009
1010
|
viewBox: "0 0 24 24",
|
|
1010
1011
|
fill: "none",
|
|
1011
1012
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1012
|
-
}, props), _g$
|
|
1013
|
+
}, props), _g$c || (_g$c = /*#__PURE__*/React__namespace.createElement("g", {
|
|
1013
1014
|
opacity: 0.3
|
|
1014
1015
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1015
1016
|
opacity: 0.3,
|
|
1016
1017
|
d: "M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z",
|
|
1017
1018
|
fill: "#50BF95"
|
|
1018
|
-
}))), _path$
|
|
1019
|
+
}))), _path$y || (_path$y = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1019
1020
|
d: "M12.487 3.19652C8.68003 3.19652 5.59895 6.27761 5.59895 10.0846C5.59895 10.2597 5.59895 10.4348 5.62438 10.5855C5.29857 11.1863 4.82307 12.013 4.24678 12.514C3.82117 12.8897 3.92096 13.2908 3.97085 13.4405C4.09609 13.7663 4.44635 14.0413 5.02265 14.2418C5.22322 14.3172 5.44825 14.3671 5.64883 14.417L5.67427 16.8464C5.67427 17.7984 6.47559 18.6251 7.45304 18.6251L8.93044 18.1496L9.08111 19.0263C9.18091 19.6026 9.68185 20.0282 10.2836 20.0282C10.3589 20.0282 10.4343 20.0282 10.5086 20.0028L15.1424 19.177C15.8185 19.0517 16.2441 18.4256 16.1443 17.7495L15.8185 16.1214C17.9974 14.9189 19.375 12.5892 19.375 10.0845C19.375 6.30279 16.2696 3.19641 12.4869 3.19641L12.487 3.19652Z",
|
|
1020
1021
|
fill: "#2B8473",
|
|
1021
1022
|
stroke: "#2B8473"
|
|
1022
|
-
})), _path2$
|
|
1023
|
+
})), _path2$8 || (_path2$8 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1023
1024
|
fillRule: "evenodd",
|
|
1024
1025
|
clipRule: "evenodd",
|
|
1025
1026
|
d: "M6.39343 10.7683V10.1215H8.06761V10.7683H6.39343Z",
|
|
@@ -1071,21 +1072,21 @@ const SvgCampaignExperiential = props => /*#__PURE__*/React__namespace.createEle
|
|
|
1071
1072
|
fill: "#ECF4F2"
|
|
1072
1073
|
})));
|
|
1073
1074
|
|
|
1074
|
-
var _g$
|
|
1075
|
-
function _extends$
|
|
1076
|
-
const SvgCampaignFunctional = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1075
|
+
var _g$b, _path$x;
|
|
1076
|
+
function _extends$K() { _extends$K = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$K.apply(this, arguments); }
|
|
1077
|
+
const SvgCampaignFunctional = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$K({
|
|
1077
1078
|
width: 24,
|
|
1078
1079
|
height: 24,
|
|
1079
1080
|
viewBox: "0 0 24 24",
|
|
1080
1081
|
fill: "none",
|
|
1081
1082
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1082
|
-
}, props), _g$
|
|
1083
|
+
}, props), _g$b || (_g$b = /*#__PURE__*/React__namespace.createElement("g", {
|
|
1083
1084
|
opacity: 0.3
|
|
1084
1085
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1085
1086
|
opacity: 0.3,
|
|
1086
1087
|
d: "M12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 0 12 0C5.37258 0 0 5.37258 0 12C0 18.6274 5.37258 24 12 24Z",
|
|
1087
1088
|
fill: "#003A57"
|
|
1088
|
-
}))), _path$
|
|
1089
|
+
}))), _path$x || (_path$x = /*#__PURE__*/React__namespace.createElement("path", {
|
|
1089
1090
|
d: "M17.9983 7.16705C17.5188 6.58566 17.1422 6.73039 17.1422 6.73039C17.1422 6.73039 16.406 7.02453 16.0401 7.16303C15.6742 7.30153 15.2408 7.17357 15.2408 7.17357L14.7579 6.8851C14.7579 6.8851 14.4296 6.56554 14.3656 6.18067C14.3123 5.78958 14.1888 5.00269 14.1888 5.00269C14.1888 5.00269 14.1356 4.61159 13.3938 4.47257C12.652 4.33356 12.4678 4.68715 12.4678 4.68715C12.4678 4.68715 12.0932 5.38344 11.9091 5.73703C11.7249 6.09062 11.3114 6.27118 11.3114 6.27118L10.7639 6.36908C10.7639 6.36908 10.3144 6.33771 10.0176 6.07271L9.12712 5.27769C9.12712 5.27769 8.8303 5.01268 8.18313 5.38632C7.53595 5.75997 7.61705 6.14953 7.61705 6.14953L7.86033 7.3182C7.94143 7.70776 7.74381 8.11275 7.74381 8.11275L7.38528 8.53794C7.38528 8.53794 7.02217 8.80577 6.62387 8.78845C6.22557 8.77114 5.43527 8.7474 5.43527 8.7474C5.43527 8.7474 5.03697 8.73009 4.78646 9.44201C4.53595 10.1539 4.84804 10.3956 4.84804 10.3956C4.84804 10.3956 5.46774 10.896 5.77983 11.1376C6.09192 11.3793 6.19373 11.8296 6.19373 11.8296L6.20207 12.3921C6.20207 12.3921 6.09618 12.8314 5.79331 13.079C5.49043 13.3266 4.86759 13.8171 4.86759 13.8171C4.86759 13.8171 4.56471 14.0647 4.81769 14.7769C5.08144 15.4828 5.46713 15.4783 5.46713 15.4783C5.46713 15.4783 6.26012 15.4569 6.64582 15.4524C7.03152 15.4479 7.40116 15.7145 7.40116 15.7145L7.76458 16.1447C7.76458 16.1447 7.96976 16.5499 7.89441 16.9425C7.81907 17.3351 7.66208 18.1094 7.66208 18.1094C7.66208 18.1094 7.58674 18.502 8.23785 18.8824C8.88895 19.2629 9.18553 19.0044 9.18553 19.0044C9.18553 19.0044 9.7724 18.4765 10.069 18.218C10.3655 17.9595 10.8115 17.9347 10.8115 17.9347L11.3609 18.0394C11.3609 18.0394 11.77 18.225 11.9608 18.5803C12.1516 18.9356 12.5268 19.6354 12.5268 19.6354C12.5268 19.6354 12.7176 19.9907 13.4583 19.8539C14.1946 19.7343 14.2529 19.337 14.2529 19.337C14.2529 19.337 14.3586 18.5487 14.4232 18.1623C14.4814 17.765 14.8086 17.4598 14.8086 17.4598L15.2939 17.1796C15.2939 17.1796 15.7281 17.0598 16.095 17.1971C16.4682 17.3453 17.1975 17.637 17.1975 17.637C17.1975 17.637 17.5707 17.7851 18.0424 17.2073C18.5142 16.6295 18.3189 16.2913 18.3189 16.2913C18.3189 16.2913 17.9006 15.6164 17.6882 15.2736C17.4759 14.9307 17.5197 14.4836 17.5197 14.4836L17.7038 13.9555C17.7038 13.9555 17.9482 13.5816 18.3203 13.454C18.6925 13.3264 19.4431 13.0822 19.4431 13.0822C19.4431 13.0822 19.8153 12.9546 19.8113 12.2005C19.8074 11.4464 19.4297 11.3153 19.4297 11.3153C19.4297 11.3153 18.6807 11.0641 18.303 10.9331C17.9253 10.802 17.677 10.4217 17.677 10.4217L17.4861 9.8919C17.4861 9.8919 17.4293 9.4447 17.6368 9.1067C17.8443 8.7687 18.2486 8.09891 18.2486 8.09891C18.2486 8.09891 18.4778 7.74844 17.9983 7.16707L17.9983 7.16705ZM9.33902 8.38466L10.6176 10.5992C10.0433 11.149 9.82793 11.9715 10.0567 12.7413L7.86713 14.0054C6.98868 12.0106 7.60355 9.66286 9.33905 8.38457L9.33902 8.38466ZM13.9748 16.414C11.9998 17.2778 9.65918 16.6363 8.37099 14.8783L10.5605 13.6141C11.1128 14.1971 11.9329 14.4219 12.6961 14.1994L13.9748 16.414ZM12.6552 13.132C12.1159 13.4434 11.4325 13.2561 11.1176 12.7107C10.8027 12.1652 10.9822 11.4797 11.5215 11.1684C12.0608 10.857 12.7441 11.0443 13.0591 11.5897C13.374 12.1352 13.1945 12.8207 12.6552 13.132ZM14.8376 15.9158L13.5591 13.7012C14.1333 13.1515 14.3487 12.3289 14.12 11.5591L16.3095 10.295C17.188 12.2898 16.5731 14.6376 14.8376 15.9159L14.8376 15.9158ZM13.6161 10.6863C13.0638 10.1034 12.2437 9.87862 11.4805 10.1011L10.2019 7.88652C12.1769 7.02266 14.5112 7.65314 15.8057 9.42223L13.6161 10.6863Z",
|
|
1090
1091
|
fill: "#003A57"
|
|
1091
1092
|
})));
|
|
@@ -1946,15 +1947,15 @@ const WaffleChart = ({ height, width, data, total, tooltip, }) => {
|
|
|
1946
1947
|
} }) })));
|
|
1947
1948
|
};
|
|
1948
1949
|
|
|
1949
|
-
var _g$
|
|
1950
|
-
function _extends$
|
|
1951
|
-
const SvgSentiment1 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1950
|
+
var _g$a, _defs$4;
|
|
1951
|
+
function _extends$J() { _extends$J = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$J.apply(this, arguments); }
|
|
1952
|
+
const SvgSentiment1 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$J({
|
|
1952
1953
|
width: 27,
|
|
1953
1954
|
height: 26,
|
|
1954
1955
|
viewBox: "0 0 27 26",
|
|
1955
1956
|
fill: "none",
|
|
1956
1957
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1957
|
-
}, props), _g$
|
|
1958
|
+
}, props), _g$a || (_g$a = /*#__PURE__*/React__namespace.createElement("g", {
|
|
1958
1959
|
clipPath: "url(#clip0_21_19131)"
|
|
1959
1960
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1960
1961
|
d: "M26.5525 13C26.5525 20.1796 20.6084 26 13.2762 26C5.94481 26 0 20.1796 0 13C0 5.82111 5.94481 0 13.2762 0C20.6084 0 26.5525 5.82111 26.5525 13Z",
|
|
@@ -1970,15 +1971,15 @@ const SvgSentiment1 = props => /*#__PURE__*/React__namespace.createElement("svg"
|
|
|
1970
1971
|
fill: "white"
|
|
1971
1972
|
})))));
|
|
1972
1973
|
|
|
1973
|
-
var _g$
|
|
1974
|
-
function _extends$
|
|
1975
|
-
const SvgSentiment2 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1974
|
+
var _g$9, _defs$3;
|
|
1975
|
+
function _extends$I() { _extends$I = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$I.apply(this, arguments); }
|
|
1976
|
+
const SvgSentiment2 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$I({
|
|
1976
1977
|
width: 27,
|
|
1977
1978
|
height: 26,
|
|
1978
1979
|
viewBox: "0 0 27 26",
|
|
1979
1980
|
fill: "none",
|
|
1980
1981
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1981
|
-
}, props), _g$
|
|
1982
|
+
}, props), _g$9 || (_g$9 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
1982
1983
|
clipPath: "url(#clip0_21_19130)"
|
|
1983
1984
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
1984
1985
|
d: "M26.5525 13C26.5525 20.1796 20.6084 26 13.2762 26C5.94481 26 0 20.1796 0 13C0 5.82111 5.94481 0 13.2762 0C20.6084 0 26.5525 5.82111 26.5525 13Z",
|
|
@@ -1994,15 +1995,15 @@ const SvgSentiment2 = props => /*#__PURE__*/React__namespace.createElement("svg"
|
|
|
1994
1995
|
fill: "white"
|
|
1995
1996
|
})))));
|
|
1996
1997
|
|
|
1997
|
-
var _g$
|
|
1998
|
-
function _extends$
|
|
1999
|
-
const SvgSentiment3 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
1998
|
+
var _g$8, _defs$2;
|
|
1999
|
+
function _extends$H() { _extends$H = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$H.apply(this, arguments); }
|
|
2000
|
+
const SvgSentiment3 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$H({
|
|
2000
2001
|
width: 27,
|
|
2001
2002
|
height: 26,
|
|
2002
2003
|
viewBox: "0 0 27 26",
|
|
2003
2004
|
fill: "none",
|
|
2004
2005
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2005
|
-
}, props), _g$
|
|
2006
|
+
}, props), _g$8 || (_g$8 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
2006
2007
|
clipPath: "url(#clip0_21_19129)"
|
|
2007
2008
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
2008
2009
|
d: "M26.5525 13C26.5525 20.1796 20.6084 26 13.2762 26C5.94481 26 0 20.1796 0 13C0 5.82111 5.94481 0 13.2762 0C20.6084 0 26.5525 5.82111 26.5525 13Z",
|
|
@@ -2024,15 +2025,15 @@ const SvgSentiment3 = props => /*#__PURE__*/React__namespace.createElement("svg"
|
|
|
2024
2025
|
fill: "white"
|
|
2025
2026
|
})))));
|
|
2026
2027
|
|
|
2027
|
-
var _g$
|
|
2028
|
-
function _extends$
|
|
2029
|
-
const SvgSentiment4 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2028
|
+
var _g$7, _defs$1;
|
|
2029
|
+
function _extends$G() { _extends$G = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$G.apply(this, arguments); }
|
|
2030
|
+
const SvgSentiment4 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$G({
|
|
2030
2031
|
width: 27,
|
|
2031
2032
|
height: 26,
|
|
2032
2033
|
viewBox: "0 0 27 26",
|
|
2033
2034
|
fill: "none",
|
|
2034
2035
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2035
|
-
}, props), _g$
|
|
2036
|
+
}, props), _g$7 || (_g$7 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
2036
2037
|
clipPath: "url(#clip0_21_19127)"
|
|
2037
2038
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
2038
2039
|
d: "M26.5525 13C26.5525 20.1796 20.6084 26 13.2762 26C5.94481 26 0 20.1796 0 13C0 5.82111 5.94481 0 13.2762 0C20.6084 0 26.5525 5.82111 26.5525 13Z",
|
|
@@ -2054,15 +2055,15 @@ const SvgSentiment4 = props => /*#__PURE__*/React__namespace.createElement("svg"
|
|
|
2054
2055
|
fill: "white"
|
|
2055
2056
|
})))));
|
|
2056
2057
|
|
|
2057
|
-
var _g$
|
|
2058
|
-
function _extends$
|
|
2059
|
-
const SvgSentiment5 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2058
|
+
var _g$6, _defs;
|
|
2059
|
+
function _extends$F() { _extends$F = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$F.apply(this, arguments); }
|
|
2060
|
+
const SvgSentiment5 = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$F({
|
|
2060
2061
|
width: 26,
|
|
2061
2062
|
height: 26,
|
|
2062
2063
|
viewBox: "0 0 26 26",
|
|
2063
2064
|
fill: "none",
|
|
2064
2065
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2065
|
-
}, props), _g$
|
|
2066
|
+
}, props), _g$6 || (_g$6 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
2066
2067
|
clipPath: "url(#clip0_21_19125)"
|
|
2067
2068
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
2068
2069
|
d: "M25.2051 13C25.2051 20.1796 19.5626 26 12.6025 26C5.64314 26 0 20.1796 0 13C0 5.82111 5.64314 0 12.6025 0C19.5626 0 25.2051 5.82111 25.2051 13Z",
|
|
@@ -2313,10 +2314,9 @@ const ChatFooter = ({ saveText, children, showShortcut, }) => {
|
|
|
2313
2314
|
};
|
|
2314
2315
|
|
|
2315
2316
|
const ChatContext = React.createContext(null);
|
|
2316
|
-
const ChatContextProvider = ({ onSave, onFileUpload, setMentionableUsers, children, }) => {
|
|
2317
|
+
const ChatContextProvider = ({ onSave, onFileUpload, onDeleteThumbnail, setMentionableUsers, children, }) => {
|
|
2317
2318
|
const [editor, setEditor] = React.useState();
|
|
2318
2319
|
const [thumbnails, setThumbnails] = React.useState([]);
|
|
2319
|
-
//const [isMediaUploading, setIsMediaUploading] = useState<boolean>(false);
|
|
2320
2320
|
const getMentions = (editor) => {
|
|
2321
2321
|
const result = [];
|
|
2322
2322
|
editor.state.doc.descendants((node) => {
|
|
@@ -2336,6 +2336,7 @@ const ChatContextProvider = ({ onSave, onFileUpload, setMentionableUsers, childr
|
|
|
2336
2336
|
editor,
|
|
2337
2337
|
setEditor,
|
|
2338
2338
|
thumbnails,
|
|
2339
|
+
setThumbnails,
|
|
2339
2340
|
afterUploadCallback: (failed) => {
|
|
2340
2341
|
setThumbnails(thumbnails.map((file) => {
|
|
2341
2342
|
if (failed.includes(file.name)) {
|
|
@@ -2349,15 +2350,13 @@ const ChatContextProvider = ({ onSave, onFileUpload, setMentionableUsers, childr
|
|
|
2349
2350
|
return file;
|
|
2350
2351
|
}));
|
|
2351
2352
|
},
|
|
2352
|
-
|
|
2353
|
-
//setIsMediaUploading, // Incluso nel valore del contesto
|
|
2354
|
-
addThumbnails: ({ files, }) => {
|
|
2353
|
+
addThumbnails: ({ files }) => {
|
|
2355
2354
|
files.forEach((file) => (file.isLoadingMedia = true));
|
|
2356
2355
|
setThumbnails((prev) => [...prev, ...files]);
|
|
2357
2356
|
if (onFileUpload) {
|
|
2358
2357
|
onFileUpload(files).then((data) => {
|
|
2359
2358
|
var _a;
|
|
2360
|
-
const failed = (_a = data.failed) === null || _a === void 0 ? void 0 : _a.map(f => f.name);
|
|
2359
|
+
const failed = (_a = data.failed) === null || _a === void 0 ? void 0 : _a.map((f) => f.name);
|
|
2361
2360
|
setThumbnails((prev) => {
|
|
2362
2361
|
return prev.map((file) => {
|
|
2363
2362
|
file.isLoadingMedia = false;
|
|
@@ -2373,7 +2372,19 @@ const ChatContextProvider = ({ onSave, onFileUpload, setMentionableUsers, childr
|
|
|
2373
2372
|
});
|
|
2374
2373
|
}
|
|
2375
2374
|
},
|
|
2376
|
-
|
|
2375
|
+
clearInput: () => {
|
|
2376
|
+
if (editor && !editor.isEmpty) {
|
|
2377
|
+
editor.commands.clearContent();
|
|
2378
|
+
}
|
|
2379
|
+
if (thumbnails.length > 0)
|
|
2380
|
+
setThumbnails([]);
|
|
2381
|
+
},
|
|
2382
|
+
onDeleteThumbnail: (id) => {
|
|
2383
|
+
onDeleteThumbnail(id);
|
|
2384
|
+
},
|
|
2385
|
+
removeThumbnail: (index) => {
|
|
2386
|
+
setThumbnails(thumbnails.filter((_, i) => i !== index));
|
|
2387
|
+
},
|
|
2377
2388
|
triggerSave: () => {
|
|
2378
2389
|
if (editor && onSave && !editor.isEmpty) {
|
|
2379
2390
|
onSave(editor, getMentions(editor));
|
|
@@ -2389,7 +2400,8 @@ const ChatContextProvider = ({ onSave, onFileUpload, setMentionableUsers, childr
|
|
|
2389
2400
|
setMentionableUsers,
|
|
2390
2401
|
thumbnails,
|
|
2391
2402
|
setThumbnails,
|
|
2392
|
-
onFileUpload
|
|
2403
|
+
onFileUpload,
|
|
2404
|
+
onDeleteThumbnail,
|
|
2393
2405
|
]);
|
|
2394
2406
|
return (jsxRuntime.jsx(ChatContext.Provider, Object.assign({ value: chatContextValue }, { children: children })));
|
|
2395
2407
|
};
|
|
@@ -2725,28 +2737,96 @@ const ChatTitle = styled__default["default"](Title$1) `
|
|
|
2725
2737
|
padding: ${({ theme }) => `${theme.space.sm} ${theme.space.md}`};
|
|
2726
2738
|
`;
|
|
2727
2739
|
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2740
|
+
const UgClose$1 = styled__default["default"](reactNotifications.Close) `
|
|
2741
|
+
display: flex;
|
|
2742
|
+
align-items: center;
|
|
2743
|
+
justify-content: center;
|
|
2744
|
+
width: ${({ theme }) => theme.space.xl};
|
|
2745
|
+
height: ${({ theme }) => theme.space.xl};
|
|
2746
|
+
`;
|
|
2747
|
+
/**
|
|
2748
|
+
* Title is a basic component used to display a title. Often used in card headers.
|
|
2749
|
+
*/
|
|
2750
|
+
const Close = (props) => jsxRuntime.jsx(UgClose$1, Object.assign({}, props));
|
|
2751
|
+
|
|
2752
|
+
const NOTIFICATION_COMPONENT_ID = "notifications.notification";
|
|
2753
|
+
const CLOSE_COMPONENT_ID = "notifications.notification.close";
|
|
2754
|
+
const CLOSE_ICON_COMPONENT_ID = "notifications.notification.close-icon";
|
|
2755
|
+
const TITLE_COMPONENT_ID = "notifications.notification.title";
|
|
2756
|
+
const UgClose = styled__default["default"](Close).attrs((props) => {
|
|
2757
|
+
var _a;
|
|
2758
|
+
return ({
|
|
2759
|
+
"data-custom-id": (_a = props["data-custom-id"]) !== null && _a !== void 0 ? _a : CLOSE_ICON_COMPONENT_ID,
|
|
2760
|
+
});
|
|
2761
|
+
}) `
|
|
2762
|
+
${(props) => reactTheming.retrieveComponentStyles(CLOSE_ICON_COMPONENT_ID, props)};
|
|
2763
|
+
`;
|
|
2764
|
+
const UgAnchor = styled__default["default"](reactButtons.Anchor).attrs((props) => {
|
|
2765
|
+
var _a;
|
|
2766
|
+
return ({
|
|
2767
|
+
"data-custom-id": (_a = props["data-custom-id"]) !== null && _a !== void 0 ? _a : CLOSE_COMPONENT_ID,
|
|
2768
|
+
});
|
|
2769
|
+
}) `
|
|
2770
|
+
${(props) => reactTheming.retrieveComponentStyles(CLOSE_COMPONENT_ID, props)};
|
|
2771
|
+
`;
|
|
2772
|
+
const UgTitle = styled__default["default"](Title$1).attrs((props) => {
|
|
2773
|
+
var _a;
|
|
2774
|
+
return ({
|
|
2775
|
+
"data-custom-id": (_a = props["data-custom-id"]) !== null && _a !== void 0 ? _a : TITLE_COMPONENT_ID,
|
|
2776
|
+
});
|
|
2777
|
+
}) `
|
|
2778
|
+
${(props) => reactTheming.retrieveComponentStyles(TITLE_COMPONENT_ID, props)};
|
|
2779
|
+
`;
|
|
2780
|
+
const UgNotification = styled__default["default"](reactNotifications.Notification) `
|
|
2781
|
+
display: flex;
|
|
2782
|
+
align-items: center;
|
|
2783
|
+
justify-content: space-between;
|
|
2784
|
+
padding-right: ${({ theme }) => theme.space.md};
|
|
2785
|
+
white-space: pre;
|
|
2786
|
+
|
|
2787
|
+
${UgAnchor} {
|
|
2788
|
+
flex-shrink: 0;
|
|
2789
|
+
margin-left: ${({ theme }) => theme.space.md};
|
|
2790
|
+
}
|
|
2791
|
+
|
|
2792
|
+
${(props) => reactTheming.retrieveComponentStyles(NOTIFICATION_COMPONENT_ID, props)};
|
|
2793
|
+
`;
|
|
2794
|
+
/**
|
|
2795
|
+
* A Notification is a passive status update that keeps users informed of system progress.
|
|
2796
|
+
* <hr>
|
|
2797
|
+
* Used for this:
|
|
2798
|
+
- For a passive status update about user or system activity
|
|
2799
|
+
*/
|
|
2800
|
+
const Notification = (_a) => {
|
|
2801
|
+
var { closeText, message, onClose, type, isPrimary, isRegular } = _a, props = __rest(_a, ["closeText", "message", "onClose", "type", "isPrimary", "isRegular"]);
|
|
2802
|
+
return (jsxRuntime.jsxs(UgNotification, Object.assign({ type: type, isPrimary: isPrimary }, props, { children: [jsxRuntime.jsx(UgTitle, Object.assign({ isRegular: isRegular, type: type, isPrimary: isPrimary }, { children: message })), jsxRuntime.jsx(UgAnchor, Object.assign({ type: type, isPrimary: isPrimary, onClick: onClose }, { children: closeText !== null && closeText !== void 0 ? closeText : jsxRuntime.jsx(UgClose, {}) }))] })));
|
|
2803
|
+
};
|
|
2804
|
+
// ToastProvider
|
|
2805
|
+
const ToastProvider = (props) => (jsxRuntime.jsx(reactNotifications.ToastProvider, Object.assign({}, props)));
|
|
2806
|
+
const useToast = reactNotifications.useToast;
|
|
2807
|
+
|
|
2808
|
+
var _path$w;
|
|
2809
|
+
function _extends$E() { _extends$E = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$E.apply(this, arguments); }
|
|
2810
|
+
const SvgBoldFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$E({
|
|
2731
2811
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2732
2812
|
width: 16,
|
|
2733
2813
|
height: 16,
|
|
2734
2814
|
focusable: "false",
|
|
2735
2815
|
viewBox: "0 0 16 16"
|
|
2736
|
-
}, props), _path$
|
|
2816
|
+
}, props), _path$w || (_path$w = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2737
2817
|
fill: "currentColor",
|
|
2738
2818
|
d: "M7.5 0C9.952 0 12 2.048 12 4.5a4.483 4.483 0 01-1.27 3.108C12.078 8.39 13 9.855 13 11.5c0 2.452-2.048 4.5-4.5 4.5H4a1 1 0 01-1-1V1a1 1 0 011-1h3.5zM5 14h3.5c1.348 0 2.5-1.152 2.5-2.5S9.848 9 8.5 9H5v5zM7.5 2H5v5h2.5C8.848 7 10 5.848 10 4.5S8.848 2 7.5 2z"
|
|
2739
2819
|
})));
|
|
2740
2820
|
|
|
2741
|
-
var _path$
|
|
2742
|
-
function _extends$
|
|
2743
|
-
const SvgItalicFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2821
|
+
var _path$v;
|
|
2822
|
+
function _extends$D() { _extends$D = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$D.apply(this, arguments); }
|
|
2823
|
+
const SvgItalicFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$D({
|
|
2744
2824
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2745
2825
|
width: 16,
|
|
2746
2826
|
height: 16,
|
|
2747
2827
|
focusable: "false",
|
|
2748
2828
|
viewBox: "0 0 16 16"
|
|
2749
|
-
}, props), _path$
|
|
2829
|
+
}, props), _path$v || (_path$v = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2750
2830
|
fill: "none",
|
|
2751
2831
|
stroke: "currentColor",
|
|
2752
2832
|
strokeLinecap: "round",
|
|
@@ -2754,18 +2834,18 @@ const SvgItalicFill = props => /*#__PURE__*/React__namespace.createElement("svg"
|
|
|
2754
2834
|
d: "M8 1h3M9.5 1l-3 14M5 15h3"
|
|
2755
2835
|
})));
|
|
2756
2836
|
|
|
2757
|
-
var _path$
|
|
2758
|
-
function _extends$
|
|
2759
|
-
const SvgQuoteFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2837
|
+
var _path$u, _path2$7;
|
|
2838
|
+
function _extends$C() { _extends$C = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$C.apply(this, arguments); }
|
|
2839
|
+
const SvgQuoteFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$C({
|
|
2760
2840
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2761
2841
|
width: 16,
|
|
2762
2842
|
height: 16,
|
|
2763
2843
|
focusable: "false",
|
|
2764
2844
|
viewBox: "0 0 16 16"
|
|
2765
|
-
}, props), _path$
|
|
2845
|
+
}, props), _path$u || (_path$u = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2766
2846
|
fill: "currentColor",
|
|
2767
2847
|
d: "M7 8H4c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v3c0 .55-.45 1-1 1zm6 0h-3c-.55 0-1-.45-1-1V4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v3c0 .55-.45 1-1 1z"
|
|
2768
|
-
})), _path2$
|
|
2848
|
+
})), _path2$7 || (_path2$7 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2769
2849
|
fill: "none",
|
|
2770
2850
|
stroke: "currentColor",
|
|
2771
2851
|
strokeLinecap: "round",
|
|
@@ -2773,15 +2853,15 @@ const SvgQuoteFill = props => /*#__PURE__*/React__namespace.createElement("svg",
|
|
|
2773
2853
|
d: "M5.5 12C6.5 11 7 9.5 7 8V6m4.5 6c1-1 1.5-2.5 1.5-4V6"
|
|
2774
2854
|
})));
|
|
2775
2855
|
|
|
2776
|
-
var _g$
|
|
2777
|
-
function _extends$
|
|
2778
|
-
const SvgH1Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2856
|
+
var _g$5;
|
|
2857
|
+
function _extends$B() { _extends$B = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$B.apply(this, arguments); }
|
|
2858
|
+
const SvgH1Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$B({
|
|
2779
2859
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2780
2860
|
width: 16,
|
|
2781
2861
|
height: 16,
|
|
2782
2862
|
focusable: "false",
|
|
2783
2863
|
viewBox: "0 0 16 16"
|
|
2784
|
-
}, props), _g$
|
|
2864
|
+
}, props), _g$5 || (_g$5 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
2785
2865
|
transform: "translate(-464 -332)"
|
|
2786
2866
|
}, /*#__PURE__*/React__namespace.createElement("rect", {
|
|
2787
2867
|
width: 16,
|
|
@@ -2801,15 +2881,15 @@ const SvgH1Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _e
|
|
|
2801
2881
|
transform: "translate(474.469 331)"
|
|
2802
2882
|
}))));
|
|
2803
2883
|
|
|
2804
|
-
var _g$
|
|
2805
|
-
function _extends$
|
|
2806
|
-
const SvgH2Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2884
|
+
var _g$4;
|
|
2885
|
+
function _extends$A() { _extends$A = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$A.apply(this, arguments); }
|
|
2886
|
+
const SvgH2Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$A({
|
|
2807
2887
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2808
2888
|
width: 16,
|
|
2809
2889
|
height: 16,
|
|
2810
2890
|
focusable: "false",
|
|
2811
2891
|
viewBox: "0 0 16 16"
|
|
2812
|
-
}, props), _g$
|
|
2892
|
+
}, props), _g$4 || (_g$4 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
2813
2893
|
transform: "translate(-464 -332)"
|
|
2814
2894
|
}, /*#__PURE__*/React__namespace.createElement("rect", {
|
|
2815
2895
|
width: 16,
|
|
@@ -2829,15 +2909,15 @@ const SvgH2Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _e
|
|
|
2829
2909
|
transform: "translate(469.359 331)"
|
|
2830
2910
|
}))));
|
|
2831
2911
|
|
|
2832
|
-
var _g$
|
|
2833
|
-
function _extends$
|
|
2834
|
-
const SvgH3Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2912
|
+
var _g$3;
|
|
2913
|
+
function _extends$z() { _extends$z = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$z.apply(this, arguments); }
|
|
2914
|
+
const SvgH3Fill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$z({
|
|
2835
2915
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2836
2916
|
width: 16,
|
|
2837
2917
|
height: 16,
|
|
2838
2918
|
focusable: "false",
|
|
2839
2919
|
viewBox: "0 0 16 16"
|
|
2840
|
-
}, props), _g$
|
|
2920
|
+
}, props), _g$3 || (_g$3 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
2841
2921
|
transform: "translate(-464 -332)"
|
|
2842
2922
|
}, /*#__PURE__*/React__namespace.createElement("rect", {
|
|
2843
2923
|
width: 16,
|
|
@@ -2898,64 +2978,71 @@ const FloatingMenu = (props) => {
|
|
|
2898
2978
|
const TooltipComponent = (props) => {
|
|
2899
2979
|
var _a;
|
|
2900
2980
|
const theme = React.useContext(styled.ThemeContext);
|
|
2901
|
-
return jsxRuntime.jsx(reactTooltips.Tooltip, Object.assign({}, props, { zIndex: (_a = props.zIndex) !== null && _a !== void 0 ? _a : theme.levels.front }));
|
|
2981
|
+
return (jsxRuntime.jsx(reactTooltips.Tooltip, Object.assign({}, props, { zIndex: (_a = props.zIndex) !== null && _a !== void 0 ? _a : theme.levels.front })));
|
|
2902
2982
|
};
|
|
2903
2983
|
const Tooltip = styled__default["default"](TooltipComponent) `
|
|
2904
2984
|
box-shadow: ${({ theme }) => theme.shadows.lg(`${theme.space.base * 3}px`, `${theme.space.base * 5}px`, getColor("neutralHue", 600, theme, 0.15))};
|
|
2985
|
+
|
|
2986
|
+
${({ isTransparent }) => isTransparent &&
|
|
2987
|
+
`
|
|
2988
|
+
box-shadow: none;
|
|
2989
|
+
background-color: transparent;
|
|
2990
|
+
border: none;
|
|
2991
|
+
`};
|
|
2905
2992
|
`;
|
|
2906
2993
|
|
|
2907
|
-
var _path$
|
|
2908
|
-
function _extends$
|
|
2909
|
-
const SvgBoldStroke = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
2994
|
+
var _path$t;
|
|
2995
|
+
function _extends$y() { _extends$y = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$y.apply(this, arguments); }
|
|
2996
|
+
const SvgBoldStroke = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$y({
|
|
2910
2997
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2911
2998
|
width: 16,
|
|
2912
2999
|
height: 16,
|
|
2913
3000
|
focusable: "false",
|
|
2914
3001
|
viewBox: "0 0 16 16"
|
|
2915
|
-
}, props), _path$
|
|
3002
|
+
}, props), _path$t || (_path$t = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2916
3003
|
fill: "currentColor",
|
|
2917
3004
|
d: "M7 1c2.176 0 4 1.824 4 4 0 1.315-.666 2.501-1.673 3.234C10.869 8.792 12 10.287 12 12c0 2.176-1.824 4-4 4H3.5a.5.5 0 01-.5-.5v-14a.5.5 0 01.5-.5H7zM4 15h4c1.624 0 3-1.376 3-3S9.624 9 8 9H4v6zM7 2H4v6h3c1.624 0 3-1.376 3-3S8.624 2 7 2z"
|
|
2918
3005
|
})));
|
|
2919
3006
|
|
|
2920
|
-
var _path$
|
|
2921
|
-
function _extends$
|
|
2922
|
-
const SvgItalicStroke = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
3007
|
+
var _path$s;
|
|
3008
|
+
function _extends$x() { _extends$x = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$x.apply(this, arguments); }
|
|
3009
|
+
const SvgItalicStroke = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$x({
|
|
2923
3010
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2924
3011
|
width: 16,
|
|
2925
3012
|
height: 16,
|
|
2926
3013
|
focusable: "false",
|
|
2927
3014
|
viewBox: "0 0 16 16"
|
|
2928
|
-
}, props), _path$
|
|
3015
|
+
}, props), _path$s || (_path$s = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2929
3016
|
fill: "none",
|
|
2930
3017
|
stroke: "currentColor",
|
|
2931
3018
|
strokeLinecap: "round",
|
|
2932
3019
|
d: "M7.5 1.5h3M9 1.5l-3 14m-1.5 0h3"
|
|
2933
3020
|
})));
|
|
2934
3021
|
|
|
2935
|
-
var _path$
|
|
2936
|
-
function _extends$
|
|
2937
|
-
const SvgAtStroke = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
3022
|
+
var _path$r;
|
|
3023
|
+
function _extends$w() { _extends$w = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$w.apply(this, arguments); }
|
|
3024
|
+
const SvgAtStroke = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$w({
|
|
2938
3025
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2939
3026
|
width: 16,
|
|
2940
3027
|
height: 16,
|
|
2941
3028
|
focusable: "false",
|
|
2942
3029
|
role: "presentation"
|
|
2943
|
-
}, props), _path$
|
|
3030
|
+
}, props), _path$r || (_path$r = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2944
3031
|
fill: "none",
|
|
2945
3032
|
stroke: "currentColor",
|
|
2946
3033
|
strokeLinecap: "round",
|
|
2947
3034
|
d: "M11.5 4.5V8h0A3.5 3.5 0 018 11.5h0A3.5 3.5 0 014.5 8h0A3.5 3.5 0 018 4.5h0A3.5 3.5 0 0111.5 8h0v1.5a2 2 0 002 2h0a2 2 0 002-2V8h0A7.5 7.5 0 008 .5h0A7.5 7.5 0 00.5 8h0A7.5 7.5 0 008 15.5h3.41"
|
|
2948
3035
|
})));
|
|
2949
3036
|
|
|
2950
|
-
var _path$
|
|
2951
|
-
function _extends$
|
|
2952
|
-
const SvgClipboard = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
3037
|
+
var _path$q;
|
|
3038
|
+
function _extends$v() { _extends$v = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$v.apply(this, arguments); }
|
|
3039
|
+
const SvgClipboard = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$v({
|
|
2953
3040
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2954
3041
|
width: 16,
|
|
2955
3042
|
height: 16,
|
|
2956
3043
|
focusable: "false",
|
|
2957
3044
|
role: "presentation"
|
|
2958
|
-
}, props), _path$
|
|
3045
|
+
}, props), _path$q || (_path$q = /*#__PURE__*/React__namespace.createElement("path", {
|
|
2959
3046
|
fill: "none",
|
|
2960
3047
|
stroke: "currentColor",
|
|
2961
3048
|
strokeLinecap: "round",
|
|
@@ -3016,7 +3103,10 @@ const CommentBar = ({ editor, i18n, }) => {
|
|
|
3016
3103
|
const files = fileInput.files;
|
|
3017
3104
|
if (files) {
|
|
3018
3105
|
const mediaFiles = Array.from(files).map((file) => {
|
|
3019
|
-
return Object.assign(file, {
|
|
3106
|
+
return Object.assign(file, {
|
|
3107
|
+
isLoadingMedia: false,
|
|
3108
|
+
internal_id: uuid.v4(),
|
|
3109
|
+
});
|
|
3020
3110
|
});
|
|
3021
3111
|
if (mediaFiles.length === 0)
|
|
3022
3112
|
return;
|
|
@@ -3205,7 +3295,7 @@ const editorExtensions = ({ placeholderOptions, mentionableUsers, }) => {
|
|
|
3205
3295
|
},
|
|
3206
3296
|
}),
|
|
3207
3297
|
Dropcursor__default["default"].configure({
|
|
3208
|
-
color:
|
|
3298
|
+
color: getColor(colors.accentHue, 700),
|
|
3209
3299
|
width: 3,
|
|
3210
3300
|
}),
|
|
3211
3301
|
Placeholder__default["default"].configure(Object.assign({ placeholder: ({ node }) => {
|
|
@@ -3277,131 +3367,210 @@ const editorExtensions = ({ placeholderOptions, mentionableUsers, }) => {
|
|
|
3277
3367
|
];
|
|
3278
3368
|
};
|
|
3279
3369
|
|
|
3370
|
+
var _circle$3, _path$p, _path2$6;
|
|
3371
|
+
function _extends$u() { _extends$u = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$u.apply(this, arguments); }
|
|
3372
|
+
const SvgRemoveMediaIcon = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$u({
|
|
3373
|
+
width: 56,
|
|
3374
|
+
height: 56,
|
|
3375
|
+
viewBox: "0 0 56 56",
|
|
3376
|
+
fill: "#68737d",
|
|
3377
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
3378
|
+
}, props), _circle$3 || (_circle$3 = /*#__PURE__*/React__namespace.createElement("circle", {
|
|
3379
|
+
cx: 28,
|
|
3380
|
+
cy: 28,
|
|
3381
|
+
r: 28,
|
|
3382
|
+
fill: "#edf7ff"
|
|
3383
|
+
})), _path$p || (_path$p = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3384
|
+
d: "M16.929 16.929L39.071 39.071",
|
|
3385
|
+
stroke: "currentColor",
|
|
3386
|
+
strokeWidth: 4
|
|
3387
|
+
})), _path2$6 || (_path2$6 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3388
|
+
d: "M16.929 39.071L39.071 16.929",
|
|
3389
|
+
stroke: "currentColor",
|
|
3390
|
+
strokeWidth: 4
|
|
3391
|
+
})));
|
|
3392
|
+
|
|
3280
3393
|
const StyledDeleteThumbnailX = styled__default["default"].div `
|
|
3281
3394
|
position: absolute;
|
|
3282
3395
|
top: 0;
|
|
3283
3396
|
right: 0;
|
|
3284
|
-
color: white;
|
|
3285
|
-
cursor: pointer;
|
|
3286
|
-
font-size: 15px;
|
|
3287
|
-
background-color: gray;
|
|
3288
|
-
border-radius: 50%;
|
|
3289
|
-
width: 35px;
|
|
3290
|
-
height: 35px;
|
|
3291
3397
|
display: flex;
|
|
3292
|
-
|
|
3293
|
-
|
|
3398
|
+
cursor: pointer;
|
|
3399
|
+
width: 32px;
|
|
3400
|
+
height: 32px;
|
|
3294
3401
|
opacity: 0;
|
|
3402
|
+
z-index: 2;
|
|
3295
3403
|
`;
|
|
3296
|
-
const DeleteThumbnailX = ({
|
|
3297
|
-
return (jsxRuntime.jsx(StyledDeleteThumbnailX, Object.assign({ className: "deleteThumbnail"
|
|
3404
|
+
const DeleteThumbnailX = ({ deleteThumbnail }) => {
|
|
3405
|
+
return (jsxRuntime.jsx(StyledDeleteThumbnailX, Object.assign({ className: "deleteThumbnail" }, { children: jsxRuntime.jsx(SvgRemoveMediaIcon, { onClick: (e) => deleteThumbnail(e) }) })));
|
|
3298
3406
|
};
|
|
3299
3407
|
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
width: 16,
|
|
3305
|
-
height: 16,
|
|
3306
|
-
focusable: "false",
|
|
3307
|
-
viewBox: "0 0 16 16"
|
|
3308
|
-
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3309
|
-
fill: "currentColor",
|
|
3310
|
-
d: "M6 15.79c-.13 0-.26-.03-.38-.08a.977.977 0 01-.62-.92V1.21a1 1 0 01.62-.93C6 .12 6.42.21 6.71.5l6.44 6.44c.58.58.58 1.54 0 2.12L6.71 15.5c-.19.19-.45.29-.71.29z"
|
|
3311
|
-
})));
|
|
3312
|
-
|
|
3313
|
-
const StyledThumbnail = styled__default["default"].div `
|
|
3314
|
-
border-radius: 4%;
|
|
3315
|
-
height: 90px;
|
|
3316
|
-
width: 80px;
|
|
3317
|
-
justify-content: center;
|
|
3318
|
-
padding: 1px;
|
|
3319
|
-
position: relative;
|
|
3320
|
-
cursor: pointer;
|
|
3321
|
-
background-color: rgb(209, 207, 207);
|
|
3322
|
-
img {
|
|
3323
|
-
width: 100%;
|
|
3324
|
-
height: 100%;
|
|
3325
|
-
border-radius: 4%;
|
|
3326
|
-
}
|
|
3327
|
-
.thumbnailLabel {
|
|
3328
|
-
position: absolute;
|
|
3329
|
-
bottom: 1px;
|
|
3330
|
-
left: 5px;
|
|
3331
|
-
color: black;
|
|
3332
|
-
font-size: 10px;
|
|
3333
|
-
font-weight: 100;
|
|
3408
|
+
const ImageCard = styled__default["default"](SpecialCard) `
|
|
3409
|
+
padding: 0;
|
|
3410
|
+
:hover .deleteThumbnail {
|
|
3411
|
+
opacity: 1;
|
|
3334
3412
|
}
|
|
3335
3413
|
`;
|
|
3336
|
-
const
|
|
3337
|
-
|
|
3414
|
+
const Preview$1 = styled__default["default"].div `
|
|
3415
|
+
display: flex;
|
|
3416
|
+
justify-content: center;
|
|
3417
|
+
align-items: center;
|
|
3418
|
+
height: 150px;
|
|
3419
|
+
width: 100%;
|
|
3420
|
+
background-image: url(${(props) => props.url});
|
|
3421
|
+
background-color: ${({ theme }) => theme.palette.grey[100]};
|
|
3422
|
+
background-size: contain;
|
|
3423
|
+
background-position: center;
|
|
3424
|
+
background-repeat: no-repeat;
|
|
3425
|
+
`;
|
|
3426
|
+
const ImageThumbnail = ({ src, index = 0, removeThumbnail, clickThumbnail, showX = true, isLoadingMedia = true, isError = false, }) => {
|
|
3338
3427
|
const handleCancel = (e) => {
|
|
3339
3428
|
e.stopPropagation();
|
|
3340
3429
|
if (removeThumbnail)
|
|
3341
3430
|
removeThumbnail(index);
|
|
3342
3431
|
};
|
|
3343
|
-
return (jsxRuntime.jsxs(
|
|
3432
|
+
return (jsxRuntime.jsxs(ImageCard, Object.assign({ onClick: clickThumbnail }, { children: [isLoadingMedia && (jsxRuntime.jsx(Preview$1, Object.assign({ url: "" }, { children: jsxRuntime.jsx(reactLoaders.Spinner, { style: {
|
|
3433
|
+
display: "flex",
|
|
3434
|
+
alignItems: "center",
|
|
3435
|
+
justifyContent: "center",
|
|
3436
|
+
}, size: "large" }) }))), isError && (
|
|
3344
3437
|
// todo: add error icon
|
|
3345
|
-
jsxRuntime.jsx("span", { children: "error uploading media" })), !isLoadingMedia &&
|
|
3346
|
-
width: "100%",
|
|
3347
|
-
height: "100%",
|
|
3348
|
-
backgroundColor: "gray",
|
|
3349
|
-
zIndex: "-1",
|
|
3350
|
-
opacity: "0.5",
|
|
3351
|
-
color: "black",
|
|
3352
|
-
} }, { children: [jsxRuntime.jsx(SvgPlayFill, { style: {
|
|
3353
|
-
position: "absolute",
|
|
3354
|
-
top: "35%",
|
|
3355
|
-
left: "35%",
|
|
3356
|
-
width: "30px",
|
|
3357
|
-
height: "30px",
|
|
3358
|
-
backgroundColor: "white",
|
|
3359
|
-
borderRadius: "50%",
|
|
3360
|
-
} }), jsxRuntime.jsx("video", Object.assign({ width: "80", height: "89" }, { children: jsxRuntime.jsx("source", { src: src, type: "video/mp4" }) }))] }))), showLabel && jsxRuntime.jsx("span", Object.assign({ className: "thumbnailLabel" }, { children: label }))] })));
|
|
3438
|
+
jsxRuntime.jsx("span", { children: "error uploading media" })), !isLoadingMedia && (jsxRuntime.jsx(Preview$1, Object.assign({ url: src }, { children: showX && (jsxRuntime.jsx(DeleteThumbnailX, { deleteThumbnail: (e) => handleCancel(e) })) })))] })));
|
|
3361
3439
|
};
|
|
3362
3440
|
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3441
|
+
var _circle$2, _path$o;
|
|
3442
|
+
function _extends$t() { _extends$t = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$t.apply(this, arguments); }
|
|
3443
|
+
const SvgVideoPlayIcon = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$t({
|
|
3444
|
+
width: 56,
|
|
3445
|
+
height: 56,
|
|
3446
|
+
viewBox: "0 0 56 56",
|
|
3447
|
+
fill: "none",
|
|
3448
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
3449
|
+
}, props), _circle$2 || (_circle$2 = /*#__PURE__*/React__namespace.createElement("circle", {
|
|
3450
|
+
cx: 28,
|
|
3451
|
+
cy: 28,
|
|
3452
|
+
r: 28,
|
|
3453
|
+
fill: "white"
|
|
3454
|
+
})), _path$o || (_path$o = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3455
|
+
d: "M47 28L18.5 44.4545L18.5 11.5455L47 28Z",
|
|
3456
|
+
fill: "currentColor"
|
|
3457
|
+
})));
|
|
3458
|
+
|
|
3459
|
+
const VideoCard = styled__default["default"](SpecialCard) `
|
|
3460
|
+
padding: 0;
|
|
3461
|
+
position: relative;
|
|
3462
|
+
overflow: hidden;
|
|
3463
|
+
|
|
3464
|
+
&:hover .deleteThumbnail {
|
|
3465
|
+
opacity: 1;
|
|
3375
3466
|
z-index: 9999;
|
|
3376
3467
|
}
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
|
|
3400
|
-
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
|
|
3468
|
+
|
|
3469
|
+
&:before {
|
|
3470
|
+
content: "";
|
|
3471
|
+
position: absolute;
|
|
3472
|
+
top: 0;
|
|
3473
|
+
left: 0;
|
|
3474
|
+
width: 100%;
|
|
3475
|
+
height: 100%;
|
|
3476
|
+
background-color: ${({ theme }) => theme.palette.grey[800]};
|
|
3477
|
+
opacity: 0.3;
|
|
3478
|
+
z-index: 1;
|
|
3479
|
+
}
|
|
3480
|
+
|
|
3481
|
+
> svg {
|
|
3482
|
+
position: absolute;
|
|
3483
|
+
top: 50%;
|
|
3484
|
+
left: 50%;
|
|
3485
|
+
transform: translate(-50%, -50%);
|
|
3486
|
+
width: 32px;
|
|
3487
|
+
height: 32px;
|
|
3488
|
+
z-index: 2;
|
|
3489
|
+
}
|
|
3490
|
+
`;
|
|
3491
|
+
const Preview = styled__default["default"].div `
|
|
3492
|
+
padding: ${({ theme }) => theme.space.md};
|
|
3493
|
+
display: flex;
|
|
3494
|
+
justify-content: center;
|
|
3495
|
+
align-items: center;
|
|
3496
|
+
height: 150px;
|
|
3497
|
+
width: 100%;
|
|
3498
|
+
|
|
3499
|
+
> video {
|
|
3500
|
+
width: 100%;
|
|
3501
|
+
height: 100%;
|
|
3502
|
+
}
|
|
3503
|
+
`;
|
|
3504
|
+
const VideoThumbnail = ({ src, index = 0, removeThumbnail, clickThumbnail, showX = true, isLoadingMedia = true, isError = false, }) => {
|
|
3505
|
+
const handleCancel = (e) => {
|
|
3506
|
+
e.stopPropagation();
|
|
3507
|
+
if (removeThumbnail)
|
|
3508
|
+
removeThumbnail(index);
|
|
3509
|
+
};
|
|
3510
|
+
return (jsxRuntime.jsxs(VideoCard, Object.assign({ onClick: clickThumbnail }, { children: [isLoadingMedia && (jsxRuntime.jsx(Preview, { children: jsxRuntime.jsx(reactLoaders.Spinner, { style: {
|
|
3511
|
+
display: "flex",
|
|
3512
|
+
alignItems: "center",
|
|
3513
|
+
justifyContent: "center",
|
|
3514
|
+
}, size: "large" }) })), isError && (
|
|
3515
|
+
// todo: add error icon
|
|
3516
|
+
jsxRuntime.jsx("span", { children: "error uploading media" })), !isLoadingMedia && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [showX && (jsxRuntime.jsx(DeleteThumbnailX, { deleteThumbnail: (e) => handleCancel(e) })), jsxRuntime.jsx(Preview, { children: jsxRuntime.jsx("video", Object.assign({ src: src }, { children: jsxRuntime.jsx("track", { kind: "captions" }) })) }), jsxRuntime.jsx(SvgVideoPlayIcon, {})] }))] })));
|
|
3517
|
+
};
|
|
3518
|
+
|
|
3519
|
+
const UgGrid = styled__default["default"](reactGrid.Grid) `
|
|
3520
|
+
padding-left: 0;
|
|
3521
|
+
padding-right: 0;
|
|
3522
|
+
`;
|
|
3523
|
+
/**
|
|
3524
|
+
* The Grid component is a framework for building modular layouts.
|
|
3525
|
+
* <hr>
|
|
3526
|
+
* Used for this:
|
|
3527
|
+
- To structure the layout of a page
|
|
3528
|
+
*/
|
|
3529
|
+
const Grid = (props) => jsxRuntime.jsx(UgGrid, Object.assign({}, props));
|
|
3530
|
+
|
|
3531
|
+
const Row$1 = (props) => jsxRuntime.jsx(reactGrid.Row, Object.assign({}, props));
|
|
3532
|
+
|
|
3533
|
+
const StyledCol$1 = styled__default["default"](reactGrid.Col) `
|
|
3534
|
+
margin-bottom: ${theme.space.lg};
|
|
3535
|
+
|
|
3536
|
+
@media screen and (max-width: ${theme.breakpoints.sm}) {
|
|
3537
|
+
margin-bottom: ${theme.space.md};
|
|
3538
|
+
}
|
|
3539
|
+
`;
|
|
3540
|
+
const Col = (props) => jsxRuntime.jsx(StyledCol$1, Object.assign({}, props));
|
|
3541
|
+
|
|
3542
|
+
const ThumbnailContainer = ({ openLightbox }) => {
|
|
3543
|
+
const { thumbnails, removeThumbnail, onDeleteThumbnail } = useChatContext();
|
|
3544
|
+
const mediaFiles = React.useMemo(() => {
|
|
3545
|
+
return thumbnails.map((file) => ({
|
|
3546
|
+
fileName: file.name,
|
|
3547
|
+
fileType: file.type,
|
|
3548
|
+
previewUrl: URL.createObjectURL(file),
|
|
3549
|
+
internal_id: file.internal_id,
|
|
3550
|
+
isLoadingMedia: file.isLoadingMedia,
|
|
3551
|
+
}));
|
|
3552
|
+
}, [thumbnails]);
|
|
3553
|
+
if (!mediaFiles || mediaFiles.length === 0) {
|
|
3554
|
+
return null;
|
|
3555
|
+
}
|
|
3556
|
+
return (jsxRuntime.jsx(Grid, { children: jsxRuntime.jsx(Row$1, Object.assign({ className: "responsive-container" }, { children: mediaFiles.map((file, index) => {
|
|
3557
|
+
// Check if item is an image or a video
|
|
3558
|
+
if (file.fileType.includes("image"))
|
|
3559
|
+
return (jsxRuntime.jsx(Col, Object.assign({ xs: 12, sm: 3, xl: 3, lg: 3, className: "flex-3-sm" }, { children: jsxRuntime.jsx(ImageThumbnail, { src: file.previewUrl, index: index, showX: true, isLoadingMedia: file.isLoadingMedia, removeThumbnail: () => {
|
|
3560
|
+
removeThumbnail(index);
|
|
3561
|
+
onDeleteThumbnail(file.internal_id);
|
|
3562
|
+
}, clickThumbnail: () => {
|
|
3563
|
+
openLightbox(thumbnails[index], index);
|
|
3564
|
+
} }, index) })));
|
|
3565
|
+
if (file.fileType.includes("video"))
|
|
3566
|
+
return (jsxRuntime.jsx(Col, Object.assign({ xs: 12, sm: 3, className: "flex-3-sm" }, { children: jsxRuntime.jsx(VideoThumbnail, { src: file.previewUrl, index: index, showX: true, isLoadingMedia: file.isLoadingMedia, removeThumbnail: () => {
|
|
3567
|
+
removeThumbnail(index);
|
|
3568
|
+
onDeleteThumbnail(file.internal_id);
|
|
3569
|
+
}, clickThumbnail: () => {
|
|
3570
|
+
openLightbox(thumbnails[index], index);
|
|
3571
|
+
} }, index) })));
|
|
3572
|
+
return null;
|
|
3573
|
+
}) })) }));
|
|
3405
3574
|
};
|
|
3406
3575
|
|
|
3407
3576
|
const UgModalBody = styled__default["default"](reactModals.Body) `
|
|
@@ -3470,28 +3639,28 @@ Lightbox.Body = ModalBody; // Includes Main and Details
|
|
|
3470
3639
|
Lightbox.Footer = Footer$3;
|
|
3471
3640
|
Lightbox.Close = reactModals.Close;
|
|
3472
3641
|
|
|
3473
|
-
var _path$
|
|
3474
|
-
function _extends$
|
|
3475
|
-
const SvgChevronLeftStroke = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
3642
|
+
var _path$n;
|
|
3643
|
+
function _extends$s() { _extends$s = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$s.apply(this, arguments); }
|
|
3644
|
+
const SvgChevronLeftStroke = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$s({
|
|
3476
3645
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3477
3646
|
width: 16,
|
|
3478
3647
|
height: 16,
|
|
3479
3648
|
focusable: "false",
|
|
3480
3649
|
viewBox: "0 0 16 16"
|
|
3481
|
-
}, props), _path$
|
|
3650
|
+
}, props), _path$n || (_path$n = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3482
3651
|
fill: "currentColor",
|
|
3483
3652
|
d: "M10.39 12.688a.5.5 0 01-.718.69l-.062-.066-4-5a.5.5 0 01-.054-.542l.054-.082 4-5a.5.5 0 01.83.55l-.05.074L6.641 8l3.75 4.688z"
|
|
3484
3653
|
})));
|
|
3485
3654
|
|
|
3486
|
-
var _path$
|
|
3487
|
-
function _extends$
|
|
3488
|
-
const SvgChevronRightStroke = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
3655
|
+
var _path$m;
|
|
3656
|
+
function _extends$r() { _extends$r = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$r.apply(this, arguments); }
|
|
3657
|
+
const SvgChevronRightStroke = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$r({
|
|
3489
3658
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3490
3659
|
width: 16,
|
|
3491
3660
|
height: 16,
|
|
3492
3661
|
focusable: "false",
|
|
3493
3662
|
viewBox: "0 0 16 16"
|
|
3494
|
-
}, props), _path$
|
|
3663
|
+
}, props), _path$m || (_path$m = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3495
3664
|
fill: "currentColor",
|
|
3496
3665
|
d: "M5.61 3.312a.5.5 0 01.718-.69l.062.066 4 5a.5.5 0 01.054.542l-.054.082-4 5a.5.5 0 01-.83-.55l.05-.074L9.359 8l-3.75-4.688z"
|
|
3497
3666
|
})));
|
|
@@ -3714,81 +3883,270 @@ Slider.Slide = Slide;
|
|
|
3714
3883
|
Slider.PrevButton = PrevButton;
|
|
3715
3884
|
Slider.NextButton = NextButton;
|
|
3716
3885
|
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3886
|
+
var _path$l, _path2$5;
|
|
3887
|
+
function _extends$q() { _extends$q = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$q.apply(this, arguments); }
|
|
3888
|
+
const SvgVolumeMutedFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$q({
|
|
3889
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3890
|
+
width: 16,
|
|
3891
|
+
height: 16,
|
|
3892
|
+
focusable: "false",
|
|
3893
|
+
viewBox: "0 0 16 16"
|
|
3894
|
+
}, props), _path$l || (_path$l = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3895
|
+
stroke: "currentColor",
|
|
3896
|
+
strokeLinecap: "round",
|
|
3897
|
+
d: "M11.5 10l4-4m-4 0l4 4"
|
|
3898
|
+
})), _path2$5 || (_path2$5 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3899
|
+
fill: "currentColor",
|
|
3900
|
+
d: "M9 15.29c-.26 0-.51-.1-.71-.29l-4-4H1c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h3.29l4-4a1.002 1.002 0 011.71.71V14.3a.986.986 0 01-1 .99z"
|
|
3901
|
+
})));
|
|
3729
3902
|
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3903
|
+
var _path$k, _path2$4;
|
|
3904
|
+
function _extends$p() { _extends$p = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$p.apply(this, arguments); }
|
|
3905
|
+
const SvgVolumeUnmutedFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$p({
|
|
3906
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
3907
|
+
width: 16,
|
|
3908
|
+
height: 16,
|
|
3909
|
+
focusable: "false",
|
|
3910
|
+
viewBox: "0 0 16 16"
|
|
3911
|
+
}, props), _path$k || (_path$k = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3912
|
+
fill: "currentColor",
|
|
3913
|
+
d: "M9 15.29c-.26 0-.51-.1-.71-.29l-4-4H1c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h3.29l4-4a1.002 1.002 0 011.71.71V14.3a.986.986 0 01-1 .99z"
|
|
3914
|
+
})), _path2$4 || (_path2$4 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3915
|
+
fill: "none",
|
|
3916
|
+
stroke: "currentColor",
|
|
3917
|
+
strokeLinecap: "round",
|
|
3918
|
+
d: "M11.77 9.77c.45-.45.73-1.08.73-1.77s-.28-1.31-.73-1.77m2.17 5.6c.97-.99 1.56-2.34 1.56-3.83 0-1.52-.62-2.89-1.61-3.89"
|
|
3919
|
+
})));
|
|
3920
|
+
|
|
3921
|
+
const AudioButton = () => {
|
|
3922
|
+
const [hasAudio, setHasAudio] = React.useState(false);
|
|
3923
|
+
const { isMuted, setMuted, context } = Video.useVideoContext();
|
|
3924
|
+
const { player } = context;
|
|
3925
|
+
const checkAudio = (video) => {
|
|
3926
|
+
if (!video) {
|
|
3927
|
+
return false;
|
|
3928
|
+
}
|
|
3929
|
+
const videohasAudio = video.mozHasAudio ||
|
|
3930
|
+
Boolean(video.webkitAudioDecodedByteCount) ||
|
|
3931
|
+
Boolean(video.audioTracks && video.audioTracks.length);
|
|
3932
|
+
setHasAudio(videohasAudio);
|
|
3933
|
+
};
|
|
3934
|
+
const hasVolume = (video) => {
|
|
3935
|
+
if (!video) {
|
|
3936
|
+
return false;
|
|
3937
|
+
}
|
|
3938
|
+
return video.volume > 0;
|
|
3939
|
+
};
|
|
3940
|
+
React.useEffect(() => {
|
|
3941
|
+
if (player && (player === null || player === void 0 ? void 0 : player.ref)) {
|
|
3942
|
+
setMuted(!hasVolume(player.ref.current));
|
|
3943
|
+
checkAudio(player.ref.current);
|
|
3944
|
+
}
|
|
3945
|
+
}, [context.isPlaying, isMuted]);
|
|
3946
|
+
return (jsxRuntime.jsx(IconButton, Object.assign({ isBright: true, disabled: !hasAudio, onClick: () => {
|
|
3947
|
+
if (player === null || player === void 0 ? void 0 : player.ref.current) {
|
|
3948
|
+
player.ref.current.volume = player.ref.current.volume > 0 ? 0 : 1;
|
|
3949
|
+
setMuted(!player.ref.current.volume);
|
|
3950
|
+
}
|
|
3951
|
+
} }, { children: isMuted || !hasAudio ? jsxRuntime.jsx(SvgVolumeMutedFill, {}) : jsxRuntime.jsx(SvgVolumeUnmutedFill, {}) })));
|
|
3750
3952
|
};
|
|
3751
3953
|
|
|
3752
|
-
|
|
3954
|
+
const ProgressContext = React.createContext(null);
|
|
3955
|
+
const ProgressContextProvider = ({ children, }) => {
|
|
3956
|
+
const [isGrabbing, setIsGrabbing] = React.useState(false);
|
|
3957
|
+
const [fromEnd, setFromEnd] = React.useState(false);
|
|
3958
|
+
const [activeBookmark, setactiveBookmark] = React.useState(undefined);
|
|
3959
|
+
const progressContextValue = React.useMemo(() => ({
|
|
3960
|
+
isGrabbing,
|
|
3961
|
+
fromEnd,
|
|
3962
|
+
activeBookmark,
|
|
3963
|
+
setIsGrabbing,
|
|
3964
|
+
setFromEnd,
|
|
3965
|
+
setactiveBookmark,
|
|
3966
|
+
reset: () => {
|
|
3967
|
+
setIsGrabbing(false);
|
|
3968
|
+
setFromEnd(false);
|
|
3969
|
+
setactiveBookmark(undefined);
|
|
3970
|
+
},
|
|
3971
|
+
}), [isGrabbing, fromEnd, activeBookmark]);
|
|
3972
|
+
return (jsxRuntime.jsx(ProgressContext.Provider, Object.assign({ value: progressContextValue }, { children: children })));
|
|
3973
|
+
};
|
|
3974
|
+
const useProgressContext = () => {
|
|
3975
|
+
const context = React.useContext(ProgressContext);
|
|
3976
|
+
if (!context)
|
|
3977
|
+
throw new Error("Provider not found for ProgressContextProvider");
|
|
3978
|
+
return context; // Now we can use the context in the component, SAFELY.
|
|
3979
|
+
};
|
|
3980
|
+
|
|
3981
|
+
var _g$2;
|
|
3753
3982
|
function _extends$o() { _extends$o = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$o.apply(this, arguments); }
|
|
3754
|
-
const
|
|
3983
|
+
const SvgGrip = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$o({
|
|
3755
3984
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3756
3985
|
width: 16,
|
|
3757
3986
|
height: 16,
|
|
3758
3987
|
focusable: "false",
|
|
3759
3988
|
viewBox: "0 0 16 16"
|
|
3760
|
-
}, props), _g$
|
|
3989
|
+
}, props), _g$2 || (_g$2 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
3761
3990
|
fill: "currentColor"
|
|
3762
3991
|
}, /*#__PURE__*/React__namespace.createElement("rect", {
|
|
3763
|
-
width:
|
|
3764
|
-
height:
|
|
3765
|
-
x:
|
|
3992
|
+
width: 2,
|
|
3993
|
+
height: 2,
|
|
3994
|
+
x: 5,
|
|
3766
3995
|
y: 1,
|
|
3767
|
-
rx:
|
|
3768
|
-
ry:
|
|
3996
|
+
rx: 0.5,
|
|
3997
|
+
ry: 0.5
|
|
3769
3998
|
}), /*#__PURE__*/React__namespace.createElement("rect", {
|
|
3770
|
-
width:
|
|
3771
|
-
height:
|
|
3999
|
+
width: 2,
|
|
4000
|
+
height: 2,
|
|
3772
4001
|
x: 9,
|
|
3773
4002
|
y: 1,
|
|
3774
|
-
rx:
|
|
3775
|
-
ry:
|
|
4003
|
+
rx: 0.5,
|
|
4004
|
+
ry: 0.5
|
|
4005
|
+
}), /*#__PURE__*/React__namespace.createElement("rect", {
|
|
4006
|
+
width: 2,
|
|
4007
|
+
height: 2,
|
|
4008
|
+
x: 5,
|
|
4009
|
+
y: 5,
|
|
4010
|
+
rx: 0.5,
|
|
4011
|
+
ry: 0.5
|
|
4012
|
+
}), /*#__PURE__*/React__namespace.createElement("rect", {
|
|
4013
|
+
width: 2,
|
|
4014
|
+
height: 2,
|
|
4015
|
+
x: 9,
|
|
4016
|
+
y: 5,
|
|
4017
|
+
rx: 0.5,
|
|
4018
|
+
ry: 0.5
|
|
4019
|
+
}), /*#__PURE__*/React__namespace.createElement("rect", {
|
|
4020
|
+
width: 2,
|
|
4021
|
+
height: 2,
|
|
4022
|
+
x: 5,
|
|
4023
|
+
y: 9,
|
|
4024
|
+
rx: 0.5,
|
|
4025
|
+
ry: 0.5
|
|
4026
|
+
}), /*#__PURE__*/React__namespace.createElement("rect", {
|
|
4027
|
+
width: 2,
|
|
4028
|
+
height: 2,
|
|
4029
|
+
x: 9,
|
|
4030
|
+
y: 9,
|
|
4031
|
+
rx: 0.5,
|
|
4032
|
+
ry: 0.5
|
|
4033
|
+
}), /*#__PURE__*/React__namespace.createElement("rect", {
|
|
4034
|
+
width: 2,
|
|
4035
|
+
height: 2,
|
|
4036
|
+
x: 5,
|
|
4037
|
+
y: 13,
|
|
4038
|
+
rx: 0.5,
|
|
4039
|
+
ry: 0.5
|
|
4040
|
+
}), /*#__PURE__*/React__namespace.createElement("rect", {
|
|
4041
|
+
width: 2,
|
|
4042
|
+
height: 2,
|
|
4043
|
+
x: 9,
|
|
4044
|
+
y: 13,
|
|
4045
|
+
rx: 0.5,
|
|
4046
|
+
ry: 0.5
|
|
3776
4047
|
}))));
|
|
3777
4048
|
|
|
3778
|
-
|
|
4049
|
+
const StyledGrabber = styled.styled.div `
|
|
4050
|
+
position: absolute;
|
|
4051
|
+
display: none;
|
|
4052
|
+
${({ isEnd }) => isEnd
|
|
4053
|
+
? `
|
|
4054
|
+
right: 0;
|
|
4055
|
+
border-top-right-radius: 2px;
|
|
4056
|
+
border-bottom-right-radius: 2px;
|
|
4057
|
+
`
|
|
4058
|
+
: `
|
|
4059
|
+
left: 0;
|
|
4060
|
+
border-top-left-radius: 2px;
|
|
4061
|
+
border-bottom-left-radius: 2px;
|
|
4062
|
+
`}
|
|
4063
|
+
height: 100%;
|
|
4064
|
+
width: 8px;
|
|
4065
|
+
background-color: white;
|
|
4066
|
+
z-index: 2;
|
|
4067
|
+
cursor: ew-resize;
|
|
4068
|
+
|
|
4069
|
+
div {
|
|
4070
|
+
display: flex;
|
|
4071
|
+
justify-content: center;
|
|
4072
|
+
align-items: center;
|
|
4073
|
+
height: 100%;
|
|
4074
|
+
width: 100%;
|
|
4075
|
+
color: ${({ theme }) => theme.palette.grey[500]};
|
|
4076
|
+
svg {
|
|
4077
|
+
width: auto;
|
|
4078
|
+
height: 50%;
|
|
4079
|
+
}
|
|
4080
|
+
}
|
|
4081
|
+
`;
|
|
4082
|
+
const activeBookMark = styled.css `
|
|
4083
|
+
height: 250%;
|
|
4084
|
+
transform: translateY(-30%);
|
|
4085
|
+
|
|
4086
|
+
${StyledGrabber} {
|
|
4087
|
+
display: block;
|
|
4088
|
+
}
|
|
4089
|
+
`;
|
|
4090
|
+
const Rect = styled.styled.div `
|
|
4091
|
+
position: absolute;
|
|
4092
|
+
height: 110%;
|
|
4093
|
+
background-color: ${({ hue, theme }) => hue || theme.palette.grey[800]};
|
|
4094
|
+
z-index: 1;
|
|
4095
|
+
border-radius: 2px;
|
|
4096
|
+
&:hover {
|
|
4097
|
+
${activeBookMark}
|
|
4098
|
+
border-radius: 4px;
|
|
4099
|
+
}
|
|
4100
|
+
color: white;
|
|
4101
|
+
${({ isActive }) => isActive && activeBookMark}
|
|
4102
|
+
|
|
4103
|
+
transition: width 0.1s ease;
|
|
4104
|
+
`;
|
|
4105
|
+
const Grabber = (props) => {
|
|
4106
|
+
const { observation } = props;
|
|
4107
|
+
const { setIsGrabbing, setactiveBookmark, setFromEnd } = useProgressContext();
|
|
4108
|
+
const handleDragStart = (e) => {
|
|
4109
|
+
setIsGrabbing(true);
|
|
4110
|
+
setactiveBookmark(observation);
|
|
4111
|
+
setFromEnd(!!props.isEnd);
|
|
4112
|
+
e.preventDefault();
|
|
4113
|
+
e.stopPropagation();
|
|
4114
|
+
};
|
|
4115
|
+
return (jsxRuntime.jsx(StyledGrabber, Object.assign({ isEnd: props.isEnd, onMouseDown: handleDragStart, onMouseMove: props.handleMouseMove }, { children: jsxRuntime.jsx("div", { children: jsxRuntime.jsx(SvgGrip, {}) }) })));
|
|
4116
|
+
};
|
|
4117
|
+
const Bookmark = (props) => {
|
|
4118
|
+
var _a, _b;
|
|
4119
|
+
const { start, end, hue, label } = props;
|
|
4120
|
+
const { context } = Video.useVideoContext();
|
|
4121
|
+
const videoStart = context.part.start || 0;
|
|
4122
|
+
const videoEnd = context.part.end || ((_a = context.player) === null || _a === void 0 ? void 0 : _a.totalTime) || 0;
|
|
4123
|
+
const duration = videoEnd - videoStart || ((_b = context.player) === null || _b === void 0 ? void 0 : _b.totalTime) || 0; //relative
|
|
4124
|
+
const { activeBookmark } = useProgressContext();
|
|
4125
|
+
if (!context.player || !context.player.ref) {
|
|
4126
|
+
return null;
|
|
4127
|
+
}
|
|
4128
|
+
if (start > videoEnd || start < videoStart)
|
|
4129
|
+
return null;
|
|
4130
|
+
return (jsxRuntime.jsx(Tooltip, Object.assign({ content: label, type: "light", size: "large" }, { children: jsxRuntime.jsxs(Rect, Object.assign({ isActive: activeBookmark && activeBookmark.id === props.id, hue: hue, style: {
|
|
4131
|
+
left: `${((start - videoStart) / duration) * 100}%`,
|
|
4132
|
+
width: `${((end - start) / duration) * 100}%`,
|
|
4133
|
+
}, onClick: props.onClick }, { children: [jsxRuntime.jsx(Grabber, { observation: props }), jsxRuntime.jsx(Grabber, { isEnd: true, observation: props })] })) })));
|
|
4134
|
+
};
|
|
4135
|
+
|
|
4136
|
+
var _path$j, _path2$3, _path3$1;
|
|
3779
4137
|
function _extends$n() { _extends$n = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$n.apply(this, arguments); }
|
|
3780
|
-
const
|
|
4138
|
+
const SvgBackSecondsFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$n({
|
|
3781
4139
|
width: 16,
|
|
3782
4140
|
height: 16,
|
|
3783
4141
|
viewBox: "0 0 16 16",
|
|
3784
4142
|
fill: "none",
|
|
3785
4143
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3786
|
-
}, props), _path$
|
|
4144
|
+
}, props), _path$j || (_path$j = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3787
4145
|
fillRule: "evenodd",
|
|
3788
4146
|
clipRule: "evenodd",
|
|
3789
|
-
d: "
|
|
4147
|
+
d: "M4.34099 3.5C5.25886 2.85974 6.34919 2.5 7.5 2.5C10.5477 2.5 13 4.95228 13 8C13 11.0477 10.5477 13.5 7.5 13.5C5.79771 13.5 4.25432 12.7171 3.18087 11.3753C2.83586 10.944 2.20657 10.8741 1.7753 11.2191C1.34404 11.5641 1.27412 12.1934 1.61913 12.6247C3.06275 14.4292 5.17372 15.5 7.5 15.5C11.6523 15.5 15 12.1523 15 8C15 3.84772 11.6523 0.5 7.5 0.5C5.84359 0.5 4.28318 1.04496 3 2.00147V1C3 0.447715 2.55229 0 2 0C1.44771 0 1 0.447715 1 1V4C1 4.85228 1.64772 5.5 2.5 5.5H5.5C6.05229 5.5 6.5 5.05228 6.5 4.5C6.5 3.94772 6.05229 3.5 5.5 3.5H4.34099Z",
|
|
3790
4148
|
fill: "currentColor"
|
|
3791
|
-
})), _path2$
|
|
4149
|
+
})), _path2$3 || (_path2$3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3792
4150
|
d: "M5.5 7.63073V7.07008H6.67566V11H6.02566V7.63073H5.5Z",
|
|
3793
4151
|
fill: "currentColor"
|
|
3794
4152
|
})), _path3$1 || (_path3$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -3796,20 +4154,20 @@ const SvgForwardSecondsFill = props => /*#__PURE__*/React__namespace.createEleme
|
|
|
3796
4154
|
fill: "currentColor"
|
|
3797
4155
|
})));
|
|
3798
4156
|
|
|
3799
|
-
var _path$
|
|
4157
|
+
var _path$i, _path2$2, _path3;
|
|
3800
4158
|
function _extends$m() { _extends$m = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$m.apply(this, arguments); }
|
|
3801
|
-
const
|
|
4159
|
+
const SvgForwardSecondsFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$m({
|
|
3802
4160
|
width: 16,
|
|
3803
4161
|
height: 16,
|
|
3804
4162
|
viewBox: "0 0 16 16",
|
|
3805
4163
|
fill: "none",
|
|
3806
4164
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3807
|
-
}, props), _path$
|
|
4165
|
+
}, props), _path$i || (_path$i = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3808
4166
|
fillRule: "evenodd",
|
|
3809
4167
|
clipRule: "evenodd",
|
|
3810
|
-
d: "
|
|
4168
|
+
d: "M11.659 3.5C10.7411 2.85974 9.65081 2.5 8.5 2.5C5.45228 2.5 3 4.95228 3 8C3 11.0477 5.45228 13.5 8.5 13.5C10.2023 13.5 11.7457 12.7171 12.8191 11.3753C13.1641 10.944 13.7934 10.8741 14.2247 11.2191C14.656 11.5641 14.7259 12.1934 14.3809 12.6247C12.9372 14.4292 10.8263 15.5 8.5 15.5C4.34772 15.5 1 12.1523 1 8C1 3.84772 4.34772 0.5 8.5 0.5C10.1564 0.5 11.7168 1.04496 13 2.00147V1C13 0.447715 13.4477 0 14 0C14.5523 0 15 0.447715 15 1V4C15 4.85228 14.3523 5.5 13.5 5.5H10.5C9.94771 5.5 9.5 5.05228 9.5 4.5C9.5 3.94772 9.94771 3.5 10.5 3.5H11.659Z",
|
|
3811
4169
|
fill: "currentColor"
|
|
3812
|
-
})), _path2$
|
|
4170
|
+
})), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3813
4171
|
d: "M5.5 7.63073V7.07008H6.67566V11H6.02566V7.63073H5.5Z",
|
|
3814
4172
|
fill: "currentColor"
|
|
3815
4173
|
})), _path3 || (_path3 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
@@ -3817,18 +4175,57 @@ const SvgBackSecondsFill = props => /*#__PURE__*/React__namespace.createElement(
|
|
|
3817
4175
|
fill: "currentColor"
|
|
3818
4176
|
})));
|
|
3819
4177
|
|
|
3820
|
-
var
|
|
4178
|
+
var _g$1;
|
|
3821
4179
|
function _extends$l() { _extends$l = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$l.apply(this, arguments); }
|
|
3822
|
-
const
|
|
4180
|
+
const SvgPauseFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$l({
|
|
4181
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4182
|
+
width: 16,
|
|
4183
|
+
height: 16,
|
|
4184
|
+
focusable: "false",
|
|
4185
|
+
viewBox: "0 0 16 16"
|
|
4186
|
+
}, props), _g$1 || (_g$1 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
4187
|
+
fill: "currentColor"
|
|
4188
|
+
}, /*#__PURE__*/React__namespace.createElement("rect", {
|
|
4189
|
+
width: 4,
|
|
4190
|
+
height: 14,
|
|
4191
|
+
x: 3,
|
|
4192
|
+
y: 1,
|
|
4193
|
+
rx: 1,
|
|
4194
|
+
ry: 1
|
|
4195
|
+
}), /*#__PURE__*/React__namespace.createElement("rect", {
|
|
4196
|
+
width: 4,
|
|
4197
|
+
height: 14,
|
|
4198
|
+
x: 9,
|
|
4199
|
+
y: 1,
|
|
4200
|
+
rx: 1,
|
|
4201
|
+
ry: 1
|
|
4202
|
+
}))));
|
|
4203
|
+
|
|
4204
|
+
var _path$h;
|
|
4205
|
+
function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
4206
|
+
const SvgPlayFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
4207
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4208
|
+
width: 16,
|
|
4209
|
+
height: 16,
|
|
4210
|
+
focusable: "false",
|
|
4211
|
+
viewBox: "0 0 16 16"
|
|
4212
|
+
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4213
|
+
fill: "currentColor",
|
|
4214
|
+
d: "M6 15.79c-.13 0-.26-.03-.38-.08a.977.977 0 01-.62-.92V1.21a1 1 0 01.62-.93C6 .12 6.42.21 6.71.5l6.44 6.44c.58.58.58 1.54 0 2.12L6.71 15.5c-.19.19-.45.29-.71.29z"
|
|
4215
|
+
})));
|
|
4216
|
+
|
|
4217
|
+
var _path$g, _path2$1;
|
|
4218
|
+
function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
|
|
4219
|
+
const SvgPreviousFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
3823
4220
|
xmlns: "http://www.w3.org/2000/svg",
|
|
3824
4221
|
width: 16,
|
|
3825
4222
|
height: 16,
|
|
3826
4223
|
focusable: "false",
|
|
3827
4224
|
viewBox: "0 0 24 24"
|
|
3828
|
-
}, props), _path$
|
|
4225
|
+
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3829
4226
|
d: "M2.75 20C2.75 20.5523 3.19772 21 3.75 21C4.30228 21 4.75 20.5523 4.75 20L4.75 4C4.75 3.44772 4.30229 3 3.75 3C3.19772 3 2.75 3.44772 2.75 4V20Z",
|
|
3830
4227
|
fill: "currentColor"
|
|
3831
|
-
})), _path2$
|
|
4228
|
+
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3832
4229
|
d: "M20.75 19.0526C20.75 20.4774 19.1383 21.305 17.9803 20.4748L7.51062 12.9682C6.50574 12.2477 6.54467 10.7407 7.5854 10.073L18.0551 3.35665C19.2198 2.60946 20.75 3.44583 20.75 4.82961L20.75 19.0526Z",
|
|
3833
4230
|
fill: "currentColor"
|
|
3834
4231
|
})));
|
|
@@ -3858,8 +4255,9 @@ const getNextPlaybackRate = (rate = 1) => {
|
|
|
3858
4255
|
const StyledDiv$3 = styled__default["default"].div `
|
|
3859
4256
|
display: flex;
|
|
3860
4257
|
align-items: center;
|
|
4258
|
+
justify-content: center;
|
|
3861
4259
|
`;
|
|
3862
|
-
const ControlsGroupCenter = () => {
|
|
4260
|
+
const ControlsGroupCenter = (props) => {
|
|
3863
4261
|
var _a;
|
|
3864
4262
|
const [playBackRate, setPlayBackRate] = React.useState(1);
|
|
3865
4263
|
const { context, togglePlay } = Video.useVideoContext();
|
|
@@ -3882,7 +4280,7 @@ const ControlsGroupCenter = () => {
|
|
|
3882
4280
|
const nextTime = videoRef.currentTime + 10;
|
|
3883
4281
|
videoRef.currentTime = nextTime;
|
|
3884
4282
|
};
|
|
3885
|
-
return (jsxRuntime.jsxs(StyledDiv$3, { children: [jsxRuntime.jsx(IconButton, Object.assign({ isBright: true, onClick: (e) => {
|
|
4283
|
+
return (jsxRuntime.jsxs(StyledDiv$3, Object.assign({}, props, { children: [jsxRuntime.jsx(IconButton, Object.assign({ isBright: true, onClick: (e) => {
|
|
3886
4284
|
if (videoRef) {
|
|
3887
4285
|
videoRef.currentTime = 0;
|
|
3888
4286
|
}
|
|
@@ -3895,94 +4293,12 @@ const ControlsGroupCenter = () => {
|
|
|
3895
4293
|
e.stopPropagation();
|
|
3896
4294
|
} }, { children: jsxRuntime.jsx(SvgForwardSecondsFill, {}) })), jsxRuntime.jsx(IconButton, Object.assign({ isBright: true, isPill: true, onClick: (e) => {
|
|
3897
4295
|
const newSpeed = getNextPlaybackRate(playBackRate);
|
|
3898
|
-
if (videoRef === null || videoRef === void 0 ? void 0 : videoRef.playbackRate) {
|
|
3899
|
-
setPlayBackRate(newSpeed);
|
|
3900
|
-
videoRef.playbackRate = newSpeed;
|
|
3901
|
-
}
|
|
3902
|
-
e.stopPropagation();
|
|
3903
|
-
} }, { children: jsxRuntime.jsxs(SM, Object.assign({ isBold: true, style: { lineHeight: "16px" } }, { children: [playBackRate, "x"] })) }))] }));
|
|
3904
|
-
};
|
|
3905
|
-
|
|
3906
|
-
const StyledDiv$2 = styled__default["default"].div `
|
|
3907
|
-
position: absolute;
|
|
3908
|
-
bottom: ${({ theme }) => theme.space.sm};
|
|
3909
|
-
right: 0;
|
|
3910
|
-
|
|
3911
|
-
padding: 0 ${({ theme }) => theme.space.xs};
|
|
3912
|
-
|
|
3913
|
-
span {
|
|
3914
|
-
color: ${({ theme }) => theme.palette.grey[300]};
|
|
3915
|
-
}
|
|
3916
|
-
`;
|
|
3917
|
-
const TimeLabel = ({ current, duration, }) => (jsxRuntime.jsx(StyledDiv$2, { children: jsxRuntime.jsxs(SM, Object.assign({ tag: "span" }, { children: [current, "/", duration] })) }));
|
|
3918
|
-
|
|
3919
|
-
var _path$h, _path2$2;
|
|
3920
|
-
function _extends$k() { _extends$k = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$k.apply(this, arguments); }
|
|
3921
|
-
const SvgVolumeMutedFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$k({
|
|
3922
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3923
|
-
width: 16,
|
|
3924
|
-
height: 16,
|
|
3925
|
-
focusable: "false",
|
|
3926
|
-
viewBox: "0 0 16 16"
|
|
3927
|
-
}, props), _path$h || (_path$h = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3928
|
-
stroke: "currentColor",
|
|
3929
|
-
strokeLinecap: "round",
|
|
3930
|
-
d: "M11.5 10l4-4m-4 0l4 4"
|
|
3931
|
-
})), _path2$2 || (_path2$2 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3932
|
-
fill: "currentColor",
|
|
3933
|
-
d: "M9 15.29c-.26 0-.51-.1-.71-.29l-4-4H1c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h3.29l4-4a1.002 1.002 0 011.71.71V14.3a.986.986 0 01-1 .99z"
|
|
3934
|
-
})));
|
|
3935
|
-
|
|
3936
|
-
var _path$g, _path2$1;
|
|
3937
|
-
function _extends$j() { _extends$j = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$j.apply(this, arguments); }
|
|
3938
|
-
const SvgVolumeUnmutedFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$j({
|
|
3939
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
3940
|
-
width: 16,
|
|
3941
|
-
height: 16,
|
|
3942
|
-
focusable: "false",
|
|
3943
|
-
viewBox: "0 0 16 16"
|
|
3944
|
-
}, props), _path$g || (_path$g = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3945
|
-
fill: "currentColor",
|
|
3946
|
-
d: "M9 15.29c-.26 0-.51-.1-.71-.29l-4-4H1c-.55 0-1-.45-1-1V6c0-.55.45-1 1-1h3.29l4-4a1.002 1.002 0 011.71.71V14.3a.986.986 0 01-1 .99z"
|
|
3947
|
-
})), _path2$1 || (_path2$1 = /*#__PURE__*/React__namespace.createElement("path", {
|
|
3948
|
-
fill: "none",
|
|
3949
|
-
stroke: "currentColor",
|
|
3950
|
-
strokeLinecap: "round",
|
|
3951
|
-
d: "M11.77 9.77c.45-.45.73-1.08.73-1.77s-.28-1.31-.73-1.77m2.17 5.6c.97-.99 1.56-2.34 1.56-3.83 0-1.52-.62-2.89-1.61-3.89"
|
|
3952
|
-
})));
|
|
3953
|
-
|
|
3954
|
-
const AudioButton = () => {
|
|
3955
|
-
const [hasAudio, setHasAudio] = React.useState(false);
|
|
3956
|
-
const { isMuted, setMuted, context } = Video.useVideoContext();
|
|
3957
|
-
const { player } = context;
|
|
3958
|
-
const checkAudio = (video) => {
|
|
3959
|
-
if (!video) {
|
|
3960
|
-
return false;
|
|
3961
|
-
}
|
|
3962
|
-
console.log("hasAudio?", video);
|
|
3963
|
-
const videohasAudio = video.mozHasAudio ||
|
|
3964
|
-
Boolean(video.webkitAudioDecodedByteCount) ||
|
|
3965
|
-
Boolean(video.audioTracks && video.audioTracks.length);
|
|
3966
|
-
setHasAudio(videohasAudio);
|
|
3967
|
-
};
|
|
3968
|
-
const hasVolume = (video) => {
|
|
3969
|
-
if (!video) {
|
|
3970
|
-
return false;
|
|
3971
|
-
}
|
|
3972
|
-
return video.volume > 0;
|
|
3973
|
-
};
|
|
3974
|
-
React.useEffect(() => {
|
|
3975
|
-
if (player && (player === null || player === void 0 ? void 0 : player.ref)) {
|
|
3976
|
-
setMuted(!hasVolume(player.ref.current));
|
|
3977
|
-
checkAudio(player.ref.current);
|
|
3978
|
-
}
|
|
3979
|
-
}, [context.isPlaying, isMuted]);
|
|
3980
|
-
return (jsxRuntime.jsx(IconButton, Object.assign({ isBright: true, disabled: !hasAudio, onClick: () => {
|
|
3981
|
-
if (player === null || player === void 0 ? void 0 : player.ref.current) {
|
|
3982
|
-
player.ref.current.volume = player.ref.current.volume > 0 ? 0 : 1;
|
|
3983
|
-
setMuted(!player.ref.current.volume);
|
|
3984
|
-
}
|
|
3985
|
-
} }, { children: isMuted || !hasAudio ? jsxRuntime.jsx(SvgVolumeMutedFill, {}) : jsxRuntime.jsx(SvgVolumeUnmutedFill, {}) })));
|
|
4296
|
+
if (videoRef === null || videoRef === void 0 ? void 0 : videoRef.playbackRate) {
|
|
4297
|
+
setPlayBackRate(newSpeed);
|
|
4298
|
+
videoRef.playbackRate = newSpeed;
|
|
4299
|
+
}
|
|
4300
|
+
e.stopPropagation();
|
|
4301
|
+
} }, { children: jsxRuntime.jsxs(SM, Object.assign({ isBold: true, style: { lineHeight: "16px" } }, { children: [playBackRate, "x"] })) }))] })));
|
|
3986
4302
|
};
|
|
3987
4303
|
|
|
3988
4304
|
var _path$f;
|
|
@@ -4082,6 +4398,96 @@ const FullScreenButton = ({ container, }) => {
|
|
|
4082
4398
|
}, disabled: !canGoFullScreen() }, { children: document.fullscreenElement || isFullScreen ? (jsxRuntime.jsx(SvgMinimizeStroke, {})) : (jsxRuntime.jsx(SvgMaximizeStroke, {})) })));
|
|
4083
4399
|
};
|
|
4084
4400
|
|
|
4401
|
+
const UgProgress = styled__default["default"](reactLoaders.Progress) ``;
|
|
4402
|
+
/**
|
|
4403
|
+
* A Progress loader communicates progress when downloading or uploading content.
|
|
4404
|
+
* <hr>
|
|
4405
|
+
* Used for this:
|
|
4406
|
+
* - To communicate the amount of time left when downloading or uploading content
|
|
4407
|
+
*
|
|
4408
|
+
Not for this:
|
|
4409
|
+
- When the loading time is unknown, use a Spinner instead
|
|
4410
|
+
- When loading page content, use a Skeleton loader instead
|
|
4411
|
+
*/
|
|
4412
|
+
const Progress = React.forwardRef((props, ref) => (jsxRuntime.jsx(UgProgress, Object.assign({ ref: ref }, props))));
|
|
4413
|
+
|
|
4414
|
+
const StyledProgress = styled.styled(Progress) `
|
|
4415
|
+
width: 100%;
|
|
4416
|
+
border-radius: 0;
|
|
4417
|
+
color: ${({ theme }) => theme.palette.grey[700]};
|
|
4418
|
+
cursor: pointer;
|
|
4419
|
+
> div {
|
|
4420
|
+
border-radius: 0;
|
|
4421
|
+
}
|
|
4422
|
+
`;
|
|
4423
|
+
const ProgressBar = React.forwardRef((props, ref) => {
|
|
4424
|
+
const { progress, handleSkipAhead } = props;
|
|
4425
|
+
return (jsxRuntime.jsx(StyledProgress, { className: "progress-bar-1", ref: ref, value: progress, onClick: (e) => handleSkipAhead(e.clientX) }));
|
|
4426
|
+
});
|
|
4427
|
+
|
|
4428
|
+
const StyledDiv$2 = styled__default["default"].div `
|
|
4429
|
+
display: flex;
|
|
4430
|
+
color: ${({ theme }) => theme.palette.grey[300]};
|
|
4431
|
+
`;
|
|
4432
|
+
const TimeLabel = ({ current, duration, }) => (jsxRuntime.jsx(StyledDiv$2, { children: jsxRuntime.jsxs(SM, Object.assign({ tag: "span" }, { children: [formatDuration(current), "/", formatDuration(duration)] })) }));
|
|
4433
|
+
|
|
4434
|
+
const Wrapper$1 = styled__default["default"].div `
|
|
4435
|
+
position: absolute;
|
|
4436
|
+
bottom: ${({ theme }) => theme.space.sm};
|
|
4437
|
+
z-index: 1;
|
|
4438
|
+
`;
|
|
4439
|
+
const Content$1 = styled__default["default"].div `
|
|
4440
|
+
display: flex;
|
|
4441
|
+
background-color: ${({ theme }) => theme.palette.grey[800]};
|
|
4442
|
+
border-radius: 2px;
|
|
4443
|
+
width: auto;
|
|
4444
|
+
padding: 2px 4px;
|
|
4445
|
+
display: inline-flex;
|
|
4446
|
+
color: white;
|
|
4447
|
+
align-items: center;
|
|
4448
|
+
justify-content: center;
|
|
4449
|
+
min-height: 16px;
|
|
4450
|
+
`;
|
|
4451
|
+
const PlayerTooltip = (_a) => {
|
|
4452
|
+
var { children } = _a, props = __rest(_a, ["children"]);
|
|
4453
|
+
return (jsxRuntime.jsx(Wrapper$1, Object.assign({}, props, { children: jsxRuntime.jsx(Content$1, { children: children }) })));
|
|
4454
|
+
};
|
|
4455
|
+
|
|
4456
|
+
var _path$d, _circle$1;
|
|
4457
|
+
function _extends$g() { _extends$g = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$g.apply(this, arguments); }
|
|
4458
|
+
const SvgTagStroke = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$g({
|
|
4459
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
4460
|
+
width: 16,
|
|
4461
|
+
height: 16,
|
|
4462
|
+
focusable: "false",
|
|
4463
|
+
viewBox: "0 0 16 16"
|
|
4464
|
+
}, props), _path$d || (_path$d = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4465
|
+
fill: "none",
|
|
4466
|
+
stroke: "currentColor",
|
|
4467
|
+
d: "M.5 1v5.3c0 .1.1.3.1.4l8.5 8.5c.2.2.5.2.7 0l5.3-5.3c.2-.2.2-.5 0-.7L6.6.6S6.4.5 6.3.5H1C.7.5.5.7.5 1z"
|
|
4468
|
+
})), _circle$1 || (_circle$1 = /*#__PURE__*/React__namespace.createElement("circle", {
|
|
4469
|
+
cx: 4,
|
|
4470
|
+
cy: 4,
|
|
4471
|
+
r: 1,
|
|
4472
|
+
fill: "currentColor"
|
|
4473
|
+
})));
|
|
4474
|
+
|
|
4475
|
+
const Cutter = ({ onCutHandler, isCutting, i18n, }) => {
|
|
4476
|
+
var _a;
|
|
4477
|
+
const { context } = Video.useVideoContext();
|
|
4478
|
+
const videoRef = (_a = context.player) === null || _a === void 0 ? void 0 : _a.ref.current;
|
|
4479
|
+
if (!onCutHandler)
|
|
4480
|
+
return null;
|
|
4481
|
+
return (jsxRuntime.jsxs(Button, Object.assign({ isPrimary: true, isAccent: true, size: "small", onClick: (e) => {
|
|
4482
|
+
if (videoRef) {
|
|
4483
|
+
onCutHandler(videoRef.currentTime);
|
|
4484
|
+
}
|
|
4485
|
+
e.stopPropagation();
|
|
4486
|
+
} }, { children: [jsxRuntime.jsx(Button.StartIcon, { children: jsxRuntime.jsx(SvgTagStroke, {}) }), isCutting
|
|
4487
|
+
? (i18n === null || i18n === void 0 ? void 0 : i18n.onHighlight) || "Click again to stop"
|
|
4488
|
+
: (i18n === null || i18n === void 0 ? void 0 : i18n.beforeHighlight) || "New highlight"] })));
|
|
4489
|
+
};
|
|
4490
|
+
|
|
4085
4491
|
const ControlsWrapper = styled__default["default"].div `
|
|
4086
4492
|
position: absolute;
|
|
4087
4493
|
bottom: 0;
|
|
@@ -4092,15 +4498,6 @@ const ControlsWrapper = styled__default["default"].div `
|
|
|
4092
4498
|
${({ isPlaying }) => isPlaying && "display: none;"}
|
|
4093
4499
|
z-index: 2;
|
|
4094
4500
|
`;
|
|
4095
|
-
const StyledProgress = styled__default["default"](Progress) `
|
|
4096
|
-
width: 100%;
|
|
4097
|
-
border-radius: 0;
|
|
4098
|
-
color: ${({ theme }) => theme.palette.kale[700]};
|
|
4099
|
-
cursor: pointer;
|
|
4100
|
-
> div {
|
|
4101
|
-
border-radius: 0;
|
|
4102
|
-
}
|
|
4103
|
-
`;
|
|
4104
4501
|
const StyledTooltip = styled__default["default"](PlayerTooltip) `
|
|
4105
4502
|
display: none;
|
|
4106
4503
|
`;
|
|
@@ -4119,18 +4516,23 @@ const StyledDiv$1 = styled__default["default"].div `
|
|
|
4119
4516
|
display: flex;
|
|
4120
4517
|
align-items: center;
|
|
4121
4518
|
`;
|
|
4122
|
-
const Controls = ({ container, }) => {
|
|
4519
|
+
const Controls = ({ container, onCutHandler, bookmarks, isCutting, onBookMarkUpdated, i18n, }) => {
|
|
4123
4520
|
var _a, _b, _c;
|
|
4124
4521
|
const [progress, setProgress] = React.useState(0);
|
|
4125
4522
|
const [tooltipMargin, setTooltipMargin] = React.useState(0);
|
|
4126
4523
|
const [tooltipLabel, setTooltipLabel] = React.useState("00:00");
|
|
4524
|
+
const [marks, setMarks] = React.useState(bookmarks);
|
|
4127
4525
|
const progressRef = React.useRef(null);
|
|
4128
4526
|
const { context, setCurrentTime } = Video.useVideoContext();
|
|
4527
|
+
const { reset, isGrabbing, activeBookmark, fromEnd } = useProgressContext();
|
|
4528
|
+
React.useEffect(() => {
|
|
4529
|
+
setMarks(bookmarks);
|
|
4530
|
+
}, [bookmarks]);
|
|
4129
4531
|
const relCurrentTime = ((_a = context.player) === null || _a === void 0 ? void 0 : _a.currentTime)
|
|
4130
4532
|
? ((_b = context.player) === null || _b === void 0 ? void 0 : _b.currentTime) - context.part.start
|
|
4131
4533
|
: 0;
|
|
4132
4534
|
const duration = context.part.end - context.part.start || ((_c = context.player) === null || _c === void 0 ? void 0 : _c.totalTime) || 0; //relative
|
|
4133
|
-
const getVideoPositionFromEvent = (clientX) => {
|
|
4535
|
+
const getVideoPositionFromEvent = React.useCallback((clientX) => {
|
|
4134
4536
|
if (progressRef && progressRef.current && duration) {
|
|
4135
4537
|
const bounds = progressRef.current.getBoundingClientRect();
|
|
4136
4538
|
const x = clientX - bounds.left;
|
|
@@ -4138,12 +4540,18 @@ const Controls = ({ container, }) => {
|
|
|
4138
4540
|
return videoPositionSecs;
|
|
4139
4541
|
}
|
|
4140
4542
|
return 0;
|
|
4141
|
-
};
|
|
4543
|
+
}, [progressRef, duration]);
|
|
4544
|
+
const getProgress = React.useCallback((currentTime) => {
|
|
4545
|
+
const current = currentTime - (context.part.start || 0);
|
|
4546
|
+
if (duration === 0)
|
|
4547
|
+
return 0;
|
|
4548
|
+
return (current / duration) * 100;
|
|
4549
|
+
}, [context.part.start, duration]);
|
|
4142
4550
|
const handleSkipAhead = React.useCallback((pageX) => {
|
|
4143
4551
|
const time = getVideoPositionFromEvent(pageX) + (context.part.start || 0);
|
|
4144
4552
|
setCurrentTime(time);
|
|
4145
4553
|
setProgress(getProgress(time));
|
|
4146
|
-
}, [
|
|
4554
|
+
}, [getVideoPositionFromEvent, context.part.start, setCurrentTime, getProgress]);
|
|
4147
4555
|
const onMouseEvent = (e) => {
|
|
4148
4556
|
if (progressRef && progressRef.current) {
|
|
4149
4557
|
const tooltipWidth = 40;
|
|
@@ -4154,31 +4562,58 @@ const Controls = ({ container, }) => {
|
|
|
4154
4562
|
const videoTargetDuration = getVideoPositionFromEvent(e.clientX);
|
|
4155
4563
|
setTooltipMargin(newTooltipMargin);
|
|
4156
4564
|
setTooltipLabel(formatDuration(videoTargetDuration));
|
|
4565
|
+
if (isGrabbing) {
|
|
4566
|
+
handleBookmarkUpdate(marginX, progressRef.current.clientWidth);
|
|
4567
|
+
}
|
|
4157
4568
|
}
|
|
4158
4569
|
};
|
|
4570
|
+
const handleBookmarkUpdate = React.useCallback((newX, clientW) => {
|
|
4571
|
+
if (!activeBookmark || !marks)
|
|
4572
|
+
return;
|
|
4573
|
+
const currentObsIndex = marks.findIndex((mark) => mark.id === activeBookmark.id);
|
|
4574
|
+
const value = (newX / clientW) * duration + context.part.start;
|
|
4575
|
+
const updatedMark = Object.assign(Object.assign({}, marks[currentObsIndex]), (!!fromEnd ? { end: value } : { start: value }));
|
|
4576
|
+
const newMarks = [
|
|
4577
|
+
...marks.slice(0, currentObsIndex),
|
|
4578
|
+
updatedMark,
|
|
4579
|
+
...marks.slice(currentObsIndex + 1),
|
|
4580
|
+
];
|
|
4581
|
+
setMarks(newMarks);
|
|
4582
|
+
onBookMarkUpdated === null || onBookMarkUpdated === void 0 ? void 0 : onBookMarkUpdated(updatedMark);
|
|
4583
|
+
}, [
|
|
4584
|
+
activeBookmark,
|
|
4585
|
+
context.part.start,
|
|
4586
|
+
duration,
|
|
4587
|
+
fromEnd,
|
|
4588
|
+
onBookMarkUpdated,
|
|
4589
|
+
marks,
|
|
4590
|
+
]);
|
|
4159
4591
|
React.useEffect(() => {
|
|
4160
4592
|
var _a;
|
|
4161
4593
|
const currentTime = ((_a = context.player) === null || _a === void 0 ? void 0 : _a.currentTime) || 0;
|
|
4162
4594
|
setProgress(getProgress(currentTime));
|
|
4163
|
-
}, [context.player]);
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
return (
|
|
4169
|
-
|
|
4170
|
-
|
|
4595
|
+
}, [context.player, getProgress]);
|
|
4596
|
+
React.useEffect(() => {
|
|
4597
|
+
if (!marks)
|
|
4598
|
+
return;
|
|
4599
|
+
document.addEventListener("mouseup", reset);
|
|
4600
|
+
return () => {
|
|
4601
|
+
document.removeEventListener("mouseup", reset);
|
|
4602
|
+
};
|
|
4603
|
+
}, [reset, marks]);
|
|
4604
|
+
return (jsxRuntime.jsxs(ControlsWrapper, Object.assign({ isPlaying: context.isPlaying }, { children: [jsxRuntime.jsxs(ProgressContainer, Object.assign({ onMouseEnter: onMouseEvent, onMouseMove: onMouseEvent, onMouseLeave: onMouseEvent }, { children: [jsxRuntime.jsx(StyledTooltip, Object.assign({ style: { marginLeft: `${tooltipMargin}px` } }, { children: tooltipLabel })), !!duration &&
|
|
4605
|
+
(marks === null || marks === void 0 ? void 0 : marks.map((bookmark, index) => (jsxRuntime.jsx(Bookmark, Object.assign({}, bookmark), `${index}${bookmark.start}`)))), jsxRuntime.jsx(ProgressBar, { ref: progressRef, progress: progress, handleSkipAhead: handleSkipAhead, duration: duration })] })), jsxRuntime.jsxs(ControlsBar, { children: [jsxRuntime.jsxs(StyledDiv$1, Object.assign({ style: { width: "20%", justifyContent: "start" } }, { children: [jsxRuntime.jsx(AudioButton, {}), jsxRuntime.jsx(TimeLabel, { current: relCurrentTime, duration: duration })] })), jsxRuntime.jsx(ControlsGroupCenter, { style: { width: "60%" } }), jsxRuntime.jsxs(StyledDiv$1, Object.assign({ style: { width: "20%", justifyContent: "end" } }, { children: [jsxRuntime.jsx(Cutter, { onCutHandler: onCutHandler, isCutting: isCutting, i18n: i18n }), jsxRuntime.jsx(FullScreenButton, { container: container })] }))] })] })));
|
|
4171
4606
|
};
|
|
4172
4607
|
|
|
4173
|
-
var _path$
|
|
4174
|
-
function _extends$
|
|
4175
|
-
const SvgPlayIcon = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$
|
|
4608
|
+
var _path$c;
|
|
4609
|
+
function _extends$f() { _extends$f = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
|
|
4610
|
+
const SvgPlayIcon = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
4176
4611
|
width: 70,
|
|
4177
4612
|
height: 70,
|
|
4178
4613
|
viewBox: "0 0 70 70",
|
|
4179
4614
|
fill: "none",
|
|
4180
4615
|
xmlns: "http://www.w3.org/2000/svg"
|
|
4181
|
-
}, props), _path$
|
|
4616
|
+
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4182
4617
|
d: "M60 35L17 62L17 8L60 35Z",
|
|
4183
4618
|
fill: "#003A57"
|
|
4184
4619
|
})));
|
|
@@ -4294,18 +4729,15 @@ const VideoSpinner = () => (jsxRuntime.jsx(StyledDiv, { children: jsxRuntime.jsx
|
|
|
4294
4729
|
* Used for this:
|
|
4295
4730
|
- To display a video
|
|
4296
4731
|
*/
|
|
4297
|
-
const Player = React.forwardRef((props, forwardRef) => {
|
|
4298
|
-
const videoRef = React.useRef(null);
|
|
4299
|
-
React.useImperativeHandle(forwardRef, () => videoRef.current);
|
|
4300
|
-
return (jsxRuntime.jsx(Video__default["default"], Object.assign({ src: props.url }, props, { children: jsxRuntime.jsx(PlayerCore, Object.assign({ ref: videoRef }, props)) })));
|
|
4301
|
-
});
|
|
4732
|
+
const Player = React.forwardRef((props, forwardRef) => (jsxRuntime.jsx(Video__default["default"], Object.assign({ src: props.url }, props, { children: jsxRuntime.jsx(PlayerCore, Object.assign({ ref: forwardRef }, props)) }))));
|
|
4302
4733
|
const PlayerCore = React.forwardRef((props, forwardRef) => {
|
|
4303
4734
|
var _a;
|
|
4304
4735
|
const { context, togglePlay, setIsPlaying } = Video.useVideoContext();
|
|
4736
|
+
const { onCutHandler, bookmarks, isCutting } = props;
|
|
4305
4737
|
const videoRef = (_a = context.player) === null || _a === void 0 ? void 0 : _a.ref.current;
|
|
4306
4738
|
const isLoaded = !!videoRef;
|
|
4307
4739
|
const containerRef = React.useRef(null);
|
|
4308
|
-
React.useImperativeHandle(forwardRef, () => videoRef);
|
|
4740
|
+
React.useImperativeHandle(forwardRef, () => videoRef, [videoRef]);
|
|
4309
4741
|
React.useEffect(() => {
|
|
4310
4742
|
if (videoRef) {
|
|
4311
4743
|
videoRef.addEventListener("pause", () => {
|
|
@@ -4319,8 +4751,8 @@ const PlayerCore = React.forwardRef((props, forwardRef) => {
|
|
|
4319
4751
|
});
|
|
4320
4752
|
}
|
|
4321
4753
|
};
|
|
4322
|
-
}, [videoRef]);
|
|
4323
|
-
return (jsxRuntime.jsxs(Container$1, Object.assign({ isLoaded: isLoaded, isPlaying: context.isPlaying, ref: containerRef }, { children: [!isLoaded ? (jsxRuntime.jsx(VideoSpinner, {})) : (jsxRuntime.jsx(FloatingControls, { isPlaying: context.isPlaying, onClick: togglePlay })), jsxRuntime.jsx(Video__default["default"].Player, { className: "player-container" }), jsxRuntime.jsx(Controls, { container: containerRef.current })] })));
|
|
4754
|
+
}, [setIsPlaying, videoRef]);
|
|
4755
|
+
return (jsxRuntime.jsxs(Container$1, Object.assign({ isLoaded: isLoaded, isPlaying: context.isPlaying, ref: containerRef }, { children: [!isLoaded ? (jsxRuntime.jsx(VideoSpinner, {})) : (jsxRuntime.jsx(FloatingControls, { isPlaying: context.isPlaying, onClick: togglePlay })), jsxRuntime.jsx(Video__default["default"].Player, { className: "player-container" }), jsxRuntime.jsx(ProgressContextProvider, { children: jsxRuntime.jsx(Controls, { container: containerRef.current, onCutHandler: onCutHandler, bookmarks: bookmarks, isCutting: isCutting, onBookMarkUpdated: props.handleBookmarkUpdate, i18n: props.i18n }) })] })));
|
|
4324
4756
|
});
|
|
4325
4757
|
|
|
4326
4758
|
const ChatBoxContainer = styled__default["default"].div `
|
|
@@ -4344,7 +4776,8 @@ const ChatBoxContainer = styled__default["default"].div `
|
|
|
4344
4776
|
const CommentBox = (_a) => {
|
|
4345
4777
|
var { placeholderOptions } = _a, props = __rest(_a, ["placeholderOptions"]);
|
|
4346
4778
|
const { children, hasFloatingMenu, hasButtonsMenu, bubbleOptions, i18n } = props;
|
|
4347
|
-
const { editor, setEditor, mentionableUsers, triggerSave, thumbnails, addThumbnails } = useChatContext();
|
|
4779
|
+
const { editor, setEditor, mentionableUsers, triggerSave, thumbnails, addThumbnails, } = useChatContext();
|
|
4780
|
+
const { addToast } = useToast();
|
|
4348
4781
|
const [isOpen, setIsOpen] = React.useState(false);
|
|
4349
4782
|
const [selectedImage, setSelectedImage] = React.useState({});
|
|
4350
4783
|
const [selectedImageIndex, setSelectedImageIndex] = React.useState(0);
|
|
@@ -4380,65 +4813,45 @@ const CommentBox = (_a) => {
|
|
|
4380
4813
|
return false;
|
|
4381
4814
|
event.preventDefault();
|
|
4382
4815
|
const files = Array.from(event.dataTransfer.files).map((file) => {
|
|
4383
|
-
return Object.assign(file, {
|
|
4816
|
+
return Object.assign(file, {
|
|
4817
|
+
isLoadingMedia: false,
|
|
4818
|
+
internal_id: uuid.v4(),
|
|
4819
|
+
});
|
|
4384
4820
|
});
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
type="error"
|
|
4392
|
-
message={"File type not supported"}
|
|
4393
|
-
closeText={"Close"}
|
|
4394
|
-
isPrimary
|
|
4395
|
-
/>
|
|
4396
|
-
),
|
|
4397
|
-
{ placement: "top" }
|
|
4398
|
-
);
|
|
4399
|
-
}
|
|
4400
|
-
}*/
|
|
4821
|
+
const wrongFiles = files.filter((file) => !/^(image|video)\//.test(file.type));
|
|
4822
|
+
if (wrongFiles.length > 0) {
|
|
4823
|
+
for (const file of wrongFiles) {
|
|
4824
|
+
addToast(({ close }) => (jsxRuntime.jsx(Notification, { onClose: close, type: "error", message: `${props.messageBadFileFormat} - ${file.name}`, isPrimary: true })), { placement: "top" });
|
|
4825
|
+
}
|
|
4826
|
+
}
|
|
4401
4827
|
const mediaFiles = files.filter((file) => /^(image|video)\//.test(file.type));
|
|
4402
4828
|
if (mediaFiles.length === 0)
|
|
4403
4829
|
return false;
|
|
4404
4830
|
addThumbnails({ files: mediaFiles });
|
|
4405
4831
|
return false;
|
|
4406
4832
|
},
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
(item) => item.type && item.type.startsWith("image/")
|
|
4416
|
-
);
|
|
4417
|
-
const textItem = items.find((item) => item.type === "text/plain");
|
|
4418
|
-
|
|
4419
|
-
if (imageItems.length > 0) {
|
|
4420
|
-
imageItems.forEach((imageItem) => {
|
|
4421
|
-
const file = imageItem.getAsFile();
|
|
4422
|
-
if (file) {
|
|
4423
|
-
const imageUrl = URL.createObjectURL(file);
|
|
4424
|
-
const node = view.state.schema.nodes.image.create({
|
|
4425
|
-
src: imageUrl,
|
|
4833
|
+
handlePaste: (view, event, slice) => {
|
|
4834
|
+
if (!event.clipboardData || !event.clipboardData.items)
|
|
4835
|
+
return false;
|
|
4836
|
+
event.preventDefault();
|
|
4837
|
+
const files = Array.from(event.clipboardData.files).map((file) => {
|
|
4838
|
+
return Object.assign(file, {
|
|
4839
|
+
isLoadingMedia: false,
|
|
4840
|
+
internal_id: uuid.v4(),
|
|
4426
4841
|
});
|
|
4427
|
-
const transaction = view.state.tr.replaceSelectionWith(node);
|
|
4428
|
-
view.dispatch(transaction);
|
|
4429
|
-
}
|
|
4430
|
-
});
|
|
4431
|
-
} else if (textItem) {
|
|
4432
|
-
textItem.getAsString(async (text) => {
|
|
4433
|
-
const node = view.state.schema.text(text);
|
|
4434
|
-
const tr = view.state.tr;
|
|
4435
|
-
tr.replaceSelectionWith(node);
|
|
4436
|
-
view.dispatch(tr);
|
|
4437
4842
|
});
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4843
|
+
const wrongFiles = files.filter((file) => !/^(image|video)\//.test(file.type));
|
|
4844
|
+
if (wrongFiles.length > 0) {
|
|
4845
|
+
for (const file of wrongFiles) {
|
|
4846
|
+
addToast(({ close }) => (jsxRuntime.jsx(Notification, { onClose: close, type: "error", message: `${props.messageBadFileFormat} - ${file.name}`, isPrimary: true })), { placement: "top" });
|
|
4847
|
+
}
|
|
4848
|
+
}
|
|
4849
|
+
const mediaFiles = files.filter((file) => /^(image|video)\//.test(file.type));
|
|
4850
|
+
if (mediaFiles.length === 0)
|
|
4851
|
+
return false;
|
|
4852
|
+
addThumbnails({ files: mediaFiles });
|
|
4853
|
+
return false;
|
|
4854
|
+
},
|
|
4442
4855
|
} }, props));
|
|
4443
4856
|
const onKeyDown = (event) => {
|
|
4444
4857
|
if ((event.ctrlKey || event.metaKey) && event.key === "Enter") {
|
|
@@ -4453,26 +4866,11 @@ const CommentBox = (_a) => {
|
|
|
4453
4866
|
const mediaFiles = thumbnails.map((file) => {
|
|
4454
4867
|
return Object.assign(file, { isLoadingMedia: file.isLoadingMedia });
|
|
4455
4868
|
});
|
|
4456
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isOpen && selectedImage && (jsxRuntime.jsxs(Lightbox, Object.assign({ onClose: closeLightbox }, { children: [jsxRuntime.jsx(Lightbox.Header, { children: selectedImage.name }), jsxRuntime.jsx(Lightbox.Body, { children: jsxRuntime.jsx(Lightbox.Body.Main, Object.assign({ style: { flex: 3 } }, { children: jsxRuntime.jsx(Slider, Object.assign({ prevArrow: jsxRuntime.jsx(Slider.PrevButton, { isBright: true }), nextArrow: jsxRuntime.jsx(Slider.NextButton, { isBright: true }), onSlideChange: slideChange, initialSlide: selectedImageIndex }, { children: mediaFiles.map((item, index) => (jsxRuntime.jsxs(Slider.Slide, { children: [item.type.includes("image") && (jsxRuntime.jsx("img", { src: URL.createObjectURL(
|
|
4869
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [isOpen && selectedImage && (jsxRuntime.jsxs(Lightbox, Object.assign({ onClose: closeLightbox }, { children: [jsxRuntime.jsx(Lightbox.Header, { children: selectedImage.name }), jsxRuntime.jsx(Lightbox.Body, { children: jsxRuntime.jsx(Lightbox.Body.Main, Object.assign({ style: { flex: 3 } }, { children: jsxRuntime.jsx(Slider, Object.assign({ prevArrow: jsxRuntime.jsx(Slider.PrevButton, { isBright: true }), nextArrow: jsxRuntime.jsx(Slider.NextButton, { isBright: true }), onSlideChange: slideChange, initialSlide: selectedImageIndex }, { children: mediaFiles.map((item, index) => (jsxRuntime.jsxs(Slider.Slide, { children: [item.type.includes("image") && (jsxRuntime.jsx("img", { src: URL.createObjectURL(item), alt: `media ${item.name}` })), item.type.includes("video") && (jsxRuntime.jsx(Player, { ref: (ref) => {
|
|
4457
4870
|
videoRefs.current.push(ref);
|
|
4458
|
-
}, url: URL.createObjectURL(
|
|
4871
|
+
}, url: URL.createObjectURL(item) }))] }))) })) })) }), jsxRuntime.jsx(Lightbox.Close, { "aria-label": "Close modal" })] }))), jsxRuntime.jsx(ChatBoxContainer, { children: jsxRuntime.jsxs(EditorContainer$1, Object.assign({ editable: true, style: { marginLeft: 0, paddingBottom: 12 } }, { children: [hasFloatingMenu && (jsxRuntime.jsx(FloatingMenu, { editor: ed, tippyOptions: Object.assign({}, bubbleOptions) })), jsxRuntime.jsx(react.EditorContent, { editor: ed, onKeyDown: onKeyDown }), jsxRuntime.jsx(ThumbnailContainer, { openLightbox: handleOpenLightbox })] })) }), hasButtonsMenu && jsxRuntime.jsx(CommentBar, { editor: ed, i18n: i18n })] }));
|
|
4459
4872
|
};
|
|
4460
4873
|
|
|
4461
|
-
var _path$c;
|
|
4462
|
-
function _extends$f() { _extends$f = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$f.apply(this, arguments); }
|
|
4463
|
-
const SvgDownloadStroke = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$f({
|
|
4464
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
4465
|
-
width: 16,
|
|
4466
|
-
height: 16,
|
|
4467
|
-
focusable: "false",
|
|
4468
|
-
viewBox: "0 0 16 16"
|
|
4469
|
-
}, props), _path$c || (_path$c = /*#__PURE__*/React__namespace.createElement("path", {
|
|
4470
|
-
fill: "none",
|
|
4471
|
-
stroke: "currentColor",
|
|
4472
|
-
strokeLinecap: "round",
|
|
4473
|
-
d: "M1.5 15.5h13m-11-7l4.1 4.1c.2.2.5.2.7 0l4.1-4.1m-4.4 4V.5"
|
|
4474
|
-
})));
|
|
4475
|
-
|
|
4476
4874
|
const CommentCard = styled.styled(Card) `
|
|
4477
4875
|
padding: ${({ theme }) => `${theme.space.base * 3}px ${theme.space.sm}`};
|
|
4478
4876
|
background-color: ${({ theme }) => theme.palette.grey[100]};
|
|
@@ -4512,16 +4910,6 @@ const Grey600Span = styled.styled.span `
|
|
|
4512
4910
|
const Grey800Span = styled.styled.span `
|
|
4513
4911
|
color: ${({ theme }) => theme.palette.grey[800]};
|
|
4514
4912
|
`;
|
|
4515
|
-
const StyledThumbnailContainer = styled.styled.div `
|
|
4516
|
-
display: grid;
|
|
4517
|
-
grid-template-columns: 1fr 1fr 1fr;
|
|
4518
|
-
overflow-y: scroll;
|
|
4519
|
-
justify-items: center;
|
|
4520
|
-
gap: 9px;
|
|
4521
|
-
background-color: inherit;
|
|
4522
|
-
margin-top: 10px;
|
|
4523
|
-
height: auto;
|
|
4524
|
-
`;
|
|
4525
4913
|
const Comment = ({ author, message, children, date, media = [], header, }) => {
|
|
4526
4914
|
var _a, _b;
|
|
4527
4915
|
const { mentionableUsers } = useChatContext();
|
|
@@ -4541,6 +4929,7 @@ const Comment = ({ author, message, children, date, media = [], header, }) => {
|
|
|
4541
4929
|
};
|
|
4542
4930
|
const videoRefs = React.useRef([]);
|
|
4543
4931
|
const slideChange = React.useCallback((index) => {
|
|
4932
|
+
setSelectedImage(media[index]);
|
|
4544
4933
|
setSelectedImageIndex(index);
|
|
4545
4934
|
videoRefs.current.forEach((ref) => {
|
|
4546
4935
|
if (ref) {
|
|
@@ -4557,14 +4946,23 @@ const Comment = ({ author, message, children, date, media = [], header, }) => {
|
|
|
4557
4946
|
ed.setOptions({
|
|
4558
4947
|
editable: false,
|
|
4559
4948
|
});
|
|
4560
|
-
return (jsxRuntime.jsxs(CommentCard, { children: [jsxRuntime.jsxs(AuthorContainer, { children: [jsxRuntime.jsx(Avatar, Object.assign({ avatarType: (_a = author.avatarType) !== null && _a !== void 0 ? _a : "text", style: { flexShrink: 0 } }, { children: author.avatar })), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs(CommentTitle, { children: [(_b = author.name) !== null && _b !== void 0 ? _b : "User", jsxRuntime.jsx(CommentDate, { children: date })] }), jsxRuntime.jsx(ReadOnly, { children: jsxRuntime.jsx(EditorContainer$1, Object.assign({ editable: false }, { children: jsxRuntime.jsx(react.EditorContent, { editor: ed }) })) })] })] }), jsxRuntime.jsx(
|
|
4561
|
-
|
|
4562
|
-
|
|
4949
|
+
return (jsxRuntime.jsxs(CommentCard, { children: [jsxRuntime.jsxs(AuthorContainer, { children: [jsxRuntime.jsx(Avatar, Object.assign({ avatarType: (_a = author.avatarType) !== null && _a !== void 0 ? _a : "text", style: { flexShrink: 0 } }, { children: author.avatar })), jsxRuntime.jsxs("div", { children: [jsxRuntime.jsxs(CommentTitle, { children: [(_b = author.name) !== null && _b !== void 0 ? _b : "User", " ", jsxRuntime.jsx(CommentDate, { children: date })] }), jsxRuntime.jsx(ReadOnly, { children: jsxRuntime.jsx(EditorContainer$1, Object.assign({ editable: false }, { children: jsxRuntime.jsx(react.EditorContent, { editor: ed }) })) })] })] }), jsxRuntime.jsx(Grid, { children: jsxRuntime.jsx(Row$1, Object.assign({ className: "responsive-container" }, { children: media.map((file, index) => {
|
|
4950
|
+
// Check if item is an image or a video
|
|
4951
|
+
if (file.type.includes("image"))
|
|
4952
|
+
return (jsxRuntime.jsx(Col, Object.assign({ xs: 12, sm: 4, className: "flex-3-sm" }, { children: jsxRuntime.jsx(ImageThumbnail, { src: file.url, index: index, showX: false, isLoadingMedia: false, clickThumbnail: () => {
|
|
4953
|
+
handleClickThumbnail(file, index);
|
|
4954
|
+
} }, index) })));
|
|
4955
|
+
if (file.type.includes("video"))
|
|
4956
|
+
return (jsxRuntime.jsx(Col, Object.assign({ xs: 12, sm: 4, className: "flex-3-sm" }, { children: jsxRuntime.jsx(VideoThumbnail, { src: file.url, index: index, showX: false, isLoadingMedia: false, clickThumbnail: () => {
|
|
4957
|
+
handleClickThumbnail(file, index);
|
|
4958
|
+
} }, index) })));
|
|
4959
|
+
return null;
|
|
4960
|
+
}) })) }), isOpen && selectedImage && (jsxRuntime.jsxs(Lightbox, Object.assign({ onClose: closeLightbox }, { children: [jsxRuntime.jsx(Lightbox.Header, { children: jsxRuntime.jsxs(reactTypography.MD, Object.assign({ isBold: true }, { children: [jsxRuntime.jsx(Grey600Span, { children: header && header.title }), header && header.message && (jsxRuntime.jsxs(Grey800Span, { children: [" | ", header.message] }))] })) }), jsxRuntime.jsxs(Lightbox.Body, { children: [jsxRuntime.jsx(Lightbox.Body.Main, Object.assign({ style: { flex: 2 } }, { children: jsxRuntime.jsx(Slider, Object.assign({ prevArrow: jsxRuntime.jsx(Slider.PrevButton, { isBright: true }), nextArrow: jsxRuntime.jsx(Slider.NextButton, { isBright: true }), onSlideChange: slideChange, initialSlide: selectedImageIndex }, { children: media.map((item, index) => (jsxRuntime.jsxs(Slider.Slide, { children: [item.type === "image" && (jsxRuntime.jsx("img", { src: item.url, alt: `{{${item.url}}}` })), item.type === "video" && (jsxRuntime.jsx(Player, { ref: (ref) => {
|
|
4563
4961
|
videoRefs.current.push(ref);
|
|
4564
4962
|
}, url: item.url }))] }))) })) })), jsxRuntime.jsx(Lightbox.Body.Details, Object.assign({ style: { flex: 1 } }, { children: jsxRuntime.jsx(Comment, Object.assign({ header: header, author: {
|
|
4565
4963
|
avatar: author.avatar,
|
|
4566
4964
|
name: author.name,
|
|
4567
|
-
}, date: date, message: message }, { children: jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("br", {}) }) })) }))] }), jsxRuntime.jsx(Lightbox.Footer, {
|
|
4965
|
+
}, date: date, message: message }, { children: jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("br", {}) }) })) }))] }), jsxRuntime.jsx(Lightbox.Footer, {}), jsxRuntime.jsx(Lightbox.Close, { "aria-label": "Close modal" })] }))), jsxRuntime.jsx(Footer$2, { children: children })] }));
|
|
4568
4966
|
};
|
|
4569
4967
|
|
|
4570
4968
|
/**
|
|
@@ -4585,18 +4983,6 @@ Chat.Comments = MessagesContainer;
|
|
|
4585
4983
|
Chat.Input = CommentBox;
|
|
4586
4984
|
Chat.Footer = ChatFooter;
|
|
4587
4985
|
|
|
4588
|
-
const UgClose$1 = styled__default["default"](reactNotifications.Close) `
|
|
4589
|
-
display: flex;
|
|
4590
|
-
align-items: center;
|
|
4591
|
-
justify-content: center;
|
|
4592
|
-
width: ${({ theme }) => theme.space.xl};
|
|
4593
|
-
height: ${({ theme }) => theme.space.xl};
|
|
4594
|
-
`;
|
|
4595
|
-
/**
|
|
4596
|
-
* Title is a basic component used to display a title. Often used in card headers.
|
|
4597
|
-
*/
|
|
4598
|
-
const Close = (props) => jsxRuntime.jsx(UgClose$1, Object.assign({}, props));
|
|
4599
|
-
|
|
4600
4986
|
var _circle;
|
|
4601
4987
|
function _extends$e() { _extends$e = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$e.apply(this, arguments); }
|
|
4602
4988
|
const SvgCircleFullFill = props => /*#__PURE__*/React__namespace.createElement("svg", _extends$e({
|
|
@@ -5215,28 +5601,119 @@ const UgToggle = styled__default["default"](reactForms.Toggle) ``;
|
|
|
5215
5601
|
**/
|
|
5216
5602
|
const Toggle = (props) => jsxRuntime.jsx(UgToggle, Object.assign({}, props));
|
|
5217
5603
|
|
|
5218
|
-
const
|
|
5219
|
-
|
|
5604
|
+
const HighlightContext = React.createContext(null);
|
|
5605
|
+
const HighlightContextProvider = ({ term, children, }) => {
|
|
5606
|
+
const [searchTerm, setsearchTerm] = React.useState(term !== null && term !== void 0 ? term : "");
|
|
5607
|
+
React.useEffect(() => {
|
|
5608
|
+
setsearchTerm(term !== null && term !== void 0 ? term : "");
|
|
5609
|
+
}, [term]);
|
|
5610
|
+
const HighlightContextValue = React.useMemo(() => ({
|
|
5611
|
+
searchTerm,
|
|
5612
|
+
}), [searchTerm]);
|
|
5613
|
+
return (jsxRuntime.jsx(HighlightContext.Provider, Object.assign({ value: HighlightContextValue }, { children: children })));
|
|
5614
|
+
};
|
|
5615
|
+
const useHighlightContext = () => {
|
|
5616
|
+
const context = React.useContext(HighlightContext);
|
|
5617
|
+
if (!context)
|
|
5618
|
+
throw new Error("Provider not found for HighlightContextProvider");
|
|
5619
|
+
return context; // Now we can use the context in the component, SAFELY.
|
|
5620
|
+
};
|
|
5220
5621
|
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
const
|
|
5622
|
+
const StyledSearchWord = styled__default["default"].span `
|
|
5623
|
+
background-color: ${({ theme }) => theme.palette.product.talk};
|
|
5624
|
+
color: ${({ theme }) => theme.palette.grey[700]};`;
|
|
5625
|
+
const Searchable = ({ start, text, }) => {
|
|
5626
|
+
const { searchTerm } = useHighlightContext();
|
|
5627
|
+
if (searchTerm) {
|
|
5628
|
+
const parts = text.split(new RegExp(`(${searchTerm})`, "gi"));
|
|
5629
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: parts.map((part, index) => part.toLowerCase() === searchTerm.toLowerCase() ? (jsxRuntime.jsx(StyledSearchWord, { children: part }, index)) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: part }))) }));
|
|
5630
|
+
}
|
|
5631
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: text });
|
|
5632
|
+
};
|
|
5226
5633
|
|
|
5227
|
-
const
|
|
5634
|
+
const StyledWord = styled__default["default"](reactTypography.Span) `
|
|
5635
|
+
font-size: ${({ theme, size }) => theme.fontSizes[size !== null && size !== void 0 ? size : "md"]};
|
|
5636
|
+
padding: ${({ theme }) => theme.space.xxs} 0;
|
|
5228
5637
|
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5638
|
+
${({ observation, theme }) => {
|
|
5639
|
+
var _a, _b;
|
|
5640
|
+
return observation &&
|
|
5641
|
+
` user-select: none;
|
|
5642
|
+
padding: 0;
|
|
5643
|
+
background-color: ${(_a = observation.backgroundColor) !== null && _a !== void 0 ? _a : getColor(theme.palette.azure, 700, undefined, 0.5)};
|
|
5644
|
+
color: ${(_b = observation.color) !== null && _b !== void 0 ? _b : "white"};
|
|
5645
|
+
box-sizing: border-box;
|
|
5646
|
+
&:focus {
|
|
5647
|
+
outline: none;
|
|
5648
|
+
}
|
|
5649
|
+
|
|
5650
|
+
+ span:not([observation]) {
|
|
5651
|
+
margin-left: 2px;
|
|
5652
|
+
}
|
|
5653
|
+
`;
|
|
5654
|
+
}}
|
|
5655
|
+
`;
|
|
5656
|
+
const ActiveWord = styled__default["default"].span `
|
|
5657
|
+
background-color: ${({ theme }) => getColor(theme.palette.fuschia, 700, undefined, 0.5)};
|
|
5658
|
+
padding: 0 2px;
|
|
5659
|
+
`;
|
|
5660
|
+
const WordsContainer = styled__default["default"].div `
|
|
5661
|
+
box-sizing: border-box;
|
|
5662
|
+
${StyledWord}, span {
|
|
5663
|
+
&::selection {
|
|
5664
|
+
background-color: ${({ theme }) => getColor(theme.palette.kale, 700, undefined, 0.5)};
|
|
5665
|
+
}
|
|
5666
|
+
}
|
|
5232
5667
|
`;
|
|
5233
5668
|
/**
|
|
5234
|
-
*
|
|
5235
|
-
* <hr>
|
|
5236
|
-
* Used for this:
|
|
5237
|
-
- To structure the layout of a page
|
|
5669
|
+
* Use Highlight to use highlight interation on any text element
|
|
5238
5670
|
*/
|
|
5239
|
-
const
|
|
5671
|
+
const Highlight = (props) => {
|
|
5672
|
+
const ref = React.useRef(null);
|
|
5673
|
+
const handleSelectionChange = React.useCallback(() => {
|
|
5674
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
5675
|
+
const activeSelection = document.getSelection();
|
|
5676
|
+
const text = activeSelection === null || activeSelection === void 0 ? void 0 : activeSelection.toString();
|
|
5677
|
+
if (!activeSelection || !text) {
|
|
5678
|
+
return;
|
|
5679
|
+
}
|
|
5680
|
+
const anchorNode = (_a = activeSelection === null || activeSelection === void 0 ? void 0 : activeSelection.anchorNode) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
5681
|
+
const focusNode = (_b = activeSelection === null || activeSelection === void 0 ? void 0 : activeSelection.focusNode) === null || _b === void 0 ? void 0 : _b.parentElement;
|
|
5682
|
+
if (anchorNode &&
|
|
5683
|
+
focusNode &&
|
|
5684
|
+
((_c = ref.current) === null || _c === void 0 ? void 0 : _c.contains(anchorNode)) && // Selection starts inside the ref
|
|
5685
|
+
((_d = ref.current) === null || _d === void 0 ? void 0 : _d.contains(focusNode)) // Selection ends inside the ref
|
|
5686
|
+
) {
|
|
5687
|
+
const selectionPart = {
|
|
5688
|
+
from: Math.min(Number.parseFloat((_e = anchorNode.getAttribute("data-start")) !== null && _e !== void 0 ? _e : "0"), Number.parseFloat((_f = focusNode.getAttribute("data-start")) !== null && _f !== void 0 ? _f : "0")),
|
|
5689
|
+
to: Math.max(Number.parseFloat((_g = anchorNode.getAttribute("data-end")) !== null && _g !== void 0 ? _g : "0"), Number.parseFloat((_h = focusNode.getAttribute("data-end")) !== null && _h !== void 0 ? _h : "0")),
|
|
5690
|
+
};
|
|
5691
|
+
(_j = props === null || props === void 0 ? void 0 : props.handleSelection) === null || _j === void 0 ? void 0 : _j.call(props, Object.assign(Object.assign({}, selectionPart), { text }));
|
|
5692
|
+
}
|
|
5693
|
+
}, [props]);
|
|
5694
|
+
React.useEffect(() => {
|
|
5695
|
+
if (ref.current === null)
|
|
5696
|
+
return;
|
|
5697
|
+
document.addEventListener("selectionchange", handleSelectionChange);
|
|
5698
|
+
return () => {
|
|
5699
|
+
document.removeEventListener("selectionchange", handleSelectionChange);
|
|
5700
|
+
};
|
|
5701
|
+
}, [ref, props, handleSelectionChange]);
|
|
5702
|
+
return (jsxRuntime.jsx(HighlightContextProvider, Object.assign({ term: props.search }, { children: jsxRuntime.jsx(WordsContainer, Object.assign({ ref: ref }, { children: props.children })) })));
|
|
5703
|
+
};
|
|
5704
|
+
const Word = (props) => {
|
|
5705
|
+
var _a;
|
|
5706
|
+
const isActive = props.currentTime &&
|
|
5707
|
+
props.currentTime >= props.start &&
|
|
5708
|
+
props.currentTime < props.end;
|
|
5709
|
+
// Is there an observation that contains this word?
|
|
5710
|
+
const observation = (_a = props.observations) === null || _a === void 0 ? void 0 : _a.find((obs) => props.start >= obs.start && props.end <= obs.end);
|
|
5711
|
+
if (props.tooltipContent && !!observation) {
|
|
5712
|
+
return (jsxRuntime.jsx(Tooltip, Object.assign({ content: props.tooltipContent, isTransparent: true }, { children: jsxRuntime.jsxs(StyledWord, Object.assign({}, props, { observation: observation, "data-start": props.start, "data-end": props.end, className: !!observation ? "highlighted" : "" }, (!!observation ? { tag: "observation" } : {}), { children: [isActive ? (jsxRuntime.jsx(ActiveWord, { children: jsxRuntime.jsx(Searchable, { start: props.start, text: props.text }) })) : (jsxRuntime.jsx(Searchable, { start: props.start, text: props.text })), " "] })) })));
|
|
5713
|
+
}
|
|
5714
|
+
return (jsxRuntime.jsxs(StyledWord, Object.assign({}, props, { observation: observation, "data-start": props.start, "data-end": props.end, className: !!observation ? "highlighted" : "" }, (!!observation ? { tag: "observation" } : {}), { children: [isActive ? (jsxRuntime.jsx(ActiveWord, { children: jsxRuntime.jsx(Searchable, { start: props.start, text: props.text }) })) : (jsxRuntime.jsx(Searchable, { start: props.start, text: props.text })), " "] })));
|
|
5715
|
+
};
|
|
5716
|
+
Highlight.Word = Word;
|
|
5240
5717
|
|
|
5241
5718
|
/**
|
|
5242
5719
|
* The Dots loader communicates ongoing activity after a user takes an action.
|
|
@@ -5729,62 +6206,6 @@ NavAccordionItem.Label = AccordionItemLabel;
|
|
|
5729
6206
|
*/
|
|
5730
6207
|
const Chrome = (props) => jsxRuntime.jsx(reactChrome.Chrome, Object.assign({}, props));
|
|
5731
6208
|
|
|
5732
|
-
const NOTIFICATION_COMPONENT_ID = "notifications.notification";
|
|
5733
|
-
const CLOSE_COMPONENT_ID = "notifications.notification.close";
|
|
5734
|
-
const CLOSE_ICON_COMPONENT_ID = "notifications.notification.close-icon";
|
|
5735
|
-
const TITLE_COMPONENT_ID = "notifications.notification.title";
|
|
5736
|
-
const UgClose = styled__default["default"](Close).attrs((props) => {
|
|
5737
|
-
var _a;
|
|
5738
|
-
return ({
|
|
5739
|
-
"data-custom-id": (_a = props["data-custom-id"]) !== null && _a !== void 0 ? _a : CLOSE_ICON_COMPONENT_ID,
|
|
5740
|
-
});
|
|
5741
|
-
}) `
|
|
5742
|
-
${(props) => reactTheming.retrieveComponentStyles(CLOSE_ICON_COMPONENT_ID, props)};
|
|
5743
|
-
`;
|
|
5744
|
-
const UgAnchor = styled__default["default"](reactButtons.Anchor).attrs((props) => {
|
|
5745
|
-
var _a;
|
|
5746
|
-
return ({
|
|
5747
|
-
"data-custom-id": (_a = props["data-custom-id"]) !== null && _a !== void 0 ? _a : CLOSE_COMPONENT_ID,
|
|
5748
|
-
});
|
|
5749
|
-
}) `
|
|
5750
|
-
${(props) => reactTheming.retrieveComponentStyles(CLOSE_COMPONENT_ID, props)};
|
|
5751
|
-
`;
|
|
5752
|
-
const UgTitle = styled__default["default"](Title$1).attrs((props) => {
|
|
5753
|
-
var _a;
|
|
5754
|
-
return ({
|
|
5755
|
-
"data-custom-id": (_a = props["data-custom-id"]) !== null && _a !== void 0 ? _a : TITLE_COMPONENT_ID,
|
|
5756
|
-
});
|
|
5757
|
-
}) `
|
|
5758
|
-
${(props) => reactTheming.retrieveComponentStyles(TITLE_COMPONENT_ID, props)};
|
|
5759
|
-
`;
|
|
5760
|
-
const UgNotification = styled__default["default"](reactNotifications.Notification) `
|
|
5761
|
-
display: flex;
|
|
5762
|
-
align-items: center;
|
|
5763
|
-
justify-content: space-between;
|
|
5764
|
-
padding-right: ${({ theme }) => theme.space.md};
|
|
5765
|
-
white-space: pre;
|
|
5766
|
-
|
|
5767
|
-
${UgAnchor} {
|
|
5768
|
-
flex-shrink: 0;
|
|
5769
|
-
margin-left: ${({ theme }) => theme.space.md};
|
|
5770
|
-
}
|
|
5771
|
-
|
|
5772
|
-
${(props) => reactTheming.retrieveComponentStyles(NOTIFICATION_COMPONENT_ID, props)};
|
|
5773
|
-
`;
|
|
5774
|
-
/**
|
|
5775
|
-
* A Notification is a passive status update that keeps users informed of system progress.
|
|
5776
|
-
* <hr>
|
|
5777
|
-
* Used for this:
|
|
5778
|
-
- For a passive status update about user or system activity
|
|
5779
|
-
*/
|
|
5780
|
-
const Notification = (_a) => {
|
|
5781
|
-
var { closeText, message, onClose, type, isPrimary, isRegular } = _a, props = __rest(_a, ["closeText", "message", "onClose", "type", "isPrimary", "isRegular"]);
|
|
5782
|
-
return (jsxRuntime.jsxs(UgNotification, Object.assign({ type: type, isPrimary: isPrimary }, props, { children: [jsxRuntime.jsx(UgTitle, Object.assign({ isRegular: isRegular, type: type, isPrimary: isPrimary }, { children: message })), jsxRuntime.jsx(UgAnchor, Object.assign({ type: type, isPrimary: isPrimary, onClick: onClose }, { children: closeText !== null && closeText !== void 0 ? closeText : jsxRuntime.jsx(UgClose, {}) }))] })));
|
|
5783
|
-
};
|
|
5784
|
-
// ToastProvider
|
|
5785
|
-
const ToastProvider = (props) => (jsxRuntime.jsx(reactNotifications.ToastProvider, Object.assign({}, props)));
|
|
5786
|
-
const useToast = reactNotifications.useToast;
|
|
5787
|
-
|
|
5788
6209
|
const UgPagination = styled__default["default"](reactPagination.Pagination) ``;
|
|
5789
6210
|
/**
|
|
5790
6211
|
* Pagination separates content into pages and allows users to navigate between those pages.
|
|
@@ -6770,6 +7191,7 @@ exports.HeaderItem = HeaderItem;
|
|
|
6770
7191
|
exports.HeaderItemIcon = HeaderItemIcon;
|
|
6771
7192
|
exports.HeaderItemText = HeaderItemText;
|
|
6772
7193
|
exports.HeaderRow = HeaderRow;
|
|
7194
|
+
exports.Highlight = Highlight;
|
|
6773
7195
|
exports.Hint = Hint;
|
|
6774
7196
|
exports.Icon = Icon;
|
|
6775
7197
|
exports.IconButton = IconButton;
|