@voplus/morpho-workspace 1.0.0-dev59 → 1.0.0-dev60

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 (97) hide show
  1. package/es/components/AvatarList/AvatarMenu.d.ts +4 -0
  2. package/es/components/AvatarList/AvatarMenu.js +79 -0
  3. package/es/components/AvatarList/AvatarMenu.js.map +1 -0
  4. package/es/components/AvatarList/state.d.ts +10 -0
  5. package/es/components/AvatarList/state.js +4 -0
  6. package/es/components/AvatarList/state.js.map +1 -1
  7. package/es/components/TagView/index.d.ts +15 -0
  8. package/es/components/TagView/index.js +87 -0
  9. package/es/components/TagView/index.js.map +1 -0
  10. package/es/components/TagView/index.less +37 -0
  11. package/es/components/TagView/state.d.ts +14 -0
  12. package/es/components/TagView/state.js +48 -0
  13. package/es/components/TagView/state.js.map +1 -0
  14. package/es/data/board/LinkStore.d.ts +11 -0
  15. package/es/data/board/LinkStore.js +40 -0
  16. package/es/data/board/LinkStore.js.map +1 -0
  17. package/es/data/board/index.d.ts +1 -0
  18. package/es/data/board/index.js +1 -0
  19. package/es/data/board/index.js.map +1 -1
  20. package/es/data/task/interfaces.d.ts +2 -1
  21. package/es/modules/BoardView/components/Board/index.d.ts +5 -0
  22. package/es/modules/BoardView/components/Board/index.js +144 -0
  23. package/es/modules/BoardView/components/Board/index.js.map +1 -0
  24. package/es/modules/BoardView/components/{BoardList → Board}/index.less +10 -0
  25. package/es/modules/BoardView/components/Board/state.d.ts +4 -0
  26. package/es/modules/BoardView/components/Board/state.js +11 -0
  27. package/es/modules/BoardView/components/Board/state.js.map +1 -0
  28. package/es/modules/BoardView/components/BoardColumn/index.d.ts +3 -1
  29. package/es/modules/BoardView/components/BoardColumn/index.js +46 -44
  30. package/es/modules/BoardView/components/BoardColumn/index.js.map +1 -1
  31. package/es/modules/BoardView/components/BoardColumn/index.less +163 -7
  32. package/es/modules/BoardView/components/DocumentCard/index.js +8 -11
  33. package/es/modules/BoardView/components/DocumentCard/index.js.map +1 -1
  34. package/es/modules/BoardView/components/LinkList/index.d.ts +2 -5
  35. package/es/modules/BoardView/components/LinkList/index.js +24 -34
  36. package/es/modules/BoardView/components/LinkList/index.js.map +1 -1
  37. package/es/modules/BoardView/components/TaskCard/index.d.ts +0 -1
  38. package/es/modules/BoardView/components/TaskCard/index.js +12 -13
  39. package/es/modules/BoardView/components/TaskCard/index.js.map +1 -1
  40. package/es/modules/BoardView/components/links/index.d.ts +12 -0
  41. package/es/modules/BoardView/components/links/index.js +24 -0
  42. package/es/modules/BoardView/components/links/index.js.map +1 -0
  43. package/es/modules/BoardView/pages/BoardViewList/index.d.ts +1 -3
  44. package/es/modules/BoardView/pages/BoardViewList/index.js +13 -14
  45. package/es/modules/BoardView/pages/BoardViewList/index.js.map +1 -1
  46. package/es/modules/BoardView/pages/BoardViewList/state.d.ts +5 -0
  47. package/es/modules/BoardView/pages/BoardViewList/state.js +14 -0
  48. package/es/modules/BoardView/pages/BoardViewList/state.js.map +1 -0
  49. package/es/modules/BoardView/pages/BoardViewRoutes.d.ts +16 -2
  50. package/es/modules/BoardView/pages/BoardViewRoutes.js +33 -4
  51. package/es/modules/BoardView/pages/BoardViewRoutes.js.map +1 -1
  52. package/es/modules/meeting/components/MeetingDescription/index.js +6 -8
  53. package/es/modules/meeting/components/MeetingDescription/index.js.map +1 -1
  54. package/es/modules/meeting/components/MeetingDetail/index.less +1 -0
  55. package/es/modules/meeting/pages/MeetingPrintView/index.js +5 -7
  56. package/es/modules/meeting/pages/MeetingPrintView/index.js.map +1 -1
  57. package/es/modules/meeting/pages/MeetingPrintView/index.less +53 -0
  58. package/es/modules/meeting/pages/MeetingTabView/index.js +3 -5
  59. package/es/modules/meeting/pages/MeetingTabView/index.js.map +1 -1
  60. package/es/modules/tasks/components/TaskDescription/index.js +6 -8
  61. package/es/modules/tasks/components/TaskDescription/index.js.map +1 -1
  62. package/es/modules/tasks/components/TaskDescription/index.less +1 -0
  63. package/es/modules/tasks/components/TaskDetail/index.js +2 -1
  64. package/es/modules/tasks/components/TaskDetail/index.js.map +1 -1
  65. package/es/modules/tasks/components/TaskHeader/index.js +6 -3
  66. package/es/modules/tasks/components/TaskHeader/index.js.map +1 -1
  67. package/es/modules/tasks/components/TaskItem/TaskItem.d.ts +1 -0
  68. package/es/modules/tasks/components/TaskItem/TaskItem.js +3 -3
  69. package/es/modules/tasks/components/TaskItem/TaskItem.js.map +1 -1
  70. package/es/modules/tasks/pages/TaskTabView/index.js +7 -8
  71. package/es/modules/tasks/pages/TaskTabView/index.js.map +1 -1
  72. package/package.json +6 -5
  73. package/es/modules/BoardView/components/BoardList/index.d.ts +0 -5
  74. package/es/modules/BoardView/components/BoardList/index.js +0 -84
  75. package/es/modules/BoardView/components/BoardList/index.js.map +0 -1
  76. package/es/modules/BoardView/components/BoardList/state.d.ts +0 -14
  77. package/es/modules/BoardView/components/BoardList/state.js +0 -59
  78. package/es/modules/BoardView/components/BoardList/state.js.map +0 -1
  79. package/es/modules/BoardView/components/ReactBeautifulDnd/authorItem.d.ts +0 -14
  80. package/es/modules/BoardView/components/ReactBeautifulDnd/authorItem.js +0 -45
  81. package/es/modules/BoardView/components/ReactBeautifulDnd/authorItem.js.map +0 -1
  82. package/es/modules/BoardView/components/ReactBeautifulDnd/authorList.d.ts +0 -21
  83. package/es/modules/BoardView/components/ReactBeautifulDnd/authorList.js +0 -34
  84. package/es/modules/BoardView/components/ReactBeautifulDnd/authorList.js.map +0 -1
  85. package/es/modules/BoardView/components/ReactBeautifulDnd/board.d.ts +0 -9
  86. package/es/modules/BoardView/components/ReactBeautifulDnd/board.js +0 -129
  87. package/es/modules/BoardView/components/ReactBeautifulDnd/board.js.map +0 -1
  88. package/es/modules/BoardView/components/ReactBeautifulDnd/column.d.ts +0 -11
  89. package/es/modules/BoardView/components/ReactBeautifulDnd/column.js +0 -29
  90. package/es/modules/BoardView/components/ReactBeautifulDnd/column.js.map +0 -1
  91. package/es/modules/BoardView/components/ReactBeautifulDnd/data.d.ts +0 -3
  92. package/es/modules/BoardView/components/ReactBeautifulDnd/data.js +0 -109
  93. package/es/modules/BoardView/components/ReactBeautifulDnd/data.js.map +0 -1
  94. package/es/modules/BoardView/components/ReactBeautifulDnd/index.less +0 -162
  95. package/es/modules/BoardView/components/ReactBeautifulDnd/state.d.ts +0 -13
  96. package/es/modules/BoardView/components/ReactBeautifulDnd/state.js +0 -36
  97. package/es/modules/BoardView/components/ReactBeautifulDnd/state.js.map +0 -1
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { AvatarListProps } from "./state";
3
+ declare const AvatarMenu: (props: AvatarListProps) => JSX.Element;
4
+ export default AvatarMenu;
@@ -0,0 +1,79 @@
1
+ import classnames from "classnames";
2
+ import React, { useEffect, useRef, useState } from "react";
3
+ import { faCheck } from "@fortawesome/pro-light-svg-icons";
4
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
5
+ import { Avatar, Button, Icon, Input, Menu } from "@voplus/antd";
6
+ import { useContactListEffect } from "@voplus/morpho-org";
7
+ import { useObserver } from "mobx-react-lite";
8
+ import { State } from "./state";
9
+ const AvatarMenu = (props) => {
10
+ const { multiple, list, size, editable, num, onChange } = props;
11
+ const [state] = useState(new State());
12
+ const onTick = async (item, checked) => {
13
+ if (item.disabled || !editable)
14
+ return;
15
+ state.itemId = item.id;
16
+ const checkedIds = state.items.filter(({ checked }) => checked).map(({ id }) => id);
17
+ const ids = checked ? [...checkedIds, item.id] : checkedIds.filter(id => id !== item.id);
18
+ if (props.onChange) {
19
+ state.loading = true;
20
+ await props.onChange(ids);
21
+ state.loading = false;
22
+ item.checked = !item.checked;
23
+ if (!multiple)
24
+ state.visible = false;
25
+ }
26
+ if (!!multiple)
27
+ state.members = checked
28
+ ? [...state.members, item]
29
+ : state.members.filter(({ id }) => id !== item.id);
30
+ };
31
+ const searchByKeWord = (keyWord) => {
32
+ state.keyword = keyWord;
33
+ state.items = state.list.filter(({ name }) => name
34
+ .toLowerCase()
35
+ .replace(/\s*/g, "")
36
+ .indexOf(keyWord.toLowerCase().replace(/\s*/g, "")) !== -1);
37
+ };
38
+ const visibleChange = (visible) => {
39
+ state.visible = visible;
40
+ };
41
+ const load = () => {
42
+ const avatarList = state.members;
43
+ state.items = state.list.map(item => {
44
+ const avatar = avatarList.find(({ id }) => item.id === id);
45
+ return {
46
+ ...item,
47
+ checked: !!(avatar && avatar.id),
48
+ disabled: !!(avatar && avatar.disabled)
49
+ };
50
+ });
51
+ };
52
+ // useObserver(() => {
53
+ useContactListEffect(list => {
54
+ state.list = list;
55
+ }, { reload: state.reload });
56
+ useEffect(() => {
57
+ if (state.visible) {
58
+ state.reload = true;
59
+ state.items = [];
60
+ load();
61
+ }
62
+ }, [state.visible]);
63
+ // });
64
+ const ref = useRef(null);
65
+ const colorList = ["#765FEE", "#fe4066", "#FFC832", "#FF8F5E", "#3AC43A", "#FFC832"];
66
+ return useObserver(() => (React.createElement(Menu, null,
67
+ React.createElement("div", { className: "avatar-search" },
68
+ React.createElement(Input.Search, { autoFocus: true, onSearch: searchByKeWord, onChange: e => searchByKeWord(e.target.value) })),
69
+ state.items.map((item, index) => (React.createElement(Menu.Item, { key: item.id },
70
+ React.createElement("div", { className: "avatar-item", onClick: () => onTick(item, !item.checked) },
71
+ React.createElement(Avatar, { src: item.url, size: size, className: "avatar-img", style: { backgroundColor: colorList[index % 6] } }),
72
+ React.createElement("span", { className: classnames({ "name-disabled": item.disabled }) }, item.name),
73
+ item.checked && (React.createElement(FAIcon, { icon: faCheck, className: classnames("icon-check", { disabled: item.disabled }) })),
74
+ state.loading && state.itemId === item.id && (React.createElement(Icon, { type: "loading", className: "icon-check" })))))),
75
+ multiple && (React.createElement("div", { className: "multiple-footer-btn" },
76
+ React.createElement(Button, { type: "link", onClick: () => visibleChange(false) }, "Ok"))))));
77
+ };
78
+ export default AvatarMenu;
79
+ //# sourceMappingURL=AvatarMenu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AvatarMenu.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,aAAa,CAAC,KAAK,CAAC,SAE9C,CACJ,CACN,CACK,CACP,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,UAAU,CAAC"}
@@ -1,3 +1,12 @@
1
+ export declare type AvatarListProps = {
2
+ list?: any[];
3
+ className?: string;
4
+ onChange?: (ids?: any[], members?: any[]) => void;
5
+ editable?: boolean;
6
+ num?: number;
7
+ size?: number | "large" | "small" | "default";
8
+ multiple?: boolean;
9
+ };
1
10
  export declare class State {
2
11
  avatarList: any[];
3
12
  members: any[];
@@ -9,4 +18,5 @@ export declare class State {
9
18
  num: number;
10
19
  hasMore: boolean;
11
20
  keyword: string;
21
+ reload: boolean;
12
22
  }
@@ -12,6 +12,7 @@ export class State {
12
12
  this.num = 0;
13
13
  this.hasMore = false;
14
14
  this.keyword = "";
15
+ this.reload = false;
15
16
  }
16
17
  }
