@colijnit/corecomponents_v12 258.1.6 → 258.1.7

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.
@@ -2,12 +2,14 @@ import { ChangeDetectorRef } from '@angular/core';
2
2
  import { FormMasterService } from '../../core/service/form-master.service';
3
3
  import { BaseSimpleGridComponent } from './base-simple-grid.component';
4
4
  import { ColumnAlign } from './simple-grid-column.directive';
5
- import { CoreComponentsIcon } from "../../core/enum/core-components-icon.enum";
6
- import { IconCacheService } from "../icon/icon-cache.service";
5
+ import { CoreComponentsIcon } from '../../core/enum/core-components-icon.enum';
6
+ import { IconCacheService } from '../icon/icon-cache.service';
7
+ import { ExcelExportService } from '../../service/excel-export.service';
7
8
  export declare class SimpleGridComponent extends BaseSimpleGridComponent {
8
9
  icons: IconCacheService;
9
10
  private _changeDetection;
10
11
  private _formMaster;
12
+ private excelExportService;
11
13
  readonly defaultTextAlign: ColumnAlign;
12
14
  set headerCells(cells: any);
13
15
  showAdd: boolean;
@@ -36,12 +38,10 @@ export declare class SimpleGridComponent extends BaseSimpleGridComponent {
36
38
  readonly Icons: typeof CoreComponentsIcon;
37
39
  private _doubleClicked;
38
40
  private _newRow;
39
- constructor(icons: IconCacheService, _changeDetection: ChangeDetectorRef, _formMaster: FormMasterService);
41
+ constructor(icons: IconCacheService, _changeDetection: ChangeDetectorRef, _formMaster: FormMasterService, excelExportService: ExcelExportService);
40
42
  handleClickOutsideRow(): void;
41
43
  getIsRowDisabled(idx: number): boolean;
42
44
  isRowDisabled(row: any, index: number): Promise<boolean>;
43
- isSingleColumn(column: any): boolean;
44
- rowContainsSingleColumn(row: any, columns: any): boolean;
45
45
  addNewRow(): Promise<void>;
46
46
  validateAndSave(stopediting?: boolean): boolean;
47
47
  cancelEditRow(): void;
@@ -55,7 +55,6 @@ export declare class SimpleGridComponent extends BaseSimpleGridComponent {
55
55
  toggleColumnMenu(col: any): void;
56
56
  hideColumn(col: any): void;
57
57
  sortColumn(col: any, columnValue: string): void;
58
- private _sortData;
59
58
  showAllColumns(): void;
60
59
  exportToExcel(): void;
61
60
  protected prepareDataRow(row: any, index: number): void;
@@ -189,15 +189,12 @@
189
189
  justify-content: flex-start;
190
190
  }
191
191
  .grid-settings {
192
- display: flex;
193
- justify-content: flex-end;
194
- position: relative;
195
- padding-bottom: 4px;
196
- box-shadow: inset 0 -2px $cc-color-grid-row-hover-background;
197
- border: none;
192
+ position: absolute;
193
+ right: 0;
194
+ top: 0;
198
195
 
199
196
  co-button {
200
- margin-top: -4px;
197
+ height: 30px;
201
198
  cursor: pointer;
202
199
 
203
200
  &.selected {
@@ -237,7 +234,7 @@
237
234
  .settings-menu,
238
235
  .column-menu {
239
236
  position: absolute;
240
- top: 42px;
237
+ top: 38px;
241
238
  right: 4px;
242
239
  width: 250px;
243
240
  padding: 0 8px 8px;
@@ -0,0 +1,44 @@
1
+ export interface ExportColumn {
2
+ key: string;
3
+ header: string;
4
+ width?: number;
5
+ }
6
+ export declare class ExcelExportService {
7
+ /**
8
+ * Export data to Excel file
9
+ * @param data - Array of objects to export
10
+ * @param columns - Column configuration (optional)
11
+ * @param fileName - Name of the exported file
12
+ * @param sheetName - Name of the Excel sheet
13
+ */
14
+ exportToExcel(data: any[], columns?: ExportColumn[], fileName?: string, sheetName?: string): void;
15
+ /**
16
+ * Export multiple sheets to one Excel file
17
+ * @param sheets - Array of sheet data
18
+ * @param fileName - Name of the exported file
19
+ */
20
+ exportMultipleSheets(sheets: Array<{
21
+ data: any[];
22
+ columns?: ExportColumn[];
23
+ sheetName: string;
24
+ }>, fileName?: string): void;
25
+ /**
26
+ * Export HTML table to Excel
27
+ * @param tableId - ID of the HTML table element
28
+ * @param fileName - Name of the exported file
29
+ * @param sheetName - Name of the Excel sheet
30
+ */
31
+ exportTableToExcel(tableId: string, fileName?: string, sheetName?: string): void;
32
+ /**
33
+ * Get nested object value using dot notation
34
+ * @param obj - Object to search in
35
+ * @param path - Dot notation path (e.g., 'user.address.city')
36
+ */
37
+ private getNestedValue;
38
+ /**
39
+ * Format date for Excel export
40
+ * @param date - Date to format
41
+ * @param format - Format string (default: 'MM/DD/YYYY')
42
+ */
43
+ formatDateForExport(date: Date | string, format?: string): string;
44
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@colijnit/corecomponents_v12",
3
- "version": "258.1.6",
3
+ "version": "258.1.7",
4
4
  "description": "Colijn IT core components for Angular 12",
5
5
  "private": false,
6
6
  "peerDependencies": {