@voplus/morpho-workspace 1.2.6 → 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.
Files changed (49) hide show
  1. package/es/data/notification/{NotificaitonStore.d.ts → NotificationStore.d.ts} +8 -8
  2. package/es/data/notification/{NotificaitonStore.js → NotificationStore.js} +10 -7
  3. package/es/data/notification/NotificationStore.js.map +1 -0
  4. package/es/data/notification/hooks.d.ts +4 -4
  5. package/es/data/notification/hooks.js +8 -8
  6. package/es/data/notification/hooks.js.map +1 -1
  7. package/es/data/notification/index.d.ts +1 -1
  8. package/es/data/notification/index.js +1 -1
  9. package/es/data/notification/interfaces.d.ts +5 -3
  10. package/es/data/notification/types.d.ts +7 -7
  11. package/es/modules/board/components/SubDocumentList/index.js +2 -1
  12. package/es/modules/board/components/SubDocumentList/index.js.map +1 -1
  13. package/es/modules/notification/components/MentionNotificationCard/index.d.ts +10 -0
  14. package/es/modules/notification/components/MentionNotificationCard/index.js +31 -0
  15. package/es/modules/notification/components/MentionNotificationCard/index.js.map +1 -0
  16. package/es/modules/notification/components/MentionNotificationCard/index.less +23 -0
  17. package/es/modules/notification/components/NotificationList/index.d.ts +14 -5
  18. package/es/modules/notification/components/NotificationList/index.js +60 -17
  19. package/es/modules/notification/components/NotificationList/index.js.map +1 -1
  20. package/es/modules/notification/components/NotificationList/index.less +11 -1
  21. package/es/pages/Routes.js +1 -1
  22. package/es/pages/Routes.js.map +1 -1
  23. package/es/pages/Space/components/Documents/index.js +18 -33
  24. package/es/pages/Space/components/Documents/index.js.map +1 -1
  25. package/es/pages/Space/components/Documents/index.less +1 -5
  26. package/es/pages/Space/components/Notifications/index.d.ts +6 -0
  27. package/es/pages/Space/components/Notifications/index.js +37 -0
  28. package/es/pages/Space/components/Notifications/index.js.map +1 -0
  29. package/es/pages/Space/pages/MySpace/index.js +44 -41
  30. package/es/pages/Space/pages/MySpace/index.js.map +1 -1
  31. package/es/pages/Space/pages/MySpace/index.less +20 -34
  32. package/es/pages/Space/pages/MySpace/state.d.ts +15 -16
  33. package/es/pages/Space/pages/MySpace/state.js +38 -74
  34. package/es/pages/Space/pages/MySpace/state.js.map +1 -1
  35. package/package.json +1 -1
  36. package/es/MySpace.d.ts +0 -7
  37. package/es/MySpace.js +0 -14
  38. package/es/MySpace.js.map +0 -1
  39. package/es/data/notification/NotificaitonStore.js.map +0 -1
  40. package/es/modules/notification/NotificationRoutes.d.ts +0 -17
  41. package/es/modules/notification/NotificationRoutes.js +0 -29
  42. package/es/modules/notification/NotificationRoutes.js.map +0 -1
  43. package/es/modules/notification/components/MentionNotificaitonCard/index.d.ts +0 -9
  44. package/es/modules/notification/components/MentionNotificaitonCard/index.js +0 -27
  45. package/es/modules/notification/components/MentionNotificaitonCard/index.js.map +0 -1
  46. package/es/modules/notification/components/MentionNotificaitonCard/index.less +0 -16
  47. package/es/modules/notification/pages/NotificationListView/index.d.ts +0 -6
  48. package/es/modules/notification/pages/NotificationListView/index.js +0 -17
  49. package/es/modules/notification/pages/NotificationListView/index.js.map +0 -1
@@ -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,CAAC;IAEtC,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,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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,70 +1,73 @@
1
1
  import "./index.less";
