@voplus/morpho-csp 6.1.16 → 6.1.17
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/modules/corporate/company/identity/components/IdentifyProperties/index.less +1 -1
- package/es/modules/corporate/virtual-address/components/VirtualAddressList/index.d.ts +5 -0
- package/es/modules/corporate/virtual-address/components/VirtualAddressList/index.js +36 -24
- package/es/modules/corporate/virtual-address/components/VirtualAddressList/index.js.map +1 -1
- package/es/modules/corporate/virtual-address/pages/VirtualAddressListPage/index.d.ts +4 -0
- package/es/modules/corporate/virtual-address/pages/VirtualAddressListPage/index.js +28 -0
- package/es/modules/corporate/virtual-address/pages/VirtualAddressListPage/index.js.map +1 -0
- package/es/modules/corporate/virtual-address/pages/VirtualAddressListPage/index.less +9 -0
- package/package.json +1 -1
|
@@ -4,11 +4,16 @@ export type VirtualAddressListProps = {
|
|
|
4
4
|
corporateId: string;
|
|
5
5
|
/** title */
|
|
6
6
|
viewTitle?: React.ReactNode;
|
|
7
|
+
/** 是否允在 listView 内部打开 aside */
|
|
8
|
+
asideable?: boolean;
|
|
9
|
+
/** 头部的显示方式 */
|
|
10
|
+
headerType?: "dashboard" | "tool";
|
|
7
11
|
};
|
|
8
12
|
declare const VirtualAddressList: {
|
|
9
13
|
(props: VirtualAddressListProps): React.JSX.Element;
|
|
10
14
|
defaultProps: {
|
|
11
15
|
viewTitle: string;
|
|
16
|
+
headerType: string;
|
|
12
17
|
};
|
|
13
18
|
};
|
|
14
19
|
export default VirtualAddressList;
|
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
import "./index.less";
|
|
2
|
-
import AsideContent from "@voplus/morpho-ui/es/components/layout/AsideContent";
|
|
3
2
|
import { useVirtualAddressListEffect } from "../../../../../data/virtual-address";
|
|
4
3
|
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data/ListDataContext";
|
|
4
|
+
import { useViewLayoutContext } from "@voplus/morpho-ui/es/components/layout/DefaultViewLayout/ViewLayoutContext";
|
|
5
5
|
import React, { useState } from "react";
|
|
6
|
-
import ListView from "@voplus/morpho-ui/es/components/layout/ListView/
|
|
6
|
+
import ListView from "@voplus/morpho-ui/es/components/layout/ListView/ListView";
|
|
7
7
|
import VirtualAddressForm from "../NewVirtualAddressForm/VirtualAddressForm";
|
|
8
8
|
import NewVirtualAddressFormDialog from "../NewVirtualAddressForm";
|
|
9
9
|
import VirtualAddressItem from "../VirtualAddressItem";
|
|
10
|
-
import { observe } from "@voplus/morpho-ui";
|
|
10
|
+
import { observe, useRenderOnChange } from "@voplus/morpho-ui";
|
|
11
11
|
import { faAddressCard } from "@fortawesome/pro-solid-svg-icons";
|
|
12
12
|
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
13
13
|
import { useAutoUpdateListData } from "../../../../../data/virtual-address";
|
|
14
|
-
import { useRenderOnChange } from "@voplus/morpho-ui";
|
|
15
|
-
import PageHeadDashboard from "@voplus/morpho-ui/es/components/layout/headers/PageHeadDashboard";
|
|
16
14
|
import { useViewContext } from "@voplus/morpho-document-core/es/data/context/ViewContext";
|
|
17
15
|
const VirtualAddressList = (props) => {
|
|
18
|
-
const { corporateId, viewTitle } = props;
|
|
16
|
+
const { corporateId, viewTitle, headerType } = props;
|
|
19
17
|
const [addAble, setAddAble] = useState(false);
|
|
18
|
+
const layoutContext = useViewLayoutContext();
|
|
19
|
+
if (layoutContext)
|
|
20
|
+
layoutContext.asideColSpan = 12;
|
|
21
|
+
const listHeaderProps = {
|
|
22
|
+
visible: true,
|
|
23
|
+
sortable: false,
|
|
24
|
+
searchOptions: { placeholder: "Search in address" },
|
|
25
|
+
onAdd: onAdd,
|
|
26
|
+
};
|
|
20
27
|
const view = useViewContext();
|
|
21
|
-
const [asideContext] = useState(AsideContent.createContext());
|
|
22
28
|
const list = useCreateListDataState({
|
|
23
29
|
filterDefaults: {
|
|
24
30
|
filters: [{ c: "ParentNodeId", o: "=", l: "And", v1: corporateId }],
|
|
@@ -34,27 +40,33 @@ const VirtualAddressList = (props) => {
|
|
|
34
40
|
});
|
|
35
41
|
return observe(() => {
|
|
36
42
|
return (React.createElement(ListDataContext.Provider, { value: list },
|
|
37
|
-
React.createElement(
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
},
|
|
51
|
-
} }),
|
|
52
|
-
React.createElement(ListView, { headerProps: { visible: false }, asideable: false, renderItem: ({ item, index }) => (React.createElement(VirtualAddressItem, { key: item.id, id: item.id })) }),
|
|
53
|
-
addAble && (React.createElement(NewVirtualAddressFormDialog, { corporateId: corporateId, onCancel: () => setAddAble(false), onSave: () => setAddAble(false) }))))));
|
|
43
|
+
React.createElement(ListView, { className: "virtualAddress-list-view", asideable: props.asideable, headerProps: {
|
|
44
|
+
headDashboardProps: headerType === "dashboard"
|
|
45
|
+
? {
|
|
46
|
+
headerType: "page",
|
|
47
|
+
avatarIcon: React.createElement(FAIcon, { icon: faAddressCard }),
|
|
48
|
+
title: viewTitle,
|
|
49
|
+
description: "Manage your share classes with ease.",
|
|
50
|
+
listHeaderProps: listHeaderProps,
|
|
51
|
+
}
|
|
52
|
+
: undefined,
|
|
53
|
+
headerToolProps: headerType === "tool" ? listHeaderProps : undefined,
|
|
54
|
+
}, renderItem: ({ item, index }) => (React.createElement(VirtualAddressItem, { key: item.id, id: item.id })), footer: addAble && (React.createElement(NewVirtualAddressFormDialog, { corporateId: corporateId, onCancel: () => setAddAble(false), onSave: () => setAddAble(false) })) })));
|
|
54
55
|
});
|
|
56
|
+
function onAdd(asideContext) {
|
|
57
|
+
if ((view === null || view === void 0 ? void 0 : view.Type) === "PropertiesView" || (view === null || view === void 0 ? void 0 : view.Type) === "QuickView") {
|
|
58
|
+
setAddAble(!addAble);
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(React.createElement(VirtualAddressForm, { showView: true, corporateId: corporateId }), {
|
|
62
|
+
span: 12,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
55
66
|
};
|
|
56
67
|
VirtualAddressList.defaultProps = {
|
|
57
68
|
viewTitle: "Virtual Address",
|
|
69
|
+
headerType: "dashboard",
|
|
58
70
|
};
|
|
59
71
|
export default VirtualAddressList;
|
|
60
72
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/virtual-address/components/VirtualAddressList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/virtual-address/components/VirtualAddressList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAmB,2BAA2B,EAAE,MAAM,qCAAqC,CAAC;AACnG,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,4EAA4E,CAAC;AAClH,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,QAAQ,MAAM,0DAA0D,CAAC;AAChF,OAAO,kBAAkB,MAAM,6CAA6C,CAAC;AAC7E,OAAO,2BAA2B,MAAM,0BAA0B,CAAC;AACnE,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,qBAAqB,EAAE,MAAM,qC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YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,CAAC,oBAAC,kBAAkB,IAAC,QAAQ,QAAC,WAAW,EAAE,WAAW,GAAI,EAAE;gBAClF,IAAI,EAAE,EAAE;aACR,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;AACF,CAAC,CAAC;AAEF,kBAAkB,CAAC,YAAY,GAAG;IACjC,SAAS,EAAE,iBAAiB;IAC5B,UAAU,EAAE,WAAW;CACvB,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { faAddressCard } from "@fortawesome/pro-solid-svg-icons";
|
|
2
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
3
|
+
import DocumentTabs from "@voplus/morpho-document/es/components/DocumentTabs";
|
|
4
|
+
import ActivityLog from "@voplus/morpho-org/es/components/ActivityLog2/ActivityLog2";
|
|
5
|
+
import { observe } from "@voplus/morpho-ui";
|
|
6
|
+
import DefaultViewLayout from "@voplus/morpho-ui/es/components/layout/DefaultViewLayout";
|
|
7
|
+
import PageHeadDashboard from "@voplus/morpho-ui/es/components/layout/headers/PageHeadDashboard";
|
|
8
|
+
import React, { useState } from "react";
|
|
9
|
+
import VirtualAddressList from "../../components/VirtualAddressList";
|
|
10
|
+
import styles from "./index.less";
|
|
11
|
+
const VirtualAddressListPage = (props) => {
|
|
12
|
+
const [activeKey, setActiveKey] = useState("VirtualAddressList");
|
|
13
|
+
return observe(() => (React.createElement(DefaultViewLayout, { className: styles["virtualAddress-list-page"], header: React.createElement(PageHeadDashboard, { avatarIcon: React.createElement(FAIcon, { icon: faAddressCard }), title: "Virtual Address", upAble: true, description: "Manage your share classes with ease." }), propertiesWidth: "295px" },
|
|
14
|
+
React.createElement(DocumentTabs, { id: "", active: "VirtualAddressList", tabItems: [
|
|
15
|
+
{
|
|
16
|
+
key: "VirtualAddressList",
|
|
17
|
+
label: "Virtual Address List",
|
|
18
|
+
children: React.createElement(VirtualAddressList, { ...props, asideable: false, headerType: "tool" }),
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
key: "Activities",
|
|
22
|
+
label: "Activities",
|
|
23
|
+
children: (React.createElement(React.Fragment, null, activeKey === "Activities" ? (React.createElement(ActivityLog, { id: "", bar: false })) : null)),
|
|
24
|
+
},
|
|
25
|
+
], onChange: (key) => setActiveKey(key) }))));
|
|
26
|
+
};
|
|
27
|
+
export default VirtualAddressListPage;
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/virtual-address/pages/VirtualAddressListPage/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,YAAY,MAAM,oDAAoD,CAAC;AAC9E,OAAO,WAAW,MAAM,4DAA4D,CAAC;AACrF,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,iBAAiB,MAAM,0DAA0D,CAAC;AACzF,OAAO,iBAAiB,MAAM,kEAAkE,CAAC;AACjG,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,kBAA+C,MAAM,qCAAqC,CAAC;AAClG,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,sBAAsB,GAAG,CAAC,KAA8B,EAAE,EAAE;IACjE,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,CAAS,oBAAoB,CAAC,CAAC;IAEzE,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,iBAAiB,IACjB,SAAS,EAAE,MAAM,CAAC,0BAA0B,CAAC,EAC7C,MAAM,EACL,oBAAC,iBAAiB,IACjB,UAAU,EAAE,oBAAC,MAAM,IAA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