ms-data-grid 0.0.43 → 0.0.44
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/esm2022/lib/data-grid/data-grid.component.mjs +1056 -1910
- package/esm2022/lib/data-grid/statuses.mjs +2 -3
- package/esm2022/lib/data-grid.module.mjs +9 -9
- package/esm2022/lib/data-grid.service.mjs +14 -0
- package/esm2022/lib/directives/draggable-header.directive.mjs +148 -0
- package/esm2022/lib/pipes/filter.pipe.mjs +4 -4
- package/esm2022/lib/services/common.service.mjs +18 -48
- package/esm2022/lib/services/copy-service.service.mjs +10 -11
- package/esm2022/lib/services/split-columns.service.mjs +4 -4
- package/esm2022/lib/services/swap-columns.service.mjs +118 -0
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/ms-data-grid.mjs +1357 -2116
- package/fesm2022/ms-data-grid.mjs.map +1 -1
- package/lib/data-grid/data-grid.component.d.ts +39 -100
- package/lib/data-grid.module.d.ts +7 -6
- package/lib/data-grid.service.d.ts +6 -0
- package/lib/directives/draggable-header.directive.d.ts +31 -0
- package/lib/services/swap-columns.service.d.ts +19 -0
- package/package.json +2 -8
- package/public-api.d.ts +2 -0
- package/esm2022/lib/services/export.service.mjs +0 -149
- package/lib/services/export.service.d.ts +0 -24
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { OnChanges, SimpleChanges, ElementRef, AfterViewInit, ChangeDetectorRef, EventEmitter, NgZone } from '@angular/core';
|
|
2
2
|
import { SplitColumnsService } from '../services/split-columns.service';
|
|
3
3
|
import { CommonService } from '../services/common.service';
|
|
4
|
+
import { SwapColumnsService } from '../services/swap-columns.service';
|
|
4
5
|
import { CdkDrag, CdkDragDrop, CdkDragEnter, CdkDragExit, CdkDragMove, CdkDragSortEvent } from '@angular/cdk/drag-drop';
|
|
5
6
|
import { CdkDropList } from '@angular/cdk/drag-drop';
|
|
6
7
|
import { CopyServiceService } from '../services/copy-service.service';
|
|
7
|
-
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
8
|
-
import { ExportService } from '../services/export.service';
|
|
9
8
|
import * as i0 from "@angular/core";
|
|
10
9
|
export declare const sortingAnimation: import("@angular/animations").AnimationTriggerMetadata;
|
|
11
|
-
export declare class DataGridComponent implements OnChanges, AfterViewInit
|
|
10
|
+
export declare class DataGridComponent implements OnChanges, AfterViewInit {
|
|
12
11
|
private columnService;
|
|
13
12
|
cdr: ChangeDetectorRef;
|
|
14
13
|
commonSevice: CommonService;
|
|
14
|
+
private swapColumnService;
|
|
15
15
|
private elementRef;
|
|
16
16
|
private ngZone;
|
|
17
17
|
private copyService;
|
|
18
|
-
private renderer;
|
|
19
|
-
private sanitizer;
|
|
20
|
-
private exportService;
|
|
21
18
|
paginationConfig: any;
|
|
22
19
|
dataSet: any[];
|
|
23
20
|
columns: any[];
|
|
@@ -36,14 +33,12 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
36
33
|
sidemenuBackgroundColor: string | undefined;
|
|
37
34
|
bodyTextColor: string | undefined;
|
|
38
35
|
headerTextColor: string | undefined;
|
|
39
|
-
checkboxesColor: string | undefined;
|
|
40
36
|
headerTextFontsSize: number | undefined;
|
|
41
37
|
bodyTextFontsSize: number | undefined;
|
|
42
38
|
headerFontWeight: number | undefined;
|
|
43
39
|
bodyFontWeight: number | undefined;
|
|
44
40
|
checkedRowBackgroundColor: string | undefined;
|
|
45
41
|
dropdownsBackgroundColor: string | undefined;
|
|
46
|
-
footerRowBackgroundColor: string | undefined;
|
|
47
42
|
footerRowHeight: number;
|
|
48
43
|
topGroupedBadgesBackgroundColor: string | undefined;
|
|
49
44
|
showRowsGrouping: boolean | undefined;
|
|
@@ -92,32 +87,19 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
92
87
|
leftPinnedBoxshadow: string;
|
|
93
88
|
rightPinnedBoxshadow: string;
|
|
94
89
|
selectedRowsBackgroundColor: string;
|
|
95
|
-
|
|
96
|
-
nestedTableRowBackgroundColor: string;
|
|
90
|
+
nestedTableHeaderBAckgroundColor: string;
|
|
97
91
|
tableView: any[];
|
|
98
|
-
buttons: {
|
|
99
|
-
name: string;
|
|
100
|
-
is_showIcon: boolean;
|
|
101
|
-
icon: string;
|
|
102
|
-
has_permission: boolean;
|
|
103
|
-
}[];
|
|
104
92
|
keepMultipleExpandedDetails: boolean;
|
|
105
93
|
showTotalAmountRow: boolean;
|
|
106
|
-
enableGlobalSearch: boolean;
|
|
107
94
|
tableType: string;
|
|
108
|
-
|
|
109
|
-
enableCut: boolean;
|
|
110
|
-
tabs: string[];
|
|
111
|
-
resetAllFilters: {
|
|
112
|
-
resetAll: boolean;
|
|
113
|
-
};
|
|
95
|
+
widgets: any[];
|
|
114
96
|
columnThreedotsMunuConfig: {
|
|
115
97
|
showPinleft: boolean;
|
|
116
98
|
showPinright: boolean;
|
|
117
99
|
showAscending: boolean;
|
|
118
100
|
showDescending: boolean;
|
|
119
101
|
showFilter: boolean;
|
|
120
|
-
showRowsGrouping: boolean
|
|
102
|
+
showRowsGrouping: boolean;
|
|
121
103
|
showAutosizeAllColumns: boolean;
|
|
122
104
|
showAutosizeThisColumn: boolean;
|
|
123
105
|
showChoseColumns: boolean;
|
|
@@ -129,7 +111,6 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
129
111
|
tablePresetConfig: EventEmitter<any>;
|
|
130
112
|
sortingOrderOptions: EventEmitter<any>;
|
|
131
113
|
createUpdateConfigListing: EventEmitter<any>;
|
|
132
|
-
activeTab: string | null;
|
|
133
114
|
groupedColumns: any[];
|
|
134
115
|
activeCol: any;
|
|
135
116
|
activeFilterCell: any;
|
|
@@ -145,29 +126,22 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
145
126
|
filterColumnsList: any[];
|
|
146
127
|
groupBoxPadding: number;
|
|
147
128
|
presetName: string;
|
|
148
|
-
presetFilter:
|
|
129
|
+
presetFilter: any;
|
|
149
130
|
searchTextPresetTable: string;
|
|
150
131
|
addFilterColumnInput: string;
|
|
151
132
|
searchInDropdown: string;
|
|
152
133
|
addFilterDropdownSearch: string;
|
|
153
134
|
topShowHideColumns: string;
|
|
154
135
|
choseColumnsSearch: string;
|
|
155
|
-
sideNestedFilterSearch: string;
|
|
156
136
|
editinDropdownSearch: string;
|
|
157
137
|
isThreeDotsFilterOpen: boolean;
|
|
158
138
|
confirmDelete: boolean;
|
|
159
139
|
fontFamilies: string[];
|
|
160
140
|
fontSizes: string[];
|
|
161
|
-
|
|
162
|
-
constructor(columnService: SplitColumnsService, cdr: ChangeDetectorRef, commonSevice: CommonService, elementRef: ElementRef, ngZone: NgZone, copyService: CopyServiceService, renderer: Renderer2, sanitizer: DomSanitizer, exportService: ExportService);
|
|
141
|
+
constructor(columnService: SplitColumnsService, cdr: ChangeDetectorRef, commonSevice: CommonService, swapColumnService: SwapColumnsService, elementRef: ElementRef, ngZone: NgZone, copyService: CopyServiceService);
|
|
163
142
|
cellText: ElementRef;
|
|
164
|
-
|
|
165
|
-
ngAfterViewInit(): void;
|
|
166
|
-
ngAfterViewChecked(): void;
|
|
167
|
-
ngOnInit(): void;
|
|
143
|
+
ngAfterViewInit(): Promise<void>;
|
|
168
144
|
ngOnChanges(changes: SimpleChanges): Promise<void>;
|
|
169
|
-
applyRowsSelectionState(): void;
|
|
170
|
-
clearSelectionState(tableType: string): void;
|
|
171
145
|
applyFilteroptionList(): Promise<void>;
|
|
172
146
|
leftPinnedColumns: any[];
|
|
173
147
|
centerColumns: any[];
|
|
@@ -176,8 +150,6 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
176
150
|
previewCenterColumns: any[];
|
|
177
151
|
previewRightPinnedColumns: any[];
|
|
178
152
|
dataGridContainer: ElementRef<HTMLDivElement>;
|
|
179
|
-
taskManagementContainer: ElementRef<HTMLDivElement>;
|
|
180
|
-
nestedTableContainer: ElementRef<HTMLDivElement>;
|
|
181
153
|
leftPinnedBody: ElementRef<HTMLDivElement>;
|
|
182
154
|
centerPinnedBody: ElementRef<HTMLDivElement>;
|
|
183
155
|
rightPinnedBody: ElementRef<HTMLDivElement>;
|
|
@@ -190,15 +162,16 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
190
162
|
refreshPreviewColumns(columns?: any): Promise<void>;
|
|
191
163
|
SetColumnsDefaultWidth(): Promise<void>;
|
|
192
164
|
setSectionsWidth(): void;
|
|
165
|
+
onLeftBodyScroll(): void;
|
|
166
|
+
onRightBodyScroll(): void;
|
|
193
167
|
fakeScrollbarScrollLeft: number;
|
|
168
|
+
onFakeScroll(event: Event): void;
|
|
194
169
|
getNestedValue(obj: any, field: string): any;
|
|
195
170
|
isNestedValueArray(obj: any, field: string): boolean;
|
|
196
171
|
onResizeGroup(event: MouseEvent, col: any, isRightPinned?: boolean): void;
|
|
197
172
|
private updateColumnWidthInSourceByField;
|
|
198
|
-
cleanColumns(columns: any[]): any[];
|
|
199
173
|
onResizeColumn(event: MouseEvent, col: any): void;
|
|
200
174
|
onResizeGroupBox(event: MouseEvent): void;
|
|
201
|
-
onPasteInFilterRowSearch(event: ClipboardEvent, col: any): void;
|
|
202
175
|
onFilterChange(col: any): void;
|
|
203
176
|
get bodyWrapperHeight(): string;
|
|
204
177
|
hoveredRowId: string | number | null;
|
|
@@ -209,11 +182,11 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
209
182
|
closeFilterDropdowns(event: MouseEvent): void;
|
|
210
183
|
private hasParentWithClass;
|
|
211
184
|
isMenueHidden: boolean;
|
|
212
|
-
openThreeDotsMenu(event: MouseEvent, child: any
|
|
185
|
+
openThreeDotsMenu(event: MouseEvent, child: any): void;
|
|
213
186
|
sortAsc(col: any): void;
|
|
214
187
|
sortDesc(col: any): void;
|
|
215
188
|
resetSort(col: any): void;
|
|
216
|
-
updateColumnPinInSourceByField(column: any, pinned: 'left' | 'right' | null
|
|
189
|
+
updateColumnPinInSourceByField(column: any, pinned: 'left' | 'right' | null): Promise<void>;
|
|
217
190
|
autosizeColumn(cols: any | any[]): void;
|
|
218
191
|
getGroupWidth(group: any): number;
|
|
219
192
|
autosizeAllColumns(): void;
|
|
@@ -283,10 +256,10 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
283
256
|
private fakeScrollRaf;
|
|
284
257
|
translateY: number;
|
|
285
258
|
lastScrollTop: number;
|
|
286
|
-
pendingAnimationFrame: number | null;
|
|
287
259
|
onMainScroll(event: Event): void;
|
|
288
260
|
get isScrollbarVisible(): boolean;
|
|
289
261
|
toggleExpand(row: any): void;
|
|
262
|
+
onMainFakeScroll(event: Event): void;
|
|
290
263
|
viewportRows: number;
|
|
291
264
|
firstIndex: number;
|
|
292
265
|
renderStart: number;
|
|
@@ -295,17 +268,19 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
295
268
|
mainScroll: ElementRef<HTMLDivElement>;
|
|
296
269
|
fakeScroll: ElementRef<HTMLDivElement>;
|
|
297
270
|
horizintalFakeScroll: ElementRef<HTMLDivElement>;
|
|
298
|
-
centerScrollableBody: ElementRef<
|
|
271
|
+
centerScrollableBody: ElementRef<any>;
|
|
299
272
|
private overscan;
|
|
300
273
|
computeViewportRows(): void;
|
|
301
|
-
|
|
274
|
+
onHorizintalFakeScroll(event: Event): void;
|
|
302
275
|
onCenterBodyScroll(event: Event): void;
|
|
303
276
|
onCenterHeaderScroll(event: Event): void;
|
|
304
277
|
draggingColumn: any;
|
|
305
278
|
dragStartIndex: any;
|
|
306
279
|
canEnterToRowsGrouping: (drag: CdkDrag<any>, drop: CdkDropList<any>) => any;
|
|
280
|
+
onDragMoved(event: CdkDragMove<any>): void;
|
|
307
281
|
enterToTopRowGrouping(dropList: CdkDragEnter<any>): void;
|
|
308
282
|
onDropListEnter(dropList: CdkDragEnter<any>, section: 'left' | 'center' | 'right'): void;
|
|
283
|
+
enterToTopGroupingRow(dropList: CdkDragEnter<any>): void;
|
|
309
284
|
exitedFromTheTopRow(dropList: CdkDragExit<any>): void;
|
|
310
285
|
shouldDisableDroplistSorting: boolean;
|
|
311
286
|
isDisableColumnGrouping: boolean;
|
|
@@ -315,9 +290,11 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
315
290
|
onSortGroup: (event: CdkDragSortEvent<any>, section: string) => Promise<void>;
|
|
316
291
|
onDropGroup(): void;
|
|
317
292
|
onDropTopGroup(event: CdkDragDrop<any>): Promise<void>;
|
|
318
|
-
onGroupReorder(event: CdkDragDrop<any[]>): Promise<void>;
|
|
319
293
|
ungroupColumn(column: any): Promise<void>;
|
|
320
294
|
shouldTheGroupHeaderShow(group: any): any;
|
|
295
|
+
onChildDragStart(): void;
|
|
296
|
+
dropListIds: string[];
|
|
297
|
+
generateDropListIds(): void;
|
|
321
298
|
onChildDroplistSorted: (event: CdkDragSortEvent<any>, section: string) => Promise<void>;
|
|
322
299
|
onChildDroplistDroped(cdkDragDropevent: CdkDragDrop<any>): void;
|
|
323
300
|
groupData(data: any[], groupFields: string[]): any[];
|
|
@@ -343,12 +320,11 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
343
320
|
isFilterOpen: boolean;
|
|
344
321
|
selectedColumnForFilter: any;
|
|
345
322
|
showFilters: boolean;
|
|
346
|
-
openFilterFromDisabledSearchedInput(col: any): void;
|
|
347
323
|
openFilter(col: any): void;
|
|
348
324
|
firstValue: any;
|
|
349
325
|
firstCondition: string;
|
|
350
326
|
secondValue: any;
|
|
351
|
-
secondCondition:
|
|
327
|
+
secondCondition: string;
|
|
352
328
|
condition: string;
|
|
353
329
|
resetTextFilterChanges(): void;
|
|
354
330
|
toggleAllValusSelectionInDropdownFilter(column: any): void;
|
|
@@ -363,9 +339,7 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
363
339
|
onOptionToggle(col: any, option: any): void;
|
|
364
340
|
resetSideFilter(col: any): void;
|
|
365
341
|
clearAllFilters(): void;
|
|
366
|
-
applySideFilter(
|
|
367
|
-
removeSideFilter(column: any): void;
|
|
368
|
-
collapseAllExpandedCells(): void;
|
|
342
|
+
applySideFilter(): void;
|
|
369
343
|
trackByField(index: number, col: any): string;
|
|
370
344
|
get activeFilteredColumns(): any[];
|
|
371
345
|
toggleOpenFilter(): void;
|
|
@@ -373,7 +347,6 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
373
347
|
activeCell: string | null;
|
|
374
348
|
setActiveCell(row: any, column: any): void;
|
|
375
349
|
isActiveCell(row: any, col: any): boolean;
|
|
376
|
-
textAreadInput: ElementRef<HTMLTextAreaElement>;
|
|
377
350
|
enableEdit(row: any, column: any, clickedFromDetailsBox?: boolean, cellContainer?: HTMLElement): void;
|
|
378
351
|
disableEdit(row: any, column: any, control?: any): void;
|
|
379
352
|
emailRegex: RegExp;
|
|
@@ -385,14 +358,9 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
385
358
|
goToPage(page: any): void;
|
|
386
359
|
onPageSizeChange(): void;
|
|
387
360
|
actionPreset(data: any, type: any): void;
|
|
388
|
-
|
|
389
|
-
curretaTablePresetForUpdate: any;
|
|
390
|
-
temp_state: {
|
|
391
|
-
id: string;
|
|
392
|
-
is_temp: boolean;
|
|
393
|
-
};
|
|
394
|
-
selectFilter(data: any): Promise<void>;
|
|
361
|
+
selectFilter(data: any): void;
|
|
395
362
|
savePreset(control?: any): void;
|
|
363
|
+
getFilterHeaders(filters: any[], columns: any[]): string;
|
|
396
364
|
toggleRowShading(): void;
|
|
397
365
|
trackByTable(index: number): number;
|
|
398
366
|
activeRow: any;
|
|
@@ -400,9 +368,10 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
400
368
|
getCellKey(row: any, col: any): string;
|
|
401
369
|
expandedCells: Map<string, number>;
|
|
402
370
|
private zCounter;
|
|
403
|
-
showDetailsBox: boolean;
|
|
404
371
|
toggleExpandOfLongCellText(row: any, col: any, columns: any[], expandWholeRow?: boolean): void;
|
|
372
|
+
showDetailsBox: boolean;
|
|
405
373
|
isOpenToTop(row: any, col: any): boolean;
|
|
374
|
+
collapseAllExpandedCells(): void;
|
|
406
375
|
isExpanded(row: any, col: any): boolean;
|
|
407
376
|
getZIndex(row: any, col: any): number;
|
|
408
377
|
isOverflowing(element: HTMLElement | null): boolean;
|
|
@@ -422,11 +391,10 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
422
391
|
getCellClasses(column: any, value: any): string;
|
|
423
392
|
removeColumnFilterFromColumn(column: any): void;
|
|
424
393
|
onSideMenuColumnsVisibilityChange(): void;
|
|
425
|
-
|
|
426
|
-
downloadCsv(type: 'csv' | 'xlsx'): void;
|
|
394
|
+
downloadCsv(): void;
|
|
427
395
|
onFontChange(): void;
|
|
428
396
|
onGlobalSearch(): void;
|
|
429
|
-
|
|
397
|
+
onInputChange(event: any): void;
|
|
430
398
|
checkFilterChangesEffect(): any;
|
|
431
399
|
selectedCells: any[];
|
|
432
400
|
selectedKeys: Set<string>;
|
|
@@ -481,10 +449,10 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
481
449
|
performCut(selectedData: any[][]): void;
|
|
482
450
|
getSelectedDataForCopy(): any[][];
|
|
483
451
|
onKeyDown(event: KeyboardEvent): void;
|
|
484
|
-
selectAllCells(): void;
|
|
485
452
|
undo(): void;
|
|
486
453
|
redo(): void;
|
|
487
|
-
onPaste
|
|
454
|
+
onPaste(event: ClipboardEvent): Promise<void>;
|
|
455
|
+
showConfirmationModal(message: string): Promise<boolean>;
|
|
488
456
|
isDate(value: any): boolean;
|
|
489
457
|
expandededDetailRows: (string | number)[] | string | number;
|
|
490
458
|
toggleDetailRowExpand(row: any): void;
|
|
@@ -494,45 +462,16 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnIn
|
|
|
494
462
|
toggleMenu(i: number, event?: MouseEvent): void;
|
|
495
463
|
nestedTable: ElementRef<HTMLDivElement>;
|
|
496
464
|
get hasVerticalScroll(): boolean;
|
|
497
|
-
|
|
498
|
-
getTotalAmount(column: any): string | undefined;
|
|
465
|
+
getTotalAmount(column: any): string;
|
|
499
466
|
dropColumn(event: CdkDragDrop<any[]>, row: any): void;
|
|
500
467
|
currentSubSortColumn: string | null;
|
|
501
468
|
currentSortDirection: 'asc' | 'desc';
|
|
502
|
-
sortNestedCol(col: any,
|
|
469
|
+
sortNestedCol(col: any, dataSet?: any[]): void;
|
|
503
470
|
getColumnWidthPx(row: any, col: any): string;
|
|
504
471
|
fullscreenImage: string | null;
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
getStickyLeft(columns: any[], index: number): string;
|
|
509
|
-
previewNestedCols: any[];
|
|
510
|
-
onNestedColSort(event: CdkDragSortEvent<any[]>, columns: any[]): void;
|
|
511
|
-
saveSelection(selectedIds: string[], tableType: string): void;
|
|
512
|
-
restoreSelection(tableType: string): Set<string>;
|
|
513
|
-
isOutsideContainer: boolean;
|
|
514
|
-
private containerRect;
|
|
515
|
-
onDragStarted(col: any): void;
|
|
516
|
-
onDragMoved(event: CdkDragMove): void;
|
|
517
|
-
onDragEnded(): void;
|
|
518
|
-
getStartIndex(): number;
|
|
519
|
-
hasAnyDefaultView(): boolean;
|
|
520
|
-
get isTablePresetNotChanged(): any;
|
|
521
|
-
onActionButtonClick(button: string): void;
|
|
522
|
-
setActiveTab(tab: string): void;
|
|
523
|
-
getBackgroundColor(row: any, isEven: boolean, section: 'left' | 'center' | 'right'): string | undefined;
|
|
524
|
-
hasHorizontalScrollbar(): boolean;
|
|
525
|
-
getSafeComment(description: string): SafeHtml;
|
|
526
|
-
cleanEditorContent(content: string): SafeHtml;
|
|
527
|
-
getExtention(url: string | string[] | null | undefined): string | undefined;
|
|
528
|
-
downloadAttchment(url: any, file?: any): void;
|
|
529
|
-
fullImageSrc: string | null;
|
|
530
|
-
openFullImage(event: Event): void;
|
|
531
|
-
addStylesToImages(): void;
|
|
532
|
-
onImageClick(src: string): void;
|
|
533
|
-
fullscreenImageTemplate: TemplateRef<any>;
|
|
534
|
-
private fullscreenViewRef;
|
|
535
|
-
iconMap: Record<string, (row: any, col: any) => string>;
|
|
472
|
+
openFullScreenImage(src: string): void;
|
|
473
|
+
getVisibleColumnCount(columns: any[]): number;
|
|
474
|
+
clearSelection(): void;
|
|
536
475
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataGridComponent, never>;
|
|
537
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<DataGridComponent, "data-grid", never, { "paginationConfig": { "alias": "paginationConfig"; "required": false; }; "dataSet": { "alias": "dataSet"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "rowHeight": { "alias": "rowHeight"; "required": false; }; "headerRowHeight": { "alias": "headerRowHeight"; "required": false; }; "showVerticalBorder": { "alias": "showVerticalBorder"; "required": false; }; "evenRowsBackgroundColor": { "alias": "evenRowsBackgroundColor"; "required": false; }; "oddRowsBackgroundColor": { "alias": "oddRowsBackgroundColor"; "required": false; }; "headerBackgroundColor": { "alias": "headerBackgroundColor"; "required": false; }; "checkboxesBackgroundColor": { "alias": "checkboxesBackgroundColor"; "required": false; }; "showColumnsGrouping": { "alias": "showColumnsGrouping"; "required": false; }; "rowHoverColor": { "alias": "rowHoverColor"; "required": false; }; "leftPinnedBackgroundColor": { "alias": "leftPinnedBackgroundColor"; "required": false; }; "bodyBackgroundColor": { "alias": "bodyBackgroundColor"; "required": false; }; "rightPinnedBackgroundColor": { "alias": "rightPinnedBackgroundColor"; "required": false; }; "sidemenuBackgroundColor": { "alias": "sidemenuBackgroundColor"; "required": false; }; "bodyTextColor": { "alias": "bodyTextColor"; "required": false; }; "headerTextColor": { "alias": "headerTextColor"; "required": false; }; "
|
|
476
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DataGridComponent, "data-grid", never, { "paginationConfig": { "alias": "paginationConfig"; "required": false; }; "dataSet": { "alias": "dataSet"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "rowHeight": { "alias": "rowHeight"; "required": false; }; "headerRowHeight": { "alias": "headerRowHeight"; "required": false; }; "showVerticalBorder": { "alias": "showVerticalBorder"; "required": false; }; "evenRowsBackgroundColor": { "alias": "evenRowsBackgroundColor"; "required": false; }; "oddRowsBackgroundColor": { "alias": "oddRowsBackgroundColor"; "required": false; }; "headerBackgroundColor": { "alias": "headerBackgroundColor"; "required": false; }; "checkboxesBackgroundColor": { "alias": "checkboxesBackgroundColor"; "required": false; }; "showColumnsGrouping": { "alias": "showColumnsGrouping"; "required": false; }; "rowHoverColor": { "alias": "rowHoverColor"; "required": false; }; "leftPinnedBackgroundColor": { "alias": "leftPinnedBackgroundColor"; "required": false; }; "bodyBackgroundColor": { "alias": "bodyBackgroundColor"; "required": false; }; "rightPinnedBackgroundColor": { "alias": "rightPinnedBackgroundColor"; "required": false; }; "sidemenuBackgroundColor": { "alias": "sidemenuBackgroundColor"; "required": false; }; "bodyTextColor": { "alias": "bodyTextColor"; "required": false; }; "headerTextColor": { "alias": "headerTextColor"; "required": false; }; "headerTextFontsSize": { "alias": "headerTextFontsSize"; "required": false; }; "bodyTextFontsSize": { "alias": "bodyTextFontsSize"; "required": false; }; "headerFontWeight": { "alias": "headerFontWeight"; "required": false; }; "bodyFontWeight": { "alias": "bodyFontWeight"; "required": false; }; "checkedRowBackgroundColor": { "alias": "checkedRowBackgroundColor"; "required": false; }; "dropdownsBackgroundColor": { "alias": "dropdownsBackgroundColor"; "required": false; }; "footerRowHeight": { "alias": "footerRowHeight"; "required": false; }; "topGroupedBadgesBackgroundColor": { "alias": "topGroupedBadgesBackgroundColor"; "required": false; }; "showRowsGrouping": { "alias": "showRowsGrouping"; "required": false; }; "showFilterRow": { "alias": "showFilterRow"; "required": false; }; "fontFaimly": { "alias": "fontFaimly"; "required": false; }; "showSideMenu": { "alias": "showSideMenu"; "required": false; }; "footerPadding": { "alias": "footerPadding"; "required": false; }; "topFilterRowHeight": { "alias": "topFilterRowHeight"; "required": false; }; "rowShadingEnabled": { "alias": "rowShadingEnabled"; "required": false; }; "showSerialNumber": { "alias": "showSerialNumber"; "required": false; }; "singleSpaAssetsPath": { "alias": "singleSpaAssetsPath"; "required": false; }; "filtersConfig": { "alias": "filtersConfig"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "verticalScrollbarWidth": { "alias": "verticalScrollbarWidth"; "required": false; }; "horizintalScrollbarWidth": { "alias": "horizintalScrollbarWidth"; "required": false; }; "showCellDetailsBox": { "alias": "showCellDetailsBox"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; "tableSearch": { "alias": "tableSearch"; "required": false; }; "actions": { "alias": "actions"; "required": false; }; "config": { "alias": "config"; "required": false; }; "showTaskbar": { "alias": "showTaskbar"; "required": false; }; "tableName": { "alias": "tableName"; "required": false; }; "listingType": { "alias": "listingType"; "required": false; }; "checkboxState": { "alias": "checkboxState"; "required": false; }; "taskbarActions": { "alias": "taskbarActions"; "required": false; }; "sortingConfig": { "alias": "sortingConfig"; "required": false; }; "tableFilterViewId": { "alias": "tableFilterViewId"; "required": false; }; "selectedTableLayout": { "alias": "selectedTableLayout"; "required": false; }; "closeDropdown": { "alias": "closeDropdown"; "required": false; }; "globalSearchText": { "alias": "globalSearchText"; "required": false; }; "nestedTablerowFontsize": { "alias": "nestedTablerowFontsize"; "required": false; }; "nestedTableHeaderRowHeight": { "alias": "nestedTableHeaderRowHeight"; "required": false; }; "nestedTablerowHeight": { "alias": "nestedTablerowHeight"; "required": false; }; "gridType": { "alias": "gridType"; "required": false; }; "currencySymbol": { "alias": "currencySymbol"; "required": false; }; "leftPinnedBoxshadow": { "alias": "leftPinnedBoxshadow"; "required": false; }; "rightPinnedBoxshadow": { "alias": "rightPinnedBoxshadow"; "required": false; }; "selectedRowsBackgroundColor": { "alias": "selectedRowsBackgroundColor"; "required": false; }; "nestedTableHeaderBAckgroundColor": { "alias": "nestedTableHeaderBAckgroundColor"; "required": false; }; "tableView": { "alias": "tableView"; "required": false; }; "keepMultipleExpandedDetails": { "alias": "keepMultipleExpandedDetails"; "required": false; }; "showTotalAmountRow": { "alias": "showTotalAmountRow"; "required": false; }; "tableType": { "alias": "tableType"; "required": false; }; "widgets": { "alias": "widgets"; "required": false; }; "columnThreedotsMunuConfig": { "alias": "columnThreedotsMunuConfig"; "required": false; }; }, { "changeLayout": "changeLayout"; "filterOptions": "filterOptions"; "genericEvent": "genericEvent"; "tablePresetConfig": "tablePresetConfig"; "sortingOrderOptions": "sortingOrderOptions"; "createUpdateConfigListing": "createUpdateConfigListing"; }, never, never, false, never>;
|
|
538
477
|
}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import * as i1 from "./data-grid/data-grid.component";
|
|
3
3
|
import * as i2 from "./pipes/filter.pipe";
|
|
4
|
-
import * as i3 from "
|
|
5
|
-
import * as i4 from "@angular/
|
|
6
|
-
import * as i5 from "@angular/
|
|
7
|
-
import * as i6 from "
|
|
8
|
-
import * as i7 from "
|
|
4
|
+
import * as i3 from "./directives/draggable-header.directive";
|
|
5
|
+
import * as i4 from "@angular/common";
|
|
6
|
+
import * as i5 from "@angular/forms";
|
|
7
|
+
import * as i6 from "@angular/cdk/drag-drop";
|
|
8
|
+
import * as i7 from "ng-inline-svg";
|
|
9
|
+
import * as i8 from "@angular/cdk/scrolling";
|
|
9
10
|
export declare class DataGridModule {
|
|
10
11
|
static ɵfac: i0.ɵɵFactoryDeclaration<DataGridModule, never>;
|
|
11
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<DataGridModule, [typeof i1.DataGridComponent, typeof i2.FilterPipe], [typeof
|
|
12
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<DataGridModule, [typeof i1.DataGridComponent, typeof i2.FilterPipe, typeof i3.DraggableHeaderDirective], [typeof i4.CommonModule, typeof i5.FormsModule, typeof i6.DragDropModule, typeof i7.InlineSVGModule, typeof i8.ScrollingModule], [typeof i1.DataGridComponent, typeof i3.DraggableHeaderDirective, typeof i7.InlineSVGModule]>;
|
|
12
13
|
static ɵinj: i0.ɵɵInjectorDeclaration<DataGridModule>;
|
|
13
14
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ElementRef, EventEmitter, Renderer2 } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export interface DragMoveEvent {
|
|
4
|
+
event: MouseEvent;
|
|
5
|
+
data: any;
|
|
6
|
+
}
|
|
7
|
+
export declare class DraggableHeaderDirective {
|
|
8
|
+
private el;
|
|
9
|
+
private renderer;
|
|
10
|
+
column: any;
|
|
11
|
+
headerName: string;
|
|
12
|
+
dragStart: EventEmitter<any>;
|
|
13
|
+
dragMove: EventEmitter<any>;
|
|
14
|
+
dragEnd: EventEmitter<any>;
|
|
15
|
+
private isDragging;
|
|
16
|
+
private placeholderEl;
|
|
17
|
+
private previewEl;
|
|
18
|
+
constructor(el: ElementRef, renderer: Renderer2);
|
|
19
|
+
startX: number;
|
|
20
|
+
startY: number;
|
|
21
|
+
onMouseDown(event: MouseEvent): void;
|
|
22
|
+
onMouseMove: (event: MouseEvent) => void;
|
|
23
|
+
onMouseUp: (event: MouseEvent) => void;
|
|
24
|
+
private originalCursor;
|
|
25
|
+
private setCursor;
|
|
26
|
+
private resetCursor;
|
|
27
|
+
private startDragging;
|
|
28
|
+
overrideCursor(style: string): void;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DraggableHeaderDirective, never>;
|
|
30
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<DraggableHeaderDirective, "[appDraggableHeader]", never, { "column": { "alias": "column"; "required": false; }; "headerName": { "alias": "headerName"; "required": false; }; }, { "dragStart": "dragStart"; "dragMove": "dragMove"; "dragEnd": "dragEnd"; }, never, never, false, never>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class SwapColumnsService {
|
|
3
|
+
constructor();
|
|
4
|
+
deepClone(obj: any): any;
|
|
5
|
+
flattenColumnsWithPaths(columns: any[]): {
|
|
6
|
+
col: any;
|
|
7
|
+
path: number[];
|
|
8
|
+
}[];
|
|
9
|
+
findColumnByIndex(columns: any[], index: number, flat: any[], _path?: number[][], currentPath?: number[]): {
|
|
10
|
+
column: any;
|
|
11
|
+
parent: any[];
|
|
12
|
+
path: number[];
|
|
13
|
+
} | null;
|
|
14
|
+
insertAtPath(columns: any[], path: number[], newColumn: any): any[];
|
|
15
|
+
removeAtPath(columns: any[], path: number[]): any[];
|
|
16
|
+
swapColumnsInTree(currentColumn: any, columns: any[], fromIndex: number, toIndex: number): any[];
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SwapColumnsService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SwapColumnsService>;
|
|
19
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ms-data-grid",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.44",
|
|
4
4
|
"description": "A powerful, customizable Angular data grid component with advanced features like sorting, filtering, pagination, column pinning, and taskbar actions. Perfect for enterprise applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"angular",
|
|
@@ -26,13 +26,7 @@
|
|
|
26
26
|
"@angular/core": "^16.2.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"
|
|
30
|
-
"ng-inline-svg": "^13.1.1",
|
|
31
|
-
"ngx-bootstrap": "^20.0.0",
|
|
32
|
-
"bootstrap": "^5.3.7",
|
|
33
|
-
"tslib": "^2.3.0",
|
|
34
|
-
"file-saver": "^2.0.5",
|
|
35
|
-
"zone.js": "~0.13.0"
|
|
29
|
+
"tslib": "^2.3.0"
|
|
36
30
|
},
|
|
37
31
|
"sideEffects": false,
|
|
38
32
|
"module": "fesm2022/ms-data-grid.mjs",
|
package/public-api.d.ts
CHANGED