@voplus/morpho-workspace 1.1.0-dev014 → 1.1.0-dev016
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/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/package.json +1 -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/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 天)
|
@@ -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;
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import { __decorate } from "tslib";
|
2
|
+
import { action, computed, observable, toJS } from "mobx";
|
3
|
+
import { createContext, useContext } from "react";
|
4
|
+
let BoardListContextState = /** @class */ (() => {
|
5
|
+
class BoardListContextState {
|
6
|
+
/** Construct a new BoardListContextState
|
7
|
+
* @param options - Optional initial Document options values.
|
8
|
+
*/
|
9
|
+
constructor(options) {
|
10
|
+
if (options) {
|
11
|
+
this.filters = options.filters;
|
12
|
+
}
|
13
|
+
}
|
14
|
+
replace(o) {
|
15
|
+
if (!this.filters)
|
16
|
+
this.filters = [];
|
17
|
+
const index = this.filters.findIndex(v => v.c === o.c);
|
18
|
+
if (index == -1) {
|
19
|
+
this.filters.push(o);
|
20
|
+
}
|
21
|
+
else {
|
22
|
+
this.filters[index] = o;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
get options() {
|
26
|
+
return {
|
27
|
+
Filters: toJS(this.filters)
|
28
|
+
};
|
29
|
+
}
|
30
|
+
}
|
31
|
+
__decorate([
|
32
|
+
observable
|
33
|
+
], BoardListContextState.prototype, "filters", void 0);
|
34
|
+
__decorate([
|
35
|
+
action
|
36
|
+
], BoardListContextState.prototype, "replace", null);
|
37
|
+
__decorate([
|
38
|
+
computed
|
39
|
+
], BoardListContextState.prototype, "options", null);
|
40
|
+
return BoardListContextState;
|
41
|
+
})();
|
42
|
+
export { BoardListContextState };
|
43
|
+
/** React context for ListContextState. */
|
44
|
+
export const BoardtListContext = createContext(null);
|
45
|
+
/** React hook to retrieve the nearest ListContextState. */
|
46
|
+
export function useBoardtListContext() {
|
47
|
+
return useContext(BoardtListContext);
|
48
|
+
}
|
49
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/data/board/contexts/BoardListContextState/index.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAIlD;IAAA,MAAa,qBAAqB;QAGjC;;WAEG;QACH,YAAmB,OAAsC;YACxD,IAAI,OAAO,EAAE;gBACZ,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;aAC/B;QACF,CAAC;QAIM,OAAO,CAAC,CAAe;YAC7B,IAAI,CAAC,IAAI,CAAC,OAAO;gBAAE,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;YAErC,MAAM,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACvD,IAAI,KAAK,IAAI,CAAC,CAAC,EAAE;gBAChB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;aACrB;iBAAM;gBACN,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;aACxB;QACF,CAAC;QAID,IAAW,OAAO;YACjB,OAAO;gBACN,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC;aAC3B,CAAC;QACH,CAAC;KACD;IA/BY;QAAX,UAAU;0DAAiC;IAa5C;QAFC,MAAM;wDAWN;IAID;QAFC,QAAQ;wDAMR;IACF,4BAAC;KAAA;SAhCY,qBAAqB;AAkClC,0CAA0C;AAC1C,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAAwB,IAAW,CAAC,CAAC;AAEnF,2DAA2D;AAC3D,MAAM,UAAU,oBAAoB;IACnC,OAAO,UAAU,CAAC,iBAAiB,CAAC,CAAC;AACtC,CAAC"}
|
package/es/data/board/index.d.ts
CHANGED
package/es/data/board/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
export * from "./interfaces";
|
2
2
|
export * from "./BoardStore";
|
3
3
|
export * from "./BoardColumnStore";
|
4
|
-
export * from "./LinkStore";
|
5
4
|
export * from "./hooks";
|
6
5
|
export * from "./types";
|
6
|
+
export * from "./contexts/BoardListContextState";
|
7
7
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data/board/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/data/board/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,kCAAkC,CAAC"}
|
@@ -1,28 +1,28 @@
|
|
1
|
+
import { BoardListContextState, BoardtListContext, useBoardColumnListEffect, useBoardColumnStore } from "../../../../data/board";
|
2
|
+
import { CreateDateFilter, DocumentStatusFilter, FlagFilter } from "@voplus/morpho-document/es/controls/filters";
|
1
3
|
import { DragDropContext, Droppable } from "react-beautiful-dnd";
|
2
|
-
import { FilterOptionsContext, FilterOptionsContextState } from "@voplus/morpho-ui/es/data";
|
3
|
-
import { FilterViewContext, FilterViewContextState } from "@voplus/morpho-ui/es/data/FilterViewContext";
|
4
4
|
import { Input, Spin } from "@voplus/antd";
|
5
|
+
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
|
5
6
|
import { Observer, useObserver } from "mobx-react-lite";
|
6
7
|
import React, { useEffect, useState } from "react";
|
7
8
|
import { faCheck, faTimes } from "@fortawesome/pro-light-svg-icons";
|
8
|
-
import { useBoardColumnListEffect, useBoardColumnStore } from "../../../../data/board";
|
9
9
|
import BoardColumn from "../BoardColumn";
|
10
10
|
import Card from "@voplus/morpho-ui/es/controls/Card";
|
11
11
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
12
|
-
import
|
12
|
+
import ListHeader from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeader";
|
13
13
|
import { Scrollbars } from "react-custom-scrollbars";
|
14
14
|
import SearchHeader from "@voplus/morpho-ui/es/components/layout/ListView/components/SearchHeader";
|
15
|
-
import SortViewDropdown from "@voplus/morpho-ui/es/components/layout/ListView/controls/SortViewDropdown";
|
16
15
|
import { State } from "./state";
|
17
16
|
import styles from "./index.less";
|
18
|
-
import { toJS } from "mobx";
|
19
17
|
import { useDocumentStore } from "@voplus/morpho-document";
|
20
18
|
const Board = (props) => {
|
21
19
|
const boards = useBoardColumnStore();
|
22
20
|
const documentStore = useDocumentStore();
|
23
21
|
const [state] = useState(new State(boards, documentStore));
|
24
|
-
/**
|
25
|
-
const
|
22
|
+
/** 建立 ListView 和useTaskListEffect所需的ListDataState. 会根据parentId重建所以不需reset. */
|
23
|
+
const list = useCreateListDataState({}, []);
|
24
|
+
/**把store 传给子级 DocumentItem*/
|
25
|
+
const [lists] = useState(new BoardListContextState());
|
26
26
|
state.props = props;
|
27
27
|
useEffect(state.subscribeOnBoardCreateCallback, []);
|
28
28
|
useBoardColumnListEffect(list => {
|
@@ -30,20 +30,6 @@ const Board = (props) => {
|
|
30
30
|
}, {
|
31
31
|
Filters: [{ c: "ParentNodeId", o: "=", l: "And", v1: props.parentId }]
|
32
32
|
});
|
33
|
-
/** BoardColumn filters sort */
|
34
|
-
const onSort = (value) => {
|
35
|
-
listoptions.sort = value;
|
36
|
-
};
|
37
|
-
/** BoardColumn filters status */
|
38
|
-
const onFilter = (value) => {
|
39
|
-
const { status } = value;
|
40
|
-
listoptions.replace({
|
41
|
-
c: "LinkStatus",
|
42
|
-
o: "contains",
|
43
|
-
l: "And",
|
44
|
-
v1: toJS(JSON.stringify(status))
|
45
|
-
});
|
46
|
-
};
|
47
33
|
/** BoardColumn filters name */
|
48
34
|
const onSearch = (value) => {
|
49
35
|
if (state.timeout) {
|
@@ -51,7 +37,12 @@ const Board = (props) => {
|
|
51
37
|
}
|
52
38
|
state.timeout = setTimeout(() => {
|
53
39
|
state.timeout = null;
|
54
|
-
|
40
|
+
lists.replace({
|
41
|
+
c: "Name",
|
42
|
+
o: "contains",
|
43
|
+
l: "And",
|
44
|
+
v1: value
|
45
|
+
});
|
55
46
|
}, 1500);
|
56
47
|
};
|
57
48
|
const board = useObserver(() => (React.createElement(Droppable, { droppableId: props.parentId, type: "COLUMN", direction: "horizontal" }, provided => (React.createElement(Scrollbars, { autoHide: true },
|
@@ -64,26 +55,28 @@ const Board = (props) => {
|
|
64
55
|
},
|
65
56
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
66
57
|
ref: provided.innerRef }, provided.droppableProps), (_a = state.boardcolumns) === null || _a === void 0 ? void 0 :
|
67
|
-
_a.map((item, index) => (React.createElement(BoardColumn, { key: item.id, index: index, id: item.id, reload: state.reload, colorStyle: state.colorList[index % 6], destination: state.destination, source: state.source }))),
|
58
|
+
_a.map((item, index) => (React.createElement(BoardColumn, { key: item.id, index: index, id: item.id, reload: state.reload, colorStyle: state.colorList[index % 6], destination: state.destination, source: state.source, onIds: (v) => state.onIds(v) }))),
|
68
59
|
provided.placeholder));
|
69
60
|
}))))));
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
React.createElement(
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
61
|
+
return useObserver(() => (React.createElement(BoardtListContext.Provider, { value: lists },
|
62
|
+
React.createElement(ListDataContext.Provider, { value: list },
|
63
|
+
React.createElement("div", { className: styles["board-context"] },
|
64
|
+
React.createElement(ListHeader, { header: React.createElement(SearchHeader, { onChange: onSearch }), filterViewProps: {
|
65
|
+
columns: [
|
66
|
+
React.createElement(CreateDateFilter, { key: "createDateFilter" }),
|
67
|
+
React.createElement(FlagFilter, { key: "flagFilter" }),
|
68
|
+
React.createElement(DocumentStatusFilter, { key: "documentStatusFilter" })
|
69
|
+
]
|
70
|
+
}, addAble: false }),
|
71
|
+
React.createElement("div", { className: "board-list" },
|
72
|
+
React.createElement(DragDropContext, { onDragEnd: (result) => state.onDragEnd(result) }, board),
|
73
|
+
React.createElement("div", { className: "add-board-controls" }, state.addBoardColumnAble && (React.createElement(Spin, { spinning: state.addLoading },
|
74
|
+
React.createElement(Card, { className: "add-board-able", padding: "0 15px", style: { borderTop: ` solid 2px #3AC43A` } },
|
75
|
+
React.createElement(Input, { placeholder: "STATUS NAME", value: state.name, onChange: e => (state.name = e.target.value) }),
|
76
|
+
React.createElement(FAIcon, { icon: faCheck, onClick: () => state.onSave() }),
|
77
|
+
React.createElement(FAIcon, { icon: faTimes, onClick: () => (state.addBoardColumnAble = false) }))))),
|
78
|
+
React.createElement("div", { className: "add-board" },
|
79
|
+
React.createElement("div", { onClick: () => (state.addBoardColumnAble = true) }, "+ ADD"))))))));
|
87
80
|
};
|
88
81
|
export default Board;
|
89
82
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/board/components/Board/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/board/components/Board/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,EACxB,mBAAmB,EACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACN,gBAAgB,EAChB,oBAAoB,EACpB,UAAU,EACV,MAAM,6CAA6C,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,QA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AAgB,EAC1B,OAAO,EAAC,QAAQ,EAChB,KAAK,EAAE,EAAE,SAAS,EAAE,oBAAoB,EAAE;4BAE1C,oBAAC,KAAK,IACL,WAAW,EAAC,aAAa,EACzB,KAAK,EAAE,KAAK,CAAC,IAAI,EACjB,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,GAC3C;4BACF,oBAAC,MAAM,IAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,MAAM,EAAE,GAAI;4BACxD,oBAAC,MAAM,IAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,GAAG,KAAK,CAAC,GAAI,CACtE,CACD,CACP,CACI;oBACN,6BAAK,SAAS,EAAC,WAAW;wBACzB,6BAAK,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,GAAG,IAAI,CAAC,YAAa,CAC7D,CACD,CACD,CACoB,CACC,CAC7B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
@@ -1,67 +1,99 @@
|
|
1
|
-
.board-
|
1
|
+
.board-context {
|
2
2
|
height: 100%;
|
3
3
|
display: flex;
|
4
|
-
|
5
|
-
margin: 10px;
|
6
|
-
padding: 0 10px;
|
4
|
+
flex-direction: column;
|
7
5
|
:global {
|
8
|
-
.
|
9
|
-
flex: 1;
|
6
|
+
.list-view-header {
|
10
7
|
display: flex;
|
11
|
-
|
12
|
-
|
8
|
+
justify-content: space-between;
|
9
|
+
align-items: center;
|
10
|
+
padding: 10px 20px;
|
11
|
+
border-bottom: 1px solid #f2f2f2;
|
12
|
+
background: #ffffff;
|
13
|
+
.view-title {
|
14
|
+
color: #000;
|
15
|
+
font-size: 16px;
|
16
|
+
font-weight: 600;
|
13
17
|
}
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
margin: 8px 0;
|
22
|
-
> div {
|
18
|
+
.plus-icon {
|
19
|
+
display: inline-block;
|
20
|
+
padding: 4px;
|
21
|
+
margin-left: 10px;
|
22
|
+
font-size: 13px;
|
23
|
+
line-height: 1px;
|
24
|
+
background: #1abc9c;
|
23
25
|
cursor: pointer;
|
24
26
|
}
|
25
|
-
|
26
|
-
|
27
|
-
margin: 8px 0 8px 8px;
|
28
|
-
> div > .ant-spin {
|
29
|
-
height: 50px;
|
27
|
+
.margin-left-10 {
|
28
|
+
margin-left: 10px;
|
30
29
|
}
|
31
30
|
}
|
32
|
-
.
|
31
|
+
.board-list {
|
32
|
+
height: 100%;
|
33
33
|
display: flex;
|
34
|
-
justify-content:
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
.ant-input {
|
44
|
-
padding: 0;
|
45
|
-
border: none;
|
34
|
+
justify-content: space-between;
|
35
|
+
padding: 10px 12px;
|
36
|
+
|
37
|
+
.board-sortDnD {
|
38
|
+
flex: 1;
|
39
|
+
display: flex;
|
40
|
+
> div {
|
41
|
+
flex: 1;
|
42
|
+
}
|
46
43
|
}
|
47
|
-
.
|
48
|
-
|
44
|
+
.add-board {
|
45
|
+
width: 100px;
|
46
|
+
min-width: 100px;
|
47
|
+
font-size: 16px;
|
48
|
+
text-align: center;
|
49
|
+
line-height: 50px;
|
50
|
+
margin: 8px 0;
|
51
|
+
> div {
|
52
|
+
cursor: pointer;
|
53
|
+
}
|
49
54
|
}
|
50
|
-
.
|
51
|
-
|
52
|
-
|
55
|
+
.add-board-controls {
|
56
|
+
.ant-spin-nested-loading {
|
57
|
+
margin: 8px 0 8px 8px;
|
58
|
+
> div > .ant-spin {
|
59
|
+
height: 50px;
|
60
|
+
}
|
61
|
+
}
|
62
|
+
}
|
63
|
+
.add-board-able {
|
64
|
+
display: flex;
|
65
|
+
justify-content: center;
|
66
|
+
align-items: center;
|
67
|
+
height: 50px;
|
68
|
+
color: #000000;
|
69
|
+
line-height: 50px;
|
70
|
+
padding: 0 10px;
|
71
|
+
background: #ffffff;
|
72
|
+
margin-bottom: 15px;
|
73
|
+
min-width: 150px;
|
74
|
+
.ant-input {
|
75
|
+
padding: 0;
|
76
|
+
border: none;
|
77
|
+
}
|
78
|
+
.ant-input:focus {
|
79
|
+
box-shadow: none;
|
80
|
+
}
|
81
|
+
.svg-inline--fa {
|
82
|
+
cursor: pointer;
|
83
|
+
margin-left: 8px;
|
84
|
+
}
|
85
|
+
}
|
86
|
+
.ant-calendar {
|
87
|
+
max-width: 250px;
|
53
88
|
}
|
54
|
-
}
|
55
|
-
.ant-calendar {
|
56
|
-
max-width: 250px;
|
57
89
|
}
|
58
90
|
}
|
59
91
|
}
|
60
|
-
.board_header {
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
}
|
92
|
+
// .board_header {
|
93
|
+
// display: flex;
|
94
|
+
// justify-content: space-between;
|
95
|
+
// align-items: center;
|
96
|
+
// padding: 10px 20px;
|
97
|
+
// border-bottom: 1px solid #f2f2f2;
|
98
|
+
// background-color: #ffffff;
|
99
|
+
// }
|
@@ -1,14 +1,21 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
1
|
+
import { BoardColumnStore, IBoardColumn } from "../../../../data/board";
|
2
|
+
import { DocumentStore, IDocument } from "@voplus/morpho-document";
|
3
|
+
import { FilterOption } from "@voplus/morpho-data";
|
3
4
|
export declare type BoardListProps = {
|
4
5
|
parentId: string;
|
5
6
|
};
|
7
|
+
export interface IBoardIds {
|
8
|
+
id: string;
|
9
|
+
ids: string[];
|
10
|
+
}
|
6
11
|
export declare class State {
|
7
12
|
private _store;
|
8
13
|
private _docStore;
|
9
14
|
props: BoardListProps;
|
10
15
|
constructor(_store: BoardColumnStore, _docStore: DocumentStore);
|
11
16
|
boardcolumns: IBoardColumn[];
|
17
|
+
/** board ids */
|
18
|
+
ids: IBoardIds[];
|
12
19
|
/** search filter 1.5秒 */
|
13
20
|
timeout: any;
|
14
21
|
/** add BoardColumn name */
|
@@ -24,11 +31,21 @@ export declare class State {
|
|
24
31
|
destination: any;
|
25
32
|
/** BoardColumn head border-top color */
|
26
33
|
colorList: string[];
|
27
|
-
|
28
|
-
|
34
|
+
/** documentlist filter name */
|
35
|
+
filterName: string;
|
36
|
+
filterList?: FilterOption[];
|
37
|
+
onBoardColumnCreated: (s: DocumentStore, t: IDocument) => void;
|
38
|
+
onBoardColumnDeleted: (s: DocumentStore, t: IDocument) => void;
|
29
39
|
subscribeOnBoardCreateCallback: () => () => void;
|
30
40
|
/** add BoardColumn save */
|
31
41
|
onSave: () => Promise<any>;
|
32
42
|
/** 拖拽方法 */
|
33
|
-
onDragEnd(result: any): void
|
43
|
+
onDragEnd(result: any): Promise<void>;
|
44
|
+
/** 存储ids 放便拖拽后查找 afterId */
|
45
|
+
onIds(v: any): void;
|
46
|
+
/**
|
47
|
+
* document filters
|
48
|
+
* @return document filters
|
49
|
+
*/
|
50
|
+
get filters(): any[];
|
34
51
|
}
|