@voplus/morpho-document 1.4.142 → 1.4.143
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,16 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
defaultProps: {
|
|
6
|
-
preVisible: boolean;
|
|
7
|
-
quickVisible: boolean;
|
|
8
|
-
tagsVisible: boolean;
|
|
9
|
-
quickDataBarAlign: string;
|
|
10
|
-
clickNameEffect: string;
|
|
11
|
-
autoSaveName: boolean;
|
|
12
|
-
descriptionVisible: boolean;
|
|
13
|
-
quickDataBarVisible: boolean;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
2
|
+
declare const DocumentPanelHeader: (props: {
|
|
3
|
+
id: string;
|
|
4
|
+
}) => JSX.Element;
|
|
16
5
|
export default DocumentPanelHeader;
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { observe } from "@voplus/morpho-ui";
|
|
3
|
+
import { faEllipsisVertical } from "@fortawesome/pro-light-svg-icons";
|
|
4
|
+
import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
|
|
5
|
+
import { useDocument } from "@voplus/morpho-document-core";
|
|
3
6
|
import DocumentHeader from "../DocumentHeader";
|
|
7
|
+
import TagView from "../TagView";
|
|
4
8
|
import ToolBar from "../../controls/ToolBar/ToolBar2";
|
|
9
|
+
import styles from './index.less';
|
|
5
10
|
const DocumentPanelHeader = (props) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
clickNameEffect: "edit",
|
|
14
|
-
autoSaveName: true,
|
|
15
|
-
descriptionVisible: false,
|
|
16
|
-
quickDataBarVisible: false,
|
|
11
|
+
const document = useDocument(props.id, {
|
|
12
|
+
reload: (d) => !d.tags,
|
|
13
|
+
includes: "tags,versions",
|
|
14
|
+
});
|
|
15
|
+
return observe(() => (React.createElement("div", { className: styles["document-panel-header"] },
|
|
16
|
+
React.createElement(DocumentHeader, { id: props.id, preVisible: false, quickVisible: false, tagsVisible: false, descriptionVisible: false, quickDataBarVisible: false, autoSaveName: true, quickDataBarAlign: "left", clickNameEffect: "edit", tools: React.createElement(ToolBar, { id: props.id, moreProps: { icon: React.createElement(FAIcon, { icon: faEllipsisVertical }) } }) }),
|
|
17
|
+
React.createElement(TagView, { id: props.id, tags: document.tags, editable: !document.readonly }))));
|
|
17
18
|
};
|
|
18
19
|
export default DocumentPanelHeader;
|
|
19
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/DocumentPanelHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/DocumentPanelHeader/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,OAAO,MAAM,iCAAiC,CAAC;AACtD,OAAO,MAAM,MAAM,cAAc,CAAC;AAElC,MAAM,mBAAmB,GAAG,CAAC,KAAqB,EAAE,EAAE;IACrD,MAAM,QAAQ,GAAG,WAAW,CAAC,KAAK,CAAC,EAAE,EAAE;QACtC,MAAM,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