dhx-chart 8.4.2 → 8.4.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.
@@ -1 +1,7 @@
1
+ import { Id } from "../../ts-common/types";
2
+ export declare class CollectionStore {
3
+ private _store;
4
+ setItem(id: Id, target: any): void;
5
+ getItem(id: Id): any;
6
+ }
1
7
  export declare const collectionStore: any;
@@ -1,10 +1,9 @@
1
- import { DataCollection } from "../datacollection";
2
- import { IDataChangeStack, IDataDriver, IDataProxy, DataDriver } from "../types";
1
+ import { IDataChangeStack, IDataDriver, IDataProxy, IDataCollection, DataDriver } from "../types";
3
2
  export declare class Loader {
4
3
  private _parent;
5
4
  private _saving;
6
5
  private _changes;
7
- constructor(parent: DataCollection, changes: any);
6
+ constructor(parent: IDataCollection, changes: any);
8
7
  load(url: IDataProxy, driver?: IDataDriver | DataDriver): Promise<any>;
9
8
  parse(data: any | any[], driver?: IDataDriver | DataDriver): any;
10
9
  save(url: IDataProxy): void;
@@ -2,7 +2,6 @@ import { IEventSystem } from "../../ts-common/events";
2
2
  import { Id } from "../../ts-common/types";
3
3
  import { Sort } from "./datacollection/sort";
4
4
  import { DataCallback, DataEvents, IDataCollection, IDataItem, IDataProxy, IFilterCallback, IFilterConfig, IFilterMode, ISortMode, ITreeCollection, IUpdateObject, ReduceCallBack, Statuses, IDataEventsHandlersMap, DataDriver, IDataConfig, ISortConfig, IDataDriver, IFilterComplexMode, IFilter, IResetFilterConfig } from "./types";
5
- import { TreeCollection } from "./treecollection";
6
5
  export declare class DataCollection<T extends IDataItem = IDataItem> implements IDataCollection<T> {
7
6
  loadData: Promise<any>;
8
7
  saveData: Promise<any>;
@@ -48,10 +47,10 @@ export declare class DataCollection<T extends IDataItem = IDataItem> implements
48
47
  findAll(conf: IFilterMode | DataCallback<T>): any[];
49
48
  sort(rule?: ISortMode, config?: ISortConfig): void;
50
49
  copy(id: Id | Id[], index: number, target?: IDataCollection | ITreeCollection, targetId?: Id): Id | Id[];
51
- move(id: Id | Id[], index: number, target?: DataCollection | TreeCollection, targetId?: Id, newId?: Id): Id | Id[];
50
+ move(id: Id | Id[], index: number, target?: IDataCollection | ITreeCollection, targetId?: Id, newId?: Id): Id | Id[];
52
51
  forEach(callback: DataCallback<T>): void;
53
52
  load(url: IDataProxy | string, driver?: IDataDriver | DataDriver): Promise<any>;
54
- parse(data: T[], driver?: DataDriver | IDataDriver): any;
53
+ parse(data: T[] | string, driver?: DataDriver | IDataDriver): any;
55
54
  $parse(data: any[]): void;
56
55
  save(url: IDataProxy | string): void;
57
56
  changeId(id: Id, newId?: Id, silent?: boolean): void;
@@ -6,7 +6,7 @@ export declare class Selection implements ISelection {
6
6
  config: ISelectionConfig;
7
7
  private _selected;
8
8
  private _data;
9
- constructor(config: ISelectionConfig, data?: DataCollection, events?: IEventSystem<any>);
9
+ constructor(config: ISelectionConfig, data: DataCollection, events?: IEventSystem<any>);
10
10
  getId(): Id;
11
11
  getItem(): any;
12
12
  remove(id?: Id): boolean;
@@ -1,12 +1,10 @@
1
1
  import { IEventSystem } from "../../ts-common/events";
2
- import { DataCollection } from "./datacollection";
3
- import { TreeCollection } from "./treecollection";
4
2
  import { anyFunction, IAnyObj, Id } from "../../ts-common/types";
5
3
  export interface IDataProxy {
6
4
  url: string;
7
5
  config?: any;
8
6
  updateUrl?: (url?: string, params?: any) => void;
9
- load?: () => Promise<any[] | void>;
7
+ load?: () => Promise<any[] | string | void>;
10
8
  save?: (data: any, mode: string) => Promise<any>;
11
9
  }
12
10
  export interface ILazyDataProxy extends IDataProxy {
@@ -74,6 +72,7 @@ export interface IDataConfig {
74
72
  approximate?: IApproximate;
75
73
  autoload?: string;
76
74
  collapsed?: boolean;
75
+ rootId?: Id;
77
76
  }
78
77
  export interface IDataCollection<T extends IDataItem = IDataItem> {
79
78
  config: IDataConfig;
@@ -82,7 +81,8 @@ export interface IDataCollection<T extends IDataItem = IDataItem> {
82
81
  loadData: Promise<any>;
83
82
  saveData: Promise<any>;
84
83
  load(url: IDataProxy | string, driver?: IDataDriver | DataDriver): Promise<any>;
85
- parse(data: T[], driver?: DataDriver | IDataDriver): void;
84
+ parse(data: T[] | string, driver?: DataDriver | IDataDriver): void;
85
+ $parse(data: any[]): void;
86
86
  add(newItem: IDataItem, index?: number): Id;
87
87
  add(newItem: IDataItem[], index?: number): Id[];
88
88
  add(newItem: IDataItem | IDataItem[], index?: number): Id | Id[];
@@ -112,7 +112,7 @@ export interface IDataCollection<T extends IDataItem = IDataItem> {
112
112
  sort(rule?: ISortMode, config?: ISortConfig): void;
113
113
  serialize(driver?: DataDriver): T[];
114
114
  copy(id: Id | Id[], index: number, target?: IDataCollection | ITreeCollection, targetId?: Id): Id | Id[];
115
- move(id: Id | Id[], index: number, target?: DataCollection | TreeCollection, targetId?: Id): Id | Id[];
115
+ move(id: Id | Id[], index: number, target?: IDataCollection | ITreeCollection, targetId?: Id): Id | Id[];
116
116
  changeId(id: Id, newId?: Id, silent?: boolean): void;
117
117
  forEach(callback: DataCallback<T>): void;
118
118
  save(url: IDataProxy | string): void;
@@ -194,7 +194,8 @@ export interface IDataItem {
194
194
  }
195
195
  export type DropPosition = "top" | "bottom" | "in";
196
196
  export interface IObjWithData {
197
- data: TreeCollection | DataCollection;
197
+ name?: string;
198
+ data: ITreeCollection | IDataCollection;
198
199
  events: IEventSystem<DragEvents, IDragEventsHandlersMap>;
199
200
  config: IDragConfig;
200
201
  id?: Id;
@@ -7,6 +7,7 @@ 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, IAdjustColumns, IFooter, IHeader, INormalizeColumnsParams } from "./types";
8
8
  export declare class Grid extends View implements IGrid {
9
9
  version: string;
10
+ name: "grid";
10
11
  data: IDataCollection;
11
12
  config: IGridConfig;
12
13
  events: IEventSystem<DataEvents | GridEvents | DragEvents, IEventHandlersMap & IDataEventsHandlersMap & IDragEventsHandlersMap>;
@@ -1,7 +1,7 @@
1
- import { Grid } from "./Grid";
2
1
  import { IGridConfig, ICol, IRow, IProGrid, IFooter, IHeader } from "./types";
3
2
  import { IDataCollection, IDataItem } from "../../ts-data";
4
3
  import { ScrollView } from "../../ts-common/ScrollView";
4
+ import { Grid } from "./Grid";
5
5
  export declare class ProGrid extends Grid implements IProGrid {
6
6
  scrollView: ScrollView;
7
7
  constructor(container: HTMLElement | string, config?: IGridConfig);
@@ -1,2 +1,2 @@
1
- import { Grid } from "./Grid";
2
- export declare function startResize(grid: Grid, column: string, ev: MouseEvent & TouchEvent, cb: any): void;
1
+ import { IGrid } from "./types";
2
+ export declare function startResize(grid: IGrid, column: string, ev: MouseEvent & TouchEvent, cb: any): void;
@@ -21,7 +21,7 @@ export declare const getCalculatedRowHeight: (height: number, config?: {
21
21
  rowHeight: number;
22
22
  padding?: number;
23
23
  }) => number;
24
- export declare const getTreeCellWidthOffset: (row: IRow) => number;
24
+ export declare const getTreeCellWidthOffset: (row: IRow, toArrow?: boolean) => number;
25
25
  export declare const getMaxColsWidth: (rows: IRow[], cols: ICol[], config?: IContainerConfig, target?: AdjustTargetType) => IColumnsWidth;
26
26
  export declare function toFormat(value: any, type?: colType, format?: string): any;
27
27
  export declare function getEditorOptions(col: ICol, row?: IRow): TOption[];
@@ -3,7 +3,6 @@ import { IKeyManager } from "../../ts-common/KeyManager";
3
3
  import { IAlign } from "../../ts-common/html";
4
4
  import { Position } from "../../ts-message";
5
5
  import { IDataCollection, IDragConfig, ICsvDriverConfig, IDataItem, IDragInfo, DataCollection } from "../../ts-data";
6
- import { Exporter } from "./Exporter";
7
6
  import { Combobox } from "../../ts-combobox";
8
7
  import { IHandlers, Id } from "../../ts-common/types";
9
8
  import { ScrollView } from "../../ts-common/ScrollView";
@@ -145,7 +144,8 @@ export interface ISortingState {
145
144
  }
146
145
  export interface IGrid {
147
146
  data: IDataCollection;
148
- export: Exporter;
147
+ export: any;
148
+ name: "grid";
149
149
  config: IGridConfig;
150
150
  events: IEventSystem<GridEvents, IEventHandlersMap>;
151
151
  selection: ISelection;
@@ -178,6 +178,7 @@ export interface IGrid {
178
178
  editEnd(withoutSave?: boolean): void;
179
179
  getSortingState(): ISortingState;
180
180
  getHeaderFilter(colId: Id): IHeaderFilter;
181
+ getRootNode(): HTMLElement;
181
182
  /** @deprecated See a documentation: https://docs.dhtmlx.com/ */
182
183
  edit(rowId: Id, colId: Id, editorType?: EditorType): void;
183
184
  }
@@ -4,14 +4,14 @@ type mouseEvents = GridEvents.cellClick | GridEvents.cellMouseOver | GridEvents.
4
4
  type touchEvents = GridSystemEvents.cellTouchEnd | GridSystemEvents.cellTouchMove;
5
5
  declare function handleMouse(rowStart: number, colStart: number, conf: IRendererConfig, type: mouseEvents & touchEvents, e: any): void;
6
6
  export declare function getHandlers(row: number, column: number, conf: IRendererConfig): {
7
- onclick: (number | IRendererConfig | GridEvents | typeof handleMouse)[];
8
- onmouseover: (number | IRendererConfig | GridEvents | typeof handleMouse)[];
9
- onmousedown: (number | IRendererConfig | GridEvents | typeof handleMouse)[];
10
- ondblclick: (number | IRendererConfig | GridEvents | typeof handleMouse)[];
11
- oncontextmenu: (number | IRendererConfig | GridEvents | typeof handleMouse)[];
12
- ontouchstart: (number | IRendererConfig | GridEvents | typeof handleMouse)[];
13
- ontouchmove: (number | IRendererConfig | GridSystemEvents | typeof handleMouse)[];
14
- ontouchend: (number | IRendererConfig | GridSystemEvents | typeof handleMouse)[];
7
+ onclick: (number | GridEvents | IRendererConfig | typeof handleMouse)[];
8
+ onmouseover: (number | GridEvents | IRendererConfig | typeof handleMouse)[];
9
+ onmousedown: (number | GridEvents | IRendererConfig | typeof handleMouse)[];
10
+ ondblclick: (number | GridEvents | IRendererConfig | typeof handleMouse)[];
11
+ oncontextmenu: (number | GridEvents | IRendererConfig | typeof handleMouse)[];
12
+ ontouchstart: (number | GridEvents | IRendererConfig | typeof handleMouse)[];
13
+ ontouchmove: (number | GridSystemEvents | IRendererConfig | typeof handleMouse)[];
14
+ ontouchend: (number | GridSystemEvents | IRendererConfig | typeof handleMouse)[];
15
15
  };
16
16
  export declare function getTreeCell(content: any, row: any, col: ICol, conf: IRendererConfig): any;
17
17
  export declare function getCells(conf: IRendererConfig): any[];
@@ -0,0 +1,7 @@
1
+ import { IGridConfig, IRendererConfig, IScrollBarWidth, Split } from "../types";
2
+ export declare const BORDERS = 2;
3
+ export declare function calcScrollBarWidth(config: IGridConfig | IRendererConfig, customScroll?: boolean, sizes?: {
4
+ width: number;
5
+ height: number;
6
+ }): IScrollBarWidth;
7
+ export declare function getCurrFixedCols(config: IGridConfig, split: Split.left | Split.right): import("../types").ICol[];
@@ -1,4 +1,4 @@
1
- import { ICol, IRendererConfig, IRow, IEditor } from "../../types";
1
+ import { ICol, IRendererConfig, IRow, IEditor, ISpan } from "../../types";
2
2
  export declare class TextAreaEditor implements IEditor {
3
3
  protected _handlers: {
4
4
  [key: string]: (...args: any[]) => void;
@@ -13,10 +13,13 @@ export declare class TextAreaEditor implements IEditor {
13
13
  private _minHeight;
14
14
  private _prevHeight;
15
15
  private _width;
16
- constructor(row: IRow, col: ICol, config: IRendererConfig);
16
+ private _initialValue;
17
+ constructor(row: IRow, col: ICol, config: IRendererConfig, span?: ISpan);
17
18
  endEdit(withoutSave?: boolean): void;
18
19
  toHTML(value?: string): any;
19
20
  protected _initHandlers(): void;
20
21
  private _getCurrentHeight;
21
22
  private _getElementHeight;
23
+ private _getCellWidth;
24
+ private _updateHeight;
22
25
  }
@@ -1,2 +1,2 @@
1
- import { IRendererConfig, ICol, IEditor } from "../../types";
2
- export declare function getEditor(row: any, col: ICol, conf: IRendererConfig): IEditor;
1
+ import { IRendererConfig, ICol, IEditor, ISpan } from "../../types";
2
+ export declare function getEditor(row: any, col: ICol, conf: IRendererConfig, span?: ISpan): IEditor;
@@ -1,10 +1,4 @@
1
- import { IGrid, IGridConfig, IProGrid, IRendererConfig, IRow, Split, IScrollBarWidth, ICol } from "../types";
2
- export declare const BORDERS = 2;
3
- export declare function calcScrollBarWidth(config: IGridConfig | IRendererConfig, customScroll?: boolean, sizes?: {
4
- width: number;
5
- height: number;
6
- }): IScrollBarWidth;
7
- export declare function getCurrFixedCols(config: IGridConfig, split: Split.left | Split.right): ICol[];
1
+ import { IGrid, IGridConfig, IProGrid, IRendererConfig, IRow } from "../types";
8
2
  export declare function getRenderConfig(obj: any, data: IRow[], wrapperSizes: any): IRendererConfig;
9
3
  export declare function getElementSizes(element: HTMLElement | any): {
10
4
  width: number;
@@ -44,7 +44,7 @@ export declare class Cell extends View implements ICell {
44
44
  protected _getCss(_content?: boolean): string;
45
45
  protected _initHandlers(): void;
46
46
  protected _getCollapsedSize(cell: ICell, nextCell: ICell): number;
47
- protected _getCollapseIcon(): "dxi dxi-chevron-up" | "dxi dxi-chevron-down" | "dxi dxi-chevron-right" | "dxi dxi-chevron-left";
47
+ protected _getCollapseIcon(): "dxi dxi-chevron-right" | "dxi dxi-chevron-left" | "dxi dxi-chevron-up" | "dxi dxi-chevron-down";
48
48
  protected _isLastCell(): boolean;
49
49
  protected _getNextCell(): any;
50
50
  protected _getAnyFlexCell(selfInclude?: boolean): any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dhx-chart",
3
- "version": "8.4.2",
3
+ "version": "8.4.4",
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.8.4.2 Standard
4
+ dhtmlxChart v.8.4.4 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,9 @@
1
+ Version 8.4.4 (September 16, 2024)
2
+ ----------------------------
3
+
4
+ Version 8.4.3 (September 10, 2024)
5
+ ----------------------------
6
+
1
7
  Version 8.4.2 (August 29, 2024)
2
8
  ----------------------------
3
9