@lemon-fe/kits 1.0.0-81 → 1.0.0-83

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.
@@ -219,6 +219,12 @@ var DataGrid = /*#__PURE__*/function (_Component) {
219
219
  });
220
220
  });
221
221
 
222
+ _defineProperty(_assertThisInitialized(_this), "NoRowsOverlay", function () {
223
+ return /*#__PURE__*/React.createElement(Empty, {
224
+ description: _this.props.emptyText
225
+ });
226
+ });
227
+
222
228
  _defineProperty(_assertThisInitialized(_this), "getRowId", function (params) {
223
229
  var rowKey = _this.props.rowKey;
224
230
  var result = typeof rowKey === 'function' ? rowKey(params.data) : get(params.data, rowKey);
@@ -959,11 +965,6 @@ var DataGrid = /*#__PURE__*/function (_Component) {
959
965
  value: function LoadingOverlay() {
960
966
  return /*#__PURE__*/React.createElement(Spin, null);
961
967
  }
962
- }, {
963
- key: "NoRowsOverlay",
964
- value: function NoRowsOverlay() {
965
- return /*#__PURE__*/React.createElement(Empty, null);
966
- }
967
968
  }, {
968
969
  key: "getMainMenuItems",
969
970
  value: function getMainMenuItems(params) {
@@ -151,12 +151,13 @@
151
151
  padding: 2px;
152
152
  }
153
153
 
154
- .ag-row-inline-editing & {
154
+ .ag-row-focus &,
155
+ .ag-row-hover & {
155
156
  background-color: #fff;
156
157
  box-shadow: 0 0 0 2px var(--ag-border-color) inset;
157
158
  }
158
159
 
159
- .ag-cell-inline-editing & {
160
+ .ag-cell-focus & {
160
161
  padding: 0;
161
162
  box-shadow: 0 0 0 2px ~'var(--@{ant-prefix}-primary-5)' inset;
162
163
  }
@@ -298,6 +299,10 @@
298
299
  content: '';
299
300
  pointer-events: none;
300
301
  }
302
+
303
+ .@{prefixCls}-grid-editor {
304
+ box-shadow: none;
305
+ }
301
306
  }
302
307
 
303
308
  .ag-menu {
@@ -159,4 +159,8 @@ export interface DataGridProps<TData> extends Omit<AgGridReactProps<TData>, 'row
159
159
  * @description 封装后的master-detail使用方式,传了这个参数默认开启master-detai,仅当context和data改变才会重新渲染
160
160
  */
161
161
  detailCell?: DetailCell<TData, any>;
162
+ /**
163
+ * @description 没有行数据时显示的文本
164
+ */
165
+ emptyText?: string;
162
166
  }
@@ -16,7 +16,14 @@ export interface BasePopupProps {
16
16
  * 当作为modal使用,请不要传入onOk方法,通过open以及onCancel来控制Modal是否显示
17
17
  */
18
18
  modal?: boolean;
19
+ open?: boolean;
19
20
  readOnly?: boolean;
21
+ /**
22
+ *
23
+ * @description 非modal模式,打开Modal之前
24
+ */
25
+ beforeOpen?: () => boolean;
26
+ autoFocus?: boolean;
20
27
  }
21
28
  export interface PopupProps<ValueType> extends BasePopupProps, Omit<ModalProps, 'children' | 'onCancel'> {
22
29
  value?: ValueType;
@@ -38,11 +45,6 @@ export interface PopupProps<ValueType> extends BasePopupProps, Omit<ModalProps,
38
45
  * @description 确认事件之前校验
39
46
  */
40
47
  beforeOkCheck?: (value?: ValueType) => boolean | PromiseLike<boolean>;
41
- /**
42
- *
43
- * @description 非modal模式,打开Modal之前
44
- */
45
- beforeOpen?: () => boolean;
46
48
  children?: ReactElement | null | ((props: {
47
49
  value?: ValueType;
48
50
  disabled?: boolean;
@@ -53,8 +55,6 @@ export interface PopupProps<ValueType> extends BasePopupProps, Omit<ModalProps,
53
55
  * @description 清空后的值
54
56
  */
55
57
  emptyValue?: ValueType;
56
- open?: boolean;
57
- autoFocus?: boolean;
58
58
  onCancel?: () => void;
59
59
  renderFooter?: (params: {
60
60
  onOk: () => void;
package/es/index.d.ts CHANGED
@@ -21,7 +21,7 @@ export { default as DurationPicker } from './components/DurationPicker';
21
21
  export type { DurationPickerValue } from './components/DurationPicker';
22
22
  export { default as ColorPicker } from './components/ColorPicker';
23
23
  export { default as Popup } from './components/Popup';
24
- export type { BasePopupProps } from './components/Popup';
24
+ export type { BasePopupProps, PopupProps } from './components/Popup';
25
25
  export { default as SiderTree } from './components/SiderTree';
26
26
  export type { TreeData } from './components/SiderTree/typings';
27
27
  export { default as Icons } from './components/Icons';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/kits",
3
- "version": "1.0.0-81",
3
+ "version": "1.0.0-83",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",