@voplus/morpho-workspace 1.0.0-dev58 → 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.
- package/es/components/ActivityLog/index.d.ts +0 -1
- package/es/components/ActivityLog/index.js +55 -81
- package/es/components/ActivityLog/index.js.map +1 -1
- package/es/components/ActivityLog/index.less +38 -25
- package/es/components/ActivityLog/state.d.ts +13 -0
- package/es/components/ActivityLog/state.js +48 -0
- package/es/components/ActivityLog/state.js.map +1 -0
- package/es/components/AvatarList/AvatarMenu.d.ts +4 -0
- package/es/components/AvatarList/AvatarMenu.js +79 -0
- package/es/components/AvatarList/AvatarMenu.js.map +1 -0
- package/es/components/AvatarList/state.d.ts +10 -0
- package/es/components/AvatarList/state.js +4 -0
- package/es/components/AvatarList/state.js.map +1 -1
- package/es/components/{Reference → Links}/Item.d.ts +1 -0
- package/es/components/{Reference → Links}/Item.js +2 -1
- package/es/components/Links/Item.js.map +1 -0
- package/es/components/{Reference → Links}/index.d.ts +0 -1
- package/es/components/{Reference → Links}/index.js +37 -25
- package/es/components/Links/index.js.map +1 -0
- package/es/components/{Reference → Links}/index.less +8 -5
- package/es/components/{Reference → Links}/state.d.ts +4 -0
- package/es/components/{Reference → Links}/state.js +16 -0
- package/es/components/Links/state.js.map +1 -0
- package/es/components/TagView/index.d.ts +15 -0
- package/es/components/TagView/index.js +87 -0
- package/es/components/TagView/index.js.map +1 -0
- package/es/components/TagView/index.less +37 -0
- package/es/components/TagView/state.d.ts +14 -0
- package/es/components/TagView/state.js +48 -0
- package/es/components/TagView/state.js.map +1 -0
- package/es/data/board/LinkStore.d.ts +11 -0
- package/es/data/board/LinkStore.js +40 -0
- package/es/data/board/LinkStore.js.map +1 -0
- package/es/data/board/index.d.ts +1 -0
- package/es/data/board/index.js +1 -0
- package/es/data/board/index.js.map +1 -1
- package/es/data/task/interfaces.d.ts +2 -1
- package/es/modules/BoardView/components/Board/index.d.ts +5 -0
- package/es/modules/BoardView/components/Board/index.js +144 -0
- package/es/modules/BoardView/components/Board/index.js.map +1 -0
- package/es/modules/BoardView/components/{BoardList → Board}/index.less +10 -0
- package/es/modules/BoardView/components/Board/state.d.ts +4 -0
- package/es/modules/BoardView/components/Board/state.js +11 -0
- package/es/modules/BoardView/components/Board/state.js.map +1 -0
- package/es/modules/BoardView/components/BoardColumn/index.d.ts +3 -1
- package/es/modules/BoardView/components/BoardColumn/index.js +46 -44
- package/es/modules/BoardView/components/BoardColumn/index.js.map +1 -1
- package/es/modules/BoardView/components/BoardColumn/index.less +163 -7
- package/es/modules/BoardView/components/DocumentCard/index.js +8 -11
- package/es/modules/BoardView/components/DocumentCard/index.js.map +1 -1
- package/es/modules/BoardView/components/LinkList/index.d.ts +2 -5
- package/es/modules/BoardView/components/LinkList/index.js +24 -34
- package/es/modules/BoardView/components/LinkList/index.js.map +1 -1
- package/es/modules/BoardView/components/TaskCard/index.d.ts +0 -1
- package/es/modules/BoardView/components/TaskCard/index.js +12 -13
- package/es/modules/BoardView/components/TaskCard/index.js.map +1 -1
- package/es/modules/BoardView/components/links/index.d.ts +12 -0
- package/es/modules/BoardView/components/links/index.js +24 -0
- package/es/modules/BoardView/components/links/index.js.map +1 -0
- package/es/modules/BoardView/pages/BoardViewList/index.d.ts +1 -3
- package/es/modules/BoardView/pages/BoardViewList/index.js +13 -14
- package/es/modules/BoardView/pages/BoardViewList/index.js.map +1 -1
- package/es/modules/BoardView/pages/BoardViewList/state.d.ts +5 -0
- package/es/modules/BoardView/pages/BoardViewList/state.js +14 -0
- package/es/modules/BoardView/pages/BoardViewList/state.js.map +1 -0
- package/es/modules/BoardView/pages/BoardViewRoutes.d.ts +16 -2
- package/es/modules/BoardView/pages/BoardViewRoutes.js +33 -4
- package/es/modules/BoardView/pages/BoardViewRoutes.js.map +1 -1
- package/es/modules/document/pages/DocumentTabView/index.js +1 -1
- package/es/modules/document/pages/DocumentTabView/index.js.map +1 -1
- package/es/modules/meeting/components/MeetingDescription/index.js +6 -8
- package/es/modules/meeting/components/MeetingDescription/index.js.map +1 -1
- package/es/modules/meeting/components/MeetingDetail/index.js +18 -13
- package/es/modules/meeting/components/MeetingDetail/index.js.map +1 -1
- package/es/modules/meeting/components/MeetingDetail/index.less +1 -0
- package/es/modules/meeting/pages/MeetingPrintView/index.js +5 -7
- package/es/modules/meeting/pages/MeetingPrintView/index.js.map +1 -1
- package/es/modules/meeting/pages/MeetingPrintView/index.less +53 -0
- package/es/modules/meeting/pages/MeetingTabView/index.js +14 -17
- package/es/modules/meeting/pages/MeetingTabView/index.js.map +1 -1
- package/es/modules/tasks/components/TaskDescription/index.js +6 -8
- package/es/modules/tasks/components/TaskDescription/index.js.map +1 -1
- package/es/modules/tasks/components/TaskDescription/index.less +1 -0
- package/es/modules/tasks/components/TaskDetail/index.js +4 -3
- package/es/modules/tasks/components/TaskDetail/index.js.map +1 -1
- package/es/modules/tasks/components/TaskHeader/index.js +6 -3
- package/es/modules/tasks/components/TaskHeader/index.js.map +1 -1
- package/es/modules/tasks/components/TaskItem/TaskItem.d.ts +1 -0
- package/es/modules/tasks/components/TaskItem/TaskItem.js +4 -4
- package/es/modules/tasks/components/TaskItem/TaskItem.js.map +1 -1
- package/es/modules/tasks/pages/TaskTabView/index.js +11 -16
- package/es/modules/tasks/pages/TaskTabView/index.js.map +1 -1
- package/package.json +16 -15
- package/es/components/Reference/Item.js.map +0 -1
- package/es/components/Reference/index.js.map +0 -1
- package/es/components/Reference/state.js.map +0 -1
- package/es/modules/BoardView/components/BoardList/index.d.ts +0 -5
- package/es/modules/BoardView/components/BoardList/index.js +0 -84
- package/es/modules/BoardView/components/BoardList/index.js.map +0 -1
- package/es/modules/BoardView/components/BoardList/state.d.ts +0 -14
- package/es/modules/BoardView/components/BoardList/state.js +0 -59
- package/es/modules/BoardView/components/BoardList/state.js.map +0 -1
- package/es/modules/BoardView/components/ReactBeautifulDnd/authorItem.d.ts +0 -14
- package/es/modules/BoardView/components/ReactBeautifulDnd/authorItem.js +0 -45
- package/es/modules/BoardView/components/ReactBeautifulDnd/authorItem.js.map +0 -1
- package/es/modules/BoardView/components/ReactBeautifulDnd/authorList.d.ts +0 -21
- package/es/modules/BoardView/components/ReactBeautifulDnd/authorList.js +0 -34
- package/es/modules/BoardView/components/ReactBeautifulDnd/authorList.js.map +0 -1
- package/es/modules/BoardView/components/ReactBeautifulDnd/board.d.ts +0 -9
- package/es/modules/BoardView/components/ReactBeautifulDnd/board.js +0 -129
- package/es/modules/BoardView/components/ReactBeautifulDnd/board.js.map +0 -1
- package/es/modules/BoardView/components/ReactBeautifulDnd/column.d.ts +0 -11
- package/es/modules/BoardView/components/ReactBeautifulDnd/column.js +0 -29
- package/es/modules/BoardView/components/ReactBeautifulDnd/column.js.map +0 -1
- package/es/modules/BoardView/components/ReactBeautifulDnd/data.d.ts +0 -3
- package/es/modules/BoardView/components/ReactBeautifulDnd/data.js +0 -109
- package/es/modules/BoardView/components/ReactBeautifulDnd/data.js.map +0 -1
- package/es/modules/BoardView/components/ReactBeautifulDnd/index.less +0 -162
- package/es/modules/BoardView/components/ReactBeautifulDnd/state.d.ts +0 -13
- package/es/modules/BoardView/components/ReactBeautifulDnd/state.js +0 -36
- package/es/modules/BoardView/components/ReactBeautifulDnd/state.js.map +0 -1
@@ -1,84 +0,0 @@
|
|
1
|
-
import { faCheck, faTimes } from "@fortawesome/pro-light-svg-icons";
|
2
|
-
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
3
|
-
import { Input, message } 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 SearchHeader from "@voplus/morpho-ui/es/components/layout/ListView/components/SearchHeader";
|
8
|
-
import SortViewDropdown from "@voplus/morpho-ui/es/components/layout/ListView/controls/SortViewDropdown";
|
9
|
-
import FilterListDropdown from "@voplus/morpho-ui/es/components/layout/ListView/controls/FilterListDropdown";
|
10
|
-
import { useBoardColumnListEffect, useBoardColumnStore } from "../../../../data/board";
|
11
|
-
import { toJS } from "mobx";
|
12
|
-
import { ListOptionsContextState, ListOptionsContext } from "@voplus/morpho-ui";
|
13
|
-
import BoardColumn from "../BoardColumn";
|
14
|
-
import styles from "./index.less";
|
15
|
-
import { State } from "./state";
|
16
|
-
const BoardList = (props) => {
|
17
|
-
const colorList = ["#765FEE", "#fe4066", "#FFC832", "#FF8F5E", "#16ecec", "#FFC832"];
|
18
|
-
const boards = useBoardColumnStore();
|
19
|
-
const [state] = useState(new State());
|
20
|
-
const [listoptions] = useState(new ListOptionsContextState());
|
21
|
-
useBoardColumnListEffect(list => {
|
22
|
-
state.boardcolumns = list;
|
23
|
-
state.loading = false;
|
24
|
-
});
|
25
|
-
const onSort = async (value) => {
|
26
|
-
listoptions.sort = value;
|
27
|
-
};
|
28
|
-
const onFilter = async (value) => {
|
29
|
-
const { status, assignee, created, labels, dueDate } = value;
|
30
|
-
listoptions.filters = [
|
31
|
-
{ c: "LinkStatus", o: "contains", l: "And", v1: toJS(JSON.stringify(status)) }
|
32
|
-
];
|
33
|
-
};
|
34
|
-
const onSearch = (value) => {
|
35
|
-
listoptions.filters = [{ c: "Name", o: "contains", l: "And", v1: toJS(JSON.stringify(value)) }];
|
36
|
-
};
|
37
|
-
const moveAfter = async (id, afterId, list) => {
|
38
|
-
console.log("moveAfter", id, afterId, list);
|
39
|
-
await boards.moveAfter(id, afterId);
|
40
|
-
state.boardcolumns = list;
|
41
|
-
};
|
42
|
-
const onSave = async () => {
|
43
|
-
if (!state.name)
|
44
|
-
return message.warning("Title is required");
|
45
|
-
await boards.create({ Name: state.name, ParentId: props.parentId });
|
46
|
-
};
|
47
|
-
const onBoardColumnCreated = (s, t) => {
|
48
|
-
state.boardcolumns = !t.parentId ? [...state.boardcolumns, t] : state.boardcolumns;
|
49
|
-
state.reload = true;
|
50
|
-
};
|
51
|
-
const onBoardColumnDeleted = (s, t) => {
|
52
|
-
state.boardcolumns =
|
53
|
-
t instanceof Array
|
54
|
-
? state.boardcolumns.filter(board => !t.some(({ id }) => board.id === id))
|
55
|
-
: state.boardcolumns.filter(board => board.id !== t.id);
|
56
|
-
state.reload = true;
|
57
|
-
};
|
58
|
-
useEffect(() => {
|
59
|
-
boards.ItemCreatedEvent.subscribe(onBoardColumnCreated);
|
60
|
-
boards.ItemDeletedEvent.subscribe(onBoardColumnDeleted);
|
61
|
-
return () => {
|
62
|
-
boards.ItemCreatedEvent.unsubscribe(onBoardColumnCreated);
|
63
|
-
boards.ItemDeletedEvent.unsubscribe(onBoardColumnDeleted);
|
64
|
-
};
|
65
|
-
}, []);
|
66
|
-
return useObserver(() => (React.createElement(ListOptionsContext.Provider, { value: listoptions },
|
67
|
-
React.createElement("div", { className: styles["board_header"] },
|
68
|
-
React.createElement(SearchHeader, { onChange: onSearch }),
|
69
|
-
React.createElement("div", null,
|
70
|
-
React.createElement(SortViewDropdown, { onSort: onSort }),
|
71
|
-
React.createElement(FilterListDropdown, { className: "margin-left-10", onFilter: onFilter }))),
|
72
|
-
React.createElement("div", { className: styles["board-list"] },
|
73
|
-
state.boardcolumns.map((item, index) => {
|
74
|
-
return (React.createElement(BoardColumn, { key: item.id, id: item.id, reload: state.reload, colorStyle: colorList[index % 6] }));
|
75
|
-
}),
|
76
|
-
state.AddBoardColumnAble && (React.createElement(Card, { className: "add-board-able", padding: "0 15px", style: { borderTop: ` solid 2px #3AC43A` } },
|
77
|
-
React.createElement(Input, { placeholder: "STATUS NAME", value: state.name, onChange: e => (state.name = e.target.value) }),
|
78
|
-
React.createElement(FAIcon, { icon: faCheck, onClick: onSave }),
|
79
|
-
React.createElement(FAIcon, { icon: faTimes, onClick: () => (state.AddBoardColumnAble = false) }))),
|
80
|
-
React.createElement("div", { className: "add-board" },
|
81
|
-
React.createElement("div", { onClick: () => (state.AddBoardColumnAble = true) }, "+ ADD"))))));
|
82
|
-
};
|
83
|
-
export default BoardList;
|
84
|
-
//# sourceMappingURL=index.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/BoardView/components/BoardList/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,EAAQ,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,EAAE,MAAM,OAAO,CAAC;AACnD,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;AAE5B,OAAO,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAGhF,OAAO,WAAW,MAAM,gBAAgB,CAAC;AACzC,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,MAAM,SAAS,GAAG,CAAC,KAA4B,EAAE,EAAE;IAClD,MAAM,SAAS,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;IACrF,MAAM,MAAM,GAAG,mBAAmB,EAAE,CAAC;IACrC,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IAEtC,MAAM,CAAC,WAAW,CAAC,GAAG,QAAQ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,MAAM,CAAC,KAAK,CAAC,GAC3C;gBACF,oBAAC,MAAM,IAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAI;gBAC1C,oBAAC,MAAM,IAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,GAAG,KAAK,CAAC,GAAI,CACtE,CACP;YACD,6BAAK,SAAS,EAAC,WAAW;gBACzB,6BAAK,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,kBAAkB,GAAG,IAAI,CAAC,YAAa,CAC7D,CACD,CACuB,CAC9B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
import { IBoardColumn } from "../../../../data/board";
|
2
|
-
import { SortParameters } from "@voplus/morpho-data/es/types";
|
3
|
-
export declare class State {
|
4
|
-
boardcolumns: IBoardColumn[];
|
5
|
-
initial: any[];
|
6
|
-
id: string;
|
7
|
-
name: string;
|
8
|
-
reload: boolean;
|
9
|
-
loading: boolean;
|
10
|
-
filterName: string;
|
11
|
-
sort: SortParameters;
|
12
|
-
filters: any[];
|
13
|
-
AddBoardColumnAble: boolean;
|
14
|
-
}
|
@@ -1,59 +0,0 @@
|
|
1
|
-
import { __decorate } from "tslib";
|
2
|
-
import { observable } from "mobx";
|
3
|
-
export class State {
|
4
|
-
constructor() {
|
5
|
-
this.boardcolumns = [];
|
6
|
-
this.initial = [];
|
7
|
-
this.id = "";
|
8
|
-
this.name = "";
|
9
|
-
this.reload = false;
|
10
|
-
this.loading = true;
|
11
|
-
this.filterName = "";
|
12
|
-
this.sort = {};
|
13
|
-
this.filters = ["Done", "Progress", "NotStarted", "NotAssigned"];
|
14
|
-
this.AddBoardColumnAble = false;
|
15
|
-
}
|
16
|
-
}
|
17
|
-
__decorate([
|
18
|
-
observable
|
19
|
-
], State.prototype, "boardcolumns", void 0);
|
20
|
-
__decorate([
|
21
|
-
observable
|
22
|
-
], State.prototype, "initial", void 0);
|
23
|
-
__decorate([
|
24
|
-
observable
|
25
|
-
], State.prototype, "id", void 0);
|
26
|
-
__decorate([
|
27
|
-
observable
|
28
|
-
], State.prototype, "name", void 0);
|
29
|
-
__decorate([
|
30
|
-
observable
|
31
|
-
], State.prototype, "reload", void 0);
|
32
|
-
__decorate([
|
33
|
-
observable
|
34
|
-
], State.prototype, "loading", void 0);
|
35
|
-
__decorate([
|
36
|
-
observable
|
37
|
-
], State.prototype, "filterName", void 0);
|
38
|
-
__decorate([
|
39
|
-
observable
|
40
|
-
], State.prototype, "sort", void 0);
|
41
|
-
__decorate([
|
42
|
-
observable
|
43
|
-
], State.prototype, "filters", void 0);
|
44
|
-
__decorate([
|
45
|
-
observable
|
46
|
-
], State.prototype, "AddBoardColumnAble", void 0);
|
47
|
-
// export const options = {
|
48
|
-
// count: 1,
|
49
|
-
// filterName: "",
|
50
|
-
// status: ["Done", "Progress", "NotStarted", "NotAssigned"],
|
51
|
-
// sort: {},
|
52
|
-
// get getFilterName() {
|
53
|
-
// return options.filterName;
|
54
|
-
// },
|
55
|
-
// setFilterName(name: string) {
|
56
|
-
// options.filterName = name;
|
57
|
-
// }
|
58
|
-
// };
|
59
|
-
//# sourceMappingURL=state.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/BoardView/components/BoardList/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAIlC,MAAM,OAAO,KAAK;IAAlB;QACoB,iBAAY,GAAmB,EAAE,CAAC;QAClC,YAAO,GAAU,EAAE,CAAC;QACpB,OAAE,GAAW,EAAE,CAAC;QAChB,SAAI,GAAW,EAAE,CAAC;QAClB,WAAM,GAAY,KAAK,CAAC;QACxB,YAAO,GAAY,IAAI,CAAC;QACxB,eAAU,GAAW,EAAE,CAAC;QACxB,SAAI,GAAmB,EAAE,CAAC;QAC1B,YAAO,GAAU,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;QACnE,uBAAkB,GAAY,KAAK,CAAC;IACxD,CAAC;CAAA;AAVY;IAAX,UAAU;2CAA0C;AACzC;IAAX,UAAU;sCAA4B;AAC3B;IAAX,UAAU;iCAAwB;AACvB;IAAX,UAAU;mCAA0B;AACzB;IAAX,UAAU;qCAAgC;AAC/B;IAAX,UAAU;sCAAgC;AAC/B;IAAX,UAAU;yCAAgC;AAC/B;IAAX,UAAU;mCAAkC;AACjC;IAAX,UAAU;sCAA2E;AAC1E;IAAX,UAAU;iDAA4C;AAGxD,2BAA2B;AAC3B,aAAa;AACb,mBAAmB;AACnB,8DAA8D;AAC9D,aAAa;AACb,yBAAyB;AACzB,+BAA+B;AAC/B,MAAM;AACN,iCAAiC;AACjC,+BAA+B;AAC/B,KAAK;AACL,KAAK"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
declare const AuthorItem: (props: {
|
3
|
-
id: string;
|
4
|
-
type: string;
|
5
|
-
quote: any;
|
6
|
-
isDragging?: any;
|
7
|
-
isGroupedOver?: any;
|
8
|
-
provided: any;
|
9
|
-
snapshot?: any;
|
10
|
-
style?: any;
|
11
|
-
isClone?: any;
|
12
|
-
index?: any;
|
13
|
-
}) => JSX.Element;
|
14
|
-
export default AuthorItem;
|
@@ -1,45 +0,0 @@
|
|
1
|
-
// @flow
|
2
|
-
import React, { useState } from "react";
|
3
|
-
import { useObserver } from "mobx-react-lite";
|
4
|
-
import { useTask } from "../../../../data/task";
|
5
|
-
import { AuthorItemState } from "./state";
|
6
|
-
// import { colors } from '@atlaskit/theme';
|
7
|
-
// import { grid } from '../constants';
|
8
|
-
// import type { DraggableProvided, DraggableStateSnapshot } from '../../../src';
|
9
|
-
// import type { Author } from '../types';
|
10
|
-
// type Props = {|
|
11
|
-
// author: Author,
|
12
|
-
// provided: DraggableProvided,
|
13
|
-
// snapshot: DraggableStateSnapshot,
|
14
|
-
// |};
|
15
|
-
const AuthorItem = (props) => {
|
16
|
-
const { quote, isDragging, isGroupedOver, provided, style, isClone, index } = {
|
17
|
-
...props
|
18
|
-
};
|
19
|
-
const [state] = useState(new AuthorItemState());
|
20
|
-
state.quote = useTask(props.id);
|
21
|
-
const getStyle = (provided, style) => {
|
22
|
-
if (!style) {
|
23
|
-
return provided.draggableProps.style;
|
24
|
-
}
|
25
|
-
return {
|
26
|
-
...provided.draggableProps.style,
|
27
|
-
...style
|
28
|
-
};
|
29
|
-
};
|
30
|
-
return useObserver(() => (React.createElement("div", Object.assign({ className: "container",
|
31
|
-
// href={quote.author.url}
|
32
|
-
isdragging: isDragging.toString(), isgroupedover: isGroupedOver.toString(), isclone: isClone,
|
33
|
-
// colors={quote.author.colors}
|
34
|
-
ref: provided.innerRef }, provided.draggableProps, provided.dragHandleProps, { style: getStyle(provided, style), "data-is-dragging": isDragging, "data-testid": state.quote.id, "data-index": index }),
|
35
|
-
isClone ? React.createElement("div", { className: "cloneBadge" }, "Clone") : null,
|
36
|
-
React.createElement("div", { className: "content" },
|
37
|
-
React.createElement("div", { className: "blockQuote" }, state.quote.name),
|
38
|
-
React.createElement("div", { className: "footer" },
|
39
|
-
React.createElement("small", { className: "author" }, state.quote.name),
|
40
|
-
React.createElement("small", { className: "quoteId" },
|
41
|
-
"id:",
|
42
|
-
state.quote.id))))));
|
43
|
-
};
|
44
|
-
export default AuthorItem;
|
45
|
-
//# sourceMappingURL=authorItem.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"authorItem.js","sourceRoot":"","sources":["../../../../../src/modules/BoardView/components/ReactBeautifulDnd/authorItem.tsx"],"names":[],"mappings":"AAAA,QAAQ;AACR,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,WAAW,EAAY,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,OAAO,EAAgB,M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AC,6BAAK,SAAS,EAAC,YAAY,YAAY,CAAC,CAAC,CAAC,IAAI;QACzD,6BAAK,SAAS,EAAC,SAAS;YACvB,6BAAK,SAAS,EAAC,YAAY,IAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAO;YACpD,6BAAK,SAAS,EAAC,QAAQ;gBACtB,+BAAO,SAAS,EAAC,QAAQ,IAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAS;gBACpD,+BAAO,SAAS,EAAC,SAAS;;oBAAK,KAAK,CAAC,KAAK,CAAC,EAAE,CAAS,CACjD,CACD,CACD,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
@@ -1,21 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
declare const AuthorList: {
|
3
|
-
(props: {
|
4
|
-
id: string;
|
5
|
-
ignoreContainerClipping?: any;
|
6
|
-
internalScroll?: any;
|
7
|
-
scrollContainerStyle?: any;
|
8
|
-
isDropDisabled?: any;
|
9
|
-
isCombineEnabled?: any;
|
10
|
-
quotes: any[];
|
11
|
-
listId: string;
|
12
|
-
listType?: string | undefined;
|
13
|
-
style?: any;
|
14
|
-
title?: string | undefined;
|
15
|
-
useClone?: any;
|
16
|
-
}): JSX.Element;
|
17
|
-
defaultProps: {
|
18
|
-
isCombineEnabled: boolean;
|
19
|
-
};
|
20
|
-
};
|
21
|
-
export default AuthorList;
|
@@ -1,34 +0,0 @@
|
|
1
|
-
// @flow
|
2
|
-
import React, { useState } from "react";
|
3
|
-
import { useObserver } from "mobx-react-lite";
|
4
|
-
import { Droppable, Draggable } from "react-beautiful-dnd";
|
5
|
-
import QuoteItem from "./authorItem";
|
6
|
-
import { AuthorState } from "./state";
|
7
|
-
import { useDocumentLinkListEffect } from "@voplus/morpho-document";
|
8
|
-
const InnerQuoteList = (props) => {
|
9
|
-
const [state] = useState(new AuthorState());
|
10
|
-
useDocumentLinkListEffect(props.id, list => {
|
11
|
-
console.log("---InnerQuoteList", list);
|
12
|
-
state.quotes = list;
|
13
|
-
});
|
14
|
-
return useObserver(() => (React.createElement(React.Fragment, null, state.quotes.map((quote, index) => (React.createElement(Draggable, { key: quote.id, draggableId: quote.id.toString(), index: index }, (dragProvided, dragSnapshot) => (React.createElement(QuoteItem, { key: quote.id, id: quote.right.id, type: quote.right.type, quote: quote, snapshot: dragSnapshot, isDragging: dragSnapshot.isDragging, isGroupedOver: Boolean(dragSnapshot.combineTargetFor), provided: dragProvided }))))))));
|
15
|
-
};
|
16
|
-
const InnerList = (props) => {
|
17
|
-
const { quotes, dropProvided } = props;
|
18
|
-
const title = props.title ? React.createElement("div", { className: "title" }, props.title) : null;
|
19
|
-
return useObserver(() => (React.createElement("div", null,
|
20
|
-
title,
|
21
|
-
React.createElement("div", { className: "dropZone", ref: dropProvided.innerRef },
|
22
|
-
React.createElement(InnerQuoteList, { id: props.id, quotes: quotes }),
|
23
|
-
dropProvided.placeholder))));
|
24
|
-
};
|
25
|
-
const AuthorList = (props) => {
|
26
|
-
const { ignoreContainerClipping, internalScroll, scrollContainerStyle, isDropDisabled, isCombineEnabled, listId = "LIST", listType, style, quotes, title, useClone } = props;
|
27
|
-
return useObserver(() => (React.createElement(Droppable, { droppableId: listId, type: listType, ignoreContainerClipping: ignoreContainerClipping, isDropDisabled: isDropDisabled, isCombineEnabled: isCombineEnabled }, (dropProvided, dropSnapshot) => (React.createElement("div", Object.assign({ className: "wrapper", style: style, isdraggingover: dropSnapshot.isDraggingOver.toString(), isdropdisabled: isDropDisabled, isdraggingfrom: Boolean(dropSnapshot.draggingFromThisWith).toString() }, dropProvided.droppableProps), internalScroll ? (React.createElement("div", { className: "scrollContainer", style: scrollContainerStyle },
|
28
|
-
React.createElement(InnerList, { quotes: quotes, id: props.id, title: title, dropProvided: dropProvided }))) : (React.createElement(InnerList, { quotes: quotes, id: props.id, title: title, dropProvided: dropProvided })))))));
|
29
|
-
};
|
30
|
-
AuthorList.defaultProps = {
|
31
|
-
isCombineEnabled: false
|
32
|
-
};
|
33
|
-
export default AuthorList;
|
34
|
-
//# sourceMappingURL=authorList.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"authorList.js","sourceRoot":"","sources":["../../../../../src/modules/BoardView/components/ReactBeautifulDnd/authorList.tsx"],"names":[],"mappings":"AAAA,QAAQ;AACR,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,WAAW,EAAY,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAmB,SAAS,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAKN,yBAAyB,EACzB,MAAM,yBAAyB,CAAC;AAGjC,MAAM,cAAc,GAAG,CAAC,KAAkC,EAAE,EAAE;IAC7D,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,WAAW,EAAE,CAAC,CAAC;IAC5C,yBAAyB,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,EAAE;QAC1C,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,CAAC,CAAC;QACvC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC;IACrB,CAAC,CAAC,CAAC;IACH,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,oBAAC,KAAK,CAAC,QAAQ,QACb,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAU,EAAE,KAAa,EAAE,EAAE,CAAC,CAChD,oBAAC,SAAS,IAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,QAAQ,EAAE,EAAE,KAAK,EAAE,KAAK,IACtE,CAAC,YAAY,EAAE,YAAY,EAAE,EAAE,CAAC,CAChC,oBAAC,SAAS,IACT,GAAG,EAAE,KAAK,CAAC,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,uBAAuB,EAChD,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,IAcjC,CAAC,YAAiB,EAAE,YAAiB,EAAE,EAAE,CAAC,CAC1C,2CACC,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,YAAY,CAAC,cAAc,CAAC,QAAQ,EAAE,EACtD,cAAc,EAAE,cAAc,EAC9B,cAAc,EAAE,OAAO,CAAC,YAAY,CAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE,IACjE,YAAY,CAAC,cAAc,GAE9B,cAAc,CAAC,CAAC,CAAC,CACjB,6BAAK,SAAS,EAAC,iBAAiB,EAAC,KAAK,EAAE,oBAAoB;QAC3D,oBAAC,SAAS,IAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,GAAI,CAChF,CACN,CAAC,CAAC,CAAC,CACH,oBAAC,SAAS,IAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,YAAY,GAAI,CACrF,CACI,CACN,CACU,CACZ,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,YAAY,GAAG;IACzB,gBAAgB,EAAE,KAAK;CACvB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import React from "react";
|
2
|
-
declare const _default: React.FunctionComponent<{
|
3
|
-
initial?: any;
|
4
|
-
withScrollableColumns?: boolean | undefined;
|
5
|
-
isCombineEnabled?: boolean | undefined;
|
6
|
-
containerHeight?: string | undefined;
|
7
|
-
useClone?: boolean | undefined;
|
8
|
-
}>;
|
9
|
-
export default _default;
|
@@ -1,129 +0,0 @@
|
|
1
|
-
// @flow
|
2
|
-
import React, { useState } from "react";
|
3
|
-
// import { colors } from '@atlaskit/theme';
|
4
|
-
import { Global, css } from "@emotion/core";
|
5
|
-
import Column from "./column";
|
6
|
-
import { State } from "./state";
|
7
|
-
import { useObserver, observer } from "mobx-react-lite";
|
8
|
-
import { DragDropContext, Droppable } from "react-beautiful-dnd";
|
9
|
-
import { authorQuoteMap } from "../ReactBeautifulDnd/data";
|
10
|
-
import { useBoardColumnListEffect } from "../../../../data/board";
|
11
|
-
const Boards = (props) => {
|
12
|
-
const [state] = useState(new State());
|
13
|
-
const initial = props.initial ? props.initial : authorQuoteMap;
|
14
|
-
useBoardColumnListEffect(list => {
|
15
|
-
state.ordered = list;
|
16
|
-
console.log(state.ordered, state.ordered.length);
|
17
|
-
});
|
18
|
-
state.columns = initial;
|
19
|
-
// state.ordered = Object.keys(initial);
|
20
|
-
// state.ordered = initial;
|
21
|
-
console.log("sss", state.columns, state.ordered);
|
22
|
-
// const boardRef?:HTMLElement;
|
23
|
-
const reorder = (list, startIndex, endIndex) => {
|
24
|
-
const result = Array.from(list);
|
25
|
-
const [removed] = result.splice(startIndex, 1);
|
26
|
-
result.splice(endIndex, 0, removed);
|
27
|
-
return result;
|
28
|
-
};
|
29
|
-
const reorderQuoteMap = ({ quoteMap, source, destination }) => {
|
30
|
-
const current = [...quoteMap[source.droppableId]];
|
31
|
-
const next = [...quoteMap[destination.droppableId]];
|
32
|
-
const target = current[source.index];
|
33
|
-
// moving to same list
|
34
|
-
if (source.droppableId === destination.droppableId) {
|
35
|
-
const reordered = reorder(current, source.index, destination.index);
|
36
|
-
const result = {
|
37
|
-
...quoteMap,
|
38
|
-
[source.droppableId]: reordered
|
39
|
-
};
|
40
|
-
return {
|
41
|
-
quoteMap: result
|
42
|
-
};
|
43
|
-
}
|
44
|
-
// moving to different list
|
45
|
-
// remove from original
|
46
|
-
current.splice(source.index, 1);
|
47
|
-
// insert into next
|
48
|
-
next.splice(destination.index, 0, target);
|
49
|
-
const result = {
|
50
|
-
...quoteMap,
|
51
|
-
[source.droppableId]: current,
|
52
|
-
[destination.droppableId]: next
|
53
|
-
};
|
54
|
-
return {
|
55
|
-
quoteMap: result
|
56
|
-
};
|
57
|
-
};
|
58
|
-
const onDragEnd = (result) => {
|
59
|
-
if (result.combine) {
|
60
|
-
if (result.type === "COLUMN") {
|
61
|
-
const shallow = [...state.ordered];
|
62
|
-
shallow.splice(result.source.index, 1);
|
63
|
-
state.ordered = shallow;
|
64
|
-
console.log("column-orderd", state.ordered);
|
65
|
-
return;
|
66
|
-
}
|
67
|
-
const column = state.columns[result.source.droppableId];
|
68
|
-
const withQuoteRemoved = [...column];
|
69
|
-
withQuoteRemoved.splice(result.source.index, 1);
|
70
|
-
const columns = {
|
71
|
-
...state.columns,
|
72
|
-
[result.source.droppableId]: withQuoteRemoved
|
73
|
-
};
|
74
|
-
state.columns = columns;
|
75
|
-
console.log("columns-columns", state.columns);
|
76
|
-
return;
|
77
|
-
}
|
78
|
-
// dropped nowhere
|
79
|
-
if (!result.destination) {
|
80
|
-
return;
|
81
|
-
}
|
82
|
-
const source = result.source;
|
83
|
-
const destination = result.destination;
|
84
|
-
// did not move anywhere - can bail early
|
85
|
-
if (source.droppableId === destination.droppableId && source.index === destination.index) {
|
86
|
-
return;
|
87
|
-
}
|
88
|
-
// reordering column
|
89
|
-
if (result.type === "COLUMN") {
|
90
|
-
const ordered = reorder(state.ordered, source.index, destination.index);
|
91
|
-
state.ordered = ordered;
|
92
|
-
console.log("column-ordered---", state.ordered);
|
93
|
-
return;
|
94
|
-
}
|
95
|
-
let old = { ...state.columns };
|
96
|
-
console.log("---", result);
|
97
|
-
let remove = old[source.droppableId].splice(source.index, 1);
|
98
|
-
old[destination.droppableId].push(remove);
|
99
|
-
const data = reorderQuoteMap({
|
100
|
-
quoteMap: old,
|
101
|
-
source,
|
102
|
-
destination
|
103
|
-
});
|
104
|
-
state.columns = data.quoteMap;
|
105
|
-
console.log("---", state.columns);
|
106
|
-
};
|
107
|
-
const { containerHeight, useClone, isCombineEnabled, withScrollableColumns } = props;
|
108
|
-
const board = useObserver(() => (React.createElement(Droppable, { droppableId: "board", type: "COLUMN", direction: "horizontal", ignoreContainerClipping: Boolean(containerHeight), isCombineEnabled: isCombineEnabled }, provided => (React.createElement("div", Object.assign({ style: {
|
109
|
-
minHeight: "100vh",
|
110
|
-
minWidth: "100vw",
|
111
|
-
display: "inline-flex"
|
112
|
-
}, ref: provided.innerRef }, provided.droppableProps),
|
113
|
-
state.ordered.map((item, index) => (React.createElement(Column, { key: item.id, index: index, id: item.id, title: item.name,
|
114
|
-
// quotes={state.columns[key]}
|
115
|
-
isScrollable: withScrollableColumns, isCombineEnabled: isCombineEnabled, useClone: useClone }))),
|
116
|
-
provided.placeholder)))));
|
117
|
-
return useObserver(() => (React.createElement(React.Fragment, null,
|
118
|
-
React.createElement(DragDropContext, { onDragEnd: onDragEnd }, containerHeight ? (React.createElement("div", { style: { height: `${containerHeight}`, overflowX: "hidden", overflowY: "auto" } }, board)) : (board)),
|
119
|
-
React.createElement(Global, { styles: css `
|
120
|
-
body {
|
121
|
-
background: #808080;
|
122
|
-
}
|
123
|
-
` }))));
|
124
|
-
};
|
125
|
-
Boards.defaultProps = {
|
126
|
-
isCombineEnabled: false
|
127
|
-
};
|
128
|
-
export default observer(Boards);
|
129
|
-
//# sourceMappingURL=board.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"board.js","sourceRoot":"","sources":["../../../../../src/modules/BoardView/components/ReactBeautifulDnd/board.tsx"],"names":[],"mappings":"AAAA,QAAQ;AACR,OAAO,KAAK,EAAE,EAAqB,QAAQ,EAAa,MAAM,OAAO,CAAC;AACtE,4CAA4C;AAC5C,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,SAA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AI,CAAC,EAAE,EACZ,KAAK,EAAE,KAAK,EACZ,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,KAAK,EAAE,IAAI,CAAC,IAAI;YAChB,8BAA8B;YAC9B,YAAY,EAAE,qBAAqB,EACnC,gBAAgB,EAAE,gBAAgB,EAClC,QAAQ,EAAE,QAAQ,GACjB,CACF,CAAC;QACD,QAAQ,CAAC,WAAW,CAChB,CACN,CACU,CACZ,CAAC,CAAC;IAEH,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,oBAAC,KAAK,CAAC,QAAQ;QACd,oBAAC,eAAe,IAAC,SAAS,EAAE,SAAS,IACnC,eAAe,CAAC,CAAC,CAAC,CAClB,6BAAK,KAAK,EAAE,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,IAClF,KAAK,CACD,CACN,CAAC,CAAC,CAAC,CACH,KAAK,CACL,CACgB;QAClB,oBAAC,MAAM,IACN,MAAM,EAAE,GAAG,CAAA;;;;KAIV,GACA,CACc,CACjB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,YAAY,GAAG;IACrB,gBAAgB,EAAE,KAAK;CACvB,CAAC;AACF,eAAe,QAAQ,CAAC,MAAM,CAAC,CAAC"}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
declare const Column: (props: {
|
3
|
-
id: string;
|
4
|
-
title: string;
|
5
|
-
quotes?: any[] | undefined;
|
6
|
-
index: number;
|
7
|
-
isScrollable?: boolean | undefined;
|
8
|
-
isCombineEnabled?: boolean | undefined;
|
9
|
-
useClone?: boolean | undefined;
|
10
|
-
}) => JSX.Element;
|
11
|
-
export default Column;
|
@@ -1,29 +0,0 @@
|
|
1
|
-
// @flow
|
2
|
-
import React, { useState } from "react";
|
3
|
-
// import { Draggable } from '../../../src';
|
4
|
-
// import type { DraggableProvided, DraggableStateSnapshot } from '../../../src';
|
5
|
-
import QuoteList from "./authorList";
|
6
|
-
import { Draggable } from "react-beautiful-dnd";
|
7
|
-
import { useObserver } from "mobx-react-lite";
|
8
|
-
import { ColumnState } from "./state";
|
9
|
-
import styles from "./index.less";
|
10
|
-
const Column = (props) => {
|
11
|
-
const { title, quotes, index } = { ...props };
|
12
|
-
const [state] = useState(new ColumnState());
|
13
|
-
// useEffect(() => {
|
14
|
-
// state.quotes = props.quotes!;
|
15
|
-
// console.log("column-quotes", state.quotes);
|
16
|
-
// }, [props.quotes]);
|
17
|
-
// useDocumentLinkListEffect(props.id, list => {
|
18
|
-
// console.log("---list", list);
|
19
|
-
// state.quotes = list;
|
20
|
-
// });
|
21
|
-
return useObserver(() => (React.createElement(Draggable, { draggableId: title, index: index }, (provided, snapshot) => (React.createElement("div", Object.assign({ className: styles["column-container"], ref: provided.innerRef }, provided.draggableProps),
|
22
|
-
React.createElement("div", { className: "header" },
|
23
|
-
React.createElement("div", Object.assign({ className: "title" }, provided.dragHandleProps), title)),
|
24
|
-
React.createElement(QuoteList, { id: props.id, listId: title, listType: "QUOTE", style: {
|
25
|
-
backgroundColor: snapshot.isDragging ? "#00ff00" : null
|
26
|
-
}, quotes: state.quotes, internalScroll: props.isScrollable, isCombineEnabled: Boolean(props.isCombineEnabled), useClone: Boolean(props.useClone) }))))));
|
27
|
-
};
|
28
|
-
export default Column;
|
29
|
-
//# sourceMappingURL=column.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"column.js","sourceRoot":"","sources":["../../../../../src/modules/BoardView/components/ReactBeautifulDnd/column.tsx"],"names":[],"mappings":"AAAA,QAAQ;AACR,OAAO,KAAK,EAAE,EAAwB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE9D,4CAA4C;AAC5C,iFAAiF;AACjF,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,EAA8B,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAY,MAAM,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N,CACU,CACZ,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
@@ -1,109 +0,0 @@
|
|
1
|
-
const jake = {
|
2
|
-
id: "1",
|
3
|
-
name: "Jake",
|
4
|
-
url: "http://adventuretime.wikia.com/wiki/Jake",
|
5
|
-
avatarUrl: "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=770094666,790735245&fm=26&gp=0.jpg"
|
6
|
-
// colors: {
|
7
|
-
// soft: colors.Y50,
|
8
|
-
// hard: colors.N400A
|
9
|
-
// }
|
10
|
-
};
|
11
|
-
const BMO = {
|
12
|
-
id: "2",
|
13
|
-
name: "BMO",
|
14
|
-
url: "http://adventuretime.wikia.com/wiki/BMO",
|
15
|
-
avatarUrl: "https://ss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1582404497,2226613703&fm=26&gp=0.jpg"
|
16
|
-
// colors: {
|
17
|
-
// soft: colors.G50,
|
18
|
-
// hard: colors.N400A
|
19
|
-
// }
|
20
|
-
};
|
21
|
-
const finn = {
|
22
|
-
id: "3",
|
23
|
-
name: "Finn",
|
24
|
-
url: "http://adventuretime.wikia.com/wiki/Finn",
|
25
|
-
avatarUrl: "https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=1994023590,4186120074&fm=26&gp=0.jpg"
|
26
|
-
// colors: {
|
27
|
-
// soft: colors.B50,
|
28
|
-
// hard: colors.N400A
|
29
|
-
// }
|
30
|
-
};
|
31
|
-
const princess = {
|
32
|
-
id: "4",
|
33
|
-
name: "Princess bubblegum",
|
34
|
-
url: "http://adventuretime.wikia.com/wiki/Princess_Bubblegum",
|
35
|
-
avatarUrl: "https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=3973311124,425672427&fm=26&gp=0.jpg"
|
36
|
-
// colors: {
|
37
|
-
// soft: colors.P50,
|
38
|
-
// hard: colors.N400A
|
39
|
-
// }
|
40
|
-
};
|
41
|
-
export const quotes = [
|
42
|
-
{
|
43
|
-
id: "1",
|
44
|
-
content: "Sometimes life is scary and dark",
|
45
|
-
author: BMO
|
46
|
-
},
|
47
|
-
{
|
48
|
-
id: "2",
|
49
|
-
content: "Sucking at something is the first step towards being sorta good at something.",
|
50
|
-
author: jake
|
51
|
-
},
|
52
|
-
{
|
53
|
-
id: "3",
|
54
|
-
content: "You got to focus on what's real, man",
|
55
|
-
author: jake
|
56
|
-
},
|
57
|
-
{
|
58
|
-
id: "4",
|
59
|
-
content: "Is that where creativity comes from? From sad biz?",
|
60
|
-
author: finn
|
61
|
-
},
|
62
|
-
{
|
63
|
-
id: "5",
|
64
|
-
content: "Homies help homies. Always",
|
65
|
-
author: finn
|
66
|
-
},
|
67
|
-
{
|
68
|
-
id: "6",
|
69
|
-
content: "Responsibility demands sacrifice",
|
70
|
-
author: princess
|
71
|
-
},
|
72
|
-
{
|
73
|
-
id: "7",
|
74
|
-
content: "That's it! The answer was so simple, I was too smart to see it!",
|
75
|
-
author: princess
|
76
|
-
},
|
77
|
-
{
|
78
|
-
id: "8",
|
79
|
-
content: "People make mistakes. It's all a part of growing up and you never really stop growing",
|
80
|
-
author: finn
|
81
|
-
},
|
82
|
-
{
|
83
|
-
id: "9",
|
84
|
-
content: "Don't you always call sweatpants 'give up on life pants,' Jake?",
|
85
|
-
author: finn
|
86
|
-
},
|
87
|
-
{
|
88
|
-
id: "10",
|
89
|
-
content: "I should not have drunk that much tea!",
|
90
|
-
author: princess
|
91
|
-
},
|
92
|
-
{
|
93
|
-
id: "11",
|
94
|
-
content: "Please! I need the real you!",
|
95
|
-
author: princess
|
96
|
-
},
|
97
|
-
{
|
98
|
-
id: "12",
|
99
|
-
content: "Haven't slept for a solid 83 hours, but, yeah, I'm good.",
|
100
|
-
author: princess
|
101
|
-
}
|
102
|
-
];
|
103
|
-
export const authors = [jake, BMO, finn, princess];
|
104
|
-
const getByAuthor = (author, items) => items.filter((quote) => quote.author === author);
|
105
|
-
export const authorQuoteMap = authors.reduce((previous, author) => ({
|
106
|
-
...previous,
|
107
|
-
[author.name]: getByAuthor(author, quotes)
|
108
|
-
}), {});
|
109
|
-
//# sourceMappingURL=data.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"data.js","sourceRoot":"","sources":["../../../../../src/modules/BoardView/components/ReactBeautifulDnd/data.ts"],"names":[],"mappings":"AAAA,MAAM,IAAI,GAAG;IACZ,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,0CAA0C;IAC/C,SAAS,EACR,8FAA8F;IAC/F,YAAY;IACZ,qBAAqB;IACrB,sBAAsB;IACtB,IAAI;CACJ,CAAC;AAEF,MAAM,GAAG,GAAG;IACX,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,KAAK;IACX,GAAG,EAAE,yCAAyC;IAC9C,SAAS,EACR,gGAAgG;IACjG,YAAY;IACZ,qBAAqB;IACrB,sBAAsB;IACtB,IAAI;CACJ,CAAC;AAEF,MAAM,IAAI,GAAG;IACZ,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,0CAA0C;IAC/C,SAAS,EACR,gGAAgG;IACjG,YAAY;IACZ,qBAAqB;IACrB,sBAAsB;IACtB,IAAI;CACJ,CAAC;AAEF,MAAM,QAAQ,GAAG;IAChB,EAAE,EAAE,GAAG;IACP,IAAI,EAAE,oBAAoB;IAC1B,GAAG,EAAE,wDAAwD;IAC7D,SAAS,EACR,+FAA+F;IAChG,YAAY;IACZ,qBAAqB;IACrB,sBAAsB;IACtB,IAAI;CACJ,CAAC;AACF,MAAM,CAAC,MAAM,MAAM,GAAU;IAC5B;QACC,EAAE,EAAE,GAAG;QACP,OAAO,EAAE,kCAAkC;QAC3C,MAAM,EAAE,GAAG;KACX;IACD;QACC,EAAE,EAAE,GAAG;QACP,OAAO,EAAE,+EAA+E;QACxF,MAAM,EAAE,IAAI;KACZ;IACD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