-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move download-csv to NextJS action (#1735)
--------- Co-authored-by: Nikita <nikita.develops.work@gmail.com> Co-authored-by: Nikita <93587872+ncarazon@users.noreply.github.com>
- Loading branch information
1 parent
68bfdbd
commit 1fb71f9
Showing
12 changed files
with
111 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
declare module "file-saver" { | ||
export = FileSaver; | ||
|
||
export as namespace saveAs; | ||
|
||
/** | ||
* FileSaver.js implements the saveAs() FileSaver interface in browsers that do not natively support it. | ||
* @param data - The actual file data blob or URL. | ||
* @param filename - The optional name of the file to be downloaded. If omitted, the name used in the file data will be used. If none is provided "download" will be used. | ||
* @param options - Optional FileSaver.js config | ||
*/ | ||
declare function FileSaver( | ||
data: Blob | string, | ||
filename?: string, | ||
options?: FileSaver.FileSaverOptions | ||
): void; | ||
|
||
/** | ||
* FileSaver.js implements the saveAs() FileSaver interface in browsers that do not natively support it. | ||
* @param data - The actual file data blob or URL. | ||
* @param filename - The optional name of the file to be downloaded. If omitted, the name used in the file data will be used. If none is provided "download" will be used. | ||
* @param disableAutoBOM - Optional & defaults to `true`. Set to `false` if you want FileSaver.js to automatically provide Unicode text encoding hints | ||
* @deprecated use `{ autoBom: false }` as the third argument | ||
*/ | ||
// tslint:disable-next-line:unified-signatures | ||
declare function FileSaver( | ||
data: Blob | string, | ||
filename?: string, | ||
disableAutoBOM?: boolean | ||
): void; | ||
|
||
declare namespace FileSaver { | ||
interface FileSaverOptions { | ||
/** | ||
* Automatically provide Unicode text encoding hints | ||
* @default false | ||
*/ | ||
autoBom: boolean; | ||
} | ||
|
||
const saveAs: typeof FileSaver; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
export function base64ToBlob(base64: string): Blob { | ||
const byteString = atob(base64.split(",")[1]); | ||
const mimeString = base64.split(",")[0].split(":")[1].split(";")[0]; | ||
const ab = new ArrayBuffer(byteString.length); | ||
const ia = new Uint8Array(ab); | ||
for (let i = 0; i < byteString.length; i++) { | ||
ia[i] = byteString.charCodeAt(i); | ||
} | ||
return new Blob([ab], { type: mimeString }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters