@leankylin-sheet/react 5.2.19 → 5.2.20

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.
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import "./index.css";
3
+ declare const CellTipRender: React.FC;
4
+ export default CellTipRender;
@@ -18,13 +18,13 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
18
18
  createFilter: () => void;
19
19
  createFilterOptions: (range: any, sheetId: string, filterObj: any, saveData: boolean) => void;
20
20
  getCellValue: (row: number, column: number, options?: import("@leankylin-sheet/core/dist/api").CommonOptions & {
21
- type?: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "hl" | keyof import("@leankylin-sheet/core").CellStyle | undefined;
21
+ type?: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "hl" | "tip" | keyof import("@leankylin-sheet/core").CellStyle | undefined;
22
22
  }) => any;
23
23
  setCellValue: (row: number, column: number, value: any, options?: import("@leankylin-sheet/core/dist/api").CommonOptions & {
24
- type?: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "hl" | keyof import("@leankylin-sheet/core").CellStyle | undefined;
24
+ type?: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "hl" | "tip" | keyof import("@leankylin-sheet/core").CellStyle | undefined;
25
25
  }) => void;
26
26
  clearCell: (row: number, column: number, options?: import("@leankylin-sheet/core/dist/api").CommonOptions) => void;
27
- setCellFormat: (row: number, column: number, attr: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "hl" | keyof import("@leankylin-sheet/core").CellStyle, value: any, options?: import("@leankylin-sheet/core/dist/api").CommonOptions) => void;
27
+ setCellFormat: (row: number, column: number, attr: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "hl" | "tip" | keyof import("@leankylin-sheet/core").CellStyle, value: any, options?: import("@leankylin-sheet/core/dist/api").CommonOptions) => void;
28
28
  autoFillCell: (copyRange: import("@leankylin-sheet/core").SingleRange, applyRange: import("@leankylin-sheet/core").SingleRange, direction: "up" | "down" | "left" | "right") => void;
