wt-enjoy-link-antd-repack 4.1.49 → 4.1.51

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.
@@ -3,16 +3,16 @@ export declare const BiuAButton: React.MemoExoticComponent<import("styled-compon
3
3
  href: string;
4
4
  target?: string | undefined;
5
5
  onClick?: React.MouseEventHandler<HTMLElement> | undefined;
6
- } & import("antd/lib/button/button").BaseButtonProps & Omit<React.AnchorHTMLAttributes<any>, "onClick" | "type"> & {
6
+ } & import("antd/lib/button/button").BaseButtonProps & Omit<React.AnchorHTMLAttributes<any>, "type" | "onClick"> & {
7
7
  htmlType?: "button" | "submit" | "reset" | undefined;
8
8
  onClick?: React.MouseEventHandler<HTMLElement> | undefined;
9
- } & Omit<React.ButtonHTMLAttributes<any>, "onClick" | "type">> & React.RefAttributes<HTMLElement>, never>> & Omit<React.ForwardRefExoticComponent<Partial<{
9
+ } & Omit<React.ButtonHTMLAttributes<any>, "type" | "onClick">> & React.RefAttributes<HTMLElement>, never>> & Omit<React.ForwardRefExoticComponent<Partial<{
10
10
  href: string;
11
11
  target?: string | undefined;
12
12
  onClick?: React.MouseEventHandler<HTMLElement> | undefined;
13
- } & import("antd/lib/button/button").BaseButtonProps & Omit<React.AnchorHTMLAttributes<any>, "onClick" | "type"> & {
13
+ } & import("antd/lib/button/button").BaseButtonProps & Omit<React.AnchorHTMLAttributes<any>, "type" | "onClick"> & {
14
14
  htmlType?: "button" | "submit" | "reset" | undefined;
15
15
  onClick?: React.MouseEventHandler<HTMLElement> | undefined;
16
- } & Omit<React.ButtonHTMLAttributes<any>, "onClick" | "type">> & React.RefAttributes<HTMLElement>> & {
16
+ } & Omit<React.ButtonHTMLAttributes<any>, "type" | "onClick">> & React.RefAttributes<HTMLElement>> & {
17
17
  Group: React.FC<import("antd/lib/button").ButtonGroupProps>;
18
18
  }, keyof React.Component<any, {}, any>>>;
@@ -15,7 +15,7 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
15
15
  initialValue?: number | undefined;
16
16
  searchTimes?: number | undefined;
17
17
  rowLabel?: string | undefined;
18
- addresstype?: "2" | "1" | undefined;
18
+ addresstype?: "1" | "2" | undefined;
19
19
  clientidNull?: string | undefined;
20
20
  addresstypeStr?: string | undefined;
21
21
  addressAttrStr?: string | undefined;
@@ -9,7 +9,7 @@ declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponen
9
9
  /**
10
10
  * 0:入库 1:出库 2:移库 3:冻结 4:调整 5:属性变更
11
11
  */
12
- orderType: 0 | 2 | 1 | 4 | 3 | 5;
12
+ orderType: 0 | 3 | 1 | 4 | 2 | 5;
13
13
  isFirstLoad: boolean;
14
14
  } & SelectProps<any, import("antd/lib/select").DefaultOptionType> & React.RefAttributes<unknown>>>;
15
15
  export default _default;
@@ -38,25 +38,25 @@ var ContainerWrapper = styled.div.withConfig({
38
38
  displayName: "ContainerWrapper",
39
39
  componentId: "wt-enjoy-link-antd-repack__sc-159m0g4-0"
40
40
  })(["height:100%;display:flex;flex-direction:column;background-color:", ";.ant-popover-inner-content{padding:4px !important;}"], function (props) {
41
- return props.isPage ? 'none' : '#ffffff';
41
+ return props.$isPage ? 'none' : '#ffffff';
42
42
  });
