@voplus/morpho-csp 1.2.81 → 1.2.82
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare type PropertiesName = "Type" | "Contact" | "Status" | "Owner"
|
|
2
|
+
export declare type PropertiesName = "Type" | "Contact" | "Status" | "Owner";
|
|
3
3
|
declare const CLDAProperties: {
|
|
4
4
|
(props: {
|
|
5
5
|
id: string;
|
|
@@ -12,6 +12,10 @@ declare const CLDAProperties: {
|
|
|
12
12
|
wrapperCol?: number;
|
|
13
13
|
/** 可隐藏某个 properties */
|
|
14
14
|
customProperties?: PropertiesName[];
|
|
15
|
+
documentPropertiesConfig?: {
|
|
16
|
+
name: "Tags" | "Create Date" | "Create By" | "Folder";
|
|
17
|
+
hide: boolean;
|
|
18
|
+
}[];
|
|
15
19
|
}): JSX.Element;
|
|
16
20
|
defaultProps: {
|
|
17
21
|
customProperties: string[];
|
|
@@ -3,31 +3,22 @@ import CLDAStatusButton from "../../controls/CLDAStatusButton";
|
|
|
3
3
|
import DocumentProperties from "@voplus/morpho-document/es/components/DocumentProperties";
|
|
4
4
|
import { Form } from "@voplus/antd";
|
|
5
5
|
import MetionList from "@voplus/morpho-org/es/controls/MetionList";
|
|
6
|
-
import React
|
|
6
|
+
import React from "react";
|
|
7
7
|
import Scrollbars from "react-custom-scrollbars";
|
|
8
8
|
import classnames from "classnames";
|
|
9
9
|
import { observe } from "@voplus/morpho-ui";
|
|
10
10
|
import styles from "./index.less";
|
|
11
11
|
const CLDAProperties = (props) => {
|
|
12
|
-
const { id, labelCol, wrapperCol, title, customProperties } = props;
|
|
12
|
+
const { id, labelCol, wrapperCol, title, customProperties, documentPropertiesConfig } = props;
|
|
13
13
|
const CLDA = useCLDA(id, { reload: true });
|
|
14
14
|
const CLDAStore = useCLDAStore();
|
|
15
|
-
const [visibleMore, setVisibleMore] = useState(false);
|
|
16
15
|
return observe(() => (React.createElement("div", { className: classnames(styles["clda-properties"], "properties-list") },
|
|
17
16
|
title && (React.createElement("div", { className: "properties-header" },
|
|
18
17
|
React.createElement("div", { className: "title" }, title))),
|
|
19
18
|
React.createElement(Scrollbars, { autoHide: true },
|
|
20
19
|
React.createElement(Form, { labelAlign: "left", labelCol: { span: labelCol || 10 }, scrollToFirstError: true }, customProperties === null || customProperties === void 0 ? void 0 :
|
|
21
20
|
customProperties.map((i) => (React.createElement(React.Fragment, { key: i }, renderProp(i)))),
|
|
22
|
-
|
|
23
|
-
{ name: "Create By", hide: (customProperties === null || customProperties === void 0 ? void 0 : customProperties.includes("Create By")) ? false : true },
|
|
24
|
-
{
|
|
25
|
-
name: "Create Date",
|
|
26
|
-
hide: (customProperties === null || customProperties === void 0 ? void 0 : customProperties.includes("Create Date")) ? false : true,
|
|
27
|
-
},
|
|
28
|
-
{ name: "Tags", hide: (customProperties === null || customProperties === void 0 ? void 0 : customProperties.includes("Tags")) ? false : true },
|
|
29
|
-
{ name: "Folder", hide: (customProperties === null || customProperties === void 0 ? void 0 : customProperties.includes("Folder")) ? false : true },
|
|
30
|
-
] })))))));
|
|
21
|
+
React.createElement(DocumentProperties, { id: id, wrapperCol: wrapperCol || 12, config: documentPropertiesConfig }))))));
|
|
31
22
|
function renderProp(p) {
|
|
32
23
|
switch (p) {
|
|
33
24
|
case "Type":
|
|
@@ -46,18 +37,11 @@ const CLDAProperties = (props) => {
|
|
|
46
37
|
React.createElement(MetionList, { multiple: false, contacts: CLDA.owner ? [CLDA.owner] : [], onChange: (list) => {
|
|
47
38
|
CLDAStore.edit(id, { data: { OwnerId: list[0].id }, error: "message" });
|
|
48
39
|
} })));
|
|
49
|
-
case "Tags":
|
|
50
|
-
case "Create By":
|
|
51
|
-
case "Create Date":
|
|
52
|
-
case "Folder":
|
|
53
|
-
setVisibleMore(true);
|
|
54
|
-
default:
|
|
55
|
-
return React.createElement(React.Fragment, null);
|
|
56
40
|
}
|
|
57
41
|
}
|
|
58
42
|
};
|
|
59
43
|
CLDAProperties.defaultProps = {
|
|
60
|
-
customProperties: ["Contact", "Owner", "Status", "Type"
|
|
44
|
+
customProperties: ["Contact", "Owner", "Status", "Type"],
|
|
61
45
|
};
|
|
62
46
|
export default CLDAProperties;
|
|
63
47
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/clda/components/CLDAProperties/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,gBAAgB,MAAM,iCAAiC,CAAC;AAC/D,OAAO,kBAAkB,MAAM,0DAA0D,CAAC;AAC1F,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,UAAU,MAAM,2CAA2C,CAAC;AACnE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/modules/corporate/clda/components/CLDAProperties/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEjE,OAAO,gBAAgB,MAAM,iCAAiC,CAAC;AAC/D,OAAO,kBAAkB,MAAM,0DAA0D,CAAC;AAC1F,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,UAAU,MAAM,2CAA2C,CAAC;AACnE,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,MAAM,MAAM,cAAc,CAAC;AAIlC,MAAM,cAAc,GAAG,CAAC,KAgBvB,EAAE,EAAE;IACJ,MAAM,EAAE,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,KA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,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;wBACzE,CAAC,GACA,CACS,CACZ,CAAC;SACH;IACF,CAAC;AACF,CAAC,CAAC;AAEF,cAAc,CAAC,YAAY,GAAG;IAC7B,gBAAgB,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC;CACxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voplus/morpho-csp",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.82",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://voplus.visualstudio.com/morpho-csp/_git/morpho-csp"
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"@antv/x6": ">=1.10.0",
|
|
33
33
|
"@voplus/morpho-collaboration-action": "1.x",
|
|
34
34
|
"@voplus/morpho-document": "1.x",
|
|
35
|
+
"@voplus/morpho-workspace": "1.x",
|
|
35
36
|
"@voplus/morpho-finance": "1.x",
|
|
36
37
|
"@voplus/morpho-form": "1.x",
|
|
37
38
|
"dagre": "^0.8.5",
|
|
@@ -48,7 +49,6 @@
|
|
|
48
49
|
"@voplus/morpho-client-test": "1.x",
|
|
49
50
|
"@voplus/morpho-storybook": "1.x",
|
|
50
51
|
"@voplus/morpho-test": "1.x",
|
|
51
|
-
"@voplus/morpho-workspace": "1.x",
|
|
52
52
|
"react": "17.x",
|
|
53
53
|
"react-dom": "17.x",
|
|
54
54
|
"react-stripe-elements": "^6.1.2"
|