@natec/mef-dev-ui-kit 20.1.12 → 20.1.14
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/index.d.ts
CHANGED
|
@@ -5957,6 +5957,551 @@ declare class MDHeaderCardModule {
|
|
|
5957
5957
|
static ɵinj: i0.ɵɵInjectorDeclaration<MDHeaderCardModule>;
|
|
5958
5958
|
}
|
|
5959
5959
|
|
|
5960
|
-
|
|
5961
|
-
|
|
5960
|
+
/**
|
|
5961
|
+
* Sort direction enum
|
|
5962
|
+
*/
|
|
5963
|
+
declare enum SortDirection {
|
|
5964
|
+
asc = "asc",
|
|
5965
|
+
desc = "desc"
|
|
5966
|
+
}
|
|
5967
|
+
/**
|
|
5968
|
+
* Sort type - single or multi column sorting
|
|
5969
|
+
*/
|
|
5970
|
+
declare enum SortType {
|
|
5971
|
+
single = "single",
|
|
5972
|
+
multi = "multi"
|
|
5973
|
+
}
|
|
5974
|
+
/**
|
|
5975
|
+
* Overflow mode for the grid when columns exceed container width
|
|
5976
|
+
* - 'scroll': Enable horizontal scrolling (default)
|
|
5977
|
+
* - 'shrink': Shrink columns to fit, respecting minWidth constraints
|
|
5978
|
+
*/
|
|
5979
|
+
declare enum OverflowMode {
|
|
5980
|
+
scroll = "scroll",
|
|
5981
|
+
shrink = "shrink"
|
|
5982
|
+
}
|
|
5983
|
+
/**
|
|
5984
|
+
* Sort property with direction
|
|
5985
|
+
*/
|
|
5986
|
+
interface SortPropDir {
|
|
5987
|
+
prop: string;
|
|
5988
|
+
dir: SortDirection;
|
|
5989
|
+
}
|
|
5990
|
+
/**
|
|
5991
|
+
* Sort event emitted when sorting changes
|
|
5992
|
+
*/
|
|
5993
|
+
interface CardsGridSortEvent {
|
|
5994
|
+
sorts: SortPropDir[];
|
|
5995
|
+
column: CardsGridColumn;
|
|
5996
|
+
prevValue?: SortDirection;
|
|
5997
|
+
newValue?: SortDirection;
|
|
5998
|
+
}
|
|
5999
|
+
/**
|
|
6000
|
+
* Page event emitted when pagination changes
|
|
6001
|
+
*/
|
|
6002
|
+
interface CardsGridPageEvent {
|
|
6003
|
+
offset: number;
|
|
6004
|
+
limit: number;
|
|
6005
|
+
count: number;
|
|
6006
|
+
pageSize: number;
|
|
6007
|
+
}
|
|
6008
|
+
/**
|
|
6009
|
+
* Row edit event
|
|
6010
|
+
*/
|
|
6011
|
+
interface CardsGridRowEditEvent<T = any> {
|
|
6012
|
+
row: T;
|
|
6013
|
+
rowIndex: number;
|
|
6014
|
+
originalRow?: T;
|
|
6015
|
+
}
|
|
6016
|
+
/**
|
|
6017
|
+
* Column resize event
|
|
6018
|
+
*/
|
|
6019
|
+
interface CardsGridColumnResizeEvent {
|
|
6020
|
+
column: CardsGridColumn;
|
|
6021
|
+
prevWidth: number;
|
|
6022
|
+
newWidth: number;
|
|
6023
|
+
}
|
|
6024
|
+
/**
|
|
6025
|
+
* Grouped rows structure
|
|
6026
|
+
*/
|
|
6027
|
+
interface GroupedRows<T = any> {
|
|
6028
|
+
key: any;
|
|
6029
|
+
value: T[];
|
|
6030
|
+
}
|
|
6031
|
+
/**
|
|
6032
|
+
* Cell template context - available in cell templates
|
|
6033
|
+
*/
|
|
6034
|
+
interface CardsGridCellContext<T = any> {
|
|
6035
|
+
/** Current row data */
|
|
6036
|
+
row: T;
|
|
6037
|
+
/** Cell value */
|
|
6038
|
+
value: any;
|
|
6039
|
+
/** Column definition */
|
|
6040
|
+
column: CardsGridColumn<T>;
|
|
6041
|
+
/** Row index */
|
|
6042
|
+
rowIndex: number;
|
|
6043
|
+
/** Whether the row is in edit mode */
|
|
6044
|
+
isEditing: boolean;
|
|
6045
|
+
/** Group key if grouped */
|
|
6046
|
+
group?: any;
|
|
6047
|
+
}
|
|
6048
|
+
/**
|
|
6049
|
+
* Header cell template context
|
|
6050
|
+
*/
|
|
6051
|
+
interface CardsGridHeaderContext<T = any> {
|
|
6052
|
+
/** Column definition */
|
|
6053
|
+
column: CardsGridColumn<T>;
|
|
6054
|
+
/** Current sort direction */
|
|
6055
|
+
sortDir?: SortDirection;
|
|
6056
|
+
/** Function to trigger sort */
|
|
6057
|
+
sortFn: () => void;
|
|
6058
|
+
}
|
|
6059
|
+
/**
|
|
6060
|
+
* Edit template context - available in edit templates
|
|
6061
|
+
*/
|
|
6062
|
+
interface CardsGridEditContext<T = any> {
|
|
6063
|
+
/** Current row data (mutable copy) */
|
|
6064
|
+
row: T;
|
|
6065
|
+
/** Original row data (immutable) */
|
|
6066
|
+
originalRow: T;
|
|
6067
|
+
/** Cell value */
|
|
6068
|
+
value: any;
|
|
6069
|
+
/** Column definition */
|
|
6070
|
+
column: CardsGridColumn<T>;
|
|
6071
|
+
/** Row index */
|
|
6072
|
+
rowIndex: number;
|
|
6073
|
+
/** Function to save changes */
|
|
6074
|
+
saveFn: () => void;
|
|
6075
|
+
/** Function to cancel editing */
|
|
6076
|
+
cancelFn: () => void;
|
|
6077
|
+
}
|
|
6078
|
+
/**
|
|
6079
|
+
* Column definition interface
|
|
6080
|
+
*/
|
|
6081
|
+
interface CardsGridColumn<T = any> {
|
|
6082
|
+
/** Column unique identifier */
|
|
6083
|
+
$$id?: string;
|
|
6084
|
+
/** Display name for the header */
|
|
6085
|
+
name?: string;
|
|
6086
|
+
/** Property path to get value from row (e.g., 'user.name') */
|
|
6087
|
+
prop?: string;
|
|
6088
|
+
/** Column width in pixels */
|
|
6089
|
+
width?: number;
|
|
6090
|
+
/** Minimum column width */
|
|
6091
|
+
minWidth?: number;
|
|
6092
|
+
/** Maximum column width */
|
|
6093
|
+
maxWidth?: number;
|
|
6094
|
+
/** Flex grow factor for auto-sizing */
|
|
6095
|
+
flexGrow?: number;
|
|
6096
|
+
/** Whether column is sortable */
|
|
6097
|
+
sortable?: boolean;
|
|
6098
|
+
/** Whether column is resizeable (can be dragged to change width) */
|
|
6099
|
+
resizeable?: boolean;
|
|
6100
|
+
/** Custom sort comparator */
|
|
6101
|
+
comparator?: (valueA: any, valueB: any, rowA: T, rowB: T, sortDir: SortDirection) => number;
|
|
6102
|
+
/** Pipe to transform cell value */
|
|
6103
|
+
pipe?: PipeTransform;
|
|
6104
|
+
/** CSS class for header cell */
|
|
6105
|
+
headerClass?: string | ((data: {
|
|
6106
|
+
column: CardsGridColumn<T>;
|
|
6107
|
+
}) => string | Record<string, boolean>);
|
|
6108
|
+
/** CSS class for body cell */
|
|
6109
|
+
cellClass?: string | ((data: {
|
|
6110
|
+
row: T;
|
|
6111
|
+
column: CardsGridColumn<T>;
|
|
6112
|
+
value: any;
|
|
6113
|
+
}) => string | Record<string, boolean>);
|
|
6114
|
+
/** Template for cell content in view mode */
|
|
6115
|
+
cellTemplate?: TemplateRef<CardsGridCellContext<T>>;
|
|
6116
|
+
/** Template for header content */
|
|
6117
|
+
headerTemplate?: TemplateRef<CardsGridHeaderContext<T>>;
|
|
6118
|
+
/** Template for cell content in edit mode */
|
|
6119
|
+
editTemplate?: TemplateRef<CardsGridEditContext<T>>;
|
|
6120
|
+
}
|
|
6121
|
+
/**
|
|
6122
|
+
* Internal column with guaranteed values
|
|
6123
|
+
*/
|
|
6124
|
+
interface CardsGridColumnInternal<T = any> extends CardsGridColumn<T> {
|
|
6125
|
+
$$id: string;
|
|
6126
|
+
name: string;
|
|
6127
|
+
width: number;
|
|
6128
|
+
$$valueGetter: (row: T) => any;
|
|
6129
|
+
}
|
|
6130
|
+
|
|
6131
|
+
/**
|
|
6132
|
+
* Directive for cell template in view mode.
|
|
6133
|
+
*
|
|
6134
|
+
* @example
|
|
6135
|
+
* ```html
|
|
6136
|
+
* <ng-template mdCardsGridCellTemplate let-value="value" let-row="row">
|
|
6137
|
+
* <span>{{value}}</span>
|
|
6138
|
+
* </ng-template>
|
|
6139
|
+
* ```
|
|
6140
|
+
*/
|
|
6141
|
+
declare class MDCardsGridCellTemplateDirective<T = any> {
|
|
6142
|
+
static ngTemplateContextGuard<T>(dir: MDCardsGridCellTemplateDirective<T>, ctx: unknown): ctx is CardsGridCellContext<T>;
|
|
6143
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MDCardsGridCellTemplateDirective<any>, never>;
|
|
6144
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MDCardsGridCellTemplateDirective<any>, "[mdCardsGridCellTemplate]", never, {}, {}, never, never, true, never>;
|
|
6145
|
+
}
|
|
6146
|
+
/**
|
|
6147
|
+
* Directive for header template.
|
|
6148
|
+
*
|
|
6149
|
+
* @example
|
|
6150
|
+
* ```html
|
|
6151
|
+
* <ng-template mdCardsGridHeaderTemplate let-column="column" let-sortFn="sortFn">
|
|
6152
|
+
* <span (click)="sortFn()">{{column.name}}</span>
|
|
6153
|
+
* </ng-template>
|
|
6154
|
+
* ```
|
|
6155
|
+
*/
|
|
6156
|
+
declare class MDCardsGridHeaderTemplateDirective<T = any> {
|
|
6157
|
+
static ngTemplateContextGuard<T>(dir: MDCardsGridHeaderTemplateDirective<T>, ctx: unknown): ctx is CardsGridHeaderContext<T>;
|
|
6158
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MDCardsGridHeaderTemplateDirective<any>, never>;
|
|
6159
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MDCardsGridHeaderTemplateDirective<any>, "[mdCardsGridHeaderTemplate]", never, {}, {}, never, never, true, never>;
|
|
6160
|
+
}
|
|
6161
|
+
/**
|
|
6162
|
+
* Directive for edit mode template.
|
|
6163
|
+
*
|
|
6164
|
+
* @example
|
|
6165
|
+
* ```html
|
|
6166
|
+
* <ng-template mdCardsGridEditTemplate let-row="row" let-saveFn="saveFn" let-cancelFn="cancelFn">
|
|
6167
|
+
* <input [(ngModel)]="row.name" />
|
|
6168
|
+
* </ng-template>
|
|
6169
|
+
* ```
|
|
6170
|
+
*/
|
|
6171
|
+
declare class MDCardsGridEditTemplateDirective<T = any> {
|
|
6172
|
+
static ngTemplateContextGuard<T>(dir: MDCardsGridEditTemplateDirective<T>, ctx: unknown): ctx is CardsGridEditContext<T>;
|
|
6173
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MDCardsGridEditTemplateDirective<any>, never>;
|
|
6174
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MDCardsGridEditTemplateDirective<any>, "[mdCardsGridEditTemplate]", never, {}, {}, never, never, true, never>;
|
|
6175
|
+
}
|
|
6176
|
+
/**
|
|
6177
|
+
* Column definition directive for md-cards-grid.
|
|
6178
|
+
*
|
|
6179
|
+
* @example
|
|
6180
|
+
* ```html
|
|
6181
|
+
* <md-cards-grid-column name="Name" prop="name" [sortable]="true" [width]="200">
|
|
6182
|
+
* <ng-template mdCardsGridCellTemplate let-value="value">
|
|
6183
|
+
* <span>{{value}}</span>
|
|
6184
|
+
* </ng-template>
|
|
6185
|
+
* <ng-template mdCardsGridEditTemplate let-row="row">
|
|
6186
|
+
* <input [(ngModel)]="row.name" />
|
|
6187
|
+
* </ng-template>
|
|
6188
|
+
* </md-cards-grid-column>
|
|
6189
|
+
* ```
|
|
6190
|
+
*/
|
|
6191
|
+
declare class MDCardsGridColumnDirective<T = any> implements CardsGridColumn<T> {
|
|
6192
|
+
/** Display name for the header */
|
|
6193
|
+
name?: string;
|
|
6194
|
+
/** Property path to get value from row */
|
|
6195
|
+
prop?: string;
|
|
6196
|
+
/** Column width in pixels */
|
|
6197
|
+
width?: number;
|
|
6198
|
+
/** Minimum column width */
|
|
6199
|
+
minWidth?: number;
|
|
6200
|
+
/** Maximum column width */
|
|
6201
|
+
maxWidth?: number;
|
|
6202
|
+
/** Flex grow factor */
|
|
6203
|
+
flexGrow?: number;
|
|
6204
|
+
/** Whether column is sortable */
|
|
6205
|
+
sortable?: boolean;
|
|
6206
|
+
/** Whether column is resizeable (can be dragged to change width) */
|
|
6207
|
+
resizeable?: boolean;
|
|
6208
|
+
/** Custom sort comparator */
|
|
6209
|
+
comparator?: (valueA: any, valueB: any, rowA: T, rowB: T, sortDir: SortDirection) => number;
|
|
6210
|
+
/** Pipe to transform value */
|
|
6211
|
+
pipe?: PipeTransform;
|
|
6212
|
+
/** CSS class for header */
|
|
6213
|
+
headerClass?: string | ((data: {
|
|
6214
|
+
column: CardsGridColumn<T>;
|
|
6215
|
+
}) => string | Record<string, boolean>);
|
|
6216
|
+
/** CSS class for cell */
|
|
6217
|
+
cellClass?: string | ((data: {
|
|
6218
|
+
row: T;
|
|
6219
|
+
column: CardsGridColumn<T>;
|
|
6220
|
+
value: any;
|
|
6221
|
+
}) => string | Record<string, boolean>);
|
|
6222
|
+
_cellTemplateInput?: TemplateRef<CardsGridCellContext<T>>;
|
|
6223
|
+
_cellTemplateQuery?: TemplateRef<CardsGridCellContext<T>>;
|
|
6224
|
+
get cellTemplate(): TemplateRef<CardsGridCellContext<T>> | undefined;
|
|
6225
|
+
_headerTemplateInput?: TemplateRef<CardsGridHeaderContext<T>>;
|
|
6226
|
+
_headerTemplateQuery?: TemplateRef<CardsGridHeaderContext<T>>;
|
|
6227
|
+
get headerTemplate(): TemplateRef<CardsGridHeaderContext<T>> | undefined;
|
|
6228
|
+
_editTemplateInput?: TemplateRef<CardsGridEditContext<T>>;
|
|
6229
|
+
_editTemplateQuery?: TemplateRef<CardsGridEditContext<T>>;
|
|
6230
|
+
get editTemplate(): TemplateRef<CardsGridEditContext<T>> | undefined;
|
|
6231
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MDCardsGridColumnDirective<any>, never>;
|
|
6232
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<MDCardsGridColumnDirective<any>, "md-cards-grid-column", never, { "name": { "alias": "name"; "required": false; }; "prop": { "alias": "prop"; "required": false; }; "width": { "alias": "width"; "required": false; }; "minWidth": { "alias": "minWidth"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "flexGrow": { "alias": "flexGrow"; "required": false; }; "sortable": { "alias": "sortable"; "required": false; }; "resizeable": { "alias": "resizeable"; "required": false; }; "comparator": { "alias": "comparator"; "required": false; }; "pipe": { "alias": "pipe"; "required": false; }; "headerClass": { "alias": "headerClass"; "required": false; }; "cellClass": { "alias": "cellClass"; "required": false; }; "_cellTemplateInput": { "alias": "cellTemplate"; "required": false; }; "_headerTemplateInput": { "alias": "headerTemplate"; "required": false; }; "_editTemplateInput": { "alias": "editTemplate"; "required": false; }; }, {}, ["_cellTemplateQuery", "_headerTemplateQuery", "_editTemplateQuery"], never, true, never>;
|
|
6233
|
+
static ngAcceptInputType_width: unknown;
|
|
6234
|
+
static ngAcceptInputType_minWidth: unknown;
|
|
6235
|
+
static ngAcceptInputType_maxWidth: unknown;
|
|
6236
|
+
static ngAcceptInputType_flexGrow: unknown;
|
|
6237
|
+
static ngAcceptInputType_sortable: unknown;
|
|
6238
|
+
static ngAcceptInputType_resizeable: unknown;
|
|
6239
|
+
}
|
|
6240
|
+
|
|
6241
|
+
/**
|
|
6242
|
+
* MD Cards Grid Component
|
|
6243
|
+
*
|
|
6244
|
+
* A horizontal cards grid with table-like header and edit mode support.
|
|
6245
|
+
* Similar API to ngx-datatable but displays data as cards/tiles.
|
|
6246
|
+
*
|
|
6247
|
+
* @example
|
|
6248
|
+
* ```html
|
|
6249
|
+
* <md-cards-grid
|
|
6250
|
+
* [rows]="data"
|
|
6251
|
+
* [groupRowsBy]="'category'"
|
|
6252
|
+
* [(editingRow)]="currentEditingRow"
|
|
6253
|
+
* [sorts]="sorts"
|
|
6254
|
+
* (sort)="onSort($event)"
|
|
6255
|
+
* (rowEditSave)="onSave($event)">
|
|
6256
|
+
*
|
|
6257
|
+
* <md-cards-grid-column name="Name" prop="name" [sortable]="true">
|
|
6258
|
+
* <ng-template mdCardsGridCellTemplate let-value="value">
|
|
6259
|
+
* <span>{{value}}</span>
|
|
6260
|
+
* </ng-template>
|
|
6261
|
+
* <ng-template mdCardsGridEditTemplate let-row="row">
|
|
6262
|
+
* <input [(ngModel)]="row.name" />
|
|
6263
|
+
* </ng-template>
|
|
6264
|
+
* </md-cards-grid-column>
|
|
6265
|
+
*
|
|
6266
|
+
* </md-cards-grid>
|
|
6267
|
+
* ```
|
|
6268
|
+
*/
|
|
6269
|
+
declare class MDCardsGridComponent<T extends object = any> implements AfterContentInit, OnChanges, OnDestroy {
|
|
6270
|
+
private _cdr;
|
|
6271
|
+
private _columnsSubscription?;
|
|
6272
|
+
/** Host binding for shrink mode class */
|
|
6273
|
+
get isShrinkMode(): boolean;
|
|
6274
|
+
/** Data rows to display */
|
|
6275
|
+
rows: T[];
|
|
6276
|
+
/** Columns definition (alternative to content projection) */
|
|
6277
|
+
columns: CardsGridColumn<T>[];
|
|
6278
|
+
/** Property to group rows by */
|
|
6279
|
+
groupRowsBy?: keyof T | ((row: T) => any);
|
|
6280
|
+
/** Custom template for group header */
|
|
6281
|
+
groupHeaderTemplate?: TemplateRef<{
|
|
6282
|
+
group: GroupedRows<T>;
|
|
6283
|
+
}>;
|
|
6284
|
+
/** Custom template for row actions (edit/save/cancel buttons) */
|
|
6285
|
+
rowActionsTemplate?: TemplateRef<{
|
|
6286
|
+
row: T;
|
|
6287
|
+
rowIndex: number;
|
|
6288
|
+
isEditing: boolean;
|
|
6289
|
+
editFn: () => void;
|
|
6290
|
+
saveFn: () => void;
|
|
6291
|
+
cancelFn: () => void;
|
|
6292
|
+
}>;
|
|
6293
|
+
/** Height of the header in pixels (0 = no header) */
|
|
6294
|
+
headerHeight: number;
|
|
6295
|
+
/** Height of each card/row */
|
|
6296
|
+
cardHeight: number | 'auto';
|
|
6297
|
+
/** Gap between cards in pixels */
|
|
6298
|
+
gap: number;
|
|
6299
|
+
/** Default column width */
|
|
6300
|
+
defaultColumnWidth: number;
|
|
6301
|
+
/** Show row actions column */
|
|
6302
|
+
showRowActions: boolean;
|
|
6303
|
+
/**
|
|
6304
|
+
* Overflow mode when columns exceed container width:
|
|
6305
|
+
* - 'scroll': Enable horizontal scrolling (default)
|
|
6306
|
+
* - 'shrink': Shrink columns to fit, respecting minWidth constraints
|
|
6307
|
+
*/
|
|
6308
|
+
overflowMode: OverflowMode;
|
|
6309
|
+
/** Enable column resize by dragging header borders */
|
|
6310
|
+
enableColumnResize: boolean;
|
|
6311
|
+
/** Default minimum column width when resizing */
|
|
6312
|
+
defaultMinColumnWidth: number;
|
|
6313
|
+
/** Default maximum column width when resizing */
|
|
6314
|
+
defaultMaxColumnWidth: number;
|
|
6315
|
+
/** Column resize event */
|
|
6316
|
+
columnResize: EventEmitter<CardsGridColumnResizeEvent>;
|
|
6317
|
+
/** Current sort configuration */
|
|
6318
|
+
sorts: SortPropDir[];
|
|
6319
|
+
/** Sort type: single or multi */
|
|
6320
|
+
sortType: SortType;
|
|
6321
|
+
/** Enable external sorting (don't sort internally) */
|
|
6322
|
+
externalSorting: boolean;
|
|
6323
|
+
/** Enable clearing sort state (asc -> desc -> none) */
|
|
6324
|
+
enableClearingSortState: boolean;
|
|
6325
|
+
/** Icon class for ascending sort */
|
|
6326
|
+
sortAscendingIcon?: string;
|
|
6327
|
+
/** Icon class for descending sort */
|
|
6328
|
+
sortDescendingIcon?: string;
|
|
6329
|
+
/** Icon class for unsorted state */
|
|
6330
|
+
sortUnsetIcon?: string;
|
|
6331
|
+
/** Sort event */
|
|
6332
|
+
sort: EventEmitter<CardsGridSortEvent>;
|
|
6333
|
+
/** Page size (items per page) */
|
|
6334
|
+
limit: number;
|
|
6335
|
+
/** Current page offset (0-indexed) */
|
|
6336
|
+
offset: number;
|
|
6337
|
+
/** Total count for external paging */
|
|
6338
|
+
count?: number;
|
|
6339
|
+
/** Enable external paging */
|
|
6340
|
+
externalPaging: boolean;
|
|
6341
|
+
/** Show footer with pagination */
|
|
6342
|
+
showFooter: boolean;
|
|
6343
|
+
/** Footer height in pixels */
|
|
6344
|
+
footerHeight: number;
|
|
6345
|
+
/** Page event */
|
|
6346
|
+
page: EventEmitter<CardsGridPageEvent>;
|
|
6347
|
+
/** Currently editing row (two-way binding) */
|
|
6348
|
+
editingRow: T | null;
|
|
6349
|
+
editingRowChange: EventEmitter<T | null>;
|
|
6350
|
+
/** Event when row edit starts */
|
|
6351
|
+
rowEditStart: EventEmitter<CardsGridRowEditEvent<T>>;
|
|
6352
|
+
/** Event when row edit is saved */
|
|
6353
|
+
rowEditSave: EventEmitter<CardsGridRowEditEvent<T>>;
|
|
6354
|
+
/** Event when row edit is cancelled */
|
|
6355
|
+
rowEditCancel: EventEmitter<CardsGridRowEditEvent<T>>;
|
|
6356
|
+
/** Columns from ContentChildren */
|
|
6357
|
+
_columnDirectives: QueryList<MDCardsGridColumnDirective<T>>;
|
|
6358
|
+
/** Internal columns with defaults applied */
|
|
6359
|
+
_internalColumns: CardsGridColumnInternal<T>[];
|
|
6360
|
+
/** Processed rows (sorted, paginated) */
|
|
6361
|
+
_displayRows: T[];
|
|
6362
|
+
/** Grouped rows (if grouping enabled) */
|
|
6363
|
+
_groupedRows: GroupedRows<T>[] | null;
|
|
6364
|
+
/** Original row data before editing (for cancel) */
|
|
6365
|
+
private _originalEditRow;
|
|
6366
|
+
/** Editing row copy (mutable) */
|
|
6367
|
+
_editingRowCopy: T | null;
|
|
6368
|
+
/** Map of editing row index */
|
|
6369
|
+
_editingRowIndex: number;
|
|
6370
|
+
/** Currently resizing column */
|
|
6371
|
+
_resizingColumn: CardsGridColumnInternal<T> | null;
|
|
6372
|
+
/** Start X position for resize */
|
|
6373
|
+
private _resizeStartX;
|
|
6374
|
+
/** Start width for resize */
|
|
6375
|
+
private _resizeStartWidth;
|
|
6376
|
+
ngAfterContentInit(): void;
|
|
6377
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
6378
|
+
ngOnDestroy(): void;
|
|
6379
|
+
/**
|
|
6380
|
+
* Start editing a row
|
|
6381
|
+
*/
|
|
6382
|
+
editRow(row: T): void;
|
|
6383
|
+
editRow(index: number): void;
|
|
6384
|
+
/**
|
|
6385
|
+
* Save current editing row
|
|
6386
|
+
*/
|
|
6387
|
+
saveRow(): void;
|
|
6388
|
+
saveRow(row: T): void;
|
|
6389
|
+
/**
|
|
6390
|
+
* Cancel current editing
|
|
6391
|
+
*/
|
|
6392
|
+
cancelEdit(): void;
|
|
6393
|
+
cancelEdit(row: T): void;
|
|
6394
|
+
/**
|
|
6395
|
+
* Check if a row is currently being edited
|
|
6396
|
+
*/
|
|
6397
|
+
isEditing(row: T): boolean;
|
|
6398
|
+
/**
|
|
6399
|
+
* Get the editing copy of the row (for template use)
|
|
6400
|
+
*/
|
|
6401
|
+
getEditingCopy(row: T): T | null;
|
|
6402
|
+
/**
|
|
6403
|
+
* Handle column sort click
|
|
6404
|
+
*/
|
|
6405
|
+
onColumnSort(column: CardsGridColumnInternal<T>): void;
|
|
6406
|
+
/**
|
|
6407
|
+
* Get current sort direction for a column
|
|
6408
|
+
*/
|
|
6409
|
+
getSortDir(column: CardsGridColumnInternal<T>): SortDirection | undefined;
|
|
6410
|
+
/**
|
|
6411
|
+
* Get sort icon class for a column
|
|
6412
|
+
*/
|
|
6413
|
+
getSortClass(column: CardsGridColumnInternal<T>): string;
|
|
6414
|
+
/**
|
|
6415
|
+
* Check if a column can be resized
|
|
6416
|
+
*/
|
|
6417
|
+
isColumnResizeable(column: CardsGridColumnInternal<T>): boolean;
|
|
6418
|
+
/**
|
|
6419
|
+
* Start column resize on mousedown
|
|
6420
|
+
*/
|
|
6421
|
+
onResizeStart(event: MouseEvent, column: CardsGridColumnInternal<T>): void;
|
|
6422
|
+
/**
|
|
6423
|
+
* Handle mouse move during resize
|
|
6424
|
+
*/
|
|
6425
|
+
private _onResizeMove;
|
|
6426
|
+
/**
|
|
6427
|
+
* End column resize on mouseup
|
|
6428
|
+
*/
|
|
6429
|
+
private _onResizeEnd;
|
|
6430
|
+
/**
|
|
6431
|
+
* Navigate to a page
|
|
6432
|
+
*/
|
|
6433
|
+
setPage(offset: number): void;
|
|
6434
|
+
/**
|
|
6435
|
+
* Get total pages count
|
|
6436
|
+
*/
|
|
6437
|
+
get totalPages(): number;
|
|
6438
|
+
/**
|
|
6439
|
+
* Get current page (1-indexed for display)
|
|
6440
|
+
*/
|
|
6441
|
+
get currentPage(): number;
|
|
6442
|
+
/**
|
|
6443
|
+
* Get cell value for display
|
|
6444
|
+
*/
|
|
6445
|
+
getCellValue(row: T, column: CardsGridColumnInternal<T>): any;
|
|
6446
|
+
/**
|
|
6447
|
+
* Get row to use in template (editing copy if editing, otherwise original)
|
|
6448
|
+
*/
|
|
6449
|
+
getTemplateRow(row: T): T;
|
|
6450
|
+
/**
|
|
6451
|
+
* Track by function for rows
|
|
6452
|
+
*/
|
|
6453
|
+
trackByRow: (index: number, row: T) => any;
|
|
6454
|
+
/**
|
|
6455
|
+
* Track by function for columns
|
|
6456
|
+
*/
|
|
6457
|
+
trackByColumn: (index: number, column: CardsGridColumnInternal<T>) => string;
|
|
6458
|
+
/**
|
|
6459
|
+
* Track by function for groups
|
|
6460
|
+
*/
|
|
6461
|
+
trackByGroup: (index: number, group: GroupedRows<T>) => any;
|
|
6462
|
+
private _updateColumns;
|
|
6463
|
+
private _updateColumnsFromInput;
|
|
6464
|
+
private _processRows;
|
|
6465
|
+
private _handleEditingRowChange;
|
|
6466
|
+
private _clearEditState;
|
|
6467
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MDCardsGridComponent<any>, never>;
|
|
6468
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MDCardsGridComponent<any>, "md-cards-grid", ["mdCardsGrid"], { "rows": { "alias": "rows"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "groupRowsBy": { "alias": "groupRowsBy"; "required": false; }; "groupHeaderTemplate": { "alias": "groupHeaderTemplate"; "required": false; }; "rowActionsTemplate": { "alias": "rowActionsTemplate"; "required": false; }; "headerHeight": { "alias": "headerHeight"; "required": false; }; "cardHeight": { "alias": "cardHeight"; "required": false; }; "gap": { "alias": "gap"; "required": false; }; "defaultColumnWidth": { "alias": "defaultColumnWidth"; "required": false; }; "showRowActions": { "alias": "showRowActions"; "required": false; }; "overflowMode": { "alias": "overflowMode"; "required": false; }; "enableColumnResize": { "alias": "enableColumnResize"; "required": false; }; "defaultMinColumnWidth": { "alias": "defaultMinColumnWidth"; "required": false; }; "defaultMaxColumnWidth": { "alias": "defaultMaxColumnWidth"; "required": false; }; "sorts": { "alias": "sorts"; "required": false; }; "sortType": { "alias": "sortType"; "required": false; }; "externalSorting": { "alias": "externalSorting"; "required": false; }; "enableClearingSortState": { "alias": "enableClearingSortState"; "required": false; }; "sortAscendingIcon": { "alias": "sortAscendingIcon"; "required": false; }; "sortDescendingIcon": { "alias": "sortDescendingIcon"; "required": false; }; "sortUnsetIcon": { "alias": "sortUnsetIcon"; "required": false; }; "limit": { "alias": "limit"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "count": { "alias": "count"; "required": false; }; "externalPaging": { "alias": "externalPaging"; "required": false; }; "showFooter": { "alias": "showFooter"; "required": false; }; "footerHeight": { "alias": "footerHeight"; "required": false; }; "editingRow": { "alias": "editingRow"; "required": false; }; }, { "columnResize": "columnResize"; "sort": "sort"; "page": "page"; "editingRowChange": "editingRowChange"; "rowEditStart": "rowEditStart"; "rowEditSave": "rowEditSave"; "rowEditCancel": "rowEditCancel"; }, ["_columnDirectives"], never, true, never>;
|
|
6469
|
+
static ngAcceptInputType_headerHeight: unknown;
|
|
6470
|
+
static ngAcceptInputType_gap: unknown;
|
|
6471
|
+
static ngAcceptInputType_defaultColumnWidth: unknown;
|
|
6472
|
+
static ngAcceptInputType_showRowActions: unknown;
|
|
6473
|
+
static ngAcceptInputType_enableColumnResize: unknown;
|
|
6474
|
+
static ngAcceptInputType_defaultMinColumnWidth: unknown;
|
|
6475
|
+
static ngAcceptInputType_defaultMaxColumnWidth: unknown;
|
|
6476
|
+
static ngAcceptInputType_externalSorting: unknown;
|
|
6477
|
+
static ngAcceptInputType_enableClearingSortState: unknown;
|
|
6478
|
+
static ngAcceptInputType_limit: unknown;
|
|
6479
|
+
static ngAcceptInputType_offset: unknown;
|
|
6480
|
+
static ngAcceptInputType_count: unknown;
|
|
6481
|
+
static ngAcceptInputType_externalPaging: unknown;
|
|
6482
|
+
static ngAcceptInputType_showFooter: unknown;
|
|
6483
|
+
static ngAcceptInputType_footerHeight: unknown;
|
|
6484
|
+
}
|
|
6485
|
+
|
|
6486
|
+
declare class MDCardsGridModule {
|
|
6487
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MDCardsGridModule, never>;
|
|
6488
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<MDCardsGridModule, never, [typeof i1.CommonModule, typeof MDCardsGridComponent, typeof MDCardsGridColumnDirective, typeof MDCardsGridCellTemplateDirective, typeof MDCardsGridHeaderTemplateDirective, typeof MDCardsGridEditTemplateDirective], [typeof MDCardsGridComponent, typeof MDCardsGridColumnDirective, typeof MDCardsGridCellTemplateDirective, typeof MDCardsGridHeaderTemplateDirective, typeof MDCardsGridEditTemplateDirective]>;
|
|
6489
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<MDCardsGridModule>;
|
|
6490
|
+
}
|
|
6491
|
+
|
|
6492
|
+
/**
|
|
6493
|
+
* Group rows by a property
|
|
6494
|
+
*/
|
|
6495
|
+
declare function groupRowsByProperty<T>(rows: T[], groupBy: keyof T | ((row: T) => any)): GroupedRows<T>[];
|
|
6496
|
+
/**
|
|
6497
|
+
* Sort rows by sort configuration
|
|
6498
|
+
*/
|
|
6499
|
+
declare function sortRows<T>(rows: T[], sorts: SortPropDir[], columns: CardsGridColumnInternal<T>[]): T[];
|
|
6500
|
+
/**
|
|
6501
|
+
* Deep clone an object
|
|
6502
|
+
*/
|
|
6503
|
+
declare function deepClone<T>(obj: T): T;
|
|
6504
|
+
|
|
6505
|
+
export { ACCORDION, CARD_CONFIG, CardSimpleComponent, CentralPageComponent, CentralPageRowComponent, CollapseComponent, CollapseSetComponent, DIALOG_DATA, DIALOG_DEFAULT_OPTIONS, DIALOG_SCROLL_STRATEGY, DialogState, EXPANSION_PANEL_DEFAULT_OPTIONS, ErrorStateMatcher, ExpansionPanelActionRow, ExpansionPanelDescription, ExpansionPanelTitle, FillComponent, FilteredFieldContainerComponent, FilteredFieldItemComponent, FilteredFieldService, FiltredItemModel, INK_BAR_POSITIONER, INK_BAR_POSITIONER_FACTORY, InkBar, MDAccordion, MDAutocomplete, MDAutocompleteModule, MDAutocompleteOrigin, MDAutocompleteSelectedEvent, MDAutocompleteTrigger, MDCard, MDCardActions, MDCardAvatar, MDCardContent, MDCardFooter, MDCardHeader, MDCardImage, MDCardLgImage, MDCardMdImage, MDCardModule, MDCardSmImage, MDCardSubtitle, MDCardTitle, MDCardTitleGroup, MDCardXlImage, MDCardsGridCellTemplateDirective, MDCardsGridColumnDirective, MDCardsGridComponent, MDCardsGridEditTemplateDirective, MDCardsGridHeaderTemplateDirective, MDCardsGridModule, MDCheckBox, MDCheckBoxModule, MDCheckboxChange, MDChip, MDChipAvatar, MDChipEdit, MDChipEditInput, MDChipGrid, MDChipGridChange, MDChipInput, MDChipListbox, MDChipListboxChange, MDChipOption, MDChipRemove, MDChipRow, MDChipSelectionChange, MDChipSet, MDChipTrailingIcon, MDChipsModule, MDCollapseModule, MDContextMenuTrigger, MDDialog, MDDialogActions, MDDialogClose, MDDialogContainer, MDDialogContent, MDDialogTitle, MDExpansionPanel, MDExpansionPanelContent, MDExpansionPanelHeader, MDHeaderCardComponent, MDHeaderCardModule, MDHeaderCardSetComponent, MDMenu, MDMenuContent, MDMenuItem, MDMenuModule, MDMenuTrigger, MDModalModule, MDOption, MDOptionGroup, MDOptionModule, MDOptionSelectionChange, MDPseudoCheckboxModule, MDRadioButton, MDRadioGroup, MDRadioModule, MDSelect, MDSelectModule, MDSelectTrigger, MDStep, MDStepContent, MDStepExecutorModule, MDStepFooter, MDStepHeader, MDStepLabel, MDStepper, MDStepperIcon, MDStepperNext, MDStepperPrevious, MDSwitch, MDSwitchModule, MDTab, MDTabBody, MDTabChangeEvent, MDTabContent, MDTabGroup, MDTabHeader, MDTabLabel, MDTabLabelWrapper, MDTabsModule, MD_AUTOCOMPLETE_DEFAULT_OPTIONS, MD_AUTOCOMPLETE_SCROLL_STRATEGY, MD_AUTOCOMPLETE_VALUE_ACCESSOR, MD_CHIP, MD_CHIPS_DEFAULT_OPTIONS, MD_CHIP_AVATAR, MD_CHIP_EDIT, MD_CHIP_LISTBOX_CONTROL_VALUE_ACCESSOR, MD_CHIP_REMOVE, MD_CHIP_TRAILING_ICON, MD_EXPANSION_PANEL, MD_MENU_CONTENT, MD_MENU_DEFAULT_OPTIONS, MD_MENU_PANEL, MD_MENU_SCROLL_STRATEGY, MD_OPTION_PARENT_COMPONENT, MD_RADIO_GROUP, MD_SELECT_TRIGGER, MD_TAB, MD_TAB_LABEL, MENU_PANEL_TOP_PADDING, ManagePageComponent, MefDevCardModule, MefDevCollapseModule, MefDevDialogConfig, MefDevDialogRef, MefDevDropDownMenuModule, MefDevFilteredFieldModule, MefDevModalModule, MefDevOptionComponent, MefDevPageLayoutsModule, MefDevProgressComponent, MefDevProgressModule, MefDevSelectComponent, MefDevSelectModule, MefDevStepExecutorModule, MefDevSwitchComponent, MefDevSwitchModule, MefDevTabBodyComponent, MefDevTabComponent, MefDevTabLabelDirective, MefDevTabSetComponent, MefDevTabsInkBarDirective, MefDevTabsModule, MefDevTabsNavComponent, MefdevDropdownMenuComponent, MefdevExecutorPageComponent, ModalSize, OptionPipe, OverflowMode, PaginatedTabHeader, ProgressConfig, PseudoCheckbox, RADIO_GROUP_CONTROL_VALUE_ACCESSOR, RadioChange, RightFilterComponent, STEPPER_INTL_PROVIDER, STEPPER_INTL_PROVIDER_FACTORY, SelectChange, ShowOnDirtyErrorStateMatcher, SlideRightComponent, SlideUpComponent, SortDirection, SortType, StageComponent, StepExecutorComponent, StepperErrorStateMatcher, StepperIntl, TABS_CONFIG, TAB_CONTENT, TAB_GROUP, TabBodyPortal, TabChangeEvent, TablePageComponent, TransitionCheckState, _ErrorStateTracker, _closeDialogVia, _countGroupLabelsBeforeOption, _getOptionScrollPosition, components, deepClone, getMDAutocompleteMissingPanelError, getMDSelectDynamicMultipleError, getMDSelectNonArrayValueError, getMDSelectNonFunctionValueError, groupRowsByProperty, mefDevCardComponents, mefDevCollapseModuleComponents, sortRows };
|
|
6506
|
+
export type { AccordionBase, AccordionDisplayMode, AccordionTogglePosition, AnimatedInterface, AutoFocusTarget, CardAppearance, CardConfig, CardsGridCellContext, CardsGridColumn, CardsGridColumnInternal, CardsGridColumnResizeEvent, CardsGridEditContext, CardsGridHeaderContext, CardsGridPageEvent, CardsGridRowEditEvent, CardsGridSortEvent, CheckboxClickAction, DialogPosition, DialogRole, ExpansionPanelBase, ExpansionPanelDefaultOptions, ExpansionPanelState, GroupedRows, MDAutocompleteActivatedEvent, MDChipEditedEvent, MDChipEvent, MDChipInputEvent, MDChipTextControl, MDChipsDefaultOptions, MDMenuDefaultOptions, MDMenuPanel, MDOptionParentComponent, MDPaginatedStepHeaderItem, MdAutocompleteDefaultOptions, MenuCloseReason, MenuPositionX, MenuPositionY, PseudoCheckboxState, ScrollDirection, SeparatorKey, SortPropDir, StepperIconContext, TabBodyOriginState, TabBodyPositionState, TabGroupBaseHeader, TabHeaderPosition, TabPosition, TabPositionMode, TabType, TabsConfig, ToggleSwitchChangeEvent };
|
|
5962
6507
|
//# sourceMappingURL=index.d.ts.map
|