@hw-component/table 1.9.38 → 1.9.40

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.
Files changed (35) hide show
  1. package/.eslintcache +1 -1
  2. package/es/HTableBody/index.d.ts +1 -1
  3. package/es/HTableHeader/hooks/config.d.ts +37 -0
  4. package/es/HTableHeader/hooks/config.js +46 -0
  5. package/es/HTableHeader/hooks/useHeaderDefaultProps.d.ts +10 -0
  6. package/es/HTableHeader/hooks/useHeaderDefaultProps.js +37 -0
  7. package/es/HTableHeader/hooks/useHideMoreTitle.d.ts +4 -0
  8. package/es/HTableHeader/{hooks.js → hooks/useHideMoreTitle.js} +56 -112
  9. package/es/HTableHeader/index.js +2 -1
  10. package/es/hooks/useCurrentTable.js +4 -1
  11. package/es/modal.d.ts +1 -1
  12. package/lib/HTableBody/index.d.ts +1 -1
  13. package/lib/HTableHeader/hooks/config.d.ts +37 -0
  14. package/lib/HTableHeader/hooks/config.js +48 -0
  15. package/lib/HTableHeader/hooks/useHeaderDefaultProps.d.ts +10 -0
  16. package/lib/HTableHeader/hooks/useHeaderDefaultProps.js +40 -0
  17. package/lib/HTableHeader/hooks/useHideMoreTitle.d.ts +4 -0
  18. package/lib/HTableHeader/{hooks.js → hooks/useHideMoreTitle.js} +58 -113
  19. package/lib/HTableHeader/index.js +4 -3
  20. package/lib/hooks/useCurrentTable.js +4 -1
  21. package/lib/modal.d.ts +1 -1
  22. package/package.json +1 -1
  23. package/src/components/DialogTable/hooks.ts +10 -10
  24. package/src/components/HTableBody/index.tsx +4 -3
  25. package/src/components/HTableHeader/hooks/config.tsx +42 -0
  26. package/src/components/HTableHeader/hooks/useHeaderDefaultProps.ts +37 -0
  27. package/src/components/HTableHeader/{hooks.tsx → hooks/useHideMoreTitle.tsx} +34 -89
  28. package/src/components/HTableHeader/index.tsx +22 -6
  29. package/src/components/hooks/useCurrentTable.ts +4 -1
  30. package/src/components/modal.ts +1 -2
  31. package/src/components/render/config.tsx +3 -3
  32. package/src/pages/DwTable/index.tsx +7 -5
  33. package/src/pages/Table/index.tsx +2 -3
  34. package/es/HTableHeader/hooks.d.ts +0 -12
  35. package/lib/HTableHeader/hooks.d.ts +0 -12
@@ -1,7 +1,7 @@
1
1
  import type { ProTableProps } from "@ant-design/pro-table";
2
2
  import type { ActionRenderFn, ConfigDataModal, ParamsModal, HTableInstance, HRowSelection } from "../modal";
3
3
  import React from "react";
4
- import { IPaginationProps } from "../HTablePagination";
4
+ import type { IPaginationProps } from "../HTablePagination";
5
5
  import type { AffixProps } from "antd/lib/affix";
6
6
  import type { OptionConfig } from "@ant-design/pro-table/lib/components/ToolBar";
