@voplus/morpho-workspace 6.0.100 → 6.0.101

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,30 +2,21 @@ import React, { useEffect, useState } 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";
5
- import { message, Button, Divider } from "antd";
6
- import { FlagFilter } from "@voplus/morpho-document/es/controls/filters";
7
- import PageHeaderBoard from "@voplus/morpho-ui/es/components/layout/headers/PageHeaderBoard";
5
+ import { message } from "antd";
8
6
  import { CSSTransition } from "react-transition-group";
9
- import { useApplicationContext } from "@voplus/morpho-data";
10
7
  import { runInAction } from "mobx";
11
- import ListHeaderTool from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
8
+ import NotificationListHeader from "../NotificationListHeader";
12
9
  import ListView from "@voplus/morpho-ui/es/components/layout/ListView/ListView2";
13
10
  import DocumentNotificationCard from "../DocumentNotificationCard";
14
- import { faBell } from "@fortawesome/pro-solid-svg-icons";
15
- import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
16
11
  import AsideContent from "@voplus/morpho-ui/es/components/layout/AsideContent";
17
12
  import NodePropertiesView from "@voplus/morpho-document-core/es/components/NodePropertiesView";
18
- import classnames from "classnames";
19
13
  import S from "string";
20
14
  import "./index.less";
21
15
  const NotificationList = (props) => {
22
16
  const store = useNotificationStore();
23
- const context = useApplicationContext();
24
17
  const [asideContext] = useState(AsideContent.createContext());
25
- const [statusActive, setStatusActive] = useState("All");
26
- // const list = useCreateListDataState<INotificaiton>({}, []);
27
18
  const list = useCreateListDataState({ filterDefaults: { filters: filters() } }, [
28
- statusActive,
19
+ props.status,
29
20
  ]);
30
21
  /** 如果 list.filters.options变更了就重渲染,使下一行的useNotificaitonListEffect 可以接收新参数*/
31
22
  useRenderOnChange(() => list.filters.options);
@@ -54,23 +45,10 @@ const NotificationList = (props) => {
54
45
  });
55
46
  }
56
47
  }, [props.active]);
57
- useEffect(() => {
58
- setStatusActive(S(props.status).capitalize().toString());
59
- }, [props.status]);
60
- const status = ["All", "Unread", "Read", "Later", "Dismissed"];
61
48
  return observe(() => (React.createElement(ListDataContext.Provider, { value: list },
62
49
  React.createElement(AsideContent, { context: asideContext },
63
50
  React.createElement("div", { className: "my-space-notifications" },
64
- React.createElement(PageHeaderBoard, { title: "Your Notifications Center", background: true, icon: React.createElement(FAIcon, { icon: faBell }) }),
65
- React.createElement(ListHeaderTool, { addAble: false, filterViewProps: context.host.isTest
66
- ? {
67
- columns: [React.createElement(FlagFilter, { key: "Flag" })],
68
- }
69
- : 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" },
70
- status.map((item, index) => (React.createElement(Button, { key: index, className: classnames(item, {
71
- active: statusActive === item,
72
- }), onClick: () => onClickStatus(item) }, item))),
73
- context.host.isTest && React.createElement(Divider, { type: "vertical" }))) }),
51
+ React.createElement(NotificationListHeader, { status: props.status, onClickStatus: props.onClickStatus }),
74
52
  React.createElement(ListView, { headerProps: { visible: false }, className: "notifications-list", asideable: false, renderItem: ({ item }) => {
75
53
  return (React.createElement(CSSTransition, { key: item.id, in: list.isRemoving(item.id) !== true, timeout: 300, classNames: "notification-card" },
76
54
  React.createElement(DocumentNotificationCard, { id: item.id, active: props.active === item.id ? true : false, className: "doc-notification-card", onClick: (ev) => {
@@ -79,17 +57,21 @@ const NotificationList = (props) => {
79
57
  const visible = path.some((item) => item.className === "notification-card-content");
80
58
  /** fix: notification card里的任何对话框(比如:pdf/file viewer quick view) 任何button 都按不了,一按就close */
81
59
  if (visible) {
82
- // asideContext?.openAside(<PropertiesView id={item.node.id} />, {
83
- // span: 12,
84
- // });
85
60
  (_a = props.onClickItem) === null || _a === void 0 ? void 0 : _a.call(props, ev, item);
86
61
  }
87
62
  }, onChangeStatus: (status) => editStatus(item.id, status) })));
88
63
  } }))))));
89
64
  function filters() {
90
- if (statusActive == "All")
65
+ if (props.status == "all")
91
66
  return [];
92
- return [{ c: "Status", o: "=", l: "And", v1: statusActive }];
67
+ return [
68
+ {
69
+ c: "Status",
70
+ o: "=",
71
+ l: "And",
72
+ v1: S(props.status).capitalize().toString(),
73
+ },
74
+ ];
93
75
  }
94
76
  function editStatus(id, status) {
95
77
  runInAction(async () => {
@@ -98,16 +80,11 @@ const NotificationList = (props) => {
98
80
  const old = item.status;
99
81
  await store.edit(id, { data: { status: status }, error: "message" });
100
82
  (_a = props.onItemStatusChanged) === null || _a === void 0 ? void 0 : _a.call(props, old, item);
101
- if (statusActive === "unread" && item.status === "Read")
83
+ if (props.status === "unread" && item.status === "Read")
102
84
  return;
103
85
  list.remove(item.id, { delay: 300 });
104
86
  });
105
87
  }
106
- function onClickStatus(item) {
107
- var _a;
108
- setStatusActive(item);
109
- (_a = props.onClickStatus) === null || _a === void 0 ? void 0 : _a.call(props, item);
110
- }
111
88
  };
