@performant-software/semantic-components 1.0.13-beta.0 → 1.0.13-beta.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@performant-software/semantic-components",
3
- "version": "1.0.13-beta.0",
3
+ "version": "1.0.13-beta.2",
4
4
  "description": "A package of shared components based on the Semantic UI Framework.",
5
5
  "license": "MIT",
6
6
  "main": "./build/index.js",
@@ -12,7 +12,7 @@
12
12
  "build": "webpack --mode production && flow-copy-source -v src types"
13
13
  },
14
14
  "dependencies": {
15
- "@performant-software/shared-components": "^1.0.13-beta.0",
15
+ "@performant-software/shared-components": "^1.0.13-beta.2",
16
16
  "@react-google-maps/api": "^2.8.1",
17
17
  "axios": "^0.26.1",
18
18
  "i18next": "^19.4.4",
@@ -21,7 +21,7 @@
21
21
  "react-dnd": "^11.1.3",
22
22
  "react-dnd-html5-backend": "^11.1.3",
23
23
  "react-i18next": "^11.4.0",
24
- "react-pdf": "^5.7.2",
24
+ "react-pdf": "^7.1.1",
25
25
  "react-syntax-highlighter": "^15.5.0",
26
26
  "react-uuid": "^1.0.2",
27
27
  "semantic-ui-less": "2.4.1",
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
 
3
3
  import React, { useState, type Node } from 'react';
4
- import { Document, Page } from 'react-pdf/dist/esm/entry.webpack';
4
+ import { pdfjs, Document, Page } from 'react-pdf';
5
5
  import {
6
6
  Dimmer,
7
7
  Icon,
@@ -13,6 +13,9 @@ import {
13
13
  } from 'semantic-ui-react';
14
14
  import DownloadButton from './DownloadButton';
15
15
  import LazyLoader from './LazyLoader';
16
+
17
+ import 'react-pdf/dist/esm/Page/AnnotationLayer.css';
18
+ import 'react-pdf/dist/esm/Page/TextLayer.css';
16
19
  import './LazyDocument.css';
17
20
 
18
21
  type Props = {
@@ -27,6 +30,8 @@ type Props = {
27
30
  src?: string
28
31
  };
29
32
 
33
+ pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.js`;
34
+
30
35
  const LazyDocument = (props: Props) => {
31
36
  const [dimmer, setDimmer] = useState(false);
32
37
  const [error, setError] = useState(false);
@@ -1,7 +1,7 @@
1
1
  // @flow
2
2
 
3
3
  import React, { useState, type Node } from 'react';
4
- import { Document, Page } from 'react-pdf/dist/esm/entry.webpack';
4
+ import { pdfjs, Document, Page } from 'react-pdf';
5
5
  import {
6
6
  Dimmer,
7
7
  Icon,
@@ -13,6 +13,9 @@ import {
13
13
  } from 'semantic-ui-react';
14
14
  import DownloadButton from './DownloadButton';
15
15
  import LazyLoader from './LazyLoader';
16
+
17
+ import 'react-pdf/dist/esm/Page/AnnotationLayer.css';
18
+ import 'react-pdf/dist/esm/Page/TextLayer.css';
16
19
  import './LazyDocument.css';
17
20
 
18
21
  type Props = {
@@ -27,6 +30,8 @@ type Props = {
27
30
  src?: string
28
31
  };
29
32
 
33
+ pdfjs.GlobalWorkerOptions.workerSrc = `//unpkg.com/pdfjs-dist@${pdfjs.version}/build/pdf.worker.min.js`;
34
+
30
35
  const LazyDocument = (props: Props) => {
31
36
  const [dimmer, setDimmer] = useState(false);
32
37
  const [error, setError] = useState(false);