7
7
  export interface OptionModal extends OptionConfig {
@@ -0,0 +1,37 @@
1
+ import type { HFormInstance, HItemProps } from "@hw-component/form/es/Form/modal";
2
+ import React from "react";
3
+ export declare const sizeObj: {
4
+ xl: {
5
+ min: number;
6
+ max: number;
7
+ };
8
+ xxl: {
9
+ min: number;
10
+ };
11
+ lg: {
12
+ min: number;
13
+ max: number;
14
+ };
15
+ md: {
16
+ min: number;
17
+ max: number;
18
+ };
19
+ sm: {
20
+ min: number;
21
+ max: number;
22
+ };
23
+ xs: {
24
+ max: number;
25
+ };
26
+ };
27
+ export declare const defaultSubItem: {
28
+ type: string;
29
+ itemProps: {
30
+ position: string;
31
+ };
32
+ style: {
33
+ padding: number;
34
+ marginLeft: number;
35
+ };
36
+ render: (item: HItemProps, node: React.ReactNode, form: HFormInstance) => JSX.Element;
37
+ };
@@ -0,0 +1,46 @@
1
+ // welcome to hoo hoo hoo
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { DefaultSubComponent } from '../defaultSubComponent.js';
4
+
5
+ var sizeObj = {
6
+ xl: {
7
+ min: 1200,
8
+ max: 1600
9
+ },
10
+ xxl: {
11
+ min: 1600
12
+ },
13
+ lg: {
14
+ min: 992,
15
+ max: 1200
16
+ },
17
+ md: {
18
+ min: 768,
19
+ max: 992
20
+ },
21
+ sm: {
22
+ min: 576,
23
+ max: 768
24
+ },
25
+ xs: {
26
+ max: 576
27
+ }
28
+ };
29
+ var defaultSubItem = {
30
+ type: "submit",
31
+ itemProps: {
32
+ position: "end"
33
+ },
34
+ style: {
35
+ padding: 0,
36
+ marginLeft: -20
37
+ },
38
+ render: function render(item, node, form) {
39
+ return jsx(DefaultSubComponent, {
40
+ form: form
41
+ });
42
+ }
43
+ };
44
+
45
+ export { defaultSubItem, sizeObj };
46
+ // powered by hdj
@@ -0,0 +1,10 @@
1
+ import type { IHeaderProps } from "../modal";
2
+ declare const _default: ({ configData, loading, onFinish, hideLabel, labelWidth, table, }: IHeaderProps) => {
3
+ tableInstance: import("../../modal").HTableInstance;
4
+ tableLabelWidth: number | undefined;
5
+ tableHideLabel: boolean | undefined;
6
+ subOnFinish: (value: Record<string, any>) => Promise<any>;
7
+ submitLoading: boolean | undefined;
8
+ headerConfigData: import("../../modal").ConfigDataModal;
9
+ };
10
+ export default _default;
@@ -0,0 +1,37 @@
1
+ // welcome to hoo hoo hoo
2
+ import { useHTableContext } from '../../context.js';
3
+ import useHTable from '../../hooks/useHTable.js';
4
+
5
+ var useHeaderDefaultProps = (function (_ref) {
6
+ var configData = _ref.configData,
7
+ loading = _ref.loading,
8
+ onFinish = _ref.onFinish,
9
+ hideLabel = _ref.hideLabel,
10
+ labelWidth = _ref.labelWidth,
11
+ table = _ref.table;
12
+ var _useHTableContext = useHTableContext(),
13
+ contextTableInstance = _useHTableContext.tableInstance,
14
+ contextLoading = _useHTableContext.loading,
15
+ contextOnFinish = _useHTableContext.onFinish,
16
+ contextConfigData = _useHTableContext.configData,
17
+ contextHideLabel = _useHTableContext.hideLabel,
18
+ contextLabelWidth = _useHTableContext.labelWidth;
19
+ var defaultTable = useHTable();
20
+ var headerConfigData = configData || contextConfigData;
21
+ var submitLoading = contextLoading || loading;
22
+ var subOnFinish = onFinish || contextOnFinish;
23
+ var tableHideLabel = typeof hideLabel === "undefined" ? contextHideLabel : hideLabel;
24
+ var tableLabelWidth = labelWidth || contextLabelWidth;
25
+ var tableInstance = table || contextTableInstance;
26
+ return {
27
+ tableInstance: tableInstance || defaultTable,
28
+ tableLabelWidth: tableLabelWidth,
29
+ tableHideLabel: tableHideLabel,
30
+ subOnFinish: subOnFinish,
31
+ submitLoading: submitLoading,
32
+ headerConfigData: headerConfigData
33
+ };
34
+ });
35
+
36
+ export { useHeaderDefaultProps as default };
37
+ // powered by hdj
@@ -0,0 +1,4 @@
1
+ import type { IHeaderProps } from "../modal";
2
+ import type { HItemProps } from "@hw-component/form/es/Form/modal";
3
+ declare const _default: ({ searchSpan, configData, table }: IHeaderProps) => HItemProps[];
4
+ export default _default;
@@ -1,4 +1,10 @@
1
1
  // welcome to hoo hoo hoo
2
+ import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
3
+ import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
4
+ import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
5
+ import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
6
+ import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/object/define-properties';
7
+ import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
2
8
  import _toConsumableArray from '@babel/runtime-corejs3/helpers/toConsumableArray';
3
9
  import _slicedToArray from '@babel/runtime-corejs3/helpers/slicedToArray';
4
10
  import _defineProperty from '@babel/runtime-corejs3/helpers/defineProperty';
@@ -9,80 +15,15 @@ import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/inst
9
15
  import _sliceInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/slice';
10
16
  import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
11
17
  import _concatInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/concat';
12
- import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
13
- import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
14
- import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
15
- import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
16
- import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/object/define-properties';
17
- import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
18
- import { jsx } from 'react/jsx-runtime';
19
18
  import { useState, useEffect } from 'react';
20
- import { useClassName } from '../hooks/index.js';
21
- import { DefaultSubComponent } from './defaultSubComponent.js';
22
- import { useHTableContext } from '../context.js';
23
- import { renderData } from './defaultFormRender.js';
24
- import useHTable from '../hooks/useHTable.js';
19
+ import { defaultSubItem, sizeObj } from './config.js';
20
+ import { useHTableContext } from '../../context.js';
21
+ import { useClassName } from '../../hooks/index.js';
22
+ import { renderData } from '../defaultFormRender.js';
25
23
 
26
24
  var _excluded = ["searchType", "title", "name", "dataIndex", "itemProps", "searchRender", "childrenDataIndex", "showSearch", "hideInTable", "align", "searchLabel", "titleStr"];
27
25
  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; }
