@hybridcore/ui 1.5.15 → 1.5.16

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.
@@ -1 +1 @@
1
- #react-doc-viewer{background-color:#ededed}#react-doc-viewer #pdf-controls{position:fixed;z-index:9999;left:50%;top:7px;transform:translate(-50%);box-shadow:none}#react-doc-viewer #pdf-controls button,#react-doc-viewer #pdf-controls a{box-shadow:none;color:#9e9e9e}#react-doc-viewer #pdf-controls #pdf-download{display:none}#react-doc-viewer #image-img{max-width:100%;max-height:100%}#react-doc-viewer #pdf-page-wrapper{margin-top:20px;margin-bottom:20px}:root{--react-pdf-text-layer: 1;--highlight-bg-color: rgba(180, 0, 170, 1);--highlight-selected-bg-color: rgba(0, 100, 0, 1)}@media screen and (forced-colors: active){:root{--highlight-bg-color: Highlight;--highlight-selected-bg-color: ButtonText}}[data-main-rotation="90"]{transform:rotate(90deg) translateY(-100%)}[data-main-rotation="180"]{transform:rotate(180deg) translate(-100%,-100%)}[data-main-rotation="270"]{transform:rotate(270deg) translate(-100%)}.textLayer{position:absolute;text-align:initial;top:0;right:0;bottom:0;left:0;overflow:hidden;line-height:1;text-size-adjust:none;forced-color-adjust:none;transform-origin:0 0;z-index:2}.textLayer :is(span,br){color:transparent;position:absolute;white-space:pre;cursor:text;margin:0;transform-origin:0 0}.textLayer span.markedContent{top:0;height:0}.textLayer .highlight{margin:-1px;padding:1px;background-color:var(--highlight-bg-color);border-radius:4px}.textLayer .highlight.appended{position:initial}.textLayer .highlight.begin{border-radius:4px 0 0 4px}.textLayer .highlight.end{border-radius:0 4px 4px 0}.textLayer .highlight.middle{border-radius:0}.textLayer .highlight.selected{background-color:var(--highlight-selected-bg-color)}.textLayer br::selection{background:transparent}.textLayer .endOfContent{display:block;position:absolute;top:100%;right:0;bottom:0;left:0;z-index:-1;cursor:default;-webkit-user-select:none;user-select:none}.textLayer.selecting .endOfContent{top:0}.hiddenCanvasElement{position:absolute;top:0;left:0;width:0;height:0;display:none}:root{--react-pdf-annotation-layer: 1;--annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");--input-focus-border-color: Highlight;--input-focus-outline: 1px solid Canvas;--input-unfocused-border-color: transparent;--input-disabled-border-color: transparent;--input-hover-border-color: black;--link-outline: none}@media screen and (forced-colors: active){:root{--input-focus-border-color: CanvasText;--input-unfocused-border-color: ActiveText;--input-disabled-border-color: GrayText;--input-hover-border-color: Highlight;--link-outline: 1.5px solid LinkText}.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{outline:1.5px solid selectedItem}.annotationLayer .linkAnnotation:hover{-webkit-backdrop-filter:invert(100%);backdrop-filter:invert(100%)}}.annotationLayer{position:absolute;top:0;left:0;pointer-events:none;transform-origin:0 0;z-index:3}.annotationLayer[data-main-rotation="90"] .norotate{transform:rotate(270deg) translate(-100%)}.annotationLayer[data-main-rotation="180"] .norotate{transform:rotate(180deg) translate(-100%,-100%)}.annotationLayer[data-main-rotation="270"] .norotate{transform:rotate(90deg) translateY(-100%)}.annotationLayer canvas{position:absolute;width:100%;height:100%}.annotationLayer section{position:absolute;text-align:initial;pointer-events:auto;box-sizing:border-box;margin:0;transform-origin:0 0}.annotationLayer .linkAnnotation{outline:var(--link-outline)}.textLayer.selecting~.annotationLayer section{pointer-events:none}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a:hover{opacity:.2;background:#ff0;box-shadow:0 2px 10px #ff0}.annotationLayer .textAnnotation img{position:absolute;cursor:pointer;width:100%;height:100%;top:0;left:0}.annotationLayer .textWidgetAnnotation :is(input,textarea),.annotationLayer .choiceWidgetAnnotation select,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{background-image:var(--annotation-unfocused-field-background);border:2px solid var(--input-unfocused-border-color);box-sizing:border-box;font:calc(9px * var(--scale-factor)) sans-serif;height:100%;margin:0;vertical-align:top;width:100%}.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{outline:1.5px solid red}.annotationLayer .choiceWidgetAnnotation select option{padding:0}.annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}.annotationLayer .textWidgetAnnotation textarea{resize:none}.annotationLayer .textWidgetAnnotation :is(input,textarea)[disabled],.annotationLayer .choiceWidgetAnnotation select[disabled],.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input[disabled]{background:none;border:2px solid var(--input-disabled-border-color);cursor:not-allowed}.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:hover{border:2px solid var(--input-hover-border-color)}.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation.checkBox input:hover{border-radius:2px}.annotationLayer .textWidgetAnnotation :is(input,textarea):focus,.annotationLayer .choiceWidgetAnnotation select:focus{background:none;border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) :focus{background-image:none;background-color:transparent}.annotationLayer .buttonWidgetAnnotation.checkBox :focus{border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.radioButton :focus{border:2px solid var(--input-focus-border-color);outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:CanvasText;content:"";display:block;position:absolute}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{height:80%;left:45%;width:1px}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}.annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}.annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{-webkit-appearance:none;-moz-appearance:none;appearance:none}.annotationLayer .popupTriggerArea{height:100%;width:100%}.annotationLayer .fileAttachmentAnnotation .popupTriggerArea{position:absolute}.annotationLayer .popupWrapper{position:absolute;font-size:calc(9px * var(--scale-factor));width:100%;min-width:calc(180px * var(--scale-factor));pointer-events:none}.annotationLayer .popup{position:absolute;max-width:calc(180px * var(--scale-factor));background-color:#ff9;box-shadow:0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) #888;border-radius:calc(2px * var(--scale-factor));padding:calc(6px * var(--scale-factor));margin-left:calc(5px * var(--scale-factor));cursor:pointer;font:message-box;white-space:normal;word-wrap:break-word;pointer-events:auto}.annotationLayer .popup>*{font-size:calc(9px * var(--scale-factor))}.annotationLayer .popup h1{display:inline-block}.annotationLayer .popupDate{display:inline-block;margin-left:calc(5px * var(--scale-factor))}.annotationLayer .popupContent{border-top:1px solid rgba(51,51,51,1);margin-top:calc(2px * var(--scale-factor));padding-top:calc(2px * var(--scale-factor))}.annotationLayer .richText>*{white-space:pre-wrap;font-size:calc(9px * var(--scale-factor))}.annotationLayer .highlightAnnotation,.annotationLayer .underlineAnnotation,.annotationLayer .squigglyAnnotation,.annotationLayer .strikeoutAnnotation,.annotationLayer .freeTextAnnotation,.annotationLayer .lineAnnotation svg line,.annotationLayer .squareAnnotation svg rect,.annotationLayer .circleAnnotation svg ellipse,.annotationLayer .polylineAnnotation svg polyline,.annotationLayer .polygonAnnotation svg polygon,.annotationLayer .caretAnnotation,.annotationLayer .inkAnnotation svg polyline,.annotationLayer .stampAnnotation,.annotationLayer .fileAttachmentAnnotation{cursor:pointer}.annotationLayer section svg{position:absolute;width:100%;height:100%;top:0;left:0}.annotationLayer .annotationTextContent{position:absolute;width:100%;height:100%;opacity:0;color:transparent;-webkit-user-select:none;user-select:none;pointer-events:none}.annotationLayer .annotationTextContent span{width:100%;display:inline-block}
1
+ #react-doc-viewer #proxy-renderer{background-color:#ededed;min-height:calc(100vh - 85px)}#react-doc-viewer #pdf-controls{position:fixed;z-index:9999;left:50%;top:7px;transform:translate(-50%);box-shadow:none}#react-doc-viewer #pdf-controls button,#react-doc-viewer #pdf-controls a{box-shadow:none;color:#9e9e9e}#react-doc-viewer #pdf-controls #pdf-download{display:none}#react-doc-viewer #image-img{max-width:100%;max-height:100%}#react-doc-viewer #pdf-page-wrapper{margin-top:20px;margin-bottom:20px}:root{--react-pdf-text-layer: 1;--highlight-bg-color: rgba(180, 0, 170, 1);--highlight-selected-bg-color: rgba(0, 100, 0, 1)}@media screen and (forced-colors: active){:root{--highlight-bg-color: Highlight;--highlight-selected-bg-color: ButtonText}}[data-main-rotation="90"]{transform:rotate(90deg) translateY(-100%)}[data-main-rotation="180"]{transform:rotate(180deg) translate(-100%,-100%)}[data-main-rotation="270"]{transform:rotate(270deg) translate(-100%)}.textLayer{position:absolute;text-align:initial;top:0;right:0;bottom:0;left:0;overflow:hidden;line-height:1;text-size-adjust:none;forced-color-adjust:none;transform-origin:0 0;z-index:2}.textLayer :is(span,br){color:transparent;position:absolute;white-space:pre;cursor:text;margin:0;transform-origin:0 0}.textLayer span.markedContent{top:0;height:0}.textLayer .highlight{margin:-1px;padding:1px;background-color:var(--highlight-bg-color);border-radius:4px}.textLayer .highlight.appended{position:initial}.textLayer .highlight.begin{border-radius:4px 0 0 4px}.textLayer .highlight.end{border-radius:0 4px 4px 0}.textLayer .highlight.middle{border-radius:0}.textLayer .highlight.selected{background-color:var(--highlight-selected-bg-color)}.textLayer br::selection{background:transparent}.textLayer .endOfContent{display:block;position:absolute;top:100%;right:0;bottom:0;left:0;z-index:-1;cursor:default;-webkit-user-select:none;user-select:none}.textLayer.selecting .endOfContent{top:0}.hiddenCanvasElement{position:absolute;top:0;left:0;width:0;height:0;display:none}:root{--react-pdf-annotation-layer: 1;--annotation-unfocused-field-background: url("data:image/svg+xml;charset=UTF-8,<svg width='1px' height='1px' xmlns='http://www.w3.org/2000/svg'><rect width='100%' height='100%' style='fill:rgba(0, 54, 255, 0.13);'/></svg>");--input-focus-border-color: Highlight;--input-focus-outline: 1px solid Canvas;--input-unfocused-border-color: transparent;--input-disabled-border-color: transparent;--input-hover-border-color: black;--link-outline: none}@media screen and (forced-colors: active){:root{--input-focus-border-color: CanvasText;--input-unfocused-border-color: ActiveText;--input-disabled-border-color: GrayText;--input-hover-border-color: Highlight;--link-outline: 1.5px solid LinkText}.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{outline:1.5px solid selectedItem}.annotationLayer .linkAnnotation:hover{-webkit-backdrop-filter:invert(100%);backdrop-filter:invert(100%)}}.annotationLayer{position:absolute;top:0;left:0;pointer-events:none;transform-origin:0 0;z-index:3}.annotationLayer[data-main-rotation="90"] .norotate{transform:rotate(270deg) translate(-100%)}.annotationLayer[data-main-rotation="180"] .norotate{transform:rotate(180deg) translate(-100%,-100%)}.annotationLayer[data-main-rotation="270"] .norotate{transform:rotate(90deg) translateY(-100%)}.annotationLayer canvas{position:absolute;width:100%;height:100%}.annotationLayer section{position:absolute;text-align:initial;pointer-events:auto;box-sizing:border-box;margin:0;transform-origin:0 0}.annotationLayer .linkAnnotation{outline:var(--link-outline)}.textLayer.selecting~.annotationLayer section{pointer-events:none}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a{position:absolute;font-size:1em;top:0;left:0;width:100%;height:100%}.annotationLayer :is(.linkAnnotation,.buttonWidgetAnnotation.pushButton)>a:hover{opacity:.2;background:#ff0;box-shadow:0 2px 10px #ff0}.annotationLayer .textAnnotation img{position:absolute;cursor:pointer;width:100%;height:100%;top:0;left:0}.annotationLayer .textWidgetAnnotation :is(input,textarea),.annotationLayer .choiceWidgetAnnotation select,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{background-image:var(--annotation-unfocused-field-background);border:2px solid var(--input-unfocused-border-color);box-sizing:border-box;font:calc(9px * var(--scale-factor)) sans-serif;height:100%;margin:0;vertical-align:top;width:100%}.annotationLayer .textWidgetAnnotation :is(input,textarea):required,.annotationLayer .choiceWidgetAnnotation select:required,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:required{outline:1.5px solid red}.annotationLayer .choiceWidgetAnnotation select option{padding:0}.annotationLayer .buttonWidgetAnnotation.radioButton input{border-radius:50%}.annotationLayer .textWidgetAnnotation textarea{resize:none}.annotationLayer .textWidgetAnnotation :is(input,textarea)[disabled],.annotationLayer .choiceWidgetAnnotation select[disabled],.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input[disabled]{background:none;border:2px solid var(--input-disabled-border-color);cursor:not-allowed}.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input:hover{border:2px solid var(--input-hover-border-color)}.annotationLayer .textWidgetAnnotation :is(input,textarea):hover,.annotationLayer .choiceWidgetAnnotation select:hover,.annotationLayer .buttonWidgetAnnotation.checkBox input:hover{border-radius:2px}.annotationLayer .textWidgetAnnotation :is(input,textarea):focus,.annotationLayer .choiceWidgetAnnotation select:focus{background:none;border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) :focus{background-image:none;background-color:transparent}.annotationLayer .buttonWidgetAnnotation.checkBox :focus{border:2px solid var(--input-focus-border-color);border-radius:2px;outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.radioButton :focus{border:2px solid var(--input-focus-border-color);outline:var(--input-focus-outline)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after,.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{background-color:CanvasText;content:"";display:block;position:absolute}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before,.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{height:80%;left:45%;width:1px}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:before{transform:rotate(45deg)}.annotationLayer .buttonWidgetAnnotation.checkBox input:checked:after{transform:rotate(-45deg)}.annotationLayer .buttonWidgetAnnotation.radioButton input:checked:before{border-radius:50%;height:50%;left:30%;top:20%;width:50%}.annotationLayer .textWidgetAnnotation input.comb{font-family:monospace;padding-left:2px;padding-right:0}.annotationLayer .textWidgetAnnotation input.comb:focus{width:103%}.annotationLayer .buttonWidgetAnnotation:is(.checkBox,.radioButton) input{-webkit-appearance:none;-moz-appearance:none;appearance:none}.annotationLayer .popupTriggerArea{height:100%;width:100%}.annotationLayer .fileAttachmentAnnotation .popupTriggerArea{position:absolute}.annotationLayer .popupWrapper{position:absolute;font-size:calc(9px * var(--scale-factor));width:100%;min-width:calc(180px * var(--scale-factor));pointer-events:none}.annotationLayer .popup{position:absolute;max-width:calc(180px * var(--scale-factor));background-color:#ff9;box-shadow:0 calc(2px * var(--scale-factor)) calc(5px * var(--scale-factor)) #888;border-radius:calc(2px * var(--scale-factor));padding:calc(6px * var(--scale-factor));margin-left:calc(5px * var(--scale-factor));cursor:pointer;font:message-box;white-space:normal;word-wrap:break-word;pointer-events:auto}.annotationLayer .popup>*{font-size:calc(9px * var(--scale-factor))}.annotationLayer .popup h1{display:inline-block}.annotationLayer .popupDate{display:inline-block;margin-left:calc(5px * var(--scale-factor))}.annotationLayer .popupContent{border-top:1px solid rgba(51,51,51,1);margin-top:calc(2px * var(--scale-factor));padding-top:calc(2px * var(--scale-factor))}.annotationLayer .richText>*{white-space:pre-wrap;font-size:calc(9px * var(--scale-factor))}.annotationLayer .highlightAnnotation,.annotationLayer .underlineAnnotation,.annotationLayer .squigglyAnnotation,.annotationLayer .strikeoutAnnotation,.annotationLayer .freeTextAnnotation,.annotationLayer .lineAnnotation svg line,.annotationLayer .squareAnnotation svg rect,.annotationLayer .circleAnnotation svg ellipse,.annotationLayer .polylineAnnotation svg polyline,.annotationLayer .polygonAnnotation svg polygon,.annotationLayer .caretAnnotation,.annotationLayer .inkAnnotation svg polyline,.annotationLayer .stampAnnotation,.annotationLayer .fileAttachmentAnnotation{cursor:pointer}.annotationLayer section svg{position:absolute;width:100%;height:100%;top:0;left:0}.annotationLayer .annotationTextContent{position:absolute;width:100%;height:100%;opacity:0;color:transparent;-webkit-user-select:none;user-select:none;pointer-events:none}.annotationLayer .annotationTextContent span{width:100%;display:inline-block}
@@ -1,16 +1,21 @@
1
- import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
- import { Box as r, Divider as i } from "@mui/material";
3
- import { Button as t } from "../../styled.js";
4
- import { Subject as n, BookmarkBorder as o, PrintOutlined as m, OpenInFull as a, FileDownloadOutlined as c } from "@mui/icons-material";
5
- const p = ({}) => /* @__PURE__ */ l(r, { display: "flex", gap: 1, alignItems: "center", children: [
6
- /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(n, { fontSize: "small" }) }),
7
- /* @__PURE__ */ e(i, { orientation: "vertical", flexItem: !0 }),
8
- /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(o, { fontSize: "small" }) }),
9
- /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(m, { fontSize: "small" }) }),
10
- /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(a, { fontSize: "small" }) }),
11
- /* @__PURE__ */ e(i, { orientation: "vertical", flexItem: !0 }),
12
- /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(c, { fontSize: "small" }) })
1
+ import { jsxs as d, jsx as e } from "react/jsx-runtime";
2
+ import { Box as m, Divider as t, Tooltip as i } from "@mui/material";
3
+ import { Button as l } from "../../styled.js";
4
+ import { Subject as a, BookmarkBorder as s, PrintOutlined as f, OpenInFull as u, FileDownloadOutlined as h } from "@mui/icons-material";
5
+ const S = ({
6
+ onBookmark: n,
7
+ onDownload: o,
8
+ onFullScreen: r,
9
+ onPrint: c
10
+ }) => /* @__PURE__ */ d(m, { display: "flex", gap: 1, alignItems: "center", children: [
11
+ /* @__PURE__ */ e(l, { disabled: !0, children: /* @__PURE__ */ e(a, { fontSize: "small" }) }),
12
+ /* @__PURE__ */ e(t, { orientation: "vertical", flexItem: !0 }),
13
+ /* @__PURE__ */ e(i, { title: "Bookmark Document", children: /* @__PURE__ */ e(l, { onClick: n, children: /* @__PURE__ */ e(s, { fontSize: "small" }) }) }),
14
+ /* @__PURE__ */ e(i, { title: "Print", children: /* @__PURE__ */ e(l, { onClick: c, children: /* @__PURE__ */ e(f, { fontSize: "small" }) }) }),
15
+ /* @__PURE__ */ e(i, { title: "Fullscreen", children: /* @__PURE__ */ e(l, { onClick: r, children: /* @__PURE__ */ e(u, { fontSize: "small" }) }) }),
16
+ /* @__PURE__ */ e(t, { orientation: "vertical", flexItem: !0 }),
17
+ /* @__PURE__ */ e(i, { title: "Download", children: /* @__PURE__ */ e(l, { onClick: o, children: /* @__PURE__ */ e(h, { fontSize: "small" }) }) })
13
18
  ] });
