@zhenliang/sheet 0.1.17 → 0.1.18

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.
@@ -157,10 +157,11 @@ export var sideEffectReducer = {
157
157
  // 复制到剪贴板的时候执行 formatter
158
158
  var _data$row$col = data[row][col],
159
159
  dataValue = _data$row$col.value,
160
- dataEditor = _data$row$col.dataEditor;
160
+ dataEditor = _data$row$col.dataEditor,
161
+ record = _data$row$col.record;
161
162
  var _ref4 = dataEditor || {},
162
163
  dataFormatter = _ref4.formatter;
163
- var formattedValue = dataFormatter ? dataFormatter(dataValue) : dataValue;
164
+ var formattedValue = dataFormatter ? dataFormatter(dataValue, record) : dataValue;
164
165
  if (isNil(dataValue)) {
165
166
  formattedValue = ' ';
166
167
  }
@@ -231,7 +232,7 @@ export var sideEffectReducer = {
231
232
  row: row,
232
233
  col: col,
233
234
  id: (_data$row$col2 = data[row][col]) === null || _data$row$col2 === void 0 ? void 0 : _data$row$col2.id,
234
- value: editor !== null && editor !== void 0 && editor.parser ? editor === null || editor === void 0 ? void 0 : (_editor$parser = editor.parser) === null || _editor$parser === void 0 ? void 0 : _editor$parser.call(editor, value) : value
235
+ value: editor !== null && editor !== void 0 && editor.parser ? editor === null || editor === void 0 ? void 0 : (_editor$parser = editor.parser) === null || _editor$parser === void 0 ? void 0 : _editor$parser.call(editor, value, data[row][col].record) : value
235
236
  };
236
237
  });
237
238
  lastRow = extChanges === null || extChanges === void 0 ? void 0 : (_extChanges$ = extChanges[0]) === null || _extChanges$ === void 0 ? void 0 : _extChanges$.row;
@@ -70,7 +70,7 @@ var Cell = function Cell(props) {
70
70
  } else if (eventInfo.value && eventInfo.editing) {
71
71
  var _cell$dataEditor, _cell$dataEditor2, _cell$dataEditor2$par;
72
72
  // 单元格直接键盘编辑,设置为输入值
73
- setValue((_cell$dataEditor = cell.dataEditor) !== null && _cell$dataEditor !== void 0 && _cell$dataEditor.parser ? cell === null || cell === void 0 ? void 0 : (_cell$dataEditor2 = cell.dataEditor) === null || _cell$dataEditor2 === void 0 ? void 0 : (_cell$dataEditor2$par = _cell$dataEditor2.parser) === null || _cell$dataEditor2$par === void 0 ? void 0 : _cell$dataEditor2$par.call(_cell$dataEditor2, eventInfo.value) : eventInfo.value);
73
+ setValue((_cell$dataEditor = cell.dataEditor) !== null && _cell$dataEditor !== void 0 && _cell$dataEditor.parser ? cell === null || cell === void 0 ? void 0 : (_cell$dataEditor2 = cell.dataEditor) === null || _cell$dataEditor2 === void 0 ? void 0 : (_cell$dataEditor2$par = _cell$dataEditor2.parser) === null || _cell$dataEditor2$par === void 0 ? void 0 : _cell$dataEditor2$par.call(_cell$dataEditor2, eventInfo.value, cell.record) : eventInfo.value);
74
74
  }
75
75
  setEventState(eventInfo);
76
76
  };
@@ -57,7 +57,7 @@ span.harvest-sheet-container, span.harvest-sheet-container:focus {
57
57
  background-color: var(--cell-background-color);
58
58
  cursor: cell;
59
59
  text-align: right;
60
- transition: box-shadow 100ms ease-out;
60
+ // transition: box-shadow 100ms ease-out;
61
61
  user-select: none;
62
62
  vertical-align: bottom;
63
63
  position: relative;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { SheetType } from "../../../type";
3
2
  import './index.less';
4
3
  export declare const DraggableShell: ({ columns, className, showGroup, showSelect, controlProps, controlWidth, }: SheetType.SheetShell) => import("react").FC<{
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import type { SheetType } from "../../type";
3
2
  import './draggableShell/index.less';
4
3
  export declare const TableShell: ({ columns, className, showGroup, showSelect, controlProps, controlWidth, }: SheetType.SheetShell) => import("react").FC<{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhenliang/sheet",
3
- "version": "0.1.17",
3
+ "version": "0.1.18",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",