28
26
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context3 = ownKeys(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
29
- var sizeObj = {
30
- xl: {
31
- min: 1200,
32
- max: 1600
33
- },
34
- xxl: {
35
- min: 1600
36
- },
37
- lg: {
38
- min: 992,
39
- max: 1200
40
- },
41
- md: {
42
- min: 768,
43
- max: 992
44
- },
45
- sm: {
46
- min: 576,
47
- max: 768
48
- },
49
- xs: {
50
- max: 576
51
- }
52
- };
53
- var defaultSubItem = {
54
- type: "submit",
55
- itemProps: {
56
- position: "end"
57
- },
58
- style: {
59
- padding: 0,
60
- marginLeft: -20
61
- },
62
- render: function render(item, node, form) {
63
- return jsx(DefaultSubComponent, {
64
- form: form
65
- });
66
- }
67
- };
68
- var getCuSpanMaxNum = function getCuSpanMaxNum() {
69
- var searchSpan = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
70
- span: 6
71
- };
72
- var clientWidth = document.documentElement.clientWidth;
73
- var keys = _Object$keys(sizeObj);
74
- var index = _findIndexInstanceProperty(keys).call(keys, function (value) {
75
- var _sizeObj$value = sizeObj[value],
76
- _sizeObj$value$min = _sizeObj$value.min,
77
- min = _sizeObj$value$min === void 0 ? 0 : _sizeObj$value$min,
78
- _sizeObj$value$max = _sizeObj$value.max,
79
- max = _sizeObj$value$max === void 0 ? Number.MAX_VALUE : _sizeObj$value$max;
80
- return clientWidth >= min && clientWidth < max;
81
- });
82
- var cuKey = keys[index];
83
- var cuSpan = searchSpan[cuKey] || searchSpan.span;
84
- return 24 / cuSpan;
85
- };
86
27
  var formConfigDataItemProvider = function formConfigDataItemProvider(_ref, table) {
87
28
  var searchType = _ref.searchType,
88
29
  title = _ref.title,
@@ -116,6 +57,24 @@ var formConfigDataItemProvider = function formConfigDataItemProvider(_ref, table
116
57
  }
117
58
  });
118
59
  };
