@antscorp/antsomi-ui 1.3.5-beta.559 → 1.3.5-beta.560
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.
|
@@ -10,7 +10,6 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
12
|
// Libraries
|
|
13
|
-
import { ConfigProvider } from 'antd';
|
|
14
13
|
import { isNil } from 'lodash';
|
|
15
14
|
import React, { useCallback, useEffect, useMemo } from 'react';
|
|
16
15
|
// Components
|
|
@@ -116,32 +115,37 @@ export const DrawerDetail = props => {
|
|
|
116
115
|
localStorage.setItem(DRAWER_DETAIL_LOCAL_STORAGE_KEY, JSON.stringify(Object.assign(Object.assign({}, localStorageValues), { [name || '']: !collapseDrawer })));
|
|
117
116
|
}
|
|
118
117
|
};
|
|
119
|
-
return (React.createElement(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
118
|
+
return (React.createElement(StyledDrawer, Object.assign({ push: false, closable: false, width: drawerWidth, motion: {
|
|
119
|
+
visible: false,
|
|
120
|
+
motionAppear: false,
|
|
121
|
+
motionEnter: false,
|
|
122
|
+
motionLeave: false,
|
|
123
|
+
}, maskMotion: {
|
|
124
|
+
visible: false,
|
|
125
|
+
motionAppear: false,
|
|
126
|
+
motionEnter: false,
|
|
127
|
+
motionLeave: false,
|
|
128
|
+
}, classNames: {
|
|
129
|
+
body: 'drawer-detail-body',
|
|
130
|
+
}, contentWrapperStyle: {
|
|
131
|
+
transition: 'none',
|
|
132
|
+
}, maskStyle: {
|
|
133
|
+
transition: 'none',
|
|
134
|
+
}, destroyOnClose: destroyOnClose }, restProps),
|
|
135
|
+
showCloseIcon && (React.createElement("div", Object.assign({ className: "close-btn" }, restOfCloseIcon, { onClick: e => {
|
|
136
|
+
onCloseIconClick(e);
|
|
137
|
+
onClose(e);
|
|
138
|
+
} }),
|
|
139
|
+
React.createElement(Icon, { type: "icon-ants-remove-slim", size: 14 }))),
|
|
140
|
+
showExpandButton && !fullScreen && (React.createElement(ToggleDrawerSizeButton, { style: Object.assign({}, (!showMenu && { background: '#ffffff' })), onClick: () => handleToggleDrawerSize(), collapse: collapseDrawer })),
|
|
141
|
+
showMenu && (React.createElement(LeftMenu, { className: "animate__animated animate__fadeIn" },
|
|
142
|
+
React.createElement("div", null,
|
|
143
|
+
showClose && (React.createElement(CloseBtn, { onClick: onClose },
|
|
134
144
|
React.createElement(Icon, { type: "icon-ants-remove-slim", size: 14 }))),
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
React.createElement(MenuItem, { key: item === null || item === void 0 ? void 0 : item.key, className: (selectedKeys === null || selectedKeys === void 0 ? void 0 : selectedKeys.includes(item.key)) ? 'active' : '', onClick: () => onClick && onClick(item) }, item.icon)))))),
|
|
142
|
-
React.createElement(MenuFooter, null, footer))),
|
|
143
|
-
React.createElement(Content, null,
|
|
144
|
-
(headerProps === null || headerProps === void 0 ? void 0 : headerProps.children) && (React.createElement(DrawerHeader, Object.assign({ align: "center" }, restOfHeaderProps), headerChildren)),
|
|
145
|
-
children)))));
|
|
145
|
+
React.createElement(Flex, { vertical: true, gap: 10, align: "center", justify: "center" }, items === null || items === void 0 ? void 0 : items.map((item) => (React.createElement(Tooltip, { key: item === null || item === void 0 ? void 0 : item.key, title: item === null || item === void 0 ? void 0 : item.label, mouseEnterDelay: 0.3, placement: "right" },
|
|
146
|
+
React.createElement(MenuItem, { key: item === null || item === void 0 ? void 0 : item.key, className: (selectedKeys === null || selectedKeys === void 0 ? void 0 : selectedKeys.includes(item.key)) ? 'active' : '', onClick: () => onClick && onClick(item) }, item.icon)))))),
|
|
147
|
+
React.createElement(MenuFooter, null, footer))),
|
|
148
|
+
React.createElement(Content, null,
|
|
149
|
+
(headerProps === null || headerProps === void 0 ? void 0 : headerProps.children) && (React.createElement(DrawerHeader, Object.assign({ align: "center" }, restOfHeaderProps), headerChildren)),
|
|
150
|
+
children)));
|
|
146
151
|
};
|
|
147
|
-
DrawerDetail.defaultProps = {};
|