@voplus/morpho-workspace 1.1.0-dev039 → 1.1.0-dev040

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/changelog.md +3 -0
  2. package/es/controls/MoreOperateDropdown/index.d.ts +1 -1
  3. package/es/controls/NewCardButton/index.d.ts +6 -0
  4. package/es/controls/NewCardButton/index.js +8 -0
  5. package/es/controls/NewCardButton/index.js.map +1 -1
  6. package/es/controls/NewCardButton/index.less +22 -0
  7. package/es/modules/board/components/BoardPropertiesView/index.d.ts +7 -0
  8. package/es/modules/board/components/BoardPropertiesView/index.js +35 -0
  9. package/es/modules/board/components/BoardPropertiesView/index.js.map +1 -0
  10. package/es/modules/board/components/BoardPropertiesView/index.less +12 -0
  11. package/es/modules/board/pages/BoardViewList/index.js +13 -4
  12. package/es/modules/board/pages/BoardViewList/index.js.map +1 -1
  13. package/es/modules/board/pages/BoardViewList/state.d.ts +0 -1
  14. package/es/modules/board/pages/BoardViewList/state.js +0 -6
  15. package/es/modules/board/pages/BoardViewList/state.js.map +1 -1
  16. package/es/modules/calendar/components/ActionCard/index.d.ts +7 -0
  17. package/es/modules/calendar/components/ActionCard/index.js +12 -0
  18. package/es/modules/calendar/components/ActionCard/index.js.map +1 -0
  19. package/es/modules/calendar/components/CalendarEventContent/index.d.ts +7 -0
  20. package/es/modules/calendar/components/CalendarEventContent/index.js +10 -0
  21. package/es/modules/calendar/components/CalendarEventContent/index.js.map +1 -0
  22. package/es/modules/calendar/pages/CalendarMonth/index.js +39 -29
  23. package/es/modules/calendar/pages/CalendarMonth/index.js.map +1 -1
  24. package/es/modules/calendar/pages/CalendarMonth/index.less +25 -0
  25. package/es/pages/Space/components/Notes/ColorSelect/index.d.ts +10 -0
  26. package/es/pages/Space/components/Notes/ColorSelect/index.js +29 -0
  27. package/es/pages/Space/components/Notes/ColorSelect/index.js.map +1 -0
  28. package/es/pages/Space/components/Notes/ColorSelect/index.less +17 -0
  29. package/es/pages/Space/components/Notes/NewNoteDialog/index.d.ts +3 -1
  30. package/es/pages/Space/components/Notes/NewNoteDialog/index.js +27 -10
  31. package/es/pages/Space/components/Notes/NewNoteDialog/index.js.map +1 -1
  32. package/es/pages/Space/components/Notes/NewNoteDialog/index.less +39 -5
  33. package/es/pages/Space/components/Notes/TextNoteCard/index.js +5 -6
  34. package/es/pages/Space/components/Notes/TextNoteCard/index.js.map +1 -1
  35. package/es/pages/Space/components/Notes/TextNoteCard/index.less +3 -14
  36. package/es/pages/Space/components/Notes/index.d.ts +3 -2
  37. package/es/pages/Space/components/Notes/index.js +27 -5
  38. package/es/pages/Space/components/Notes/index.js.map +1 -1
  39. package/es/pages/Space/pages/MySpace/index.js +1 -1
  40. package/es/pages/Space/pages/MySpace/index.js.map +1 -1
  41. package/es/pages/Work/components/ActionPlan/Item.js +6 -3
  42. package/es/pages/Work/components/ActionPlan/Item.js.map +1 -1
  43. package/es/pages/Work/components/ActionPlan/index.js +4 -3
  44. package/es/pages/Work/components/ActionPlan/index.js.map +1 -1
  45. package/es/pages/Work/components/ActionPlan/index.less +2 -1
  46. package/es/pages/Work/components/ActionPlan/state.d.ts +1 -1
  47. package/es/pages/Work/components/ScheduleActionForm/index.d.ts +1 -1
  48. package/es/pages/Work/components/ScheduleActionForm/index.js +1 -1
  49. package/es/pages/Work/components/ScheduleActionForm/index.js.map +1 -1
  50. package/es/pages/Work/components/WorkSummaryCards/WorkActionsCard/index.d.ts +1 -1
  51. package/es/pages/Work/components/WorkSummaryCards/WorkActionsCard/index.js +1 -1
  52. package/es/pages/Work/components/WorkSummaryCards/WorkActionsCard/index.js.map +1 -1
  53. package/es/pages/Work/components/WorkSummaryCards/WorkActionsCard/state.d.ts +1 -1
  54. package/es/pages/Work/data/WorkContext.d.ts +1 -1
  55. package/es/pages/Work/data/hook.d.ts +1 -6
  56. package/es/pages/Work/data/hook.js +1 -35
  57. package/es/pages/Work/data/hook.js.map +1 -1
  58. package/es/pages/Work/data/index.d.ts +0 -2
  59. package/es/pages/Work/data/index.js +0 -2
  60. package/es/pages/Work/data/index.js.map +1 -1
  61. package/es/pages/Work/data/interfaces.d.ts +0 -16
  62. package/package.json +2 -1
  63. package/es/modules/calendar/components/TaskCard/index.d.ts +0 -6
  64. package/es/modules/calendar/components/TaskCard/index.js +0 -16
  65. package/es/modules/calendar/components/TaskCard/index.js.map +0 -1
  66. package/es/modules/calendar/components/TaskCard/index.less +0 -17
  67. package/es/modules/calendar/components/TaskCard/state.d.ts +0 -16
  68. package/es/modules/calendar/components/TaskCard/state.js +0 -58
  69. package/es/modules/calendar/components/TaskCard/state.js.map +0 -1
  70. package/es/modules/calendar/pages/CalendarWeek/index.d.ts +0 -0
  71. package/es/modules/calendar/pages/CalendarWeek/index.js +0 -1
  72. package/es/modules/calendar/pages/CalendarWeek/index.js.map +0 -1
  73. package/es/pages/Space/components/Notes/index.less +0 -0
  74. package/es/pages/Work/data/ActionStore.d.ts +0 -65
  75. package/es/pages/Work/data/ActionStore.js +0 -90
  76. package/es/pages/Work/data/ActionStore.js.map +0 -1
  77. package/es/pages/Work/data/useActionListEffect.d.ts +0 -7
  78. package/es/pages/Work/data/useActionListEffect.js +0 -15
  79. package/es/pages/Work/data/useActionListEffect.js.map +0 -1