29
29
  freeze: (type: "row" | "column" | "both", range: {
30
30
  row: number;
@@ -56,7 +56,7 @@ declare const Workbook: React.ForwardRefExoticComponent<Settings & AdditionalPro
56
56
  setSelection: (range: import("@leankylin-sheet/core").Range, options?: import("@leankylin-sheet/core/dist/api").CommonOptions) => void;
57
57
  setCellValuesByRange: (data: any[][], range: import("@leankylin-sheet/core").SingleRange, options?: import("@leankylin-sheet/core/dist/api").CommonOptions, setMerge?: boolean) => void;
58
58
  setCellValues: (data: any[]) => void;
59
- setCellFormatByRange: (attr: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "hl" | keyof import("@leankylin-sheet/core").CellStyle, value: any, range: import("@leankylin-sheet/core").SingleRange | import("@leankylin-sheet/core").Range, options?: import("@leankylin-sheet/core/dist/api").CommonOptions) => void;
59
+ setCellFormatByRange: (attr: "v" | "m" | "mc" | "f" | "ct" | "qp" | "spl" | "bg" | "lo" | "rt" | "ps" | "hl" | "tip" | keyof import("@leankylin-sheet/core").CellStyle, value: any, range: import("@leankylin-sheet/core").SingleRange | import("@leankylin-sheet/core").Range, options?: import("@leankylin-sheet/core/dist/api").CommonOptions) => void;
60
60
  mergeCells: (ranges: import("@leankylin-sheet/core").Range, type: string, options?: import("@leankylin-sheet/core/dist/api").CommonOptions) => void;
61
61
  cancelMerge: (ranges: import("@leankylin-sheet/core").Range, options?: import("@leankylin-sheet/core/dist/api").CommonOptions) => void;
62
62
  getAllSheets: () => SheetType[];
package/dist/index.css CHANGED
@@ -2018,6 +2018,19 @@ html::-webkit-scrollbar-button {
2018
2018
  .leankylin-cell-option-item{
2019
2019
  pointer-events: all;
2020
2020
  }
2021
+ .leankylin-cell-tip{
2022
+ position: absolute;
2023
+ left: 46px;
2024
+ top: 20px;
2025
+ z-index: 1;
2026
+ width: calc(100% - 46px);
2027
+ height: calc(100% - 20px);
2028
+ overflow: hidden;
2029
+ pointer-events: none;
2030
+ }
2031
+ .leankylin-cell-tip-item{
2032
+ pointer-events: all;
2033
+ }
2021
2034
  .leankylin-toolbar {
2022
2035
  display: flex;
2023
2036
  flex-direction: row;
@@ -2018,6 +2018,19 @@ html::-webkit-scrollbar-button {
2018
2018
  .leankylin-cell-option-item{
2019
2019
  pointer-events: all;
2020
2020
  }
2021
+ .leankylin-cell-tip{
2022
+ position: absolute;
2023
+ left: 46px;
2024
+ top: 20px;
2025
+ z-index: 1;
2026
+ width: calc(100% - 46px);
2027
+ height: calc(100% - 20px);
2028
+ overflow: hidden;
2029
+ pointer-events: none;
2030
+ }
2031
+ .leankylin-cell-tip-item{
2032
+ pointer-events: all;
2033
+ }
2021
2034
  .leankylin-toolbar {
2022
2035
  display: flex;
2023
2036
  flex-direction: row;
package/dist/index.esm.js CHANGED
@@ -3568,7 +3568,11 @@ var CellOptions = function CellOptions() {
3568
3568
  var currentSheet = context.luckysheetfile[getSheetIndex(context, context.currentSheetId)];
3569
3569
  var cellOptions = currentSheet.cellOptions;
3570
3570
  return /*#__PURE__*/React.createElement("div", {
3571
- className: "leankylin-cell-option"
3571
+ className: "leankylin-cell-option",
3572
+ style: {
3573
+ left: context.rowHeaderWidth,
3574
+ top: context.columnHeaderHeight
3575
+ }
3572
3576
  }, cellOptions === null || cellOptions === void 0 ? void 0 : cellOptions.map(function (item) {
3573
3577
  var _refs$globalCache$fre, _refs$globalCache$fre2, _refs$globalCache$fre3, _refs$globalCache$fre4, _refs$globalCache$fre5, _refs$globalCache$fre6, _refs$globalCache$fre7, _refs$globalCache$fre8, _refs$globalCache$fre9, _refs$globalCache$fre10, _item$render, _settings$renderCellO;
3574
3578
  var _colLocationByIndex = colLocationByIndex(item.c, context.visibledatacolumn),
@@ -3591,6 +3595,7 @@ var CellOptions = function CellOptions() {
3591
3595
  }
3592
3596
  return /*#__PURE__*/React.createElement("div", {
3593
3597
  className: "leankylin-cell-option-item",
3598
+ key: "".concat(item.r, "-").concat(item.c),
3594
3599
  style: _objectSpread2({
3595
3600
  position: "absolute",
3596
3601
  left: _left,
@@ -3602,6 +3607,70 @@ var CellOptions = function CellOptions() {
3602
3607
  }));
3603
3608
  };
3604
3609
 
3610
+ var CellTipRender = function CellTipRender() {
3611
+ var _useContext = useContext(WorkbookContext),
3612
+ context = _useContext.context,
3613
+ refs = _useContext.refs,
3614
+ settings = _useContext.settings;
3615
+ var currentSheet = context.luckysheetfile[getSheetIndex(context, context.currentSheetId)];
3616
+ var list = useMemo(function () {
3617
+ var _list = [];
3618
+ var data = (currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.data) || [];
3619
+ for (var rIndex = 0; rIndex < data.length; rIndex++) {
3620
+ var rows = data[rIndex];
3621
+ for (var cIndex = 0; cIndex < rows.length; cIndex++) {
3622
+ var cell = rows[cIndex];
3623
+ if (cell === null || cell === void 0 ? void 0 : cell.tip) {
3624
+ _list.push({
3625
+ r: rIndex,
3626
+ c: cIndex,
3627
+ tip: cell.tip
3628
+ });
3629
+ }
3630
+ }
3631
+ }
3632
+ return _list;
3633
+ }, [currentSheet.data]);
3634
+ return /*#__PURE__*/React.createElement("div", {
3635
+ className: "leankylin-cell-tip",
3636
+ style: {
3637
+ left: context.rowHeaderWidth,
3638
+ top: context.columnHeaderHeight
3639
+ }
3640
+ }, list === null || list === void 0 ? void 0 : list.map(function (item) {
3641
+ var _refs$globalCache$fre, _refs$globalCache$fre2, _refs$globalCache$fre3, _refs$globalCache$fre4, _refs$globalCache$fre5, _refs$globalCache$fre6, _refs$globalCache$fre7, _refs$globalCache$fre8, _refs$globalCache$fre9, _refs$globalCache$fre10, _settings$renderCellT;
3642
+ var _colLocationByIndex = colLocationByIndex(item.c, context.visibledatacolumn),
3643
+ _colLocationByIndex2 = _slicedToArray(_colLocationByIndex, 2),
3644
+ left = _colLocationByIndex2[0],
3645
+ right = _colLocationByIndex2[1];
3646
+ var _rowLocationByIndex = rowLocationByIndex(item.r, context.visibledatarow),
3647
+ _rowLocationByIndex2 = _slicedToArray(_rowLocationByIndex, 2),
3648
+ top = _rowLocationByIndex2[0],
3649
+ bottom = _rowLocationByIndex2[1];
3650
+ var columnOverflowFreezeStyle = fixColumnStyleOverflowInFreeze(context, item.c, item.c, (_refs$globalCache$fre = refs.globalCache.freezen) === null || _refs$globalCache$fre === void 0 ? void 0 : _refs$globalCache$fre[context.currentSheetId]);
3651
+ var rowOverflowFreezeStyle = fixRowStyleOverflowInFreeze(context, item.r, item.r, (_refs$globalCache$fre2 = refs.globalCache.freezen) === null || _refs$globalCache$fre2 === void 0 ? void 0 : _refs$globalCache$fre2[context.currentSheetId]);
3652
+ var freezenRowIndex = ((_refs$globalCache$fre3 = refs.globalCache.freezen) === null || _refs$globalCache$fre3 === void 0 ? void 0 : (_refs$globalCache$fre4 = _refs$globalCache$fre3[context.currentSheetId]) === null || _refs$globalCache$fre4 === void 0 ? void 0 : (_refs$globalCache$fre5 = _refs$globalCache$fre4.horizontal) === null || _refs$globalCache$fre5 === void 0 ? void 0 : (_refs$globalCache$fre6 = _refs$globalCache$fre5.freezenhorizontaldata) === null || _refs$globalCache$fre6 === void 0 ? void 0 : _refs$globalCache$fre6[1]) || 0;
3653
+ var freezenColIndex = ((_refs$globalCache$fre7 = refs.globalCache.freezen) === null || _refs$globalCache$fre7 === void 0 ? void 0 : (_refs$globalCache$fre8 = _refs$globalCache$fre7[context.currentSheetId]) === null || _refs$globalCache$fre8 === void 0 ? void 0 : (_refs$globalCache$fre9 = _refs$globalCache$fre8.vertical) === null || _refs$globalCache$fre9 === void 0 ? void 0 : (_refs$globalCache$fre10 = _refs$globalCache$fre9.freezenverticaldata) === null || _refs$globalCache$fre10 === void 0 ? void 0 : _refs$globalCache$fre10[1]) || 0;
3654
+ var _top = freezenRowIndex > item.r ? top : top - (context.scrollTop || 0);
3655
+ var otherStyles = {};
3656
+ var _left = freezenColIndex > item.c ? left : left - (context.scrollLeft || 0);
3657
+ if (rowOverflowFreezeStyle.display || columnOverflowFreezeStyle.display) {
3658
+ otherStyles.display = rowOverflowFreezeStyle.display || columnOverflowFreezeStyle.display;
3659
+ }
3660
+ return /*#__PURE__*/React.createElement("div", {
3661
+ className: "leankylin-cell-tip-item",
3662
+ key: "".concat(item.r, "-").concat(item.c),
3663
+ style: _objectSpread2({
3664
+ position: "absolute",
3665
+ left: _left,
3666
+ top: _top,
3667
+ width: right - left,
3668
+ height: bottom - top
3669
+ }, otherStyles)
3670
+ }, settings === null || settings === void 0 ? void 0 : (_settings$renderCellT = settings.renderCellTip) === null || _settings$renderCellT === void 0 ? void 0 : _settings$renderCellT.call(settings, item));
3671
+ }));
3672
+ };
3673
+
3605
3674
  var SheetOverlay = function SheetOverlay() {
3606
3675
  var _refs$cellArea$curren, _refs$cellArea$curren2, _context$luckysheet_s, _context$luckysheet_s2, _context$luckysheet_s3, _context$luckysheet_s4, _context$luckysheet_s5, _context$luckysheet_s6, _context$presences$le, _context$presences, _context$linkCard, _context$rangeDialog;
3607
3676
  var _useContext = useContext(WorkbookContext),
@@ -3803,7 +3872,7 @@ var SheetOverlay = function SheetOverlay() {
3803
3872
  axis: "x"
3804
3873
  }), /*#__PURE__*/React.createElement(ScrollBar, {
3805
3874
  axis: "y"
3806
- }), /*#__PURE__*/React.createElement(CellOptions, null), /*#__PURE__*/React.createElement("div", {
3875
+ }), /*#__PURE__*/React.createElement(CellOptions, null), (settings === null || settings === void 0 ? void 0 : settings.renderCellTip) && /*#__PURE__*/React.createElement(CellTipRender, null), /*#__PURE__*/React.createElement("div", {
3807
3876
  ref: refs.cellArea,
3808
3877
  className: "leankylin-cell-area",
3809
3878
  onMouseDown: cellAreaMouseDown,
package/dist/index.js CHANGED
@@ -3578,7 +3578,11 @@ var CellOptions = function CellOptions() {
3578
3578
  var currentSheet = context.luckysheetfile[core.getSheetIndex(context, context.currentSheetId)];
3579
3579
  var cellOptions = currentSheet.cellOptions;
3580
3580
  return /*#__PURE__*/React__default['default'].createElement("div", {
3581
- className: "leankylin-cell-option"
3581
+ className: "leankylin-cell-option",
3582
+ style: {
3583
+ left: context.rowHeaderWidth,
3584
+ top: context.columnHeaderHeight
3585
+ }
3582
3586
  }, cellOptions === null || cellOptions === void 0 ? void 0 : cellOptions.map(function (item) {
3583
3587
  var _refs$globalCache$fre, _refs$globalCache$fre2, _refs$globalCache$fre3, _refs$globalCache$fre4, _refs$globalCache$fre5, _refs$globalCache$fre6, _refs$globalCache$fre7, _refs$globalCache$fre8, _refs$globalCache$fre9, _refs$globalCache$fre10, _item$render, _settings$renderCellO;
3584
3588
  var _colLocationByIndex = core.colLocationByIndex(item.c, context.visibledatacolumn),
@@ -3601,6 +3605,7 @@ var CellOptions = function CellOptions() {
3601
3605
  }
3602
3606
  return /*#__PURE__*/React__default['default'].createElement("div", {
3603
3607
  className: "leankylin-cell-option-item",
3608
+ key: "".concat(item.r, "-").concat(item.c),
3604
3609
  style: _objectSpread2({
3605
3610
  position: "absolute",
3606
3611
  left: _left,
@@ -3612,6 +3617,70 @@ var CellOptions = function CellOptions() {
3612
3617
  }));
3613
3618
  };
3614
3619
 
3620
+ var CellTipRender = function CellTipRender() {
3621
+ var _useContext = React.useContext(WorkbookContext),
3622
+ context = _useContext.context,
3623
+ refs = _useContext.refs,
3624
+ settings = _useContext.settings;
3625
+ var currentSheet = context.luckysheetfile[core.getSheetIndex(context, context.currentSheetId)];
3626
+ var list = React.useMemo(function () {
3627
+ var _list = [];
3628
+ var data = (currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.data) || [];
3629
+ for (var rIndex = 0; rIndex < data.length; rIndex++) {
3630
+ var rows = data[rIndex];
3631
+ for (var cIndex = 0; cIndex < rows.length; cIndex++) {
3632
+ var cell = rows[cIndex];
3633
+ if (cell === null || cell === void 0 ? void 0 : cell.tip) {
3634
+ _list.push({
3635
+ r: rIndex,
3636
+ c: cIndex,
3637
+ tip: cell.tip
3638
+ });
3639
+ }
3640
+ }
3641
+ }
3642
+ return _list;
3643
+ }, [currentSheet.data]);
3644
+ return /*#__PURE__*/React__default['default'].createElement("div", {
3645
+ className: "leankylin-cell-tip",
3646
+ style: {
3647
+ left: context.rowHeaderWidth,
3648
+ top: context.columnHeaderHeight
3649
+ }
3650
+ }, list === null || list === void 0 ? void 0 : list.map(function (item) {
3651
+ var _refs$globalCache$fre, _refs$globalCache$fre2, _refs$globalCache$fre3, _refs$globalCache$fre4, _refs$globalCache$fre5, _refs$globalCache$fre6, _refs$globalCache$fre7, _refs$globalCache$fre8, _refs$globalCache$fre9, _refs$globalCache$fre10, _settings$renderCellT;
3652
+ var _colLocationByIndex = core.colLocationByIndex(item.c, context.visibledatacolumn),
3653
+ _colLocationByIndex2 = _slicedToArray(_colLocationByIndex, 2),
3654
+ left = _colLocationByIndex2[0],
3655
+ right = _colLocationByIndex2[1];
3656
+ var _rowLocationByIndex = core.rowLocationByIndex(item.r, context.visibledatarow),
3657
+ _rowLocationByIndex2 = _slicedToArray(_rowLocationByIndex, 2),
3658
+ top = _rowLocationByIndex2[0],
3659
+ bottom = _rowLocationByIndex2[1];
3660
+ var columnOverflowFreezeStyle = core.fixColumnStyleOverflowInFreeze(context, item.c, item.c, (_refs$globalCache$fre = refs.globalCache.freezen) === null || _refs$globalCache$fre === void 0 ? void 0 : _refs$globalCache$fre[context.currentSheetId]);
3661
+ var rowOverflowFreezeStyle = core.fixRowStyleOverflowInFreeze(context, item.r, item.r, (_refs$globalCache$fre2 = refs.globalCache.freezen) === null || _refs$globalCache$fre2 === void 0 ? void 0 : _refs$globalCache$fre2[context.currentSheetId]);
3662
+ var freezenRowIndex = ((_refs$globalCache$fre3 = refs.globalCache.freezen) === null || _refs$globalCache$fre3 === void 0 ? void 0 : (_refs$globalCache$fre4 = _refs$globalCache$fre3[context.currentSheetId]) === null || _refs$globalCache$fre4 === void 0 ? void 0 : (_refs$globalCache$fre5 = _refs$globalCache$fre4.horizontal) === null || _refs$globalCache$fre5 === void 0 ? void 0 : (_refs$globalCache$fre6 = _refs$globalCache$fre5.freezenhorizontaldata) === null || _refs$globalCache$fre6 === void 0 ? void 0 : _refs$globalCache$fre6[1]) || 0;
3663
+ var freezenColIndex = ((_refs$globalCache$fre7 = refs.globalCache.freezen) === null || _refs$globalCache$fre7 === void 0 ? void 0 : (_refs$globalCache$fre8 = _refs$globalCache$fre7[context.currentSheetId]) === null || _refs$globalCache$fre8 === void 0 ? void 0 : (_refs$globalCache$fre9 = _refs$globalCache$fre8.vertical) === null || _refs$globalCache$fre9 === void 0 ? void 0 : (_refs$globalCache$fre10 = _refs$globalCache$fre9.freezenverticaldata) === null || _refs$globalCache$fre10 === void 0 ? void 0 : _refs$globalCache$fre10[1]) || 0;
3664
+ var _top = freezenRowIndex > item.r ? top : top - (context.scrollTop || 0);
3665
+ var otherStyles = {};
3666
+ var _left = freezenColIndex > item.c ? left : left - (context.scrollLeft || 0);
3667
+ if (rowOverflowFreezeStyle.display || columnOverflowFreezeStyle.display) {
3668
+ otherStyles.display = rowOverflowFreezeStyle.display || columnOverflowFreezeStyle.display;
3669
+ }
3670
+ return /*#__PURE__*/React__default['default'].createElement("div", {
3671
+ className: "leankylin-cell-tip-item",
3672
+ key: "".concat(item.r, "-").concat(item.c),
3673
+ style: _objectSpread2({
3674
+ position: "absolute",
3675
+ left: _left,
3676
+ top: _top,
3677
+ width: right - left,
3678
+ height: bottom - top
3679
+ }, otherStyles)
3680
+ }, settings === null || settings === void 0 ? void 0 : (_settings$renderCellT = settings.renderCellTip) === null || _settings$renderCellT === void 0 ? void 0 : _settings$renderCellT.call(settings, item));
3681
+ }));
3682
+ };
3683
+
3615
3684
  var SheetOverlay = function SheetOverlay() {
3616
3685
  var _refs$cellArea$curren, _refs$cellArea$curren2, _context$luckysheet_s, _context$luckysheet_s2, _context$luckysheet_s3, _context$luckysheet_s4, _context$luckysheet_s5, _context$luckysheet_s6, _context$presences$le, _context$presences, _context$linkCard, _context$rangeDialog;
3617
3686
  var _useContext = React.useContext(WorkbookContext),
@@ -3813,7 +3882,7 @@ var SheetOverlay = function SheetOverlay() {
3813
3882
  axis: "x"
3814
3883
  }), /*#__PURE__*/React__default['default'].createElement(ScrollBar, {
3815
3884
  axis: "y"
3816
- }), /*#__PURE__*/React__default['default'].createElement(CellOptions, null), /*#__PURE__*/React__default['default'].createElement("div", {
3885
+ }), /*#__PURE__*/React__default['default'].createElement(CellOptions, null), (settings === null || settings === void 0 ? void 0 : settings.renderCellTip) && /*#__PURE__*/React__default['default'].createElement(CellTipRender, null), /*#__PURE__*/React__default['default'].createElement("div", {
3817
3886
  ref: refs.cellArea,
3818
3887
  className: "leankylin-cell-area",
3819
3888
  onMouseDown: cellAreaMouseDown,
@@ -2018,6 +2018,19 @@ html::-webkit-scrollbar-button {
2018
2018
  .leankylin-cell-option-item{
2019
2019
  pointer-events: all;
2020
2020
  }
2021
+ .leankylin-cell-tip{
2022
+ position: absolute;
2023
+ left: 46px;
2024
+ top: 20px;
2025
+ z-index: 1;
2026
+ width: calc(100% - 46px);
2027
+ height: calc(100% - 20px);
2028
+ overflow: hidden;
2029
+ pointer-events: none;
2030
+ }
2031
+ .leankylin-cell-tip-item{
2032
+ pointer-events: all;
2033
+ }
2021
2034
  .leankylin-toolbar {
2022
2035
  display: flex;
2023
2036
  flex-direction: row;
package/dist/index.umd.js CHANGED
@@ -108447,7 +108447,11 @@
108447
108447
  var currentSheet = context.luckysheetfile[getSheetIndex(context, context.currentSheetId)];
108448
108448
  var cellOptions = currentSheet.cellOptions;
108449
108449
  return /*#__PURE__*/React__default['default'].createElement("div", {
108450
- className: "leankylin-cell-option"
108450
+ className: "leankylin-cell-option",
108451
+ style: {
108452
+ left: context.rowHeaderWidth,
108453
+ top: context.columnHeaderHeight
108454
+ }
108451
108455
  }, cellOptions === null || cellOptions === void 0 ? void 0 : cellOptions.map(function (item) {
108452
108456
  var _refs$globalCache$fre, _refs$globalCache$fre2, _refs$globalCache$fre3, _refs$globalCache$fre4, _refs$globalCache$fre5, _refs$globalCache$fre6, _refs$globalCache$fre7, _refs$globalCache$fre8, _refs$globalCache$fre9, _refs$globalCache$fre10, _item$render, _settings$renderCellO;
108453
108457
  var _colLocationByIndex = colLocationByIndex(item.c, context.visibledatacolumn),
@@ -108470,6 +108474,7 @@
108470
108474
  }
108471
108475
  return /*#__PURE__*/React__default['default'].createElement("div", {
108472
108476
  className: "leankylin-cell-option-item",
108477
+ key: "".concat(item.r, "-").concat(item.c),
108473
108478
  style: _objectSpread2({
108474
108479
  position: "absolute",
108475
108480
  left: _left,
@@ -108481,6 +108486,70 @@
108481
108486
  }));
108482
108487
  };
108483
108488
 
108489
+ var CellTipRender = function CellTipRender() {
108490
+ var _useContext = React.useContext(WorkbookContext),
108491
+ context = _useContext.context,
108492
+ refs = _useContext.refs,
108493
+ settings = _useContext.settings;
108494
+ var currentSheet = context.luckysheetfile[getSheetIndex(context, context.currentSheetId)];
108495
+ var list = React.useMemo(function () {
108496
+ var _list = [];
108497
+ var data = (currentSheet === null || currentSheet === void 0 ? void 0 : currentSheet.data) || [];
108498
+ for (var rIndex = 0; rIndex < data.length; rIndex++) {
108499
+ var rows = data[rIndex];
108500
+ for (var cIndex = 0; cIndex < rows.length; cIndex++) {
108501
+ var cell = rows[cIndex];
108502
+ if (cell === null || cell === void 0 ? void 0 : cell.tip) {
108503
+ _list.push({
108504
+ r: rIndex,
108505
+ c: cIndex,
108506
+ tip: cell.tip
108507
+ });
108508
+ }
108509
+ }
108510
+ }
108511
+ return _list;
108512
+ }, [currentSheet.data]);
108513
+ return /*#__PURE__*/React__default['default'].createElement("div", {
108514
+ className: "leankylin-cell-tip",
108515
+ style: {
108516
+ left: context.rowHeaderWidth,
108517
+ top: context.columnHeaderHeight
108518
+ }
108519
+ }, list === null || list === void 0 ? void 0 : list.map(function (item) {
108520
+ var _refs$globalCache$fre, _refs$globalCache$fre2, _refs$globalCache$fre3, _refs$globalCache$fre4, _refs$globalCache$fre5, _refs$globalCache$fre6, _refs$globalCache$fre7, _refs$globalCache$fre8, _refs$globalCache$fre9, _refs$globalCache$fre10, _settings$renderCellT;
108521
+ var _colLocationByIndex = colLocationByIndex(item.c, context.visibledatacolumn),
108522
+ _colLocationByIndex2 = _slicedToArray(_colLocationByIndex, 2),
108523
+ left = _colLocationByIndex2[0],
108524
+ right = _colLocationByIndex2[1];
108525
+ var _rowLocationByIndex = rowLocationByIndex(item.r, context.visibledatarow),
108526
+ _rowLocationByIndex2 = _slicedToArray(_rowLocationByIndex, 2),
108527
+ top = _rowLocationByIndex2[0],
108528
+ bottom = _rowLocationByIndex2[1];
108529
+ var columnOverflowFreezeStyle = fixColumnStyleOverflowInFreeze(context, item.c, item.c, (_refs$globalCache$fre = refs.globalCache.freezen) === null || _refs$globalCache$fre === void 0 ? void 0 : _refs$globalCache$fre[context.currentSheetId]);
108530
+ var rowOverflowFreezeStyle = fixRowStyleOverflowInFreeze(context, item.r, item.r, (_refs$globalCache$fre2 = refs.globalCache.freezen) === null || _refs$globalCache$fre2 === void 0 ? void 0 : _refs$globalCache$fre2[context.currentSheetId]);
108531
+ var freezenRowIndex = ((_refs$globalCache$fre3 = refs.globalCache.freezen) === null || _refs$globalCache$fre3 === void 0 ? void 0 : (_refs$globalCache$fre4 = _refs$globalCache$fre3[context.currentSheetId]) === null || _refs$globalCache$fre4 === void 0 ? void 0 : (_refs$globalCache$fre5 = _refs$globalCache$fre4.horizontal) === null || _refs$globalCache$fre5 === void 0 ? void 0 : (_refs$globalCache$fre6 = _refs$globalCache$fre5.freezenhorizontaldata) === null || _refs$globalCache$fre6 === void 0 ? void 0 : _refs$globalCache$fre6[1]) || 0;
108532
+ var freezenColIndex = ((_refs$globalCache$fre7 = refs.globalCache.freezen) === null || _refs$globalCache$fre7 === void 0 ? void 0 : (_refs$globalCache$fre8 = _refs$globalCache$fre7[context.currentSheetId]) === null || _refs$globalCache$fre8 === void 0 ? void 0 : (_refs$globalCache$fre9 = _refs$globalCache$fre8.vertical) === null || _refs$globalCache$fre9 === void 0 ? void 0 : (_refs$globalCache$fre10 = _refs$globalCache$fre9.freezenverticaldata) === null || _refs$globalCache$fre10 === void 0 ? void 0 : _refs$globalCache$fre10[1]) || 0;
108533
+ var _top = freezenRowIndex > item.r ? top : top - (context.scrollTop || 0);
108534
+ var otherStyles = {};
108535
+ var _left = freezenColIndex > item.c ? left : left - (context.scrollLeft || 0);
108536
+ if (rowOverflowFreezeStyle.display || columnOverflowFreezeStyle.display) {
108537
+ otherStyles.display = rowOverflowFreezeStyle.display || columnOverflowFreezeStyle.display;
108538
+ }
108539
+ return /*#__PURE__*/React__default['default'].createElement("div", {
108540
+ className: "leankylin-cell-tip-item",
108541
+ key: "".concat(item.r, "-").concat(item.c),
108542
+ style: _objectSpread2({
108543
+ position: "absolute",
108544
+ left: _left,
108545
+ top: _top,
108546
+ width: right - left,
108547
+ height: bottom - top
108548
+ }, otherStyles)
108549
+ }, settings === null || settings === void 0 ? void 0 : (_settings$renderCellT = settings.renderCellTip) === null || _settings$renderCellT === void 0 ? void 0 : _settings$renderCellT.call(settings, item));
108550
+ }));
108551
+ };
108552
+
108484
108553
  var SheetOverlay = function SheetOverlay() {
108485
108554
  var _refs$cellArea$curren, _refs$cellArea$curren2, _context$luckysheet_s, _context$luckysheet_s2, _context$luckysheet_s3, _context$luckysheet_s4, _context$luckysheet_s5, _context$luckysheet_s6, _context$presences$le, _context$presences, _context$linkCard, _context$rangeDialog;
108486
108555
  var _useContext = React.useContext(WorkbookContext),
@@ -108682,7 +108751,7 @@
108682
108751
  axis: "x"
108683
108752
  }), /*#__PURE__*/React__default['default'].createElement(ScrollBar, {
108684
108753
  axis: "y"
108685
- }), /*#__PURE__*/React__default['default'].createElement(CellOptions, null), /*#__PURE__*/React__default['default'].createElement("div", {
108754
+ }), /*#__PURE__*/React__default['default'].createElement(CellOptions, null), (settings === null || settings === void 0 ? void 0 : settings.renderCellTip) && /*#__PURE__*/React__default['default'].createElement(CellTipRender, null), /*#__PURE__*/React__default['default'].createElement("div", {
108686
108755
  ref: refs.cellArea,
108687
108756
  className: "leankylin-cell-area",
108688
108757
  onMouseDown: cellAreaMouseDown,