@lemon-fe/components 1.4.1 → 1.4.3

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.
@@ -17,7 +17,7 @@ declare const Editors: {
17
17
  Text: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & import("./typings").TextEditorParams<any> & React.RefAttributes<import("ag-grid-react").ICellEditorReactComp>>;
18
18
  Date: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & import("./typings").DateEditorParams<any> & React.RefAttributes<import("ag-grid-react").ICellEditorReactComp>>;
19
19
  Number: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & import("./typings").NumberEditorParams<any> & React.RefAttributes<import("ag-grid-react").ICellEditorReactComp>>;
20
- Select: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "allowClear" | "mode" | "showSearch" | "optionFilterProp" | "options" | "virtual" | "listHeight"> & {
20
+ Select: React.ForwardRefExoticComponent<import("ag-grid-community").ICellEditorParams<any, any, any> & Pick<import("antd").SelectProps<any, import("antd/lib/select").BaseOptionType>, "disabled" | "mode" | "allowClear" | "showSearch" | "optionFilterProp" | "options" | "virtual" | "listHeight"> & {
21
21
  fieldNames?: {
22
22
  label: string;
23
23
  value: string;
@@ -1754,6 +1754,7 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
1754
1754
  maintainColumnOrder: true,
1755
1755
  suppressCsvExport: true,
1756
1756
  suppressExcelExport: true,
1757
+ enableCellTextSelection: true,
1757
1758
  noRowsOverlayComponent: this.NoRowsOverlay,
1758
1759
  getMainMenuItems: this.getMainMenuItems,
1759
1760
  rowBuffer: 20,
@@ -363,6 +363,15 @@
363
363
  padding-left: 0;
364
364
  outline: none;
365
365
 
366
+ .ag-selectable & {
367
+ display: block;
368
+
369
+ .ag-cell-value {
370
+ display: flex;
371
+ align-items: center;
372
+ }
373
+ }
374
+
366
375
  &::after {
367
376
  display: none !important;
368
377
  }
@@ -405,26 +414,34 @@
405
414
 
406
415
  &-editor {
407
416
  position: relative;
417
+ z-index: 2;
418
+ box-sizing: border-box;
408
419
  width: 100%;
409
- height: calc(var(--ag-row-height) - 7px);
410
- padding: 0 7px;
420
+ padding: 0 2px;
411
421
  overflow: hidden;
412
- line-height: calc(var(--ag-row-height) - 7px);
413
422
  background-color: transparent;
414
423
  border-radius: 4px;
415
424
 
416
- &-cell {
417
- padding: 2px 0;
425
+ & > * {
426
+ flex: 1 1 auto;
418
427
  }
419
428
 
420
- .ag-row-focus &,
421
- .ag-row-hover & {
429
+ .ag-row-focus &-cell::after,
430
+ .ag-row-hover &-cell::after {
431
+ position: absolute;
432
+ top: 0;
433
+ right: 0;
434
+ bottom: 0;
435
+ left: 0;
436
+ z-index: 1;
437
+ display: block;
422
438
  background-color: #fff;
423
- box-shadow: 0 0 0 2px var(--ag-border-color) inset;
439
+ border: 2px solid var(--ag-border-color);
440
+ border-radius: 4px;
441
+ content: '';
424
442
  }
425
443
 
426
444
  .ag-cell-inline-editing & {
427
- padding: 0;
428
445
  box-shadow: 0 0 0 2px ~'var(--@{ant-prefix}-primary-5)' inset;
429
446
  }
430
447
 
@@ -149,9 +149,9 @@ function SelectView(originalProps, _ref4) {
149
149
  setData(newRows);
150
150
  onChange === null || onChange === void 0 || onChange(newRows, rowDoubleClicked);
151
151
  };
152
- var handleChangeParams = function handleChangeParams(mParams) {
152
+ var handleChangeParams = function handleChangeParams(mParams, actionType) {
153
153
  if (filter !== null && filter !== void 0 && filter.onChange) {
154
- filter.onChange(mParams, 'submit');
154
+ filter.onChange(mParams, actionType || 'submit');
155
155
  }
156
156
  if (checkSearchParams && !checkSearchParams(mParams)) {
157
157
  return;
@@ -169,8 +169,8 @@ function SelectView(originalProps, _ref4) {
169
169
  form: filterForm
170
170
  }, filter, {
171
171
  value: cParams,
172
- onChange: function onChange(val) {
173
- return handleChangeParams(_objectSpread(_objectSpread({}, cParams), val));
172
+ onChange: function onChange(val, actionType) {
173
+ return handleChangeParams(_objectSpread(_objectSpread({}, cParams), val), actionType);
174
174
  }
175
175
  })));
176
176
  } else if (headerProp) {
@@ -7,7 +7,6 @@
7
7
  .@{prefixCls}-state {
8
8
  display: inline-flex;
9
9
  align-items: center;
10
- height: 22px;
11
10
  font-size: 14px;
12
11
 
13
12
  &-shape {
@@ -38,12 +37,13 @@
38
37
 
39
38
  &::before {
40
39
  position: absolute;
41
- top: 5px;
40
+ top: 50%;
42
41
  right: 0;
43
42
  left: 0;
44
43
  z-index: 1;
45
44
  display: block;
46
- height: 13px;
45
+ height: 12px;
46
+ margin-top: -6px;
47
47
  content: '';
48
48
  }
49
49
  }
@@ -5,8 +5,7 @@ a[title='站长统计'] {
5
5
  @blue-base: #2357df;
6
6
 
7
7
  ::selection {
8
- color: inherit;
9
- background: #d3ddf9;
8
+ background: #6b9cf7;
10
9
  }
11
10
 
12
11
  /** basic */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/components",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "> TODO: description",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -58,5 +58,5 @@
58
58
  "publishConfig": {
59
59
  "registry": "https://registry.npmjs.org"
60
60
  },
61
- "gitHead": "4a0de8d6cf3909a13c3f7f1b8ff1e9354697275a"
61
+ "gitHead": "89c6d77c7ed63499aee98141b4934e1c3d810b7c"
62
62
  }