@corbe30/fortune-excel 2.2.6 → 2.3.0

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.
package/README.md CHANGED
@@ -80,7 +80,7 @@
80
80
  event.target.files[0], // file type (csv/xlsx) is automatically identified
81
81
  setSheets,
82
82
  setKey,
83
- sheetRef.current
83
+ sheetRef
84
84
  )
85
85
  }
86
86
  ```
@@ -49,7 +49,7 @@ var ImportHelper = function (props) {
49
49
  var _a, _b;
50
50
  return __generator(this, function (_c) {
51
51
  switch (_c.label) {
52
- case 0: return [4 /*yield*/, (0, Transform_1.transformExcelToFortune)((_b = (_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b[0], setSheets, setKey, sheetRef.current)];
52
+ case 0: return [4 /*yield*/, (0, Transform_1.transformExcelToFortune)((_b = (_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.files) === null || _b === void 0 ? void 0 : _b[0], setSheets, setKey, sheetRef)];
53
53
  case 1:
54
54
  _c.sent();
55
55
  return [2 /*return*/];
@@ -113,11 +113,12 @@ var transformExcelToFortune = function (file, setSheets, setKey, sheetRef) { ret
113
113
  setSheets(lsh.sheets);
114
114
  setKey(function (k) { return k + 1; });
115
115
  setTimeout(function () {
116
- for (var _i = 0, _a = lsh.sheets; _i < _a.length; _i++) {
117
- var sheet = _a[_i];
116
+ var _a, _b, _c, _d;
117
+ for (var _i = 0, _e = lsh.sheets; _i < _e.length; _i++) {
118
+ var sheet = _e[_i];
118
119
  var config = sheet.config;
119
- sheetRef.setColumnWidth((config === null || config === void 0 ? void 0 : config.columnlen) || {}, { id: sheet.id });
120
- sheetRef.setRowHeight((config === null || config === void 0 ? void 0 : config.rowlen) || {}, { id: sheet.id });
120
+ (_b = (_a = sheetRef === null || sheetRef === void 0 ? void 0 : sheetRef.current) === null || _a === void 0 ? void 0 : _a.setColumnWidth) === null || _b === void 0 ? void 0 : _b.call(_a, (config === null || config === void 0 ? void 0 : config.columnlen) || {}, { id: sheet.id });
121
+ (_d = (_c = sheetRef === null || sheetRef === void 0 ? void 0 : sheetRef.current) === null || _c === void 0 ? void 0 : _c.setRowHeight) === null || _d === void 0 ? void 0 : _d.call(_c, (config === null || config === void 0 ? void 0 : config.rowlen) || {}, { id: sheet.id });
121
122
  }
122
123
  }, 1);
123
124
  return [2 /*return*/];
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "workspaces": [
4
4
  "src/*"
5
5
  ],
6
- "version": "2.2.6",
6
+ "version": "2.3.0",
7
7
  "description": "An Excel import/export import library for FortuneSheet",
8
8
  "main": "dist/main.js",
9
9
  "types": "dist/main.d.ts",