From bf064b93dd0772f29063b42957771d10e7985885 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 30 Sep 2022 11:29:16 +0800 Subject: [PATCH 1/5] fix: type --- src/useExcelDownloder.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/useExcelDownloder.tsx b/src/useExcelDownloder.tsx index 917fb2c..fcb0d50 100644 --- a/src/useExcelDownloder.tsx +++ b/src/useExcelDownloder.tsx @@ -8,15 +8,15 @@ const Type = { export interface Api { data: any; - setData?: () => void; + setData?: (data: any) => void; filename: string; - setFilename?: () => void; + setFilename?: (filename: string) => void; type: string; - setType: () => void; + setType: (type: string) => void; style?: any; - setStyle?: () => void; + setStyle?: (style: any) => void; className?: any; - setClassName?: () => void; + setClassName?: (className: string) => void; } export interface Props { @@ -100,7 +100,7 @@ function useExcelDownloderComponent(api: Api) { export function useExcelDownloder() { const [data, setData] = React.useState({}); - const [filename, setFilename] = React.useState({}); + const [filename, setFilename] = React.useState(''); const [type, setType] = React.useState(Type.Link); const [style, setStyle] = React.useState({}); const [className, setClassName] = React.useState(''); From 340de8d9bd9bb2d8660217e2c413816308ac47c1 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 30 Sep 2022 11:37:04 +0800 Subject: [PATCH 2/5] fix: types --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index e6a1df6..6f65bd4 100644 --- a/package.json +++ b/package.json @@ -1,18 +1,18 @@ { - "name": "react-xls", + "name": "@coinsummer/react-xls", "version": "0.1.1", "description": "react-xls is the fastest in-browser excel ( .xls & .xlsx ) parser for React. It is full of useful features such as useExcelDownloader, ... etc.", - "author": "Bunlong ", + "author": "Max ", "license": "MIT", "repository": { "type": "git", - "url": "git+https://github.com/Bunlong/react-xls.git" + "url": "git+https://github.com/coinsummer/react-xls.git" }, "bugs": { - "url": "https://github.com/Bunlong/react-xls.git/issues" + "url": "https://github.com/coinsummer/react-xls.git/issues" }, "keywords": [], - "homepage": "https://github.com/Bunlong/react-xls", + "homepage": "https://github.com/coinsummer/react-xls", "main": "dist/react-xls.js", "module": "dist/react-xls.es.js", "jsnext:main": "dist/react-xls.es.js", From 05ce4a65d5fe06d50d53dd1ddfda6ac6188f1f71 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 30 Sep 2022 11:44:13 +0800 Subject: [PATCH 3/5] fix: types --- src/useExcelDownloder.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/useExcelDownloder.tsx b/src/useExcelDownloder.tsx index fcb0d50..598a1b9 100644 --- a/src/useExcelDownloder.tsx +++ b/src/useExcelDownloder.tsx @@ -8,15 +8,15 @@ const Type = { export interface Api { data: any; - setData?: (data: any) => void; + setData: (data: any) => void; filename: string; - setFilename?: (filename: string) => void; + setFilename: (filename: string) => void; type: string; setType: (type: string) => void; - style?: any; - setStyle?: (style: any) => void; - className?: any; - setClassName?: (className: string) => void; + style: any; + setStyle: (style: any) => void; + className: any; + setClassName: (className: string) => void; } export interface Props { From 9a27caebe0218a2bfb79a23434ba4f3111738a77 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 30 Sep 2022 11:44:41 +0800 Subject: [PATCH 4/5] fix: version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6f65bd4..391276f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@coinsummer/react-xls", - "version": "0.1.1", + "version": "0.1.2", "description": "react-xls is the fastest in-browser excel ( .xls & .xlsx ) parser for React. It is full of useful features such as useExcelDownloader, ... etc.", "author": "Max ", "license": "MIT", From 4b00e1213138f90a0fb9d61c452b9c119eec9f21 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 30 Sep 2022 11:49:55 +0800 Subject: [PATCH 5/5] fix: doc --- README.md | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0ec48f4..47efd35 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,13 @@ react-xls is the fastest in-browser excel ( .xls & .xlsx ) parser for React. react-xls is available on npm. It can be installed with the following command: ``` -npm install react-xls --save +npm install @coinsummer/react-xls --save ``` react-xls is available on yarn as well. It can be installed with the following command: ``` -yarn add react-xls --save +yarn add @coinsummer/react-xls --save ``` ## 💡 Usage @@ -35,7 +35,7 @@ yarn add react-xls --save ```js import React from 'react'; -import { useExcelDownloder } from 'react-xls'; +import { useExcelDownloder } from '@coinsummer/react-xls'; function App() { const { ExcelDownloder, Type } = useExcelDownloder(); @@ -77,7 +77,7 @@ export default App; ```js import React from 'react'; -import { useExcelDownloder } from 'react-xls'; +import { useExcelDownloder } from '@coinsummer/react-xls'; function App() { const { ExcelDownloder, Type } = useExcelDownloder(); diff --git a/package.json b/package.json index 391276f..de253c9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@coinsummer/react-xls", - "version": "0.1.2", + "version": "0.1.3", "description": "react-xls is the fastest in-browser excel ( .xls & .xlsx ) parser for React. It is full of useful features such as useExcelDownloader, ... etc.", "author": "Max ", "license": "MIT",