@leankylin-sheet/react 5.2.64 → 5.2.65
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 +68 -24
- package/dist/index.js +68 -24
- package/dist/index.umd.js +68 -24
- package/dist/index.umd.min.js +1 -1
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -10571,15 +10571,59 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
|
|
|
10571
10571
|
}
|
|
10572
10572
|
});
|
|
10573
10573
|
}, [context.allowEdit, setContext, sheet, showAlert, sheetconfig]);
|
|
10574
|
-
var copySheet = useCallback(function () {
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
|
|
10574
|
+
var copySheet = useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10575
|
+
var _settings$hooks;
|
|
10576
|
+
var _ref2, onCopySheetCheck, isAllowed;
|
|
10577
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10578
|
+
while (1) switch (_context.prev = _context.next) {
|
|
10579
|
+
case 0:
|
|
10580
|
+
if (!(context.allowEdit === false)) {
|
|
10581
|
+
_context.next = 2;
|
|
10582
|
+
break;
|
|
10583
|
+
}
|
|
10584
|
+
return _context.abrupt("return");
|
|
10585
|
+
case 2:
|
|
10586
|
+
if (sheet === null || sheet === void 0 ? void 0 : sheet.id) {
|
|
10587
|
+
_context.next = 4;
|
|
10588
|
+
break;
|
|
10589
|
+
}
|
|
10590
|
+
return _context.abrupt("return");
|
|
10591
|
+
case 4:
|
|
10592
|
+
_ref2 = (_settings$hooks = settings.hooks) !== null && _settings$hooks !== void 0 ? _settings$hooks : {}, onCopySheetCheck = _ref2.onCopySheetCheck;
|
|
10593
|
+
if (!onCopySheetCheck) {
|
|
10594
|
+
_context.next = 18;
|
|
10595
|
+
break;
|
|
10596
|
+
}
|
|
10597
|
+
_context.prev = 6;
|
|
10598
|
+
_context.next = 9;
|
|
10599
|
+
return onCopySheetCheck(sheet.id, sheet);
|
|
10600
|
+
case 9:
|
|
10601
|
+
isAllowed = _context.sent;
|
|
10602
|
+
_context.next = 16;
|
|
10603
|
+
break;
|
|
10604
|
+
case 12:
|
|
10605
|
+
_context.prev = 12;
|
|
10606
|
+
_context.t0 = _context["catch"](6);
|
|
10607
|
+
console.error(_context.t0);
|
|
10608
|
+
isAllowed = false;
|
|
10609
|
+
case 16:
|
|
10610
|
+
if (isAllowed) {
|
|
10611
|
+
_context.next = 18;
|
|
10612
|
+
break;
|
|
10613
|
+
}
|
|
10614
|
+
return _context.abrupt("return");
|
|
10615
|
+
case 18:
|
|
10616
|
+
setContext(function (ctx) {
|
|
10617
|
+
api.copySheet(ctx, sheet.id, settings.hooks);
|
|
10618
|
+
}, {
|
|
10619
|
+
addSheetOp: true
|
|
10620
|
+
});
|
|
10621
|
+
case 19:
|
|
10622
|
+
case "end":
|
|
10623
|
+
return _context.stop();
|
|
10624
|
+
}
|
|
10625
|
+
}, _callee, null, [[6, 12]]);
|
|
10626
|
+
})), [context.allowEdit, setContext, settings.hooks, sheet]);
|
|
10583
10627
|
var updateShowInputColor = useCallback(function (state) {
|
|
10584
10628
|
setIsShowInputColor(state);
|
|
10585
10629
|
}, []);
|
|
@@ -10620,34 +10664,34 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
|
|
|
10620
10664
|
return _.isUndefined(singleSheet.hide) || singleSheet.hide !== 1;
|
|
10621
10665
|
});
|
|
10622
10666
|
if (context.luckysheetfile.length > 1 && shownSheets.length > 1) {
|
|
10623
|
-
showAlert("".concat(sheetconfig.confirmDelete, "\"").concat(sheet.name, "\"\uFF1F"), "yesno", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
10667
|
+
showAlert("".concat(sheetconfig.confirmDelete, "\"").concat(sheet.name, "\"\uFF1F"), "yesno", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
10624
10668
|
var onDeleteSheetCheck, isAllowed;
|
|
10625
|
-
return _regeneratorRuntime().wrap(function
|
|
10626
|
-
while (1) switch (
|
|
10669
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10670
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
10627
10671
|
case 0:
|
|
10628
10672
|
onDeleteSheetCheck = settings.onDeleteSheetCheck;
|
|
10629
10673
|
if (!onDeleteSheetCheck) {
|
|
10630
|
-
|
|
10674
|
+
_context2.next = 14;
|
|
10631
10675
|
break;
|
|
10632
10676
|
}
|
|
10633
|
-
|
|
10634
|
-
|
|
10677
|
+
_context2.prev = 2;
|
|
10678
|
+
_context2.next = 5;
|
|
10635
10679
|
return onDeleteSheetCheck(sheet.id, sheet);
|
|
10636
10680
|
case 5:
|
|
10637
|
-
isAllowed =
|
|
10638
|
-
|
|
10681
|
+
isAllowed = _context2.sent;
|
|
10682
|
+
_context2.next = 12;
|
|
10639
10683
|
break;
|
|
10640
10684
|
case 8:
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
console.error(
|
|
10685
|
+
_context2.prev = 8;
|
|
10686
|
+
_context2.t0 = _context2["catch"](2);
|
|
10687
|
+
console.error(_context2.t0);
|
|
10644
10688
|
isAllowed = false;
|
|
10645
10689
|
case 12:
|
|
10646
10690
|
if (isAllowed) {
|
|
10647
|
-
|
|
10691
|
+
_context2.next = 14;
|
|
10648
10692
|
break;
|
|
10649
10693
|
}
|
|
10650
|
-
return
|
|
10694
|
+
return _context2.abrupt("return");
|
|
10651
10695
|
case 14:
|
|
10652
10696
|
setContext(function (ctx) {
|
|
10653
10697
|
deleteSheet(ctx, sheet.id);
|
|
@@ -10659,9 +10703,9 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
|
|
|
10659
10703
|
hideAlert();
|
|
10660
10704
|
case 16:
|
|
10661
10705
|
case "end":
|
|
10662
|
-
return
|
|
10706
|
+
return _context2.stop();
|
|
10663
10707
|
}
|
|
10664
|
-
},
|
|
10708
|
+
}, _callee2, null, [[2, 8]]);
|
|
10665
10709
|
})), undefined, {
|
|
10666
10710
|
confirmText: sheetconfig.delete,
|
|
10667
10711
|
danger: true
|
package/dist/index.js
CHANGED
|
@@ -10581,15 +10581,59 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
|
|
|
10581
10581
|
}
|
|
10582
10582
|
});
|
|
10583
10583
|
}, [context.allowEdit, setContext, sheet, showAlert, sheetconfig]);
|
|
10584
|
-
var copySheet = React.useCallback(function () {
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
|
|
10584
|
+
var copySheet = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
10585
|
+
var _settings$hooks;
|
|
10586
|
+
var _ref2, onCopySheetCheck, isAllowed;
|
|
10587
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
10588
|
+
while (1) switch (_context.prev = _context.next) {
|
|
10589
|
+
case 0:
|
|
10590
|
+
if (!(context.allowEdit === false)) {
|
|
10591
|
+
_context.next = 2;
|
|
10592
|
+
break;
|
|
10593
|
+
}
|
|
10594
|
+
return _context.abrupt("return");
|
|
10595
|
+
case 2:
|
|
10596
|
+
if (sheet === null || sheet === void 0 ? void 0 : sheet.id) {
|
|
10597
|
+
_context.next = 4;
|
|
10598
|
+
break;
|
|
10599
|
+
}
|
|
10600
|
+
return _context.abrupt("return");
|
|
10601
|
+
case 4:
|
|
10602
|
+
_ref2 = (_settings$hooks = settings.hooks) !== null && _settings$hooks !== void 0 ? _settings$hooks : {}, onCopySheetCheck = _ref2.onCopySheetCheck;
|
|
10603
|
+
if (!onCopySheetCheck) {
|
|
10604
|
+
_context.next = 18;
|
|
10605
|
+
break;
|
|
10606
|
+
}
|
|
10607
|
+
_context.prev = 6;
|
|
10608
|
+
_context.next = 9;
|
|
10609
|
+
return onCopySheetCheck(sheet.id, sheet);
|
|
10610
|
+
case 9:
|
|
10611
|
+
isAllowed = _context.sent;
|
|
10612
|
+
_context.next = 16;
|
|
10613
|
+
break;
|
|
10614
|
+
case 12:
|
|
10615
|
+
_context.prev = 12;
|
|
10616
|
+
_context.t0 = _context["catch"](6);
|
|
10617
|
+
console.error(_context.t0);
|
|
10618
|
+
isAllowed = false;
|
|
10619
|
+
case 16:
|
|
10620
|
+
if (isAllowed) {
|
|
10621
|
+
_context.next = 18;
|
|
10622
|
+
break;
|
|
10623
|
+
}
|
|
10624
|
+
return _context.abrupt("return");
|
|
10625
|
+
case 18:
|
|
10626
|
+
setContext(function (ctx) {
|
|
10627
|
+
core.api.copySheet(ctx, sheet.id, settings.hooks);
|
|
10628
|
+
}, {
|
|
10629
|
+
addSheetOp: true
|
|
10630
|
+
});
|
|
10631
|
+
case 19:
|
|
10632
|
+
case "end":
|
|
10633
|
+
return _context.stop();
|
|
10634
|
+
}
|
|
10635
|
+
}, _callee, null, [[6, 12]]);
|
|
10636
|
+
})), [context.allowEdit, setContext, settings.hooks, sheet]);
|
|
10593
10637
|
var updateShowInputColor = React.useCallback(function (state) {
|
|
10594
10638
|
setIsShowInputColor(state);
|
|
10595
10639
|
}, []);
|
|
@@ -10630,34 +10674,34 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
|
|
|
10630
10674
|
return ___default['default'].isUndefined(singleSheet.hide) || singleSheet.hide !== 1;
|
|
10631
10675
|
});
|
|
10632
10676
|
if (context.luckysheetfile.length > 1 && shownSheets.length > 1) {
|
|
10633
|
-
showAlert("".concat(sheetconfig.confirmDelete, "\"").concat(sheet.name, "\"\uFF1F"), "yesno", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
10677
|
+
showAlert("".concat(sheetconfig.confirmDelete, "\"").concat(sheet.name, "\"\uFF1F"), "yesno", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
10634
10678
|
var onDeleteSheetCheck, isAllowed;
|
|
10635
|
-
return _regeneratorRuntime().wrap(function
|
|
10636
|
-
while (1) switch (
|
|
10679
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
10680
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
10637
10681
|
case 0:
|
|
10638
10682
|
onDeleteSheetCheck = settings.onDeleteSheetCheck;
|
|
10639
10683
|
if (!onDeleteSheetCheck) {
|
|
10640
|
-
|
|
10684
|
+
_context2.next = 14;
|
|
10641
10685
|
break;
|
|
10642
10686
|
}
|
|
10643
|
-
|
|
10644
|
-
|
|
10687
|
+
_context2.prev = 2;
|
|
10688
|
+
_context2.next = 5;
|
|
10645
10689
|
return onDeleteSheetCheck(sheet.id, sheet);
|
|
10646
10690
|
case 5:
|
|
10647
|
-
isAllowed =
|
|
10648
|
-
|
|
10691
|
+
isAllowed = _context2.sent;
|
|
10692
|
+
_context2.next = 12;
|
|
10649
10693
|
break;
|
|
10650
10694
|
case 8:
|
|
10651
|
-
|
|
10652
|
-
|
|
10653
|
-
console.error(
|
|
10695
|
+
_context2.prev = 8;
|
|
10696
|
+
_context2.t0 = _context2["catch"](2);
|
|
10697
|
+
console.error(_context2.t0);
|
|
10654
10698
|
isAllowed = false;
|
|
10655
10699
|
case 12:
|
|
10656
10700
|
if (isAllowed) {
|
|
10657
|
-
|
|
10701
|
+
_context2.next = 14;
|
|
10658
10702
|
break;
|
|
10659
10703
|
}
|
|
10660
|
-
return
|
|
10704
|
+
return _context2.abrupt("return");
|
|
10661
10705
|
case 14:
|
|
10662
10706
|
setContext(function (ctx) {
|
|
10663
10707
|
core.deleteSheet(ctx, sheet.id);
|
|
@@ -10669,9 +10713,9 @@ var SheetTabContextMenu = function SheetTabContextMenu() {
|
|
|
10669
10713
|
hideAlert();
|
|
10670
10714
|
case 16:
|
|
10671
10715
|
case "end":
|
|
10672
|
-
return
|
|
10716
|
+
return _context2.stop();
|
|
10673
10717
|
}
|
|
10674
|
-
},
|
|
10718
|
+
}, _callee2, null, [[2, 8]]);
|
|
10675
10719
|
})), undefined, {
|
|
10676
10720
|
confirmText: sheetconfig.delete,
|
|
10677
10721
|
danger: true
|
package/dist/index.umd.js
CHANGED
|
@@ -29655,15 +29655,59 @@
|
|
|
29655
29655
|
}
|
|
29656
29656
|
});
|
|
29657
29657
|
}, [context.allowEdit, setContext, sheet, showAlert, sheetconfig]);
|
|
29658
|
-
var copySheet = React.useCallback(function () {
|
|
29659
|
-
|
|
29660
|
-
|
|
29661
|
-
|
|
29662
|
-
|
|
29663
|
-
|
|
29664
|
-
|
|
29665
|
-
|
|
29666
|
-
|
|
29658
|
+
var copySheet = React.useCallback( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
29659
|
+
var _settings$hooks;
|
|
29660
|
+
var _ref2, onCopySheetCheck, isAllowed;
|
|
29661
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
29662
|
+
while (1) switch (_context.prev = _context.next) {
|
|
29663
|
+
case 0:
|
|
29664
|
+
if (!(context.allowEdit === false)) {
|
|
29665
|
+
_context.next = 2;
|
|
29666
|
+
break;
|
|
29667
|
+
}
|
|
29668
|
+
return _context.abrupt("return");
|
|
29669
|
+
case 2:
|
|
29670
|
+
if (sheet === null || sheet === void 0 ? void 0 : sheet.id) {
|
|
29671
|
+
_context.next = 4;
|
|
29672
|
+
break;
|
|
29673
|
+
}
|
|
29674
|
+
return _context.abrupt("return");
|
|
29675
|
+
case 4:
|
|
29676
|
+
_ref2 = (_settings$hooks = settings.hooks) !== null && _settings$hooks !== void 0 ? _settings$hooks : {}, onCopySheetCheck = _ref2.onCopySheetCheck;
|
|
29677
|
+
if (!onCopySheetCheck) {
|
|
29678
|
+
_context.next = 18;
|
|
29679
|
+
break;
|
|
29680
|
+
}
|
|
29681
|
+
_context.prev = 6;
|
|
29682
|
+
_context.next = 9;
|
|
29683
|
+
return onCopySheetCheck(sheet.id, sheet);
|
|
29684
|
+
case 9:
|
|
29685
|
+
isAllowed = _context.sent;
|
|
29686
|
+
_context.next = 16;
|
|
29687
|
+
break;
|
|
29688
|
+
case 12:
|
|
29689
|
+
_context.prev = 12;
|
|
29690
|
+
_context.t0 = _context["catch"](6);
|
|
29691
|
+
console.error(_context.t0);
|
|
29692
|
+
isAllowed = false;
|
|
29693
|
+
case 16:
|
|
29694
|
+
if (isAllowed) {
|
|
29695
|
+
_context.next = 18;
|
|
29696
|
+
break;
|
|
29697
|
+
}
|
|
29698
|
+
return _context.abrupt("return");
|
|
29699
|
+
case 18:
|
|
29700
|
+
setContext(function (ctx) {
|
|
29701
|
+
core.api.copySheet(ctx, sheet.id, settings.hooks);
|
|
29702
|
+
}, {
|
|
29703
|
+
addSheetOp: true
|
|
29704
|
+
});
|
|
29705
|
+
case 19:
|
|
29706
|
+
case "end":
|
|
29707
|
+
return _context.stop();
|
|
29708
|
+
}
|
|
29709
|
+
}, _callee, null, [[6, 12]]);
|
|
29710
|
+
})), [context.allowEdit, setContext, settings.hooks, sheet]);
|
|
29667
29711
|
var updateShowInputColor = React.useCallback(function (state) {
|
|
29668
29712
|
setIsShowInputColor(state);
|
|
29669
29713
|
}, []);
|
|
@@ -29704,34 +29748,34 @@
|
|
|
29704
29748
|
return lodash.isUndefined(singleSheet.hide) || singleSheet.hide !== 1;
|
|
29705
29749
|
});
|
|
29706
29750
|
if (context.luckysheetfile.length > 1 && shownSheets.length > 1) {
|
|
29707
|
-
showAlert("".concat(sheetconfig.confirmDelete, "\"").concat(sheet.name, "\"\uFF1F"), "yesno", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function
|
|
29751
|
+
showAlert("".concat(sheetconfig.confirmDelete, "\"").concat(sheet.name, "\"\uFF1F"), "yesno", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
|
|
29708
29752
|
var onDeleteSheetCheck, isAllowed;
|
|
29709
|
-
return _regeneratorRuntime().wrap(function
|
|
29710
|
-
while (1) switch (
|
|
29753
|
+
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
29754
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
29711
29755
|
case 0:
|
|
29712
29756
|
onDeleteSheetCheck = settings.onDeleteSheetCheck;
|
|
29713
29757
|
if (!onDeleteSheetCheck) {
|
|
29714
|
-
|
|
29758
|
+
_context2.next = 14;
|
|
29715
29759
|
break;
|
|
29716
29760
|
}
|
|
29717
|
-
|
|
29718
|
-
|
|
29761
|
+
_context2.prev = 2;
|
|
29762
|
+
_context2.next = 5;
|
|
29719
29763
|
return onDeleteSheetCheck(sheet.id, sheet);
|
|
29720
29764
|
case 5:
|
|
29721
|
-
isAllowed =
|
|
29722
|
-
|
|
29765
|
+
isAllowed = _context2.sent;
|
|
29766
|
+
_context2.next = 12;
|
|
29723
29767
|
break;
|
|
29724
29768
|
case 8:
|
|
29725
|
-
|
|
29726
|
-
|
|
29727
|
-
console.error(
|
|
29769
|
+
_context2.prev = 8;
|
|
29770
|
+
_context2.t0 = _context2["catch"](2);
|
|
29771
|
+
console.error(_context2.t0);
|
|
29728
29772
|
isAllowed = false;
|
|
29729
29773
|
case 12:
|
|
29730
29774
|
if (isAllowed) {
|
|
29731
|
-
|
|
29775
|
+
_context2.next = 14;
|
|
29732
29776
|
break;
|
|
29733
29777
|
}
|
|
29734
|
-
return
|
|
29778
|
+
return _context2.abrupt("return");
|
|
29735
29779
|
case 14:
|
|
29736
29780
|
setContext(function (ctx) {
|
|
29737
29781
|
core.deleteSheet(ctx, sheet.id);
|
|
@@ -29743,9 +29787,9 @@
|
|
|
29743
29787
|
hideAlert();
|
|
29744
29788
|
case 16:
|
|
29745
29789
|
case "end":
|
|
29746
|
-
return
|
|
29790
|
+
return _context2.stop();
|
|
29747
29791
|
}
|
|
29748
|
-
},
|
|
29792
|
+
}, _callee2, null, [[2, 8]]);
|
|
29749
29793
|
})), undefined, {
|
|
29750
29794
|
confirmText: sheetconfig.delete,
|
|
29751
29795
|
danger: true
|