@fileverse-dev/fortune-core 1.3.11 → 1.3.12-mixed
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/es/events/keyboard.js +60 -37
- package/es/events/mouse.js +1 -0
- package/es/events/paste.js +47 -28
- package/es/locale/en.d.ts +3 -0
- package/es/locale/en.js +3 -0
- package/es/locale/es.d.ts +3 -0
- package/es/locale/es.js +3 -0
- package/es/locale/hi.d.ts +3 -0
- package/es/locale/hi.js +3 -0
- package/es/locale/index.d.ts +3 -0
- package/es/locale/zh.d.ts +3 -0
- package/es/locale/zh.js +3 -0
- package/es/locale/zh_tw.d.ts +3 -0
- package/es/locale/zh_tw.js +3 -0
- package/es/modules/ConditionFormat.js +26 -0
- package/es/modules/format.js +12 -7
- package/es/modules/inline-string.js +52 -24
- package/es/modules/validation.js +6 -3
- package/es/types.d.ts +2 -0
- package/lib/events/keyboard.js +60 -37
- package/lib/events/mouse.js +1 -0
- package/lib/events/paste.js +45 -26
- package/lib/locale/en.d.ts +3 -0
- package/lib/locale/en.js +3 -0
- package/lib/locale/es.d.ts +3 -0
- package/lib/locale/es.js +3 -0
- package/lib/locale/hi.d.ts +3 -0
- package/lib/locale/hi.js +3 -0
- package/lib/locale/index.d.ts +3 -0
- package/lib/locale/zh.d.ts +3 -0
- package/lib/locale/zh.js +3 -0
- package/lib/locale/zh_tw.d.ts +3 -0
- package/lib/locale/zh_tw.js +3 -0
- package/lib/modules/ConditionFormat.js +26 -0
- package/lib/modules/format.js +12 -7
- package/lib/modules/inline-string.js +52 -24
- package/lib/modules/validation.js +6 -3
- package/lib/types.d.ts +2 -0
- package/package.json +1 -1
package/es/events/keyboard.js
CHANGED
|
@@ -169,63 +169,72 @@ function moveToEdge(sheetData, key, curr, rowDelta, colDelta, startR, endR, star
|
|
|
169
169
|
return colDelta === 0 ? r : c;
|
|
170
170
|
}
|
|
171
171
|
function handleControlPlusArrowKey(ctx, e, shiftPressed) {
|
|
172
|
-
|
|
172
|
+
var _a, _b, _c, _d;
|
|
173
173
|
var idx = getSheetIndex(ctx, ctx.currentSheetId);
|
|
174
174
|
if (_.isNil(idx)) return;
|
|
175
175
|
var file = ctx.luckysheetfile[idx];
|
|
176
|
-
if (!file || !file.row || !file.column) return;
|
|
177
176
|
var maxRow = file.row;
|
|
178
177
|
var maxCol = file.column;
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
if (_.isNil(maxRow) || _.isNil(maxCol)) return;
|
|
179
|
+
var last = ctx.luckysheet_select_save && ctx.luckysheet_select_save.length > 0 ? ctx.luckysheet_select_save[ctx.luckysheet_select_save.length - 1] : undefined;
|
|
181
180
|
if (!last) return;
|
|
182
181
|
var currR = last.row_focus;
|
|
183
182
|
var currC = last.column_focus;
|
|
184
183
|
if (_.isNil(currR) || _.isNil(currC)) return;
|
|
185
|
-
var startR = last.row[0];
|
|
186
|
-
var endR = last.row[1];
|
|
187
|
-
var startC = last.column[0];
|
|
188
|
-
var endC = last.column[1];
|
|
184
|
+
var startR = (_a = last.row) === null || _a === void 0 ? void 0 : _a[0];
|
|
185
|
+
var endR = (_b = last.row) === null || _b === void 0 ? void 0 : _b[1];
|
|
186
|
+
var startC = (_c = last.column) === null || _c === void 0 ? void 0 : _c[0];
|
|
187
|
+
var endC = (_d = last.column) === null || _d === void 0 ? void 0 : _d[1];
|
|
188
|
+
if (_.isNil(startR) || _.isNil(endR) || _.isNil(startC) || _.isNil(endC)) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
189
191
|
var horizontalOffset = currC - endC !== 0 ? currC - endC : currC - startC;
|
|
190
192
|
var verticalOffset = currR - endR !== 0 ? currR - endR : currR - startR;
|
|
191
193
|
var sheetData = file.data;
|
|
192
194
|
if (!sheetData) return;
|
|
193
|
-
var selectedLimit;
|
|
194
195
|
switch (e.key) {
|
|
195
196
|
case "ArrowUp":
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
197
|
+
{
|
|
198
|
+
var selectedLimit = moveToEdge(sheetData, e.key, currC, -1, 0, startR, endR, startC, endC, maxRow, maxCol);
|
|
199
|
+
if (shiftPressed) {
|
|
200
|
+
moveHighlightRange(ctx, "down", verticalOffset, "rangeOfSelect");
|
|
201
|
+
moveHighlightRange(ctx, "down", selectedLimit - currR, "rangeOfSelect");
|
|
202
|
+
} else {
|
|
203
|
+
moveHighlightCell(ctx, "down", selectedLimit - currR, "rangeOfSelect");
|
|
204
|
+
}
|
|
202
205
|
}
|
|
203
206
|
break;
|
|
204
207
|
case "ArrowDown":
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
{
|
|
209
|
+
var selectedLimit = moveToEdge(sheetData, e.key, currC, 1, 0, startR, endR, startC, endC, maxRow, maxCol);
|
|
210
|
+
if (shiftPressed) {
|
|
211
|
+
moveHighlightRange(ctx, "down", verticalOffset, "rangeOfSelect");
|
|
212
|
+
moveHighlightRange(ctx, "down", selectedLimit - currR, "rangeOfSelect");
|
|
213
|
+
} else {
|
|
214
|
+
moveHighlightCell(ctx, "down", selectedLimit - currR, "rangeOfSelect");
|
|
215
|
+
}
|
|
211
216
|
}
|
|
212
217
|
break;
|
|
213
218
|
case "ArrowLeft":
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
219
|
+
{
|
|
220
|
+
var selectedLimit = moveToEdge(sheetData, e.key, currR, 0, -1, startR, endR, startC, endC, maxRow, maxCol);
|
|
221
|
+
if (shiftPressed) {
|
|
222
|
+
moveHighlightRange(ctx, "right", horizontalOffset, "rangeOfSelect");
|
|
223
|
+
moveHighlightRange(ctx, "right", selectedLimit - currC, "rangeOfSelect");
|
|
224
|
+
} else {
|
|
225
|
+
moveHighlightCell(ctx, "right", selectedLimit - currC, "rangeOfSelect");
|
|
226
|
+
}
|
|
220
227
|
}
|
|
221
228
|
break;
|
|
222
229
|
case "ArrowRight":
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
230
|
+
{
|
|
231
|
+
var selectedLimit = moveToEdge(sheetData, e.key, currR, 0, 1, startR, endR, startC, endC, maxRow, maxCol);
|
|
232
|
+
if (shiftPressed) {
|
|
233
|
+
moveHighlightRange(ctx, "right", horizontalOffset, "rangeOfSelect");
|
|
234
|
+
moveHighlightRange(ctx, "right", selectedLimit - currC, "rangeOfSelect");
|
|
235
|
+
} else {
|
|
236
|
+
moveHighlightCell(ctx, "right", selectedLimit - currC, "rangeOfSelect");
|
|
237
|
+
}
|
|
229
238
|
}
|
|
230
239
|
break;
|
|
231
240
|
default:
|
|
@@ -378,10 +387,10 @@ export function handleArrowKey(ctx, e) {
|
|
|
378
387
|
}
|
|
379
388
|
}
|
|
380
389
|
export function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUndo, handleRedo, canvas) {
|
|
381
|
-
var _a, _b, _c;
|
|
390
|
+
var _a, _b, _c, _d;
|
|
382
391
|
return __awaiter(this, void 0, void 0, function () {
|
|
383
|
-
var handledFlvShortcut, kcode, kstr, allowEdit, isFxInput, ignoredKeys, restCod, last, row_index, col_index, last, row_index, col_index;
|
|
384
|
-
return __generator(this, function (
|
|
392
|
+
var handledFlvShortcut, kcode, kstr, allowEdit, isFxInput, ignoredKeys, restCod, last, row_index, col_index, isEditing, inputText, isFormulaEdit, enteredByTyping, last, row_index, col_index;
|
|
393
|
+
return __generator(this, function (_e) {
|
|
385
394
|
if (e.shiftKey && e.code === "Space") {
|
|
386
395
|
e.stopImmediatePropagation();
|
|
387
396
|
e.stopPropagation();
|
|
@@ -489,7 +498,18 @@ export function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUnd
|
|
|
489
498
|
jfrefreshgrid(ctx, null, undefined);
|
|
490
499
|
e.preventDefault();
|
|
491
500
|
} else if (kstr === "ArrowUp" || kstr === "ArrowDown" || kstr === "ArrowLeft" || kstr === "ArrowRight") {
|
|
492
|
-
|
|
501
|
+
isEditing = ctx.luckysheetCellUpdate.length > 0;
|
|
502
|
+
inputText = (_d = cellInput === null || cellInput === void 0 ? void 0 : cellInput.innerText) !== null && _d !== void 0 ? _d : "";
|
|
503
|
+
isFormulaEdit = isEditing && inputText.trim().startsWith("=");
|
|
504
|
+
enteredByTyping = cache.enteredEditByTyping === true;
|
|
505
|
+
if (isEditing && !isFormulaEdit && enteredByTyping) {
|
|
506
|
+
updateCell(ctx, ctx.luckysheetCellUpdate[0], ctx.luckysheetCellUpdate[1], cellInput, undefined, canvas);
|
|
507
|
+
cache.enteredEditByTyping = false;
|
|
508
|
+
handleArrowKey(ctx, e);
|
|
509
|
+
e.preventDefault();
|
|
510
|
+
} else {
|
|
511
|
+
handleArrowKey(ctx, e);
|
|
512
|
+
}
|
|
493
513
|
} 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) {
|
|
494
514
|
if (!allowEdit) return [2];
|
|
495
515
|
if (String.fromCharCode(kcode) != null && !_.isEmpty(ctx.luckysheet_select_save) && kstr !== "CapsLock" && kstr !== "Win" && kcode !== 18) {
|
|
@@ -498,7 +518,10 @@ export function handleGlobalKeyDown(ctx, cellInput, fxInput, e, cache, handleUnd
|
|
|
498
518
|
col_index = last.column_focus;
|
|
499
519
|
ctx.luckysheetCellUpdate = [row_index, col_index];
|
|
500
520
|
cache.overwriteCell = true;
|
|
521
|
+
cache.overwriteCellFirstChar = e.key;
|
|
522
|
+
cache.enteredEditByTyping = true;
|
|
501
523
|
handleFormulaInput(ctx, fxInput, cellInput, kcode);
|
|
524
|
+
e.preventDefault();
|
|
502
525
|
}
|
|
503
526
|
}
|
|
504
527
|
}
|
package/es/events/mouse.js
CHANGED
|
@@ -487,6 +487,7 @@ export function handleCellAreaDoubleClick(ctx, globalCache, settings, e, contain
|
|
|
487
487
|
row_index = row_focus;
|
|
488
488
|
col_index = column_focus;
|
|
489
489
|
}
|
|
490
|
+
globalCache.enteredEditByTyping = false;
|
|
490
491
|
luckysheetUpdateCell(ctx, row_index, col_index);
|
|
491
492
|
}
|
|
492
493
|
export function handleContextMenu(ctx, settings, e, workbookContainer, container, area) {
|
package/es/events/paste.js
CHANGED
|
@@ -34,10 +34,10 @@ import { handlePastedTable } from "../paste-table-helpers";
|
|
|
34
34
|
import { getFlowdata } from "../context";
|
|
35
35
|
import { execfunction } from "../modules/formula";
|
|
36
36
|
import { getdatabyselection } from "../modules/cell";
|
|
37
|
-
import { update,
|
|
37
|
+
import { update, genarate } from "../modules/format";
|
|
38
38
|
import { normalizeSelection, selectionCache } from "../modules/selection";
|
|
39
39
|
import { getSheetIndex, isAllowEdit } from "../utils";
|
|
40
|
-
import { hasPartMC, isRealNum
|
|
40
|
+
import { hasPartMC, isRealNum } from "../modules/validation";
|
|
41
41
|
import { getBorderInfoCompute } from "../modules/border";
|
|
42
42
|
import { expandRowsAndColumns, storeSheetParamALL } from "../modules/sheet";
|
|
43
43
|
import { jfrefreshgrid } from "../modules/refresh";
|
|
@@ -223,7 +223,7 @@ var handleFormulaOnPaste = function handleFormulaOnPaste(ctx, d) {
|
|
|
223
223
|
}
|
|
224
224
|
};
|
|
225
225
|
function pasteHandler(ctx, data, borderInfo) {
|
|
226
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
226
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
227
227
|
if (ctx.luckysheet_selection_range) {
|
|
228
228
|
ctx.luckysheet_selection_range = [];
|
|
229
229
|
}
|
|
@@ -407,25 +407,39 @@ function pasteHandler(ctx, data, borderInfo) {
|
|
|
407
407
|
}
|
|
408
408
|
}
|
|
409
409
|
if (originCell) {
|
|
410
|
-
if (
|
|
411
|
-
var
|
|
412
|
-
if (
|
|
413
|
-
var
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
410
|
+
if (!isUrl) {
|
|
411
|
+
var generated = genarate(originalValueStr);
|
|
412
|
+
if (generated) {
|
|
413
|
+
var genM = generated[0],
|
|
414
|
+
genCt = generated[1],
|
|
415
|
+
genV = generated[2];
|
|
416
|
+
if ((genCt === null || genCt === void 0 ? void 0 : genCt.t) === "d") {
|
|
417
|
+
originCell.v = genV;
|
|
418
|
+
originCell.m = genM !== null && genM !== void 0 ? genM : originalValueStr;
|
|
419
|
+
originCell.ct = genCt;
|
|
420
|
+
} else {
|
|
421
|
+
originCell.v = value;
|
|
422
|
+
if (originCell.ct != null && originCell.ct.fa != null) {
|
|
423
|
+
if (originCell.ct.t === "d" && typeof originCell.v !== "number") {
|
|
424
|
+
originCell.m = String(originCell.v);
|
|
425
|
+
} else {
|
|
426
|
+
originCell.m = update(originCell.ct.fa, originCell.v);
|
|
427
|
+
}
|
|
428
|
+
} else {
|
|
429
|
+
originCell.m = typeof originCell.v === "boolean" ? String(originCell.v) : originCell.v;
|
|
430
|
+
}
|
|
431
|
+
}
|
|
424
432
|
} else {
|
|
425
|
-
originCell.
|
|
433
|
+
originCell.v = value;
|
|
434
|
+
if (originCell.ct != null && originCell.ct.fa != null) {
|
|
435
|
+
originCell.m = update(originCell.ct.fa, originCell.v);
|
|
436
|
+
} else {
|
|
437
|
+
originCell.m = typeof originCell.v === "boolean" ? String(originCell.v) : originCell.v;
|
|
438
|
+
}
|
|
426
439
|
}
|
|
427
440
|
} else {
|
|
428
|
-
originCell.
|
|
441
|
+
originCell.v = originalValueStr;
|
|
442
|
+
originCell.m = originalValueStr;
|
|
429
443
|
}
|
|
430
444
|
if (originCell.f != null && originCell.f.length > 0) {
|
|
431
445
|
originCell.f = "";
|
|
@@ -452,19 +466,24 @@ function pasteHandler(ctx, data, borderInfo) {
|
|
|
452
466
|
t: "s"
|
|
453
467
|
};
|
|
454
468
|
} else {
|
|
455
|
-
cell.v = originalValueStr;
|
|
456
|
-
cell.m = originalValueStr;
|
|
457
|
-
cell.ct = {
|
|
458
|
-
fa: "General",
|
|
459
|
-
t: "g"
|
|
460
|
-
};
|
|
461
469
|
if (/^0x?[a-fA-F0-9]+$/.test(value)) {
|
|
470
|
+
cell.v = value;
|
|
462
471
|
cell.m = value;
|
|
463
472
|
cell.ct = {
|
|
464
473
|
fa: "@",
|
|
465
474
|
t: "s"
|
|
466
475
|
};
|
|
467
|
-
|
|
476
|
+
} else {
|
|
477
|
+
var _m = (_j = genarate(originalValueStr)) !== null && _j !== void 0 ? _j : [],
|
|
478
|
+
m = _m[0],
|
|
479
|
+
ct = _m[1],
|
|
480
|
+
v = _m[2];
|
|
481
|
+
cell.v = v !== null && v !== void 0 ? v : originalValueStr;
|
|
482
|
+
cell.m = m != null ? String(m) : originalValueStr;
|
|
483
|
+
cell.ct = ct !== null && ct !== void 0 ? ct : {
|
|
484
|
+
fa: "General",
|
|
485
|
+
t: "g"
|
|
486
|
+
};
|
|
468
487
|
}
|
|
469
488
|
}
|
|
470
489
|
if (isUrl && url) {
|
|
@@ -495,8 +514,8 @@ function pasteHandler(ctx, data, borderInfo) {
|
|
|
495
514
|
}
|
|
496
515
|
d[r + curR] = x;
|
|
497
516
|
}
|
|
498
|
-
if ((
|
|
499
|
-
(
|
|
517
|
+
if ((_k = ctx === null || ctx === void 0 ? void 0 : ctx.hooks) === null || _k === void 0 ? void 0 : _k.updateCellYdoc) {
|
|
518
|
+
(_l = ctx.hooks) === null || _l === void 0 ? void 0 : _l.updateCellYdoc(changes);
|
|
500
519
|
}
|
|
501
520
|
last.row = [curR, curR + rlen - 1];
|
|
502
521
|
last.column = [curC, curC + clen - 1];
|
package/es/locale/en.d.ts
CHANGED
|
@@ -530,6 +530,8 @@ 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;
|
|
533
535
|
conditionformat_occurrenceDate: string;
|
|
534
536
|
conditionformat_occurrenceDate_title: string;
|
|
535
537
|
conditionformat_duplicateValue: string;
|
|
@@ -633,6 +635,7 @@ declare const _default: {
|
|
|
633
635
|
between2: string;
|
|
634
636
|
contain: string;
|
|
635
637
|
textContains: string;
|
|
638
|
+
empty: string;
|
|
636
639
|
duplicateValue: string;
|
|
637
640
|
uniqueValue: string;
|
|
638
641
|
top: string;
|
package/es/locale/en.js
CHANGED
|
@@ -9628,6 +9628,8 @@ export default {
|
|
|
9628
9628
|
conditionformat_equal_title: "Format cells equal to",
|
|
9629
9629
|
conditionformat_textContains: "Conditional format - Text Contains",
|
|
9630
9630
|
conditionformat_textContains_title: "Format cells containing the following text",
|
|
9631
|
+
conditionformat_empty: "Conditional format - Empty",
|
|
9632
|
+
conditionformat_empty_title: "Format cells that are empty",
|
|
9631
9633
|
conditionformat_occurrenceDate: "Conditional format - Occurrence Date",
|
|
9632
9634
|
conditionformat_occurrenceDate_title: "Format cells containing the following dates",
|
|
9633
9635
|
conditionformat_duplicateValue: "Conditional format - Duplicate Value",
|
|
@@ -9731,6 +9733,7 @@ export default {
|
|
|
9731
9733
|
between2: "",
|
|
9732
9734
|
contain: "Contain",
|
|
9733
9735
|
textContains: "Text contains",
|
|
9736
|
+
empty: "Empty",
|
|
9734
9737
|
duplicateValue: "Duplicate value",
|
|
9735
9738
|
uniqueValue: "Unique value",
|
|
9736
9739
|
top: "Top",
|
package/es/locale/es.d.ts
CHANGED
|
@@ -688,6 +688,8 @@ 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;
|
|
691
693
|
conditionformat_occurrenceDate: string;
|
|
692
694
|
conditionformat_occurrenceDate_title: string;
|
|
693
695
|
conditionformat_duplicateValue: string;
|
|
@@ -789,6 +791,7 @@ declare const _default: {
|
|
|
789
791
|
between2: string;
|
|
790
792
|
contain: string;
|
|
791
793
|
textContains: string;
|
|
794
|
+
empty: string;
|
|
792
795
|
duplicateValue: string;
|
|
793
796
|
uniqueValue: string;
|
|
794
797
|
top: string;
|
package/es/locale/es.js
CHANGED
|
@@ -9565,6 +9565,8 @@ export default {
|
|
|
9565
9565
|
conditionformat_equal_title: "Dar formato a celdas iguales a",
|
|
9566
9566
|
conditionformat_textContains: "Conditionformat-TextContains",
|
|
9567
9567
|
conditionformat_textContains_title: "Dar formato a las celdas que contienen el siguiente texto",
|
|
9568
|
+
conditionformat_empty: "Conditional format - Empty",
|
|
9569
|
+
conditionformat_empty_title: "Dar formato a las celdas vacías",
|
|
9568
9570
|
conditionformat_occurrenceDate: "Conditionformat-OccurrenceDate",
|
|
9569
9571
|
conditionformat_occurrenceDate_title: "Dar formato a celdas que contienen las siguientes fechas",
|
|
9570
9572
|
conditionformat_duplicateValue: "Conditionformat-DuplicateValue",
|
|
@@ -9666,6 +9668,7 @@ export default {
|
|
|
9666
9668
|
between2: "",
|
|
9667
9669
|
contain: "Contiene",
|
|
9668
9670
|
textContains: "Texto contiene",
|
|
9671
|
+
empty: "Vacío",
|
|
9669
9672
|
duplicateValue: "Valor duplicado",
|
|
9670
9673
|
uniqueValue: "Valor Unico",
|
|
9671
9674
|
top: "Mejor",
|
package/es/locale/hi.d.ts
CHANGED
|
@@ -563,6 +563,8 @@ 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;
|
|
566
568
|
conditionformat_occurrenceDate: string;
|
|
567
569
|
conditionformat_occurrenceDate_title: string;
|
|
568
570
|
conditionformat_duplicateValue: string;
|
|
@@ -664,6 +666,7 @@ declare const _default: {
|
|
|
664
666
|
between2: string;
|
|
665
667
|
contain: string;
|
|
666
668
|
textContains: string;
|
|
669
|
+
empty: string;
|
|
667
670
|
duplicateValue: string;
|
|
668
671
|
uniqueValue: string;
|
|
669
672
|
top: string;
|
package/es/locale/hi.js
CHANGED
|
@@ -10078,6 +10078,8 @@ export default {
|
|
|
10078
10078
|
conditionformat_equal_title: "के बराबर कोशिकाओं को प्रारूपित करें",
|
|
10079
10079
|
conditionformat_textContains: "Conditionformat-TextContains",
|
|
10080
10080
|
conditionformat_textContains_title: "निम्नलिखित पाठ वाली कोशिकाओं को प्रारूपित करें",
|
|
10081
|
+
conditionformat_empty: "Conditional format - Empty",
|
|
10082
|
+
conditionformat_empty_title: "खाली कोशिकाओं को प्रारूपित करें",
|
|
10081
10083
|
conditionformat_occurrenceDate: "Conditionformat-OccurrenceDate",
|
|
10082
10084
|
conditionformat_occurrenceDate_title: "निम्नलिखित तिथियों वाली कोशिकाओं को प्रारूपित करें",
|
|
10083
10085
|
conditionformat_duplicateValue: "Conditionformat-DuplicateValue",
|
|
@@ -10179,6 +10181,7 @@ export default {
|
|
|
10179
10181
|
between2: "",
|
|
10180
10182
|
contain: "शामिल",
|
|
10181
10183
|
textContains: "पाठ शामिल है",
|
|
10184
|
+
empty: "खाली",
|
|
10182
10185
|
duplicateValue: "डुप्लिकेट मान",
|
|
10183
10186
|
uniqueValue: "अद्वितीय मान",
|
|
10184
10187
|
top: "शीर्ष",
|
package/es/locale/index.d.ts
CHANGED
|
@@ -583,6 +583,8 @@ 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;
|
|
586
588
|
conditionformat_occurrenceDate: string;
|
|
587
589
|
conditionformat_occurrenceDate_title: string;
|
|
588
590
|
conditionformat_duplicateValue: string;
|
|
@@ -685,6 +687,7 @@ declare function locale(ctx: Context): {
|
|
|
685
687
|
between2: string;
|
|
686
688
|
contain: string;
|
|
687
689
|
textContains: string;
|
|
690
|
+
empty: string;
|
|
688
691
|
duplicateValue: string;
|
|
689
692
|
uniqueValue: string;
|
|
690
693
|
top: string;
|
package/es/locale/zh.d.ts
CHANGED
|
@@ -582,6 +582,8 @@ 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;
|
|
585
587
|
conditionformat_occurrenceDate: string;
|
|
586
588
|
conditionformat_occurrenceDate_title: string;
|
|
587
589
|
conditionformat_duplicateValue: string;
|
|
@@ -684,6 +686,7 @@ declare const _default: {
|
|
|
684
686
|
between2: string;
|
|
685
687
|
contain: string;
|
|
686
688
|
textContains: string;
|
|
689
|
+
empty: string;
|
|
687
690
|
duplicateValue: string;
|
|
688
691
|
uniqueValue: string;
|
|
689
692
|
top: string;
|
package/es/locale/zh.js
CHANGED
|
@@ -10097,6 +10097,8 @@ export default {
|
|
|
10097
10097
|
conditionformat_equal_title: "为等于以下值的单元格设置格式",
|
|
10098
10098
|
conditionformat_textContains: "条件格式——文本包含",
|
|
10099
10099
|
conditionformat_textContains_title: "为包含以下文本的单元格设置格式",
|
|
10100
|
+
conditionformat_empty: "条件格式——空值",
|
|
10101
|
+
conditionformat_empty_title: "为空单元格设置格式",
|
|
10100
10102
|
conditionformat_occurrenceDate: "条件格式——发生日期",
|
|
10101
10103
|
conditionformat_occurrenceDate_title: "为包含以下日期的单元格设置格式",
|
|
10102
10104
|
conditionformat_duplicateValue: "条件格式——重复值",
|
|
@@ -10199,6 +10201,7 @@ export default {
|
|
|
10199
10201
|
between2: "之间",
|
|
10200
10202
|
contain: "包含",
|
|
10201
10203
|
textContains: "文本包含",
|
|
10204
|
+
empty: "空值",
|
|
10202
10205
|
duplicateValue: "重复值",
|
|
10203
10206
|
uniqueValue: "唯一值",
|
|
10204
10207
|
top: "前",
|
package/es/locale/zh_tw.d.ts
CHANGED
|
@@ -726,6 +726,8 @@ 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;
|
|
729
731
|
conditionformat_occurrenceDate: string;
|
|
730
732
|
conditionformat_occurrenceDate_title: string;
|
|
731
733
|
conditionformat_duplicateValue: string;
|
|
@@ -828,6 +830,7 @@ declare const _default: {
|
|
|
828
830
|
between2: string;
|
|
829
831
|
contain: string;
|
|
830
832
|
textContains: string;
|
|
833
|
+
empty: string;
|
|
831
834
|
duplicateValue: string;
|
|
832
835
|
uniqueValue: string;
|
|
833
836
|
top: string;
|
package/es/locale/zh_tw.js
CHANGED
|
@@ -9612,6 +9612,8 @@ export default {
|
|
|
9612
9612
|
conditionformat_equal_title: "為等於以下值的儲存格設定格式",
|
|
9613
9613
|
conditionformat_textContains: "條件格式——文字包含",
|
|
9614
9614
|
conditionformat_textContains_title: "為包含以下文字的儲存格設定格式",
|
|
9615
|
+
conditionformat_empty: "條件格式——空值",
|
|
9616
|
+
conditionformat_empty_title: "為空儲存格設定格式",
|
|
9615
9617
|
conditionformat_occurrenceDate: "條件格式——發生日期",
|
|
9616
9618
|
conditionformat_occurrenceDate_title: "為包含以下日期的儲存格設定格式",
|
|
9617
9619
|
conditionformat_duplicateValue: "條件格式——重複值",
|
|
@@ -9714,6 +9716,7 @@ export default {
|
|
|
9714
9716
|
between2: "之間",
|
|
9715
9717
|
contain: "包含",
|
|
9716
9718
|
textContains: "文字包含",
|
|
9719
|
+
empty: "空值",
|
|
9717
9720
|
duplicateValue: "重複值",
|
|
9718
9721
|
uniqueValue: "唯一值",
|
|
9719
9722
|
top: "前",
|
|
@@ -691,6 +691,32 @@ export function compute(ctx, ruleArr, d) {
|
|
|
691
691
|
}
|
|
692
692
|
}
|
|
693
693
|
}
|
|
694
|
+
} else if (conditionName === "empty") {
|
|
695
|
+
for (var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r += 1) {
|
|
696
|
+
for (var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c += 1) {
|
|
697
|
+
var cell = _.isNil(d[r]) || _.isNil(d[r][c]) ? null : d[r][c];
|
|
698
|
+
var isEmpty = _.isNil(cell) || _.isNil(cell.v) || isRealNull(cell.v);
|
|
699
|
+
if (isEmpty) {
|
|
700
|
+
if ("".concat(r, "_").concat(c) in computeMap) {
|
|
701
|
+
computeMap["".concat(r, "_").concat(c)].textColor = textColor_1;
|
|
702
|
+
computeMap["".concat(r, "_").concat(c)].cellColor = cellColor_1;
|
|
703
|
+
computeMap["".concat(r, "_").concat(c)].bold = bold_1;
|
|
704
|
+
computeMap["".concat(r, "_").concat(c)].italic = italic_1;
|
|
705
|
+
computeMap["".concat(r, "_").concat(c)].underline = underline_1;
|
|
706
|
+
computeMap["".concat(r, "_").concat(c)].strikethrough = strikethrough_1;
|
|
707
|
+
} else {
|
|
708
|
+
computeMap["".concat(r, "_").concat(c)] = {
|
|
709
|
+
textColor: textColor_1,
|
|
710
|
+
cellColor: cellColor_1,
|
|
711
|
+
bold: bold_1,
|
|
712
|
+
italic: italic_1,
|
|
713
|
+
underline: underline_1,
|
|
714
|
+
strikethrough: strikethrough_1
|
|
715
|
+
};
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
}
|
|
694
720
|
} else if (conditionName === "between") {
|
|
695
721
|
for (var r = cellrange[s].row[0]; r <= cellrange[s].row[1]; r += 1) {
|
|
696
722
|
for (var c = cellrange[s].column[0]; c <= cellrange[s].column[1]; c += 1) {
|
package/es/modules/format.js
CHANGED
|
@@ -240,20 +240,24 @@ export function genarate(value) {
|
|
|
240
240
|
v = datenum_local(dateObj);
|
|
241
241
|
ct.t = "d";
|
|
242
242
|
var map = {
|
|
243
|
-
"yyyy-MM-dd": "dd
|
|
244
|
-
"yyyy-MM-dd HH:mm": "dd
|
|
245
|
-
"yyyy-MM-ddTHH:mm": "dd
|
|
246
|
-
"yyyy/MM/dd": "
|
|
247
|
-
"yyyy/MM/dd HH:mm": "
|
|
243
|
+
"yyyy-MM-dd": "yyyy-MM-dd",
|
|
244
|
+
"yyyy-MM-dd HH:mm": "yyyy-MM-dd HH:mm",
|
|
245
|
+
"yyyy-MM-ddTHH:mm": "yyyy-MM-dd HH:mm",
|
|
246
|
+
"yyyy/MM/dd": "yyyy/MM/dd",
|
|
247
|
+
"yyyy/MM/dd HH:mm": "yyyy/MM/dd HH:mm",
|
|
248
248
|
"yyyy.MM.dd": "yyyy.MM.dd",
|
|
249
249
|
"MM/dd/yyyy h:mm AM/PM": "MM/dd/yyyy h:mm AM/PM",
|
|
250
250
|
"MM/dd/yyyy": "MM/dd/yyyy",
|
|
251
251
|
"M/d/yyyy": "M/d/yyyy",
|
|
252
252
|
"MM/dd/yy": "MM/dd/yy",
|
|
253
253
|
"dd/MM/yyyy": "dd/MM/yyyy",
|
|
254
|
-
"dd-MM-yyyy": "dd
|
|
254
|
+
"dd-MM-yyyy": "dd-MM-yyyy",
|
|
255
255
|
"dd.MM.yyyy": "dd.MM.yyyy",
|
|
256
|
-
named: "
|
|
256
|
+
"named-mdy-full": "mmmm d, yyyy",
|
|
257
|
+
"named-mdy-abbr": "mmm d, yyyy",
|
|
258
|
+
"named-dmy-full": "d mmmm yyyy",
|
|
259
|
+
"named-dmy-abbr": "d mmm yyyy",
|
|
260
|
+
"named-abbr-dashes": "mmm-d-yyyy"
|
|
257
261
|
};
|
|
258
262
|
ct.fa = map[df.formatType] || "dd/MM/yyyy";
|
|
259
263
|
m = SSF.format(ct.fa, v);
|
|
@@ -273,6 +277,7 @@ export function update(fmt, v) {
|
|
|
273
277
|
return SSF.format(fmt, v);
|
|
274
278
|
}
|
|
275
279
|
export function is_date(fmt, v) {
|
|
280
|
+
console.log(SSF.is_date(fmt, v), "is_date");
|
|
276
281
|
return SSF.is_date(fmt, v);
|
|
277
282
|
}
|
|
278
283
|
function fuzzynum(s) {
|