package/changelog.md CHANGED
@@ -1,3 +1,6 @@
1
+ 【Improvement】Board Default View 新增 Tool 打開 Board 的 PropertiesView
2
+ 把 Action 相關代码移去 morpho-collaboration-actions
3
+
1
4
  # 21 Aug 2020
2
5
 
3
6
  【Improvement】Work Summary, Trial Heading 下方要和其它地方保持一致性有橫線
@@ -10,7 +10,7 @@ declare const MoreOperateDropdown: {
10
10
  access?: boolean | undefined;
11
11
  url?: string | undefined;
12
12
  shape?: boolean | undefined;
13
- size?: import("@voplus/antd/es/button").ButtonSize;
13
+ size?: "small" | "middle" | "large" | undefined;
14
14
  onEdit?: ((params?: any) => void) | undefined;
15
15
  onDelete?: ((params?: any) => void) | undefined;
16
16
  onMove?: (() => void) | undefined;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import "./index.less";
3
+ declare const NewCardButton: (props: {
4
+ onClick?: () => void;
5
+ }) => JSX.Element;
6
+ export default NewCardButton;
@@ -1 +1,9 @@
1
+ import "./index.less";
2
+ import { PlusOutlined } from "@ant-design/icons";
3
+ import React from "react";
4
+ const NewCardButton = (props) => {
5
+ return (React.createElement("span", { className: "new-card-button", onClick: props.onClick },
6
+ React.createElement(PlusOutlined, null)));
7
+ };
8
+ export default NewCardButton;
1
9
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/controls/NewCardButton/index.tsx"],"names":[],"mappings":""}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/controls/NewCardButton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,aAAa,GAAG,CAAC,KAA+B,EAAE,EAAE;IACzD,OAAO,CACN,8BAAM,SAAS,EAAC,iBAAiB,EAAC,OAAO,EAAE,KAAK,CAAC,OAAO;QACvD,oBAAC,YAAY,OAAG,CACV,CACP,CAAC;AACH,CAAC,CAAC;AACF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,22 @@
1
+ @import "~@voplus/antd/es/style/themes/default.less";
2
+ :global {
3
+ .new-card-button {
4
+ display: block;
5
+ width: 36px;
6
+ height: 24px;
7
+ line-height: 24px;
8
+ margin-left: -1rem;
9
+ text-align: center;
10
+ font-size: 17px;
11
+ color: #fff;
12
+ cursor: pointer;
13
+ border-radius: 2px;
14
+ background-color: @primary-color;
15
+ transition: box-shadow 0.4s, background-color 0.3s;
16
+ &:hover {
17
+ background-color: #40a9ff;
18
+ box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 6px 16px 0 rgba(0, 0, 0, 0.08),
19
+ 0 9px 28px 8px rgba(0, 0, 0, 0.05);
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import "./index.less";
3
+ declare const BoardPropertiesView: (props: {
4
+ id: string;
5
+ default?: boolean;
6
+ }) => JSX.Element;
7
+ export default BoardPropertiesView;
@@ -0,0 +1,35 @@
1
+ import "./index.less";
2
+ import { Archive, Reload } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
3
+ import React, { useState } from "react";
4
+ import DescriptionEditor from "@voplus/morpho-document/es/controls/DescriptionEditor";
5
+ import DocumentHeader from "@voplus/morpho-document/es/components/DocumentHeader";
6
+ import DocumentList from "@voplus/morpho-document/es/components/DocumentList";
7
+ import DocumentTabs from "@voplus/morpho-document/es/components/DocumentTabs";
8
+ import { Skeleton } from "@voplus/antd";
9
+ import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
10
+ import { useBoard } from "../../../../data/board";
11
+ import { useObserver } from "mobx-react-lite";
12
+ const BoardPropertiesView = (props) => {
13
+ const id = props.id;
14
+ const board = useBoard(id, { reload: false });
15
+ const [loaded, setLoaded] = useState(true);
16
+ return useObserver(() => (React.createElement("div", { className: "module-detail-view" }, loaded && (React.createElement(React.Fragment, null,
17
+ React.createElement(DocumentHeader, { id: id, size: "h3", quickVisible: false, quickDataBarAlign: "left", clickNameEffect: "edit", autoSaveName: true, tools: React.createElement("div", { className: "tools-bar" },
18
+ React.createElement(ToolBar, { id: id },
19
+ React.createElement(Reload, { action: onReload }),
20
+ React.createElement(Archive, null))), descriptionVisible: false }),
21
+ React.createElement(DocumentTabs, { id: id, docTab: false, details: React.createElement("div", { className: "board-properties-view" },
22
+ board.loading ? (React.createElement("div", { className: "board-description" },
23
+ React.createElement(Skeleton, { active: true }),
24
+ " ")) : (React.createElement(DescriptionEditor, { id: id, description: board.description, readonly: board.readonly })),
25
+ React.createElement(DocumentList, { id: id, multiple: true, exclude: ["BoardColumn"] })) }))))));
26
+ /** reload data */
27
+ function onReload() {
28
+ setLoaded(false);
29
+ setTimeout(() => {
30
+ setLoaded(true);
31
+ }, 100);
32
+ }
33
+ };
34
+ export default BoardPropertiesView;
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/board/components/BoardPropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,qDAAqD,CAAC;AACtF,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,iBAAiB,MAAM,uDAAuD,CAAC;AACtF,OAAO,cAAc,MAAM,sDAAsD,CAAC;AAClF,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,mBAAmB,GAAG,CAAC,KAAwC,EAAE,EAAE;IACxE,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;IAEpB,MAAM,KAAK,GAAG,QAAQ,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAE9C,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE3C,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,6BAAK,SAAS,EAAC,oBAAoB,IACjC,MAAM,IAAI,CACV,oBAAC,KAAK,CAAC,QAAQ;QACd,oBAAC,cAAc,IACd,EAAE,EAAE,EAAE,EACN,IAAI,EAAC,IAAI,EACT,YAAY,EAAE,KAAK,EACnB,iBAAiB,EAAC,MAAM,EACxB,eAAe,EAAC,MAAM,EACtB,YAAY,QACZ,KAAK,EACJ,6BAAK,SAAS,EAAC,WAAW;gBACzB,oBAAC,OAAO,IAAC,EAAE,EAAE,EAAE;oBACd,oBAAC,MAAM,IAAC,MAAM,EAAE,QAAQ,GAAI;oBAC5B,oBAAC,OAAO,OAAG,CACF,CACL,EAEP,kBAAkB,EAAE,KAAK,GACxB;QACF,oBAAC,YAAY,IACZ,EAAE,EAAE,EAAE,EACN,MAAM,EAAE,KAAK,EACb,OAAO,EACN,6BAAK,SAAS,EAAC,uBAAuB;gBACpC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAChB,6BAAK,SAAS,EAAC,mBAAmB;oBACjC,oBAAC,QAAQ,IAAC,MAAM,SAAG;oBAAC,GAAG,CAClB,CACN,CAAC,CAAC,CAAC,CACH,oBAAC,iBAAiB,IACjB,EAAE,EAAE,EAAE,EACN,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,QAAQ,EAAE,KAAK,CAAC,QAAQ,GACvB,CACF;gBACD,oBAAC,YAAY,IAAC,EAAE,EAAE,EAAE,EAAE,QAAQ,QAAC,OAAO,EAAE,CAAC,aAAa,CAAC,GAAI,CACtD,GAEN,CACc,CACjB,CACI,CACN,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,mBAAmB,CAAC"}
@@ -0,0 +1,12 @@
1
+ @import "../../../../style/common.less";
2
+ :global {
3
+ .board-properties-view {
4
+ display: flex;
5
+ flex-direction: column;
6
+ height: 100%;
7
+ overflow-x: hidden;
8
+ .board-description {
9
+ padding: 10px 20px;
10
+ }
11
+ }
12
+ }
@@ -1,8 +1,11 @@
1
+ import { Archive, Sidebar } from "@voplus/morpho-document/es/controls/ToolBar/buttons";
1
2
  import React, { useState } from "react";
2
3
  import AsideContent from "@voplus/morpho-ui/es/components/layout/AsideContent";
3
4
  import Board from "../../components/Board";
5
+ import BoardPropertiesView from "../../components/BoardPropertiesView";
4
6
  import DocumentHeader from "@voplus/morpho-document/es/components/DocumentHeader";
5
7
  import { State } from "./state";
8
+ import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
6
9
  import styles from "./index.less";
7
10
  import { useBoard } from "../../../../data/board";
8
11
  import { useObserver } from "mobx-react-lite";
@@ -12,19 +15,25 @@ const BoardViewList = () => {
12
15
  const [asideContext] = useState(AsideContent.createContext());
13
16
  const match = useRouteMatch();
14
17
  const [state] = useState(new State());
15
- state.id = match.params.id;
16
- state.board = useBoard(state.id, { reload: false });
18
+ const id = match.params.id;
19
+ state.board = useBoard(id, { reload: false });
17
20
  /** set tab title */
18
21
  const tab = useTabItem();
19
22
  useObserver(() => {
20
23
  var _a;
21
24
  tab.title = (_a = state.board.name) !== null && _a !== void 0 ? _a : "Decument";
22
25
  });
26
+ const AsideElement = React.createElement(BoardPropertiesView, { id: id });
23
27
  return useObserver(() => (React.createElement("div", { className: styles["vo-layout"] },
24
28
  React.createElement(AsideContent, { context: asideContext },
25
29
  React.createElement("div", { className: "vo-layout-main" },
26
- React.createElement(DocumentHeader, { id: state.id, size: "h3", quickDataBarVisible: false }),
27
- React.createElement(Board, { parentId: state.id }))))));
30
+ React.createElement(DocumentHeader, { id: id, size: "h3", quickVisible: false, quickDataBarAlign: "left", clickNameEffect: "edit", autoSaveName: true, tools: React.createElement("div", { className: "tools-bar" },
31
+ React.createElement(ToolBar, { id: id },
32
+ React.createElement(Sidebar, { action: () => asideContext.asideContent
33
+ ? asideContext.closeAside()
34
+ : asideContext.openAside(AsideElement, { span: 12 }) }),
35
+ React.createElement(Archive, null))), descriptionVisible: false }),
36
+ React.createElement(Board, { parentId: id }))))));
28
37
  };
