@appquality/unguess-design-system 3.1.91-test-media-errors → 3.1.91-test-fix-obs
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/build/index.js +148 -43
- package/build/stories/avatar/InternalAvatar.d.ts +2 -0
- package/build/stories/buttons/button/index.stories.d.ts +1 -0
- package/build/stories/buttons/utils.d.ts +27 -27
- package/build/stories/chat/index.stories.d.ts +1 -0
- package/build/stories/dropdowns/select/index.stories.d.ts +1 -0
- package/build/stories/editor/index.stories.d.ts +1 -0
- package/build/stories/highlight/CreateObservationButton.d.ts +17 -0
- package/build/stories/highlight/_types.d.ts +5 -2
- package/build/stories/highlight/index.stories.d.ts +4 -2
- package/build/stories/player/_types.d.ts +3 -0
- package/build/stories/player/index.stories.d.ts +2 -0
- package/build/stories/player/parts/CutStart.d.ts +4 -0
- package/build/stories/player/parts/controls.d.ts +2 -1
- package/build/stories/player/parts/floatingControls.d.ts +1 -0
- package/package.json +1 -1
- package/yarn-error.log +0 -17994
package/build/index.js
CHANGED
|
@@ -642,6 +642,15 @@ Alert.Close = reactNotifications.Close;
|
|
|
642
642
|
|
|
643
643
|
var img$2 = "data:image/svg+xml,%3csvg width='26' height='26' viewBox='0 0 26 26' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M17.2597 12.9199V14.767H17.2367C17.075 17.4452 15.5974 18.969 13.127 18.969C10.4949 18.969 8.92496 17.4452 8.76335 14.767H8.74026V12.9199H5V14.767V14.7901C5.20779 19.4538 8.34777 22.4322 13.1039 22.4322C17.8139 22.4322 20.7922 19.5231 21 14.7901V12.9199H17.2597Z' fill='%23003A57'/%3e%3cpath d='M8.78629 3.5H5.02295V7.26335H8.78629V3.5Z' fill='%2370C38A'/%3e%3cpath d='M20.9768 3.5H17.1672V7.30952H20.9768V3.5Z' fill='%23003A57'/%3e%3c/svg%3e";
|
|
644
644
|
|
|
645
|
+
const StyledInternalAvatar = styled__default["default"].div `
|
|
646
|
+
display: flex;
|
|
647
|
+
align-items: center;
|
|
648
|
+
justify-content: center;
|
|
649
|
+
`;
|
|
650
|
+
const InternalAvatar = () => {
|
|
651
|
+
return (jsxRuntime.jsx(StyledInternalAvatar, { children: jsxRuntime.jsx("img", { alt: "avatar", src: img$2 }) }));
|
|
652
|
+
};
|
|
653
|
+
|
|
645
654
|
const UgAvatar = styled__default["default"](reactAvatars.Avatar) `
|
|
646
655
|
text-transform: uppercase;
|
|
647
656
|
|
|
@@ -673,7 +682,7 @@ const Avatar = (_a) => {
|
|
|
673
682
|
if (type === "text")
|
|
674
683
|
return jsxRuntime.jsx(Avatar.Text, { children: props.children });
|
|
675
684
|
if (type === "system")
|
|
676
|
-
return jsxRuntime.jsx(
|
|
685
|
+
return jsxRuntime.jsx(InternalAvatar, {});
|
|
677
686
|
};
|
|
678
687
|
return (jsxRuntime.jsx(UgAvatar, Object.assign({}, props, { badge: fixedBadge, isSystem: props.avatarType === "system" || isSystem, children: wrapChildren(props.avatarType || "text"), size: props.size || "small" })));
|
|
679
688
|
};
|
|
@@ -3101,7 +3110,7 @@ const CommentBar = ({ editor, i18n, }) => {
|
|
|
3101
3110
|
}
|
|
3102
3111
|
};
|
|
3103
3112
|
};
|
|
3104
|
-
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(MenuContainer, Object.assign({ id: "menu-container" }, { children: [jsxRuntime.jsx(Tooltip, Object.assign({ content: `${(_b = (_a = i18n === null || i18n === void 0 ? void 0 : i18n.menu) === null || _a === void 0 ? void 0 : _a.bold) !== null && _b !== void 0 ? _b : "Bold text"} ${isMac() ? "Cmd" : "Ctrl"} + B`, placement: "top", type: "light", size: "small", hasArrow: false }, { children: jsxRuntime.jsx(IconButton, Object.assign({ size: "small", isBasic: !editor.isActive("bold"), isPrimary: editor.isActive("bold"), isPill: false, onClick: handleBoldClick }, { children: jsxRuntime.jsx(SvgBoldStroke, {}) })) })), jsxRuntime.jsx(Tooltip, Object.assign({ content: `${(_d = (_c = i18n === null || i18n === void 0 ? void 0 : i18n.menu) === null || _c === void 0 ? void 0 : _c.italic) !== null && _d !== void 0 ? _d : "Italic text"} ${isMac() ? "Cmd" : "Ctrl"} + I`, placement: "top", type: "light", size: "small", hasArrow: false }, { children: jsxRuntime.jsx(IconButton, Object.assign({ size: "small", isBasic: !editor.isActive("italic"), isPrimary: editor.isActive("italic"), isPill: false, onClick: handleItalicClick }, { children: jsxRuntime.jsx(SvgItalicStroke, {}) })) })), jsxRuntime.jsx(VerticalDivider, {}), jsxRuntime.jsx(Tooltip, Object.assign({ content: (_f = (_e = i18n === null || i18n === void 0 ? void 0 : i18n.menu) === null || _e === void 0 ? void 0 : _e.mention) !== null && _f !== void 0 ? _f : "Add a mention", placement: "top", type: "light", size: "small", hasArrow: false }, { children: jsxRuntime.jsx(IconButton, Object.assign({ size: "small", isBasic: !editor.isActive("mention"), isPrimary: editor.isActive("mention"), isPill: false, onClick: handleMentionClick }, { children: jsxRuntime.jsx(SvgAtStroke, {}) })) })), jsxRuntime.jsx(Tooltip, Object.assign({ content: (_h = (_g = i18n === null || i18n === void 0 ? void 0 : i18n.menu) === null || _g === void 0 ? void 0 : _g.attachment) !== null && _h !== void 0 ? _h : (jsxRuntime.jsxs("span", { children: ["Upload images and video.", " ", jsxRuntime.jsxs("span", Object.assign({ style: { color: theme.palette.grey[600] } }, { children: [" ", jsxRuntime.jsx("br", {}), " Max size: 5GB", " "] }))] })), placement: "top", type: "light", size: "small", hasArrow: true }, { children: jsxRuntime.jsx(IconButton, Object.assign({ size: "small", isBasic: !editor.isActive("attachment"), isPrimary: editor.isActive("attachment"), isPill: false, onClick: handleAttachmentClick }, { children: jsxRuntime.jsx(SvgClipboard, {}) })) }))] })) }));
|
|
3113
|
+
return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs(MenuContainer, Object.assign({ id: "menu-container" }, { children: [jsxRuntime.jsx(Tooltip, Object.assign({ content: `${(_b = (_a = i18n === null || i18n === void 0 ? void 0 : i18n.menu) === null || _a === void 0 ? void 0 : _a.bold) !== null && _b !== void 0 ? _b : "Bold text"} ${isMac() ? "Cmd" : "Ctrl"} + B`, placement: "top", type: "light", size: "small", hasArrow: false }, { children: jsxRuntime.jsx(IconButton, Object.assign({ size: "small", isBasic: !editor.isActive("bold"), isPrimary: editor.isActive("bold"), isPill: false, onClick: handleBoldClick }, { children: jsxRuntime.jsx(SvgBoldStroke, {}) })) })), jsxRuntime.jsx(Tooltip, Object.assign({ content: `${(_d = (_c = i18n === null || i18n === void 0 ? void 0 : i18n.menu) === null || _c === void 0 ? void 0 : _c.italic) !== null && _d !== void 0 ? _d : "Italic text"} ${isMac() ? "Cmd" : "Ctrl"} + I`, placement: "top", type: "light", size: "small", hasArrow: false }, { children: jsxRuntime.jsx(IconButton, Object.assign({ size: "small", isBasic: !editor.isActive("italic"), isPrimary: editor.isActive("italic"), isPill: false, onClick: handleItalicClick }, { children: jsxRuntime.jsx(SvgItalicStroke, {}) })) })), jsxRuntime.jsx(VerticalDivider, {}), jsxRuntime.jsx(Tooltip, Object.assign({ content: (_f = (_e = i18n === null || i18n === void 0 ? void 0 : i18n.menu) === null || _e === void 0 ? void 0 : _e.mention) !== null && _f !== void 0 ? _f : "Add a mention", placement: "top", type: "light", size: "small", hasArrow: false }, { children: jsxRuntime.jsx(IconButton, Object.assign({ size: "small", isBasic: !editor.isActive("mention"), isPrimary: editor.isActive("mention"), isPill: false, onClick: handleMentionClick }, { children: jsxRuntime.jsx(SvgAtStroke, {}) })) })), jsxRuntime.jsx(Tooltip, Object.assign({ style: { textAlign: "center" }, content: (_h = (_g = i18n === null || i18n === void 0 ? void 0 : i18n.menu) === null || _g === void 0 ? void 0 : _g.attachment) !== null && _h !== void 0 ? _h : (jsxRuntime.jsxs("span", { children: ["Upload images and video.", " ", jsxRuntime.jsxs("span", Object.assign({ style: { color: theme.palette.grey[600] } }, { children: [" ", jsxRuntime.jsx("br", {}), " Max size: 5GB", " "] }))] })), placement: "top", type: "light", size: "small", hasArrow: true }, { children: jsxRuntime.jsx(IconButton, Object.assign({ size: "small", isBasic: !editor.isActive("attachment"), isPrimary: editor.isActive("attachment"), isPill: false, onClick: handleAttachmentClick }, { children: jsxRuntime.jsx(SvgClipboard, {}) })) }))] })) }));
|
|
3105
3114
|
};
|
|
3106
3115
|
|
|
3107
3116
|
const CustomMention = Mention__default["default"].extend({
|
|
@@ -4063,6 +4072,7 @@ const Rect = styled.styled.div `
|
|
|
4063
4072
|
}
|
|
4064
4073
|
|
|
4065
4074
|
${({ isActive }) => isActive && activeBookMark}
|
|
4075
|
+
${({ isFocused }) => isFocused && activeBookMark}
|
|
4066
4076
|
`;
|
|
4067
4077
|
const StyledTooltip$1 = styled.styled(Tooltip) `
|
|
4068
4078
|
margin-bottom: ${({ theme }) => theme.space.sm};
|
|
@@ -4094,7 +4104,7 @@ const Bookmark = (props) => {
|
|
|
4094
4104
|
}
|
|
4095
4105
|
if (start > videoEnd || start < videoStart)
|
|
4096
4106
|
return null;
|
|
4097
|
-
return (jsxRuntime.jsx(StyledTooltip$1, Object.assign({ content: tooltipContent, type: "light", size: "large", isTransparent: true }, { children: jsxRuntime.jsxs(Rect, Object.assign({ isActive: activeBookmark && activeBookmark.id === props.id, hue: hue, style: {
|
|
4107
|
+
return (jsxRuntime.jsx(StyledTooltip$1, Object.assign({ content: tooltipContent, type: "light", size: "large", isTransparent: true }, { children: jsxRuntime.jsxs(Rect, Object.assign({ isActive: activeBookmark && activeBookmark.id === props.id, hue: hue, isFocused: props.isFocused, style: {
|
|
4098
4108
|
left: `${((start - videoStart) / duration) * 100}%`,
|
|
4099
4109
|
width: `${((end - start) / duration) * 100}%`,
|
|
4100
4110
|
}, onClick: props.onClick }, { children: [jsxRuntime.jsx(Grabber, { observation: props }), jsxRuntime.jsx(Grabber, { isEnd: true, observation: props })] })) })));
|
|
@@ -4302,18 +4312,22 @@ const SvgPlus$1 = props => /*#__PURE__*/React__namespace.createElement("svg", _e
|
|
|
4302
4312
|
fill: "currentColor"
|
|
4303
4313
|
})));
|
|
4304
4314
|
|
|
4315
|
+
// Prevent button from breaking on smaller screens
|
|
4316
|
+
const StyledButton$2 = styled.styled(Button) `
|
|
4317
|
+
overflow: visible;
|
|
4318
|
+
`;
|
|
4305
4319
|
const Cutter = ({ onCutHandler, isCutting, i18n, }) => {
|
|
4306
4320
|
var _a;
|
|
4307
4321
|
const { context } = Video.useVideoContext();
|
|
4308
4322
|
const videoRef = (_a = context.player) === null || _a === void 0 ? void 0 : _a.ref.current;
|
|
4309
4323
|
if (!onCutHandler)
|
|
4310
4324
|
return null;
|
|
4311
|
-
return (jsxRuntime.jsx(
|
|
4325
|
+
return (jsxRuntime.jsx(StyledButton$2, Object.assign({ isPrimary: true, isAccent: !isCutting, size: "small", onClick: (e) => {
|
|
4312
4326
|
if (videoRef) {
|
|
4313
4327
|
onCutHandler(videoRef.currentTime);
|
|
4314
4328
|
}
|
|
4315
4329
|
e.stopPropagation();
|
|
4316
|
-
} }, { children: isCutting ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button.StartIcon, { children: jsxRuntime.jsx(SvgTagStroke, {}) }), (i18n === null || i18n === void 0 ? void 0 : i18n.onHighlight) || "End observation"] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button.StartIcon, { children: jsxRuntime.jsx(SvgPlus$1, {}) }), (i18n === null || i18n === void 0 ? void 0 : i18n.beforeHighlight) || "Start observation"] })) })));
|
|
4330
|
+
} }, { children: isCutting ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button.StartIcon, { children: jsxRuntime.jsx(SvgTagStroke, {}) }), jsxRuntime.jsx(Span, { children: (i18n === null || i18n === void 0 ? void 0 : i18n.onHighlight) || "End observation" })] })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Button.StartIcon, { children: jsxRuntime.jsx(SvgPlus$1, {}) }), jsxRuntime.jsx(Span, { children: (i18n === null || i18n === void 0 ? void 0 : i18n.beforeHighlight) || "Start observation" })] })) })));
|
|
4317
4331
|
};
|
|
4318
4332
|
|
|
4319
4333
|
var _path$e;
|
|
@@ -4480,13 +4494,40 @@ function useDebounce(value, delay) {
|
|
|
4480
4494
|
return debouncedValue;
|
|
4481
4495
|
}
|
|
4482
4496
|
|
|
4483
|
-
const
|
|
4497
|
+
const Pin = styled.styled.div `
|
|
4498
|
+
width: 2px;
|
|
4499
|
+
bottom: 0;
|
|
4500
|
+
left: ${({ left }) => `${left}%`};
|
|
4484
4501
|
position: absolute;
|
|
4502
|
+
height: 250%;
|
|
4503
|
+
z-index: 2;
|
|
4504
|
+
background-color: ${({ theme }) => theme.palette.grey[600]};
|
|
4505
|
+
margin-left: -2px; // To not override the current time marker
|
|
4506
|
+
|
|
4507
|
+
&:after {
|
|
4508
|
+
content: "";
|
|
4509
|
+
position: absolute;
|
|
4510
|
+
bottom: 100%;
|
|
4511
|
+
left: 50%;
|
|
4512
|
+
width: 10px;
|
|
4513
|
+
height: 10px;
|
|
4514
|
+
border-radius: 50%;
|
|
4515
|
+
transform: translate(-50%, 0);
|
|
4516
|
+
background-color: ${({ theme }) => theme.palette.grey[600]};
|
|
4517
|
+
}
|
|
4518
|
+
`;
|
|
4519
|
+
const CutStart = ({ left }) => {
|
|
4520
|
+
return jsxRuntime.jsx(Pin, { id: "obs-start-pin", left: left });
|
|
4521
|
+
};
|
|
4522
|
+
|
|
4523
|
+
const ControlsWrapper = styled__default["default"].div `
|
|
4524
|
+
${({ showControls }) => showControls ? "position: relative;" : "position: absolute;"}
|
|
4485
4525
|
bottom: 0;
|
|
4486
4526
|
left: 0;
|
|
4487
4527
|
right: 0;
|
|
4488
4528
|
padding: ${({ theme }) => theme.space.xxs} 0;
|
|
4489
4529
|
background-color: ${({ theme }) => theme.palette.grey[100]};
|
|
4530
|
+
height: 80px;
|
|
4490
4531
|
${({ isPlaying }) => isPlaying && "display: none;"}
|
|
4491
4532
|
z-index: 2;
|
|
4492
4533
|
`;
|
|
@@ -4517,7 +4558,7 @@ const CurrentTimeMarker = styled__default["default"].div `
|
|
|
4517
4558
|
z-index: 1;
|
|
4518
4559
|
background-color: white;
|
|
4519
4560
|
`;
|
|
4520
|
-
const Controls = ({ container, onCutHandler, bookmarks, isCutting, onBookMarkUpdated, i18n, }) => {
|
|
4561
|
+
const Controls = ({ container, onCutHandler, bookmarks, isCutting, onBookMarkUpdated, i18n, showControls = false, }) => {
|
|
4521
4562
|
var _a, _b, _c;
|
|
4522
4563
|
const [progress, setProgress] = React.useState(0);
|
|
4523
4564
|
const [tooltipMargin, setTooltipMargin] = React.useState(0);
|
|
@@ -4527,6 +4568,7 @@ const Controls = ({ container, onCutHandler, bookmarks, isCutting, onBookMarkUpd
|
|
|
4527
4568
|
const progressRef = React.useRef(null);
|
|
4528
4569
|
const { context, setCurrentTime } = Video.useVideoContext();
|
|
4529
4570
|
const debouncedMark = useDebounce(updatedMark, 500);
|
|
4571
|
+
const [cutStart, setCutStart] = React.useState(0);
|
|
4530
4572
|
const { reset, isGrabbing, activeBookmark, fromEnd } = useProgressContext();
|
|
4531
4573
|
React.useEffect(() => {
|
|
4532
4574
|
setMarks(bookmarks);
|
|
@@ -4602,8 +4644,14 @@ const Controls = ({ container, onCutHandler, bookmarks, isCutting, onBookMarkUpd
|
|
|
4602
4644
|
onBookMarkUpdated === null || onBookMarkUpdated === void 0 ? void 0 : onBookMarkUpdated(debouncedMark);
|
|
4603
4645
|
}
|
|
4604
4646
|
}, [debouncedMark, onBookMarkUpdated]);
|
|
4605
|
-
|
|
4606
|
-
|
|
4647
|
+
React.useEffect(() => {
|
|
4648
|
+
if (isCutting) {
|
|
4649
|
+
setCutStart(progress);
|
|
4650
|
+
}
|
|
4651
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
4652
|
+
}, [isCutting]);
|
|
4653
|
+
return (jsxRuntime.jsxs(ControlsWrapper, Object.assign({ showControls: showControls }, (!showControls && { 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 &&
|
|
4654
|
+
(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 }), isCutting && jsxRuntime.jsx(CutStart, { left: cutStart }), jsxRuntime.jsx(CurrentTimeMarker, { left: progress })] })), 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 })] }))] })] })));
|
|
4607
4655
|
};
|
|
4608
4656
|
|
|
4609
4657
|
var _path$c;
|
|
@@ -4625,8 +4673,9 @@ const FloatingContainer = styled__default["default"].div `
|
|
|
4625
4673
|
top: 0;
|
|
4626
4674
|
left: 0;
|
|
4627
4675
|
right: 0;
|
|
4628
|
-
${({ isPlaying }) => isPlaying && "display: none;"}
|
|
4629
4676
|
z-index: 1;
|
|
4677
|
+
${({ isPlaying }) => isPlaying && "display: none;"}
|
|
4678
|
+
${({ showControls }) => showControls ? "height: 100%" : "height: calc(100% - 80px)"};
|
|
4630
4679
|
`;
|
|
4631
4680
|
const PlayIcon = styled__default["default"](SvgPlayIcon) ``;
|
|
4632
4681
|
const BigButton = styled__default["default"](IconButton) `
|
|
@@ -4651,8 +4700,8 @@ const ButtonsContainer = styled__default["default"].div `
|
|
|
4651
4700
|
height: 100%;
|
|
4652
4701
|
`;
|
|
4653
4702
|
const FloatingControls = (props) => {
|
|
4654
|
-
const { isPlaying, onClick } = props;
|
|
4655
|
-
return (jsxRuntime.jsx(FloatingContainer, Object.assign({ isPlaying: isPlaying, onClick: onClick }, { children: jsxRuntime.jsx(ButtonsContainer, { children: !isPlaying && (jsxRuntime.jsx(BigButton, Object.assign({ isPrimary: true, size: "large" }, { children: jsxRuntime.jsx(PlayIcon, { color: "red" }) }))) }) })));
|
|
4703
|
+
const { isPlaying, showControls, onClick } = props;
|
|
4704
|
+
return (jsxRuntime.jsx(FloatingContainer, Object.assign({ isPlaying: isPlaying, showControls: showControls, onClick: onClick }, { children: jsxRuntime.jsx(ButtonsContainer, { children: !isPlaying && (jsxRuntime.jsx(BigButton, Object.assign({ isPrimary: true, size: "large" }, { children: jsxRuntime.jsx(PlayIcon, { color: "red" }) }))) }) })));
|
|
4656
4705
|
};
|
|
4657
4706
|
|
|
4658
4707
|
const VideoStyle = styled.css `
|
|
@@ -4678,9 +4727,13 @@ const VideoStyle = styled.css `
|
|
|
4678
4727
|
|
|
4679
4728
|
const Container$1 = styled__default["default"].div `
|
|
4680
4729
|
position: relative;
|
|
4681
|
-
|
|
4682
|
-
|
|
4683
|
-
|
|
4730
|
+
${({ showControls }) => !showControls ? `
|
|
4731
|
+
display: flex;
|
|
4732
|
+
flex-direction: column;
|
|
4733
|
+
justify-content: center;
|
|
4734
|
+
` : `
|
|
4735
|
+
margin-bottom: 80px;
|
|
4736
|
+
`}
|
|
4684
4737
|
height: 100%;
|
|
4685
4738
|
width: 100%;
|
|
4686
4739
|
video {
|
|
@@ -4756,7 +4809,7 @@ const PlayerCore = React.forwardRef((props, forwardRef) => {
|
|
|
4756
4809
|
}
|
|
4757
4810
|
};
|
|
4758
4811
|
}, [setIsPlaying, videoRef]);
|
|
4759
|
-
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 }) })] })));
|
|
4812
|
+
return (jsxRuntime.jsxs(Container$1, Object.assign({ isLoaded: isLoaded, isPlaying: context.isPlaying, ref: containerRef, showControls: props.showControls }, { children: [!isLoaded ? (jsxRuntime.jsx(VideoSpinner, {})) : (jsxRuntime.jsx(FloatingControls, { isPlaying: context.isPlaying, showControls: props.showControls, 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, showControls: props.showControls }) })] })));
|
|
4760
4813
|
});
|
|
4761
4814
|
|
|
4762
4815
|
const MediaLightBox = ({ header, onClose, slideChange, selectedImageIndex, thumbnails, videoRefs, isOpen, details }) => {
|
|
@@ -5613,11 +5666,25 @@ const Searchable = ({ text, }) => {
|
|
|
5613
5666
|
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: text });
|
|
5614
5667
|
};
|
|
5615
5668
|
|
|
5669
|
+
const CreateObservationButton = styled.styled(Button) `
|
|
5670
|
+
user-select: none;
|
|
5671
|
+
position: absolute;
|
|
5672
|
+
left: ${({ position: { x } }) => x}px;
|
|
5673
|
+
top: ${({ position: { y } }) => y}px;
|
|
5674
|
+
transform: translate(-50%, 0);
|
|
5675
|
+
z-index: ${({ theme }) => theme.levels.front};
|
|
5676
|
+
`;
|
|
5677
|
+
|
|
5678
|
+
const getFocusedObs = (observations) => {
|
|
5679
|
+
return observations.find((obs) => obs.isFocused);
|
|
5680
|
+
};
|
|
5616
5681
|
const StyledWord = styled__default["default"].div `
|
|
5617
|
-
display: inline;
|
|
5682
|
+
display: inline-block;
|
|
5618
5683
|
font-size: ${({ theme, size }) => theme.fontSizes[size !== null && size !== void 0 ? size : "md"]};
|
|
5619
5684
|
padding: ${({ theme }) => theme.space.xxs} 0;
|
|
5620
5685
|
position: relative;
|
|
5686
|
+
color: ${({ theme }) => theme.palette.grey[700]};
|
|
5687
|
+
white-space: pre;
|
|
5621
5688
|
|
|
5622
5689
|
${({ observations, theme }) => {
|
|
5623
5690
|
var _a;
|
|
@@ -5625,8 +5692,9 @@ const StyledWord = styled__default["default"].div `
|
|
|
5625
5692
|
`
|
|
5626
5693
|
color: ${(_a = observations[observations.length - 1].color) !== null && _a !== void 0 ? _a : theme.palette.grey[600]};
|
|
5627
5694
|
box-sizing: border-box;
|
|
5628
|
-
font-weight: ${theme.fontWeights.semibold};
|
|
5629
|
-
|
|
5695
|
+
font-weight: ${getFocusedObs(observations) ? theme.fontWeights.extrabold : theme.fontWeights.semibold};
|
|
5696
|
+
font-style: ${getFocusedObs(observations) ? 'italic' : 'normal'};
|
|
5697
|
+
z-index: 1;
|
|
5630
5698
|
&:focus {
|
|
5631
5699
|
outline: none;
|
|
5632
5700
|
}
|
|
@@ -5634,13 +5702,15 @@ const StyledWord = styled__default["default"].div `
|
|
|
5634
5702
|
}}
|
|
5635
5703
|
`;
|
|
5636
5704
|
const ActiveWord = styled__default["default"].span `
|
|
5705
|
+
position: relative;
|
|
5706
|
+
z-index: 2;
|
|
5637
5707
|
background-color: ${({ theme }) => getColor(theme.palette.fuschia, 400, undefined, 0.4)};
|
|
5638
5708
|
`;
|
|
5639
5709
|
const WordsContainer = styled__default["default"].div `
|
|
5640
5710
|
box-sizing: border-box;
|
|
5641
5711
|
${StyledWord}, span {
|
|
5642
5712
|
&::selection {
|
|
5643
|
-
background-color: ${({ theme }) => getColor(theme.palette.
|
|
5713
|
+
background-color: ${({ theme }) => getColor(theme.palette.grey, 400, undefined, 0.5)};
|
|
5644
5714
|
}
|
|
5645
5715
|
}
|
|
5646
5716
|
`;
|
|
@@ -5657,7 +5727,13 @@ const Layer = styled__default["default"].div `
|
|
|
5657
5727
|
* Use Highlight to use highlight interation on any text element
|
|
5658
5728
|
*/
|
|
5659
5729
|
const Highlight = (props) => {
|
|
5730
|
+
var _a;
|
|
5731
|
+
const { onSelectionButtonClick, search, i18n, children } = props;
|
|
5660
5732
|
const ref = React.useRef(null);
|
|
5733
|
+
const [isSelecting, setIsSelecting] = React.useState(false);
|
|
5734
|
+
const [position, setPosition] = React.useState();
|
|
5735
|
+
const [selection, setSelection] = React.useState();
|
|
5736
|
+
const activeSelection = document.getSelection();
|
|
5661
5737
|
const extractText = (selection) => {
|
|
5662
5738
|
if (selection.anchorNode === null || selection.focusNode === null)
|
|
5663
5739
|
return "";
|
|
@@ -5674,29 +5750,55 @@ const Highlight = (props) => {
|
|
|
5674
5750
|
return filteredText.length ? filteredText.trim() : selection.toString();
|
|
5675
5751
|
};
|
|
5676
5752
|
const handleSelectionChange = React.useCallback(() => {
|
|
5677
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
|
5678
|
-
|
|
5679
|
-
|
|
5680
|
-
|
|
5753
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
5754
|
+
if (activeSelection && activeSelection.toString().length > 0) {
|
|
5755
|
+
// Extract the text from the selection cleaning unselectable items
|
|
5756
|
+
const text = extractText(activeSelection);
|
|
5757
|
+
if (!text)
|
|
5758
|
+
return;
|
|
5759
|
+
const anchorNode = (_a = activeSelection === null || activeSelection === void 0 ? void 0 : activeSelection.anchorNode) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
5760
|
+
const focusNode = (_b = activeSelection === null || activeSelection === void 0 ? void 0 : activeSelection.focusNode) === null || _b === void 0 ? void 0 : _b.parentElement;
|
|
5761
|
+
if (anchorNode &&
|
|
5762
|
+
focusNode &&
|
|
5763
|
+
((_c = ref.current) === null || _c === void 0 ? void 0 : _c.contains(anchorNode)) && // Selection starts inside the ref
|
|
5764
|
+
((_d = ref.current) === null || _d === void 0 ? void 0 : _d.contains(focusNode)) // Selection ends inside the ref
|
|
5765
|
+
) {
|
|
5766
|
+
if (onSelectionButtonClick) {
|
|
5767
|
+
setIsSelecting(true);
|
|
5768
|
+
const range = activeSelection.getRangeAt(0);
|
|
5769
|
+
const rects = range.getClientRects();
|
|
5770
|
+
const lastRect = rects[rects.length - 1];
|
|
5771
|
+
const containerRect = ref && ref.current
|
|
5772
|
+
? ref.current.getBoundingClientRect()
|
|
5773
|
+
: null;
|
|
5774
|
+
if (!lastRect || !containerRect)
|
|
5775
|
+
return;
|
|
5776
|
+
const relativeY = lastRect.bottom - containerRect.top + ref.current.scrollTop;
|
|
5777
|
+
const relativeX = lastRect.right - containerRect.left + ref.current.scrollLeft;
|
|
5778
|
+
if (relativeY > 0 || relativeX > 0)
|
|
5779
|
+
// Fix to avoid the button to be placed sometimes at the top left corner of the screen (X: 0, Y: 0)
|
|
5780
|
+
setPosition({
|
|
5781
|
+
x: relativeX,
|
|
5782
|
+
y: relativeY + 15,
|
|
5783
|
+
});
|
|
5784
|
+
}
|
|
5785
|
+
else {
|
|
5786
|
+
setIsSelecting(false);
|
|
5787
|
+
}
|
|
5788
|
+
const selectionPart = {
|
|
5789
|
+
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")),
|
|
5790
|
+
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")),
|
|
5791
|
+
};
|
|
5792
|
+
setSelection(Object.assign(Object.assign({}, selectionPart), { text }));
|
|
5793
|
+
}
|
|
5794
|
+
else {
|
|
5795
|
+
setIsSelecting(false);
|
|
5796
|
+
}
|
|
5681
5797
|
}
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
if (!text)
|
|
5685
|
-
return;
|
|
5686
|
-
const anchorNode = (_a = activeSelection === null || activeSelection === void 0 ? void 0 : activeSelection.anchorNode) === null || _a === void 0 ? void 0 : _a.parentElement;
|
|
5687
|
-
const focusNode = (_b = activeSelection === null || activeSelection === void 0 ? void 0 : activeSelection.focusNode) === null || _b === void 0 ? void 0 : _b.parentElement;
|
|
5688
|
-
if (anchorNode &&
|
|
5689
|
-
focusNode &&
|
|
5690
|
-
((_c = ref.current) === null || _c === void 0 ? void 0 : _c.contains(anchorNode)) && // Selection starts inside the ref
|
|
5691
|
-
((_d = ref.current) === null || _d === void 0 ? void 0 : _d.contains(focusNode)) // Selection ends inside the ref
|
|
5692
|
-
) {
|
|
5693
|
-
const selectionPart = {
|
|
5694
|
-
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")),
|
|
5695
|
-
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")),
|
|
5696
|
-
};
|
|
5697
|
-
(_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 }));
|
|
5798
|
+
else {
|
|
5799
|
+
setIsSelecting(false);
|
|
5698
5800
|
}
|
|
5699
|
-
}, [
|
|
5801
|
+
}, [onSelectionButtonClick, activeSelection]);
|
|
5700
5802
|
React.useEffect(() => {
|
|
5701
5803
|
if (ref.current === null)
|
|
5702
5804
|
return;
|
|
@@ -5705,7 +5807,10 @@ const Highlight = (props) => {
|
|
|
5705
5807
|
document.removeEventListener("selectionchange", handleSelectionChange);
|
|
5706
5808
|
};
|
|
5707
5809
|
}, [ref, props, handleSelectionChange]);
|
|
5708
|
-
return (jsxRuntime.
|
|
5810
|
+
return (jsxRuntime.jsxs(HighlightContextProvider, Object.assign({ term: search }, { children: [jsxRuntime.jsx(WordsContainer, Object.assign({ ref: ref }, { children: children })), onSelectionButtonClick && isSelecting && selection && (jsxRuntime.jsxs(CreateObservationButton, Object.assign({ isAccent: true, isPrimary: true, position: position !== null && position !== void 0 ? position : {
|
|
5811
|
+
x: 0,
|
|
5812
|
+
y: 0,
|
|
5813
|
+
}, onClick: () => onSelectionButtonClick(selection) }, { children: [jsxRuntime.jsx(CreateObservationButton.StartIcon, { children: jsxRuntime.jsx(SvgTagStroke, {}) }), (_a = i18n === null || i18n === void 0 ? void 0 : i18n.selectionButtonLabel) !== null && _a !== void 0 ? _a : "Create observation"] })))] })));
|
|
5709
5814
|
};
|
|
5710
5815
|
const Word = (props) => {
|
|
5711
5816
|
const isActive = props.currentTime &&
|
|
@@ -5719,7 +5824,7 @@ const Word = (props) => {
|
|
|
5719
5824
|
const ObsWord = React.useMemo(() => (jsxRuntime.jsxs(StyledWord, Object.assign({}, props, { "data-start": props.start, "data-end": props.end, className: foundObservations.length > 0 ? "highlighted" : "" }, (foundObservations && { observations: foundObservations }), { children: [foundObservations.length > 0 && foundObservations.map((obs) => {
|
|
5720
5825
|
var _a;
|
|
5721
5826
|
return (jsxRuntime.jsx(Layer, { color: (_a = obs.hue) !== null && _a !== void 0 ? _a : theme.palette.grey[600] }, obs.id));
|
|
5722
|
-
}), isActive ? (jsxRuntime.jsx(ActiveWord, { children: jsxRuntime.jsx(Searchable, { text: props.text }) })) : (jsxRuntime.jsx(Searchable, { text: props.text })), " "] }))), [props, foundObservations, isActive]);
|
|
5827
|
+
}), isActive ? (jsxRuntime.jsx(ActiveWord, Object.assign({ "data-start": props.start, "data-end": props.end }, { children: jsxRuntime.jsx(Searchable, { text: props.text }) }))) : (jsxRuntime.jsx(Searchable, { text: props.text })), " "] }))), [props, foundObservations, isActive]);
|
|
5723
5828
|
if (props.tooltipContent !== undefined && foundObservations.length > 0) {
|
|
5724
5829
|
return (jsxRuntime.jsx(Tooltip, Object.assign({ content: props.tooltipContent(foundObservations), isTransparent: true }, { children: ObsWord })));
|
|
5725
5830
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { ButtonArgs } from "./_types";
|
|
2
3
|
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ButtonArgs>;
|
|
3
4
|
export declare const Basic: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, ButtonArgs>;
|
|
@@ -8,18 +8,18 @@ export declare const variants: readonly [{}, {
|
|
|
8
8
|
readonly disabled: true;
|
|
9
9
|
}];
|
|
10
10
|
export declare const Row: import("styled-components").IStyledComponent<"web", {
|
|
11
|
-
alignItems?: "
|
|
12
|
-
alignItemsXs?: "
|
|
13
|
-
alignItemsSm?: "
|
|
14
|
-
alignItemsMd?: "
|
|
15
|
-
alignItemsLg?: "
|
|
16
|
-
alignItemsXl?: "
|
|
17
|
-
justifyContent?: "
|
|
18
|
-
justifyContentXs?: "
|
|
19
|
-
justifyContentSm?: "
|
|
20
|
-
justifyContentMd?: "
|
|
21
|
-
justifyContentLg?: "
|
|
22
|
-
justifyContentXl?: "
|
|
11
|
+
alignItems?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
12
|
+
alignItemsXs?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
13
|
+
alignItemsSm?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
14
|
+
alignItemsMd?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
15
|
+
alignItemsLg?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
16
|
+
alignItemsXl?: "center" | "start" | "end" | "baseline" | "stretch" | undefined;
|
|
17
|
+
justifyContent?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
18
|
+
justifyContentXs?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
19
|
+
justifyContentSm?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
20
|
+
justifyContentMd?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
21
|
+
justifyContentLg?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
22
|
+
justifyContentXl?: "center" | "start" | "end" | "between" | "around" | undefined;
|
|
23
23
|
wrap?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
24
24
|
wrapXs?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
25
25
|
wrapSm?: "wrap" | "nowrap" | "wrap-reverse" | undefined;
|
|
@@ -73,7 +73,7 @@ export declare const Row: import("styled-components").IStyledComponent<"web", {
|
|
|
73
73
|
results?: number | undefined;
|
|
74
74
|
security?: string | undefined;
|
|
75
75
|
unselectable?: "on" | "off" | undefined;
|
|
76
|
-
inputMode?: "
|
|
76
|
+
inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
77
77
|
is?: string | undefined;
|
|
78
78
|
"aria-activedescendant"?: string | undefined;
|
|
79
79
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
@@ -299,18 +299,18 @@ export declare const Col: import("styled-components").IStyledComponent<"web", {
|
|
|
299
299
|
md?: string | number | boolean | undefined;
|
|
300
300
|
lg?: string | number | boolean | undefined;
|
|
301
301
|
xl?: string | number | boolean | undefined;
|
|
302
|
-
alignSelf?: "
|
|
303
|
-
alignSelfXs?: "
|
|
304
|
-
alignSelfSm?: "
|
|
305
|
-
alignSelfMd?: "
|
|
306
|
-
alignSelfLg?: "
|
|
307
|
-
alignSelfXl?: "
|
|
308
|
-
textAlign?: "
|
|
309
|
-
textAlignXs?: "
|
|
310
|
-
textAlignSm?: "
|
|
311
|
-
textAlignMd?: "
|
|
312
|
-
textAlignLg?: "
|
|
313
|
-
textAlignXl?: "
|
|
302
|
+
alignSelf?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
303
|
+
alignSelfXs?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
304
|
+
alignSelfSm?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
305
|
+
alignSelfMd?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
306
|
+
alignSelfLg?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
307
|
+
alignSelfXl?: "center" | "start" | "end" | "baseline" | "stretch" | "auto" | undefined;
|
|
308
|
+
textAlign?: "center" | "start" | "end" | "justify" | undefined;
|
|
309
|
+
textAlignXs?: "center" | "start" | "end" | "justify" | undefined;
|
|
310
|
+
textAlignSm?: "center" | "start" | "end" | "justify" | undefined;
|
|
311
|
+
textAlignMd?: "center" | "start" | "end" | "justify" | undefined;
|
|
312
|
+
textAlignLg?: "center" | "start" | "end" | "justify" | undefined;
|
|
313
|
+
textAlignXl?: "center" | "start" | "end" | "justify" | undefined;
|
|
314
314
|
offset?: string | number | undefined;
|
|
315
315
|
offsetXs?: string | number | undefined;
|
|
316
316
|
offsetSm?: string | number | undefined;
|
|
@@ -370,7 +370,7 @@ export declare const Col: import("styled-components").IStyledComponent<"web", {
|
|
|
370
370
|
results?: number | undefined;
|
|
371
371
|
security?: string | undefined;
|
|
372
372
|
unselectable?: "on" | "off" | undefined;
|
|
373
|
-
inputMode?: "
|
|
373
|
+
inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
374
374
|
is?: string | undefined;
|
|
375
375
|
"aria-activedescendant"?: string | undefined;
|
|
376
376
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
@@ -640,7 +640,7 @@ export declare const MD: import("styled-components").IStyledComponent<"web", {
|
|
|
640
640
|
results?: number | undefined;
|
|
641
641
|
security?: string | undefined;
|
|
642
642
|
unselectable?: "on" | "off" | undefined;
|
|
643
|
-
inputMode?: "
|
|
643
|
+
inputMode?: "none" | "search" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
|
|
644
644
|
is?: string | undefined;
|
|
645
645
|
"aria-activedescendant"?: string | undefined;
|
|
646
646
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const CreateObservationButton: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("../buttons/button/_types").ButtonArgs & import("react").RefAttributes<HTMLButtonElement>, {
|
|
3
|
+
position: {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
};
|
|
7
|
+
}>> & import("react").ForwardRefExoticComponent<import("../buttons/button/_types").ButtonArgs & import("react").RefAttributes<HTMLButtonElement>> & {
|
|
8
|
+
EndIcon: {
|
|
9
|
+
(props: import("@zendeskgarden/react-buttons").IButtonEndIconProps): JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
StartIcon: {
|
|
13
|
+
(props: import("@zendeskgarden/react-buttons").IButtonEndIconProps): JSX.Element;
|
|
14
|
+
displayName: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export { CreateObservationButton };
|
|
@@ -15,12 +15,15 @@ export interface HighlightArgs {
|
|
|
15
15
|
isMonospace?: boolean;
|
|
16
16
|
/** Adjusts the font size. By default font size is medium */
|
|
17
17
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl";
|
|
18
|
-
|
|
18
|
+
search?: string;
|
|
19
|
+
onSelectionButtonClick?: (part: {
|
|
19
20
|
from: number;
|
|
20
21
|
to: number;
|
|
21
22
|
text: string;
|
|
22
23
|
}) => void;
|
|
23
|
-
|
|
24
|
+
i18n?: {
|
|
25
|
+
selectionButtonLabel: string;
|
|
26
|
+
};
|
|
24
27
|
}
|
|
25
28
|
export interface Observation extends Omit<IBookmark, "onClick"> {
|
|
26
29
|
color?: string;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { HighlightArgs, WordProps } from "./_types";
|
|
2
3
|
export interface StoryArgs extends HighlightArgs {
|
|
3
4
|
words: Array<WordProps & {
|
|
@@ -7,9 +8,10 @@ export interface StoryArgs extends HighlightArgs {
|
|
|
7
8
|
includeSearch?: boolean;
|
|
8
9
|
}
|
|
9
10
|
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, StoryArgs>;
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const WithSearch: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, StoryArgs>;
|
|
11
|
+
export declare const WithSelectionButton: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, StoryArgs>;
|
|
12
12
|
export declare const WithTooltip: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, StoryArgs>;
|
|
13
|
+
export declare const WithSearch: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, StoryArgs>;
|
|
14
|
+
export declare const VideoSync: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, StoryArgs>;
|
|
13
15
|
export declare const Demo: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, StoryArgs>;
|
|
14
16
|
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, HighlightArgs & {
|
|
15
17
|
children?: import("react").ReactNode;
|
|
@@ -9,6 +9,7 @@ export interface PlayerArgs extends HTMLAttributes<HTMLVideoElement> {
|
|
|
9
9
|
bookmarks?: IBookmark[];
|
|
10
10
|
handleBookmarkUpdate?: (bookmark: IBookmark) => void;
|
|
11
11
|
i18n?: PlayerI18n;
|
|
12
|
+
showControls?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export interface PlayerI18n {
|
|
14
15
|
beforeHighlight?: string;
|
|
@@ -21,12 +22,14 @@ export interface IBookmark {
|
|
|
21
22
|
hue?: string;
|
|
22
23
|
label?: string;
|
|
23
24
|
tooltipContent?: ReactNode;
|
|
25
|
+
isFocused?: boolean;
|
|
24
26
|
onClick?: () => void;
|
|
25
27
|
tags?: VideoTag[];
|
|
26
28
|
}
|
|
27
29
|
export interface WrapperProps {
|
|
28
30
|
isPlaying?: boolean;
|
|
29
31
|
isLoaded?: boolean;
|
|
32
|
+
showControls?: boolean;
|
|
30
33
|
}
|
|
31
34
|
type VideoTag = {
|
|
32
35
|
group: {
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { PlayerArgs } from "./_types";
|
|
2
3
|
interface PlayerStoryArgs extends PlayerArgs {
|
|
3
4
|
}
|
|
4
5
|
export declare const Basic: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, PlayerStoryArgs>;
|
|
6
|
+
export declare const ShowControls: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, PlayerStoryArgs>;
|
|
5
7
|
export declare const Streaming: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, PlayerStoryArgs>;
|
|
6
8
|
export declare const WithBookmarks: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, PlayerStoryArgs>;
|
|
7
9
|
declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0a347bb9").R, PlayerArgs & import("react").RefAttributes<HTMLVideoElement>>;
|
|
@@ -268,11 +268,12 @@ export declare const ControlsBar: import("styled-components").IStyledComponent<"
|
|
|
268
268
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
269
269
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
270
270
|
}>;
|
|
271
|
-
export declare const Controls: ({ container, onCutHandler, bookmarks, isCutting, onBookMarkUpdated, i18n, }: {
|
|
271
|
+
export declare const Controls: ({ container, onCutHandler, bookmarks, isCutting, onBookMarkUpdated, i18n, showControls, }: {
|
|
272
272
|
container: HTMLDivElement | null;
|
|
273
273
|
onCutHandler?: ((time: number) => void) | undefined;
|
|
274
274
|
bookmarks?: IBookmark[] | undefined;
|
|
275
275
|
isCutting?: boolean | undefined;
|
|
276
276
|
onBookMarkUpdated?: ((bookmark: IBookmark) => void) | undefined;
|
|
277
277
|
i18n?: PlayerI18n | undefined;
|
|
278
|
+
showControls?: boolean | undefined;
|
|
278
279
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -3,5 +3,6 @@ import { WrapperProps } from "../_types";
|
|
|
3
3
|
export declare const FloatingContainer: import("styled-components").IStyledComponent<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, WrapperProps>>;
|
|
4
4
|
export declare const FloatingControls: (props: {
|
|
5
5
|
isPlaying?: boolean;
|
|
6
|
+
showControls?: boolean;
|
|
6
7
|
onClick?: () => void;
|
|
7
8
|
}) => import("react/jsx-runtime").JSX.Element;
|