@hw-component/table 1.10.26 → 1.10.28
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/es/DialogTable/DwEditTable.d.ts +1 -1
- package/es/DialogTable/DwEditTable.js +10 -5
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/modal.d.ts +1 -0
- package/es/render/Text.d.ts +1 -0
- package/lib/DialogTable/DwEditTable.d.ts +1 -1
- package/lib/DialogTable/DwEditTable.js +10 -5
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -0
- package/lib/modal.d.ts +1 -0
- package/lib/render/Text.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/DialogTable/DwEditTable.tsx +6 -1
- package/src/components/index.tsx +1 -1
- package/src/components/modal.ts +1 -0
- package/src/pages/ModalEditTable/index.tsx +3 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { DwTableProps } from "../modal";
|
|
3
3
|
import { ProColumns } from "@ant-design/pro-table/lib/typing";
|
|
4
|
-
declare const _default: ({ configData: configDataProps, request: requestProps, editTableProps, editDialogTable, visible, bodyStyle, onClose, afterVisibleChange, contentRender, width, footer, ...props }: DwTableProps<ProColumns[]>) => JSX.Element;
|
|
4
|
+
declare const _default: ({ configData: configDataProps, request: requestProps, editTableProps, editDialogTable, visible, bodyStyle, onClose, afterVisibleChange, contentRender, width, footer, afterClose, ...props }: DwTableProps<ProColumns[]>) => JSX.Element;
|
|
5
5
|
export default _default;
|
|
@@ -16,7 +16,7 @@ import { EditTableContent } from './Content.js';
|
|
|
16
16
|
import { CloseOutlined } from '@ant-design/icons';
|
|
17
17
|
import { useClassName } from '../hooks/index.js';
|
|
18
18
|
|
|
19
|
-
var _excluded = ["configData", "request", "editTableProps", "editDialogTable", "visible", "bodyStyle", "onClose", "afterVisibleChange", "contentRender", "width", "footer"];
|
|
19
|
+
var _excluded = ["configData", "request", "editTableProps", "editDialogTable", "visible", "bodyStyle", "onClose", "afterVisibleChange", "contentRender", "width", "footer", "afterClose"];
|
|
20
20
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
21
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
22
|
var DwEditTable = (function (_ref) {
|
|
@@ -29,13 +29,14 @@ var DwEditTable = (function (_ref) {
|
|
|
29
29
|
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
30
30
|
_ref$bodyStyle = _ref.bodyStyle,
|
|
31
31
|
bodyStyle = _ref$bodyStyle === void 0 ? {} : _ref$bodyStyle,
|
|
32
|
-
_onClose = _ref.onClose
|
|
33
|
-
|
|
34
|
-
contentRender = _ref.contentRender,
|
|
32
|
+
_onClose = _ref.onClose;
|
|
33
|
+
_ref.afterVisibleChange;
|
|
34
|
+
var contentRender = _ref.contentRender,
|
|
35
35
|
_ref$width = _ref.width,
|
|
36
36
|
width = _ref$width === void 0 ? 888 : _ref$width,
|
|
37
37
|
_ref$footer = _ref.footer,
|
|
38
38
|
footer = _ref$footer === void 0 ? null : _ref$footer,
|
|
39
|
+
afterClose = _ref.afterClose,
|
|
39
40
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
40
41
|
var _useVisible = useVisible(visible),
|
|
41
42
|
modalVisible = _useVisible.modalVisible,
|
|
@@ -113,7 +114,11 @@ var DwEditTable = (function (_ref) {
|
|
|
113
114
|
padding: 0,
|
|
114
115
|
paddingBottom: 12
|
|
115
116
|
}, bodyStyle),
|
|
116
|
-
afterVisibleChange: afterVisibleChange
|
|
117
|
+
afterVisibleChange: function afterVisibleChange(visible) {
|
|
118
|
+
if (!visible) {
|
|
119
|
+
afterClose === null || afterClose === void 0 || afterClose();
|
|
120
|
+
}
|
|
121
|
+
},
|
|
117
122
|
children: jsx(EditTableContent, {
|
|
118
123
|
contentRender: contentRender,
|
|
119
124
|
editTableProps: editTableProps,
|
package/es/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { default as HTableFooter } from "./HTableFooter";
|
|
|
9
9
|
export { default as HTableHeader } from "./HTableHeader";
|
|
10
10
|
export { default as HTablePagination } from "./HTablePagination";
|
|
11
11
|
export { default as HModalTable } from "./DialogTable/ModalTable";
|
|
12
|
-
export { useHDialogTable } from "./DialogTable/hooks";
|
|
12
|
+
export { useHDialogTable, useHDialogEditTable } from "./DialogTable/hooks";
|
|
13
13
|
export { default as HDwTable } from "./DialogTable/DwTable";
|
|
14
14
|
export { DefaultSubComponent as HTableHeaderSubBtn } from "./HTableHeader/defaultSubComponent";
|
|
15
15
|
export { default as HEditTable } from "./EditTable";
|
package/es/index.js
CHANGED
|
@@ -8,7 +8,7 @@ export { default as HTableFooter } from './HTableFooter/index.js';
|
|
|
8
8
|
export { default as HTableHeader } from './HTableHeader/index.js';
|
|
9
9
|
export { default as HTablePagination } from './HTablePagination/index.js';
|
|
10
10
|
export { default as HModalTable } from './DialogTable/ModalTable.js';
|
|
11
|
-
export { useHDialogTable } from './DialogTable/hooks.js';
|
|
11
|
+
export { useHDialogEditTable, useHDialogTable } from './DialogTable/hooks.js';
|
|
12
12
|
export { default as HDwTable } from './DialogTable/DwTable.js';
|
|
13
13
|
export { DefaultSubComponent as HTableHeaderSubBtn } from './HTableHeader/defaultSubComponent.js';
|
|
14
14
|
export { default as HEditTable } from './EditTable/index.js';
|
package/es/modal.d.ts
CHANGED
|
@@ -139,6 +139,7 @@ export interface DwTableProps<T = HTableProps["configData"]> extends DrawerProps
|
|
|
139
139
|
contentRender?: (node: React.ReactNode) => React.ReactNode;
|
|
140
140
|
editTableProps?: Omit<HEditTableProps, "configData" | "request">;
|
|
141
141
|
dataSource?: any[];
|
|
142
|
+
afterClose?: () => void;
|
|
142
143
|
}
|
|
143
144
|
export interface ModalTableProps<T = HTableProps["configData"]> extends Omit<ModalProps, "onOk"> {
|
|
144
145
|
tableProps?: Omit<HTableProps, "configData" | "request">;
|
package/es/render/Text.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { DwTableProps } from "../modal";
|
|
3
3
|
import { ProColumns } from "@ant-design/pro-table/lib/typing";
|
|
4
|
-
declare const _default: ({ configData: configDataProps, request: requestProps, editTableProps, editDialogTable, visible, bodyStyle, onClose, afterVisibleChange, contentRender, width, footer, ...props }: DwTableProps<ProColumns[]>) => JSX.Element;
|
|
4
|
+
declare const _default: ({ configData: configDataProps, request: requestProps, editTableProps, editDialogTable, visible, bodyStyle, onClose, afterVisibleChange, contentRender, width, footer, afterClose, ...props }: DwTableProps<ProColumns[]>) => JSX.Element;
|
|
5
5
|
export default _default;
|
|
@@ -19,7 +19,7 @@ var Content = require('./Content.js');
|
|
|
19
19
|
var icons = require('@ant-design/icons');
|
|
20
20
|
var index = require('../hooks/index.js');
|
|
21
21
|
|
|
22
|
-
var _excluded = ["configData", "request", "editTableProps", "editDialogTable", "visible", "bodyStyle", "onClose", "afterVisibleChange", "contentRender", "width", "footer"];
|
|
22
|
+
var _excluded = ["configData", "request", "editTableProps", "editDialogTable", "visible", "bodyStyle", "onClose", "afterVisibleChange", "contentRender", "width", "footer", "afterClose"];
|
|
23
23
|
function ownKeys(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
24
24
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
25
25
|
var DwEditTable = (function (_ref) {
|
|
@@ -32,13 +32,14 @@ var DwEditTable = (function (_ref) {
|
|
|
32
32
|
visible = _ref$visible === void 0 ? false : _ref$visible,
|
|
33
33
|
_ref$bodyStyle = _ref.bodyStyle,
|
|
34
34
|
bodyStyle = _ref$bodyStyle === void 0 ? {} : _ref$bodyStyle,
|
|
35
|
-
_onClose = _ref.onClose
|
|
36
|
-
|
|
37
|
-
contentRender = _ref.contentRender,
|
|
35
|
+
_onClose = _ref.onClose;
|
|
36
|
+
_ref.afterVisibleChange;
|
|
37
|
+
var contentRender = _ref.contentRender,
|
|
38
38
|
_ref$width = _ref.width,
|
|
39
39
|
width = _ref$width === void 0 ? 888 : _ref$width,
|
|
40
40
|
_ref$footer = _ref.footer,
|
|
41
41
|
footer = _ref$footer === void 0 ? null : _ref$footer,
|
|
42
|
+
afterClose = _ref.afterClose,
|
|
42
43
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
43
44
|
var _useVisible = hooks.useVisible(visible),
|
|
44
45
|
modalVisible = _useVisible.modalVisible,
|
|
@@ -116,7 +117,11 @@ var DwEditTable = (function (_ref) {
|
|
|
116
117
|
padding: 0,
|
|
117
118
|
paddingBottom: 12
|
|
118
119
|
}, bodyStyle),
|
|
119
|
-
afterVisibleChange: afterVisibleChange
|
|
120
|
+
afterVisibleChange: function afterVisibleChange(visible) {
|
|
121
|
+
if (!visible) {
|
|
122
|
+
afterClose === null || afterClose === void 0 || afterClose();
|
|
123
|
+
}
|
|
124
|
+
},
|
|
120
125
|
children: jsxRuntime.jsx(Content.EditTableContent, {
|
|
121
126
|
contentRender: contentRender,
|
|
122
127
|
editTableProps: editTableProps,
|
package/lib/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export { default as HTableFooter } from "./HTableFooter";
|
|
|
9
9
|
export { default as HTableHeader } from "./HTableHeader";
|
|
10
10
|
export { default as HTablePagination } from "./HTablePagination";
|
|
11
11
|
export { default as HModalTable } from "./DialogTable/ModalTable";
|
|
12
|
-
export { useHDialogTable } from "./DialogTable/hooks";
|
|
12
|
+
export { useHDialogTable, useHDialogEditTable } from "./DialogTable/hooks";
|
|
13
13
|
export { default as HDwTable } from "./DialogTable/DwTable";
|
|
14
14
|
export { DefaultSubComponent as HTableHeaderSubBtn } from "./HTableHeader/defaultSubComponent";
|
|
15
15
|
export { default as HEditTable } from "./EditTable";
|
package/lib/index.js
CHANGED
|
@@ -28,6 +28,7 @@ exports.HTableFooter = index$1.default;
|
|
|
28
28
|
exports.HTableHeader = index$2.default;
|
|
29
29
|
exports.HTablePagination = index$3.default;
|
|
30
30
|
exports.HModalTable = ModalTable.default;
|
|
31
|
+
exports.useHDialogEditTable = hooks.useHDialogEditTable;
|
|
31
32
|
exports.useHDialogTable = hooks.useHDialogTable;
|
|
32
33
|
exports.HDwTable = DwTable.default;
|
|
33
34
|
exports.HTableHeaderSubBtn = defaultSubComponent.DefaultSubComponent;
|
package/lib/modal.d.ts
CHANGED
|
@@ -139,6 +139,7 @@ export interface DwTableProps<T = HTableProps["configData"]> extends DrawerProps
|
|
|
139
139
|
contentRender?: (node: React.ReactNode) => React.ReactNode;
|
|
140
140
|
editTableProps?: Omit<HEditTableProps, "configData" | "request">;
|
|
141
141
|
dataSource?: any[];
|
|
142
|
+
afterClose?: () => void;
|
|
142
143
|
}
|
|
143
144
|
export interface ModalTableProps<T = HTableProps["configData"]> extends Omit<ModalProps, "onOk"> {
|
|
144
145
|
tableProps?: Omit<HTableProps, "configData" | "request">;
|
package/lib/render/Text.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -23,6 +23,7 @@ export default ({
|
|
|
23
23
|
contentRender,
|
|
24
24
|
width = 888,
|
|
25
25
|
footer = null,
|
|
26
|
+
afterClose,
|
|
26
27
|
...props
|
|
27
28
|
}: DwTableProps<ProColumns[]>) => {
|
|
28
29
|
const { modalVisible, setModalVisible } = useVisible(visible);
|
|
@@ -96,7 +97,11 @@ export default ({
|
|
|
96
97
|
}
|
|
97
98
|
width={width}
|
|
98
99
|
bodyStyle={{ padding: 0, paddingBottom: 12, ...bodyStyle }}
|
|
99
|
-
afterVisibleChange={
|
|
100
|
+
afterVisibleChange={(visible) =>{
|
|
101
|
+
if (!visible){
|
|
102
|
+
afterClose?.()
|
|
103
|
+
}
|
|
104
|
+
}}
|
|
100
105
|
>
|
|
101
106
|
<EditTableContent
|
|
102
107
|
contentRender={contentRender}
|
package/src/components/index.tsx
CHANGED
|
@@ -9,7 +9,7 @@ export { default as HTableFooter } from "./HTableFooter";
|
|
|
9
9
|
export { default as HTableHeader } from "./HTableHeader";
|
|
10
10
|
export { default as HTablePagination } from "./HTablePagination";
|
|
11
11
|
export { default as HModalTable } from "./DialogTable/ModalTable";
|
|
12
|
-
export { useHDialogTable } from "./DialogTable/hooks";
|
|
12
|
+
export { useHDialogTable,useHDialogEditTable } from "./DialogTable/hooks";
|
|
13
13
|
export { default as HDwTable } from "./DialogTable/DwTable";
|
|
14
14
|
export { DefaultSubComponent as HTableHeaderSubBtn } from "./HTableHeader/defaultSubComponent";
|
|
15
15
|
export { default as HEditTable } from "./EditTable";
|
package/src/components/modal.ts
CHANGED
|
@@ -177,6 +177,7 @@ export interface DwTableProps<T = HTableProps["configData"]>
|
|
|
177
177
|
contentRender?: (node: React.ReactNode) => React.ReactNode;
|
|
178
178
|
editTableProps?: Omit<HEditTableProps, "configData" | "request">;
|
|
179
179
|
dataSource?: any[];
|
|
180
|
+
afterClose?: () => void;
|
|
180
181
|
}
|
|
181
182
|
|
|
182
183
|
export interface ModalTableProps<T = HTableProps["configData"]>
|