@voplus/morpho-document 1.0.0-dev295 → 1.0.0-dev296
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/changelog.md
CHANGED
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useState } from "react";
|
|
2
2
|
import DocumentHeader from "../DocumentHeader";
|
|
3
3
|
import DocumentTabs from "../DocumentTabs";
|
|
4
4
|
import TextEditor2 from "@voplus/morpho-text/es/components/TextEditor2";
|
|
5
|
-
import { useDocument } from "@voplus/morpho-document-core";
|
|
6
5
|
import { useObserver } from "mobx-react-lite";
|
|
7
6
|
/** Text PropertiesView */
|
|
8
7
|
const TextPropertiesView = (props) => {
|
|
9
8
|
const id = props.id;
|
|
10
|
-
const
|
|
9
|
+
const [readonly, setReadonly] = useState(true);
|
|
11
10
|
return useObserver(() => (React.createElement("div", { className: "module-detail-view" },
|
|
12
11
|
React.createElement(DocumentHeader, { id: id, size: "h3", quickDataBarAlign: "left", clickNameEffect: "edit", autoSaveName: true, descriptionVisible: false }),
|
|
13
12
|
React.createElement(DocumentTabs, { id: id, details: React.createElement(TextEditor2, { id: id, proseMirrorProps: {
|
|
14
|
-
readonly:
|
|
13
|
+
readonly: readonly,
|
|
15
14
|
showNoContent: true,
|
|
16
|
-
scroll: true
|
|
15
|
+
scroll: true,
|
|
16
|
+
onClick: () => setReadonly(false),
|
|
17
|
+
onBlur: () => setReadonly(true)
|
|
17
18
|
} }) }))));
|
|
18
19
|
};
|
|
19
20
|
export default TextPropertiesView;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/TextPropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/TextPropertiesView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,YAAY,MAAM,iBAAiB,CAAC;AAC3C,OAAO,WAAW,MAAM,+CAA+C,CAAC;AAGxE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,0BAA0B;AAC1B,MAAM,kBAAkB,GAAG,CAAC,KAAqB,EAAE,EAAE;IACpD,MAAM,EAAE,GAAG,KAAK,CAAC,EAAE,CAAC;IACpB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE/C,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,6BAAK,SAAS,EAAC,oBAAoB;QAClC,oBAAC,cAAc,IACd,EAAE,EAAE,EAAE,EACN,IAAI,EAAC,IAAI,EACT,iBAAiB,EAAC,MAAM,EACxB,eAAe,EAAC,MAAM,EACtB,YAAY,EAAE,IAAI,EAClB,kBAAkB,EAAE,KAAK,GACxB;QACF,oBAAC,YAAY,IACZ,EAAE,EAAE,EAAE,EACN,OAAO,EACN,oBAAC,WAAW,IACX,EAAE,EAAE,EAAE,EACN,gBAAgB,EAAE;oBACjB,QAAQ,EAAE,QAAQ;oBAClB,aAAa,EAAE,IAAI;oBACnB,MAAM,EAAE,IAAI;oBACZ,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;oBACjC,MAAM,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC;iBAC/B,GACA,GAEF,CACG,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AACF,eAAe,kBAAkB,CAAC"}
|
|
@@ -2,23 +2,17 @@ import "./index.less";
|
|
|
2
2
|
import React, { useState } from "react";
|
|
3
3
|
import QuickViewDialog from "../QuickViewDialog";
|
|
4
4
|
import TextEditor2 from "@voplus/morpho-text/es/components/TextEditor2";
|
|
5
|
-
import { useDocument } from "@voplus/morpho-document-core";
|
|
6
5
|
import { useObserver } from "mobx-react-lite";
|
|
7
6
|
const TextQuickViewDialog = (props) => {
|
|
8
|
-
const document = useDocument(props.id);
|
|
9
7
|
const [readonly, setReadonly] = useState(true);
|
|
10
8
|
return useObserver(() => (React.createElement(QuickViewDialog, { id: props.id, visible: props.visible, onCancel: props.onCancel, className: "text-quick-view" },
|
|
11
9
|
React.createElement(TextEditor2, { id: props.id, proseMirrorProps: {
|
|
12
10
|
readonly: readonly,
|
|
13
11
|
showNoContent: true,
|
|
14
12
|
scroll: true,
|
|
15
|
-
onClick:
|
|
13
|
+
onClick: () => setReadonly(false),
|
|
16
14
|
onBlur: () => setReadonly(true)
|
|
17
15
|
} }))));
|
|
18
|
-
function handleClick() {
|
|
19
|
-
if (readonly && !document.readonly)
|
|
20
|
-
setReadonly(false);
|
|
21
|
-
}
|
|
22
16
|
};
|
|
23
17
|
export default TextQuickViewDialog;
|
|
24
18
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/TextQuickViewDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,WAAW,MAAM,+CAA+C,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/TextQuickViewDialog/index.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAExC,OAAO,eAAe,MAAM,oBAAoB,CAAC;AACjD,OAAO,WAAW,MAAM,+CAA+C,CAAC;AAExE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,mBAAmB,GAAG,CAAC,KAA+D,EAAE,EAAE;IAC/F,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;IAE/C,OAAO,WAAW,CAAC,GAAG,EAAE,CAAC,CACxB,oBAAC,eAAe,IACf,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,SAAS,EAAC,iBAAiB;QAE3B,oBAAC,WAAW,IACX,EAAE,EAAE,KAAK,CAAC,EAAE,EACZ,gBAAgB,EAAE;gBACjB,QAAQ,EAAE,QAAQ;gBAClB,aAAa,EAAE,IAAI;gBACnB,MAAM,EAAE,IAAI;gBACZ,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;gBACjC,MAAM,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC;aAC/B,GACA,CACe,CAClB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voplus/morpho-document",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-dev296",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://voplus.visualstudio.com/morpho-document/_git/morpho-document"
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"@voplus/morpho-data": "^1.0.0-dev110",
|
|
61
61
|
"@voplus/morpho-document-core": "^1.0.0-dev012",
|
|
62
62
|
"@voplus/morpho-org": "^1.0.0-dev034",
|
|
63
|
-
"@voplus/morpho-text": "^1.0.0-
|
|
63
|
+
"@voplus/morpho-text": "^1.0.0-dev080",
|
|
64
64
|
"@voplus/morpho-ui": "^1.0.0-dev147",
|
|
65
65
|
"react-dnd": "^9.5.1",
|
|
66
66
|
"react-dnd-html5-backend": "^9.5.1"
|