43
43
  var ActionWrapper = styled.div.withConfig({
44
44
  displayName: "ActionWrapper",
45
45
  componentId: "wt-enjoy-link-antd-repack__sc-159m0g4-1"
46
46
  })(["display:flex;justify-content:space-between;box-sizing:border-box;width:calc(100% - 16px);border-top:1px solid #f0f0f0;padding:16px 0;flex-direction:row-reverse;", ""], function (props) {
47
- return props.isPage ? "\n & {\n border-top: none;\n padding: 0 0 16px 0;\n margin: 0;\n }\n " : '';
47
+ return props.$isPage ? "\n & {\n border-top: none;\n padding: 0 0 16px 0;\n margin: 0;\n }\n " : '';
48
48
  });
49
49
  var HeaderWrapper = styled.div.withConfig({
50
50
  displayName: "HeaderWrapper",
51
51
  componentId: "wt-enjoy-link-antd-repack__sc-159m0g4-2"
52
52
  })(["flex-grow:0;padding:0px 0 16px 0;", ""], function (props) {
53
- return props.isPage ? "\n background: #ffffff;\n border-radius: 4px;\n box-shadow: 0px 2px 9px 0px rgba(0, 0, 0, 0.05);\n margin-bottom: 20px;\n padding: 16px 15px;\n " : '';
53
+ return props.$isPage ? "\n background: #ffffff;\n border-radius: 4px;\n box-shadow: 0px 2px 9px 0px rgba(0, 0, 0, 0.05);\n margin-bottom: 20px;\n padding: 16px 15px;\n " : '';
54
54
  });
55
55
  var ContentWrapper = styled.div.withConfig({
56
56
  displayName: "ContentWrapper",
57
57
  componentId: "wt-enjoy-link-antd-repack__sc-159m0g4-3"
58
58
  })(["flex:1;display:flex;flex-direction:column;overflow:hidden;", ""], function (props) {
59
- return props.isPage ? "\n & {\n background: #ffffff;\n border-radius: 4px;\n padding: 16px 20px;\n box-shadow: 0px 2px 9px 0px rgba(0, 0, 0, 0.05);\n }\n " : '';
59
+ return props.$isPage ? "\n & {\n background: #ffffff;\n border-radius: 4px;\n padding: 16px 20px;\n box-shadow: 0px 2px 9px 0px rgba(0, 0, 0, 0.05);\n }\n " : '';
60
60
  });