29
38
  export default BoardViewList;
30
39
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/board/pages/BoardViewList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,YAAY,MAAM,qDAAqD,CAAC;AAC/E,OAAO,KAAK,MAAM,wBAAwB,CAAC;AAC3C,OAAO,cAAc,MAAM,sDAAsD,CAAC;AAClF,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,MAAM,aAAa,GAAG,GAAG,EAAE;IAC1B,MAAM,CAAC,YAAY,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC,CAAC;IAC9D,MAAM,KAAK,GAAG,aAAa,EAAkB,CAAC;IAC9C,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IACtC,KAAK,CAAC,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;IAC3B,KAAK,CAAC,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAEpD,oBAAoB;IACpB,MAAM,GAAG,GAAG,UAAU,EAAE,CAAC;IACzB,WAAW,CAAC,GAAG,EAAE;;QAChB,GAAG,CAAC,KAAK,SAAG,KAAK,CAAC,KAAK,CAAC,IAAI,mCAAI,UAAU,CAAC;IAC5C,CAAC,CAAC,CAAC;IAEH,OAAO,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KAAK,GACxB;gBACF,oBAAC,KAAK,IAAC,QAAQ,EAAE,EAAE,GAAI,CAClB,CACQ,CACV,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { IBoard } from "src/data/board";
2
2
  export declare class State {
3
- id: string;
4
3
  board: IBoard;
5
4
  }
