@voplus/morpho-workspace 6.0.73 → 6.0.75

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- import React, { useEffect } from "react";
1
+ import React from "react";
2
2
  import { Badge } from "antd";
3
3
  import { State } from "./state";
4
4
  import classnames from "classnames";
@@ -6,12 +6,7 @@ import { observe } from "@voplus/morpho-ui";
6
6
  import { useFilterOptionsContext } from "@voplus/morpho-ui/es/data";
7
7
  const EventsFilter = (props) => {
8
8
  const context = useFilterOptionsContext();
9
- const state = context.getFilterState("Events", () => new State());
10
- useEffect(() => {
11
- var _a;
12
- state.reset();
13
- (_a = props.defaultValue) === null || _a === void 0 ? void 0 : _a.map((value) => state.onChangeEvents(value));
14
- }, [props.defaultValue]);
9
+ const state = context.getFilterState("Events", () => new State(props.defaultValue));
15
10
  return observe(() => (React.createElement("div", null,
16
11
  React.createElement("div", { className: "menu-item-title" }, "Events"),
17
12
  state.menus.map((item, index) => (React.createElement("div", { key: index, className: classnames("filter-menu-item", {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/controls/filters/EventsFilter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,YAAY,GAAG,CAAC,KAAkC,EAAE,EAAE;IAC3D,MAAM,OAAO,GAAG,uBAAuB,EAAE,CAAC;IAE1C,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAElE,SAAS,CAAC,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AuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,MAAM,YAAY,GAAG,CAAC,KAAkC,EAAE,EAAE;IAC3D,MAAM,OAAO,GAAG,uBAAuB,EAAE,CAAC;IAE1C,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IAEpF,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB;QACC,6BAAK,SAAS,EAAC,iBAAiB,aAAa;QAC5C,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,KAAa,EAAE,EAAE,CAAC,CAC9C,6BACC,GAAG,EAAE,KAAK,EACV,SAAS,EAAE,UAAU,CAAC,kBAAkB,EAAE;gBACzC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;aAClC,CAAC,EACF,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;YAE/C,6BAAK,SAAS,EAAC,aAAa;gBAC3B,oBAAC,KAAK,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAI;gBAC3B,IAAI,CAAC,IAAI,CACL;YACN,kCAAO,IAAI,CAAC,MAAM,CAAQ,CACrB,CACN,CAAC,CACG,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,9 +1,11 @@
1
1
  import { FilterOption } from "@voplus/morpho-data";
2
2
  import { DefaultFilterState } from "@voplus/morpho-ui/es/data";
3
3
  export declare class State extends DefaultFilterState {
4
+ private defaultFilter?;
4
5
  /** events of filter */
5
6
  events: Map<string, boolean>;
6
- constructor();
7
+ constructor(defaultFilter?: string[] | undefined);
8
+ onInit(): void;
7
9
  /** update events */
8
10
  onChangeEvents(value: string): void;
9
11
  get menus(): {
@@ -2,8 +2,15 @@ import { __decorate } from "tslib";
2
2
  import { action, makeObservable, observable } from "mobx";
3
3
  import { DefaultFilterState } from "@voplus/morpho-ui/es/data";
4
4
  export class State extends DefaultFilterState {
5
- constructor() {
5
+ constructor(defaultFilter) {
6
+ var _a;
6
7
  super();
8
+ Object.defineProperty(this, "defaultFilter", {
9
+ enumerable: true,
10
+ configurable: true,
11
+ writable: true,
12
+ value: defaultFilter
13
+ });
7
14
  /** events of filter */
8
15
  Object.defineProperty(this, "events", {
9
16
  enumerable: true,
@@ -12,6 +19,13 @@ export class State extends DefaultFilterState {
12
19
  value: new Map()
13
20
  });
14
21
  makeObservable(this);
22
+ if ((_a = this.defaultFilter) === null || _a === void 0 ? void 0 : _a.length)
23
+ this.onInit();
24
+ }
25
+ onInit() {
26
+ var _a;
27
+ this.reset();
28
+ (_a = this.defaultFilter) === null || _a === void 0 ? void 0 : _a.map((f) => this.onChangeEvents(f));
15
29
  }
16
30
  /** update events */
17
31
  onChangeEvents(value) {
@@ -41,6 +55,9 @@ export class State extends DefaultFilterState {
41
55
  __decorate([
42
56
  observable
43
57
  ], State.prototype, "events", void 0);
58
+ __decorate([
59
+ action
60
+ ], State.prototype, "onInit", null);
44
61
  __decorate([
45
62
  action
46
63
  ], State.prototype, "onChangeEvents", null);
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/controls/filters/EventsFilter/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAG1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,OAAO,KAAM,SAAQ,kBAAkB;IAI5C;QACC,KAAK,EAAE,CAAC;QAJT,uBAAuB;QACJ;;;;mBAA+B,IAAI,GAAG,EAAE;WAAC;QAI3D,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAED,oBAAoB;IAEb,cAAc,CAAC,KAAa;QAClC,IAAI,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MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;gBAClD,CAAC,EAAE,KAAK;aACQ;SACjB,CAAC;IACH,CAAC;IACM,KAAK;QACX,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACD;AAzCmB;IAAlB,UAAU;qCAAiD;AAUrD;IADN,MAAM;mCAIN;AAIM;IADN,MAAM;2CAGN"}
@@ -1,17 +1,12 @@
1
1
  import { Badge } from "antd";
2
- import React, { useEffect } from "react";
2
+ import React from "react";
3
3
  import { State } from "./state";
4
4
  import classnames from "classnames";
5
5
  import { observe } from "@voplus/morpho-ui";
6
6
  import { useFilterOptionsContext } from "@voplus/morpho-ui/es/data";
7
7
  const TaskStatusFilter = (props) => {
8
8
  const context = useFilterOptionsContext();
9
- const state = context.getFilterState("Status", () => new State());
10
- useEffect(() => {
11
- var _a;
12
- state.reset();
13
- (_a = props.defaultValue) === null || _a === void 0 ? void 0 : _a.map((value) => state.onChangeStatus(value));
14
- }, [props.defaultValue]);
9
+ const state = context.getFilterState("Status", () => new State(props.defaultValue));
15
10
  return observe(() => (React.createElement("div", null,
16
11
  React.createElement("div", { className: "menu-item-title" }, "Status"),
17
12
  state.menus.map((item, index) => (React.createElement("div", { key: index, className: classnames("filter-menu-item", {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/controls/filters/TaskStatusFilter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAIpE,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE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O,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAIpE,MAAM,gBAAgB,GAAG,CAAC,KAA4B,EAAE,EAAE;IACzD,MAAM,OAAO,GAAG,uBAAuB,EAAE,CAAC;IAE1C,MAAM,KAAK,GAAG,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;IAEpF,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB;QACC,6BAAK,SAAS,EAAC,iBAAiB,aAAa;QAC5C,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAS,EAAE,KAAa,EAAE,EAAE,CAAC,CAC9C,6BACC,GAAG,EAAE,KAAK,EACV,SAAS,EAAE,UAAU,CAAC,kBAAkB,EAAE;gBACzC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC;aAClC,CAAC,EACF,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;YAE/C,6BAAK,SAAS,EAAC,aAAa;gBAC3B,oBAAC,KAAK,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,GAAI;gBAC3B,IAAI,CAAC,IAAI,CACL;YACN,kCAAO,IAAI,CAAC,MAAM,CAAQ,CACrB,CACN,CAAC,CACG,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,9 +1,11 @@
1
1
  import { FilterOption } from "@voplus/morpho-data";
2
2
  import { DefaultFilterState } from "@voplus/morpho-ui/es/data";
3
3
  export declare class State extends DefaultFilterState {
4
+ private defaultFilter?;
4
5
  /** Status of filter */
5
6
  status: Map<string, boolean>;
6
- constructor();
7
+ constructor(defaultFilter?: string[] | undefined);
8
+ onInit(): void;
7
9
  /** update status */
8
10
  onChangeStatus(value: string): void;
9
11
  get menus(): {
@@ -2,8 +2,15 @@ import { __decorate } from "tslib";
2
2
  import { action, makeObservable, observable } from "mobx";
3
3
  import { DefaultFilterState } from "@voplus/morpho-ui/es/data";
4
4
  export class State extends DefaultFilterState {
5
- constructor() {
5
+ constructor(defaultFilter) {
6
+ var _a;
6
7
  super();
8
+ Object.defineProperty(this, "defaultFilter", {
9
+ enumerable: true,
10
+ configurable: true,
11
+ writable: true,
12
+ value: defaultFilter
13
+ });
7
14
  /** Status of filter */
8
15
  Object.defineProperty(this, "status", {
9
16
  enumerable: true,
@@ -12,6 +19,13 @@ export class State extends DefaultFilterState {
12
19
  value: new Map()
13
20
  });
14
21
  makeObservable(this);
22
+ if ((_a = this.defaultFilter) === null || _a === void 0 ? void 0 : _a.length)
23
+ this.onInit();
24
+ }
25
+ onInit() {
26
+ var _a;
27
+ this.reset();
28
+ (_a = this.defaultFilter) === null || _a === void 0 ? void 0 : _a.map((f) => this.onChangeStatus(f));
15
29
  }
16
30
  /** update status */
17
31
  onChangeStatus(value) {
@@ -44,6 +58,9 @@ export class State extends DefaultFilterState {
44
58
  __decorate([
45
59
  observable
46
60
  ], State.prototype, "status", void 0);
61
+ __decorate([
62
+ action
63
+ ], State.prototype, "onInit", null);
47
64
  __decorate([
48
65
  action
49
66
  ], State.prototype, "onChangeStatus", null);
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/controls/filters/TaskStatusFilter/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAG1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAE/D,MAAM,OAAO,KAAM,SAAQ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EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;YACtE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;YAC9D,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;SAClE,CAAC;IACH,CAAC;IACD,IAAW,OAAO;QACjB,yCAAyC;QACzC,OAAO;YACN;gBACC,CAAC,EAAE,YAAY;gBACf,CAAC,EAAE,UAAU;gBACb,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;gBAClD,CAAC,EAAE,KAAK;aACQ;SACjB,CAAC;IACH,CAAC;IACM,KAAK;QACX,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACrB,CAAC;CACD;AA5CmB;IAAlB,UAAU;qCAAiD;AAUrD;IADN,MAAM;mCAIN;AAIM;IADN,MAAM;2CAGN"}
@@ -5,7 +5,7 @@ import Card from "@voplus/morpho-ui/es/controls/Card";
5
5
  import { useAsideContentContext } from "@voplus/morpho-ui/es/components/layout/AsideContent";
6
6
  import ProseMirrorViewer from "@voplus/morpho-text/es/controls/ProseMirror/Viewer";
7
7
  import React from "react";
8
- import NewTaskForm from "../../../tasks/components/NewTaskForm";
8
+ import NotificaitonNewTaskForm from "../../../tasks/components/NotificaitonNewTaskForm";
9
9
  import classnames from "classnames";
10
10
  import dayjs from "dayjs";
11
11
  import { observe } from "@voplus/morpho-ui";
@@ -27,9 +27,9 @@ const DocumentNotificationCard = (props) => {
27
27
  React.createElement("div", { className: "notification-btn" },
28
28
  React.createElement(Space, null,
29
29
  context.host.isTest && notification.status !== "Dismissed" && (React.createElement(Button, { className: "btn-task-form", onClick: (ev) => {
30
- var _a, _b;
30
+ var _a;
31
31
  ev.stopPropagation();
32
- asideContext.openAside(React.createElement(NewTaskForm, { showView: true, self: true, description: (_a = notification.content) === null || _a === void 0 ? void 0 : _a.content, parentId: (_b = notification.node) === null || _b === void 0 ? void 0 : _b.id, onCancel: () => asideContext === null || asideContext === void 0 ? void 0 : asideContext.closeAside() }), { span: 12 });
32
+ asideContext.openAside(React.createElement(NotificaitonNewTaskForm, { showView: true, self: true, title: `Followup ${notification.content.title}`, description: `<div><p>This is a task to followup the following notification</p><h3>Notification Content</h3><p>${notification.content.content}</p></div>`, parentId: (_a = notification.node) === null || _a === void 0 ? void 0 : _a.id, onCancel: () => asideContext === null || asideContext === void 0 ? void 0 : asideContext.closeAside() }), { span: 12 });
33
33
  } }, "Ceate Task")),
34
34
  notification.status !== "Dismissed" && (React.createElement(Button, { className: "btn-dismiss", onClick: (ev) => onChangeStatus(ev, "Dismissed") }, "Dismiss")),
35
35
  notification.status === "Dismissed" && (React.createElement(Button, { className: "btn-unDismiss", onClick: (ev) => onChangeStatus(ev, "Read") }, "Undo Dismiss")),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/notification/components/DocumentNotificationCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAGN,eAAe,GACf,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,iBAAiB,MAAM,oDAAoD,CAAC;AACnF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,WAAW,MAAM,uCAAuC,CAAC;AAChE,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAA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AC,OAAO,0CAAE,OAAO,EAC1C,QAAQ,EAAE,MAAA,YAAY,CAAC,IAAI,0CAAE,EAAE,EAC/B,QAAQ,EAAE,GAAG,EAAE,CAAC,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,UAAU,EAAE,GACzC,EACF,EAAE,IAAI,EAAE,EAAE,EAAE,CACZ,CAAC;gCACH,CAAC,iBAGO,CACT;4BACA,YAAY,CAAC,MAAM,KAAK,WAAW,IAAI,CACvC,oBAAC,MAAM,IAAC,SAAS,EAAC,aAAa,EAAC,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,WAAW,CAAC,cAEvE,CACT;4BACA,YAAY,CAAC,MAAM,KAAK,WAAW,IAAI,CACvC,oBAAC,MAAM,IAAC,SAAS,EAAC,eAAe,EAAC,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,MAAM,CAAC,mBAEpE,CACT;4BACA,YAAY,CAAC,MAAM,KAAK,OAAO,IAAI,YAAY,CAAC,MAAM,KAAK,WAAW,IAAI,CAC1E,oBAAC,MAAM,IAAC,SAAS,EAAC,WAAW,EAAC,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,CAAC,YAEjE,CACT,CACM,CACH,CACD,CACD,CACA,CACP,CAAA;KAAA,CAAC,CAAC;IAEH,SAAS,cAAc,CAAC,EAAO,EAAE,MAA0B;;QAC1D,MAAA,KAAK,CAAC,cAAc,sDAAG,MAAM,CAAC,CAAC;QAC/B,EAAE,CAAC,eAAe,EAAE,CAAC;IACtB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/notification/components/DocumentNotificationCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;A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E,CAAC,EAAE,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,EAAE,OAAO,CAAC,YAEjE,CACT,CACM,CACH,CACD,CACD,CACA,CACP,CAAA;KAAA,CAAC,CAAC;IAEH,SAAS,cAAc,CAAC,EAAO,EAAE,MAA0B;;QAC1D,MAAA,KAAK,CAAC,cAAc,sDAAG,MAAM,CAAC,CAAC;QAC/B,EAAE,CAAC,eAAe,EAAE,CAAC;IACtB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,wBAAwB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import React from "react";
2
+ import "./index.less";
3
+ declare const NotificationNewTaskForm: (props: {
4
+ parentId?: string | undefined;
5
+ className?: string | undefined;
6
+ showView?: boolean | undefined;
7
+ /** New Task (For Self) */
8
+ self?: boolean | undefined;
9
+ /** title 默认值 */
10
+ title?: string | undefined;
11
+ /** Description 默认值 */
12
+ description?: string | undefined;
13
+ onSave?: ((params?: any) => void) | undefined;
14
+ onSubmitSave?: ((params?: any) => void) | undefined;
15
+ onCancel?: (() => void) | undefined;
16
+ }) => React.JSX.Element;
17
+ export default NotificationNewTaskForm;
@@ -0,0 +1,80 @@
1
+ import React, { useEffect, useState } from "react";
2
+ import { Col, Form, Input, Row, message } from "antd";
3
+ import { ContactSelect } from "@voplus/morpho-org";
4
+ import { State } from "./state";
5
+ import { observe } from "@voplus/morpho-ui";
6
+ import { runInAction } from "mobx";
7
+ import { useApplicationContext } from "@voplus/morpho-data";
8
+ import { useAsideContentContext } from "@voplus/morpho-ui/es/components/layout/AsideContent";
9
+ import { useTaskStore } from "@voplus/morpho-document-core";
10
+ import AddFormView from "@voplus/morpho-ui/es/controls/AddFormView";
11
+ import ProseMirror from "@voplus/morpho-text/es/controls/ProseMirror";
12
+ import PresetDatePicker from "@voplus/morpho-ui/es/controls/PresetDatePicker";
13
+ import TaskPropertiesView from "../TaskPropertiesView";
14
+ import classnames from "classnames";
15
+ import "./index.less";
16
+ const NotificationNewTaskForm = (props) => {
17
+ const tasks = useTaskStore();
18
+ const { user } = useApplicationContext();
19
+ const [state] = useState(new State());
20
+ const asideContext = useAsideContentContext();
21
+ useEffect(() => {
22
+ state.params.MemberIds = props.self ? [user.info.unit.id] : [];
23
+ }, [props.self]);
24
+ useEffect(() => {
25
+ var _a, _b;
26
+ state.params.Description = (_a = props.description) !== null && _a !== void 0 ? _a : "";
27
+ state.params.Name = (_b = props.title) !== null && _b !== void 0 ? _b : "";
28
+ }, [props.parentId]);
29
+ return observe(() => (React.createElement(AddFormView, { title: "Create Task", loading: !!state.loading, onCancel: onCancel, onSubmit: onSubmit },
30
+ React.createElement("div", { className: classnames("notification-new-task-form", props.className) },
31
+ React.createElement(Form, { layout: "vertical" },
32
+ React.createElement(Form.Item, { label: "Title of your task" },
33
+ React.createElement(Input, { autoFocus: true, value: state.params.Name, onChange: (e) => runInAction(() => (state.params.Name = e.target.value)), onKeyDown: onKeyDown })),
34
+ React.createElement(Form.Item, { label: "Description of your task" },
35
+ React.createElement(ProseMirror, { toolbarProps: { sticky: false }, scroll: true, className: "proseMirror", defaultHtml: state.params.Description, onChange: (opt) => (state.params.Description =
36
+ opt.editor.dom.innerHTML === "<p><br></p>" ? "" : opt.editor.dom.innerHTML) })),
37
+ React.createElement(Row, { gutter: 20 },
38
+ React.createElement(Col, { span: 12 },
39
+ React.createElement(Form.Item, { label: "Assign people" },
40
+ React.createElement(ContactSelect, { multiple: true, defaultValue: props.self ? [{ name: user.info.name, id: user.info.unit.id }] : [], onChange: (contacts) => (state.params.MemberIds = contacts.map(({ id }) => id)) }))),
41
+ React.createElement(Col, { span: 12 },
42
+ React.createElement(Form.Item, { label: "Due Date" },
43
+ React.createElement(PresetDatePicker, { className: "task-preset-date-picker", onChange: (preset, date) => {
44
+ state.params.DueDate = date;
45
+ }, style: { width: "100%" } })))))))));
46
+ async function onSubmit() {
47
+ var _a;
48
+ if (!state.params.Name)
49
+ return message.warning("Title is required");
50
+ if (props.onSubmitSave)
51
+ return props.onSubmitSave(state.params);
52
+ runInAction(() => (state.loading = true));
53
+ const res = await tasks.create({
54
+ data: { ...state.params, ParentId: props.parentId },
55
+ error: "message",
56
+ });
57
+ runInAction(() => {
58
+ state.loading = false;
59
+ state.params = state.Params;
60
+ });
61
+ if (props.showView)
62
+ return asideContext.openAside(React.createElement(TaskPropertiesView, { id: res.id }), { span: 12 });
63
+ (_a = props.onSave) === null || _a === void 0 ? void 0 : _a.call(props);
64
+ }
65
+ function onKeyDown(e) {
66
+ if (e.key !== "Escape")
67
+ return;
68
+ onCancel();
69
+ }
70
+ // cancel add task
71
+ function onCancel() {
72
+ state.params = state.Params;
73
+ if (props.showView)
74
+ return asideContext.closeAside();
75
+ if (props.onCancel)
76
+ props.onCancel();
77
+ }
78
+ };
79
+ export default NotificationNewTaskForm;
80
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/NotificaitonNewTaskForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACnC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,WAAW,MAAM,2CAA2C,CAAC;AACpE,OAAO,WAAW,MAAM,6CAA6C,CAAC;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,OAAO,YAAa,CAAC,SAAS,CAAC,oBAAC,kBAAkB,IAAC,EAAE,EAAE,GAAG,CAAC,EAAE,GAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QAClF,MAAA,KAAK,CAAC,MAAM,qDAAI,CAAC;IAClB,CAAC;IACD,SAAS,SAAS,CAAC,CAAwC;QAC1D,IAAI,CAAC,CAAC,GAAG,KAAK,QAAQ;YAAE,OAAO;QAC/B,QAAQ,EAAE,CAAC;IACZ,CAAC;IACD,kBAAkB;IAClB,SAAS,QAAQ;QAChB,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC5B,IAAI,KAAK,CAAC,QAAQ;YAAE,OAAO,YAAa,CAAC,UAAU,EAAE,CAAC;QACtD,IAAI,KAAK,CAAC,QAAQ;YAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC;AACF,CAAC,CAAC;AACF,eAAe,uBAAuB,CAAC"}
@@ -0,0 +1,18 @@
1
+ @import "../../../../style/common.less";
2
+
3
+ :global {
4
+ .notification-new-task-form {
5
+ .ant-select {
6
+ width: auto;
7
+ }
8
+ .proseMirror {
9
+ height: 330px !important;
10
+ .editor-toolbar {
11
+ padding: 0.2rem 0.65rem;
12
+ }
13
+ .ProseMirror {
14
+ padding: 1rem 1.25rem;
15
+ }
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,18 @@
1
+ export declare class State {
2
+ constructor();
3
+ Params: {
4
+ Name: string;
5
+ Description: string;
6
+ DueDate: undefined;
7
+ MemberIds: never[];
8
+ InheritMembers: boolean;
9
+ };
10
+ params: {
11
+ Name: string;
12
+ Description: string;
13
+ DueDate: undefined;
14
+ MemberIds: never[];
15
+ InheritMembers: boolean;
16
+ };
17
+ loading: boolean;
18
+ }
@@ -0,0 +1,39 @@
1
+ import { __decorate } from "tslib";
2
+ import { makeObservable, observable } from "mobx";
3
+ export class State {
4
+ constructor() {
5
+ Object.defineProperty(this, "Params", {
6
+ enumerable: true,
7
+ configurable: true,
8
+ writable: true,
9
+ value: {
10
+ // ParentId: "",
11
+ Name: "",
12
+ Description: "",
13
+ DueDate: undefined,
14
+ MemberIds: [],
15
+ InheritMembers: false,
16
+ }
17
+ });
18
+ Object.defineProperty(this, "params", {
19
+ enumerable: true,
20
+ configurable: true,
21
+ writable: true,
22
+ value: this.Params
23
+ });
24
+ Object.defineProperty(this, "loading", {
25
+ enumerable: true,
26
+ configurable: true,
27
+ writable: true,
28
+ value: false
29
+ });
30
+ makeObservable(this);
31
+ }
32
+ }
33
+ __decorate([
34
+ observable
35
+ ], State.prototype, "params", void 0);
36
+ __decorate([
37
+ observable
38
+ ], State.prototype, "loading", void 0);
39
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/NotificaitonNewTaskForm/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElD,MAAM,OAAO,KAAK;IACjB;QAGO;;;;mBAAS;gBACf,gBAAgB;gBAChB,IAAI,EAAE,EAAE;gBACR,WAAW,EAAE,EAAE;gBACf,OAAO,EAAE,SAAS;gBAClB,SAAS,EAAE,EAAE;gBACb,cAAc,EAAE,KAAK;aACrB;WAAC;QACiB;;;;mBAAS,IAAI,CAAC,MAAM;WAAC;QACrB;;;;mBAAU,KAAK;WAAC;QAXlC,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;CAWD;AAFmB;IAAlB,UAAU;qCAA6B;AACrB;IAAlB,UAAU;sCAAwB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voplus/morpho-workspace",
3
- "version": "6.0.73",
3
+ "version": "6.0.75",
4
4
  "description": "morpho workspace module",
5
5
  "repository": {
6
6
  "type": "git",