@voplus/morpho-document 9.0.16 → 9.0.18
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/AddDocOverlay/index.d.ts +1 -6
- package/es/components/AddDocOverlay/index.js +9 -30
- package/es/components/AddDocOverlay/index.js.map +1 -1
- package/es/components/AddFormView/index.js.map +1 -1
- package/es/components/NewDocumentForm/DocumentForm.js +45 -38
- package/es/components/NewDocumentForm/DocumentForm.js.map +1 -1
- package/es/components/NewDocumentForm/index.css +0 -22
- package/es/components/NewDocumentForm/index.d.ts +1 -1
- package/es/components/NewDocumentForm/index.js +4 -3
- package/es/components/NewDocumentForm/index.js.map +1 -1
- package/es/data/DocumentType.d.ts +5 -1
- package/es/data/DocumentType.js +27 -0
- package/es/data/DocumentType.js.map +1 -1
- package/package.json +1 -1
- /package/es/style/{index.less → index.css} +0 -0
|
@@ -2,10 +2,5 @@ import React from "react";
|
|
|
2
2
|
import { AddDocumentDropdownProps } from "./state";
|
|
3
3
|
import "./index.css";
|
|
4
4
|
/** documentList 新增 下列更多菜单*/
|
|
5
|
-
declare const AddDocumentOverlay:
|
|
6
|
-
(props: AddDocumentDropdownProps): React.JSX.Element;
|
|
7
|
-
defaultProps: {
|
|
8
|
-
types: string[];
|
|
9
|
-
};
|
|
10
|
-
};
|
|
5
|
+
declare const AddDocumentOverlay: (props: AddDocumentDropdownProps) => React.JSX.Element;
|
|
11
6
|
export default AddDocumentOverlay;
|
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
2
|
import { State } from "./state";
|
|
3
|
-
import { Input, Menu, Upload } from "antd";
|
|
4
3
|
import { FontAwesomeIcon as FAIcon, faUploadSolid } from "@voplus/morpho-ui/es/faIcons";
|
|
5
|
-
import { useApplicationContext, useLayout } from "@voplus/morpho-data";
|
|
6
4
|
import { useDocumentStore, useMetaStore } from "@voplus/morpho-document-core";
|
|
5
|
+
import { useNewDocumentTypes } from "../../data/DocumentType";
|
|
6
|
+
import { useApplicationContext, useLayout } from "@voplus/morpho-data";
|
|
7
7
|
import { Scrollbars } from "react-custom-scrollbars-2";
|
|
8
8
|
import { observe } from "@voplus/morpho-ui";
|
|
9
|
+
import { Input, Menu, Upload } from "antd";
|
|
9
10
|
import "./index.css";
|
|
10
11
|
/** documentList 新增 下列更多菜单*/
|
|
11
12
|
const AddDocumentOverlay = (props) => {
|
|
13
|
+
var _a;
|
|
12
14
|
const layout = useLayout();
|
|
13
15
|
const meta = useMetaStore();
|
|
14
16
|
const store = useDocumentStore();
|
|
15
17
|
const appContext = useApplicationContext();
|
|
18
|
+
const newDocumentTypes = useNewDocumentTypes();
|
|
19
|
+
const fallbackTypes = newDocumentTypes.map((item) => item.label);
|
|
16
20
|
const [state] = useState(new State(store, appContext.host.isTest));
|
|
17
|
-
|
|
21
|
+
const types = (_a = props.types) !== null && _a !== void 0 ? _a : fallbackTypes;
|
|
22
|
+
state.props = { ...props, types };
|
|
18
23
|
/** 设置 Menu height */
|
|
19
24
|
useEffect(() => {
|
|
20
25
|
state.init();
|
|
21
26
|
if (state.items.length)
|
|
22
27
|
state.height = state.items.length * 36 + 47;
|
|
23
|
-
}, []);
|
|
28
|
+
}, [types]);
|
|
24
29
|
return observe(() => (React.createElement("div", { className: "document-operate-dropdown_2" },
|
|
25
30
|
React.createElement("div", { className: "menu-search" },
|
|
26
31
|
React.createElement(Input.Search, { autoFocus: true, onSearch: (value) => state.searchByKeWord(value), onChange: (e) => state.searchByKeWord(e.target.value) })),
|
|
@@ -78,31 +83,5 @@ const AddDocumentOverlay = (props) => {
|
|
|
78
83
|
return t;
|
|
79
84
|
}
|
|
80
85
|
};
|
|
81
|
-
AddDocumentOverlay.defaultProps = {
|
|
82
|
-
types: [
|
|
83
|
-
"Text",
|
|
84
|
-
"Folder",
|
|
85
|
-
"Document Register",
|
|
86
|
-
"Message Template",
|
|
87
|
-
"Action Plan Template",
|
|
88
|
-
"Task",
|
|
89
|
-
"Task (For Self) (Test)",
|
|
90
|
-
"Meeting Folder (Test)",
|
|
91
|
-
"Board",
|
|
92
|
-
"Graph",
|
|
93
|
-
"Deal",
|
|
94
|
-
"CLDA",
|
|
95
|
-
"Case",
|
|
96
|
-
"Quotation",
|
|
97
|
-
"Dashboard (Test)",
|
|
98
|
-
//"invoice",
|
|
99
|
-
//"journal",
|
|
100
|
-
"Library",
|
|
101
|
-
"Page",
|
|
102
|
-
"Sign Envelope",
|
|
103
|
-
"Form Schema",
|
|
104
|
-
"Form",
|
|
105
|
-
],
|
|
106
|
-
};
|
|
107
86
|
export default AddDocumentOverlay;
|
|
108
87
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AddDocOverlay/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AddDocOverlay/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAA4B,KAAK,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACxF,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAa,MAAM,8BAA8B,CAAC;AACzF,OAAO,EAAE,mBAAmB,EAAW,MAAM,yBAAyB,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,M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AC;QAEF,OAAO,QAAQ,CAAC;IACjB,CAAC;IAED,SAAS,oBAAoB,CAAC,IAAY;QACzC,IAAI,CAAC,GAAG,EAAE,CAAC;QAEX,QAAQ,IAAI,EAAE,CAAC;YACd,KAAK,QAAQ;gBACZ,CAAC,GAAG,UAAU,CAAC;gBACf,MAAM;YACP,KAAK,mBAAmB;gBACvB,CAAC,GAAG,UAAU,CAAC;gBACf,MAAM;YACP,KAAK,wBAAwB;gBAC5B,CAAC,GAAG,MAAM,CAAC;gBACX,MAAM;YACP,KAAK,kBAAkB;gBACtB,CAAC,GAAG,iBAAiB,CAAC;gBACtB,MAAM;YACP,KAAK,uBAAuB;gBAC3B,CAAC,GAAG,SAAS,CAAC;gBACd,MAAM;YACP,KAAK,sBAAsB;gBAC1B,CAAC,GAAG,YAAY,CAAC;gBACjB,MAAM;YACP;gBACC,CAAC,GAAG,IAAI,CAAC;QACX,CAAC;QAED,OAAO,CAAC,CAAC;IACV,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AddFormView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/AddFormView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACxF,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC/B,OAAO,aAAa,CAAC;AAErB,MAAM,WAAW,GAAG,CAAC,KAA0C,EAAE,EAAE;IAClE,MAAM,YAAY,GAAG,sBAAsB,EAAE,CAAC;IAE9C,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,OAAO,IAAC,KAAK,EAAC,SAAS;QACvB,8BACC,SAAS,EAAE,oBAAoB,EAC/B,OAAO,EAAE,GAAG,EAAE,CACb,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,CAAC,KAAK,CAAC,QAAQ,EAAE;gBACvC,IAAI,EAAE,EAAE;aACR,CAAC;YAGH,oBAAC,MAAM,IAAC,IAAI,EAAE,aAAa,GAAI,CACzB,CACE,CACV,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
|
+
import { observe } from "@voplus/morpho-ui";
|
|
3
|
+
import { useNewDocumentTypes } from "../../data/DocumentType";
|
|
4
|
+
import { useLayout, useApplicationContext } from "@voplus/morpho-data";
|
|
2
5
|
import { Button, Form, Input, Select, Spin, Space, Row, message } from "antd";
|
|
3
|
-
import { useDocumentStore } from "@voplus/morpho-document-core";
|
|
4
6
|
import { useAsideContentContext } from "@voplus/morpho-ui/es/components/layout/AsideContent";
|
|
7
|
+
import { useDocumentStore, useMetaStore } from "@voplus/morpho-document-core";
|
|
5
8
|
import { useViewLayoutContext } from "@voplus/morpho-ui/es/components/layout/DefaultViewLayout/ViewLayoutContext";
|
|
6
|
-
import { useLayout, useApplicationContext } from "@voplus/morpho-data";
|
|
7
|
-
import { observe } from "@voplus/morpho-ui";
|
|
8
9
|
import AddFormView from "@voplus/morpho-ui/es/controls/AddFormView";
|
|
9
10
|
import DocumentPropertiesView from "../DocumentPropertiesView";
|
|
10
11
|
import classnames from "classnames";
|
|
@@ -12,39 +13,25 @@ import "./index.css";
|
|
|
12
13
|
/** new document from */
|
|
13
14
|
const DocumentForm = (props) => {
|
|
14
15
|
const { placeholder } = props;
|
|
16
|
+
const { user } = useApplicationContext();
|
|
17
|
+
const meta = useMetaStore();
|
|
15
18
|
const layout = useLayout();
|
|
16
19
|
const documents = useDocumentStore();
|
|
17
|
-
const appContext = useApplicationContext();
|
|
18
20
|
const asideContext = useAsideContentContext();
|
|
19
21
|
const layoutContext = useViewLayoutContext();
|
|
22
|
+
const NewDocumentTypes = useNewDocumentTypes();
|
|
20
23
|
const [loading, setLoading] = useState(false);
|
|
21
|
-
const [Name, setName] = useState("");
|
|
22
24
|
const [type, setType] = useState("Document");
|
|
23
|
-
|
|
24
|
-
{ value: "Document", label: "Folder" },
|
|
25
|
-
{ value: "Text", label: "Text" },
|
|
26
|
-
{ value: "Library", label: "Library" },
|
|
27
|
-
{ value: "Task", label: "Task" },
|
|
28
|
-
{ value: "MessageTemplate", label: "Message Template" },
|
|
29
|
-
{ value: "APTemplate", label: "Action Plan Template" },
|
|
30
|
-
{ value: "Board", label: "Board" },
|
|
31
|
-
{ value: "Graph", label: "Graph" },
|
|
32
|
-
{ value: "Page", label: "Page" },
|
|
33
|
-
{ value: "FormSchema", label: "Form Schema" },
|
|
34
|
-
{ value: "DocumentRegister", label: "Document Register" },
|
|
35
|
-
];
|
|
36
|
-
if (appContext.host.isTest) {
|
|
37
|
-
options.push({ value: "Dashboard", label: "Dashboard (Test)" }, { value: "MeetingsFolder", label: "Meeting Folder (Test)" });
|
|
38
|
-
}
|
|
25
|
+
const [createData, setCreateData] = useState();
|
|
39
26
|
const content = observe(() => (React.createElement("div", { className: classnames("sub-document-simply-form", props.className) },
|
|
40
27
|
React.createElement(Form, { layout: "vertical" }, /^(mini|dialog)$/.test(props.type) && (React.createElement(Form.Item, null,
|
|
41
28
|
React.createElement(Spin, { spinning: !!loading },
|
|
42
29
|
React.createElement("div", { className: classnames("form-item-layout", {
|
|
43
30
|
"form-item-layout-mobile": layout.ui.mobile && props.type === "mini",
|
|
44
31
|
}) },
|
|
45
|
-
React.createElement(Input, { autoFocus: true, value: Name, placeholder: placeholder
|
|
32
|
+
React.createElement(Input, { autoFocus: true, value: createData === null || createData === void 0 ? void 0 : createData.Name, placeholder: placeholder
|
|
46
33
|
? placeholder
|
|
47
|
-
: `Add a ${props.docType === "Document" ? "Folder" : props.docType} for this Document`, onChange: (e) =>
|
|
34
|
+
: `Add a ${props.docType === "Document" ? "Folder" : props.docType} for this Document`, onChange: (e) => setCreateData({ ...createData, Name: e.target.value }), onPressEnter: onSubmit, onKeyDown: onKeyDown }),
|
|
48
35
|
props.type === "mini" && layout.ui.mobile ? (React.createElement(Button, { type: "primary", onClick: onSubmit }, "Submit")) : null,
|
|
49
36
|
/^(dialog)$/.test(props.type) &&
|
|
50
37
|
!/^(Deal|Quotation|CLDA|Case|Form)$/.test(props.docType) ? (React.createElement(Row, { justify: "end", style: { marginTop: "15px" } },
|
|
@@ -52,16 +39,27 @@ const DocumentForm = (props) => {
|
|
|
52
39
|
React.createElement(Button, { onClick: onCancel }, "Cancel"),
|
|
53
40
|
React.createElement(Button, { type: "primary", onClick: onSubmit }, "Submit")))) : null))))))));
|
|
54
41
|
return observe(() => (React.createElement(React.Fragment, null, /^(mini|dialog)$/.test(props.type) ? (content) : (React.createElement(AddFormView, { title: "Add Document", loading: !!loading, onCancel: onCancel, onSubmit: onSubmit },
|
|
55
|
-
React.createElement(
|
|
56
|
-
|
|
57
|
-
|
|
42
|
+
React.createElement(Select, { className: "w-full mb-5!", showSearch: { optionFilterProp: "label" }, defaultValue: "Document", placeholder: "Select a document type", options: NewDocumentTypes, onChange: (value) => setType(value) }),
|
|
43
|
+
/^(Deal|Quotation|Form|Case|CLDA)$/.test(type) ? (React.createElement("div", null, type &&
|
|
44
|
+
meta.getNewForm({
|
|
45
|
+
id: "",
|
|
46
|
+
type: type,
|
|
47
|
+
}, {
|
|
48
|
+
type: "mini",
|
|
49
|
+
onCancel: onCancel,
|
|
50
|
+
onChange: (data) => setCreateData(data),
|
|
51
|
+
}))) : (React.createElement(Form, { layout: "vertical" },
|
|
52
|
+
React.createElement(Form.Item, null,
|
|
53
|
+
React.createElement(Spin, { spinning: !!loading },
|
|
54
|
+
React.createElement("div", { className: "form-item-layout" },
|
|
55
|
+
React.createElement(Input, { autoFocus: true, placeholder: `Add a ${type === "Document" ? "Folder" : type} for state Document`, onChange: (e) => setCreateData({ Name: e.target.value }) })))))))))));
|
|
58
56
|
/** cancel NewDocumentForm page */
|
|
59
57
|
function onCancel() {
|
|
60
|
-
|
|
58
|
+
var _a;
|
|
59
|
+
setCreateData(undefined);
|
|
61
60
|
if (props.type === "full")
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
props.onCancel();
|
|
61
|
+
asideContext.closeAside();
|
|
62
|
+
(_a = props.onCancel) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
65
63
|
}
|
|
66
64
|
/** input KeyDown */
|
|
67
65
|
function onKeyDown(e) {
|
|
@@ -73,21 +71,30 @@ const DocumentForm = (props) => {
|
|
|
73
71
|
}
|
|
74
72
|
async function onSubmit() {
|
|
75
73
|
var _a;
|
|
76
|
-
if (!Name)
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
if (!(createData === null || createData === void 0 ? void 0 : createData.Name)) {
|
|
75
|
+
message.warning("Title is required!");
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
80
78
|
setLoading(true);
|
|
79
|
+
const data = type === "Task (For Self)"
|
|
80
|
+
? { MemberIds: [user.info.unit.id], ...createData, Type: "Task", ParentId: props.parentId }
|
|
81
|
+
: {
|
|
82
|
+
...createData,
|
|
83
|
+
Type: type,
|
|
84
|
+
ParentId: props.parentId,
|
|
85
|
+
};
|
|
81
86
|
const res = await documents.createFromType({
|
|
82
|
-
data:
|
|
87
|
+
data: data,
|
|
83
88
|
error: "message",
|
|
84
89
|
});
|
|
85
90
|
setLoading(false);
|
|
86
|
-
|
|
87
|
-
if (props.type === "full")
|
|
88
|
-
|
|
91
|
+
setCreateData(undefined);
|
|
92
|
+
if (props.type === "full") {
|
|
93
|
+
asideContext.openAside(React.createElement(DocumentPropertiesView, { id: res.id }), {
|
|
89
94
|
span: (layoutContext === null || layoutContext === void 0 ? void 0 : layoutContext.asideColSpan) ? layoutContext.asideColSpan : 12,
|
|
90
95
|
});
|
|
96
|
+
}
|
|
97
|
+
(_a = props.onSave) === null || _a === void 0 ? void 0 : _a.call(props, res);
|
|
91
98
|
}
|
|
92
99
|
};
|
|
93
100
|
DocumentForm.defaultProps = { type: "mini" };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentForm.js","sourceRoot":"","sources":["../../../src/components/NewDocumentForm/DocumentForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"DocumentForm.js","sourceRoot":"","sources":["../../../src/components/NewDocumentForm/DocumentForm.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAC9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAC7F,OAAO,EAAwB,gBAAgB,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,4EAA4E,CAAC;AAClH,OAAO,WAAW,MAAM,2CAA2C,CAAC;AACpE,OAAO,sBAAsB,MAAM,2BA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a,CAAC,SAAS,CAAC,oBAAC,sBAAsB,IAAC,EAAE,EAAE,GAAG,CAAC,EAAE,GAAI,EAAE;gBAC/D,IAAI,EAAE,CAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,YAAY,EAAC,CAAC,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE;aACnE,CAAC,CAAC;QACJ,CAAC;QAED,MAAA,KAAK,CAAC,MAAM,sDAAG,GAAG,CAAC,CAAC;IACrB,CAAC;AACF,CAAC,CAAC;AAEF,YAAY,CAAC,YAAY,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AAE7C,eAAe,YAAY,CAAC"}
|
|
@@ -46,28 +46,6 @@
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
.new-document-form-full {
|
|
50
|
-
display: flex;
|
|
51
|
-
align-items: center;
|
|
52
|
-
justify-content: space-between;
|
|
53
|
-
font-size: 13px;
|
|
54
|
-
|
|
55
|
-
.ant-input {
|
|
56
|
-
flex: 1;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.form-schema {
|
|
60
|
-
flex: 1;
|
|
61
|
-
line-height: 35px;
|
|
62
|
-
margin-left: 30px;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.ant-select {
|
|
66
|
-
width: 200px;
|
|
67
|
-
margin-right: 20px;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
49
|
.new-document-form-dialog {
|
|
72
50
|
.ant-modal-container {
|
|
73
51
|
.ant-modal-body {
|
|
@@ -16,7 +16,7 @@ declare const NewDocumentForm: (props: {
|
|
|
16
16
|
/** 窗口是否最大化 */
|
|
17
17
|
isExpand?: boolean;
|
|
18
18
|
onExpand?: (parentId: string, type: string) => void;
|
|
19
|
-
onSave?: (params?: any) => void;
|
|
20
19
|
onCancel?: () => void;
|
|
20
|
+
onSave?: (params?: any) => void;
|
|
21
21
|
}) => React.JSX.Element;
|
|
22
22
|
export default NewDocumentForm;
|
|
@@ -10,9 +10,9 @@ import classnames from "classnames";
|
|
|
10
10
|
import "./index.css";
|
|
11
11
|
/** new document from */
|
|
12
12
|
const NewDocumentForm = (props) => {
|
|
13
|
+
const { user } = useApplicationContext();
|
|
13
14
|
const meta = useMetaStore();
|
|
14
15
|
const documents = useDocumentStore();
|
|
15
|
-
const { user } = useApplicationContext();
|
|
16
16
|
const [state] = useState(new State(documents, user));
|
|
17
17
|
state.parentId = props.parentId;
|
|
18
18
|
state.onCancel = props.onCancel;
|
|
@@ -32,12 +32,13 @@ const NewDocumentForm = (props) => {
|
|
|
32
32
|
id: "",
|
|
33
33
|
type: props.type,
|
|
34
34
|
}, {
|
|
35
|
+
...newFormProps,
|
|
35
36
|
type: "mini",
|
|
37
|
+
parentId: props.parentId,
|
|
36
38
|
onCancel: onCancel,
|
|
37
39
|
onSave: (data) => state.onSubmit(data),
|
|
38
|
-
...newFormProps,
|
|
39
40
|
}))));
|
|
40
|
-
return observe(() => (React.createElement(React.Fragment, null, props.type ? (content) : (React.createElement(DocumentForm, { parentId: props.parentId, type: "full", docType: "Document", placeholder: props.placeholder, onCancel: onCancel })))));
|
|
41
|
+
return observe(() => (React.createElement(React.Fragment, null, props.type ? (content) : (React.createElement(DocumentForm, { parentId: props.parentId, type: "full", docType: "Document", placeholder: props.placeholder, onCancel: onCancel, onSave: props.onSave })))));
|
|
41
42
|
function onExpand() {
|
|
42
43
|
props.onExpand && props.onExpand(props.parentId, props.type);
|
|
43
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/NewDocumentForm/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OA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AK,CAAC,IAAI,CAAC,CAAC,CAAC,CACb,OAAO,CACP,CAAC,CAAC,CAAC,CACH,oBAAC,YAAY,IACZ,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,UAAU,EAClB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,KAAK,CAAC,MAAM,GACnB,CACF,CACC,CACH,CAAC,CAAC;IAEH,SAAS,QAAQ;QAChB,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAK,CAAC,CAAC;IAC/D,CAAC;IAED,kCAAkC;IAClC,SAAS,QAAQ;QAChB,IAAI,KAAK,CAAC,QAAQ;YAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;IACtC,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
export declare function useNewDocumentTypes(): {
|
|
2
|
+
value: string;
|
|
3
|
+
label: string;
|
|
4
|
+
}[];
|
|
1
5
|
export declare const DocumentType: {
|
|
2
6
|
Default: string;
|
|
3
7
|
Container: string;
|
|
@@ -24,4 +28,4 @@ export declare const DocumentType: {
|
|
|
24
28
|
FormSchema: string;
|
|
25
29
|
Form: string;
|
|
26
30
|
};
|
|
27
|
-
export declare type docType = "Text" | "Document" | "DocumentRegister" | "Task" | "Deal" | "
|
|
31
|
+
export declare type docType = "Text" | "Document" | "DocumentRegister" | "Task" | "Deal" | "CLDA" | "Case" | "Meeting" | "Board" | "Graph" | "Quotation" | "Dashboard" | "Invoice" | "Journal" | "Shortcut" | "Library" | "MeetingsFolder" | "SignEnvelope" | "FormSchema" | "Form";
|
package/es/data/DocumentType.js
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
import { useApplicationContext } from "@voplus/morpho-data";
|
|
2
|
+
export function useNewDocumentTypes() {
|
|
3
|
+
const { host } = useApplicationContext();
|
|
4
|
+
let options = [
|
|
5
|
+
{ value: "Text", label: "Text" },
|
|
6
|
+
{ value: "Document", label: "Folder" },
|
|
7
|
+
{ value: "DocumentRegister", label: "Document Register" },
|
|
8
|
+
{ value: "MessageTemplate", label: "Message Template" },
|
|
9
|
+
{ value: "APTemplate", label: "Action Plan Template" },
|
|
10
|
+
{ value: "Task", label: "Task" },
|
|
11
|
+
{ value: "Board", label: "Board" },
|
|
12
|
+
{ value: "Graph", label: "Graph" },
|
|
13
|
+
{ value: "Deal", label: "Deal" },
|
|
14
|
+
{ value: "CLDA", label: "CLDA" },
|
|
15
|
+
{ value: "Case", label: "Case" },
|
|
16
|
+
{ value: "Quotation", label: "Quotation" },
|
|
17
|
+
{ value: "Library", label: "Library" },
|
|
18
|
+
{ value: "Page", label: "Page" },
|
|
19
|
+
{ value: "SignEnvelope", label: "Sign Envelope" },
|
|
20
|
+
{ value: "FormSchema", label: "Form Schema" },
|
|
21
|
+
{ value: "Form", label: "Form" },
|
|
22
|
+
];
|
|
23
|
+
if (host.isTest) {
|
|
24
|
+
options.push({ value: "Task (For Self)", label: "Task (For Self) (Test)" }, { value: "Meeting", label: "Meeting Folder (Test)" }, { value: "Dashboard", label: "Dashboard (Test)" });
|
|
25
|
+
}
|
|
26
|
+
return options;
|
|
27
|
+
}
|
|
1
28
|
export const DocumentType = {
|
|
2
29
|
Default: "Document",
|
|
3
30
|
Container: "Container",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentType.js","sourceRoot":"","sources":["../../src/data/DocumentType.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IAC3B,OAAO,EAAE,UAAU;IACnB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,UAAU;IAClB,gBAAgB,EAAE,kBAAkB;IACpC,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;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