17
18
  __decorate([
@@ -44,4 +45,7 @@ __decorate([
44
45
  __decorate([
45
46
  observable
46
47
  ], State.prototype, "keyword", void 0);
48
+ __decorate([
49
+ observable
50
+ ], State.prototype, "reload", void 0);
47
51
  //# sourceMappingURL=state.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/components/AvatarList/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,MAAM,OAAO,KAAK;IAAlB;QACoB,eAAU,GAAU,EAAE,CAAC;QACvB,YAAO,GAAU,EAAE,CAAC;QACpB,SAAI,GAAU,EAAE,CAAC;QACjB,UAAK,GAAU,EAAE,CAAC;QAClB,WAAM,GAAW,EAAE,CAAC;QACpB,YAAO,GAAY,KAAK,CAAC;QACzB,YAAO,GAAY,KAAK,CAAC;QACzB,QAAG,GAAW,CAAC,CAAC;QAChB,YAAO,GAAY,KAAK,CAAC;QACzB,YAAO,GAAW,EAAE,CAAC;IACzC,CAAC;CAAA;AAVY;IAAX,UAAU;yCAA+B;AAC9B;IAAX,UAAU;sCAA4B;AAC3B;IAAX,UAAU;mCAAyB;AACxB;IAAX,UAAU;oCAA0B;AACzB;IAAX,UAAU;qCAA4B;AAC3B;IAAX,UAAU;sCAAiC;AAChC;IAAX,UAAU;sCAAiC;AAChC;IAAX,UAAU;kCAAwB;AACvB;IAAX,UAAU;sCAAiC;AAChC;IAAX,UAAU;sCAA6B"}
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/components/AvatarList/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAYlC,MAAM,OAAO,KAAK;IAAlB;QACoB,eAAU,GAAU,EAAE,CAAC;QACvB,YAAO,GAAU,EAAE,CAAC;QACpB,SAAI,GAAU,EAAE,CAAC;QACjB,UAAK,GAAU,EAAE,CAAC;QAClB,WAAM,GAAW,EAAE,CAAC;QACpB,YAAO,GAAY,KAAK,CAAC;QACzB,YAAO,GAAY,KAAK,CAAC;QACzB,QAAG,GAAW,CAAC,CAAC;QAChB,YAAO,GAAY,KAAK,CAAC;QACzB,YAAO,GAAW,EAAE,CAAC;QACrB,WAAM,GAAY,KAAK,CAAC;IAC5C,CAAC;CAAA;AAXY;IAAX,UAAU;yCAA+B;AAC9B;IAAX,UAAU;sCAA4B;AAC3B;IAAX,UAAU;mCAAyB;AACxB;IAAX,UAAU;oCAA0B;AACzB;IAAX,UAAU;qCAA4B;AAC3B;IAAX,UAAU;sCAAiC;AAChC;IAAX,UAAU;sCAAiC;AAChC;IAAX,UAAU;kCAAwB;AACvB;IAAX,UAAU;sCAAiC;AAChC;IAAX,UAAU;sCAA6B;AAC5B;IAAX,UAAU;qCAAgC"}
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import { ITag } from "@voplus/morpho-document";
3
+ import "./index.less";
4
+ declare const TagView: {
5
+ (props: {
6
+ id: string;
7
+ tags?: ITag[] | undefined;
8
+ editable?: boolean | undefined;
9
+ className?: string | undefined;
10
+ }): JSX.Element;
11
+ defaultProps: {
12
+ editable: boolean;
13
+ };
14
+ };
15
+ export default TagView;
@@ -0,0 +1,87 @@
1
+ import React, { useState, useEffect } from "react";
2
+ import { useDocumentStore } from "@voplus/morpho-document";
3
+ import { Tag, Popover, Button, Select, Spin, Icon } from "@voplus/antd";
4
+ import { State, colorList } from "./state";
5
+ import classnames from "classnames";
6
+ import "./index.less";
7
+ import { useObserver } from "mobx-react-lite";
8
+ const TagView = (props) => {
9
+ const { id, tags, editable, className } = props;
10
+ const [state] = useState(new State());
11
+ const [timer, setTimer] = useState();
12
+ const documentStore = useDocumentStore();
13
+ const onClose = async (removedTag) => {
14
+ // state.AddTags = state.AddTags.filter(tag => tag !== removedTag);
15
+ await documentStore.edit(id, { RemoveTags: [removedTag] });
16
+ state.tags = state.tags.filter(({ name }) => {
17
+ return name !== removedTag;
18
+ });
19
+ };
20
+ const onBlur = (e) => {
21
+ // if (state.name && !state.AddTags.some(tag => tag.Name === state.name) && !tags.some(tag => tag.name === state.name)) {
22
+ // state.AddTags = [...state.AddTags, { Name: state.name, Color: state.color }];
23
+ // }
24
+ if (state.name &&
25
+ !state.addTags.some(name => name === state.name) &&
26
+ !state.tags.some(tag => tag.name === state.name)) {
27
+ state.addTags = [...state.addTags, state.name];
28
+ }
29
+ };
30
+ const onChange = (name) => {
31
+ state.name = name.trim();
32
+ if (!state.name)
33
+ return;
34
+ state.addTags = [...state.addTags, state.name];
35
+ };
36
+ const onSearch = async (value) => {
37
+ if (!value)
38
+ return;
39
+ if (timer)
40
+ clearTimeout(timer);
41
+ state.name = value.trim();
42
+ setTimer(setTimeout(async () => {
43
+ state.loading = true;
44
+ state.list = await documentStore.loadTags(state.name || "");
45
+ state.loading = false;
46
+ setTimer(undefined);
47
+ }, 600));
48
+ };
49
+ const onVisibleChange = (visible) => {
50
+ state.visible = visible;
51
+ };
52
+ const onOk = async () => {
53
+ const AddTags = state.addTags.map(name => ({ Name: name, Color: state.color }));
54
+ state.loading = true;
55
+ await documentStore.edit(id, { AddTags });
56
+ state.loading = false;
57
+ state.visible = false;
58
+ const tags = state.addTags.map(name => ({ name, color: state.color }));
59
+ state.tags = [...state.tags, ...tags];
60
+ };
61
+ useEffect(() => {
62
+ if (state.visible)
63
+ state.addTags = [];
64
+ }, [state.visible]);
65
+ useEffect(() => {
66
+ state.tags = tags || [];
67
+ }, [tags]);
68
+ const content = useObserver(() => (React.createElement("div", { className: "add-tag-dialog" },
69
+ React.createElement(Select, { autoFocus: true, showSearch: true, value: state.name, showArrow: false, filterOption: false, notFoundContent: state.loading ? React.createElement(Spin, { size: "small" }) : null, onSearch: onSearch, onChange: onChange, onBlur: onBlur }, state.list.map(d => (React.createElement(Select.Option, { key: d.name, disabled: state.tags.some(({ name }) => name === d.name) }, d.name)))),
70
+ React.createElement("div", { className: "tag-view-color" }, colorList.map(item => (React.createElement("span", { key: item.value, className: "item-color", onClick: () => (state.color = item.color), style: {
71
+ backgroundColor: item.color
72
+ } }, "")))),
73
+ React.createElement("div", null, state.addTags.map((tag, index) => (React.createElement(Tag, { key: index, color: state.color, closable: true, onClose: (removedTag) => (state.addTags = state.addTags.filter(tag => tag !== removedTag)) }, tag)))),
74
+ React.createElement("div", { className: "add-tag-dialog-footer" },
75
+ React.createElement(Button, { type: "link", disabled: !state.addTags.length, loading: state.loading, onClick: onOk }, "Ok")))));
76
+ return useObserver(() => (React.createElement("div", { className: classnames(className, "tag-view") },
77
+ state.tags.map((tag, index) => (React.createElement(Tag, { key: index, color: tag.color, closable: !!editable, onClose: () => onClose(tag.name) }, tag.name))),
78
+ !!editable && (React.createElement(Popover, { content: content, title: "", trigger: "click", visible: state.visible, onVisibleChange: onVisibleChange },
79
+ React.createElement(Tag, { style: { background: "#fff", borderStyle: "dashed" } },
80
+ React.createElement(Icon, { type: "plus" }),
81
+ " tag"))))));
82
+ };
83
+ TagView.defaultProps = {
84
+ editable: true
85
+ };
86
+ export default TagView;
87
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRo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or: pointer;
6
+ }
7
+ }
8
+ .add-tag-dialog {
9
+ .ant-tag {
10
+ margin-top: 10px;
11
+ }
12
+ .tag-view-color {
13
+ padding-top: 10px;
14
+ }
15
+ .item-color {
16
+ display: inline-block;
17
+ width: 20px;
18
+ height: 20px;
19
+ border-radius: 50%;
20
+ cursor: pointer;
21
+ }
22
+ .item-color + .item-color {
23
+ margin-left: 8px;
24
+ }
25
+ .add-tag-dialog-footer {
26
+ text-align: right;
27
+ .ant-btn {
28
+ height: 28px;
29
+ padding: 0;
30
+ font-size: 16px;
31
+ }
32
+ }
33
+ .ant-select {
34
+ width: 100%;
35
+ }
36
+ }
37
+ }
@@ -0,0 +1,14 @@
1
+ import { ITag } from "@voplus/morpho-document";
2
+ export declare const colorList: {
3
+ value: string;
4
+ color: string;
5
+ }[];
6
+ export declare class State {
7
+ tags: ITag[];
8
+ addTags: string[];
9
+ list: any[];
10
+ name: string;
11
+ color: string;
12
+ loading: boolean;
13
+ visible: boolean;
14
+ }
@@ -0,0 +1,48 @@
1
+ import { __decorate } from "tslib";
2
+ import { observable } from "mobx";
3
+ export const colorList = [
4
+ { value: "magenta", color: "rgba(235,47,150,1)" },
5
+ { value: "red", color: "rgba(245,34,45,1)" },
6
+ { value: "volcano", color: "rgba(250,84,28,1)" },
7
+ { value: "orange", color: "rgba(250,140,22,1)" },
8
+ { value: "gold", color: "rgba(250,173,20,1)" },
9
+ { value: "lime", color: "rgba(160,217,17,1)" },
10
+ { value: "green", color: "rgba(82,196,26,1)" },
11
+ { value: "cyan", color: "rgba(19,194,194,1)" },
12
+ { value: "blue", color: "rgba(24,144,255,1)" },
13
+ { value: "geekblue", color: "rgba(47,84,235,1)" },
14
+ { value: "purple", color: "rgba(114,46,209,1)" }
15
+ ];
16
+ export class State {
17
+ constructor() {
18
+ this.tags = [];
19
+ this.addTags = [];
20
+ this.list = [];
21
+ this.name = "";
22
+ this.color = "geekblue";
23
+ this.loading = false;
24
+ this.visible = false;
25
+ }
26
+ }
27
+ __decorate([
28
+ observable
29
+ ], State.prototype, "tags", void 0);
30
+ __decorate([
31
+ observable
32
+ ], State.prototype, "addTags", void 0);
33
+ __decorate([
34
+ observable
35
+ ], State.prototype, "list", void 0);
36
+ __decorate([
37
+ observable
38
+ ], State.prototype, "name", void 0);
39
+ __decorate([
40
+ observable
41
+ ], State.prototype, "color", void 0);
42
+ __decorate([
43
+ observable
44
+ ], State.prototype, "loading", void 0);
45
+ __decorate([
46
+ observable
47
+ ], State.prototype, "visible", void 0);
48
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/components/TagView/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAGlC,MAAM,CAAC,MAAM,SAAS,GAAG;IACxB,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,oBAAoB,EAAE;IACjD,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,mBAAmB,EAAE;IAC5C,EAAE,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,mBAAmB,EAAE;IAChD,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,oBAAoB,EAAE;IAChD,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,EAAE;IAC9C,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,EAAE;IAC9C,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,mBAAmB,EAAE;IAC9C,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,EAAE;IAC9C,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,EAAE;IAC9C,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,mBAAmB,EAAE;IACjD,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,oBAAoB,EAAE;CAChD,CAAC;AAEF,MAAM,OAAO,KAAK;IAAlB;QACoB,SAAI,GAAW,EAAE,CAAC;QAClB,YAAO,GAAa,EAAE,CAAC;QACvB,SAAI,GAAU,EAAE,CAAC;QACjB,SAAI,GAAW,EAAE,CAAC;QAClB,UAAK,GAAW,UAAU,CAAC;QAC3B,YAAO,GAAY,KAAK,CAAC;QACzB,YAAO,GAAY,KAAK,CAAC;IAC7C,CAAC;CAAA;AAPY;IAAX,UAAU;mCAA0B;AACzB;IAAX,UAAU;sCAA+B;AAC9B;IAAX,UAAU;mCAAyB;AACxB;IAAX,UAAU;mCAA0B;AACzB;IAAX,UAAU;oCAAmC;AAClC;IAAX,UAAU;sCAAiC;AAChC;IAAX,UAAU;sCAAiC"}
@@ -0,0 +1,11 @@
1
+ export declare type MoveLinkOptions = {
2
+ leftId?: string;
3
+ rightId?: string;
4
+ linkId?: string;
5
+ };
6
+ export declare class LinkStore {
7
+ get moveIds(): any;
8
+ onMove(links: MoveLinkOptions[]): import("@voplus/antd/es/message").MessageType;
9
+ onPaste(loader: () => void): Promise<void>;
10
+ clear(): void;
11
+ }
@@ -0,0 +1,40 @@
1
+ import { __decorate } from "tslib";
2
+ import { action, computed } from "mobx";
3
+ import { message } from "@voplus/antd";
4
+ export class LinkStore {
5
+ get moveIds() {
6
+ const moveIds = sessionStorage.getItem("moveIds");
7
+ return moveIds ? JSON.parse(moveIds) : [];
8
+ }
9
+ onMove(links) {
10
+ const moveIds = links;
11
+ if (!moveIds.length)
12
+ return message.warning("nothing to cut");
13
+ window.sessionStorage.setItem("moveIds", JSON.stringify(moveIds));
14
+ return message.success("Replicating Success");
15
+ }
16
+ async onPaste(loader) {
17
+ if (this.moveIds.length) {
18
+ await loader();
19
+ this.clear();
20
+ }
21
+ else
22
+ message.warning("nothing to cut");
23
+ }
24
+ clear() {
25
+ window.sessionStorage.clear();
26
+ }
27
+ }
28
+ __decorate([
29
+ computed
30
+ ], LinkStore.prototype, "moveIds", null);
31
+ __decorate([
32
+ action
33
+ ], LinkStore.prototype, "onMove", null);
34
+ __decorate([
35
+ action
36
+ ], LinkStore.prototype, "onPaste", null);
37
+ __decorate([
38
+ action
39
+ ], LinkStore.prototype, "clear", null);
40
+ //# sourceMappingURL=LinkStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkStore.js","sourceRoot":"","sources":["../../../src/data/board/LinkStore.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,MAAM,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAOvC,MAAM,OAAO,SAAS;IAErB,IAAI,OAAO;QACV,MAAM,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;QAClD,OAAO,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3C,CAAC;IAEM,MAAM,CAAC,KAAwB;QACrC,MAAM,OAAO,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,OAAO,CAAC,MAAM;YAAE,OAAO,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;QAC9D,MAAM,CAAC,cAAc,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QAClE,OAAO,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAC/C,CAAC;IAEM,KAAK,CAAC,OAAO,CAAC,MAAkB;QACtC,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACxB,MAAM,MAAM,EAAE,CAAC;YACf,IAAI,CAAC,KAAK,EAAE,CAAC;SACb;;YAAM,OAAO,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC;IAC1C,CAAC;IAEM,KAAK;QACX,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;IAC/B,CAAC;CACD;AAtBA;IADC,QAAQ;wCAIR;AAED;IADC,MAAM;uCAMN;AAED;IADC,MAAM;wCAMN;AAED;IADC,MAAM;sCAGN"}
@@ -1,5 +1,6 @@
1
1
  export * from "./interfaces";
2
2
  export * from "./BoardStore";
3
3
  export * from "./BoardColumnStore";
4
+ export * from "./LinkStore";
4
5
  export * from "./hooks";
5
6
  export * from "./types";
@@ -1,4 +1,5 @@
1
1
  export * from "./BoardStore";
2
2
  export * from "./BoardColumnStore";
3
+ export * from "./LinkStore";
3
4
  export * from "./hooks";
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data/board/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data/board/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
@@ -1,4 +1,4 @@
1
- import { IDocument } from "@voplus/morpho-document";
1
+ import { IDocument, ITag } from "@voplus/morpho-document";
2
2
  export interface IContactAvatar {
3
3
  /** Id of the contact */
4
4
  id: string;
@@ -27,4 +27,5 @@ export interface ITask extends IDocument {
27
27
  important?: boolean;
28
28
  channelId: string;
29
29
  label?: any[];
30
+ tags?: ITag[];
30
31
  }
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const Board: (props: {
3
+ parentId: string;
4
+ }) => JSX.Element;
5
+ export default Board;
@@ -0,0 +1,144 @@
1
+ import { faCheck, faTimes } from "@fortawesome/pro-light-svg-icons";
2
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
3
+ import { Input, message, Spin } from "@voplus/antd";
4
+ import Card from "@voplus/morpho-ui/es/controls/Card";
5
+ import { useObserver } from "mobx-react-lite";
6
+ import React, { useState, useEffect } from "react";
7
+ import { DragDropContext, Droppable } from "react-beautiful-dnd";
8
+ import SearchHeader from "@voplus/morpho-ui/es/components/layout/ListView/components/SearchHeader";
9
+ import SortViewDropdown from "@voplus/morpho-ui/es/components/layout/ListView/controls/SortViewDropdown";
10
+ import FilterListDropdown from "@voplus/morpho-ui/es/components/layout/ListView/controls/FilterListDropdown";
11
+ import { useBoardColumnListEffect, useBoardColumnStore } from "../../../../data/board";
12
+ import { toJS } from "mobx";
13
+ import { Scrollbars } from "react-custom-scrollbars";
14
+ import { ListOptionsContextState, ListOptionsContext } from "@voplus/morpho-ui";
15
+ import BoardColumn from "../BoardColumn";
16
+ import { useDocumentStore } from "@voplus/morpho-document";
17
+ import styles from "./index.less";
18
+ import { State } from "./state";
19
+ const Board = (props) => {
20
+ const [state] = useState(new State());
21
+ const boards = useBoardColumnStore();
22
+ const documentStore = useDocumentStore();
23
+ const [listoptions] = useState(new ListOptionsContextState());
24
+ const [boardcolumns, setBoardcolumns] = useState(state.boardcolumns);
25
+ const [name, setName] = useState("");
26
+ const [reload, setReload] = useState(false);
27
+ const [addLoading, setAddLoading] = useState(false);
28
+ const [addBoardColumnAble, setAddBoardColumnAble] = useState(false);
29
+ const [destination, setDestination] = useState(); //move 目标数据
30
+ const [source, setSource] = useState(); //move 原数据
31
+ const colorList = ["#765FEE", "#fe4066", "#FFC832", "#FF8F5E", "#16ecec", "#FFC832"];
32
+ const onBoardColumnCreated = (s, t) => {
33
+ const list = t.parentId === props.parentId ? [...state.boardcolumns, t] : state.boardcolumns;
34
+ setBoardcolumns(list);
35
+ state.boardcolumns = list;
36
+ setReload(true);
37
+ };
38
+ const onBoardColumnDeleted = (s, t) => {
39
+ const list = state.boardcolumns?.filter((item) => item.id !== t.id);
40
+ setBoardcolumns(list);
41
+ state.boardcolumns = list;
42
+ };
43
+ useEffect(() => {
44
+ boards.ItemCreatedEvent.subscribe(onBoardColumnCreated);
45
+ boards.ItemDeletedEvent.subscribe(onBoardColumnDeleted);
46
+ return () => {
47
+ boards.ItemCreatedEvent.unsubscribe(onBoardColumnCreated);
48
+ boards.ItemDeletedEvent.unsubscribe(onBoardColumnDeleted);
49
+ };
50
+ }, []);
51
+ useBoardColumnListEffect(list => {
52
+ setBoardcolumns(list);
53
+ state.boardcolumns = list;
54
+ }, {
55
+ Filters: [{ c: "ParentNodeId", o: "=", l: "And", v1: props.parentId }]
56
+ });
57
+ const reorder = (list, startIndex, endIndex) => {
58
+ const result = Array.from(list);
59
+ const [removed] = result.splice(startIndex, 1);
60
+ result.splice(endIndex, 0, removed);
61
+ return result;
62
+ };
63
+ const onDragEnd = async (result) => {
64
+ // dropped nowhere
65
+ if (!result.destination) {
66
+ return;
67
+ }
68
+ const { source, destination, draggableId } = result;
69
+ // did not move anywhere - can bail early
70
+ if (source.droppableId === destination.droppableId && source.index === destination.index) {
71
+ return;
72
+ }
73
+ // reordering column
74
+ if (result.type === "COLUMN") {
75
+ if (destination.index === 0) {
76
+ documentStore.moveAfter(draggableId, "");
77
+ }
78
+ else {
79
+ const afterId = boardcolumns.length - 1 === destination.index
80
+ ? boardcolumns[destination.index].id
81
+ : boardcolumns[destination.index - 1].id;
82
+ documentStore.moveAfter(draggableId, afterId);
83
+ }
84
+ const ordered = reorder(boardcolumns, source.index, destination.index);
85
+ setBoardcolumns(ordered);
86
+ return;
87
+ }
88
+ const linkId = draggableId.split("/")[0];
89
+ const rightId = draggableId.split("/")[1];
90
+ documentStore.moveLinks(destination.droppableId, source.droppableId, [{ Type: "Association", RightId: rightId, Position: destination.index }], [linkId]);
91
+ setSource({ id: source.droppableId, linkId: linkId });
92
+ setDestination({
93
+ id: destination.droppableId,
94
+ rightId: rightId,
95
+ linkId: linkId,
96
+ index: destination.index
97
+ });
98
+ };
99
+ const onSort = async (value) => {
100
+ listoptions.sort = value;
101
+ };
102
+ const onFilter = async (value) => {
103
+ const { status, assignee, created, labels, dueDate } = value;
104
+ listoptions.filters = [
105
+ { c: "LinkStatus", o: "contains", l: "And", v1: toJS(JSON.stringify(status)) }
106
+ ];
107
+ };
108
+ const onSearch = (value) => {
109
+ listoptions.filters = [{ c: "Name", o: "contains", l: "And", v1: toJS(JSON.stringify(value)) }];
110
+ };
111
+ const onSave = async () => {
112
+ if (!name)
113
+ return message.warning("Title is required");
114
+ setAddLoading(true);
115
+ await boards.create({ Name: name, ParentId: props.parentId });
116
+ setName("");
117
+ setAddLoading(false);
118
+ };
119
+ const board = useObserver(() => (React.createElement(Droppable, { droppableId: props.parentId, type: "COLUMN", direction: "horizontal" }, provided => (React.createElement(Scrollbars, null,
120
+ React.createElement("div", Object.assign({ style: {
121
+ flex: 1,
122
+ height: "100%",
123
+ display: "inline-flex"
124
+ }, ref: provided.innerRef }, provided.droppableProps),
125
+ boardcolumns?.map((item, index) => (React.createElement(BoardColumn, { key: item.id, index: index, id: item.id, reload: reload, colorStyle: colorList[index % 6], destination: destination, source: source }))),
126
+ provided.placeholder))))));
127
+ return useObserver(() => (React.createElement(ListOptionsContext.Provider, { value: listoptions },
128
+ React.createElement("div", { className: styles["board_header"] },
129
+ React.createElement(SearchHeader, { onChange: onSearch }),
130
+ React.createElement("div", null,
131
+ React.createElement(SortViewDropdown, { onSort: onSort }),
132
+ React.createElement(FilterListDropdown, { className: "margin-left-10", onFilter: onFilter }))),
133
+ React.createElement("div", { className: styles["board-list"] },
134
+ React.createElement(DragDropContext, { onDragEnd: onDragEnd }, board),
135
+ addBoardColumnAble && (React.createElement(Spin, { spinning: addLoading },
136
+ React.createElement(Card, { className: "add-board-able", padding: "0 15px", style: { borderTop: ` solid 2px #3AC43A` } },
137
+ React.createElement(Input, { placeholder: "STATUS NAME", value: name, onChange: e => setName(e.target.value) }),
138
+ React.createElement(FAIcon, { icon: faCheck, onClick: onSave }),
139
+ React.createElement(FAIcon, { icon: faTimes, onClick: () => setAddBoardColumnAble(false) })))),
140
+ React.createElement("div", { className: "add-board" },
141
+ React.createElement("div", { onClick: () => setAddBoardColumnAble(true) }, "+ ADD"))))));
142
+ };
143
+ export default Board;
144
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/BoardView/components/Board/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,IAAI,MAAM,oCAAoC,CAAC;AACtD,OAAO,EAAE,WAAW,EAAiB,MAAM,iBAAiB,CAAC;AAC7D,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAU,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,SAAS,EAAa,MAAM,qBAAqB,CAAC;AAC5E,OAAO,YAAY,MAAM,yEAAyE,CAAC;AACnG,OAAO,gBAAgB,MAAM,2EAA2E,CAAC;AACzG,OAAO,kBAAkB,MAAM,6EAA6E,CAAC;AAC7G,OAAO,EACN,wBAAwB,EACxB,mBAAmB,EAGnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAChF,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,KAAK,GAAG,CAAC,KAA2B,EAAE,EAAE;IAC7C,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IACtC,MAAM,MAAM,GAA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