-
-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
1,246 additions
and
926 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
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 |
---|---|---|
@@ -1,45 +1,45 @@ | ||
/** | ||
* ExcellentExport 3.7.2 | ||
* A client side Javascript export to Excel. | ||
* | ||
* @author: Jordi Burgos ([email protected]) | ||
* @url: https://github.com/jmaister/excellentexport | ||
* | ||
*/ | ||
import { CellTypes, FormatDefinition, CellFormats, CellPatterns } from './format'; | ||
declare global { | ||
interface Navigator { | ||
msSaveBlob?: (blob: any, defaultName?: string) => boolean; | ||
} | ||
} | ||
export interface ConvertOptions { | ||
anchor?: (string | HTMLAnchorElement); | ||
openAsDownload?: boolean; | ||
format: ('csv' | 'xls' | 'xlsx'); | ||
filename?: string; | ||
rtl?: boolean; | ||
} | ||
export interface FromOptions { | ||
table?: (string | HTMLTableElement); | ||
array?: any[][]; | ||
} | ||
export interface SheetOptions { | ||
name: string; | ||
from: FromOptions; | ||
removeColumns?: number[]; | ||
filterRowFn?(row: any[]): boolean; | ||
fixValue?(value: any, row: number, column: number): any; | ||
fixArray?(array: any[][]): any[][]; | ||
rtl?: boolean; | ||
formats?: (FormatDefinition | null)[]; | ||
} | ||
declare const ExcellentExport: { | ||
version: () => string; | ||
excel: (anchor: (HTMLAnchorElement | string), table: HTMLTableElement, name: string) => boolean; | ||
csv: (anchor: (HTMLAnchorElement | string), table: HTMLTableElement, delimiter?: string, newLine?: string) => boolean; | ||
convert: (options: ConvertOptions, sheets: SheetOptions[]) => string | false; | ||
formats: CellFormats; | ||
cellTypes: typeof CellTypes; | ||
cellPatterns: typeof CellPatterns; | ||
}; | ||
export default ExcellentExport; | ||
/** | ||
* ExcellentExport 3.7.2 | ||
* A client side Javascript export to Excel. | ||
* | ||
* @author: Jordi Burgos ([email protected]) | ||
* @url: https://github.com/jmaister/excellentexport | ||
* | ||
*/ | ||
import { CellTypes, FormatDefinition, CellFormats, CellPatterns } from './format'; | ||
declare global { | ||
interface Navigator { | ||
msSaveBlob?: (blob: any, defaultName?: string) => boolean; | ||
} | ||
} | ||
export interface ConvertOptions { | ||
anchor?: (string | HTMLAnchorElement); | ||
openAsDownload?: boolean; | ||
format: ('csv' | 'xls' | 'xlsx'); | ||
filename?: string; | ||
rtl?: boolean; | ||
} | ||
export interface FromOptions { | ||
table?: (string | HTMLTableElement); | ||
array?: any[][]; | ||
} | ||
export interface SheetOptions { | ||
name: string; | ||
from: FromOptions; | ||
removeColumns?: number[]; | ||
filterRowFn?(row: any[]): boolean; | ||
fixValue?(value: any, row: number, column: number): any; | ||
fixArray?(array: any[][]): any[][]; | ||
rtl?: boolean; | ||
formats?: (FormatDefinition | null)[]; | ||
} | ||
declare const ExcellentExport: { | ||
version: () => string; | ||
excel: (anchor: (HTMLAnchorElement | string), table: HTMLTableElement, name: string) => boolean; | ||
csv: (anchor: (HTMLAnchorElement | string), table: HTMLTableElement, delimiter?: string, newLine?: string) => boolean; | ||
convert: (options: ConvertOptions, sheets: SheetOptions[]) => string | false; | ||
formats: CellFormats; | ||
cellTypes: typeof CellTypes; | ||
cellPatterns: typeof CellPatterns; | ||
}; | ||
export default ExcellentExport; |
Large diffs are not rendered by default.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
export declare enum CellTypes { | ||
TEXT = "s", | ||
NUMBER = "n", | ||
DATE = "d", | ||
BOOLEAN = "b" | ||
} | ||
export declare enum CellPatterns { | ||
INTEGER = "0", | ||
DECIMAL = "0.00", | ||
DATE = "dd/mm/yyyy", | ||
TIME = "hh:mm:ss", | ||
DATETIME = "dd/mm/yyyy hh:mm:ss", | ||
CURRENCY = "[$$-409]#,##0.00;[RED]-[$$-409]#,##0.00", | ||
PERCENTAGE = "0.00%", | ||
EXPONENT = "0.00E+00", | ||
TEXT = "@" | ||
} | ||
export type CellType = 's' | 'n' | 'd' | 'b'; | ||
export interface CellFormat { | ||
type: CellType; | ||
pattern?: string; | ||
} | ||
export interface CellFormats { | ||
[key: string]: CellFormat; | ||
} | ||
export declare const PredefinedFormat: CellFormats; | ||
export interface FormatDefinition { | ||
range: string; | ||
format?: CellFormat; | ||
} | ||
export declare enum CellTypes { | ||
TEXT = "s", | ||
NUMBER = "n", | ||
DATE = "d", | ||
BOOLEAN = "b" | ||
} | ||
export declare enum CellPatterns { | ||
INTEGER = "0", | ||
DECIMAL = "0.00", | ||
DATE = "dd/mm/yyyy", | ||
TIME = "hh:mm:ss", | ||
DATETIME = "dd/mm/yyyy hh:mm:ss", | ||
CURRENCY = "[$$-409]#,##0.00;[RED]-[$$-409]#,##0.00", | ||
PERCENTAGE = "0.00%", | ||
EXPONENT = "0.00E+00", | ||
TEXT = "@" | ||
} | ||
export type CellType = 's' | 'n' | 'd' | 'b'; | ||
export interface CellFormat { | ||
type: CellType; | ||
pattern?: string; | ||
} | ||
export interface CellFormats { | ||
[key: string]: CellFormat; | ||
} | ||
export declare const PredefinedFormat: CellFormats; | ||
export interface FormatDefinition { | ||
range: string; | ||
format?: CellFormat; | ||
} |
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 |
---|---|---|
@@ -1,30 +1,30 @@ | ||
export declare const b64toBlob: (b64Data: string, contentType: string, sliceSize?: number) => Blob; | ||
export declare const templates: { | ||
excel: string; | ||
}; | ||
/** | ||
* Convert a string to Base64. | ||
*/ | ||
export declare const base64: (s: string) => string; | ||
export declare const format: (s: string, context: any) => string; | ||
/** | ||
* Get element by ID. | ||
* @param {*} element | ||
*/ | ||
export declare const getTable: (element: (HTMLTableElement | string)) => HTMLTableElement; | ||
/** | ||
* Get element by ID. | ||
* @param {*} element | ||
*/ | ||
export declare const getAnchor: (element: (HTMLAnchorElement | string)) => HTMLAnchorElement; | ||
/** | ||
* Encode a value for CSV. | ||
* @param {*} value | ||
*/ | ||
export declare const fixCSVField: (value: string, csvDelimiter: string) => string; | ||
export declare const tableToArray: (table: HTMLTableElement) => any[][]; | ||
export declare const tableToCSV: (table: HTMLTableElement, csvDelimiter?: string, csvNewLine?: string) => string; | ||
export declare const createDownloadLink: (anchor: HTMLAnchorElement, base64data: string, exporttype: string, filename: string) => boolean; | ||
export declare const string2ArrayBuffer: (s: string) => ArrayBuffer; | ||
export declare const removeColumns: (dataArray: any[][], columnIndexes: number[]) => void; | ||
export declare const hasContent: (value: any) => boolean; | ||
export declare const b64toBlob: (b64Data: string, contentType: string, sliceSize?: number) => Blob; | ||
export declare const templates: { | ||
excel: string; | ||
}; | ||
/** | ||
* Convert a string to Base64. | ||
*/ | ||
export declare const base64: (s: string) => string; | ||
export declare const format: (s: string, context: any) => string; | ||
/** | ||
* Get element by ID. | ||
* @param {*} element | ||
*/ | ||
export declare const getTable: (element: (HTMLTableElement | string)) => HTMLTableElement; | ||
/** | ||
* Get element by ID. | ||
* @param {*} element | ||
*/ | ||
export declare const getAnchor: (element: (HTMLAnchorElement | string)) => HTMLAnchorElement; | ||
/** | ||
* Encode a value for CSV. | ||
* @param {*} value | ||
*/ | ||
export declare const fixCSVField: (value: string, csvDelimiter: string) => string; | ||
export declare const tableToArray: (table: HTMLTableElement) => any[][]; | ||
export declare const tableToCSV: (table: HTMLTableElement, csvDelimiter?: string, csvNewLine?: string) => string; | ||
export declare const createDownloadLink: (anchor: HTMLAnchorElement, base64data: string, exporttype: string, filename: string) => boolean; | ||
export declare const string2ArrayBuffer: (s: string) => ArrayBuffer; | ||
export declare const removeColumns: (dataArray: any[][], columnIndexes: number[]) => void; | ||
export declare const hasContent: (value: any) => boolean; |
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
Oops, something went wrong.