@monolith-forensics/monolith-ui 1.2.48 → 1.2.50

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.
@@ -11,17 +11,12 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  import { useState } from "react";
14
- import { Document, Page,
15
- // pdfjs
16
- } from "react-pdf";
14
+ import { Document, Page, pdfjs } from "react-pdf";
17
15
  import "react-pdf/dist/esm/Page/AnnotationLayer.css";
18
16
  import "react-pdf/dist/esm/Page/TextLayer.css";
19
17
  import styled from "styled-components";
20
18
  import Loader from "../../Loader";
21
- // pdfjs.GlobalWorkerOptions.workerSrc = new URL(
22
- // "pdfjs-dist/build/pdf.worker.min.mjs",
23
- // import.meta.url
24
- // ).toString();
19
+ pdfjs.GlobalWorkerOptions.workerSrc = new URL("pdfjs-dist/build/pdf.worker.min.mjs", import.meta.url).toString();
25
20
  const StyledContainer = styled.div ``;
26
21
  const StyledDocument = styled(Document).attrs({
27
22
  className: "PdfViewer-document",
@@ -171,6 +171,8 @@ const resolveValue = (value, data) => {
171
171
  let foundOption;
172
172
  if (value === undefined)
173
173
  return undefined;
174
+ if (value === null)
175
+ return null;
174
176
  if (typeof value === "string") {
175
177
  foundOption = data.find((item) => item.value === value);
176
178
  }
@@ -345,7 +347,7 @@ DropDownProps = {}, debounceTime = 150, sort = false, }) => {
345
347
  };
346
348
  const handleChangeSelection = useCallback((option) => {
347
349
  !isControlled && setValueState(option);
348
- onChange === null || onChange === void 0 ? void 0 : onChange((option === null || option === void 0 ? void 0 : option.value) || null, option);
350
+ onChange === null || onChange === void 0 ? void 0 : onChange(option === null || option === void 0 ? void 0 : option.value, option);
349
351
  }, [onChange]);
350
352
  const handleAddItem = useCallback((newItem) => {
351
353
  const newValue = { label: newItem, value: newItem };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@monolith-forensics/monolith-ui",
3
- "version": "1.2.48",
3
+ "version": "1.2.50",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "author": "Matt Danner (Monolith Forensics LLC)",