@voplus/morpho-document 1.0.0-dev275 → 1.0.0-dev277
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/ActivityLog2/index.d.ts +3 -0
- package/es/components/ActivityLog/ActivityLog2/index.js +5 -4
- package/es/components/ActivityLog/ActivityLog2/index.js.map +1 -1
- package/es/components/ActivityLog/ActivityLog2/index.less +36 -61
- package/es/components/DocumentCard/index.js +1 -1
- package/es/components/DocumentCard/index.js.map +1 -1
- package/es/components/DocumentHeader/index.js +1 -1
- package/es/components/DocumentHeader/index.js.map +1 -1
- package/es/components/DocumentItem/index.js +1 -1
- package/es/components/DocumentItem/index.js.map +1 -1
- package/es/components/DocumentList/index.js +2 -2
- package/es/components/DocumentList/index.js.map +1 -1
- package/es/components/DocumentList/index.less +3 -0
- package/es/components/DocumentTabs/index.d.ts +2 -0
- package/es/components/DocumentTabs/index.js +4 -3
- package/es/components/DocumentTabs/index.js.map +1 -1
- package/es/components/ExtraDataCardList/index.d.ts +5 -0
- package/es/components/ExtraDataCardList/index.js +38 -0
- package/es/components/ExtraDataCardList/index.js.map +1 -0
- package/es/components/Links/index.less +111 -111
- package/es/components/QuickAccessSearch/ObjectItem/index.js +2 -2
- package/es/components/QuickAccessSearch/ObjectItem/index.js.map +1 -1
- package/es/controls/ToolBar/ToolBar2.js +2 -2
- package/es/controls/ToolBar/ToolBar2.js.map +1 -1
- package/es/controls/ToolBar/ToolBarState.d.ts +13 -4
- package/es/controls/ToolBar/ToolBarState.js +10 -1
- package/es/controls/ToolBar/ToolBarState.js.map +1 -1
- package/es/controls/ToolBar/buttons/More.d.ts +2 -2
- package/es/controls/ToolBar/buttons/More.js +2 -2
- package/es/controls/ToolBar/buttons/More.js.map +1 -1
- package/es/controls/ToolBar/menus/Access.js +3 -3
- package/es/controls/ToolBar/menus/Access.js.map +1 -1
- package/es/controls/ToolBar/menus/Delete.js +1 -0
- package/es/controls/ToolBar/menus/Delete.js.map +1 -1
- package/es/controls/ToolBar/menus/Lock.js +1 -0
- package/es/controls/ToolBar/menus/Lock.js.map +1 -1
- package/es/controls/ToolBar/menus/Move.js +1 -0
- package/es/controls/ToolBar/menus/Move.js.map +1 -1
- package/es/controls/ToolBar/menus/OpenReferenceView.js +5 -3
- package/es/controls/ToolBar/menus/OpenReferenceView.js.map +1 -1
- package/es/controls/ToolBar/menus/OpenTreeView.js +1 -0
- package/es/controls/ToolBar/menus/OpenTreeView.js.map +1 -1
- package/es/controls/ToolBar/menus/Paste.js +1 -0
- package/es/controls/ToolBar/menus/Paste.js.map +1 -1
- package/es/controls/ToolBar/menus/Publish.js +3 -3
- package/es/controls/ToolBar/menus/Publish.js.map +1 -1
- package/es/controls/ToolBar/menus/PublishLock.js +3 -3
- package/es/controls/ToolBar/menus/PublishLock.js.map +1 -1
- package/es/controls/ToolBar/menus/Revert.js +3 -0
- package/es/controls/ToolBar/menus/Revert.js.map +1 -1
- package/es/modules/unit/components/ChangeUserPassword/index.d.ts +6 -0
- package/es/modules/unit/components/ChangeUserPassword/index.js +37 -0
- package/es/modules/unit/components/ChangeUserPassword/index.js.map +1 -0
- package/es/modules/unit/components/ChangeUserPassword/index.less +13 -0
- package/es/modules/unit/components/ContactUserInfoView/index.d.ts +3 -0
- package/es/modules/unit/components/ContactUserInfoView/index.js +40 -0
- package/es/modules/unit/components/ContactUserInfoView/index.js.map +1 -0
- package/es/modules/unit/components/ContactUserInfoView/index.less +20 -0
- package/es/modules/unit/components/ContactUserInfoView/state.d.ts +5 -0
- package/es/modules/unit/components/ContactUserInfoView/state.js +14 -0
- package/es/modules/unit/components/ContactUserInfoView/state.js.map +1 -0
- package/es/modules/unit/components/Members/index.js +14 -25
- package/es/modules/unit/components/Members/index.js.map +1 -1
- package/es/modules/unit/components/NewUnitForm/index.d.ts +1 -1
- package/es/modules/unit/components/SubUnitList/index.d.ts +6 -2
- package/es/modules/unit/components/SubUnitList/index.js +17 -20
- package/es/modules/unit/components/SubUnitList/index.js.map +1 -1
- package/es/modules/unit/components/SubUnitList/index.less +10 -4
- package/es/modules/unit/components/SubUnitList/state.d.ts +15 -0
- package/es/modules/unit/components/SubUnitList/state.js +36 -1
- package/es/modules/unit/components/SubUnitList/state.js.map +1 -1
- package/es/modules/unit/components/UnitItem/Item.d.ts +17 -0
- package/es/modules/unit/components/UnitItem/Item.js +24 -0
- package/es/modules/unit/components/UnitItem/Item.js.map +1 -0
- package/es/modules/unit/components/UnitItem/index.js +43 -0
- package/es/modules/unit/components/UnitItem/index.js.map +1 -0
- package/es/modules/unit/components/UnitItem/index.less +17 -9
- package/es/modules/unit/components/UnitItem/state.d.ts +2 -2
- package/es/modules/unit/components/UnitItem/state.js.map +1 -1
- package/es/modules/unit/components/UnitList/index.js +4 -4
- package/es/modules/unit/components/UnitList/index.js.map +1 -1
- package/es/modules/unit/components/UnitName/index.d.ts +5 -0
- package/es/modules/unit/components/UnitName/index.js +20 -0
- package/es/modules/unit/components/UnitName/index.js.map +1 -0
- package/es/modules/unit/components/UnitSortableTree/index.js +4 -5
- package/es/modules/unit/components/UnitSortableTree/index.js.map +1 -1
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/index.d.ts +3 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/index.js +22 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/index.js.map +1 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js +82 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/node-content-renderer.js.map +1 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/node-content-renderer.less +316 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js +21 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.js.map +1 -0
- package/es/modules/unit/components/UnitSortableTree/themes/FileExplorerTheme/tree-node-renderer.less +4 -0
- package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/index.js.map +1 -0
- package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.d.ts +3 -0
- package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/SortableTreeUnitTheme}/node-content-renderer.js +2 -2
- package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/node-content-renderer.js.map +1 -0
- package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/SortableTreeUnitTheme}/node-content-renderer.less +0 -1
- package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.d.ts +3 -0
- package/es/modules/unit/components/UnitSortableTree/themes/SortableTreeUnitTheme/tree-node-renderer.js.map +1 -0
- package/es/modules/unit/components/UnitTabs/index.js +5 -2
- package/es/modules/unit/components/UnitTabs/index.js.map +1 -1
- package/es/modules/unit/components/UnitsSelectDialog/index.d.ts +9 -0
- package/es/modules/unit/components/UnitsSelectDialog/index.js +35 -0
- package/es/modules/unit/components/UnitsSelectDialog/index.js.map +1 -0
- package/es/modules/unit/components/UnitsSelectDialog/index.less +36 -0
- package/es/modules/unit/components/UnitsSelectDialog/state.d.ts +34 -0
- package/es/modules/unit/components/UnitsSelectDialog/state.js +73 -0
- package/es/modules/unit/components/UnitsSelectDialog/state.js.map +1 -0
- package/es/modules/unit/controls/QuickDataIcon/index.less +12 -0
- package/es/modules/unit/data/UserStore.d.ts +33 -0
- package/es/modules/unit/data/UserStore.js +53 -0
- package/es/modules/unit/data/UserStore.js.map +1 -0
- package/es/modules/unit/data/hooks/useUserInfo.d.ts +6 -0
- package/es/modules/unit/data/hooks/useUserInfo.js +12 -0
- package/es/modules/unit/data/hooks/useUserInfo.js.map +1 -0
- package/es/modules/unit/data/interfaces/IUnit.d.ts +2 -0
- package/es/modules/unit/data/interfaces/IUserInfo.d.ts +12 -0
- package/es/modules/unit/data/interfaces/IUserInfo.js +1 -0
- package/es/modules/unit/data/interfaces/IUserInfo.js.map +1 -0
- package/es/modules/unit/data/interfaces/index.d.ts +1 -0
- package/es/modules/unit/data/interfaces/index.js +1 -0
- package/es/modules/unit/data/interfaces/index.js.map +1 -1
- package/es/modules/unit/pages/UnitTreeView/index.js +1 -1
- package/es/modules/unit/pages/UnitTreeView/index.js.map +1 -1
- package/es/pages/Page/PageTextItem/index.js +1 -1
- package/es/pages/Page/PageTextItem/index.js.map +1 -1
- package/package.json +1 -1
- package/es/modules/unit/components/SortableTreeUnitTheme/index.js.map +0 -1
- package/es/modules/unit/components/SortableTreeUnitTheme/node-content-renderer.js.map +0 -1
- package/es/modules/unit/components/SortableTreeUnitTheme/tree-node-renderer.js.map +0 -1
- package/es/modules/unit/components/UnitItem/DefaultUnitItem.d.ts +0 -4
- package/es/modules/unit/components/UnitItem/DefaultUnitItem.js +0 -29
- package/es/modules/unit/components/UnitItem/DefaultUnitItem.js.map +0 -1
- package/es/modules/unit/components/UnitItem/SubUnitItem.js +0 -45
- package/es/modules/unit/components/UnitItem/SubUnitItem.js.map +0 -1
- /package/es/modules/unit/components/UnitItem/{SubUnitItem.d.ts → index.d.ts} +0 -0
- /package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/FileExplorerTheme}/node-content-renderer.d.ts +0 -0
- /package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/FileExplorerTheme}/tree-node-renderer.d.ts +0 -0
- /package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/SortableTreeUnitTheme}/index.d.ts +0 -0
- /package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/SortableTreeUnitTheme}/index.js +0 -0
- /package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/SortableTreeUnitTheme}/tree-node-renderer.js +0 -0
- /package/es/modules/unit/components/{SortableTreeUnitTheme → UnitSortableTree/themes/SortableTreeUnitTheme}/tree-node-renderer.less +0 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Button, Form, Input, Modal } from "@voplus/antd";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import styles from "./index.less";
|
|
4
|
+
import { useApplicationContext } from "@voplus/morpho-data";
|
|
5
|
+
import { useObserver } from "mobx-react-lite";
|
|
6
|
+
const ChangeUserPassword = (props) => {
|
|
7
|
+
const context = useApplicationContext();
|
|
8
|
+
/** super admin不用输入Current Password */
|
|
9
|
+
// const superAdmin = context.user.info.isSuperAdmin;
|
|
10
|
+
const layout = {
|
|
11
|
+
labelCol: { span: 8 },
|
|
12
|
+
wrapperCol: { span: 16 }
|
|
13
|
+
};
|
|
14
|
+
const tailLayout = {
|
|
15
|
+
wrapperCol: { offset: 12, span: 12 }
|
|
16
|
+
};
|
|
17
|
+
const onFinish = (values) => {
|
|
18
|
+
console.log("Success:", values);
|
|
19
|
+
props.onChange();
|
|
20
|
+
};
|
|
21
|
+
const onFinishFailed = (errorInfo) => {
|
|
22
|
+
console.log("Failed:", errorInfo);
|
|
23
|
+
};
|
|
24
|
+
return useObserver(() => (React.createElement(Modal, { title: "Change Password", visible: true, footer: null, className: styles["clange-user-password"], onCancel: props.onCancel },
|
|
25
|
+
React.createElement(Form, Object.assign({}, layout, { name: "basic", initialValues: { remember: true }, onFinish: onFinish, onFinishFailed: onFinishFailed }),
|
|
26
|
+
React.createElement(Form.Item, { label: "Current Password", name: "current-password", rules: [{ required: true, message: "Please input your current Password!" }] },
|
|
27
|
+
React.createElement(Input.Password, null)),
|
|
28
|
+
React.createElement(Form.Item, { label: "New Password", name: "new-password", rules: [{ required: true, message: "Please input your new password!" }] },
|
|
29
|
+
React.createElement(Input.Password, null)),
|
|
30
|
+
React.createElement(Form.Item, { label: "Confirm Password", name: "confirm-password", rules: [{ required: true, message: "Please input your confirm password!" }] },
|
|
31
|
+
React.createElement(Input.Password, null)),
|
|
32
|
+
React.createElement(Form.Item, Object.assign({}, tailLayout, { className: "form-button" }),
|
|
33
|
+
React.createElement(Button, { onClick: props.onCancel }, "Cancel"),
|
|
34
|
+
React.createElement(Button, { type: "primary", htmlType: "submit" }, "Change"))))));
|
|
35
|
+
};
|
|
36
|
+
export default ChangeUserPassword;
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/unit/components/ChangeUserPassword/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,kBAAkB,GAAG,CAAC,KAAuD,EAAE,EAAE;IACtF,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,sCAAsC;IACtC,sDAAsD;IAEtD,MAAM,MAAM,GAAG;QACd,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE;QACrB,UAAU,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;KACxB,CAAC;IACF,MAAM,UAAU,GAAG;QAClB,UAAU,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;KACpC,CAAC;IAEF,MAAM,QAAQ,GAAG,CAAC,MAAW,EAAE,EAAE;QAChC,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAChC,KAAK,CAAC,QAAS,EAAE,CAAC;IACnB,CAAC,CAAC;IAEF,MAAM,cAAc,GAAG,CAAC,SAAc,EAAE,EAAE;QACzC,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IACnC,CAAC,CAAC;IACF,OAAO,WAAW,CAAC,GAAG,EAAE,CAA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AC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Col, Row, Switch } from "@voplus/antd";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import ChangeUserPassword from "../ChangeUserPassword";
|
|
4
|
+
import { EditOutlined } from "@ant-design/icons";
|
|
5
|
+
import { State } from "./state";
|
|
6
|
+
import styles from "./index.less";
|
|
7
|
+
import { useApplicationContext } from "@voplus/morpho-data";
|
|
8
|
+
import { useObserver } from "mobx-react-lite";
|
|
9
|
+
const ContactUserInfoView = () => {
|
|
10
|
+
const [state] = useState(new State());
|
|
11
|
+
const context = useApplicationContext();
|
|
12
|
+
const userId = context.user.info ? context.user.info.id : null;
|
|
13
|
+
/** 是否super admin, active只有super admin能改, Password 只有super admin或自己能改 */
|
|
14
|
+
// const superAdmin = context.user.info.isSuperAdmin;
|
|
15
|
+
return useObserver(() => (React.createElement(React.Fragment, null,
|
|
16
|
+
React.createElement("div", { className: styles["contact-user-info"] },
|
|
17
|
+
React.createElement(Row, null,
|
|
18
|
+
React.createElement(Col, { flex: "80px", className: "col-label" }, "Active:"),
|
|
19
|
+
React.createElement(Col, { flex: "auto", className: "col-info" },
|
|
20
|
+
React.createElement(Switch, { defaultChecked: true, onChange: onChange }))),
|
|
21
|
+
React.createElement(Row, null,
|
|
22
|
+
React.createElement(Col, { flex: "80px", className: "col-label" }, "Email:"),
|
|
23
|
+
React.createElement(Col, { flex: "auto" }, "1774200065@163.com")),
|
|
24
|
+
React.createElement(Row, null,
|
|
25
|
+
React.createElement(Col, { flex: "80px", className: "col-label" }, "Password:"),
|
|
26
|
+
React.createElement(Col, { flex: "auto", className: "col-info" },
|
|
27
|
+
React.createElement(EditOutlined, { style: { color: "#1890ff", cursor: "pointer" }, onClick: () => (state.visible = !state.visible) }))),
|
|
28
|
+
React.createElement(Row, null,
|
|
29
|
+
React.createElement(Col, { flex: "80px", className: "col-label" }, "Last Login:"),
|
|
30
|
+
React.createElement(Col, { flex: "auto" }, "2020/7/15 10:19"))),
|
|
31
|
+
state.visible && (React.createElement(ChangeUserPassword, { onCancel: () => (state.visible = false), onChange: onPassword })))));
|
|
32
|
+
function onChange(checked, event) {
|
|
33
|
+
console.log("onChange", checked);
|
|
34
|
+
}
|
|
35
|
+
function onPassword() {
|
|
36
|
+
state.visible = false;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
export default ContactUserInfoView;
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/unit/components/ContactUserInfoView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,kBAAkB,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,mBAAmB,GAAG,GAAG,EAAE;IAChC,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IACtC,MAAM,OAAO,GAAG,qBAAqB,EAAE,CAAC;IACxC,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC/D,wEAAwE;IACxE,sDAAsD;IAEtD,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,o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AAO,CAAC,GAAG,CAAC,UAAU,EAAE,OAAO,CAAC,CAAC;IAClC,CAAC;IAED,SAAS,UAAU;QAClB,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
.contact-user-info {
|
|
2
|
+
margin: 20px;
|
|
3
|
+
padding-right: 50px;
|
|
4
|
+
:global {
|
|
5
|
+
.col-label {
|
|
6
|
+
font-size: 15px;
|
|
7
|
+
color: #000000;
|
|
8
|
+
cursor: default;
|
|
9
|
+
}
|
|
10
|
+
.col-info{
|
|
11
|
+
text-align: right;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ant-row{
|
|
15
|
+
height: 32px;
|
|
16
|
+
line-height: 32px;
|
|
17
|
+
margin-bottom: 15px;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { observable } from "mobx";
|
|
3
|
+
export class State {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.visible = false;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
__decorate([
|
|
9
|
+
observable
|
|
10
|
+
], State.prototype, "id", void 0);
|
|
11
|
+
__decorate([
|
|
12
|
+
observable
|
|
13
|
+
], State.prototype, "visible", void 0);
|
|
14
|
+
//# sourceMappingURL=state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/unit/components/ContactUserInfoView/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAU,UAAU,EAAE,MAAM,MAAM,CAAC;AAE1C,MAAM,OAAO,KAAK;IAAlB;QAGoB,YAAO,GAAG,KAAK,CAAC;IACpC,CAAC;CAAA;AAFY;IAAX,UAAU;iCAAmB;AAClB;IAAX,UAAU;sCAAwB"}
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { BatchHeader, DeleteButton, MoveButton } from "@voplus/morpho-ui/es/components/layout/ListView/headers";
|
|
2
|
-
import { DocumentStatusFilter, FlagFilter } from "../../../../controls/filters";
|
|
3
2
|
import { useAutoUpdateMemberListData, useTeamListEffect, useUnitStore } from "../../data";
|
|
4
3
|
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
|
|
5
4
|
import React, { useEffect } from "react";
|
|
6
5
|
import { State } from "./state";
|
|
7
|
-
import ContactSelect from "../../controls/ContactSelect";
|
|
8
|
-
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
9
6
|
import ListView from "@voplus/morpho-ui/es/components/layout/ListView/ListView2";
|
|
10
|
-
import
|
|
11
|
-
import
|
|
7
|
+
import UnitItem from "../UnitItem";
|
|
8
|
+
import UnitTypeFilter from "../../controls/UnitTypeFilter";
|
|
9
|
+
import UnitsSelectDialog from "../UnitsSelectDialog";
|
|
12
10
|
import classnames from "classnames";
|
|
13
|
-
import {
|
|
11
|
+
import { message } from "@voplus/antd";
|
|
14
12
|
import styles from "./index.less";
|
|
15
13
|
import { useDeepMemo } from "@voplus/morpho-data";
|
|
16
14
|
import { useObserver } from "mobx-react-lite";
|
|
@@ -39,29 +37,20 @@ const Members = (props) => {
|
|
|
39
37
|
] })),
|
|
40
38
|
addAble: !readonly,
|
|
41
39
|
filterViewProps: {
|
|
42
|
-
columns: [React.createElement(
|
|
40
|
+
columns: [React.createElement(UnitTypeFilter, { key: "Type" })]
|
|
43
41
|
},
|
|
44
42
|
onAdd: () => (state.addAble = !state.addAble)
|
|
45
43
|
}, moveAfter: moveAfter, renderItem: ({ item, index, multiple, connectDragSource }) => (React.createElement(UnitItem, { id: item.id, parentId: parentId, index: index, type: "sub", multiple: multiple, reload: !!readonly })) }),
|
|
46
|
-
state.addAble &&
|
|
47
|
-
React.createElement("div", { className: "form-item-layout" },
|
|
48
|
-
React.createElement(ContactSelect, { type: "People", allowNew: true, onChange: onChange }),
|
|
49
|
-
React.createElement("span", { className: "detailed", onClick: onSave },
|
|
50
|
-
React.createElement(FAIcon, { icon: faListAlt, size: "lg" })))))))));
|
|
51
|
-
/** ContactSelect select user */
|
|
52
|
-
function onChange(c) {
|
|
53
|
-
state.id = c[0].id;
|
|
54
|
-
}
|
|
44
|
+
state.addAble && React.createElement(UnitsSelectDialog, { multiSelect: false, onSelect: onSelect })))));
|
|
55
45
|
/** add member save */
|
|
56
|
-
async function
|
|
57
|
-
if (
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
46
|
+
async function onSelect(unit) {
|
|
47
|
+
if (unit[0].type !== "User")
|
|
48
|
+
return message.info("Must be a user!");
|
|
49
|
+
await store.addUserFromGroup({
|
|
50
|
+
pid: parentId,
|
|
51
|
+
id: unit[0].id
|
|
52
|
+
});
|
|
53
|
+
state.addAble = false;
|
|
65
54
|
}
|
|
66
55
|
function onMove(state) {
|
|
67
56
|
store.cut(state.ids);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/unit/components/Members/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,WAAW,EACX,YAAY,EACZ,UAAU,EACV,MAAM,yDAAyD,CAAC;AACjE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/unit/components/Members/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,WAAW,EACX,YAAY,EACZ,UAAU,EACV,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAS,2BAA2B,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AACjG,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AACnD,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,GAAI,CAC1E,CACoB,CAC3B,CAAC,CAAC;IAEH,sBAAsB;IACtB,KAAK,UAAU,QAAQ,CAAC,IAAkD;QACzE,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,KAAK,MAAM;YAAE,OAAO,OAAO,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;QACpE,MAAM,KAAK,CAAC,gBAAgB,CAAC;YAC5B,GAAG,EAAE,QAAQ;YACb,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE;SACd,CAAC,CAAC;QACH,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,SAAS,MAAM,CAAC,KAAwB;QACvC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;IAED,oBAAoB;IACpB,KAAK,UAAU,SAAS,CAAC,EAAU,EAAE,OAAe;QACnD,MAAM,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IACpC,CAAC;IACD,KAAK,UAAU,QAAQ,CAAC,KAAwB;QAC/C,MAAM,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAClC,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -5,7 +5,7 @@ declare const NewUnitForm: (props: {
|
|
|
5
5
|
parentId: string;
|
|
6
6
|
className?: string | undefined;
|
|
7
7
|
simple?: boolean | undefined;
|
|
8
|
-
type?: "
|
|
8
|
+
type?: "Team" | "User" | "Account" | "Organization" | undefined;
|
|
9
9
|
onSave?: ((params?: any) => void) | undefined;
|
|
10
10
|
onCancel?: (() => void) | undefined;
|
|
11
11
|
}) => JSX.Element;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import "./index.less";
|
|
3
2
|
import { UnitListProps } from "./state";
|
|
4
|
-
declare const SubUnitList:
|
|
3
|
+
declare const SubUnitList: {
|
|
4
|
+
(props: UnitListProps): JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
addAble: boolean;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
5
9
|
export default SubUnitList;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import "./index.less";
|
|
2
1
|
import { BatchHeader, DeleteButton, MoveButton } from "@voplus/morpho-ui/es/components/layout/ListView/headers";
|
|
3
|
-
import { DocumentStatusFilter, FlagFilter } from "../../../../controls/filters";
|
|
4
2
|
import { useAutoUpdateUnitListData, useUnitListEffect, useUnitStore } from "../../data";
|
|
5
3
|
import { ListDataContext, useCreateListDataState } from "@voplus/morpho-ui/es/data";
|
|
6
4
|
import React, { useEffect } from "react";
|
|
@@ -8,8 +6,10 @@ import { State } from "./state";
|
|
|
8
6
|
import AddUnitDropdown from "../AddUnitDropdown";
|
|
9
7
|
import ListView from "@voplus/morpho-ui/es/components/layout/ListView/ListView2";
|
|
10
8
|
import NewUnitForm from "../NewUnitForm";
|
|
11
|
-
import UnitItem from "../UnitItem
|
|
9
|
+
import UnitItem from "../UnitItem";
|
|
10
|
+
import UnitTypeFilter from "../../controls/UnitTypeFilter";
|
|
12
11
|
import classnames from "classnames";
|
|
12
|
+
import styles from "./index.less";
|
|
13
13
|
import { useDeepMemo } from "@voplus/morpho-data";
|
|
14
14
|
import { useObserver } from "mobx-react-lite";
|
|
15
15
|
import { useRenderOnChange } from "@voplus/morpho-ui";
|
|
@@ -17,18 +17,12 @@ const SubUnitList = (props) => {
|
|
|
17
17
|
const { readonly, parentId } = props;
|
|
18
18
|
const store = useUnitStore();
|
|
19
19
|
const state = useDeepMemo(() => new State(), [props.parentId]);
|
|
20
|
+
state.props = props;
|
|
21
|
+
state.id = props.parentId || "";
|
|
20
22
|
/** 建立 ListView 和useContactListEffect所需的ListDataState. 会根据parentId重建所以不需reset. */
|
|
21
23
|
const list = useCreateListDataState({
|
|
22
24
|
filterDefaults: {
|
|
23
|
-
filters:
|
|
24
|
-
{ c: "ParentNodeId", o: "=", l: "And", v1: parentId },
|
|
25
|
-
{
|
|
26
|
-
c: "Type",
|
|
27
|
-
o: "=",
|
|
28
|
-
l: "And",
|
|
29
|
-
v1: "Group"
|
|
30
|
-
}
|
|
31
|
-
]
|
|
25
|
+
filters: state.filters
|
|
32
26
|
}
|
|
33
27
|
}, [parentId]);
|
|
34
28
|
/** 如果 list.filters.options变更了就重渲染,使下一行的useContactListEffect 可以接收新参数*/
|
|
@@ -41,20 +35,20 @@ const SubUnitList = (props) => {
|
|
|
41
35
|
state.clearAdd();
|
|
42
36
|
}, [parentId]);
|
|
43
37
|
return useObserver(() => (React.createElement(ListDataContext.Provider, { value: list },
|
|
44
|
-
React.createElement("div", { className: classnames("sub-units-list", props.className) },
|
|
45
|
-
React.createElement(ListView, { renderId: parentId, headerProps: {
|
|
46
|
-
header: (React.createElement("div", null,
|
|
38
|
+
React.createElement("div", { className: classnames(styles["sub-units-list"], props.className) },
|
|
39
|
+
React.createElement(ListView, { className: "units-list-view", renderId: parentId, headerProps: {
|
|
40
|
+
header: props.multiple ? (React.createElement("div", null,
|
|
47
41
|
React.createElement(BatchHeader, { viewTitle: "Sub-Units", buttons: [
|
|
48
42
|
React.createElement(DeleteButton, { execute: onDelete, key: "DeleteButton" }),
|
|
49
43
|
React.createElement(MoveButton, { execute: onMove, key: "MoveButton" })
|
|
50
44
|
] }),
|
|
51
|
-
React.createElement(AddUnitDropdown, { className: "add-unit-dropdown", types: ["Organization", "Team"], onItemClick: (val) => state.onItemClick(val), onCancelClick: () => state.clearAdd() }))),
|
|
52
|
-
|
|
45
|
+
props.addAble && (React.createElement(AddUnitDropdown, { className: "add-unit-dropdown", types: ["Organization", "Team"], onItemClick: (val) => state.onItemClick(val), onCancelClick: () => state.clearAdd() })))) : (undefined),
|
|
46
|
+
searchHeader: props.type === "select" ? true : false,
|
|
47
|
+
addAble: props.addAble,
|
|
53
48
|
filterViewProps: {
|
|
54
|
-
columns: [React.createElement(
|
|
49
|
+
columns: [React.createElement(UnitTypeFilter, { key: "Type" })]
|
|
55
50
|
}
|
|
56
|
-
|
|
57
|
-
}, moveAfter: moveAfter, renderItem: ({ item, index, multiple, connectDragSource }) => (React.createElement(UnitItem, { id: item.id, index: index, type: "sub", multiple: multiple, reload: !!readonly })) }),
|
|
51
|
+
}, moveAfter: moveAfter, renderItem: ({ item, index, multiple, connectDragSource }) => (React.createElement(React.Fragment, null, props.type === "select" ? (React.createElement(UnitItem, { id: item.id, index: index, type: "select", onSelectUnit: props.onSelectUnit })) : (React.createElement(UnitItem, { id: item.id, index: index, type: "sub", multiple: multiple, reload: !!readonly })))) }),
|
|
58
52
|
state.addAble && React.createElement(NewUnitForm, { parentId: props.parentId, simple: true, type: state.type })))));
|
|
59
53
|
function onMove(state) {
|
|
60
54
|
store.cut(state.ids);
|
|
@@ -67,5 +61,8 @@ const SubUnitList = (props) => {
|
|
|
67
61
|
await store.delete(state.ids[0]);
|
|
68
62
|
}
|
|
69
63
|
};
|
|
64
|
+
SubUnitList.defaultProps = {
|
|
65
|
+
addAble: true
|
|
66
|
+
};
|
|
70
67
|
export default SubUnitList;
|
|
71
68
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/unit/components/SubUnitList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/unit/components/SubUnitList/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,WAAW,EACX,YAAY,EACZ,UAAU,EACV,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAGN,yBAAyB,EACzB,iBAAiB,EACjB,YAAY,EACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,KAAK,EAAE,EAAE,SAAS,EAAY,MAAM,OAA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AAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IAClC,CAAC;AACF,CAAC,CAAC;AAEF,WAAW,CAAC,YAAY,GAAG;IAC1B,OAAO,EAAE,IAAI;CACb,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@import "~@voplus/antd/es/style/themes/default.less";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
.sub-units-list {
|
|
4
|
+
:global {
|
|
4
5
|
display: flex;
|
|
5
6
|
flex-direction: column;
|
|
6
7
|
height: 100%;
|
|
@@ -9,14 +10,19 @@
|
|
|
9
10
|
font-weight: 600;
|
|
10
11
|
color: #000;
|
|
11
12
|
}
|
|
12
|
-
.list-view-header{
|
|
13
|
+
.list-view-header {
|
|
13
14
|
position: relative;
|
|
14
|
-
.add-unit-dropdown{
|
|
15
|
+
.add-unit-dropdown {
|
|
15
16
|
position: absolute;
|
|
16
17
|
right: 20px;
|
|
17
18
|
top: 50%;
|
|
18
19
|
transform: translateY(-50%);
|
|
19
20
|
}
|
|
20
21
|
}
|
|
22
|
+
.units-list-view {
|
|
23
|
+
.list-view-header .plus-icon {
|
|
24
|
+
background: transparent;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
21
27
|
}
|
|
22
28
|
}
|
|
@@ -5,14 +5,29 @@ export declare type UnitListProps = {
|
|
|
5
5
|
scrollParentRef?: any;
|
|
6
6
|
header?: boolean;
|
|
7
7
|
readonly?: boolean;
|
|
8
|
+
multiple?: boolean;
|
|
9
|
+
type?: "detail" | "sub" | "select" | "drive";
|
|
10
|
+
viewTitle?: string;
|
|
11
|
+
addAble?: boolean;
|
|
12
|
+
onSelectUnit?: (params?: any) => void;
|
|
8
13
|
};
|
|
9
14
|
export declare class State {
|
|
10
15
|
props: UnitListProps;
|
|
16
|
+
id: string;
|
|
11
17
|
list: IUnit[];
|
|
12
18
|
addAble: boolean;
|
|
13
19
|
/** add unit type */
|
|
14
20
|
type: unitType;
|
|
21
|
+
/** unitlist filter name */
|
|
22
|
+
name: string;
|
|
23
|
+
/** all units to check */
|
|
24
|
+
checkAll: boolean;
|
|
15
25
|
clearAdd(): void;
|
|
16
26
|
/** AddDocDropdown(新增type下拉Menu) item click */
|
|
17
27
|
onItemClick(val: unitType): void;
|
|
28
|
+
/**
|
|
29
|
+
* document filters
|
|
30
|
+
* @return document filters
|
|
31
|
+
*/
|
|
32
|
+
get filters(): any[];
|
|
18
33
|
}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { action, observable } from "mobx";
|
|
2
|
+
import { action, computed, observable } from "mobx";
|
|
3
3
|
export class State {
|
|
4
4
|
constructor() {
|
|
5
|
+
this.id = "";
|
|
5
6
|
this.list = [];
|
|
6
7
|
this.addAble = false;
|
|
8
|
+
/** unitlist filter name */
|
|
9
|
+
this.name = "";
|
|
10
|
+
/** all units to check */
|
|
11
|
+
this.checkAll = false;
|
|
7
12
|
}
|
|
8
13
|
clearAdd() {
|
|
9
14
|
this.addAble = false;
|
|
@@ -13,7 +18,28 @@ export class State {
|
|
|
13
18
|
this.type = val;
|
|
14
19
|
this.addAble = true;
|
|
15
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* document filters
|
|
23
|
+
* @return document filters
|
|
24
|
+
*/
|
|
25
|
+
get filters() {
|
|
26
|
+
let filters = [];
|
|
27
|
+
if (this.id) {
|
|
28
|
+
filters.push({ c: "ParentNodeId", o: "=", l: "And", v1: this.id });
|
|
29
|
+
}
|
|
30
|
+
if (this.name) {
|
|
31
|
+
filters.push({ c: "Name", o: "contains", v1: this.name, l: "And" });
|
|
32
|
+
}
|
|
33
|
+
if (this.props.type !== "select") {
|
|
34
|
+
filters.push({ c: "Type", o: "=", l: "And", v1: "Group" });
|
|
35
|
+
}
|
|
36
|
+
filters = [...filters];
|
|
37
|
+
return filters;
|
|
38
|
+
}
|
|
16
39
|
}
|
|
40
|
+
__decorate([
|
|
41
|
+
observable
|
|
42
|
+
], State.prototype, "id", void 0);
|
|
17
43
|
__decorate([
|
|
18
44
|
observable
|
|
19
45
|
], State.prototype, "list", void 0);
|
|
@@ -23,10 +49,19 @@ __decorate([
|
|
|
23
49
|
__decorate([
|
|
24
50
|
observable
|
|
25
51
|
], State.prototype, "type", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
observable
|
|
54
|
+
], State.prototype, "name", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
observable
|
|
57
|
+
], State.prototype, "checkAll", void 0);
|
|
26
58
|
__decorate([
|
|
27
59
|
action
|
|
28
60
|
], State.prototype, "clearAdd", null);
|
|
29
61
|
__decorate([
|
|
30
62
|
action
|
|
31
63
|
], State.prototype, "onItemClick", null);
|
|
64
|
+
__decorate([
|
|
65
|
+
computed
|
|
66
|
+
], State.prototype, "filters", null);
|
|
32
67
|
//# sourceMappingURL=state.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/unit/components/SubUnitList/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"state.js","sourceRoot":"","sources":["../../../../../src/modules/unit/components/SubUnitList/state.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAepD,MAAM,OAAO,KAAK;IAAlB;QAEoB,OAAE,GAAG,EAAE,CAAC;QACR,SAAI,GAAY,EAAE,CAAC;QACnB,YAAO,GAAG,KAAK,CAAC;QAGnC,2BAA2B;QACR,SAAI,GAAG,EAAE,CAAC;QAC7B,0BAA0B;QACP,aAAQ,GAAG,KAAK,CAAC;IAiCrC,CAAC;IA9BO,QAAQ;QACd,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,8CAA8C;IAEvC,WAAW,CAAC,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
id: string;
|
|
6
|
+
index?: number;
|
|
7
|
+
includes?: string;
|
|
8
|
+
showAvatar?: boolean;
|
|
9
|
+
showQuickData?: boolean;
|
|
10
|
+
className?: string;
|
|
11
|
+
}): JSX.Element;
|
|
12
|
+
defaultProps: {
|
|
13
|
+
showAvatar: boolean;
|
|
14
|
+
showQuickData: boolean;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
export default UnitItem;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "./index.less";
|
|
2
|
+
import QuickDataIcon from "../../controls/QuickDataIcon";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import UnitAvatar from "../UnitAvatar";
|
|
5
|
+
import classnames from "classnames";
|
|
6
|
+
import { useObserver } from "mobx-react-lite";
|
|
7
|
+
import { useUnit } from "../../data";
|
|
8
|
+
const UnitItem = (props) => {
|
|
9
|
+
const { id, index, includes, showAvatar, showQuickData, className } = props;
|
|
10
|
+
const contact = useUnit(id, { includes: includes });
|
|
11
|
+
return useObserver(() => (React.createElement("div", { className: classnames("unit-detail", className) },
|
|
12
|
+
showAvatar && (React.createElement("div", { className: "unit-avatar" },
|
|
13
|
+
React.createElement(UnitAvatar, { id: id, size: "large", index: index }))),
|
|
14
|
+
React.createElement("div", null,
|
|
15
|
+
React.createElement("div", { className: "unit-name" }, contact.name),
|
|
16
|
+
showQuickData && (React.createElement("div", null,
|
|
17
|
+
React.createElement(QuickDataIcon, { id: id })))))));
|
|
18
|
+
};
|
|
19
|
+
UnitItem.defaultProps = {
|
|
20
|
+
showAvatar: true,
|
|
21
|
+
showQuickData: true
|
|
22
|
+
};
|
|
23
|
+
export default UnitItem;
|
|
24
|
+
//# sourceMappingURL=Item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Item.js","sourceRoot":"","sources":["../../../../../src/modules/unit/components/UnitItem/Item.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,aAAa,MAAM,8BAA8B,CAAC;AACzD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,MAAM,QAAQ,GAAG,CAAC,KAOjB,EAAE,EAAE;IACJ,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,SAAS,EAAE,GAAG,KAAK,CAAC;IAC5E,MAAM,OAAO,GAAG,OAAO,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,QAAS,EAAE,CAAC,CAAC;IAErD,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,6BAAK,SAAS,EAAE,UAAU,CAAC,aAAa,EAAE,SAAS,CAAC;QAClD,UAAU,IAAI,CACd,6BAAK,SAAS,EAAC,aAAa;YAC3B,oBAAC,UAAU,IAAC,EAAE,EAAE,EAAE,EAAE,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,KAAK,GAAI,CAC5C,CACN;QACD;YACC,6BAAK,SAAS,EAAC,WAAW,IAAE,OAAO,CAAC,IAAI,CAAO;YAC9C,aAAa,IAAI,CACjB;gBACC,oBAAC,aAAa,IAAC,EAAE,EAAE,EAAE,GAAI,CACpB,CACN,CACI,CACD,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,QAAQ,CAAC,YAAY,GAAG;IACvB,UAAU,EAAE,IAAI;IAChB,aAAa,EAAE,IAAI;CACnB,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { State } from "./state";
|
|
3
|
+
import { UnitContext, UnitContextState, useUnitContext } from "../../data/UnitContext";
|
|
4
|
+
import { useUnit, useUnitStore } from "../../data";
|
|
5
|
+
import { Checkbox } from "@voplus/antd";
|
|
6
|
+
import Item from "./Item";
|
|
7
|
+
import ToolBar from "../../controls/ToolBar";
|
|
8
|
+
import classnames from "classnames";
|
|
9
|
+
import styles from "./index.less";
|
|
10
|
+
import { useObserver } from "mobx-react-lite";
|
|
11
|
+
const SubUnitItem = (props) => {
|
|
12
|
+
const { id, index, parentId, multiple, className, type } = props;
|
|
13
|
+
const [state] = useState(new State());
|
|
14
|
+
state.contact = useUnit(id);
|
|
15
|
+
const unitStore = useUnitStore();
|
|
16
|
+
const store = useUnitContext();
|
|
17
|
+
const [options] = useState(new UnitContextState());
|
|
18
|
+
return useObserver(() => (React.createElement(UnitContext.Provider, { value: options },
|
|
19
|
+
React.createElement("div", { className: classnames(styles["unit-item-content"], className) },
|
|
20
|
+
type === "sub" && (React.createElement("div", { className: "unit-item", onMouseLeave: () => (state.isHover = false) },
|
|
21
|
+
React.createElement("div", { className: classnames("unit-item_box", { "unit-item_hover": state.isHover }), onMouseOver: () => (state.isHover = !multiple && !state.editable) },
|
|
22
|
+
multiple && React.createElement(Checkbox, { value: props.id, className: "multiple-checkbox" }),
|
|
23
|
+
React.createElement(Item, { id: id, index: index })),
|
|
24
|
+
React.createElement("div", { className: classnames("hover-operate-icon", { show: state.isHover }) },
|
|
25
|
+
React.createElement(ToolBar, { id: props.id, size: "middle", url: `/units/${props.id}`, onDelete: onDel })))),
|
|
26
|
+
type === "detail" && (React.createElement("div", { className: "unit-item" },
|
|
27
|
+
React.createElement(Item, { id: id, index: index }))),
|
|
28
|
+
type === "tree" && (React.createElement("div", { className: "unit-item", onClick: () => { var _a; return (_a = store === null || store === void 0 ? void 0 : store.onUnitSelected) === null || _a === void 0 ? void 0 : _a.call(store, state.contact.id); } },
|
|
29
|
+
React.createElement(Item, { id: id, index: index }))),
|
|
30
|
+
type === "select" && (React.createElement("div", { className: "unit-item", onDoubleClick: () => { var _a; return (_a = props.onSelectUnit) === null || _a === void 0 ? void 0 : _a.call(props, state.contact); } },
|
|
31
|
+
React.createElement(Item, { id: id, index: index })))))));
|
|
32
|
+
/** unit item delete */
|
|
33
|
+
function onDel() {
|
|
34
|
+
if (state.contact.type === "User" && parentId) {
|
|
35
|
+
unitStore.deleteUser({ pid: parentId, id: id });
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
unitStore.delete(id);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
export default SubUnitItem;
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/unit/components/UnitItem/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,KAAK,EAAiB,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACvF,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,OAAO,MAAM,wBAAwB,CAAC;AAC7C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,MAAM,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,WAAW,GAAG,CAAC,KAAoB,EAAE,EAAE;IAC5C,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACjE,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IACtC,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;IAC5B,M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