60
+ var getCuSpanMaxNum = function getCuSpanMaxNum() {
61
+ var searchSpan = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {
62
+ span: 6
63
+ };
64
+ var clientWidth = document.documentElement.clientWidth;
65
+ var keys = _Object$keys(sizeObj);
66
+ var index = _findIndexInstanceProperty(keys).call(keys, function (value) {
67
+ var _sizeObj$value = sizeObj[value],
68
+ _sizeObj$value$min = _sizeObj$value.min,
69
+ min = _sizeObj$value$min === void 0 ? 0 : _sizeObj$value$min,
70
+ _sizeObj$value$max = _sizeObj$value.max,
71
+ max = _sizeObj$value$max === void 0 ? Number.MAX_VALUE : _sizeObj$value$max;
72
+ return clientWidth >= min && clientWidth < max;
73
+ });
74
+ var cuKey = keys[index];
75
+ var cuSpan = searchSpan[cuKey] || searchSpan.span;
76
+ return 24 / cuSpan;
77
+ };
119
78
  var mkNewConfig = function mkNewConfig(_ref2) {
120
79
  var _ref2$configData = _ref2.configData,
121
80
  configData = _ref2$configData === void 0 ? [] : _ref2$configData,
@@ -162,22 +121,37 @@ var filterHideFormItem = function filterHideFormItem(configData, className, sear
162
121
  hideData: hideData
163
122
  };
164
123
  };
165
- var useHideMoreTitle = function useHideMoreTitle(_ref3) {
124
+ var useDefaultOpen = function useDefaultOpen() {
125
+ var _useState = useState(false),
126
+ _useState2 = _slicedToArray(_useState, 2),
127
+ open = _useState2[0],
128
+ setOpen = _useState2[1];
129
+ var _useHTableContext = useHTableContext(),
130
+ _useHTableContext$hea = _useHTableContext.headerOpen,
131
+ headerOpen = _useHTableContext$hea === void 0 ? open : _useHTableContext$hea,
132
+ _useHTableContext$set = _useHTableContext.setHeaderOpen,
133
+ setHeaderOpen = _useHTableContext$set === void 0 ? setOpen : _useHTableContext$set;
134
+ return {
135
+ headerOpen: headerOpen,
136
+ setHeaderOpen: setHeaderOpen
137
+ };
138
+ };
139
+ var useHideMoreTitle = (function (_ref3) {
166
140
  var _context2;
167
141
  var searchSpan = _ref3.searchSpan,
168
142
  configData = _ref3.configData,
169
143
  table = _ref3.table;
170
- var _useState = useState([]),
171
- _useState2 = _slicedToArray(_useState, 2),
172
- formConfigData = _useState2[0],
173
- setFormConfigData = _useState2[1];
174
- var _useState3 = useState(defaultSubItem),
144
+ var _useState3 = useState([]),
175
145
  _useState4 = _slicedToArray(_useState3, 2),
176
- subData = _useState4[0],
177
- setSubData = _useState4[1];
178
- var _useHTableContext = useHTableContext(),
179
- headerOpen = _useHTableContext.headerOpen,
180
- setHeaderOpen = _useHTableContext.setHeaderOpen;
146
+ formConfigData = _useState4[0],
147
+ setFormConfigData = _useState4[1];
148
+ var _useState5 = useState(defaultSubItem),
149
+ _useState6 = _slicedToArray(_useState5, 2),
150
+ subData = _useState6[0],
151
+ setSubData = _useState6[1];
152
+ var _useDefaultOpen = useDefaultOpen(),
153
+ headerOpen = _useDefaultOpen.headerOpen,
154
+ setHeaderOpen = _useDefaultOpen.setHeaderOpen;
181
155
  var className = useClassName("hw-table-header-item-hide");
182
156
  var mkNewFn = function mkNewFn() {
183
157
  var _context;
@@ -216,37 +190,7 @@ var useHideMoreTitle = function useHideMoreTitle(_ref3) {
216
190
  };
217
191
  }, [configData, searchSpan, headerOpen]);
218
192
  return _concatInstanceProperty(_context2 = []).call(_context2, _toConsumableArray(formConfigData), [subData]);
219
- };
220
- var useHeaderDefaultProps = function useHeaderDefaultProps(_ref4) {
221
- var configData = _ref4.configData,
222
- loading = _ref4.loading,
223
- onFinish = _ref4.onFinish,
224
- hideLabel = _ref4.hideLabel,
225
- labelWidth = _ref4.labelWidth,
226
- table = _ref4.table;
227
- var _useHTableContext2 = useHTableContext(),
228
- contextTableInstance = _useHTableContext2.tableInstance,
229
- contextLoading = _useHTableContext2.loading,
230
- contextOnFinish = _useHTableContext2.onFinish,
231
- contextConfigData = _useHTableContext2.configData,
232
- contextHideLabel = _useHTableContext2.hideLabel,
233
- contextLabelWidth = _useHTableContext2.labelWidth;
234
- var defaultTable = useHTable();
235
- var headerConfigData = configData || contextConfigData;
236
- var submitLoading = contextLoading || loading;
237
- var subOnFinish = onFinish || contextOnFinish;
238
- var tableHideLabel = typeof hideLabel === "undefined" ? contextHideLabel : hideLabel;
239
- var tableLabelWidth = labelWidth || contextLabelWidth;
240
- var tableInstance = table || contextTableInstance;
241
- return {
242
- tableInstance: tableInstance || defaultTable,
243
- tableLabelWidth: tableLabelWidth,
244
- tableHideLabel: tableHideLabel,
245
- subOnFinish: subOnFinish,
246
- submitLoading: submitLoading,
247
- headerConfigData: headerConfigData
248
- };
249
- };
193
+ });
250
194
 
