@fileverse-dev/fortune-react 1.0.2-mod-92 → 1.0.2-mod-93

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 CHANGED
@@ -3400,7 +3400,10 @@ var ConditionRules = function ConditionRules(_ref) {
3400
3400
  }, conditionformat.applyRange), /*#__PURE__*/React.createElement(TextField, {
3401
3401
  rightIcon: /*#__PURE__*/React.createElement(LucideIcon, {
3402
3402
  name: "Grid2x2",
3403
- size: "sm"
3403
+ size: "sm",
3404
+ onClick: function onClick() {
3405
+ dataSelectRange("conditionRules".concat(type));
3406
+ }
3404
3407
  }),
3405
3408
  "aria-hidden": "true",
3406
3409
  readOnly: true,
@@ -5487,14 +5490,14 @@ var FormatSearch = function FormatSearch(_ref) {
5487
5490
  var index = getSheetIndex(ctx, ctx.currentSheetId);
5488
5491
  if (_.isNil(index)) return;
5489
5492
  var selectedFormat = toolbarFormat[selectedFormatIndex].value;
5493
+ var formatString = "".concat(selectedFormat, "#,##0.").concat("0".repeat(decimalPlace));
5490
5494
  _.forEach(ctx.luckysheet_select_save, function (selection) {
5491
5495
  for (var r = selection.row[0]; r <= selection.row[1]; r += 1) {
5492
5496
  for (var c = selection.column[0]; c <= selection.column[1]; c += 1) {
5493
5497
  var _ctx$luckysheetfile$i, _ctx$luckysheetfile$i2, _ctx$luckysheetfile$i3, _ctx$luckysheetfile$i4;
5494
5498
  if (((_ctx$luckysheetfile$i = ctx.luckysheetfile[index].data) === null || _ctx$luckysheetfile$i === void 0 ? void 0 : _ctx$luckysheetfile$i[r][c]) && ((_ctx$luckysheetfile$i2 = ctx.luckysheetfile[index].data) === null || _ctx$luckysheetfile$i2 === void 0 ? void 0 : (_ctx$luckysheetfile$i3 = _ctx$luckysheetfile$i2[r][c]) === null || _ctx$luckysheetfile$i3 === void 0 ? void 0 : (_ctx$luckysheetfile$i4 = _ctx$luckysheetfile$i3.ct) === null || _ctx$luckysheetfile$i4 === void 0 ? void 0 : _ctx$luckysheetfile$i4.t) === "n") {
5495
- var zero = 0;
5496
- ctx.luckysheetfile[index].data[r][c].ct.fa = "".concat(selectedFormat).concat(zero.toFixed(decimalPlace));
5497
- ctx.luckysheetfile[index].data[r][c].m = update("".concat(selectedFormat).concat(zero.toFixed(decimalPlace)), ctx.luckysheetfile[index].data[r][c].v);
5499
+ ctx.luckysheetfile[index].data[r][c].ct.fa = formatString;
5500
+ ctx.luckysheetfile[index].data[r][c].m = update(formatString, ctx.luckysheetfile[index].data[r][c].v);
5498
5501
  }
5499
5502
  }
5500
5503
  }
package/dist/index.js CHANGED
@@ -3410,7 +3410,10 @@ var ConditionRules = function ConditionRules(_ref) {
3410
3410
  }, conditionformat.applyRange), /*#__PURE__*/React__default['default'].createElement(ui.TextField, {
3411
3411
  rightIcon: /*#__PURE__*/React__default['default'].createElement(ui.LucideIcon, {
3412
3412
  name: "Grid2x2",
3413
- size: "sm"
3413
+ size: "sm",
3414
+ onClick: function onClick() {
3415
+ dataSelectRange("conditionRules".concat(type));
3416
+ }
3414
3417
  }),
3415
3418
  "aria-hidden": "true",
3416
3419
  readOnly: true,
@@ -5497,14 +5500,14 @@ var FormatSearch = function FormatSearch(_ref) {
5497
5500
  var index = fortuneCore.getSheetIndex(ctx, ctx.currentSheetId);
5498
5501
  if (___default['default'].isNil(index)) return;
5499
5502
  var selectedFormat = toolbarFormat[selectedFormatIndex].value;
5503
+ var formatString = "".concat(selectedFormat, "#,##0.").concat("0".repeat(decimalPlace));
5500
5504
  ___default['default'].forEach(ctx.luckysheet_select_save, function (selection) {
5501
5505
  for (var r = selection.row[0]; r <= selection.row[1]; r += 1) {
5502
5506
  for (var c = selection.column[0]; c <= selection.column[1]; c += 1) {
5503
5507
  var _ctx$luckysheetfile$i, _ctx$luckysheetfile$i2, _ctx$luckysheetfile$i3, _ctx$luckysheetfile$i4;
5504
5508
  if (((_ctx$luckysheetfile$i = ctx.luckysheetfile[index].data) === null || _ctx$luckysheetfile$i === void 0 ? void 0 : _ctx$luckysheetfile$i[r][c]) && ((_ctx$luckysheetfile$i2 = ctx.luckysheetfile[index].data) === null || _ctx$luckysheetfile$i2 === void 0 ? void 0 : (_ctx$luckysheetfile$i3 = _ctx$luckysheetfile$i2[r][c]) === null || _ctx$luckysheetfile$i3 === void 0 ? void 0 : (_ctx$luckysheetfile$i4 = _ctx$luckysheetfile$i3.ct) === null || _ctx$luckysheetfile$i4 === void 0 ? void 0 : _ctx$luckysheetfile$i4.t) === "n") {
5505
- var zero = 0;
5506
- ctx.luckysheetfile[index].data[r][c].ct.fa = "".concat(selectedFormat).concat(zero.toFixed(decimalPlace));
5507
- ctx.luckysheetfile[index].data[r][c].m = fortuneCore.update("".concat(selectedFormat).concat(zero.toFixed(decimalPlace)), ctx.luckysheetfile[index].data[r][c].v);
5509
+ ctx.luckysheetfile[index].data[r][c].ct.fa = formatString;
5510
+ ctx.luckysheetfile[index].data[r][c].m = fortuneCore.update(formatString, ctx.luckysheetfile[index].data[r][c].v);
5508
5511
  }
5509
5512
  }
5510
5513
  }