@colijnit/corecomponents_v12 258.1.5 → 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.
- package/bundles/colijnit-corecomponents_v12.umd.js +200 -92
- 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/simple-grid/simple-grid.component.js +190 -201
- package/esm2015/lib/core/enum/core-components-icon.enum.js +3 -1
- package/esm2015/lib/core/model/core-components-icon-svg.js +3 -1
- package/esm2015/lib/service/excel-export.service.js +125 -0
- package/fesm2015/colijnit-corecomponents_v12.js +315 -200
- package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
- package/lib/components/simple-grid/simple-grid.component.d.ts +7 -6
- package/lib/components/simple-grid/style/_layout.scss +36 -8
- package/lib/core/enum/core-components-icon.enum.d.ts +2 -0
- 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;
|
|
@@ -17,6 +19,7 @@ export declare class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
17
19
|
showGridSettings: boolean;
|
|
18
20
|
rowsPerPage: number;
|
|
19
21
|
rowDisabledFn: Function;
|
|
22
|
+
showColumnSort: boolean;
|
|
20
23
|
/**
|
|
21
24
|
* Promise function, if provided should return boolean
|
|
22
25
|
*/
|
|
@@ -35,12 +38,10 @@ export declare class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
35
38
|
readonly Icons: typeof CoreComponentsIcon;
|
|
36
39
|
private _doubleClicked;
|
|
37
40
|
private _newRow;
|
|
38
|
-
constructor(icons: IconCacheService, _changeDetection: ChangeDetectorRef, _formMaster: FormMasterService);
|
|
41
|
+
constructor(icons: IconCacheService, _changeDetection: ChangeDetectorRef, _formMaster: FormMasterService, excelExportService: ExcelExportService);
|
|
39
42
|
handleClickOutsideRow(): void;
|
|
40
43
|
getIsRowDisabled(idx: number): boolean;
|
|
41
44
|
isRowDisabled(row: any, index: number): Promise<boolean>;
|
|
42
|
-
isSingleColumn(column: any): boolean;
|
|
43
|
-
rowContainsSingleColumn(row: any, columns: any): boolean;
|
|
44
45
|
addNewRow(): Promise<void>;
|
|
45
46
|
validateAndSave(stopediting?: boolean): boolean;
|
|
46
47
|
cancelEditRow(): void;
|
|
@@ -53,7 +54,7 @@ export declare class SimpleGridComponent extends BaseSimpleGridComponent {
|
|
|
53
54
|
toggleSettingsMenu(): void;
|
|
54
55
|
toggleColumnMenu(col: any): void;
|
|
55
56
|
hideColumn(col: any): void;
|
|
56
|
-
|
|
57
|
+
sortColumn(col: any, columnValue: string): void;
|
|
57
58
|
showAllColumns(): void;
|
|
58
59
|
exportToExcel(): void;
|
|
59
60
|
protected prepareDataRow(row: any, index: number): void;
|
|
@@ -114,6 +114,37 @@
|
|
|
114
114
|
&.with-menu {
|
|
115
115
|
cursor: pointer;
|
|
116
116
|
}
|
|
117
|
+
&.with-sort {
|
|
118
|
+
cursor: pointer;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
.sort-column {
|
|
122
|
+
position: absolute;
|
|
123
|
+
right: 0;
|
|
124
|
+
top: 50%;
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
transform: translateY(-50%);
|
|
127
|
+
background: rgba(255, 255, 255, 0.8);
|
|
128
|
+
opacity: 0;
|
|
129
|
+
visibility: hidden;
|
|
130
|
+
overflow: hidden;
|
|
131
|
+
transition: opacity .3s ease-in-out;
|
|
132
|
+
.co-button {
|
|
133
|
+
width: 20px;
|
|
134
|
+
height: 20px;
|
|
135
|
+
background: transparent;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
.simple-grid-column-header {
|
|
139
|
+
position: relative;
|
|
140
|
+
&:hover {
|
|
141
|
+
.sort-column {
|
|
142
|
+
opacity: 1;
|
|
143
|
+
visibility: visible;
|
|
144
|
+
overflow: visible;
|
|
145
|
+
transition: opacity .3s ease-in-out;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
117
148
|
}
|
|
118
149
|
.simple-grid-column-sizer {
|
|
119
150
|
cursor: col-resize;
|
|
@@ -158,15 +189,12 @@
|
|
|
158
189
|
justify-content: flex-start;
|
|
159
190
|
}
|
|
160
191
|
.grid-settings {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
padding-bottom: 4px;
|
|
165
|
-
box-shadow: inset 0 -2px $cc-color-grid-row-hover-background;
|
|
166
|
-
border: none;
|
|
192
|
+
position: absolute;
|
|
193
|
+
right: 0;
|
|
194
|
+
top: 0;
|
|
167
195
|
|
|
168
196
|
co-button {
|
|
169
|
-
|
|
197
|
+
height: 30px;
|
|
170
198
|
cursor: pointer;
|
|
171
199
|
|
|
172
200
|
&.selected {
|
|
@@ -206,7 +234,7 @@
|
|
|
206
234
|
.settings-menu,
|
|
207
235
|
.column-menu {
|
|
208
236
|
position: absolute;
|
|
209
|
-
top:
|
|
237
|
+
top: 38px;
|
|
210
238
|
right: 4px;
|
|
211
239
|
width: 250px;
|
|
212
240
|
padding: 0 8px 8px;
|
|
@@ -19,6 +19,7 @@ export declare enum CoreComponentsIcon {
|
|
|
19
19
|
ArrowScrollRight = "arrow_scroll_right",
|
|
20
20
|
ArrowScrollUp = "arrow_scroll_up",
|
|
21
21
|
ArrowUp = "arrow_up",
|
|
22
|
+
ArrowUpArrowDown = "arrow_up_arrow_down",
|
|
22
23
|
Article = "article",
|
|
23
24
|
ArticleWithFold = "article_with_fold",
|
|
24
25
|
AsteriskSmall = "asterisk_small",
|
|
@@ -116,6 +117,7 @@ export declare enum CoreComponentsIcon {
|
|
|
116
117
|
GlobalSearch = "global_search",
|
|
117
118
|
Globe = "globe",
|
|
118
119
|
GreaterThan = "greater_than",
|
|
120
|
+
GripDotsVerticalSolid = "grip_dots_vertical_solid",
|
|
119
121
|
Groupby = "groupby",
|
|
120
122
|
Hamburger = "hamburger",
|
|
121
123
|
HandPointer = "hand_pointer",
|
|
@@ -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
|
+
}
|