@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.
@@ -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
- export const Spreadsheet = React.forwardRef((props, mainReference) => {
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[1].setData(JSON.parse(JSON.stringify(options.worksheets[1].data)))
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
- export function Worksheet () {
67
+ function Worksheet () {
68
68
  return (null);
69
- }
69
+ }
70
+
71
+ export { Spreadsheet, Worksheet, jspreadsheet };
package/package.json CHANGED
@@ -20,9 +20,9 @@
20
20
  "react"
21
21
  ],
22
22
  "dependencies": {
23
- "jspreadsheet": "^9.4.1"
23
+ "jspreadsheet": "^9.5.0"
24
24
  },
25
25
  "main": "dist/index.js",
26
26
  "types": "dist/index.d.ts",
27
- "version": "9.4.2"
27
+ "version": "9.5.0"
28
28
  }