@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
- import { DocumentHeaderProps } from "@voplus/morpho-document-core";
3
- declare const DocumentPanelHeader: {
4
- (props?: DocumentHeaderProps | undefined): JSX.Element;
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
- return observe(() => React.createElement(DocumentHeader, { ...props, tools: React.createElement(ToolBar, { id: props.id }) }));
7
- };
8
- DocumentPanelHeader.defaultProps = {
9
- preVisible: false,
10
- quickVisible: false,
11
- tagsVisible: true,
12
- quickDataBarAlign: "left",
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;AAE5C,OAAO,cAAc,MAAM,mBAAmB,CAAC;AAC/C,OAAO,OAAO,MAAM,iCAAiC,CAAC;AAEtD,MAAM,mBAAmB,GAAG,CAAC,KAA2B,EAAE,EAAE;IAC3D,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,oBAAC,cAAc,OAAK,KAAM,EAAE,KAAK,EAAE,oBAAC,OAAO,IAAC,EAAE,EAAE,KAAM,CAAC,EAAE,GAAI,GAAI,CAAC,CAAC;AACzF,CAAC,CAAC;AAEF,mBAAmB,CAAC,YAAY,GAAG;IAClC,UAAU,EAAE,KAAK;IACjB,YAAY,EAAE,KAAK;IACnB,WAAW,EAAE,IAAI;IACjB,iBAAiB,EAAE,MAAM;IACzB,eAAe,EAAE,MAAM;IACvB,YAAY,EAAE,IAAI;IAClB,kBAAkB,EAAE,KAAK;IACzB,mBAAmB,EAAE,KAAK;CAC1B,CAAC;AAEF,eAAe,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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,0 +1,13 @@
1
+ .document-panel-header {
2
+ margin-bottom: 1.25em;
3
+
4
+ :global {
5
+ .document-header-default {
6
+ margin-bottom: 0 !important;
7
+ }
8
+
9
+ .tag-view .ant-tag {
10
+ margin: 0 5px 0 0 !important;
11
+ }
12
+ }
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voplus/morpho-document",
3
- "version": "1.4.142",
3
+ "version": "1.4.143",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://voplus.visualstudio.com/morpho-document/_git/morpho-document"