61
61
  var FooterWrapper = styled.div.withConfig({
62
62
  displayName: "FooterWrapper",
@@ -66,7 +66,7 @@ var StyledResizeTable = styled(BiuResizeTable).withConfig({
66
66
  displayName: "StyledResizeTable",
67
67
  componentId: "wt-enjoy-link-antd-repack__sc-159m0g4-5"
68
68
  })(["display:block;flex-grow:1;overflow:hidden;height:100% !important;.ant-table-cell{border-right:none !important;}", " .ant-table-tbody > .ant-table-row > td{padding:6px !important;min-height:45px !important;height:45px !important;line-height:14px !important;color:#333333;}.ant-table-tbody > .ant-table-row:hover > td{background:#f5f5f5;}.ant-table-tbody > .ant-table-row-selected > td{background:#f0f7ff !important;}.ant-table-wrapper{height:100% !important;}.ant-table-tbody > tr > td{border-bottom:1px solid #ebebeb;}.ant-spin-nested-loading{height:100% !important;}.ant-spin-container{height:100% !important;}.ant-table{height:100% !important;border-bottom:1px solid #ebebeb !important;}.ant-table-container{height:100% !important;display:flex;flex-direction:column;}.ant-table-body{flex:1;}.ant-table-row{font-size:14px;font-weight:normal;}"], function (props) {
69
- return props.isPage ? "\n & {\n padding: 0\n }\n " : '';
69
+ return props.$isPage ? "\n & {\n padding: 0\n }\n " : '';
70
70
  });
71
71
  var SummaryWrapper = styled.div.withConfig({
72
72
  displayName: "SummaryWrapper",
@@ -193,9 +193,9 @@ export var TableInstance = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(func
193
193
  return /*#__PURE__*/_jsxs(ContainerWrapper, {
194
194
  ref: rootRef,
195
195
  style: _objectSpread({}, containerStyle),
196
- isPage: isPage,
196
+ $isPage: isPage,
197
197
  children: [/*#__PURE__*/_jsx(HeaderWrapper, {
198
- isPage: isPage,
198
+ $isPage: isPage,
199
199
  children: searchForm ? /*#__PURE__*/_jsx(BiuForm, {
200
200
  ref: formRef,
201
201
  headLine: headLine,
@@ -204,9 +204,9 @@ export var TableInstance = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(func
204
204
  onReset: onReset
205
205
  }) : null
206
206
  }), /*#__PURE__*/_jsxs(ContentWrapper, {
207
- isPage: isPage,
207
+ $isPage: isPage,
208
208
  children: [/*#__PURE__*/_jsxs(ActionWrapper, {
209
- isPage: isPage,
209
+ $isPage: isPage,
210
210
  children: [/*#__PURE__*/_jsx("div", {
211
211
  style: {
212
212
  paddingRight: 0
@@ -241,7 +241,7 @@ export var TableInstance = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(func
241
241
  operationOptions: operationOptions
242
242
  })]
243
243
  }), /*#__PURE__*/_jsx(StyledResizeTable, _objectSpread({
244
- isPage: isPage,
244
+ $isPage: isPage,
245
245
  rowKey: rowKey,
246
246
  loading: tabLoading || loading,
247
247
  rowSelection: _objectSpread(_objectSpread({}, rowSelection), {}, {
@@ -46,4 +46,4 @@ export declare const BiuTableSelect: React.MemoExoticComponent<React.ForwardRefE
46
46
  * 转换下绑定到组件上的数据源
47
47
  */
48
48
  dataOption?: ((value: Record<string, any>) => Record<string, any>[]) | undefined;
49
- } & Pick<SelectProps<any, import("antd/lib/select").DefaultOptionType>, "showSearch" | "allowClear"> & Pick<TableProps<any>, "onRow" | "dataSource"> & React.RefAttributes<unknown>>>;
49
+ } & Pick<SelectProps<any, import("antd/lib/select").DefaultOptionType>, "showSearch" | "allowClear"> & Pick<TableProps<any>, "dataSource" | "onRow"> & React.RefAttributes<unknown>>>;
@@ -21,9 +21,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
21
21
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
22
22
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
23
23
  import { SearchOutlined } from '@ant-design/icons';
24
- import { useBoolean, useControllableValue } from 'ahooks';
24
+ import { useBoolean, useControllableValue, useWhyDidYouUpdate } from 'ahooks';
25
25
  import { Divider, Space, Typography } from 'antd';
26
- import React, { forwardRef, useCallback, useEffect, useMemo, useState } from 'react';
26
+ import React, { forwardRef, useCallback, useLayoutEffect, useMemo, useState } from 'react';
27
27
  import { BiuASelect, BiuASelectOption } from "../BiuASelect";
28
28
  import { request } from "../../package";
29
29
 
@@ -71,7 +71,9 @@ export var BiuTableSelect = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(fun
71
71
  setOptionRows = _useState2[1];
72
72
  var isSearchDeatil = useMemo(function () {
73
73
  return (!optionRows || optionRows.length <= 0) && !!state;
74
- }, [optionRows, state]);
74
+
75
+ // eslint-disable-next-line react-hooks/exhaustive-deps
76
+ }, [state]);
75
77
  var fetchData = useCallback( /*#__PURE__*/function () {
76
78
  var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(reqObj) {
77
79
  var result, formatResult;
@@ -105,11 +107,17 @@ export var BiuTableSelect = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(fun
105
107
  return _ref.apply(this, arguments);
106
108
  };
107
109
  }(), [dataOption, interfaceName, isSearchDeatil, onChangeData, requestConfig, rowKey, setFalse, setTrue, state]);
108
- useEffect(function () {
110
+ useLayoutEffect(function () {
109
111
  if (isOnReady && isOnReady(queryData) && queryData) {
110
112
  fetchData(queryData);
111
113
  }
112
- }, [fetchData, isOnReady, queryData]);
114
+ // eslint-disable-next-line react-hooks/exhaustive-deps
115
+ }, [queryData]);
116
+ useWhyDidYouUpdate('BiuTableSelect', {
117
+ isOnReady: isOnReady,
118
+ queryData: queryData,
119
+ fetchData: fetchData
120
+ });
113
121
  var columnsConvert = useMemo(function () {
114
122
  return columns.reduce(function (obj, current) {
115
123
  return {
@@ -1,7 +1,7 @@
1
1
  import type { TableProps } from 'antd';
2
2
  import React from 'react';
3
3
  import type { BiuColumnType } from "..";
4
- export interface BiuVirtualTablePropsType {
4
+ export type BiuVirtualTablePropsType = Omit<TableProps<any>, 'columns' | 'scroll'> & {
5
5
  columns: (Omit<BiuColumnType, 'width'> & {
6
6
  width: number;
7
7
  })[];
@@ -9,5 +9,13 @@ export interface BiuVirtualTablePropsType {
9
9
  x: number;
10
10
  y: number;
11
11
  };
12
- }
13
- export declare const BiuVirtualTable: React.MemoExoticComponent<React.ForwardRefExoticComponent<BiuVirtualTablePropsType & Omit<TableProps<any>, "columns" | "scroll"> & React.RefAttributes<unknown>>>;
12
+ };
13
+ export declare const BiuVirtualTable: React.MemoExoticComponent<React.ForwardRefExoticComponent<Omit<TableProps<any>, "scroll" | "columns"> & {
14
+ columns: (Omit<BiuColumnType, 'width'> & {
15
+ width: number;
16
+ })[];
17
+ scroll: {
18
+ x: number;
19
+ y: number;
20
+ };
21
+ } & React.RefAttributes<unknown>>>;
@@ -18,8 +18,13 @@ import { Table } from 'antd';
18
18
  import classNames from 'classnames';
19
19
  import React, { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react';
20
20
  import { VariableSizeGrid } from 'react-window';
21
+ import { styled } from 'styled-components';
21
22
  import { jsx as _jsx } from "react/jsx-runtime";
22
23
  var VariableSizeGridJSX = VariableSizeGrid;
24
+ var StyledTable = styled(Table).withConfig({
25
+ displayName: "StyledTable",
26
+ componentId: "wt-enjoy-link-antd-repack__sc-xp2a6l-0"
27
+ })([".ant-table-container{box-sizing:content-box;border:1px solid #f0f0f0 !important;}.virtual-grid{width:100% !important;overflow:scroll;&::-webkit-scrollbar{width:10px !important;}&::-webkit-scrollbar{width:10px;height:10px;}&::-webkit-scrollbar-button{width:0;height:0;}&::-webkit-scrollbar-thumb{background:#ccc;}&::-webkit-scrollbar-track{background-color:#e6e5e5;}}"]);
23
28
  export var BiuVirtualTable = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function (props, parentRef) {
24
29
  var columns = props.columns,
25
30
  scroll = props.scroll,
@@ -145,7 +150,7 @@ export var BiuVirtualTable = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(fu
145
150
  }, [connectObject, domWidth, mergedColumns, renderVirtualListRow, scroll.y]);
146
151
  return /*#__PURE__*/_jsx("div", {
147
152
  ref: domRef,
148
- children: /*#__PURE__*/_jsx(Table, _objectSpread(_objectSpread({
153
+ children: /*#__PURE__*/_jsx(StyledTable, _objectSpread(_objectSpread({
149
154
  ref: parentRef
150
155
  }, restProps), {}, {
151
156
  scroll: scroll,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wt-enjoy-link-antd-repack",
3
- "version": "4.1.49",
3
+ "version": "4.1.51",
4
4
  "description": "万通业务组件",
5
5
  "sideEffects": false,
6
6
  "main": "dist/esm/index.js",