@handsontable/react-wrapper 0.0.0-next-1fcb3dc-20260525 → 0.0.0-next-e4d78fd-20260527
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/README.md +0 -3
- package/commonjs/react-handsontable.js +27 -24
- package/dist/react-handsontable.js +28 -25
- package/dist/react-handsontable.js.map +1 -1
- package/dist/react-handsontable.min.js +2 -2
- package/dist/react-handsontable.min.js.map +1 -1
- package/es/react-handsontable.mjs +27 -24
- package/hotTableInner.d.ts +1 -1
- package/package.json +3 -3
- package/types.d.ts +9 -4
|
@@ -676,11 +676,12 @@ function makeEditorClass(hooksRef, instanceRef) {
|
|
|
676
676
|
args[_key] = arguments[_key];
|
|
677
677
|
}
|
|
678
678
|
if (!AbstractMethods.includes(propName)) {
|
|
679
|
-
|
|
679
|
+
var _ref;
|
|
680
|
+
result = (_ref = baseMethod).call.apply(_ref, [this].concat(args)); // call super
|
|
680
681
|
}
|
|
681
682
|
if (MethodsMap[propName] && (_hooksRef$current = hooksRef.current) !== null && _hooksRef$current !== void 0 && _hooksRef$current[MethodsMap[propName]]) {
|
|
682
|
-
var
|
|
683
|
-
result = (
|
|
683
|
+
var _ref2;
|
|
684
|
+
result = (_ref2 = hooksRef.current[MethodsMap[propName]]).call.apply(_ref2, [this].concat(args));
|
|
684
685
|
}
|
|
685
686
|
return result;
|
|
686
687
|
}.bind(_this);
|
|
@@ -721,10 +722,10 @@ var EditorContext = /*#__PURE__*/createContext(undefined);
|
|
|
721
722
|
* @param {Ref} hooksRef Reference for component-based editor overridden hooks object.
|
|
722
723
|
* @param {RefObject} hotCustomEditorInstanceRef Reference to Handsontable-native editor instance.
|
|
723
724
|
*/
|
|
724
|
-
var EditorContextProvider = function EditorContextProvider(
|
|
725
|
-
var hooksRef =
|
|
726
|
-
hotCustomEditorInstanceRef =
|
|
727
|
-
children =
|
|
725
|
+
var EditorContextProvider = function EditorContextProvider(_ref3) {
|
|
726
|
+
var hooksRef = _ref3.hooksRef,
|
|
727
|
+
hotCustomEditorInstanceRef = _ref3.hotCustomEditorInstanceRef,
|
|
728
|
+
children = _ref3.children;
|
|
728
729
|
return /*#__PURE__*/React.createElement(EditorContext.Provider, {
|
|
729
730
|
value: {
|
|
730
731
|
hooksRef: hooksRef,
|
|
@@ -793,9 +794,9 @@ function applyEditorPosition(el, editor, hot, td) {
|
|
|
793
794
|
* @returns {UseHotEditorImpl} Editor API methods
|
|
794
795
|
*/
|
|
795
796
|
function useHotEditor(overriddenHooks, deps) {
|
|
796
|
-
var
|
|
797
|
-
hooksRef =
|
|
798
|
-
hotCustomEditorInstanceRef =
|
|
797
|
+
var _ref4 = useContext(EditorContext),
|
|
798
|
+
hooksRef = _ref4.hooksRef,
|
|
799
|
+
hotCustomEditorInstanceRef = _ref4.hotCustomEditorInstanceRef;
|
|
799
800
|
var _useState = useState(0),
|
|
800
801
|
_useState2 = _slicedToArray(_useState, 2),
|
|
801
802
|
rerenderTrigger = _useState2[0],
|
|
@@ -839,11 +840,13 @@ function useHotEditor(overriddenHooks, deps) {
|
|
|
839
840
|
},
|
|
840
841
|
get row() {
|
|
841
842
|
var _hotCustomEditorInsta6;
|
|
842
|
-
|
|
843
|
+
var row = (_hotCustomEditorInsta6 = hotCustomEditorInstanceRef.current) === null || _hotCustomEditorInsta6 === void 0 ? void 0 : _hotCustomEditorInsta6.row;
|
|
844
|
+
return row !== null && row !== void 0 ? row : undefined;
|
|
843
845
|
},
|
|
844
846
|
get col() {
|
|
845
847
|
var _hotCustomEditorInsta7;
|
|
846
|
-
|
|
848
|
+
var col = (_hotCustomEditorInsta7 = hotCustomEditorInstanceRef.current) === null || _hotCustomEditorInsta7 === void 0 ? void 0 : _hotCustomEditorInsta7.col;
|
|
849
|
+
return col !== null && col !== void 0 ? col : undefined;
|
|
847
850
|
}
|
|
848
851
|
};
|
|
849
852
|
}, [rerenderTrigger, hotCustomEditorInstanceRef, deferredValue]);
|
|
@@ -853,23 +856,23 @@ function useHotEditor(overriddenHooks, deps) {
|
|
|
853
856
|
|
|
854
857
|
// EditorComponent props - children typed to work with JSX syntax
|
|
855
858
|
|
|
856
|
-
function EditorComponent(
|
|
857
|
-
var _onPrepare =
|
|
858
|
-
_onClose =
|
|
859
|
-
_onOpen =
|
|
860
|
-
_onFocus =
|
|
861
|
-
children =
|
|
862
|
-
|
|
863
|
-
shortcutsGroup =
|
|
864
|
-
shortcuts =
|
|
859
|
+
function EditorComponent(_ref5) {
|
|
860
|
+
var _onPrepare = _ref5.onPrepare,
|
|
861
|
+
_onClose = _ref5.onClose,
|
|
862
|
+
_onOpen = _ref5.onOpen,
|
|
863
|
+
_onFocus = _ref5.onFocus,
|
|
864
|
+
children = _ref5.children,
|
|
865
|
+
_ref5$shortcutsGroup = _ref5.shortcutsGroup,
|
|
866
|
+
shortcutsGroup = _ref5$shortcutsGroup === void 0 ? "custom-editor" : _ref5$shortcutsGroup,
|
|
867
|
+
shortcuts = _ref5.shortcuts;
|
|
865
868
|
var mainElementRef = useRef(null);
|
|
866
869
|
var currentValue = useRef(undefined);
|
|
867
870
|
var _useState5 = useState(),
|
|
868
871
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
869
872
|
themeClassName = _useState6[0],
|
|
870
873
|
setThemeClassName = _useState6[1];
|
|
871
|
-
var
|
|
872
|
-
hotCustomEditorInstanceRef =
|
|
874
|
+
var _ref6 = useContext(EditorContext),
|
|
875
|
+
hotCustomEditorInstanceRef = _ref6.hotCustomEditorInstanceRef;
|
|
873
876
|
var registerShortcuts = useCallback(function () {
|
|
874
877
|
var _hotCustomEditorInsta8, _hotCustomEditorInsta9, _hotCustomEditorInsta0;
|
|
875
878
|
if (!((_hotCustomEditorInsta8 = hotCustomEditorInstanceRef.current) !== null && _hotCustomEditorInsta8 !== void 0 && _hotCustomEditorInsta8.hot)) return;
|
|
@@ -1073,7 +1076,7 @@ var HotColumn = function HotColumn(props) {
|
|
|
1073
1076
|
}, editorPortal);
|
|
1074
1077
|
};
|
|
1075
1078
|
|
|
1076
|
-
var version="0.0.0-next-
|
|
1079
|
+
var version="0.0.0-next-e4d78fd-20260527";
|
|
1077
1080
|
|
|
1078
1081
|
/**
|
|
1079
1082
|
* Component used to manage the renderer component portals.
|
package/hotTableInner.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { HotTableProps, HotTableRef } from './types';
|
|
3
|
-
declare const HotTableInner: React.ForwardRefExoticComponent<HotTableProps & React.RefAttributes<HotTableRef>>;
|
|
3
|
+
declare const HotTableInner: React.ForwardRefExoticComponent<Pick<HotTableProps, string | number> & React.RefAttributes<HotTableRef>>;
|
|
4
4
|
export default HotTableInner;
|
|
5
5
|
export { HotTableInner };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@handsontable/react-wrapper",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-e4d78fd-20260527",
|
|
4
4
|
"description": "Best Data Grid for React with Spreadsheet Look and Feel.",
|
|
5
5
|
"author": "Handsoncode <hello@handsoncode.net> (https://handsoncode.net)",
|
|
6
6
|
"homepage": "https://handsontable.com",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@types/react-dom": "^18.2.0",
|
|
73
73
|
"@types/react-redux": "^7.1.7",
|
|
74
74
|
"cross-env": "^7.0.3",
|
|
75
|
-
"handsontable": "0.0.0-next-
|
|
75
|
+
"handsontable": "0.0.0-next-e4d78fd-20260527",
|
|
76
76
|
"jest": "^27.5.1",
|
|
77
77
|
"jest-environment-jsdom": "^27.5.1",
|
|
78
78
|
"prop-types": "^15.7.2",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"uglify-js": "^3.4.9"
|
|
88
88
|
},
|
|
89
89
|
"peerDependencies": {
|
|
90
|
-
"handsontable": "0.0.0-next-
|
|
90
|
+
"handsontable": "0.0.0-next-e4d78fd-20260527"
|
|
91
91
|
},
|
|
92
92
|
"scripts": {
|
|
93
93
|
"build": "npm run clean && npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:min && npm run prepare:types",
|
package/types.d.ts
CHANGED
|
@@ -38,12 +38,17 @@ export interface UseHotEditorImpl<T> {
|
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Helper type to expose GridSettings/ColumnSettings props with native renderers/editors separately
|
|
41
|
-
*
|
|
41
|
+
* from component-based render prop. Uses conditional types so it works with both GridSettings
|
|
42
|
+
* and ColumnSettings (ColumnSettings' index signature can make it incompatible with strict Pick<>).
|
|
42
43
|
*/
|
|
43
|
-
declare type ReplaceRenderersEditors<T
|
|
44
|
-
hotRenderer?: T
|
|
44
|
+
declare type ReplaceRenderersEditors<T> = Omit<T, 'renderer' | 'editor'> & {
|
|
45
|
+
hotRenderer?: T extends {
|
|
46
|
+
renderer?: infer R;
|
|
47
|
+
} ? R : never;
|
|
45
48
|
renderer?: ComponentType<HotRendererProps>;
|
|
46
|
-
hotEditor?: T
|
|
49
|
+
hotEditor?: T extends {
|
|
50
|
+
editor?: infer E;
|
|
51
|
+
} ? E : never;
|
|
47
52
|
editor?: ComponentType | boolean;
|
|
48
53
|
};
|
|
49
54
|
/**
|