ms-data-grid 0.0.46 → 0.0.48

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.
@@ -1,20 +1,24 @@
1
- import { OnChanges, SimpleChanges, ElementRef, AfterViewInit, ChangeDetectorRef, EventEmitter, NgZone } from '@angular/core';
1
+ import { OnInit, OnChanges, SimpleChanges, ElementRef, AfterViewInit, ChangeDetectorRef, EventEmitter, NgZone, Renderer2, AfterViewChecked, TemplateRef, QueryList, Injector } 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';
5
4
  import { CdkDrag, CdkDragDrop, CdkDragEnter, CdkDragExit, CdkDragMove, CdkDragSortEvent } from '@angular/cdk/drag-drop';
6
5
  import { CdkDropList } from '@angular/cdk/drag-drop';
7
6
  import { CopyServiceService } from '../services/copy-service.service';
7
+ import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
8
+ import { ExportService } from '../services/export.service';
9
+ import { CellHostDirective } from '../directives/cellHost.directive';
8
10
  import * as i0 from "@angular/core";
9
11
  export declare const sortingAnimation: import("@angular/animations").AnimationTriggerMetadata;
10
- export declare class DataGridComponent implements OnChanges, AfterViewInit {
12
+ export declare class DataGridComponent implements OnChanges, AfterViewInit, OnInit, AfterViewChecked {
11
13
  private columnService;
12
14
  cdr: ChangeDetectorRef;
13
15
  commonSevice: CommonService;
14
- private swapColumnService;
15
16
  private elementRef;
16
17
  private ngZone;
17
18
  private copyService;
19
+ private renderer;
20
+ private sanitizer;
21
+ private exportService;
18
22
  paginationConfig: any;
19
23
  dataSet: any[];
20
24
  columns: any[];
@@ -33,12 +37,14 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
33
37
  sidemenuBackgroundColor: string | undefined;
34
38
  bodyTextColor: string | undefined;
35
39
  headerTextColor: string | undefined;
40
+ checkboxesColor: string | undefined;
36
41
  headerTextFontsSize: number | undefined;
37
42
  bodyTextFontsSize: number | undefined;
38
43
  headerFontWeight: number | undefined;
39
44
  bodyFontWeight: number | undefined;
40
45
  checkedRowBackgroundColor: string | undefined;
41
46
  dropdownsBackgroundColor: string | undefined;
47
+ footerRowBackgroundColor: string | undefined;
42
48
  footerRowHeight: number;
43
49
  topGroupedBadgesBackgroundColor: string | undefined;
44
50
  showRowsGrouping: boolean | undefined;
@@ -87,12 +93,26 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
87
93
  leftPinnedBoxshadow: string;
88
94
  rightPinnedBoxshadow: string;
89
95
  selectedRowsBackgroundColor: string;
90
- nestedTableHeaderBAckgroundColor: string;
96
+ nestedTableHeaderBackgroundColor: string;
97
+ nestedTableRowBackgroundColor: string;
91
98
  tableView: any[];
99
+ buttons: {
100
+ name: string;
101
+ is_showIcon: boolean;
102
+ icon: string;
103
+ has_permission: boolean;
104
+ }[];
92
105
  keepMultipleExpandedDetails: boolean;
93
106
  showTotalAmountRow: boolean;
107
+ enableGlobalSearch: boolean;
94
108
  tableType: string;
95
- widgets: any[];
109
+ enableExport: boolean;
110
+ showFullScreenButton: boolean;
111
+ enableCut: boolean;
112
+ tabs: string[];
113
+ resetAllFilters: {
114
+ resetAll: boolean;
115
+ };
96
116
  columnThreedotsMunuConfig: {
97
117
  showPinleft: boolean;
98
118
  showPinright: boolean;
@@ -105,12 +125,15 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
105
125
  showChoseColumns: boolean;
106
126
  showResetColumns: boolean;
107
127
  };
128
+ cellHosts: QueryList<CellHostDirective>;
108
129
  changeLayout: EventEmitter<any>;
109
130
  filterOptions: EventEmitter<any>;
110
131
  genericEvent: EventEmitter<any>;
111
132
  tablePresetConfig: EventEmitter<any>;
112
133
  sortingOrderOptions: EventEmitter<any>;
113
134
  createUpdateConfigListing: EventEmitter<any>;
135
+ isFullScreen: boolean;
136
+ activeTab: string | null;
114
137
  groupedColumns: any[];
115
138
  activeCol: any;
116
139
  activeFilterCell: any;
@@ -126,22 +149,32 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
126
149
  filterColumnsList: any[];
127
150
  groupBoxPadding: number;
128
151
  presetName: string;
129
- presetFilter: any;
152
+ presetFilter: boolean;
130
153
  searchTextPresetTable: string;
131
154
  addFilterColumnInput: string;
132
155
  searchInDropdown: string;
133
156
  addFilterDropdownSearch: string;
134
157
  topShowHideColumns: string;
135
158
  choseColumnsSearch: string;
159
+ sideNestedFilterSearch: string;
136
160
  editinDropdownSearch: string;
137
161
  isThreeDotsFilterOpen: boolean;
138
162
  confirmDelete: boolean;
139
163
  fontFamilies: string[];
140
164
  fontSizes: string[];
141
- constructor(columnService: SplitColumnsService, cdr: ChangeDetectorRef, commonSevice: CommonService, swapColumnService: SwapColumnsService, elementRef: ElementRef, ngZone: NgZone, copyService: CopyServiceService);
142
- cellText: ElementRef;
143
- ngAfterViewInit(): Promise<void>;
165
+ hasScroll: boolean;
166
+ constructor(columnService: SplitColumnsService, cdr: ChangeDetectorRef, commonSevice: CommonService, elementRef: ElementRef, ngZone: NgZone, copyService: CopyServiceService, renderer: Renderer2, sanitizer: DomSanitizer, exportService: ExportService);
167
+ cellText: any;
168
+ nestedHeader: ElementRef;
169
+ ngAfterViewInit(): void;
170
+ private injector;
171
+ createCellInjector(row: any, col: any): Injector;
172
+ private renderCustomCells;
173
+ ngAfterViewChecked(): void;
174
+ ngOnInit(): void;
144
175
  ngOnChanges(changes: SimpleChanges): Promise<void>;
176
+ applyRowsSelectionState(): void;
177
+ clearSelectionState(tableType: string): void;
145
178
  applyFilteroptionList(): Promise<void>;
146
179
  leftPinnedColumns: any[];
147
180
  centerColumns: any[];
@@ -150,6 +183,8 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
150
183
  previewCenterColumns: any[];
151
184
  previewRightPinnedColumns: any[];
152
185
  dataGridContainer: ElementRef<HTMLDivElement>;
186
+ taskManagementContainer: ElementRef<HTMLDivElement>;
187
+ nestedTableContainer: ElementRef<HTMLDivElement>;
153
188
  leftPinnedBody: ElementRef<HTMLDivElement>;
154
189
  centerPinnedBody: ElementRef<HTMLDivElement>;
155
190
  rightPinnedBody: ElementRef<HTMLDivElement>;
@@ -162,16 +197,15 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
162
197
  refreshPreviewColumns(columns?: any): Promise<void>;
163
198
  SetColumnsDefaultWidth(): Promise<void>;
164
199
  setSectionsWidth(): void;
165
- onLeftBodyScroll(): void;
166
- onRightBodyScroll(): void;
167
200
  fakeScrollbarScrollLeft: number;
168
- onFakeScroll(event: Event): void;
169
201
  getNestedValue(obj: any, field: string): any;
170
202
  isNestedValueArray(obj: any, field: string): boolean;
171
203
  onResizeGroup(event: MouseEvent, col: any, isRightPinned?: boolean): void;
172
204
  private updateColumnWidthInSourceByField;
205
+ cleanColumns(columns: any[]): any[];
173
206
  onResizeColumn(event: MouseEvent, col: any): void;
174
207
  onResizeGroupBox(event: MouseEvent): void;
208
+ onPasteInFilterRowSearch(event: ClipboardEvent, col: any): void;
175
209
  onFilterChange(col: any): void;
176
210
  get bodyWrapperHeight(): string;
177
211
  hoveredRowId: string | number | null;
@@ -182,11 +216,11 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
182
216
  closeFilterDropdowns(event: MouseEvent): void;
183
217
  private hasParentWithClass;
184
218
  isMenueHidden: boolean;
185
- openThreeDotsMenu(event: MouseEvent, child: any): void;
219
+ openThreeDotsMenu(event: MouseEvent, child: any, keepOriginalPosition?: boolean): void;
186
220
  sortAsc(col: any): void;
187
221
  sortDesc(col: any): void;
188
222
  resetSort(col: any): void;
189
- updateColumnPinInSourceByField(column: any, pinned: 'left' | 'right' | null): Promise<void>;
223
+ updateColumnPinInSourceByField(column: any, pinned: 'left' | 'right' | null, isNestedTable?: any, columns?: any): Promise<void>;
190
224
  autosizeColumn(cols: any | any[]): void;
191
225
  getGroupWidth(group: any): number;
192
226
  autosizeAllColumns(): void;
@@ -256,10 +290,10 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
256
290
  private fakeScrollRaf;
257
291
  translateY: number;
258
292
  lastScrollTop: number;
293
+ pendingAnimationFrame: number | null;
259
294
  onMainScroll(event: Event): void;
260
295
  get isScrollbarVisible(): boolean;
261
296
  toggleExpand(row: any): void;
262
- onMainFakeScroll(event: Event): void;
263
297
  viewportRows: number;
264
298
  firstIndex: number;
265
299
  renderStart: number;
@@ -268,19 +302,17 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
268
302
  mainScroll: ElementRef<HTMLDivElement>;
269
303
  fakeScroll: ElementRef<HTMLDivElement>;
270
304
  horizintalFakeScroll: ElementRef<HTMLDivElement>;
271
- centerScrollableBody: ElementRef<any>;
305
+ centerScrollableBody: ElementRef<HTMLDivElement>;
272
306
  private overscan;
273
307
  computeViewportRows(): void;
274
- onHorizintalFakeScroll(event: Event): void;
308
+ onHorizontalFakeScroll(event: Event): void;
275
309
  onCenterBodyScroll(event: Event): void;
276
310
  onCenterHeaderScroll(event: Event): void;
277
311
  draggingColumn: any;
278
312
  dragStartIndex: any;
279
313
  canEnterToRowsGrouping: (drag: CdkDrag<any>, drop: CdkDropList<any>) => any;
280
- onDragMoved(event: CdkDragMove<any>): void;
281
314
  enterToTopRowGrouping(dropList: CdkDragEnter<any>): void;
282
315
  onDropListEnter(dropList: CdkDragEnter<any>, section: 'left' | 'center' | 'right'): void;
283
- enterToTopGroupingRow(dropList: CdkDragEnter<any>): void;
284
316
  exitedFromTheTopRow(dropList: CdkDragExit<any>): void;
285
317
  shouldDisableDroplistSorting: boolean;
286
318
  isDisableColumnGrouping: boolean;
@@ -289,12 +321,11 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
289
321
  dragStartOnGroup(col: any): void;
290
322
  onSortGroup: (event: CdkDragSortEvent<any>, section: string) => Promise<void>;
291
323
  onDropGroup(): void;
324
+ private deepCloneColumns;
292
325
  onDropTopGroup(event: CdkDragDrop<any>): Promise<void>;
326
+ onGroupReorder(event: CdkDragDrop<any[]>): Promise<void>;
293
327
  ungroupColumn(column: any): Promise<void>;
294
328
  shouldTheGroupHeaderShow(group: any): any;
295
- onChildDragStart(): void;
296
- dropListIds: string[];
297
- generateDropListIds(): void;
298
329
  onChildDroplistSorted: (event: CdkDragSortEvent<any>, section: string) => Promise<void>;
299
330
  onChildDroplistDroped(cdkDragDropevent: CdkDragDrop<any>): void;
300
331
  groupData(data: any[], groupFields: string[]): any[];
@@ -320,11 +351,12 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
320
351
  isFilterOpen: boolean;
321
352
  selectedColumnForFilter: any;
322
353
  showFilters: boolean;
354
+ openFilterFromDisabledSearchedInput(col: any): void;
323
355
  openFilter(col: any): void;
324
356
  firstValue: any;
325
357
  firstCondition: string;
326
358
  secondValue: any;
327
- secondCondition: string;
359
+ secondCondition: null;
328
360
  condition: string;
329
361
  resetTextFilterChanges(): void;
330
362
  toggleAllValusSelectionInDropdownFilter(column: any): void;
@@ -339,7 +371,9 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
339
371
  onOptionToggle(col: any, option: any): void;
340
372
  resetSideFilter(col: any): void;
341
373
  clearAllFilters(): void;
342
- applySideFilter(): void;
374
+ applySideFilter(column: any): void;
375
+ removeSideFilter(column: any): void;
376
+ collapseAllExpandedCells(): void;
343
377
  trackByField(index: number, col: any): string;
344
378
  get activeFilteredColumns(): any[];
345
379
  toggleOpenFilter(): void;
@@ -347,6 +381,7 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
347
381
  activeCell: string | null;
348
382
  setActiveCell(row: any, column: any): void;
349
383
  isActiveCell(row: any, col: any): boolean;
384
+ textAreadInput: ElementRef<HTMLTextAreaElement>;
350
385
  enableEdit(row: any, column: any, clickedFromDetailsBox?: boolean, cellContainer?: HTMLElement): void;
351
386
  disableEdit(row: any, column: any, control?: any): void;
352
387
  emailRegex: RegExp;
@@ -358,9 +393,14 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
358
393
  goToPage(page: any): void;
359
394
  onPageSizeChange(): void;
360
395
  actionPreset(data: any, type: any): void;
361
- selectFilter(data: any): void;
396
+ currentIdForUpdatePreset: string;
397
+ curretaTablePresetForUpdate: any;
398
+ temp_state: {
399
+ id: string;
400
+ is_temp: boolean;
401
+ };
402
+ selectFilter(data: any): Promise<void>;
362
403
  savePreset(control?: any): void;
363
- getFilterHeaders(filters: any[], columns: any[]): string;
364
404
  toggleRowShading(): void;
365
405
  trackByTable(index: number): number;
366
406
  activeRow: any;
@@ -368,10 +408,9 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
368
408
  getCellKey(row: any, col: any): string;
369
409
  expandedCells: Map<string, number>;
370
410
  private zCounter;
371
- toggleExpandOfLongCellText(row: any, col: any, columns: any[], expandWholeRow?: boolean): void;
372
411
  showDetailsBox: boolean;
412
+ toggleExpandOfLongCellText(row: any, col: any, columns: any[], expandWholeRow?: boolean): void;
373
413
  isOpenToTop(row: any): boolean;
374
- collapseAllExpandedCells(): void;
375
414
  isExpanded(row: any, col: any): boolean;
376
415
  getZIndex(row: any, col: any): number;
377
416
  isOverflowing(element: HTMLElement | null): boolean;
@@ -391,10 +430,11 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
391
430
  getCellClasses(column: any, value: any): string;
392
431
  removeColumnFilterFromColumn(column: any): void;
393
432
  onSideMenuColumnsVisibilityChange(): void;
394
- downloadCsv(): void;
433
+ cleanFilterdColumns(): any[];
434
+ downloadCsv(type: 'csv' | 'xlsx'): void;
395
435
  onFontChange(): void;
396
436
  onGlobalSearch(): void;
397
- onInputChange(event: any): void;
437
+ onSearchInput(event: Event): void;
398
438
  checkFilterChangesEffect(): any;
399
439
  selectedCells: any[];
400
440
  selectedKeys: Set<string>;
@@ -449,6 +489,7 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
449
489
  performCut(selectedData: any[][]): void;
450
490
  getSelectedDataForCopy(): any[][];
451
491
  onKeyDown(event: KeyboardEvent): void;
492
+ selectAllCells(): void;
452
493
  undo(): void;
453
494
  redo(): void;
454
495
  onPaste(event: ClipboardEvent): Promise<void>;
@@ -462,16 +503,46 @@ export declare class DataGridComponent implements OnChanges, AfterViewInit {
462
503
  toggleMenu(i: number, event?: MouseEvent): void;
463
504
  nestedTable: ElementRef<HTMLDivElement>;
464
505
  get hasVerticalScroll(): boolean;
506
+ get hasHorizontalScroll(): boolean;
465
507
  getTotalAmount(column: any): string | undefined;
466
508
  dropColumn(event: CdkDragDrop<any[]>, row: any): void;
467
509
  currentSubSortColumn: string | null;
468
510
  currentSortDirection: 'asc' | 'desc';
469
- sortNestedCol(col: any, dataSet?: any[]): void;
511
+ sortNestedCol(col: any, row: any): void;
470
512
  getColumnWidthPx(row: any, col: any): string;
471
513
  fullscreenImage: string | null;
472
- openFullScreenImage(src: string): void;
473
- getVisibleColumnCount(columns: any[]): number;
474
- clearSelection(): void;
514
+ pinUnpinColum(col: any, value: 'left' | 'right' | null, columns: any[]): void;
515
+ getLeftPinnedCount(columns: any[]): number;
516
+ getRightPinnedCount(columns: any[]): number;
517
+ getStickyLeft(columns: any[], index: number): string;
518
+ previewNestedCols: any[];
519
+ onNestedColSort(event: CdkDragSortEvent<any[]>, columns: any[]): void;
520
+ saveSelection(selectedIds: string[], tableType: string): void;
521
+ restoreSelection(tableType: string): Set<string>;
522
+ isOutsideContainer: boolean;
523
+ private containerRect;
524
+ onDragStarted(col: any): void;
525
+ onDragMoved(event: CdkDragMove): void;
526
+ onDragEnded(): void;
527
+ getStartIndex(): number;
528
+ hasAnyDefaultView(): boolean;
529
+ get isTablePresetNotChanged(): any;
530
+ onActionButtonClick(button: string): void;
531
+ setActiveTab(tab: string): void;
532
+ getBackgroundColor(row: any, isEven: boolean, section: 'left' | 'center' | 'right'): string | undefined;
533
+ hasHorizontalScrollbar(): boolean;
534
+ getSafeComment(description: string): SafeHtml;
535
+ cleanEditorContent(content: string): SafeHtml;
536
+ getExtention(url: string | string[] | null | undefined): string | undefined;
537
+ downloadAttchment(url: any, file?: any): void;
538
+ fullImageSrc: string | null;
539
+ openFullImage(event: Event): void;
540
+ addStylesToImages(): void;
541
+ onImageClick(src: string): void;
542
+ fullscreenImageTemplate: TemplateRef<any>;
543
+ private fullscreenViewRef;
544
+ iconMap: Record<string, (row: any, col: any) => string>;
545
+ toggleFullscreen(): void;
475
546
  static ɵfac: i0.ɵɵFactoryDeclaration<DataGridComponent, never>;
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>;
547
+ 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; }; "checkboxesColor": { "alias": "checkboxesColor"; "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; }; "footerRowBackgroundColor": { "alias": "footerRowBackgroundColor"; "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; }; "nestedTableRowBackgroundColor": { "alias": "nestedTableRowBackgroundColor"; "required": false; }; "tableView": { "alias": "tableView"; "required": false; }; "buttons": { "alias": "buttons"; "required": false; }; "keepMultipleExpandedDetails": { "alias": "keepMultipleExpandedDetails"; "required": false; }; "showTotalAmountRow": { "alias": "showTotalAmountRow"; "required": false; }; "enableGlobalSearch": { "alias": "enableGlobalSearch"; "required": false; }; "tableType": { "alias": "tableType"; "required": false; }; "enableExport": { "alias": "enableExport"; "required": false; }; "showFullScreenButton": { "alias": "showFullScreenButton"; "required": false; }; "enableCut": { "alias": "enableCut"; "required": false; }; "tabs": { "alias": "tabs"; "required": false; }; "resetAllFilters": { "alias": "resetAllFilters"; "required": false; }; "columnThreedotsMunuConfig": { "alias": "columnThreedotsMunuConfig"; "required": false; }; }, { "changeLayout": "changeLayout"; "filterOptions": "filterOptions"; "genericEvent": "genericEvent"; "tablePresetConfig": "tablePresetConfig"; "sortingOrderOptions": "sortingOrderOptions"; "createUpdateConfigListing": "createUpdateConfigListing"; }, never, never, false, never>;
477
548
  }