251
- export { useHeaderDefaultProps, useHideMoreTitle };
195
+ export { useHideMoreTitle as default };
252
196
  // powered by hdj
@@ -4,9 +4,10 @@ import { jsx } from 'react/jsx-runtime';
4
4
  import { Card } from 'antd';
5
5
  import { HForm } from '@hw-component/form';
6
6
  import { useClassName } from '../hooks/index.js';
7
- import { useHeaderDefaultProps, useHideMoreTitle } from './hooks.js';
7
+ import useHeaderDefaultProps from './hooks/useHeaderDefaultProps.js';
8
8
  import { HeaderProvider } from './Context.js';
9
9
  import { useHTableConfigContext } from '../TableConfig.js';
10
+ import useHideMoreTitle from './hooks/useHideMoreTitle.js';
10
11
 
11
12
  var _excluded = ["searchSpan", "headerStyle", "initValues", "onReset"];
12
13
  var defaultSearchSpan = {
@@ -22,7 +22,10 @@ var useCurrentTable = (function (_ref) {
22
22
  resultTable.table.getSelectedRowData = function () {
23
23
  return selectedRowData;
24
24
  };
25
- resultTable.table.getTableSourceData = function () {
25
+ resultTable.table.getTableSourceData = function (full) {
26
+ if (full) {
27
+ return dataSource;
28
+ }
26
29
  return dataSource === null || dataSource === void 0 ? void 0 : dataSource.records;
27
30
  };
28
31
  return resultTable;
package/es/modal.d.ts CHANGED
@@ -93,7 +93,7 @@ export interface TableInstance {
93
93
  reloadWithParams: (params?: ParamsModal) => Promise<any>;
94
94
  getParams: () => any;
95
95
  getSelectedRowData: () => RowObj;
96
- getTableSourceData: () => any;
96
+ getTableSourceData: (full?: boolean) => any;
97
97
  getColSettingKeys: () => ColCheckResultKeys;
98
98
  }
99
99
  export interface HTableInstance {
@@ -1,7 +1,7 @@
1
1
  import type { ProTableProps } from "@ant-design/pro-table";
2
2
  import type { ActionRenderFn, ConfigDataModal, ParamsModal, HTableInstance, HRowSelection } from "../modal";
3
3
  import React from "react";
4
- import { IPaginationProps } from "../HTablePagination";
4
+ import type { IPaginationProps } from "../HTablePagination";
5
5
  import type { AffixProps } from "antd/lib/affix";
6
6
  import type { OptionConfig } from "@ant-design/pro-table/lib/components/ToolBar";
7
7
  export interface OptionModal extends OptionConfig {
@@ -0,0 +1,37 @@
1
+ import type { HFormInstance, HItemProps } from "@hw-component/form/es/Form/modal";
2
+ import React from "react";
3
+ export declare const sizeObj: {
4
+ xl: {
5
+ min: number;
6
+ max: number;
7
+ };
8
+ xxl: {
9
+ min: number;
10
+ };
11
+ lg: {
12
+ min: number;
13
+ max: number;
14
+ };
15
+ md: {
16
+ min: number;
17
+ max: number;
18
+ };
19
+ sm: {
20
+ min: number;
21
+ max: number;
22
+ };
23
+ xs: {
24
+ max: number;
25
+ };
26
+ };
27
+ export declare const defaultSubItem: {
28
+ type: string;
29
+ itemProps: {
30
+ position: string;
31
+ };
32
+ style: {
33
+ padding: number;
34
+ marginLeft: number;
35
+ };
36
+ render: (item: HItemProps, node: React.ReactNode, form: HFormInstance) => JSX.Element;
37
+ };
@@ -0,0 +1,48 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var defaultSubComponent = require('../defaultSubComponent.js');
5
+
6
+ var sizeObj = {
7
+ xl: {
8
+ min: 1200,
9
+ max: 1600
10
+ },
11
+ xxl: {
12
+ min: 1600
13
+ },
14
+ lg: {
15
+ min: 992,
16
+ max: 1200
17
+ },
18
+ md: {
19
+ min: 768,
20
+ max: 992
21
+ },
22
+ sm: {
23
+ min: 576,
24
+ max: 768
25
+ },
26
+ xs: {
27
+ max: 576
28
+ }
29
+ };
30
+ var defaultSubItem = {
31
+ type: "submit",
32
+ itemProps: {
33
+ position: "end"
34
+ },
35
+ style: {
36
+ padding: 0,
37
+ marginLeft: -20
38
+ },
39
+ render: function render(item, node, form) {
40
+ return jsxRuntime.jsx(defaultSubComponent.DefaultSubComponent, {
41
+ form: form
42
+ });
43
+ }
44
+ };
45
+
46
+ exports.defaultSubItem = defaultSubItem;
47
+ exports.sizeObj = sizeObj;
48
+ // powered by h
@@ -0,0 +1,10 @@
1
+ import type { IHeaderProps } from "../modal";
2
+ declare const _default: ({ configData, loading, onFinish, hideLabel, labelWidth, table, }: IHeaderProps) => {
3
+ tableInstance: import("../../modal").HTableInstance;
4
+ tableLabelWidth: number | undefined;
5
+ tableHideLabel: boolean | undefined;
6
+ subOnFinish: (value: Record<string, any>) => Promise<any>;
7
+ submitLoading: boolean | undefined;
8
+ headerConfigData: import("../../modal").ConfigDataModal;
9
+ };
10
+ export default _default;
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var context = require('../../context.js');
6
+ var useHTable = require('../../hooks/useHTable.js');
7
+
8
+ var useHeaderDefaultProps = (function (_ref) {
9
+ var configData = _ref.configData,
10
+ loading = _ref.loading,
11
+ onFinish = _ref.onFinish,
12
+ hideLabel = _ref.hideLabel,
13
+ labelWidth = _ref.labelWidth,
14
+ table = _ref.table;
15
+ var _useHTableContext = context.useHTableContext(),
16
+ contextTableInstance = _useHTableContext.tableInstance,
17
+ contextLoading = _useHTableContext.loading,
18
+ contextOnFinish = _useHTableContext.onFinish,
19
+ contextConfigData = _useHTableContext.configData,
20
+ contextHideLabel = _useHTableContext.hideLabel,
21
+ contextLabelWidth = _useHTableContext.labelWidth;
22
+ var defaultTable = useHTable.default();
23
+ var headerConfigData = configData || contextConfigData;
24
+ var submitLoading = contextLoading || loading;
25
+ var subOnFinish = onFinish || contextOnFinish;
26
+ var tableHideLabel = typeof hideLabel === "undefined" ? contextHideLabel : hideLabel;
27
+ var tableLabelWidth = labelWidth || contextLabelWidth;
28
+ var tableInstance = table || contextTableInstance;
29
+ return {
30
+ tableInstance: tableInstance || defaultTable,
31
+ tableLabelWidth: tableLabelWidth,
32
+ tableHideLabel: tableHideLabel,
33
+ subOnFinish: subOnFinish,
34
+ submitLoading: submitLoading,
35
+ headerConfigData: headerConfigData
36
+ };
37
+ });
38
+
39
+ exports.default = useHeaderDefaultProps;
40
+ // powered by h
@@ -0,0 +1,4 @@
1
+ import type { IHeaderProps } from "../modal";
2
+ import type { HItemProps } from "@hw-component/form/es/Form/modal";
3
+ declare const _default: ({ searchSpan, configData, table }: IHeaderProps) => HItemProps[];
4
+ export default _default;