@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.
Files changed (71) hide show
  1. package/es/api/range.js +20 -0
  2. package/es/api/sheet.js +30 -2
  3. package/es/events/keyboard.js +74 -37
  4. package/es/events/mouse.js +1 -0
  5. package/es/events/paste.js +124 -56
  6. package/es/locale/en.d.ts +3 -0
  7. package/es/locale/en.js +3 -0
  8. package/es/locale/es.d.ts +3 -0
  9. package/es/locale/es.js +3 -0
  10. package/es/locale/hi.d.ts +3 -0
  11. package/es/locale/hi.js +3 -0
  12. package/es/locale/index.d.ts +3 -0
  13. package/es/locale/zh.d.ts +3 -0
  14. package/es/locale/zh.js +3 -0
  15. package/es/locale/zh_tw.d.ts +3 -0
  16. package/es/locale/zh_tw.js +3 -0
  17. package/es/modules/ConditionFormat.js +26 -0
  18. package/es/modules/cell.js +58 -2
  19. package/es/modules/comment.js +129 -24
  20. package/es/modules/dataVerification.js +34 -1
  21. package/es/modules/dropCell.js +65 -1
  22. package/es/modules/format.js +12 -7
  23. package/es/modules/formula.js +14 -0
  24. package/es/modules/hyperlink.js +52 -5
  25. package/es/modules/merge.js +93 -1
  26. package/es/modules/moveCells.js +35 -9
  27. package/es/modules/rowcol.js +75 -2
  28. package/es/modules/searchReplace.js +58 -2
  29. package/es/modules/selection.js +152 -42
  30. package/es/modules/sort.js +74 -9
  31. package/es/modules/splitColumn.js +21 -0
  32. package/es/modules/toolbar.js +46 -3
  33. package/es/modules/validation.js +6 -3
  34. package/es/settings.d.ts +5 -0
  35. package/es/types.d.ts +2 -0
  36. package/lib/api/range.js +20 -0
  37. package/lib/api/sheet.js +29 -1
  38. package/lib/events/keyboard.js +74 -37
  39. package/lib/events/mouse.js +1 -0
  40. package/lib/events/paste.js +122 -54
  41. package/lib/locale/en.d.ts +3 -0
  42. package/lib/locale/en.js +3 -0
  43. package/lib/locale/es.d.ts +3 -0
  44. package/lib/locale/es.js +3 -0
  45. package/lib/locale/hi.d.ts +3 -0
  46. package/lib/locale/hi.js +3 -0
  47. package/lib/locale/index.d.ts +3 -0
  48. package/lib/locale/zh.d.ts +3 -0
  49. package/lib/locale/zh.js +3 -0
  50. package/lib/locale/zh_tw.d.ts +3 -0
  51. package/lib/locale/zh_tw.js +3 -0
  52. package/lib/modules/ConditionFormat.js +26 -0
  53. package/lib/modules/cell.js +58 -2
  54. package/lib/modules/comment.js +129 -24
  55. package/lib/modules/dataVerification.js +34 -1
  56. package/lib/modules/dropCell.js +65 -1
  57. package/lib/modules/format.js +12 -7
  58. package/lib/modules/formula.js +14 -0
  59. package/lib/modules/hyperlink.js +52 -5
  60. package/lib/modules/merge.js +93 -1
  61. package/lib/modules/moveCells.js +35 -9
  62. package/lib/modules/rowcol.js +75 -2
  63. package/lib/modules/searchReplace.js +58 -2
  64. package/lib/modules/selection.js +152 -42
  65. package/lib/modules/sort.js +74 -9
  66. package/lib/modules/splitColumn.js +21 -0
  67. package/lib/modules/toolbar.js +46 -3
  68. package/lib/modules/validation.js +6 -3
  69. package/lib/settings.d.ts +5 -0
  70. package/lib/types.d.ts +2 -0
  71. 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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fileverse-dev/fortune-core",
3
- "version": "1.3.10",
3
+ "version": "1.3.11-mixed",
4
4
  "main": "lib/index.js",
5
5
  "module": "es/index.js",
6
6
  "typings": "lib/index.d.ts",