dhx-suite 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.
Files changed (38) hide show
  1. package/codebase/suite.min.css +1 -1
  2. package/codebase/suite.min.js +3 -3
  3. package/codebase/suite.min.js.map +1 -1
  4. package/codebase/types/ts-all/sources/entry.d.ts +1 -1
  5. package/codebase/types/ts-common/core.d.ts +1 -0
  6. package/codebase/types/ts-common/html.d.ts +1 -0
  7. package/codebase/types/ts-common/input.d.ts +24 -0
  8. package/codebase/types/ts-data/index.d.ts +1 -0
  9. package/codebase/types/ts-data/sources/DragManager.d.ts +12 -1
  10. package/codebase/types/ts-data/sources/datacollection/group.d.ts +42 -0
  11. package/codebase/types/ts-data/sources/datacollection.d.ts +6 -1
  12. package/codebase/types/ts-data/sources/methods.d.ts +11 -0
  13. package/codebase/types/ts-data/sources/types.d.ts +30 -11
  14. package/codebase/types/ts-form/sources/elements/input.d.ts +7 -0
  15. package/codebase/types/ts-form/sources/elements/textarea.d.ts +4 -3
  16. package/codebase/types/ts-grid/index.d.ts +1 -1
  17. package/codebase/types/ts-grid/sources/ExtendedGrid.d.ts +23 -0
  18. package/codebase/types/ts-grid/sources/Grid.d.ts +18 -8
  19. package/codebase/types/ts-grid/sources/ProGrid.d.ts +50 -14
  20. package/codebase/types/ts-grid/sources/Selection.d.ts +28 -2
  21. package/codebase/types/ts-grid/sources/columnsResizer.d.ts +2 -2
  22. package/codebase/types/ts-grid/sources/helpers/data.d.ts +3 -3
  23. package/codebase/types/ts-grid/sources/helpers/default.d.ts +2 -0
  24. package/codebase/types/ts-grid/sources/helpers/keys.d.ts +3 -2
  25. package/codebase/types/ts-grid/sources/locales/en.d.ts +7 -0
  26. package/codebase/types/ts-grid/sources/types.d.ts +378 -338
  27. package/codebase/types/ts-grid/sources/ui/Cells.d.ts +4 -2
  28. package/codebase/types/ts-grid/sources/ui/editors/DateEditor.d.ts +2 -0
  29. package/codebase/types/ts-grid/sources/ui/editors/InputEditor.d.ts +5 -3
  30. package/codebase/types/ts-grid/sources/ui/editors/TextAreaEditor.d.ts +3 -1
  31. package/codebase/types/ts-grid/sources/ui/group/panel.d.ts +12 -0
  32. package/codebase/types/ts-treegrid/index.d.ts +3 -0
  33. package/codebase/types/ts-treegrid/sources/TreeGrid.d.ts +28 -0
  34. package/codebase/types/ts-treegrid/sources/TreeGridCollection.d.ts +20 -0
  35. package/codebase/types/ts-treegrid/sources/types.d.ts +34 -0
  36. package/package.json +1 -1
  37. package/readme.txt +1 -1
  38. package/whatsnew.txt +69 -3
@@ -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 | number;
28
+ text?: string | ((args: import("../types").ISummaryList) => string);
29
29
  css?: string;
30
30
  tooltip?: boolean | import("../types").IGridTooltipConfig;
31
- tooltipTemplate?: (spanValue: any, span: ISpan) => string;
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 isValidWord;
19
- private isCorrectRange;
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 _editor: HTMLTextAreaElement;
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,3 @@
1
+ export * from "./sources/TreeGrid";
2
+ export * from "./sources/types";
3
+ export * from "./sources/TreeGridCollection";
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dhx-suite",
3
- "version": "8.4.5",
3
+ "version": "9.0.0",
4
4
  "description": "dhtmlxSuite widget",
5
5
  "homepage":"https://docs.dhtmlx.com",
