@jspreadsheet/react 9.4.2 → 9.5.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/dist/index.d.ts +12 -0
- package/dist/index.js +8 -6
- package/package.json +2 -2
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Official Type definitions for Jspreadsheet React
|
|
3
|
+
* https://jspreadsheet.com/v10/docs/react
|
|
4
|
+
* Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
interface search {
|
|
8
|
+
(): any
|
|
9
|
+
[key: string]: any
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export declare function Spreadsheet(): any
|
package/dist/index.js
CHANGED
|
@@ -5,8 +5,6 @@ import jspreadsheet from 'jspreadsheet';
|
|
|
5
5
|
import "/node_modules/jspreadsheet/dist/jspreadsheet.css";
|
|
6
6
|
import "/node_modules/jsuites/dist/jsuites.css";
|
|
7
7
|
|
|
8
|
-
window.jss = jspreadsheet;
|
|
9
|
-
|
|
10
8
|
const extractWorksheetProperties = function(props) {
|
|
11
9
|
this.worksheets.push({
|
|
12
10
|
minDimensions: [10, 10],
|
|
@@ -14,8 +12,10 @@ const extractWorksheetProperties = function(props) {
|
|
|
14
12
|
});
|
|
15
13
|
}
|
|
16
14
|
|
|
15
|
+
window.jspreadsheet = jspreadsheet;
|
|
16
|
+
|
|
17
17
|
// @ts-ignore
|
|
18
|
-
|
|
18
|
+
const Spreadsheet = React.forwardRef((props, mainReference) => {
|
|
19
19
|
// Set the license
|
|
20
20
|
if (props.license) {
|
|
21
21
|
jspreadsheet.setLicense(props.license);
|
|
@@ -49,7 +49,7 @@ export const Spreadsheet = React.forwardRef((props, mainReference) => {
|
|
|
49
49
|
/*useEffect(function() {
|
|
50
50
|
// Track changes in the data
|
|
51
51
|
if (jssDom.current.innerText) {
|
|
52
|
-
mainReference.current[
|
|
52
|
+
mainReference.current[0].setData(JSON.parse(JSON.stringify(options.worksheets[0].data)))
|
|
53
53
|
}
|
|
54
54
|
}, [options.worksheets[0].data]);*/
|
|
55
55
|
|
|
@@ -64,6 +64,8 @@ export const Spreadsheet = React.forwardRef((props, mainReference) => {
|
|
|
64
64
|
return React.createElement("div", { ref: jssDom });
|
|
65
65
|
})
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
function Worksheet () {
|
|
68
68
|
return (null);
|
|
69
|
-
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export { Spreadsheet, Worksheet, jspreadsheet };
|