zmdms-webui 0.0.92 → 0.0.95

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,4 +1,5 @@
1
1
  import React__default from 'react';
2
+ import { ILeftContentProps } from '../leftcontent/leftContent.js';
2
3
  import { IFooterDom } from '../footer/interface.js';
3
4
 
4
5
  interface IProps {
@@ -17,6 +18,10 @@ interface IProps {
17
18
  defaultLeftOpen?: boolean;
18
19
  /** 左边抽屉宽度 */
19
20
  defaultLeftWidth?: number;
21
+ /** 左边抽屉放置再外部显示 */
22
+ leftContentOut?: boolean;
23
+ /** 左边抽屉属性 */
24
+ leftContentProps?: Partial<ILeftContentProps>;
20
25
  }
21
26
  declare const ContainerButtonWrap: React__default.FC<{
22
27
  children?: React__default.ReactNode;
@@ -1,5 +1,5 @@
1
1
  import { __assign } from '../_virtual/_tslib.js';
2
- import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
3
3
  import { memo, useRef } from 'react';
4
4
  import classNames from '../node_modules/classnames/index.js';
5
5
  import { useTimer } from '../config/commonHooks.js';
@@ -14,12 +14,13 @@ var ContainerLoading = function (_a) {
14
14
  return (jsx(Spin, { spinning: loading, size: "large", tip: "".concat(countTimer), className: "ztxk-container__loading", style: { display: loading ? "flex" : "none" } }));
15
15
  };
16
16
  var Container = function (props) {
17
- var className = props.className, isFlex = props.isFlex, children = props.children, loading = props.loading, footerDom = props.footerDom, leftContent = props.leftContent, defaultLeftOpen = props.defaultLeftOpen, defaultLeftWidth = props.defaultLeftWidth;
17
+ var className = props.className, isFlex = props.isFlex, children = props.children, loading = props.loading, footerDom = props.footerDom, leftContent = props.leftContent, defaultLeftOpen = props.defaultLeftOpen, defaultLeftWidth = props.defaultLeftWidth, leftContentOut = props.leftContentOut, leftContentProps = props.leftContentProps;
18
18
  var containerRef = useRef(null);
19
+ var leftContentContainerRef = useRef(null);
19
20
  var classes = classNames("ztxk-container__content", className, {
20
21
  "ztxk-container__content--flex": isFlex,
21
22
  });
22
- return (jsxs("div", __assign({ className: "ztxk-container", ref: containerRef }, { children: [leftContent && (jsx(LeftContentMemo, __assign({ containerRef: containerRef, defaultLeftOpen: defaultLeftOpen, width: defaultLeftWidth, isShow: true }, { children: leftContent }))), jsx(ContainerLoading, { loading: loading }), jsx("div", __assign({ className: classes }, { children: children })), jsx(Footer, { footerDom: footerDom })] })));
23
+ return (jsxs("div", __assign({ className: "ztxk-container", ref: containerRef }, { children: [!leftContentOut && leftContent ? (jsxs(LeftContentMemo.Wrap, __assign({ containerRef: leftContentContainerRef }, { children: [leftContent && (jsx(LeftContentMemo, __assign({ containerRef: leftContentContainerRef, defaultLeftOpen: defaultLeftOpen, width: defaultLeftWidth, isShow: true, showIcon: true }, leftContentProps, { children: leftContent }))), jsx(ContainerLoading, { loading: loading }), jsx("div", __assign({ className: classes }, { children: children }))] }))) : (jsxs(Fragment, { children: [leftContent && (jsx(LeftContentMemo, __assign({ containerRef: containerRef, defaultLeftOpen: defaultLeftOpen, width: defaultLeftWidth, isShow: true, showIcon: true }, leftContentProps, { children: leftContent }))), jsx(ContainerLoading, { loading: loading }), jsx("div", __assign({ className: classes }, { children: children }))] })), jsx(Footer, { footerDom: footerDom })] })));
23
24
  };
24
25
  var ContainerButtonWrap = memo(function (_a) {
25
26
  var children = _a.children, isMarginTop = _a.isMarginTop, className = _a.className, style = _a.style;
@@ -1,6 +1,6 @@
1
1
  import React__default from 'react';
2
2
 
3
- interface IProps {
3
+ interface ILeftContentProps {
4
4
  children?: React__default.ReactNode;
5
5
  containerRef?: any;
6
6
  defaultLeftOpen?: boolean;
@@ -19,12 +19,13 @@ interface IProps {
19
19
  interface IWrapProps {
20
20
  className?: string;
21
21
  children?: React__default.ReactNode;
22
+ containerRef?: any;
22
23
  }
23
24
  declare const LeftContentWrap: React__default.FC<IWrapProps>;
24
- interface LeftContentComponent extends React__default.FC<IProps> {
25
+ interface LeftContentComponent extends React__default.FC<ILeftContentProps> {
25
26
  displayName: string;
26
27
  Wrap: typeof LeftContentWrap;
27
28
  }
28
29
  declare const LeftContentMemo: LeftContentComponent;
29
30
 
30
- export { LeftContentMemo as default };
31
+ export { ILeftContentProps, LeftContentMemo as default };
@@ -90,16 +90,16 @@ var LeftContent = function (_a, ref) {
90
90
  setOpen(false);
91
91
  };
92
92
  return (jsxs("div", __assign({ style: __assign({ width: width, display: isShow ? "block" : "none" }, style), ref: currentRef }, { children: [showIcon && (jsx(DoubleRightOutlined, { className: "ztxk-container--left-icon", style: {
93
- left: open ? "".concat(width + 10, "px") : "10px",
93
+ left: open ? "".concat(width, "px") : "0",
94
94
  transform: open ? "rotate(180deg)" : "none",
95
95
  }, onClick: function () {
96
96
  setOpen(!open);
97
97
  } })), jsx(Drawer, __assign({ mask: false, closable: false, open: open, zIndex: 88, onClose: onClose, placement: "left", getContainer: false, width: width, className: "ztxk-container--left-drawer" }, { children: children }))] })));
98
98
  };
99
99
  var LeftContentWrap = function (_a) {
100
- var className = _a.className, children = _a.children;
100
+ var className = _a.className, children = _a.children, containerRef = _a.containerRef;
101
101
  var classes = classNames("ztxk-container--left-wrap", className, {});
102
- return jsx("div", __assign({ className: classes }, { children: children }));
102
+ return (jsx("div", __assign({ className: classes, ref: containerRef }, { children: children })));
103
103
  };
104
104
  var LeftContentMemo = memo(forwardRef(LeftContent));
105
105
  LeftContentMemo.displayName = "ZTXK_WEBUI_LeftContentMemo";