zmdms-webui 2.5.0 → 2.5.2
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.
- package/dist/es/_virtual/Draggable.js +3 -0
- package/dist/es/_virtual/DraggableCore.js +3 -0
- package/dist/es/_virtual/_commonjsHelpers.js +29 -1
- package/dist/es/_virtual/cjs.js +3 -0
- package/dist/es/_virtual/clsx.m.js +6 -0
- package/dist/es/_virtual/domFns.js +3 -0
- package/dist/es/_virtual/getPrefix.js +3 -0
- package/dist/es/_virtual/index2.js +2 -2
- package/dist/es/_virtual/index4.js +3 -0
- package/dist/es/_virtual/index5.js +3 -0
- package/dist/es/_virtual/log.js +3 -0
- package/dist/es/_virtual/positionFns.js +3 -0
- package/dist/es/_virtual/react-is.development2.js +3 -0
- package/dist/es/_virtual/react-is.production.min2.js +3 -0
- package/dist/es/_virtual/shims.js +3 -0
- package/dist/es/applayoutsider/appLayoutSider.d.ts +4 -0
- package/dist/es/applayoutsider/appLayoutSider.js +2 -2
- package/dist/es/applayoutsider/menu/index.js +2 -2
- package/dist/es/canvastable/canvasTable.js +1 -4
- package/dist/es/chatroom/chat-room.js +19 -0
- package/dist/es/chatroom/index.css +1 -0
- package/dist/es/chatroom/index.js +5 -0
- package/dist/es/modal/interface.d.ts +4 -0
- package/dist/es/modal/modal.js +15 -9
- package/dist/es/modal/useDraggable.js +51 -0
- package/dist/es/node_modules/immutability-helper/index.js +1 -1
- package/dist/es/node_modules/object-assign/index.js +99 -0
- package/dist/es/node_modules/prop-types/checkPropTypes.js +115 -0
- package/dist/es/node_modules/prop-types/factoryWithThrowingShims.js +74 -0
- package/dist/es/node_modules/prop-types/factoryWithTypeCheckers.js +625 -0
- package/dist/es/node_modules/prop-types/index.js +28 -0
- package/dist/es/node_modules/prop-types/lib/ReactPropTypesSecret.js +21 -0
- package/dist/es/node_modules/prop-types/lib/has.js +11 -0
- package/dist/es/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +190 -0
- package/dist/es/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +26 -0
- package/dist/es/node_modules/prop-types/node_modules/react-is/index.js +19 -0
- package/dist/es/node_modules/rc-util/es/Dom/findDOMNode.js +2 -2
- package/dist/es/node_modules/react-draggable/build/cjs/Draggable.js +474 -0
- package/dist/es/node_modules/react-draggable/build/cjs/DraggableCore.js +580 -0
- package/dist/es/node_modules/react-draggable/build/cjs/cjs.js +20 -0
- package/dist/es/node_modules/react-draggable/build/cjs/utils/domFns.js +361 -0
- package/dist/es/node_modules/react-draggable/build/cjs/utils/getPrefix.js +85 -0
- package/dist/es/node_modules/react-draggable/build/cjs/utils/log.js +10 -0
- package/dist/es/node_modules/react-draggable/build/cjs/utils/positionFns.js +214 -0
- package/dist/es/node_modules/react-draggable/build/cjs/utils/shims.js +64 -0
- package/dist/es/node_modules/react-is/cjs/react-is.development.js +1 -1
- package/dist/es/node_modules/react-is/cjs/react-is.production.min.js +1 -1
- package/dist/es/node_modules/react-is/index.js +1 -1
- package/dist/index.dark.css +1 -1
- package/dist/index.default.css +1 -1
- package/dist/less/components/ChatRoom/style/index.less +147 -0
- package/dist/less/components/ChatRoom/style/style.less +2 -0
- package/dist/less/styles/index.less +2 -0
- package/package.json +2 -1
|
@@ -4,4 +4,32 @@ function getDefaultExportFromCjs (x) {
|
|
|
4
4
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function getAugmentedNamespace(n) {
|
|
8
|
+
if (n.__esModule) return n;
|
|
9
|
+
var f = n.default;
|
|
10
|
+
if (typeof f == "function") {
|
|
11
|
+
var a = function a () {
|
|
12
|
+
if (this instanceof a) {
|
|
13
|
+
var args = [null];
|
|
14
|
+
args.push.apply(args, arguments);
|
|
15
|
+
var Ctor = Function.bind.apply(f, args);
|
|
16
|
+
return new Ctor();
|
|
17
|
+
}
|
|
18
|
+
return f.apply(this, arguments);
|
|
19
|
+
};
|
|
20
|
+
a.prototype = f.prototype;
|
|
21
|
+
} else a = {};
|
|
22
|
+
Object.defineProperty(a, '__esModule', {value: true});
|
|
23
|
+
Object.keys(n).forEach(function (k) {
|
|
24
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
25
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
26
|
+
enumerable: true,
|
|
27
|
+
get: function () {
|
|
28
|
+
return n[k];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
return a;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export { commonjsGlobal, getAugmentedNamespace, getDefaultExportFromCjs };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
var
|
|
1
|
+
var propTypes = {exports: {}};
|
|
2
2
|
|
|
3
|
-
export {
|
|
3
|
+
export { propTypes as __module };
|
|
@@ -16,7 +16,7 @@ var AppLayoutSider = function (props) {
|
|
|
16
16
|
// 118 宽度改成 134宽度
|
|
17
17
|
_b = props.siderWidth,
|
|
18
18
|
// 118 宽度改成 134宽度
|
|
19
|
-
siderWidth = _b === void 0 ? 134 : _b, _c = props.subMenuWidth, subMenuWidth = _c === void 0 ? 162 : _c, addTab = props.addTab, siderBg = props.siderBg, logo = props.logo, logoStyle = props.logoStyle, subMenuLogo = props.subMenuLogo, _d = props.isShowSearchInput, isShowSearchInput = _d === void 0 ? true : _d, apps = props.apps, activeTab = props.activeTab, userMenus = props.userMenus, userSubMenus = props.userSubMenus, mergeSystemIds = props.mergeSystemIds, postMergeSystemIds = props.postMergeSystemIds, drawerTitle = props.drawerTitle, selectMainMenu = props.selectMainMenu, menuJoinRule = props.menuJoinRule, renderItem = props.renderItem, defaultVisible = props.defaultVisible, defaultFixed = props.defaultFixed, openOnlyHasSubmenus = props.openOnlyHasSubmenus, hideSubMenuBg = props.hideSubMenuBg, menuItemLine = props.menuItemLine, subMenuItemLine = props.subMenuItemLine;
|
|
19
|
+
siderWidth = _b === void 0 ? 134 : _b, _c = props.subMenuWidth, subMenuWidth = _c === void 0 ? 162 : _c, addTab = props.addTab, siderBg = props.siderBg, logo = props.logo, logoStyle = props.logoStyle, subMenuLogo = props.subMenuLogo, _d = props.isShowSearchInput, isShowSearchInput = _d === void 0 ? true : _d, apps = props.apps, activeTab = props.activeTab, userMenus = props.userMenus, userSubMenus = props.userSubMenus, mergeSystemIds = props.mergeSystemIds, postMergeSystemIds = props.postMergeSystemIds, drawerTitle = props.drawerTitle, selectMainMenu = props.selectMainMenu, menuJoinRule = props.menuJoinRule, renderItem = props.renderItem, defaultVisible = props.defaultVisible, defaultFixed = props.defaultFixed, openOnlyHasSubmenus = props.openOnlyHasSubmenus, hideSubMenuBg = props.hideSubMenuBg, menuItemLine = props.menuItemLine, subMenuItemLine = props.subMenuItemLine, bottomContainer = props.bottomContainer;
|
|
20
20
|
// 当前选中的主菜单item
|
|
21
21
|
var _e = useState([]), mainMenuSelectedKeys = _e[0], setMainMenuSelectedKeys = _e[1];
|
|
22
22
|
// 内部二级菜单管理
|
|
@@ -74,7 +74,7 @@ var AppLayoutSider = function (props) {
|
|
|
74
74
|
menuJoinRule: menuJoinRule,
|
|
75
75
|
getNewPath: getNewPath,
|
|
76
76
|
renderItem: renderItem,
|
|
77
|
-
} }, { children: jsx(Menu, { width: siderWidth, subMenuWidth: subMenuWidth, layoutSiderRef: layoutSiderRef, addTab: addTab, logo: logo, logoStyle: logoStyle, subMenuLogo: subMenuLogo, getPrefixByAppId: getPrefixByAppId, defaultVisible: defaultVisible, openOnlyHasSubmenus: openOnlyHasSubmenus, defaultFixed: defaultFixed, isShowSearchInput: isShowSearchInput, hideSubMenuBg: hideSubMenuBg, menuItemLine: menuItemLine, subMenuItemLine: subMenuItemLine }) })) })));
|
|
77
|
+
} }, { children: jsx(Menu, { width: siderWidth, subMenuWidth: subMenuWidth, layoutSiderRef: layoutSiderRef, addTab: addTab, logo: logo, logoStyle: logoStyle, subMenuLogo: subMenuLogo, getPrefixByAppId: getPrefixByAppId, defaultVisible: defaultVisible, openOnlyHasSubmenus: openOnlyHasSubmenus, defaultFixed: defaultFixed, isShowSearchInput: isShowSearchInput, hideSubMenuBg: hideSubMenuBg, menuItemLine: menuItemLine, subMenuItemLine: subMenuItemLine, bottomContainer: bottomContainer }) })) })));
|
|
78
78
|
};
|
|
79
79
|
AppLayoutSider.displayName = "ZTXK_WEBUI_AppLayoutSider";
|
|
80
80
|
var AppLayoutSider$1 = memo(AppLayoutSider);
|
|
@@ -7,7 +7,7 @@ import MainMenu from './MainMenu.js';
|
|
|
7
7
|
import SubMenu from './SubMenu.js';
|
|
8
8
|
|
|
9
9
|
var MenuCom = function (props) {
|
|
10
|
-
var width = props.width, subMenuWidth = props.subMenuWidth, layoutSiderRef = props.layoutSiderRef, addTab = props.addTab, logo = props.logo, logoStyle = props.logoStyle, getPrefixByAppId = props.getPrefixByAppId, subMenuLogo = props.subMenuLogo, _a = props.defaultVisible, defaultVisible = _a === void 0 ? false : _a, openOnlyHasSubmenus = props.openOnlyHasSubmenus, defaultFixed = props.defaultFixed, isShowSearchInput = props.isShowSearchInput, hideSubMenuBg = props.hideSubMenuBg, menuItemLine = props.menuItemLine, subMenuItemLine = props.subMenuItemLine;
|
|
10
|
+
var width = props.width, subMenuWidth = props.subMenuWidth, layoutSiderRef = props.layoutSiderRef, addTab = props.addTab, logo = props.logo, logoStyle = props.logoStyle, getPrefixByAppId = props.getPrefixByAppId, subMenuLogo = props.subMenuLogo, _a = props.defaultVisible, defaultVisible = _a === void 0 ? false : _a, openOnlyHasSubmenus = props.openOnlyHasSubmenus, defaultFixed = props.defaultFixed, isShowSearchInput = props.isShowSearchInput, hideSubMenuBg = props.hideSubMenuBg, menuItemLine = props.menuItemLine, subMenuItemLine = props.subMenuItemLine, bottomContainer = props.bottomContainer;
|
|
11
11
|
// 二级菜单是否显示
|
|
12
12
|
var _b = useState(defaultVisible), visible = _b[0], setVisible = _b[1];
|
|
13
13
|
// 二级菜单Ref对象
|
|
@@ -27,7 +27,7 @@ var MenuCom = function (props) {
|
|
|
27
27
|
var _a;
|
|
28
28
|
(_a = subMenu.current) === null || _a === void 0 ? void 0 : _a.setVisible(false);
|
|
29
29
|
}, []);
|
|
30
|
-
return (jsxs("div", __assign({ className: "zmdms-menu", onMouseLeave: onMouseLeave }, { children: [jsx(Logo, { logo: logo, showLine: visible && !hideSubMenuBg, style: logoStyle }), isShowSearchInput && jsx(SearchInput, { setVisible: setVisible }), jsx(MainMenu, { onMouseEnter: onMouseEnter, addTab: addTab, getPrefixByAppId: getPrefixByAppId, subMenu: subMenu, hideSubMenuBg: hideSubMenuBg, menuItemLine: menuItemLine }), jsx(SubMenu, { ref: subMenu, marginLeft: width, subMenuWidth: subMenuWidth, layoutSiderRef: layoutSiderRef, addTab: addTab, getPrefixByAppId: getPrefixByAppId, subMenuLogo: subMenuLogo, visible: visible, setVisible: setVisible, defaultFixed: defaultFixed, hideSubMenuBg: hideSubMenuBg, subMenuItemLine: subMenuItemLine, openOnlyHasSubmenus: openOnlyHasSubmenus })] })));
|
|
30
|
+
return (jsxs("div", __assign({ className: "zmdms-menu", onMouseLeave: onMouseLeave }, { children: [jsx(Logo, { logo: logo, showLine: visible && !hideSubMenuBg, style: logoStyle }), isShowSearchInput && jsx(SearchInput, { setVisible: setVisible }), jsx(MainMenu, { onMouseEnter: onMouseEnter, addTab: addTab, getPrefixByAppId: getPrefixByAppId, subMenu: subMenu, hideSubMenuBg: hideSubMenuBg, menuItemLine: menuItemLine }), jsx(SubMenu, { ref: subMenu, marginLeft: width, subMenuWidth: subMenuWidth, layoutSiderRef: layoutSiderRef, addTab: addTab, getPrefixByAppId: getPrefixByAppId, subMenuLogo: subMenuLogo, visible: visible, setVisible: setVisible, defaultFixed: defaultFixed, hideSubMenuBg: hideSubMenuBg, subMenuItemLine: subMenuItemLine, openOnlyHasSubmenus: openOnlyHasSubmenus }), bottomContainer] })));
|
|
31
31
|
};
|
|
32
32
|
var Menu = memo(MenuCom);
|
|
33
33
|
|
|
@@ -28,7 +28,7 @@ import { useProcessedColumns } from './hooks/useProcessedColumns.js';
|
|
|
28
28
|
import { useSummaryRow } from './hooks/useSummaryRow.js';
|
|
29
29
|
import { useCanvasTableAutoHeight } from './hooks/useAutoHeight.js';
|
|
30
30
|
import { SCROLLBAR_SIZE } from './utils/constants.js';
|
|
31
|
-
import {
|
|
31
|
+
import { calculateTotalHeight, calculateColumnRenderInfos, calculateTotalWidth } from './utils/tableCalculations.js';
|
|
32
32
|
import 'zmdms-utils';
|
|
33
33
|
import 'dayjs';
|
|
34
34
|
import { TABLE_DYNAMIC_KEY } from '../table/constant.js';
|
|
@@ -124,9 +124,6 @@ function CanvasTable(props) {
|
|
|
124
124
|
// 手动调整过宽度的列不参与自动宽度分配
|
|
125
125
|
// 注意:需要先预判是否会有垂直滚动条,如果有则预留滚动条宽度
|
|
126
126
|
var columnRenderInfos = useMemo(function () {
|
|
127
|
-
// 第一步:先用原始列宽计算,判断是否需要垂直滚动条
|
|
128
|
-
calculateColumnRenderInfos(processedColumns, undefined, // 不进行自适应填充
|
|
129
|
-
manuallyResizedColumnKeys);
|
|
130
127
|
// 计算原始总高度
|
|
131
128
|
var tempTotalHeight = calculateTotalHeight(headerHeight, // 使用基础表头高度做粗略判断
|
|
132
129
|
finalDataSource.length, rowHeight);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { __assign } from '../_virtual/_tslib.js';
|
|
2
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
|
+
import classNames from '../node_modules/classnames/index.js';
|
|
4
|
+
import MemoInput from '../input/input.js';
|
|
5
|
+
import MemoTag from '../tag/tag.js';
|
|
6
|
+
|
|
7
|
+
var ChatRoom = function (props) {
|
|
8
|
+
var bordered = props.bordered, _a = props.height, height = _a === void 0 ? "88vh" : _a, _b = props.title, title = _b === void 0 ? "会议列表" : _b;
|
|
9
|
+
var containerClassName = classNames("ztxk-chat-room--container", {
|
|
10
|
+
"ztxk-chat-room--container--bordered": bordered,
|
|
11
|
+
});
|
|
12
|
+
return (jsxs("div", __assign({ className: containerClassName, style: { height: height } }, { children: [jsxs("div", __assign({ className: "ztxk-chat-room--left" }, { children: [jsx("div", __assign({ className: "ztxk-chat-room--title", title: title }, { children: title })), jsx("div", __assign({ className: "ztxk-chat-room--search" }, { children: jsx(MemoInput.Search, { placeholder: "\u641C\u7D22\u4F1A\u8BAE" }) })), jsx("div", __assign({ className: "ztxk-chat-room--list" }, { children: Array(10)
|
|
13
|
+
.fill(1)
|
|
14
|
+
.map(function (item, index) { return (jsxs("div", __assign({ className: classNames("ztxk-chat-room--list__item", {
|
|
15
|
+
active: index === 0,
|
|
16
|
+
}) }, { children: [jsx("div", __assign({ className: "ztxk-chat-room--item__name" }, { children: jsx("span", { children: "\u963F\u677E\u5927\u963F\u677E\u5927\u963F\u677E\u5927" }) })), jsxs("div", __assign({ className: "ztxk-chat-room--item__text" }, { children: [jsxs("div", __assign({ className: "ztxk-chat-room--item__text--top" }, { children: [jsx("div", __assign({ className: "ztxk-chat-room--item__text--room" }, { children: "\u623F\u95F4\u53F7" })), jsx(MemoTag, __assign({ className: "" }, { children: "\u6807\u7B7E" }))] })), jsx("div", __assign({ className: "ztxk-chat-room--item__text--bottom" }, { children: "\u6D88\u606F\u63D0\u793A\u5BCC\u6587\u672C" }))] })), jsxs("div", __assign({ className: "ztxk-chat-room--item__other" }, { children: [jsx("div", __assign({ className: "ztxk-chat-room--item__other--name" }, { children: "\u4E1A\u52A1\u5458\u6C47\u62A5" })), jsx("div", __assign({ className: "ztxk-chat-room--item__other--time" }, { children: "\u65F6\u95F4" }))] }))] }), index)); }) }))] })), jsxs("div", __assign({ className: "ztxk-chat-room--right" }, { children: [jsx("div", __assign({ className: "ztxk-chat-room--title" }, { children: "\u4F1A\u8BAE\u8BE6\u60C5" })), jsx("div", __assign({ className: "ztxk-chat-room--content" }, { children: jsx("div", __assign({ className: "ztxk-chat-room--content--item" }, { children: "\u4F1A\u8BAE\u540D\u79F0\uFF1A\u4F1A\u8BAE1" })) }))] }))] })));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { ChatRoom as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ztxk-chat-room--container{box-sizing:border-box;display:flex;flex-direction:row}.ztxk-chat-room--container.ztxk-chat-room--container--bordered{border:1px solid #e5e5e5;padding:10px}.ztxk-chat-room--container .ztxk-chat-room--left{background:#fff;box-sizing:border-box;display:flex;flex-direction:column;height:100%;width:300px}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--title{align-items:center;box-sizing:border-box;display:flex;height:50px;justify-content:center;line-height:22px;padding:0 10px}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--search{box-sizing:border-box;padding:10px 4px}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--search .ant-input-search input{background-color:#f0f0f0;border:none;border-radius:10px 0 0 10px}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--search .ant-input-search input:focus{box-shadow:none}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--search .ant-input-search .ant-input-group-addon{border-radius:0 10px 10px 0}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--search .ant-input-search .ant-input-group-addon button{background-color:#f0f0f0;border:none;border-radius:0 10px 10px 0;box-shadow:none}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--list{flex:1;overflow-x:hidden;overflow-y:auto}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--list .ztxk-chat-room--list__item{align-items:center;box-sizing:border-box;cursor:pointer;display:flex;height:60px}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--list .ztxk-chat-room--list__item:hover{background-color:#d9d9d9}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--list .ztxk-chat-room--list__item.active{background-color:#c0e2ff!important}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--list .ztxk-chat-room--list__item .ztxk-chat-room--item__name{word-wrap:break-word;background-color:#69f;border-radius:5px;color:#fff;display:flex;flex-shrink:0;height:58px;padding:5px;text-align:center;transform:scale(.8);width:48px;word-break:break-all}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--list .ztxk-chat-room--list__item .ztxk-chat-room--item__name>span{font-size:12px;line-height:18px;text-align:center}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--list .ztxk-chat-room--list__item .ztxk-chat-room--item__text{box-sizing:border-box;display:flex;flex:1;flex-direction:column;font-size:12px;height:48px;justify-content:space-between}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--list .ztxk-chat-room--list__item .ztxk-chat-room--item__text .ztxk-chat-room--item__text--top{align-items:center;display:flex;justify-content:space-between;width:160px}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--list .ztxk-chat-room--list__item .ztxk-chat-room--item__text .ztxk-chat-room--item__text--top .ztxk-chat-room--item__text--room{display:block;font-size:12px;font-weight:bolder;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:120px}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--list .ztxk-chat-room--list__item .ztxk-chat-room--item__text .ztxk-chat-room--item__text--bottom{color:#a2a2a2;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:160px}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--list .ztxk-chat-room--list__item .ztxk-chat-room--item__text .ztxk-chat-room--item__text--bottom a{color:#1890ff}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--list .ztxk-chat-room--list__item .ztxk-chat-room--item__other{display:flex;flex-direction:column;font-size:12px;height:48px;justify-content:space-between;text-align:right;width:80px}.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--list .ztxk-chat-room--list__item .ztxk-chat-room--item__other .ztxk-chat-room--item__other--name,.ztxk-chat-room--container .ztxk-chat-room--left .ztxk-chat-room--list .ztxk-chat-room--list__item .ztxk-chat-room--item__other .ztxk-chat-room--item__other--time{color:#a2a2a2;font-size:12px;overflow:hidden;padding-right:5px;text-overflow:ellipsis;white-space:nowrap}.ztxk-chat-room--container .ztxk-chat-room--right{flex:1}
|
|
@@ -78,6 +78,10 @@ interface IModalProps extends Omit<ModalProps, "onOk"> {
|
|
|
78
78
|
* 点击确认时的校验
|
|
79
79
|
*/
|
|
80
80
|
onOkValidate?: (type?: string) => Promise<any>;
|
|
81
|
+
/**
|
|
82
|
+
* 是否可以拖拽
|
|
83
|
+
*/
|
|
84
|
+
isDrag?: boolean;
|
|
81
85
|
}
|
|
82
86
|
interface IModalComponent extends React__default.ForwardRefExoticComponent<IModalProps & React__default.RefAttributes<unknown>> {
|
|
83
87
|
info: typeof Modal.info;
|
package/dist/es/modal/modal.js
CHANGED
|
@@ -4,21 +4,22 @@ import { forwardRef, useState, useCallback, useImperativeHandle } from 'react';
|
|
|
4
4
|
import { Modal as Modal$1 } from 'antd';
|
|
5
5
|
import classNames from '../node_modules/classnames/index.js';
|
|
6
6
|
import { setCancelBtnProps } from './utils.js';
|
|
7
|
+
import useDraggable from './useDraggable.js';
|
|
7
8
|
import myMessage from '../message/index.js';
|
|
8
9
|
|
|
9
10
|
var Modal = function (_a, ref) {
|
|
10
|
-
var className = _a.className, defaultOpen = _a.defaultOpen, defaultTitle = _a.defaultTitle, defaultConfirmMsg = _a.defaultConfirmMsg, defaultConfirmOkText = _a.defaultConfirmOkText, defaultType = _a.defaultType, confirmPreHandle = _a.confirmPreHandle, confirmOnOk = _a.confirmOnOk, onOk = _a.onOk, footer = _a.footer, onOkValidate = _a.onOkValidate, resetProps = __rest(_a, ["className", "defaultOpen", "defaultTitle", "defaultConfirmMsg", "defaultConfirmOkText", "defaultType", "confirmPreHandle", "confirmOnOk", "onOk", "footer", "onOkValidate"]);
|
|
11
|
+
var className = _a.className, defaultOpen = _a.defaultOpen, defaultTitle = _a.defaultTitle, defaultConfirmMsg = _a.defaultConfirmMsg, defaultConfirmOkText = _a.defaultConfirmOkText, defaultType = _a.defaultType, confirmPreHandle = _a.confirmPreHandle, confirmOnOk = _a.confirmOnOk, onOk = _a.onOk, footer = _a.footer, onOkValidate = _a.onOkValidate, _b = _a.isDrag, isDrag = _b === void 0 ? true : _b, modalTitle = _a.title, modalRender = _a.modalRender, resetProps = __rest(_a, ["className", "defaultOpen", "defaultTitle", "defaultConfirmMsg", "defaultConfirmOkText", "defaultType", "confirmPreHandle", "confirmOnOk", "onOk", "footer", "onOkValidate", "isDrag", "title", "modalRender"]);
|
|
11
12
|
var classes = classNames("ztxk-modal", className);
|
|
12
13
|
// 模态框基本属性
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
14
|
+
var _c = useState(defaultOpen), open = _c[0], setOpen = _c[1];
|
|
15
|
+
var _d = useState(defaultTitle), title = _d[0], setTitle = _d[1];
|
|
16
|
+
var _e = useState(), loading = _e[0], setLoading = _e[1];
|
|
16
17
|
// 二次确认框相关配置
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
var
|
|
18
|
+
var _f = useState(confirmOnOk ? true : false), isConfirm = _f[0], setIsConfirm = _f[1];
|
|
19
|
+
var _g = useState(defaultConfirmMsg), confirmMsg = _g[0], setConfirmMsg = _g[1];
|
|
20
|
+
var _h = useState(defaultConfirmOkText), confirmOkText = _h[0], setConfirmOkText = _h[1];
|
|
20
21
|
// 模态框类型
|
|
21
|
-
var
|
|
22
|
+
var _j = useState(defaultType), type = _j[0], setType = _j[1];
|
|
22
23
|
var close = useCallback(function () {
|
|
23
24
|
setOpen(false);
|
|
24
25
|
}, []);
|
|
@@ -140,7 +141,12 @@ var Modal = function (_a, ref) {
|
|
|
140
141
|
setConfirmMsg: setConfirmOkText,
|
|
141
142
|
};
|
|
142
143
|
});
|
|
143
|
-
|
|
144
|
+
var _k = useDraggable({
|
|
145
|
+
isDrag: isDrag,
|
|
146
|
+
title: modalTitle || title,
|
|
147
|
+
modalRender: modalRender,
|
|
148
|
+
}), dragTitle = _k.dragTitle, dragModalRender = _k.dragModalRender;
|
|
149
|
+
return (jsx(Modal$1, __assign({ open: open, onCancel: close, className: classes, okText: "\u4FDD\u5B58", onOk: footer ? undefined : onOkHandle, width: "70%", title: dragTitle, keyboard: false, maskClosable: false, confirmLoading: loading, cancelButtonProps: { loading: loading }, footer: footer, modalRender: dragModalRender }, resetProps)));
|
|
144
150
|
};
|
|
145
151
|
var ModalComponent = forwardRef(Modal);
|
|
146
152
|
ModalComponent.displayName = "ZTXK_WEBUI_ModalComponent";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { __assign } from '../_virtual/_tslib.js';
|
|
2
|
+
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import { useState, useRef } from 'react';
|
|
4
|
+
import Draggable from '../node_modules/react-draggable/build/cjs/cjs.js';
|
|
5
|
+
|
|
6
|
+
var useDraggable = function (options) {
|
|
7
|
+
var isDrag = options.isDrag, title = options.title;
|
|
8
|
+
var _a = useState(true), disabled = _a[0], setDisabled = _a[1];
|
|
9
|
+
var _b = useState({
|
|
10
|
+
left: 0,
|
|
11
|
+
top: 0,
|
|
12
|
+
bottom: 0,
|
|
13
|
+
right: 0,
|
|
14
|
+
}), bounds = _b[0], setBounds = _b[1];
|
|
15
|
+
var draggleRef = useRef(null);
|
|
16
|
+
var onStart = function (_event, uiData) {
|
|
17
|
+
var _a;
|
|
18
|
+
var _b = window.document.documentElement, clientWidth = _b.clientWidth, clientHeight = _b.clientHeight;
|
|
19
|
+
var targetRect = (_a = draggleRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
20
|
+
if (!targetRect) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
setBounds({
|
|
24
|
+
left: -targetRect.left + uiData.x,
|
|
25
|
+
right: clientWidth - (targetRect.right - uiData.x),
|
|
26
|
+
top: -targetRect.top + uiData.y,
|
|
27
|
+
bottom: clientHeight - (targetRect.bottom - uiData.y),
|
|
28
|
+
});
|
|
29
|
+
};
|
|
30
|
+
var dragTitle = isDrag ? (jsx("div", __assign({ style: {
|
|
31
|
+
width: "100%",
|
|
32
|
+
cursor: "move",
|
|
33
|
+
}, onMouseOver: function () {
|
|
34
|
+
if (disabled) {
|
|
35
|
+
setDisabled(false);
|
|
36
|
+
}
|
|
37
|
+
}, onMouseOut: function () {
|
|
38
|
+
setDisabled(true);
|
|
39
|
+
},
|
|
40
|
+
// fix eslintjsx-a11y/mouse-events-have-key-events
|
|
41
|
+
// https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/master/docs/rules/mouse-events-have-key-events.md
|
|
42
|
+
onFocus: function () { }, onBlur: function () { } }, { children: title }))) : (title);
|
|
43
|
+
var dragModalRender = isDrag
|
|
44
|
+
? function (modal) {
|
|
45
|
+
return (jsx(Draggable, __assign({ disabled: disabled, bounds: bounds, onStart: function (event, uiData) { return onStart(event, uiData); } }, { children: jsx("div", __assign({ ref: draggleRef }, { children: modal })) })));
|
|
46
|
+
}
|
|
47
|
+
: options.modalRender;
|
|
48
|
+
return { dragTitle: dragTitle, dragModalRender: dragModalRender };
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export { useDraggable as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDefaultExportFromCjs } from '../../_virtual/_commonjsHelpers.js';
|
|
2
|
-
import { __module as immutabilityHelper } from '../../_virtual/
|
|
2
|
+
import { __module as immutabilityHelper } from '../../_virtual/index4.js';
|
|
3
3
|
|
|
4
4
|
(function (module, exports) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
var objectAssign;
|
|
8
|
+
var hasRequiredObjectAssign;
|
|
9
|
+
|
|
10
|
+
function requireObjectAssign () {
|
|
11
|
+
if (hasRequiredObjectAssign) return objectAssign;
|
|
12
|
+
hasRequiredObjectAssign = 1;
|
|
13
|
+
/* eslint-disable no-unused-vars */
|
|
14
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
15
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
16
|
+
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
17
|
+
|
|
18
|
+
function toObject(val) {
|
|
19
|
+
if (val === null || val === undefined) {
|
|
20
|
+
throw new TypeError('Object.assign cannot be called with null or undefined');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return Object(val);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function shouldUseNative() {
|
|
27
|
+
try {
|
|
28
|
+
if (!Object.assign) {
|
|
29
|
+
return false;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Detect buggy property enumeration order in older V8 versions.
|
|
33
|
+
|
|
34
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
35
|
+
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
36
|
+
test1[5] = 'de';
|
|
37
|
+
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
42
|
+
var test2 = {};
|
|
43
|
+
for (var i = 0; i < 10; i++) {
|
|
44
|
+
test2['_' + String.fromCharCode(i)] = i;
|
|
45
|
+
}
|
|
46
|
+
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
47
|
+
return test2[n];
|
|
48
|
+
});
|
|
49
|
+
if (order2.join('') !== '0123456789') {
|
|
50
|
+
return false;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
54
|
+
var test3 = {};
|
|
55
|
+
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
56
|
+
test3[letter] = letter;
|
|
57
|
+
});
|
|
58
|
+
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
59
|
+
'abcdefghijklmnopqrst') {
|
|
60
|
+
return false;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return true;
|
|
64
|
+
} catch (err) {
|
|
65
|
+
// We don't expect any of the above to throw, but better to be safe.
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
|
|
71
|
+
var from;
|
|
72
|
+
var to = toObject(target);
|
|
73
|
+
var symbols;
|
|
74
|
+
|
|
75
|
+
for (var s = 1; s < arguments.length; s++) {
|
|
76
|
+
from = Object(arguments[s]);
|
|
77
|
+
|
|
78
|
+
for (var key in from) {
|
|
79
|
+
if (hasOwnProperty.call(from, key)) {
|
|
80
|
+
to[key] = from[key];
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
if (getOwnPropertySymbols) {
|
|
85
|
+
symbols = getOwnPropertySymbols(from);
|
|
86
|
+
for (var i = 0; i < symbols.length; i++) {
|
|
87
|
+
if (propIsEnumerable.call(from, symbols[i])) {
|
|
88
|
+
to[symbols[i]] = from[symbols[i]];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return to;
|
|
95
|
+
};
|
|
96
|
+
return objectAssign;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export { requireObjectAssign as __require };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { __require as requireReactPropTypesSecret } from './lib/ReactPropTypesSecret.js';
|
|
2
|
+
import { __require as requireHas } from './lib/has.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
var checkPropTypes_1;
|
|
12
|
+
var hasRequiredCheckPropTypes;
|
|
13
|
+
|
|
14
|
+
function requireCheckPropTypes () {
|
|
15
|
+
if (hasRequiredCheckPropTypes) return checkPropTypes_1;
|
|
16
|
+
hasRequiredCheckPropTypes = 1;
|
|
17
|
+
|
|
18
|
+
var printWarning = function() {};
|
|
19
|
+
|
|
20
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
21
|
+
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
22
|
+
var loggedTypeFailures = {};
|
|
23
|
+
var has = requireHas();
|
|
24
|
+
|
|
25
|
+
printWarning = function(text) {
|
|
26
|
+
var message = 'Warning: ' + text;
|
|
27
|
+
if (typeof console !== 'undefined') {
|
|
28
|
+
console.error(message);
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
// --- Welcome to debugging React ---
|
|
32
|
+
// This error was thrown as a convenience so that you can use this stack
|
|
33
|
+
// to find the callsite that caused this warning to fire.
|
|
34
|
+
throw new Error(message);
|
|
35
|
+
} catch (x) { /**/ }
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Assert that the values match with the type specs.
|
|
41
|
+
* Error messages are memorized and will only be shown once.
|
|
42
|
+
*
|
|
43
|
+
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
44
|
+
* @param {object} values Runtime values that need to be type-checked
|
|
45
|
+
* @param {string} location e.g. "prop", "context", "child context"
|
|
46
|
+
* @param {string} componentName Name of the component for error messages.
|
|
47
|
+
* @param {?Function} getStack Returns the component stack.
|
|
48
|
+
* @private
|
|
49
|
+
*/
|
|
50
|
+
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
51
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
52
|
+
for (var typeSpecName in typeSpecs) {
|
|
53
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
54
|
+
var error;
|
|
55
|
+
// Prop type validation may throw. In case they do, we don't want to
|
|
56
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
57
|
+
// After these have been cleaned up, we'll let them throw.
|
|
58
|
+
try {
|
|
59
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
60
|
+
// behavior as without this statement except with a better message.
|
|
61
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
62
|
+
var err = Error(
|
|
63
|
+
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
64
|
+
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
65
|
+
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
66
|
+
);
|
|
67
|
+
err.name = 'Invariant Violation';
|
|
68
|
+
throw err;
|
|
69
|
+
}
|
|
70
|
+
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
71
|
+
} catch (ex) {
|
|
72
|
+
error = ex;
|
|
73
|
+
}
|
|
74
|
+
if (error && !(error instanceof Error)) {
|
|
75
|
+
printWarning(
|
|
76
|
+
(componentName || 'React class') + ': type specification of ' +
|
|
77
|
+
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
78
|
+
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
79
|
+
'You may have forgotten to pass an argument to the type checker ' +
|
|
80
|
+
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
81
|
+
'shape all require an argument).'
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
85
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
86
|
+
// same error.
|
|
87
|
+
loggedTypeFailures[error.message] = true;
|
|
88
|
+
|
|
89
|
+
var stack = getStack ? getStack() : '';
|
|
90
|
+
|
|
91
|
+
printWarning(
|
|
92
|
+
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Resets warning cache when testing.
|
|
102
|
+
*
|
|
103
|
+
* @private
|
|
104
|
+
*/
|
|
105
|
+
checkPropTypes.resetWarningCache = function() {
|
|
106
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
107
|
+
loggedTypeFailures = {};
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
checkPropTypes_1 = checkPropTypes;
|
|
112
|
+
return checkPropTypes_1;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export { requireCheckPropTypes as __require };
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { __require as requireReactPropTypesSecret } from './lib/ReactPropTypesSecret.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
var factoryWithThrowingShims;
|
|
11
|
+
var hasRequiredFactoryWithThrowingShims;
|
|
12
|
+
|
|
13
|
+
function requireFactoryWithThrowingShims () {
|
|
14
|
+
if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
|
|
15
|
+
hasRequiredFactoryWithThrowingShims = 1;
|
|
16
|
+
|
|
17
|
+
var ReactPropTypesSecret = requireReactPropTypesSecret();
|
|
18
|
+
|
|
19
|
+
function emptyFunction() {}
|
|
20
|
+
function emptyFunctionWithReset() {}
|
|
21
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
22
|
+
|
|
23
|
+
factoryWithThrowingShims = function() {
|
|
24
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
25
|
+
if (secret === ReactPropTypesSecret) {
|
|
26
|
+
// It is still safe when called from React.
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
var err = new Error(
|
|
30
|
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
31
|
+
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
32
|
+
'Read more at http://fb.me/use-check-prop-types'
|
|
33
|
+
);
|
|
34
|
+
err.name = 'Invariant Violation';
|
|
35
|
+
throw err;
|
|
36
|
+
} shim.isRequired = shim;
|
|
37
|
+
function getShim() {
|
|
38
|
+
return shim;
|
|
39
|
+
} // Important!
|
|
40
|
+
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
41
|
+
var ReactPropTypes = {
|
|
42
|
+
array: shim,
|
|
43
|
+
bigint: shim,
|
|
44
|
+
bool: shim,
|
|
45
|
+
func: shim,
|
|
46
|
+
number: shim,
|
|
47
|
+
object: shim,
|
|
48
|
+
string: shim,
|
|
49
|
+
symbol: shim,
|
|
50
|
+
|
|
51
|
+
any: shim,
|
|
52
|
+
arrayOf: getShim,
|
|
53
|
+
element: shim,
|
|
54
|
+
elementType: shim,
|
|
55
|
+
instanceOf: getShim,
|
|
56
|
+
node: shim,
|
|
57
|
+
objectOf: getShim,
|
|
58
|
+
oneOf: getShim,
|
|
59
|
+
oneOfType: getShim,
|
|
60
|
+
shape: getShim,
|
|
61
|
+
exact: getShim,
|
|
62
|
+
|
|
63
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
64
|
+
resetWarningCache: emptyFunction
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
68
|
+
|
|
69
|
+
return ReactPropTypes;
|
|
70
|
+
};
|
|
71
|
+
return factoryWithThrowingShims;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { requireFactoryWithThrowingShims as __require };
|