@voplus/morpho-workspace 6.0.101 → 6.0.102

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,22 +1,18 @@
1
1
  import React, { useEffect } from "react";
2
2
  import BoardTabs from "../../components/BoardTabs";
3
3
  import { useBoard } from "../../../../data/board";
4
- import PageHeaderBoard from "@voplus/morpho-ui/es/components/layout/headers/PageHeaderBoard";
5
4
  import { observe } from "@voplus/morpho-ui";
6
5
  import { useParams } from "react-router-dom";
7
- import { useMetaStore } from "@voplus/morpho-document-core";
8
- import { useLayout, useTabItem } from "@voplus/morpho-data";
9
- import DocumentPageHeader from "@voplus/morpho-document/es/components/DocumentPageHeader";
6
+ import { useTabItem } from "@voplus/morpho-data";
10
7
  import { useFrame } from "@voplus/morpho-document/es/components/ViewFrame/ViewFrameContext";
8
+ import PathHeader from "@voplus/morpho-document/es/components/ViewFrame/PathHeader";
11
9
  import { runInAction } from "mobx";
12
10
  import "./index.less";
13
11
  const BoardPage = (props) => {
14
12
  const params = useParams();
15
13
  const frame = useFrame();
16
14
  const id = props.id || params.id || "";
17
- const meta = useMetaStore();
18
- const layout = useLayout();
19
- const board = useBoard(id, { includes: "path" });
15
+ const board = useBoard(id);
20
16
  frame.header = null;
21
17
  /** set tab title */
22
18
  const tab = useTabItem();
@@ -25,16 +21,8 @@ const BoardPage = (props) => {
25
21
  }, []);
26
22
  return observe(() => (React.createElement("div", { className: "board-page" },
27
23
  React.createElement("div", { className: "board-page-content" },
28
- React.createElement(PageHeaderBoard, { title: React.createElement(DocumentPageHeader, { id: id }), breadCrumbsPathProps: {
29
- current: { id: id, name: board.name },
30
- path: board.path,
31
- onBreadCrumb: onNavigate,
32
- } }),
24
+ React.createElement(PathHeader, { id: id }),
33
25
  React.createElement(BoardTabs, { id: id })))));
34
- function onNavigate(aId) {
35
- const route = meta.getRoute({ id: id, type: "Document" });
36
- layout.history.push(`${route}?active=${aId}`);
37
- }
38
26
  };
39
27
  export default BoardPage;
40
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
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AAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,kEAAkE,CAAC;AAC5F,OAAO,UAAU,MAAM,4DAA4D,CAAC;AACpF,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,cAAc,CAAC;AAEtB,MAAM,SAAS,GAAG,CAAC,KAAsB,EAAE,EAAE;IAC5C,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,IAAI,MAAM,CAAC,EAAE,IAAI,EAAE,CAAC;IACvC,MAAM,KAAK,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAC3B,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;IAEpB,oBAAoB;IACpB,MAAM,GAAG,GAAG,UAAU,EAAE,CAAC;IACzB,SAAS,CAAC,GAAG,EAAE;QACd,WAAW,CAAC,GAAG,EAAE,WAAC,OAAA,CAAC,GAAG,CAAC,KAAK,GAAG,MAAA,KAAK,CAAC,IAAI,mCAAI,UAAU,CAAC,CAAA,EAAA,CAAC,CAAC;IAC3D,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,6BAAK,SAAS,EAAC,YAAY;QAC1B,6BAAK,SAAS,EAAC,oBAAoB;YAClC,oBAAC,UAAU,IAAC,EAAE,EAAE,EAAE,GAAI;YACtB,oBAAC,SAAS,IAAC,EAAE,EAAE,EAAE,GAAI,CAChB,CACD,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import { INotification, NotificationStatus } from "../../../../data/notification";
2
+ import { INotification } from "../../../../data/notification";
3
3
  import "./index.less";
