@fileverse-dev/fortune-core 1.3.11-mixed → 1.3.12-copyPaste-4

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.
@@ -9,11 +9,20 @@ var __assign = this && this.__assign || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
+ var __rest = this && this.__rest || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
15
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
16
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
17
+ }
18
+ return t;
19
+ };
12
20
  import _ from "lodash";
13
21
  import { locale } from "./locale";
14
22
  import { getQKBorder, saveHyperlink } from "./modules";
15
23
  import { getSheetIndex } from "./utils";
16
24
  import { setRowHeight, setColumnWidth } from "./api";
25
+ import { adjustFormulaForPaste } from "./events/paste";
17
26
  export var DEFAULT_FONT_SIZE = 12;
18
27
  var parseStylesheetPairs = function parseStylesheetPairs(styleInner) {
19
28
  var patternReg = /{([^}]*)}/g;
@@ -127,6 +136,28 @@ function brToNewline(str) {
127
136
  }
128
137
  var buildCellFromTd = function buildCellFromTd(td, classStyles, ctx) {
129
138
  var _a, _b, _c, _d;
139
+ var fortuneCellAttr = td.getAttribute("data-fortune-cell");
140
+ if (fortuneCellAttr) {
141
+ try {
142
+ var _e = JSON.parse(decodeURIComponent(fortuneCellAttr)),
143
+ _srcRow = _e._srcRow,
144
+ _srcCol = _e._srcCol,
145
+ parsed = __rest(_e, ["_srcRow", "_srcCol"]);
146
+ var cell_1 = parsed;
147
+ delete cell_1.mc;
148
+ delete cell_1.hl;
149
+ var rowspan_1 = parseInt(td.getAttribute("rowspan") || "1", 10);
150
+ var colspan_1 = parseInt(td.getAttribute("colspan") || "1", 10);
151
+ return {
152
+ cell: cell_1,
153
+ rowspan: Number.isNaN(rowspan_1) ? 1 : rowspan_1,
154
+ colspan: Number.isNaN(colspan_1) ? 1 : colspan_1,
155
+ hyperlink: detectHyperlink(td),
156
+ srcRow: _srcRow,
157
+ srcCol: _srcCol
158
+ };
159
+ } catch (_f) {}
160
+ }
130
161
  var cell = {};
131
162
  var rawText = (td.innerText || td.innerHTML || "").trim();
132
163
  var isLineBreak = rawText.includes("<br />");
@@ -277,10 +308,17 @@ export function handlePastedTable(ctx, html, pasteHandler) {
277
308
  cell = _a.cell,
278
309
  rowspan = _a.rowspan,
279
310
  colspan = _a.colspan,
280
- hyperlink = _a.hyperlink;
311
+ hyperlink = _a.hyperlink,
312
+ srcRow = _a.srcRow,
313
+ srcCol = _a.srcCol;
281
314
  var anchorCol = ctx.luckysheet_select_save[0].column[0];
282
315
  var absoluteRow = anchorRow + localRowIndex;
283
316
  var absoluteCol = anchorCol + localColIndex;
317
+ if (cell.f && srcRow != null && srcCol != null) {
318
+ try {
319
+ cell.f = adjustFormulaForPaste(cell.f, srcCol, srcRow, absoluteCol, absoluteRow);
320
+ } catch (_b) {}
321
+ }
284
322
  pastedMatrix[localRowIndex][localColIndex] = cell;
285
323
  if (hyperlink) {
286
324
  saveHyperlink(ctx, absoluteRow, absoluteCol, hyperlink.href, "webpage", hyperlink.display);
package/es/types.d.ts CHANGED
@@ -328,8 +328,6 @@ export type GlobalCache = {
328
328
  verticalScrollLock?: boolean;
329
329
  horizontalScrollLock?: boolean;
330
330
  overwriteCell?: boolean;
331
- overwriteCellFirstChar?: string;
332
- enteredEditByTyping?: boolean;
333
331
  ignoreWriteCell?: boolean;
334
332
  doNotFocus?: boolean;
335
333
  doNotUpdateCell?: boolean;
@@ -179,72 +179,63 @@ function moveToEdge(sheetData, key, curr, rowDelta, colDelta, startR, endR, star
179
179
  return colDelta === 0 ? r : c;
180
180
  }
181
181
  function handleControlPlusArrowKey(ctx, e, shiftPressed) {
182
- var _a, _b, _c, _d;
182
+ if (ctx.luckysheetCellUpdate.length > 0) return;
183
183
  var idx = (0, _utils.getSheetIndex)(ctx, ctx.currentSheetId);
184
184
  if (_lodash.default.isNil(idx)) return;
185
185
  var file = ctx.luckysheetfile[idx];
186
+ if (!file || !file.row || !file.column) return;
186
187
  var maxRow = file.row;
187
188
  var maxCol = file.column;
188
- if (_lodash.default.isNil(maxRow) || _lodash.default.isNil(maxCol)) return;
189
- var last = ctx.luckysheet_select_save && ctx.luckysheet_select_save.length > 0 ? ctx.luckysheet_select_save[ctx.luckysheet_select_save.length - 1] : undefined;
189
+ var last;
190
+ if (ctx.luckysheet_select_save && ctx.luckysheet_select_save.length > 0) last = ctx.luckysheet_select_save[ctx.luckysheet_select_save.length - 1];
190
191
  if (!last) return;
191
192
  var currR = last.row_focus;
192
193
  var currC = last.column_focus;
193
194
  if (_lodash.default.isNil(currR) || _lodash.default.isNil(currC)) return;
194
- var startR = (_a = last.row) === null || _a === void 0 ? void 0 : _a[0];
195
- var endR = (_b = last.row) === null || _b === void 0 ? void 0 : _b[1];
196
- var startC = (_c = last.column) === null || _c === void 0 ? void 0 : _c[0];
197
- var endC = (_d = last.column) === null || _d === void 0 ? void 0 : _d[1];
198
- if (_lodash.default.isNil(startR) || _lodash.default.isNil(endR) || _lodash.default.isNil(startC) || _lodash.default.isNil(endC)) {
199
- return;
200
- }
195
+ var startR = last.row[0];
196
+ var endR = last.row[1];
197
+ var startC = last.column[0];
198
+ var endC = last.column[1];
201
199
  var horizontalOffset = currC - endC !== 0 ? currC - endC : currC - startC;
202
200
  var verticalOffset = currR - endR !== 0 ? currR - endR : currR - startR;
203
201
  var sheetData = file.data;
204
202
  if (!sheetData) return;
203
+ var selectedLimit;
205
204
  switch (e.key) {
206
205
  case "ArrowUp":
207
- {
208
- var selectedLimit = moveToEdge(sheetData, e.key, currC, -1, 0, startR, endR, startC, endC, maxRow, maxCol);
209
- if (shiftPressed) {
210
- (0, _selection.moveHighlightRange)(ctx, "down", verticalOffset, "rangeOfSelect");
211
- (0, _selection.moveHighlightRange)(ctx, "down", selectedLimit - currR, "rangeOfSelect");
212
- } else {
213
- (0, _selection.moveHighlightCell)(ctx, "down", selectedLimit - currR, "rangeOfSelect");
214
- }
206
+ selectedLimit = moveToEdge(sheetData, e.key, currC, -1, 0, startR, endR, startC, endC, maxRow, maxCol);
207
+ if (shiftPressed) {
208
+ (0, _selection.moveHighlightRange)(ctx, "down", verticalOffset, "rangeOfSelect");
209
+ (0, _selection.moveHighlightRange)(ctx, "down", selectedLimit - currR, "rangeOfSelect");
210
+ } else {
211
+ (0, _selection.moveHighlightCell)(ctx, "down", selectedLimit - currR, "rangeOfSelect");
215
212
  }
216
213
  break;
217
214
  case "ArrowDown":
218
- {
219
- var selectedLimit = moveToEdge(sheetData, e.key, currC, 1, 0, startR, endR, startC, endC, maxRow, maxCol);
220
- if (shiftPressed) {
221
- (0, _selection.moveHighlightRange)(ctx, "down", verticalOffset, "rangeOfSelect");
222
- (0, _selection.moveHighlightRange)(ctx, "down", selectedLimit - currR, "rangeOfSelect");
223
- } else {
224
- (0, _selection.moveHighlightCell)(ctx, "down", selectedLimit - currR, "rangeOfSelect");
225
- }
215
+ selectedLimit = moveToEdge(sheetData, e.key, currC, 1, 0, startR, endR, startC, endC, maxRow, maxCol);
216
+ if (shiftPressed) {
217
+ (0, _selection.moveHighlightRange)(ctx, "down", verticalOffset, "rangeOfSelect");
218
+ (0, _selection.moveHighlightRange)(ctx, "down", selectedLimit - currR, "rangeOfSelect");
219
+ } else {
220
+ (0, _selection.moveHighlightCell)(ctx, "down", selectedLimit - currR, "rangeOfSelect");
226
221
  }
227
222
  break;
228
223
  case "ArrowLeft":
229
- {
230
- var selectedLimit = moveToEdge(sheetData, e.key, currR, 0, -1, startR, endR, startC, endC, maxRow, maxCol);
231
- if (shiftPressed) {
232
- (0, _selection.moveHighlightRange)(ctx, "right", horizontalOffset, "rangeOfSelect");
233
- (0, _selection.moveHighlightRange)(ctx, "right", selectedLimit - currC, "rangeOfSelect");
234
- } else {
235
- (0, _selection.moveHighlightCell)(ctx, "right", selectedLimit - currC, "rangeOfSelect");
236
- }
224
+ selectedLimit = moveToEdge(sheetData, e.key, currR, 0, -1, startR, endR, startC, endC, maxRow, maxCol);
225
+ if (shiftPressed) {
226
+ (0, _selection.moveHighlightRange)(ctx, "right", horizontalOffset, "rangeOfSelect");
227
+ (0, _selection.moveHighlightRange)(ctx, "right", selectedLimit - currC, "rangeOfSelect");
228
+ } else {
229
+ (0, _selection.moveHighlightCell)(ctx, "right", selectedLimit - currC, "rangeOfSelect");
237
230
  }
238
231
  break;
239
232
  case "ArrowRight":
240
- {
241
- var selectedLimit = moveToEdge(sheetData, e.key, currR, 0, 1, startR, endR, startC, endC, maxRow, maxCol);
242
- if (shiftPressed) {
243
- (0, _selection.moveHighlightRange)(ctx, "right", horizontalOffset, "rangeOfSelect");
244
- (0, _selection.moveHighlightRange)(ctx, "right", selectedLimit - currC, "rangeOfSelect");
245
- } else {
246
- (0, _selection.moveHighlightCell)(ctx, "right", selectedLimit - currC, "rangeOfSelect");
247
- }
233
+ selectedLimit = moveToEdge(sheetData, e.key, currR, 0, 1, startR, endR, startC, endC, maxRow, maxCol);
234
+ if (shiftPressed) {
235
+ (0, _selection.moveHighlightRange)(ctx, "right", horizontalOffset, "rangeOfSelect");
236
+ (0, _selection.moveHighlightRange)(ctx, "right", selectedLimit - currC, "rangeOfSelect");
237
+ } else {
238
+ (0, _selection.moveHighlightCell)(ctx, "right", selectedLimit - currC, "rangeOfSelect");
248
239
  }
249
240
  break;
250
241
  default:
@@ -397,10 +388,10 @@ function handleArrowKey(ctx, e) {
397
388
  }
398
389
  }
399
390
  function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, handleRedo, canvas) {
400
- var _a, _b, _c, _d;
391
+ var _a, _b, _c;
401
392
  return __awaiter(this, void 0, void 0, function () {
402
- var handledFlvShortcut, kcode, kstr, allowEdit, isFxInput, ignoredKeys, restCod, last, row_index, col_index, isEditing, inputText, isFormulaEdit, enteredByTyping, last, row_index, col_index;
403
- return __generator(this, function (_e) {
393
+ var handledFlvShortcut, kcode, kstr, allowEdit, isFxInput, ignoredKeys, restCod, last, row_index, col_index, last, row_index, col_index;
394
+ return __generator(this, function (_d) {
404
395
  if (e.shiftKey && e.code === "Space") {
405
396
  e.stopImmediatePropagation();
406
397
  e.stopPropagation();
@@ -508,18 +499,7 @@ function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, hand
508
499
  (0, _refresh.jfrefreshgrid)(ctx, null, undefined);
509
500
  e.preventDefault();
510
501
  } else if (kstr === "ArrowUp" || kstr === "ArrowDown" || kstr === "ArrowLeft" || kstr === "ArrowRight") {
511
- isEditing = ctx.luckysheetCellUpdate.length > 0;
512
- inputText = (_d = cellInput === null || cellInput === void 0 ? void 0 : cellInput.innerText) !== null && _d !== void 0 ? _d : "";
513
- isFormulaEdit = isEditing && inputText.trim().startsWith("=");
514
- enteredByTyping = cache.enteredEditByTyping === true;
515
- if (isEditing && !isFormulaEdit && enteredByTyping) {
516
- (0, _cell.updateCell)(ctx, ctx.luckysheetCellUpdate[0], ctx.luckysheetCellUpdate[1], cellInput, undefined, canvas);
517
- cache.enteredEditByTyping = false;
518
- handleArrowKey(ctx, e);
519
- e.preventDefault();
520
- } else {
521
- handleArrowKey(ctx, e);
522
- }
502
+ handleArrowKey(ctx, e);
523
503
  } else if (!(kcode >= 112 && kcode <= 123 || kcode <= 46 || kcode === 144 || kcode === 108 || e.ctrlKey || e.altKey || e.shiftKey && (kcode === 37 || kcode === 38 || kcode === 39 || kcode === 40)) || kcode === 8 || kcode === 32 || kcode === 46 || kcode === 0 || e.ctrlKey && kcode === 86) {
524
504
  if (!allowEdit) return [2];
525
505
  if (String.fromCharCode(kcode) != null && !_lodash.default.isEmpty(ctx.luckysheet_select_save) && kstr !== "CapsLock" && kstr !== "Win" && kcode !== 18) {
@@ -528,10 +508,7 @@ function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, hand
528
508
  col_index = last.column_focus;
529
509
  ctx.luckysheetCellUpdate = [row_index, col_index];
530
510
  cache.overwriteCell = true;
531
- cache.overwriteCellFirstChar = e.key;
532
- cache.enteredEditByTyping = true;
533
511
  (0, _formula.handleFormulaInput)(ctx, fxInput, cellInput, kcode);
534
- e.preventDefault();
535
512
  }
536
513
  }
537
514
  }
@@ -508,7 +508,6 @@ function handleCellAreaDoubleClick(ctx, globalCache, settings, e, container) {
508
508
  row_index = row_focus;
509
509
  col_index = column_focus;
510
510
  }
511
- globalCache.enteredEditByTyping = false;
512
511
  (0, _cell.luckysheetUpdateCell)(ctx, row_index, col_index);
513
512
  }
514
513
  function handleContextMenu(ctx, settings, e, workbookContainer, container, area) {
@@ -530,8 +530,6 @@ declare const _default: {
530
530
  conditionformat_equal_title: string;
531
531
  conditionformat_textContains: string;
532
532
  conditionformat_textContains_title: string;
533
- conditionformat_empty: string;
534
- conditionformat_empty_title: string;
535
533
  conditionformat_occurrenceDate: string;
536
534
  conditionformat_occurrenceDate_title: string;
537
535
  conditionformat_duplicateValue: string;
@@ -635,7 +633,6 @@ declare const _default: {
635
633
  between2: string;
636
634
  contain: string;
637
635
  textContains: string;
638
- empty: string;
639
636
  duplicateValue: string;
640
637
  uniqueValue: string;
641
638
  top: string;
package/lib/locale/en.js CHANGED
@@ -9634,8 +9634,6 @@ var _default = exports.default = {
9634
9634
  conditionformat_equal_title: "Format cells equal to",
9635
9635
  conditionformat_textContains: "Conditional format - Text Contains",
9636
9636
  conditionformat_textContains_title: "Format cells containing the following text",
9637
- conditionformat_empty: "Conditional format - Empty",
9638
- conditionformat_empty_title: "Format cells that are empty",
9639
9637
  conditionformat_occurrenceDate: "Conditional format - Occurrence Date",
9640
9638
  conditionformat_occurrenceDate_title: "Format cells containing the following dates",
9641
9639
  conditionformat_duplicateValue: "Conditional format - Duplicate Value",
@@ -9739,7 +9737,6 @@ var _default = exports.default = {
9739
9737
  between2: "",
9740
9738
  contain: "Contain",
9741
9739
  textContains: "Text contains",
9742
- empty: "Empty",
9743
9740
  duplicateValue: "Duplicate value",
9744
9741
  uniqueValue: "Unique value",
9745
9742
  top: "Top",
@@ -688,8 +688,6 @@ declare const _default: {
688
688
  conditionformat_equal_title: string;
689
689
  conditionformat_textContains: string;
690
690
  conditionformat_textContains_title: string;
691
- conditionformat_empty: string;
692
- conditionformat_empty_title: string;
693
691
  conditionformat_occurrenceDate: string;
694
692
  conditionformat_occurrenceDate_title: string;
695
693
  conditionformat_duplicateValue: string;
@@ -791,7 +789,6 @@ declare const _default: {
791
789
  between2: string;
792
790
  contain: string;
793
791
  textContains: string;
794
- empty: string;
795
792
  duplicateValue: string;
796
793
  uniqueValue: string;
797
794
  top: string;
package/lib/locale/es.js CHANGED
@@ -9571,8 +9571,6 @@ var _default = exports.default = {
9571
9571
  conditionformat_equal_title: "Dar formato a celdas iguales a",
9572
9572
  conditionformat_textContains: "Conditionformat-TextContains",
9573
9573
  conditionformat_textContains_title: "Dar formato a las celdas que contienen el siguiente texto",
9574
- conditionformat_empty: "Conditional format - Empty",
9575
- conditionformat_empty_title: "Dar formato a las celdas vacías",
9576
9574
  conditionformat_occurrenceDate: "Conditionformat-OccurrenceDate",
9577
9575
  conditionformat_occurrenceDate_title: "Dar formato a celdas que contienen las siguientes fechas",
9578
9576
  conditionformat_duplicateValue: "Conditionformat-DuplicateValue",
@@ -9674,7 +9672,6 @@ var _default = exports.default = {
9674
9672
  between2: "",
9675
9673
  contain: "Contiene",
9676
9674
  textContains: "Texto contiene",
9677
- empty: "Vacío",
9678
9675
  duplicateValue: "Valor duplicado",
9679
9676
  uniqueValue: "Valor Unico",
9680
9677
  top: "Mejor",
@@ -563,8 +563,6 @@ declare const _default: {
563
563
  conditionformat_equal_title: string;
564
564
  conditionformat_textContains: string;
565
565
  conditionformat_textContains_title: string;
566
- conditionformat_empty: string;
567
- conditionformat_empty_title: string;
568
566
  conditionformat_occurrenceDate: string;
569
567
  conditionformat_occurrenceDate_title: string;
570
568
  conditionformat_duplicateValue: string;
@@ -666,7 +664,6 @@ declare const _default: {
666
664
  between2: string;
667
665
  contain: string;
668
666
  textContains: string;
669
- empty: string;
670
667
  duplicateValue: string;
671
668
  uniqueValue: string;
672
669
  top: string;
package/lib/locale/hi.js CHANGED
@@ -10084,8 +10084,6 @@ var _default = exports.default = {
10084
10084
  conditionformat_equal_title: "के बराबर कोशिकाओं को प्रारूपित करें",
10085
10085
  conditionformat_textContains: "Conditionformat-TextContains",
10086
10086
  conditionformat_textContains_title: "निम्नलिखित पाठ वाली कोशिकाओं को प्रारूपित करें",
10087
- conditionformat_empty: "Conditional format - Empty",
10088
- conditionformat_empty_title: "खाली कोशिकाओं को प्रारूपित करें",
10089
10087
  conditionformat_occurrenceDate: "Conditionformat-OccurrenceDate",
10090
10088
  conditionformat_occurrenceDate_title: "निम्नलिखित तिथियों वाली कोशिकाओं को प्रारूपित करें",
10091
10089
  conditionformat_duplicateValue: "Conditionformat-DuplicateValue",
@@ -10187,7 +10185,6 @@ var _default = exports.default = {
10187
10185
  between2: "",
10188
10186
  contain: "शामिल",
10189
10187
  textContains: "पाठ शामिल है",
10190
- empty: "खाली",
10191
10188
  duplicateValue: "डुप्लिकेट मान",
10192
10189
  uniqueValue: "अद्वितीय मान",
10193
10190
  top: "शीर्ष",
@@ -583,8 +583,6 @@ declare function locale(ctx: Context): {
583
583
  conditionformat_equal_title: string;
584
584
  conditionformat_textContains: string;
585
585
  conditionformat_textContains_title: string;
586
- conditionformat_empty: string;
587
- conditionformat_empty_title: string;
588
586
  conditionformat_occurrenceDate: string;
589
587
  conditionformat_occurrenceDate_title: string;
590
588
  conditionformat_duplicateValue: string;
@@ -687,7 +685,6 @@ declare function locale(ctx: Context): {
687
685
  between2: string;
688
686
  contain: string;
689
687
  textContains: string;
690
- empty: string;
691
688
  duplicateValue: string;
692
689
  uniqueValue: string;
693
690
  top: string;
@@ -582,8 +582,6 @@ declare const _default: {
582
582
  conditionformat_equal_title: string;
583
583
  conditionformat_textContains: string;
584
584
  conditionformat_textContains_title: string;
585
- conditionformat_empty: string;
586
- conditionformat_empty_title: string;
587
585
  conditionformat_occurrenceDate: string;
588
586
  conditionformat_occurrenceDate_title: string;
589
587
  conditionformat_duplicateValue: string;
@@ -686,7 +684,6 @@ declare const _default: {
686
684
  between2: string;
687
685
  contain: string;
688
686
  textContains: string;
689
- empty: string;
690
687
  duplicateValue: string;
691
688
  uniqueValue: string;
692
689
  top: string;
package/lib/locale/zh.js CHANGED
@@ -10103,8 +10103,6 @@ var _default = exports.default = {
10103
10103
  conditionformat_equal_title: "为等于以下值的单元格设置格式",
10104
10104
  conditionformat_textContains: "条件格式——文本包含",
10105
10105
  conditionformat_textContains_title: "为包含以下文本的单元格设置格式",
10106
- conditionformat_empty: "条件格式——空值",
10107
- conditionformat_empty_title: "为空单元格设置格式",
10108
10106
  conditionformat_occurrenceDate: "条件格式——发生日期",
10109
10107
  conditionformat_occurrenceDate_title: "为包含以下日期的单元格设置格式",
10110
10108
  conditionformat_duplicateValue: "条件格式——重复值",
@@ -10207,7 +10205,6 @@ var _default = exports.default = {
10207
10205
  between2: "之间",
10208
10206
  contain: "包含",
10209
10207
  textContains: "文本包含",
10210
- empty: "空值",
10211
10208
  duplicateValue: "重复值",
10212
10209
  uniqueValue: "唯一值",
10213
10210
  top: "前",
@@ -726,8 +726,6 @@ declare const _default: {
726
726
  conditionformat_equal_title: string;
727
727
  conditionformat_textContains: string;
728
728
  conditionformat_textContains_title: string;
729
- conditionformat_empty: string;
730
- conditionformat_empty_title: string;
731
729
  conditionformat_occurrenceDate: string;
732
730
  conditionformat_occurrenceDate_title: string;
733
731
  conditionformat_duplicateValue: string;
@@ -830,7 +828,6 @@ declare const _default: {
830
828
  between2: string;
831
829
  contain: string;
832
830
  textContains: string;
833
- empty: string;
834
831
  duplicateValue: string;
835
832
  uniqueValue: string;
836
833
  top: string;
@@ -9618,8 +9618,6 @@ var _default = exports.default = {
9618
9618
  conditionformat_equal_title: "為等於以下值的儲存格設定格式",
9619
9619
  conditionformat_textContains: "條件格式——文字包含",
9620
9620
  conditionformat_textContains_title: "為包含以下文字的儲存格設定格式",
9621
- conditionformat_empty: "條件格式——空值",
9622
- conditionformat_empty_title: "為空儲存格設定格式",
9623
9621
  conditionformat_occurrenceDate: "條件格式——發生日期",
9624
9622
  conditionformat_occurrenceDate_title: "為包含以下日期的儲存格設定格式",
9625
9623
  conditionformat_duplicateValue: "條件格式——重複值",
@@ -9722,7 +9720,6 @@ var _default = exports.default = {
9722
9720
  between2: "之間",
9723
9721
  contain: "包含",
9724
9722
  textContains: "文字包含",
9725
- empty: "空值",
9726
9723
  duplicateValue: "重複值",
9727
9724
  uniqueValue: "唯一值",
9728
9725
  top: "前",
@@ -706,32 +706,6 @@ function compute(ctx, ruleArr, d) {
706
706
  }
707
707
  }
708
708
  }
709
- } else if (conditionName === "empty") {
710
- for (var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r += 1) {
711
- for (var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c += 1) {
712
- var cell = _lodash.default.isNil(d[r]) || _lodash.default.isNil(d[r][c]) ? null : d[r][c];
713
- var isEmpty = _lodash.default.isNil(cell) || _lodash.default.isNil(cell.v) || (0, _validation.isRealNull)(cell.v);
714
- if (isEmpty) {
715
- if ("".concat(r, "_").concat(c) in computeMap) {
716
- computeMap["".concat(r, "_").concat(c)].textColor = textColor_1;
717
- computeMap["".concat(r, "_").concat(c)].cellColor = cellColor_1;
718
- computeMap["".concat(r, "_").concat(c)].bold = bold_1;
719
- computeMap["".concat(r, "_").concat(c)].italic = italic_1;
720
- computeMap["".concat(r, "_").concat(c)].underline = underline_1;
721
- computeMap["".concat(r, "_").concat(c)].strikethrough = strikethrough_1;
722
- } else {
723
- computeMap["".concat(r, "_").concat(c)] = {
724
- textColor: textColor_1,
725
- cellColor: cellColor_1,
726
- bold: bold_1,
727
- italic: italic_1,
728
- underline: underline_1,
729
- strikethrough: strikethrough_1
730
- };
731
- }
732
- }
733
- }
734
- }
735
709
  } else if (conditionName === "between") {
736
710
  for (var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r += 1) {
737
711
  for (var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c += 1) {
@@ -1074,7 +1074,7 @@ function getFontStyleByCell(cell, checksAF, checksCF, isCheck) {
1074
1074
  if (key === "it" && valueNum !== 0) {
1075
1075
  style.fontStyle = "italic";
1076
1076
  }
1077
- if (key === "fs" && valueNum !== 10) {
1077
+ if (key === "fs" && !_lodash.default.isNil(value)) {
1078
1078
  style.fontSize = "".concat(valueNum, "pt");
1079
1079
  }
1080
1080
  if (key === "fc" && value !== "#000000" || ((_a = checksAF === null || checksAF === void 0 ? void 0 : checksAF.length) !== null && _a !== void 0 ? _a : 0) > 0 || (checksCF === null || checksCF === void 0 ? void 0 : checksCF.textColor)) {