@voplus/morpho-workspace 1.1.0-dev014 → 1.1.0-dev018
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.
- package/changelog.md +5 -3
- package/es/controls/filters/AssigneeViewFilter/index.js +43 -0
- package/es/controls/filters/AssigneeViewFilter/index.js.map +1 -0
- package/es/controls/filters/AssigneeViewFilter/state.d.ts +14 -0
- package/es/controls/filters/AssigneeViewFilter/state.js +43 -0
- package/es/controls/filters/AssigneeViewFilter/state.js.map +1 -0
- package/es/controls/filters/DueDateFilter/index.d.ts +3 -0
- package/es/controls/filters/DueDateFilter/index.js +22 -0
- package/es/controls/filters/DueDateFilter/index.js.map +1 -0
- package/es/controls/filters/DueDateFilter/state.d.ts +11 -0
- package/es/controls/filters/DueDateFilter/state.js +36 -0
- package/es/controls/filters/DueDateFilter/state.js.map +1 -0
- package/es/controls/filters/StartDateFilter/index.d.ts +3 -0
- package/es/controls/filters/StartDateFilter/index.js +22 -0
- package/es/controls/filters/StartDateFilter/index.js.map +1 -0
- package/es/controls/filters/StartDateFilter/state.d.ts +11 -0
- package/es/controls/filters/StartDateFilter/state.js +36 -0
- package/es/controls/filters/StartDateFilter/state.js.map +1 -0
- package/es/controls/filters/TaskStatusFilter/index.d.ts +3 -0
- package/es/controls/filters/TaskStatusFilter/index.js +21 -0
- package/es/controls/filters/TaskStatusFilter/index.js.map +1 -0
- package/es/controls/filters/TaskStatusFilter/state.d.ts +16 -0
- package/es/controls/filters/TaskStatusFilter/state.js +46 -0
- package/es/controls/filters/TaskStatusFilter/state.js.map +1 -0
- package/es/controls/filters/index.d.ts +4 -0
- package/es/controls/filters/index.js +5 -0
- package/es/controls/filters/index.js.map +1 -0
- package/es/data/board/BoardColumnStore.d.ts +3 -13
- package/es/data/board/BoardColumnStore.js +2 -24
- package/es/data/board/BoardColumnStore.js.map +1 -1
- package/es/data/board/BoardStore.d.ts +2 -12
- package/es/data/board/BoardStore.js +1 -23
- package/es/data/board/BoardStore.js.map +1 -1
- package/es/data/board/contexts/BoardListContextState/index.d.ts +19 -0
- package/es/data/board/contexts/BoardListContextState/index.js +49 -0
- package/es/data/board/contexts/BoardListContextState/index.js.map +1 -0
- package/es/data/board/index.d.ts +1 -1
- package/es/data/board/index.js +1 -1
- package/es/data/board/index.js.map +1 -1
- package/es/modules/board/components/Board/index.js +34 -41
- package/es/modules/board/components/Board/index.js.map +1 -1
- package/es/modules/board/components/Board/index.less +83 -51
- package/es/modules/board/components/Board/state.d.ts +22 -5
- package/es/modules/board/components/Board/state.js +70 -15
- package/es/modules/board/components/Board/state.js.map +1 -1
- package/es/modules/board/components/BoardColumn/index.js +21 -35
- package/es/modules/board/components/BoardColumn/index.js.map +1 -1
- package/es/modules/board/components/BoardColumn/index.less +22 -12
- package/es/modules/board/components/BoardColumn/state.d.ts +17 -18
- package/es/modules/board/components/BoardColumn/state.js +43 -42
- package/es/modules/board/components/BoardColumn/state.js.map +1 -1
- package/es/modules/board/components/DocumentCard/index.d.ts +0 -2
- package/es/modules/board/components/DocumentCard/index.js +16 -79
- package/es/modules/board/components/DocumentCard/index.js.map +1 -1
- package/es/modules/board/components/DocumentCard/index.less +16 -13
- package/es/modules/board/components/DocumentCard/state.d.ts +6 -6
- package/es/modules/board/components/DocumentCard/state.js +34 -21
- package/es/modules/board/components/DocumentCard/state.js.map +1 -1
- package/es/modules/board/components/SubDocument/index.d.ts +13 -0
- package/es/modules/board/components/SubDocument/index.js +13 -0
- package/es/modules/board/components/SubDocument/index.js.map +1 -0
- package/es/modules/board/components/SubDocumentList/index.d.ts +4 -0
- package/es/modules/board/components/SubDocumentList/index.js +74 -0
- package/es/modules/board/components/SubDocumentList/index.js.map +1 -0
- package/es/modules/board/components/SubDocumentList/index.less +28 -0
- package/es/modules/board/components/SubDocumentList/state.d.ts +25 -0
- package/es/modules/board/components/SubDocumentList/state.js +60 -0
- package/es/modules/board/components/SubDocumentList/state.js.map +1 -0
- package/es/modules/board/components/TaskCard/index.js +27 -76
- package/es/modules/board/components/TaskCard/index.js.map +1 -1
- package/es/modules/board/components/TaskCard/index.less +9 -4
- package/es/modules/board/components/TaskCard/state.d.ts +1 -8
- package/es/modules/board/components/TaskCard/state.js +28 -23
- package/es/modules/board/components/TaskCard/state.js.map +1 -1
- package/es/modules/meeting/components/AgendaList/index.js +4 -7
- package/es/modules/meeting/components/AgendaList/index.js.map +1 -1
- package/es/modules/meeting/components/MeetingQuickViewDialog/index.js +1 -1
- package/es/modules/meeting/components/MeetingQuickViewDialog/index.js.map +1 -1
- package/es/modules/meeting/pages/MeetingList/index.js +6 -5
- package/es/modules/meeting/pages/MeetingList/index.js.map +1 -1
- package/es/modules/tasks/components/SubTaskList/index.js +11 -4
- package/es/modules/tasks/components/SubTaskList/index.js.map +1 -1
- package/es/modules/tasks/components/TaskQuickViewDialog/index.js +1 -1
- package/es/modules/tasks/components/TaskQuickViewDialog/index.js.map +1 -1
- package/es/modules/tasks/pages/TaskList/index.js +10 -7
- package/es/modules/tasks/pages/TaskList/index.js.map +1 -1
- package/package.json +3 -3
- package/es/controls/AssigneeViewFilter/index.js +0 -41
- package/es/controls/AssigneeViewFilter/index.js.map +0 -1
- package/es/data/board/LinkStore.d.ts +0 -11
- package/es/data/board/LinkStore.js +0 -44
- package/es/data/board/LinkStore.js.map +0 -1
- package/es/modules/board/components/LinkList/index.d.ts +0 -4
- package/es/modules/board/components/LinkList/index.js +0 -38
- package/es/modules/board/components/LinkList/index.js.map +0 -1
- package/es/modules/board/components/LinkList/state.d.ts +0 -15
- package/es/modules/board/components/LinkList/state.js +0 -37
- package/es/modules/board/components/LinkList/state.js.map +0 -1
- package/es/modules/board/components/links/index.d.ts +0 -12
- package/es/modules/board/components/links/index.js +0 -26
- package/es/modules/board/components/links/index.js.map +0 -1
- /package/es/controls/{AssigneeViewFilter → filters/AssigneeViewFilter}/index.d.ts +0 -0
- /package/es/controls/{AssigneeViewFilter → filters/AssigneeViewFilter}/index.less +0 -0
package/changelog.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
-
[
|
1
|
+
[Improve] : 改進 Board
|
2
|
+
[UX] : 顯示 inheritedMember 改成顯示 childMembers
|
2
3
|
|
3
4
|
## 14 Apr 2019
|
4
|
-
|
5
|
-
[
|
5
|
+
|
6
|
+
[Fix] : Task subList tem 按名字沒有 QuickView, 按 Tag 也沒反應
|
7
|
+
[Improvement]:把 TabView 的 Tags 從右方移去文件名後和其它地方保持一致、TaskItem 顯示 UsersQuickIcon
|
6
8
|
[Fix] Subtask List Tag 和 QuickView
|
7
9
|
[Refactor] TaskStatusFilter 用戶不选时要为空.
|
8
10
|
[Improvement] Task Tab view 顯示 Dependent Task (1 天)
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import "./index.less";
|
2
|
+
import { useContactListEffect } from "@voplus/morpho-org";
|
3
|
+
import React from "react";
|
4
|
+
import AvatarItem from "@voplus/morpho-document/es/components/AvatarList/AvatarItem";
|
5
|
+
import { CloseOutlined } from "@ant-design/icons";
|
6
|
+
import { Select } from "@voplus/antd";
|
7
|
+
import { State } from "./state";
|
8
|
+
import classnames from "classnames";
|
9
|
+
import { useFilterOptionsContext } from "@voplus/morpho-ui/es/data";
|
10
|
+
import { useObserver } from "mobx-react-lite";
|
11
|
+
const AssigneeView = () => {
|
12
|
+
const context = useFilterOptionsContext();
|
13
|
+
const state = context.getFilterState("Assignee", () => new State());
|
14
|
+
useContactListEffect(list => {
|
15
|
+
state.contactList = list || [];
|
16
|
+
});
|
17
|
+
return useObserver(() => (React.createElement("div", { className: "assignee-view" },
|
18
|
+
React.createElement("div", { className: "menu-item-title" }, "AssigneeView"),
|
19
|
+
React.createElement(Select, { value: Array.from(state.members.keys()), showSearch: true, placeholder: "Input or select contact.", filterOption: filterItems, optionLabelProp: "title", onSelect: onSelectMember, style: { width: 160 } }, state.contactList.map(i => (React.createElement(Select.Option, { key: i.id, value: i.id, title: i.name }, i.name)))),
|
20
|
+
state.memberList.map((item, index) => (React.createElement("div", { key: item.id, className: classnames("assignee-view-item", {
|
21
|
+
bold: state.members.has(item.id)
|
22
|
+
}) },
|
23
|
+
React.createElement(AvatarItem, { id: item.id, index: index, showName: true }),
|
24
|
+
React.createElement(CloseOutlined, { onClick: () => onCancel(item.id) })))))));
|
25
|
+
function filterItems(input, option) {
|
26
|
+
return option.title.toLowerCase().includes(input.toLowerCase());
|
27
|
+
}
|
28
|
+
/** cancel select member */
|
29
|
+
function onCancel(id) {
|
30
|
+
state.memberList = state.memberList.filter(m => m.id !== id);
|
31
|
+
state.members.delete(id);
|
32
|
+
}
|
33
|
+
/** selected member */
|
34
|
+
function onSelectMember(id) {
|
35
|
+
const item = state.contactList.find(x => x.id === id);
|
36
|
+
state.members.has(id)
|
37
|
+
? (state.memberList = state.contactList.filter(c => c.id !== id))
|
38
|
+
: state.memberList.push(item);
|
39
|
+
state.members.has(id) ? state.members.delete(id) : state.members.set(id, true);
|
40
|
+
}
|
41
|
+
};
|
42
|
+
export default AssigneeView;
|
43
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/controls/filters/AssigneeViewFilter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAY,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,UAAU,MAAM,6DAA6D,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,YAAY,GAAG,GAAG,EAAE;IACzB,M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;IAChF,CAAC;AACF,CAAC,CAAC;AACF,eAAe,YAAY,CAAC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { FilterOption } from "@voplus/morpho-data";
|
2
|
+
import { IContact } from "@voplus/morpho-org";
|
3
|
+
import { IFilterState } from "@voplus/morpho-ui/es/data/IFilterState";
|
4
|
+
export declare class State implements IFilterState {
|
5
|
+
/** List of contact */
|
6
|
+
contactList: IContact[];
|
7
|
+
/** Members of filter */
|
8
|
+
memberList: IContact[];
|
9
|
+
/** Ids of member of filter */
|
10
|
+
members: Map<string, boolean>;
|
11
|
+
/** 视乎State内容,返回正确的FilterOption[]. 在Filter时,Context 会使用此属性replace Context内FilterOption的资料。 */
|
12
|
+
get filters(): FilterOption[];
|
13
|
+
reset(): void;
|
14
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { observable } from "mobx";
|
3
|
+
let State = /** @class */ (() => {
|
4
|
+
class State {
|
5
|
+
constructor() {
|
6
|
+
/** List of contact */
|
7
|
+
this.contactList = [];
|
8
|
+
/** Members of filter */
|
9
|
+
this.memberList = [];
|
10
|
+
/** Ids of member of filter */
|
11
|
+
this.members = new Map();
|
12
|
+
}
|
13
|
+
/** 视乎State内容,返回正确的FilterOption[]. 在Filter时,Context 会使用此属性replace Context内FilterOption的资料。 */
|
14
|
+
get filters() {
|
15
|
+
if (this.members.size === 0)
|
16
|
+
return [];
|
17
|
+
return [
|
18
|
+
{
|
19
|
+
c: "Members",
|
20
|
+
o: "contains",
|
21
|
+
v1: JSON.stringify(Array.from(this.members.keys())),
|
22
|
+
l: "And"
|
23
|
+
}
|
24
|
+
];
|
25
|
+
}
|
26
|
+
reset() {
|
27
|
+
this.members.clear();
|
28
|
+
this.memberList = [];
|
29
|
+
}
|
30
|
+
}
|
31
|
+
__decorate([
|
32
|
+
observable
|
33
|
+
], State.prototype, "contactList", void 0);
|
34
|
+
__decorate([
|
35
|
+
observable
|
36
|
+
], State.prototype, "memberList", void 0);
|
37
|
+
__decorate([
|
38
|
+
observable
|
39
|
+
], State.prototype, "members", void 0);
|
40
|
+
return State;
|
41
|
+
})();
|
42
|
+
export { State };
|
43
|
+
//# sourceMappingURL=state.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/controls/filters/AssigneeViewFilter/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAU,UAAU,EAAE,MAAM,MAAM,CAAC;AAM1C;IAAA,MAAa,KAAK;QAAlB;YACC,sBAAsB;YACH,gBAAW,GAAe,EAAE,CAAC;YAChD,wBAAwB;YACL,eAAU,GAAe,EAAE,CAAC;YAC/C,8BAA8B;YACX,YAAO,GAAyB,IAAI,GAAG,EAAE,CAAC;QAmB9D,CAAC;QAjBA,6FAA6F;QAC7F,IAAW,OAAO;YACjB,IAAI,IAAI,CAAC,OAAO,CAAC,IAAI,KAAK,CAAC;gBAAE,OAAO,EAAE,CAAC;YACvC,OAAO;gBACN;oBACC,CAAC,EAAE,SAAS;oBACZ,CAAC,EAAE,UAAU;oBACb,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;oBACnD,CAAC,EAAE,KAAK;iBACQ;aACjB,CAAC;QACH,CAAC;QAEM,KAAK;YACX,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC;YACrB,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;QACtB,CAAC;KACD;IAvBY;QAAX,UAAU;8CAAqC;IAEpC;QAAX,UAAU;6CAAoC;IAEnC;QAAX,UAAU;0CAAkD;IAmB9D,YAAC;KAAA;SAzBY,KAAK"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Badge, DatePicker } from "@voplus/antd";
|
2
|
+
import React from "react";
|
3
|
+
import { State } from "./state";
|
4
|
+
import classnames from "classnames";
|
5
|
+
import { dateMenus } from "@voplus/morpho-ui/es/data/FilterViewContext";
|
6
|
+
import { toJS } from "mobx";
|
7
|
+
import { useFilterOptionsContext } from "@voplus/morpho-ui/es/data";
|
8
|
+
import { useObserver } from "mobx-react-lite";
|
9
|
+
const DueDateFilter = () => {
|
10
|
+
const context = useFilterOptionsContext();
|
11
|
+
const state = context.getFilterState("DueDate", () => new State());
|
12
|
+
return useObserver(() => (React.createElement("div", null,
|
13
|
+
React.createElement("div", { className: "menu-item-title" }, "DueDate"),
|
14
|
+
React.createElement(DatePicker.RangePicker, { value: state.dueDate, suffixIcon: null, className: "filter-date-picker", allowEmpty: [true, true], onChange: dates => (state.dueDate = dates) }),
|
15
|
+
dateMenus.map((item, index) => (React.createElement("div", { key: index, className: classnames("filter-menu-item", {
|
16
|
+
bold: JSON.stringify(toJS(state.dueDate)) === JSON.stringify(item.value)
|
17
|
+
}), onClick: () => (state.dueDate = item.value) },
|
18
|
+
React.createElement("div", { className: "filter-name" }, item.name),
|
19
|
+
item.name === "Today" ? (React.createElement(Badge, { style: item.style, count: item.counts, showZero: true })) : (React.createElement("span", null, item.counts))))))));
|
20
|
+
};
|
21
|
+
export default DueDateFilter;
|
22
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/controls/filters/DueDateFilter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAC;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,WAAW,EAAE,MAAM,iB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1B,CACI,CACN,CAAC,CACG,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Moment } from "moment";
|
2
|
+
import { FilterOption } from "@voplus/morpho-data";
|
3
|
+
import { IFilterState } from "@voplus/morpho-ui/es/data";
|
4
|
+
import { RangeValue } from "rc-picker/es/interface";
|
5
|
+
export declare class State implements IFilterState {
|
6
|
+
dueDate: RangeValue<Moment>;
|
7
|
+
constructor();
|
8
|
+
/** 视乎State内容,返回正确的FilterOption[]. 在Filter时,Context 会使用此属性replace Context内FilterOption的资料。 */
|
9
|
+
get filters(): FilterOption[];
|
10
|
+
reset(): void;
|
11
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import moment from "moment";
|
3
|
+
import { observable } from "mobx";
|
4
|
+
let State = /** @class */ (() => {
|
5
|
+
class State {
|
6
|
+
constructor() {
|
7
|
+
this.reset();
|
8
|
+
}
|
9
|
+
/** 视乎State内容,返回正确的FilterOption[]. 在Filter时,Context 会使用此属性replace Context内FilterOption的资料。 */
|
10
|
+
get filters() {
|
11
|
+
var _a, _b, _c, _d, _e, _f;
|
12
|
+
if (((_a = this.dueDate) === null || _a === void 0 ? void 0 : _a[0]) === null && ((_b = this.dueDate) === null || _b === void 0 ? void 0 : _b[1]) === null)
|
13
|
+
return [];
|
14
|
+
const start = (_d = (_c = this.dueDate) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : moment({ year: 1753, month: 1, day: 1 });
|
15
|
+
const end = (_f = (_e = this.dueDate) === null || _e === void 0 ? void 0 : _e[1]) !== null && _f !== void 0 ? _f : moment().endOf("year");
|
16
|
+
return [
|
17
|
+
{
|
18
|
+
c: "DueDate",
|
19
|
+
o: "between",
|
20
|
+
l: "And",
|
21
|
+
v1: start.startOf("days").format("YYYY-MM-DD HH:mm:ss"),
|
22
|
+
v2: end.endOf("days").format("YYYY-MM-DD HH:mm:ss")
|
23
|
+
}
|
24
|
+
];
|
25
|
+
}
|
26
|
+
reset() {
|
27
|
+
this.dueDate = [null, null];
|
28
|
+
}
|
29
|
+
}
|
30
|
+
__decorate([
|
31
|
+
observable
|
32
|
+
], State.prototype, "dueDate", void 0);
|
33
|
+
return State;
|
34
|
+
})();
|
35
|
+
export { State };
|
36
|
+
//# sourceMappingURL=state.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/controls/filters/DueDateFilter/state.ts"],"names":[],"mappings":";AAAA,OAAO,MAAkB,MAAM,QAAQ,CAAC;AAKxC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC;IAAA,MAAa,KAAK;QAGjB;YACC,IAAI,CAAC,KAAK,EAAE,CAAC;QACd,CAAC;QAED,6FAA6F;QAC7F,IAAW,OAAO;;YACjB,IAAI,OAAA,IAAI,CAAC,OAAO,0CAAG,CAAC,OAAM,IAAI,IAAI,OAAA,IAAI,CAAC,OAAO,0CAAG,CAAC,OAAM,IAAI;gBAAE,OAAO,EAAE,CAAC;YACxE,MAAM,KAAK,eAAG,IAAI,CAAC,OAAO,0CAAG,CAAC,oCAAK,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;YAC5E,MAAM,GAAG,eAAG,IAAI,CAAC,OAAO,0CAAG,CAAC,oCAAK,MAAM,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YACxD,OAAO;gBACN;oBACC,CAAC,EAAE,SAAS;oBACZ,CAAC,EAAE,SAAS;oBACZ,CAAC,EAAE,KAAK;oBACR,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC;oBACvD,EAAE,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC;iBACnC;aACjB,CAAC;QACH,CAAC;QAEM,KAAK;YACX,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC7B,CAAC;KACD;IAzBY;QAAX,UAAU;0CAAoC;IAyBhD,YAAC;KAAA;SA1BY,KAAK"}
|
@@ -0,0 +1,22 @@
|
|
1
|
+
import { Badge, DatePicker } from "@voplus/antd";
|
2
|
+
import React from "react";
|
3
|
+
import { State } from "./state";
|
4
|
+
import classnames from "classnames";
|
5
|
+
import { dateMenus } from "@voplus/morpho-ui/es/data/FilterViewContext";
|
6
|
+
import { toJS } from "mobx";
|
7
|
+
import { useFilterOptionsContext } from "@voplus/morpho-ui/es/data";
|
8
|
+
import { useObserver } from "mobx-react-lite";
|
9
|
+
const StartDateFilter = () => {
|
10
|
+
const context = useFilterOptionsContext();
|
11
|
+
const state = context.getFilterState("StartDate", () => new State());
|
12
|
+
return useObserver(() => (React.createElement("div", null,
|
13
|
+
React.createElement("div", { className: "menu-item-title" }, "StartDate"),
|
14
|
+
React.createElement(DatePicker.RangePicker, { value: state.stateDate, suffixIcon: null, className: "filter-date-picker", allowEmpty: [true, true], onChange: dates => (state.stateDate = dates) }),
|
15
|
+
dateMenus.map((item, index) => (React.createElement("div", { key: index, className: classnames("filter-menu-item", {
|
16
|
+
bold: JSON.stringify(toJS(state.stateDate)) === JSON.stringify(item.value)
|
17
|
+
}), onClick: () => (state.stateDate = item.value) },
|
18
|
+
React.createElement("div", { className: "filter-name" }, item.name),
|
19
|
+
item.name === "Today" ? (React.createElement(Badge, { style: item.style, count: item.counts, showZero: true })) : (React.createElement("span", null, item.counts))))))));
|
20
|
+
};
|
21
|
+
export default StartDateFilter;
|
22
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/controls/filters/StartDateFilter/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE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EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC;YAE7C,6BAAK,SAAS,EAAC,aAAa,IAAE,IAAI,CAAC,IAAI,CAAO;YAC7C,IAAI,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,CACxB,oBAAC,KAAK,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,QAAQ,SAAG,CACzD,CAAC,CAAC,CAAC,CACH,kCAAO,IAAI,CAAC,MAAM,CAAQ,CAC1B,CACI,CACN,CAAC,CACG,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { Moment } from "moment";
|
2
|
+
import { FilterOption } from "@voplus/morpho-data";
|
3
|
+
import { IFilterState } from "@voplus/morpho-ui/es/data";
|
4
|
+
import { RangeValue } from "rc-picker/es/interface";
|
5
|
+
export declare class State implements IFilterState {
|
6
|
+
stateDate: RangeValue<Moment>;
|
7
|
+
constructor();
|
8
|
+
/** 视乎State内容,返回正确的FilterOption[]. 在Filter时,Context 会使用此属性replace Context内FilterOption的资料。 */
|
9
|
+
get filters(): FilterOption[];
|
10
|
+
reset(): void;
|
11
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import moment from "moment";
|
3
|
+
import { observable } from "mobx";
|
4
|
+
let State = /** @class */ (() => {
|
5
|
+
class State {
|
6
|
+
constructor() {
|
7
|
+
this.reset();
|
8
|
+
}
|
9
|
+
/** 视乎State内容,返回正确的FilterOption[]. 在Filter时,Context 会使用此属性replace Context内FilterOption的资料。 */
|
10
|
+
get filters() {
|
11
|
+
var _a, _b, _c, _d, _e, _f;
|
12
|
+
if (((_a = this.stateDate) === null || _a === void 0 ? void 0 : _a[0]) === null && ((_b = this.stateDate) === null || _b === void 0 ? void 0 : _b[1]) === null)
|
13
|
+
return [];
|
14
|
+
const start = (_d = (_c = this.stateDate) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : moment({ year: 1753, month: 1, day: 1 });
|
15
|
+
const end = (_f = (_e = this.stateDate) === null || _e === void 0 ? void 0 : _e[1]) !== null && _f !== void 0 ? _f : moment().endOf("year");
|
16
|
+
return [
|
17
|
+
{
|
18
|
+
c: "StartDate",
|
19
|
+
o: "between",
|
20
|
+
l: "And",
|
21
|
+
v1: start.startOf("days").format("YYYY-MM-DD HH:mm:ss"),
|
22
|
+
v2: end.endOf("days").format("YYYY-MM-DD HH:mm:ss")
|
23
|
+
}
|
24
|
+
];
|
25
|
+
}
|
26
|
+
reset() {
|
27
|
+
this.stateDate = [null, null];
|
28
|
+
}
|
29
|
+
}
|
30
|
+
__decorate([
|
31
|
+
observable
|
32
|
+
], State.prototype, "stateDate", void 0);
|
33
|
+
return State;
|
34
|
+
})();
|
35
|
+
export { State };
|
36
|
+
//# sourceMappingURL=state.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/controls/filters/StartDateFilter/state.ts"],"names":[],"mappings":";AAAA,OAAO,MAAkB,MAAM,QAAQ,CAAC;AAKxC,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC;IAAA,MAAa,KAAK;QAGjB;YACC,IAAI,CAAC,KAAK,EAAE,CAAC;QACd,CAAC;QAED,6FAA6F;QAC7F,IAAW,OAAO;;YACjB,IAAI,OAAA,IAAI,CAAC,SAAS,0CAAG,CAAC,OAAM,IAAI,IAAI,OAAA,IAAI,CAAC,SAAS,0CAAG,CAAC,OAAM,IAAI;gBAAE,OAAO,EAAE,CAAC;YAC5E,MAAM,KAAK,eAAG,IAAI,CAAC,SAAS,0CAAG,CAAC,oCAAK,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,CAAC;YAC9E,MAAM,GAAG,eAAG,IAAI,CAAC,SAAS,0CAAG,CAAC,oCAAK,MAAM,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAC1D,OAAO;gBACN;oBACC,CAAC,EAAE,WAAW;oBACd,CAAC,EAAE,SAAS;oBACZ,CAAC,EAAE,KAAK;oBACR,EAAE,EAAE,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC;oBACvD,EAAE,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,qBAAqB,CAAC;iBACnC;aACjB,CAAC;QACH,CAAC;QAEM,KAAK;YACX,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QAC/B,CAAC;KACD;IAzBY;QAAX,UAAU;4CAAsC;IAyBlD,YAAC;KAAA;SA1BY,KAAK"}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { Badge } from "@voplus/antd";
|
2
|
+
import React from "react";
|
3
|
+
import { State } from "./state";
|
4
|
+
import classnames from "classnames";
|
5
|
+
import { useFilterOptionsContext } from "@voplus/morpho-ui/es/data";
|
6
|
+
import { useObserver } from "mobx-react-lite";
|
7
|
+
const TaskStatusFilter = () => {
|
8
|
+
const context = useFilterOptionsContext();
|
9
|
+
const state = context.getFilterState("Status", () => new State());
|
10
|
+
return useObserver(() => (React.createElement("div", null,
|
11
|
+
React.createElement("div", { className: "menu-item-title" }, "Status"),
|
12
|
+
state.menus.map((item, index) => (React.createElement("div", { key: index, className: classnames("filter-menu-item", {
|
13
|
+
bold: state.status.has(item.value)
|
14
|
+
}), onClick: () => state.onChangeStatus(item.value) },
|
15
|
+
React.createElement("div", { className: "filter-name" },
|
16
|
+
React.createElement(Badge, { color: item.color }),
|
17
|
+
item.name),
|
18
|
+
React.createElement("span", null, item.counts)))))));
|
19
|
+
};
|
20
|
+
export default TaskStatusFilter;
|
21
|
+
//# sourceMappingURL=index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AEF,eAAe,gBAAgB,CAAC"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { FilterOption } from "@voplus/morpho-data";
|
2
|
+
import { IFilterState } from "@voplus/morpho-ui/es/data/IFilterState";
|
3
|
+
export declare class State implements IFilterState {
|
4
|
+
/** Status of filter */
|
5
|
+
status: Map<string, boolean>;
|
6
|
+
/** update status */
|
7
|
+
onChangeStatus(value: string): void;
|
8
|
+
get menus(): {
|
9
|
+
name: string;
|
10
|
+
value: string;
|
11
|
+
counts: string;
|
12
|
+
color: string;
|
13
|
+
}[];
|
14
|
+
get filters(): FilterOption[];
|
15
|
+
reset(): void;
|
16
|
+
}
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { action, observable } from "mobx";
|
3
|
+
let State = /** @class */ (() => {
|
4
|
+
class State {
|
5
|
+
constructor() {
|
6
|
+
/** Status of filter */
|
7
|
+
this.status = new Map();
|
8
|
+
}
|
9
|
+
/** update status */
|
10
|
+
onChangeStatus(value) {
|
11
|
+
this.status.has(value) ? this.status.delete(value) : this.status.set(value, true);
|
12
|
+
}
|
13
|
+
get menus() {
|
14
|
+
return [
|
15
|
+
{ name: "Not Assigned", value: "NotAssigned", counts: "n", color: "#e6ad51" },
|
16
|
+
{ name: "Not Started", value: "NotStarted", counts: "n", color: "#ff5c86" },
|
17
|
+
{ name: "Progress", value: "Progress", counts: "n", color: "#4bd8e0" },
|
18
|
+
{ name: "Done", value: "Done", counts: "n", color: "#52c41a" }
|
19
|
+
];
|
20
|
+
}
|
21
|
+
get filters() {
|
22
|
+
if (this.status.size === 0)
|
23
|
+
return [];
|
24
|
+
return [
|
25
|
+
{
|
26
|
+
c: "TaskStatus",
|
27
|
+
o: "contains",
|
28
|
+
v1: JSON.stringify(Array.from(this.status.keys())),
|
29
|
+
l: "And"
|
30
|
+
}
|
31
|
+
];
|
32
|
+
}
|
33
|
+
reset() {
|
34
|
+
this.status.clear();
|
35
|
+
}
|
36
|
+
}
|
37
|
+
__decorate([
|
38
|
+
observable
|
39
|
+
], State.prototype, "status", void 0);
|
40
|
+
__decorate([
|
41
|
+
action
|
42
|
+
], State.prototype, "onChangeStatus", null);
|
43
|
+
return State;
|
44
|
+
})();
|
45
|
+
export { State };
|
46
|
+
//# sourceMappingURL=state.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../src/controls/filters/TaskStatusFilter/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAK1C;IAAA,MAAa,KAAK;QAAlB;YACC,uBAAuB;YACJ,WAAM,GAAyB,IAAI,GAAG,EAAE,CAAC;QA8B7D,CAAC;QA5BA,oBAAoB;QAEb,cAAc,CAAC,KAAa;YAClC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QACnF,CAAC;QAED,IAAW,KAAK;YACf,OAAO;gBACN,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;gBAC7E,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;gBAC3E,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;gBACtE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,SAAS,EAAE;aAC9D,CAAC;QACH,CAAC;QACD,IAAW,OAAO;YACjB,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC;gBAAE,OAAO,EAAE,CAAC;YACtC,OAAO;gBACN;oBACC,CAAC,EAAE,YAAY;oBACf,CAAC,EAAE,UAAU;oBACb,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;oBAClD,CAAC,EAAE,KAAK;iBACQ;aACjB,CAAC;QACH,CAAC;QACM,KAAK;YACX,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,CAAC;KACD;IA9BY;QAAX,UAAU;yCAAiD;IAI5D;QADC,MAAM;+CAGN;IAwBF,YAAC;KAAA;SAhCY,KAAK"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
export { default as TaskStatusFilter } from "./TaskStatusFilter";
|
2
|
+
export { default as AssigneeViewFilter } from "./AssigneeViewFilter";
|
3
|
+
export { default as StartDateFilter } from "./StartDateFilter";
|
4
|
+
export { default as DueDateFilter } from "./DueDateFilter";
|
5
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/controls/filters/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
@@ -1,21 +1,11 @@
|
|
1
|
-
import { ApiEndPoint } from "@voplus/api";
|
2
|
-
import { DocumentStore, DocumentTypeStore, EditDocumentOptions, LoadDocumentListOptions, LoadDocumentOptions } from "@voplus/morpho-document";
|
3
1
|
import { CreateBoardOptions, IBoardColumn } from ".";
|
2
|
+
import { DocumentStore, DocumentTypeStore, EditDocumentOptions, LoadDocumentListOptions, LoadDocumentOptions } from "@voplus/morpho-document";
|
3
|
+
import { ApiEndPoint } from "@voplus/api";
|
4
4
|
/** Board store provides service for board operations */
|
5
5
|
export declare class BoardColumnStore extends DocumentTypeStore<IBoardColumn, LoadDocumentOptions, LoadDocumentListOptions, CreateBoardOptions, EditDocumentOptions, any> {
|
6
|
-
/** Board moved event dispatcher */
|
7
|
-
private readonly _boardColumnMoved;
|
8
6
|
/** Name of the store */
|
9
7
|
readonly name: string;
|
10
|
-
/** Event fires when a new board has been moved. */
|
11
|
-
get BoardMovedEvent(): import("strongly-typed-events").IEvent<string, import("@voplus/morpho-document").IDocument[]>;
|
12
8
|
constructor(endpoint: ApiEndPoint, documents: DocumentStore);
|
13
|
-
/** drag && drop of sort */
|
14
|
-
moveAfter(id: string, afterId: string): Promise<void>;
|
15
|
-
/** Move a list of documents to target
|
16
|
-
* @param ids - list of document ids to be moved
|
17
|
-
*/
|
18
|
-
move(ids: string[], targetId: string): Promise<void>;
|
19
9
|
}
|
20
|
-
/** React hook to retrieve
|
10
|
+
/** React hook to retrieve BoardColumnStore */
|
21
11
|
export declare const useBoardColumnStore: () => BoardColumnStore;
|
@@ -1,37 +1,15 @@
|
|
1
|
-
import { useStore } from "@voplus/morpho-data";
|
2
1
|
import { DocumentTypeStore, useDocumentStore } from "@voplus/morpho-document";
|
3
|
-
import {
|
2
|
+
import { useStore } from "@voplus/morpho-data";
|
4
3
|
const StoreName = "BoardColumnStore";
|
5
4
|
/** Board store provides service for board operations */
|
6
5
|
export class BoardColumnStore extends DocumentTypeStore {
|
7
6
|
constructor(endpoint, documents) {
|
8
7
|
super(endpoint, "/api/boardcolumns", documents);
|
9
|
-
/** Board moved event dispatcher */
|
10
|
-
this._boardColumnMoved = new EventDispatcher();
|
11
8
|
/** Name of the store */
|
12
9
|
this.name = StoreName;
|
13
10
|
}
|
14
|
-
/** Event fires when a new board has been moved. */
|
15
|
-
get BoardMovedEvent() {
|
16
|
-
return this._boardColumnMoved.asEvent();
|
17
|
-
}
|
18
|
-
/** drag && drop of sort */
|
19
|
-
async moveAfter(id, afterId) {
|
20
|
-
const r = await this._documents.moveAfter(id, afterId);
|
21
|
-
}
|
22
|
-
/** Move a list of documents to target
|
23
|
-
* @param ids - list of document ids to be moved
|
24
|
-
*/
|
25
|
-
async move(ids, targetId) {
|
26
|
-
if (!targetId)
|
27
|
-
return;
|
28
|
-
const r = await this._documents.move(ids, targetId);
|
29
|
-
const list = r.filter(({ type }) => type === "Task");
|
30
|
-
this.DispatchDeletedEvent(this, r);
|
31
|
-
this._boardColumnMoved.dispatch(targetId, list);
|
32
|
-
}
|
33
11
|
}
|
34
|
-
/** React hook to retrieve
|
12
|
+
/** React hook to retrieve BoardColumnStore */
|
35
13
|
export const useBoardColumnStore = () => {
|
36
14
|
const documents = useDocumentStore();
|
37
15
|
return useStore(StoreName, context => new BoardColumnStore(context.api.currentEndPoint, documents));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BoardColumnStore.js","sourceRoot":"","sources":["../../../src/data/board/BoardColumnStore.ts"],"names":[],"mappings":"AACA,OAAO,
|
1
|
+
{"version":3,"file":"BoardColumnStore.js","sourceRoot":"","sources":["../../../src/data/board/BoardColumnStore.ts"],"names":[],"mappings":"AACA,OAAO,EAEN,iBAAiB,EAIjB,gBAAgB,EAChB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,SAAS,GAAG,kBAAkB,CAAC;AAErC,wDAAwD;AACxD,MAAM,OAAO,gBAAiB,SAAQ,iBAOrC;IAIA,YAAmB,QAAqB,EAAE,SAAwB;QACjE,KAAK,CAAC,QAAQ,EAAE,mBAAmB,EAAE,SAAS,CAAC,CAAC;QAJjD,wBAAwB;QACR,SAAI,GAAW,SAAS,CAAC;IAIzC,CAAC;CACD;AAED,8CAA8C;AAC9C,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACvC,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,OAAO,QAAQ,CACd,SAAS,EACT,OAAO,CAAC,EAAE,CAAC,IAAI,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,SAAS,CAAC,CACvE,CAAC;AACH,CAAC,CAAC"}
|
@@ -1,21 +1,11 @@
|
|
1
|
-
import { ApiEndPoint } from "@voplus/api";
|
2
|
-
import { DocumentStore, DocumentTypeStore, LoadDocumentListOptions, LoadDocumentOptions } from "@voplus/morpho-document";
|
3
1
|
import { CreateBoardOptions, EditBoardOptions, IBoard } from "./";
|
2
|
+
import { DocumentStore, DocumentTypeStore, LoadDocumentListOptions, LoadDocumentOptions } from "@voplus/morpho-document";
|
3
|
+
import { ApiEndPoint } from "@voplus/api";
|
4
4
|
/** Board store provides service for board operations */
|
5
5
|
export declare class BoardStore extends DocumentTypeStore<IBoard, LoadDocumentOptions, LoadDocumentListOptions, CreateBoardOptions, EditBoardOptions, any> {
|
6
|
-
/** Board moved event dispatcher */
|
7
|
-
private readonly _boardMoved;
|
8
6
|
/** Name of the store */
|
9
7
|
readonly name: string;
|
10
|
-
/** Event fires when a new board has been moved. */
|
11
|
-
get BoardMovedEvent(): import("strongly-typed-events").IEvent<string, IBoard[]>;
|
12
8
|
constructor(endpoint: ApiEndPoint, documents: DocumentStore);
|
13
|
-
/** drag && drop of sort */
|
14
|
-
moveAfter(id: string, afterId: string): Promise<void>;
|
15
|
-
/** Move a list of documents to target
|
16
|
-
* @param ids - list of document ids to be moved
|
17
|
-
*/
|
18
|
-
move(ids: string[], targetId: string): Promise<void>;
|
19
9
|
}
|
20
10
|
/** React hook to retrieve BoardStore */
|
21
11
|
export declare const useBoardStore: () => BoardStore;
|
@@ -1,35 +1,13 @@
|
|
1
|
-
import { EventDispatcher } from "strongly-typed-events";
|
2
|
-
import { useStore } from "@voplus/morpho-data";
|
3
1
|
import { DocumentTypeStore, useDocumentStore } from "@voplus/morpho-document";
|
2
|
+
import { useStore } from "@voplus/morpho-data";
|
4
3
|
const StoreName = "BoardStore";
|
5
4
|
/** Board store provides service for board operations */
|
6
5
|
export class BoardStore extends DocumentTypeStore {
|
7
6
|
constructor(endpoint, documents) {
|
8
7
|
super(endpoint, "/api/boards", documents);
|
9
|
-
/** Board moved event dispatcher */
|
10
|
-
this._boardMoved = new EventDispatcher();
|
11
8
|
/** Name of the store */
|
12
9
|
this.name = StoreName;
|
13
10
|
}
|
14
|
-
/** Event fires when a new board has been moved. */
|
15
|
-
get BoardMovedEvent() {
|
16
|
-
return this._boardMoved.asEvent();
|
17
|
-
}
|
18
|
-
/** drag && drop of sort */
|
19
|
-
async moveAfter(id, afterId) {
|
20
|
-
const r = await this._documents.moveAfter(id, afterId);
|
21
|
-
}
|
22
|
-
/** Move a list of documents to target
|
23
|
-
* @param ids - list of document ids to be moved
|
24
|
-
*/
|
25
|
-
async move(ids, targetId) {
|
26
|
-
if (!targetId)
|
27
|
-
return;
|
28
|
-
const r = await this._documents.move(ids, targetId);
|
29
|
-
const list = r.filter(({ type }) => type === "Task");
|
30
|
-
this.DispatchDeletedEvent(this, r);
|
31
|
-
this._boardMoved.dispatch(targetId, list);
|
32
|
-
}
|
33
11
|
}
|
34
12
|
/** React hook to retrieve BoardStore */
|
35
13
|
export const useBoardStore = () => {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BoardStore.js","sourceRoot":"","sources":["../../../src/data/board/BoardStore.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"BoardStore.js","sourceRoot":"","sources":["../../../src/data/board/BoardStore.ts"],"names":[],"mappings":"AACA,OAAO,EAEN,iBAAiB,EAGjB,gBAAgB,EAChB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,SAAS,GAAG,YAAY,CAAC;AAE/B,wDAAwD;AACxD,MAAM,OAAO,UAAW,SAAQ,iBAO/B;IAIA,YAAmB,QAAqB,EAAE,SAAwB;QACjE,KAAK,CAAC,QAAQ,EAAE,aAAa,EAAE,SAAS,CAAC,CAAC;QAJ3C,wBAAwB;QACR,SAAI,GAAW,SAAS,CAAC;IAIzC,CAAC;CACD;AAED,wCAAwC;AACxC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IACjC,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,OAAO,QAAQ,CACd,SAAS,EACT,OAAO,CAAC,EAAE,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,EAAE,SAAS,CAAC,CACjE,CAAC;AACH,CAAC,CAAC"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
import { FilterOption } from "@voplus/morpho-data/es/types";
|
3
|
+
export declare class BoardListContextState {
|
4
|
+
filters?: FilterOption[];
|
5
|
+
/** Construct a new BoardListContextState
|
6
|
+
* @param options - Optional initial Document options values.
|
7
|
+
*/
|
8
|
+
constructor(options?: {
|
9
|
+
filters?: FilterOption[];
|
10
|
+
});
|
11
|
+
replace(o: FilterOption): void;
|
12
|
+
get options(): {
|
13
|
+
Filters: FilterOption[] | undefined;
|
14
|
+
};
|
15
|
+
}
|
16
|
+
/** React context for ListContextState. */
|
17
|
+
export declare const BoardtListContext: import("react").Context<BoardListContextState>;
|
18
|
+
/** React hook to retrieve the nearest ListContextState. */
|
19
|
+
export declare function useBoardtListContext(): BoardListContextState;
|