@monolith-forensics/monolith-ui 1.2.85 → 1.2.86

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
- pdfjs.GlobalWorkerOptions.workerSrc = new URL("pdfjs-dist/build/pdf.worker.min.mjs", import.meta.url).toString();
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
  }) `
@@ -1,5 +1,4 @@
1
1
  import { Size, Variant } from "../core";
2
- import * as React from "react";
3
2
  export type Option = {
4
3
  label: string;
5
4
  value: any;
@@ -519,7 +519,7 @@ const TagBox = styled(({ className, data = [], placeholder = "Select tags", arro
519
519
  customItems,
520
520
  ]);
521
521
  const handleKeyDown = (e) => {
522
- var _a, _b, _c, _d;
522
+ var _a, _b;
523
523
  const currentInputValue = (_a = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _a === void 0 ? void 0 : _a.value;
524
524
  // Escape key
525
525
  if (e.key === "Escape") {
@@ -542,7 +542,8 @@ const TagBox = styled(({ className, data = [], placeholder = "Select tags", arro
542
542
  currentInputValue !== "" &&
543
543
  allowCustomValue) {
544
544
  handleAddItem(currentInputValue);
545
- ((_c = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _c === void 0 ? void 0 : _c.value) ? "" : (_d = inputRef === null || inputRef === void 0 ? void 0 : inputRef.current) === null || _d === void 0 ? void 0 : _d.value;
545
+ if (inputRef === null || inputRef === void 0 ? void 0 : inputRef.current)
546
+ inputRef.current.value = "";
546
547
  setSearchValue("");
547
548
  update();
548
549
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monolith-forensics/monolith-ui",
3
- "version": "1.2.85",
3
+ "version": "1.2.86",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Matt Danner (Monolith Forensics LLC)",