dhx-chart 8.4.5 → 9.0.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/entry.d.ts +1 -0
- package/codebase/types/ts-common/core.d.ts +1 -0
- package/codebase/types/ts-common/html.d.ts +1 -0
- package/codebase/types/ts-common/input.d.ts +24 -0
- package/codebase/types/ts-data/index.d.ts +1 -0
- package/codebase/types/ts-data/sources/DragManager.d.ts +12 -1
- package/codebase/types/ts-data/sources/datacollection/group.d.ts +42 -0
- package/codebase/types/ts-data/sources/datacollection.d.ts +6 -1
- package/codebase/types/ts-data/sources/methods.d.ts +11 -0
- package/codebase/types/ts-data/sources/types.d.ts +30 -11
- package/codebase/types/ts-grid/index.d.ts +1 -1
- package/codebase/types/ts-grid/sources/ExtendedGrid.d.ts +23 -0
- package/codebase/types/ts-grid/sources/Grid.d.ts +18 -8
- package/codebase/types/ts-grid/sources/ProGrid.d.ts +50 -14
- package/codebase/types/ts-grid/sources/Selection.d.ts +28 -2
- package/codebase/types/ts-grid/sources/columnsResizer.d.ts +2 -2
- package/codebase/types/ts-grid/sources/helpers/data.d.ts +3 -3
- package/codebase/types/ts-grid/sources/helpers/default.d.ts +2 -0
- package/codebase/types/ts-grid/sources/helpers/keys.d.ts +3 -2
- package/codebase/types/ts-grid/sources/locales/en.d.ts +7 -0
- package/codebase/types/ts-grid/sources/types.d.ts +378 -338
- package/codebase/types/ts-grid/sources/ui/Cells.d.ts +4 -2
- package/codebase/types/ts-grid/sources/ui/editors/DateEditor.d.ts +2 -0
- package/codebase/types/ts-grid/sources/ui/editors/InputEditor.d.ts +5 -3
- package/codebase/types/ts-grid/sources/ui/editors/TextAreaEditor.d.ts +3 -1
- package/codebase/types/ts-grid/sources/ui/group/panel.d.ts +12 -0
- package/codebase/types/ts-treegrid/index.d.ts +3 -0
- package/codebase/types/ts-treegrid/sources/TreeGrid.d.ts +28 -0
- package/codebase/types/ts-treegrid/sources/TreeGridCollection.d.ts +20 -0
- package/codebase/types/ts-treegrid/sources/types.d.ts +34 -0
- package/package.json +1 -1
- package/readme.txt +1 -1
- package/whatsnew.txt +6 -0
|
@@ -25,9 +25,11 @@ export declare function normalizeSpan(span: ISpan, config: IGridConfig, data: ID
|
|
|
25
25
|
column: import("../../../ts-common/types").Id;
|
|
26
26
|
rowspan?: number;
|
|
27
27
|
colspan?: number;
|
|
28
|
-
text?: string |
|
|
28
|
+
text?: string | ((args: import("../types").ISummaryList) => string);
|
|
29
29
|
css?: string;
|
|
30
30
|
tooltip?: boolean | import("../types").IGridTooltipConfig;
|
|
31
|
-
tooltipTemplate?: (
|
|
31
|
+
tooltipTemplate?: (content: {
|
|
32
|
+
value: string;
|
|
33
|
+
} & import("../types").ISummaryList, span: ISpan) => string | boolean;
|
|
32
34
|
};
|
|
33
35
|
export {};
|
|
@@ -12,6 +12,7 @@ export declare class DateEditor implements IEditor {
|
|
|
12
12
|
private _calendar;
|
|
13
13
|
private _popup;
|
|
14
14
|
private _value;
|
|
15
|
+
private _editorConfig;
|
|
15
16
|
constructor(row: IRow, col: ICol, config: IRendererConfig);
|
|
16
17
|
endEdit(withoutSave?: boolean, calendarChange?: boolean): void;
|
|
17
18
|
toHTML(): any;
|
|
@@ -32,4 +33,5 @@ export declare class DateEditor implements IEditor {
|
|
|
32
33
|
view?: import("../../../../ts-calendar").ViewMode;
|
|
33
34
|
};
|
|
34
35
|
protected _initHandlers(): void;
|
|
36
|
+
private _getValue;
|
|
35
37
|
}
|
|
@@ -13,8 +13,10 @@ export declare class InputEditor implements IEditor {
|
|
|
13
13
|
private type;
|
|
14
14
|
constructor(row: IRow, col: ICol, config: IRendererConfig);
|
|
15
15
|
endEdit(withoutSave?: boolean): void;
|
|
16
|
-
toHTML(value?: string): any;
|
|
16
|
+
toHTML(value?: string | number): any;
|
|
17
17
|
protected _initHandlers(): void;
|
|
18
|
-
private
|
|
19
|
-
private
|
|
18
|
+
private _isValidWord;
|
|
19
|
+
private _isCorrectRange;
|
|
20
|
+
private _applyValuePattern;
|
|
21
|
+
private _removeValuePattern;
|
|
20
22
|
}
|
|
@@ -8,7 +8,7 @@ export declare class TextAreaEditor implements IEditor {
|
|
|
8
8
|
col: ICol;
|
|
9
9
|
};
|
|
10
10
|
protected _config: IRendererConfig;
|
|
11
|
-
protected
|
|
11
|
+
protected _input: HTMLTextAreaElement;
|
|
12
12
|
private type;
|
|
13
13
|
private _minHeight;
|
|
14
14
|
private _prevHeight;
|
|
@@ -20,6 +20,8 @@ export declare class TextAreaEditor implements IEditor {
|
|
|
20
20
|
protected _initHandlers(): void;
|
|
21
21
|
private _getCurrentHeight;
|
|
22
22
|
private _getElementHeight;
|
|
23
|
+
private _applyValuePattern;
|
|
24
|
+
private _removeValuePattern;
|
|
23
25
|
private _getCellWidth;
|
|
24
26
|
private _updateHeight;
|
|
25
27
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IProGrid } from "../../types";
|
|
2
|
+
export interface IGroupItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
closable?: boolean;
|
|
6
|
+
sortable?: boolean;
|
|
7
|
+
sort?: "asc" | "desc";
|
|
8
|
+
mode?: "basic" | "drop";
|
|
9
|
+
notGrouped?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function getGroupItem({ id, label, sort, mode, sortable, closable, }: IGroupItem): any;
|
|
12
|
+
export declare function getGroupPanel(grouped: IGroupItem[], grid: IProGrid): any;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { GridEvents, IEventHandlersMap, ExtendedGrid, ICellRect, IColumnsWidth, ISpan, IAdjustColumns } from "../../ts-grid";
|
|
2
|
+
import { IEventSystem } from "../../ts-common/events";
|
|
3
|
+
import { DataEvents, DragEvents, IDataEventsHandlersMap, IDragEventsHandlersMap } from "../../ts-data";
|
|
4
|
+
import { TreeGridCollection } from "./TreeGridCollection";
|
|
5
|
+
import { ITreeEventHandlersMap, ITreeGrid, ITreeGridConfig, TreeGridEvents } from "./types";
|
|
6
|
+
import { Id } from "../../ts-common/types";
|
|
7
|
+
export declare class TreeGrid extends ExtendedGrid implements ITreeGrid {
|
|
8
|
+
config: ITreeGridConfig;
|
|
9
|
+
data: TreeGridCollection;
|
|
10
|
+
events: IEventSystem<DataEvents | GridEvents | DragEvents | TreeGridEvents, IEventHandlersMap & IDataEventsHandlersMap & IDragEventsHandlersMap & ITreeEventHandlersMap>;
|
|
11
|
+
constructor(container: HTMLElement | string | null, config: ITreeGridConfig);
|
|
12
|
+
expand(rowId: Id): void;
|
|
13
|
+
collapse(rowId: Id): void;
|
|
14
|
+
expandAll(): void;
|
|
15
|
+
collapseAll(): void;
|
|
16
|
+
showRow(rowId: Id): void;
|
|
17
|
+
hideRow(rowId: Id): void;
|
|
18
|
+
getCellRect(rowId: Id, colId: Id): ICellRect;
|
|
19
|
+
getSpan(rowId: Id, colId: Id): ISpan;
|
|
20
|
+
protected _adjustColumnsWidth({ rows, cols, totalCols, adjust, }: IAdjustColumns): IColumnsWidth;
|
|
21
|
+
protected _createCollection(prep: (data: any[]) => any[]): void;
|
|
22
|
+
protected _getRowIndex(rowId: Id): number;
|
|
23
|
+
protected _applyLocalFilter(beforePrepareData?: boolean): void;
|
|
24
|
+
protected _setEventHandlers(): void;
|
|
25
|
+
private _serialize;
|
|
26
|
+
private _expand;
|
|
27
|
+
private _collapse;
|
|
28
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { IEventSystem } from "../../ts-common/events";
|
|
2
|
+
import { DataCallback, DataDriver, DataEvents, IDataItem, TreeCollection } from "../../ts-data";
|
|
3
|
+
import { TreeGridEvents } from "./types";
|
|
4
|
+
import { Id } from "../../ts-common/types";
|
|
5
|
+
export declare class TreeGridCollection extends TreeCollection {
|
|
6
|
+
constructor(config?: any, events?: IEventSystem<DataEvents | TreeGridEvents>);
|
|
7
|
+
eachChild(id: Id, cb: any, direct?: boolean, checkItem?: (item: IDataItem) => boolean): void;
|
|
8
|
+
getMaxLevel(): number;
|
|
9
|
+
getLevel(id: Id): number;
|
|
10
|
+
serialize(driver?: DataDriver): any[];
|
|
11
|
+
getPlainIndex(id: Id): number;
|
|
12
|
+
map(cb: DataCallback<IDataItem>, parent?: Id, direct?: boolean): IDataItem[];
|
|
13
|
+
mapVisible(cb: DataCallback<IDataItem>, parent?: Id, direct?: boolean): IDataItem[];
|
|
14
|
+
protected _parse_data(data: any, parent?: Id): void;
|
|
15
|
+
protected _copy(id: Id, index: number, target?: TreeGridCollection, targetId?: Id, key?: number): Id;
|
|
16
|
+
protected _addToOrder(_order: any, obj: any, index: number): void;
|
|
17
|
+
protected _removeCore(id: Id): void;
|
|
18
|
+
protected _setParent(item: IDataItem, parent: Id): void;
|
|
19
|
+
private _checkItems;
|
|
20
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { DataEvents, DragEvents, IDataEventsHandlersMap, IDragEventsHandlersMap } from "../../ts-data";
|
|
2
|
+
import { GridEvents, IEventHandlersMap, IExtendedGrid, IExtendedGridConfig } from "../../ts-grid";
|
|
3
|
+
import { IEventSystem } from "../../ts-common/events";
|
|
4
|
+
import { Id } from "../../ts-common/types";
|
|
5
|
+
import { TreeGridCollection } from "./TreeGridCollection";
|
|
6
|
+
export interface ITreeGridConfig extends IExtendedGridConfig {
|
|
7
|
+
type?: "tree";
|
|
8
|
+
rootParent?: Id;
|
|
9
|
+
dragExpand?: boolean;
|
|
10
|
+
collapsed?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ITreeGrid extends IExtendedGrid {
|
|
13
|
+
events: IEventSystem<DataEvents | GridEvents | DragEvents | TreeGridEvents, IEventHandlersMap & IDataEventsHandlersMap & IDragEventsHandlersMap & ITreeEventHandlersMap>;
|
|
14
|
+
config: ITreeGridConfig;
|
|
15
|
+
data: TreeGridCollection;
|
|
16
|
+
scrollTo(rowId: Id, colId: Id): void;
|
|
17
|
+
expand(rowId: Id): void;
|
|
18
|
+
collapse(rowId: Id): void;
|
|
19
|
+
expandAll(): void;
|
|
20
|
+
collapseAll(): void;
|
|
21
|
+
}
|
|
22
|
+
export declare enum TreeGridEvents {
|
|
23
|
+
beforeCollapse = "beforeCollapse",
|
|
24
|
+
afterCollapse = "afterCollapse",
|
|
25
|
+
beforeExpand = "beforeExpand",
|
|
26
|
+
afterExpand = "afterExpand"
|
|
27
|
+
}
|
|
28
|
+
export interface ITreeEventHandlersMap {
|
|
29
|
+
[key: string]: (...args: any[]) => any;
|
|
30
|
+
[TreeGridEvents.beforeCollapse]: (rowId: Id) => boolean | void;
|
|
31
|
+
[TreeGridEvents.afterCollapse]: (rowId: Id) => any;
|
|
32
|
+
[TreeGridEvents.beforeExpand]: (rowId: Id) => boolean | void;
|
|
33
|
+
[TreeGridEvents.afterExpand]: (rowId: Id) => any;
|
|
34
|
+
}
|
package/package.json
CHANGED
package/readme.txt
CHANGED