@@ -1,13 +1,7 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { observable } from "mobx";
3
3
  export class State {
4
- constructor() {
5
- this.id = "";
6
- }
7
4
  }
8
- __decorate([
9
- observable
10
- ], State.prototype, "id", void 0);
11
5
  __decorate([
12
6
  observable
13
7
  ], State.prototype, "board", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/board/pages/BoardViewList/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAGlC,MAAM,OAAO,KAAK;IAAlB;QACoB,OAAE,GAAG,EAAE,CAAC;IAE5B,CAAC;CAAA;AAFY;IAAX,UAAU;iCAAgB;AACf;IAAX,UAAU;oCAAsB"}
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/board/pages/BoardViewList/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,OAAO,KAAK;CAEjB;AADY;IAAX,UAAU;oCAAsB"}
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare const ActionCard: (props: {
3
+ id: string;
4
+ data?: any;
5
+ onClick?: () => void;
6
+ }) => JSX.Element;
7
+ export default ActionCard;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { useAction } from "@voplus/morpho-collaboration-action/es/data";
3
+ import { useObserver } from "mobx-react-lite";
4
+ const ActionCard = (props) => {
5
+ const action = useAction(props.id, { reload: false });
6
+ return useObserver(() => (React.createElement("div", { className: "calendar-action-card", onClick: props.onClick },
7
+ action.type,
8
+ " ",
9
+ action.note)));
10
+ };
11
+ export default ActionCard;
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/calendar/components/ActionCard/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,UAAU,GAAG,CAAC,KAAuD,EAAE,EAAE;IAC9E,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAEtD,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,6BAAK,SAAS,EAAC,sBAAsB,EAAC,OAAO,EAAE,KAAK,CAAC,OAAO;QAC1D,MAAM,CAAC,IAAI;;QAAG,MAAM,CAAC,IAAI,CACrB,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ declare const CalendarEventContent: (props: {
3
+ id: string;
4
+ type: string;
5
+ onClick?: () => void;
6
+ }) => JSX.Element;
7
+ export default CalendarEventContent;
@@ -0,0 +1,10 @@
1
+ import ActionCard from "../../components/ActionCard";
2
+ import DocumentHeader from "@voplus/morpho-document/es/components/DocumentHeader";
3
+ import React from "react";
4
+ import { useObserver } from "mobx-react-lite";
5
+ const CalendarEventContent = (props) => {
6
+ const { id, type, onClick } = props;
7
+ return useObserver(() => (React.createElement(React.Fragment, null, type === "Action" ? (React.createElement(ActionCard, { id: id, onClick: onClick })) : (React.createElement(DocumentHeader, { id: id, tagsVisible: false, preVisible: false, quickDataBarVisible: false, className: "calendar-document-card", onClickName: onClick, toolsVisible: false })))));
8
+ };
9
+ export default CalendarEventContent;
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/calendar/components/CalendarEventContent/index.tsx"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,6BAA6B,CAAC;AACrD,OAAO,cAAc,MAAM,sDAAsD,CAAC;AAClF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,oBAAoB,GAAG,CAAC,KAAyD,EAAE,EAAE;IAC1F,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAEpC,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,oBAAC,KAAK,CAAC,QAAQ,QACb,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,CACpB,oBAAC,UAAU,IAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,GAAI,CACxC,CAAC,CAAC,CAAC,CACH,oBAAC,cAAc,IACd,EAAE,EAAE,EAAE,EACN,WAAW,EAAE,KAAK,EAClB,UAAU,EAAE,KAAK,EACjB,mBAAmB,EAAE,KAAK,EAC1B,SAAS,EAAC,wBAAwB,EAClC,WAAW,EAAE,OAAO,EACpB,YAAY,EAAE,KAAK,GAClB,CACF,CACe,CACjB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -2,24 +2,26 @@ import { Button, DatePicker, Select } from "@voplus/antd";
2
2
  import React, { useCallback, useRef, useState } from "react";
3
3
  import { faAngleLeft, faAngleRight } from "@fortawesome/pro-light-svg-icons";
4
4
  import { useCalendarListEffect, useCalendarStore } from "../../../../data/calendar";
5
+ import ActionPropertiesView from "@voplus/morpho-collaboration-action/es/components/FollowupAction/PropertiesView";
6
+ import { AsideContent } from "@voplus/morpho-ui";
7
+ import CalendarEventContent from "../../components/CalendarEventContent";
5
8
  import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
6
9
  import FullCalendar from "@fullcalendar/react";
7
10
  import { State } from "./state";
8
- import TaskCard from "../../components/TaskCard";
11
+ import TaskPropertiesView from "../../../tasks/components/TaskPropertiesView";
9
12
  import dayGridPlugin from "@fullcalendar/daygrid";
10
13
  import { faCalendar } from "@fortawesome/free-solid-svg-icons";
11
14
  import interactionPlugin from "@fullcalendar/interaction";
12
15
  import moment from "moment";
13
16
  import styles from "./index.less";
14
17
  import timeGridPlugin from "@fullcalendar/timegrid";
15
- import { useApplicationContext } from "@voplus/morpho-data";
16
18
  import { useObserver } from "mobx-react-lite";
17
19
  import { useTabItem } from "@voplus/morpho-data";
18
20
  const CalendarMonth = () => {
19
21
  var _a;
20
22
  const tab = useTabItem();
21
23
  tab.title = "Calendar";
22
- const context = useApplicationContext();
24
+ const [asideContext] = useState(AsideContent.createContext());
23
25
  const calendar = useCalendarStore();
24
26
  const Option = Select.Option;
25
27
  const { MonthPicker, WeekPicker } = DatePicker;
@@ -45,33 +47,41 @@ const CalendarMonth = () => {
45
47
  /** 在呈现事件时触发。用于修改其DOM的钩子。 */
46
48
  const eventContent = (info) => {
47
49
  const type = info.event.extendedProps.source.type;
48
- return type === "Action" ? (React.createElement("div", null, "Action")) : (React.createElement(TaskCard, { id: info.event.extendedProps.source.id, data: info.event }));
50
+ const id = info.event.extendedProps.source.id;
51
+ return (React.createElement(CalendarEventContent, { id: id, type: type, onClick: () => {
52
+ asideContext.openAside(React.createElement(AsideElement, { id: id, type: type }), { span: 10 });
53
+ } }));
49
54
  };
50
- return useObserver(() => (React.createElement("div", { className: styles["calendar-view"], ref: boxRef },
51
- React.createElement("div", { className: "calendar-header" },
52
- React.createElement("div", { className: "calendar-left" },
53
- React.createElement("span", { className: "calendar-fa-icon" },
54
- React.createElement(FAIcon, { icon: faCalendar })),
55
- React.createElement(Select, { defaultValue: "month", style: { width: 105 }, onChange: handleChange },
56
- React.createElement(Option, { value: "month" }, "Month"),
57
- React.createElement(Option, { value: "week" }, "Week"),
58
- React.createElement(Option, { value: "day" }, "Day"))),
59
- React.createElement("div", { className: "calendar-center" },
60
- React.createElement(Button, { className: "calendar-today", onClick: () => calendarApi.today() }, "Today"),
61
- React.createElement(Button, { className: "calendar-prev", onClick: () => calendarApi.prev() },
62
- React.createElement(FAIcon, { icon: faAngleLeft })),
63
- React.createElement("div", { className: "calendar-title" },
64
- state.type === "month" && (React.createElement(MonthPicker, { className: "calendar-ant-picker", defaultValue: moment(currentTime), dropdownClassName: styles["calendar-dropdown"], placeholder: "Select Month", onChange: onChange })),
65
- state.type === "week" && (React.createElement(WeekPicker, { className: "calendar-ant-picker", defaultValue: moment(currentTime), dropdownClassName: styles["calendar-dropdown"], placeholder: "Select Week", onChange: onChange })),
66
- state.type === "day" && (React.createElement(DatePicker, { showToday: false, className: "calendar-ant-picker", defaultValue: moment(currentTime), dropdownClassName: styles["calendar-dropdown"], placeholder: "Select Date", onChange: onChange })),
67
- state.title),
68
- React.createElement(Button, { className: "calendar-next", onClick: () => calendarApi.next() },
69
- React.createElement(FAIcon, { icon: faAngleRight })))),
70
- React.createElement(FullCalendar, { ref: calendarRef, plugins: [interactionPlugin, dayGridPlugin, timeGridPlugin], editable: true,
71
- /** 限制一天中显示的事件数。其余的将显示在弹出窗口中。*/
72
- dayMaxEventRows: 3, headerToolbar: false, height: 650,
73
- //events={(dataInfo)=>getDate(dataInfo)}//这个要放在eventSources前,不然eventSources数据会被覆盖
74
- eventSources: [state.listOptions], eventDrop: eventDrop, eventContent: eventContent, datesSet: datesRender }))));
55
+ const AsideElement = (props) => {
56
+ const { id, type } = props;
57
+ return (React.createElement("div", { className: "page-default-view_aside" }, type === "Action" ? React.createElement(ActionPropertiesView, { id: id }) : React.createElement(TaskPropertiesView, { id: id })));
58
+ };
59
+ return useObserver(() => (React.createElement(AsideContent, { context: asideContext },
60
+ React.createElement("div", { className: styles["calendar-view"], ref: boxRef },
61
+ React.createElement("div", { className: "calendar-header" },
62
+ React.createElement("div", { className: "calendar-left" },
63
+ React.createElement("span", { className: "calendar-fa-icon" },
64
+ React.createElement(FAIcon, { icon: faCalendar })),
65
+ React.createElement(Select, { defaultValue: "month", style: { width: 105 }, onChange: handleChange },
66
+ React.createElement(Option, { value: "month" }, "Month"),
67
+ React.createElement(Option, { value: "week" }, "Week"),
68
+ React.createElement(Option, { value: "day" }, "Day"))),
69
+ React.createElement("div", { className: "calendar-center" },
70
+ React.createElement(Button, { className: "calendar-today", onClick: () => calendarApi.today() }, "Today"),
71
+ React.createElement(Button, { className: "calendar-prev", onClick: () => calendarApi.prev() },
72
+ React.createElement(FAIcon, { icon: faAngleLeft })),
73
+ React.createElement("div", { className: "calendar-title" },
74
+ state.type === "month" && (React.createElement(MonthPicker, { className: "calendar-ant-picker", defaultValue: moment(currentTime), dropdownClassName: styles["calendar-dropdown"], placeholder: "Select Month", onChange: onChange })),
75
+ state.type === "week" && (React.createElement(WeekPicker, { className: "calendar-ant-picker", defaultValue: moment(currentTime), dropdownClassName: styles["calendar-dropdown"], placeholder: "Select Week", onChange: onChange })),
76
+ state.type === "day" && (React.createElement(DatePicker, { showToday: false, className: "calendar-ant-picker", defaultValue: moment(currentTime), dropdownClassName: styles["calendar-dropdown"], placeholder: "Select Date", onChange: onChange })),
77
+ state.title),
78
+ React.createElement(Button, { className: "calendar-next", onClick: () => calendarApi.next() },
79
+ React.createElement(FAIcon, { icon: faAngleRight })))),
80
+ React.createElement(FullCalendar, { ref: calendarRef, plugins: [interactionPlugin, dayGridPlugin, timeGridPlugin], editable: true,
81
+ /** 限制一天中显示的事件数。其余的将显示在弹出窗口中。*/
82
+ dayMaxEventRows: 3, headerToolbar: false, height: 650,
83
+ //events={(dataInfo)=>getDate(dataInfo)}//这个要放在eventSources前,不然eventSources数据会被覆盖
84
+ eventSources: [state.listOptions], eventDrop: eventDrop, eventContent: eventContent, datesSet: datesRender })))));
75
85
  /** 切换month,week,day视图 */
76
86
  function handleChange(value) {
77
87
  state.type = value;
@@ -1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,CAAC,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC;IAC/B,CAAC;IAED,8BAA8B;IAC9B,SAAS,SAAS,CAAC,IAAS;QAC3B,MAAM,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC;QAC7C,IAAI,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,gBAAgB,EAAE;YAC9C,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;SACpC;aAAM;YACN,IAAI,CAAC,MAAM,EAAE,CAAC;SACd;IACF,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -154,6 +154,19 @@
154
154
  .fc-nonbusiness {
155
155
  background: #f0f0f0;
156
156
  }
157
+ /** 自动换行 */
158
+ .fc-daygrid-event {
159
+ white-space: normal;
160
+ }
161
+ .fc-daygrid-body-unbalanced {
162
+ width: 100% !important;
163
+ }
164
+ table.fc-scrollgrid-sync-table {
165
+ width: 100% !important;
166
+ }
167
+ table.fc-col-header {
168
+ width: 100% !important;
169
+ }
157
170
  }
158
171
  }
159
172
 
@@ -187,3 +200,15 @@
187
200
  }
188
201
  }