14
19
  export {
15
- p as ActionButtons
20
+ S as ActionButtons
16
21
  };
@@ -1,35 +1,38 @@
1
- import { jsx as r, Fragment as a } from "react/jsx-runtime";
2
- import * as o from "react";
3
- import { K as s, T as t, o as m, a as i, l as p, s as d, b as n, E as u, d as f, S as l, _ as c, e as R } from "../../../../txt-U0b7DL6j.js";
4
- import '../../../../assets/index3.css';const w = ({ data: e }) => e ? /* @__PURE__ */ r(
5
- s,
6
- {
7
- documents: [{ uri: window.URL.createObjectURL(e) }],
8
- pluginRenderers: [
9
- t,
10
- m,
11
- i,
12
- p,
13
- d,
14
- n,
15
- u,
16
- f,
17
- l,
18
- c,
19
- R
20
- ],
21
- config: {
22
- header: {
23
- disableHeader: !0
24
- },
25
- pdfZoom: {
26
- defaultZoom: 0.5,
27
- zoomJump: 0.1
28
- },
29
- pdfVerticalScrollByDefault: !0
1
+ import { jsx as e, Fragment as o } from "react/jsx-runtime";
2
+ import * as t from "react";
3
+ import { K as s, T as d, o as f, a as i, l as m, s as n, b as u, E as l, d as p, S as c, _ as w, e as R } from "../../../../txt-U0b7DL6j.js";
4
+ import { Box as S } from "@mui/material";
5
+ import '../../../../assets/index3.css';const T = t.forwardRef(function(r, a) {
6
+ return r.data ? /* @__PURE__ */ e(S, { ref: a, overflow: "auto", children: /* @__PURE__ */ e(
7
+ s,
8
+ {
9
+ documents: [{ uri: window.URL.createObjectURL(r.data) }],
10
+ pluginRenderers: [
11
+ d,
12
+ f,
13
+ i,
14
+ m,
15
+ n,
16
+ u,
17
+ l,
18
+ p,
19
+ c,
20
+ w,
21
+ R
22
+ ],
23
+ config: {
24
+ header: {
25
+ disableHeader: !0
26
+ },
27
+ pdfZoom: {
28
+ defaultZoom: 0.5,
29
+ zoomJump: 0.1
30
+ },
31
+ pdfVerticalScrollByDefault: !0
32
+ }
30
33
  }
31
- }
32
- ) : /* @__PURE__ */ r(a, {}), g = o.memo(w);
34
+ ) }) : /* @__PURE__ */ e(o, {});
35
+ });
33
36
  export {
34
- g as default
37
+ T as default
35
38
  };
@@ -1,19 +1,52 @@
1
- import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
- import { Box as e, AppBar as c, Toolbar as i } from "@mui/material";
3
- import { ActionButtons as d } from "./components/action-buttons/index.js";
4
- import l from "./components/viewer/index.js";
5
- const f = ({
6
- logo: t,
7
- data: n
8
- }) => /* @__PURE__ */ o(e, { bgcolor: "#ededed", children: [
9
- /* @__PURE__ */ r(c, { color: "inherit", children: /* @__PURE__ */ o(i, { sx: { justifyContent: "space-between" }, children: [
10
- /* @__PURE__ */ r(e, { children: t }),
11
- /* @__PURE__ */ r(e, {}),
12
- /* @__PURE__ */ r(e, { children: /* @__PURE__ */ r(d, {}) })
13
- ] }) }),
14
- /* @__PURE__ */ r(i, {}),
15
- /* @__PURE__ */ r(e, { children: /* @__PURE__ */ r(l, { data: n }) })
16
- ] });
1
+ import { jsxs as i, jsx as o, Fragment as h } from "react/jsx-runtime";
2
+ import { Box as n, AppBar as d, Toolbar as l } from "@mui/material";
3
+ import { ActionButtons as c } from "./components/action-buttons/index.js";
4
+ import m from "./components/viewer/index.js";
5
+ import { useDocumentViewerLogic as g } from "./logic.js";
6
+ import { SidePanelToggleButton as s, SidePanel as f } from "./styled.js";
7
+ import { DoubleArrow as u } from "@mui/icons-material";
8
+ const S = (r) => {
9
+ const { refs: a, state: e, action: t } = g(r);
10
+ return /* @__PURE__ */ i(n, { bgcolor: "#ededed", children: [
11
+ /* @__PURE__ */ o(d, { color: "inherit", children: /* @__PURE__ */ i(l, { sx: { justifyContent: "space-between" }, children: [
12
+ /* @__PURE__ */ o(n, { children: r.logo }),
13
+ /* @__PURE__ */ o(n, {}),
14
+ /* @__PURE__ */ o(n, { children: /* @__PURE__ */ o(
15
+ c,
16
+ {
17
+ onBookmark: r.onBookmark,
18
+ onDownload: t.onDownload,
19
+ onFullScreen: t.onFullScreen,
20
+ onPrint: t.onPrint
21
+ }
22
+ ) })
23
+ ] }) }),
24
+ /* @__PURE__ */ o(l, {}),
25
+ /* @__PURE__ */ o(n, { mr: `${e.rightPanelWidth}px`, sx: { transition: "all .3s" }, children: e.blob ? /* @__PURE__ */ o(m, { ref: a.viewer, data: e.blob }) : null }),
26
+ r.rightPanel ? /* @__PURE__ */ i(h, { children: [
27
+ /* @__PURE__ */ o(
28
+ s,
29
+ {
30
+ sx: { right: e.rightPanelWidth },
31
+ onClick: t.toggleRightPanel,
32
+ children: /* @__PURE__ */ o(
33
+ u,
34
+ {
35
+ sx: {
36
+ fontSize: 14,
37
+ transform: `rotate(${e.rightPanelWidth ? 0 : 180}deg)`
38
+ }
39
+ }
40
+ )
41
+ }
42
+ ),
43
+ /* @__PURE__ */ i(f, { width: e.rightPanelWidth, right: 0, children: [
44
+ /* @__PURE__ */ o(l, {}),
45
+ r.rightPanel
46
+ ] })
47
+ ] }) : null
48
+ ] });
49
+ };
17
50
  export {
18
- f as DocumentViewer
51
+ S as DocumentViewer
19
52
  };
@@ -0,0 +1,44 @@
1
+ import { useRef as f, useState as i, useEffect as b } from "react";
2
+ import { b64toBlob as g, printBlob as p, downloadBlob as w } from "./utils.js";
3
+ const D = ({
4
+ data: t,
5
+ title: s,
6
+ rightPanel: c,
7
+ rightPanelWidth: n = 450
8
+ }) => {
9
+ const o = f(null), [e, u] = i();
10
+ b(() => ((async () => {
11
+ const a = await g(t, "application/pdf");
12
+ u(a);
13
+ })(), () => {
14
+ }), [t]);
15
+ const [r, l] = i(
16
+ c ? n : 0
17
+ );
18
+ return {
19
+ refs: {
20
+ viewer: o
21
+ },
22
+ state: {
23
+ blob: e,
24
+ rightPanelWidth: r
25
+ },
26
+ action: {
27
+ onPrint: () => {
28
+ e && p(e);
29
+ },
30
+ onFullScreen: () => {
31
+ o.current && o.current.requestFullscreen();
32
+ },
33
+ onDownload: () => {
34
+ e && w(e, s);
35
+ },
36
+ toggleRightPanel: () => {
37
+ l(r ? 0 : n);
38
+ }
39
+ }
40
+ };
41
+ };
42
+ export {
43
+ D as useDocumentViewerLogic
44
+ };
@@ -1,12 +1,12 @@
1
- import { styled as o, Button as r, alpha as e, InputBase as n } from "@mui/material";
2
- const l = o(r)(({ theme: t }) => ({
1
+ import { styled as o, Button as r, alpha as n, InputBase as e, Box as i } from "@mui/material";
2
+ const a = o(r)(({ theme: t }) => ({
3
3
  color: t.palette.grey[500],
4
4
  minWidth: "auto",
5
5
  "&:hover": {
6
- backgroundColor: e(t.palette.grey[500], 0.15),
6
+ backgroundColor: n(t.palette.grey[500], 0.15),
7
7
  color: t.palette.grey[700]
8
8
  }
9
- })), p = o(n)(() => ({
9
+ })), d = o(e)(() => ({
10
10
  border: "1px solid",
11
11
  borderColor: "#E9E9EA",
12
12
  background: "#F8F8F8",
@@ -15,8 +15,25 @@ const l = o(r)(({ theme: t }) => ({
15
15
  "& .MuiInputBase-input": {
16
16
  textAlign: "center"
17
17
  }
18
- }));
18
+ })), s = o(i)({
19
+ position: "fixed",
20
+ top: 0,
21
+ bottom: 0,
22
+ backgroundColor: "#fff",
23
+ transition: "all .3s",
24
+ overflow: "auto"
25
+ }), p = o(a)({
26
+ position: "fixed",
27
+ top: 75,
28
+ marginRight: 10,
29
+ background: "#fff",
30
+ borderRadius: 4,
31
+ border: "1px solid rgba(0, 0, 0, 0.12)",
32
+ transition: "all .3s"
33
+ });
19
34
  export {
20
- l as Button,
21
- p as Input
35
+ a as Button,
36
+ d as Input,
37
+ s as SidePanel,
38
+ p as SidePanelToggleButton
22
39
  };
@@ -1,4 +1,25 @@
1
- const e = async (b, o = "") => await (await fetch(`data:${o};base64,${b}`)).blob();
1
+ const c = async (t, n = "") => await (await fetch(`data:${n};base64,${t}`)).blob();
2
+ function a(t, n = "file.txt") {
3
+ const e = URL.createObjectURL(t), o = document.createElement("a");
4
+ o.href = e, o.download = n, document.body.appendChild(o), o.dispatchEvent(
5
+ new MouseEvent("click", {
6
+ bubbles: !0,
7
+ cancelable: !0,
8
+ view: window
9
+ })
10
+ ), document.body.removeChild(o);
11
+ }
12
+ const b = (t) => {
13
+ const n = URL.createObjectURL(t), e = document.createElement("iframe");
14
+ document.body.appendChild(e), e.style.display = "none", e.src = n, e.onload = function() {
15
+ setTimeout(function() {
16
+ var o;
17
+ e.focus(), (o = e.contentWindow) == null || o.print();
18
+ }, 1);
19
+ };
20
+ };
2
21
  export {
3
- e as b64toBlob
22
+ c as b64toBlob,
23
+ a as downloadBlob,
24
+ b as printBlob
4
25
  };
package/dist/main.d.ts CHANGED
@@ -209,6 +209,17 @@ declare interface DisseminationListProps {
209
209
  onChange(value: string[]): void;
210
210
  }
211
211
 
212
+ export declare const DocumentViewer: FC<DocumentViewerProps>;
213
+
214
+ declare interface DocumentViewerProps {
215
+ data: string; // Base64
216
+ logo: default_2.ReactNode;
217
+ title: string;
218
+ rightPanel?: default_2.ReactNode;
219
+ rightPanelWidth?: number;
220
+ onBookmark(): void;
221
+ }
222
+
212
223
  declare function encrypt(encryptionKey: any, data: any): Promise<{
213
224
  status: string;
214
225
  data: string;
package/dist/main.js CHANGED
@@ -5,31 +5,32 @@ import { CardAlternate as $t } from "./components/card-alternate/index.js";
5
5
  import { CollapsibleCard as Et } from "./components/collapsible-card/index.js";
6
6
  import { ConditionalWrapper as zt } from "./components/conditional-wrapper/index.js";
7
7
  import { Container as Nt } from "./components/container/index.js";
8
- import { ContextMenu as _t } from "./components/context-menu/index.js";
8
+ import { ContextMenu as Vt } from "./components/context-menu/index.js";
9
9
  import { DateTimePicker as qt } from "./components/date-time-picker/index.js";
10
- import { DisseminationList as Kt } from "./components/data-security-selectors/dissemination-list/index.js";
11
- import { GeometryPicker as Rt } from "./components/geometry-picker/index.js";
12
- import { IconButton as te } from "./components/icon-button/index.js";
13
- import { InstanceForm as re } from "./components/instance-form/index.js";
14
- import { InstanceHierarchyTable as ne } from "./components/instance-hierarchy-table/index.js";
15
- import { InstanceTable as ae } from "./components/instance-table/index.js";
16
- import { KeyProtectionMenu as he } from "./components/key-protection/menu.js";
17
- import { LinearIndicator as ue } from "./components/linear-indicator/index.js";
18
- import { Loading as fe } from "./components/loading/index.js";
19
- import { LocalizationProvider as le } from "@mui/x-date-pickers";
20
- import { PhoneInput as ye } from "./components/phone-input/index.js";
21
- import { SearchInput as De } from "./components/search-input/index.js";
22
- import { SecurityLevel as ge } from "./components/data-security-selectors/security-level/index.js";
23
- import { TemplateForm as Te } from "./components/template-form/index.js";
24
- import { TemplateFilters as we } from "./components/template-filters/index.js";
25
- import { TemplatePropertyFilters as ve } from "./components/template-property-filters/index.js";
26
- import { Property as Se } from "./components/template-property-filters/property.js";
27
- import { TreeSelect as be } from "./components/tree-select/index.js";
28
- import { TreeViewFilter as Fe } from "./components/treeview-filter/index.js";
29
- import { S as Ie } from "./utils-Bq0ye5vf.js";
30
- import { i as je } from "./index-DlnzUkwe.js";
31
- import { b as $e } from "./helpers-DaCoWmi2.js";
32
- import { ThemeProvider as Ee, createTheme as Ue } from "@mui/material";
10
+ import { DocumentViewer as Kt } from "./components/document-viewer/index.js";
11
+ import { DisseminationList as Rt } from "./components/data-security-selectors/dissemination-list/index.js";
12
+ import { GeometryPicker as te } from "./components/geometry-picker/index.js";
13
+ import { IconButton as re } from "./components/icon-button/index.js";
14
+ import { InstanceForm as ne } from "./components/instance-form/index.js";
15
+ import { InstanceHierarchyTable as ae } from "./components/instance-hierarchy-table/index.js";
16
+ import { InstanceTable as he } from "./components/instance-table/index.js";
17
+ import { KeyProtectionMenu as ue } from "./components/key-protection/menu.js";
18
+ import { LinearIndicator as fe } from "./components/linear-indicator/index.js";
19
+ import { Loading as le } from "./components/loading/index.js";
20
+ import { LocalizationProvider as ye } from "@mui/x-date-pickers";
21
+ import { PhoneInput as De } from "./components/phone-input/index.js";
22
+ import { SearchInput as ge } from "./components/search-input/index.js";
23
+ import { SecurityLevel as Te } from "./components/data-security-selectors/security-level/index.js";
24
+ import { TemplateForm as we } from "./components/template-form/index.js";
25
+ import { TemplateFilters as ve } from "./components/template-filters/index.js";
26
+ import { TemplatePropertyFilters as Se } from "./components/template-property-filters/index.js";
27
+ import { Property as be } from "./components/template-property-filters/property.js";
28
+ import { TreeSelect as Fe } from "./components/tree-select/index.js";
29
+ import { TreeViewFilter as Ie } from "./components/treeview-filter/index.js";
30
+ import { S as je } from "./utils-Bq0ye5vf.js";
31
+ import { i as $e } from "./index-DlnzUkwe.js";
32
+ import { b as Ee } from "./helpers-DaCoWmi2.js";
33
+ import { ThemeProvider as ze, createTheme as Ze } from "@mui/material";
33
34
  import { a as dt } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
34
35
  import I from "dayjs";
35
36
  import { h as U, j as z } from "./createTheme-DrgvKMA_.js";
@@ -158,10 +159,10 @@ var et = { exports: {} };
158
159
  w && (y = T[2]), n = this.$locale(), !S && y && (n = d.Ls[y]), this.$d = function(j, B, b, P) {
159
160
  try {
160
161
  if (["x", "X"].indexOf(B) > -1) return new Date((B === "X" ? 1e3 : 1) * j);
161
- var m = F(B)(j), N = m.year, $ = m.month, nt = m.day, ot = m.hours, at = m.minutes, it = m.seconds, ht = m.milliseconds, R = m.zone, X = m.week, J = /* @__PURE__ */ new Date(), _ = nt || (N || $ ? 1 : J.getDate()), V = N || J.getFullYear(), W = 0;
162
+ var m = F(B)(j), N = m.year, $ = m.month, nt = m.day, ot = m.hours, at = m.minutes, it = m.seconds, ht = m.milliseconds, R = m.zone, X = m.week, J = /* @__PURE__ */ new Date(), V = nt || (N || $ ? 1 : J.getDate()), _ = N || J.getFullYear(), W = 0;
162
163
  N && !$ || (W = $ > 0 ? $ - 1 : J.getMonth());
163
164
  var E, q = ot || 0, G = at || 0, K = it || 0, Q = ht || 0;
164
- return R ? new Date(Date.UTC(V, W, _, q, G, K, Q + 60 * R.offset * 1e3)) : b ? new Date(Date.UTC(V, W, _, q, G, K, Q)) : (E = new Date(V, W, _, q, G, K, Q), X && (E = P(E).week(X).toDate()), E);
165
+ return R ? new Date(Date.UTC(_, W, V, q, G, K, Q + 60 * R.offset * 1e3)) : b ? new Date(Date.UTC(_, W, V, q, G, K, Q)) : (E = new Date(_, W, V, q, G, K, Q), X && (E = P(E).week(X).toDate()), E);
165
166
  } catch {
166
167
  return /* @__PURE__ */ new Date("");
167
168
  }
@@ -386,38 +387,39 @@ class St {
386
387
  }
387
388
  export {
388
389
  Ht as Access,
389
- $e as AccessUtils,
390
+ Ee as AccessUtils,
390
391
  St as AdapterDayjs,
391
392
  jt as Card,
392
393
  $t as CardAlternate,
393
394
  Et as CollapsibleCard,
394
395
  zt as ConditionalWrapper,
395
396
  Nt as Container,
396
- _t as ContextMenu,
397
+ Vt as ContextMenu,
397
398
  qt as DateTimePicker,
398
- Kt as DisseminationList,
399
- Rt as GeometryPicker,
400
- te as IconButton,
401
- re as InstanceForm,
402
- ne as InstanceHierarchyTable,
403
- ae as InstanceTable,
404
- Ie as KeyProductionUtils,
405
- he as KeyProtectionMenu,
406
- ue as LinearIndicator,
407
- fe as Loading,
408
- le as LocalizationProvider,
409
- je as Map,
410
- ye as PhoneInput,
411
- Se as PropertyFilterInput,
412
- De as SearchInput,
413
- ge as SecurityLevel,
414
- we as TemplateFilters,
415
- Te as TemplateForm,
416
- ve as TemplatePropertyFilters,
417
- Ee as ThemeProvider,
418
- be as TreeSelect,
419
- Fe as TreeViewFilter,
399
+ Rt as DisseminationList,
400
+ Kt as DocumentViewer,
401
+ te as GeometryPicker,
402
+ re as IconButton,
403
+ ne as InstanceForm,
404
+ ae as InstanceHierarchyTable,
405
+ he as InstanceTable,
406
+ je as KeyProductionUtils,
407
+ ue as KeyProtectionMenu,
408
+ fe as LinearIndicator,
409
+ le as Loading,
410
+ ye as LocalizationProvider,
411
+ $e as Map,
412
+ De as PhoneInput,
413
+ be as PropertyFilterInput,
414
+ ge as SearchInput,
415
+ Te as SecurityLevel,
416
+ ve as TemplateFilters,
417
+ we as TemplateForm,
418
+ Se as TemplatePropertyFilters,
419
+ ze as ThemeProvider,
420
+ Fe as TreeSelect,
421
+ Ie as TreeViewFilter,
420
422
  Bt as alert,
421
423
  It as confirm,
422
- Ue as createTheme
424
+ Ze as createTheme
423
425
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.5.15",
4
+ "version": "1.5.16",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",