dhx-suite 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.
- package/codebase/suite.min.css +1 -1
- package/codebase/suite.min.js +3 -3
- package/codebase/suite.min.js.map +1 -1
- package/codebase/types/ts-data/sources/datacollection.d.ts +8 -4
- package/codebase/types/ts-data/sources/helpers.d.ts +1 -1
- package/codebase/types/ts-data/sources/treecollection.d.ts +9 -3
- package/codebase/types/ts-data/sources/types.d.ts +1 -2
- package/codebase/types/ts-grid/sources/Exporter.d.ts +23 -19
- package/codebase/types/ts-grid/sources/Grid.d.ts +1 -1
- package/codebase/types/ts-grid/sources/types.d.ts +0 -13
- package/codebase/types/ts-tree/sources/Tree.d.ts +0 -1
- package/codebase/types/ts-treegrid/sources/TreeGrid.d.ts +1 -1
- package/package.json +1 -1
- package/readme.txt +1 -1
- package/whatsnew.txt +22 -0
|
@@ -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(
|
|
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
|
|
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
|
|
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(
|
|
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:
|
|
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(
|
|
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
|
|
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(
|
|
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;
|
|
@@ -17,7 +17,6 @@ export declare class Tree<T extends object = object> extends View implements ITr
|
|
|
17
17
|
private _right;
|
|
18
18
|
private _keyManager;
|
|
19
19
|
private _touch;
|
|
20
|
-
private _isDraget;
|
|
21
20
|
constructor(container: HTMLElement | string, config?: ITreeConfig);
|
|
22
21
|
focusItem(id: Id): void;
|
|
23
22
|
destructor(): void;
|
|
@@ -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(
|
|
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
package/readme.txt
CHANGED
package/whatsnew.txt
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
# Version 9.0.1 (December 10, 2024)
|
|
2
|
+
|
|
3
|
+
### Fixes
|
|
4
|
+
|
|
5
|
+
- Core. The issue with the local trial package during import to frameworks
|
|
6
|
+
- DataCollection. Adding multiple elements at index -1 will distribute the elements throughout the collection
|
|
7
|
+
- DataCollection. The `find()`/`findAll()` method miss the `index` and `array` arguments, when the parameter is set as a function
|
|
8
|
+
- DataCollection. The `add()` method mutates the added object
|
|
9
|
+
- DataCollection. Data preparation in the config is removed (old realization)
|
|
10
|
+
- DataCollection. After parsing the grouped data, the old data is displayed
|
|
11
|
+
- Form. The issue with the destruction of items in Optimus
|
|
12
|
+
- Grid. Multiselection. Reselection of the first selected row doesn't work
|
|
13
|
+
- Grid. The export module typization is added
|
|
14
|
+
- Grid. The use of `footerAutoHeight` with `summary` causes an error
|
|
15
|
+
- Message. Incorrect text wrapping
|
|
16
|
+
- Tree. Selection isn't applied after dragging an item to another Tree
|
|
17
|
+
- TreeCollection. The `smartSorting` property is missed in the configuration of the `sort()` method
|
|
18
|
+
- TreeCollection. The `filter()` method allows specifying an invalid configuration
|
|
19
|
+
- TreeCollection. The `move()` method calculates the movements incorrectly when moving an array of elements
|
|
20
|
+
- TreeCollection. The `move()` method doesn't allow being called without additional arguments
|
|
21
|
+
- TreeCollection. The ability to create a non-existent parent
|
|
22
|
+
|
|
1
23
|
# Version 9.0 (November 25, 2024)
|
|
2
24
|
|
|
3
25
|
### Breaking changes
|