112
89
  export default NotificationList;
113
90
  //# sourceMappingURL=index.js.map
@@ -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,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AACzE,OAAO,eAAe,MAAM,gEAAgE,CAAC;AAC7F,OAAO,EAAE,aAAa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CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,CAAC,GACtD,CACa,CAChB,CAAC;oBACH,CAAC,GAEA,CACG,CACQ,CACW,CAC3B,CAAC,CAAC;IAEH,SAAS,OAAO;QACf,IAAI,YAAY,IAAI,KAAK;YAAE,OAAO,EAAE,CAAC;QACrC,OAAO,CAAC,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,YAAY,EAAkB,CAAC,CAAC;IAC9E,CAAC;IAED,SAAS,UAAU,CAAC,EAAU,EAAE,MAA0B;QACzD,WAAW,CAAC,KAAK,IAAI,EAAE;;YACtB,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACjC,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;YACxB,MAAM,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YACrE,MAAA,KAAK,CAAC,mBAAmB,sDAAG,GAAG,EAAE,IAAI,CAAC,CAAC;YACvC,IAAI,YAAY,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;IAED,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,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/notification/components/NotificationList/index.tsx"],"names":[],"mappings":"AAA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,GACtD,CACa,CAChB,CAAC;oBACH,CAAC,GACA,CACG,CACQ,CACW,CAC3B,CAAC,CAAC;IAEH,SAAS,OAAO;QACf,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK;YAAE,OAAO,EAAE,CAAC;QACrC,OAAO;YACN;gBACC,CAAC,EAAE,QAAQ;gBACX,CAAC,EAAE,GAAG;gBACN,CAAC,EAAE,KAAK;gBACR,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,CAAC,QAAQ,EAAE;aAC3B;SACjB,CAAC;IACH,CAAC;IAED,SAAS,UAAU,CAAC,EAAU,EAAE,MAA0B;QACzD,WAAW,CAAC,KAAK,IAAI,EAAE;;YACtB,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACjC,MAAM,GAAG,GAAG,IAAI,CAAC,MAAM,CAAC;YACxB,MAAM,KAAK,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;YACrE,MAAA,KAAK,CAAC,mBAAmB,sDAAG,GAAG,EAAE,IAAI,CAAC,CAAC;YACvC,IAAI,KAAK,CAAC,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,MAAM;gBAAE,OAAO;YAChE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,CAAC,CAAC;QACtC,CAAC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ declare const NotificationListHeader: (props: {
3
+ /** status of notifications shown on the list. */
4
+ status: string;
5
+ onClickStatus?: ((status: string) => void) | undefined;
6
+ }) => React.JSX.Element;
7
+ export default NotificationListHeader;
@@ -0,0 +1,37 @@
1
+ import React, { useEffect, useState } from "react";
2
+ import { observe } from "@voplus/morpho-ui";
3
+ import { Button, Divider } from "antd";
4
+ import { FlagFilter } from "@voplus/morpho-document/es/controls/filters";
5
+ import PageHeaderBoard from "@voplus/morpho-ui/es/components/layout/headers/PageHeaderBoard";
6
+ import { useApplicationContext } from "@voplus/morpho-data";
7
+ import ListHeaderTool from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
8
+ import { faBell } from "@fortawesome/pro-solid-svg-icons";
9
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
10
+ import classnames from "classnames";
11
+ import S from "string";
12
+ const NotificationListHeader = (props) => {
13
+ const context = useApplicationContext();
14
+ const [statusActive, setStatusActive] = useState("All");
15
+ useEffect(() => {
16
+ setStatusActive(S(props.status).capitalize().toString());
17
+ }, [props.status]);
18
+ const status = ["All", "Unread", "Read", "Later", "Dismissed"];
19
+ return observe(() => (React.createElement("div", { className: "notifications-header" },
20
+ React.createElement(PageHeaderBoard, { title: "Your Notifications Center", background: true, icon: React.createElement(FAIcon, { icon: faBell }) }),
21
+ React.createElement(ListHeaderTool, { addAble: false, filterViewProps: context.host.isTest
22
+ ? {
23
+ columns: [React.createElement(FlagFilter, { key: "Flag" })],
24
+ }
25
+ : 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
+ status.map((item, index) => (React.createElement(Button, { key: index, className: classnames(item, {
27
+ active: statusActive === item,
28
+ }), onClick: () => onClickStatus(item) }, item))),
29
+ context.host.isTest && React.createElement(Divider, { type: "vertical" }))) }))));
30
+ function onClickStatus(item) {
31
+ var _a;
32
+ setStatusActive(item);
33
+ (_a = props.onClickStatus) === null || _a === void 0 ? void 0 : _a.call(props, item);
34
+ }
35
+ };
36
+ export default NotificationListHeader;
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":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@@
1
1
  {
2
2
  "name": "@voplus/morpho-workspace",
3
- "version": "6.0.100",
3
+ "version": "6.0.101",
4
4
  "description": "morpho workspace module",
5
5
  "repository": {
6
6
  "type": "git",