189
202
  }
203
+
204
+ :global {
205
+ .calendar-document-card {
206
+ padding: 0;
207
+ background: transparent;
208
+ }
209
+ .calendar-action-card {
210
+ color: #000;
211
+ font-size: 15px;
212
+ font-weight: 500;
213
+ }
214
+ }
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import "./index.less";
3
+ declare const ColorSelect: (props: {
4
+ color?: string | undefined;
5
+ onChange?: ((option: {
6
+ name: string;
7
+ color: string;
8
+ }) => void) | undefined;
9
+ }) => JSX.Element;
10
+ export default ColorSelect;
@@ -0,0 +1,29 @@
1
+ import "./index.less";
2
+ import React, { useEffect, useState } from "react";
3
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
4
+ import { faCheck } from "@fortawesome/pro-light-svg-icons";
5
+ const colors = [
6
+ { name: "none", color: "#fff" },
7
+ { name: "yellow", color: "#ffe66e" },
8
+ { name: "green", color: "#a1ef9b" },
9
+ { name: "pink", color: "#ffafdf" },
10
+ { name: "purple", color: "#d7afff" },
11
+ { name: "blue", color: "#9edfff" },
12
+ { name: "grey", color: "#e0e0e0" },
13
+ { name: "black", color: "#767676" }
14
+ ];
15
+ const ColorSelect = (props) => {
16
+ const { onChange } = props;
17
+ const [color, setColor] = useState("#fff");
18
+ useEffect(() => {
19
+ setColor(props.color || "#fff");
20
+ }, [props.color]);
21
+ return (React.createElement(React.Fragment, null, colors.map(c => (React.createElement("span", { key: c.name, className: "color-select-item", style: { backgroundColor: c.color }, onClick: () => onClick(c) }, color === c.color ? (React.createElement(FAIcon, { icon: faCheck, color: color === "#fff" ? "#999" : "#fff" })) : null)))));
22
+ function onClick(option) {
23
+ setColor(option.color);
24
+ if (onChange)
25
+ onChange(option);
26
+ }
27
+ };
28
+ export default ColorSelect;
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/pages/Space/components/Notes/ColorSelect/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAE3D,MAAM,MAAM,GAAG;IACd,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;IAC/B,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,SAAS,EAAE;IACpC,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,SAA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,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACvB,IAAI,QAAQ;YAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;AACF,CAAC,CAAC;AACF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,17 @@
1
+ :global {
2
+ .color-select-item {
3
+ display: inline-block;
4
+ width: 22px;
5
+ height: 22px;
6
+ line-height: 22px;
7
+ border: 1px #f2f2f2 solid;
8
+ text-align: center;
9
+ cursor: pointer;
10
+ & + .color-select-item {
11
+ margin-left: 8px;
12
+ }
13
+ .svg-inline--fa {
14
+ display: inline-block;
15
+ }
16
+ }
17
+ }
@@ -1,8 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import "./index.less";
3
+ import { IDocument } from "@voplus/morpho-document-core";
3
4
  declare const NewNoteDialog: (props: {
4
5
  parentId: string;
5
6
  visible: boolean;
6
- onCancel?: () => void;
7
+ onCancel?: (() => void) | undefined;
8
+ onOk?: ((t: IDocument) => void) | undefined;
7
9
  }) => JSX.Element;
