@lemon-fe/kits 1.0.0-136 → 1.0.0-137

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.
@@ -44,10 +44,10 @@ export default class DataGrid<TData extends Record<string, any>> extends Compone
44
44
  };
45
45
  static EmptyCol: ColType<any>;
46
46
  static Editors: {
47
- Text: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & import("./typings").TextEditorParams & React.RefAttributes<import("@ag-grid-community/react").ICellEditorReactComp>>;
47
+ Text: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & import("./typings").TextEditorParams<any> & React.RefAttributes<import("@ag-grid-community/react").ICellEditorReactComp>>;
48
48
  Date: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & import("./typings").DateEditorParams & React.RefAttributes<import("@ag-grid-community/react").ICellEditorReactComp>>;
49
49
  Number: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & import("./typings").NumberEditorParams<any> & React.RefAttributes<import("@ag-grid-community/react").ICellEditorReactComp>>;
50
- Select: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "mode" | "allowClear" | "options" | "virtual" | "showSearch" | "listHeight"> & {
50
+ Select: React.ForwardRefExoticComponent<import("@ag-grid-community/core").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "allowClear" | "mode" | "options" | "virtual" | "showSearch" | "listHeight"> & {
51
51
  fieldNames?: {
52
52
  label: string;
53
53
  value: string;
@@ -65,7 +65,7 @@ export default class DataGrid<TData extends Record<string, any>> extends Compone
65
65
  private syncColRender;
66
66
  private syncSelection;
67
67
  private syncRowData;
68
- private getColumDefs;
68
+ private getColumnDefs;
69
69
  private isClientMode;
70
70
  private clearReadyQueue;
71
71
  private afterReady;
@@ -395,7 +395,7 @@ var DataGrid = /*#__PURE__*/function (_Component) {
395
395
  });
396
396
 
397
397
  _this.state = _objectSpread({
398
- colDefs: _this.getColumDefs(),
398
+ colDefs: _this.getColumnDefs(),
399
399
  loading: false
400
400
  }, _this.getPagination());
401
401
  _this.store = new Store({
@@ -461,7 +461,7 @@ var DataGrid = /*#__PURE__*/function (_Component) {
461
461
  if (columns !== prevProps.columns) {
462
462
  this.syncColRender();
463
463
  this.setState({
464
- colDefs: this.getColumDefs()
464
+ colDefs: this.getColumnDefs()
465
465
  });
466
466
  }
467
467
 
@@ -595,8 +595,8 @@ var DataGrid = /*#__PURE__*/function (_Component) {
595
595
  }
596
596
  }
597
597
  }, {
598
- key: "getColumDefs",
599
- value: function getColumDefs() {
598
+ key: "getColumnDefs",
599
+ value: function getColumnDefs() {
600
600
  var _this3 = this;
601
601
 
602
602
  var _this$props6 = this.props,
@@ -800,6 +800,7 @@ var DataGrid = /*#__PURE__*/function (_Component) {
800
800
  checkboxSelection: checkboxSelection,
801
801
  showDisabledCheckboxes: true,
802
802
  headerCheckboxSelection: rowSelection.type !== 'radio',
803
+ spanHeaderHeight: true,
803
804
  resizable: false,
804
805
  sortable: false,
805
806
  suppressAutoSize: true,
@@ -1327,7 +1328,13 @@ var DataGrid = /*#__PURE__*/function (_Component) {
1327
1328
  style: restProps.domLayout === 'autoHeight' ? {
1328
1329
  height: 'auto'
1329
1330
  } : undefined,
1330
- onBlur: this.handleBlur,
1331
+ onBlur: function onBlur(e) {
1332
+ if (e.currentTarget.contains(e.relatedTarget)) {
1333
+ return;
1334
+ }
1335
+
1336
+ _this10.handleBlur();
1337
+ },
1331
1338
  onFocus: this.handleFocus
1332
1339
  }, /*#__PURE__*/React.createElement(AgGridReact, _extends({
1333
1340
  singleClickEdit: true,
@@ -6,6 +6,7 @@
6
6
  background: #fff;
7
7
 
8
8
  .@{ant-prefix}-modal-body & {
9
+ margin: -@padding-md;
9
10
  background: transparent;
10
11
  }
11
12
 
@@ -44,7 +45,6 @@
44
45
 
45
46
  &-body {
46
47
  height: 100%;
47
- padding: @padding-md 0 @padding-md @padding-md;
48
48
  overflow-x: hidden;
49
49
  }
50
50
 
@@ -154,8 +154,4 @@
154
154
  & + .@{prefixCls}-section {
155
155
  padding-top: 0;
156
156
  }
157
-
158
- .@{ant-prefix}-modal-body & {
159
- margin: -@padding-md;
160
- }
161
157
  }
@@ -1,5 +1,5 @@
1
- import type { ReactElement, ReactNode } from 'react';
2
1
  import type { ModalProps } from 'antd/lib/modal';
2
+ import type { ReactElement, ReactNode } from 'react';
3
3
  export interface BasePopupProps {
4
4
  allowClear?: boolean;
5
5
  disabled?: boolean;
@@ -26,11 +26,11 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
26
26
 
27
27
  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; }
28
28
 
29
- import React, { useState, cloneElement, useRef, useEffect, useContext } from 'react';
30
29
  import { Modal, Input, message, ConfigProvider } from 'antd';
31
- import { prefixClassName } from "../utils";
32
- import SearchIcon from "../Icons/Search";
30
+ import React, { useState, cloneElement, useRef, useEffect, useContext } from 'react';
33
31
  import Icons from "../Icons";
32
+ import SearchIcon from "../Icons/Search";
33
+ import { prefixClassName } from "../utils";
34
34
  var prefix = prefixClassName('popup');
35
35
 
36
36
  function Popup(props) {
@@ -2,9 +2,6 @@
2
2
  cursor: pointer;
3
3
 
4
4
  &-wrapper {
5
- width: 100%;
6
- height: 100%;
7
-
8
5
  .@{ant-prefix}-input-suffix {
9
6
  position: relative;
10
7
 
@@ -7,6 +7,15 @@
7
7
  flex-direction: column;
8
8
  box-sizing: border-box;
9
9
  height: 100%;
10
+
11
+ .@{ant-prefix}-tree-list-scrollbar {
12
+ right: -@padding-md !important;
13
+ display: block !important;
14
+ }
15
+
16
+ .@{ant-prefix}-tree-list-scrollbar-thumb {
17
+ background: #ddd !important;
18
+ }
10
19
  }
11
20
 
12
21
  &-menu-popover {
@@ -114,8 +123,7 @@
114
123
  }
115
124
 
116
125
  &-footer {
117
- margin-top: 12px;
118
- padding: 0 12px;
126
+ margin-top: @padding-md;
119
127
  }
120
128
 
121
129
  &-empty {
@@ -139,6 +147,25 @@
139
147
  }
140
148
  }
141
149
 
142
- .@{prefixCls}-layout-left .@{prefixCls}-tree-wrapper:first-child .@{prefixCls}-tree-header {
143
- padding-right: 12px + @space-h;
150
+ .@{prefixCls}-layout-left {
151
+ .@{prefixCls}-tree-wrapper {
152
+ padding: @padding-md;
153
+
154
+ &:first-child .@{prefixCls}-tree-header {
155
+ margin-right: @padding-md;
156
+ }
157
+ }
158
+
159
+ .@{prefixCls}-tree-tabs {
160
+ padding: @padding-md;
161
+ }
162
+
163
+ .@{ant-prefix}-tabs-tabpane > .@{prefixCls}-tree-wrapper {
164
+ padding: 0;
165
+ }
166
+
167
+ .@{prefixCls}-tree-body {
168
+ margin-right: -@padding-md;
169
+ padding-right: @padding-md;
170
+ }
144
171
  }
package/es/index.d.ts CHANGED
@@ -4,8 +4,8 @@ export * from '@lemon-fe/utils';
4
4
  export { default as zhCN } from 'antd/es/locale/zh_CN';
5
5
  export * from './constants';
6
6
  export { default as init } from './init';
7
- export { default as BaseTable, } from './components/BaseTable';
8
- export type { BaseTableProps, ColumnsType, ColumnGroupType, ColumnType } from './components/BaseTable/typings';
7
+ export { default as BaseTable } from './components/BaseTable';
8
+ export type { BaseTableProps, ColumnsType, ColumnGroupType, ColumnType, } from './components/BaseTable/typings';
9
9
  export { default as EditableTable } from './components/EditableTable';
10
10
  export { default as EditableCell } from './components/EditableTable/EditableCell';
11
11
  export { default as EditableTableFormItem } from './components/EditableTable/EditableTableFormItem';
@@ -79,16 +79,16 @@ a[title='站长统计'] {
79
79
  padding: @padding-md;
80
80
  }
81
81
 
82
- .@{ant-prefix}-modal-header {
83
- margin-bottom: @padding-md;
82
+ .@{ant-prefix}-modal-confirm .@{ant-prefix}-modal-content {
83
+ padding: 20px;
84
84
  }
85
85
 
86
- .@{ant-prefix}-modal-footer {
87
- margin-top: @padding-md;
86
+ .@{ant-prefix}-modal-header {
87
+ padding-bottom: @padding-md;
88
88
  }
89
89
 
90
- .@{ant-prefix}-confirm .@{ant-prefix}-body {
91
- padding: 20px;
90
+ .@{ant-prefix}-modal-footer {
91
+ padding-top: @padding-md;
92
92
  }
93
93
 
94
94
  .@{ant-prefix}-modal-confirm-body > .anticon {
@@ -232,6 +232,7 @@ a[title='站长统计'] {
232
232
  &-indent {
233
233
  &-unit {
234
234
  width: @tree-node-indent-width;
235
+ vertical-align: top;
235
236
  }
236
237
  }
237
238
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/kits",
3
- "version": "1.0.0-136",
3
+ "version": "1.0.0-137",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",