@appquality/unguess-design-system 3.1.97 → 3.1.98-test-error-management
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 +0 -97
- package/build/index.js +79 -71
- package/build/stories/buttons/button/index.stories.d.ts +1 -0
- package/build/stories/buttons/utils.d.ts +27 -27
- package/build/stories/chat/_types.d.ts +1 -1
- package/build/stories/chat/index.stories.d.ts +1 -0
- package/build/stories/chat/parts/ThumbnailContainer/Thumbnail.d.ts +2 -2
- package/build/stories/chat/parts/ThumbnailContainer/index.d.ts +0 -8
- 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/_types.d.ts +1 -2
- package/build/stories/highlight/index.stories.d.ts +1 -0
- package/build/stories/player/index.stories.d.ts +1 -0
- package/package.json +1 -1
- package/yarn-error.log +17994 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,100 +1,3 @@
|
|
|
1
|
-
# v3.1.97 (Tue May 28 2024)
|
|
2
|
-
|
|
3
|
-
#### 🐛 Bug Fix
|
|
4
|
-
|
|
5
|
-
- Add highlight support to unselectable [#377](https://github.com/AppQuality/unguess-design-system/pull/377) ([@cannarocks](https://github.com/cannarocks))
|
|
6
|
-
- "Improve styling and functionality for transcript diarization in highlight component" [#376](https://github.com/AppQuality/unguess-design-system/pull/376) ([@cannarocks](https://github.com/cannarocks))
|
|
7
|
-
- Fix obs player [#375](https://github.com/AppQuality/unguess-design-system/pull/375) ([@marcbon](https://github.com/marcbon))
|
|
8
|
-
- 🎨 style(bookmark.tsx): improve styling for active bookmarks in player parts [#374](https://github.com/AppQuality/unguess-design-system/pull/374) ([@marcbon](https://github.com/marcbon))
|
|
9
|
-
|
|
10
|
-
#### Authors: 2
|
|
11
|
-
|
|
12
|
-
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
13
|
-
- Marco Bonomo ([@marcbon](https://github.com/marcbon))
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
# v3.1.96 (Mon May 27 2024)
|
|
18
|
-
|
|
19
|
-
#### 🐛 Bug Fix
|
|
20
|
-
|
|
21
|
-
- Tagging tool improvements [#373](https://github.com/AppQuality/unguess-design-system/pull/373) ([@marcbon](https://github.com/marcbon) [@sinatragianpaolo](https://github.com/sinatragianpaolo))
|
|
22
|
-
- 🎨 style(bookmark.tsx): add z-index property to hovered bookmark for better layering [#369](https://github.com/AppQuality/unguess-design-system/pull/369) ([@marcbon](https://github.com/marcbon) [@sinatragianpaolo](https://github.com/sinatragianpaolo))
|
|
23
|
-
- ✨ feat(highlight): add font-weight style to StyledWord in highlight component [#370](https://github.com/AppQuality/unguess-design-system/pull/370) ([@marcbon](https://github.com/marcbon))
|
|
24
|
-
- feat: add random hue to new observation label in index.stories.tsx [#372](https://github.com/AppQuality/unguess-design-system/pull/372) ([@sinatragianpaolo](https://github.com/sinatragianpaolo))
|
|
25
|
-
- 🔨 refactor(highlight/index.tsx): improve logic to find closest observation to word [#368](https://github.com/AppQuality/unguess-design-system/pull/368) ([@marcbon](https://github.com/marcbon) [@sinatragianpaolo](https://github.com/sinatragianpaolo))
|
|
26
|
-
- 🔧 fix(player): update end time for second bookmark in index.stories.tsx [#371](https://github.com/AppQuality/unguess-design-system/pull/371) ([@marcbon](https://github.com/marcbon))
|
|
27
|
-
|
|
28
|
-
#### Authors: 2
|
|
29
|
-
|
|
30
|
-
- Gianpaolo Sinatra ([@sinatragianpaolo](https://github.com/sinatragianpaolo))
|
|
31
|
-
- Marco Bonomo ([@marcbon](https://github.com/marcbon))
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
# v3.1.95 (Fri May 24 2024)
|
|
36
|
-
|
|
37
|
-
#### 🐛 Bug Fix
|
|
38
|
-
|
|
39
|
-
- Fix highlight [#367](https://github.com/AppQuality/unguess-design-system/pull/367) ([@marcbon](https://github.com/marcbon))
|
|
40
|
-
- 🔧 refactor(highlight/index.tsx): remove unnecessary spread operator in Word component [#366](https://github.com/AppQuality/unguess-design-system/pull/366) ([@marcbon](https://github.com/marcbon))
|
|
41
|
-
|
|
42
|
-
#### Authors: 1
|
|
43
|
-
|
|
44
|
-
- Marco Bonomo ([@marcbon](https://github.com/marcbon))
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
# v3.1.94 (Tue May 21 2024)
|
|
49
|
-
|
|
50
|
-
#### 🐛 Bug Fix
|
|
51
|
-
|
|
52
|
-
- Fix player types [#365](https://github.com/AppQuality/unguess-design-system/pull/365) ([@marcbon](https://github.com/marcbon))
|
|
53
|
-
- 🔨 refactor(player): make tags property optional in IBookmark interface [#364](https://github.com/AppQuality/unguess-design-system/pull/364) ([@marcbon](https://github.com/marcbon))
|
|
54
|
-
- Update observation severity colors [#363](https://github.com/AppQuality/unguess-design-system/pull/363) ([@marcbon](https://github.com/marcbon) [@cannarocks](https://github.com/cannarocks))
|
|
55
|
-
- Player-colors [#362](https://github.com/AppQuality/unguess-design-system/pull/362) ([@marcbon](https://github.com/marcbon))
|
|
56
|
-
|
|
57
|
-
#### Authors: 2
|
|
58
|
-
|
|
59
|
-
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
60
|
-
- Marco Bonomo ([@marcbon](https://github.com/marcbon))
|
|
61
|
-
|
|
62
|
-
---
|
|
63
|
-
|
|
64
|
-
# v3.1.93 (Tue May 21 2024)
|
|
65
|
-
|
|
66
|
-
#### 🐛 Bug Fix
|
|
67
|
-
|
|
68
|
-
- Improve video cutting and add debounce to bookmark update [#361](https://github.com/AppQuality/unguess-design-system/pull/361) ([@cannarocks](https://github.com/cannarocks) [@marcbon](https://github.com/marcbon))
|
|
69
|
-
- Add useDebounce hook for bookmark updates in player controls [#360](https://github.com/AppQuality/unguess-design-system/pull/360) ([@cannarocks](https://github.com/cannarocks))
|
|
70
|
-
- 🚀 feat(player): add PlusIcon component for starting observation in CutterButton [#359](https://github.com/AppQuality/unguess-design-system/pull/359) ([@marcbon](https://github.com/marcbon))
|
|
71
|
-
- Add sentiment data to DemoTranscript [#358](https://github.com/AppQuality/unguess-design-system/pull/358) ([@cannarocks](https://github.com/cannarocks))
|
|
72
|
-
|
|
73
|
-
#### Authors: 2
|
|
74
|
-
|
|
75
|
-
- Luca Cannarozzo ([@cannarocks](https://github.com/cannarocks))
|
|
76
|
-
- Marco Bonomo ([@marcbon](https://github.com/marcbon))
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
# v3.1.92 (Fri May 17 2024)
|
|
81
|
-
|
|
82
|
-
#### 🐛 Bug Fix
|
|
83
|
-
|
|
84
|
-
- Update auto version to 11.x.x [#356](https://github.com/AppQuality/unguess-design-system/pull/356) ([@marcbon](https://github.com/marcbon))
|
|
85
|
-
- ⬆️ chore(package.json): update auto dependency to version 11.1.1 [#355](https://github.com/AppQuality/unguess-design-system/pull/355) ([@marcbon](https://github.com/marcbon))
|
|
86
|
-
- Update auto version [#354](https://github.com/AppQuality/unguess-design-system/pull/354) ([@marcbon](https://github.com/marcbon))
|
|
87
|
-
- ⬆️ chore(package.json): update auto package to version 10.29.2 [#353](https://github.com/AppQuality/unguess-design-system/pull/353) ([@marcbon](https://github.com/marcbon))
|
|
88
|
-
- bookmark-tooltip-fix [#352](https://github.com/AppQuality/unguess-design-system/pull/352) ([@iDome89](https://github.com/iDome89) [@marcbon](https://github.com/marcbon))
|
|
89
|
-
- Bookmark tooltip changes [#351](https://github.com/AppQuality/unguess-design-system/pull/351) ([@iDome89](https://github.com/iDome89))
|
|
90
|
-
|
|
91
|
-
#### Authors: 2
|
|
92
|
-
|
|
93
|
-
- [@iDome89](https://github.com/iDome89)
|
|
94
|
-
- Marco Bonomo ([@marcbon](https://github.com/marcbon))
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
1
|
# v3.1.91 (Fri May 17 2024)
|
|
99
2
|
|
|
100
3
|
#### 🐛 Bug Fix
|
package/build/index.js
CHANGED
|
@@ -2337,40 +2337,26 @@ const ChatContextProvider = ({ onSave, onFileUpload, onDeleteThumbnail, setMenti
|
|
|
2337
2337
|
setEditor,
|
|
2338
2338
|
thumbnails,
|
|
2339
2339
|
setThumbnails,
|
|
2340
|
-
afterUploadCallback: (failed) => {
|
|
2341
|
-
|
|
2342
|
-
if (failed.includes(file.id)) {
|
|
2343
|
-
file.isLoadingMedia = false;
|
|
2344
|
-
//file.isError = true;
|
|
2345
|
-
}
|
|
2346
|
-
else {
|
|
2347
|
-
file.isLoadingMedia = false;
|
|
2348
|
-
//file.isError = false
|
|
2349
|
-
}
|
|
2350
|
-
return file;
|
|
2351
|
-
}));
|
|
2352
|
-
},
|
|
2353
|
-
addThumbnails: ({ files }) => {
|
|
2340
|
+
afterUploadCallback: (failed) => { },
|
|
2341
|
+
addThumbnails: ({ files }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
2354
2342
|
setThumbnails((prev) => [...prev, ...files]);
|
|
2355
|
-
if (onFileUpload)
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
else {
|
|
2366
|
-
file.isError = false;
|
|
2367
|
-
}
|
|
2368
|
-
return file;
|
|
2369
|
-
});
|
|
2343
|
+
if (!onFileUpload)
|
|
2344
|
+
return;
|
|
2345
|
+
try {
|
|
2346
|
+
const data = yield onFileUpload(files);
|
|
2347
|
+
setThumbnails((prev) => {
|
|
2348
|
+
return prev.map(file => {
|
|
2349
|
+
var _a, _b;
|
|
2350
|
+
file.isLoadingMedia = false;
|
|
2351
|
+
file.error = (_b = (_a = data.failed) === null || _a === void 0 ? void 0 : _a.find(f => f.name === file.name)) === null || _b === void 0 ? void 0 : _b.errorCode;
|
|
2352
|
+
return file;
|
|
2370
2353
|
});
|
|
2371
2354
|
});
|
|
2372
2355
|
}
|
|
2373
|
-
|
|
2356
|
+
catch (e) {
|
|
2357
|
+
console.log("Error uploading files", e);
|
|
2358
|
+
}
|
|
2359
|
+
}),
|
|
2374
2360
|
clearInput: () => {
|
|
2375
2361
|
if (editor && !editor.isEmpty) {
|
|
2376
2362
|
editor.commands.clearContent();
|
|
@@ -3398,6 +3384,7 @@ const StyledDeleteThumbnailX = styled__default["default"].div `
|
|
|
3398
3384
|
opacity: 0;
|
|
3399
3385
|
transition: opacity 0.2s;
|
|
3400
3386
|
z-index: 2;
|
|
3387
|
+
color: ${({ theme }) => theme.palette.grey[800]};
|
|
3401
3388
|
`;
|
|
3402
3389
|
const DeleteThumbnailX = ({ deleteThumbnail }) => {
|
|
3403
3390
|
return (jsxRuntime.jsx(StyledDeleteThumbnailX, Object.assign({ className: "deleteThumbnail" }, { children: jsxRuntime.jsx(SvgRemoveMediaIcon, { onClick: (e) => deleteThumbnail(e) }) })));
|
|
@@ -3425,19 +3412,19 @@ const ImageCard = styled__default["default"](SpecialCard) `
|
|
|
3425
3412
|
padding: 0;
|
|
3426
3413
|
position: relative;
|
|
3427
3414
|
overflow: hidden;
|
|
3428
|
-
|
|
3415
|
+
width: 90px;
|
|
3429
3416
|
|
|
3430
3417
|
&:before {
|
|
3431
3418
|
content: "";
|
|
3419
|
+
font-size: ${({ theme }) => theme.fontSizes.xs};
|
|
3432
3420
|
position: absolute;
|
|
3421
|
+
padding: ${({ theme }) => theme.space.xs};
|
|
3433
3422
|
top: 0;
|
|
3434
3423
|
left: 0;
|
|
3435
3424
|
width: 100%;
|
|
3436
3425
|
height: 100%;
|
|
3437
|
-
background-color: ${({ theme }) => theme.palette.grey[800]};
|
|
3438
|
-
opacity: 0;
|
|
3426
|
+
background-color: ${({ theme }) => theme.palette.grey[800]}00; // 0% opacity
|
|
3439
3427
|
transition: opacity 0.2s;
|
|
3440
|
-
z-index: 1;
|
|
3441
3428
|
}
|
|
3442
3429
|
|
|
3443
3430
|
&:hover {
|
|
@@ -3445,12 +3432,26 @@ const ImageCard = styled__default["default"](SpecialCard) `
|
|
|
3445
3432
|
opacity: 1;
|
|
3446
3433
|
}
|
|
3447
3434
|
&:before {
|
|
3448
|
-
|
|
3435
|
+
background-color: ${({ theme }) => theme.palette.grey[800]}4d; // 30% opacity
|
|
3449
3436
|
}
|
|
3450
3437
|
}
|
|
3451
|
-
|
|
3438
|
+
${(p) => p.error &&
|
|
3439
|
+
`
|
|
3440
|
+
&:before{
|
|
3441
|
+
content: "Error: ${p.error}";
|
|
3442
|
+
color: ${p.theme.palette.white};
|
|
3443
|
+
background-color: ${p.theme.palette.grey[800]}b3; // 0.7 opacity
|
|
3444
|
+
}
|
|
3445
|
+
`}
|
|
3446
|
+
${(p) => p.isLoading &&
|
|
3447
|
+
`
|
|
3448
|
+
&:before{
|
|
3449
|
+
background-color: ${p.theme.palette.grey[800]}b3; // 0.7 opacity
|
|
3450
|
+
}
|
|
3451
|
+
`}
|
|
3452
3452
|
&.video {
|
|
3453
3453
|
svg {
|
|
3454
|
+
color: ${({ theme }) => theme.palette.grey[800]};
|
|
3454
3455
|
position: absolute;
|
|
3455
3456
|
top: 50%;
|
|
3456
3457
|
left: 50%;
|
|
@@ -3467,8 +3468,9 @@ const Preview = styled__default["default"].div `
|
|
|
3467
3468
|
align-items: center;
|
|
3468
3469
|
height: 100px;
|
|
3469
3470
|
width: 100%;
|
|
3470
|
-
|
|
3471
|
-
|
|
3471
|
+
color: ${({ theme }) => theme.palette.white};
|
|
3472
|
+
|
|
3473
|
+
${p => p.url &&
|
|
3472
3474
|
`
|
|
3473
3475
|
background-image: url(${p.url});
|
|
3474
3476
|
background-color: ${p.theme.palette.grey[100]};
|
|
@@ -3482,19 +3484,19 @@ const Preview = styled__default["default"].div `
|
|
|
3482
3484
|
height: 100%;
|
|
3483
3485
|
}
|
|
3484
3486
|
`;
|
|
3485
|
-
const Thumbnail = ({ src, type, removeThumbnail, clickThumbnail, showX, isLoadingMedia
|
|
3487
|
+
const Thumbnail = ({ src, type, removeThumbnail, clickThumbnail, showX, isLoadingMedia, error = "", }) => {
|
|
3486
3488
|
const handleCancel = (e) => {
|
|
3487
3489
|
e.stopPropagation();
|
|
3488
3490
|
if (removeThumbnail)
|
|
3489
3491
|
removeThumbnail();
|
|
3490
3492
|
};
|
|
3491
|
-
return (jsxRuntime.
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3493
|
+
return (jsxRuntime.jsx(ImageCard, Object.assign({ onClick: clickThumbnail, className: type.includes("video") ? "video" : "image", error: error, isLoading: isLoadingMedia }, { children: isLoadingMedia ? (jsxRuntime.jsx(Preview, Object.assign({ url: src }, { children: jsxRuntime.jsx(reactLoaders.Spinner, { style: {
|
|
3494
|
+
display: "flex",
|
|
3495
|
+
position: "absolute",
|
|
3496
|
+
color: "white",
|
|
3497
|
+
alignItems: "center",
|
|
3498
|
+
justifyContent: "center",
|
|
3499
|
+
}, size: "large" }) }))) : (jsxRuntime.jsxs(Preview, Object.assign({ url: src }, { children: [showX && (jsxRuntime.jsx(DeleteThumbnailX, { deleteThumbnail: (e) => handleCancel(e) })), type.includes("video") && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("video", Object.assign({ src: src }, { children: jsxRuntime.jsx("track", { kind: "captions" }) })), jsxRuntime.jsx(SvgVideoPlayIcon, { opacity: error ? "0.3" : "1" })] }))] }))) })));
|
|
3498
3500
|
};
|
|
3499
3501
|
|
|
3500
3502
|
const FlexContainer = styled.styled.div `
|
|
@@ -3511,12 +3513,13 @@ const ThumbnailContainer = ({ openLightbox }) => {
|
|
|
3511
3513
|
previewUrl: file.url,
|
|
3512
3514
|
id: file.id,
|
|
3513
3515
|
isLoadingMedia: file.isLoadingMedia,
|
|
3516
|
+
error: file.error,
|
|
3514
3517
|
}));
|
|
3515
3518
|
}, [thumbnails]);
|
|
3516
3519
|
if (!mediaFiles || mediaFiles.length === 0) {
|
|
3517
3520
|
return null;
|
|
3518
3521
|
}
|
|
3519
|
-
return (jsxRuntime.jsx(FlexContainer, { children: mediaFiles.map((file, index) => (jsxRuntime.jsx(Thumbnail, { src: file.previewUrl, showX: true, type: file.fileType, isLoadingMedia: file.isLoadingMedia, removeThumbnail: () => {
|
|
3522
|
+
return (jsxRuntime.jsx(FlexContainer, { children: mediaFiles.map((file, index) => (jsxRuntime.jsx(Thumbnail, { src: file.previewUrl, showX: true, type: file.fileType, isLoadingMedia: file.isLoadingMedia, error: file.error, removeThumbnail: () => {
|
|
3520
3523
|
removeThumbnail(index);
|
|
3521
3524
|
onDeleteThumbnail(file.id);
|
|
3522
3525
|
}, clickThumbnail: () => {
|
|
@@ -5610,32 +5613,28 @@ const Searchable = ({ text, }) => {
|
|
|
5610
5613
|
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: text });
|
|
5611
5614
|
};
|
|
5612
5615
|
|
|
5613
|
-
const StyledWord = styled__default["default"]
|
|
5616
|
+
const StyledWord = styled__default["default"].div `
|
|
5617
|
+
display: inline;
|
|
5614
5618
|
font-size: ${({ theme, size }) => theme.fontSizes[size !== null && size !== void 0 ? size : "md"]};
|
|
5615
5619
|
padding: ${({ theme }) => theme.space.xxs} 0;
|
|
5620
|
+
position: relative;
|
|
5616
5621
|
|
|
5617
|
-
${({
|
|
5618
|
-
var _a
|
|
5619
|
-
return
|
|
5622
|
+
${({ observations, theme }) => {
|
|
5623
|
+
var _a;
|
|
5624
|
+
return observations && observations.length > 0 &&
|
|
5620
5625
|
`
|
|
5621
|
-
|
|
5622
|
-
color: ${(_b = observation.color) !== null && _b !== void 0 ? _b : "white"};
|
|
5626
|
+
color: ${(_a = observations[observations.length - 1].color) !== null && _a !== void 0 ? _a : theme.palette.grey[600]};
|
|
5623
5627
|
box-sizing: border-box;
|
|
5624
5628
|
font-weight: ${theme.fontWeights.semibold};
|
|
5625
5629
|
|
|
5626
5630
|
&:focus {
|
|
5627
5631
|
outline: none;
|
|
5628
5632
|
}
|
|
5629
|
-
|
|
5630
|
-
+ span:not([observation]) {
|
|
5631
|
-
margin-left: 2px;
|
|
5632
|
-
}
|
|
5633
5633
|
`;
|
|
5634
5634
|
}}
|
|
5635
5635
|
`;
|
|
5636
5636
|
const ActiveWord = styled__default["default"].span `
|
|
5637
5637
|
background-color: ${({ theme }) => getColor(theme.palette.fuschia, 400, undefined, 0.4)};
|
|
5638
|
-
padding: 0 2px;
|
|
5639
5638
|
`;
|
|
5640
5639
|
const WordsContainer = styled__default["default"].div `
|
|
5641
5640
|
box-sizing: border-box;
|
|
@@ -5645,12 +5644,23 @@ const WordsContainer = styled__default["default"].div `
|
|
|
5645
5644
|
}
|
|
5646
5645
|
}
|
|
5647
5646
|
`;
|
|
5647
|
+
const Layer = styled__default["default"].div `
|
|
5648
|
+
position: absolute;
|
|
5649
|
+
top: 0;
|
|
5650
|
+
left: 0;
|
|
5651
|
+
width: 100%;
|
|
5652
|
+
height: 100%;
|
|
5653
|
+
z-index: 0;
|
|
5654
|
+
background-color: ${({ color }) => getColor(color, undefined, undefined, 0.2)};
|
|
5655
|
+
`;
|
|
5648
5656
|
/**
|
|
5649
5657
|
* Use Highlight to use highlight interation on any text element
|
|
5650
5658
|
*/
|
|
5651
5659
|
const Highlight = (props) => {
|
|
5652
5660
|
const ref = React.useRef(null);
|
|
5653
5661
|
const extractText = (selection) => {
|
|
5662
|
+
if (selection.anchorNode === null || selection.focusNode === null)
|
|
5663
|
+
return "";
|
|
5654
5664
|
var range = selection.getRangeAt(0);
|
|
5655
5665
|
var tempDiv = document.createElement("div");
|
|
5656
5666
|
tempDiv.appendChild(range.cloneContents());
|
|
@@ -5698,24 +5708,22 @@ const Highlight = (props) => {
|
|
|
5698
5708
|
return (jsxRuntime.jsx(HighlightContextProvider, Object.assign({ term: props.search }, { children: jsxRuntime.jsx(WordsContainer, Object.assign({ ref: ref }, { children: props.children })) })));
|
|
5699
5709
|
};
|
|
5700
5710
|
const Word = (props) => {
|
|
5701
|
-
var _a;
|
|
5702
5711
|
const isActive = props.currentTime &&
|
|
5703
5712
|
props.currentTime >= props.start &&
|
|
5704
5713
|
props.currentTime < props.end;
|
|
5705
5714
|
// Are there any observations containing this word?
|
|
5706
|
-
const foundObservations =
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
return (jsxRuntime.jsx(Tooltip, Object.assign({ content: props.tooltipContent(observation), 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, { text: props.text }) })) : (jsxRuntime.jsx(Searchable, { text: props.text })), " "] })) })));
|
|
5715
|
+
const foundObservations = React.useMemo(() => {
|
|
5716
|
+
var _a, _b;
|
|
5717
|
+
return (_b = (_a = props.observations) === null || _a === void 0 ? void 0 : _a.filter((obs) => props.start >= obs.start && props.end <= obs.end)) !== null && _b !== void 0 ? _b : [];
|
|
5718
|
+
}, [props.observations, props.start, props.end]);
|
|
5719
|
+
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
|
+
var _a;
|
|
5721
|
+
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]);
|
|
5723
|
+
if (props.tooltipContent !== undefined && foundObservations.length > 0) {
|
|
5724
|
+
return (jsxRuntime.jsx(Tooltip, Object.assign({ content: props.tooltipContent(foundObservations), isTransparent: true }, { children: ObsWord })));
|
|
5717
5725
|
}
|
|
5718
|
-
return
|
|
5726
|
+
return jsxRuntime.jsx(jsxRuntime.Fragment, { children: ObsWord });
|
|
5719
5727
|
};
|
|
5720
5728
|
Highlight.Word = Word;
|
|
5721
5729
|
|
|
@@ -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;
|
|
@@ -5,7 +5,7 @@ interface Props {
|
|
|
5
5
|
isLoadingMedia?: boolean;
|
|
6
6
|
removeThumbnail?: () => void;
|
|
7
7
|
showX?: boolean;
|
|
8
|
-
|
|
8
|
+
error?: string;
|
|
9
9
|
}
|
|
10
|
-
declare const Thumbnail: ({ src, type, removeThumbnail, clickThumbnail, showX, isLoadingMedia,
|
|
10
|
+
declare const Thumbnail: ({ src, type, removeThumbnail, clickThumbnail, showX, isLoadingMedia, error, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default Thumbnail;
|
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
export interface FileElement {
|
|
2
|
-
fileName: string;
|
|
3
|
-
fileType: string;
|
|
4
|
-
errorCode?: "FILE_TOO_BIG" | "INVALID_FILE_EXTENSION" | "GENERIC_ERROR";
|
|
5
|
-
previewUrl: string;
|
|
6
|
-
internal_id: string;
|
|
7
|
-
isLoadingMedia: boolean;
|
|
8
|
-
}
|
|
9
1
|
interface Props {
|
|
10
2
|
openLightbox: (index: number) => void;
|
|
11
3
|
}
|
|
@@ -31,7 +31,6 @@ export interface WordProps extends ISpanProps {
|
|
|
31
31
|
currentTime?: number;
|
|
32
32
|
observations?: Observation[];
|
|
33
33
|
text: string;
|
|
34
|
-
/** Adjusts the font size. By default font size is medium */
|
|
35
34
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl";
|
|
36
|
-
tooltipContent?: (
|
|
35
|
+
tooltipContent?: (observations: Observation[]) => ReactNode;
|
|
37
36
|
}
|