@monolith-forensics/monolith-ui 1.2.82 → 1.2.84
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.
|
@@ -5,7 +5,19 @@ import "react-pdf/dist/esm/Page/AnnotationLayer.css";
|
|
|
5
5
|
import "react-pdf/dist/esm/Page/TextLayer.css";
|
|
6
6
|
import styled from "styled-components";
|
|
7
7
|
import Loader from "../../Loader";
|
|
8
|
-
|
|
8
|
+
if (typeof Promise.withResolvers === "undefined") {
|
|
9
|
+
if (window)
|
|
10
|
+
// @ts-expect-error This does not exist outside of polyfill which this is doing
|
|
11
|
+
window.Promise.withResolvers = function () {
|
|
12
|
+
let resolve, reject;
|
|
13
|
+
const promise = new Promise((res, rej) => {
|
|
14
|
+
resolve = res;
|
|
15
|
+
reject = rej;
|
|
16
|
+
});
|
|
17
|
+
return { promise, resolve, reject };
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
pdfjs.GlobalWorkerOptions.workerSrc = new URL("pdfjs-dist/legacy/build/pdf.worker.min.mjs", import.meta.url).toString();
|
|
9
21
|
const StyledContainer = styled.div.attrs({
|
|
10
22
|
className: "PdfViewer-container",
|
|
11
23
|
}) `
|