@den4ik92/ng2-smart-table 19.4.8 → 19.5.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.
@@ -16,6 +16,7 @@ export declare class Ng2SmartTableTbodyComponent<T extends BaseDataType = any> {
16
16
  readonly customActionEmitter: import("@angular/core").OutputEmitterRef<SmartTableCustomEvent<T>>;
17
17
  readonly userClickedRow: import("@angular/core").OutputEmitterRef<Row>;
18
18
  readonly multipleSelectRow: import("@angular/core").OutputEmitterRef<Row>;
19
+ rowClicked(row: Row): void;
19
20
  readonly noDataMessage: import("@angular/core").Signal<string>;
20
21
  protected customActionEmitted(actionName: string, row: Row): void;
21
22
  protected trackByIdOrIndex(index: number, item: any): string | number;
@@ -13,7 +13,7 @@ export declare class DataSet {
13
13
  readonly getVisibleColumns: import("@angular/core").Signal<Column[]>;
14
14
  readonly getRows: import("@angular/core").Signal<Row[]>;
15
15
  readonly isAllSelected: import("@angular/core").Signal<boolean>;
16
- constructor(data: any[] | undefined, columnSettings: SmartTableColumnSettings[], editorInputClass: string);
16
+ constructor(dataList: any[] | undefined, columnSettings: SmartTableColumnSettings[], editorInputClass: string);
17
17
  setData(data: any[]): void;
18
18
  setColumnsConfig(columnSettings: SmartTableColumnSettings[]): void;
19
19
  findRowByData(data: any): Row | undefined;
@@ -2,6 +2,8 @@ import { SmartTableOnChangedEventToEmit } from '../../interfaces/smart-table.mod
2
2
  import { DataSource } from '../data-source';
3
3
  export declare class LocalDataSource<T extends Record<string, any> = any> extends DataSource<T> {
4
4
  private readonly filteredAndSorted;
5
+ private readonly paginatedList;
6
+ readonly count: import("@angular/core").Signal<number>;
5
7
  constructor(data?: T[]);
6
8
  load(data: T[]): Promise<true>;
7
9
  prepend(element: T): Promise<true>;
@@ -9,10 +11,7 @@ export declare class LocalDataSource<T extends Record<string, any> = any> extend
9
11
  add(element: T): Promise<true>;
10
12
  getAll(): Promise<T[]>;
11
13
  reset(silent?: boolean): void;
12
- readonly count: import("@angular/core").Signal<number>;
13
14
  emitOnChanged(event: SmartTableOnChangedEventToEmit, newElements?: T[]): Promise<void>;
14
- protected sort(data: T[]): Promise<T[]>;
15
- protected filter(data: T[]): Promise<T[]>;
16
15
  protected paginate(data: T[]): T[];
17
16
  private isPageOutOfBounce;
18
17
  }
@@ -1,2 +1,2 @@
1
1
  import { BaseDataType, SmartTableFilterItem } from '../../interfaces/smart-table.models';
2
- export declare function isElementSatisfied<T extends BaseDataType>(element: T, filters: SmartTableFilterItem[]): Promise<boolean>;
2
+ export declare function isElementSatisfied<T extends BaseDataType>(element: T, filters: SmartTableFilterItem[]): boolean;
@@ -1,5 +1,3 @@
1
1
  import { SmartTableCompareFunction } from '../../interfaces/smart-table.models';
2
2
  export declare function compareValues(direction: number, a: any, b: any): number;
3
- export declare class LocalSorter {
4
- static sort<T extends Record<string, any>>(data: T[], field: string, direction: string, customCompare?: SmartTableCompareFunction): Promise<T[]>;
5
- }
3
+ export declare function localSort<T extends Record<string, any>>(data: T[], field: string, direction: string, customCompare?: SmartTableCompareFunction): T[];
package/lib/lib/grid.d.ts CHANGED
@@ -9,7 +9,6 @@ export declare class Grid {
9
9
  currentColumnsSortState: ColumnPositionState[];
10
10
  private columnsSortedEmitter;
11
11
  private sourceOnChangedSubscription;
12
- private sourceOnUpdatedSubscription;
13
12
  readonly settings: import("@angular/core").WritableSignal<SmartTableSettings<any>>;
14
13
  readonly createFormShown: import("@angular/core").WritableSignal<boolean>;
15
14
  readonly isMultiSelectVisible: import("@angular/core").Signal<boolean>;
@@ -110,7 +110,7 @@ export type SmartTableEditorAndFilterTypes = 'text' | 'textarea' | 'list' | 'cus
110
110
  export type SmartTableEditorAndFilter = SmartTableTextEditor | SmartTableEditorList | SmartTableEditorCheckbox | SmartTableEditorCustom;
111
111
  interface SmartTableTextEditor {
112
112
  type: 'text' | 'textarea';
113
- config: any;
113
+ config?: any;
114
114
  }
115
115
  interface SmartTableEditorList {
116
116
  type: 'list';
@@ -143,6 +143,7 @@ export interface SmartTableFilterItem {
143
143
  /**
144
144
  * key of column to filter
145
145
  */
146
+ type: SmartTableEditorAndFilterTypes;
146
147
  field: string;
147
148
  search: string;
148
149
  filter?: SmartTableFilterFunction;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@den4ik92/ng2-smart-table",
3
- "version": "19.4.8",
3
+ "version": "19.5.1",
4
4
  "description": "Angular Smart Table",
5
5
  "author": "Den4ik92",
6
6
  "license": "MIT",