@voplus/morpho-document 1.0.0-dev275 → 1.0.0-dev278
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 +1 -0
- package/es/components/ActivityLog/ActivityLog2/index.d.ts +6 -1
- package/es/components/ActivityLog/ActivityLog2/index.js +6 -4
- package/es/components/ActivityLog/ActivityLog2/index.js.map +1 -1
- package/es/components/ActivityLog/ActivityLog2/index.less +5 -29
- package/es/components/DocumentCard/index.js +1 -1
- package/es/components/DocumentCard/index.js.map +1 -1
- package/es/components/DocumentHeader/index.js +1 -1
- package/es/components/DocumentHeader/index.js.map +1 -1
- package/es/components/DocumentItem/index.js +1 -1
- package/es/components/DocumentItem/index.js.map +1 -1
- package/es/components/DocumentList/index.js +3 -3
- package/es/components/DocumentList/index.js.map +1 -1
- package/es/components/DocumentList/index.less +3 -0
- package/es/components/DocumentQuickViewDialog/index.js +1 -4
- package/es/components/DocumentQuickViewDialog/index.js.map +1 -1
- package/es/components/DocumentTabs/index.d.ts +2 -0
- package/es/components/DocumentTabs/index.js +4 -3
- package/es/components/DocumentTabs/index.js.map +1 -1
- package/es/components/ExtraDataCardList/index.d.ts +5 -0
- package/es/components/ExtraDataCardList/index.js +38 -0
- package/es/components/ExtraDataCardList/index.js.map +1 -0
- package/es/components/Links/index.less +111 -111
- package/es/components/NewDocumentForm/index.d.ts +1 -0
- package/es/components/NewDocumentForm/index.js +4 -1
- package/es/components/NewDocumentForm/index.js.map +1 -1
- package/es/components/QuickAccessSearch/ObjectItem/index.js +2 -2
- package/es/components/QuickAccessSearch/ObjectItem/index.js.map +1 -1
- package/es/components/QuickViewDialog/QuickSubTab/index.js +2 -6
- package/es/components/QuickViewDialog/QuickSubTab/index.js.map +1 -1
- package/es/components/TextPropertiesView/index.d.ts +6 -0
- package/es/components/TextPropertiesView/index.js +20 -0
- package/es/components/TextPropertiesView/index.js.map +1 -0
- package/es/components/{TextQuickView → TextQuickViewDialog}/index.d.ts +2 -2
- package/es/components/{TextQuickView → TextQuickViewDialog}/index.js +6 -3
- package/es/components/TextQuickViewDialog/index.js.map +1 -0
- package/es/controls/ToolBar/ToolBar2.js +4 -3
- package/es/controls/ToolBar/ToolBar2.js.map +1 -1
- package/es/controls/ToolBar/ToolBarState.d.ts +15 -6
- package/es/controls/ToolBar/ToolBarState.js +11 -3
- package/es/controls/ToolBar/ToolBarState.js.map +1 -1
- package/es/controls/ToolBar/buttons/More.d.ts +2 -2
- package/es/controls/ToolBar/buttons/More.js +3 -3
- package/es/controls/ToolBar/buttons/More.js.map +1 -1
- package/es/controls/ToolBar/buttons/state.js +24 -12
- package/es/controls/ToolBar/buttons/state.js.map +1 -1
- package/es/controls/ToolBar/menus/Access.js +3 -3
- package/es/controls/ToolBar/menus/Access.js.map +1 -1
- package/es/controls/ToolBar/menus/Delete.js +1 -0
- package/es/controls/ToolBar/menus/Delete.js.map +1 -1
- package/es/controls/ToolBar/menus/Lock.js +1 -0
- package/es/controls/ToolBar/menus/Lock.js.map +1 -1
- package/es/controls/ToolBar/menus/Move.js +1 -0
- package/es/controls/ToolBar/menus/Move.js.map +1 -1
- package/es/controls/ToolBar/menus/OpenReferenceView.js +5 -3
- package/es/controls/ToolBar/menus/OpenReferenceView.js.map +1 -1
- package/es/controls/ToolBar/menus/OpenTreeView.js +1 -0
- package/es/controls/ToolBar/menus/OpenTreeView.js.map +1 -1
- package/es/controls/ToolBar/menus/Paste.js +1 -0
- package/es/controls/ToolBar/menus/Paste.js.map +1 -1
- package/es/controls/ToolBar/menus/Publish.js +3 -3
- package/es/controls/ToolBar/menus/Publish.js.map +1 -1
- package/es/controls/ToolBar/menus/PublishLock.js +3 -3
- package/es/controls/ToolBar/menus/PublishLock.js.map +1 -1
- package/es/controls/ToolBar/menus/Revert.js +3 -0
- package/es/controls/ToolBar/menus/Revert.js.map +1 -1
- package/es/modules/unit/components/ChangeUserPassword/index.d.ts +6 -0
- package/es/modules/unit/components/ChangeUserPassword/index.js +37 -0
- package/es/modules/unit/components/ChangeUserPassword/index.js.map +1 -0
- package/es/modules/unit/components/ChangeUserPassword/index.less +13 -0
- package/es/modules/unit/components/ContactUserInfoView/index.d.ts +3 -0
- package/es/modules/unit/components/ContactUserInfoView/index.js +40 -0
- package/es/modules/unit/components/ContactUserInfoView/index.js.map +1 -0
- package/es/modules/unit/components/ContactUserInfoView/index.less +20 -0
- package/es/modules/unit/components/ContactUserInfoView/state.d.ts +5 -0
- package/es/modules/unit/components/ContactUserInfoView/state.js +14 -0
- package/es/modules/unit/components/ContactUserInfoView/state.js.map +1 -0
- package/es/modules/unit/components/Members/index.js +14 -25
- package/es/modules/unit/components/Members/index.js.map +1 -1
- package/es/modules/unit/components/NewUnitForm/index.d.ts +1 -1
- package/es/modules/unit/components/SubUnitList/index.d.ts +6 -2
- package/es/modules/unit/components/SubUnitList/index.js +17 -20
- package/es/modules/unit/components/SubUnitList/index.js.map +1 -1
- package/es/modules/unit/components/SubUnitList/index.less +10 -4
- package/es/modules/unit/components/SubUnitList/state.d.ts +15 -0
- package/es/modules/unit/components/SubUnitList/state.js +36 -1
- package/es/modules/unit/components/SubUnitList/state.js.map +1 -1
- package/es/modules/unit/components/UnitItem/Item.d.ts +17 -0
- package/es/modules/unit/components/UnitItem/Item.js +24 -0
- package/es/modules/unit/components/UnitItem/Item.js.map +1 -0
- package/es/modules/unit/components/UnitItem/index.js +43 -0
- package/es/modules/unit/components/UnitItem/index.js.map +1 -0
- package/es/modules/unit/components/UnitItem/index.less +17 -9
- package/es/modules/unit/components/UnitItem/state.d.ts +2 -2
- package/es/modules/unit/components/UnitItem/state.js.map +1 -1
- package/es/modules/unit/components/UnitList/index.js +4 -4
- package/es/modules/unit/components/UnitList/index.js.map +1 -1
- package/es/modules/unit/components/UnitName/index.d.ts +5 -0
- package/es/modules/unit/components/UnitName/index.js +20 -0
- package/es/modules/unit/components/UnitName/index.js.map +1 -0
- package/es/modules/unit/components/UnitSortableTree/index.js +4 -5
- package/es/modules/unit/components/UnitSortableTree/index.js.map +1 -1
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/index.d.ts +3 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/index.js +22 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/index.js.map +1 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js +82 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js.map +1 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/node-content-renderer.less +316 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js +21 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js.map +1 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.less +4 -0
- package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/index.js.map +1 -0
- package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.d.ts +3 -0
- package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/SortableTreeUnitTheme}/node-content-renderer.js +2 -2
- package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.js.map +1 -0
- package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/SortableTreeUnitTheme}/node-content-renderer.less +0 -1
- package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.d.ts +3 -0
- package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.js.map +1 -0
- package/es/modules/unit/components/UnitTabs/index.js +5 -2
- package/es/modules/unit/components/UnitTabs/index.js.map +1 -1
- package/es/modules/unit/components/UnitsSelectDialog/index.d.ts +9 -0
- package/es/modules/unit/components/UnitsSelectDialog/index.js +35 -0
- package/es/modules/unit/components/UnitsSelectDialog/index.js.map +1 -0
- package/es/modules/unit/components/UnitsSelectDialog/index.less +36 -0
- package/es/modules/unit/components/UnitsSelectDialog/state.d.ts +34 -0
- package/es/modules/unit/components/UnitsSelectDialog/state.js +73 -0
- package/es/modules/unit/components/UnitsSelectDialog/state.js.map +1 -0
- package/es/modules/unit/controls/QuickDataIcon/index.less +12 -0
- package/es/modules/unit/data/UserStore.d.ts +33 -0
- package/es/modules/unit/data/UserStore.js +53 -0
- package/es/modules/unit/data/UserStore.js.map +1 -0
- package/es/modules/unit/data/hooks/useUserInfo.d.ts +6 -0
- package/es/modules/unit/data/hooks/useUserInfo.js +12 -0
- package/es/modules/unit/data/hooks/useUserInfo.js.map +1 -0
- package/es/modules/unit/data/interfaces/IUnit.d.ts +2 -0
- package/es/modules/unit/data/interfaces/IUserInfo.d.ts +12 -0
- package/es/modules/unit/data/interfaces/IUserInfo.js +1 -0
- package/es/modules/unit/data/interfaces/IUserInfo.js.map +1 -0
- package/es/modules/unit/data/interfaces/index.d.ts +1 -0
- package/es/modules/unit/data/interfaces/index.js +1 -0
- package/es/modules/unit/data/interfaces/index.js.map +1 -1
- package/es/modules/unit/pages/UnitTreeView/index.js +1 -1
- package/es/modules/unit/pages/UnitTreeView/index.js.map +1 -1
- package/es/pages/Page/PageDefaultView/index.js +1 -1
- package/es/pages/Page/PageDefaultView/index.js.map +1 -1
- package/es/pages/Page/PageTextItem/index.js +1 -1
- package/es/pages/Page/PageTextItem/index.js.map +1 -1
- package/es/pages/VSubmit/VSubmitDefaultView/index.d.ts +3 -0
- package/es/pages/VSubmit/VSubmitDefaultView/index.js +59 -0
- package/es/pages/VSubmit/VSubmitDefaultView/index.js.map +1 -0
- package/es/pages/VSubmit/VSubmitDefaultView/index.less +10 -0
- package/es/pages/VSubmit/VSubmitDefaultView/state.d.ts +4 -0
- package/es/pages/VSubmit/VSubmitDefaultView/state.js +12 -0
- package/es/pages/VSubmit/VSubmitDefaultView/state.js.map +1 -0
- package/es/pages/VSubmit/VSubmitSubmitterView/index.d.ts +4 -0
- package/es/pages/VSubmit/VSubmitSubmitterView/index.js +35 -0
- package/es/pages/VSubmit/VSubmitSubmitterView/index.js.map +1 -0
- package/es/pages/VSubmit/VSubmitSubmitterView/index.less +30 -0
- package/es/pages/VSubmit/components/DocumentIconCard/index.d.ts +12 -0
- package/es/pages/VSubmit/components/DocumentIconCard/index.js +32 -0
- package/es/pages/VSubmit/components/DocumentIconCard/index.js.map +1 -0
- package/es/pages/VSubmit/components/DocumentIconCard/index.less +37 -0
- package/es/pages/VSubmit/components/DocumentIconView/index.d.ts +13 -0
- package/es/pages/VSubmit/components/DocumentIconView/index.js +61 -0
- package/es/pages/VSubmit/components/DocumentIconView/index.js.map +1 -0
- package/es/pages/VSubmit/components/DocumentIconView/index.less +65 -0
- package/es/pages/VSubmit/components/DocumentIconView/state.d.ts +8 -0
- package/es/pages/VSubmit/components/DocumentIconView/state.js +17 -0
- package/es/pages/VSubmit/components/DocumentIconView/state.js.map +1 -0
- package/es/pages/VSubmit/components/EmailRecipients/index.d.ts +9 -0
- package/es/pages/VSubmit/components/EmailRecipients/index.js +48 -0
- package/es/pages/VSubmit/components/EmailRecipients/index.js.map +1 -0
- package/es/pages/VSubmit/components/EmailRecipients/index.less +27 -0
- package/es/pages/VSubmit/components/EmailRecipients/state.d.ts +8 -0
- package/es/pages/VSubmit/components/EmailRecipients/state.js +23 -0
- package/es/pages/VSubmit/components/EmailRecipients/state.js.map +1 -0
- package/es/pages/VSubmit/components/SubmitSections/SectionItem/index.d.ts +14 -0
- package/es/pages/VSubmit/components/SubmitSections/SectionItem/index.js +40 -0
- package/es/pages/VSubmit/components/SubmitSections/SectionItem/index.js.map +1 -0
- package/es/pages/VSubmit/components/SubmitSections/SectionItem/index.less +60 -0
- package/es/pages/VSubmit/components/SubmitSections/SectionItem/state.d.ts +8 -0
- package/es/pages/VSubmit/components/SubmitSections/SectionItem/state.js +22 -0
- package/es/pages/VSubmit/components/SubmitSections/SectionItem/state.js.map +1 -0
- package/es/pages/VSubmit/components/SubmitSections/index.d.ts +6 -0
- package/es/pages/VSubmit/components/SubmitSections/index.js +54 -0
- package/es/pages/VSubmit/components/SubmitSections/index.js.map +1 -0
- package/es/pages/VSubmit/components/SubmitSections/index.less +31 -0
- package/es/pages/VSubmit/data/VSubmitStore.d.ts +10 -0
- package/es/pages/VSubmit/data/VSubmitStore.js +16 -0
- package/es/pages/VSubmit/data/VSubmitStore.js.map +1 -0
- package/es/pages/VSubmit/data/hook.d.ts +3 -0
- package/es/pages/VSubmit/data/hook.js +10 -0
- package/es/pages/VSubmit/data/hook.js.map +1 -0
- package/es/pages/VSubmit/data/index.d.ts +3 -0
- package/es/pages/VSubmit/data/index.js +4 -0
- package/es/pages/VSubmit/data/index.js.map +1 -0
- package/es/pages/VSubmit/data/interfaces.d.ts +8 -0
- package/es/pages/VSubmit/data/interfaces.js +1 -0
- package/es/pages/VSubmit/data/interfaces.js.map +1 -0
- package/es/routes.d.ts +12 -0
- package/es/routes.js +27 -1
- package/es/routes.js.map +1 -1
- package/package.json +2 -2
- package/es/components/TextQuickView/index.js.map +0 -1
- package/es/components/TextQuickView/index.less +0 -21
- package/es/modules/unit/components/SortableTreeUnitTheme/index.js.map +0 -1
- package/es/modules/unit/components/SortableTreeUnitTheme/node-content-renderer.js.map +0 -1
- package/es/modules/unit/components/SortableTreeUnitTheme/tree-node-renderer.js.map +0 -1
- package/es/modules/unit/components/UnitItem/DefaultUnitItem.d.ts +0 -4
- package/es/modules/unit/components/UnitItem/DefaultUnitItem.js +0 -29
- package/es/modules/unit/components/UnitItem/DefaultUnitItem.js.map +0 -1
- package/es/modules/unit/components/UnitItem/SubUnitItem.js +0 -45
- package/es/modules/unit/components/UnitItem/SubUnitItem.js.map +0 -1
- /package/es/modules/unit/components/UnitItem/{SubUnitItem.d.ts → index.d.ts} +0 -0
- /package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/FileExplorerTheme}/node-content-renderer.d.ts +0 -0
- /package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/FileExplorerTheme}/tree-node-renderer.d.ts +0 -0
- /package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/SortableTreeUnitTheme}/index.d.ts +0 -0
- /package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/SortableTreeUnitTheme}/index.js +0 -0
- /package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/SortableTreeUnitTheme}/tree-node-renderer.js +0 -0
- /package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/SortableTreeUnitTheme}/tree-node-renderer.less +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
:global {
|
|
2
|
+
.document-icon-card {
|
|
3
|
+
padding: 0.75rem;
|
|
4
|
+
cursor: pointer;
|
|
5
|
+
.document-header-default {
|
|
6
|
+
padding: unset;
|
|
7
|
+
.document-name-content {
|
|
8
|
+
align-items: center;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
.attachment-icon-small {
|
|
12
|
+
font-size: 24px;
|
|
13
|
+
line-height: 25px;
|
|
14
|
+
}
|
|
15
|
+
.attachment-icon-normal {
|
|
16
|
+
font-size: 36px;
|
|
17
|
+
line-height: 37px;
|
|
18
|
+
}
|
|
19
|
+
.attachment-icon-large {
|
|
20
|
+
font-size: 48px;
|
|
21
|
+
line-height: 49px;
|
|
22
|
+
}
|
|
23
|
+
.hover-operate-icon {
|
|
24
|
+
opacity: 0;
|
|
25
|
+
padding-top: 5px;
|
|
26
|
+
&.show {
|
|
27
|
+
opacity: 1;
|
|
28
|
+
}
|
|
29
|
+
.ant-dropdown-trigger {
|
|
30
|
+
float: right;
|
|
31
|
+
}
|
|
32
|
+
.ant-btn + .ant-btn {
|
|
33
|
+
margin: 0 0 0 8px;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "./index.less";
|
|
3
|
+
declare const DocumentIconView: {
|
|
4
|
+
(props: {
|
|
5
|
+
id: string;
|
|
6
|
+
download?: boolean;
|
|
7
|
+
upload?: boolean;
|
|
8
|
+
}): JSX.Element;
|
|
9
|
+
defaultProps: {
|
|
10
|
+
upload: boolean;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export default DocumentIconView;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import "./index.less";
|
|
2
|
+
import { Button, Empty, Tooltip, Upload } from "@voplus/antd";
|
|
3
|
+
import React, { useState } from "react";
|
|
4
|
+
import { faDownload, faUpload } from "@fortawesome/pro-light-svg-icons";
|
|
5
|
+
import DocumentIconCard from "../DocumentIconCard";
|
|
6
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
7
|
+
import { State } from "./state";
|
|
8
|
+
import { useApplicationContext } from "@voplus/morpho-data";
|
|
9
|
+
import { useDocumentListEffect } from "@voplus/morpho-document-core";
|
|
10
|
+
import { useDocumentStore } from "@voplus/morpho-document-core";
|
|
11
|
+
import { useFileStore } from "../../../../data/FileStore/FileStore";
|
|
12
|
+
import { useObserver } from "mobx-react-lite";
|
|
13
|
+
const DocumentIconView = (props) => {
|
|
14
|
+
const { id, download, upload } = props;
|
|
15
|
+
const [state] = useState(new State());
|
|
16
|
+
const { user } = useApplicationContext();
|
|
17
|
+
const store = useDocumentStore();
|
|
18
|
+
const fileStore = useFileStore();
|
|
19
|
+
useDocumentListEffect(null, list => {
|
|
20
|
+
state.list = list || [];
|
|
21
|
+
}, {
|
|
22
|
+
Filters: [{ c: "ParentNodeId", o: "=", l: "And", v1: id }]
|
|
23
|
+
});
|
|
24
|
+
return useObserver(() => (React.createElement("div", { className: "documents-icon-view" },
|
|
25
|
+
React.createElement("div", { className: "attachments-header" },
|
|
26
|
+
React.createElement("div", { className: "attachments-title" }, "Attachments"),
|
|
27
|
+
download !== false && (React.createElement(Tooltip, { title: "Download" },
|
|
28
|
+
React.createElement(Button, { type: "link", disabled: !(state.list && state.list.length), className: "download-btn", onClick: onDownload },
|
|
29
|
+
React.createElement(FAIcon, { icon: faDownload }))))),
|
|
30
|
+
React.createElement("div", { className: "attachments-cards" },
|
|
31
|
+
React.createElement(Upload.Dragger, { action: `https://${store.endpoint.host}/api/files/${props.id}`, headers: {
|
|
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(DocumentIconCard, { key: d.id, id: d.id }))) : upload ? (React.createElement("div", { className: "ant-upload-hint" },
|
|
34
|
+
React.createElement(FAIcon, { icon: faUpload }),
|
|
35
|
+
"Drag file to this area to upload")) : (React.createElement(Empty, { image: Empty.PRESENTED_IMAGE_SIMPLE })))))));
|
|
36
|
+
/** download file */
|
|
37
|
+
function onDownload() {
|
|
38
|
+
for (const item of state.list) {
|
|
39
|
+
fileStore.download(item.id).then((blob) => {
|
|
40
|
+
if (blob) {
|
|
41
|
+
const url = URL.createObjectURL(blob);
|
|
42
|
+
if (url) {
|
|
43
|
+
saveAs(url);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/** 文件上传中、完成、失败回调函数 */
|
|
50
|
+
function onUploading({ file, fileList }) {
|
|
51
|
+
/**上传完成不显示进度条 */
|
|
52
|
+
state.fileList = fileList.filter(f => f.status !== "done");
|
|
53
|
+
if (file.status === "done")
|
|
54
|
+
state.list = [...state.list, file.response];
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
DocumentIconView.defaultProps = {
|
|
58
|
+
upload: true
|
|
59
|
+
};
|
|
60
|
+
export default DocumentIconView;
|
|
61
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
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
|
|
|
1
|
+
:global {
|
|
2
|
+
.documents-icon-view {
|
|
3
|
+
.attachments-header {
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: space-between;
|
|
6
|
+
align-items: center;
|
|
7
|
+
padding: 0.75rem 20px 0.25rem 20px;
|
|
8
|
+
border-bottom: 1px solid #f2f2f2;
|
|
9
|
+
.attachments-title {
|
|
10
|
+
color: #000;
|
|
11
|
+
font-size: 16px;
|
|
12
|
+
font-weight: 600;
|
|
13
|
+
}
|
|
14
|
+
.download-btn {
|
|
15
|
+
padding: 0;
|
|
16
|
+
height: 26px;
|
|
17
|
+
font-size: 18px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
.attachments-cards {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-wrap: wrap;
|
|
23
|
+
> span {
|
|
24
|
+
display: flex;
|
|
25
|
+
width: 100%;
|
|
26
|
+
flex-direction: column-reverse;
|
|
27
|
+
padding: 0 0.5rem;
|
|
28
|
+
.ant-upload-disabled {
|
|
29
|
+
cursor: auto !important;
|
|
30
|
+
}
|
|
31
|
+
.ant-upload.ant-upload-drag {
|
|
32
|
+
border: none;
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
text-align: left;
|
|
35
|
+
.ant-upload {
|
|
36
|
+
padding: 0;
|
|
37
|
+
.ant-upload-drag-container {
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-wrap: wrap;
|
|
40
|
+
.document-icon-card {
|
|
41
|
+
width: 18rem;
|
|
42
|
+
margin: 0.5rem;
|
|
43
|
+
}
|
|
44
|
+
.ant-upload-hint {
|
|
45
|
+
width: 100%;
|
|
46
|
+
padding: 1rem 0;
|
|
47
|
+
margin: 0.25rem 0.75rem 0 0.75rem;
|
|
48
|
+
background-color: #fff;
|
|
49
|
+
.svg-inline--fa {
|
|
50
|
+
margin: 0 10px 0 20px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
.ant-empty {
|
|
54
|
+
width: 100%;
|
|
55
|
+
padding: 10px 0;
|
|
56
|
+
margin: 0.25rem 0.5rem 0 0.5rem;
|
|
57
|
+
background-color: #fff;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { observable } from "mobx";
|
|
3
|
+
export class State {
|
|
4
|
+
constructor() {
|
|
5
|
+
/** list of attachments */
|
|
6
|
+
this.list = [];
|
|
7
|
+
/** list of upload file */
|
|
8
|
+
this.fileList = [];
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
__decorate([
|
|
12
|
+
observable
|
|
13
|
+
], State.prototype, "list", void 0);
|
|
14
|
+
__decorate([
|
|
15
|
+
observable
|
|
16
|
+
], State.prototype, "fileList", void 0);
|
|
17
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/pages/VSubmit/components/DocumentIconView/state.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,OAAO,KAAK;IAAlB;QACC,0BAA0B;QACP,SAAI,GAAgB,EAAE,CAAC;QAC1C,0BAA0B;QACP,aAAQ,GAAiB,EAAE,CAAC;IAChD,CAAC;CAAA;AAHY;IAAX,UAAU;mCAA+B;AAE9B;IAAX,UAAU;uCAAoC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "./index.less";
|
|
3
|
+
import { IUnit } from "../../../../modules/unit/data";
|
|
4
|
+
declare const EmailRecipients: (props: {
|
|
5
|
+
submitters?: IUnit[] | undefined;
|
|
6
|
+
readonly?: boolean | undefined;
|
|
7
|
+
onChange?: ((units?: IUnit[] | undefined) => void) | undefined;
|
|
8
|
+
}) => JSX.Element;
|
|
9
|
+
export default EmailRecipients;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import "./index.less";
|
|
2
|
+
import { useUnitListEffect } from "../../../../modules/unit/data";
|
|
3
|
+
import React, { useEffect, useState } from "react";
|
|
4
|
+
import { Select } from "@voplus/antd";
|
|
5
|
+
import { State } from "./state";
|
|
6
|
+
import { useObserver } from "mobx-react-lite";
|
|
7
|
+
const EmailRecipients = (props) => {
|
|
8
|
+
const { submitters, readonly, onChange } = props;
|
|
9
|
+
const [state] = useState(new State());
|
|
10
|
+
useUnitListEffect(null, list => (state.list = list || []), {
|
|
11
|
+
Page: { Page: 1, PageSize: 500 },
|
|
12
|
+
reload: !readonly
|
|
13
|
+
});
|
|
14
|
+
useEffect(() => {
|
|
15
|
+
state.recipients = submitters || [];
|
|
16
|
+
}, [submitters]);
|
|
17
|
+
return useObserver(() => (React.createElement("div", { className: "email-recipients" },
|
|
18
|
+
React.createElement("div", { className: "email-recipients-title" }, "Submitters"),
|
|
19
|
+
!readonly ? (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 },
|
|
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" },
|
|
22
|
+
sub.name,
|
|
23
|
+
sub.email && React.createElement("span", { style: { color: "#7f7f7f" } }, "<" + sub.email + ">;")))))) : null)));
|
|
24
|
+
/** 搜索units(必须有email)或直接輸入email地址, */
|
|
25
|
+
function filterItems(input, option) {
|
|
26
|
+
return (option.title || option.children[0])
|
|
27
|
+
.toLowerCase()
|
|
28
|
+
.includes(input.toLowerCase());
|
|
29
|
+
}
|
|
30
|
+
/** selected contact */
|
|
31
|
+
function onSelect(id) {
|
|
32
|
+
const contact = state.list.find(x => x.id === id);
|
|
33
|
+
if (contact)
|
|
34
|
+
state.recipients.push(contact);
|
|
35
|
+
if (onChange)
|
|
36
|
+
onChange(state.recipients);
|
|
37
|
+
}
|
|
38
|
+
// remove a selection
|
|
39
|
+
function onDeselect(value) {
|
|
40
|
+
const index = state.recipients.findIndex(x => x.id === value);
|
|
41
|
+
if (index !== -1)
|
|
42
|
+
state.recipients.splice(index, 1);
|
|
43
|
+
if (onChange)
|
|
44
|
+
onChange(state.recipients);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
export default EmailRecipients;
|
|
48
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,eAAe,GAAG,CAAC,KAIxB,EAAE,EAAE;IACJ,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAEjD,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAEtC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,EAAE;QAC1D,IAAI,EAAE,EAAE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CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
:global {
|
|
2
|
+
.email-recipients {
|
|
3
|
+
padding: 10px 20px;
|
|
4
|
+
color: #000;
|
|
5
|
+
.email-recipients-title {
|
|
6
|
+
font-size: 16px;
|
|
7
|
+
font-weight: 600;
|
|
8
|
+
}
|
|
9
|
+
.ant-select-multiple {
|
|
10
|
+
padding-top: 10px;
|
|
11
|
+
.ant-select-selection-item {
|
|
12
|
+
border: 0;
|
|
13
|
+
background-color: #fff;
|
|
14
|
+
border-radius: 0;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
.recipients-list {
|
|
18
|
+
padding-top: 10px;
|
|
19
|
+
.recipient-item {
|
|
20
|
+
margin-right: 10px;
|
|
21
|
+
&:last-child {
|
|
22
|
+
margin-right: 0;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { computed, observable } from "mobx";
|
|
3
|
+
export class State {
|
|
4
|
+
constructor() {
|
|
5
|
+
/** list of contact */
|
|
6
|
+
this.list = [];
|
|
7
|
+
/** contact */
|
|
8
|
+
this.recipients = [];
|
|
9
|
+
}
|
|
10
|
+
get ids() {
|
|
11
|
+
return this.recipients.map(r => r.id);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
__decorate([
|
|
15
|
+
observable
|
|
16
|
+
], State.prototype, "list", void 0);
|
|
17
|
+
__decorate([
|
|
18
|
+
observable
|
|
19
|
+
], State.prototype, "recipients", void 0);
|
|
20
|
+
__decorate([
|
|
21
|
+
computed
|
|
22
|
+
], State.prototype, "ids", null);
|
|
23
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +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;IAM7C,CAAC;IAHA,IAAW,GAAG;QACb,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IACvC,CAAC;CACD;AARY;IAAX,UAAU;mCAA2B;AAE1B;IAAX,UAAU;yCAAiC;AAG5C;IADC,QAAQ;gCAGR"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import "./index.less";
|
|
3
|
+
declare const SectionItem: (props: {
|
|
4
|
+
/** section item id */
|
|
5
|
+
id: string;
|
|
6
|
+
/** section item index */
|
|
7
|
+
index: number;
|
|
8
|
+
/** is readonly */
|
|
9
|
+
readonly?: boolean;
|
|
10
|
+
/** is multiple */
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
connectDragSource?: any;
|
|
13
|
+
}) => JSX.Element;
|
|
14
|
+
export default SectionItem;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import "./index.less";
|
|
2
|
+
import { Checkbox, Skeleton } from "@voplus/antd";
|
|
3
|
+
import React, { useState } from "react";
|
|
4
|
+
import { faAngleRight, faBars, faEdit } from "@fortawesome/pro-light-svg-icons";
|
|
5
|
+
import { useDocument, useDocumentStore } from "@voplus/morpho-document-core";
|
|
6
|
+
import DocumentHeader from "../../../../../components/DocumentHeader";
|
|
7
|
+
import DocumentList from "../../../../../components/DocumentList";
|
|
8
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
9
|
+
import RichTextEditor from "@voplus/morpho-ui/es/controls/RichTextEditor";
|
|
10
|
+
import { State } from "./state";
|
|
11
|
+
import classnames from "classnames";
|
|
12
|
+
import { useObserver } from "mobx-react-lite";
|
|
13
|
+
const SectionItem = (props) => {
|
|
14
|
+
const { id, index, readonly, multiple, connectDragSource } = props;
|
|
15
|
+
const [state] = useState(new State());
|
|
16
|
+
const doc = useDocument(id);
|
|
17
|
+
const documentStore = useDocumentStore();
|
|
18
|
+
state.isDescription = readonly && !doc.description ? false : true;
|
|
19
|
+
return useObserver(() => (React.createElement("div", { className: "section-item" },
|
|
20
|
+
React.createElement("div", { className: "section-item-header", onMouseLeave: () => (state.isHover = false), onMouseOver: () => (state.isHover = true) },
|
|
21
|
+
multiple && React.createElement(Checkbox, { value: id, className: "select-checkbox" }),
|
|
22
|
+
!multiple &&
|
|
23
|
+
!readonly &&
|
|
24
|
+
connectDragSource &&
|
|
25
|
+
connectDragSource(React.createElement("span", { className: classnames("sort-icon-move") },
|
|
26
|
+
React.createElement(FAIcon, { icon: faBars, color: "#222" }))),
|
|
27
|
+
React.createElement("span", { className: classnames("section-item-index", { show: multiple || readonly }) }, (index || 0) + 1 + "."),
|
|
28
|
+
React.createElement(DocumentHeader, { id: id, size: "h4",
|
|
29
|
+
// quickDataBarVisible={false}
|
|
30
|
+
toolsVisible: state.isHover && !readonly }),
|
|
31
|
+
React.createElement("span", { onClick: () => (state.foldable = !state.foldable), className: classnames("collapse-arrow", { "collapse-active": !state.foldable }) },
|
|
32
|
+
React.createElement(FAIcon, { icon: faAngleRight }))),
|
|
33
|
+
state.foldable && (React.createElement(React.Fragment, null,
|
|
34
|
+
React.createElement("div", { className: "submit-description" }, doc.loading ? (React.createElement(Skeleton, { active: true })) : (state.isDescription && (React.createElement(RichTextEditor, { editable: false, readOnly: doc.status === "Readonly" || readonly, placeholder: doc.status === "Readonly" ? ("No description") : (React.createElement("span", null,
|
|
35
|
+
React.createElement(FAIcon, { icon: faEdit }),
|
|
36
|
+
"Add Description")), content: doc.description || "", onSave: v => documentStore.edit(id, { Description: v }) })))),
|
|
37
|
+
React.createElement(DocumentList, { id: id, multiple: true, header: false, className: "section-document" }))))));
|
|
38
|
+
};
|
|
39
|
+
export default SectionItem;
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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,QAAQ,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAE7E,OAAO,cAAc,MAAM,0CAA0C,CAAC;AACtE,OAAO,YAAY,MAAM,wCAAwC,CAAC;AAClE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,cAAc,MAAM,8CAA8C,CAAC;AAC1E,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,WAAW,GAAG,CAAC,KAUpB,EAAE,EAAE;IACJ,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,iBAAiB,EAAE,GAAG,KAAK,CAAC;IACnE,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IACtC,MAAM,GAAG,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;IAC5B,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,KAAK,CAAC,aAAa,GAAG,QAAQ,IAAI,CAAC,GAAG,CAAC,WAAW,CAA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BAAC,KAAK,CAAC,QAAQ;YACd,6BAAK,SAAS,EAAC,oBAAoB,IACjC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CACd,oBAAC,QAAQ,IAAC,MAAM,SAAG,CACnB,CAAC,CAAC,CAAC,CACH,KAAK,CAAC,aAAa,IAAI,CACtB,oBAAC,cAAc,IACd,QAAQ,EAAE,KAAK,EACf,QAAQ,EAAE,GAAG,CAAC,MAAM,KAAK,UAAU,IAAI,QAAQ,EAC/C,WAAW,EACV,GAAG,CAAC,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,CAC3B,gBAAgB,CAChB,CAAC,CAAC,CAAC,CACH;oBACC,oBAAC,MAAM,IAAC,IAAI,EAAE,MAAM,GAAI;sCAElB,CACP,EAEF,OAAO,EAAE,GAAG,CAAC,WAAW,IAAI,EAAE,EAC9B,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,GACtD,CACF,CACD,CACI;YACN,oBAAC,YAAY,IAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,QAAC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAC,kBAAkB,GAAG,CAC7D,CACjB,CACI,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
:global {
|
|
2
|
+
.section-item {
|
|
3
|
+
flex: 1;
|
|
4
|
+
position: relative;
|
|
5
|
+
&:after {
|
|
6
|
+
position: absolute;
|
|
7
|
+
content: "";
|
|
8
|
+
left: 20px;
|
|
9
|
+
bottom: 0;
|
|
10
|
+
right: 20px;
|
|
11
|
+
border-bottom: 1px solid #d9d9d9;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.section-item-header {
|
|
15
|
+
display: flex;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
padding: 0 10px 0 20px;
|
|
18
|
+
&:hover .sort-icon-move,
|
|
19
|
+
&:hover .section-item-index.show {
|
|
20
|
+
display: flex;
|
|
21
|
+
}
|
|
22
|
+
&:hover .section-item-index {
|
|
23
|
+
display: none;
|
|
24
|
+
}
|
|
25
|
+
.sort-icon-move {
|
|
26
|
+
display: none;
|
|
27
|
+
align-items: center;
|
|
28
|
+
cursor: move;
|
|
29
|
+
}
|
|
30
|
+
.section-item-index {
|
|
31
|
+
display: flex;
|
|
32
|
+
font-size: 16px;
|
|
33
|
+
align-items: center;
|
|
34
|
+
}
|
|
35
|
+
.document-header-default {
|
|
36
|
+
flex: 1;
|
|
37
|
+
}
|
|
38
|
+
.collapse-arrow {
|
|
39
|
+
display: flex;
|
|
40
|
+
font-size: 20px;
|
|
41
|
+
align-items: center;
|
|
42
|
+
justify-content: center;
|
|
43
|
+
transition: transform 0.24s;
|
|
44
|
+
padding: 10px;
|
|
45
|
+
cursor: pointer;
|
|
46
|
+
&.collapse-active {
|
|
47
|
+
transform: rotate(90deg);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
.select-checkbox{
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
margin-right: 15px;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
.section-document {
|
|
57
|
+
height: 300px;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { observable } from "mobx";
|
|
3
|
+
export class State {
|
|
4
|
+
constructor() {
|
|
5
|
+
/** 是否显示 Description*/
|
|
6
|
+
this.isDescription = false;
|
|
7
|
+
/** */
|
|
8
|
+
this.isHover = false;
|
|
9
|
+
/** 折叠的,展开,收成 */
|
|
10
|
+
this.foldable = false;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
__decorate([
|
|
14
|
+
observable
|
|
15
|
+
], State.prototype, "isDescription", void 0);
|
|
16
|
+
__decorate([
|
|
17
|
+
observable
|
|
18
|
+
], State.prototype, "isHover", void 0);
|
|
19
|
+
__decorate([
|
|
20
|
+
observable
|
|
21
|
+
], State.prototype, "foldable", void 0);
|
|
22
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +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,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"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
|
|
2
|
+
import { BatchHeader, DeleteButton, MoveButton } from "@voplus/morpho-ui/es/components/layout/ListView/headers";
|
|
3
|
+
import { useAutoUpdateListData, useDocumentListEffect, useDocumentStore } from "@voplus/morpho-document-core";
|
|
4
|
+
import React, { useState } from "react";
|
|
5
|
+
import ListView from "@voplus/morpho-ui/es/components/layout/ListView/ListView2";
|
|
6
|
+
import NewDocumentForm from "../../../../components/NewDocumentForm";
|
|
7
|
+
import SectionItem from "./SectionItem";
|
|
8
|
+
import styles from "./index.less";
|
|
9
|
+
import { useObserver } from "mobx-react-lite";
|
|
10
|
+
import { useRenderOnChange } from "@voplus/morpho-ui";
|
|
11
|
+
const SubmitSections = (props) => {
|
|
12
|
+
const [addAble, setAddAble] = useState(false);
|
|
13
|
+
const documents = useDocumentStore();
|
|
14
|
+
const { id, readonly } = props;
|
|
15
|
+
/** 建立 ListView 和useDocumentListEffect所需的ListDataState. 会根据state.id重建所以不需reset. */
|
|
16
|
+
const list = useCreateListDataState({
|
|
17
|
+
filterDefaults: {
|
|
18
|
+
includes: "tags,path",
|
|
19
|
+
filters: [{ c: "ParentNodeId", o: "=", l: "And", v1: id }]
|
|
20
|
+
}
|
|
21
|
+
}, [id]);
|
|
22
|
+
/** 如果 list.filters.options变更了就重渲染,使下一行的useDocumentListEffect 可以接收新参数*/
|
|
23
|
+
useRenderOnChange(() => list.filters.options);
|
|
24
|
+
/** 把ListDataState传给useDocumentListEffect,使之可以自動更新loading, hasmore. */
|
|
25
|
+
useDocumentListEffect(list, result => list.union(result), list.filters.options);
|
|
26
|
+
/** useOnNewDocument, useOnDeleteDocument的sugar syntax 自動更新list. */
|
|
27
|
+
useAutoUpdateListData(list, d => d.parentId === id);
|
|
28
|
+
return useObserver(() => (React.createElement("div", { className: styles["submit-sections"] },
|
|
29
|
+
React.createElement("div", { className: "submit-sections-list" },
|
|
30
|
+
React.createElement(ListDataContext.Provider, { value: list },
|
|
31
|
+
React.createElement(ListView, { className: styles["document-list-view"], renderId: id, headerProps: {
|
|
32
|
+
header: !readonly ? (React.createElement(BatchHeader, { viewTitle: "File Submit Details", buttons: [
|
|
33
|
+
React.createElement(DeleteButton, { execute: onDelete, key: "DeleteButton" }),
|
|
34
|
+
React.createElement(MoveButton, { execute: onMove, key: "MoveButton" })
|
|
35
|
+
] })) : (undefined),
|
|
36
|
+
viewTitle: "File Submit Details",
|
|
37
|
+
sortable: false,
|
|
38
|
+
addAble: readonly ? false : true,
|
|
39
|
+
onAdd: () => setAddAble(!addAble)
|
|
40
|
+
}, moveAfter: moveAfter, renderItem: ({ item, index, connectDragSource, multiple }) => (React.createElement(SectionItem, { key: item.id, id: item.id, index: index, readonly: readonly, multiple: multiple, connectDragSource: connectDragSource })) }))),
|
|
41
|
+
addAble && (React.createElement(NewDocumentForm, { parentId: props.id, type: "document", placeholder: "Enter a title for this section", onCancel: () => setAddAble(false) })))));
|
|
42
|
+
function onMove(state) {
|
|
43
|
+
documents.cut(state.ids);
|
|
44
|
+
}
|
|
45
|
+
// order by sub task
|
|
46
|
+
async function moveAfter(id, afterId) {
|
|
47
|
+
await documents.moveAfter(id, afterId);
|
|
48
|
+
}
|
|
49
|
+
async function onDelete(state) {
|
|
50
|
+
await documents.delete(state.ids, { DeleteChilds: true });
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
export default SubmitSections;
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/pages/VSubmit/components/SubmitSections/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEN,eAAe,EACf,sBAAsB,EACtB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACN,WAAW,EACX,YAAY,EACZ,UAAU,EACV,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAEN,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAChB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,QAAQ,MAAM,2DAA2D,CAAC;AACjF,OAAO,eAAe,MAAM,wCAAwC,CAAC;AACrE,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD,MAAM,cAAc,GAAG,CAAC,KAAyC,EAAE,EAAE;IACpE,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAE/B,kFAAkF;IAClF,MAAM,IAAI,GAAG,sBAAsB,C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 100%;
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
:global {
|
|
6
|
+
.submit-sections-header {
|
|
7
|
+
display: flex;
|
|
8
|
+
justify-content: space-between;
|
|
9
|
+
align-items: center;
|
|
10
|
+
font-size: 16px;
|
|
11
|
+
color: #000000;
|
|
12
|
+
padding: 10px 20px;
|
|
13
|
+
border-bottom: 1px solid #f2f2f2;
|
|
14
|
+
.submit-plus-icon {
|
|
15
|
+
display: inline-block;
|
|
16
|
+
padding: 4px;
|
|
17
|
+
font-size: 13px;
|
|
18
|
+
line-height: 1px;
|
|
19
|
+
color: #ffffff;
|
|
20
|
+
background: #1abc9c;
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
.submit-description {
|
|
25
|
+
padding: 0 20px 10px 20px;
|
|
26
|
+
}
|
|
27
|
+
.submit-sections-list {
|
|
28
|
+
flex: 1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CreateDocumentOptions, DocumentStore, DocumentTypeStore, EditDocumentOptions, LoadDocumentListOptions, LoadDocumentOptions } from "@voplus/morpho-document-core";
|
|
2
|
+
import { ApiEndPoint } from "@voplus/api";
|
|
3
|
+
import { IVSubmit } from "./interfaces";
|
|
4
|
+
export declare class VSubmitStore extends DocumentTypeStore<IVSubmit, LoadDocumentOptions, LoadDocumentListOptions, CreateDocumentOptions, EditDocumentOptions, any> {
|
|
5
|
+
/** Name of the store */
|
|
6
|
+
readonly name: string;
|
|
7
|
+
constructor(endpoint: ApiEndPoint, documents: DocumentStore);
|
|
8
|
+
}
|
|
9
|
+
/** 响应钩子检索 VSubmitStore */
|
|
10
|
+
export declare const useVSubmitStore: () => VSubmitStore;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DocumentTypeStore, useDocumentStore } from "@voplus/morpho-document-core";
|
|
2
|
+
import { useStore } from "@voplus/morpho-data";
|
|
3
|
+
const StoreName = "VSubmitStore";
|
|
4
|
+
export class VSubmitStore extends DocumentTypeStore {
|
|
5
|
+
constructor(endpoint, documents) {
|
|
6
|
+
super(endpoint, "/api/v-submit", documents);
|
|
7
|
+
/** Name of the store */
|
|
8
|
+
this.name = StoreName;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
/** 响应钩子检索 VSubmitStore */
|
|
12
|
+
export const useVSubmitStore = () => {
|
|
13
|
+
const documents = useDocumentStore();
|
|
14
|
+
return useStore(StoreName, context => new VSubmitStore(context.api.currentEndPoint, documents));
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=VSubmitStore.js.map
|