@voplus/morpho-document 1.4.201 → 1.4.203
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/es/controls/DocumentStatusLabel/index.js +2 -4
- package/es/controls/DocumentStatusLabel/index.js.map +1 -1
- package/es/controls/PDFViewer/Toolbar/buttons/Download.d.ts +3 -0
- package/es/controls/PDFViewer/Toolbar/buttons/Download.js +16 -0
- package/es/controls/PDFViewer/Toolbar/buttons/Download.js.map +1 -0
- package/es/controls/PDFViewer/Toolbar/buttons/index.d.ts +1 -0
- package/es/controls/PDFViewer/Toolbar/buttons/index.js +1 -0
- package/es/controls/PDFViewer/Toolbar/buttons/index.js.map +1 -1
- package/es/controls/PDFViewer/Toolbar/index.d.ts +1 -1
- package/es/controls/PDFViewer/Toolbar/index.js +5 -4
- package/es/controls/PDFViewer/Toolbar/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
const DocumentStatusLabel = (props) => {
|
|
4
|
-
return observe(() => React.createElement(StatusLabel, { ...props }));
|
|
5
|
-
};
|
|
2
|
+
import StatusLabel from "@voplus/morpho-ui/es/controls/DocumentStatusLabel";
|
|
3
|
+
const DocumentStatusLabel = (props) => React.createElement(StatusLabel, { ...props });
|
|
6
4
|
export default DocumentStatusLabel;
|
|
7
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/controls/DocumentStatusLabel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/controls/DocumentStatusLabel/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,WAAW,MAAM,mDAAmD,CAAC;AAE5E,MAAM,mBAAmB,GAAG,CAAC,KAQ5B,EAAE,EAAE,CAAC,oBAAC,WAAW,OAAK,KAAK,GAAI,CAAC;AAEjC,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FontAwesomeIcon as Icon } from "@fortawesome/react-fontawesome";
|
|
3
|
+
import { faFileDownload } from "@fortawesome/pro-regular-svg-icons";
|
|
4
|
+
import { observe } from "@voplus/morpho-ui";
|
|
5
|
+
import { saveAs } from "file-saver";
|
|
6
|
+
import { usePDFViewerContext } from "../../state";
|
|
7
|
+
const Download = () => {
|
|
8
|
+
const context = usePDFViewerContext();
|
|
9
|
+
return observe(() => (React.createElement("span", { className: "toolbar-button margin-left-10", onClick: onDownload },
|
|
10
|
+
React.createElement(Icon, { icon: faFileDownload }))));
|
|
11
|
+
function onDownload() {
|
|
12
|
+
saveAs(context.url);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
export default Download;
|
|
16
|
+
//# sourceMappingURL=Download.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Download.js","sourceRoot":"","sources":["../../../../../src/controls/PDFViewer/Toolbar/buttons/Download.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,eAAe,IAAI,IAAI,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAElD,MAAM,QAAQ,GAAG,GAAG,EAAE;IACrB,MAAM,OAAO,GAAG,mBAAmB,EAAG,CAAC;IAEvC,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,8BAAM,SAAS,EAAC,+BAA+B,EAAC,OAAO,EAAE,UAAU;QAClE,oBAAC,IAAI,IAAC,IAAI,EAAE,cAAc,GAAI,CACxB,CACP,CAAC,CAAC;IAEH,SAAS,UAAU;QAClB,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACrB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/controls/PDFViewer/Toolbar/buttons/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/controls/PDFViewer/Toolbar/buttons/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./index.less";
|
|
2
1
|
import React, { useRef } from "react";
|
|
3
|
-
import { Zoom, ZoomIn, ZoomOut } from "./buttons";
|
|
4
|
-
import classnames from "classnames";
|
|
2
|
+
import { Zoom, ZoomIn, ZoomOut, Download } from "./buttons";
|
|
5
3
|
import { useIsStickyActive } from "@voplus/morpho-ui";
|
|
6
4
|
import { usePDFViewerContext } from "../state";
|
|
5
|
+
import classnames from "classnames";
|
|
6
|
+
import "./index.less";
|
|
7
7
|
const Toolbar = (props) => {
|
|
8
8
|
const context = usePDFViewerContext();
|
|
9
9
|
const element = useRef(null);
|
|
@@ -11,7 +11,8 @@ const Toolbar = (props) => {
|
|
|
11
11
|
return (React.createElement("div", { className: classnames("pdf-viewer-toolbar", { sticky: props.sticky }, props.className), ref: element, style: { textAlign: "center" } }, props.children ? (props.children) : (React.createElement(React.Fragment, null,
|
|
12
12
|
React.createElement(ZoomOut, null),
|
|
13
13
|
React.createElement(Zoom, null),
|
|
14
|
-
React.createElement(ZoomIn, null)
|
|
14
|
+
React.createElement(ZoomIn, null),
|
|
15
|
+
React.createElement(Download, null)))));
|
|
15
16
|
};
|
|
16
17
|
Toolbar.defaultProps = {
|
|
17
18
|
sticky: true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/controls/PDFViewer/Toolbar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/controls/PDFViewer/Toolbar/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,MAAM,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC/C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,CAAC;AAStB,MAAM,OAAO,GAAG,CAAC,KAAmB,EAAE,EAAE;IACvC,MAAM,OAAO,GAAG,mBAAmB,EAAE,CAAC;IACtC,MAAM,OAAO,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAE7C,iBAAiB,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;IAEvD,OAAO,CACN,6BACC,SAAS,EAAE,UAAU,CAAC,oBAAoB,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,EAAE,KAAK,CAAC,SAAS,CAAC,EACtF,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,IAE7B,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CACjB,KAAK,CAAC,QAAQ,CACd,CAAC,CAAC,CAAC,CACH,oBAAC,KAAK,CAAC,QAAQ;QACd,oBAAC,OAAO,OAAG;QACX,oBAAC,IAAI,OAAG;QACR,oBAAC,MAAM,OAAG;QACV,oBAAC,QAAQ,OAAG,CACI,CACjB,CACI,CACN,CAAC;AACH,CAAC,CAAC;AAEF,OAAO,CAAC,YAAY,GAAG;IACtB,MAAM,EAAE,IAAI;CACZ,CAAC;AACF,eAAe,OAAO,CAAC"}
|