@voplus/morpho-document 1.0.0-dev282 → 1.0.0-dev289
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 +0 -5
- package/es/components/DocumentDescription/index.js +3 -8
- package/es/components/DocumentDescription/index.js.map +1 -1
- package/es/components/DocumentHeader/index.d.ts +1 -0
- package/es/components/DocumentHeader/index.js +6 -3
- package/es/components/DocumentHeader/index.js.map +1 -1
- package/es/components/DocumentHeader/state.d.ts +2 -0
- package/es/components/DocumentHeader/state.js.map +1 -1
- package/es/components/Links/index.less +111 -111
- package/es/components/QuickViewDialog/index.less +0 -1
- package/es/controls/DataIconBar/index.less +1 -0
- package/es/controls/DescriptionEditor/index.d.ts +2 -4
- package/es/controls/DescriptionEditor/index.js +16 -9
- package/es/controls/DescriptionEditor/index.js.map +1 -1
- package/es/controls/DescriptionEditor/index.less +13 -4
- package/es/controls/DescriptionEditor/state.d.ts +11 -0
- package/es/controls/DescriptionEditor/state.js.map +1 -1
- package/es/controls/DocumentDataIconBar/index.js +2 -3
- package/es/controls/DocumentDataIconBar/index.js.map +1 -1
- package/es/controls/PDFViewer/Toolbar/index.d.ts +1 -2
- package/es/controls/PDFViewer/Toolbar/index.js +2 -2
- package/es/controls/PDFViewer/Toolbar/index.js.map +1 -1
- package/es/controls/data-icons/DescriptionDataIcon/index.d.ts +1 -0
- package/es/controls/data-icons/DescriptionDataIcon/index.js +6 -7
- package/es/controls/data-icons/DescriptionDataIcon/index.js.map +1 -1
- package/es/controls/data-icons/DescriptionDataIcon/index.less +5 -2
- package/es/modules/unit/UnitUIService.d.ts +2 -3
- package/es/modules/unit/UnitUIService.js +1 -5
- package/es/modules/unit/UnitUIService.js.map +1 -1
- package/es/modules/unit/components/ContactUserInfoView/index.d.ts +1 -4
- package/es/modules/unit/components/ContactUserInfoView/index.js +15 -18
- package/es/modules/unit/components/ContactUserInfoView/index.js.map +1 -1
- package/es/modules/unit/components/ContactUserInfoView/index.less +16 -26
- package/es/modules/unit/components/NewUnitForm/index.d.ts +1 -1
- package/es/modules/unit/components/UnitItem/Item.d.ts +0 -1
- package/es/modules/unit/components/UnitItem/Item.js +9 -19
- package/es/modules/unit/components/UnitItem/Item.js.map +1 -1
- package/es/modules/unit/components/UnitItem/index.js +1 -1
- package/es/modules/unit/components/UnitItem/index.js.map +1 -1
- package/es/modules/unit/components/UnitItem/index.less +0 -1
- package/es/modules/unit/components/UnitTabs/index.js +1 -1
- package/es/modules/unit/components/UnitTabs/index.js.map +1 -1
- package/es/modules/unit/data/hooks/index.d.ts +0 -1
- package/es/modules/unit/data/hooks/index.js +0 -1
- package/es/modules/unit/data/hooks/index.js.map +1 -1
- package/es/pages/Library/LibraryDefaultView/Content.js +4 -6
- package/es/pages/Library/LibraryDefaultView/Content.js.map +1 -1
- package/es/pages/Page/PageDefaultView/index.js +4 -5
- package/es/pages/Page/PageDefaultView/index.js.map +1 -1
- package/es/pages/Signature/Envelope/EnvelopeDefaultView/index.js +1 -1
- package/es/pages/Signature/Envelope/EnvelopeDefaultView/index.js.map +1 -1
- package/es/pages/Signature/Letter/LetterContentView/index.js +4 -5
- package/es/pages/Signature/Letter/LetterContentView/index.js.map +1 -1
- package/es/pages/Signature/Letter/LetterViewer/index.js +2 -6
- package/es/pages/Signature/Letter/LetterViewer/index.js.map +1 -1
- package/es/pages/VSubmit/VSubmitDefaultView/index.d.ts +0 -1
- package/es/pages/VSubmit/VSubmitDefaultView/index.js +12 -16
- package/es/pages/VSubmit/VSubmitDefaultView/index.js.map +1 -1
- package/es/pages/VSubmit/VSubmitDefaultView/index.less +5 -12
- package/es/pages/VSubmit/VSubmitSubmitterView/index.js +4 -7
- package/es/pages/VSubmit/VSubmitSubmitterView/index.js.map +1 -1
- package/es/pages/VSubmit/VSubmitSubmitterView/index.less +3 -0
- package/es/pages/VSubmit/components/DocumentIcon/index.less +6 -6
- package/es/pages/VSubmit/components/DocumentIconList/index.d.ts +5 -0
- package/es/pages/VSubmit/components/DocumentIconList/index.js +2 -2
- package/es/pages/VSubmit/components/DocumentIconList/index.js.map +1 -1
- package/es/pages/VSubmit/components/EmailRecipients/index.js +22 -7
- package/es/pages/VSubmit/components/EmailRecipients/index.js.map +1 -1
- package/es/pages/VSubmit/components/EmailRecipients/index.less +14 -0
- package/es/pages/VSubmit/components/EmailRecipients/state.d.ts +2 -0
- package/es/pages/VSubmit/components/EmailRecipients/state.js +5 -0
- package/es/pages/VSubmit/components/EmailRecipients/state.js.map +1 -1
- package/es/pages/VSubmit/components/SubmitSections/SectionItem/index.d.ts +4 -0
- package/es/pages/VSubmit/components/SubmitSections/SectionItem/index.js +22 -20
- package/es/pages/VSubmit/components/SubmitSections/SectionItem/index.js.map +1 -1
- package/es/pages/VSubmit/components/SubmitSections/SectionItem/index.less +48 -12
- package/es/pages/VSubmit/components/SubmitSections/SectionItem/state.d.ts +4 -4
- package/es/pages/VSubmit/components/SubmitSections/SectionItem/state.js +6 -6
- package/es/pages/VSubmit/components/SubmitSections/SectionItem/state.js.map +1 -1
- package/es/pages/VSubmit/components/SubmitSections/index.js +14 -7
- package/es/pages/VSubmit/components/SubmitSections/index.js.map +1 -1
- package/es/pages/VSubmit/components/SubmitSections/index.less +0 -11
- package/package.json +5 -4
- package/es/modules/unit/components/UnitQuickView/QuickSubTab/index.d.ts +0 -15
- package/es/modules/unit/components/UnitQuickView/QuickSubTab/index.js +0 -50
- package/es/modules/unit/components/UnitQuickView/QuickSubTab/index.js.map +0 -1
- package/es/modules/unit/components/UnitQuickView/QuickSubTab/index.less +0 -22
- package/es/modules/unit/components/UnitQuickView/index.d.ts +0 -9
- package/es/modules/unit/components/UnitQuickView/index.js +0 -30
- package/es/modules/unit/components/UnitQuickView/index.js.map +0 -1
- package/es/modules/unit/components/UnitQuickView/index.less +0 -63
- package/es/modules/unit/components/UnitQuickView/state.d.ts +0 -8
- package/es/modules/unit/components/UnitQuickView/state.js +0 -26
- package/es/modules/unit/components/UnitQuickView/state.js.map +0 -1
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import "./index.less";
|
|
2
1
|
import { Archive, Reload, Sidebar } from "../../../controls/ToolBar/buttons";
|
|
3
2
|
import React, { useEffect, useState } from "react";
|
|
4
3
|
import { useDocumentStore } from "@voplus/morpho-document-core";
|
|
5
4
|
import AsideContent from "@voplus/morpho-ui/es/components/layout/AsideContent";
|
|
5
|
+
import DescriptionEditor from "../../../controls/DescriptionEditor";
|
|
6
6
|
import DocumentHeader from "../../../components/DocumentHeader";
|
|
7
7
|
import DocumentIconList from "../components/DocumentIconList";
|
|
8
8
|
import DocumentTabs from "../../../components/DocumentTabs";
|
|
9
9
|
import EmailRecipients from "../components/EmailRecipients";
|
|
10
|
-
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
11
|
-
import RichTextEditor from "@voplus/morpho-ui/es/controls/RichTextEditor";
|
|
12
10
|
import { Scrollbars } from "react-custom-scrollbars";
|
|
13
11
|
import { Skeleton } from "@voplus/antd";
|
|
14
12
|
import { State } from "./state";
|
|
15
13
|
import SubmitSections from "../components/SubmitSections";
|
|
16
14
|
import ToolBar from "../../../controls/ToolBar/ToolBar2";
|
|
17
|
-
import
|
|
15
|
+
import styles from "./index.less";
|
|
18
16
|
import { useObserver } from "mobx-react-lite";
|
|
19
17
|
import { useParams } from "react-router";
|
|
20
18
|
import { useVSubmit } from "../data";
|
|
@@ -31,18 +29,16 @@ const VSubmitDefaultView = () => {
|
|
|
31
29
|
const AsideElement = (React.createElement("div", { className: "page-default-view_aside" },
|
|
32
30
|
React.createElement(DocumentTabs, { id: id, docTab: false })));
|
|
33
31
|
return useObserver(() => (React.createElement(AsideContent, { context: asideContext },
|
|
34
|
-
React.createElement("div", { className: "vsubmit-defaul-view" },
|
|
35
|
-
React.createElement("
|
|
36
|
-
|
|
37
|
-
React.createElement(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
React.createElement(
|
|
44
|
-
React.createElement(FAIcon, { icon: faEdit }),
|
|
45
|
-
"Add Description")), content: vsubmit.description || "", onSave: v => documentStore.edit(id, { Description: v }) })))),
|
|
32
|
+
React.createElement("div", { className: styles["vsubmit-defaul-view"] },
|
|
33
|
+
React.createElement(DocumentHeader, { id: id, size: "h2", tools: React.createElement(React.Fragment, null,
|
|
34
|
+
React.createElement(ToolBar, { id: id },
|
|
35
|
+
React.createElement(Reload, { action: onReLoad }),
|
|
36
|
+
React.createElement(Sidebar, { action: () => asideContext.asideContent
|
|
37
|
+
? asideContext.closeAside()
|
|
38
|
+
: asideContext.openAside(AsideElement, { span: 12 }) }),
|
|
39
|
+
React.createElement(Archive, null))) }),
|
|
40
|
+
vsubmit.loading ? (React.createElement("div", { className: "submit-description" },
|
|
41
|
+
React.createElement(Skeleton, { active: true }))) : (React.createElement(DescriptionEditor, { id: id, description: vsubmit.description, readonly: vsubmit.readonly, padding: "0 0 0.75rem 0" })),
|
|
46
42
|
vsubmit.loading || !state.reload ? (React.createElement("div", { style: { padding: "0 20px" } },
|
|
47
43
|
React.createElement(Skeleton, { active: true }))) : (React.createElement(Scrollbars, null,
|
|
48
44
|
React.createElement(EmailRecipients, null),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/pages/VSubmit/VSubmitDefaultView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/pages/VSubmit/VSubmitDefaultView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAe,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAE7E,OAAO,YAAY,MAAM,qDAAqD,CAAC;AAC/E,OAAO,iBAAiB,M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AAU;gBACV,oBAAC,eAAe,OAAG;gBACnB,oBAAC,gBAAgB,IAAC,EAAE,EAAE,OAAO,CAAC,aAAa,EAAE,QAAQ,EAAE,KAAK,GAAI;gBAChE,oBAAC,cAAc,IAAC,EAAE,EAAE,EAAE,GAAI,CACd,CACb,CACI,CACQ,CACf,CAAC,CAAC;IAEH,kBAAkB;IAClB,SAAS,QAAQ;QAChB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC;QACrB,UAAU,CAAC,GAAG,EAAE;YACf,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;QACrB,CAAC,EAAE,GAAG,CAAC,CAAC;IACT,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
:
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: column;
|
|
8
|
-
background-color: #f5f5f5;
|
|
9
|
-
> header {
|
|
10
|
-
box-shadow: 2px 2px 5px #e8e8e8;
|
|
11
|
-
background-color: @component-background;
|
|
12
|
-
}
|
|
1
|
+
.vsubmit-defaul-view {
|
|
2
|
+
height: 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
:global{
|
|
13
6
|
.submit-description {
|
|
14
7
|
padding: 0 20px 10px 20px;
|
|
15
8
|
}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import "./index.less";
|
|
2
2
|
import { useDocumentStore } from "@voplus/morpho-document-core";
|
|
3
3
|
import ChatView from "@voplus/morpho-collaboration/es/components/Comment";
|
|
4
|
+
import DescriptionEditor from "../../../controls/DescriptionEditor";
|
|
4
5
|
import DocumentHeader from "../../../components/DocumentHeader";
|
|
5
6
|
import DocumentIconList from "../components/DocumentIconList";
|
|
6
|
-
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
7
7
|
import MainContent from "@voplus/morpho-ui/es/components/layout/MainContent";
|
|
8
8
|
import React from "react";
|
|
9
|
-
import RichTextEditor from "@voplus/morpho-ui/es/controls/RichTextEditor";
|
|
10
9
|
import { Scrollbars } from "react-custom-scrollbars";
|
|
11
10
|
import { Skeleton } from "@voplus/antd";
|
|
12
11
|
import SubmitSections from "../components/SubmitSections";
|
|
13
|
-
import { faEdit } from "@fortawesome/pro-light-svg-icons";
|
|
14
12
|
import { useObserver } from "mobx-react-lite";
|
|
15
13
|
import { useRouteMatch } from "react-router";
|
|
16
14
|
import { useVSubmit } from "../data";
|
|
@@ -22,10 +20,9 @@ const VSubmitSubmitterView = () => {
|
|
|
22
20
|
return useObserver(() => (React.createElement(MainContent, { className: "v-submit-submitter-view" },
|
|
23
21
|
React.createElement("div", { className: "v-submit-submitter_content" },
|
|
24
22
|
React.createElement("header", null,
|
|
25
|
-
React.createElement(DocumentHeader, { id: id, size: "h2" }),
|
|
26
|
-
React.createElement("div", { className: "submitter-description" },
|
|
27
|
-
|
|
28
|
-
"Add Description")), content: submitter.description || "", onSave: v => documentStore.edit(id, { Description: v }) })))),
|
|
23
|
+
React.createElement(DocumentHeader, { id: id, size: "h2", toolsVisible: false }),
|
|
24
|
+
submitter.loading ? (React.createElement("div", { className: "submitter-description" },
|
|
25
|
+
React.createElement(Skeleton, { active: true }))) : (React.createElement(DescriptionEditor, { id: id, description: submitter.description, readonly: true, padding: "0 0 0.75rem 0" }))),
|
|
29
26
|
submitter.loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement(Scrollbars, { autoHide: true },
|
|
30
27
|
React.createElement(DocumentIconList, { id: submitter.attachmentsId, upload: true }),
|
|
31
28
|
React.createElement(SubmitSections, { id: id, readonly: true })))),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/pages/VSubmit/VSubmitSubmitterView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAe,gBAAgB,EAAE,MA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E,EAAE,IAAI,EAAC,IAAI,EAAC,YAAY,EAAE,KAAK,GAAI;gBAExD,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CACpB,6BAAK,SAAS,EAAC,uBAAuB;oBACrC,oBAAC,QAAQ,IAAC,MAAM,SAAG,CACd,CACN,CAAC,CAAC,CAAC,CACH,oBAAC,iBAAiB,IACjB,EAAE,EAAE,EAAE,EACN,WAAW,EAAE,SAAS,CAAC,WAAW,EAClC,QAAQ,EAAE,IAAI,EACd,OAAO,EAAC,eAAe,GACtB,CACF,CACO;YACR,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CACpB,oBAAC,QAAQ,IAAC,MAAM,SAAG,CACnB,CAAC,CAAC,CAAC,CACH,oBAAC,UAAU,IAAC,QAAQ;gBACnB,oBAAC,gBAAgB,IAAC,EAAE,EAAE,SAAS,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,GAAI;gBAC/D,oBAAC,cAAc,IAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,SAAG,CACvB,CACb,CACI;QACN,iCACE,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CACpB,oBAAC,QAAQ,IAAC,MAAM,SAAG,CACnB,CAAC,CAAC,CAAC,CACH,oBAAC,QAAQ,IAAC,SAAS,EAAE,SAAS,CAAC,SAAS,IAAI,EAAE,GAAI,CAClD,CACI,CACO,CACd,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -9,16 +9,16 @@
|
|
|
9
9
|
padding: 0 10px;
|
|
10
10
|
}
|
|
11
11
|
.document-icon-small {
|
|
12
|
-
font-size:
|
|
13
|
-
line-height:
|
|
12
|
+
font-size: 22px;
|
|
13
|
+
line-height: 22px;
|
|
14
14
|
}
|
|
15
15
|
.document-icon-normal {
|
|
16
|
-
font-size:
|
|
17
|
-
line-height:
|
|
16
|
+
font-size: 32px;
|
|
17
|
+
line-height: 32px;
|
|
18
18
|
}
|
|
19
19
|
.document-icon-large {
|
|
20
|
-
font-size:
|
|
21
|
-
line-height:
|
|
20
|
+
font-size: 44px;
|
|
21
|
+
line-height: 44px;
|
|
22
22
|
}
|
|
23
23
|
.document-icon-name {
|
|
24
24
|
position: relative;
|
|
@@ -3,9 +3,14 @@ import "./index.less";
|
|
|
3
3
|
declare const DocumentIconList: {
|
|
4
4
|
(props: {
|
|
5
5
|
id: string;
|
|
6
|
+
/** can download */
|
|
6
7
|
download?: boolean;
|
|
8
|
+
/** can upload */
|
|
7
9
|
upload?: boolean;
|
|
10
|
+
/** visible header */
|
|
8
11
|
header?: boolean;
|
|
12
|
+
/** size of icon */
|
|
13
|
+
size?: "small" | "normal" | "large";
|
|
9
14
|
}): JSX.Element;
|
|
10
15
|
defaultProps: {
|
|
11
16
|
upload: boolean;
|
|
@@ -11,7 +11,7 @@ import { useDocumentStore } from "@voplus/morpho-document-core";
|
|
|
11
11
|
import { useFileStore } from "../../../../data/FileStore/FileStore";
|
|
12
12
|
import { useObserver } from "mobx-react-lite";
|
|
13
13
|
const DocumentIconList = (props) => {
|
|
14
|
-
const { id, download, upload, header } = props;
|
|
14
|
+
const { id, download, upload, header, size } = props;
|
|
15
15
|
const [state] = useState(new State());
|
|
16
16
|
const { user } = useApplicationContext();
|
|
17
17
|
const store = useDocumentStore();
|
|
@@ -30,7 +30,7 @@ const DocumentIconList = (props) => {
|
|
|
30
30
|
React.createElement("div", { className: "attachments-cards" },
|
|
31
31
|
React.createElement(Upload.Dragger, { action: `https://${store.endpoint.host}/api/files/${props.id}`, headers: {
|
|
32
32
|
Authorization: `Bearer ${user.info.accessToken}`
|
|
33
|
-
}, fileList: state.fileList, showUploadList: state.fileList.length > 0, onChange: onUploading, disabled: !upload, openFileDialogOnClick: false, multiple: true }, !!(state.list && state.list.length) ? (state.list.map(d => React.createElement(DocumentIcon, { key: d.id, id: d.id }))) : upload ? (React.createElement("div", { className: "ant-upload-hint" },
|
|
33
|
+
}, fileList: state.fileList, showUploadList: state.fileList.length > 0, onChange: onUploading, disabled: !upload, openFileDialogOnClick: false, multiple: true }, !!(state.list && state.list.length) ? (state.list.map(d => React.createElement(DocumentIcon, { key: d.id, id: d.id, size: size }))) : upload ? (React.createElement("div", { className: "ant-upload-hint" },
|
|
34
34
|
React.createElement(FAIcon, { icon: faUpload }),
|
|
35
35
|
"Drag file to this area to upload")) : (React.createElement(Empty, { image: Empty.PRESENTED_IMAGE_SIMPLE })))))));
|
|
36
36
|
/** download file */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/pages/VSubmit/components/DocumentIconList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,kCAAkC,CAAC;AAExE,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,gBAAgB,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/pages/VSubmit/components/DocumentIconList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,MA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select } from "@voplus/antd";
|
|
2
3
|
import { useUnitListEffect } from "../../../../modules/unit/data";
|
|
3
4
|
import React, { useEffect, useState } from "react";
|
|
4
|
-
import {
|
|
5
|
+
import { faAt } from "@fortawesome/pro-light-svg-icons";
|
|
6
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
5
7
|
import { State } from "./state";
|
|
6
8
|
import { useObserver } from "mobx-react-lite";
|
|
7
9
|
const EmailRecipients = (props) => {
|
|
@@ -16,11 +18,19 @@ const EmailRecipients = (props) => {
|
|
|
16
18
|
}, [submitters]);
|
|
17
19
|
return useObserver(() => (React.createElement("div", { className: "email-recipients" },
|
|
18
20
|
React.createElement("div", { className: "email-recipients-title" }, "Submitters"),
|
|
19
|
-
|
|
20
|
-
i.name,
|
|
21
|
-
i.email && React.createElement("span", { style: { color: "#7f7f7f" } }, "<" + i.email + ">")))))) : !!(submitters && submitters.length) ? (React.createElement("div", { className: "recipients-list" }, submitters.map((sub, index) => (React.createElement("span", { key: sub.id, className: "recipient-item" },
|
|
21
|
+
!!(state.recipients && state.recipients.length) && (React.createElement("div", { className: "recipients-list", onClick: () => (state.editable = !readonly) }, state.recipients.map((sub, index) => (React.createElement("span", { key: sub.id, className: "recipient-item" },
|
|
22
22
|
sub.name,
|
|
23
|
-
sub.email && React.createElement("span", { style: { color: "#7f7f7f" } }, "<" + sub.email + ">;"))))))
|
|
23
|
+
sub.email && React.createElement("span", { style: { color: "#7f7f7f" } }, "<" + sub.email + ">;")))))),
|
|
24
|
+
!state.editable && !(submitters && submitters.length) && (React.createElement("div", { className: "recipients-tip", onClick: () => (state.editable = !readonly) }, !readonly ? (React.createElement(React.Fragment, null,
|
|
25
|
+
React.createElement(FAIcon, { icon: faAt }),
|
|
26
|
+
"Submitter")) : ("No Submitter"))),
|
|
27
|
+
!readonly && state.editable && (React.createElement("div", null,
|
|
28
|
+
React.createElement(Select, { autoFocus: true, value: state.ids, mode: "multiple", showSearch: true, placeholder: "Input or select Unit.", filterOption: filterItems, onSelect: onSelect, onDeselect: onDeselect, style: { width: "100%" } }, state.list.map(i => (React.createElement(Select.Option, { key: i.id, value: i.id, title: i.email },
|
|
29
|
+
i.name,
|
|
30
|
+
i.email && React.createElement("span", { style: { color: "#7f7f7f" } }, "<" + i.email + ">"))))),
|
|
31
|
+
React.createElement("div", { className: "email-recipients-footer" },
|
|
32
|
+
React.createElement(Button, { type: "default", onClick: close }, "Close"),
|
|
33
|
+
React.createElement(Button, { type: "primary", onClick: confirm }, "Ok")))))));
|
|
24
34
|
/** 搜索units(必须有email)或直接輸入email地址, */
|
|
25
35
|
function filterItems(input, option) {
|
|
26
36
|
return (option.title || option.children[0])
|
|
@@ -32,16 +42,21 @@ const EmailRecipients = (props) => {
|
|
|
32
42
|
const contact = state.list.find(x => x.id === id);
|
|
33
43
|
if (contact)
|
|
34
44
|
state.recipients.push(contact);
|
|
35
|
-
if (onChange)
|
|
36
|
-
onChange(state.recipients);
|
|
37
45
|
}
|
|
38
46
|
// remove a selection
|
|
39
47
|
function onDeselect(value) {
|
|
40
48
|
const index = state.recipients.findIndex(x => x.id === value);
|
|
41
49
|
if (index !== -1)
|
|
42
50
|
state.recipients.splice(index, 1);
|
|
51
|
+
}
|
|
52
|
+
function confirm() {
|
|
43
53
|
if (onChange)
|
|
44
54
|
onChange(state.recipients);
|
|
55
|
+
state.editable = false;
|
|
56
|
+
}
|
|
57
|
+
function close() {
|
|
58
|
+
state.editable = false;
|
|
59
|
+
state.recipients = submitters || [];
|
|
45
60
|
}
|
|
46
61
|
};
|
|
47
62
|
export default EmailRecipients;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/pages/VSubmit/components/EmailRecipients/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAS,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ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,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,KAAK,CAAC,CAAC;QAC9D,IAAI,KAAK,KAAK,CAAC,CAAC;YAAE,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;IACrD,CAAC;IACD,SAAS,OAAO;QACf,IAAI,QAAQ;YAAE,QAAQ,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QACzC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;IACD,SAAS,KAAK;QACb,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC;QACvB,KAAK,CAAC,UAAU,GAAG,UAAU,IAAI,EAAE,CAAC;IACrC,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -23,5 +23,19 @@
|
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
|
+
.email-recipients-footer {
|
|
27
|
+
padding-top: 10px;
|
|
28
|
+
text-align: right;
|
|
29
|
+
.ant-btn + .ant-btn {
|
|
30
|
+
margin-left: 10px;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
.recipients-tip {
|
|
34
|
+
padding-top: 10px;
|
|
35
|
+
color: #999;
|
|
36
|
+
.svg-inline--fa {
|
|
37
|
+
margin-right: 5px;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
26
40
|
}
|
|
27
41
|
}
|
|
@@ -6,6 +6,8 @@ export class State {
|
|
|
6
6
|
this.list = [];
|
|
7
7
|
/** contact */
|
|
8
8
|
this.recipients = [];
|
|
9
|
+
/** edit model */
|
|
10
|
+
this.editable = false;
|
|
9
11
|
}
|
|
10
12
|
get ids() {
|
|
11
13
|
return this.recipients.map(r => r.id);
|
|
@@ -17,6 +19,9 @@ __decorate([
|
|
|
17
19
|
__decorate([
|
|
18
20
|
observable
|
|
19
21
|
], State.prototype, "recipients", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
observable
|
|
24
|
+
], State.prototype, "editable", void 0);
|
|
20
25
|
__decorate([
|
|
21
26
|
computed
|
|
22
27
|
], State.prototype, "ids", null);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/pages/VSubmit/components/EmailRecipients/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAI5C,MAAM,OAAO,KAAK;IAAlB;QACC,sBAAsB;QACH,SAAI,GAAY,EAAE,CAAC;QACtC,eAAe;QACI,eAAU,GAAY,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/pages/VSubmit/components/EmailRecipients/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAI5C,MAAM,OAAO,KAAK;IAAlB;QACC,sBAAsB;QACH,SAAI,GAAY,EAAE,CAAC;QACtC,eAAe;QACI,eAAU,GAAY,EAAE,CAAC;QAC5C,iBAAiB;QACE,aAAQ,GAAG,KAAK,CAAC;IAMrC,CAAC;IAHA,IAAW,GAAG;QACb,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC;CACD;AAVY;IAAX,UAAU;mCAA2B;AAE1B;IAAX,UAAU;yCAAiC;AAEhC;IAAX,UAAU;uCAAyB;AAGpC;IADC,QAAQ;gCAGR"}
|
|
@@ -3,8 +3,12 @@ import "./index.less";
|
|
|
3
3
|
declare const SectionItem: (props: {
|
|
4
4
|
/** section item id */
|
|
5
5
|
id: string;
|
|
6
|
+
/** section item index */
|
|
7
|
+
index: number;
|
|
6
8
|
/** is readonly */
|
|
7
9
|
readonly?: boolean;
|
|
10
|
+
/** is multiple */
|
|
11
|
+
multiple?: boolean;
|
|
8
12
|
connectDragSource?: any;
|
|
9
13
|
}) => JSX.Element;
|
|
10
14
|
export default SectionItem;
|
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
import "./index.less";
|
|
2
|
-
import {
|
|
2
|
+
import { Checkbox, Skeleton } from "@voplus/antd";
|
|
3
3
|
import React, { useState } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { useDocument
|
|
4
|
+
import { faAngleRight, faBars } from "@fortawesome/pro-light-svg-icons";
|
|
5
|
+
import { useDocument } from "@voplus/morpho-document-core";
|
|
6
|
+
import DescriptionEditor from "../../../../../controls/DescriptionEditor";
|
|
6
7
|
import DocumentHeader from "../../../../../components/DocumentHeader";
|
|
7
8
|
import DocumentList from "../../../../../components/DocumentList";
|
|
8
9
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
9
|
-
import RichTextEditor from "@voplus/morpho-ui/es/controls/RichTextEditor";
|
|
10
10
|
import { State } from "./state";
|
|
11
|
-
import
|
|
11
|
+
import classnames from "classnames";
|
|
12
12
|
import { useObserver } from "mobx-react-lite";
|
|
13
13
|
const SectionItem = (props) => {
|
|
14
|
-
const { id, readonly, connectDragSource } = props;
|
|
14
|
+
const { id, index, readonly, multiple, connectDragSource } = props;
|
|
15
15
|
const [state] = useState(new State());
|
|
16
16
|
const doc = useDocument(id);
|
|
17
|
-
const documentStore = useDocumentStore();
|
|
18
17
|
state.isDescription = readonly && !doc.description ? false : true;
|
|
19
18
|
return useObserver(() => (React.createElement("div", { className: "section-item" },
|
|
20
|
-
React.createElement(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
19
|
+
React.createElement("div", { className: "section-item-header", onMouseLeave: () => (state.isHover = false), onMouseOver: () => (state.isHover = true) },
|
|
20
|
+
multiple && React.createElement(Checkbox, { value: id, className: "select-checkbox" }),
|
|
21
|
+
!multiple &&
|
|
22
|
+
!readonly &&
|
|
23
|
+
connectDragSource &&
|
|
24
|
+
connectDragSource(React.createElement("span", { className: classnames("sort-icon-move") },
|
|
25
|
+
React.createElement(FAIcon, { icon: faBars, color: "#222" }))),
|
|
26
|
+
React.createElement("span", { className: classnames("section-item-index", { show: multiple || readonly }) }, (index || 0) + 1 + "."),
|
|
27
|
+
React.createElement(DocumentHeader, { id: id, size: "h4",
|
|
28
|
+
// quickDataBarVisible={false}
|
|
29
|
+
toolsVisible: state.isHover && !readonly }),
|
|
30
|
+
React.createElement("span", { onClick: () => (state.foldable = !state.foldable), className: classnames("collapse-arrow", { "collapse-active": !state.foldable }) },
|
|
31
|
+
React.createElement(FAIcon, { icon: faAngleRight }))),
|
|
32
|
+
state.foldable && (React.createElement(React.Fragment, null,
|
|
33
|
+
doc.loading ? (React.createElement("div", { className: "submit-description" },
|
|
34
|
+
React.createElement(Skeleton, { active: true }))) : (state.isDescription && (React.createElement(DescriptionEditor, { id: id, description: doc.description, readonly: doc.readonly, padding: "0 0 0.75rem 0" }))),
|
|
29
35
|
React.createElement(DocumentList, { id: id, multiple: true, header: false, className: "section-document" }))))));
|
|
30
|
-
/** change item collapse */
|
|
31
|
-
function changeCollapse() {
|
|
32
|
-
state.collapse = !state.collapse;
|
|
33
|
-
}
|
|
34
36
|
};
|
|
35
37
|
export default SectionItem;
|
|
36
38
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/pages/VSubmit/components/SubmitSections/SectionItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/pages/VSubmit/components/SubmitSections/SectionItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,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AAE,KAAK,EAAE,SAAS,EAAC,kBAAkB,GAAG,CAC7D,CACjB,CACI,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -3,20 +3,56 @@
|
|
|
3
3
|
flex: 1;
|
|
4
4
|
overflow: hidden;
|
|
5
5
|
position: relative;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
&:after {
|
|
7
|
+
position: absolute;
|
|
8
|
+
content: "";
|
|
9
|
+
left: 20px;
|
|
10
|
+
bottom: 0;
|
|
11
|
+
right: 20px;
|
|
12
|
+
border-bottom: 1px solid #d9d9d9;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.section-item-header {
|
|
16
|
+
display: flex;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
padding: 0 10px 0 20px;
|
|
19
|
+
&:hover .sort-icon-move,
|
|
20
|
+
&:hover .section-item-index.show {
|
|
21
|
+
display: flex;
|
|
22
|
+
}
|
|
23
|
+
&:hover .section-item-index {
|
|
24
|
+
display: none;
|
|
25
|
+
}
|
|
26
|
+
.sort-icon-move {
|
|
27
|
+
display: none;
|
|
28
|
+
align-items: center;
|
|
29
|
+
cursor: move;
|
|
30
|
+
}
|
|
31
|
+
.section-item-index {
|
|
32
|
+
display: flex;
|
|
33
|
+
font-size: 16px;
|
|
34
|
+
align-items: center;
|
|
35
|
+
}
|
|
36
|
+
.document-header-default {
|
|
37
|
+
flex: 1;
|
|
38
|
+
}
|
|
39
|
+
.collapse-arrow {
|
|
40
|
+
display: flex;
|
|
41
|
+
font-size: 20px;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
transition: transform 0.24s;
|
|
45
|
+
padding: 10px;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
&.collapse-active {
|
|
48
|
+
transform: rotate(90deg);
|
|
18
49
|
}
|
|
19
50
|
}
|
|
51
|
+
.select-checkbox{
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
margin-right: 15px;
|
|
55
|
+
}
|
|
20
56
|
}
|
|
21
57
|
.section-document {
|
|
22
58
|
height: 300px;
|
|
@@ -4,10 +4,10 @@ export class State {
|
|
|
4
4
|
constructor() {
|
|
5
5
|
/** 是否显示 Description*/
|
|
6
6
|
this.isDescription = false;
|
|
7
|
-
/**
|
|
8
|
-
this.
|
|
9
|
-
/**
|
|
10
|
-
this.
|
|
7
|
+
/** */
|
|
8
|
+
this.isHover = false;
|
|
9
|
+
/** 折叠的,展开,收成 */
|
|
10
|
+
this.foldable = false;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
__decorate([
|
|
@@ -15,8 +15,8 @@ __decorate([
|
|
|
15
15
|
], State.prototype, "isDescription", void 0);
|
|
16
16
|
__decorate([
|
|
17
17
|
observable
|
|
18
|
-
], State.prototype, "
|
|
18
|
+
], State.prototype, "isHover", void 0);
|
|
19
19
|
__decorate([
|
|
20
20
|
observable
|
|
21
|
-
], State.prototype, "
|
|
21
|
+
], State.prototype, "foldable", void 0);
|
|
22
22
|
//# sourceMappingURL=state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../../src/pages/VSubmit/components/SubmitSections/SectionItem/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAoB,UAAU,EAAE,MAAM,MAAM,CAAC;AAEpD,MAAM,OAAO,KAAK;IAAlB;QACC,sBAAsB;QACH,kBAAa,GAAG,KAAK,CAAC;QACzC,
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../../src/pages/VSubmit/components/SubmitSections/SectionItem/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAoB,UAAU,EAAE,MAAM,MAAM,CAAC;AAEpD,MAAM,OAAO,KAAK;IAAlB;QACC,sBAAsB;QACH,kBAAa,GAAG,KAAK,CAAC;QACzC,OAAO;QACY,YAAO,GAAG,KAAK,CAAC;QACnC,gBAAgB;QACG,aAAQ,GAAG,KAAK,CAAC;IACrC,CAAC;CAAA;AALY;IAAX,UAAU;4CAA8B;AAE7B;IAAX,UAAU;sCAAwB;AAEvB;IAAX,UAAU;uCAAyB"}
|