8
10
  export default NewNoteDialog;
@@ -1,22 +1,39 @@
1
1
  import "./index.less";
2
+ import { useDocumentStore } from "@voplus/morpho-document-core";
3
+ import React, { useState } from "react";
2
4
  import { faCheck, faTimes } from "@fortawesome/pro-light-svg-icons";
5
+ import ColorSelect from "../ColorSelect";
3
6
  import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
4
7
  import { Modal } from "@voplus/antd";
5
8
  import ProseMirror from "@voplus/morpho-text/es/controls/ProseMirror";
6
- import React from "react";
9
+ import { RequestBuilder } from "@voplus/api";
10
+ import { localFormat } from "../../../../../data/contexts/StoreContext";
7
11
  import moment from "moment";
8
- import { useDocumentStore } from "@voplus/morpho-document-core";
9
12
  const NewNoteDialog = (props) => {
10
- const { parentId, visible, onCancel } = props;
13
+ const { parentId, visible, onCancel, onOk } = props;
14
+ const [text, setText] = useState("");
15
+ const [color, setColor] = useState("");
11
16
  const documentStore = useDocumentStore();
12
- return (React.createElement(Modal, { title: "Add Note", width: "660px", visible: visible, closable: false, footer: null, className: "new-note-dialog" },
17
+ return (React.createElement(Modal, { title: React.createElement(React.Fragment, null,
18
+ React.createElement("div", null, "Add Note"),
19
+ React.createElement("div", { className: "date" }, localFormat(moment(), "dddd, MMM Do, h:mm A"))), width: "660px", visible: visible, closable: false, footer: null, className: "new-note-dialog" },
13
20
  React.createElement("div", { className: "note-header" },
14
- React.createElement("div", null, moment().format("dddd, MMMM Do, h:mm A")),
15
- React.createElement(FAIcon, { icon: faTimes, onClick: () => onCancel && onCancel() }),
16
- React.createElement(FAIcon, { icon: faCheck, color: "#52c41a", onClick: save })),
17
- React.createElement(ProseMirror, { toolbarProps: { sticky: false }, scroll: true })));
18
- function save() {
19
- documentStore.createFromType({ type: "Text", name: "Note", parentId: parentId });
21
+ React.createElement(ColorSelect, { onChange: c => setColor(c.name) }),
22
+ React.createElement("div", null,
23
+ React.createElement(FAIcon, { icon: faTimes, color: "#999", onClick: () => onCancel && onCancel() }),
24
+ React.createElement(FAIcon, { icon: faCheck, color: "#52c41a", onClick: save }))),
25
+ React.createElement(ProseMirror, { toolbarProps: { sticky: false }, scroll: true,
26
+ // defaultHtml={description || ""}
27
+ // readonly={!state.editable || readonly}
28
+ className: `note-bg-${color}`,
29
+ // onClick={() => (state.editable = !readonly)}
30
+ onChange: opt => setText(opt.editor.dom.innerHTML === "<p><br></p>" ? "" : opt.editor.dom.innerHTML) })));
31
+ async function save() {
32
+ const r = await documentStore.endpoint.post(`/api/documents/create`, new RequestBuilder().form({ type: "Text", name: "Note", parentId, Text: text }));
33
+ const t = await r.json();
34
+ console.log(t, "t");
35
+ if (onOk)
36
+ onOk(t);
20
37
  }
21
38
  };
22
39
  export default NewNoteDialog;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/pages/Space/components/Notes/NewNoteDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,OAAO,E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