@den4ik92/ng2-smart-table 19.6.49 → 19.7.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.
@@ -0,0 +1,6 @@
1
+ import { BaseEditorComponent } from './base-editor.component';
2
+ import * as i0 from "@angular/core";
3
+ export declare class InputNumberEditorComponent extends BaseEditorComponent {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputNumberEditorComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputNumberEditorComponent, "ng2-input-number-editor", never, {}, {}, never, never, true, never>;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { BaseFilterComponent } from './base-filter.component';
2
+ import * as i0 from "@angular/core";
3
+ export declare class InputNumberFilterComponent extends BaseFilterComponent {
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<InputNumberFilterComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputNumberFilterComponent, "ng2-input-number-filter", never, {}, {}, never, never, true, never>;
6
+ }
@@ -4,12 +4,13 @@ export declare class Cell {
4
4
  protected value: any;
5
5
  row: Row;
6
6
  column: Column;
7
+ cellEmptyText: string;
7
8
  readonly newValue: import("@angular/core").WritableSignal<any>;
8
9
  readonly columnClass: string;
9
10
  readonly styles: Partial<CSSStyleDeclaration>;
10
11
  readonly title: string;
11
12
  readonly id: string;
12
- constructor(value: any, row: Row, column: Column);
13
+ constructor(value: any, row: Row, column: Column, cellEmptyText?: string);
13
14
  getValue(): any;
14
15
  getNotPrepareValue(): any;
15
16
  setNewValue(value: any): void;
@@ -25,6 +25,6 @@ export declare class Column {
25
25
  filterFunction?: SmartTableFilterFunction;
26
26
  constructor(id: string, settings: SmartTableColumnSettings, dataSet: DataSet);
27
27
  getEditorConfig(): SmartTableEditorAndFilter['config'] | undefined;
28
- getFilterType(): false | "text" | "custom" | "textarea" | "list" | "checkbox";
28
+ getFilterType(): false | "number" | "text" | "custom" | "textarea" | "list" | "checkbox";
29
29
  getFilterConfig(): SmartTableEditorAndFilter['config'] | undefined;
30
30
  }
@@ -4,6 +4,7 @@ import { Row } from './row';
4
4
  export declare class DataSet {
5
5
  protected columnSettings: SmartTableColumnSettings[];
6
6
  readonly editorInputClass: string;
7
+ readonly cellEmptyText?: string | undefined;
7
8
  newRow: Row;
8
9
  protected readonly data: import("@angular/core").WritableSignal<any[]>;
9
10
  protected readonly columns: import("@angular/core").WritableSignal<Column[]>;
@@ -13,7 +14,7 @@ export declare class DataSet {
13
14
  readonly getVisibleColumns: import("@angular/core").Signal<Column[]>;
14
15
  readonly getRows: import("@angular/core").Signal<Row[]>;
15
16
  readonly isAllSelected: import("@angular/core").Signal<boolean>;
16
- constructor(dataList: any[] | undefined, columnSettings: SmartTableColumnSettings[], editorInputClass: string);
17
+ constructor(dataList: any[] | undefined, columnSettings: SmartTableColumnSettings[], editorInputClass: string, cellEmptyText?: string | undefined);
17
18
  setData(data: any[]): void;
18
19
  setColumnsConfig(columnSettings: SmartTableColumnSettings[]): void;
19
20
  findRowByData(data: any): Row | undefined;
@@ -4,6 +4,7 @@ export declare class Row {
4
4
  index: number;
5
5
  protected rowDataObj: any;
6
6
  protected columnsList: Column[];
7
+ protected cellEmptyText?: string | undefined;
7
8
  readonly pending: import("@angular/core").WritableSignal<boolean>;
8
9
  readonly isSelected: import("@angular/core").WritableSignal<boolean>;
9
10
  readonly isInEditing: import("@angular/core").WritableSignal<boolean>;
@@ -11,7 +12,7 @@ export declare class Row {
11
12
  readonly rowData: import("@angular/core").WritableSignal<any>;
12
13
  readonly columns: import("@angular/core").WritableSignal<Column[]>;
13
14
  readonly visibleCells: import("@angular/core").Signal<Cell[]>;
14
- constructor(index: number, rowDataObj: any, columnsList: Column[]);
15
+ constructor(index: number, rowDataObj: any, columnsList: Column[], cellEmptyText?: string | undefined);
15
16
  getNewData(): any;
16
17
  setData<T = any>(rowData: T): void;
17
18
  createCell(column: Column, rowData: any): Cell;
@@ -22,6 +22,7 @@ export interface ColumnPositionState {
22
22
  export interface SmartTableSettings<T extends BaseDataType = any> {
23
23
  selectMode?: 'single' | 'multi';
24
24
  mode?: 'inline' | 'external';
25
+ cellEmptyText?: string;
25
26
  resetSortOnThirdClick?: boolean;
26
27
  columnSort?: {
27
28
  /**
@@ -88,7 +89,7 @@ export interface SmartTableCustomAction<T extends BaseDataType = any> {
88
89
  title: string;
89
90
  hasPermissionFunction?: (row: T) => boolean;
90
91
  }
91
- export type SmartTableColumnSettingsTypes = 'text' | 'html' | 'custom';
92
+ export type SmartTableColumnSettingsTypes = 'text' | 'number' | 'html' | 'custom';
92
93
  export type SmartTableColumnSettings<T extends BaseDataType = any> = SmartTableTextHtmlColumn<T> | SmartTableCustomColumn<T>;
93
94
  export type SmartTableCompareFunction = (direction: number, a: any, b: any) => number;
94
95
  export type SmartTableValuePrepareFunction<T extends BaseDataType = any> = (columnData: any, rowData: T, cell: Cell) => any;
@@ -112,7 +113,7 @@ interface SmartTableDefaultColumn<T extends BaseDataType> {
112
113
  filterFunction?: SmartTableFilterFunction;
113
114
  }
114
115
  interface SmartTableTextHtmlColumn<T extends BaseDataType> extends SmartTableDefaultColumn<T> {
115
- type: 'text' | 'html';
116
+ type: 'text' | 'number' | 'html';
116
117
  }
117
118
  interface SmartTableCustomColumn<T extends BaseDataType> extends SmartTableDefaultColumn<T> {
118
119
  type: 'custom';
@@ -124,10 +125,10 @@ interface SmartTableCustomColumn<T extends BaseDataType> extends SmartTableDefau
124
125
  */
125
126
  inputs?: Record<string, any>;
126
127
  }
127
- export type SmartTableEditorAndFilterTypes = 'text' | 'textarea' | 'list' | 'custom' | 'checkbox';
128
+ export type SmartTableEditorAndFilterTypes = 'text' | 'number' | 'textarea' | 'list' | 'custom' | 'checkbox';
128
129
  export type SmartTableEditorAndFilter = SmartTableTextEditor | SmartTableEditorList | SmartTableEditorCheckbox | SmartTableEditorCustom;
129
130
  interface SmartTableTextEditor {
130
- type: 'text' | 'textarea';
131
+ type: 'text' | 'number' | 'textarea';
131
132
  config?: {
132
133
  placeholder?: string;
133
134
  } & Record<string, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@den4ik92/ng2-smart-table",
3
- "version": "19.6.49",
3
+ "version": "19.7.0",
4
4
  "description": "Angular Smart Table",
5
5
  "author": "Den4ik92",
6
6
  "license": "MIT",