4
4
  declare const NotificationList: (props: {
5
5
  /** status of notifications shown on the list. */
@@ -9,9 +9,5 @@ declare const NotificationList: (props: {
9
9
  /** Call back when an item has been clicked on the list. */
10
10
  onClickItem?: ((ev: React.MouseEvent<HTMLDivElement, MouseEvent>, item: INotification) => void) | undefined;
11
11
  onClickStatus?: ((status: string) => void) | undefined;
12
- /** Call back when received total number of notifications. */
13
- onTotal?: ((total: number) => void) | undefined;
14
- /** Call back when an item's status changed. */
15
- onItemStatusChanged?: ((old: NotificationStatus, item: INotification) => void) | undefined;
16
12
  }) => React.JSX.Element;
17
13
  export default NotificationList;
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useState } from "react";
1
+ import React, { useEffect, useState, useMemo } from "react";
2
2
  import { useNotificationListEffect, useNotificationStore, } from "../../../../data/notification";
3
3
  import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
4
4
  import { observe, useRenderOnChange } from "@voplus/morpho-ui";
@@ -10,10 +10,12 @@ import ListView from "@voplus/morpho-ui/es/components/layout/ListView/ListView2"
10
10
  import DocumentNotificationCard from "../DocumentNotificationCard";
11
11
  import AsideContent from "@voplus/morpho-ui/es/components/layout/AsideContent";
12
12
  import NodePropertiesView from "@voplus/morpho-document-core/es/components/NodePropertiesView";
13
+ import { NotificationListContext, NotificationListState } from "./state";
13
14
  import S from "string";
14
15
  import "./index.less";
15
16
  const NotificationList = (props) => {
16
17
  const store = useNotificationStore();
18
+ const context = useMemo(() => new NotificationListState(), []);
17
19
  const [asideContext] = useState(AsideContent.createContext());
18
20
  const list = useCreateListDataState({ filterDefaults: { filters: filters() } }, [
19
21
  props.status,
@@ -22,9 +24,7 @@ const NotificationList = (props) => {
22
24
  useRenderOnChange(() => list.filters.options);
23
25
  /** 把ListDataState传给useNotificaitonListEffect,使之可以自動更新loading, hasmore. */
24
26
  useNotificationListEffect(list, (result, total) => {
25
- var _a;
26
27
  list.union(result);
27
- (_a = props.onTotal) === null || _a === void 0 ? void 0 : _a.call(props, total);
28
28
  }, {
29
29
  Total: true,
30
30
  ...list.filters.options,
@@ -47,20 +47,21 @@ const NotificationList = (props) => {
47
47
  }, [props.active]);
48
48
  return observe(() => (React.createElement(ListDataContext.Provider, { value: list },
49
49
  React.createElement(AsideContent, { context: asideContext },
50
- React.createElement("div", { className: "my-space-notifications" },
51
- React.createElement(NotificationListHeader, { status: props.status, onClickStatus: props.onClickStatus }),
52
- React.createElement(ListView, { headerProps: { visible: false }, className: "notifications-list", asideable: false, renderItem: ({ item }) => {
53
- return (React.createElement(CSSTransition, { key: item.id, in: list.isRemoving(item.id) !== true, timeout: 300, classNames: "notification-card" },
54
- React.createElement(DocumentNotificationCard, { id: item.id, active: props.active === item.id ? true : false, className: "doc-notification-card", onClick: (ev) => {
55
- var _a;
56
- const path = ev.nativeEvent.composedPath();
57
- const visible = path.some((item) => item.className === "notification-card-content");
58
- /** fix: notification card里的任何对话框(比如:pdf/file viewer quick view) 任何button 都按不了,一按就close */
59
- if (visible) {
60
- (_a = props.onClickItem) === null || _a === void 0 ? void 0 : _a.call(props, ev, item);
61
- }
62
- }, onChangeStatus: (status) => editStatus(item.id, status) })));
63
- } }))))));
50
+ React.createElement(NotificationListContext.Provider, { value: context },
51
+ React.createElement("div", { className: "my-space-notifications" },
52
+ React.createElement(NotificationListHeader, { status: props.status, onClickStatus: props.onClickStatus }),
53
+ React.createElement(ListView, { headerProps: { visible: false }, className: "notifications-list", asideable: false, renderItem: ({ item }) => {
54
+ return (React.createElement(CSSTransition, { key: item.id, in: list.isRemoving(item.id) !== true, timeout: 300, classNames: "notification-card" },
55
+ React.createElement(DocumentNotificationCard, { id: item.id, active: props.active === item.id ? true : false, className: "doc-notification-card", onClick: (ev) => {
56
+ var _a;
57
+ const path = ev.nativeEvent.composedPath();
58
+ const visible = path.some((item) => item.className === "notification-card-content");
59
+ /** fix: notification card里的任何对话框(比如:pdf/file viewer quick view) 任何button 都按不了,一按就close */
60
+ if (visible) {
61
+ (_a = props.onClickItem) === null || _a === void 0 ? void 0 : _a.call(props, ev, item);
62
+ }
63
+ }, onChangeStatus: (status) => editStatus(item.id, status) })));
64
+ } })))))));
64
65
  function filters() {
65
66
  if (props.status == "all")
66
67
  return [];
@@ -75,11 +76,10 @@ const NotificationList = (props) => {
75
76
  }
76
77
  function editStatus(id, status) {
77
78
  runInAction(async () => {
78
- var _a;
79
79
  const item = store.items.get(id);
80
80
  const old = item.status;
81
81
  await store.edit(id, { data: { status: status }, error: "message" });
82
- (_a = props.onItemStatusChanged) === null || _a === void 0 ? void 0 : _a.call(props, old, item);
82
+ context.updateNotificationTotal(old, item.status);
83
83
  if (props.status === "unread" && item.status === "Read")
84
84
  return;
85
85
  list.remove(item.id, { delay: 300 });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/notification/components/NotificationList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAIN,yBAAyB,EACzB,oBAAoB,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,sBAAsB,MAAM,2BAA2B,CAAC;AAC/D,OAAO,QAAQ,MAAM,2DAA2D,CAAC;AACjF,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AACnE,OAAO,YAAY,MAAM,qDAAqD,CAAC;AAC/E,OAAO,kBAAkB,MAAM,+DAA+D,CAAC;AAC/F,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,cAAc,CAAC;AAEtB,MAAM,gBAAgB,GAAG,CAAC,KAiBzB,EAAE,EAAE;IACJ,MAAM,KAAK,GA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G,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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/notification/components/NotificationList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAIN,yBAAyB,EACzB,oBAAoB,GACpB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,sBAAsB,MAAM,2BAA2B,CAAC;AAC/D,OAAO,QAAQ,MAAM,2DAA2D,CAAC;AACjF,OAAO,wBAAwB,MAAM,6BAA6B,CAAC;AACnE,OAAO,YAAY,MAAM,qDAAqD,CAAC;AAC/E,OAAO,kBAAkB,MAAM,+DAA+D,CAAC;AAC/F,OAAO,EAAE,uBAAuB,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,CAAC,MAAM,QAAQ,CAAC;AACvB,OAAO,cAAc,CAAC;AAEtB,MAAM,gBAAgB,GAAG,CAAC,KAWzB,EAAE,EAAE;IACJ,MAAM,KAAK,GAAG,oBAAoB,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,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YACrE,OAAO,CAAC,uBAAuB,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAClD,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,21 @@
1
+ import React from "react";
2
+ import { LoadDocumentListOptions } from "@voplus/morpho-document-core";
3
+ import { NotificationStatus } from "../../../../data/notification";
4
+ /** Notification state */
5
+ export declare class NotificationListState {
6
+ constructor();
7
+ /** status All Notifications list Total */
8
+ notificationTotals: Record<string, number>;
9
+ updateNotificationTotal(oldStatus: NotificationStatus, status: NotificationStatus): void;
10
+ /** Notifications list Options */
11
+ get nUnreadOptions(): LoadDocumentListOptions;
12
+ /** Notifications list Read Options */
13
+ get nReadOptions(): LoadDocumentListOptions;
14
+ /** Notifications list Later Options */
15
+ get nLaterOptions(): LoadDocumentListOptions;
16
+ /** Notifications list Dismissed Options */
17
+ get nDismissedOptions(): LoadDocumentListOptions;
18
+ getTotal(status: string): number | null;
19
+ }
20
+ export declare const NotificationListContext: React.Context<NotificationListState | null>;
21
+ export declare const useNotificationListContext: () => NotificationListState;
@@ -0,0 +1,104 @@
1
+ import { __decorate } from "tslib";
2
+ import React, { useContext } from "react";
3
+ import { action, computed, observable, makeObservable } from "mobx";
4
+ /** Notification state */
5
+ export class NotificationListState {
6
+ constructor() {
7
+ /** status All Notifications list Total */
8
+ Object.defineProperty(this, "notificationTotals", {
9
+ enumerable: true,
10
+ configurable: true,
11
+ writable: true,
12
+ value: {
13
+ unread: 0,
14
+ read: 0,
15
+ later: 0,
16
+ dismissed: 0,
17
+ }
18
+ });
19
+ makeObservable(this);
20
+ }
21
+ updateNotificationTotal(oldStatus, status) {
22
+ this.notificationTotals[oldStatus.toLowerCase()]--;
23
+ this.notificationTotals[status.toLowerCase()]++;
24
+ }
25
+ /** Notifications list Options */
26
+ get nUnreadOptions() {
27
+ return {
28
+ Total: true,
29
+ List: false,
30
+ Filters: [{ c: "Status", o: "=", l: "And", v1: "Unread" }],
31
+ };
32
+ }
33
+ /** Notifications list Read Options */
34
+ get nReadOptions() {
35
+ return {
36
+ Total: true,
37
+ List: false,
38
+ Filters: [{ c: "Status", o: "=", l: "And", v1: "Read" }],
39
+ };
40
+ }
41
+ /** Notifications list Later Options */
42
+ get nLaterOptions() {
43
+ return {
44
+ Total: true,
45
+ List: false,
46
+ Filters: [{ c: "Status", o: "=", l: "And", v1: "Later" }],
47
+ };
48
+ }
49
+ /** Notifications list Dismissed Options */
50
+ get nDismissedOptions() {
51
+ return {
52
+ Total: true,
53
+ List: false,
54
+ Filters: [{ c: "Status", o: "=", l: "And", v1: "Dismissed" }],
55
+ };
56
+ }
57
+ getTotal(status) {
58
+ switch (status) {
59
+ case "Unread": {
60
+ return this.notificationTotals.unread;
61
+ }
62
+ case "Read": {
63
+ return this.notificationTotals.read;
64
+ }
65
+ case "Later": {
66
+ return this.notificationTotals.later;
67
+ }
68
+ case "Dismissed": {
69
+ return this.notificationTotals.dismissed;
70
+ }
71
+ default:
72
+ return null;
73
+ }
74
+ }
75
+ }
76
+ __decorate([
77
+ observable
78
+ ], NotificationListState.prototype, "notificationTotals", void 0);
79
+ __decorate([
80
+ action
81
+ ], NotificationListState.prototype, "updateNotificationTotal", null);
82
+ __decorate([
83
+ computed
84
+ ], NotificationListState.prototype, "nUnreadOptions", null);
85
+ __decorate([
86
+ computed
87
+ ], NotificationListState.prototype, "nReadOptions", null);
88
+ __decorate([
89
+ computed
90
+ ], NotificationListState.prototype, "nLaterOptions", null);
91
+ __decorate([
92
+ computed
93
+ ], NotificationListState.prototype, "nDismissedOptions", null);
94
+ __decorate([
95
+ action
96
+ ], NotificationListState.prototype, "getTotal", null);
97
+ export const NotificationListContext = React.createContext(null);
98
+ export const useNotificationListContext = () => {
99
+ const context = useContext(NotificationListContext);
100
+ if (context == null)
101
+ throw new Error("Menu Context not found. Please use <NotificationListContext.Provider value={}/>");
102
+ return context;
103
+ };
104
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/notification/components/NotificationList/state.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAIpE,0BAA0B;AAC1B,MAAM,OAAO,qBAAqB;IACjC;QAGA,0CAA0C;QACvB;;;;mBAA6C;gBAC/D,MAAM,EAAE,CAAC;gBACT,IAAI,EAAE,CAAC;gBACP,KAAK,EAAE,CAAC;gBACR,SAAS,EAAE,CAAC;aACZ;WAAC;QARD,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAUM,uBAAuB,CAAC,SAA6B,EAAE,MAA0B;QACvF,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;QACnD,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;IACjD,CAAC;IAED,iCAAiC;IAEjC,IAAW,cAAc;QACxB,OAAO;YACN,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,KAAK;YACX,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,QAAQ,EAAE,CAAC;SAC1D,CAAC;IACH,CAAC;IAED,sCAAsC;IAEtC,IAAW,YAAY;QACtB,OAAO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;AAGK;IADN,MAAM;oEAIN;AAID;IADC,QAAQ;2DAOR;AAID;IADC,QAAQ;yDAOR;AAID;IADC,QAAQ;0DAOR;AAID;IADC,QAAQ;8DAOR;AAEc;IAAd,MAAM;qDAiBN;AAGF,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,CAAC,aAAa,CAA+B,IAAI,CAAC,CAAC;AAC/F,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAG,EAAE;IAC9C,MAAM,OAAO,GAAG,UAAU,CAAC,uBAAuB,CAAC,CAAC;IACpD,IAAI,OAAO,IAAI,IAAI;QAClB,MAAM,IAAI,KAAK,CACd,iFAAiF,CACjF,CAAC;IACH,OAAO,OAAO,CAAC;AAChB,CAAC,CAAC"}
@@ -2,22 +2,30 @@ import React, { useEffect, useState } from "react";
2
2
  import { observe } from "@voplus/morpho-ui";
3
3
  import { Button, Divider } from "antd";
4
4
  import { FlagFilter } from "@voplus/morpho-document/es/controls/filters";
5
- import PageHeaderBoard from "@voplus/morpho-ui/es/components/layout/headers/PageHeaderBoard";
5
+ import PageHeaderPath from "@voplus/morpho-ui/es/components/layout/headers/PageHeaderPath";
6
+ import { useNotificationListEffect } from "../../../../data/notification";
6
7
  import { useApplicationContext } from "@voplus/morpho-data";
7
8
  import ListHeaderTool from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
8
9
  import { faBell } from "@fortawesome/pro-solid-svg-icons";
9
10
  import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
10
11
  import classnames from "classnames";
12
+ import { runInAction } from "mobx";
13
+ import { useNotificationListContext } from "../NotificationList/state";
11
14
  import S from "string";
12
15
  const NotificationListHeader = (props) => {
13
16
  const context = useApplicationContext();
17
+ const nContext = useNotificationListContext();
14
18
  const [statusActive, setStatusActive] = useState("All");
15
19
  useEffect(() => {
16
20
  setStatusActive(S(props.status).capitalize().toString());
17
21
  }, [props.status]);
18
22
  const status = ["All", "Unread", "Read", "Later", "Dismissed"];
23
+ useNotificationListEffect(null, (result, total) => runInAction(() => (nContext.notificationTotals.unread = total || 0)), nContext.nUnreadOptions);
24
+ useNotificationListEffect(null, (result, total) => runInAction(() => (nContext.notificationTotals.read = total || 0)), nContext.nReadOptions);
25
+ useNotificationListEffect(null, (result, total) => runInAction(() => (nContext.notificationTotals.later = total || 0)), nContext.nLaterOptions);
26
+ useNotificationListEffect(null, (result, total) => runInAction(() => (nContext.notificationTotals.dismissed = total || 0)), nContext.nDismissedOptions);
19
27
  return observe(() => (React.createElement("div", { className: "notifications-header" },
20
- React.createElement(PageHeaderBoard, { title: "Your Notifications Center", background: true, icon: React.createElement(FAIcon, { icon: faBell }) }),
28
+ React.createElement(PageHeaderPath, { title: "Your Notifications Center", background: true, icon: React.createElement(FAIcon, { icon: faBell }) }),
21
29
  React.createElement(ListHeaderTool, { addAble: false, filterViewProps: context.host.isTest
22
30
  ? {
23
31
  columns: [React.createElement(FlagFilter, { key: "Flag" })],
@@ -25,7 +33,20 @@ const NotificationListHeader = (props) => {
25
33
  : undefined, sortable: context.host.isTest ? true : false, searchHeader: context.host.isTest ? true : false, searchOptions: { placeholder: "Search in notifications" }, preExtra: () => (React.createElement("div", { className: "notifications-status" },
26
34
  status.map((item, index) => (React.createElement(Button, { key: index, className: classnames(item, {
27
35
  active: statusActive === item,
28
- }), onClick: () => onClickStatus(item) }, item))),
36
+ }), onClick: () => onClickStatus(item) },
37
+ item,
38
+ item !== "All" && (React.createElement(React.Fragment, null,
39
+ "\u00A0(",
40
+ item === "Unread"
41
+ ? nContext.notificationTotals.unread
42
+ : item === "Read"
43
+ ? nContext.notificationTotals.read
44
+ : item === "Later"
45
+ ? nContext.notificationTotals.later
46
+ : item === "Dismissed"
47
+ ? nContext.notificationTotals.dismissed
48
+ : 0,
49
+ ")"))))),
29
50
  context.host.isTest && React.createElement(Divider, { type: "vertical" }))) }))));
30
51
  function onClickStatus(item) {
31
52
  var _a;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":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ACG,CACN,CAAC,CAAC;IAEH,SAAS,aAAa,CAAC,IAAY;;QAClC,eAAe,CAAC,IAAI,CAAC,CAAC;QACtB,MAAA,KAAK,CAAC,aAAa,sDAAG,IAAI,CAAC,CAAC;IAC7B,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -3,7 +3,6 @@ import { Result, Skeleton } from "antd";
3
3
  import NotificationList from "../../../../modules/notification/components/NotificationList";
4
4
  import { generatePath } from "react-router";
5
5
  import { observe } from "@voplus/morpho-ui";
6
- import { runInAction } from "mobx";
7
6
  import { useLayout } from "@voplus/morpho-data";
8
7
  import { useNotificationStore } from "../../../../data/notification";
9
8
  import { useParams } from "react-router-dom";
@@ -29,12 +28,6 @@ const Notifications = (props) => {
29
28
  React.createElement(Skeleton, { loading: params.status === "redirect" },
30
29
  React.createElement(NotificationList, { status: params.status, active: params.active, onClickItem: (ev, item) => {
31
30
  layout.history.push(generatePath(props.path, { status: params.status, active: item.id }));
32
- }, onTotal: (total) => {
33
- runInAction(() => {
34
- props.state.notificationTotals[params.status] = total;
35
- });
36
- }, onItemStatusChanged: (old, item) => {
37
- props.state.updateNotificationTotal(old, item.status);
38
31
  } })))));
39
32
  };
40
33
  export default Notifications;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/obsolete/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,MAAM,CAAC;AAExC,OAAO,gBAAgB,MAAM,8DAA8D,CAAC;AAE5F,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,SAAS,EAAE,MAAM,q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IAChB,MAAM,EAAE,MAAM,CAAC,MAAO,EACtB,MAAM,EAAE,MAAM,CAAC,MAAM,EACrB,WAAW,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE;oBACzB,MAAM,CAAC,OAAO,CAAC,IAAI,CAClB,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CACpE,CAAC;gBACH,CAAC,EACD,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;oBAClB,WAAW,CAAC,GAAG,EAAE;wBAChB,KAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC,MAAM,CAAC,MAAO,CAAC,GAAG,KAAK,CAAC;oBACxD,CAAC,CAAC,CAAC;gBACJ,CAAC,EACD,mBAAmB,EAAE,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;oBAClC,KAAK,CAAC,KAAK,CAAC,uBAAuB,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;gBACvD,CAAC,GACA,CACQ,CACN,CACN,CACD,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/obsolete/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,MAAM,CAAC;AAExC,OAAO,gBAAgB,MAAM,8DAA8D,CAAC;AAE5F,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,SAAS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,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE;oBACzB,MAAM,CAAC,OAAO,CAAC,IAAI,CAClB,YAAY,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CACpE,CAAC;gBACH,CAAC,GASA,CACQ,CACN,CACN,CACD,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voplus/morpho-workspace",
3
- "version": "6.0.101",
3
+ "version": "6.0.102",
4
4
  "description": "morpho workspace module",
5
5
  "repository": {
6
6
  "type": "git",