@voplus/morpho-document 1.4.206 → 1.4.207

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.
@@ -0,0 +1,9 @@
1
+ import { ReactNode } from "react";
2
+ declare const QuickModal: (props: {
3
+ className?: string;
4
+ width?: string | number | undefined;
5
+ visible?: boolean;
6
+ children?: ReactNode;
7
+ onCancel?: () => void;
8
+ }) => JSX.Element;
9
+ export default QuickModal;
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { observe } from "@voplus/morpho-ui";
3
+ import { useLayout } from "@voplus/morpho-data";
4
+ import Modal from "@voplus/morpho-ui/es/components/Modal";
5
+ import classNames from "classnames";
6
+ import styles from "./index.less";
7
+ const QuickModal = (props) => {
8
+ const layout = useLayout();
9
+ return observe(() => (React.createElement(React.Fragment, null, layout.ui.mobile ? (props.children) : (React.createElement(Modal, { width: props.width, className: classNames(styles["node-quickView-modal"], props.className), visible: props.visible, destroyOnClose: true, closable: false, footer: null, onCancel: props.onCancel }, props.children)))));
10
+ };
11
+ export default QuickModal;
12
+ //# sourceMappingURL=QuickModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuickModal.js","sourceRoot":"","sources":["../../../src/components/NodeQuickView/QuickModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AACzC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,KAAK,MAAM,uCAAuC,CAAC;AAC1D,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,MAAM,MAAM,cAAc,CAAC;AAGlC,MAAM,UAAU,GAAG,CAAC,KAMnB,EAAE,EAAE;IACJ,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,KAAK,CAAC,QAAQ,QAEb,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CACnB,KAAK,CAAC,QAAQ,CACd,CAAC,CAAC,CAAC,CACH,oBAAC,KAAK,IACL,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,sBAAsB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,EACtE,OAAO,EAAE,KAAK,CAAC,OAAO,EACtB,cAAc,EAAE,IAAI,EACpB,QAAQ,EAAE,KAAK,EACf,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,KAAK,CAAC,QAAQ,IAEvB,KAAK,CAAC,QAAQ,CACR,CACR,CACe,CACjB,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,14 @@
1
+ /// <reference types="react" />
2
+ export declare type QuickViewProps = {
3
+ functionButtons?: ("document" | "activities" | "link")[];
4
+ showSubTab?: (params?: any) => void;
5
+ };
6
+ declare const QuickSubTab: (props: QuickViewProps) => JSX.Element;
7
+ declare const QuickSubContent: (props: {
8
+ id: string;
9
+ type?: string;
10
+ className?: string;
11
+ exclude?: string[];
12
+ onCancel?: () => void;
13
+ }) => JSX.Element;
14
+ export { QuickSubTab, QuickSubContent };
@@ -0,0 +1,52 @@
1
+ import React, { useEffect, useState } from "react";
2
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
3
+ import { faFileAlt, faTimes, faListTimeline, faLink } from "@fortawesome/pro-light-svg-icons";
4
+ import { Button, Tooltip } from "@voplus/antd";
5
+ import { observe } from "@voplus/morpho-ui";
6
+ import { useLayout } from "@voplus/morpho-data";
7
+ import ActivityLog from "@voplus/morpho-org/es/components/ActivityLog/ActivityLog2";
8
+ import Links from "../../Links";
9
+ import DocumentList from "../../DocumentList";
10
+ import classnames from "classnames";
11
+ import styles from "./index.less";
12
+ const QuickSubTab = (props) => {
13
+ const { showSubTab, functionButtons } = { ...props };
14
+ const [buttonProps, setButtonProps] = useState({});
15
+ useEffect(() => {
16
+ setButtonProps({ shape: "circle" });
17
+ }, []);
18
+ return observe(() => (React.createElement(React.Fragment, null,
19
+ (functionButtons === null || functionButtons === void 0 ? void 0 : functionButtons.includes("document")) && (React.createElement(Tooltip, { title: "Documents" },
20
+ React.createElement(Button, { ...buttonProps, icon: React.createElement(FAIcon, { icon: faFileAlt }), onClick: (e) => {
21
+ e.stopPropagation();
22
+ showSubTab === null || showSubTab === void 0 ? void 0 : showSubTab("documents");
23
+ } }))),
24
+ (functionButtons === null || functionButtons === void 0 ? void 0 : functionButtons.includes("activities")) && (React.createElement(Tooltip, { title: "Activities" },
25
+ React.createElement(Button, { ...buttonProps, icon: React.createElement(FAIcon, { icon: faListTimeline }), onClick: (e) => {
26
+ e.stopPropagation();
27
+ showSubTab === null || showSubTab === void 0 ? void 0 : showSubTab("activities");
28
+ } }))),
29
+ (functionButtons === null || functionButtons === void 0 ? void 0 : functionButtons.includes("link")) && (React.createElement(Tooltip, { title: "Links" },
30
+ React.createElement(Button, { ...buttonProps, icon: React.createElement(FAIcon, { icon: faLink }), onClick: (e) => {
31
+ e.stopPropagation();
32
+ showSubTab === null || showSubTab === void 0 ? void 0 : showSubTab("links");
33
+ } }))))));
34
+ };
35
+ const QuickSubContent = (props) => {
36
+ const { type, id, exclude, className, onCancel } = {
37
+ ...props,
38
+ };
39
+ const layout = useLayout();
40
+ return observe(() => (React.createElement("div", { className: classnames(styles["node-quickView-right"], className) },
41
+ layout.ui.mobile ? null : (React.createElement("div", { className: "close-icon" },
42
+ React.createElement(FAIcon, { icon: faTimes, onClick: (e) => {
43
+ e.stopPropagation();
44
+ onCancel && onCancel();
45
+ } }))),
46
+ React.createElement("div", { className: "tab-content" },
47
+ type === "documents" && React.createElement(DocumentList, { id: id, exclude: exclude, multiple: true }),
48
+ type === "activities" && React.createElement(ActivityLog, { id: id }),
49
+ type === "links" && React.createElement(Links, { id: id, isTitle: false })))));
50
+ };
51
+ export { QuickSubTab, QuickSubContent };
52
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/NodeQuickView/QuickSubTab/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAC;AAC9F,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,WAAW,MAAM,2DAA2D,CAAC;AACpF,OAAO,KAAK,MAAM,aAAa,CAAC;AAChC,OAAO,YAAY,MAAM,oBAAoB,CAAC;AAC9C,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,MAAM,MAAM,cAAc,CAAC;AAOlC,MAAM,WAAW,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC7C,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,GAAG,EAAE,GAAG,KAAK,EAAE,CAAC;IACrD,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEnD,SAAS,CAAC,GAAG,EAAE;QACd,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,oBAAC,KAAK,CAAC,QAAQ;QACb,CAAA,eAAe,aAAf,eAAe,uBAAf,eAAe,CAAE,QAAQ,CAAC,UAAU,CAAC,KAAI,CACzC,oBAAC,OAAO,IAA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AG,KAAK;KACR,CAAC;IACF,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,OAAO,OAAO,CAAC,GAAG,EAAE,CAAC,CACpB,6BAAK,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,sBAAsB,CAAC,EAAE,SAAS,CAAC;QAEnE,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC1B,6BAAK,SAAS,EAAC,YAAY;YAC1B,oBAAC,MAAM,IACN,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACd,CAAC,CAAC,eAAe,EAAE,CAAC;oBACpB,QAAQ,IAAI,QAAQ,EAAE,CAAC;gBACxB,CAAC,GACA,CACG,CACN;QACD,6BAAK,SAAS,EAAC,aAAa;YAC1B,IAAI,KAAK,WAAW,IAAI,oBAAC,YAAY,IAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,SAAG;YAC3E,IAAI,KAAK,YAAY,IAAI,oBAAC,WAAW,IAAC,EAAE,EAAE,EAAE,GAAI;YAChD,IAAI,KAAK,OAAO,IAAI,oBAAC,KAAK,IAAC,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,GAAI,CACjD,CACD,CACN,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC"}
@@ -0,0 +1,26 @@
1
+ .node-quickView-right {
2
+ height: 100%;
3
+ flex: 1;
4
+ display: flex;
5
+ flex-direction: column;
6
+ border-left: solid 1px #eeeeee;
7
+
8
+ :global {
9
+ .close-icon {
10
+ font-size: 22px;
11
+ text-align: right;
12
+ padding: 10px 20px 0;
13
+ cursor: pointer;
14
+ }
15
+
16
+ .tab-content {
17
+ position: relative;
18
+ flex: 1;
19
+
20
+ .tab-module-box {
21
+ height: 100%;
22
+ padding: 10px 0 0 10px;
23
+ }
24
+ }
25
+ }
26
+ }
@@ -0,0 +1,22 @@
1
+ import { ReactNode } from "react";
2
+ import { QuickViewProps } from "@voplus/morpho-document-core";
3
+ export declare type NodeQuickViewProps = {
4
+ className?: string;
5
+ /** show close button or not. */
6
+ closeVisible?: boolean;
7
+ /** 不显示某些类型的文件 e.g. exclude={["Task", "Agenda"]} */
8
+ exclude?: string[];
9
+ /** header */
10
+ header: ReactNode;
11
+ /** listContent */
12
+ children?: ReactNode;
13
+ /** 显示哪些功能按钮 */
14
+ functionButtons?: ("document" | "activities" | "link")[];
15
+ } & QuickViewProps;
16
+ declare const NodeQuickView: {
17
+ (props: NodeQuickViewProps): JSX.Element;
18
+ defaultProps: {
19
+ closeVisible: boolean;
20
+ };
21
+ };
22
+ export default NodeQuickView;
@@ -0,0 +1,44 @@
1
+ import React, { useState } from "react";
2
+ import { AsideContent, observe } from "@voplus/morpho-ui";
3
+ import { QuickSubContent, QuickSubTab } from "./QuickSubTab";
4
+ import { FontAwesomeIcon as FAIcon } from "@fortawesome/react-fontawesome";
5
+ import { State } from "./state";
6
+ import { faTimes } from "@fortawesome/pro-light-svg-icons";
7
+ import { useLayout } from "@voplus/morpho-data";
8
+ import FlexDialog from "../FlexDialog";
9
+ import styles from "./index.less";
10
+ const NodeQuickView = (props) => {
11
+ const [state] = useState(new State());
12
+ const [asideContext] = useState(AsideContent.createContext());
13
+ const layout = useLayout();
14
+ return observe(() => (React.createElement(FlexDialog, { modalProps: {
15
+ className: "quickView-modal-style",
16
+ width: state.subTab ? "1000px" : "500px",
17
+ destroyOnClose: true,
18
+ closable: false,
19
+ footer: false,
20
+ visible: props.visible,
21
+ onCancel: props.onCancel,
22
+ }, closeAside: props.onCancel },
23
+ React.createElement(AsideContent, { context: asideContext, className: styles["node-quickView-aside"] },
24
+ React.createElement("div", { className: "node-quickView-left" },
25
+ React.createElement("div", { className: "document-header" },
26
+ props.closeVisible && !layout.ui.mobile && (React.createElement("div", { className: "close-icon" },
27
+ React.createElement(FAIcon, { icon: faTimes, onClick: props.onCancel }))),
28
+ props.header),
29
+ React.createElement("div", { className: "node-quickView-contents" },
30
+ React.createElement("div", { className: "node-quickView-subTab" },
31
+ React.createElement(QuickSubTab, { functionButtons: props.functionButtons, showSubTab: (key) => {
32
+ state.subTab = true;
33
+ asideContext.openAside(React.createElement(QuickSubContent, { id: props.id, type: key, exclude: props.exclude, onCancel: () => {
34
+ asideContext.closeAside();
35
+ state.subTab = false;
36
+ } }), { span: 12 });
37
+ } })),
38
+ props.children))))));
39
+ };
40
+ NodeQuickView.defaultProps = {
41
+ closeVisible: true,
42
+ };
43
+ export default NodeQuickView;
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/NodeQuickView/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE7D,OAAO,EAAE,eAAe,IAAI,MAAM,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,kCAAkC,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,MAAM,MAAM,cAAc,CAAC;AAgBlC,MAAM,aAAa,GAAG,CAAC,KAAyB,EAAE,EAAE;IACnD,MAAM,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,IAAI,KAAK,EAAE,CAAC,CAAC;IACtC,MAAM,CAAC,YAAY,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,aAAa,EAAE,CAAC,CAAC;IAC9D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;I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;oCACtB,CAAC,GACA,EACF,EAAE,IAAI,EAAE,EAAE,EAAE,CACZ,CAAC;4BACH,CAAC,GACA,CACG;oBACL,KAAK,CAAC,QAAQ,CACV,CACD,CACQ,CACH,CACb,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,aAAa,CAAC,YAAY,GAAG;IAC5B,YAAY,EAAE,IAAI;CAClB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1,74 @@
1
+ @import "~@voplus/antd/es/style/themes/default.less";
2
+
3
+ .node-quickView-modal {
4
+ height: calc(100% - 200px);
5
+
6
+ :global {
7
+ .ant-modal-content {
8
+ height: 100%;
9
+ }
10
+
11
+ .ant-modal-body {
12
+ display: flex;
13
+ height: 100%;
14
+ padding: 0;
15
+ }
16
+ }
17
+ }
18
+
19
+ .node-quickView-aside {
20
+ width: 100%;
21
+
22
+ :global {
23
+ .node-quickView-left {
24
+ flex: 1;
25
+ display: flex;
26
+ flex-direction: column;
27
+
28
+ .document-header {
29
+ padding-right: 26px;
30
+ position: relative;
31
+ border-bottom: solid 1px #eeeeee;
32
+
33
+ .close-icon {
34
+ position: absolute;
35
+ top: 4px;
36
+ right: 0;
37
+ font-size: 22px;
38
+ text-align: right;
39
+ cursor: pointer;
40
+ padding: 10px 20px 0;
41
+ }
42
+ }
43
+
44
+ .node-quickView-contents {
45
+ flex: 1;
46
+ display: flex;
47
+ flex-direction: column;
48
+ overflow: hidden;
49
+
50
+ .node-quickView-subTab {
51
+ display: inline-block;
52
+ text-align: right;
53
+ padding: 10px 20px;
54
+
55
+ .ant-btn {
56
+ margin-left: 10px;
57
+ }
58
+ }
59
+
60
+ .node-quickView-description {
61
+ padding: 10px 15px;
62
+ }
63
+ }
64
+ }
65
+
66
+ .frame-view___o5TgK {
67
+ .frame-header {
68
+ position: absolute;
69
+ top: 0;
70
+ background-color: #fff;
71
+ }
72
+ }
73
+ }
74
+ }
@@ -0,0 +1,9 @@
1
+ export declare class State {
2
+ /** 当前激活 tab 面板的 key */
3
+ key: string;
4
+ /** 是否显示 tab */
5
+ subTab: boolean;
6
+ constructor();
7
+ /** Callback of switch panel */
8
+ showSubTab(key: string): void;
9
+ }
@@ -0,0 +1,37 @@
1
+ import { __decorate } from "tslib";
2
+ import { action, makeObservable, observable } from "mobx";
3
+ export class State {
4
+ constructor() {
5
+ /** 当前激活 tab 面板的 key */
6
+ Object.defineProperty(this, "key", {
7
+ enumerable: true,
8
+ configurable: true,
9
+ writable: true,
10
+ value: ""
11
+ });
12
+ /** 是否显示 tab */
13
+ Object.defineProperty(this, "subTab", {
14
+ enumerable: true,
15
+ configurable: true,
16
+ writable: true,
17
+ value: false
18
+ });
19
+ makeObservable(this);
20
+ }
21
+ /** Callback of switch panel */
22
+ showSubTab(key) {
23
+ if (!this.subTab)
24
+ this.subTab = true;
25
+ this.key = key;
26
+ }
27
+ }
28
+ __decorate([
29
+ observable
30
+ ], State.prototype, "key", void 0);
31
+ __decorate([
32
+ observable
33
+ ], State.prototype, "subTab", void 0);
34
+ __decorate([
35
+ action
36
+ ], State.prototype, "showSubTab", null);
37
+ //# sourceMappingURL=state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.js","sourceRoot":"","sources":["../../../src/components/NodeQuickView/state.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE1D,MAAM,OAAO,KAAK;IAMjB;QALA,uBAAuB;QACX;;;;mBAAa,EAAE;WAAC;QAC5B,eAAe;QACH;;;;mBAAgB,KAAK;WAAC;QAGjC,cAAc,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IAED,gCAAgC;IAEzB,UAAU,CAAC,GAAW;QAC5B,IAAI,CAAC,IAAI,CAAC,MAAM;YAAE,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACrC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IAChB,CAAC;CACD;AAdY;IAAX,UAAU;kCAAiB;AAEhB;IAAX,UAAU;qCAAuB;AAQlC;IADC,MAAM;uCAIN"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voplus/morpho-document",
3
- "version": "1.4.206",
3
+ "version": "1.4.207",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://voplus.visualstudio.com/morpho-document/_git/morpho-document"