@voplus/morpho-document 1.4.141 → 1.4.143
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/components/DocumentPanelHeader/index.d.ts +5 -0
- package/es/components/DocumentPanelHeader/index.js +20 -0
- package/es/components/DocumentPanelHeader/index.js.map +1 -0
- package/es/components/DocumentPanelHeader/index.less +13 -0
- package/es/pages/Signature/Letter/components/LetterMenu.js +12 -5
- package/es/pages/Signature/Letter/components/LetterMenu.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
|
3
|
+
import { faEllipsisVertical } from "@fortawesome/pro-light-svg-icons";
|
|
4
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
5
|
+
import { useDocument } from "@voplus/morpho-document-core";
|
|
6
|
+
import DocumentHeader from "../DocumentHeader";
|
|
7
|
+
import TagView from "../TagView";
|
|
8
|
+
import ToolBar from "../../controls/ToolBar/ToolBar2";
|
|
9
|
+
import styles from './index.less';
|
|
10
|
+
const DocumentPanelHeader = (props) => {
|
|
11
|
+
const document = useDocument(props.id, {
|
|
12
|
+
reload: (d) => !d.tags,
|
|
13
|
+
includes: "tags,versions",
|
|
14
|
+
});
|
|
15
|
+
return observe(() => (React.createElement("div", { className: styles["document-panel-header"] },
|
|
16
|
+
React.createElement(DocumentHeader, { id: props.id, preVisible: false, quickVisible: false, tagsVisible: false, descriptionVisible: false, quickDataBarVisible: false, autoSaveName: true, quickDataBarAlign: "left", clickNameEffect: "edit", tools: React.createElement(ToolBar, { id: props.id, moreProps: { icon: React.createElement(FAIcon, { icon: faEllipsisVertical }) } }) }),
|
|
17
|
+
React.createElement(TagView, { id: props.id, tags: document.tags, editable: !document.readonly }))));
|
|
18
|
+
};
|
|
19
|
+
export default DocumentPanelHeader;
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
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kB,GAAI,EAAE,GAAI,GAC1F;QACF,oBAAC,OAAO,IAAC,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,QAAQ,CAAC,QAAQ,GAAI,CACvE,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -1,30 +1,37 @@
|
|
|
1
|
-
import { Archive, Delete } from "../../../../controls/DocumentMenu/items";
|
|
1
|
+
import { Archive, Delete, Access, Notifications, OpenReferenceView, PrintActivities, } from "../../../../controls/DocumentMenu/items";
|
|
2
2
|
import { useEnvelope } from "../../data/envelope";
|
|
3
3
|
import { faExternalLink, faFileDownload } from "@fortawesome/pro-light-svg-icons";
|
|
4
4
|
import { useDocument, useMetaStore } from "@voplus/morpho-document-core";
|
|
5
5
|
import { Button } from "@voplus/antd";
|
|
6
|
-
import DocumentMenu from "../../../../controls/DocumentMenu";
|
|
7
6
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
8
|
-
import React from "react";
|
|
7
|
+
import React, { useMemo } from "react";
|
|
9
8
|
import { observe } from "@voplus/morpho-ui";
|
|
10
9
|
import { useEnvelopContext } from "../../data/EnvelopeContext";
|
|
11
10
|
import { useLayout } from "@voplus/morpho-data";
|
|
11
|
+
import { DocumentMenuContext, DocumentMenuState } from "@voplus/morpho-document-core";
|
|
12
12
|
const LetterMenu = (props) => {
|
|
13
13
|
const { letter } = props;
|
|
14
|
+
const documentMenuContext = useMemo(() => new DocumentMenuState(props.envelopeId), [
|
|
15
|
+
props.envelopeId,
|
|
16
|
+
]);
|
|
14
17
|
const envelope = useEnvelope(props.envelopeId);
|
|
15
18
|
const document = useDocument(letter.document.id);
|
|
16
19
|
const context = useEnvelopContext();
|
|
17
20
|
const layout = useLayout();
|
|
18
21
|
const meta = useMetaStore();
|
|
19
|
-
return observe(() => (React.createElement(
|
|
22
|
+
return observe(() => (React.createElement(DocumentMenuContext.Provider, { value: documentMenuContext },
|
|
20
23
|
React.createElement(Button, { key: "Open", type: "link", onClick: () => layout.history.push(meta.getRoute(document)) },
|
|
21
24
|
React.createElement(FAIcon, { icon: faExternalLink }),
|
|
22
25
|
React.createElement("span", null, "Open")),
|
|
23
26
|
React.createElement(Button, { key: "Download", type: "link", onClick: () => context.download(letter.id, letter.document.name) },
|
|
24
27
|
React.createElement(FAIcon, { icon: faFileDownload }),
|
|
25
28
|
React.createElement("span", null, "Download")),
|
|
29
|
+
React.createElement(Access, null),
|
|
30
|
+
React.createElement(Notifications, null),
|
|
31
|
+
React.createElement(OpenReferenceView, null),
|
|
26
32
|
React.createElement(Archive, null),
|
|
27
|
-
envelope.envelopeStatus === "Signing" && React.createElement(Delete, null)
|
|
33
|
+
envelope.envelopeStatus === "Signing" && React.createElement(Delete, null),
|
|
34
|
+
React.createElement(PrintActivities, null))));
|
|
28
35
|
};
|
|
29
36
|
export default LetterMenu;
|
|
30
37
|
//# sourceMappingURL=LetterMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LetterMenu.js","sourceRoot":"","sources":["../../../../../src/pages/Signature/Letter/components/LetterMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"LetterMenu.js","sourceRoot":"","sources":["../../../../../src/pages/Signature/Letter/components/LetterMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,OAAO,EACP,MAAM,EACN,MAAM,EACN,aAAa,EACb,iBAAiB,EACjB,eAAe,GACf,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAW,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAEzE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAA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