Skip to content

Commit

Permalink
Update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
jmaister committed Apr 22, 2023
1 parent bb44bad commit ea1011b
Show file tree
Hide file tree
Showing 8 changed files with 1,246 additions and 926 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@

# Revision history:

### 3.9.4

* _Update npm dependencies to fix vulnerabilities_

### 3.9.3

* Fix TypeScript exported types
Expand Down
90 changes: 45 additions & 45 deletions dist/excellentexport.d.ts
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 (jordiburgos@gmail.com)
* @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 (jordiburgos@gmail.com)
* @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;
2 changes: 1 addition & 1 deletion dist/excellentexport.js

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions dist/format.d.ts
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;
}
60 changes: 30 additions & 30 deletions dist/utils.d.ts
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;
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "excellentexport",
"version": "3.9.3",
"version": "3.9.4",
"description": "Client side JavaScript export to Excel or CSV",
"license": "MIT",
"homepage": "http://jordiburgos.com",
Expand All @@ -27,30 +27,30 @@
},
"main": "dist/excellentexport.js",
"devDependencies": {
"@babel/core": "7.20.12",
"@babel/core": "7.21.4",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-transform-flow-strip-types": "7.19.0",
"@babel/preset-env": "7.20.2",
"@types/jest": "29.4.0",
"@babel/plugin-transform-flow-strip-types": "7.21.0",
"@babel/preset-env": "7.21.4",
"@types/jest": "29.5.1",
"@types/jest-environment-puppeteer": "5.0.3",
"@types/node": "18.13.0",
"@types/node": "18.15.13",
"babel-loader": "9.1.2",
"blob-polyfill": "7.0.20220408",
"coveralls": "3.1.1",
"cross-env": "7.0.3",
"html-loader": "4.2.0",
"jest": "29.4.2",
"jest-environment-jsdom": "^29.4.2",
"jest-puppeteer": "7.0.0",
"puppeteer": "19.6.3",
"ts-jest": "29.0.5",
"jest": "29.5.0",
"jest-environment-jsdom": "^29.5.0",
"jest-puppeteer": "8.0.6",
"puppeteer": "19.10.1",
"ts-jest": "29.1.0",
"ts-loader": "9.4.2",
"ts-node": "10.9.1",
"typescript": "4.9.5",
"webdriverio": "8.3.5",
"webpack": "5.75.0",
"webpack-cli": "5.0.1",
"webpack-dev-server": "4.11.1",
"typescript": "5.0.4",
"webdriverio": "8.8.6",
"webpack": "5.80.0",
"webpack-cli": "5.0.2",
"webpack-dev-server": "4.13.3",
"webpack-node-externals": "3.0.0",
"xlsx": "0.18.5"
},
Expand Down
2 changes: 1 addition & 1 deletion src/excellentexport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export type ExcellentExportType = {

const ExcellentExport = function() {

const version = "3.9.3";
const version = "3.9.4";

/*
ExcellentExport.convert(options, sheets);
Expand Down
Loading

0 comments on commit ea1011b

Please sign in to comment.