@monolith-forensics/monolith-ui 1.2.81 → 1.2.83

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,6 +5,18 @@ 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
+ 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
+ }
8
20
  pdfjs.GlobalWorkerOptions.workerSrc = new URL("pdfjs-dist/build/pdf.worker.min.mjs", import.meta.url).toString();
9
21
  const StyledContainer = styled.div.attrs({
10
22
  className: "PdfViewer-container",
@@ -472,10 +472,7 @@ DropDownProps = {}, debounceTime = 150, sort = false, disabled = false, }) => {
472
472
  }, [refs.floating, refs.reference, handleBlur]);
473
473
  // handle input value change
474
474
  useEffect(() => {
475
- if (_value) {
476
- const newValue = _value.label;
477
- setInputValue(newValue || "");
478
- }
475
+ setInputValue((_value === null || _value === void 0 ? void 0 : _value.label) || "");
479
476
  }, [_value]);
480
477
  // handle scroll item into view
481
478
  useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monolith-forensics/monolith-ui",
3
- "version": "1.2.81",
3
+ "version": "1.2.83",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Matt Danner (Monolith Forensics LLC)",