@voplus/morpho-workspace 1.2.5 → 1.3.0
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/es/data/notification/NotificationStore.d.ts +26 -0
- package/es/data/notification/NotificationStore.js +75 -0
- package/es/data/notification/NotificationStore.js.map +1 -0
- package/es/data/notification/hooks.d.ts +5 -0
- package/es/data/notification/hooks.js +15 -0
- package/es/data/notification/hooks.js.map +1 -0
- package/es/data/notification/index.d.ts +4 -0
- package/es/data/notification/index.js +5 -0
- package/es/data/notification/index.js.map +1 -0
- package/es/data/notification/interfaces.d.ts +15 -0
- package/es/data/notification/interfaces.js +2 -0
- package/es/data/notification/interfaces.js.map +1 -0
- package/es/data/notification/types.d.ts +13 -0
- package/es/data/notification/types.js +2 -0
- package/es/data/notification/types.js.map +1 -0
- package/es/modules/board/components/Board/index.js +24 -22
- package/es/modules/board/components/Board/index.js.map +1 -1
- package/es/modules/board/components/Board/index.less +0 -25
- package/es/modules/board/components/Board/state.d.ts +0 -2
- package/es/modules/board/components/Board/state.js +0 -10
- package/es/modules/board/components/Board/state.js.map +1 -1
- package/es/modules/board/components/SubDocumentList/index.js +2 -1
- package/es/modules/board/components/SubDocumentList/index.js.map +1 -1
- package/es/modules/notification/components/MentionNotificationCard/index.d.ts +10 -0
- package/es/modules/notification/components/MentionNotificationCard/index.js +31 -0
- package/es/modules/notification/components/MentionNotificationCard/index.js.map +1 -0
- package/es/modules/notification/components/MentionNotificationCard/index.less +23 -0
- package/es/modules/notification/components/NotificationList/index.d.ts +16 -0
- package/es/modules/notification/components/NotificationList/index.js +69 -0
- package/es/modules/notification/components/NotificationList/index.js.map +1 -0
- package/es/modules/notification/components/NotificationList/index.less +16 -0
- package/es/pages/Routes.js +1 -1
- package/es/pages/Routes.js.map +1 -1
- package/es/pages/Space/components/Documents/index.js +18 -33
- package/es/pages/Space/components/Documents/index.js.map +1 -1
- package/es/pages/Space/components/Documents/index.less +1 -5
- package/es/pages/Space/components/Notifications/index.d.ts +6 -0
- package/es/pages/Space/components/Notifications/index.js +37 -0
- package/es/pages/Space/components/Notifications/index.js.map +1 -0
- package/es/pages/Space/pages/MySpace/index.js +43 -17
- package/es/pages/Space/pages/MySpace/index.js.map +1 -1
- package/es/pages/Space/pages/MySpace/index.less +20 -34
- package/es/pages/Space/pages/MySpace/state.d.ts +24 -5
- package/es/pages/Space/pages/MySpace/state.js +89 -17
- package/es/pages/Space/pages/MySpace/state.js.map +1 -1
- package/package.json +1 -1
- package/es/MySpace.d.ts +0 -7
- package/es/MySpace.js +0 -14
- package/es/MySpace.js.map +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/notification/components/NotificationList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAGN,eAAe,EACf,yBAAyB,EACzB,oBAAoB,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,KAA8B,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,QAAQ,MAAM,2DAA2D,CAAC;AACjF,OAAO,uBAAuB,MAAM,4BAA4B,CAAC;AACjE,OAAO,cAAc,MAAM,sDAAsD,CAAC;AAClF,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AAEnC,MAAM,gBAAgB,GAAG,CAAC,KAezB,EAAE,EAAE;IACJ,MAAM,KAAK,GAAG,oBAAoB,EAAE,CAAC;IACrC,8DAA8D;IAC9D,MAAM,IAAI,GAAG,sBAAsB,CAAgB,EAAE,cAAc,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,EA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EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YACrE,MAAA,KAAK,CAAC,mBAAmB,+CAAzB,KAAK,EAAuB,GAAG,EAAE,IAAI,CAAC,CAAC;YACvC,IAAI,KAAK,CAAC,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM;gBAAE,OAAO;YAChE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
:global {
|
2
|
+
.my-space-notifications {
|
3
|
+
background-color: #fff;
|
4
|
+
padding: 0 !important;
|
5
|
+
.list-view-main {
|
6
|
+
background-color: #f5f5f5;
|
7
|
+
}
|
8
|
+
}
|
9
|
+
.notification-card-exit {
|
10
|
+
opacity: 1;
|
11
|
+
}
|
12
|
+
.notification-card-exit-active {
|
13
|
+
opacity: 0;
|
14
|
+
transition: opacity 300ms;
|
15
|
+
}
|
16
|
+
}
|
package/es/pages/Routes.js
CHANGED
@@ -10,7 +10,7 @@ const ProjectRoutes = () => {
|
|
10
10
|
React.createElement(Route, { path: Routes.ProjectDefaultView.route, exact: true, component: Routes.ProjectDefaultView.component }),
|
11
11
|
React.createElement(Route, { path: Routes.WorkDefaultView.route, exact: true, component: Routes.WorkDefaultView.component }),
|
12
12
|
React.createElement(Route, { path: Routes.WorkTypeDefaultView.route, exact: true, component: Routes.WorkTypeDefaultView.component }),
|
13
|
-
React.createElement(Route, { path: Routes.MySpace.route,
|
13
|
+
React.createElement(Route, { path: Routes.MySpace.route, component: Routes.MySpace.component })));
|
14
14
|
};
|
15
15
|
const Routes = {
|
16
16
|
ProjectDefaultView: {
|
package/es/pages/Routes.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Routes.js","sourceRoot":"","sources":["../../src/pages/Routes.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,kBAAkB,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,eAAe,MAAM,8BAA8B,CAAC;AAC3D,OAAO,mBAAmB,MAAM,gCAAgC,CAAC;AAEjE,MAAM,aAAa,GAAG,GAAG,EAAE;IAC1B,OAAO,CACN,oBAAC,MAAM;QACN,oBAAC,KAAK,IACL,IAAI,EAAE,MAAM,CAAC,kBAAkB,CAAC,KAAK,EACrC,KAAK,EAAE,IAAI,EACX,SAAS,EAAE,MAAM,CAAC,kBAAkB,CAAC,SAAS,GAC7C;QACF,oBAAC,KAAK,IACL,IAAI,EAAE,MAAM,CAAC,eAAe,CAAC,KAAK,EAClC,KAAK,EAAE,IAAI,EACX,SAAS,EAAE,MAAM,CAAC,eAAe,CAAC,SAAS,GAC1C;QACF,oBAAC,KAAK,IACL,IAAI,EAAE,MAAM,CAAC,mBAAmB,CAAC,KAAK,EACtC,KAAK,EAAE,IAAI,EACX,SAAS,EAAE,MAAM,CAAC,mBAAmB,CAAC,SAAS,GAC9C;QACF,oBAAC,KAAK,IAAC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"Routes.js","sourceRoot":"","sources":["../../src/pages/Routes.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAC5C,OAAO,kBAAkB,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,MAAM,OA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;QACrC,MAAM,EAAE,CAAC,EAAU,EAAE,EAAE,CAAC,aAAa,EAAE,EAAE;QACzC,SAAS,EAAE,mBAAmB;KAC9B;IACD,OAAO,EAAE;QACR,KAAK,EAAE,WAAW;QAClB,UAAU,EAAE,MAAM,CAAC,WAAW,CAAC;QAC/B,MAAM,EAAE,GAAG,EAAE,CAAC,WAAW;QACzB,SAAS,EAAE,OAAO;KAClB;IAED,SAAS,EAAE,GAAG,EAAE;QACf,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,oBAAoB;YAC1B,cAAc,EAAE,MAAM,CAAC,kBAAkB,CAAC,UAAU;YACpD,SAAS,EAAE,oBAAC,aAAa,OAAG;SAC5B,CAAC,CAAC;QACH,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,iBAAiB;YACvB,cAAc,EAAE,MAAM,CAAC,eAAe,CAAC,UAAU;YACjD,SAAS,EAAE,oBAAC,aAAa,OAAG;SAC5B,CAAC,CAAC;QACH,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,qBAAqB;YAC3B,cAAc,EAAE,MAAM,CAAC,mBAAmB,CAAC,UAAU;YACrD,SAAS,EAAE,oBAAC,aAAa,OAAG;SAC5B,CAAC,CAAC;QACH,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,SAAS;YACf,cAAc,EAAE,MAAM,CAAC,OAAO,CAAC,UAAU;YACzC,SAAS,EAAE,oBAAC,aAAa,OAAG;SAC5B,CAAC,CAAC;IACJ,CAAC;CACD,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
@@ -1,40 +1,25 @@
|
|
1
1
|
import "./index.less";
|
2
|
-
import { useAutoUpdateListData, useDocumentListEffect, } from "@voplus/morpho-document-core";
|
3
|
-
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
|
4
|
-
import DocumentIcon from "@voplus/morpho-document/es/pages/VSubmit/components/DocumentIcon";
|
5
2
|
import React from "react";
|
6
|
-
import
|
7
|
-
import { SearchOutlined } from "@ant-design/icons";
|
8
|
-
import SortViewDropdown from "@voplus/morpho-ui/es/components/layout/ListView/controls/SortViewDropdown";
|
9
|
-
import TimeoutInput from "@voplus/morpho-ui/es/controls/TimeoutInput";
|
3
|
+
import ViewFrame from "@voplus/morpho-document/es/components/ViewFrame";
|
10
4
|
import { observe } from "@voplus/morpho-ui";
|
11
|
-
import {
|
5
|
+
import { useLayout } from "@voplus/morpho-data";
|
6
|
+
import { useRouteMatch } from "react-router";
|
12
7
|
const Documents = (props) => {
|
13
|
-
|
14
|
-
|
15
|
-
const
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
React.createElement("header", null,
|
29
|
-
React.createElement("div", { className: "title" }, "My Documents"),
|
30
|
-
React.createElement("div", null,
|
31
|
-
React.createElement(SortViewDropdown, { onSort: onSort, className: "sort-btn" }),
|
32
|
-
React.createElement(TimeoutInput, { suffix: React.createElement(SearchOutlined, null), allowClear: true, onIdle: (e) => console.log(e, "e") }))),
|
33
|
-
React.createElement(Scrollbars, { autoHide: true },
|
34
|
-
React.createElement("div", { className: "my-document-view_list" },
|
35
|
-
React.createElement(ListDataContext.Provider, { value: list }, list.data.map((i) => (React.createElement(DocumentIcon, { id: i.id, key: i.id })))))))));
|
36
|
-
function onSort(sort) {
|
37
|
-
list.triggerSort(sort);
|
8
|
+
var _a;
|
9
|
+
let match = useRouteMatch();
|
10
|
+
const layout = useLayout();
|
11
|
+
const query = new URLSearchParams(layout.history.location.search);
|
12
|
+
const id = (_a = query.get("active")) !== null && _a !== void 0 ? _a : props.id;
|
13
|
+
const view = query.get("view");
|
14
|
+
return observe(() => (React.createElement("div", { className: "my-documents" },
|
15
|
+
React.createElement(ViewFrame, { id: id, view: view, onNavigate: onNavigate }),
|
16
|
+
")")));
|
17
|
+
function onNavigate(id, view) {
|
18
|
+
const viewQuery = view ? `&view=${view}` : "";
|
19
|
+
if (id != props.id)
|
20
|
+
layout.history.push(`${match.url}?active=${id}${viewQuery}`);
|
21
|
+
else
|
22
|
+
layout.history.push(`${match.url}?${viewQuery}`);
|
38
23
|
}
|
39
24
|
};
|
40
25
|
export default Documents;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/pages/Space/components/Documents/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/pages/Space/components/Documents/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,SAAS,MAAM,iDAAiD,CAAC;AACxE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;;IAC3C,IAAI,KAAK,GAAG,aAAa,EAAE,CAAC;IAC5B,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,MAAM,KAAK,GAAG,IAAI,eAAe,CAAC,MAAM,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAClE,MAAM,EAAE,GAAG,MAAA,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,mCAAI,KAAK,CAAC,EAAE,CAAC;IAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAE/B,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,6BAAK,SAAS,EAAC,cAAc;QAC5B,oBAAC,SAAS,IAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAW,EAAE,UAAU,EAAE,UAAU,GAAI;YAC3D,CACN,CAAC,CAAC;IAEH,SAAS,UAAU,CAAC,EAAU,EAAE,IAAS;QACxC,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC9C,IAAI,EAAE,IAAI,KAAK,CAAC,EAAE;YAAE,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,WAAW,EAAE,GAAG,SAAS,EAAE,CAAC,CAAC;;YAC5E,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,GAAG,IAAI,SAAS,EAAE,CAAC,CAAC;IACvD,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import React, { useEffect, useState } from "react";
|
2
|
+
import { Result, Skeleton } from "@voplus/antd";
|
3
|
+
import { generatePath, useRouteMatch } from "react-router";
|
4
|
+
import NotificationList from "../../../../modules/notification/components/NotificationList";
|
5
|
+
import { observe } from "@voplus/morpho-ui";
|
6
|
+
import { runInAction } from "mobx";
|
7
|
+
import { useLayout } from "@voplus/morpho-data";
|
8
|
+
import { useNotificationStore } from "../../../../data/notification";
|
9
|
+
const Notifications = (props) => {
|
10
|
+
const match = useRouteMatch();
|
11
|
+
const store = useNotificationStore();
|
12
|
+
const layout = useLayout();
|
13
|
+
const [error, setError] = useState(0);
|
14
|
+
useEffect(() => {
|
15
|
+
if (match.params.status === "redirect" && match.params.active) {
|
16
|
+
store
|
17
|
+
.load(match.params.active)
|
18
|
+
.then((item) => {
|
19
|
+
props.state.navigate(`/notifications/${item.status.toLowerCase()}`, `/${item.id}`);
|
20
|
+
})
|
21
|
+
.catch((e) => {
|
22
|
+
setError(e.status);
|
23
|
+
});
|
24
|
+
}
|
25
|
+
}, [match.params.status]);
|
26
|
+
return observe(() => error ? (React.createElement(Result, { status: error.toString() })) : (React.createElement("div", { className: "my-notifications" }, match.params.status === "redirect" ? (React.createElement(Skeleton, { loading: true })) : (React.createElement(NotificationList, { status: match.params.status, active: match.params.active, onClickItem: (ev, item) => {
|
27
|
+
layout.history.push(generatePath(match.path, { status: match.params.status, active: item.id }));
|
28
|
+
}, onTotal: (total) => {
|
29
|
+
runInAction(() => {
|
30
|
+
props.state.notificationTotals[match.params.status] = total;
|
31
|
+
});
|
32
|
+
}, onItemStatusChanged: (old, item) => {
|
33
|
+
props.state.updateNotificationTotal(old, item.status);
|
34
|
+
} })))));
|
35
|
+
};
|
36
|
+
export default Notifications;
|
37
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/pages/Space/components/Notifications/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,gBAAgB,MAAM,8DAA8D,CAAC;AAE5F,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AAErE,MAAM,aAAa,GAAG,CAAC,KAAuB,EAAE,EAAE;IACjD,MAAM,KAAK,GAAG,aAAa,EAAuC,CAAC;IACnE,MAAM,KAAK,GAAG,oBAAoB,EAAE,CAAC;IACrC,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CA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AE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAC1E,CAAC;QACH,CAAC,EACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;YAClB,WAAW,CAAC,GAAG,EAAE;gBAChB,KAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;YAC7D,CAAC,CAAC,CAAC;QACJ,CAAC,EACD,mBAAmB,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YAClC,KAAK,CAAC,KAAK,CAAC,uBAAuB,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;QACvD,CAAC,GACA,CACF,CACI,CACN,CACD,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
@@ -1,47 +1,73 @@
|
|
1
1
|
import "./index.less";
|
2
|
-
import {
|
3
|
-
import
|
4
|
-
import
|
2
|
+
import { useNotificationListEffect } from "../../../../data/notification";
|
3
|
+
import { Menu } from "@voplus/antd";
|
4
|
+
import React, { useEffect, useMemo } from "react";
|
5
|
+
import { Redirect, Route, Switch, useRouteMatch } from "react-router";
|
6
|
+
import { faBallotCheck, faBell, faFolders, faProjectDiagram, faStickyNote, faTasks, } from "@fortawesome/pro-light-svg-icons";
|
5
7
|
import { useApplicationContext, useTabItem } from "@voplus/morpho-data";
|
8
|
+
import { Badge } from "@voplus/antd";
|
6
9
|
import Documents from "../../components/Documents";
|
7
10
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
8
11
|
import MainContent from "@voplus/morpho-ui/es/components/layout/MainContent";
|
9
|
-
import
|
10
|
-
import Projects from "../../components/Projects";
|
12
|
+
import Notifications from "../../components/Notifications";
|
11
13
|
import Scrollbars from "react-custom-scrollbars";
|
12
14
|
import { State } from "./state";
|
13
15
|
import SubMenu from "@voplus/antd/es/menu/SubMenu";
|
14
|
-
import Tasks from "../../components/Tasks";
|
15
|
-
import Works from "../../components/Works";
|
16
16
|
import { observe } from "@voplus/morpho-ui";
|
17
17
|
import { runInAction } from "mobx";
|
18
|
-
import {
|
18
|
+
import { useLayout } from "@voplus/morpho-data";
|
19
|
+
//import Notifications from "../../../../modules/notification/components/NotificationList";
|
19
20
|
const MySpace = () => {
|
20
21
|
const { user } = useApplicationContext();
|
21
|
-
const
|
22
|
+
const match = useRouteMatch();
|
22
23
|
const tab = useTabItem();
|
23
|
-
const
|
24
|
+
const layout = useLayout();
|
25
|
+
const state = useMemo(() => new State(layout, match.url), []);
|
24
26
|
useEffect(() => {
|
25
27
|
runInAction(() => (tab.title = "My Space"));
|
26
28
|
}, []);
|
29
|
+
useNotificationListEffect(null, (result, total) => runInAction(() => (state.notificationTotals.unread = total || 0)), state.nUnreadOptions);
|
30
|
+
useNotificationListEffect(null, (result, total) => runInAction(() => (state.notificationTotals.read = total || 0)), state.nReadOptions);
|
31
|
+
useNotificationListEffect(null, (result, total) => runInAction(() => (state.notificationTotals.later = total || 0)), state.nLaterOptions);
|
32
|
+
useNotificationListEffect(null, (result, total) => runInAction(() => (state.notificationTotals.dismissed = total || 0)), state.nDismissedOptions);
|
27
33
|
return observe(() => (React.createElement(MainContent, { className: "my-space-view" },
|
28
34
|
React.createElement(MainContent.Nav, { collapsible: true },
|
29
35
|
React.createElement(Scrollbars, { autoHide: true },
|
30
|
-
React.createElement(Menu, { mode: "inline", defaultSelectedKeys: ["
|
31
|
-
React.createElement(Menu.Item, { key: "
|
32
|
-
React.createElement(
|
33
|
-
|
34
|
-
|
36
|
+
React.createElement(Menu, { mode: "inline", defaultSelectedKeys: ["/notifications/unread"], selectedKeys: state.menuKey, defaultOpenKeys: ["Notifications"], onClick: (key) => state.navigate(key.key) },
|
37
|
+
React.createElement(Menu.Item, { key: "/documents", icon: React.createElement(FAIcon, { icon: faFolders }) }, "My Documents"),
|
38
|
+
React.createElement(SubMenu, { key: "Notifications", icon: React.createElement(FAIcon, { icon: faBell }), title: "My Notifications" },
|
39
|
+
React.createElement(Menu.Item, { key: "/notifications/unread" },
|
40
|
+
"Unread",
|
41
|
+
" ",
|
42
|
+
React.createElement(Badge, { count: state.notificationTotals.unread, className: "site-badge-count" })),
|
43
|
+
React.createElement(Menu.Item, { key: "/notifications/read" },
|
44
|
+
"Read ",
|
45
|
+
React.createElement(Badge, { count: state.notificationTotals.read, className: "site-badge-count" })),
|
46
|
+
React.createElement(Menu.Item, { key: "/notifications/later" },
|
47
|
+
"Later ",
|
48
|
+
React.createElement(Badge, { count: state.notificationTotals.later, className: "site-badge-count" })),
|
49
|
+
React.createElement(Menu.Item, { key: "/notifications/dismissed" },
|
50
|
+
"Dismissed",
|
51
|
+
" ",
|
52
|
+
React.createElement(Badge, { count: state.notificationTotals.dismissed, className: "site-badge-count" }))),
|
53
|
+
React.createElement(Menu.Item, { key: "Notes", icon: React.createElement(FAIcon, { icon: faStickyNote }), disabled: true }, "My Notes"),
|
54
|
+
React.createElement(Menu.Item, { key: "Projects", icon: React.createElement(FAIcon, { icon: faProjectDiagram }), disabled: true }, "My Projects"),
|
55
|
+
React.createElement(SubMenu, { key: "Tasks", icon: React.createElement(FAIcon, { icon: faTasks }), title: "My Tasks", disabled: true },
|
35
56
|
React.createElement(Menu.Item, { key: "TaskToday" }, "Today(2)"),
|
36
57
|
React.createElement(Menu.Item, { key: "TaskWeek" }, "This Week(4)"),
|
37
58
|
React.createElement(Menu.Item, { key: "TaskMonth" }, "This Month(5)"),
|
38
59
|
React.createElement(Menu.Item, { key: "TaskUnscheduled" }, "Unscheduled(6)")),
|
39
|
-
React.createElement(SubMenu, { key: "Works", icon: React.createElement(FAIcon, { icon: faBallotCheck }), title: "My Works" },
|
60
|
+
React.createElement(SubMenu, { key: "Works", icon: React.createElement(FAIcon, { icon: faBallotCheck }), title: "My Works", disabled: true },
|
40
61
|
React.createElement(Menu.Item, { key: "WorkToday" }, "Today(2)"),
|
41
62
|
React.createElement(Menu.Item, { key: "WorkWeek" }, "This Week(4)"),
|
42
63
|
React.createElement(Menu.Item, { key: "WorkMonth" }, "This Month(5)"),
|
43
64
|
React.createElement(Menu.Item, { key: "WorkUnscheduled" }, "Unscheduled(6)"))))),
|
44
|
-
|
65
|
+
React.createElement(Switch, null,
|
66
|
+
React.createElement(Route, { path: `${match.path}/documents` },
|
67
|
+
React.createElement(Documents, { id: user.info.folderId })),
|
68
|
+
React.createElement(Route, { path: `${match.path}/notifications/:status/:active?` },
|
69
|
+
React.createElement(Notifications, { state: state })),
|
70
|
+
React.createElement(Redirect, { to: `${match.path}/notifications/unread` })))));
|
45
71
|
};
|
46
72
|
export default MySpace;
|
47
73
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/pages/Space/pages/MySpace/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/pages/Space/pages/MySpace/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAiB,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AACzF,OAAO,EAAE,IAAI,EAAY,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,EAAE,SAAS,EAAmB,OAAO,EAAY,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EACN,aAAa,EACb,MAAM,EACN,SAAS,EACT,gBAAgB,EAChB,YAAY,EACZ,OAAO,GACP,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAExE,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,SAAS,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE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
24
|
+
/* 修正 Sub menu 背景色 */
|
25
|
+
.ant-menu-sub {
|
26
|
+
background-color: white;
|
27
|
+
}
|
28
|
+
/* menu badge 颜色与对齐 */
|
29
|
+
.ant-menu-item {
|
30
|
+
padding-right: 10px !important;
|
31
|
+
.ant-menu-title-content {
|
28
32
|
display: flex;
|
29
|
-
justify-content: space-between;
|
30
33
|
align-items: center;
|
31
|
-
|
32
|
-
border-left: 1px solid #f2f2f2;
|
33
|
-
background: @component-background;
|
34
|
-
box-shadow: 2px 2px 5px #e8e8e8;
|
35
|
-
.title {
|
36
|
-
font-size: 16px;
|
37
|
-
color: #000;
|
38
|
-
font-weight: 600;
|
39
|
-
}
|
40
|
-
.ant-input-affix-wrapper {
|
41
|
-
width: auto;
|
42
|
-
}
|
43
|
-
.sort-btn {
|
44
|
-
margin-right: 10px;
|
45
|
-
padding: 5px 6px;
|
46
|
-
font-size: 13px;
|
47
|
-
}
|
34
|
+
justify-content: space-between;
|
48
35
|
}
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
}
|
36
|
+
}
|
37
|
+
|
38
|
+
.ant-badge {
|
39
|
+
.ant-badge-count {
|
40
|
+
background-color: #fff;
|
41
|
+
color: #999;
|
42
|
+
box-shadow: 0 0 0 1px #d9d9d9 inset;
|
57
43
|
}
|
58
44
|
}
|
59
45
|
}
|
@@ -1,12 +1,31 @@
|
|
1
|
+
import { FilterOption, LayoutContext } from "@voplus/morpho-data";
|
1
2
|
import { Moment } from "moment";
|
2
|
-
import {
|
3
|
-
import {
|
3
|
+
import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
|
4
|
+
import { NotificationStatus } from "../../../../data/notification";
|
4
5
|
import { RangeValue } from "rc-picker/es/interface";
|
5
6
|
export declare class State {
|
6
|
-
|
7
|
+
private _layout;
|
8
|
+
private _url;
|
9
|
+
menuKey: string[] | undefined;
|
7
10
|
/** dueDate of task */
|
8
11
|
dueDate: RangeValue<Moment>;
|
9
|
-
|
12
|
+
/** status All Notifications list Total */
|
13
|
+
notificationTotals: {
|
14
|
+
unread: number;
|
15
|
+
read: number;
|
16
|
+
later: number;
|
17
|
+
dismissed: number;
|
18
|
+
};
|
19
|
+
constructor(_layout: LayoutContext, _url: string);
|
20
|
+
navigate(key: string, rest?: string): void;
|
10
21
|
get filters(): FilterOption[];
|
11
|
-
|
22
|
+
updateNotificationTotal(oldStatus: NotificationStatus, status: NotificationStatus): void;
|
23
|
+
/** Notifications list Options */
|
24
|
+
get nUnreadOptions(): LoadDocumentListOptions;
|
25
|
+
/** Notifications list Read Options */
|
26
|
+
get nReadOptions(): LoadDocumentListOptions;
|
27
|
+
/** Notifications list Later Options */
|
28
|
+
get nLaterOptions(): LoadDocumentListOptions;
|
29
|
+
/** Notifications list Dismissed Options */
|
30
|
+
get nDismissedOptions(): LoadDocumentListOptions;
|
12
31
|
}
|
@@ -1,13 +1,25 @@
|
|
1
1
|
import { __decorate } from "tslib";
|
2
|
-
import { action, makeObservable, observable } from "mobx";
|
2
|
+
import { action, computed, makeObservable, observable } from "mobx";
|
3
3
|
import moment from "moment";
|
4
4
|
export class State {
|
5
|
-
constructor() {
|
5
|
+
constructor(_layout, _url) {
|
6
|
+
Object.defineProperty(this, "_layout", {
|
7
|
+
enumerable: true,
|
8
|
+
configurable: true,
|
9
|
+
writable: true,
|
10
|
+
value: _layout
|
11
|
+
});
|
12
|
+
Object.defineProperty(this, "_url", {
|
13
|
+
enumerable: true,
|
14
|
+
configurable: true,
|
15
|
+
writable: true,
|
16
|
+
value: _url
|
17
|
+
});
|
6
18
|
Object.defineProperty(this, "menuKey", {
|
7
19
|
enumerable: true,
|
8
20
|
configurable: true,
|
9
21
|
writable: true,
|
10
|
-
value:
|
22
|
+
value: undefined
|
11
23
|
});
|
12
24
|
/** dueDate of task */
|
13
25
|
Object.defineProperty(this, "dueDate", {
|
@@ -16,8 +28,24 @@ export class State {
|
|
16
28
|
writable: true,
|
17
29
|
value: void 0
|
18
30
|
});
|
31
|
+
/** status All Notifications list Total */
|
32
|
+
Object.defineProperty(this, "notificationTotals", {
|
33
|
+
enumerable: true,
|
34
|
+
configurable: true,
|
35
|
+
writable: true,
|
36
|
+
value: {
|
37
|
+
unread: 0,
|
38
|
+
read: 0,
|
39
|
+
later: 0,
|
40
|
+
dismissed: 0
|
41
|
+
}
|
42
|
+
});
|
19
43
|
makeObservable(this);
|
20
44
|
}
|
45
|
+
navigate(key, rest) {
|
46
|
+
this.menuKey = [key];
|
47
|
+
this._layout.history.push(`${this._url}${key}${rest !== null && rest !== void 0 ? rest : ""}`);
|
48
|
+
}
|
21
49
|
get filters() {
|
22
50
|
var _a, _b, _c, _d, _e, _f;
|
23
51
|
if (((_a = this.dueDate) === null || _a === void 0 ? void 0 : _a[0]) === null && ((_b = this.dueDate) === null || _b === void 0 ? void 0 : _b[1]) === null)
|
@@ -34,19 +62,45 @@ export class State {
|
|
34
62
|
},
|
35
63
|
];
|
36
64
|
}
|
37
|
-
|
38
|
-
this.
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
65
|
+
updateNotificationTotal(oldStatus, status) {
|
66
|
+
this.notificationTotals[oldStatus.toLowerCase()]--;
|
67
|
+
this.notificationTotals[status.toLowerCase()]++;
|
68
|
+
}
|
69
|
+
/** Notifications list Options */
|
70
|
+
get nUnreadOptions() {
|
71
|
+
return {
|
72
|
+
Total: true, List: false,
|
73
|
+
Filters: [
|
74
|
+
{ c: "Status", o: "=", l: "And", v1: "Unread" },
|
75
|
+
],
|
76
|
+
};
|
77
|
+
}
|
78
|
+
/** Notifications list Read Options */
|
79
|
+
get nReadOptions() {
|
80
|
+
return {
|
81
|
+
Total: true, List: false,
|
82
|
+
Filters: [
|
83
|
+
{ c: "Status", o: "=", l: "And", v1: "Read" },
|
84
|
+
],
|
85
|
+
};
|
86
|
+
}
|
87
|
+
/** Notifications list Later Options */
|
88
|
+
get nLaterOptions() {
|
89
|
+
return {
|
90
|
+
Total: true, List: false,
|
91
|
+
Filters: [
|
92
|
+
{ c: "Status", o: "=", l: "And", v1: "Later" },
|
93
|
+
],
|
94
|
+
};
|
95
|
+
}
|
96
|
+
/** Notifications list Dismissed Options */
|
97
|
+
get nDismissedOptions() {
|
98
|
+
return {
|
99
|
+
Total: true, List: false,
|
100
|
+
Filters: [
|
101
|
+
{ c: "Status", o: "=", l: "And", v1: "Dismissed" },
|
102
|
+
],
|
103
|
+
};
|
50
104
|
}
|
51
105
|
}
|
52
106
|
__decorate([
|
@@ -55,7 +109,25 @@ __decorate([
|
|
55
109
|
__decorate([
|
56
110
|
observable
|
57
111
|
], State.prototype, "dueDate", void 0);
|
112
|
+
__decorate([
|
113
|
+
observable
|
114
|
+
], State.prototype, "notificationTotals", void 0);
|
58
115
|
__decorate([
|
59
116
|
action
|
60
|
-
], State.prototype, "
|
117
|
+
], State.prototype, "navigate", null);
|
118
|
+
__decorate([
|
119
|
+
action
|
120
|
+
], State.prototype, "updateNotificationTotal", null);
|
121
|
+
__decorate([
|
122
|
+
computed
|
123
|
+
], State.prototype, "nUnreadOptions", null);
|
124
|
+
__decorate([
|
125
|
+
computed
|
126
|
+
], State.prototype, "nReadOptions", null);
|
127
|
+
__decorate([
|
128
|
+
computed
|
129
|
+
], State.prototype, "nLaterOptions", null);
|
130
|
+
__decorate([
|
131
|
+
computed
|
132
|
+
], State.prototype, "nDismissedOptions", null);
|
61
133
|
//# sourceMappingURL=state.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/pages/Space/pages/MySpace/state.ts"],"names":[],"mappings":";
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/pages/Space/pages/MySpace/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM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,EAAE,IAAI,EAAE,KAAK;YACxB,OAAO,EAAE;gBACR,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE;aAClD;SACD,CAAC;IACH,CAAC;CACD;AAzFY;IAAX,UAAU;sCAAoD;AAEnD;IAAX,UAAU;sCAAoC;AAGnC;IAAX,UAAU;iDAKT;AAQM;IAAP,MAAM;qCAGN;AAmBD;IADC,MAAM;oDAIN;AAKD;IADC,QAAQ;2CAQR;AAID;IADC,QAAQ;yCAQR;AAID;IADC,QAAQ;0CAQR;AAID;IADC,QAAQ;8CAQR"}
|
package/package.json
CHANGED
package/es/MySpace.d.ts
DELETED
package/es/MySpace.js
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import styles from "./style/index.less";
|
3
|
-
export class MySpace extends React.Component {
|
4
|
-
constructor(props) {
|
5
|
-
super(props);
|
6
|
-
}
|
7
|
-
render() {
|
8
|
-
return React.createElement("div", { className: styles.app },
|
9
|
-
"Hello ",
|
10
|
-
this.props.name,
|
11
|
-
" !");
|
12
|
-
}
|
13
|
-
}
|
14
|
-
//# sourceMappingURL=MySpace.js.map
|
package/es/MySpace.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"MySpace.js","sourceRoot":"","sources":["../src/MySpace.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,oBAAoB,CAAC;AAExC,MAAM,OAAO,OAAQ,SAAQ,KAAK,CAAC,SAA4B;IAC9D,YAAmB,KAAU;QAC5B,KAAK,CAAC,KAAK,CAAC,CAAC;IACd,CAAC;IACM,MAAM;QACZ,OAAO,6BAAK,SAAS,EAAE,MAAM,CAAC,GAAG;;YAAS,IAAI,CAAC,KAAK,CAAC,IAAI;iBAAS,CAAC;IACpE,CAAC;CACD"}
|