dhx-chart 8.0.2 → 8.1.0
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/codebase/chart.min.js +3 -3
- package/codebase/types/ts-chart/sources/Export.d.ts +4 -3
- package/codebase/types/ts-common/types.d.ts +31 -0
- package/codebase/types/ts-data/sources/types.d.ts +1 -0
- package/codebase/types/ts-grid/sources/Exporter.d.ts +7 -1
- package/codebase/types/ts-grid/sources/Grid.d.ts +2 -0
- package/codebase/types/ts-grid/sources/helpers/data.d.ts +2 -1
- package/codebase/types/ts-grid/sources/types.d.ts +12 -2
- package/codebase/types/ts-grid/sources/ui/FixedCols.d.ts +1 -1
- package/codebase/types/ts-grid/sources/ui/render.d.ts +4 -1
- package/package.json +1 -1
- package/readme.txt +1 -1
- package/whatsnew.txt +23 -6
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { View } from "../../ts-common/view";
|
|
2
|
+
import { IPDFConfig, IPNGConfig } from "../../ts-common/types";
|
|
2
3
|
export declare class Exporter {
|
|
3
4
|
private _name;
|
|
4
5
|
private _view;
|
|
5
6
|
private _version;
|
|
6
7
|
constructor(_name: string, _view: View);
|
|
7
|
-
pdf(config
|
|
8
|
-
png(config
|
|
9
|
-
|
|
8
|
+
pdf(config?: IPDFConfig): void;
|
|
9
|
+
png(config?: IPNGConfig): void;
|
|
10
|
+
private _rawExport;
|
|
10
11
|
}
|
|
@@ -42,3 +42,34 @@ export interface ITouchParam {
|
|
|
42
42
|
timeStamp?: number;
|
|
43
43
|
dblDuration?: number;
|
|
44
44
|
}
|
|
45
|
+
export declare type TExportType = "pdf" | "png";
|
|
46
|
+
export declare type TPaperFormat = "Letter" | "Legal" | "Tabloid" | "Ledger" | "A0" | "A1" | "A2" | "A3" | "A4" | "A5" | "A6";
|
|
47
|
+
export interface IExportFileConfig {
|
|
48
|
+
url?: string;
|
|
49
|
+
name?: string;
|
|
50
|
+
header?: string;
|
|
51
|
+
footer?: string;
|
|
52
|
+
exportStyles?: boolean | string[];
|
|
53
|
+
theme?: string;
|
|
54
|
+
}
|
|
55
|
+
export interface IPDFConfig extends IExportFileConfig {
|
|
56
|
+
pdf?: {
|
|
57
|
+
scale?: number;
|
|
58
|
+
landscape?: boolean;
|
|
59
|
+
format?: TPaperFormat;
|
|
60
|
+
margin?: {
|
|
61
|
+
top?: string | number;
|
|
62
|
+
right?: string | number;
|
|
63
|
+
bottom?: string | number;
|
|
64
|
+
left?: string | number;
|
|
65
|
+
};
|
|
66
|
+
width?: string;
|
|
67
|
+
height?: string;
|
|
68
|
+
pageRanges?: string;
|
|
69
|
+
displayHeaderFooter?: boolean;
|
|
70
|
+
footerTemplate?: string;
|
|
71
|
+
headerTemplate?: string;
|
|
72
|
+
printBackground?: boolean;
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
export declare type IPNGConfig = IExportFileConfig;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { ICsvExportConfig, IGrid, IXlsxExportConfig } from "./types";
|
|
2
|
+
import { IPDFConfig, IPNGConfig, TExportType } from "../../ts-common/types";
|
|
2
3
|
export declare class Exporter {
|
|
4
|
+
private _name;
|
|
5
|
+
private _version;
|
|
3
6
|
private _view;
|
|
4
|
-
constructor(_view: IGrid);
|
|
7
|
+
constructor(_name: string, _version: string, _view: IGrid);
|
|
8
|
+
pdf(config?: IPDFConfig): void;
|
|
9
|
+
png(config?: IPNGConfig): void;
|
|
5
10
|
xlsx(config?: IXlsxExportConfig): {
|
|
6
11
|
name: string;
|
|
7
12
|
columns: any[];
|
|
@@ -22,4 +27,5 @@ export declare class Exporter {
|
|
|
22
27
|
private _export;
|
|
23
28
|
private getFlatCSV;
|
|
24
29
|
private _getCSV;
|
|
30
|
+
protected _rawExport(config: IPNGConfig | IPDFConfig, mode: TExportType, view: any): void;
|
|
25
31
|
}
|
|
@@ -6,6 +6,7 @@ import { DataEvents, DragEvents, IDataCollection, IDataEventsHandlersMap, IDataI
|
|
|
6
6
|
import { Exporter } from "./Exporter";
|
|
7
7
|
import { Dirs, EditorType, GridEvents, IAdjustBy, ICellRect, ICol, IContentList, ICoords, IEventHandlersMap, IGrid, IGridConfig, IRow, IScrollState, ISelection, ISpan, GridSystemEvents, ISystemEventHandlersMap, IColumnsWidth, ISortingState, SortFunction, IHeaderFilter } from "./types";
|
|
8
8
|
export declare class Grid extends View implements IGrid {
|
|
9
|
+
version: string;
|
|
9
10
|
data: IDataCollection;
|
|
10
11
|
config: IGridConfig;
|
|
11
12
|
events: IEventSystem<DataEvents | GridEvents | DragEvents, IEventHandlersMap & IDataEventsHandlersMap & IDragEventsHandlersMap>;
|
|
@@ -76,4 +77,5 @@ export declare class Grid extends View implements IGrid {
|
|
|
76
77
|
private _destroyContent;
|
|
77
78
|
private _render;
|
|
78
79
|
private _initHotKey;
|
|
80
|
+
private _normalizeConfig;
|
|
79
81
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IContainerConfig } from "../../../ts-common/core";
|
|
2
|
-
import { ICol, IColumnsWidth, IGridConfig, IRendererConfig, IRow, colType } from "./../types";
|
|
2
|
+
import { ICol, IColumnsWidth, IGridConfig, IRendererConfig, IRow, colType, TOption } from "./../types";
|
|
3
3
|
export declare function normalizeColumns({ columns, htmlEnable }: IGridConfig, configChanged?: boolean): void;
|
|
4
4
|
export declare function countColumns(config: IGridConfig, columns: ICol[]): number;
|
|
5
5
|
export declare function calculatePositions(width: number, height: number, scroll: any, conf: IRendererConfig, data: IRow[]): {
|
|
@@ -17,3 +17,4 @@ export declare const getCalculatedRowHeight: (height: number, config?: {
|
|
|
17
17
|
export declare const getTreeCellWidthOffset: (row: IRow) => number;
|
|
18
18
|
export declare const getMaxColsWidth: (rows: IRow[], cols: ICol[], config?: IContainerConfig, target?: import("../../../ts-grid").AdjustTargetType) => IColumnsWidth;
|
|
19
19
|
export declare function toFormat(value: any, type?: colType, format?: string): any;
|
|
20
|
+
export declare function getEditorOptions(col: ICol, row?: IRow): TOption[];
|
|
@@ -14,7 +14,7 @@ export interface IGridConfig extends IDragConfig {
|
|
|
14
14
|
data?: any[];
|
|
15
15
|
type?: "tree";
|
|
16
16
|
width?: number;
|
|
17
|
-
height?: number;
|
|
17
|
+
height?: number | "auto";
|
|
18
18
|
sortable?: boolean;
|
|
19
19
|
rowCss?: (row: IRow) => string;
|
|
20
20
|
leftSplit?: number;
|
|
@@ -43,7 +43,10 @@ export interface IGridConfig extends IDragConfig {
|
|
|
43
43
|
[className: string]: (event: Event, item: ICellObj) => void;
|
|
44
44
|
};
|
|
45
45
|
};
|
|
46
|
+
exportStyles?: boolean | string[];
|
|
46
47
|
rootParent?: Id;
|
|
48
|
+
$width?: number;
|
|
49
|
+
$height?: number;
|
|
47
50
|
$headerLevel?: number;
|
|
48
51
|
$footerLevel?: number;
|
|
49
52
|
$totalWidth?: number;
|
|
@@ -60,6 +63,7 @@ export interface IGridConfig extends IDragConfig {
|
|
|
60
63
|
};
|
|
61
64
|
$resizing?: string | number;
|
|
62
65
|
$scrollBarWidth?: IScrollBarWidth;
|
|
66
|
+
$data?: any[];
|
|
63
67
|
groupTitleTemplate?: (groupName: string, groupItems: IDataItem[]) => string;
|
|
64
68
|
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
65
69
|
editing?: boolean;
|
|
@@ -190,6 +194,11 @@ export interface IHeaderFilter {
|
|
|
190
194
|
export interface ICellRect extends ICoords, ISizes {
|
|
191
195
|
}
|
|
192
196
|
export declare type colType = "string" | "number" | "boolean" | "date" | "percent" | any;
|
|
197
|
+
export interface IOption {
|
|
198
|
+
id: Id;
|
|
199
|
+
value: string;
|
|
200
|
+
}
|
|
201
|
+
export declare type TOption = IOption | string;
|
|
193
202
|
export interface ICol {
|
|
194
203
|
id: Id;
|
|
195
204
|
width?: number;
|
|
@@ -205,7 +214,7 @@ export interface ICol {
|
|
|
205
214
|
editable?: boolean;
|
|
206
215
|
resizable?: boolean;
|
|
207
216
|
sortable?: boolean;
|
|
208
|
-
options?:
|
|
217
|
+
options?: (col: ICol, row?: IRow) => TOption[] | TOption[];
|
|
209
218
|
draggable?: boolean;
|
|
210
219
|
htmlEnable?: boolean;
|
|
211
220
|
template?: (cellValue: any, row: IRow, col: ICol) => string;
|
|
@@ -223,6 +232,7 @@ export interface ICol {
|
|
|
223
232
|
$width?: number;
|
|
224
233
|
$fixed?: boolean;
|
|
225
234
|
$htmlEnable?: boolean;
|
|
235
|
+
$customOptions?: any;
|
|
226
236
|
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
227
237
|
dateFormat?: string;
|
|
228
238
|
/** @deprecated See a documentation: https://docs.dhtmlx.com/ */
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ILayoutState, IRendererConfig, Split } from "./../types";
|
|
2
2
|
export declare function getFixedColsHeader(renderConfig: IRendererConfig, layout: ILayoutState, mode: Split.left | Split.right): any;
|
|
3
|
-
export declare function getFixedCols(renderConfig: IRendererConfig, layout: ILayoutState, mode: Split.left | Split.right): any[];
|
|
3
|
+
export declare function getFixedCols(renderConfig: IRendererConfig, layout: ILayoutState, mode: Split.left | Split.right, source?: Split.top | Split.bottom): any[];
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { IGrid, IGridConfig, IProGrid, IRendererConfig, IRow, Split, IScrollBarWidth } from "../types";
|
|
2
2
|
export declare const BORDERS = 2;
|
|
3
|
-
export declare function calcScrollBarWidth(config: IGridConfig | IRendererConfig, customScroll?: boolean
|
|
3
|
+
export declare function calcScrollBarWidth(config: IGridConfig | IRendererConfig, customScroll?: boolean, sizes?: {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}): IScrollBarWidth;
|
|
4
7
|
export declare function getCurrFixedCols(config: IGridConfig, split: Split.left | Split.right): import("../types").ICol[];
|
|
5
8
|
export declare function getRenderConfig(obj: any, data: IRow[], wrapperSizes: any): IRendererConfig;
|
|
6
9
|
export declare function getEvents(config: IRendererConfig, mode?: Split): {};
|
package/package.json
CHANGED
package/readme.txt
CHANGED
package/whatsnew.txt
CHANGED
|
@@ -1,9 +1,26 @@
|
|
|
1
|
-
Version 8.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
# Version 8.1 (April 18, 2023)
|
|
2
|
+
|
|
3
|
+
### New functionality
|
|
4
|
+
|
|
5
|
+
- New "exportStyles" property
|
|
6
|
+
|
|
7
|
+
### Updates
|
|
8
|
+
|
|
9
|
+
- The "pdf()" method was updated:
|
|
10
|
+
- new options of the export object are added: "theme", "exportStyles"
|
|
11
|
+
- new options of the pdf object are added: "pageRanges", "displayHeaderFooter", "footerTemplate", "headerTemplate"
|
|
12
|
+
- The "png()" method was updated:
|
|
13
|
+
- new options of the export object are added: "theme", "exportStyles"
|
|
14
|
+
|
|
15
|
+
Version 8.0.3 (April 12, 2023)
|
|
16
|
+
----------------------------
|
|
17
|
+
|
|
18
|
+
Version 8.0.2 (March 20, 2023)
|
|
19
|
+
----------------------------
|
|
20
|
+
|
|
21
|
+
Version 8.0.1 (March 13, 2023)
|
|
22
|
+
----------------------------
|
|
23
|
+
|
|
7
24
|
Version 8.0.0 (February 24, 2023)
|
|
8
25
|
|
|
9
26
|
### New functionality
|