@@ -1,14 +1,15 @@
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 "./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";
4
+ import * as i3 from "./directives/cellHost.directive";
5
+ import * as i4 from "./directives/cell-render-init.directive";
6
+ import * as i5 from "@angular/common";
7
+ import * as i6 from "@angular/forms";
8
+ import * as i7 from "@angular/cdk/drag-drop";
9
+ import * as i8 from "ng-inline-svg";
10
+ import * as i9 from "@angular/cdk/scrolling";
10
11
  export declare class DataGridModule {
11
12
  static ɵfac: i0.ɵɵFactoryDeclaration<DataGridModule, never>;
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]>;
13
+ static ɵmod: i0.ɵɵNgModuleDeclaration<DataGridModule, [typeof i1.DataGridComponent, typeof i2.FilterPipe, typeof i3.CellHostDirective, typeof i4.CellRenderInitDirective], [typeof i5.CommonModule, typeof i6.FormsModule, typeof i7.DragDropModule, typeof i8.InlineSVGModule, typeof i9.ScrollingModule], [typeof i1.DataGridComponent]>;
13
14
  static ɵinj: i0.ɵɵInjectorDeclaration<DataGridModule>;
14
15
  }
@@ -0,0 +1,14 @@
1
+ import { OnInit, ViewContainerRef, Injector, Type } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class CellRenderInitDirective implements OnInit {
4
+ private vcr;
5
+ private injector;
6
+ componentType: Type<any>;
7
+ rowData: any;
8
+ colData: any;
9
+ cellValue: any;
10
+ constructor(vcr: ViewContainerRef, injector: Injector);
11
+ ngOnInit(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<CellRenderInitDirective, never>;
13
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CellRenderInitDirective, "[cellRenderInit]", never, { "componentType": { "alias": "cellRenderInit"; "required": false; }; "rowData": { "alias": "rowData"; "required": false; }; "colData": { "alias": "colData"; "required": false; }; "cellValue": { "alias": "cellValue"; "required": false; }; }, {}, never, never, false, never>;
14
+ }
@@ -0,0 +1,8 @@
1
+ import { ViewContainerRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class CellHostDirective {
4
+ viewContainerRef: ViewContainerRef;
5
+ constructor(viewContainerRef: ViewContainerRef);
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<CellHostDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CellHostDirective, "[cellHost]", never, {}, {}, never, never, false, never>;
8
+ }
@@ -0,0 +1,24 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class ExportService {
3
+ constructor();
4
+ /**
5
+ * Exports data to CSV or Excel.
6
+ * @param columns List of column definitions (each having name/key/is_visible)
7
+ * @param data The array of data objects
8
+ * @param fileName Name of the exported file (without extension)
9
+ * @param format 'csv' | 'xlsx'
10
+ */
11
+ exportData(columns: any[], data: any[], fileName: string, format?: 'csv' | 'xlsx', rowSelectedIndexes?: Set<number> | null, styleConfig?: {
12
+ headerBgColor?: string;
13
+ headerTextColor?: string;
14
+ bodyTextColor?: string;
15
+ fontFamily?: string;
16
+ fontWeight?: 'normal' | 'bold';
17
+ zoomScale?: number;
18
+ headerRowHeight?: number;
19
+ selectedRowBgColor?: string;
20
+ }): void;
21
+ private getNestedValue;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<ExportService, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<ExportService>;
24
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ms-data-grid",
3
- "version": "0.0.46",
3
+ "version": "0.0.48",
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,7 +26,13 @@
26
26
  "@angular/core": "^16.2.0"
27
27
  },
28
28
  "dependencies": {
29
- "tslib": "^2.3.0"
29
+ "xlsx-js-style": "^1.2.0",
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"
30
36
  },
31
37
  "sideEffects": false,
32
38
  "module": "fesm2022/ms-data-grid.mjs",
package/public-api.d.ts CHANGED
@@ -1,4 +1,2 @@
1
- export * from './lib/data-grid.service';
2
1
  export * from './lib/data-grid.module';
3
2
  export * from './lib/data-grid/data-grid.component';
4
- export * from './lib/directives/draggable-header.directive';
@@ -1,14 +0,0 @@
1
- import { Injectable } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export class DataGridService {
4
- constructor() { }
5
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataGridService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
6
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataGridService, providedIn: 'root' }); }
7
- }
8
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataGridService, decorators: [{
9
- type: Injectable,
10
- args: [{
11
- providedIn: 'root'
12
- }]
13
- }], ctorParameters: function () { return []; } });
14
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YS1ncmlkLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9kYXRhLWdyaWQvc3JjL2xpYi9kYXRhLWdyaWQuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDOztBQUszQyxNQUFNLE9BQU8sZUFBZTtJQUUxQixnQkFBZ0IsQ0FBQzsrR0FGTixlQUFlO21IQUFmLGVBQWUsY0FGZCxNQUFNOzs0RkFFUCxlQUFlO2tCQUgzQixVQUFVO21CQUFDO29CQUNWLFVBQVUsRUFBRSxNQUFNO2lCQUNuQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuXHJcbkBJbmplY3RhYmxlKHtcclxuICBwcm92aWRlZEluOiAncm9vdCdcclxufSlcclxuZXhwb3J0IGNsYXNzIERhdGFHcmlkU2VydmljZSB7XHJcblxyXG4gIGNvbnN0cnVjdG9yKCkgeyB9XHJcbn1cclxuIl19