dhx-chart 9.0.0 → 9.0.1

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.
@@ -24,7 +24,9 @@ export declare class DataCollection<T extends IDataItem = IDataItem> implements
24
24
  private _changes;
25
25
  private _loader;
26
26
  constructor(config?: any, events?: IEventSystem<any>);
27
- protected _reset(): void;
27
+ protected _reset(config?: {
28
+ grouping?: boolean;
29
+ }): void;
28
30
  group(order: TGroupOrder[], config?: IGroupDataConfig): void;
29
31
  ungroup(): void;
30
32
  isGrouped(): boolean;
@@ -70,11 +72,11 @@ export declare class DataCollection<T extends IDataItem = IDataItem> implements
70
72
  getMetaMap(obj: T): any;
71
73
  setRange(from: number, to: number): void;
72
74
  getRawData(from: number, to: number, order?: T[], mode?: number): T[];
73
- protected _add(newItem: IDataItem, index: number): Id;
75
+ protected _add(newItem: IDataItem, index?: number): Id;
74
76
  protected _remove(id: Id): void;
75
77
  protected _copy(id: Id, index: number, target?: IDataCollection | ITreeCollection, targetId?: Id, key?: number): Id;
76
78
  protected _move(id: Id, index: number, target?: IDataCollection | ITreeCollection, targetId?: Id, key?: number, newId?: Id): Id;
77
- protected _addCore(obj: IDataItem, index: number): Id;
79
+ protected _addCore(obj: IDataItem, index?: number): Id;
78
80
  protected _removeCore(id: Id): void;
79
81
  protected _parse_data(data: any[]): void;
80
82
  protected _approximate(data: any[], values: string[], maxNum: number): any[];
@@ -82,8 +84,10 @@ export declare class DataCollection<T extends IDataItem = IDataItem> implements
82
84
  protected _addToOrder(array: any[], obj: any, index?: number): void;
83
85
  protected _applySorters(by?: ISortMode): void;
84
86
  protected _applyFilters(rule?: IFilterMode | IFilterCallback): void;
85
- protected _reapplyFilters(sort?: boolean): void;
87
+ protected _reapplyFilters(): void;
86
88
  protected _getRuleCallback(rule: IFilterMode): IFilterCallback;
87
89
  protected _getPureFilters(filters: IFilter): IFilter;
88
90
  protected _normalizeFilters(filters: any): any;
91
+ protected _checkFilterRule(rule: IFilterMode | IFilterCallback): boolean;
92
+ private _parse;
89
93
  }
@@ -3,7 +3,7 @@ import { DataProxy } from "./dataproxy";
3
3
  import { IFilterCallback, IFilterMode, IDataCollection, IDataItem, ITreeCollection, DataDriver, IDataDriver, IFilter } from "./types";
4
4
  export declare function isEqualObj(a: any, b: any): boolean;
5
5
  export declare function naturalCompare(a: any, b: any): any;
6
- export declare function findByConf(item: any, conf: IFilterMode | IFilterCallback): any;
6
+ export declare function findByConf(item: IDataItem, conf: IFilterMode | IFilterCallback, index?: number, array?: IDataItem[]): IDataItem;
7
7
  export declare function isDebug(): boolean;
8
8
  export declare function dhxWarning(msg: string): void;
9
9
  export declare function dhxError(msg: string): void;
@@ -1,6 +1,6 @@
1
1
  import { IEventSystem } from "../../ts-common/events";
2
2
  import { DataCollection } from "./datacollection";
3
- import { DataCallback, DataEvents, IDataCollection, IDataItem, ITreeCollection, IFilterCallback, IFilterMode, IFilterComplexMode, ITreeFilterConfig, DataDriver, ISortMode, IDataDriver } from "./types";
3
+ import { DataCallback, DataEvents, IDataCollection, IDataItem, ITreeCollection, IFilterCallback, IFilterMode, IFilterComplexMode, ITreeFilterConfig, DataDriver, ISortMode, IDataDriver, IUpdateObject, ISortConfig } from "./types";
4
4
  import { Id } from "../../ts-common/types";
