@guiexpert/table 1.1.36 → 1.1.38
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/css/main.css +3 -0
- package/css/table-classes.css +3 -0
- package/index.cjs +28 -28
- package/index.d.ts +3 -0
- package/index.js +702 -611
- package/lib/table/crud/column-widths.d.ts +9 -0
- package/lib/table/crud/column-widths.if.d.ts +7 -0
- package/lib/table/crud/crud-options.d.ts +3 -0
- package/lib/table/crud/crud-options.if.d.ts +1 -0
- package/lib/table/crud/crud-table-model-factory.d.ts +7 -2
- package/lib/table/table-api.d.ts +5 -0
- package/lib/table/table-scope.d.ts +4 -0
- package/package.json +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ColumnWidthsIf } from './column-widths.if';
|
|
2
|
+
export declare class ColumnWidths implements ColumnWidthsIf {
|
|
3
|
+
autoCalc: boolean;
|
|
4
|
+
takeHeaderLabelsIntoAccount: boolean;
|
|
5
|
+
charCountToWidth: (charCount: number, columnIndex: number) => number;
|
|
6
|
+
minWidth: number;
|
|
7
|
+
maxWidth: number;
|
|
8
|
+
constructor(autoCalc?: boolean, takeHeaderLabelsIntoAccount?: boolean, charCountToWidth?: (charCount: number, columnIndex: number) => number, minWidth?: number, maxWidth?: number);
|
|
9
|
+
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { CrudOptionsIf } from './crud-options.if';
|
|
2
2
|
import { UrlsIf } from './urls.if';
|
|
3
3
|
import { CrudAction } from './crud-action';
|
|
4
|
+
import { ColumnWidthsIf } from './column-widths.if';
|
|
4
5
|
export declare class CrudOptions implements CrudOptionsIf {
|
|
5
6
|
urls: UrlsIf;
|
|
6
7
|
singleRowActions: CrudAction[];
|
|
7
8
|
tableActions: CrudAction[];
|
|
8
9
|
autoAddActionColumn: boolean;
|
|
10
|
+
columnWidths: ColumnWidthsIf;
|
|
11
|
+
calcFixedRightColumnCount: (columnCount: number) => number;
|
|
9
12
|
getHeadersInit: (() => HeadersInit);
|
|
10
13
|
getIdByObject: <T extends Record<string, unknown>>(o: T) => any;
|
|
11
14
|
fetchList: <T>(crudOptions: CrudOptionsIf) => Promise<T[]>;
|
|
@@ -9,6 +9,7 @@ export interface CrudOptionsIf {
|
|
|
9
9
|
fetchItem: <T>(crudOptions: CrudOptionsIf, id: any) => Promise<T>;
|
|
10
10
|
deleteItem: (crudOptions: CrudOptionsIf, id: any) => Promise<any>;
|
|
11
11
|
getIdByObject: <T extends Record<string, unknown>>(o: T) => any;
|
|
12
|
+
calcFixedRightColumnCount: (columnCount: number) => number;
|
|
12
13
|
autoAddActionColumn?: boolean;
|
|
13
14
|
isActionDeleteVisible?: boolean;
|
|
14
15
|
isActionDeleteEnabled?: boolean;
|
|
@@ -10,7 +10,12 @@ export declare class CrudTableModelFactory implements ActionEventListenerIf {
|
|
|
10
10
|
tableModel: TableModelIf | undefined;
|
|
11
11
|
bodyModel: AreaModelObjectArrayWithColumndefs<any> | undefined;
|
|
12
12
|
tableOptions: TableOptionsIf | undefined;
|
|
13
|
-
crudOptions: CrudOptions
|
|
14
|
-
|
|
13
|
+
crudOptions: CrudOptions;
|
|
14
|
+
listenActionEvent: (actionEvent: ActionEventIf) => void;
|
|
15
|
+
createTableModel<T>(crudOptions: CrudOptions, p: Partial<CreateTableModelPara>, callback?: (tableModelAndOptions: TableModelAndOptionsIf) => void, listenActionEvent?: (actionEvent: ActionEventIf) => void): void;
|
|
15
16
|
onActionEvent(actionEvent: ActionEventIf): void;
|
|
17
|
+
private calcAutoColumnWidths;
|
|
18
|
+
private getValueByT;
|
|
19
|
+
private getPropertyValue;
|
|
20
|
+
private extractProperties;
|
|
16
21
|
}
|
package/lib/table/table-api.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { SelectionModel } from './selection/selection-model';
|
|
|
5
5
|
import { ActionId } from './action/action-id.type';
|
|
6
6
|
import { ShortcutActionIdMapping } from './action/shortcut-actionid-mapping.type';
|
|
7
7
|
import { SelectionModelIf } from './selection/selection-model.if';
|
|
8
|
+
import { TableModelIf } from './data/tablemodel/table-model.if';
|
|
8
9
|
/**
|
|
9
10
|
* The TableApi class provides a set of methods to interact with a table's functionality.
|
|
10
11
|
* It enables actions such as updating cells, scrolling, managing visibility, handling selection,
|
|
@@ -170,4 +171,8 @@ export declare class TableApi {
|
|
|
170
171
|
* or undefined if no selection model is available.
|
|
171
172
|
*/
|
|
172
173
|
getSelectionModel(): SelectionModelIf | undefined;
|
|
174
|
+
autoResizeColumns(recalcWrappers?: boolean): void;
|
|
175
|
+
recalcWrappers(): void;
|
|
176
|
+
setColumnWidth(columnIndex: number, width: number): void;
|
|
177
|
+
getTableModel(): TableModelIf;
|
|
173
178
|
}
|
|
@@ -291,4 +291,8 @@ export declare class TableScope extends RenderScope implements OnActionTriggered
|
|
|
291
291
|
* @private
|
|
292
292
|
*/
|
|
293
293
|
private autoRestoreCollapsedExpandedState;
|
|
294
|
+
calcAutoColumnWidths(): number[];
|
|
295
|
+
setColumnWidth(columnIndex: number, width: number): void;
|
|
296
|
+
autoResizeColumns(recalcWrappers?: boolean): void;
|
|
297
|
+
recalcWrappers(): void;
|
|
294
298
|
}
|