@voplus/morpho-workspace 6.0.101 → 6.0.103
Sign up to get free protection for your applications and to get access to all the features.
- package/es/modules/board/pages/BoardPage/index.js +4 -16
- package/es/modules/board/pages/BoardPage/index.js.map +1 -1
- package/es/modules/meeting/components/MeetingPropertiesView/index.js +10 -10
- package/es/modules/meeting/components/MeetingPropertiesView/index.js.map +1 -1
- package/es/modules/meeting/components/MeetingsFolderProperitesView/index.js +11 -8
- package/es/modules/meeting/components/MeetingsFolderProperitesView/index.js.map +1 -1
- package/es/modules/notification/components/NotificationList/index.d.ts +1 -5
- package/es/modules/notification/components/NotificationList/index.js +19 -19
- package/es/modules/notification/components/NotificationList/index.js.map +1 -1
- package/es/modules/notification/components/NotificationList/state.d.ts +21 -0
- package/es/modules/notification/components/NotificationList/state.js +104 -0
- package/es/modules/notification/components/NotificationList/state.js.map +1 -0
- package/es/modules/notification/components/NotificationListHeader/index.js +24 -3
- package/es/modules/notification/components/NotificationListHeader/index.js.map +1 -1
- package/es/modules/tasks/components/TaskPropertiesView/index.js +9 -7
- package/es/modules/tasks/components/TaskPropertiesView/index.js.map +1 -1
- package/es/modules/work/components/WorkPropertiesView/index.js +4 -11
- package/es/modules/work/components/WorkPropertiesView/index.js.map +1 -1
- package/es/obsolete/space/components/Notifications/index.js +0 -7
- package/es/obsolete/space/components/Notifications/index.js.map +1 -1
- package/package.json +1 -1
@@ -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 {
|
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
|
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(
|
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 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/board/pages/BoardPage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,SAAS,MAAM,4BAA4B,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/board/pages/BoardPage/index.tsx"],"names":[],"mappings":"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AC,EAAE,EAAE,EAAE,GAAI,CAChB,CACD,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
@@ -1,8 +1,7 @@
|
|
1
|
-
import { Archive, Open, Print, Reload } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
2
|
-
import { CommentDataIcon, DocumentDataIcon } from "@voplus/morpho-document/es/controls/data-icons";
|
1
|
+
import { Archive, Open, Print, Reload, Close, } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
3
2
|
import React, { useMemo, useState } from "react";
|
4
3
|
import { ViewContext, ViewContextData, } from "@voplus/morpho-document-core/es/data/context/ViewContext";
|
5
|
-
import
|
4
|
+
import DocumentPropertiesHeader from "@voplus/morpho-document/es/components/DocumentPropertiesHeader";
|
6
5
|
import MeetingTabs from "../MeetingTabs";
|
7
6
|
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
8
7
|
import { observe } from "@voplus/morpho-ui";
|
@@ -16,13 +15,14 @@ const MeetingPropertiesView = (props) => {
|
|
16
15
|
const meeting = useMeeting(id);
|
17
16
|
return observe(() => (React.createElement(ViewContext.Provider, { value: view },
|
18
17
|
React.createElement("div", { className: "module-detail-view" }, reload && (React.createElement(React.Fragment, null,
|
19
|
-
React.createElement(
|
20
|
-
React.createElement(
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
18
|
+
React.createElement(DocumentPropertiesHeader, { id: id, documentHeaderProper: {
|
19
|
+
tools: (React.createElement(ToolBar, { id: id, moreProps: { closeAside: true } },
|
20
|
+
React.createElement(Reload, { action: onReLoad }),
|
21
|
+
React.createElement(Open, { url: meta.getRoute(meeting) }),
|
22
|
+
React.createElement(Archive, null),
|
23
|
+
React.createElement(Print, { url: `meeting/print/${id}` }),
|
24
|
+
React.createElement(Close, null))),
|
25
|
+
} }),
|
26
26
|
React.createElement(MeetingTabs, { id: id, properties: true })))))));
|
27
27
|
/** reload data */
|
28
28
|
function onReLoad() {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/meeting/components/MeetingPropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/meeting/components/MeetingPropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,OAAO,EACP,IAAI,EACJ,KAAK,EACL,MAAM,EACN,KAAK,GACL,MAAM,qDAAqD,CAAC;AAC7D,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EACN,WAAW,EACX,eAAe,GACf,MAAM,0DAA0D,CAAC;AAClE,OAAO,wBAAwB,MAAM,gEAAgE,CAAC;AACtG,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,qBAAqB,GAAG,CAAC,KAAqB,EAAE,EAAE;IACvD,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IACrB,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,IAAI,GAAG,YAAY,EAAE,CAAC;IAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,eAAe,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC,CAAC;IACtE,MAAM,OAAO,GAAG,UAAU,CAAC,EAAE,CAAC,CAAC;IAE/B,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI;QAChC,6BAAK,SAAS,EAAC,oBAAoB,IACjC,MAAM,IAAI,CACV,oBAAC,KAAK,CAAC,QAAQ;YACd,oBAAC,wBAAwB,IACxB,EAAE,EAAE,EAAE,EACN,oBAAoB,EAAE;oBACrB,KAAK,EAAE,CACN,oBAAC,OAAO,IAAC,EAAE,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE;wBAC/C,oBAAC,MAAM,IAAC,MAAM,EAAE,QAAQ,GAAI;wBAC5B,oBAAC,IAAI,IAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAI;wBACrC,oBAAC,OAAO,OAAG;wBACX,oBAAC,KAAK,IAAC,GAAG,EAAE,iBAAiB,EAAE,EAAE,GAAI;wBACrC,oBAAC,KAAK,OAAG,CACA,CACV;iBACD,GACA;YACF,oBAAC,WAAW,IAAC,EAAE,EAAE,EAAE,EAAE,UAAU,SAAG,CAClB,CACjB,CACI,CACgB,CACvB,CAAC,CAAC;IACH,kBAAkB;IAClB,SAAS,QAAQ;QAChB,SAAS,CAAC,KAAK,CAAC,CAAC;QACjB,UAAU,CAAC,GAAG,EAAE;YACf,SAAS,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC,EAAE,GAAG,CAAC,CAAC;IACT,CAAC;AACF,CAAC,CAAC;AACF,eAAe,qBAAqB,CAAC"}
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import "./index.less";
|
2
|
-
import { Archive, Open, Reload } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
2
|
+
import { Archive, Open, Reload, Close } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
3
3
|
import React, { useMemo, useState } from "react";
|
4
4
|
import { ViewContext, ViewContextData, } from "@voplus/morpho-document-core/es/data/context/ViewContext";
|
5
5
|
import { useDocument, useMetaStore } from "@voplus/morpho-document-core";
|
6
6
|
import ActivityLog from "@voplus/morpho-org/es/components/ActivityLog/ActivityLog2";
|
7
|
-
import
|
7
|
+
import DocumentPropertiesHeader from "@voplus/morpho-document/es/components/DocumentPropertiesHeader";
|
8
8
|
import DocumentList from "@voplus/morpho-document/es/components/DocumentList";
|
9
9
|
import DocumentTabs from "@voplus/morpho-document/es/components/DocumentTabs";
|
10
10
|
import Links from "@voplus/morpho-document/es/components/Links";
|
@@ -20,11 +20,14 @@ const MeetingsFolderPropertiesView = (props) => {
|
|
20
20
|
const [activeKey, setActiveKey] = useState();
|
21
21
|
return observe(() => (React.createElement(ViewContext.Provider, { value: view },
|
22
22
|
React.createElement("div", { className: "module-detail-view" }, reload && (React.createElement(React.Fragment, null,
|
23
|
-
React.createElement(
|
24
|
-
React.createElement(
|
25
|
-
|
26
|
-
|
27
|
-
|
23
|
+
React.createElement(DocumentPropertiesHeader, { id: id, documentHeaderProper: {
|
24
|
+
tools: (React.createElement(ToolBar, { id: id, moreProps: { closeAside: true } },
|
25
|
+
React.createElement(Reload, { action: onReload }),
|
26
|
+
React.createElement(Open, { url: meta.getRoute(document) }),
|
27
|
+
React.createElement(Archive, null),
|
28
|
+
React.createElement(Close, null))),
|
29
|
+
} }),
|
30
|
+
React.createElement(DocumentTabs, { id: id, active: "Meetings", properties: true, tabItems: [
|
28
31
|
{
|
29
32
|
key: "Meetings",
|
30
33
|
label: "Meetings",
|
@@ -34,7 +37,7 @@ const MeetingsFolderPropertiesView = (props) => {
|
|
34
37
|
{
|
35
38
|
key: "Document",
|
36
39
|
label: "Document",
|
37
|
-
children: (React.createElement(DocumentList, { id: id, multiple: true, viewTitle:
|
40
|
+
children: (React.createElement(DocumentList, { id: id, multiple: true, viewTitle: false, total: false, exclude: ["Meeting"] })),
|
38
41
|
},
|
39
42
|
{
|
40
43
|
key: "Activities",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/meeting/components/MeetingsFolderProperitesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,qDAAqD,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/meeting/components/MeetingsFolderProperitesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,qDAAqD,CAAC;AACnG,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EACN,WAAW,EACX,eAAe,GACf,MAAM,0DAA0D,CAAC;AAClE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,WAAW,MAAM,2DAA2D,CAAC;AACpF,OAAO,wBAAwB,MAAM,gEAAgE,CAAC;AACtG,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,KAAK,MAAM,6CAA6C,CAAC;AAChE,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,4BAA4B,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC9D,MAAM,EAAE,EAAE,EAAE,GAAG,KAAK,CAAC;IAErB,MAAM,IAAI,GAAG,YAAY,EAAE,CAAC;IAC5B,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,eAAe,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC,CAAC;IACtE,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;IAEjC,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC3C,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAU,CAAC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AAC,WAAW,IAAC,EAAE,EAAE,EAAE,EAAE,KAAK,EAAC,GAAG,GAAG,CAAC,CAAC,CAAC,IAAI,CAAI,CAC5E;qBACD;oBACD;wBACC,GAAG,EAAE,OAAO;wBACZ,KAAK,EAAE,OAAO;wBACd,QAAQ,EAAE,oBAAC,KAAK,IAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,GAAI;qBAC3C;iBACD,EACD,QAAQ,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,GACnC,CACc,CACjB,CACI,CACgB,CACvB,CAAC,CAAC;IACH,kBAAkB;IAClB,SAAS,QAAQ;QAChB,SAAS,CAAC,KAAK,CAAC,CAAC;QACjB,UAAU,CAAC,GAAG,EAAE;YACf,SAAS,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC,EAAE,GAAG,CAAC,CAAC;IACT,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,4BAA4B,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React from "react";
|
2
|
-
import { INotification
|
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(
|
51
|
-
React.createElement(
|
52
|
-
|
53
|
-
|
54
|
-
React.createElement(
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
(
|
61
|
-
|
62
|
-
|
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
|
-
|
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;
|
1
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AG,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,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AkB,CAAC,IAAI,CAAC;YACrC,CAAC;YACD,KAAK,OAAO,CAAC,CAAC,CAAC;gBACd,OAAO,IAAI,CAAC,kBAAkB,CAAC,KAAK,CAAC;YACtC,CAAC;YACD,KAAK,WAAW,CAAC,CAAC,CAAC;gBAClB,OAAO,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC;YAC1C,CAAC;YACD;gBACC,OAAO,IAAI,CAAC;QACd,CAAC;IACF,CAAC;CACD;AAvEmB;IAAlB,UAAU;iEAKT;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
|
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(
|
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) },
|
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":"","sources":["../../../../../src/modules/notification/components/NotificationListHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AACzE,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/notification/components/NotificationListHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AACzE,OAAO,cAAc,MAAM,+DAA+D,CAAC;AAC3F,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,c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AAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5B,oBAAC,MAAM,IACN,GAAG,EAAE,KAAK,EACV,SAAS,EAAE,UAAU,CAAC,IAAI,EAAE;wBAC3B,MAAM,EAAE,YAAY,KAAK,IAAI;qBAC7B,CAAC,EACF,OAAO,EAAE,GAAG,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC;oBAEjC,IAAI;oBACJ,IAAI,KAAK,KAAK,IAAI,CAClB;;wBAEE,IAAI,KAAK,QAAQ;4BACjB,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC,MAAM;4BACpC,CAAC,CAAC,IAAI,KAAK,MAAM;gCACjB,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC,IAAI;gCAClC,CAAC,CAAC,IAAI,KAAK,OAAO;oCAClB,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC,KAAK;oCACnC,CAAC,CAAC,IAAI,KAAK,WAAW;wCACtB,CAAC,CAAC,QAAQ,CAAC,kBAAkB,CAAC,SAAS;wCACvC,CAAC,CAAC,CAAC;4BAEF,CACH,CACO,CACT,CAAC;gBAED,OAAO,CAAC,IAAI,CAAC,MAAM,IAAI,oBAAC,OAAO,IAAC,IAAI,EAAC,UAAU,GAAG,CAC9C,CACN,GACA,CACG,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"}
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import "./index.less";
|
2
|
-
import { Archive, Open, Reload } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
2
|
+
import { Archive, Open, Reload, Close } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
3
3
|
import React, { useMemo, useState } from "react";
|
4
4
|
import { ViewContext, ViewContextData, } from "@voplus/morpho-document-core/es/data/context/ViewContext";
|
5
|
-
import
|
6
|
-
import TaskDataIconBar from "../../controls/TaskDataIconBar";
|
5
|
+
import DocumentPropertiesHeader from "@voplus/morpho-document/es/components/DocumentPropertiesHeader";
|
7
6
|
import TaskTabs from "../TaskTabs";
|
8
7
|
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
9
8
|
import { observe } from "@voplus/morpho-ui";
|
@@ -16,10 +15,13 @@ const TaskPropertiesView = (props) => {
|
|
16
15
|
const task = useTask(id, { reload: true, includes: "tags,task-number-reports,createdby,folder" });
|
17
16
|
const [loaded, setLoaded] = useState(true);
|
18
17
|
return observe(() => (React.createElement(ViewContext.Provider, { value: view }, loaded && (React.createElement("div", { className: "module-detail-view" },
|
19
|
-
React.createElement(
|
20
|
-
React.createElement(
|
21
|
-
|
22
|
-
|
18
|
+
React.createElement(DocumentPropertiesHeader, { id: id, documentHeaderProper: {
|
19
|
+
tools: (React.createElement(ToolBar, { id: id, moreProps: { closeAside: true } },
|
20
|
+
React.createElement(Reload, { action: onReload }),
|
21
|
+
React.createElement(Open, { url: meta.getRoute(task) }),
|
22
|
+
React.createElement(Archive, null),
|
23
|
+
React.createElement(Close, null))),
|
24
|
+
} }),
|
23
25
|
React.createElement(TaskTabs, { id: id, properties: true }))))));
|
24
26
|
/** reload data */
|
25
27
|
function onReload() {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskPropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskPropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,qDAAqD,CAAC;AACnG,OAAO,KAAK,EAAE,EAAE,OAAO,EA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EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAI;oBAClC,oBAAC,OAAO,OAAG;oBACX,oBAAC,KAAK,OAAG,CACA,CACV;aACD,GACA;QACF,oBAAC,QAAQ,IAAC,EAAE,EAAE,EAAE,EAAE,UAAU,SAAG,CAC1B,CACN,CACqB,CACvB,CAAC,CAAC;IACH,kBAAkB;IAClB,SAAS,QAAQ;QAChB,SAAS,CAAC,KAAK,CAAC,CAAC;QACjB,UAAU,CAAC,GAAG,EAAE;YACf,SAAS,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC,EAAE,GAAG,CAAC,CAAC;IACT,CAAC;AACF,CAAC,CAAC;AACF,eAAe,kBAAkB,CAAC"}
|
@@ -1,25 +1,18 @@
|
|
1
1
|
import "./index.less";
|
2
|
-
import { Open, Reload } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
|
3
2
|
import React, { useMemo, useState } from "react";
|
4
3
|
import { ViewContext, ViewContextData, } from "@voplus/morpho-document-core/es/data/context/ViewContext";
|
5
|
-
import
|
6
|
-
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
4
|
+
import DocumentPropertiesHeader from "@voplus/morpho-document/es/components/DocumentPropertiesHeader";
|
7
5
|
import WorkTabs from "../WorkTabs";
|
8
6
|
import { observe } from "@voplus/morpho-ui";
|
9
|
-
import { useMetaStore } from "@voplus/morpho-document-core";
|
10
|
-
import { useWork } from "../../../../data/work";
|
11
7
|
const WorkPropertiesView = (props) => {
|
12
8
|
const id = props.id;
|
13
|
-
const meta = useMetaStore();
|
14
9
|
const view = useMemo(() => new ViewContextData("PropertiesView"), []);
|
15
|
-
const work = useWork(id, { reload: false });
|
16
10
|
const [loaded, setLoaded] = useState(true);
|
17
11
|
return observe(() => (React.createElement(ViewContext.Provider, { value: view },
|
18
12
|
React.createElement("div", { className: "module-detail-view work-properties-view" }, loaded && (React.createElement(React.Fragment, null,
|
19
|
-
React.createElement(
|
20
|
-
|
21
|
-
|
22
|
-
React.createElement(Open, { url: meta.getRoute(work) }))), descriptionVisible: false }),
|
13
|
+
React.createElement(DocumentPropertiesHeader, { id: id, documentHeaderProper: {
|
14
|
+
toolBarProps: { closeAside: true, close: true, onReload: onReload },
|
15
|
+
} }),
|
23
16
|
React.createElement(WorkTabs, { id: id, propertie: true })))))));
|
24
17
|
/** reload data */
|
25
18
|
function onReload() {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkPropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/work/components/WorkPropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjD,OAAO,EACN,WAAW,EACX,eAAe,GACf,MAAM,0DAA0D,CAAC;AAClE,OAAO,wBAAwB,MAAM,gEAAgE,CAAC;AACtG,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,MAAM,kBAAkB,GAAG,CAAC,KAAwC,EAAE,EAAE;IACvE,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;IAEpB,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,IAAI,eAAe,CAAC,gBAAgB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEtE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE3C,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI;QAChC,6BAAK,SAAS,EAAC,yCAAyC,IACtD,MAAM,IAAI,CACV,oBAAC,KAAK,CAAC,QAAQ;YACd,oBAAC,wBAAwB,IACxB,EAAE,EAAE,EAAE,EACN,oBAAoB,EAAE;oBACrB,YAAY,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE;iBACnE,GACA;YACF,oBAAC,QAAQ,IAAC,EAAE,EAAE,EAAE,EAAE,SAAS,SAAG,CACd,CACjB,CACI,CACgB,CACvB,CAAC,CAAC;IACH,kBAAkB;IAClB,SAAS,QAAQ;QAChB,SAAS,CAAC,KAAK,CAAC,CAAC;QACjB,UAAU,CAAC,GAAG,EAAE;YACf,SAAS,CAAC,IAAI,CAAC,CAAC;QACjB,CAAC,EAAE,GAAG,CAAC,CAAC;IACT,CAAC;AACF,CAAC,CAAC;AACF,eAAe,kBAAkB,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;
|
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,EAAE,MAAM,kBAAkB,CAAC;AAE7C,MAAM,aAAa,GAAG,CAAC,KAAqC,EAAE,EAAE;IAC/D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,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,8DAA8D;QAC9D,IAAI,MAAM,CAAC,MAAM,KAAK,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;YACnD,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