6
6
  "license":"GPL",
package/readme.txt CHANGED
@@ -1,7 +1,7 @@
1
1
  /*
2
2
  @license
3
3
 
4
- dhtmlxSuite v.8.4.5 Standard
4
+ dhtmlxSuite v.9.0.0 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,6 +1,72 @@
1
- Version 8.4.5 (October 14, 2024)
2
- ----------------------------
3
-
1
+ # Version 9.0 (November 25, 2024)
2
+
3
+ ### Breaking changes
4
+
5
+ In this version TreeGrid becomes a part of Grid. Check the Migration guide to keep in step with the latest updates.
6
+
7
+ ### Deprecated
8
+
9
+ #### Grid
10
+
11
+ - The column header `content` property doesn't support "avg" | "sum" | "max" | "min" | "count" arguments
12
+ - The column footer `content` property is removed
13
+ - The column `format` property for data format
14
+ - The column `format` property for date format (for columns with type:"date")
15
+ - The column `type: "percent"` property
16
+ - The `groupBy()`, `ungroup()` methods are removed
17
+ - The `groupTitleTemplate` property is removed
18
+
19
+ ### New functionality
20
+
21
+ #### Common features
22
+
23
+ - The new helper method `dhx.methods` to define the default data calculation functions used by the library and redefine them to create custom functions
24
+
25
+ #### DataCollection
26
+
27
+ - The ability to group data items, aggregate data in a group, adjust the order and configuration of data grouping, render statistics in the summary rows.
28
+ - new methods: `group()`, `ungroup()`, `isGrouped()`
29
+ - new events: `beforeGroup`, `afterGroup`, `beforeUnGroup`, `afterUnGroup`
30
+
31
+ #### Form
32
+
33
+ - The ability to specify patternMask/numberMask for the Input and Textarea controls
34
+ - The new `getText()` method for getting the text value of an input
35
+
36
+ #### Grid
37
+
38
+ - The "tree" mode for Grid (PRO version)
39
+ - Row data grouping (PRO version) with the ability to aggregate data in a group, adjust the appearance, order and configuration of data grouping, render statistics in the summary rows.
40
+ - new Grid properties: `group`, `groupable`, `closable`
41
+ - new column properties: `groupable`, `closable`
42
+ - new events: `groupPanelItemClick`, `groupPanelItemMouseDown`
43
+ - The ability to render custom statistics in the header/footer of columns and Grid spans
44
+ - the `text` and `tooltipTemplate` properties of a column and of the Grid `spans` configuration object can be set as callback functions to render calculated summary values
45
+ - new Grid property: `summary`
46
+ - new method: `getSummary()`
47
+ - new column property: `summary`
48
+ - The ability to specify patternMask/numberMask for columns
49
+ - Localization for Grid labels is added
50
+
51
+ ### Updates
52
+
53
+ #### Grid
54
+
55
+ - The `asDateObject` property is added for the `editorConfig` object of the DatePicker column editor
56
+ to provide the ability to work with a Date object as with a string
57
+ - The `cell` parameter is added for the callback function of the following events:
58
+ `headerCellClick`, `footerCellClick`, `headerCellMouseOver`, `footerCellMouseOver`, `headerCellMouseDown`, `footerCellMouseDown`, `headerCellDblClick`, `footerCellDblClick`, `headerCellRightClick`, `footerCellRightClick`
59
+ - `Ctrl+Enter` shortcut for expanding/collapsing the parent item in the TreeGrid mode
60
+
61
+ # Version 8.4.6 (October 15, 2024)
62
+
63
+ ### Fixes
64
+
65
+ - Grid. The issue with opening the Combobox column editor without options
66
+
67
+ Version 8.4.5 (October 14, 2024)
68
+ ----------------------------
69
+
4
70
  # Version 8.4.4 (September 16, 2024)
5
71
 
6
72
  ### Fixes