@fileverse-dev/fortune-core 1.3.10 → 1.3.11-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/api/range.js +20 -0
- package/es/api/sheet.js +30 -2
- package/es/events/keyboard.js +74 -37
- package/es/events/mouse.js +1 -0
- package/es/events/paste.js +124 -56
- 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/cell.js +58 -2
- package/es/modules/comment.js +129 -24
- package/es/modules/dataVerification.js +34 -1
- package/es/modules/dropCell.js +65 -1
- package/es/modules/format.js +12 -7
- package/es/modules/formula.js +14 -0
- package/es/modules/hyperlink.js +52 -5
- package/es/modules/merge.js +93 -1
- package/es/modules/moveCells.js +35 -9
- package/es/modules/rowcol.js +75 -2
- package/es/modules/searchReplace.js +58 -2
- package/es/modules/selection.js +152 -42
- package/es/modules/sort.js +74 -9
- package/es/modules/splitColumn.js +21 -0
- package/es/modules/toolbar.js +46 -3
- package/es/modules/validation.js +6 -3
- package/es/settings.d.ts +5 -0
- package/es/types.d.ts +2 -0
- package/lib/api/range.js +20 -0
- package/lib/api/sheet.js +29 -1
- package/lib/events/keyboard.js +74 -37
- package/lib/events/mouse.js +1 -0
- package/lib/events/paste.js +122 -54
- 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/cell.js +58 -2
- package/lib/modules/comment.js +129 -24
- package/lib/modules/dataVerification.js +34 -1
- package/lib/modules/dropCell.js +65 -1
- package/lib/modules/format.js +12 -7
- package/lib/modules/formula.js +14 -0
- package/lib/modules/hyperlink.js +52 -5
- package/lib/modules/merge.js +93 -1
- package/lib/modules/moveCells.js +35 -9
- package/lib/modules/rowcol.js +75 -2
- package/lib/modules/searchReplace.js +58 -2
- package/lib/modules/selection.js +152 -42
- package/lib/modules/sort.js +74 -9
- package/lib/modules/splitColumn.js +21 -0
- package/lib/modules/toolbar.js +46 -3
- package/lib/modules/validation.js +6 -3
- package/lib/settings.d.ts +5 -0
- package/lib/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -84,6 +84,7 @@ var MONTH_NAME_MAP = {
|
|
|
84
84
|
};
|
|
85
85
|
var MONTH_NAMES_RE = "january|february|march|april|may|june|july|august|september|october|november|december|jan|feb|mar|apr|jun|jul|aug|sep|oct|nov|dec";
|
|
86
86
|
var MONTH_ABBR_RE = "jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec";
|
|
87
|
+
var MONTH_ABBR_SET = new Set(MONTH_ABBR_RE.split("|"));
|
|
87
88
|
function isValidDateParts(year, month, day) {
|
|
88
89
|
if (year < 1900) return false;
|
|
89
90
|
if (month < 1 || month > 12) return false;
|
|
@@ -298,6 +299,7 @@ function detectDateFormat(str) {
|
|
|
298
299
|
var d = +m[2];
|
|
299
300
|
var y = +m[3];
|
|
300
301
|
if (mo && isValidDateParts(y, mo, d)) {
|
|
302
|
+
var isAbbr = MONTH_ABBR_SET.has(m[1].toLowerCase());
|
|
301
303
|
return {
|
|
302
304
|
year: y,
|
|
303
305
|
month: mo,
|
|
@@ -305,7 +307,7 @@ function detectDateFormat(str) {
|
|
|
305
307
|
hours: 0,
|
|
306
308
|
minutes: 0,
|
|
307
309
|
seconds: 0,
|
|
308
|
-
formatType: "named"
|
|
310
|
+
formatType: isAbbr ? "named-mdy-abbr" : "named-mdy-full"
|
|
309
311
|
};
|
|
310
312
|
}
|
|
311
313
|
}
|
|
@@ -315,6 +317,7 @@ function detectDateFormat(str) {
|
|
|
315
317
|
var mo = MONTH_NAME_MAP[m[2].toLowerCase()];
|
|
316
318
|
var y = +m[3];
|
|
317
319
|
if (mo && isValidDateParts(y, mo, d)) {
|
|
320
|
+
var isAbbr = MONTH_ABBR_SET.has(m[2].toLowerCase());
|
|
318
321
|
return {
|
|
319
322
|
year: y,
|
|
320
323
|
month: mo,
|
|
@@ -322,7 +325,7 @@ function detectDateFormat(str) {
|
|
|
322
325
|
hours: 0,
|
|
323
326
|
minutes: 0,
|
|
324
327
|
seconds: 0,
|
|
325
|
-
formatType: "named"
|
|
328
|
+
formatType: isAbbr ? "named-dmy-abbr" : "named-dmy-full"
|
|
326
329
|
};
|
|
327
330
|
}
|
|
328
331
|
}
|
|
@@ -339,7 +342,7 @@ function detectDateFormat(str) {
|
|
|
339
342
|
hours: 0,
|
|
340
343
|
minutes: 0,
|
|
341
344
|
seconds: 0,
|
|
342
|
-
formatType: "named"
|
|
345
|
+
formatType: "named-abbr-dashes"
|
|
343
346
|
};
|
|
344
347
|
}
|
|
345
348
|
}
|
package/lib/settings.d.ts
CHANGED
|
@@ -16,9 +16,12 @@ export type Hooks = {
|
|
|
16
16
|
iframeListChange?: () => void;
|
|
17
17
|
conditionRulesChange?: () => void;
|
|
18
18
|
conditionFormatChange?: () => void;
|
|
19
|
+
filterSelectChange?: () => void;
|
|
20
|
+
filterChange?: () => void;
|
|
19
21
|
cellDataChange?: () => void;
|
|
20
22
|
hyperlinkChange?: () => void;
|
|
21
23
|
updateCellYdoc?: (changes: SheetChangePath[]) => void;
|
|
24
|
+
updateAllCell?: (sheetId: string) => void;
|
|
22
25
|
beforeUpdateCell?: (r: number, c: number, value: any) => boolean;
|
|
23
26
|
afterUpdateCell?: (row: number, column: number, oldValue: any, newValue: any) => void;
|
|
24
27
|
afterSelectionChange?: (sheetId: string, selection: Selection) => void;
|
|
@@ -78,6 +81,8 @@ export type Hooks = {
|
|
|
78
81
|
afterIframesChange?: () => void;
|
|
79
82
|
afterFrozenChange?: () => void;
|
|
80
83
|
afterOrderChanges?: () => void;
|
|
84
|
+
afterColorChanges?: () => void;
|
|
85
|
+
afterHideChanges?: () => void;
|
|
81
86
|
afterConfigChanges?: () => void;
|
|
82
87
|
afterColRowChanges?: () => void;
|
|
83
88
|
afterShowGridLinesChange?: () => void;
|
package/lib/types.d.ts
CHANGED
|
@@ -328,6 +328,8 @@ export type GlobalCache = {
|
|
|
328
328
|
verticalScrollLock?: boolean;
|
|
329
329
|
horizontalScrollLock?: boolean;
|
|
330
330
|
overwriteCell?: boolean;
|
|
331
|
+
overwriteCellFirstChar?: string;
|
|
332
|
+
enteredEditByTyping?: boolean;
|
|
331
333
|
ignoreWriteCell?: boolean;
|
|
332
334
|
doNotFocus?: boolean;
|
|
333
335
|
doNotUpdateCell?: boolean;
|