@voplus/morpho-document 5.0.70 → 5.0.71

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.
@@ -15,7 +15,6 @@
15
15
 
16
16
  .document-header-content {
17
17
  flex: 1;
18
- overflow: auto;
19
18
 
20
19
  .quick-data-bar {
21
20
  color: @cancel-color;
@@ -0,0 +1,14 @@
1
+ import React, { MouseEventHandler, ReactNode } from "react";
2
+ /** 点击list item是显示quick view 还是 properties view */
3
+ declare const ItemFunction: (props: {
4
+ className?: string | undefined;
5
+ children?: React.ReactNode | React.ReactNode[];
6
+ onClick?: React.MouseEventHandler | undefined;
7
+ onMouseOver?: (() => void) | undefined;
8
+ onMouseLeave?: (() => void) | undefined;
9
+ /** properties view */
10
+ propertiesView?: ReactNode;
11
+ /** quick view */
12
+ quickViewDialog?: ((onCancel?: () => void) => ReactNode) | undefined;
13
+ }) => React.JSX.Element;
14
+ export default ItemFunction;
@@ -0,0 +1,53 @@
1
+ import { useLayout } from "@voplus/morpho-data";
2
+ import { useViewContext } from "@voplus/morpho-document-core/es/data/context/ViewContext";
3
+ import { useAsideContentContext } from "@voplus/morpho-ui";
4
+ import classnames from "classnames";
5
+ import React, { useState } from "react";
6
+ /** 点击list item是显示quick view 还是 properties view */
7
+ const ItemFunction = (props) => {
8
+ var _a;
9
+ const layout = useLayout();
10
+ const view = useViewContext();
11
+ const asideContext = useAsideContentContext();
12
+ const [visibleQuickView, setVisibleQuickView] = useState(false);
13
+ return (React.createElement(React.Fragment, null,
14
+ React.createElement("div", { className: classnames(props.className), onClick: onQuickView, onMouseOver: props.onMouseOver, onMouseLeave: props.onMouseLeave }, props.children),
15
+ visibleQuickView && ((_a = props.quickViewDialog) === null || _a === void 0 ? void 0 : _a.call(props, toggleQuickView))));
16
+ /** Quick View */
17
+ function onQuickView(e) {
18
+ var _a;
19
+ if ((view === null || view === void 0 ? void 0 : view.Type) === "PropertiesView" || (view === null || view === void 0 ? void 0 : view.Type) === "QuickView") {
20
+ toggleQuickView();
21
+ }
22
+ else {
23
+ asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(props.propertiesView, {
24
+ span: 12,
25
+ });
26
+ }
27
+ (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props, e);
28
+ }
29
+ /** Quick View */
30
+ function toggleQuickView() {
31
+ var _a;
32
+ /* 手机模式 */
33
+ if (layout.ui.mobile) {
34
+ const element = asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent;
35
+ asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(React.createElement("div", { style: {
36
+ width: "100%",
37
+ height: "100%",
38
+ background: "#fff",
39
+ position: "absolute",
40
+ top: "0",
41
+ } }, (_a = props.quickViewDialog) === null || _a === void 0 ? void 0 : _a.call(props, () => {
42
+ if (asideContext === null || asideContext === void 0 ? void 0 : asideContext.asideContent)
43
+ asideContext.closeAside();
44
+ asideContext === null || asideContext === void 0 ? void 0 : asideContext.openAside(element, { span: 12 });
45
+ })), { span: 12 });
46
+ }
47
+ else {
48
+ setVisibleQuickView(!visibleQuickView);
49
+ }
50
+ }
51
+ };
52
+ export default ItemFunction;
53
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/controls/ItemFunction/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAC1F,OAAO,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,EAAE,EAAgC,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtE,kDAAkD;AAClD,MAAM,YAAY,GAAG,CAAC,KAUrB,EAAE,EAAE;;IACJ,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAC3B,MAAM,IAAI,GAAG,cAAc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AAG;iBACR,IAEA,MAAA,KAAK,CAAC,eAAe,sDAAG,GAAG,EAAE;gBAC7B,IAAI,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,YAAY;oBAAE,YAAY,CAAC,UAAU,EAAE,CAAC;gBAC1D,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAE,SAAS,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;YAChD,CAAC,CAAC,CACG,EACN,EAAE,IAAI,EAAE,EAAE,EAAE,CACZ,CAAC;SACF;aAAM;YACN,mBAAmB,CAAC,CAAC,gBAAgB,CAAC,CAAC;SACvC;IACF,CAAC;AACF,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -17,7 +17,7 @@ const Toolbar = (props) => {
17
17
  if (left > 0 && left < 800)
18
18
  state.isShowRight = true;
19
19
  }, [boxRef]);
20
- return observe(() => (React.createElement(ToolBarContext.Provider, { value: state }, visible !== false ? (React.createElement("span", { className: "tool-bar", ref: boxRef },
20
+ return observe(() => (React.createElement(ToolBarContext.Provider, { value: state }, visible !== false ? (React.createElement("span", { className: "tool-bar", ref: boxRef, onClick: (e) => e.stopPropagation() },
21
21
  children,
22
22
  showMenu && React.createElement(More, { ...dropDownMenuProps }))) : (React.createElement(React.Fragment, null)))));
23
23
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ToolBar2.js","sourceRoot":"","sources":["../../../src/controls/ToolBar/ToolBar2.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAgB,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE5E,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAA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AAe,EAAE;QACzE,QAAQ;QACR,QAAQ,IAAI,oBAAC,IAAI,OAAK,iBAAiB,GAAI,CACtC,CACP,CAAC,CAAC,CAAC,CACH,yCAAK,CACL,CACwB,CAC1B,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,CAAC,YAAY,GAAG;IACtB,QAAQ,EAAE,IAAI;CACd,CAAC;AAEF,eAAe,OAAO,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voplus/morpho-document",
3
- "version": "5.0.70",
3
+ "version": "5.0.71",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://voplus.visualstudio.com/morpho-document/_git/morpho-document"