@chalabi/svelte-sheets 2.0.0 → 2.0.1

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 CHANGED
@@ -35,9 +35,15 @@ You will need to have typescript svelte-preprocess enabled in your webpack/rollu
35
35
  let data = [
36
36
  ["mazda", "renault", "volkswagen"][("10000km", "20000km", "300000km")],
37
37
  ];
38
+ const options = {
39
+ tableHeight: "70vh",
40
+ defaultColWidth: "120px",
41
+ readOnly: true,
42
+ disableHover: true,
43
+ };
38
44
  </script>
39
45
 
40
- <Sheet {style} {mergeCells} {columns} {data} />
46
+ <Sheet {style} {mergeCells} {columns} {data} {options} theme="dark" />
41
47
  ```
42
48
 
43
49
  Alternatively you can use the toolbar to open any kind of excel files
package/dist/Open.svelte CHANGED
@@ -1,4 +1,4 @@
1
- <script lang="ts">import XLSX from "xlsx";
1
+ <script lang="ts">import * as XLSX from "xlsx";
2
2
  import { convert } from "./convert.js";
3
3
  export let onload;
4
4
  export let sheetNames;
package/dist/Sheet.svelte CHANGED
@@ -19,7 +19,7 @@ var __rest = (this && this.__rest) || function (s, e) {
19
19
  return t;
20
20
  };
21
21
  import { onMount, tick } from "svelte";
22
- import XLSX from "xlsx";
22
+ import * as XLSX from "xlsx";
23
23
  import { resizable } from "./actions/index.js";
24
24
  import { draggable } from "./actions/draggable.js";
25
25
  import { defaultconfig } from "./defaultconfig.js";
@@ -1,4 +1,4 @@
1
- <script lang="ts">import XLSX from "xlsx";
1
+ <script lang="ts">import * as XLSX from "xlsx";
2
2
  import { convert } from "./convert.js";
3
3
  export let sheetNames;
4
4
  export let sheets = [];
@@ -1,4 +1,4 @@
1
- import XLSX from "xlsx";
1
+ import * as XLSX from "xlsx";
2
2
  export function selection(node, { selection, rows, columns }) {
3
3
  const viewport = node.getBoundingClientRect();
4
4
  const topleft = XLSX.utils.decode_cell(selection[0]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chalabi/svelte-sheets",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Run your excel sheet in the browser!",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",