@voplus/morpho-workspace 6.0.151 → 6.0.152
Sign up to get free protection for your applications and to get access to all the features.
- package/es/modules/meeting/components/MeetingList/index.d.ts +1 -2
- package/es/modules/meeting/components/MeetingList/index.js +18 -47
- package/es/modules/meeting/components/MeetingList/index.js.map +1 -1
- package/es/modules/meeting/components/MeetingList/index.less +10 -0
- package/es/modules/meeting/pages/MeetingListView/index.js +17 -1
- package/es/modules/meeting/pages/MeetingListView/index.js.map +1 -1
- package/package.json +1 -1
@@ -1,27 +1,21 @@
|
|
1
1
|
import { AssigneeViewFilter, StartDateFilter } from "../../../../controls/filters";
|
2
|
-
import {
|
3
|
-
import React, {
|
2
|
+
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
|
3
|
+
import React, { useState } from "react";
|
4
4
|
import { observe, useAsideContentContext } from "@voplus/morpho-ui";
|
5
|
-
import
|
6
|
-
import AsideContent from "@voplus/morpho-ui/es/components/layout/AsideContent";
|
5
|
+
import ListHeaderTool from "@voplus/morpho-ui/es/components/layout/ListView/headers/ListHeaderTool";
|
7
6
|
import DocumentItemFrame from "@voplus/morpho-document/es/controls/DocumentItemFrame";
|
8
|
-
import FilterView from "@voplus/morpho-ui/es/controls/FilterView";
|
9
7
|
import ListView from "@voplus/morpho-ui/es/components/layout/ListView/ListView2";
|
10
8
|
import MeetingItem from "../../components/MeetingItem";
|
11
|
-
import MeetingPropertiesView from "../../components/MeetingPropertiesView";
|
12
9
|
import NewMeetingForm from "../../components/NewMeetingForm";
|
13
|
-
import QuickSearch from "@voplus/morpho-ui/es/components/layout/ListView/controls/QuickSearch";
|
14
|
-
import SortViewDropdown from "@voplus/morpho-ui/es/components/layout/ListView/controls/SortViewDropdown";
|
15
10
|
import { useAutoUpdateListData } from "@voplus/morpho-document-core";
|
16
|
-
import { useFrame } from "@voplus/morpho-document/es/components/ViewFrame/ViewFrameContext";
|
17
11
|
import { useMeetingListEffect } from "../../../../data/meeting";
|
18
12
|
import { useRenderOnChange } from "@voplus/morpho-ui";
|
19
13
|
import { useViewContext } from "@voplus/morpho-document-core/es/data/context/ViewContext";
|
14
|
+
import "./index.less";
|
20
15
|
const MeetingList = (props) => {
|
21
|
-
const frame = useFrame();
|
22
16
|
const view = useViewContext();
|
23
|
-
const
|
24
|
-
const { parentId,
|
17
|
+
const asideContext = useAsideContentContext();
|
18
|
+
const { parentId, readonly } = props;
|
25
19
|
const [addAble, setAddAble] = useState(false);
|
26
20
|
const [activeId, setActiveId] = useState("");
|
27
21
|
const list = useCreateListDataState({
|
@@ -33,47 +27,24 @@ const MeetingList = (props) => {
|
|
33
27
|
useAutoUpdateListData(list, (d) => d.type === "Meeting");
|
34
28
|
useRenderOnChange(() => list.filters.options);
|
35
29
|
useMeetingListEffect(list, (result) => list.union(result), list.filters.options);
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
const List = observe(() => (React.createElement(ListDataContext.Provider, { value: list },
|
40
|
-
React.createElement(ListView, { renderId: parentId, asideable: frame ? false : true, headerProps: {
|
41
|
-
// viewTitle: props.title,
|
42
|
-
header: quickSearch ? undefined : (React.createElement(QuickSearch, { title: "Search", className: "view-title", onChange: onQuickSearch })),
|
43
|
-
filterViewProps: {
|
30
|
+
return observe(() => (React.createElement(ListDataContext.Provider, { value: list },
|
31
|
+
React.createElement("div", { className: "meeting-list" },
|
32
|
+
React.createElement(ListHeaderTool, { addAble: !readonly, searchOptions: { placeholder: "Search in meetings" }, filterViewProps: {
|
44
33
|
columns: [
|
45
34
|
React.createElement(AssigneeViewFilter, { key: "AssigneeViewFilter" }),
|
46
35
|
React.createElement(StartDateFilter, { key: "StartDateFilter", title: "MeetingDate" }),
|
47
36
|
],
|
48
|
-
},
|
49
|
-
|
50
|
-
|
51
|
-
onAdd: onAdd,
|
52
|
-
visible: frame ? false : true,
|
53
|
-
}, formViewTitle: "Add Meeting", formView: (view === null || view === void 0 ? void 0 : view.Type) !== "PropertiesView" && React.createElement(NewMeetingForm, { parentId: parentId }), propertiesView: (id) => !frame && (view === null || view === void 0 ? void 0 : view.Type) !== "PropertiesView" && React.createElement(MeetingPropertiesView, { id: id }), renderItem: ({ item }) => (React.createElement(DocumentItemFrame, { key: item.id, frameProps: { active: activeId === item.id }, onClick: () => setActiveId(item.id) },
|
54
|
-
React.createElement(MeetingItem, { id: item.id, isList: (view === null || view === void 0 ? void 0 : view.Type) !== "PropertiesView", reload: !!readonly }))) }),
|
37
|
+
}, onAdd: onAdd }),
|
38
|
+
React.createElement(ListView, { renderId: parentId, asideable: false, headerProps: { visible: false }, renderItem: ({ item }) => (React.createElement(DocumentItemFrame, { key: item.id, frameProps: { active: activeId === item.id }, onClick: () => setActiveId(item.id) },
|
39
|
+
React.createElement(MeetingItem, { id: item.id, isList: (view === null || view === void 0 ? void 0 : view.Type) !== "PropertiesView", reload: !!readonly }))) })),
|
55
40
|
!!addAble && (React.createElement(NewMeetingForm, { parentId: parentId, simple: true, onCancel: () => setAddAble(false) })))));
|
56
|
-
return observe(() => (React.createElement(React.Fragment, null, frame ? List : React.createElement(AsideContent, { context: asideContext }, List))));
|
57
41
|
function onAdd() {
|
58
|
-
if ((view === null || view === void 0 ? void 0 : view.Type)
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
}
|
65
|
-
function setupExtra() {
|
66
|
-
if (!frame)
|
67
|
-
return;
|
68
|
-
frame.Extra = observe(() => (React.createElement(FilterOptionsContext.Provider, { value: list.filters },
|
69
|
-
quickSearch ? undefined : (React.createElement(QuickSearch, { title: "Search", className: "view-title", onChange: onQuickSearch })),
|
70
|
-
React.createElement(SortViewDropdown, { onSort: (sort) => list.triggerSort(sort), className: "margin-left-10" }),
|
71
|
-
React.createElement(FilterView, { columns: [
|
72
|
-
React.createElement(AssigneeViewFilter, { key: "AssigneeViewFilter" }),
|
73
|
-
React.createElement(StartDateFilter, { key: "StartDateFilter", title: "MeetingDate" }),
|
74
|
-
], className: "margin-left-10" }),
|
75
|
-
React.createElement(AddFormView, { id: parentId },
|
76
|
-
React.createElement(NewMeetingForm, { parentId: parentId })))));
|
42
|
+
if ((view === null || view === void 0 ? void 0 : view.Type) === "PropertiesView") {
|
43
|
+
setAddAble(true);
|
44
|
+
}
|
45
|
+
else {
|
46
|
+
asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(React.createElement(NewMeetingForm, { parentId: parentId }), { span: 12 });
|
47
|
+
}
|
77
48
|
}
|
78
49
|
};
|
79
50
|
export default MeetingList;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/meeting/components/MeetingList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/meeting/components/MeetingList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,cAAc,MAAM,wEAAwE,CAAC;AACpG,OAAO,iBAAiB,MAAM,uDAAuD,CAAC;AAEtF,OAAO,QAAQ,MAAM,2DAA2D,CAAC;AACjF,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAC1F,OAAO,cA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,QAAQ,EAAE,QAAQ,GAAI,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QAC/E,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AACF,eAAe,WAAW,CAAC"}
|
@@ -1,18 +1,34 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { observe, useAutorunEffect } from "@voplus/morpho-ui";
|
3
|
+
import DocumentTabs from "@voplus/morpho-document/es/components/DocumentTabs";
|
4
|
+
import { useFrame } from "@voplus/morpho-document/es/components/ViewFrame/ViewFrameContext";
|
5
|
+
import ToolBar from "@voplus/morpho-document/es/controls/ToolBar/ToolBar2";
|
3
6
|
import MeetingList from "../../components/MeetingList";
|
4
7
|
import { useDocument } from "@voplus/morpho-document-core";
|
8
|
+
import { faEllipsisVertical } from "@fortawesome/pro-solid-svg-icons";
|
9
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
5
10
|
import { useTabItem } from "@voplus/morpho-data";
|
6
11
|
/** The Meeting Page component with router parameters support. */
|
7
12
|
const MeetingListView = ({ id }) => {
|
8
13
|
const tab = useTabItem();
|
14
|
+
const frame = useFrame();
|
9
15
|
const document = useDocument(id);
|
16
|
+
if (frame) {
|
17
|
+
frame.header = "PathHeader";
|
18
|
+
}
|
10
19
|
useAutorunEffect(() => {
|
11
20
|
var _a;
|
12
21
|
tab.title = (_a = document === null || document === void 0 ? void 0 : document.name) !== null && _a !== void 0 ? _a : "Meetings";
|
13
22
|
});
|
14
23
|
return observe(() => (React.createElement("div", { className: "document-list-view", style: { height: "100%" } },
|
15
|
-
React.createElement(
|
24
|
+
React.createElement(DocumentTabs, { id: id, active: "Meetings", properties: true, tabItems: [
|
25
|
+
{
|
26
|
+
key: "Meetings",
|
27
|
+
label: "Meetings",
|
28
|
+
children: React.createElement(MeetingList, { parentId: id }),
|
29
|
+
},
|
30
|
+
], tabBarExtraContent: React.createElement("div", null,
|
31
|
+
React.createElement(ToolBar, { id: id, moreProps: { icon: React.createElement(FAIcon, { icon: faEllipsisVertical }) } })) }))));
|
16
32
|
};
|
17
33
|
export default MeetingListView;
|
18
34
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/meeting/pages/MeetingListView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/meeting/pages/MeetingListView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,kEAAkE,CAAC;AAC5F,OAAO,OAAO,MAAM,sDAAsD,CAAC;AAC3E,OAAO,WAAW,MAAM,8BAA8B,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAEjD,iEAAiE;AACjE,MAAM,eAAe,GAAG,CAAC,EAAE,EAAE,EAAkB,EAAE,EAAE;IAClD,MAAM,GAAG,GAAG,UAAU,EAAE,CAAC;IACzB,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,QAAQ,GAAG,WAAW,CAAC,EAAE,CAAC,CAAC;IAEjC,IAAI,KAAK,EAAE,CAAC;QACX,KAAK,CAAC,MAAM,GAAG,YAAY,CAAC;IAC7B,CAAC;IAED,gBAAgB,CAAC,GAAG,EAAE;;QACrB,GAAG,CAAC,KAAK,GAAG,MAAA,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI,mCAA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