= {
const 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";
const MONTH_ABBR_RE = "jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec";
+const MONTH_ABBR_SET = new Set(MONTH_ABBR_RE.split("|"));
function isValidDateParts(year: number, month: number, day: number): boolean {
if (year < 1900) return false;
@@ -355,6 +356,7 @@ export function detectDateFormat(str: string): DateFormatInfo | null {
const d = +m[2];
const y = +m[3];
if (mo && isValidDateParts(y, mo, d)) {
+ const isAbbr = MONTH_ABBR_SET.has(m[1].toLowerCase());
return {
year: y,
month: mo,
@@ -362,7 +364,7 @@ export function detectDateFormat(str: string): DateFormatInfo | null {
hours: 0,
minutes: 0,
seconds: 0,
- formatType: "named",
+ formatType: isAbbr ? "named-mdy-abbr" : "named-mdy-full",
};
}
}
@@ -376,6 +378,7 @@ export function detectDateFormat(str: string): DateFormatInfo | null {
const mo = MONTH_NAME_MAP[m[2].toLowerCase()];
const y = +m[3];
if (mo && isValidDateParts(y, mo, d)) {
+ const isAbbr = MONTH_ABBR_SET.has(m[2].toLowerCase());
return {
year: y,
month: mo,
@@ -383,7 +386,7 @@ export function detectDateFormat(str: string): DateFormatInfo | null {
hours: 0,
minutes: 0,
seconds: 0,
- formatType: "named",
+ formatType: isAbbr ? "named-dmy-abbr" : "named-dmy-full",
};
}
}
@@ -402,7 +405,7 @@ export function detectDateFormat(str: string): DateFormatInfo | null {
hours: 0,
minutes: 0,
seconds: 0,
- formatType: "named",
+ formatType: "named-abbr-dashes",
};
}
}
diff --git a/packages/core/src/types.ts b/packages/core/src/types.ts
index 06e3354b..7136829b 100644
--- a/packages/core/src/types.ts
+++ b/packages/core/src/types.ts
@@ -305,6 +305,9 @@ export type GlobalCache = {
verticalScrollLock?: boolean;
horizontalScrollLock?: boolean;
overwriteCell?: boolean;
+ overwriteCellFirstChar?: string;
+ /** True when current cell was opened for edit by typing (not double-click). Used so arrow keys commit+move only in that case. */
+ enteredEditByTyping?: boolean;
ignoreWriteCell?: boolean;
doNotFocus?: boolean;
doNotUpdateCell?: boolean;
diff --git a/packages/react/package.json b/packages/react/package.json
index a0a00316..8f73e011 100644
--- a/packages/react/package.json
+++ b/packages/react/package.json
@@ -1,6 +1,6 @@
{
"name": "@fileverse-dev/fortune-react",
- "version": "1.3.12",
+ "version": "1.3.12-mixed",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"module": "es/index.js",
@@ -16,7 +16,7 @@
"tsc": "tsc"
},
"dependencies": {
- "@fileverse-dev/fortune-core": "1.3.12",
+ "@fileverse-dev/fortune-core": "1.3.12-mixed",
"@fileverse/ui": "5.0.0",
"@tippyjs/react": "^4.2.6",
"@types/regenerator-runtime": "^0.13.6",
diff --git a/packages/react/src/components/ConditionFormat/ConditionRules.tsx b/packages/react/src/components/ConditionFormat/ConditionRules.tsx
index dde571c7..46f26b63 100644
--- a/packages/react/src/components/ConditionFormat/ConditionRules.tsx
+++ b/packages/react/src/components/ConditionFormat/ConditionRules.tsx
@@ -317,6 +317,7 @@ const ConditionRules: React.FC<{ context?: any }> = ({ context }) => {
{ text: "between", value: "[]", label: "Between" },
{ text: "equal", value: "=", label: "Equal" },
{ text: "textContains", value: "()", label: "Text Contains" },
+ { text: "empty", value: "", label: "Empty" },
{
text: "occurrenceDate",
value: conditionformat.yesterday,
@@ -443,8 +444,11 @@ const ConditionRules: React.FC<{ context?: any }> = ({ context }) => {
(conditionformat as any)[
allConditionFormats[key].conditionName
]
- }{" "}
- {allConditionFormats[key].conditionValue?.[0]}
+ }
+ {allConditionFormats[key].conditionName !== "empty" &&
+ ` ${
+ allConditionFormats[key].conditionValue?.[0] ?? ""
+ }`}
= ({ context }) => {