@rowsncolumns/ui 15.0.41 → 15.0.42
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-editor-keydown-pm.d.ts","sourceRoot":"","sources":["../../../editor-pm/use-editor-keydown-pm.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,IAAI,OAAO,CAAC;IACzB,aAAa,IAAI,IAAI,CAAC;IACtB,QAAQ,CAAC,CACP,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,aAAa,EAAE,GAAG,SAAS,GAAG,IAAI,EAClD,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,GACrC,IAAI,CAAC;IACR,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACxD,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,OAAO,IAAI,UAAU,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,2JAchC,uBAAuB,SASlB,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"use-editor-keydown-pm.d.ts","sourceRoot":"","sources":["../../../editor-pm/use-editor-keydown-pm.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,IAAI,OAAO,CAAC;IACzB,aAAa,IAAI,IAAI,CAAC;IACtB,QAAQ,CAAC,CACP,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,aAAa,EAAE,GAAG,SAAS,GAAG,IAAI,EAClD,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,GACrC,IAAI,CAAC;IACR,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACxD,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,OAAO,IAAI,UAAU,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,2JAchC,uBAAuB,SASlB,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,SAqG1C,CAAC"}
|
|
@@ -37,7 +37,11 @@ export var useEditorKeyDownPM = function (_a) {
|
|
|
37
37
|
!isDropdownOpen;
|
|
38
38
|
// Insert an in-cell line break on Alt+Enter (universal Excel/Sheets) or
|
|
39
39
|
// Cmd+Enter (Mac). Ctrl+Enter is deliberately NOT a line break — it
|
|
40
|
-
// commits
|
|
40
|
+
// commits, matching Excel, and the event is handed to `onSubmit` so the
|
|
41
|
+
// cell editor can apply Excel's Ctrl+Enter semantics (write the entry into
|
|
42
|
+
// every selected cell, keep the active cell in place). Decision: Cmd+Enter
|
|
43
|
+
// stays the Mac newline chord regardless of selection — Excel for Mac also
|
|
44
|
+
// uses Ctrl+Return for the fill-selection commit, so nothing is lost.
|
|
41
45
|
// Previously this fired on metaKey||ctrlKey, so Alt+Enter fell through
|
|
42
46
|
// to the submit path and destructively committed instead of newlining.
|
|
43
47
|
if (isEnter && (e.altKey || e.metaKey)) {
|
|
@@ -57,11 +61,25 @@ export var useEditorKeyDownPM = function (_a) {
|
|
|
57
61
|
? serializeEditorValue(submitView.state.doc)
|
|
58
62
|
: (_a = valueRef.current) !== null && _a !== void 0 ? _a : "";
|
|
59
63
|
onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(submitValue, extractTextFormatRuns(submitView === null || submitView === void 0 ? void 0 : submitView.state.doc), e);
|
|
64
|
+
/* The editor owns the commit keys, so it must consume them. This
|
|
65
|
+
contenteditable is the grid's always-focused key sink: a Tab that
|
|
66
|
+
keeps its browser default runs sequential focus navigation, focus
|
|
67
|
+
lands on the next tabbable element outside the grid, and every key
|
|
68
|
+
typed before the frame-deferred refocus is delivered there and
|
|
69
|
+
lost. Excel keeps keyboard focus in the worksheet across a commit.
|
|
70
|
+
(Enter/Escape are already swallowed by prosemirror-view; this makes
|
|
71
|
+
the contract explicit.) Smart-submit arrows are left alone: their
|
|
72
|
+
default is only a caret move, and the grid's Alt+Arrow sheet
|
|
73
|
+
switching downstream bails on an already-prevented event. */
|
|
74
|
+
if (isEnter || isTab) {
|
|
75
|
+
e.preventDefault();
|
|
76
|
+
}
|
|
60
77
|
}
|
|
61
78
|
// Cancel handler
|
|
62
79
|
if (canCancel && isEscape) {
|
|
63
80
|
/* Trigger cancel */
|
|
64
81
|
onCancel === null || onCancel === void 0 ? void 0 : onCancel(e);
|
|
82
|
+
e.preventDefault();
|
|
65
83
|
}
|
|
66
84
|
// Callback
|
|
67
85
|
onKeyDown === null || onKeyDown === void 0 ? void 0 : onKeyDown(e);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-editor-keydown-pm.d.ts","sourceRoot":"","sources":["../../../editor-pm/use-editor-keydown-pm.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,IAAI,OAAO,CAAC;IACzB,aAAa,IAAI,IAAI,CAAC;IACtB,QAAQ,CAAC,CACP,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,aAAa,EAAE,GAAG,SAAS,GAAG,IAAI,EAClD,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,GACrC,IAAI,CAAC;IACR,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACxD,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,OAAO,IAAI,UAAU,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,2JAchC,uBAAuB,SASlB,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,
|
|
1
|
+
{"version":3,"file":"use-editor-keydown-pm.d.ts","sourceRoot":"","sources":["../../../editor-pm/use-editor-keydown-pm.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,KAAK,uBAAuB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,IAAI,OAAO,CAAC;IACzB,aAAa,IAAI,IAAI,CAAC;IACtB,QAAQ,CAAC,CACP,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,aAAa,EAAE,GAAG,SAAS,GAAG,IAAI,EAClD,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,GACrC,IAAI,CAAC;IACR,QAAQ,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACxD,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,GAAG,IAAI,CAAC;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,OAAO,IAAI,UAAU,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,GAAI,2JAchC,uBAAuB,SASlB,KAAK,CAAC,aAAa,CAAC,cAAc,CAAC,SAqG1C,CAAC"}
|
|
@@ -35,7 +35,11 @@ export const useEditorKeyDownPM = ({ formulaMode, isNewValue, isCursorAtEnd, onI
|
|
|
35
35
|
!isDropdownOpen;
|
|
36
36
|
// Insert an in-cell line break on Alt+Enter (universal Excel/Sheets) or
|
|
37
37
|
// Cmd+Enter (Mac). Ctrl+Enter is deliberately NOT a line break — it
|
|
38
|
-
// commits
|
|
38
|
+
// commits, matching Excel, and the event is handed to `onSubmit` so the
|
|
39
|
+
// cell editor can apply Excel's Ctrl+Enter semantics (write the entry into
|
|
40
|
+
// every selected cell, keep the active cell in place). Decision: Cmd+Enter
|
|
41
|
+
// stays the Mac newline chord regardless of selection — Excel for Mac also
|
|
42
|
+
// uses Ctrl+Return for the fill-selection commit, so nothing is lost.
|
|
39
43
|
// Previously this fired on metaKey||ctrlKey, so Alt+Enter fell through
|
|
40
44
|
// to the submit path and destructively committed instead of newlining.
|
|
41
45
|
if (isEnter && (e.altKey || e.metaKey)) {
|
|
@@ -55,11 +59,25 @@ export const useEditorKeyDownPM = ({ formulaMode, isNewValue, isCursorAtEnd, onI
|
|
|
55
59
|
? serializeEditorValue(submitView.state.doc)
|
|
56
60
|
: valueRef.current ?? "";
|
|
57
61
|
onSubmit?.(submitValue, extractTextFormatRuns(submitView?.state.doc), e);
|
|
62
|
+
/* The editor owns the commit keys, so it must consume them. This
|
|
63
|
+
contenteditable is the grid's always-focused key sink: a Tab that
|
|
64
|
+
keeps its browser default runs sequential focus navigation, focus
|
|
65
|
+
lands on the next tabbable element outside the grid, and every key
|
|
66
|
+
typed before the frame-deferred refocus is delivered there and
|
|
67
|
+
lost. Excel keeps keyboard focus in the worksheet across a commit.
|
|
68
|
+
(Enter/Escape are already swallowed by prosemirror-view; this makes
|
|
69
|
+
the contract explicit.) Smart-submit arrows are left alone: their
|
|
70
|
+
default is only a caret move, and the grid's Alt+Arrow sheet
|
|
71
|
+
switching downstream bails on an already-prevented event. */
|
|
72
|
+
if (isEnter || isTab) {
|
|
73
|
+
e.preventDefault();
|
|
74
|
+
}
|
|
58
75
|
}
|
|
59
76
|
// Cancel handler
|
|
60
77
|
if (canCancel && isEscape) {
|
|
61
78
|
/* Trigger cancel */
|
|
62
79
|
onCancel?.(e);
|
|
80
|
+
e.preventDefault();
|
|
63
81
|
}
|
|
64
82
|
// Callback
|
|
65
83
|
onKeyDown?.(e);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rowsncolumns/ui",
|
|
3
|
-
"version": "15.0.
|
|
3
|
+
"version": "15.0.42",
|
|
4
4
|
"author": "Vinay M",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
@@ -57,10 +57,10 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@rowsncolumns/calculator": ">=7.2.30",
|
|
59
59
|
"@rowsncolumns/common-types": ">=5.2.30",
|
|
60
|
-
"@rowsncolumns/fast-formula-parser": ">=6.2.
|
|
61
|
-
"@rowsncolumns/functions": ">=14.0.
|
|
60
|
+
"@rowsncolumns/fast-formula-parser": ">=6.2.38",
|
|
61
|
+
"@rowsncolumns/functions": ">=14.0.33",
|
|
62
62
|
"@rowsncolumns/icons": ">=7.2.31",
|
|
63
|
-
"@rowsncolumns/utils": ">=9.2.
|
|
63
|
+
"@rowsncolumns/utils": ">=9.2.43",
|
|
64
64
|
"@types/lodash": "^4.17.17",
|
|
65
65
|
"react": "^19.1.0",
|
|
66
66
|
"react-dom": "^19.1.0"
|
|
@@ -68,10 +68,10 @@
|
|
|
68
68
|
"peerDependencies": {
|
|
69
69
|
"@rowsncolumns/calculator": ">=7.2.30",
|
|
70
70
|
"@rowsncolumns/common-types": ">=5.2.30",
|
|
71
|
-
"@rowsncolumns/fast-formula-parser": ">=6.2.
|
|
72
|
-
"@rowsncolumns/functions": ">=14.0.
|
|
71
|
+
"@rowsncolumns/fast-formula-parser": ">=6.2.38",
|
|
72
|
+
"@rowsncolumns/functions": ">=14.0.33",
|
|
73
73
|
"@rowsncolumns/icons": ">=7.2.31",
|
|
74
|
-
"@rowsncolumns/utils": ">=9.2.
|
|
74
|
+
"@rowsncolumns/utils": ">=9.2.43",
|
|
75
75
|
"react": ">=18.0.0",
|
|
76
76
|
"react-dom": ">=18.0.0"
|
|
77
77
|
}
|