@voplus/morpho-workspace 6.0.87 → 6.0.88

Sign up to get free protection for your applications and to get access to all the features.
@@ -22,7 +22,7 @@ export type LoadNewNotificationOptions = {
22
22
  } & LoadOptions<INewNotification>;
23
23
  export type NotificationEditDataOptions = {
24
24
  status?: NotificationStatus;
25
- Date?: dayjs.Dayjs | string;
25
+ CreateDate?: dayjs.Dayjs | string;
26
26
  Subject?: string;
27
27
  Channels?: ("Email" | "Instant Message")[];
28
28
  };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- export type NotificationPropertiesName = "Subject" | "Channels" | "Date" | "Notification Status";
2
+ export type NotificationPropertiesName = "Subject" | "Channels" | "Create Date" | "Notification Status";
3
3
  declare const NotificationProperties: {
4
4
  (props: {
5
5
  id: string;
@@ -1,19 +1,16 @@
1
+ import React from "react";
2
+ import { Radio } from "antd";
1
3
  import { faEllipsisVertical } from "@fortawesome/pro-light-svg-icons";
2
4
  import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
3
- import ToolBar from "@voplus/morpho-org/es/controls/ToolBar";
4
5
  import { InlineEdit, observe } from "@voplus/morpho-ui";
5
- import PropertiesSection from "@voplus/morpho-ui/es/controls/PropertiesSection";
6
- import Prop from "@voplus/morpho-ui/es/controls/Prop";
7
- import { Radio } from "antd";
8
- import UTCShortDate from "@voplus/morpho-ui/es/controls/UTCShortDate";
9
- import { utcdayjs } from "@voplus/morpho-ui/es/controls/UTCDatePicker/state";
10
- import DateInputEditor from "@voplus/morpho-ui/es/controls/InlineEdit/editors/DateInputEditor";
11
- import React from "react";
12
6
  import { Scrollbars } from "react-custom-scrollbars-2";
13
7
  import { useNotifications, useNotificationStore } from "../../../../data/notification";
8
+ import UTCShortDate from "@voplus/morpho-ui/es/controls/UTCShortDate";
9
+ import ToolBar from "@voplus/morpho-org/es/controls/ToolBar";
14
10
  import NotificationMenu from "../../controls/NotificationMenu";
15
11
  import NotificationStatusLabel from "../../controls/NotificationStatusLabel";
16
- import dayjs from "dayjs";
12
+ import PropertiesSection from "@voplus/morpho-ui/es/controls/PropertiesSection";
13
+ import Prop from "@voplus/morpho-ui/es/controls/Prop";
17
14
  const NotificationProperties = (props) => {
18
15
  /** 加class name 为了方便做integration tests */
19
16
  const classId = "notification-properties";
@@ -39,14 +36,8 @@ const NotificationProperties = (props) => {
39
36
  }, value: notification.channels },
40
37
  React.createElement(Radio, { value: "Email" }, "Email"),
41
38
  React.createElement(Radio, { value: "Instant Message" }, "Instant Message"))) }));
42
- case "Date":
43
- return (React.createElement(InlineEdit, { defaultValue: notification.date ? utcdayjs(notification.date) : undefined, content: (v) => notification.date ? (React.createElement(UTCShortDate, { className: "properties-value", value: notification.date })) : (React.createElement("span", { className: "add-info-style" }, "Add Date")), editor: DateInputEditor, onSave: (date) => {
44
- if (notification.date && dayjs(date).isSame(notification.date, "day"))
45
- return;
46
- store.newEdit(id, {
47
- data: { Date: date !== null && date !== void 0 ? date : "" },
48
- });
49
- } }));
39
+ case "Create Date":
40
+ return notification.createDate ? (React.createElement(UTCShortDate, { className: "properties-value", value: notification.createDate })) : (React.createElement("span", { className: "add-info-style" }, "no date"));
50
41
  case "Notification Status":
51
42
  return notification.draft ? (React.createElement(NotificationStatusLabel, { status: notification.draft ? "Draft" : "" })) : null;
52
43
  }
@@ -58,7 +49,7 @@ NotificationProperties.defaultProps = {
58
49
  { name: "Notification Status" },
59
50
  { name: "Subject" },
60
51
  // { name: "Channels" },
61
- { name: "Date" },
52
+ { name: "Create Date" },
62
53
  ],
63
54
  };
64
55
  export default NotificationProperties;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/notification/components/NotificationProperties/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,OAAO,MAAM,wCAAwC,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE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Y,CAAC,IAAI,EAAE,KAAK,CAAC;4BAAE,OAAO;wBAC9E,KAAK,CAAC,OAAO,CAAC,EAAE,EAAE;4BACjB,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,EAAE,EAAE;yBAC1B,CAAC,CAAC;oBACJ,CAAC,GACA,CACF,CAAC;YACH,KAAK,qBAAqB;gBACzB,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAC3B,oBAAC,uBAAuB,IAAC,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAI,CACtE,CAAC,CAAC,CAAC,IAAI,CAAC;QACX,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AAEF,sBAAsB,CAAC,YAAY,GAAG;IACrC,iBAAiB,EAAE,yBAAyB;IAC5C,sBAAsB,EAAE;QACvB,EAAE,IAAI,EAAE,qBAAqB,EAAE;QAC/B,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,wBAAwB;QACxB,EAAE,IAAI,EAAE,MAAM,EAAE;KAChB;CACD,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/notification/components/NotificationProperties/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACvF,OAAO,YAAY,MAAM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EAAE,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;4BAC5E,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,CAAC;wBAClB,CAAC,EACD,KAAK,EAAE,YAAY,CAAC,QAAQ;wBAE5B,oBAAC,KAAK,IAAC,KAAK,EAAC,OAAO,YAAc;wBAClC,oBAAC,KAAK,IAAC,KAAK,EAAC,iBAAiB,sBAAwB,CACzC,CACd,GACA,CACF,CAAC;YACH,KAAK,aAAa;gBACjB,OAAO,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,CAChC,oBAAC,YAAY,IAAC,SAAS,EAAC,kBAAkB,EAAC,KAAK,EAAE,YAAY,CAAC,UAAU,GAAI,CAC7E,CAAC,CAAC,CAAC,CACH,8BAAM,SAAS,EAAC,gBAAgB,cAAe,CAC/C,CAAC;YACH,KAAK,qBAAqB;gBACzB,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAC3B,oBAAC,uBAAuB,IAAC,MAAM,EAAE,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,GAAI,CACtE,CAAC,CAAC,CAAC,IAAI,CAAC;QACX,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AAEF,sBAAsB,CAAC,YAAY,GAAG;IACrC,iBAAiB,EAAE,yBAAyB;IAC5C,sBAAsB,EAAE;QACvB,EAAE,IAAI,EAAE,qBAAqB,EAAE;QAC/B,EAAE,IAAI,EAAE,SAAS,EAAE;QACnB,wBAAwB;QACxB,EAAE,IAAI,EAAE,aAAa,EAAE;KACvB;CACD,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voplus/morpho-workspace",
3
- "version": "6.0.87",
3
+ "version": "6.0.88",
4
4
  "description": "morpho workspace module",
5
5
  "repository": {
6
6
  "type": "git",