@voplus/morpho-document 1.4.141 → 1.4.142
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 +16 -0
- package/es/components/DocumentPanelHeader/index.js +19 -0
- package/es/components/DocumentPanelHeader/index.js.map +1 -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,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DocumentHeaderProps } from "@voplus/morpho-document-core";
|
|
3
|
+
declare const DocumentPanelHeader: {
|
|
4
|
+
(props?: DocumentHeaderProps | undefined): JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
preVisible: boolean;
|
|
7
|
+
quickVisible: boolean;
|
|
8
|
+
tagsVisible: boolean;
|
|
9
|
+
quickDataBarAlign: string;
|
|
10
|
+
clickNameEffect: string;
|
|
11
|
+
autoSaveName: boolean;
|
|
12
|
+
descriptionVisible: boolean;
|
|
13
|
+
quickDataBarVisible: boolean;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default DocumentPanelHeader;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
|
3
|
+
import DocumentHeader from "../DocumentHeader";
|
|
4
|
+
import ToolBar from "../../controls/ToolBar/ToolBar2";
|
|
5
|
+
const DocumentPanelHeader = (props) => {
|
|
6
|
+
return observe(() => React.createElement(DocumentHeader, { ...props, tools: React.createElement(ToolBar, { id: props.id }) }));
|
|
7
|
+
};
|
|
8
|
+
DocumentPanelHeader.defaultProps = {
|
|
9
|
+
preVisible: false,
|
|
10
|
+
quickVisible: false,
|
|
11
|
+
tagsVisible: true,
|
|
12
|
+
quickDataBarAlign: "left",
|
|
13
|
+
clickNameEffect: "edit",
|
|
14
|
+
autoSaveName: true,
|
|
15
|
+
descriptionVisible: false,
|
|
16
|
+
quickDataBarVisible: false,
|
|
17
|
+
};
|
|
18
|
+
export default DocumentPanelHeader;
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/DocumentPanelHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,OAAO,MAAM,iCAAiC,CAAC;AAEtD,MAAM,mBAAmB,GAAG,CAAC,KAA2B,EAAE,EAAE;IAC3D,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,oBAAC,cAAc,OAAK,KAAM,EAAE,KAAK,EAAE,oBAAC,OAAO,IAAC,EAAE,EAAE,KAAM,CAAC,EAAE,GAAI,GAAI,CAAC,CAAC;AACzF,CAAC,CAAC;AAEF,mBAAmB,CAAC,YAAY,GAAG;IAClC,UAAU,EAAE,KAAK;IACjB,YAAY,EAAE,KAAK;IACnB,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,MAAM;IACzB,eAAe,EAAE,MAAM;IACvB,YAAY,EAAE,IAAI;IAClB,kBAAkB,EAAE,KAAK;IACzB,mBAAmB,EAAE,KAAK;CAC1B,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,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAEtF,MAAM,UAAU,GAAG,CAAC,KAA8C,EAAE,EAAE;IACrE,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,iBAAiB,CAAC,KAAK,CAAC,UAAU,CAAC,EAAE;QAClF,KAAK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