@voplus/morpho-workspace 1.1.0-dev014 → 1.1.0-dev018
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 +5 -3
- package/es/controls/filters/AssigneeViewFilter/index.js +43 -0
- package/es/controls/filters/AssigneeViewFilter/index.js.map +1 -0
- package/es/controls/filters/AssigneeViewFilter/state.d.ts +14 -0
- package/es/controls/filters/AssigneeViewFilter/state.js +43 -0
- package/es/controls/filters/AssigneeViewFilter/state.js.map +1 -0
- package/es/controls/filters/DueDateFilter/index.d.ts +3 -0
- package/es/controls/filters/DueDateFilter/index.js +22 -0
- package/es/controls/filters/DueDateFilter/index.js.map +1 -0
- package/es/controls/filters/DueDateFilter/state.d.ts +11 -0
- package/es/controls/filters/DueDateFilter/state.js +36 -0
- package/es/controls/filters/DueDateFilter/state.js.map +1 -0
- package/es/controls/filters/StartDateFilter/index.d.ts +3 -0
- package/es/controls/filters/StartDateFilter/index.js +22 -0
- package/es/controls/filters/StartDateFilter/index.js.map +1 -0
- package/es/controls/filters/StartDateFilter/state.d.ts +11 -0
- package/es/controls/filters/StartDateFilter/state.js +36 -0
- package/es/controls/filters/StartDateFilter/state.js.map +1 -0
- package/es/controls/filters/TaskStatusFilter/index.d.ts +3 -0
- package/es/controls/filters/TaskStatusFilter/index.js +21 -0
- package/es/controls/filters/TaskStatusFilter/index.js.map +1 -0
- package/es/controls/filters/TaskStatusFilter/state.d.ts +16 -0
- package/es/controls/filters/TaskStatusFilter/state.js +46 -0
- package/es/controls/filters/TaskStatusFilter/state.js.map +1 -0
- package/es/controls/filters/index.d.ts +4 -0
- package/es/controls/filters/index.js +5 -0
- package/es/controls/filters/index.js.map +1 -0
- package/es/data/board/BoardColumnStore.d.ts +3 -13
- package/es/data/board/BoardColumnStore.js +2 -24
- package/es/data/board/BoardColumnStore.js.map +1 -1
- package/es/data/board/BoardStore.d.ts +2 -12
- package/es/data/board/BoardStore.js +1 -23
- package/es/data/board/BoardStore.js.map +1 -1
- package/es/data/board/contexts/BoardListContextState/index.d.ts +19 -0
- package/es/data/board/contexts/BoardListContextState/index.js +49 -0
- package/es/data/board/contexts/BoardListContextState/index.js.map +1 -0
- package/es/data/board/index.d.ts +1 -1
- package/es/data/board/index.js +1 -1
- package/es/data/board/index.js.map +1 -1
- package/es/modules/board/components/Board/index.js +34 -41
- package/es/modules/board/components/Board/index.js.map +1 -1
- package/es/modules/board/components/Board/index.less +83 -51
- package/es/modules/board/components/Board/state.d.ts +22 -5
- package/es/modules/board/components/Board/state.js +70 -15
- package/es/modules/board/components/Board/state.js.map +1 -1
- package/es/modules/board/components/BoardColumn/index.js +21 -35
- package/es/modules/board/components/BoardColumn/index.js.map +1 -1
- package/es/modules/board/components/BoardColumn/index.less +22 -12
- package/es/modules/board/components/BoardColumn/state.d.ts +17 -18
- package/es/modules/board/components/BoardColumn/state.js +43 -42
- package/es/modules/board/components/BoardColumn/state.js.map +1 -1
- package/es/modules/board/components/DocumentCard/index.d.ts +0 -2
- package/es/modules/board/components/DocumentCard/index.js +16 -79
- package/es/modules/board/components/DocumentCard/index.js.map +1 -1
- package/es/modules/board/components/DocumentCard/index.less +16 -13
- package/es/modules/board/components/DocumentCard/state.d.ts +6 -6
- package/es/modules/board/components/DocumentCard/state.js +34 -21
- package/es/modules/board/components/DocumentCard/state.js.map +1 -1
- package/es/modules/board/components/SubDocument/index.d.ts +13 -0
- package/es/modules/board/components/SubDocument/index.js +13 -0
- package/es/modules/board/components/SubDocument/index.js.map +1 -0
- package/es/modules/board/components/SubDocumentList/index.d.ts +4 -0
- package/es/modules/board/components/SubDocumentList/index.js +74 -0
- package/es/modules/board/components/SubDocumentList/index.js.map +1 -0
- package/es/modules/board/components/SubDocumentList/index.less +28 -0
- package/es/modules/board/components/SubDocumentList/state.d.ts +25 -0
- package/es/modules/board/components/SubDocumentList/state.js +60 -0
- package/es/modules/board/components/SubDocumentList/state.js.map +1 -0
- package/es/modules/board/components/TaskCard/index.js +27 -76
- package/es/modules/board/components/TaskCard/index.js.map +1 -1
- package/es/modules/board/components/TaskCard/index.less +9 -4
- package/es/modules/board/components/TaskCard/state.d.ts +1 -8
- package/es/modules/board/components/TaskCard/state.js +28 -23
- package/es/modules/board/components/TaskCard/state.js.map +1 -1
- package/es/modules/meeting/components/AgendaList/index.js +4 -7
- package/es/modules/meeting/components/AgendaList/index.js.map +1 -1
- package/es/modules/meeting/components/MeetingQuickViewDialog/index.js +1 -1
- package/es/modules/meeting/components/MeetingQuickViewDialog/index.js.map +1 -1
- package/es/modules/meeting/pages/MeetingList/index.js +6 -5
- package/es/modules/meeting/pages/MeetingList/index.js.map +1 -1
- package/es/modules/tasks/components/SubTaskList/index.js +11 -4
- package/es/modules/tasks/components/SubTaskList/index.js.map +1 -1
- package/es/modules/tasks/components/TaskQuickViewDialog/index.js +1 -1
- package/es/modules/tasks/components/TaskQuickViewDialog/index.js.map +1 -1
- package/es/modules/tasks/pages/TaskList/index.js +10 -7
- package/es/modules/tasks/pages/TaskList/index.js.map +1 -1
- package/package.json +3 -3
- package/es/controls/AssigneeViewFilter/index.js +0 -41
- package/es/controls/AssigneeViewFilter/index.js.map +0 -1
- package/es/data/board/LinkStore.d.ts +0 -11
- package/es/data/board/LinkStore.js +0 -44
- package/es/data/board/LinkStore.js.map +0 -1
- package/es/modules/board/components/LinkList/index.d.ts +0 -4
- package/es/modules/board/components/LinkList/index.js +0 -38
- package/es/modules/board/components/LinkList/index.js.map +0 -1
- package/es/modules/board/components/LinkList/state.d.ts +0 -15
- package/es/modules/board/components/LinkList/state.js +0 -37
- package/es/modules/board/components/LinkList/state.js.map +0 -1
- package/es/modules/board/components/links/index.d.ts +0 -12
- package/es/modules/board/components/links/index.js +0 -26
- package/es/modules/board/components/links/index.js.map +0 -1
- /package/es/controls/{AssigneeViewFilter → filters/AssigneeViewFilter}/index.d.ts +0 -0
- /package/es/controls/{AssigneeViewFilter → filters/AssigneeViewFilter}/index.less +0 -0
@@ -1,48 +1,26 @@
|
|
1
1
|
import { State } from "./state";
|
2
|
-
import { Checkbox, Input, Spin, Tooltip
|
3
|
-
import { LinkStore, useBoardColumn, useBoardColumnStore } from "../../../../data/board";
|
2
|
+
import { Checkbox, Input, Spin, Tooltip } from "@voplus/antd";
|
4
3
|
import { Observer, useObserver } from "mobx-react-lite";
|
5
4
|
import React, { useState } from "react";
|
6
|
-
import {
|
5
|
+
import { useDocumentStore } from "@voplus/morpho-document";
|
6
|
+
import { useBoardColumn, useBoardColumnStore } from "../../../../data/board";
|
7
|
+
import AddDocDropdown from "@voplus/morpho-document/es/components/AddDocDropdown";
|
7
8
|
import DocumentMenu from "@voplus/morpho-document/es/components/DocumentMenu";
|
8
9
|
import DocumentSelectDialog from "@voplus/morpho-document/es/components/DocumentSelectDialog";
|
9
10
|
import { Draggable } from "react-beautiful-dnd";
|
10
|
-
import
|
11
|
-
import Links from "../links";
|
11
|
+
import NewDocumentForm from "@voplus/morpho-document/es/components/NewDocumentForm";
|
12
12
|
import { Scrollbars } from "react-custom-scrollbars";
|
13
|
+
import SubDocument from "../SubDocument";
|
13
14
|
import classnames from "classnames";
|
15
|
+
import { faEllipsisH } from "@fortawesome/pro-light-svg-icons";
|
14
16
|
import styles from "./index.less";
|
15
|
-
import { useDocumentStore } from "@voplus/morpho-document";
|
16
17
|
const BoardColumn = (props) => {
|
17
18
|
const { index, destination, source } = { ...props };
|
18
19
|
const documentStore = useDocumentStore();
|
19
20
|
const boardStore = useBoardColumnStore();
|
20
21
|
const [state] = useState(new State(boardStore, documentStore));
|
21
|
-
const [store] = useState(new LinkStore());
|
22
22
|
state.props = props;
|
23
23
|
state.boardcolumn = useBoardColumn(props.id, { reload: state.reload });
|
24
|
-
/** paste link to boardColumn */
|
25
|
-
const onPaste = async () => {
|
26
|
-
var _a;
|
27
|
-
if (!store.moveIds.length)
|
28
|
-
return message.warn("nothing to cut");
|
29
|
-
const sourceId = (_a = store.moveIds[0]) === null || _a === void 0 ? void 0 : _a.leftId;
|
30
|
-
if (!sourceId)
|
31
|
-
return message.warn("Not a link file");
|
32
|
-
const AddLinks = store.moveIds.map(({ rightId }) => ({
|
33
|
-
Type: "Association",
|
34
|
-
RightId: rightId
|
35
|
-
}));
|
36
|
-
const RemoveLinks = store.moveIds.map(({ linkId }) => linkId);
|
37
|
-
store.onPaste(() => documentStore.moveLinks(props.id, sourceId, AddLinks, RemoveLinks));
|
38
|
-
state.reload = true;
|
39
|
-
};
|
40
|
-
/** DocumentSelectDialog 选择文件, boardColumn add links */
|
41
|
-
const onSelect = async (links) => {
|
42
|
-
const AddLinks = links.map((RightId) => ({ Type: "Association", RightId: RightId }));
|
43
|
-
await documentStore.editLinks(props.id, { AddLinks });
|
44
|
-
state.addLinks = false;
|
45
|
-
};
|
46
24
|
return useObserver(() => (React.createElement(Draggable, { draggableId: state.boardcolumn.id, index: index }, (provided, snapshot) => (React.createElement(Observer, null, () => {
|
47
25
|
var _a;
|
48
26
|
return (React.createElement("div", Object.assign({ className: classnames(styles["board-column"], snapshot.isDragging && "action"),
|
@@ -54,15 +32,23 @@ const BoardColumn = (props) => {
|
|
54
32
|
state.editable ? (React.createElement(Spin, { spinning: state.loading },
|
55
33
|
React.createElement(Input.TextArea, { autoSize: true, autoFocus: true, value: state.name, onBlur: () => state.save(), onChange: e => (state.name = e.target.value) }))) : (React.createElement("div", { className: "task-card-title" }, ((_a = state.boardcolumn.name) === null || _a === void 0 ? void 0 : _a.length) > 15 ? (React.createElement(Tooltip, { title: state.boardcolumn.name, placement: "topLeft" },
|
56
34
|
React.createElement("span", null, state.boardcolumn.name))) : (state.boardcolumn.name))),
|
57
|
-
!state.editable && React.createElement("span", { className: "board-length" }, state.
|
35
|
+
!state.editable && (React.createElement("span", { className: "board-length" }, state.documents ? state.documents : state.boardcolumn.documents))),
|
58
36
|
React.createElement("div", { className: "board-control" },
|
59
|
-
React.createElement(DocumentMenu, { id: state.boardcolumn.id,
|
60
|
-
React.createElement("
|
61
|
-
React.createElement(FAIcon, { style: { marginLeft: "15px", color: props.colorStyle }, icon: faPlus })))),
|
37
|
+
React.createElement(DocumentMenu, { id: state.boardcolumn.id, icon: faEllipsisH, lock: !state.readonly, unlock: state.readonly, onEdit: state.onEdit }),
|
38
|
+
React.createElement(AddDocDropdown, { className: "board-drodown", iconColor: props.colorStyle, onItemClick: (val) => state.onItemClick(val), onCancelClick: () => state.cancel() }))),
|
62
39
|
React.createElement(Scrollbars, { autoHide: true },
|
63
|
-
React.createElement(
|
64
|
-
state.
|
40
|
+
React.createElement(SubDocument, { id: props.id, listType: "QUOTE", onDocumentData: state.onDocumentData, destination: destination, source: source })),
|
41
|
+
state.shortcut && React.createElement(DocumentSelectDialog, { onSelect: onCreateShortcut }),
|
42
|
+
state.addAble && (React.createElement(NewDocumentForm, { className: "new-sub-doc", parentId: props.id, type: state.type }))));
|
65
43
|
})))));
|
44
|
+
function onCreateShortcut(doc) {
|
45
|
+
const shortcuts = [];
|
46
|
+
doc.map(item => {
|
47
|
+
shortcuts.push({ TargetId: item, ParentId: props.id, Name: "" });
|
48
|
+
});
|
49
|
+
documentStore.createShortcuts(shortcuts);
|
50
|
+
state.shortcut = false;
|
51
|
+
}
|
66
52
|
};
|
67
53
|
export default BoardColumn;
|
68
54
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/board/components/BoardColumn/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/board/components/BoardColumn/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,cAAc,CA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,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,GAAI,CACjF,CACI,CACN,CAAA;KAAA,CACS,CACX,CACU,CACZ,CAAC,CAAC;IAEH,SAAS,gBAAgB,CAAC,GAAa;QACtC,MAAM,SAAS,GAA4B,EAAE,CAAC;QAC9C,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACd,SAAS,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;QACH,aAAa,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QACzC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC;IACxB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
@@ -71,6 +71,10 @@
|
|
71
71
|
.svg-inline--fa {
|
72
72
|
cursor: pointer;
|
73
73
|
}
|
74
|
+
.board-drodown{
|
75
|
+
background: #ffffff;
|
76
|
+
margin-left: 10px;
|
77
|
+
}
|
74
78
|
}
|
75
79
|
}
|
76
80
|
.addTask {
|
@@ -94,13 +98,14 @@
|
|
94
98
|
}
|
95
99
|
.dropZone {
|
96
100
|
/* stop the list collapsing when empty */
|
97
|
-
min-height: 250px;
|
101
|
+
// min-height: 250px;
|
102
|
+
height: 100%;
|
98
103
|
|
99
104
|
/*
|
100
105
|
not relying on the items for a margin-bottom
|
101
106
|
as it will collapse when the list is empty
|
102
107
|
*/
|
103
|
-
padding-bottom: 8px;
|
108
|
+
// padding-bottom: 8px;
|
104
109
|
}
|
105
110
|
.wrapper {
|
106
111
|
flex: 1;
|
@@ -112,6 +117,7 @@
|
|
112
117
|
transition: background-color 0.2s ease, opacity 0.1s ease;
|
113
118
|
user-select: none;
|
114
119
|
width: 250px;
|
120
|
+
height: 100%;
|
115
121
|
// background: #e6f7ff;
|
116
122
|
}
|
117
123
|
.scrollContainer {
|
@@ -121,17 +127,8 @@
|
|
121
127
|
}
|
122
128
|
.link-container {
|
123
129
|
border-radius: 2px;
|
124
|
-
// border: 2px solid transparent;
|
125
|
-
// border-color: ${props => getBorderColor(props.isDragging, props.colors)};
|
126
|
-
// background-color: ${props =>
|
127
|
-
// getBackgroundColor(props.isDragging, props.isGroupedOver, props.colors)};
|
128
|
-
// box-shadow: ${({ isDragging }) =>
|
129
|
-
// isDragging ? `2px 2px 1px ${colors.N70}` : 'none'};
|
130
|
-
// background: #ffffff;
|
131
|
-
// box-sizing: border-box;
|
132
|
-
// padding: 8px;
|
133
130
|
min-height: 40px;
|
134
|
-
|
131
|
+
margin-bottom: 15px;
|
135
132
|
user-select: none;
|
136
133
|
|
137
134
|
/* anchor overrides */
|
@@ -149,6 +146,10 @@
|
|
149
146
|
box-shadow: none;
|
150
147
|
}
|
151
148
|
|
149
|
+
// &:last-child{
|
150
|
+
// margin-bottom: 0;
|
151
|
+
// }
|
152
|
+
|
152
153
|
/* flexbox */
|
153
154
|
display: flex;
|
154
155
|
}
|
@@ -225,5 +226,14 @@
|
|
225
226
|
text-overflow: ellipsis;
|
226
227
|
text-align: right;
|
227
228
|
}
|
229
|
+
.new-sub-doc{
|
230
|
+
padding: 0;
|
231
|
+
.ant-form-item{
|
232
|
+
margin-bottom: 0;
|
233
|
+
}
|
234
|
+
.ant-spin-nested-loading{
|
235
|
+
margin: 4px 0 0 0;
|
236
|
+
}
|
237
|
+
}
|
228
238
|
}
|
229
239
|
}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { BoardColumnStore, IBoardColumn } from "../../../../data/board";
|
2
|
+
import { DocumentStore, docType } from "@voplus/morpho-document";
|
3
3
|
export declare type BoardColumnProps = {
|
4
4
|
id: string;
|
5
5
|
/** reload BoardColumn */
|
@@ -12,6 +12,7 @@ export declare type BoardColumnProps = {
|
|
12
12
|
destination?: any;
|
13
13
|
/** move 原数据 */
|
14
14
|
source?: any;
|
15
|
+
onIds?: (params?: any) => void;
|
15
16
|
};
|
16
17
|
export declare class State {
|
17
18
|
private boardColumnStore;
|
@@ -19,8 +20,10 @@ export declare class State {
|
|
19
20
|
props: BoardColumnProps;
|
20
21
|
boardcolumn: IBoardColumn;
|
21
22
|
name: string;
|
22
|
-
/** BoardColumn
|
23
|
-
|
23
|
+
/** BoardColumn documents number*/
|
24
|
+
documents: number;
|
25
|
+
/** BoardColumn sub-doucment-list id */
|
26
|
+
ids: string;
|
24
27
|
reload: boolean;
|
25
28
|
/** edit BoardColumn name */
|
26
29
|
editable: boolean;
|
@@ -30,29 +33,25 @@ export declare class State {
|
|
30
33
|
checkIds: string[];
|
31
34
|
checkAll: boolean;
|
32
35
|
multiple: boolean;
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
AddLinksAble: boolean;
|
36
|
+
shortcut: boolean;
|
37
|
+
addAble: boolean;
|
38
|
+
type: docType;
|
37
39
|
constructor(boardColumnStore: BoardColumnStore, docStore: DocumentStore);
|
38
40
|
/** DocumentMenu click edit */
|
39
41
|
onEdit: () => void;
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
onLinkNum: (links: number) => void;
|
42
|
+
/**@documents BoardColumn documents number
|
43
|
+
* @ids BoardColumn sub-document lists id[] */
|
44
|
+
onDocumentData: ({ documents, ids }: any) => void;
|
44
45
|
/** cleck */
|
45
46
|
onCheck: (checkAll: boolean) => void;
|
46
47
|
/** checkAll */
|
47
48
|
onCheckAllChange: (e: any) => void;
|
48
49
|
/** edit save BoardColumn name function*/
|
49
50
|
save(): Promise<any>;
|
50
|
-
/** delete boardColumn*/
|
51
|
-
delete(): void;
|
52
|
-
/** lock boardColumn*/
|
53
|
-
lock(): Promise<void>;
|
54
|
-
/** unlock boardColumn */
|
55
|
-
unlock(): Promise<void>;
|
56
51
|
/** BoardColumn文件是否 readonly */
|
57
52
|
get readonly(): boolean;
|
53
|
+
/** AddDocDropdown(新增type下拉Menu) item click */
|
54
|
+
onItemClick(val: docType): void;
|
55
|
+
/** documentList add Drop down more menus hidden*/
|
56
|
+
cancel(): void;
|
58
57
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import { action, computed, observable } from "mobx";
|
2
|
+
import { action, computed, observable, toJS } from "mobx";
|
3
3
|
import { message } from "@voplus/antd";
|
4
4
|
let State = /** @class */ (() => {
|
5
5
|
class State {
|
@@ -7,8 +7,10 @@ let State = /** @class */ (() => {
|
|
7
7
|
this.boardColumnStore = boardColumnStore;
|
8
8
|
this.docStore = docStore;
|
9
9
|
this.name = "";
|
10
|
-
/** BoardColumn
|
11
|
-
this.
|
10
|
+
/** BoardColumn documents number*/
|
11
|
+
this.documents = 0;
|
12
|
+
/** BoardColumn sub-doucment-list id */
|
13
|
+
this.ids = "";
|
12
14
|
this.reload = false;
|
13
15
|
/** edit BoardColumn name */
|
14
16
|
this.editable = false;
|
@@ -18,22 +20,20 @@ let State = /** @class */ (() => {
|
|
18
20
|
this.checkIds = [];
|
19
21
|
this.checkAll = false;
|
20
22
|
this.multiple = false;
|
21
|
-
|
22
|
-
this.
|
23
|
-
/** add links 如果为true 显示新增links框 */
|
24
|
-
this.AddLinksAble = false;
|
23
|
+
this.shortcut = false;
|
24
|
+
this.addAble = false;
|
25
25
|
/** DocumentMenu click edit */
|
26
26
|
this.onEdit = () => {
|
27
27
|
this.name = this.boardcolumn.name;
|
28
28
|
this.editable = !this.editable;
|
29
29
|
};
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
this.
|
30
|
+
/**@documents BoardColumn documents number
|
31
|
+
* @ids BoardColumn sub-document lists id[] */
|
32
|
+
this.onDocumentData = ({ documents, ids }) => {
|
33
|
+
var _a, _b;
|
34
|
+
this.documents = documents;
|
35
|
+
this.ids = toJS(JSON.stringify(ids));
|
36
|
+
(_b = (_a = this.props).onIds) === null || _b === void 0 ? void 0 : _b.call(_a, { id: this.props.id, ids: ids });
|
37
37
|
};
|
38
38
|
/** cleck */
|
39
39
|
this.onCheck = (checkAll) => {
|
@@ -59,24 +59,25 @@ let State = /** @class */ (() => {
|
|
59
59
|
this.boardcolumn.name = this.name;
|
60
60
|
this.editable = !this.editable;
|
61
61
|
}
|
62
|
-
/** delete boardColumn*/
|
63
|
-
delete() {
|
64
|
-
this.boardColumnStore.delete([this.boardcolumn.id], { DeleteChilds: true });
|
65
|
-
}
|
66
|
-
/** lock boardColumn*/
|
67
|
-
async lock() {
|
68
|
-
await this.docStore.edit(this.boardcolumn.id, { Status: "Readonly" });
|
69
|
-
this.boardcolumn.status = "Readonly";
|
70
|
-
}
|
71
|
-
/** unlock boardColumn */
|
72
|
-
async unlock() {
|
73
|
-
await this.docStore.edit(this.boardcolumn.id, { Status: "Normal" });
|
74
|
-
this.boardcolumn.status = "Normal";
|
75
|
-
}
|
76
62
|
/** BoardColumn文件是否 readonly */
|
77
63
|
get readonly() {
|
78
64
|
return this.boardcolumn.status === "Readonly";
|
79
65
|
}
|
66
|
+
/** AddDocDropdown(新增type下拉Menu) item click */
|
67
|
+
onItemClick(val) {
|
68
|
+
if (val.toLowerCase() === "shortcut") {
|
69
|
+
this.shortcut = true;
|
70
|
+
}
|
71
|
+
else {
|
72
|
+
this.type = val;
|
73
|
+
this.addAble = true;
|
74
|
+
}
|
75
|
+
}
|
76
|
+
/** documentList add Drop down more menus hidden*/
|
77
|
+
cancel() {
|
78
|
+
this.shortcut = false;
|
79
|
+
this.addAble = false;
|
80
|
+
}
|
80
81
|
}
|
81
82
|
__decorate([
|
82
83
|
observable
|
@@ -86,7 +87,10 @@ let State = /** @class */ (() => {
|
|
86
87
|
], State.prototype, "name", void 0);
|
87
88
|
__decorate([
|
88
89
|
observable
|
89
|
-
], State.prototype, "
|
90
|
+
], State.prototype, "documents", void 0);
|
91
|
+
__decorate([
|
92
|
+
observable
|
93
|
+
], State.prototype, "ids", void 0);
|
90
94
|
__decorate([
|
91
95
|
observable
|
92
96
|
], State.prototype, "reload", void 0);
|
@@ -110,19 +114,19 @@ let State = /** @class */ (() => {
|
|
110
114
|
], State.prototype, "multiple", void 0);
|
111
115
|
__decorate([
|
112
116
|
observable
|
113
|
-
], State.prototype, "
|
117
|
+
], State.prototype, "shortcut", void 0);
|
114
118
|
__decorate([
|
115
119
|
observable
|
116
|
-
], State.prototype, "
|
120
|
+
], State.prototype, "addAble", void 0);
|
117
121
|
__decorate([
|
118
|
-
|
119
|
-
], State.prototype, "
|
122
|
+
observable
|
123
|
+
], State.prototype, "type", void 0);
|
120
124
|
__decorate([
|
121
125
|
action
|
122
|
-
], State.prototype, "
|
126
|
+
], State.prototype, "onEdit", void 0);
|
123
127
|
__decorate([
|
124
128
|
action
|
125
|
-
], State.prototype, "
|
129
|
+
], State.prototype, "onDocumentData", void 0);
|
126
130
|
__decorate([
|
127
131
|
action
|
128
132
|
], State.prototype, "onCheck", void 0);
|
@@ -133,17 +137,14 @@ let State = /** @class */ (() => {
|
|
133
137
|
action
|
134
138
|
], State.prototype, "save", null);
|
135
139
|
__decorate([
|
136
|
-
|
137
|
-
], State.prototype, "
|
140
|
+
computed
|
141
|
+
], State.prototype, "readonly", null);
|
138
142
|
__decorate([
|
139
143
|
action
|
140
|
-
], State.prototype, "
|
144
|
+
], State.prototype, "onItemClick", null);
|
141
145
|
__decorate([
|
142
146
|
action
|
143
|
-
], State.prototype, "
|
144
|
-
__decorate([
|
145
|
-
computed
|
146
|
-
], State.prototype, "readonly", null);
|
147
|
+
], State.prototype, "cancel", null);
|
147
148
|
return State;
|
148
149
|
})();
|
149
150
|
export { State };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/board/components/BoardColumn/state.ts"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/board/components/BoardColumn/state.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UA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AG,GAAG,CAAC;gBAChB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;aACpB;QACF,CAAC;QAED,kDAAkD;QAE3C,MAAM;YACZ,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;YACtB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACtB,CAAC;KACD;IAzFY;QAAX,UAAU;8CAAkC;IACjC;QAAX,UAAU;uCAAkB;IAEjB;QAAX,UAAU;4CAAsB;IAErB;QAAX,UAAU;sCAAiB;IAChB;QAAX,UAAU;yCAAuB;IAEtB;QAAX,UAAU;2CAAyB;IAExB;QAAX,UAAU;0CAAwB;IACvB;QAAX,UAAU;0CAAwB;IACvB;QAAX,UAAU;2CAAgC;IAC/B;QAAX,UAAU;2CAAyB;IACxB;QAAX,UAAU;2CAAyB;IACxB;QAAX,UAAU;2CAAyB;IACxB;QAAX,UAAU;0CAAwB;IACvB;QAAX,UAAU;uCAAsB;IAMjC;QADC,MAAM;yCAIL;IAKF;QADC,MAAM;iDAKL;IAIF;QADC,MAAM;0CAIL;IAIF;QADC,MAAM;mDAIL;IAIF;QADC,MAAM;qCAYN;IAID;QADC,QAAQ;yCAGR;IAID;QADC,MAAM;4CAQN;IAID;QADC,MAAM;uCAIN;IACF,YAAC;KAAA;SA3FY,KAAK"}
|
@@ -1,110 +1,47 @@
|
|
1
|
-
import { Button, Checkbox
|
1
|
+
import { Button, Checkbox } from "@voplus/antd";
|
2
2
|
import React, { useState } from "react";
|
3
|
-
import { faBars,
|
3
|
+
import { faBars, faSave, faUndo } from "@fortawesome/pro-light-svg-icons";
|
4
4
|
import { useDocument, useDocumentStore } from "@voplus/morpho-document";
|
5
5
|
import Card from "@voplus/morpho-ui/es/controls/Card";
|
6
|
-
import
|
6
|
+
import DocumentName from "@voplus/morpho-document/es/components/DocumentName";
|
7
7
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
8
8
|
import FlagIcon from "@voplus/morpho-document/es/controls/FlagIcon";
|
9
|
-
import
|
9
|
+
import QuickDataIcon from "@voplus/morpho-document/es/controls/QuickDataIcon";
|
10
10
|
import { State } from "./state";
|
11
11
|
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar";
|
12
12
|
import classnames from "classnames";
|
13
13
|
import styles from "./index.less";
|
14
|
-
import { useLayout } from "@voplus/morpho-data";
|
15
14
|
import { useObserver } from "mobx-react-lite";
|
16
15
|
const DocumentCard = (props) => {
|
17
|
-
const [state] = useState(new State());
|
18
|
-
const [store] = useState(new LinkStore());
|
19
16
|
const documentStore = useDocumentStore();
|
17
|
+
const [state] = useState(new State(documentStore));
|
20
18
|
const [parentReadonly, setParentReadonly] = useState(false);
|
21
|
-
const { id
|
19
|
+
const { id } = { ...props };
|
22
20
|
state.reload = !!props.reload;
|
23
21
|
state.document = useDocument(props.id, { reload: parentReadonly });
|
24
22
|
const readonly = state.document.status === "Readonly";
|
25
|
-
const onSave = async () => {
|
26
|
-
if (!state.name) {
|
27
|
-
return message.warn("Title is required");
|
28
|
-
}
|
29
|
-
if (state.name.trim() === state.document.name) {
|
30
|
-
// 没有变动无需请求
|
31
|
-
return (state.editable = false);
|
32
|
-
}
|
33
|
-
state.loading = true;
|
34
|
-
await documentStore.edit(props.id, { Name: state.name });
|
35
|
-
state.editable = !state.editable;
|
36
|
-
state.loading = false;
|
37
|
-
};
|
38
|
-
const onEdit = () => {
|
39
|
-
state.name = state.document.name;
|
40
|
-
state.isHover = false;
|
41
|
-
state.editable = !state.editable;
|
42
|
-
};
|
43
|
-
const onDelete = () => {
|
44
|
-
documentStore.editLinks(props.leftId, { RemoveLinks: [props.linkId] });
|
45
|
-
};
|
46
|
-
const onMove = () => {
|
47
|
-
store.onMove([{ leftId: leftId, rightId: id, linkId: linkId }]);
|
48
|
-
};
|
49
|
-
const onPaste = async () => {
|
50
|
-
const moveIds = store.moveIds.map((item) => item.rightId);
|
51
|
-
if (moveIds.some((id) => id === props.id))
|
52
|
-
return message.warn("Cannot move to itself");
|
53
|
-
store.onPaste(async () => {
|
54
|
-
await documentStore.move(moveIds, id);
|
55
|
-
});
|
56
|
-
state.reload = true;
|
57
|
-
};
|
58
|
-
const onLock = () => {
|
59
|
-
documentStore.edit(state.document.id, { Status: "Readonly" });
|
60
|
-
};
|
61
|
-
const onUnlock = () => {
|
62
|
-
documentStore.edit(state.document.id, { Status: "Normal" });
|
63
|
-
};
|
64
|
-
const onChangeImportant = (e) => {
|
65
|
-
if (readonly)
|
66
|
-
return;
|
67
|
-
e.stopPropagation();
|
68
|
-
};
|
69
|
-
const layout = useLayout();
|
70
|
-
layout.history.listen(() => {
|
71
|
-
state.visible = false;
|
72
|
-
state.visibleQuickView = false;
|
73
|
-
});
|
74
|
-
const iconList = (React.createElement(React.Fragment, null,
|
75
|
-
React.createElement("span", null,
|
76
|
-
React.createElement(FAIcon, { icon: faPaperclip }),
|
77
|
-
state.document.documents || 0),
|
78
|
-
React.createElement("span", null,
|
79
|
-
React.createElement(FAIcon, { icon: faCommentDots }),
|
80
|
-
state.document.comments || 0),
|
81
|
-
React.createElement("span", null,
|
82
|
-
React.createElement(FAIcon, { icon: faCopy }),
|
83
|
-
0)));
|
84
23
|
const { multiple } = props;
|
85
24
|
return useObserver(() => {
|
86
|
-
var _a
|
25
|
+
var _a;
|
87
26
|
return (React.createElement(Card, { className: styles["task-card"], padding: "15px 12px", shadow: true },
|
88
27
|
React.createElement("div", { className: "task-card-item", onMouseOver: () => (state.isHover = true), onMouseLeave: () => (state.isHover = false) },
|
89
28
|
React.createElement("div", { className: "task-card-head" },
|
90
29
|
multiple && React.createElement(Checkbox, { value: state.document.id, className: "multiple-box" }),
|
91
|
-
!multiple && (React.createElement(FlagIcon, { id: state.document.id, editable: !readonly, flag: state.document.flag,
|
92
|
-
|
93
|
-
React.createElement(Input.TextArea, { className: "task-card-title", autoSize: true, autoFocus: true, value: state.name, onChange: e => (state.name = e.target.value) }))) : (React.createElement("div", { className: "task-card-title", onClick: () => (state.visibleQuickView = true) }, ((_a = state.document.name) === null || _a === void 0 ? void 0 : _a.length) > 25 ? (React.createElement(Tooltip, { title: state.document.name, placement: "topLeft" },
|
94
|
-
React.createElement("span", null, state.document.name))) : (state.document.name)))),
|
30
|
+
!multiple && (React.createElement(FlagIcon, { id: state.document.id, editable: !readonly, flag: state.document.flag, className: "task-flag" })),
|
31
|
+
React.createElement(DocumentName, { id: id, includes: "tags,task-number-reports", editable: state.editable, onChange: value => (state.name = value), className: "task-name", status: false, showTags: false })),
|
95
32
|
React.createElement("div", { className: "task-card-control" },
|
96
33
|
state.isHover &&
|
97
|
-
!multiple && ((
|
98
|
-
|
34
|
+
!multiple && ((_a = props.connectDragSource) === null || _a === void 0 ? void 0 : _a.call(props, React.createElement("span", { className: classnames("task-icon-move", { show: state.editable }) }, React.createElement(FAIcon, { icon: faBars })))),
|
35
|
+
React.createElement("div", null,
|
36
|
+
React.createElement(QuickDataIcon, { id: id }))),
|
99
37
|
React.createElement("div", { className: "task-card-label" },
|
100
38
|
state.isHover && !state.editable && (React.createElement("div", { className: classnames("hover-operate-icon", { show: state.isHover }) },
|
101
|
-
React.createElement(ToolBar, { id: props.id, size: "small", url: `/document/${props.id}`, edit: false, hoverEdit: !readonly,
|
39
|
+
React.createElement(ToolBar, { id: props.id, size: "small", url: `/document/${props.id}`, edit: false, hoverEdit: !readonly, onEdit: () => state.onEdit() }))),
|
102
40
|
state.editable && (React.createElement("div", { className: "task-card-editable-name" },
|
103
|
-
React.createElement(Button, { shape: "circle",
|
41
|
+
React.createElement(Button, { shape: "circle", onClick: () => (state.editable = false) },
|
104
42
|
React.createElement(FAIcon, { icon: faUndo })),
|
105
|
-
React.createElement(Button, { type: "primary",
|
106
|
-
React.createElement(FAIcon, { icon: faSave }))))))
|
107
|
-
React.createElement(DocumentQuickViewDialog, { id: props.id, doc: state.document, visible: state.visibleQuickView, onCancel: () => (state.visibleQuickView = false) })));
|
43
|
+
React.createElement(Button, { type: "primary", ghost: true, shape: "circle", disabled: !state.hasChanges, loading: state.loading, className: "margin-left-10", onClick: () => state.save() },
|
44
|
+
React.createElement(FAIcon, { icon: faSave }))))))));
|
108
45
|
});
|
109
46
|
};
|
110
47
|
export default DocumentCard;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/board/components/DocumentCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/board/components/DocumentCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAExE,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,QAAQ,MAAM,8CAA8C,CAAC;AACpE,OAAO,aAAa,MAAM,mDAAmD,CAAC;AAC9E,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,OAAO,MAAM,6CAA6C,CAAC;AAClE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,YAAY,GAAG,CAAC,KAKrB,EAAE,EAAE;IACJ,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC;I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