@colijnit/corecomponents_v12 258.1.6 → 258.1.8
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/bundles/colijnit-corecomponents_v12.umd.js +194 -69
- package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
- package/colijnit-corecomponents_v12.d.ts +17 -16
- package/colijnit-corecomponents_v12.metadata.json +1 -1
- package/esm2015/colijnit-corecomponents_v12.js +18 -17
- package/esm2015/lib/components/grid-toolbar/grid-toolbar.component.js +2 -2
- package/esm2015/lib/components/simple-grid/simple-grid.component.js +147 -122
- package/esm2015/lib/components/simple-grid/simple-grid.module.js +4 -2
- package/esm2015/lib/service/excel-export.service.js +125 -0
- package/fesm2015/colijnit-corecomponents_v12.js +269 -121
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/simple-grid/simple-grid.component.d.ts +9 -6
- package/lib/components/simple-grid/style/_layout.scss +31 -8
- package/lib/service/excel-export.service.d.ts +44 -0
- package/package.json +1 -1
|
@@ -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
|
|
6
|
-
import { IconCacheService } from
|
|
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;
|
|
@@ -34,14 +36,13 @@ export declare class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
34
36
|
sortColumnValue: string;
|
|
35
37
|
sortDirection: 'asc' | 'desc';
|
|
36
38
|
readonly Icons: typeof CoreComponentsIcon;
|
|
39
|
+
hoveredRowIndex: number;
|
|
37
40
|
private _doubleClicked;
|
|
38
41
|
private _newRow;
|
|
39
|
-
constructor(icons: IconCacheService, _changeDetection: ChangeDetectorRef, _formMaster: FormMasterService);
|
|
42
|
+
constructor(icons: IconCacheService, _changeDetection: ChangeDetectorRef, _formMaster: FormMasterService, excelExportService: ExcelExportService);
|
|
40
43
|
handleClickOutsideRow(): void;
|
|
41
44
|
getIsRowDisabled(idx: number): boolean;
|
|
42
45
|
isRowDisabled(row: any, index: number): Promise<boolean>;
|
|
43
|
-
isSingleColumn(column: any): boolean;
|
|
44
|
-
rowContainsSingleColumn(row: any, columns: any): boolean;
|
|
45
46
|
addNewRow(): Promise<void>;
|
|
46
47
|
validateAndSave(stopediting?: boolean): boolean;
|
|
47
48
|
cancelEditRow(): void;
|
|
@@ -55,7 +56,6 @@ export declare class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
55
56
|
toggleColumnMenu(col: any): void;
|
|
56
57
|
hideColumn(col: any): void;
|
|
57
58
|
sortColumn(col: any, columnValue: string): void;
|
|
58
|
-
private _sortData;
|
|
59
59
|
showAllColumns(): void;
|
|
60
60
|
exportToExcel(): void;
|
|
61
61
|
protected prepareDataRow(row: any, index: number): void;
|
|
@@ -77,4 +77,7 @@ export declare class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
77
77
|
setCurrentPage(page: number): void;
|
|
78
78
|
private _detectChanges;
|
|
79
79
|
private _resetEdit;
|
|
80
|
+
get isNewRow(): boolean;
|
|
81
|
+
protected readonly IconCacheService: typeof IconCacheService;
|
|
82
|
+
protected readonly CoreComponentsIcon: typeof CoreComponentsIcon;
|
|
80
83
|
}
|
|
@@ -189,15 +189,12 @@
|
|
|
189
189
|
justify-content: flex-start;
|
|
190
190
|
}
|
|
191
191
|
.grid-settings {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
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
|
-
|
|
197
|
+
height: 30px;
|
|
201
198
|
cursor: pointer;
|
|
202
199
|
|
|
203
200
|
&.selected {
|
|
@@ -224,6 +221,10 @@
|
|
|
224
221
|
opacity: 0.3;
|
|
225
222
|
}
|
|
226
223
|
|
|
224
|
+
.simple-grid-row:hover {
|
|
225
|
+
pointer-events: auto;
|
|
226
|
+
}
|
|
227
|
+
|
|
227
228
|
.cdk-drag-animating {
|
|
228
229
|
transition: transform 200ms cubic-bezier(0, 0, 0.2, 1);
|
|
229
230
|
}
|
|
@@ -237,7 +238,7 @@
|
|
|
237
238
|
.settings-menu,
|
|
238
239
|
.column-menu {
|
|
239
240
|
position: absolute;
|
|
240
|
-
top:
|
|
241
|
+
top: 38px;
|
|
241
242
|
right: 4px;
|
|
242
243
|
width: 250px;
|
|
243
244
|
padding: 0 8px 8px;
|
|
@@ -279,3 +280,25 @@
|
|
|
279
280
|
}
|
|
280
281
|
}
|
|
281
282
|
|
|
283
|
+
.icons-container {
|
|
284
|
+
display: flex;
|
|
285
|
+
justify-content: center;
|
|
286
|
+
align-items: center;
|
|
287
|
+
height: 100%;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.icon-item {
|
|
291
|
+
&:hover {
|
|
292
|
+
cursor: pointer;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
&.icon-edit {
|
|
296
|
+
width: 20px;
|
|
297
|
+
height: 20px;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
&.icon-delete {
|
|
301
|
+
width: 34px;
|
|
302
|
+
height: 34px;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
@@ -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
|
+
}
|