@fileverse-dev/fortune-react 1.2.28 → 1.2.29

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.
@@ -123,7 +123,7 @@ var __spreadArray = this && this.__spreadArray || function (to, from, pack) {
123
123
  return to.concat(ar || Array.prototype.slice.call(from));
124
124
  };
125
125
  import React, { useContext, useCallback, useRef, useEffect, useState } from "react";
126
- import { toolbarItemClickHandler, handleTextBackground, handleTextColor, handleTextSize, normalizedCellAttr, getFlowdata, newComment, editComment, deleteComment, showHideComment, showHideAllComments, autoSelectionFormula, handleSum, locale, handleMerge, handleBorder, toolbarItemSelectedFunc, handleFreeze, insertImage, showImgChooser, updateFormat, handleSort, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, createFilter, clearFilter, applyLocation, insertDuneChart, api } from "@fileverse-dev/fortune-core";
126
+ import { toolbarItemClickHandler, handleTextBackground, handleTextColor, handleTextSize, normalizedCellAttr, getFlowdata, newComment, editComment, deleteComment, showHideComment, showHideAllComments, autoSelectionFormula, handleSum, locale, handleMerge, handleBorder, toolbarItemSelectedFunc, handleFreeze, insertImage, showImgChooser, updateFormat, handleSort, handleHorizontalAlign, handleVerticalAlign, handleScreenShot, createFilter, clearFilter, applyLocation, insertDuneChart, api, getSheetIndex } from "@fileverse-dev/fortune-core";
127
127
  import _ from "lodash";
128
128
  import { IconButton, LucideIcon, Tooltip, Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem } from "@fileverse/ui";
129
129
  import DataVerificationPortal from "./dataVerificationPortal";
@@ -1508,9 +1508,18 @@ var Toolbar = function Toolbar(_a) {
1508
1508
  variant: "ghost",
1509
1509
  onClick: function onClick() {
1510
1510
  setContext(function (ctx) {
1511
+ var _a;
1511
1512
  var d = getFlowdata(ctx);
1512
1513
  if (d == null) return;
1513
1514
  updateFormat(ctx, refs.cellInput.current, d, "tb", value, refs.canvas.current.getContext("2d"));
1515
+ var sheetIndex = getSheetIndex(ctx, ctx.currentSheetId) || 0;
1516
+ var config = ctx.luckysheetfile[sheetIndex].config;
1517
+ var currentRowHeight = ((_a = config === null || config === void 0 ? void 0 : config.rowlen) === null || _a === void 0 ? void 0 : _a[0]) || ctx.luckysheetfile[sheetIndex].defaultColWidth || 22;
1518
+ api.setRowHeight(ctx, {
1519
+ 1: currentRowHeight + 0.2
1520
+ }, {
1521
+ id: ctx.currentSheetId
1522
+ });
1514
1523
  });
1515
1524
  setOpen(false);
1516
1525
  },
@@ -1517,9 +1517,18 @@ var Toolbar = function Toolbar(_a) {
1517
1517
  variant: "ghost",
1518
1518
  onClick: function onClick() {
1519
1519
  setContext(function (ctx) {
1520
+ var _a;
1520
1521
  var d = (0, _fortuneCore.getFlowdata)(ctx);
1521
1522
  if (d == null) return;
1522
1523
  (0, _fortuneCore.updateFormat)(ctx, refs.cellInput.current, d, "tb", value, refs.canvas.current.getContext("2d"));
1524
+ var sheetIndex = (0, _fortuneCore.getSheetIndex)(ctx, ctx.currentSheetId) || 0;
1525
+ var config = ctx.luckysheetfile[sheetIndex].config;
1526
+ var currentRowHeight = ((_a = config === null || config === void 0 ? void 0 : config.rowlen) === null || _a === void 0 ? void 0 : _a[0]) || ctx.luckysheetfile[sheetIndex].defaultColWidth || 22;
1527
+ _fortuneCore.api.setRowHeight(ctx, {
1528
+ 1: currentRowHeight + 0.2
1529
+ }, {
1530
+ id: ctx.currentSheetId
1531
+ });
1523
1532
  });
1524
1533
  setOpen(false);
1525
1534
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-react",
3
- "version": "1.2.28",
3
+ "version": "1.2.29",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "module": "es/index.js",
@@ -16,7 +16,7 @@
16
16
  "tsc": "tsc"
17
17
  },
18
18
  "dependencies": {
19
- "@fileverse-dev/fortune-core": "1.2.28",
19
+ "@fileverse-dev/fortune-core": "1.2.29",
20
20
  "@fileverse/ui": "^4.1.7-patch-40",
21
21
  "@tippyjs/react": "^4.2.6",
22
22
  "@types/regenerator-runtime": "^0.13.6",