@voplus/morpho-workspace 1.1.0-dev038 → 1.1.0-dev040
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 +9 -0
- package/es/controls/MoreOperateDropdown/index.d.ts +1 -1
- package/es/controls/NewCardButton/index.d.ts +6 -0
- package/es/controls/NewCardButton/index.js +9 -0
- package/es/controls/NewCardButton/index.js.map +1 -0
- package/es/controls/NewCardButton/index.less +22 -0
- package/es/modules/board/components/BoardPropertiesView/index.d.ts +7 -0
- package/es/modules/board/components/BoardPropertiesView/index.js +35 -0
- package/es/modules/board/components/BoardPropertiesView/index.js.map +1 -0
- package/es/modules/board/components/BoardPropertiesView/index.less +12 -0
- package/es/modules/board/pages/BoardViewList/index.js +13 -4
- package/es/modules/board/pages/BoardViewList/index.js.map +1 -1
- package/es/modules/board/pages/BoardViewList/state.d.ts +0 -1
- package/es/modules/board/pages/BoardViewList/state.js +0 -6
- package/es/modules/board/pages/BoardViewList/state.js.map +1 -1
- package/es/modules/calendar/components/ActionCard/index.d.ts +7 -0
- package/es/modules/calendar/components/ActionCard/index.js +12 -0
- package/es/modules/calendar/components/ActionCard/index.js.map +1 -0
- package/es/modules/calendar/components/CalendarEventContent/index.d.ts +7 -0
- package/es/modules/calendar/components/CalendarEventContent/index.js +10 -0
- package/es/modules/calendar/components/CalendarEventContent/index.js.map +1 -0
- package/es/modules/calendar/pages/CalendarMonth/index.js +39 -29
- package/es/modules/calendar/pages/CalendarMonth/index.js.map +1 -1
- package/es/modules/calendar/pages/CalendarMonth/index.less +25 -0
- package/es/modules/meeting/components/AgendaList/AgendaItem/index.js +36 -52
- package/es/modules/meeting/components/AgendaList/AgendaItem/index.js.map +1 -1
- package/es/modules/meeting/components/AgendaList/AgendaItem/index.less +34 -70
- package/es/modules/meeting/components/MeetingHeader/index.d.ts +0 -1
- package/es/modules/meeting/components/MeetingHeader/index.js +35 -52
- package/es/modules/meeting/components/MeetingHeader/index.js.map +1 -1
- package/es/modules/meeting/components/MeetingHeader/index.less +5 -22
- package/es/modules/meeting/components/MeetingQuickViewDialog/index.js +1 -1
- package/es/modules/meeting/components/MeetingQuickViewDialog/index.js.map +1 -1
- package/es/pages/Project/ProjectDefaultView/index.js +1 -1
- package/es/pages/Project/ProjectDefaultView/index.js.map +1 -1
- package/es/pages/Space/components/Notes/ColorSelect/index.d.ts +10 -0
- package/es/pages/Space/components/Notes/ColorSelect/index.js +29 -0
- package/es/pages/Space/components/Notes/ColorSelect/index.js.map +1 -0
- package/es/pages/Space/components/Notes/ColorSelect/index.less +17 -0
- package/es/pages/Space/components/Notes/NewNoteDialog/index.d.ts +10 -0
- package/es/pages/Space/components/Notes/NewNoteDialog/index.js +40 -0
- package/es/pages/Space/components/Notes/NewNoteDialog/index.js.map +1 -0
- package/es/pages/Space/components/Notes/NewNoteDialog/index.less +63 -0
- package/es/pages/Space/components/Notes/TextNoteCard/index.js +33 -0
- package/es/pages/Space/components/Notes/TextNoteCard/index.js.map +1 -0
- package/es/pages/Space/components/Notes/TextNoteCard/index.less +56 -0
- package/es/pages/Space/components/Notes/TextNoteCard/state.d.ts +5 -0
- package/es/pages/Space/components/Notes/TextNoteCard/state.js +19 -0
- package/es/pages/Space/components/Notes/TextNoteCard/state.js.map +1 -0
- package/es/pages/Space/components/Notes/index.d.ts +3 -2
- package/es/pages/Space/components/Notes/index.js +31 -6
- package/es/pages/Space/components/Notes/index.js.map +1 -1
- package/es/pages/Space/pages/MySpace/index.js +2 -2
- package/es/pages/Space/pages/MySpace/index.js.map +1 -1
- package/es/pages/Work/components/ActionPlan/Item.js +6 -3
- package/es/pages/Work/components/ActionPlan/Item.js.map +1 -1
- package/es/pages/Work/components/ActionPlan/index.js +4 -3
- package/es/pages/Work/components/ActionPlan/index.js.map +1 -1
- package/es/pages/Work/components/ActionPlan/index.less +2 -1
- package/es/pages/Work/components/ActionPlan/state.d.ts +1 -1
- package/es/pages/Work/components/ScheduleActionForm/index.d.ts +1 -1
- package/es/pages/Work/components/ScheduleActionForm/index.js +1 -1
- package/es/pages/Work/components/ScheduleActionForm/index.js.map +1 -1
- package/es/pages/Work/components/WorkSummaryCards/WorkActionsCard/index.d.ts +1 -1
- package/es/pages/Work/components/WorkSummaryCards/WorkActionsCard/index.js +1 -1
- package/es/pages/Work/components/WorkSummaryCards/WorkActionsCard/index.js.map +1 -1
- package/es/pages/Work/components/WorkSummaryCards/WorkActionsCard/state.d.ts +1 -1
- package/es/pages/Work/components/WorkSummaryCards/index.less +13 -10
- package/es/pages/Work/components/WorkTrail/index.less +20 -18
- package/es/pages/Work/data/WorkContext.d.ts +1 -1
- package/es/pages/Work/data/hook.d.ts +1 -6
- package/es/pages/Work/data/hook.js +1 -35
- package/es/pages/Work/data/hook.js.map +1 -1
- package/es/pages/Work/data/index.d.ts +0 -2
- package/es/pages/Work/data/index.js +0 -2
- package/es/pages/Work/data/index.js.map +1 -1
- package/es/pages/Work/data/interfaces.d.ts +0 -16
- package/package.json +6 -4
- package/es/modules/calendar/components/TaskCard/index.d.ts +0 -6
- package/es/modules/calendar/components/TaskCard/index.js +0 -16
- package/es/modules/calendar/components/TaskCard/index.js.map +0 -1
- package/es/modules/calendar/components/TaskCard/index.less +0 -17
- package/es/modules/calendar/components/TaskCard/state.d.ts +0 -16
- package/es/modules/calendar/components/TaskCard/state.js +0 -58
- package/es/modules/calendar/components/TaskCard/state.js.map +0 -1
- package/es/modules/calendar/pages/CalendarWeek/index.d.ts +0 -0
- package/es/modules/calendar/pages/CalendarWeek/index.js +0 -1
- package/es/modules/calendar/pages/CalendarWeek/index.js.map +0 -1
- package/es/pages/Space/components/Notes/index.less +0 -0
- package/es/pages/Space/components/TextNoteCard/index.js +0 -22
- package/es/pages/Space/components/TextNoteCard/index.js.map +0 -1
- package/es/pages/Space/components/TextNoteCard/index.less +0 -29
- package/es/pages/Work/data/ActionStore.d.ts +0 -65
- package/es/pages/Work/data/ActionStore.js +0 -90
- package/es/pages/Work/data/ActionStore.js.map +0 -1
- package/es/pages/Work/data/useActionListEffect.d.ts +0 -7
- package/es/pages/Work/data/useActionListEffect.js +0 -15
- package/es/pages/Work/data/useActionListEffect.js.map +0 -1
- /package/es/pages/Space/components/{TextNoteCard → Notes/TextNoteCard}/index.d.ts +0 -0
@@ -1,18 +1,4 @@
|
|
1
1
|
import { EditDocumentOptions, IDocument } from "@voplus/morpho-document-core";
|
2
|
-
import { ILoadable } from "@voplus/morpho-data";
|
3
|
-
export declare type IActionType = "Followup" | "Meeting" | "Call";
|
4
|
-
export interface IAction extends ILoadable {
|
5
|
-
/** Id of the action. */
|
6
|
-
id: string;
|
7
|
-
/** parentNodeID of the action. */
|
8
|
-
parentNodeID?: string;
|
9
|
-
/** type of the action. */
|
10
|
-
type: IActionType;
|
11
|
-
/** note of the action. */
|
12
|
-
note?: string;
|
13
|
-
/** due of the action. */
|
14
|
-
due?: Date;
|
15
|
-
}
|
16
2
|
export interface ICheckListItem {
|
17
3
|
key?: string;
|
18
4
|
/** checked of the CheckListItem. */
|
@@ -21,8 +7,6 @@ export interface ICheckListItem {
|
|
21
7
|
item: string;
|
22
8
|
}
|
23
9
|
export interface IWorkDocument extends IDocument {
|
24
|
-
/** actions of the work. */
|
25
|
-
actions: IAction[];
|
26
10
|
due?: Date;
|
27
11
|
/** checklist of the work. */
|
28
12
|
checkList: ICheckListItem[];
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@voplus/morpho-workspace",
|
3
|
-
"version": "1.1.0-
|
3
|
+
"version": "1.1.0-dev040",
|
4
4
|
"description": "morpho workspace module",
|
5
5
|
"repository": {
|
6
6
|
"type": "git",
|
@@ -38,10 +38,12 @@
|
|
38
38
|
"@voplus/morpho-collaboration": "^1.0.0-dev028",
|
39
39
|
"@voplus/morpho-config": "^1.0.0-dev59",
|
40
40
|
"@voplus/morpho-data": "^1.0.0-dev110",
|
41
|
-
"@voplus/morpho-document": "^1.0.0-
|
41
|
+
"@voplus/morpho-document": "^1.0.0-dev296",
|
42
|
+
"@voplus/morpho-document-core": "^1.0.0-dev012",
|
43
|
+
"@voplus/morpho-collaboration-action": "^1.0.0-dev001",
|
42
44
|
"@voplus/morpho-org": "^1.0.0-dev034",
|
43
|
-
"@voplus/morpho-text": "^1.0.0-
|
44
|
-
"@voplus/morpho-ui": "^1.0.0-
|
45
|
+
"@voplus/morpho-text": "^1.0.0-dev080",
|
46
|
+
"@voplus/morpho-ui": "^1.0.0-dev147",
|
45
47
|
"mockjs": "^1.1.0",
|
46
48
|
"typemoq": "^2.1.0"
|
47
49
|
},
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import React, { useState } from "react";
|
2
|
-
import { useTask } from "../../../../data/task";
|
3
|
-
import DocumentHeader from "@voplus/morpho-document/es/components/DocumentHeader";
|
4
|
-
import FlagIcon from "@voplus/morpho-document/es/controls/FlagIcon";
|
5
|
-
import { State } from "./state";
|
6
|
-
import styles from "./index.less";
|
7
|
-
import { useObserver } from "mobx-react-lite";
|
8
|
-
const TaskCard = (props) => {
|
9
|
-
const [state] = useState(new State());
|
10
|
-
state.task = useTask(props.id, { reload: false });
|
11
|
-
// console.log("TaskCard", state.task, props.id);
|
12
|
-
return useObserver(() => (React.createElement("div", { className: styles["calendar-task"], onClick: () => (state.isMenu = true) },
|
13
|
-
React.createElement(DocumentHeader, { id: props.id, pre: React.createElement(FlagIcon, { id: props.id, flag: state.task.flag, editable: !state.task.readonly, className: "flag-icon" }), flagVisible: false, tagsVisible: false, quickDataBarVisible: false, className: "document-card", clickNameEffect: state.editable ? "edit" : "quick-view", toolsVisible: false, onChange: name => (state.name = name) }))));
|
14
|
-
};
|
15
|
-
export default TaskCard;
|
16
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/calendar/components/TaskCard/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM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,IAAI,GAAG,IAAI,CAAC,GACpC,CACG,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
@import "../../../../style/common.less";
|
2
|
-
.calendar-task {
|
3
|
-
height: 100%;
|
4
|
-
display: flex;
|
5
|
-
align-items: center;
|
6
|
-
padding: 3px 5px;
|
7
|
-
position: relative;
|
8
|
-
:global {
|
9
|
-
.document-card{
|
10
|
-
padding: 0;
|
11
|
-
background: transparent;
|
12
|
-
.flag-icon{
|
13
|
-
margin-left: 0;
|
14
|
-
}
|
15
|
-
}
|
16
|
-
}
|
17
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
import { ITask } from "../../../../data/task";
|
2
|
-
export declare class State {
|
3
|
-
task: ITask;
|
4
|
-
id: string;
|
5
|
-
ids: string[];
|
6
|
-
members: any[];
|
7
|
-
name: string;
|
8
|
-
editable: boolean;
|
9
|
-
loading: boolean;
|
10
|
-
visible: boolean;
|
11
|
-
visibleQuickView: boolean;
|
12
|
-
modalType: string;
|
13
|
-
isHover: boolean;
|
14
|
-
isMenu: boolean;
|
15
|
-
reload: boolean;
|
16
|
-
}
|
@@ -1,58 +0,0 @@
|
|
1
|
-
import { __decorate } from "tslib";
|
2
|
-
import { observable } from "mobx";
|
3
|
-
export class State {
|
4
|
-
constructor() {
|
5
|
-
this.id = "";
|
6
|
-
this.ids = [];
|
7
|
-
this.members = [];
|
8
|
-
this.name = "";
|
9
|
-
this.editable = false;
|
10
|
-
this.loading = false;
|
11
|
-
this.visible = false;
|
12
|
-
this.visibleQuickView = false;
|
13
|
-
this.modalType = "";
|
14
|
-
this.isHover = false;
|
15
|
-
this.isMenu = false;
|
16
|
-
this.reload = false;
|
17
|
-
}
|
18
|
-
}
|
19
|
-
__decorate([
|
20
|
-
observable
|
21
|
-
], State.prototype, "task", void 0);
|
22
|
-
__decorate([
|
23
|
-
observable
|
24
|
-
], State.prototype, "id", void 0);
|
25
|
-
__decorate([
|
26
|
-
observable
|
27
|
-
], State.prototype, "ids", void 0);
|
28
|
-
__decorate([
|
29
|
-
observable
|
30
|
-
], State.prototype, "members", void 0);
|
31
|
-
__decorate([
|
32
|
-
observable
|
33
|
-
], State.prototype, "name", void 0);
|
34
|
-
__decorate([
|
35
|
-
observable
|
36
|
-
], State.prototype, "editable", void 0);
|
37
|
-
__decorate([
|
38
|
-
observable
|
39
|
-
], State.prototype, "loading", void 0);
|
40
|
-
__decorate([
|
41
|
-
observable
|
42
|
-
], State.prototype, "visible", void 0);
|
43
|
-
__decorate([
|
44
|
-
observable
|
45
|
-
], State.prototype, "visibleQuickView", void 0);
|
46
|
-
__decorate([
|
47
|
-
observable
|
48
|
-
], State.prototype, "modalType", void 0);
|
49
|
-
__decorate([
|
50
|
-
observable
|
51
|
-
], State.prototype, "isHover", void 0);
|
52
|
-
__decorate([
|
53
|
-
observable
|
54
|
-
], State.prototype, "isMenu", void 0);
|
55
|
-
__decorate([
|
56
|
-
observable
|
57
|
-
], State.prototype, "reload", void 0);
|
58
|
-
//# sourceMappingURL=state.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/calendar/components/TaskCard/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAGlC,MAAM,OAAO,KAAK;IAAlB;QAEoB,OAAE,GAAG,EAAE,CAAC;QACR,QAAG,GAAa,EAAE,CAAC;QACnB,YAAO,GAAU,EAAE,CAAC;QACpB,SAAI,GAAG,EAAE,CAAC;QACV,aAAQ,GAAG,KAAK,CAAC;QACjB,YAAO,GAAG,KAAK,CAAC;QAChB,YAAO,GAAG,KAAK,CAAC;QAChB,qBAAgB,GAAG,KAAK,CAAC;QACzB,cAAS,GAAG,EAAE,CAAC;QACf,YAAO,GAAG,KAAK,CAAC;QAChB,WAAM,GAAG,KAAK,CAAC;QACf,WAAM,GAAG,KAAK,CAAC;IACnC,CAAC;CAAA;AAbY;IAAX,UAAU;mCAAoB;AACnB;IAAX,UAAU;iCAAgB;AACf;IAAX,UAAU;kCAA2B;AAC1B;IAAX,UAAU;sCAA4B;AAC3B;IAAX,UAAU;mCAAkB;AACjB;IAAX,UAAU;uCAAyB;AACxB;IAAX,UAAU;sCAAwB;AACvB;IAAX,UAAU;sCAAwB;AACvB;IAAX,UAAU;+CAAiC;AAChC;IAAX,UAAU;wCAAuB;AACtB;IAAX,UAAU;sCAAwB;AACvB;IAAX,UAAU;qCAAuB;AACtB;IAAX,UAAU;qCAAuB"}
|
File without changes
|
@@ -1 +0,0 @@
|
|
1
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/calendar/pages/CalendarWeek/index.tsx"],"names":[],"mappings":""}
|
File without changes
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import "./index.less";
|
2
|
-
import React, { useState } from "react";
|
3
|
-
import Card from "@voplus/morpho-ui/es/controls/Card";
|
4
|
-
import { Open } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
5
|
-
import { Skeleton } from "@voplus/antd";
|
6
|
-
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
7
|
-
import Viewer from "@voplus/morpho-text/es/controls/ProseMirror/Viewer";
|
8
|
-
import moment from "moment";
|
9
|
-
import { useObserver } from "mobx-react-lite";
|
10
|
-
const TextNoteCard = (props) => {
|
11
|
-
const { id } = props;
|
12
|
-
// const text = useDocument(id);
|
13
|
-
const text = { loading: false, date: "2020-08-03" };
|
14
|
-
const [isHover, setHover] = useState(false);
|
15
|
-
return useObserver(() => (React.createElement(Card, { className: "text-note-card", shadow: true }, text.loading ? (React.createElement(Skeleton, { active: true })) : (React.createElement("div", { className: "document-card-item", onMouseOver: () => setHover(true), onMouseLeave: () => setHover(false) },
|
16
|
-
React.createElement("div", { className: "text-note-card_header" },
|
17
|
-
React.createElement("div", null, moment(text.date).format("D MMM YYYY")),
|
18
|
-
React.createElement(ToolBar, { id: id }, isHover && React.createElement(Open, { url: `/document/${props.id}` }))),
|
19
|
-
React.createElement(Viewer, { html: "<p>而困扰看看付款人快快加入空间方可入库公开</p><p>饿哦港口而开宫口而口渴OK被控科比</p><p>而顾客OK认购款扼控扼控控哦空空</p><p>而顾客OK认购款扼控扼控控哦空空</p><p>而顾客OK认购款扼控扼控控哦空空</p><p>而顾客OK认购款扼控扼控控哦空空</p>" }))))));
|
20
|
-
};
|
21
|
-
export default TextNoteCard;
|
22
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/pages/Space/components/TextNoteCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,MAAM,MAAM,oDAAoD,CAAC;AACxE,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,YAAY,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC9C,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IAErB,gCAAgC;IAChC,MAAM,IAAI,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;IAEpD,MAAM,CAAC,OAAO,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5C,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,oBAAC,IAAI,IAAC,SAAS,EAAC,gBAAgB,EAAC,MAAM,EAAE,IAAI,IAC3C,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CACf,oBAAC,QAAQ,IAAC,MAAM,SAAG,CACnB,CAAC,CAAC,CAAC,CACH,6BACC,SAAS,EAAC,oBAAoB,EAC9B,WAAW,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EACjC,YAAY,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC;QAEnC,6BAAK,SAAS,EAAC,uBAAuB;YACrC,iCAAM,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAO;YACnD,oBAAC,OAAO,IAAC,EAAE,EAAE,EAAE,IAAG,OAAO,IAAI,oBAAC,IAAI,IAAC,GAAG,EAAE,aAAa,KAAK,CAAC,EAAE,EAAE,GAAI,CAAW,CACzE;QACN,oBAAC,MAAM,IACN,IAAI,EACH,iJAAiJ,GAEjJ,CASG,CACN,CACK,CACP,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
@import "../../../../style/common.less";
|
2
|
-
:global {
|
3
|
-
.text-note-card {
|
4
|
-
padding: 0;
|
5
|
-
.text-note-card_header {
|
6
|
-
display: flex;
|
7
|
-
justify-content: space-between;
|
8
|
-
padding: 10px 20px;
|
9
|
-
color: #000;
|
10
|
-
font-weight: 500;
|
11
|
-
font-size: 16px;
|
12
|
-
.tool-bar {
|
13
|
-
.ant-btn {
|
14
|
-
margin-left: 5px;
|
15
|
-
}
|
16
|
-
.ant-btn + .ant-btn {
|
17
|
-
margin-right: 0;
|
18
|
-
}
|
19
|
-
}
|
20
|
-
}
|
21
|
-
.ProseMirror-container {
|
22
|
-
height: 180px;
|
23
|
-
padding: 0 20px;
|
24
|
-
}
|
25
|
-
&:hover .text-note-card_header {
|
26
|
-
color: @primary-color;
|
27
|
-
}
|
28
|
-
}
|
29
|
-
}
|
@@ -1,65 +0,0 @@
|
|
1
|
-
import { ApiEndPoint } from "@voplus/api";
|
2
|
-
import { CountedMap, Store } from "@voplus/morpho-data";
|
3
|
-
import { IAction, IActionType } from "./interfaces";
|
4
|
-
import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
5
|
-
/** Custom load action options type */
|
6
|
-
export declare type LoadActionOptions = {
|
7
|
-
reload?: boolean;
|
8
|
-
};
|
9
|
-
/** Custom load action list options type. */
|
10
|
-
export declare type ActionCreateOptions = {
|
11
|
-
/** The parent node id of the new action to be created in. */
|
12
|
-
ParentNodeId: string;
|
13
|
-
/** set type of the new action. */
|
14
|
-
ActionType: IActionType;
|
15
|
-
/** set due date of the new action. */
|
16
|
-
Due?: Date;
|
17
|
-
/** set note of the new action. */
|
18
|
-
Note?: string;
|
19
|
-
};
|
20
|
-
export declare type EditActionOptions = {
|
21
|
-
/** set type of the new action. */
|
22
|
-
Type?: IActionType;
|
23
|
-
/** set due date of the new action. */
|
24
|
-
Due?: string;
|
25
|
-
/** set note of the new action. */
|
26
|
-
Note?: string;
|
27
|
-
};
|
28
|
-
/** Custom load action list options type. */
|
29
|
-
export declare type DeleteActionOptions = {
|
30
|
-
DeleteChilds?: boolean;
|
31
|
-
};
|
32
|
-
export declare class ActionStore extends Store {
|
33
|
-
private readonly _api;
|
34
|
-
/** Name of the store */
|
35
|
-
readonly name: string;
|
36
|
-
/** Action created event dispatcher */
|
37
|
-
private readonly _actionCreated;
|
38
|
-
private readonly _actionDeleted;
|
39
|
-
/** Event fires when a new action has been created. */
|
40
|
-
get ActionCreatedEvent(): import("strongly-typed-events").IEvent<ActionStore, IAction>;
|
41
|
-
/** Event fires when a delete action has been deleted. */
|
42
|
-
get ActionDeletedEvent(): import("strongly-typed-events").IEvent<ActionStore, IAction>;
|
43
|
-
/** All currently used actions. */
|
44
|
-
readonly items: CountedMap<string, IAction>;
|
45
|
-
/** Create a default actions object with optional default values. */
|
46
|
-
static createDefaultActions(defaultValues?: Partial<IAction>): IAction;
|
47
|
-
constructor(_api: ApiEndPoint);
|
48
|
-
/** Load a actions from server.
|
49
|
-
* @param {string} id - id of the actions.
|
50
|
-
* @param {LoadActionOptions} options - Optional load options.
|
51
|
-
*/
|
52
|
-
load(id: string, options?: LoadActionOptions): Promise<IAction>;
|
53
|
-
/** Create a new actions base on type. */
|
54
|
-
createAction(options: ActionCreateOptions): Promise<IAction>;
|
55
|
-
/** Edit an existing item on server. */
|
56
|
-
editAction(id: string, options: EditActionOptions): Promise<void>;
|
57
|
-
deleteAction(ids: string[], options: DeleteActionOptions): Promise<IAction[]>;
|
58
|
-
/** Load a list of actions of a document from server.
|
59
|
-
* @param id - id of the document.
|
60
|
-
* @param {LoadDocumentListOptions}
|
61
|
-
*/
|
62
|
-
loadDocumentActionList(options?: LoadDocumentListOptions): Promise<IAction[]>;
|
63
|
-
}
|
64
|
-
/** 响应钩子检索 ActionStore */
|
65
|
-
export declare const useActionStore: () => ActionStore;
|
@@ -1,90 +0,0 @@
|
|
1
|
-
import { __decorate } from "tslib";
|
2
|
-
import { RequestBuilder } from "@voplus/api";
|
3
|
-
import { CountedMap, Store, useApplicationContext } from "@voplus/morpho-data";
|
4
|
-
import { loadListFromServer } from "@voplus/morpho-document-core";
|
5
|
-
import { action, observable } from "mobx";
|
6
|
-
import { EventDispatcher } from "strongly-typed-events";
|
7
|
-
import invariant from "invariant";
|
8
|
-
const StoreName = "ActionStore";
|
9
|
-
export class ActionStore extends Store {
|
10
|
-
constructor(_api) {
|
11
|
-
super();
|
12
|
-
this._api = _api;
|
13
|
-
/** Name of the store */
|
14
|
-
this.name = StoreName;
|
15
|
-
/** Action created event dispatcher */
|
16
|
-
this._actionCreated = new EventDispatcher();
|
17
|
-
this._actionDeleted = new EventDispatcher();
|
18
|
-
/** All currently used actions. */
|
19
|
-
this.items = new CountedMap((key) => ({ id: key, loaded: false }), observable.map([], { deep: true }));
|
20
|
-
invariant(_api, `API cannot be ${_api}.`);
|
21
|
-
}
|
22
|
-
/** Event fires when a new action has been created. */
|
23
|
-
get ActionCreatedEvent() {
|
24
|
-
return this._actionCreated.asEvent();
|
25
|
-
}
|
26
|
-
/** Event fires when a delete action has been deleted. */
|
27
|
-
get ActionDeletedEvent() {
|
28
|
-
return this._actionDeleted.asEvent();
|
29
|
-
}
|
30
|
-
/** Create a default actions object with optional default values. */
|
31
|
-
static createDefaultActions(defaultValues) {
|
32
|
-
const v = { id: "" };
|
33
|
-
if (defaultValues)
|
34
|
-
Object.assign(v, defaultValues);
|
35
|
-
return v;
|
36
|
-
}
|
37
|
-
/** Load a actions from server.
|
38
|
-
* @param {string} id - id of the actions.
|
39
|
-
* @param {LoadActionOptions} options - Optional load options.
|
40
|
-
*/
|
41
|
-
async load(id, options) {
|
42
|
-
const r = await this._api.get(`/api/actions/${id}`);
|
43
|
-
return (await r.json());
|
44
|
-
}
|
45
|
-
/** Create a new actions base on type. */
|
46
|
-
async createAction(options) {
|
47
|
-
invariant(options.ActionType, "actionType cannot be empty.");
|
48
|
-
const r = await this._api.post(`/api/actions/create`, new RequestBuilder().json(options));
|
49
|
-
const t = await r.json();
|
50
|
-
this._actionCreated.dispatch(this, t);
|
51
|
-
return t;
|
52
|
-
}
|
53
|
-
/** Edit an existing item on server. */
|
54
|
-
async editAction(id, options) {
|
55
|
-
const r = await this._api.post(`/api/actions/${id}/info`, new RequestBuilder().json(options));
|
56
|
-
const t = (await r.json());
|
57
|
-
this.items.overwrite(t.id, t);
|
58
|
-
}
|
59
|
-
async deleteAction(ids, options) {
|
60
|
-
await this._api.delete(`/api/actions/delete`, new RequestBuilder().json({ Ids: ids, Options: options }));
|
61
|
-
const deleted = [];
|
62
|
-
for (const id of ids) {
|
63
|
-
const item = this.items.peek(id);
|
64
|
-
if (item) {
|
65
|
-
deleted.push(item);
|
66
|
-
this._actionDeleted.dispatch(this, item);
|
67
|
-
}
|
68
|
-
}
|
69
|
-
return deleted;
|
70
|
-
}
|
71
|
-
/** Load a list of actions of a document from server.
|
72
|
-
* @param id - id of the document.
|
73
|
-
* @param {LoadDocumentListOptions}
|
74
|
-
*/
|
75
|
-
async loadDocumentActionList(options) {
|
76
|
-
return await loadListFromServer({ endpoint: this._api, path: `/api/actions` }, options);
|
77
|
-
}
|
78
|
-
}
|
79
|
-
__decorate([
|
80
|
-
action
|
81
|
-
], ActionStore.prototype, "deleteAction", null);
|
82
|
-
/** 响应钩子检索 ActionStore */
|
83
|
-
export const useActionStore = () => {
|
84
|
-
const context = useApplicationContext();
|
85
|
-
if (!context.getStore(StoreName)) {
|
86
|
-
context.addStore(new ActionStore(context.api.currentEndPoint));
|
87
|
-
}
|
88
|
-
return context.getStore(StoreName);
|
89
|
-
};
|
90
|
-
//# sourceMappingURL=ActionStore.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ActionStore.js","sourceRoot":"","sources":["../../../../src/pages/Work/data/ActionStore.ts"],"names":[],"mappings":";AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAE/E,OAAO,EAA2B,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAC3F,OAAO,EAAE,MAAM,EAAE,UAAU,EAAQ,MAAM,MAAM,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,SAAS,MAAM,WAAW,CAAC;AAElC,MAAM,SAAS,GAAG,aAAa,CAAC;AAsChC,MAAM,OAAO,WAAY,SAAQ,KAAK;IA8BrC,YAAoC,IAAiB;QACpD,KAAK,EAAE,CAAC;QAD2B,SAAI,GAAJ,IAAI,CAAa;QA7BrD,wBAAwB;QACR,SAAI,GAAW,SAAS,CAAC;QACzC,sCAAsC;QACrB,mBAAc,GAAG,IAAI,eAAe,EAAwB,CAAC;QAC7D,mBAAc,GAAG,IAAI,eAAe,EAAwB,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,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,EAC7C,OAAO,CACP,CAAC;IACH,CAAC;CACD;AA1BA;IADC,MAAM;+CAeN;AAcF,yBAAyB;AACzB,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE;IAClC,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;QACjC,OAAO,CAAC,QAAQ,CAAC,IAAI,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;KAC/D;IACD,OAAO,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiB,CAAC;AACpD,CAAC,CAAC"}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { IAction } from ".";
|
2
|
-
import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
3
|
-
/** React hook to retrieve a list of actions.
|
4
|
-
* @param effect - Effect callback to be ran after successful retrieved the list.
|
5
|
-
* @param options - Optional action list loading options.
|
6
|
-
*/
|
7
|
-
export declare const useActionListEffect: (effect: (list: IAction[]) => void, options?: LoadDocumentListOptions | undefined) => void;
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { useActionStore } from ".";
|
2
|
-
import { useDeepDepEffect } from "@voplus/morpho-data";
|
3
|
-
/** React hook to retrieve a list of actions.
|
4
|
-
* @param effect - Effect callback to be ran after successful retrieved the list.
|
5
|
-
* @param options - Optional action list loading options.
|
6
|
-
*/
|
7
|
-
export const useActionListEffect = (effect, options) => {
|
8
|
-
const deps = options ? options : {};
|
9
|
-
const store = useActionStore();
|
10
|
-
// Call useDeepDepEffect directly because returned actions do not need to be stored in counted map.
|
11
|
-
useDeepDepEffect(() => {
|
12
|
-
store.loadDocumentActionList(options).then(effect);
|
13
|
-
}, [deps]);
|
14
|
-
};
|
15
|
-
//# sourceMappingURL=useActionListEffect.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"useActionListEffect.js","sourceRoot":"","sources":["../../../../src/pages/Work/data/useActionListEffect.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,cAAc,EAAE,MAAM,GAAG,CAAC;AAG5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAClC,MAAiC,EACjC,OAAiC,EAChC,EAAE;IACH,MAAM,IAAI,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAE,EAA8B,CAAC;IACjE,MAAM,KAAK,GAAG,cAAc,EAAE,CAAC;IAE/B,mGAAmG;IACnG,gBAAgB,CAAC,GAAG,EAAE;QACrB,KAAK,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AACZ,CAAC,CAAC"}
|
File without changes
|