2
- import { Menu, Skeleton } from "@voplus/antd";
3
- import React, { useEffect, useState } from "react";
4
- import { faBallotCheck, faBooks, faProjectDiagram, faStickyNote, faTasks, faBell, } from "@fortawesome/pro-light-svg-icons";
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 Notes from "../../components/Notes";
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 { useUnit } from "@voplus/morpho-org";
19
- import Notifications from "../../../../modules/notification/components/NotificationList";
20
- import { useNotificaitonListEffect } from "../../../../data/notification";
18
+ import { useLayout } from "@voplus/morpho-data";
19
+ //import Notifications from "../../../../modules/notification/components/NotificationList";
21
20
  const MySpace = () => {
22
21
  const { user } = useApplicationContext();
23
- const unit = useUnit(user.info.id, { reload: true });
22
+ const match = useRouteMatch();
24
23
  const tab = useTabItem();
25
- const [state] = useState(new State());
24
+ const layout = useLayout();
25
+ const state = useMemo(() => new State(layout, match.url), []);
26
26
  useEffect(() => {
27
27
  runInAction(() => (tab.title = "My Space"));
28
28
  }, []);
29
- useNotificaitonListEffect(null, (result, total) => runInAction(() => state.nAllTotal = total || 0), state.nAllOptions);
30
- useNotificaitonListEffect(null, (result, total) => runInAction(() => state.nReadTotal = total || 0), state.nReadOptions);
31
- useNotificaitonListEffect(null, (result, total) => runInAction(() => state.nLaterTotal = total || 0), state.nLaterOptions);
32
- useNotificaitonListEffect(null, (result, total) => runInAction(() => state.nDismissedTotal = total || 0), state.nDismissedOptions);
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);
33
33
  return observe(() => (React.createElement(MainContent, { className: "my-space-view" },
34
34
  React.createElement(MainContent.Nav, { collapsible: true },
35
35
  React.createElement(Scrollbars, { autoHide: true },
36
- React.createElement(Menu, { mode: "inline", defaultSelectedKeys: ["Documents"], onClick: (key) => state.onClick(key) },
37
- React.createElement(Menu.Item, { key: "Documents", icon: React.createElement(FAIcon, { icon: faBooks }) }, "My Documents"),
38
- React.createElement(Menu.Item, { key: "Notes", icon: React.createElement(FAIcon, { icon: faStickyNote }) }, "My Notes"),
39
- React.createElement(Menu.Item, { key: "Projects", icon: React.createElement(FAIcon, { icon: faProjectDiagram }) }, "My Projects"),
40
- React.createElement(SubMenu, { key: "Tasks", icon: React.createElement(FAIcon, { icon: faTasks }), title: "My Tasks" },
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 },
41
56
  React.createElement(Menu.Item, { key: "TaskToday" }, "Today(2)"),
42
57
  React.createElement(Menu.Item, { key: "TaskWeek" }, "This Week(4)"),
43
58
  React.createElement(Menu.Item, { key: "TaskMonth" }, "This Month(5)"),
44
59
  React.createElement(Menu.Item, { key: "TaskUnscheduled" }, "Unscheduled(6)")),
45
- 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 },
46
61
  React.createElement(Menu.Item, { key: "WorkToday" }, "Today(2)"),
47
62
  React.createElement(Menu.Item, { key: "WorkWeek" }, "This Week(4)"),
48
63
  React.createElement(Menu.Item, { key: "WorkMonth" }, "This Month(5)"),
49
- React.createElement(Menu.Item, { key: "WorkUnscheduled" }, "Unscheduled(6)")),
50
- React.createElement(SubMenu, { key: "Notifications", icon: React.createElement(FAIcon, { icon: faBell }), title: "My Notifications" },
51
- React.createElement(Menu.Item, { key: "NotificationsAll" },
52
- "All(",
53
- state.nAllTotal,
54
- ")"),
55
- React.createElement(Menu.Item, { key: "NotificationsRead" },
56
- "Read(",
57
- state.nReadTotal,
58
- ")"),
59
- React.createElement(Menu.Item, { key: "NotificationsLater" },
60
- "Later(",
61
- state.nLaterTotal,
62
- ")"),
63
- React.createElement(Menu.Item, { key: "NotificationsDismissed" },
64
- "Dismissed(",
65
- state.nDismissedTotal,
66
- ")"))))),
67
- !unit.loading ? (state.menuKey === "Notes" ? (React.createElement(Notes, { id: unit.containerId || "598054f2-0bc1-4fd4-a0ed-ac0d0078b038" })) : state.menuKey === "Projects" ? (React.createElement(Projects, { id: unit.containerId || "598054f2-0bc1-4fd4-a0ed-ac0d0078b038" })) : state.menuKey.includes("Work") ? (React.createElement(Works, { id: unit.containerId || "598054f2-0bc1-4fd4-a0ed-ac0d0078b038" })) : state.menuKey.includes("Task") ? (React.createElement(Tasks, { filters: state.filters })) : state.menuKey.includes("Notifications") ? (React.createElement(Notifications, { filters: state.notificaitonFilters })) : (React.createElement(Documents, { id: unit.containerId || "598054f2-0bc1-4fd4-a0ed-ac0d0078b038" }))) : (React.createElement(Skeleton, { active: true })))));
64
+ React.createElement(Menu.Item, { key: "WorkUnscheduled" }, "Unscheduled(6)"))))),
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` })))));
68
71
  };
69
72
  export default MySpace;
70
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,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EACN,aAAa,EACb,OAAO,EACP,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,MAAM,GACN,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACxE,OAAO,SAAS,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,WAAW,MAAM,oDAAoD,CAAC;AAE7E,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAC3C,OAAO,QAAQ,MAAM,2BAA2B,CAAC;AACjD,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,OAAO,MAAM,8BAA8B,CAAC;AACnD,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAC3C,OAAO,KAAK,MAAM,wBAAwB,CAA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AE,EAAE,GAAG,KAAK,CAAC,IAAI,uBAAuB,GAAI,CAC9C,CAGI,CACd,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -17,43 +17,29 @@
17
17
  }
18
18
  }
19
19
  }
20
- .my-space-view_content {
21
- display: flex;
22
- height: 100%;
23
- flex-direction: column;
24
- padding: unset !important;
25
- overflow: hidden;
26
- background-color: @background-color-base;
27
- header {
20
+ > div {
21
+ padding: 0 !important;
22
+ }
23
+
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
- padding: 10px 20px;
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
- .my-space-view_list {
50
- display: flex;
51
- flex-wrap: wrap;
52
- padding: 0.5rem 0.75rem;
53
- > div {
54
- width: 20rem;
55
- margin: 0.5rem;
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,28 +1,27 @@
1
+ import { FilterOption, LayoutContext } from "@voplus/morpho-data";
1
2
  import { Moment } from "moment";
2
3
  import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
3
- import { FilterOption } from "@voplus/morpho-data";
4
- import { MenuInfo } from "rc-menu/es/interface";
4
+ import { NotificationStatus } from "../../../../data/notification";
5
5
  import { RangeValue } from "rc-picker/es/interface";
6
6
  export declare class State {
7
- menuKey: string;
7
+ private _layout;
8
+ private _url;
9
+ menuKey: string[] | undefined;
8
10
  /** dueDate of task */
9
11
  dueDate: RangeValue<Moment>;
10
- /** status of notifications */
11
- status: string;
12
12
  /** status All Notifications list Total */
13
- nAllTotal: number;
14
- /** Read Notifications list Total */
15
- nReadTotal: number;
16
- /** Later Notifications list Total */
17
- nLaterTotal: number;
18
- /** Dismissed Notifications list Total */
19
- nDismissedTotal: number;
20
- constructor();
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;
21
21
  get filters(): FilterOption[];
22
- get notificaitonFilters(): FilterOption[];
23
- onClick({ key }: MenuInfo): void;
22
+ updateNotificationTotal(oldStatus: NotificationStatus, status: NotificationStatus): void;
24
23
  /** Notifications list Options */
25
- get nAllOptions(): LoadDocumentListOptions;
24
+ get nUnreadOptions(): LoadDocumentListOptions;
26
25
  /** Notifications list Read Options */
27
26
  get nReadOptions(): LoadDocumentListOptions;
28
27
  /** Notifications list Later Options */
@@ -1,58 +1,51 @@
1
1
  import { __decorate } from "tslib";
2
- import { action, makeObservable, observable, computed } from "mobx";
2
+ import { action, computed, makeObservable, observable } from "mobx";
3
3
  import moment from "moment";
4
4
  export class State {
5
- constructor() {
6
- Object.defineProperty(this, "menuKey", {
7
- enumerable: true,
8
- configurable: true,
9
- writable: true,
10
- value: ""
11
- });
12
- /** dueDate of task */
13
- Object.defineProperty(this, "dueDate", {
5
+ constructor(_layout, _url) {
6
+ Object.defineProperty(this, "_layout", {
14
7
  enumerable: true,
15
8
  configurable: true,
16
9
  writable: true,
17
- value: void 0
10
+ value: _layout
18
11
  });
19
- /** status of notifications */
20
- Object.defineProperty(this, "status", {
12
+ Object.defineProperty(this, "_url", {
21
13
  enumerable: true,
22
14
  configurable: true,
23
15
  writable: true,
24
- value: void 0
16
+ value: _url
25
17
  });
26
- /** status All Notifications list Total */
27
- Object.defineProperty(this, "nAllTotal", {
28
- enumerable: true,
29
- configurable: true,
30
- writable: true,
31
- value: 0
32
- });
33
- /** Read Notifications list Total */
34
- Object.defineProperty(this, "nReadTotal", {
18
+ Object.defineProperty(this, "menuKey", {
35
19
  enumerable: true,
36
20
  configurable: true,
37
21
  writable: true,
38
- value: 0
22
+ value: undefined
39
23
  });
40
- /** Later Notifications list Total */
41
- Object.defineProperty(this, "nLaterTotal", {
24
+ /** dueDate of task */
25
+ Object.defineProperty(this, "dueDate", {
42
26
  enumerable: true,
43
27
  configurable: true,
44
28
  writable: true,
45
- value: 0
29
+ value: void 0
46
30
  });
47
- /** Dismissed Notifications list Total */
48
- Object.defineProperty(this, "nDismissedTotal", {
31
+ /** status All Notifications list Total */
32
+ Object.defineProperty(this, "notificationTotals", {
49
33
  enumerable: true,
50
34
  configurable: true,
51
35
  writable: true,
52
- value: 0
36
+ value: {
37
+ unread: 0,
38
+ read: 0,
39
+ later: 0,
40
+ dismissed: 0
41
+ }
53
42
  });
54
43
  makeObservable(this);
55
44
  }
45
+ navigate(key, rest) {
46
+ this.menuKey = [key];
47
+ this._layout.history.push(`${this._url}${key}${rest !== null && rest !== void 0 ? rest : ""}`);
48
+ }
56
49
  get filters() {
57
50
  var _a, _b, _c, _d, _e, _f;
58
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)
@@ -69,38 +62,18 @@ export class State {
69
62
  },
70
63
  ];
71
64
  }
72
- get notificaitonFilters() {
73
- if (!this.status)
74
- return [];
75
- return [
76
- { c: "Status", o: "=", l: "And", v1: this.status, },
77
- ];
78
- }
79
- onClick({ key }) {
80
- this.menuKey = key.toString();
81
- if (key.toString().includes("Today"))
82
- this.dueDate = [moment().startOf("day"), moment().endOf("day")];
83
- if (key.toString().includes("Week"))
84
- this.dueDate = [moment().startOf("week"), moment().endOf("week")];
85
- if (key.toString().includes("Month"))
86
- this.dueDate = [moment().startOf("month"), moment().endOf("month")];
87
- if (key.toString().includes("Unscheduled"))
88
- this.dueDate = [
89
- moment().add(1, "months").startOf("month"),
90
- moment().add(1, "months").endOf("month"),
91
- ];
92
- if (key.toString().includes("All"))
93
- this.status = "";
94
- if (key.toString().includes("Read"))
95
- this.status = "Read";
96
- if (key.toString().includes("Later"))
97
- this.status = "Later";
98
- if (key.toString().includes("Dismissed"))
99
- this.status = "Dismissed";
65
+ updateNotificationTotal(oldStatus, status) {
66
+ this.notificationTotals[oldStatus.toLowerCase()]--;
67
+ this.notificationTotals[status.toLowerCase()]++;
100
68
  }
101
69
  /** Notifications list Options */
102
- get nAllOptions() {
103
- return { Total: true, List: false, };
70
+ get nUnreadOptions() {
71
+ return {
72
+ Total: true, List: false,
73
+ Filters: [
74
+ { c: "Status", o: "=", l: "And", v1: "Unread" },
75
+ ],
76
+ };
104
77
  }
105
78
  /** Notifications list Read Options */
106
79
  get nReadOptions() {
@@ -138,25 +111,16 @@ __decorate([
138
111
  ], State.prototype, "dueDate", void 0);
139
112
  __decorate([
140
113
  observable
141
- ], State.prototype, "status", void 0);
142
- __decorate([
143
- observable
144
- ], State.prototype, "nAllTotal", void 0);
145
- __decorate([
146
- observable
147
- ], State.prototype, "nReadTotal", void 0);
114
+ ], State.prototype, "notificationTotals", void 0);
148
115
  __decorate([
149
- observable
150
- ], State.prototype, "nLaterTotal", void 0);
151
- __decorate([
152
- observable
153
- ], State.prototype, "nDismissedTotal", void 0);
116
+ action
117
+ ], State.prototype, "navigate", null);
154
118
  __decorate([
155
119
  action
156
- ], State.prototype, "onClick", null);
120
+ ], State.prototype, "updateNotificationTotal", null);
157
121
  __decorate([
158
122
  computed
159
- ], State.prototype, "nAllOptions", null);
123
+ ], State.prototype, "nUnreadOptions", null);
160
124
  __decorate([
161
125
  computed
162
126
  ], State.prototype, "nReadOptions", null);
@@ -1 +1 @@
1
- {"version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  "description": "morpho workspace module",
5
5
  "repository": {
6
6
  "type": "git",
package/es/MySpace.d.ts DELETED
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- export declare class MySpace extends React.Component<{
3
- name?: string;
4
- }> {
5
- constructor(props: any);
6
- render(): JSX.Element;
7
- }
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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"NotificaitonStore.js","sourceRoot":"","sources":["../../../src/data/notification/NotificaitonStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAe,cAAc,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAKlC,MAAM,SAAS,GAAG,mBAAmB,CAAC;AAEtC,mDAAmD;AACnD,MAAM,OAAO,iBAAkB,SAAQ,KAAK;IAIxC,YAAmC,QAAqB;QACp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C,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACjE,CAAC;QACF,OAAO,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,CAAoB,CAAC;IAC/C,CAAC;IAED,uCAAuC;IAChC,KAAK,CAAC,IAAI,CAAC,EAAU,EAAE,OAAgC;QAC1D,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE;YAC1B,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAC,IAAI,CAC9B,8BAA8B,EAAE,EAAE,EAClC,IAAI,cAAc,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAC1C,CAAC;YAEF,OAAO,MAAM,CAAC,CAAC,IAAI,EAAE,CAAC;QAC1B,CAAC,EAAE,OAAO,CAAC,CAAC;IAChB,CAAC;CACJ;AAED,+CAA+C;AAC/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACrC,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE;QAChC,OAAO,CAAC,eAAe,CAAC,IAAI,iBAAiB,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC;KAC/E;IACD,OAAO,OAAO,CAAC,UAAU,CAAC,SAAS,CAAuB,CAAC;AAC/D,CAAC,CAAC"}
@@ -1,17 +0,0 @@
1
- /// <reference types="react" />
2
- import { DocumentRoute } from "@voplus/morpho-document/es/routes";
3
- declare const Routes: {
4
- NotificationList: {
5
- route: string;
6
- tabPattern: RegExp;
7
- getUrl: () => string;
8
- component: ({ id }: {
9
- id: string;
10
- }) => JSX.Element;
11
- };
12
- Notification: {
13
- getUrl: typeof DocumentRoute;
14
- };
15
- addRoutes: () => void;
16
- };
17
- export default Routes;
@@ -1,29 +0,0 @@
1
- import { Route, Switch } from "react-router";
2
- import { BaseRoutes } from "@voplus/morpho-data";
3
- import { DocumentRoute } from "@voplus/morpho-document/es/routes";
4
- import React from "react";
5
- import NotificationList from "./pages/NotificationListView";
6
- const NotificationRoutes = () => {
7
- return (React.createElement(Switch, null,
8
- React.createElement(Route, { path: Routes.NotificationList.route, exact: true, component: Routes.NotificationList.component })));
9
- };
10
- const Routes = {
11
- NotificationList: {
12
- route: "/notifications",
13
- tabPattern: RegExp("/notifications"),
14
- getUrl: () => `/notifications`,
15
- component: NotificationList,
16
- },
17
- Notification: {
18
- getUrl: DocumentRoute,
19
- },
20
- addRoutes: () => {
21
- BaseRoutes.routes.push({
22
- name: "notifications-list",
23
- tabBasePattern: Routes.NotificationList.tabPattern,
24
- component: React.createElement(NotificationRoutes, null),
25
- });
26
- },
27
- };
28
- export default Routes;
29
- //# sourceMappingURL=NotificationRoutes.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"NotificationRoutes.js","sourceRoot":"","sources":["../../../src/modules/notification/NotificationRoutes.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,gBAAgB,MAAM,8BAA8B,CAAC;AAE5D,MAAM,kBAAkB,GAAG,GAAG,EAAE;IAC/B,OAAO,CACN,oBAAC,MAAM;QACN,oBAAC,KAAK,IAAC,IAAI,EAAE,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,gBAAgB,CAAC,SAAS,GAAI,CACjG,CACT,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG;IACd,gBAAgB,EAAE;QACjB,KAAK,EAAE,gBAAgB;QACvB,UAAU,EAAE,MAAM,CAAC,gBAAgB,CAAC;QACpC,MAAM,EAAE,GAAG,EAAE,CAAC,gBAAgB;QAC9B,SAAS,EAAE,gBAAgB;KAC3B;IACD,YAAY,EAAE;QACb,MAAM,EAAE,aAAa;KACrB;IAED,SAAS,EAAE,GAAG,EAAE;QACf,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC;YACtB,IAAI,EAAE,oBAAoB;YAC1B,cAAc,EAAE,MAAM,CAAC,gBAAgB,CAAC,UAAU;YAClD,SAAS,EAAE,oBAAC,kBAAkB,OAAG;SACjC,CAAC,CAAC;IACJ,CAAC;CACD,CAAC;AAEF,eAAe,MAAM,CAAC"}
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import { IMentionedNotification } from "../../../../data/notification";
3
- declare const MentionNotificaitonCard: (props: {
4
- id: string;
5
- notificaiton: IMentionedNotification;
6
- className?: string;
7
- onClick?: () => void;
8
- }) => JSX.Element;
9
- export default MentionNotificaitonCard;
@@ -1,27 +0,0 @@
1
- import React from "react";
2
- import { observe } from "@voplus/morpho-ui";
3
- import { Button } from "@voplus/antd";
4
- import Card from "@voplus/morpho-ui/es/controls/Card";
5
- import ProseMirrorViewer from "@voplus/morpho-text/es/controls/ProseMirror/Viewer";
6
- import styles from "./index.less";
7
- import classnames from "classnames";
8
- import { Scrollbars } from "react-custom-scrollbars";
9
- import { useNotificaitonStore } from "../../../../data/notification";
10
- const MentionNotificaitonCard = (props) => {
11
- const { id, notificaiton } = props;
12
- // const notificaiton = useNotificaiton(props.id) as IMentionedNotification;
13
- const store = useNotificaitonStore();
14
- return observe(() => React.createElement(Card, { className: classnames(styles["notificaiton-card"], props.className), bordered: true, shadow: true },
15
- React.createElement("div", { onClick: props.onClick },
16
- React.createElement("h3", null, "Notificaiton"),
17
- React.createElement(Scrollbars, { autoHide: true, autoHeight: true, autoHeightMax: "70px" },
18
- React.createElement(ProseMirrorViewer, { html: notificaiton.content.content })),
19
- React.createElement("div", { className: "notificaiton-btn" },
20
- notificaiton.status !== "Dismissed" && React.createElement(Button, { onClick: () => onEditStatus("dismiss") }, "Dismiss"),
21
- notificaiton.status !== "Later" && React.createElement(Button, { onClick: () => onEditStatus("later") }, "Later")))));
22
- function onEditStatus(status) {
23
- store.edit(id, { data: { status: status }, error: "message" });
24
- }
25
- };
26
- export default MentionNotificaitonCard;
27
- //# sourceMappingURL=index.js.map