dhx-chart 9.2.8 → 9.3.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.css +1 -1
- package/codebase/chart.min.js +3 -3
- package/codebase/chart.min.js.map +1 -1
- package/codebase/types/ts-chart/sources/Export.d.ts +5 -4
- package/codebase/types/ts-common/core.d.ts +1 -1
- package/codebase/types/ts-common/date.d.ts +1 -0
- package/codebase/types/ts-grid/sources/ExtendedGrid.d.ts +3 -0
- package/codebase/types/ts-grid/sources/Grid.d.ts +6 -4
- package/codebase/types/ts-grid/sources/ProGrid.d.ts +4 -3
- package/codebase/types/ts-grid/sources/modules/Exporter.d.ts +45 -15
- package/codebase/types/ts-grid/sources/types.d.ts +28 -94
- package/codebase/types/ts-grid/sources/ui/common.d.ts +1 -0
- package/codebase/types/ts-grid/sources/ui/components/dragPanel.d.ts +6 -2
- package/codebase/types/ts-grid/sources/ui/content/ComboFilter.d.ts +13 -3
- package/codebase/types/ts-grid/sources/ui/content/DateFilter.d.ts +42 -0
- package/codebase/types/ts-grid/sources/ui/content/InputFilter.d.ts +11 -2
- package/codebase/types/ts-grid/sources/ui/content/SelectFilter.d.ts +11 -3
- package/codebase/types/ts-grid/sources/ui/content.d.ts +55 -2
- package/codebase/types/ts-grid/sources/ui/proContent.d.ts +37 -0
- package/codebase/types/ts-treegrid/sources/TreeGrid.d.ts +1 -1
- package/codebase/types/ts-treegrid/sources/types.d.ts +3 -2
- package/package.json +1 -1
- package/readme.txt +1 -1
- package/whatsnew.txt +15 -9
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { View } from "../../ts-common/view";
|
|
2
|
-
import { IPDFConfig, IPNGConfig } from "../../ts-common/types";
|
|
2
|
+
import { IPDFConfig, IPNGConfig, TExportType } from "../../ts-common/types";
|
|
3
3
|
export declare class Exporter {
|
|
4
4
|
private _name;
|
|
5
5
|
private _view;
|
|
6
6
|
private _version;
|
|
7
7
|
constructor(_name: string, _view: View);
|
|
8
|
-
pdf(config?: IPDFConfig): void
|
|
9
|
-
png(config?: IPNGConfig): void
|
|
10
|
-
|
|
8
|
+
pdf(config?: IPDFConfig): Promise<void>;
|
|
9
|
+
png(config?: IPNGConfig): Promise<void>;
|
|
10
|
+
protected _rawExport(config: IPDFConfig | IPNGConfig, mode: TExportType, view: View): Promise<void>;
|
|
11
|
+
private _normalizeLink;
|
|
11
12
|
}
|
|
@@ -18,7 +18,7 @@ export declare function isDefined<T>(some: T): boolean;
|
|
|
18
18
|
export declare function isId<T>(some: T): boolean;
|
|
19
19
|
export declare function range(from: number, to: number): number[];
|
|
20
20
|
export declare function isNumeric(val: any): boolean;
|
|
21
|
-
export declare function downloadFile(data: string, filename: string, mimeType?: string): void;
|
|
21
|
+
export declare function downloadFile(data: Blob | string, filename: string, mimeType?: string): void;
|
|
22
22
|
export declare function debounce(func: anyFunction, wait: number, immediate?: boolean): (...args: any[]) => void;
|
|
23
23
|
export declare function compare(obj1: any, obj2: any): boolean;
|
|
24
24
|
export declare const isType: (value: any) => string;
|
|
@@ -7,6 +7,7 @@ import { IRange } from "./modules/Range";
|
|
|
7
7
|
import { IBlockSelection } from "./modules/BlockSelection";
|
|
8
8
|
import { IClipboard } from "./modules/Clipboard";
|
|
9
9
|
import { IHistory } from "./modules/History";
|
|
10
|
+
import { IProContentList } from "./ui/proContent";
|
|
10
11
|
export declare class ExtendedGrid extends Grid implements IExtendedGrid {
|
|
11
12
|
range: IRange;
|
|
12
13
|
block: IBlockSelection;
|
|
@@ -14,6 +15,7 @@ export declare class ExtendedGrid extends Grid implements IExtendedGrid {
|
|
|
14
15
|
history: IHistory;
|
|
15
16
|
scrollView: ScrollView;
|
|
16
17
|
config: IExtendedGridConfig;
|
|
18
|
+
content: IProContentList;
|
|
17
19
|
constructor(container: HTMLElement | string | null, config?: IExtendedGridConfig);
|
|
18
20
|
expand(rowId: Id): void;
|
|
19
21
|
collapse(rowId: Id): void;
|
|
@@ -22,6 +24,7 @@ export declare class ExtendedGrid extends Grid implements IExtendedGrid {
|
|
|
22
24
|
getSubRow(id: Id): ISubViewCell | null;
|
|
23
25
|
destructor(): void;
|
|
24
26
|
protected _createView(): any;
|
|
27
|
+
protected _init(): void;
|
|
25
28
|
protected _dragInit(): void;
|
|
26
29
|
protected _setHTMLEventHandlers(): void;
|
|
27
30
|
protected _setEventHandlers(): void;
|
|
@@ -5,7 +5,9 @@ import { View } from "../../ts-common/view";
|
|
|
5
5
|
import { DataEvents, DragEvents, IDataCollection, IDataEventsHandlersMap, IDataItem, IDragEventsHandlersMap, TSortDir } from "../../ts-data";
|
|
6
6
|
import { Exporter } from "./modules/Exporter";
|
|
7
7
|
import { ISelection } from "./modules/Selection";
|
|
8
|
-
import { EditorType, GridEvents, IAdjustBy, ICellRect, ICol,
|
|
8
|
+
import { EditorType, GridEvents, IAdjustBy, ICellRect, ICol, ICoords, IEventHandlersMap, IGrid, IGridConfig, IRow, IScrollState, ISpan, GridSystemEvents, ISystemEventHandlersMap, IColumnsWidth, SortFunction, IAdjustColumns, IDirection, IFooter, IHeader, INormalizeColumnsParams, ISummaryList, ISortingStates } from "./types";
|
|
9
|
+
import { IContentList, IHeaderFilter } from "./ui/content";
|
|
10
|
+
import { IProContentList } from "./ui/proContent";
|
|
9
11
|
export declare class Grid extends View implements IGrid {
|
|
10
12
|
version: string;
|
|
11
13
|
name: "grid";
|
|
@@ -13,7 +15,7 @@ export declare class Grid extends View implements IGrid {
|
|
|
13
15
|
config: IGridConfig;
|
|
14
16
|
events: IEventSystem<DataEvents | GridEvents | DragEvents, IEventHandlersMap & IDataEventsHandlersMap & IDragEventsHandlersMap>;
|
|
15
17
|
export: Exporter;
|
|
16
|
-
content: IContentList;
|
|
18
|
+
content: IContentList | IProContentList;
|
|
17
19
|
selection: ISelection;
|
|
18
20
|
keyManager: IKeyManager;
|
|
19
21
|
protected _touch: ITouchParam;
|
|
@@ -45,7 +47,7 @@ export declare class Grid extends View implements IGrid {
|
|
|
45
47
|
scroll(x: number, y: number): void;
|
|
46
48
|
scrollTo(rowId: Id, colId: Id): void;
|
|
47
49
|
adjustColumnWidth(colId: Id, adjust?: IAdjustBy): void;
|
|
48
|
-
getCellRect(rowId: Id, colId
|
|
50
|
+
getCellRect(rowId: Id, colId?: Id): ICellRect;
|
|
49
51
|
getColumn(colId: Id): ICol;
|
|
50
52
|
addSpan(spanObj: ISpan): void;
|
|
51
53
|
getSpan(rowId: Id, colId: Id): ISpan;
|
|
@@ -94,9 +96,9 @@ export declare class Grid extends View implements IGrid {
|
|
|
94
96
|
protected _hideColumn(column: ICol): void;
|
|
95
97
|
protected _showColumn(column: ICol): void;
|
|
96
98
|
protected _setSummary(): void;
|
|
99
|
+
protected _init(): void;
|
|
97
100
|
private _applyMethod;
|
|
98
101
|
private _canDataParse;
|
|
99
|
-
private _init;
|
|
100
102
|
private _attachDataCollection;
|
|
101
103
|
private _setMarks;
|
|
102
104
|
private _checkMarks;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ScrollView } from "../../ts-common/ScrollView";
|
|
2
2
|
import { TreeGridCollection } from "../../ts-treegrid";
|
|
3
|
-
import { EditorType, GridEvents, IAdjustBy, ICellRect, ICol,
|
|
3
|
+
import { EditorType, GridEvents, IAdjustBy, ICellRect, ICol, ICoords, IEventHandlersMap, IProGrid, IProGridConfig, ISpan, ISubViewCell, ISummaryList } from "./types";
|
|
4
4
|
import { IKeyManager } from "../../ts-common/KeyManager";
|
|
5
5
|
import { IEventSystem } from "../../ts-common/events";
|
|
6
6
|
import { Id } from "../../ts-common/types";
|
|
@@ -10,6 +10,7 @@ import { IRange } from "./modules/Range";
|
|
|
10
10
|
import { IBlockSelection } from "./modules/BlockSelection";
|
|
11
11
|
import { IClipboard } from "./modules/Clipboard";
|
|
12
12
|
import { IHistory } from "./modules/History";
|
|
13
|
+
import { IProContentList, IProHeaderFilter } from "./ui/proContent";
|
|
13
14
|
export declare class ProGrid implements IProGrid {
|
|
14
15
|
config: IProGridConfig;
|
|
15
16
|
scrollView: ScrollView;
|
|
@@ -17,7 +18,7 @@ export declare class ProGrid implements IProGrid {
|
|
|
17
18
|
name: string;
|
|
18
19
|
data: IDataCollection<IDataItem> & TreeGridCollection;
|
|
19
20
|
selection: ISelection;
|
|
20
|
-
content:
|
|
21
|
+
content: IProContentList;
|
|
21
22
|
keyManager: IKeyManager;
|
|
22
23
|
export: any;
|
|
23
24
|
range: IRange;
|
|
@@ -53,7 +54,7 @@ export declare class ProGrid implements IProGrid {
|
|
|
53
54
|
removeSpan(rowId: Id, colId: Id): void;
|
|
54
55
|
editCell(rowId: Id, colId: Id, editorType?: EditorType): void;
|
|
55
56
|
editEnd(withoutSave?: boolean): void;
|
|
56
|
-
getHeaderFilter(colId: Id):
|
|
57
|
+
getHeaderFilter(colId: Id): IProHeaderFilter;
|
|
57
58
|
getSummary(colId?: Id): ISummaryList;
|
|
58
59
|
getSubRow(id: Id): ISubViewCell | null;
|
|
59
60
|
getRootNode(): HTMLElement;
|
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IExportGridCell, IGrid, IProGrid, IProGridConfig, TExportConfigFunction } from "../types";
|
|
2
|
+
import { ICsvDriverConfig } from "../../../ts-data";
|
|
2
3
|
import { IPDFConfig, IPNGConfig, TExportType } from "../../../ts-common/types";
|
|
4
|
+
export type ExportType = "pdf" | "png" | "csv" | "xlsx";
|
|
5
|
+
export interface IXlsxExportConfig {
|
|
6
|
+
url?: string;
|
|
7
|
+
name?: string;
|
|
8
|
+
tableName?: string;
|
|
9
|
+
dateFormatMask?: string;
|
|
10
|
+
mapToExcelFormulas?: {
|
|
11
|
+
[key: string]: string;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface ICsvExportConfig extends ICsvDriverConfig {
|
|
15
|
+
name?: string;
|
|
16
|
+
asFile?: boolean;
|
|
17
|
+
flat?: boolean;
|
|
18
|
+
rowDelimiter?: string;
|
|
19
|
+
columnDelimiter?: string;
|
|
20
|
+
}
|
|
3
21
|
export interface IExportData {
|
|
4
22
|
data: {
|
|
5
23
|
name: string;
|
|
@@ -26,25 +44,37 @@ export interface IExportData {
|
|
|
26
44
|
}[];
|
|
27
45
|
}
|
|
28
46
|
export interface IExporter {
|
|
29
|
-
pdf: (config?: IPDFConfig) => void
|
|
30
|
-
png: (config?: IPNGConfig) => void
|
|
31
|
-
xlsx: (config?: IXlsxExportConfig) => IExportData
|
|
32
|
-
csv: (config?: ICsvExportConfig) => string
|
|
47
|
+
pdf: (config?: IPDFConfig) => Promise<void>;
|
|
48
|
+
png: (config?: IPNGConfig) => Promise<void>;
|
|
49
|
+
xlsx: (config?: IXlsxExportConfig) => Promise<IExportData>;
|
|
50
|
+
csv: (config?: ICsvExportConfig) => Promise<string>;
|
|
51
|
+
}
|
|
52
|
+
export interface IExportConfig extends IProGridConfig {
|
|
53
|
+
typeConfig?: IXlsxExportConfig | ICsvExportConfig | IPDFConfig | IPNGConfig;
|
|
33
54
|
}
|
|
34
55
|
export declare class Exporter implements IExporter {
|
|
56
|
+
private _xlsxWorker;
|
|
35
57
|
private _name;
|
|
36
58
|
private _version;
|
|
37
|
-
private
|
|
38
|
-
private
|
|
39
|
-
constructor(
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
59
|
+
private _grid;
|
|
60
|
+
private _exportConfigCallback;
|
|
61
|
+
constructor(config: {
|
|
62
|
+
name: string;
|
|
63
|
+
version: string;
|
|
64
|
+
view: IProGrid | IGrid;
|
|
65
|
+
export: TExportConfigFunction | null;
|
|
66
|
+
});
|
|
67
|
+
pdf(typeConfig?: IPDFConfig): Promise<void>;
|
|
68
|
+
png(typeConfig?: IPNGConfig): Promise<void>;
|
|
69
|
+
xlsx(typeConfig?: IXlsxExportConfig): Promise<IExportData>;
|
|
70
|
+
csv(typeConfig?: ICsvExportConfig): Promise<string>;
|
|
71
|
+
private _getExportData;
|
|
72
|
+
private _xlsxExport;
|
|
45
73
|
private getFlatCSV;
|
|
46
74
|
private _getCSV;
|
|
47
|
-
protected _rawExport(
|
|
48
|
-
private
|
|
75
|
+
protected _rawExport(typeConfig: IPNGConfig | IPDFConfig, mode: TExportType): Promise<void>;
|
|
76
|
+
private _getExportWidget;
|
|
77
|
+
private _getExportConfig;
|
|
78
|
+
private _getCallbackData;
|
|
49
79
|
private _getXlsxWorker;
|
|
50
80
|
}
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { IEventSystem } from "../../ts-common/events";
|
|
2
2
|
import { IKeyManager } from "../../ts-common/KeyManager";
|
|
3
3
|
import { IAlign } from "../../ts-common/html";
|
|
4
|
-
import {
|
|
5
|
-
import { IDataCollection, IDragConfig,
|
|
6
|
-
import {
|
|
7
|
-
import { IHandlers, Id } from "../../ts-common/types";
|
|
4
|
+
import { ITooltipConfig } from "../../ts-message";
|
|
5
|
+
import { IDataCollection, IDragConfig, IDataItem, IDragInfo, ISortMode, TSortDir } from "../../ts-data";
|
|
6
|
+
import { IHandlers, IPDFConfig, IPNGConfig, Id } from "../../ts-common/types";
|
|
8
7
|
import { ScrollView } from "../../ts-common/ScrollView";
|
|
9
8
|
import { ICalendarConfig } from "../../ts-calendar";
|
|
10
|
-
import { VNode } from "../../ts-common/dom";
|
|
11
9
|
import { INumberMask, IPatternMask } from "../../ts-common/input";
|
|
12
10
|
import { IGroupOrder, TDisplayMode } from "../../ts-data/sources/datacollection/group";
|
|
13
11
|
import { IGroupItem } from "./ui/components/groupPanel";
|
|
@@ -18,13 +16,16 @@ import { IRange, IRangeConfig } from "./modules/Range";
|
|
|
18
16
|
import { IBlockSelection, IBlockSelectionConfig } from "./modules/BlockSelection";
|
|
19
17
|
import { IClipboard, IClipboardConfig } from "./modules/Clipboard";
|
|
20
18
|
import { IHistory, IHistoryConfig } from "./modules/History";
|
|
19
|
+
import { IComboFilterConfig, IContentList, IHeaderFilter, IInputFilterConfig } from "./ui/content";
|
|
20
|
+
import { ExportType, ICsvExportConfig, IXlsxExportConfig } from "./modules/Exporter";
|
|
21
|
+
import { IDateFilterConfig, IProContentList, IProHeaderFilter } from "./ui/proContent";
|
|
21
22
|
export interface IGrid {
|
|
22
23
|
data: IDataCollection;
|
|
23
24
|
name: "grid" | string;
|
|
24
25
|
config: IGridConfig;
|
|
25
26
|
events: IEventSystem<GridEvents, IEventHandlersMap>;
|
|
26
27
|
selection: ISelection;
|
|
27
|
-
content: IContentList;
|
|
28
|
+
content: IContentList | IProContentList;
|
|
28
29
|
keyManager: IKeyManager;
|
|
29
30
|
export: any;
|
|
30
31
|
paint(): void;
|
|
@@ -45,14 +46,14 @@ export interface IGrid {
|
|
|
45
46
|
scrollTo(rowId: Id, colId: Id): void;
|
|
46
47
|
getScrollState(): ICoords;
|
|
47
48
|
adjustColumnWidth(colId: Id, adjust?: IAdjustBy): void;
|
|
48
|
-
getCellRect(rowId: Id, colId
|
|
49
|
+
getCellRect(rowId: Id, colId?: Id): ICellRect;
|
|
49
50
|
getColumn(colId: Id): ICol;
|
|
50
51
|
addSpan(spanObj: ISpan): void;
|
|
51
52
|
getSpan(rowId: Id, colId: Id): ISpan;
|
|
52
53
|
removeSpan(rowId: Id, colId: Id): void;
|
|
53
54
|
editCell(rowId: Id, colId: Id, editorType?: EditorType): void;
|
|
54
55
|
editEnd(withoutSave?: boolean): void;
|
|
55
|
-
getHeaderFilter(colId: Id): IHeaderFilter;
|
|
56
|
+
getHeaderFilter(colId: Id): IHeaderFilter | IProHeaderFilter;
|
|
56
57
|
getRootNode(): HTMLElement;
|
|
57
58
|
getSummary(colId?: Id): ISummaryList;
|
|
58
59
|
/** @deprecated See a documentation: https://docs.dhtmlx.com/suite/migration/suite/migration/ */
|
|
@@ -69,11 +70,13 @@ export interface IExtendedGrid extends IGrid {
|
|
|
69
70
|
block: IBlockSelection;
|
|
70
71
|
clipboard: IClipboard;
|
|
71
72
|
history: IHistory;
|
|
73
|
+
content: IProContentList;
|
|
72
74
|
getSubRow(id: Id): ISubViewCell | null;
|
|
73
75
|
expand(rowId: Id): void;
|
|
74
76
|
collapse(rowId: Id): void;
|
|
75
77
|
expandAll(): void;
|
|
76
78
|
collapseAll(): void;
|
|
79
|
+
getHeaderFilter(colId: Id): IProHeaderFilter;
|
|
77
80
|
}
|
|
78
81
|
export interface IProGrid extends ITreeGrid {
|
|
79
82
|
config: IProGridConfig;
|
|
@@ -88,6 +91,7 @@ export interface IGridConfig extends IDragConfig {
|
|
|
88
91
|
rowHeight?: number;
|
|
89
92
|
headerRowHeight?: number;
|
|
90
93
|
footerRowHeight?: number;
|
|
94
|
+
footerPosition?: IFooterPosition;
|
|
91
95
|
leftSplit?: number;
|
|
92
96
|
topSplit?: number;
|
|
93
97
|
rightSplit?: number;
|
|
@@ -176,7 +180,15 @@ export interface IExtendedGridConfig extends IGridConfig {
|
|
|
176
180
|
blockSelection?: boolean | IBlockSelectionConfig;
|
|
177
181
|
clipboard?: boolean | IClipboardConfig;
|
|
178
182
|
history?: boolean | IHistoryConfig;
|
|
183
|
+
exportConfig?: TExportConfigFunction;
|
|
179
184
|
}
|
|
185
|
+
export interface IExportGridConfig extends Omit<IExtendedGridConfig, "exportConfig" | "columns" | "data" | "spans"> {
|
|
186
|
+
typeConfig?: IXlsxExportConfig | ICsvExportConfig | IPDFConfig | IPNGConfig;
|
|
187
|
+
columns?: (column: ICol, index: number, columns: ICol[], api: IGrid) => ICol | null;
|
|
188
|
+
data?: (row: IRow, index: number, columns: IRow[], api: IGrid) => IRow | null;
|
|
189
|
+
spans?: (span: ISpan, index: number, spans: ISpan[], api: IGrid) => ISpan | null;
|
|
190
|
+
}
|
|
191
|
+
export type TExportConfigFunction = (config: IExtendedGridConfig | ITreeGridConfig, exportType: ExportType) => IExportGridConfig;
|
|
180
192
|
export interface IRendererConfig extends Required<IProGridConfig> {
|
|
181
193
|
scroll?: IScrollState;
|
|
182
194
|
datacollection: any;
|
|
@@ -277,8 +289,8 @@ export interface IEventHandlersMap {
|
|
|
277
289
|
[GridEvents.scroll]: (scrollState: ICoords) => void;
|
|
278
290
|
[GridEvents.beforeSort]: (column: ICol, dir: TSortDir) => void | boolean;
|
|
279
291
|
[GridEvents.afterSort]: (column: ICol, dir: TSortDir) => void;
|
|
280
|
-
[GridEvents.filterChange]: (value: string | string[], colId: Id,
|
|
281
|
-
[GridEvents.beforeFilter]: (value: string, colId: Id) => void | boolean;
|
|
292
|
+
[GridEvents.filterChange]: (value: string | string[] | Date | Date[], colId: Id, content: TContentFilter, silent?: boolean) => void;
|
|
293
|
+
[GridEvents.beforeFilter]: (value: string | string[] | Date | Date[], colId: Id) => void | boolean;
|
|
282
294
|
[GridEvents.beforeResizeStart]: (column: ICol, event: MouseEvent) => boolean | void;
|
|
283
295
|
[GridEvents.resize]: (column: ICol, event: MouseEvent) => void;
|
|
284
296
|
[GridEvents.afterResizeEnd]: (column: ICol, event: MouseEvent) => void;
|
|
@@ -444,10 +456,11 @@ export interface IContent {
|
|
|
444
456
|
tooltip?: boolean | IGridTooltipConfig;
|
|
445
457
|
htmlEnable?: boolean;
|
|
446
458
|
}
|
|
459
|
+
export type TContentFilter = "inputFilter" | "selectFilter" | "comboFilter" | "dateFilter";
|
|
447
460
|
export interface IHeader extends IContent {
|
|
448
461
|
content?: TContentFilter;
|
|
449
|
-
filterConfig?: IComboFilterConfig | IInputFilterConfig;
|
|
450
|
-
customFilter?: (item:
|
|
462
|
+
filterConfig?: IComboFilterConfig | IInputFilterConfig | IDateFilterConfig;
|
|
463
|
+
customFilter?: (item: string | number | Date | Date[], match: string | string[] | Date | Date[]) => boolean;
|
|
451
464
|
headerSort?: boolean;
|
|
452
465
|
sortAs?: SortFunction;
|
|
453
466
|
tooltipTemplate?: (content: {
|
|
@@ -497,14 +510,7 @@ export interface IGroup {
|
|
|
497
510
|
order?: IGroupOrderItem[];
|
|
498
511
|
column?: string | ICol;
|
|
499
512
|
}
|
|
500
|
-
export
|
|
501
|
-
force?: boolean;
|
|
502
|
-
showDelay?: number;
|
|
503
|
-
hideDelay?: number;
|
|
504
|
-
margin?: number;
|
|
505
|
-
position?: Position;
|
|
506
|
-
css?: string;
|
|
507
|
-
}
|
|
513
|
+
export type IGridTooltipConfig = Omit<ITooltipConfig, "node" | "htmlEnable">;
|
|
508
514
|
export interface IScrollBarWidth {
|
|
509
515
|
x: number;
|
|
510
516
|
y: number;
|
|
@@ -570,23 +576,6 @@ export interface IDatePickerConfig extends ICalendarConfig {
|
|
|
570
576
|
export interface IBaseHandlersMap {
|
|
571
577
|
[key: string]: (...args: any[]) => any;
|
|
572
578
|
}
|
|
573
|
-
export declare enum HeaderFilterEvent {
|
|
574
|
-
change = "change"
|
|
575
|
-
}
|
|
576
|
-
export interface IHeaderFilter {
|
|
577
|
-
column: ICol;
|
|
578
|
-
config: IRendererConfig;
|
|
579
|
-
value: string | string[];
|
|
580
|
-
events: IEventSystem<HeaderFilterEvent>;
|
|
581
|
-
data?: any[];
|
|
582
|
-
id?: Id;
|
|
583
|
-
filterConfig?: IComboFilterConfig;
|
|
584
|
-
getFilter(): VNode | Combobox;
|
|
585
|
-
setValue(value: string | string[], silent?: boolean): void;
|
|
586
|
-
clear(silent?: boolean): void;
|
|
587
|
-
focus(): void;
|
|
588
|
-
blur(): void;
|
|
589
|
-
}
|
|
590
579
|
export interface ICellRect extends ICoords, ISizes {
|
|
591
580
|
}
|
|
592
581
|
export type colType = "string" | "number" | "boolean" | "date";
|
|
@@ -595,28 +584,6 @@ export interface IOption {
|
|
|
595
584
|
value: string;
|
|
596
585
|
}
|
|
597
586
|
export type TOption = IOption | string;
|
|
598
|
-
export type TContentFilter = "inputFilter" | "selectFilter" | "comboFilter";
|
|
599
|
-
export interface IComboFilterConfig {
|
|
600
|
-
data?: DataCollection<any> | any[];
|
|
601
|
-
readonly?: boolean;
|
|
602
|
-
template?: (item: any) => string;
|
|
603
|
-
filter?: (item: any, input: string) => boolean;
|
|
604
|
-
placeholder?: string;
|
|
605
|
-
virtual?: boolean;
|
|
606
|
-
multiselection?: boolean;
|
|
607
|
-
}
|
|
608
|
-
export interface IInputFilterConfig {
|
|
609
|
-
placeholder?: string;
|
|
610
|
-
}
|
|
611
|
-
export interface IComboFilterConfig {
|
|
612
|
-
data?: DataCollection<any> | any[];
|
|
613
|
-
readonly?: boolean;
|
|
614
|
-
template?: (item: any) => string;
|
|
615
|
-
filter?: (item: any, input: string) => boolean;
|
|
616
|
-
placeholder?: string;
|
|
617
|
-
virtual?: boolean;
|
|
618
|
-
multiselection?: boolean;
|
|
619
|
-
}
|
|
620
587
|
export type SortFunction = (cellValue: any) => string | number;
|
|
621
588
|
type MarkFunction = (cell: any, columnCells: any[], row: IRow, column: ICol) => string;
|
|
622
589
|
export interface IMark {
|
|
@@ -635,51 +602,17 @@ export interface ICellCss {
|
|
|
635
602
|
fontSize?: number;
|
|
636
603
|
bold?: boolean;
|
|
637
604
|
}
|
|
638
|
-
export interface ICellContent {
|
|
639
|
-
element?: any;
|
|
640
|
-
toHtml: (column: ICol, config: IRendererConfig) => any;
|
|
641
|
-
match?: (obj: IMatch) => boolean;
|
|
642
|
-
destroy?: () => void;
|
|
643
|
-
calculate?: (col: any[], roots: any[]) => string | number;
|
|
644
|
-
validate?: (colId: Id, data: any[]) => any[];
|
|
645
|
-
value?: any;
|
|
646
|
-
}
|
|
647
|
-
interface IMatch {
|
|
648
|
-
val: any;
|
|
649
|
-
match: any;
|
|
650
|
-
obj?: any;
|
|
651
|
-
multi?: boolean;
|
|
652
|
-
col?: ICol;
|
|
653
|
-
}
|
|
654
|
-
export interface IContentList {
|
|
655
|
-
[key: string]: ICellContent;
|
|
656
|
-
}
|
|
657
605
|
export interface ILayoutState {
|
|
658
606
|
wrapper: ISizes;
|
|
659
607
|
shifts: ICoords;
|
|
660
608
|
sticky: boolean;
|
|
661
609
|
gridBodyHeight: number;
|
|
610
|
+
footerAtBottom: boolean;
|
|
662
611
|
}
|
|
663
612
|
export interface IFixedRowsConfig extends ILayoutState {
|
|
664
613
|
name: "header" | "footer";
|
|
665
614
|
position: "top" | "bottom";
|
|
666
615
|
}
|
|
667
|
-
export interface IXlsxExportConfig {
|
|
668
|
-
url?: string;
|
|
669
|
-
name?: string;
|
|
670
|
-
tableName?: string;
|
|
671
|
-
dateFormatMask?: string;
|
|
672
|
-
mapToExcelFormulas?: {
|
|
673
|
-
[key: string]: string;
|
|
674
|
-
};
|
|
675
|
-
}
|
|
676
|
-
export interface ICsvExportConfig extends ICsvDriverConfig {
|
|
677
|
-
name?: string;
|
|
678
|
-
asFile?: boolean;
|
|
679
|
-
flat?: boolean;
|
|
680
|
-
rowDelimiter?: string;
|
|
681
|
-
columnDelimiter?: string;
|
|
682
|
-
}
|
|
683
616
|
export interface ICoords {
|
|
684
617
|
x: number;
|
|
685
618
|
y: number;
|
|
@@ -701,6 +634,7 @@ export type IDirection = "horizontal" | "vertical" | "auto";
|
|
|
701
634
|
export type IDragType = "row" | "column" | "both";
|
|
702
635
|
export type AdjustTargetType = "data" | "header" | "footer";
|
|
703
636
|
export type IAdjustBy = AdjustTargetType | boolean;
|
|
637
|
+
export type IFooterPosition = "bottom" | "relative";
|
|
704
638
|
export interface IAdjustColumns {
|
|
705
639
|
rows: IRow[];
|
|
706
640
|
cols: ICol[];
|
|
@@ -5,3 +5,4 @@ export declare function calcScrollBarWidth(config: IGridConfig | IRendererConfig
|
|
|
5
5
|
height: number;
|
|
6
6
|
}): IScrollBarWidth;
|
|
7
7
|
export declare function getCurrFixedCols(config: IGridConfig, split: Split.left | Split.right): import("../types").ICol[];
|
|
8
|
+
export declare function getNormalizeDateObject(item: string | Date, dateFormat: string): Date | null;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { VNode } from "../../../../ts-common/dom";
|
|
2
|
-
import { IProGrid, IRendererConfig } from "../../types";
|
|
3
|
-
export
|
|
2
|
+
import { ILayoutState, IProGrid, IRendererConfig } from "../../types";
|
|
3
|
+
export interface IDragPanelState {
|
|
4
|
+
lessHeight: boolean;
|
|
5
|
+
footerAtBottom: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare function getDragPanelNode(grid: IProGrid, config: IRendererConfig, scroll: ILayoutState, lessByHeight?: boolean): VNode;
|
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
import { ProCombobox } from "../../../../ts-combobox";
|
|
2
2
|
import { IEventSystem } from "../../../../ts-common/events";
|
|
3
|
-
import {
|
|
3
|
+
import { IDataItem } from "../../../../ts-data";
|
|
4
|
+
import { ICol, IRendererConfig } from "../../types";
|
|
5
|
+
import { HeaderFilterEvent, IComboFilterConfig, IHeaderFilter } from "../content";
|
|
4
6
|
export declare class ComboFilter implements IHeaderFilter {
|
|
5
7
|
column: ICol;
|
|
6
8
|
config: IRendererConfig;
|
|
7
|
-
data:
|
|
9
|
+
data: string[] | IDataItem[];
|
|
8
10
|
value: string | string[];
|
|
9
11
|
filterConfig: IComboFilterConfig;
|
|
10
12
|
events: IEventSystem<HeaderFilterEvent>;
|
|
11
13
|
private _filter;
|
|
14
|
+
private _grid;
|
|
12
15
|
private _isFocused;
|
|
13
16
|
private _silentMode;
|
|
14
|
-
constructor(column
|
|
17
|
+
constructor({ column, config, headerConfig, uniqueData, value, grid }: {
|
|
18
|
+
column: any;
|
|
19
|
+
config: any;
|
|
20
|
+
headerConfig: any;
|
|
21
|
+
uniqueData: any;
|
|
22
|
+
value: any;
|
|
23
|
+
grid: any;
|
|
24
|
+
});
|
|
15
25
|
protected initFilter(): void;
|
|
16
26
|
protected initHandlers(): void;
|
|
17
27
|
getFilter(): ProCombobox;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { IEventSystem } from "../../../../ts-common/events";
|
|
2
|
+
import { ICol, IEventHandlersMap, IRendererConfig } from "../../types";
|
|
3
|
+
import { HeaderFilterEvent } from "../content";
|
|
4
|
+
import { IDateFilterConfig, IProHeaderFilter } from "../proContent";
|
|
5
|
+
import { Calendar } from "../../../../ts-calendar";
|
|
6
|
+
import { VNode } from "../../../../ts-common/dom";
|
|
7
|
+
import { Id } from "../../../../ts-common/types";
|
|
8
|
+
export declare class DateFilter implements IProHeaderFilter {
|
|
9
|
+
id: Id;
|
|
10
|
+
column: ICol;
|
|
11
|
+
config: IRendererConfig;
|
|
12
|
+
events: IEventSystem<HeaderFilterEvent, IEventHandlersMap>;
|
|
13
|
+
filterConfig: IDateFilterConfig;
|
|
14
|
+
value: Date | Date[];
|
|
15
|
+
private _calendar;
|
|
16
|
+
private _popup;
|
|
17
|
+
private _handlers;
|
|
18
|
+
private _grid;
|
|
19
|
+
private _keyManager;
|
|
20
|
+
constructor({ column, config, headerConfig, value, id, grid }: {
|
|
21
|
+
column: any;
|
|
22
|
+
config: any;
|
|
23
|
+
headerConfig: any;
|
|
24
|
+
value: any;
|
|
25
|
+
id: any;
|
|
26
|
+
grid: any;
|
|
27
|
+
});
|
|
28
|
+
getFilter(): Calendar;
|
|
29
|
+
setValue(value: Date | Date[] | null, silent?: boolean): void;
|
|
30
|
+
clear(): void;
|
|
31
|
+
focus(): void;
|
|
32
|
+
blur(): void;
|
|
33
|
+
destructor(): void;
|
|
34
|
+
toHTML(): VNode;
|
|
35
|
+
private _initFilter;
|
|
36
|
+
private _initHandlers;
|
|
37
|
+
private shouldUpdateCalendar;
|
|
38
|
+
private _getRootElement;
|
|
39
|
+
private _changeTab;
|
|
40
|
+
private _showPopup;
|
|
41
|
+
private _initHotkeys;
|
|
42
|
+
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { VNode } from "../../../../ts-common/dom";
|
|
2
2
|
import { IEventSystem } from "../../../../ts-common/events";
|
|
3
3
|
import { Id } from "../../../../ts-common/types";
|
|
4
|
-
import { IBaseHandlersMap,
|
|
4
|
+
import { IBaseHandlersMap, ICol, IRendererConfig } from "../../types";
|
|
5
|
+
import { HeaderFilterEvent, IHeaderFilter, IInputFilterConfig } from "../content";
|
|
5
6
|
export declare class InputFilter implements IHeaderFilter {
|
|
6
7
|
column: ICol;
|
|
7
8
|
config: IRendererConfig;
|
|
@@ -12,7 +13,15 @@ export declare class InputFilter implements IHeaderFilter {
|
|
|
12
13
|
protected _handlers: IBaseHandlersMap;
|
|
13
14
|
protected _inputDelay: any;
|
|
14
15
|
private _isFocused;
|
|
15
|
-
|
|
16
|
+
private _grid;
|
|
17
|
+
constructor({ column, config, id, value, headerConfig, grid }: {
|
|
18
|
+
column: any;
|
|
19
|
+
config: any;
|
|
20
|
+
id: any;
|
|
21
|
+
value: any;
|
|
22
|
+
headerConfig: any;
|
|
23
|
+
grid: any;
|
|
24
|
+
});
|
|
16
25
|
toHTML(): VNode;
|
|
17
26
|
getFilter(): any;
|
|
18
27
|
setValue(value: string, silent?: boolean): void;
|
|
@@ -1,15 +1,23 @@
|
|
|
1
1
|
import { VNode } from "../../../../ts-common/dom";
|
|
2
2
|
import { IEventSystem } from "../../../../ts-common/events";
|
|
3
|
-
import { IBaseHandlersMap,
|
|
3
|
+
import { IBaseHandlersMap, ICol, IRendererConfig } from "../../types";
|
|
4
|
+
import { HeaderFilterEvent, IHeaderFilter } from "../content";
|
|
4
5
|
export declare class SelectFilter implements IHeaderFilter {
|
|
5
6
|
column: ICol;
|
|
6
7
|
config: IRendererConfig;
|
|
7
8
|
data: any[];
|
|
8
9
|
value: string;
|
|
9
10
|
events: IEventSystem<HeaderFilterEvent>;
|
|
10
|
-
private _isFocused;
|
|
11
11
|
protected _handlers: IBaseHandlersMap;
|
|
12
|
-
|
|
12
|
+
private _isFocused;
|
|
13
|
+
private _grid;
|
|
14
|
+
constructor({ column, config, uniqueData, value, grid }: {
|
|
15
|
+
column: any;
|
|
16
|
+
config: any;
|
|
17
|
+
uniqueData?: any[];
|
|
18
|
+
value: any;
|
|
19
|
+
grid: any;
|
|
20
|
+
});
|
|
13
21
|
toHTML(): VNode;
|
|
14
22
|
getFilter(): any;
|
|
15
23
|
setValue(value: string, silent?: boolean): void;
|
|
@@ -1,2 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { VNode } from "../../../ts-common/dom";
|
|
2
|
+
import { ICol, IExtendedGrid, IGrid, IProGrid, IRendererConfig } from "../types";
|
|
3
|
+
import { DataCollection, IDataItem } from "../../../ts-data";
|
|
4
|
+
import { Combobox } from "../../../ts-combobox";
|
|
5
|
+
import { IEventSystem } from "../../../ts-common/events";
|
|
6
|
+
import { Id } from "../../../ts-common/types";
|
|
7
|
+
export interface IComboFilterConfig {
|
|
8
|
+
template?: (item: IDataItem) => string;
|
|
9
|
+
filter?: (item: IDataItem, input: string) => boolean;
|
|
10
|
+
data?: DataCollection<IDataItem> | IDataItem[];
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
readonly?: boolean;
|
|
13
|
+
virtual?: boolean;
|
|
14
|
+
multiselection?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export interface IInputFilterConfig {
|
|
17
|
+
placeholder?: string;
|
|
18
|
+
icon?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare enum HeaderFilterEvent {
|
|
21
|
+
change = "change"
|
|
22
|
+
}
|
|
23
|
+
export interface IHeaderFilter {
|
|
24
|
+
column: ICol;
|
|
25
|
+
config: IRendererConfig;
|
|
26
|
+
value: string | string[];
|
|
27
|
+
events: IEventSystem<HeaderFilterEvent>;
|
|
28
|
+
data?: string[] | IDataItem[];
|
|
29
|
+
id?: Id;
|
|
30
|
+
filterConfig?: IComboFilterConfig | IInputFilterConfig;
|
|
31
|
+
getFilter(): VNode | Combobox;
|
|
32
|
+
setValue(value: string | string[], silent?: boolean): void;
|
|
33
|
+
clear(silent?: boolean): void;
|
|
34
|
+
focus(): void;
|
|
35
|
+
blur(): void;
|
|
36
|
+
}
|
|
37
|
+
export interface ICellContent {
|
|
38
|
+
toHtml: (column: ICol, config: IRendererConfig) => VNode;
|
|
39
|
+
match?: (obj: IMatch) => boolean;
|
|
40
|
+
destructor?: () => void;
|
|
41
|
+
element?: Record<string, IHeaderFilter>;
|
|
42
|
+
value?: Record<string, string>;
|
|
43
|
+
}
|
|
44
|
+
interface IMatch {
|
|
45
|
+
val: number | string | Date;
|
|
46
|
+
match: string | string[] | Date | Date[];
|
|
47
|
+
obj: IDataItem;
|
|
48
|
+
col?: ICol;
|
|
49
|
+
multi?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface IContentList {
|
|
52
|
+
[key: string]: ICellContent;
|
|
53
|
+
}
|
|
54
|
+
export declare function getContent(grid: IGrid | IProGrid | IExtendedGrid): IContentList;
|
|
55
|
+
export {};
|