@voplus/morpho-workspace 6.0.138 → 6.0.139

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ export type SortDnDProps<T extends {
3
+ id: string;
4
+ }> = {
5
+ list: T[];
6
+ text: (card: T, index: number) => React.ReactNode;
7
+ moveAfter?: (id: string, afterId: string, list: T[]) => void;
8
+ };
9
+ declare const DndList: <T extends {
10
+ id: string;
11
+ }>(props: SortDnDProps<T>) => React.JSX.Element;
12
+ export default DndList;
@@ -0,0 +1,29 @@
1
+ import React, { useState } from "react";
2
+ import { observe } from "@voplus/morpho-ui";
3
+ import { DndContext } from "@dnd-kit/core";
4
+ import { State } from "./state";
5
+ import { arrayMove, SortableContext, verticalListSortingStrategy } from "@dnd-kit/sortable";
6
+ const DndList = (props) => {
7
+ const { list, text } = props;
8
+ const [state] = useState(new State());
9
+ state.cards = list;
10
+ return observe(() => {
11
+ return (React.createElement(DndContext, { onDragEnd: handleDragEnd },
12
+ React.createElement(SortableContext, { items: state.cards.map((i) => i.id), strategy: verticalListSortingStrategy }, state.cards.map((item, index) => text(item, index)))));
13
+ });
14
+ function handleDragEnd({ active, over }) {
15
+ var _a;
16
+ if (active.id !== (over === null || over === void 0 ? void 0 : over.id)) {
17
+ const activeIndex = state.cards.findIndex((i) => i.id === active.id);
18
+ const overIndex = state.cards.findIndex((i) => i.id === (over === null || over === void 0 ? void 0 : over.id));
19
+ state.cards = arrayMove(state.cards, activeIndex, overIndex);
20
+ /** 查找drop card end drag 后的前一个card的id */
21
+ const index = state.cards.findIndex((i) => i.id === active.id);
22
+ const afterId = state.cards[index - 1] ? state.cards[index - 1].id : "";
23
+ /** api 需要用到drop card 完成 drag 位于哪个card 的id */
24
+ (_a = props.moveAfter) === null || _a === void 0 ? void 0 : _a.call(props, active.id, afterId, state.cards);
25
+ }
26
+ }
27
+ };
28
+ export default DndList;
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","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,CAAC,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC;YACrE,MAAM,SAAS,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,MAAK,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,EAAE,CAAA,CAAC,CAAC;YAClE,KAAK,CAAC,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;YAE7D,yCAAyC;YACzC,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC;YAC/D,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACxE,6CAA6C;YAC7C,MAAA,KAAK,CAAC,SAAS,sDAAG,MAAM,CAAC,EAAY,EAAE,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QAC9D,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare class State<T> {
2
+ constructor();
3
+ cards: T[];
4
+ }
@@ -0,0 +1,17 @@
1
+ import { __decorate } from "tslib";
2
+ import { makeObservable, observable } from "mobx";
3
+ export class State {
4
+ constructor() {
5
+ Object.defineProperty(this, "cards", {
6
+ enumerable: true,
7
+ configurable: true,
8
+ writable: true,
9
+ value: void 0
10
+ });
11
+ makeObservable(this);
12
+ }
13
+ }
14
+ __decorate([
15
+ observable
16
+ ], State.prototype, "cards", void 0);
17
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/DndList/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,UAAU,EAAU,MAAM,MAAM,CAAC;AAE1D,MAAM,OAAO,KAAK;IACjB;QAImB;;;;;WAAW;QAH7B,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;CAGD;AADmB;IAAlB,UAAU;oCAAmB"}
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from "react";
2
2
  import { observe } from "@voplus/morpho-ui";
3
3
  import { Skeleton, Collapse, Empty } from "antd";
4
- import { useOnNewDocument, useOnDeleteDocument } from "@voplus/morpho-document-core";
4
+ import { useDocumentStore, useOnNewDocument, useOnDeleteDocument, } from "@voplus/morpho-document-core";
5
5
  import { CaretRightOutlined } from "@ant-design/icons";
6
6
  import TaskCheckItem from "../TaskCheckItem";
7
7
  import DocumentItemFrame from "@voplus/morpho-document/es/controls/DocumentItemFrame";
@@ -10,9 +10,11 @@ import { State } from "./state";
10
10
  import { runInAction } from "mobx";
