@glodon-aiot/react-components 3.11.0 → 3.11.1-alpha.1765331460
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/dist/es/ImageMap/index.mjs +3 -2
- package/dist/es/components/DocumentViewer/components/PDFViewer/index.mjs +62 -0
- package/dist/es/components/DocumentViewer/components/PDFViewer/style.less.mjs +4 -0
- package/dist/es/components/DocumentViewer/index.mjs +197 -216
- package/dist/es/components/DocumentViewer/utils.mjs +72 -36
- package/dist/es/components/Markdown/index.mjs +33 -34
- package/dist/es/index.mjs +43 -42
- package/dist/es/node_modules/@react-pdf-viewer/open/lib/styles/index.css.mjs +4 -0
- package/dist/es/node_modules/@react-pdf-viewer/toolbar/lib/styles/index.css.mjs +4 -0
- package/dist/lib/index.js +10 -10
- package/dist/src/components/DocumentViewer/components/PDFViewer/index.d.ts +7 -0
- package/dist/src/components/DocumentViewer/components/index.d.ts +1 -1
- package/dist/src/components/DocumentViewer/utils.d.ts +5 -0
- package/package.json +10 -2
- package/dist/aiot-react-components.js +0 -20191
- package/dist/aiot-react-components.umd.cjs +0 -183
- package/dist/es/components/DocumentViewer/components/PdfRenderer.mjs +0 -45
- package/dist/es/components/DocumentViewer/hooks/usePdfViewer.mjs +0 -31
- package/dist/src/components/DocumentViewer/components/PdfRenderer.d.ts +0 -11
- package/dist/style.css +0 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsxs as b, jsx as i, Fragment as ke } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef as dt, useRef as we, useState as a, useEffect as X, useImperativeHandle as gt } from "react";
|
|
3
3
|
import "./style.less.mjs";
|
|
4
|
+
import "../components/DocumentViewer/style.less.mjs";
|
|
4
5
|
import { Iconfont as ht } from "../Iconfont/index.mjs";
|
|
5
6
|
import { TrackMap as pt } from "../TrackMap/index.mjs";
|
|
6
7
|
import { PassMap as vt } from "../PassMap/index.mjs";
|
|
@@ -9,7 +10,7 @@ import Bt from "antd/es/button";
|
|
|
9
10
|
import Ee from "../ConfirmableButton/index.mjs";
|
|
10
11
|
import { SaveOutlined as bt } from "@ant-design/icons";
|
|
11
12
|
let Pe;
|
|
12
|
-
const
|
|
13
|
+
const zt = dt((Se, Te) => {
|
|
13
14
|
var ie, ae, ce, le, re, ue, me, fe, de, ge, he, pe, ve, ye, Be, be, xe, Me, Ie, Ce, Ne;
|
|
14
15
|
const {
|
|
15
16
|
url: ze,
|
|
@@ -293,5 +294,5 @@ const Tt = dt((Se, Te) => {
|
|
|
293
294
|
});
|
|
294
295
|
});
|
|
295
296
|
export {
|
|
296
|
-
|
|
297
|
+
zt as ImageMap
|
|
297
298
|
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var d = Object.defineProperty, h = Object.defineProperties;
|
|
2
|
+
var f = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var a = Object.getOwnPropertySymbols;
|
|
4
|
+
var g = Object.prototype.hasOwnProperty, P = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var m = (r, e, o) => e in r ? d(r, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : r[e] = o, c = (r, e) => {
|
|
6
|
+
for (var o in e || (e = {}))
|
|
7
|
+
g.call(e, o) && m(r, o, e[o]);
|
|
8
|
+
if (a)
|
|
9
|
+
for (var o of a(e))
|
|
10
|
+
P.call(e, o) && m(r, o, e[o]);
|
|
11
|
+
return r;
|
|
12
|
+
}, s = (r, e) => h(r, f(e));
|
|
13
|
+
import { jsx as t, Fragment as i } from "react/jsx-runtime";
|
|
14
|
+
import { Worker as w, Viewer as S, SpecialZoomLevel as b } from "@react-pdf-viewer/core";
|
|
15
|
+
import "@react-pdf-viewer/core/lib/styles/index.css";
|
|
16
|
+
import { defaultLayoutPlugin as T } from "@react-pdf-viewer/default-layout";
|
|
17
|
+
import v from "@react-pdf-viewer/locales/lib/zh_CN.json";
|
|
18
|
+
import "@react-pdf-viewer/default-layout/lib/styles/index.css";
|
|
19
|
+
import "../../../../node_modules/@react-pdf-viewer/toolbar/lib/styles/index.css.mjs";
|
|
20
|
+
import "../../../../node_modules/@react-pdf-viewer/open/lib/styles/index.css.mjs";
|
|
21
|
+
import "./style.less.mjs";
|
|
22
|
+
const I = (r) => {
|
|
23
|
+
const {
|
|
24
|
+
fileUrl: e,
|
|
25
|
+
pageNumber: o
|
|
26
|
+
} = r, p = (n) => s(c({}, n), {
|
|
27
|
+
Open: () => /* @__PURE__ */ t(i, {}),
|
|
28
|
+
Search: () => /* @__PURE__ */ t(i, {}),
|
|
29
|
+
ShowSearchPopover: () => /* @__PURE__ */ t(i, {}),
|
|
30
|
+
SwitchTheme: () => /* @__PURE__ */ t(i, {}),
|
|
31
|
+
SwitchThemeMenuItem: () => /* @__PURE__ */ t(i, {}),
|
|
32
|
+
ShowProperties: () => /* @__PURE__ */ t(i, {}),
|
|
33
|
+
ShowPropertiesMenuItem: () => /* @__PURE__ */ t(i, {})
|
|
34
|
+
}), l = T({
|
|
35
|
+
renderToolbar: (n) => /* @__PURE__ */ t(n, {
|
|
36
|
+
children: u(p)
|
|
37
|
+
}),
|
|
38
|
+
toolbarPlugin: {
|
|
39
|
+
zoomPlugin: {
|
|
40
|
+
enableShortcuts: !1
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}), {
|
|
44
|
+
renderDefaultToolbar: u
|
|
45
|
+
} = l.toolbarPluginInstance;
|
|
46
|
+
return /* @__PURE__ */ t("div", {
|
|
47
|
+
className: "pdf-viewer",
|
|
48
|
+
children: /* @__PURE__ */ t(w, {
|
|
49
|
+
workerUrl: "https://aiot-acceleration.glodon.com/glodon/libs/pdfjs-dist/3.11.174/pdf.worker.min.js",
|
|
50
|
+
children: /* @__PURE__ */ t(S, {
|
|
51
|
+
defaultScale: b.PageWidth,
|
|
52
|
+
localization: v,
|
|
53
|
+
fileUrl: e,
|
|
54
|
+
plugins: [l],
|
|
55
|
+
initialPage: o ? o - 1 : 0
|
|
56
|
+
})
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
}, U = I;
|
|
60
|
+
export {
|
|
61
|
+
U as default
|
|
62
|
+
};
|