@voplus/morpho-document 1.0.0-dev299 → 1.0.0-dev301
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/changelog.md +4 -0
- package/es/components/DocumentHeader/index.js +3 -2
- package/es/components/DocumentHeader/index.js.map +1 -1
- package/es/components/Links/Item.js +6 -2
- package/es/components/Links/Item.js.map +1 -1
- package/es/controls/DescriptionEditor/index.d.ts +6 -1
- package/es/controls/DescriptionEditor/index.js +24 -6
- package/es/controls/DescriptionEditor/index.js.map +1 -1
- package/es/controls/DescriptionEditor/index.less +20 -1
- package/es/controls/DescriptionEditor/state.d.ts +6 -0
- package/es/controls/DescriptionEditor/state.js +10 -0
- package/es/controls/DescriptionEditor/state.js.map +1 -1
- package/es/controls/PDFViewer/index.js +2 -2
- package/es/controls/PDFViewer/index.js.map +1 -1
- package/es/controls/ToolBar/buttons/Versions.js +7 -4
- package/es/controls/ToolBar/buttons/Versions.js.map +1 -1
- package/es/pages/Page/PageDefaultView/index.js +3 -4
- package/es/pages/Page/PageDefaultView/index.js.map +1 -1
- package/es/pages/Page/PageItem/index.js +2 -7
- package/es/pages/Page/PageItem/index.js.map +1 -1
- package/es/pages/Signature/Envelope/EnvelopeRecipientView/index.js +9 -5
- package/es/pages/Signature/Envelope/EnvelopeRecipientView/index.js.map +1 -1
- package/es/pages/Signature/Letter/LetterContentView/index.js +32 -42
- package/es/pages/Signature/Letter/LetterContentView/index.js.map +1 -1
- package/es/pages/Signature/Letter/LetterContentView/index.less +18 -13
- package/es/pages/Signature/Letter/LetterItem/index.js +24 -5
- package/es/pages/Signature/Letter/LetterItem/index.js.map +1 -1
- package/es/pages/Signature/Letter/LetterItem/index.less +8 -1
- package/es/pages/Signature/Letter/LetterList/index.js +7 -9
- package/es/pages/Signature/Letter/LetterList/index.js.map +1 -1
- package/es/pages/Signature/Letter/LetterViewer/index.less +0 -3
- package/es/pages/Signature/SignatureDialog/index.js +7 -5
- package/es/pages/Signature/SignatureDialog/index.js.map +1 -1
- package/es/pages/Signature/SignatureRecipient/index.d.ts +12 -0
- package/es/pages/Signature/SignatureRecipient/index.js +38 -0
- package/es/pages/Signature/SignatureRecipient/index.js.map +1 -0
- package/es/pages/Signature/SignatureRecipient/index.less +18 -0
- package/es/pages/Signature/SignatureRecipient/state.d.ts +9 -0
- package/es/pages/Signature/SignatureRecipient/state.js +20 -0
- package/es/pages/Signature/SignatureRecipient/state.js.map +1 -0
- package/es/pages/Signature/data/envelope/EnvelopeStore.d.ts +1 -1
- package/es/pages/VSubmit/components/DocumentIcon/index.less +2 -1
- package/es/pages/VSubmit/components/DocumentIconList/index.less +1 -1
- package/es/pages/VSubmit/components/SubmitSections/SectionItem/index.less +0 -26
- package/es/pages/VSubmit/components/SubmitSections/SubmitterSectionItem/index.d.ts +9 -0
- package/es/pages/VSubmit/components/SubmitSections/SubmitterSectionItem/index.js +38 -0
- package/es/pages/VSubmit/components/SubmitSections/SubmitterSectionItem/index.js.map +1 -0
- package/es/pages/VSubmit/components/SubmitSections/SubmitterSectionItem/index.less +16 -0
- package/es/pages/VSubmit/components/SubmitSections/index.js +8 -4
- package/es/pages/VSubmit/components/SubmitSections/index.js.map +1 -1
- package/es/pages/VSubmit/components/SubmitSections/index.less +32 -8
- package/package.json +3 -3
|
@@ -1,66 +1,52 @@
|
|
|
1
1
|
import "./index.less";
|
|
2
|
-
import { Button, Popover,
|
|
3
|
-
import {
|
|
4
|
-
import React, {
|
|
2
|
+
import { Button, Popover, Spin, Tooltip } from "@voplus/antd";
|
|
3
|
+
import { useEnvelopeStore } from "../../data/envelope";
|
|
4
|
+
import React, { useState } from "react";
|
|
5
5
|
import { Zoom, ZoomIn, ZoomOut } from "../../../../controls/PDFViewer/Toolbar/buttons";
|
|
6
6
|
import { faDownload, faFileSignature } from "@fortawesome/pro-light-svg-icons";
|
|
7
|
-
import DescriptionEditor from "../../../../controls/DescriptionEditor";
|
|
8
|
-
import DocumentCardList from "../../../../components/DocumentCardList";
|
|
9
|
-
import DocumentHeader from "../../../../components/DocumentHeader";
|
|
10
7
|
import DocumentTabs from "../../../../components/DocumentTabs";
|
|
11
8
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
12
9
|
import FileViewer from "../../../../components/FileViewer";
|
|
10
|
+
import { LoadingOutlined } from "@ant-design/icons";
|
|
13
11
|
import { MenuUnfoldOutlined } from "@ant-design/icons";
|
|
14
12
|
import PDFFileViewer from "../../../../components/FileViewer/PDF";
|
|
15
|
-
import
|
|
13
|
+
import SignatureRecipient from "../../SignatureRecipient";
|
|
16
14
|
import TextEditor from "@voplus/morpho-text/es/components/TextEditor2";
|
|
17
15
|
import Toolbar from "../../../../controls/PDFViewer/Toolbar";
|
|
18
16
|
import classnames from "classnames";
|
|
19
17
|
import { saveAs } from "file-saver";
|
|
20
|
-
import { toJS } from "mobx";
|
|
21
|
-
import { useDocumentStore } from "@voplus/morpho-document-core";
|
|
22
18
|
import { useEnvelopContext } from "../../data/EnvelopeContext";
|
|
23
19
|
import { useFile } from "../../../../data";
|
|
24
20
|
import { useObserver } from "mobx-react-lite";
|
|
25
21
|
const LetterContentView = (props) => {
|
|
26
22
|
const { id, envelopeId, letter } = props;
|
|
27
|
-
const
|
|
28
|
-
const doc = useFile(id);
|
|
29
|
-
const documentStore = useDocumentStore();
|
|
23
|
+
const doc = useFile(id, { reload: true });
|
|
30
24
|
const envelopeStore = useEnvelopeStore();
|
|
31
25
|
const context = useEnvelopContext();
|
|
32
26
|
const [visible, setVisible] = useState(false);
|
|
33
27
|
const [menuVisible, setMenuVisible] = useState(false);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
React.createElement("div", { className: classnames("letter-content-card", { "letter-content-card_menu": menuVisible }) },
|
|
57
|
-
React.createElement(DocumentTabs, { id: id, docTab: false }),
|
|
58
|
-
id !== envelopeId ? (context.loading ? (React.createElement(Skeleton, { active: true })) : (renderViewer())) : (React.createElement(DocumentCardList, { id: id, cardProps: { headerProps: { clickNameEffect: "nothing" } }, onCardDoubleClick: props.onOpen })
|
|
59
|
-
// <Empty description="No Content" image={Empty.PRESENTED_IMAGE_SIMPLE} />
|
|
60
|
-
)),
|
|
61
|
-
React.createElement(Tooltip, { title: "Document Tabs" },
|
|
62
|
-
React.createElement(Button, { shape: "circle", type: "primary", size: "large", ghost: true, className: "tablets-visible", onClick: () => setMenuVisible(!menuVisible) },
|
|
63
|
-
React.createElement(MenuUnfoldOutlined, null))))));
|
|
28
|
+
return useObserver(() => {
|
|
29
|
+
var _a;
|
|
30
|
+
return (React.createElement("div", { className: "letter-content-view" },
|
|
31
|
+
React.createElement("div", { className: classnames("letter-content-card", { "letter-content-card_menu": menuVisible }) },
|
|
32
|
+
React.createElement(DocumentTabs, { id: id, docTab: false }),
|
|
33
|
+
(doc === null || doc === void 0 ? void 0 : doc.loading) ? (React.createElement("div", { style: { textAlign: "center" } },
|
|
34
|
+
React.createElement(Spin, { tip: "Loading...", indicator: React.createElement(LoadingOutlined, { style: { fontSize: 24 }, spin: true }) }))) : (React.createElement(React.Fragment, null, (doc === null || doc === void 0 ? void 0 : doc.type) === "Text" ? (React.createElement(TextEditor, { id: id, proseMirrorProps: { readonly: true } })) : /^application\/(msword|(vnd\.(ms-|openxmlformats-).*))$/gim.test(doc === null || doc === void 0 ? void 0 : doc.mimetype) || ((_a = doc === null || doc === void 0 ? void 0 : doc.name) === null || _a === void 0 ? void 0 : _a.includes(".wopitest")) ? (React.createElement(PDFFileViewer, { id: id, download: getBlob, viewerProps: {
|
|
35
|
+
toolbar: !!((letter === null || letter === void 0 ? void 0 : letter.signatureLines) && (letter === null || letter === void 0 ? void 0 : letter.signatureLines.length)) ? (React.createElement(Toolbar, { className: "letter-pdf-viewer-toolbar" },
|
|
36
|
+
React.createElement(ZoomOut, null),
|
|
37
|
+
React.createElement(Zoom, null),
|
|
38
|
+
React.createElement(ZoomIn, null),
|
|
39
|
+
React.createElement(Popover, { title: "Sign List", visible: !context.signVisible && visible, onVisibleChange: visible => setVisible(visible), overlayClassName: "signature-recipient_popover", content: React.createElement(SignatureRecipient, { envelopeId: envelopeId, letterId: (letter === null || letter === void 0 ? void 0 : letter.id) || "", lines: (letter === null || letter === void 0 ? void 0 : letter.signatureLines) || [] }) },
|
|
40
|
+
React.createElement("span", { className: "letter-viewer-btn" },
|
|
41
|
+
React.createElement(FAIcon, { icon: faFileSignature }),
|
|
42
|
+
" Sign")),
|
|
43
|
+
React.createElement(Tooltip, { title: "Download" },
|
|
44
|
+
React.createElement(FAIcon, { icon: faDownload, className: "letter-download-btn", onClick: onDownLoad })))) : ("")
|
|
45
|
+
} })) : (React.createElement(FileViewer, { id: id }))))),
|
|
46
|
+
React.createElement(Tooltip, { title: "Document Tabs" },
|
|
47
|
+
React.createElement(Button, { shape: "circle", type: "primary", size: "large", ghost: true, className: "tablets-visible", onClick: () => setMenuVisible(!menuVisible) },
|
|
48
|
+
React.createElement(MenuUnfoldOutlined, null)))));
|
|
49
|
+
});
|
|
64
50
|
// downLoad file
|
|
65
51
|
function onDownLoad() {
|
|
66
52
|
if (!letter)
|
|
@@ -74,6 +60,10 @@ const LetterContentView = (props) => {
|
|
|
74
60
|
}
|
|
75
61
|
});
|
|
76
62
|
}
|
|
63
|
+
/** pdf 文件流 */
|
|
64
|
+
async function getBlob() {
|
|
65
|
+
return await envelopeStore.download(envelopeId, (letter === null || letter === void 0 ? void 0 : letter.id) || "");
|
|
66
|
+
}
|
|
77
67
|
};
|
|
78
68
|
export default LetterContentView;
|
|
79
69
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/pages/Signature/Letter/LetterContentView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,MAAM,EAAS,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/pages/Signature/Letter/LetterContentView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,MAAM,EAAS,OAAO,EAAY,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,EAAwB,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,gDAAgD,CAAC;AACvF,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAK/E,OAAO,YAAY,MAAM,qCAAqC,CAAC;AAC/D,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,UAAU,MAAM,mCAAmC,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,aAAa,MAAM,uCAAuC,CAAC;AAClE,OAAO,kBAAkB,MAAM,0BAA0B,CAAC;AAC1D,OAAO,UAAU,MAAM,+CAA+C,CAAC;AACvE,OAAO,OAAO,MAAM,wCAAwC,CAAC;AAC7D,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,WAAW,EA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
|
.letter-content-view {
|
|
3
4
|
display: flex;
|
|
@@ -16,31 +17,30 @@
|
|
|
16
17
|
padding: 0 20px 10px 20px;
|
|
17
18
|
}
|
|
18
19
|
.letter-content-card {
|
|
19
|
-
margin:
|
|
20
|
+
margin: 0;
|
|
20
21
|
flex: 1;
|
|
21
|
-
> div {
|
|
22
|
-
|
|
23
|
-
}
|
|
22
|
+
// > div {
|
|
23
|
+
// height: 100%;
|
|
24
|
+
// }
|
|
24
25
|
.letter-pdf-viewer-toolbar {
|
|
25
26
|
position: relative;
|
|
26
27
|
|
|
27
|
-
.letter-viewer-btn
|
|
28
|
+
.letter-viewer-btn {
|
|
29
|
+
margin-left: 10px;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
}
|
|
28
32
|
.letter-download-btn {
|
|
29
33
|
position: absolute;
|
|
30
34
|
top: 50%;
|
|
35
|
+
right: 10px;
|
|
31
36
|
margin-top: -9px;
|
|
32
37
|
font-size: 18px;
|
|
33
38
|
line-height: 19px;
|
|
34
|
-
|
|
35
39
|
cursor: pointer;
|
|
36
40
|
}
|
|
37
|
-
.letter-viewer-btn
|
|
38
|
-
|
|
39
|
-
color:
|
|
40
|
-
}
|
|
41
|
-
.letter-download-btn {
|
|
42
|
-
right: 40px;
|
|
43
|
-
color: #777;
|
|
41
|
+
.letter-viewer-btn:hover,
|
|
42
|
+
.letter-download-btn:hover {
|
|
43
|
+
color: @primary-color;
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
.ant-tabs {
|
|
@@ -57,4 +57,9 @@
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
+
.signature-recipient_popover {
|
|
61
|
+
.ant-popover-inner-content {
|
|
62
|
+
padding: 0;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
60
65
|
}
|
|
@@ -1,27 +1,46 @@
|
|
|
1
1
|
import "./index.less";
|
|
2
|
+
import { Button, Switch } from "@voplus/antd";
|
|
2
3
|
import { useEnvelopeStore } from "../../data/envelope";
|
|
3
4
|
import React, { useState } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { faCheck, faTimes } from "@fortawesome/pro-light-svg-icons";
|
|
5
|
+
import { faCheck, faExternalLink, faFileSignature, faTimes } from "@fortawesome/pro-light-svg-icons";
|
|
6
6
|
import DocumentHeader from "../../../../components/DocumentHeader";
|
|
7
7
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
8
8
|
import LetterViewer from "../LetterViewer";
|
|
9
9
|
import { State } from "./state";
|
|
10
|
+
import ToolBar from "../../../../controls/ToolBar/ToolBar2";
|
|
11
|
+
import { useDocument } from "@voplus/morpho-document-core";
|
|
12
|
+
import { useLayout } from "@voplus/morpho-data";
|
|
13
|
+
import { useMetaStore } from "../../../../data/DocumentMetaStore";
|
|
10
14
|
import { useObserver } from "mobx-react-lite";
|
|
11
15
|
const LetterItem = (props) => {
|
|
12
16
|
const { envelopeId, letter, size, recipient, onClick } = props;
|
|
13
17
|
const envelopStore = useEnvelopeStore();
|
|
14
18
|
const [state] = useState(new State());
|
|
19
|
+
const layout = useLayout();
|
|
20
|
+
const document = useDocument(letter.document.id, {
|
|
21
|
+
reload: d => !d.tags,
|
|
22
|
+
includes: "tags,versions"
|
|
23
|
+
});
|
|
24
|
+
const meta = useMetaStore();
|
|
25
|
+
const unsigned = letter.signatureLines.some(({ signatureDate }) => !signatureDate);
|
|
15
26
|
return useObserver(() => (React.createElement(React.Fragment, null,
|
|
16
27
|
React.createElement("div", { className: "letter-item" },
|
|
17
|
-
letter.document && (React.createElement(DocumentHeader, { id: letter.document.id, size: size, quickDataBarAlign: recipient ? "title" : "left", quickVisible: false, quickDataBar: React.createElement(React.Fragment, null,
|
|
28
|
+
letter.document && (React.createElement(DocumentHeader, { id: letter.document.id, size: size, quickDataBarAlign: recipient ? "title" : "left", quickVisible: false, flagVisible: !recipient, statusVisible: !recipient, pre: recipient ? (React.createElement(React.Fragment, null, unsigned ? (React.createElement(FAIcon, { icon: faFileSignature, color: "#faad14" })) : (React.createElement(FAIcon, { icon: faCheck, color: "#52c41a" })))) : (""), quickDataBarVisible: !recipient, quickDataBar: React.createElement(React.Fragment, null,
|
|
18
29
|
React.createElement("span", { className: "data-icon" },
|
|
19
30
|
React.createElement(FAIcon, { icon: faTimes, color: "#ff4d4f" }),
|
|
20
31
|
" 10 Unsigned"),
|
|
21
32
|
React.createElement("span", { className: "data-icon" },
|
|
22
33
|
React.createElement(FAIcon, { icon: faCheck, color: "#52c41a" }),
|
|
23
|
-
" 23 signed")), toolsVisible:
|
|
24
|
-
!recipient && React.createElement(
|
|
34
|
+
" 23 signed")), toolsVisible: false, onClickName: () => (recipient ? null : (state.visible = true)) })),
|
|
35
|
+
!recipient && (React.createElement("div", { className: "letter-item-right" },
|
|
36
|
+
React.createElement(ToolBar, { id: letter.document.id, menuProps: {
|
|
37
|
+
menuItems: [
|
|
38
|
+
React.createElement(Button, { key: "Open", type: "link", onClick: () => layout.history.push(meta.getRoute(document)) },
|
|
39
|
+
React.createElement(FAIcon, { icon: faExternalLink }),
|
|
40
|
+
React.createElement("span", null, "Open"))
|
|
41
|
+
]
|
|
42
|
+
} }),
|
|
43
|
+
React.createElement(Switch, { checked: letter.public, onChange: onChange })))),
|
|
25
44
|
state.visible && (React.createElement(LetterViewer, { envelopeId: envelopeId, letter: letter, updateVisible: visible => (state.visible = visible) })))));
|
|
26
45
|
/** change public */
|
|
27
46
|
function onChange(checked) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/pages/Signature/Letter/LetterItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/pages/Signature/Letter/LetterItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAGtB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAW,MAAM,cAAc,CAAC;AACvD,OAA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header-default {
|
|
8
8
|
display: block;
|
|
9
9
|
flex: 1;
|
|
@@ -13,5 +13,12 @@
|
|
|
13
13
|
padding: 5px 0;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
+
.letter-item-right {
|
|
17
|
+
text-align: right;
|
|
18
|
+
.tool-bar {
|
|
19
|
+
display: block;
|
|
20
|
+
margin-bottom: 5px;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
16
23
|
}
|
|
17
24
|
}
|
|
@@ -33,15 +33,13 @@ const LetterList = (props) => {
|
|
|
33
33
|
}) },
|
|
34
34
|
React.createElement(Dragger, { action: `https://${store.endpoint.host}/api/files/${props.id}`, headers: {
|
|
35
35
|
Authorization: `Bearer ${user.info.accessToken}`
|
|
36
|
-
}, fileList: fileList, showUploadList: fileList.length > 0, onChange: onUploading, openFileDialogOnClick: false, multiple: true }, !!((_b = context.letters) === null || _b === void 0 ? void 0 : _b.length) ? (React.createElement(Scrollbars, { autoHide: true }, (_c = context.letters) === null || _c === void 0 ? void 0 : _c.map(letter => (React.createElement(Card, { key: letter.id, padding: "0", className: "letter-item-card" },
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}, onClick: () => onClick(letter.document.id) },
|
|
44
|
-
React.createElement(LetterItem, { envelopeId: id, letter: letter, size: size, recipient: recipient }))))))) : (React.createElement("div", { className: "letter-empty" },
|
|
36
|
+
}, fileList: fileList, showUploadList: fileList.length > 0, onChange: onUploading, openFileDialogOnClick: false, multiple: true }, !!((_b = context.letters) === null || _b === void 0 ? void 0 : _b.length) ? (React.createElement(Scrollbars, { autoHide: true }, (_c = context.letters) === null || _c === void 0 ? void 0 : _c.map(letter => (React.createElement(Card, { key: letter.id, padding: "0", className: "letter-item-card" }, recipient ? (React.createElement(DocumentItemFrame, { key: letter.id, frameProps: {
|
|
37
|
+
active: activeId === letter.document.id,
|
|
38
|
+
activeEffect: "border",
|
|
39
|
+
borderProps: { location: "right", color: "#2d85dc ", size: "2px" },
|
|
40
|
+
hoverEffect: "none"
|
|
41
|
+
}, onClick: () => onClick(letter.document.id) },
|
|
42
|
+
React.createElement(LetterItem, { envelopeId: id, letter: letter, size: size, recipient: true }))) : (React.createElement(LetterItem, { envelopeId: id, letter: letter, size: size }))))))) : (React.createElement("div", { className: "letter-empty" },
|
|
45
43
|
React.createElement(CloudUploadOutlined, { style: { fontSize: "40px" } }),
|
|
46
44
|
React.createElement("p", null, "Drag file to upload"))))));
|
|
47
45
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/pages/Signature/Letter/LetterList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAA4B,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAC7F,OAAO,EAAW,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,iBAAiB,MAAM,wCAAwC,CAAC;AACvE,OAAO,OAAO,MAAM,gCAAgC,CAAC;AACrD,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,UAAU,GAAG,CAAC,KAQnB,EAAE,EAAE;IACJ,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAEtC,MAAM,EAAE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AA0B,CACrB,CACN,CACQ,CACL,CACN,CAAA;KAAA,CAAC,CAAC;IACH,sBAAsB;IACtB,SAAS,WAAW,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAgD;QACpF,gBAAgB;QAChB,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC;QACvD,yDAAyD;QACzD,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC,EAAE;YAClD,OAAO,CAAC,MAAM,EAAE,CAAC;SACjB;IACF,CAAC;IACD,SAAS,OAAO,CAAC,EAAU;QAC1B,WAAW,CAAC,EAAE,CAAC,CAAC;QAChB,IAAI,KAAK,CAAC,OAAO;YAAE,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;IACtC,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -29,12 +29,14 @@ const SignatureDialog = (props) => {
|
|
|
29
29
|
clear();
|
|
30
30
|
}
|
|
31
31
|
/** upload signature image */
|
|
32
|
-
|
|
32
|
+
function inset() {
|
|
33
33
|
setLoading(true);
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
sigPad.getTrimmedCanvas().toBlob(async (blob) => {
|
|
35
|
+
await envelopStore.signature(envelopeId, letterId, signature.id, blob);
|
|
36
|
+
setLoading(false);
|
|
37
|
+
closeSignature();
|
|
38
|
+
context.reload();
|
|
39
|
+
});
|
|
38
40
|
}
|
|
39
41
|
};
|
|
40
42
|
export default SignatureDialog;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/pages/Signature/SignatureDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,MAAM,EAAE,KAAK,E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D,MAAM,YAAY,CAAC,SAAS,CAAC,UAAU,EAAE,QAAQ,EAAE,SAAS,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC;YACvE,UAAU,CAAC,KAAK,CAAC,CAAC;YAClB,cAAc,EAAE,CAAC;YACjB,OAAO,CAAC,MAAM,EAAE,CAAC;QAClB,CAAC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "./index.less";
|
|
3
|
+
import { ISignatureLine } from "../data/envelope";
|
|
4
|
+
declare const SignatureRecipient: (props: {
|
|
5
|
+
/** id of envelope */
|
|
6
|
+
envelopeId: string;
|
|
7
|
+
/** id of letter of envelope */
|
|
8
|
+
letterId: string;
|
|
9
|
+
/** lines of signature of letter of envelope */
|
|
10
|
+
lines: ISignatureLine[];
|
|
11
|
+
}) => JSX.Element;
|
|
12
|
+
export default SignatureRecipient;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import "./index.less";
|
|
2
|
+
import { Button, Popover, Skeleton, Table } from "@voplus/antd";
|
|
3
|
+
import { useEnvelopeStore } from "../data/envelope";
|
|
4
|
+
import React, { useState } from "react";
|
|
5
|
+
import { faCheck, faFileSignature } from "@fortawesome/pro-duotone-svg-icons";
|
|
6
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
7
|
+
import SignatureDialog from "../SignatureDialog";
|
|
8
|
+
import { State } from "./state";
|
|
9
|
+
import { faCommentAltLines } from "@fortawesome/pro-light-svg-icons";
|
|
10
|
+
import { useEnvelopContext } from "../data/EnvelopeContext";
|
|
11
|
+
import { useObserver } from "mobx-react-lite";
|
|
12
|
+
const SignatureRecipient = (props) => {
|
|
13
|
+
const { envelopeId, letterId, lines } = props;
|
|
14
|
+
const envelopStore = useEnvelopeStore();
|
|
15
|
+
const context = useEnvelopContext();
|
|
16
|
+
const [state] = useState(new State());
|
|
17
|
+
return useObserver(() => (React.createElement(React.Fragment, null,
|
|
18
|
+
context.loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement(Table, { dataSource: lines, pagination: false, rowKey: "id", showHeader: false, className: "signature-recipient" },
|
|
19
|
+
React.createElement(Table.Column, { title: "", dataIndex: "name", render: (text, record) => (React.createElement("div", null,
|
|
20
|
+
record.name,
|
|
21
|
+
record.description ? (lines.length > 1 ? (React.createElement(Popover, { placement: "bottom", title: "Description", content: record.description },
|
|
22
|
+
React.createElement("span", { className: "signature-description" },
|
|
23
|
+
React.createElement(FAIcon, { icon: faCommentAltLines })))) : (React.createElement(React.Fragment, null,
|
|
24
|
+
React.createElement("h4", null,
|
|
25
|
+
React.createElement(FAIcon, { icon: faCommentAltLines }),
|
|
26
|
+
" Description"),
|
|
27
|
+
React.createElement("div", null, record.description)))) : null)) }),
|
|
28
|
+
React.createElement(Table.Column, { title: "", dataIndex: "status", align: "right", width: "116px", render: (text, record) => record.signatureDate ? (React.createElement(FAIcon, { icon: faCheck, color: "#52c41a" })) : (React.createElement(Button, { type: "primary", size: "small", onClick: () => {
|
|
29
|
+
state.signature = record;
|
|
30
|
+
context.signVisible = true;
|
|
31
|
+
// context.signVisible(true);
|
|
32
|
+
} },
|
|
33
|
+
React.createElement(FAIcon, { icon: faFileSignature, className: "signature-icon" }),
|
|
34
|
+
" Sign")) }))),
|
|
35
|
+
context.signVisible && (React.createElement(SignatureDialog, { envelopeId: envelopeId, letterId: letterId, signature: state.signature })))));
|
|
36
|
+
};
|
|
37
|
+
export default SignatureRecipient;
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/pages/Signature/SignatureRecipient/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,MAAM,EAAS,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,cAAc,C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C,eAAe,IAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,GAAI,CAC3F,CACe,CACjB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
:global {
|
|
2
|
+
.signature-recipient {
|
|
3
|
+
.ant-table-thead > tr > th,
|
|
4
|
+
.ant-table-tbody > tr > td {
|
|
5
|
+
padding: 10px 20px;
|
|
6
|
+
}
|
|
7
|
+
.signature-description {
|
|
8
|
+
margin-left: 10px;
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
}
|
|
11
|
+
h4 {
|
|
12
|
+
margin: 5px 0;
|
|
13
|
+
}
|
|
14
|
+
.signature-icon {
|
|
15
|
+
margin-right: 5px;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { observable } from "mobx";
|
|
3
|
+
export class State {
|
|
4
|
+
constructor() {
|
|
5
|
+
/** visible of SignatureDialog */
|
|
6
|
+
this.visible = false;
|
|
7
|
+
/** id of hover of table row */
|
|
8
|
+
this.hoverKey = "";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
__decorate([
|
|
12
|
+
observable
|
|
13
|
+
], State.prototype, "visible", void 0);
|
|
14
|
+
__decorate([
|
|
15
|
+
observable
|
|
16
|
+
], State.prototype, "signature", void 0);
|
|
17
|
+
__decorate([
|
|
18
|
+
observable
|
|
19
|
+
], State.prototype, "hoverKey", void 0);
|
|
20
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/pages/Signature/SignatureRecipient/state.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,OAAO,KAAK;IAAlB;QACC,iCAAiC;QACd,YAAO,GAAG,KAAK,CAAC;QAGnC,gCAAgC;QACb,aAAQ,GAAG,EAAE,CAAC;IAClC,CAAC;CAAA;AALY;IAAX,UAAU;sCAAwB;AAEvB;IAAX,UAAU;wCAAkC;AAEjC;IAAX,UAAU;uCAAsB"}
|
|
@@ -7,7 +7,7 @@ export declare class EnvelopeStore extends DocumentTypeStore<IEnvelope, LoadDocu
|
|
|
7
7
|
readonly name: string;
|
|
8
8
|
constructor(endpoint: ApiEndPoint, documents: DocumentStore);
|
|
9
9
|
/** upload signature image */
|
|
10
|
-
signature(id: string, letterId: string, signatureId: string, file:
|
|
10
|
+
signature(id: string, letterId: string, signatureId: string, file: Blob): Promise<void>;
|
|
11
11
|
/** word 转 pdf / download url */
|
|
12
12
|
download(id: string, letterId: string): Promise<Blob>;
|
|
13
13
|
}
|
|
@@ -12,31 +12,5 @@
|
|
|
12
12
|
right: 20px;
|
|
13
13
|
border-bottom: 1px solid #d9d9d9;
|
|
14
14
|
}
|
|
15
|
-
.document-header-default {
|
|
16
|
-
padding: 10px 20px;
|
|
17
|
-
background-color: transparent;
|
|
18
|
-
.document-pre {
|
|
19
|
-
width: 28px;
|
|
20
|
-
margin-right: 0 !important;
|
|
21
|
-
> div {
|
|
22
|
-
margin-right: 0.5rem;
|
|
23
|
-
}
|
|
24
|
-
.page-move {
|
|
25
|
-
color: #000;
|
|
26
|
-
cursor: move;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
.section-document {
|
|
31
|
-
height: 280px;
|
|
32
|
-
}
|
|
33
|
-
.section-item-tools{
|
|
34
|
-
display: inline-block;
|
|
35
|
-
margin-right: 8px;
|
|
36
|
-
}
|
|
37
|
-
.collapse-arrow{
|
|
38
|
-
display: flex;
|
|
39
|
-
align-items: center;
|
|
40
|
-
}
|
|
41
15
|
}
|
|
42
16
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import "./index.less";
|
|
2
|
+
import { Button, Skeleton, Tooltip } from "@voplus/antd";
|
|
3
|
+
import React, { useState } from "react";
|
|
4
|
+
import { faChevronDown, faChevronUp } from "@fortawesome/pro-light-svg-icons";
|
|
5
|
+
import { Card } from "@voplus/morpho-ui";
|
|
6
|
+
import DescriptionEditor from "../../../../../controls/DescriptionEditor";
|
|
7
|
+
import DocumentHeader from "../../../../../components/DocumentHeader";
|
|
8
|
+
import DocumentList from "../../../../../components/DocumentList";
|
|
9
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
10
|
+
import ToolBar from "../../../../../controls/ToolBar/ToolBar2";
|
|
11
|
+
import classnames from "classnames";
|
|
12
|
+
import { useDocument } from "@voplus/morpho-document-core";
|
|
13
|
+
import { useObserver } from "mobx-react-lite";
|
|
14
|
+
const SubmitterSectionItem = (props) => {
|
|
15
|
+
const { id, index } = props;
|
|
16
|
+
const [over, setOver] = useState(false);
|
|
17
|
+
const [collapse, setCollapse] = useState(false);
|
|
18
|
+
const doc = useDocument(id);
|
|
19
|
+
return useObserver(() => (React.createElement(Card, { className: classnames("sections-item-card", {
|
|
20
|
+
"sections-item-card_zero": index === 0
|
|
21
|
+
}) },
|
|
22
|
+
React.createElement("div", { className: "section-item-content" },
|
|
23
|
+
React.createElement(DocumentHeader, { id: id, size: "h3", clickNameEffect: "nothing", autoSaveName: true, quickDataBarVisible: false, tagsVisible: false, flagVisible: false, onMouse: o => setOver(o), tools: React.createElement("div", { style: { visibility: over ? "visible" : "hidden" }, className: "section-item-tools" },
|
|
24
|
+
React.createElement(ToolBar, { id: id, menuProps: { size: "middle" }, showMenu: false },
|
|
25
|
+
React.createElement(Tooltip, { title: collapse ? "Expand" : "Collapse" },
|
|
26
|
+
React.createElement(Button, { size: "middle", shape: "circle", onClick: changeCollapse },
|
|
27
|
+
React.createElement(FAIcon, { icon: collapse ? faChevronDown : faChevronUp }))))) }),
|
|
28
|
+
!collapse && (React.createElement(React.Fragment, null,
|
|
29
|
+
doc.loading ? (React.createElement("div", { className: "submit-description" },
|
|
30
|
+
React.createElement(Skeleton, { active: true }))) : (React.createElement(React.Fragment, null, doc.description && (React.createElement(DescriptionEditor, { id: id, description: doc.description, readonly: true, padding: "0 0 0.75rem 0" })))),
|
|
31
|
+
React.createElement(DocumentList, { id: id, multiple: true, header: false, className: "section-document" })))))));
|
|
32
|
+
/** change item collapse */
|
|
33
|
+
function changeCollapse() {
|
|
34
|
+
setCollapse(!collapse);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
export default SubmitterSectionItem;
|
|
38
|
+
//# sourceMappingURL=index.js.map
|