5
5
  export declare class TreeCollection<T extends IDataItem = IDataItem> extends DataCollection<T> implements ITreeCollection<T> {
6
6
  protected _childs: {
@@ -16,8 +16,9 @@ export declare class TreeCollection<T extends IDataItem = IDataItem> extends Dat
16
16
  getItems(id: Id): T[];
17
17
  getLength(id?: Id): number;
18
18
  removeAll(id?: Id): void;
19
+ update(id: Id, newItem: IUpdateObject, silent?: boolean): void;
19
20
  getIndex(id: Id): number;
20
- sort(rule?: ISortMode): void;
21
+ sort(rule?: ISortMode, config?: ISortConfig): void;
21
22
  filter(rule?: IFilterMode | IFilterComplexMode | IFilterCallback, config?: ITreeFilterConfig, silent?: boolean): string;
22
23
  restoreOrder(): void;
23
24
  copy(id: Id, index: number, target?: IDataCollection | ITreeCollection, targetId?: Id): Id;
@@ -41,7 +42,10 @@ export declare class TreeCollection<T extends IDataItem = IDataItem> extends Dat
41
42
  protected _setParent(item: IDataItem, parent: Id): void;
42
43
  protected _copy(id: Id, index: number, target?: IDataCollection | ITreeCollection, targetId?: Id, key?: number): Id;
43
44
  protected _move(id: Id, index: number, target?: ITreeCollection | IDataCollection, targetId?: Id, key?: number): Id;
44
- protected _reset(id?: Id): void;
45
+ protected _reset(config: {
46
+ id?: Id;
47
+ grouping: any;
48
+ }): void;
45
49
  protected _removeCore(id: any): void;
46
50
  protected _addToOrder(_order: any, obj: any, index: number): void;
47
51
  protected _parse_data(data: any, parent?: Id): void;
@@ -50,4 +54,6 @@ export declare class TreeCollection<T extends IDataItem = IDataItem> extends Dat
50
54
  private _serialize;
51
55
  private _applyFilter;
52
56
  protected _normalizeFilters(filters: any): any;
57
+ protected _checkFilterRule(rule: IFilterMode | IFilterComplexMode | IFilterCallback): boolean;
58
+ protected _applySorters(by?: ISortMode): void;
53
59
  }
@@ -68,7 +68,6 @@ export interface IApproximate {
68
68
  maxNum: number;
69
69
  }
70
70
  export interface IDataConfig {
71
- prep?: anyFunction;
72
71
  init?: anyFunction;
73
72
  update?: anyFunction;
74
73
  approximate?: IApproximate;
@@ -178,7 +177,7 @@ export interface ITreeCollection<T extends IDataItem = IDataItem> extends IDataC
178
177
  getLength(id?: Id): number;
179
178
  getIndex(id: Id): number;
180
179
  getItems(id: Id): T[];
181
- sort(rule?: ISortMode): void;
180
+ sort(rule?: ISortMode, config?: ISortConfig): void;
182
181
  map(callback: DataCallback<T>, parent?: Id, direct?: boolean): any;
183
182
  filter(rule?: IFilterMode | IFilterCallback, config?: ITreeFilterConfig, silent?: boolean): string;
184
183
  restoreOrder(): void;
@@ -1,29 +1,33 @@
1
- import { ICsvExportConfig, IGrid, IXlsxExportConfig } from "./types";
1
+ import { ICsvExportConfig, IGrid, IXlsxExportConfig, ICellCss } from "./types";
2
2
  import { IPDFConfig, IPNGConfig, TExportType } from "../../ts-common/types";
3
- export declare class Exporter {
3
+ export interface IExportData {
4
+ name: string;
5
+ columns: Array<{
6
+ width: number;
7
+ }>;
8
+ header: string[][];
9
+ data: any[];
10
+ styles: {
11
+ cells: any[];
12
+ css: {
13
+ [key: string]: ICellCss;
14
+ };
15
+ };
16
+ }
17
+ export interface IExporter {
18
+ pdf: (config?: IPDFConfig) => void;
19
+ png: (config?: IPNGConfig) => void;
20
+ xlsx: (config?: IXlsxExportConfig) => IExportData;
21
+ csv: (config?: ICsvExportConfig) => string;
22
+ }
23
+ export declare class Exporter implements IExporter {
4
24
  private _name;
5
25
  private _version;
6
26
  private _view;
7
27
  constructor(_name: string, _version: string, _view: IGrid);
8
28
  pdf(config?: IPDFConfig): void;
9
29
  png(config?: IPNGConfig): void;
10
- xlsx(config?: IXlsxExportConfig): {
11
- name: string;
12
- columns: any[];
13
- header: any[][];
14
- data: string[][];
15
- styles: {
16
- cells: any[];
17
- css: {
18
- default: {
19
- color: string;
20
- background: string;
21
- fontSize: number;
22
- bold: boolean;
23
- };
24
- };
25
- };
26
- };
30
+ xlsx(config?: IXlsxExportConfig): IExportData;
27
31
  csv(config?: ICsvExportConfig): string;
28
32
  private _export;
29
33
  private getFlatCSV;
@@ -65,7 +65,7 @@ export declare class Grid extends View implements IGrid {
65
65
  protected normalizeColumns({ config, columns, configChanged }: INormalizeColumnsParams): void;
66
66
  protected getNormalizeContentHeight(row: IFooter | IHeader, col: ICol, config: IGridConfig): number;
67
67
  protected _parseData(): void;
68
- protected _createCollection(prep: (data: any[]) => any[]): void;
68
+ protected _createCollection(): void;
69
69
  protected _getRowIndex(rowId: Id): number;
70
70
  protected _setEventHandlers(): void;
71
71
  protected _addEmptyRow(): void;
@@ -556,19 +556,6 @@ export interface ICellCss {
556
556
  fontSize?: number;
557
557
  bold?: boolean;
558
558
  }
559
- export interface IExportData {
560
- columns: Array<{
561
- width: number;
562
- }>;
563
- header: string[][];
564
- data: any[];
565
- styles: {
566
- cells: any[];
567
- css: {
568
- [key: string]: ICellCss;
569
- };
570
- };
571
- }
572
559
  export interface ICellContent {
573
560
  element?: any;
574
561
  toHtml: (column: ICol, config: IRendererConfig) => any;
@@ -18,7 +18,7 @@ export declare class TreeGrid extends ExtendedGrid implements ITreeGrid {
18
18
  getCellRect(rowId: Id, colId: Id): ICellRect;
19
19
  getSpan(rowId: Id, colId: Id): ISpan;
20
20
  protected _adjustColumnsWidth({ rows, cols, totalCols, adjust, }: IAdjustColumns): IColumnsWidth;
21
- protected _createCollection(prep: (data: any[]) => any[]): void;
21
+ protected _createCollection(): void;
22
22
  protected _getRowIndex(rowId: Id): number;
23
23
  protected _applyLocalFilter(beforePrepareData?: boolean): void;
24
24
  protected _setEventHandlers(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dhx-chart",
3
- "version": "9.0.0",
3
+ "version": "9.0.1",
4
4
  "description": "dhtmlxChart widget",
5
5
  "homepage":"https://docs.dhtmlx.com/chart",
6
6
  "license":"GPL",
package/readme.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
3
 
4
- dhtmlxChart v.9.0.0 Standard
4
+ dhtmlxChart v.9.0.1 Standard
5
5
  This software is covered by GPL-2.0 License. Usage without proper license is prohibited.
6
6
 
7
7
  (c) XB Software.
package/whatsnew.txt CHANGED
@@ -1,3 +1,6 @@
1
+ Version 9.0.1 (December 10, 2024)
2
+ ----------------------------
3
+
1
4
  Version 9.0.0 (November 25, 2024)
2
5
  ----------------------------
3
6