@fileverse-dev/fortune-core 1.1.89 → 1.1.90-hot.1

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.
@@ -104,6 +104,9 @@ export function getCellValue(r, c, data, attr) {
104
104
  }
105
105
  export function setCellValue(ctx, r, c, d, v) {
106
106
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
107
+ if (ctx.allowEdit === false || ctx.isFlvReadOnly) {
108
+ return;
109
+ }
107
110
  if (_.isNil(d)) {
108
111
  d = getFlowdata(ctx);
109
112
  }
@@ -309,7 +312,7 @@ export function setCellValue(ctx, r, c, d, v) {
309
312
  var strValue = String(vupdate);
310
313
  var format = getNumberFormat(strValue, commaPresent);
311
314
  cell.m = v.m ? v.m : update(format, cell.v);
312
- cell.ht = (v === null || v === void 0 ? void 0 : v.ct) ? cell.ht : 2;
315
+ cell.ht = (v === null || v === void 0 ? void 0 : v.ht) ? cell.ht : 2;
313
316
  cell.ct = {
314
317
  fa: format,
315
318
  t: "n"
@@ -528,6 +531,9 @@ export function cancelNormalSelected(ctx) {
528
531
  }
529
532
  export function updateCell(ctx, r, c, $input, value, canvas) {
530
533
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
534
+ if (ctx.allowEdit === false || ctx.isFlvReadOnly) {
535
+ return;
536
+ }
531
537
  var inputText = $input === null || $input === void 0 ? void 0 : $input.innerText;
532
538
  var inputHtml = $input === null || $input === void 0 ? void 0 : $input.innerHTML;
533
539
  var flowdata = getFlowdata(ctx);
@@ -137,6 +137,9 @@ function getCellValue(r, c, data, attr) {
137
137
  }
138
138
  function setCellValue(ctx, r, c, d, v) {
139
139
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
140
+ if (ctx.allowEdit === false || ctx.isFlvReadOnly) {
141
+ return;
142
+ }
140
143
  if (_lodash.default.isNil(d)) {
141
144
  d = (0, _context.getFlowdata)(ctx);
142
145
  }
@@ -342,7 +345,7 @@ function setCellValue(ctx, r, c, d, v) {
342
345
  var strValue = String(vupdate);
343
346
  var format = (0, _utils.getNumberFormat)(strValue, commaPresent);
344
347
  cell.m = v.m ? v.m : (0, _format.update)(format, cell.v);
345
- cell.ht = (v === null || v === void 0 ? void 0 : v.ct) ? cell.ht : 2;
348
+ cell.ht = (v === null || v === void 0 ? void 0 : v.ht) ? cell.ht : 2;
346
349
  cell.ct = {
347
350
  fa: format,
348
351
  t: "n"
@@ -561,6 +564,9 @@ function cancelNormalSelected(ctx) {
561
564
  }
562
565
  function updateCell(ctx, r, c, $input, value, canvas) {
563
566
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
567
+ if (ctx.allowEdit === false || ctx.isFlvReadOnly) {
568
+ return;
569
+ }
564
570
  var inputText = $input === null || $input === void 0 ? void 0 : $input.innerText;
565
571
  var inputHtml = $input === null || $input === void 0 ? void 0 : $input.innerHTML;
566
572
  var flowdata = (0, _context.getFlowdata)(ctx);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-core",
3
- "version": "1.1.89",
3
+ "version": "1.1.90-hot.1",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "typings": "lib/index.d.ts",