@den4ik92/ng2-smart-table 19.7.1 → 19.7.21
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/fesm2022/den4ik92-ng2-smart-table.mjs +128 -123
- package/fesm2022/den4ik92-ng2-smart-table.mjs.map +1 -1
- package/lib/lib/data-set/data-set.d.ts +2 -1
- package/lib/lib/data-source/data-source.d.ts +1 -0
- package/lib/lib/helpers.d.ts +1 -1
- package/lib/lib/interfaces/smart-table.models.d.ts +6 -0
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ export declare class DataSet {
|
|
|
5
5
|
protected columnSettings: SmartTableColumnSettings[];
|
|
6
6
|
readonly editorInputClass: string;
|
|
7
7
|
readonly cellEmptyText?: string | undefined;
|
|
8
|
+
idKey?: string | undefined;
|
|
8
9
|
newRow: Row;
|
|
9
10
|
protected readonly data: import("@angular/core").WritableSignal<any[]>;
|
|
10
11
|
protected readonly columns: import("@angular/core").WritableSignal<Column[]>;
|
|
@@ -14,7 +15,7 @@ export declare class DataSet {
|
|
|
14
15
|
readonly getVisibleColumns: import("@angular/core").Signal<Column[]>;
|
|
15
16
|
readonly getRows: import("@angular/core").Signal<Row[]>;
|
|
16
17
|
readonly isAllSelected: import("@angular/core").Signal<boolean>;
|
|
17
|
-
constructor(dataList: any[] | undefined, columnSettings: SmartTableColumnSettings[], editorInputClass: string, cellEmptyText?: string | undefined);
|
|
18
|
+
constructor(dataList: any[] | undefined, columnSettings: SmartTableColumnSettings[], editorInputClass: string, cellEmptyText?: string | undefined, idKey?: string | undefined);
|
|
18
19
|
setData(data: any[]): void;
|
|
19
20
|
setColumnsConfig(columnSettings: SmartTableColumnSettings[]): void;
|
|
20
21
|
findRowByData(data: any): Row | undefined;
|
|
@@ -5,6 +5,7 @@ export declare abstract class DataSource<T extends BaseDataType = any> {
|
|
|
5
5
|
protected readonly onChangedSource: Subject<SmartTableOnChangedEvent>;
|
|
6
6
|
protected readonly sortConf: import("@angular/core").WritableSignal<SmartTableSortItem | null>;
|
|
7
7
|
protected readonly filters: import("@angular/core").WritableSignal<SmartTableFilterItem[]>;
|
|
8
|
+
idKey?: string;
|
|
8
9
|
readonly pagingConf: import("@angular/core").WritableSignal<SmartTablePagerSettings>;
|
|
9
10
|
protected readonly data: import("@angular/core").WritableSignal<T[]>;
|
|
10
11
|
/**
|
package/lib/lib/helpers.d.ts
CHANGED
|
@@ -21,5 +21,5 @@ export declare function getRandomId(prefix?: string, suffix?: string): string;
|
|
|
21
21
|
export declare function setLocalStorage(key: string, value: string | object | boolean): void;
|
|
22
22
|
export declare function getLocalStorage<T = string>(key: string): T | null;
|
|
23
23
|
export declare function compareObjectsAsJSON<T extends Record<string, unknown>>(a: T, b: T): boolean;
|
|
24
|
-
export declare function isObjectsIdentical<T extends Record<string, unknown>>(a: T, b: T): boolean;
|
|
24
|
+
export declare function isObjectsIdentical<T extends Record<string, unknown>>(a: T, b: T, idKey?: string): boolean;
|
|
25
25
|
export declare function CheckParentElementClassRecursive(element: HTMLElement | null, className: string): boolean;
|
|
@@ -22,6 +22,12 @@ export interface ColumnPositionState {
|
|
|
22
22
|
export interface SmartTableSettings<T extends BaseDataType = any> {
|
|
23
23
|
selectMode?: 'single' | 'multi';
|
|
24
24
|
mode?: 'inline' | 'external';
|
|
25
|
+
/**
|
|
26
|
+
* @description Key used to identify and compare row objects. When set, objects are compared
|
|
27
|
+
* by this field instead of the default heuristic (uuid → id → deep equality).
|
|
28
|
+
* @example 'id' | 'uuid' | 'code'
|
|
29
|
+
*/
|
|
30
|
+
idKey?: keyof T & string;
|
|
25
31
|
cellEmptyText?: string;
|
|
26
32
|
resetSortOnThirdClick?: boolean;
|
|
27
33
|
columnSort?: {
|