@handsontable/react 10.0.0 → 11.0.0
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/LICENSE.txt +19 -22
- package/baseEditorComponent.d.ts +2 -2
- package/commonjs/react-handsontable.js +34 -13
- package/dist/react-handsontable.js +55 -37
- package/dist/react-handsontable.js.map +1 -1
- package/dist/react-handsontable.min.js +21 -24
- package/dist/react-handsontable.min.js.map +1 -1
- package/es/react-handsontable.js +34 -13
- package/handsontable-non-commercial-license.pdf +0 -0
- package/helpers.d.ts +9 -3
- package/hotColumn.d.ts +1 -1
- package/hotTable.d.ts +7 -5
- package/package.json +5 -5
- package/settingsMapper.d.ts +1 -1
- package/types.d.ts +11 -3
- package/handsontable-general-terms.pdf +0 -0
package/helpers.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { HotEditorElement } from './types';
|
|
2
|
+
import { HotEditorCache, HotEditorElement } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Warning message for the `autoRowSize`/`autoColumnSize` compatibility check.
|
|
5
5
|
*/
|
|
@@ -8,6 +8,10 @@ export declare const AUTOSIZE_WARNING: string;
|
|
|
8
8
|
* Message for the warning thrown if the Handsontable instance has been destroyed.
|
|
9
9
|
*/
|
|
10
10
|
export declare const HOT_DESTROYED_WARNING: string;
|
|
11
|
+
/**
|
|
12
|
+
* String identifier for the global-scoped editor components.
|
|
13
|
+
*/
|
|
14
|
+
export declare const GLOBAL_EDITOR_SCOPE = "global";
|
|
11
15
|
/**
|
|
12
16
|
* Logs warn to the console if the `console` object is exposed.
|
|
13
17
|
*
|
|
@@ -44,15 +48,17 @@ export declare function removeEditorContainers(doc?: Document): void;
|
|
|
44
48
|
* @param {Map} editorCache The editor cache reference.
|
|
45
49
|
* @returns {React.ReactPortal} The portal for the editor.
|
|
46
50
|
*/
|
|
47
|
-
export declare function createEditorPortal(doc: Document, editorElement: HotEditorElement, editorCache:
|
|
51
|
+
export declare function createEditorPortal(doc: Document, editorElement: HotEditorElement, editorCache: HotEditorCache): React.ReactPortal;
|
|
48
52
|
/**
|
|
49
53
|
* Get an editor element extended with a instance-emitting method.
|
|
50
54
|
*
|
|
51
55
|
* @param {React.ReactNode} children Component children.
|
|
52
56
|
* @param {Map} editorCache Component's editor cache.
|
|
57
|
+
* @param {string|number} [editorColumnScope] The editor scope (column index or a 'global' string). Defaults to
|
|
58
|
+
* 'global'.
|
|
53
59
|
* @returns {React.ReactElement} An editor element containing the additional methods.
|
|
54
60
|
*/
|
|
55
|
-
export declare function getExtendedEditorElement(children: React.ReactNode, editorCache:
|
|
61
|
+
export declare function getExtendedEditorElement(children: React.ReactNode, editorCache: HotEditorCache, editorColumnScope?: string | number): React.ReactElement | null;
|
|
56
62
|
/**
|
|
57
63
|
* Create a react component and render it to an external DOM done.
|
|
58
64
|
*
|
package/hotColumn.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactPortal } from 'react';
|
|
2
2
|
import { HotTableProps, HotColumnProps } from './types';
|
|
3
|
-
import Handsontable from 'handsontable';
|
|
3
|
+
import Handsontable from 'handsontable/base';
|
|
4
4
|
declare class HotColumn extends React.Component<HotColumnProps, {}> {
|
|
5
5
|
internalProps: string[];
|
|
6
6
|
columnSettings: Handsontable.ColumnSettings;
|
package/hotTable.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Handsontable from 'handsontable';
|
|
2
|
+
import Handsontable from 'handsontable/base';
|
|
3
3
|
import { PortalManager } from './portalManager';
|
|
4
|
-
import { HotTableProps, HotEditorElement } from './types';
|
|
4
|
+
import { HotTableProps, HotEditorElement, HotEditorCache, EditorScopeIdentifier } from './types';
|
|
5
5
|
/**
|
|
6
6
|
* A Handsontable-ReactJS wrapper.
|
|
7
7
|
*
|
|
@@ -138,7 +138,7 @@ declare class HotTable extends React.Component<HotTableProps, {}> {
|
|
|
138
138
|
*
|
|
139
139
|
* @returns {Map}
|
|
140
140
|
*/
|
|
141
|
-
getEditorCache():
|
|
141
|
+
getEditorCache(): HotEditorCache;
|
|
142
142
|
/**
|
|
143
143
|
* Get the global editor portal property.
|
|
144
144
|
*
|
|
@@ -173,14 +173,16 @@ declare class HotTable extends React.Component<HotTableProps, {}> {
|
|
|
173
173
|
* @param {React.ReactElement} rendererElement React renderer component.
|
|
174
174
|
* @returns {Handsontable.renderers.Base} The Handsontable rendering function.
|
|
175
175
|
*/
|
|
176
|
-
getRendererWrapper(rendererElement: React.ReactElement): Handsontable.renderers.
|
|
176
|
+
getRendererWrapper(rendererElement: React.ReactElement): typeof Handsontable.renderers.BaseRenderer | any;
|
|
177
177
|
/**
|
|
178
178
|
* Create a fresh class to be used as an editor, based on the provided editor React element.
|
|
179
179
|
*
|
|
180
180
|
* @param {React.ReactElement} editorElement React editor component.
|
|
181
|
+
* @param {string|number} [editorColumnScope] The editor scope (column index or a 'global' string). Defaults to
|
|
182
|
+
* 'global'.
|
|
181
183
|
* @returns {Function} A class to be passed to the Handsontable editor settings.
|
|
182
184
|
*/
|
|
183
|
-
getEditorClass(editorElement: HotEditorElement): typeof Handsontable.editors.BaseEditor;
|
|
185
|
+
getEditorClass(editorElement: HotEditorElement, editorColumnScope?: EditorScopeIdentifier): typeof Handsontable.editors.BaseEditor;
|
|
184
186
|
/**
|
|
185
187
|
* Create a class to be passed to the Handsontable's settings.
|
|
186
188
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@handsontable/react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.0",
|
|
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",
|
|
@@ -64,27 +64,27 @@
|
|
|
64
64
|
"enzyme": "^3.10.0",
|
|
65
65
|
"enzyme-adapter-react-16": "^1.14.0",
|
|
66
66
|
"enzyme-to-json": "^3.4.0",
|
|
67
|
-
"handsontable": "^
|
|
67
|
+
"handsontable": "^11.0.0",
|
|
68
68
|
"jest": "^25.1.0",
|
|
69
69
|
"prop-types": "^15.7.2",
|
|
70
70
|
"react": "^16.10.2",
|
|
71
71
|
"react-dom": "^16.10.2",
|
|
72
72
|
"react-redux": "^7.1.1",
|
|
73
73
|
"redux": "^4.0.4",
|
|
74
|
-
"rollup": "^2.
|
|
74
|
+
"rollup": "^2.58.0",
|
|
75
75
|
"rollup-plugin-alias": "^1.5.2",
|
|
76
76
|
"rollup-plugin-babel": "^4.3.3",
|
|
77
77
|
"rollup-plugin-commonjs": "^10.0.1",
|
|
78
78
|
"rollup-plugin-json": "^4.0.0",
|
|
79
79
|
"rollup-plugin-node-resolve": "^5.2.0",
|
|
80
80
|
"rollup-plugin-replace": "^2.2.0",
|
|
81
|
-
"rollup-plugin-typescript2": "^0.22.1",
|
|
82
81
|
"rollup-plugin-terser": "^7.0.2",
|
|
82
|
+
"rollup-plugin-typescript2": "^0.22.1",
|
|
83
83
|
"typescript": "3.8.2",
|
|
84
84
|
"uglify-js": "^3.4.9"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
|
-
"handsontable": ">=
|
|
87
|
+
"handsontable": ">=11.0.0"
|
|
88
88
|
},
|
|
89
89
|
"scripts": {
|
|
90
90
|
"build": "npm run clean && npm run build:commonjs && npm run build:es && npm run build:umd && npm run build:min",
|
package/settingsMapper.d.ts
CHANGED
package/types.d.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import Handsontable from 'handsontable';
|
|
1
|
+
import Handsontable from 'handsontable/base';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ConnectedComponent } from 'react-redux';
|
|
4
4
|
/**
|
|
5
5
|
* Type of the editor component's ReactElement.
|
|
6
6
|
*/
|
|
7
7
|
export declare type HotEditorElement = React.ReactElement<{}, ConnectedComponent<React.FunctionComponent, any> | any>;
|
|
8
|
+
/**
|
|
9
|
+
* Type of the identifier under which the cached editor components are stored.
|
|
10
|
+
*/
|
|
11
|
+
export declare type EditorScopeIdentifier = 'global' | number;
|
|
12
|
+
/**
|
|
13
|
+
* Type of the cache map for the Handsontable editor components.
|
|
14
|
+
*/
|
|
15
|
+
export declare type HotEditorCache = Map<Function, Map<EditorScopeIdentifier, React.Component>>;
|
|
8
16
|
/**
|
|
9
17
|
* Interface for the `prop` of the HotTable component - extending the default Handsontable settings with additional,
|
|
10
18
|
* component-related properties.
|
|
@@ -34,8 +42,8 @@ export interface HotColumnProps extends Handsontable.ColumnSettings {
|
|
|
34
42
|
_columnIndex?: number;
|
|
35
43
|
_getChildElementByType?: (children: React.ReactNode, type: string) => React.ReactElement;
|
|
36
44
|
_getRendererWrapper?: (rendererNode: React.ReactElement) => Handsontable.renderers.Base;
|
|
37
|
-
_getEditorClass?: (editorElement: React.ReactElement) => typeof Handsontable.editors.BaseEditor;
|
|
38
|
-
_getEditorCache?: () =>
|
|
45
|
+
_getEditorClass?: (editorElement: React.ReactElement, editorColumnScope: EditorScopeIdentifier) => typeof Handsontable.editors.BaseEditor;
|
|
46
|
+
_getEditorCache?: () => HotEditorCache;
|
|
39
47
|
_getOwnerDocument?: () => Document;
|
|
40
48
|
children?: React.ReactNode;
|
|
41
49
|
}
|
|
Binary file
|