@den4ik92/ng2-smart-table 19.6.45 → 19.6.46

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/lib/lib/grid.d.ts CHANGED
@@ -15,6 +15,8 @@ export declare class Grid {
15
15
  readonly isActionsVisible: import("@angular/core").Signal<boolean>;
16
16
  readonly actionIsOnLeft: import("@angular/core").Signal<boolean>;
17
17
  readonly actionIsOnRight: import("@angular/core").Signal<boolean>;
18
+ readonly columnSortDragDelay: import("@angular/core").Signal<number>;
19
+ private readonly columnStateStorageKey;
18
20
  constructor(source: DataSource | undefined, settings: SmartTableSettings);
19
21
  setColumnsSortedEmitter(emitter: OutputEmitterRef<ColumnPositionState[]>): void;
20
22
  detach(): void;
@@ -40,5 +42,4 @@ export declare class Grid {
40
42
  private setColumnsSortState;
41
43
  private getColumnsStateFromSettings;
42
44
  private getMergedColumnStates;
43
- private get columnStateStorageKey();
44
45
  }
@@ -23,8 +23,17 @@ export interface SmartTableSettings<T extends BaseDataType = any> {
23
23
  selectMode?: 'single' | 'multi';
24
24
  mode?: 'inline' | 'external';
25
25
  resetSortOnThirdClick?: boolean;
26
- columnSortStorageKey?: string;
27
- columnSort?: boolean;
26
+ columnSort?: {
27
+ /**
28
+ * @description save table columns state in local storage and use it after init
29
+ */
30
+ stateStorageKey?: string;
31
+ /**
32
+ * @description delay to start move column card
33
+ */
34
+ dragDelay?: number;
35
+ active: boolean;
36
+ };
28
37
  hideHeader?: boolean;
29
38
  hideSubHeader?: boolean;
30
39
  /**
@@ -104,9 +113,9 @@ interface SmartTableDefaultColumn<T extends BaseDataType> {
104
113
  interface SmartTableTextHtmlColumn<T extends BaseDataType> extends SmartTableDefaultColumn<T> {
105
114
  type: 'text' | 'html';
106
115
  }
107
- interface SmartTableCustomColumn<T extends BaseDataType, C = any> extends SmartTableDefaultColumn<T> {
116
+ interface SmartTableCustomColumn<T extends BaseDataType> extends SmartTableDefaultColumn<T> {
108
117
  type: 'custom';
109
- renderComponent: ComponentType<C>;
118
+ renderComponent: ComponentType<any>;
110
119
  /**
111
120
  * @description you can set any component inputs.
112
121
  * inputs value is not updated when changed. set once onInit.
@@ -138,9 +147,9 @@ interface SmartTableEditorCheckbox {
138
147
  resetText?: string;
139
148
  } & Record<string, any>;
140
149
  }
141
- interface SmartTableEditorCustom {
150
+ export interface SmartTableEditorCustom {
142
151
  type: 'custom';
143
- component: any;
152
+ component: ComponentType<any>;
144
153
  config?: {
145
154
  placeholder?: string;
146
155
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@den4ik92/ng2-smart-table",
3
- "version": "19.6.45",
3
+ "version": "19.6.46",
4
4
  "description": "Angular Smart Table",
5
5
  "author": "Den4ik92",
6
6
  "license": "MIT",