11
11
  import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
12
12
  import { useTaskListEffect } from "@voplus/morpho-document-core";
13
+ import DndList from "../DndList";
13
14
  import "./index.less";
14
15
  const TaskCheckActiveTab = (props) => {
15
16
  const { parentId, taskCheckState } = props;
17
+ const store = useDocumentStore();
16
18
  const [state] = useState(new State());
17
19
  const list = useCreateListDataState({
18
20
  filterDefaults: {
@@ -64,36 +66,36 @@ const TaskCheckActiveTab = (props) => {
64
66
  items.push({
65
67
  key: "Due",
66
68
  label: "Due",
67
- children: (React.createElement(React.Fragment, null, state.dueList.map((item) => (React.createElement(DocumentItemFrame, { key: item.id },
68
- React.createElement(TaskCheckItem, { id: item.id, onChangeDueDate: (date) => state.onChangeDueDate(item, date) })))))),
69
+ children: (React.createElement(DndList, { list: state.dueList, text: (item) => (React.createElement(DocumentItemFrame, { key: item.id },
70
+ React.createElement(TaskCheckItem, { id: item.id, onChangeDueDate: (date) => state.onChangeDueDate(item, date) }))), moveAfter: moveAfter })),
69
71
  });
70
72
  if (state.todayList.length)
71
73
  items.push({
72
74
  key: "Today",
73
75
  label: "Today",
74
- children: (React.createElement(React.Fragment, null, state.todayList.map((item) => (React.createElement(DocumentItemFrame, { key: item.id },
75
- React.createElement(TaskCheckItem, { id: item.id, onChangeDueDate: (date) => state.onChangeDueDate(item, date) })))))),
76
+ children: (React.createElement(DndList, { list: state.todayList, text: (item) => (React.createElement(DocumentItemFrame, { key: item.id },
77
+ React.createElement(TaskCheckItem, { id: item.id, onChangeDueDate: (date) => state.onChangeDueDate(item, date) }))), moveAfter: moveAfter })),
76
78
  });
77
79
  if (state.tomorrowList.length)
78
80
  items.push({
79
81
  key: "Tomorrow",
80
82
  label: "Tomorrow",
81
- children: (React.createElement(React.Fragment, null, state.tomorrowList.map((item) => (React.createElement(DocumentItemFrame, { key: item.id },
82
- React.createElement(TaskCheckItem, { id: item.id, onChangeDueDate: (date) => state.onChangeDueDate(item, date) })))))),
83
+ children: (React.createElement(DndList, { list: state.tomorrowList, text: (item) => (React.createElement(DocumentItemFrame, { key: item.id },
84
+ React.createElement(TaskCheckItem, { id: item.id, onChangeDueDate: (date) => state.onChangeDueDate(item, date) }))), moveAfter: moveAfter })),
83
85
  });
84
86
  if (state.thisWeekList.length)
85
87
  items.push({
86
88
  key: "This Week",
87
89
  label: "This Week",
88
- children: (React.createElement(React.Fragment, null, state.thisWeekList.map((item) => (React.createElement(DocumentItemFrame, { key: item.id },
89
- React.createElement(TaskCheckItem, { id: item.id, onChangeDueDate: (date) => state.onChangeDueDate(item, date) })))))),
90
+ children: (React.createElement(DndList, { list: state.thisWeekList, text: (item) => (React.createElement(DocumentItemFrame, { key: item.id },
91
+ React.createElement(TaskCheckItem, { id: item.id, onChangeDueDate: (date) => state.onChangeDueDate(item, date) }))), moveAfter: moveAfter })),
90
92
  });
91
93
  if (state.upcomingList.length)
92
94
  items.push({
93
95
  key: "Upcoming",
94
96
  label: "Upcoming",
95
- children: (React.createElement(React.Fragment, null, state.upcomingList.map((item) => (React.createElement(DocumentItemFrame, { key: item.id },
96
- React.createElement(TaskCheckItem, { id: item.id, dueDate: true, onChangeDueDate: (date) => state.onChangeDueDate(item, date) })))))),
97
+ children: (React.createElement(DndList, { list: state.upcomingList, text: (item) => (React.createElement(DocumentItemFrame, { key: item.id },
98
+ React.createElement(TaskCheckItem, { id: item.id, onChangeDueDate: (date) => state.onChangeDueDate(item, date) }))), moveAfter: moveAfter })),
97
99
  });
98
100
  return (React.createElement(ListDataContext.Provider, { value: list },
99
101
  React.createElement("div", { className: "active-tab-task-list" },
@@ -101,6 +103,9 @@ const TaskCheckActiveTab = (props) => {
101
103
  React.createElement(Collapse, { className: "active-task-collapse", bordered: false, defaultActiveKey: ["Due", "Today", "Tomorrow", "This Week", "Upcoming"], expandIcon: ({ isActive }) => React.createElement(CaretRightOutlined, { rotate: isActive ? 90 : 0 }), items: items }),
102
104
  !items.length && React.createElement(Empty, null)))));
103
105
  });
106
+ async function moveAfter(id, afterId) {
107
+ await store.moveAfter(id, afterId);
108
+ }
104
109
  };
105
110
  export default TaskCheckActiveTab;
106
111
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskCheckActiveTab/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AACjD,OAAO,EAAiB,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,aAAa,MAAM,kBAAkB,CAAC;AAE7C,OAAO,iBAAiB,MAA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,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,GAC3D,CACiB,CACpB,EACD,SAAS,EAAE,SAAS,GACnB,CACF;aACD,CAAC,CAAC;QAEJ,OAAO,CACN,oBAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,IAAI;YACpC,6BAAK,SAAS,EAAC,sBAAsB;gBACpC,oBAAC,QAAQ,IAAC,OAAO,EAAE,IAAI,CAAC,OAAO;oBAC9B,oBAAC,QAAQ,IACR,SAAS,EAAC,sBAAsB,EAChC,QAAQ,EAAE,KAAK,EACf,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,CAAC,EACvE,UAAU,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,oBAAC,kBAAkB,IAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAI,EAC/E,KAAK,EAAE,KAAK,GACX;oBACD,CAAC,KAAK,CAAC,MAAM,IAAI,oBAAC,KAAK,OAAG,CACjB,CACN,CACoB,CAC3B,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,KAAK,UAAU,SAAS,CAAC,EAAU,EAAE,OAAe;QACnD,MAAM,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACpC,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -8,12 +8,16 @@ import FlagIcon from "@voplus/morpho-document/es/controls/data-icons/FlagIcon";
8
8
  import { useTask, useTaskStore, useMetaStore } from "@voplus/morpho-document-core";
9
9
  import dayjs from "dayjs";
10
10
  import { State } from "./state";
11
+ import { MenuOutlined } from "@ant-design/icons";
11
12
  import AvatarList from "@voplus/morpho-org/es/components/AvatarList";
12
13
  import PresetDatePicker from "@voplus/morpho-ui/es/controls/PresetDatePicker";
13
14
  import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
14
15
  import { faCalendar } from "@fortawesome/pro-light-svg-icons";
15
16
  import { useApplicationContext } from "@voplus/morpho-data";
16
17
  import DocumentHeader from "@voplus/morpho-document/es/components/DocumentHeader";
18
+ import DocumentItemFrame from "@voplus/morpho-document/es/controls/DocumentItemFrame";
19
+ import { useSortable } from "@dnd-kit/sortable";
20
+ import { CSS } from "@dnd-kit/utilities";
17
21
  import "./index.less";
18
22
  const TaskCheckItem = (props) => {
19
23
  const { id, dueDate } = props;
@@ -23,43 +27,54 @@ const TaskCheckItem = (props) => {
23
27
  const taskStore = useTaskStore();
24
28
  const task = useTask(id);
25
29
  state.update(task);
30
+ const { attributes, listeners, setNodeRef, setActivatorNodeRef, transform, transition } = useSortable({
31
+ id: props.id,
32
+ });
33
+ const style = {
34
+ transform: CSS.Transform.toString(transform),
35
+ transition,
36
+ marginTop: 8,
37
+ };
26
38
  return observe(() => {
27
39
  var _a;
28
- return (React.createElement(DocumentHeader, { id: id, flagVisible: false, tagsVisible: false, quickDataBarVisible: false, className: "task-check-item", clickNameEffect: "default", onMouse: (over) => (state.isHover = over), pre: React.createElement("div", null,
29
- React.createElement(Checkbox, { checked: task.taskStatus === "Done", onChange: async (e) => {
30
- await taskStore.edit(task.id, {
31
- data: { TaskStatus: e.target.checked === true ? "Done" : "Progress" },
32
- error: (error) => message.error(error.message),
33
- });
34
- } }),
35
- React.createElement(FlagIcon, { id: task.id, flag: task.flag, editable: !task.readonly })), tools: React.createElement(React.Fragment, null,
36
- ((_a = task.members) === null || _a === void 0 ? void 0 : _a.length) ? (React.createElement("div", { className: classnames("task-members", { hide: state.isHover }) },
37
- React.createElement(AvatarList, { organizationId: user.info.organizationId, maxCount: 3, list: task.members, editable: false }))) : null,
38
- dueDate && (React.createElement("span", { className: classnames("task-dueDate", { hide: state.isHover }) },
39
- React.createElement("span", { className: classnames("no-dueDate", { open: state.openDate }), onClick: () => (state.openDate = true) }, task.dueDate ? dayjs(task.dueDate).format("DD MMM YYYY") : "No due date"),
40
- React.createElement(PresetDatePicker, { className: "task-item-preset-date-picker", open: state.openDate, value: task.dueDate ? dayjs(task.dueDate) : undefined, onChange: async (preset, date) => {
41
- var _a;
42
- state.openDate = false;
43
- await taskStore.edit(task.id, {
44
- data: { DueDate: date ? dayjs(date).format("YYYY-MM-DD") : "" },
45
- error: (error) => message.error(error.message),
46
- });
47
- (_a = props.onChangeDueDate) === null || _a === void 0 ? void 0 : _a.call(props, task.dueDate);
48
- }, handleOpenChange: (open) => (state.openDate = open), style: { width: "100%" } }))),
49
- React.createElement("div", { className: classnames("hover-operate-icon", { show: state.isHover }) },
50
- React.createElement(ToolBar, { id: id, moreProps: { buttonProps: { size: "middle" } } },
51
- React.createElement(Open, { size: "middle", url: meta.getRoute(task) }),
52
- !dueDate && (React.createElement(Button, { type: "link", key: "dueDate", className: "task-toolbar-dueDate", onClick: () => (state.openToolbarDate = true) },
53
- React.createElement(FAIcon, { icon: faCalendar }),
54
- React.createElement(PresetDatePicker, { className: "task-toolbar-preset-date-picker", open: state.openToolbarDate, value: task.dueDate ? dayjs(task.dueDate) : undefined, onChange: async (preset, date) => {
40
+ return (React.createElement("div", { style: style, ref: setNodeRef, ...attributes },
41
+ React.createElement(DocumentItemFrame, null,
42
+ React.createElement(DocumentHeader, { id: id, flagVisible: false, tagsVisible: false, quickDataBarVisible: false, className: "task-check-item", clickNameEffect: "default", onMouse: (over) => (state.isHover = over), pre: React.createElement("div", { className: "task-pre" },
43
+ React.createElement(MenuOutlined, { ref: setActivatorNodeRef, style: { touchAction: "none", cursor: "move" }, className: classnames("task-move", { show: state.isHover }), ...listeners }),
44
+ React.createElement(Checkbox, { checked: task.taskStatus === "Done", onChange: async (e) => {
45
+ await taskStore.edit(task.id, {
46
+ data: { TaskStatus: e.target.checked === true ? "Done" : "Progress" },
47
+ error: (error) => message.error(error.message),
48
+ });
49
+ } }),
50
+ React.createElement(FlagIcon, { id: task.id, flag: task.flag, editable: !task.readonly })), tools: React.createElement(React.Fragment, null,
51
+ ((_a = task.members) === null || _a === void 0 ? void 0 : _a.length) ? (React.createElement("div", { className: classnames("task-members", { hide: state.isHover }) },
52
+ React.createElement(AvatarList, { organizationId: user.info.organizationId, maxCount: 3, list: task.members, editable: false }))) : null,
53
+ dueDate && (React.createElement("span", { className: classnames("task-dueDate", { hide: state.isHover }) },
54
+ React.createElement("span", { className: classnames("no-dueDate", { open: state.openDate }), onClick: () => (state.openDate = true) }, task.dueDate ? dayjs(task.dueDate).format("DD MMM YYYY") : "No due date"),
55
+ React.createElement(PresetDatePicker, { className: "task-item-preset-date-picker", open: state.openDate, value: task.dueDate ? dayjs(task.dueDate) : undefined, onChange: async (preset, date) => {
55
56
  var _a;
56
- state.openToolbarDate = false;
57
+ state.openDate = false;
57
58
  await taskStore.edit(task.id, {
58
59
  data: { DueDate: date ? dayjs(date).format("YYYY-MM-DD") : "" },
59
60
  error: (error) => message.error(error.message),
60
61
  });
61
62
  (_a = props.onChangeDueDate) === null || _a === void 0 ? void 0 : _a.call(props, task.dueDate);
62
- }, handleOpenChange: (open) => (state.openToolbarDate = open), style: { width: "100%" } })))))) }));
63
+ }, handleOpenChange: (open) => (state.openDate = open), style: { width: "100%" } }))),
64
+ React.createElement("div", { className: classnames("hover-operate-icon", { show: state.isHover }) },
65
+ React.createElement(ToolBar, { id: id, moreProps: { buttonProps: { size: "middle" } } },
66
+ React.createElement(Open, { size: "middle", url: meta.getRoute(task) }),
67
+ !dueDate && (React.createElement(Button, { type: "link", key: "dueDate", className: "task-toolbar-dueDate", onClick: () => (state.openToolbarDate = true) },
68
+ React.createElement(FAIcon, { icon: faCalendar }),
69
+ React.createElement(PresetDatePicker, { className: "task-toolbar-preset-date-picker", open: state.openToolbarDate, value: task.dueDate ? dayjs(task.dueDate) : undefined, onChange: async (preset, date) => {
70
+ var _a;
71
+ state.openToolbarDate = false;
72
+ await taskStore.edit(task.id, {
73
+ data: { DueDate: date ? dayjs(date).format("YYYY-MM-DD") : "" },
74
+ error: (error) => message.error(error.message),
75
+ });
76
+ (_a = props.onChangeDueDate) === null || _a === void 0 ? void 0 : _a.call(props, task.dueDate);
77
+ }, handleOpenChange: (open) => (state.openToolbarDate = open), style: { width: "100%" } })))))) }))));
63
78
  });
64
79
  };
65
80
  export default TaskCheckItem;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/tasks/components/TaskCheckItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,MAAM,CAAC;AACjD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,qDAAqD,CAAC;AAC3E,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,QAAQ,MAAM,yDAAyD,CAAC;AAC/E,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,UAAU,MAAM,6CAA6C,CAAC;AACrE,OAAO,gBAAgB,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,cAAc,MAAM,sDAAsD,CAAC;AAClF,OAAO,cAAc,CAAC;AAEtB,MAAM,aAAa,GAAG,CAAC,KAKtB,EAAE,EAAE;IACJ,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,KAAK,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AgB,IAChB,SAAS,EAAC,iCAAiC,EAC3C,IAAI,EAAE,KAAK,CAAC,eAAe,EAC3B,KAAK,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,SAAS,EACrD,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,IAAS,EAAE,EAAE;;4CACrC,KAAK,CAAC,eAAe,GAAG,KAAK,CAAC;4CAC9B,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE;gDAC7B,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE;gDAC/D,KAAK,EAAE,CAAC,KAAY,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;6CACrD,CAAC,CAAC;4CACH,MAAA,KAAK,CAAC,eAAe,sDAAG,IAAI,CAAC,OAAO,CAAC,CAAC;wCACvC,CAAC,EACD,gBAAgB,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,eAAe,GAAG,IAAI,CAAC,EAC1D,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GACvB,CACM,CACT,CACQ,CACL,CACJ,GAEH,CACiB,CACf,CACN,CAAA;KAAA,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -79,5 +79,19 @@
79
79
  }
80
80
  }
81
81
  }
82
+
83
+ .task-pre {
84
+ display: flex;
85
+ align-items: center;
86
+ .task-move {
87
+ color: #585858;
88
+ margin-right: 6px;
89
+ cursor: move;
90
+ opacity: 0;
91
+ &.show {
92
+ opacity: 1;
93
+ }
94
+ }
95
+ }
82
96
  }
83
97
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voplus/morpho-workspace",
3
- "version": "6.0.138",
3
+ "version": "6.0.139",
4
4
  "description": "morpho workspace module",
5
5
  "repository": {
6
6
  "type": "git",