@voplus/morpho-workspace 6.0.35 → 6.0.37
Sign up to get free protection for your applications and to get access to all the features.
- package/es/data/workspace/WorkSpaceStore.d.ts +5 -7
- package/es/data/workspace/WorkSpaceStore.js +3 -3
- package/es/data/workspace/WorkSpaceStore.js.map +1 -1
- package/es/data/workspace/interfaces.d.ts +2 -5
- package/es/data/workspace/types.d.ts +5 -0
- package/es/modules/tasks/components/TaskCheckActiveTab/index.js +43 -35
- package/es/modules/tasks/components/TaskCheckActiveTab/index.js.map +1 -1
- package/es/modules/tasks/components/TaskCheckActiveTab/index.less +11 -0
- package/es/modules/tasks/components/TaskCheckDoneTab/index.js +1 -1
- package/es/modules/tasks/components/TaskCheckDoneTab/index.js.map +1 -1
- package/es/modules/tasks/components/TaskCheckItem/index.d.ts +2 -0
- package/es/modules/tasks/components/TaskCheckItem/index.js +27 -17
- package/es/modules/tasks/components/TaskCheckItem/index.js.map +1 -1
- package/es/modules/tasks/components/TaskCheckItem/index.less +20 -0
- package/es/modules/tasks/components/TaskCheckItem/state.d.ts +9 -0
- package/es/modules/tasks/components/TaskCheckItem/state.js +43 -0
- package/es/modules/tasks/components/TaskCheckItem/state.js.map +1 -0
- package/es/modules/tasks/components/TaskCheckNewForm/index.js +39 -20
- package/es/modules/tasks/components/TaskCheckNewForm/index.js.map +1 -1
- package/es/modules/tasks/components/TaskCheckNewForm/index.less +13 -0
- package/es/modules/workspace/controls/WorkspaceMenu/index.js +22 -16
- package/es/modules/workspace/controls/WorkspaceMenu/index.js.map +1 -1
- package/package.json +1 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import { ApiEndPoint } from "@voplus/api";
|
2
2
|
import { CountedMap, Store } from "@voplus/morpho-data";
|
3
|
-
import { CreateWorkspaceOptions, EditWorkspaceOptions, IWorkspace, LoadWorkspaceOptions } from "./";
|
3
|
+
import { CreateWorkspaceOptions, EditWorkspaceOptions, IWorkspace, LoadWorkspaceOptions, DeleteWorkspaceOptions } from "./";
|
4
4
|
import { IDocumentAccessSettings, LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
5
5
|
/** Workspace store provides service for workspace operations */
|
6
6
|
export declare class WorkspaceStore extends Store {
|
@@ -18,9 +18,9 @@ export declare class WorkspaceStore extends Store {
|
|
18
18
|
/** All currently used workspace. */
|
19
19
|
readonly items: CountedMap<string, IWorkspace>;
|
20
20
|
/** Load a workspace from server.
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
* @param {string} id - id of the workspace.
|
22
|
+
* @param {LoadWorkspaceOptions} options - Optional load options.
|
23
|
+
*/
|
24
24
|
load(id: string, options?: LoadWorkspaceOptions): Promise<IWorkspace>;
|
25
25
|
/** Load a list of workspaces from server.
|
26
26
|
* @param {LoadDocumentListOptions}
|
@@ -30,9 +30,7 @@ export declare class WorkspaceStore extends Store {
|
|
30
30
|
create(options: CreateWorkspaceOptions): Promise<IWorkspace>;
|
31
31
|
/** Edit an existing item on server. */
|
32
32
|
edit(id: string, options: EditWorkspaceOptions): Promise<any>;
|
33
|
-
delete(ids: string[], options:
|
34
|
-
DeleteChilds?: boolean;
|
35
|
-
}): Promise<IWorkspace[]>;
|
33
|
+
delete(ids: string[], options: DeleteWorkspaceOptions): Promise<IWorkspace[]>;
|
36
34
|
loadAccess(id: string): Promise<IDocumentAccessSettings>;
|
37
35
|
}
|
38
36
|
/** React hook to retrieve WorkspaceStore */
|
@@ -53,9 +53,9 @@ export class WorkspaceStore extends Store {
|
|
53
53
|
});
|
54
54
|
}
|
55
55
|
/** Load a workspace from server.
|
56
|
-
|
57
|
-
|
58
|
-
|
56
|
+
* @param {string} id - id of the workspace.
|
57
|
+
* @param {LoadWorkspaceOptions} options - Optional load options.
|
58
|
+
*/
|
59
59
|
async load(id, options) {
|
60
60
|
options = options !== null && options !== void 0 ? options : {};
|
61
61
|
let query = "";
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WorkSpaceStore.js","sourceRoot":"","sources":["../../../src/data/workspace/WorkSpaceStore.ts"],"names":[],"mappings":";AAAA,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plus/morpho-document-core";
|
2
3
|
export type MessageStatus = "New" | "Due" | "Pending" | "Done" | "Cancelled";
|
3
|
-
export interface IWorkspace extends ILoadable {
|
4
|
+
export interface IWorkspace extends ILoadable, INode {
|
4
5
|
/** id of the workspace. */
|
5
6
|
id: string;
|
6
7
|
/** name of the workspace. */
|
@@ -11,10 +12,6 @@ export interface IWorkspace extends ILoadable {
|
|
11
12
|
stats?: {
|
12
13
|
activeWorks: number;
|
13
14
|
};
|
14
|
-
/** actions of the workspace */
|
15
|
-
actions?: {
|
16
|
-
canDelete: boolean;
|
17
|
-
};
|
18
15
|
/** Create date of the workspace. */
|
19
16
|
createDate?: string;
|
20
17
|
/** Owner of the workspace. */
|
@@ -58,41 +58,49 @@ const TaskCheckActiveTab = (props) => {
|
|
58
58
|
state.update([doc], "del");
|
59
59
|
}
|
60
60
|
});
|
61
|
-
return observe(() =>
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
61
|
+
return observe(() => {
|
62
|
+
const items = [];
|
63
|
+
if (state.dueList.length)
|
64
|
+
items.push({
|
65
|
+
key: "Due",
|
66
|
+
label: "Due",
|
67
|
+
children: (React.createElement(React.Fragment, null, state.dueList.map((item) => (React.createElement(DocumentItemFrame, { key: item.id },
|
68
|
+
React.createElement(TaskCheckItem, { id: item.id, dueDate: true })))))),
|
69
|
+
});
|
70
|
+
if (state.todayList.length)
|
71
|
+
items.push({
|
72
|
+
key: "Today",
|
73
|
+
label: "Today",
|
74
|
+
children: (React.createElement(React.Fragment, null, state.todayList.map((item) => (React.createElement(DocumentItemFrame, { key: item.id },
|
75
|
+
React.createElement(TaskCheckItem, { id: item.id })))))),
|
76
|
+
});
|
77
|
+
if (state.tomorrowList.length)
|
78
|
+
items.push({
|
79
|
+
key: "Tomorrow",
|
80
|
+
label: "Tomorrow",
|
81
|
+
children: (React.createElement(React.Fragment, null, state.tomorrowList.map((item) => (React.createElement(DocumentItemFrame, { key: item.id },
|
82
|
+
React.createElement(TaskCheckItem, { id: item.id })))))),
|
83
|
+
});
|
84
|
+
if (state.thisWeekList.length)
|
85
|
+
items.push({
|
86
|
+
key: "This Week",
|
87
|
+
label: "This Week",
|
88
|
+
children: (React.createElement(React.Fragment, null, state.thisWeekList.map((item) => (React.createElement(DocumentItemFrame, { key: item.id },
|
89
|
+
React.createElement(TaskCheckItem, { id: item.id })))))),
|
90
|
+
});
|
91
|
+
if (state.upcomingList.length)
|
92
|
+
items.push({
|
93
|
+
key: "Upcoming",
|
94
|
+
label: "Upcoming",
|
95
|
+
children: (React.createElement(React.Fragment, null, state.upcomingList.map((item) => (React.createElement(DocumentItemFrame, { key: item.id },
|
96
|
+
React.createElement(TaskCheckItem, { id: item.id, dueDate: true })))))),
|
97
|
+
});
|
98
|
+
return (React.createElement(ListDataContext.Provider, { value: list },
|
99
|
+
React.createElement("div", { className: "active-tab-task-list" },
|
100
|
+
React.createElement(Skeleton, { loading: list.loading },
|
101
|
+
React.createElement(Collapse, { className: "active-task-collapse", bordered: false, defaultActiveKey: ["Due", "Today", "Tomorrow", "This Week", "Upcoming"], expandIcon: ({ isActive }) => React.createElement(CaretRightOutlined, { rotate: isActive ? 90 : 0 }), items: items }),
|
102
|
+
!items.length && React.createElement(Empty, null)))));
|
103
|
+
});
|
96
104
|
};
|
97
105
|
export default TaskCheckActiveTab;
|
98
106
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskCheckActiveTab/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACjD,OAAO,EAAiB,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,aAAa,MAAM,kBAAkB,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskCheckActiveTab/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACjD,OAAO,EAAiB,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,iBAAiB,MAAM,uDAAuD,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAS,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACxE,OAAO,cAAc,CAAC;AAEtB,MAAM,kBAAkB,GAAG,CAAC,KAA2D,EAAE,EAAE;IAC1F,MAAM,EAAE,QAAQ,EAAE,c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,EAAE,UAAU;gBACjB,QAAQ,EAAE,CACT,0CACE,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACjC,oBAAC,iBAAiB,IAAC,GAAG,EAAE,IAAI,CAAC,EAAE;oBAC9B,oBAAC,aAAa,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,OAAO,SAAG,CACnB,CACpB,CAAC,CACA,CACH;aACD,CAAC,CAAC;QAEJ,OAAO,CACN,oBAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI;YACpC,6BAAK,SAAS,EAAC,sBAAsB;gBACpC,oBAAC,QAAQ,IAAC,OAAO,EAAE,IAAI,CAAC,OAAO;oBAC9B,oBAAC,QAAQ,IACR,SAAS,EAAC,sBAAsB,EAChC,QAAQ,EAAE,KAAK,EACf,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,EACvE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,oBAAC,kBAAkB,IAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAI,EAC/E,KAAK,EAAE,KAAK,GACX;oBACD,CAAC,KAAK,CAAC,MAAM,IAAI,oBAAC,KAAK,OAAG,CACjB,CACN,CACoB,CAC3B,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
@@ -4,6 +4,17 @@
|
|
4
4
|
background: #fff;
|
5
5
|
.ant-collapse-item {
|
6
6
|
border-bottom: none;
|
7
|
+
.ant-collapse-header {
|
8
|
+
font-size: 20px;
|
9
|
+
color: #000;
|
10
|
+
align-items: center;
|
11
|
+
}
|
12
|
+
.ant-collapse-arrow {
|
13
|
+
font-size: 20px;
|
14
|
+
}
|
15
|
+
.document-name {
|
16
|
+
color: #797979;
|
17
|
+
}
|
7
18
|
}
|
8
19
|
}
|
9
20
|
}
|
@@ -54,7 +54,7 @@ const TaskCheckDoneTab = (props) => {
|
|
54
54
|
});
|
55
55
|
return observe(() => (React.createElement(ListDataContext.Provider, { value: list },
|
56
56
|
React.createElement(ListView, { renderId: props.parentId, asideable: false, headerProps: { visible: false }, renderItem: ({ item }) => (React.createElement(DocumentItemFrame, { key: item.id },
|
57
|
-
React.createElement(TaskCheckItem, { id: item.id }))) }))));
|
57
|
+
React.createElement(TaskCheckItem, { id: item.id, dueDate: true }))) }))));
|
58
58
|
};
|
59
59
|
export default TaskCheckDoneTab;
|
60
60
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskCheckDoneTab/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAiB,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAC7C,OAAO,iBAAiB,MAAM,uDAAuD,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,QAAQ,MAAM,2DAA2D,CAAC;AACjF,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAS,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AAExE,MAAM,gBAAgB,GAAG,CAAC,KAA2D,EAAE,EAAE;IACxF,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC;IAC3C,MAAM,CAAC,KAAK,CA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CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
@@ -1,26 +1,36 @@
|
|
1
|
-
import React, { useState
|
1
|
+
import React, { useState } from "react";
|
2
2
|
import { observe } from "@voplus/morpho-ui";
|
3
|
-
import {
|
4
|
-
import
|
5
|
-
import
|
3
|
+
import { Checkbox, message } from "antd";
|
4
|
+
import classnames from "classnames";
|
5
|
+
import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
6
|
+
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
6
7
|
import FlagIcon from "@voplus/morpho-document/es/controls/data-icons/FlagIcon";
|
7
|
-
import { useTask, useTaskStore } from "@voplus/morpho-document-core";
|
8
|
+
import { useTask, useTaskStore, useMetaStore } from "@voplus/morpho-document-core";
|
9
|
+
import dayjs from "dayjs";
|
10
|
+
import { State } from "./state";
|
8
11
|
import DocumentHeader from "@voplus/morpho-document/es/components/DocumentHeader";
|
9
12
|
import "./index.less";
|
10
13
|
const TaskCheckItem = (props) => {
|
11
|
-
const { id } = props;
|
12
|
-
const
|
14
|
+
const { id, dueDate } = props;
|
15
|
+
const [state] = useState(new State());
|
16
|
+
const meta = useMetaStore();
|
13
17
|
const taskStore = useTaskStore();
|
14
|
-
const
|
15
|
-
|
16
|
-
return observe(() => (React.createElement(DocumentHeader, { id: id, flagVisible: false, tagsVisible: false, quickDataBarVisible: false, className: "task-check-item", clickNameEffect: "default",
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
18
|
+
const task = useTask(id);
|
19
|
+
state.update(task);
|
20
|
+
return observe(() => (React.createElement(DocumentHeader, { id: id, flagVisible: false, tagsVisible: false, quickDataBarVisible: false, className: "task-check-item", clickNameEffect: "default", onMouse: (over) => (state.isHover = over), pre: React.createElement("div", null,
|
21
|
+
React.createElement(Checkbox, { checked: state.checked, onChange: async (e) => {
|
22
|
+
state.checked = e.target.checked;
|
23
|
+
await taskStore.edit(task.id, {
|
24
|
+
data: { TaskStatus: e.target.checked === true ? "Done" : "Progress" },
|
25
|
+
error: (error) => message.error(error.message),
|
26
|
+
});
|
27
|
+
state.checked = task.taskStatus === "Done";
|
28
|
+
} }),
|
29
|
+
React.createElement(FlagIcon, { id: task.id, flag: task.flag, editable: !task.readonly })), tools: React.createElement(React.Fragment, null,
|
30
|
+
dueDate && task.dueDate && (React.createElement("span", { className: classnames("task-dueDate", { hide: state.isHover }) }, dayjs(task.dueDate).format("DD MMM YYYY"))),
|
31
|
+
React.createElement("div", { className: classnames("hover-operate-icon", { show: state.isHover }) },
|
32
|
+
React.createElement(ToolBar, { id: id, moreProps: { buttonProps: { size: "middle" } } },
|
33
|
+
React.createElement(Open, { size: "middle", url: meta.getRoute(task) })))) })));
|
24
34
|
};
|
25
35
|
export default TaskCheckItem;
|
26
36
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskCheckItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskCheckItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACzC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAC3E,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,QAAQ,MAAM,yDAAyD,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACnF,OA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Y,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;qBACrD,CAAC,CAAC;oBACH,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,KAAK,MAAM,CAAC;gBAC5C,CAAC,GACA;YACF,oBAAC,QAAQ,IAAC,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,QAAQ,EAAE,CAAC,IAAI,CAAC,QAAQ,GAAI,CAC/D,EAEP,KAAK,EACJ;YACE,OAAO,IAAI,IAAI,CAAC,OAAO,IAAI,CAC3B,8BAAM,SAAS,EAAE,UAAU,CAAC,cAAc,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,IAClE,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CACpC,CACP;YACD,6BAAK,SAAS,EAAE,UAAU,CAAC,oBAAoB,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;gBACxE,oBAAC,OAAO,IAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;oBAC9D,oBAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAI,CACvC,CACL,CACJ,GAEH,CACF,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
@@ -1,8 +1,28 @@
|
|
1
1
|
:global {
|
2
2
|
.task-check-item {
|
3
|
+
position: relative;
|
3
4
|
cursor: pointer;
|
4
5
|
align-items: center;
|
5
6
|
background-color: transparent;
|
6
7
|
padding: 10px 20px 10px 0;
|
8
|
+
.task-dueDate {
|
9
|
+
opacity: 1;
|
10
|
+
// transition: opacity 0.3s;
|
11
|
+
flex-shrink: 0;
|
12
|
+
&.hide {
|
13
|
+
opacity: 0;
|
14
|
+
}
|
15
|
+
}
|
16
|
+
.hover-operate-icon {
|
17
|
+
display: none;
|
18
|
+
position: absolute;
|
19
|
+
right: 20px;
|
20
|
+
.ant-btn:first-child {
|
21
|
+
margin-left: 0;
|
22
|
+
}
|
23
|
+
&.show {
|
24
|
+
display: block;
|
25
|
+
}
|
26
|
+
}
|
7
27
|
}
|
8
28
|
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { makeObservable, observable, action } from "mobx";
|
3
|
+
export class State {
|
4
|
+
constructor() {
|
5
|
+
/** */
|
6
|
+
Object.defineProperty(this, "checked", {
|
7
|
+
enumerable: true,
|
8
|
+
configurable: true,
|
9
|
+
writable: true,
|
10
|
+
value: false
|
11
|
+
});
|
12
|
+
Object.defineProperty(this, "isHover", {
|
13
|
+
enumerable: true,
|
14
|
+
configurable: true,
|
15
|
+
writable: true,
|
16
|
+
value: false
|
17
|
+
});
|
18
|
+
Object.defineProperty(this, "task", {
|
19
|
+
enumerable: true,
|
20
|
+
configurable: true,
|
21
|
+
writable: true,
|
22
|
+
value: void 0
|
23
|
+
});
|
24
|
+
makeObservable(this);
|
25
|
+
}
|
26
|
+
update(task) {
|
27
|
+
this.task = task;
|
28
|
+
this.checked = task.taskStatus === "Done";
|
29
|
+
}
|
30
|
+
}
|
31
|
+
__decorate([
|
32
|
+
observable
|
33
|
+
], State.prototype, "checked", void 0);
|
34
|
+
__decorate([
|
35
|
+
observable
|
36
|
+
], State.prototype, "isHover", void 0);
|
37
|
+
__decorate([
|
38
|
+
observable
|
39
|
+
], State.prototype, "task", void 0);
|
40
|
+
__decorate([
|
41
|
+
action
|
42
|
+
], State.prototype, "update", null);
|
43
|
+
//# sourceMappingURL=state.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskCheckItem/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAG1D,MAAM,OAAO,KAAK;IACjB;QAIA,OAAO;QACY;;;;mBAAU,KAAK;WAAC;QAChB;;;;mBAAU,KAAK;WAAC;QAChB;;;;;WAAY;QAN9B,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAOc,MAAM,CAAC,IAAW;QAChC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,UAAU,KAAK,MAAM,CAAC;IAC3C,CAAC;CACD;AARmB;IAAlB,UAAU;sCAAwB;AAChB;IAAlB,UAAU;sCAAwB;AAChB;IAAlB,UAAU;mCAAoB;AAEhB;IAAd,MAAM;mCAGN"}
|
@@ -1,35 +1,54 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
|
-
import {
|
2
|
+
import { Col, Spin, Form, Input, Row, message } from "antd";
|
3
3
|
import { State } from "./state";
|
4
4
|
import { observe } from "@voplus/morpho-ui";
|
5
|
+
import PresetDatePicker from "@voplus/morpho-ui/es/controls/PresetDatePicker";
|
5
6
|
import { runInAction } from "mobx";
|
6
7
|
import { useTaskStore } from "@voplus/morpho-document-core";
|
8
|
+
import { faListAlt } from "@fortawesome/pro-light-svg-icons";
|
9
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
7
10
|
import classnames from "classnames";
|
8
11
|
import "./index.less";
|
12
|
+
import dayjs from "dayjs";
|
9
13
|
const TaskCheckNewForm = (props) => {
|
10
14
|
const tasks = useTaskStore();
|
11
15
|
const [state] = useState(new State());
|
12
16
|
return observe(() => (React.createElement("div", { className: classnames("new-task-check-form", props.className) },
|
13
17
|
React.createElement(Form, { layout: "vertical" },
|
14
|
-
React.createElement(
|
15
|
-
React.createElement(
|
16
|
-
React.createElement(
|
17
|
-
React.createElement(
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
{
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
18
|
+
React.createElement(Spin, { spinning: state.loading },
|
19
|
+
React.createElement(Form.Item, null,
|
20
|
+
React.createElement(Row, { justify: "space-between" },
|
21
|
+
React.createElement(Col, { flex: 1 },
|
22
|
+
React.createElement(Input, { autoFocus: true, value: state.params.Name, className: "task-name-input", placeholder: `Enter a title for this task`, onChange: (e) => runInAction(() => (state.params.Name = e.target.value)), onPressEnter: onSubmit, onKeyDown: onKeyDown })),
|
23
|
+
React.createElement(Col, null,
|
24
|
+
React.createElement("span", { onClick: onShowMore, className: "detailed" },
|
25
|
+
React.createElement(FAIcon, { icon: faListAlt, size: "lg" }))))),
|
26
|
+
state.showMore && (React.createElement(Form.Item, null,
|
27
|
+
React.createElement(Row, { justify: "space-between" },
|
28
|
+
React.createElement(Col, { flex: 1 },
|
29
|
+
React.createElement(PresetDatePicker, { onChange: (preset, date) => {
|
30
|
+
state.params.DueDate = preset
|
31
|
+
? dayjs(preset).format("YYYY-MM-DD")
|
32
|
+
: dayjs(date).format("YYYY-MM-DD");
|
33
|
+
const dateElement = document.querySelector(".ant-picker-input input");
|
34
|
+
const inputlement = document.querySelector(".task-name-input");
|
35
|
+
if (dateElement) {
|
36
|
+
dateElement.blur();
|
37
|
+
}
|
38
|
+
if (inputlement) {
|
39
|
+
inputlement.focus();
|
40
|
+
}
|
41
|
+
}, style: { width: "100%" } })),
|
42
|
+
React.createElement(Col, null,
|
43
|
+
React.createElement("span", { className: "dueDate" }, "Due Dtae"))))))))));
|
44
|
+
function onKeyDown(e) {
|
45
|
+
if (e.keyCode !== 27)
|
46
|
+
return;
|
47
|
+
onCancel();
|
48
|
+
}
|
49
|
+
function onShowMore() {
|
50
|
+
state.showMore = !state.showMore;
|
51
|
+
}
|
33
52
|
async function onSubmit() {
|
34
53
|
var _a;
|
35
54
|
if (!state.params.Name)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskCheckNewForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskCheckNewForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,gBAAgB,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,gBAAgB,GAAG,CAAC,KAKzB,EAAE,EAAE;IACJ,MAAM,KAAK,GAAG,YAAY,EAAE,CAAC;IAC7B,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAEtC,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,6BAAK,SAAS,EAAE,UAAU,CAAC,qBAAqB,EAAE,KAAK,CAAC,SAAS,CAAC;QAEjE,oBAAC,IAAI,IAAC,MAAM,EAA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ACD,kBAAkB;IAClB,SAAS,QAAQ;;QAChB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,MAAA,KAAK,CAAC,QAAQ,qDAAI,CAAC;IACpB,CAAC;AACF,CAAC,CAAC;AACF,eAAe,gBAAgB,CAAC"}
|
@@ -1,8 +1,21 @@
|
|
1
|
+
@import "~@voplus/morpho-theme/styles/index.less";
|
2
|
+
|
1
3
|
:global {
|
2
4
|
.new-task-check-form {
|
3
5
|
padding: 10px 20px 0;
|
4
6
|
.ant-form-item {
|
5
7
|
margin-bottom: 10px;
|
8
|
+
.detailed {
|
9
|
+
font-size: 20px;
|
10
|
+
margin-left: 10px;
|
11
|
+
cursor: pointer;
|
12
|
+
}
|
13
|
+
.dueDate{
|
14
|
+
// font-size: 20px;
|
15
|
+
line-height: 30px;
|
16
|
+
color: @heading-subtitle-color;
|
17
|
+
margin-left: 10px;
|
18
|
+
}
|
6
19
|
}
|
7
20
|
}
|
8
21
|
}
|
@@ -2,35 +2,41 @@ import React from "react";
|
|
2
2
|
import { Button } from "antd";
|
3
3
|
import { useWorkspace, useWorkspaceStore } from "../../../../data/workspace";
|
4
4
|
import { faEllipsisVertical, faUserLock, faUserUnlock } from "@fortawesome/pro-light-svg-icons";
|
5
|
-
import { observe } from "@voplus/morpho-ui";
|
5
|
+
import { observe, useAsideContentContext } from "@voplus/morpho-ui";
|
6
|
+
import { useApplicationContext } from "@voplus/morpho-data";
|
6
7
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
7
8
|
import { Paste, Access, Delete } from "@voplus/morpho-org/es/controls/NodeMenu/items";
|
8
9
|
import NodeMenu from "@voplus/morpho-org/es/controls/NodeMenu";
|
9
10
|
const WorkspaceMenu = (props) => {
|
10
11
|
/** 加class name 为了方便做integration tests */
|
11
12
|
const classId = "workSpace-menu";
|
13
|
+
const asideContext = useAsideContentContext();
|
14
|
+
const { user } = useApplicationContext();
|
12
15
|
const store = useWorkspaceStore();
|
13
16
|
const workspace = useWorkspace(props.id, {
|
14
|
-
reload: (i) => !i.
|
15
|
-
includes: "
|
16
|
-
});
|
17
|
-
return observe(() => {
|
18
|
-
var _a, _b, _c;
|
19
|
-
return (React.createElement(NodeMenu, { id: props.id, icon: React.createElement(FAIcon, { icon: faEllipsisVertical }), menus: React.createElement(React.Fragment, null,
|
20
|
-
((_a = workspace.actions) === null || _a === void 0 ? void 0 : _a.canDelete) && React.createElement(Delete, { closeAside: props.closeAside }),
|
21
|
-
!((_b = workspace.actions) === null || _b === void 0 ? void 0 : _b.canDelete) && workspace.status === "Active" && (React.createElement(Button, { type: "link", onClick: () => onChangeStatus("Disabled"), className: classId + "-disabled" },
|
22
|
-
React.createElement(FAIcon, { icon: faUserLock }),
|
23
|
-
React.createElement("span", null, "Disabled"))),
|
24
|
-
!((_c = workspace.actions) === null || _c === void 0 ? void 0 : _c.canDelete) && workspace.status === "Disabled" && (React.createElement(Button, { type: "link", onClick: () => onChangeStatus("Enable"), className: classId + "-enable" },
|
25
|
-
React.createElement(FAIcon, { icon: faUserUnlock }),
|
26
|
-
React.createElement("span", null, "Enable"))),
|
27
|
-
React.createElement(Access, null),
|
28
|
-
React.createElement(Paste, { types: ["Document", "WorkTypeNode"] })) }));
|
17
|
+
reload: (i) => !i.p,
|
18
|
+
includes: "permissions",
|
29
19
|
});
|
20
|
+
return observe(() => (React.createElement(NodeMenu, { id: props.id, icon: React.createElement(FAIcon, { icon: faEllipsisVertical }), menus: React.createElement(React.Fragment, null,
|
21
|
+
user.can("delete", workspace.p) && React.createElement(Delete, { action: onDelete }),
|
22
|
+
user.can("disable", workspace.p) && (React.createElement(Button, { type: "link", onClick: () => onChangeStatus("Disabled"), className: classId + "-disabled" },
|
23
|
+
React.createElement(FAIcon, { icon: faUserLock }),
|
24
|
+
React.createElement("span", null, "Disabled"))),
|
25
|
+
user.can("enable", workspace.p) && (React.createElement(Button, { type: "link", onClick: () => onChangeStatus("Enable"), className: classId + "-enable" },
|
26
|
+
React.createElement(FAIcon, { icon: faUserUnlock }),
|
27
|
+
React.createElement("span", null, "Enable"))),
|
28
|
+
React.createElement(Access, null),
|
29
|
+
React.createElement(Paste, { types: ["Document", "WorkTypeNode"] })) })));
|
30
30
|
/** Disabled/Enable function */
|
31
31
|
function onChangeStatus(status) {
|
32
32
|
store.edit(props.id, { data: { Status: status }, error: "message" });
|
33
33
|
}
|
34
|
+
function onDelete() {
|
35
|
+
store.delete([props.id], { data: { DeleteChilds: true }, error: "message" });
|
36
|
+
/** 删除后是否关闭Aside */
|
37
|
+
if (!!props.closeAside && (asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent))
|
38
|
+
asideContext === null || asideContext === void 0 ? void 0 : asideContext.closeAside();
|
39
|
+
}
|
34
40
|
};
|
35
41
|
export default WorkspaceMenu;
|
36
42
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/controls/WorkspaceMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/workspace/controls/WorkspaceMenu/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAc,MAAM,4BAA4B,CAAC;AACzF,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,eAAe,IAAI,MAAM,EA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