excellentexport 3.9.2 → 3.9.4

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
@@ -21,7 +21,11 @@
21
21
 
22
22
  # Revision history:
23
23
 
24
- ### 3.9.1
24
+ ### 3.9.4
25
+
26
+ * _Update npm dependencies to fix vulnerabilities_
27
+
28
+ ### 3.9.3
25
29
 
26
30
  * Fix TypeScript exported types
27
31
 
@@ -282,15 +286,28 @@ Each element in the format array consists on:
282
286
  }
283
287
  ```
284
288
 
285
- `format` can be used from one of the predefined types if you use TypeScript
289
+ Example:
286
290
 
287
291
  ```typescript
288
- {
289
- "range": "A1:A100",
290
- "format": PredefinedFormat.INTEGER
291
- }
292
+ formats: [
293
+ {
294
+ range: "C2:C20",
295
+ format: {
296
+ type: "n",
297
+ pattern: "0.00",
298
+ },
299
+ },
300
+ {
301
+ range: "C2:C20",
302
+ format: ExcellentExport.formats.NUMBER,
303
+ }
304
+ ],
305
+
292
306
  ```
293
307
 
308
+ `format` can be used from one of the predefined types if you use TypeScript
309
+
310
+
294
311
  `cell_type` can be one of the followint:
295
312
 
296
313
  's': String
@@ -1,43 +1,45 @@
1
- /**
2
- * ExcellentExport 3.7.2
3
- * A client side Javascript export to Excel.
4
- *
5
- * @author: Jordi Burgos (jordiburgos@gmail.com)
6
- * @url: https://github.com/jmaister/excellentexport
7
- *
8
- */
9
- import { FormatDefinition } from './format';
10
- declare global {
11
- interface Navigator {
12
- msSaveBlob?: (blob: any, defaultName?: string) => boolean;
13
- }
14
- }
15
- export interface ConvertOptions {
16
- anchor?: (string | HTMLAnchorElement);
17
- openAsDownload?: boolean;
18
- format: ('csv' | 'xls' | 'xlsx');
19
- filename?: string;
20
- rtl?: boolean;
21
- }
22
- export interface FromOptions {
23
- table?: (string | HTMLTableElement);
24
- array?: any[][];
25
- }
26
- export interface SheetOptions {
27
- name: string;
28
- from: FromOptions;
29
- removeColumns?: number[];
30
- filterRowFn?(row: any[]): boolean;
31
- fixValue?(value: any, row: number, column: number): any;
32
- fixArray?(array: any[][]): any[][];
33
- rtl?: boolean;
34
- formats?: (FormatDefinition | null)[];
35
- }
36
- declare const ExcellentExport: {
37
- version: () => string;
38
- formats: import("./format").CellFormats;
39
- excel: (anchor: (HTMLAnchorElement | string), table: HTMLTableElement, name: string) => boolean;
40
- csv: (anchor: (HTMLAnchorElement | string), table: HTMLTableElement, delimiter?: string, newLine?: string) => boolean;
41
- convert: (options: ConvertOptions, sheets: SheetOptions[]) => string | false;
42
- };
43
- export default ExcellentExport;
1
+ /**
2
+ * ExcellentExport 3.7.2
3
+ * A client side Javascript export to Excel.
4
+ *
5
+ * @author: Jordi Burgos (jordiburgos@gmail.com)
6
+ * @url: https://github.com/jmaister/excellentexport
7
+ *
8
+ */
9
+ import { CellTypes, FormatDefinition, CellFormats, CellPatterns } from './format';
10
+ declare global {
11
+ interface Navigator {
12
+ msSaveBlob?: (blob: any, defaultName?: string) => boolean;
13
+ }
14
+ }
15
+ export interface ConvertOptions {
16
+ anchor?: (string | HTMLAnchorElement);
17
+ openAsDownload?: boolean;
18
+ format: ('csv' | 'xls' | 'xlsx');
19
+ filename?: string;
20
+ rtl?: boolean;
21
+ }
22
+ export interface FromOptions {
23
+ table?: (string | HTMLTableElement);
24
+ array?: any[][];
25
+ }
26
+ export interface SheetOptions {
27
+ name: string;
28
+ from: FromOptions;
29
+ removeColumns?: number[];
30
+ filterRowFn?(row: any[]): boolean;
31
+ fixValue?(value: any, row: number, column: number): any;
32
+ fixArray?(array: any[][]): any[][];
33
+ rtl?: boolean;
34
+ formats?: (FormatDefinition | null)[];
35
+ }
36
+ declare const ExcellentExport: {
37
+ version: () => string;
38
+ excel: (anchor: (HTMLAnchorElement | string), table: HTMLTableElement, name: string) => boolean;
39
+ csv: (anchor: (HTMLAnchorElement | string), table: HTMLTableElement, delimiter?: string, newLine?: string) => boolean;
40
+ convert: (options: ConvertOptions, sheets: SheetOptions[]) => string | false;
41
+ formats: CellFormats;
42
+ cellTypes: typeof CellTypes;
43
+ cellPatterns: typeof CellPatterns;
44
+ };
45
+ export default ExcellentExport;