@leankylin-sheet/react 5.2.66 → 5.2.68
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/dist/index.esm.js +12 -6
- package/dist/index.js +12 -6
- package/dist/index.umd.js +12 -6
- package/dist/index.umd.min.js +1 -1
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -12192,7 +12192,7 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
12192
12192
|
}, [context.luckysheetfile, onChange]);
|
|
12193
12193
|
useEffect(function () {
|
|
12194
12194
|
setContextWithProduce(function (draftCtx) {
|
|
12195
|
-
var _draftCtx$
|
|
12195
|
+
var _draftCtx$luckysheetf2, _draftCtx$luckysheet_;
|
|
12196
12196
|
draftCtx.defaultcolumnNum = mergedSettings.column;
|
|
12197
12197
|
draftCtx.defaultrowNum = mergedSettings.row;
|
|
12198
12198
|
draftCtx.defaultFontSize = mergedSettings.defaultFontSize;
|
|
@@ -12223,14 +12223,20 @@ var Workbook = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
12223
12223
|
}
|
|
12224
12224
|
var sheetIdx = getSheetIndex(draftCtx, draftCtx.currentSheetId);
|
|
12225
12225
|
if (sheetIdx == null) {
|
|
12226
|
-
var
|
|
12227
|
-
|
|
12228
|
-
|
|
12229
|
-
|
|
12226
|
+
var _$sortBy$;
|
|
12227
|
+
var shownSheets = draftCtx.luckysheetfile.filter(function (s) {
|
|
12228
|
+
return _.isUndefined(s.hide) || s.hide !== 1;
|
|
12229
|
+
});
|
|
12230
|
+
var fallbackSheet = (_$sortBy$ = _.sortBy(shownSheets, function (s) {
|
|
12231
|
+
return s.order;
|
|
12232
|
+
})[0]) !== null && _$sortBy$ !== void 0 ? _$sortBy$ : draftCtx.luckysheetfile[0];
|
|
12233
|
+
if (fallbackSheet) {
|
|
12234
|
+
sheetIdx = getSheetIndex(draftCtx, fallbackSheet.id);
|
|
12235
|
+
draftCtx.currentSheetId = fallbackSheet.id;
|
|
12230
12236
|
}
|
|
12231
12237
|
}
|
|
12232
12238
|
if (sheetIdx == null) return;
|
|
12233
|
-
var sheet = (_draftCtx$
|
|
12239
|
+
var sheet = (_draftCtx$luckysheetf2 = draftCtx.luckysheetfile) === null || _draftCtx$luckysheetf2 === void 0 ? void 0 : _draftCtx$luckysheetf2[sheetIdx];
|
|
12234
12240
|
if (!sheet) return;
|
|
12235
12241
|
var data = sheet.data;
|
|
12236
12242
|
if (_.isEmpty(data)) {
|
package/dist/index.js
CHANGED
|
@@ -12202,7 +12202,7 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
|
|
|
12202
12202
|
}, [context.luckysheetfile, onChange]);
|
|
12203
12203
|
React.useEffect(function () {
|
|
12204
12204
|
setContextWithProduce(function (draftCtx) {
|
|
12205
|
-
var _draftCtx$
|
|
12205
|
+
var _draftCtx$luckysheetf2, _draftCtx$luckysheet_;
|
|
12206
12206
|
draftCtx.defaultcolumnNum = mergedSettings.column;
|
|
12207
12207
|
draftCtx.defaultrowNum = mergedSettings.row;
|
|
12208
12208
|
draftCtx.defaultFontSize = mergedSettings.defaultFontSize;
|
|
@@ -12233,14 +12233,20 @@ var Workbook = /*#__PURE__*/React__default['default'].forwardRef(function (_ref,
|
|
|
12233
12233
|
}
|
|
12234
12234
|
var sheetIdx = core.getSheetIndex(draftCtx, draftCtx.currentSheetId);
|
|
12235
12235
|
if (sheetIdx == null) {
|
|
12236
|
-
var
|
|
12237
|
-
|
|
12238
|
-
|
|
12239
|
-
|
|
12236
|
+
var _$sortBy$;
|
|
12237
|
+
var shownSheets = draftCtx.luckysheetfile.filter(function (s) {
|
|
12238
|
+
return ___default['default'].isUndefined(s.hide) || s.hide !== 1;
|
|
12239
|
+
});
|
|
12240
|
+
var fallbackSheet = (_$sortBy$ = ___default['default'].sortBy(shownSheets, function (s) {
|
|
12241
|
+
return s.order;
|
|
12242
|
+
})[0]) !== null && _$sortBy$ !== void 0 ? _$sortBy$ : draftCtx.luckysheetfile[0];
|
|
12243
|
+
if (fallbackSheet) {
|
|
12244
|
+
sheetIdx = core.getSheetIndex(draftCtx, fallbackSheet.id);
|
|
12245
|
+
draftCtx.currentSheetId = fallbackSheet.id;
|
|
12240
12246
|
}
|
|
12241
12247
|
}
|
|
12242
12248
|
if (sheetIdx == null) return;
|
|
12243
|
-
var sheet = (_draftCtx$
|
|
12249
|
+
var sheet = (_draftCtx$luckysheetf2 = draftCtx.luckysheetfile) === null || _draftCtx$luckysheetf2 === void 0 ? void 0 : _draftCtx$luckysheetf2[sheetIdx];
|
|
12244
12250
|
if (!sheet) return;
|
|
12245
12251
|
var data = sheet.data;
|
|
12246
12252
|
if (___default['default'].isEmpty(data)) {
|
package/dist/index.umd.js
CHANGED
|
@@ -31276,7 +31276,7 @@
|
|
|
31276
31276
|
}, [context.luckysheetfile, onChange]);
|
|
31277
31277
|
React.useEffect(function () {
|
|
31278
31278
|
setContextWithProduce(function (draftCtx) {
|
|
31279
|
-
var _draftCtx$
|
|
31279
|
+
var _draftCtx$luckysheetf2, _draftCtx$luckysheet_;
|
|
31280
31280
|
draftCtx.defaultcolumnNum = mergedSettings.column;
|
|
31281
31281
|
draftCtx.defaultrowNum = mergedSettings.row;
|
|
31282
31282
|
draftCtx.defaultFontSize = mergedSettings.defaultFontSize;
|
|
@@ -31307,14 +31307,20 @@
|
|
|
31307
31307
|
}
|
|
31308
31308
|
var sheetIdx = core.getSheetIndex(draftCtx, draftCtx.currentSheetId);
|
|
31309
31309
|
if (sheetIdx == null) {
|
|
31310
|
-
var
|
|
31311
|
-
|
|
31312
|
-
|
|
31313
|
-
|
|
31310
|
+
var _$sortBy$;
|
|
31311
|
+
var shownSheets = draftCtx.luckysheetfile.filter(function (s) {
|
|
31312
|
+
return lodash.isUndefined(s.hide) || s.hide !== 1;
|
|
31313
|
+
});
|
|
31314
|
+
var fallbackSheet = (_$sortBy$ = lodash.sortBy(shownSheets, function (s) {
|
|
31315
|
+
return s.order;
|
|
31316
|
+
})[0]) !== null && _$sortBy$ !== void 0 ? _$sortBy$ : draftCtx.luckysheetfile[0];
|
|
31317
|
+
if (fallbackSheet) {
|
|
31318
|
+
sheetIdx = core.getSheetIndex(draftCtx, fallbackSheet.id);
|
|
31319
|
+
draftCtx.currentSheetId = fallbackSheet.id;
|
|
31314
31320
|
}
|
|
31315
31321
|
}
|
|
31316
31322
|
if (sheetIdx == null) return;
|
|
31317
|
-
var sheet = (_draftCtx$
|
|
31323
|
+
var sheet = (_draftCtx$luckysheetf2 = draftCtx.luckysheetfile) === null || _draftCtx$luckysheetf2 === void 0 ? void 0 : _draftCtx$luckysheetf2[sheetIdx];
|
|
31318
31324
|
if (!sheet) return;
|
|
31319
31325
|
var data = sheet.data;
|
|
31320
31326
|
if (lodash.isEmpty(data)) {
|