eru-grid 0.0.36 → 0.0.38
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/fesm2022/eru-grid.mjs +107 -2
- package/fesm2022/eru-grid.mjs.map +1 -1
- package/package.json +1 -1
- package/types/eru-grid.d.ts +106 -1
package/package.json
CHANGED
package/types/eru-grid.d.ts
CHANGED
|
@@ -69,6 +69,26 @@ interface GridFeatures {
|
|
|
69
69
|
actionColumnPosition?: 'before' | 'after';
|
|
70
70
|
designMode?: boolean;
|
|
71
71
|
groupBar?: boolean;
|
|
72
|
+
excel_download?: boolean;
|
|
73
|
+
response_key?: string;
|
|
74
|
+
header_fill_color?: string[];
|
|
75
|
+
header_fill_type?: string;
|
|
76
|
+
header_fill_pattern?: number;
|
|
77
|
+
header_font_family?: string;
|
|
78
|
+
header_font_size?: number;
|
|
79
|
+
header_font_bold?: boolean;
|
|
80
|
+
header_border_type?: string;
|
|
81
|
+
header_border_color?: string;
|
|
82
|
+
header_border_style?: number;
|
|
83
|
+
data_fill_color?: string[];
|
|
84
|
+
data_fill_type?: string;
|
|
85
|
+
data_fill_pattern?: number;
|
|
86
|
+
data_font_family?: string;
|
|
87
|
+
data_font_size?: number;
|
|
88
|
+
data_font_bold?: boolean;
|
|
89
|
+
data_border_type?: string;
|
|
90
|
+
data_border_color?: string;
|
|
91
|
+
data_border_style?: number;
|
|
72
92
|
wrapHeaders?: boolean;
|
|
73
93
|
headerRowHeight?: number;
|
|
74
94
|
dataRowHeight?: number;
|
|
@@ -76,6 +96,66 @@ interface GridFeatures {
|
|
|
76
96
|
boardCardHoverBg?: string;
|
|
77
97
|
boardCardSelectedBg?: string;
|
|
78
98
|
boardCardSelectedOutline?: string;
|
|
99
|
+
boardColumnMinWidth?: number;
|
|
100
|
+
boardColumnHeight?: number;
|
|
101
|
+
}
|
|
102
|
+
interface ExcelDownloadPayload {
|
|
103
|
+
columns: Record<string, {
|
|
104
|
+
headers: Record<string, {
|
|
105
|
+
max_width: number;
|
|
106
|
+
sub_total: boolean;
|
|
107
|
+
header_label: string;
|
|
108
|
+
header_name: string;
|
|
109
|
+
}>;
|
|
110
|
+
}>;
|
|
111
|
+
excel_styles: Record<string, {
|
|
112
|
+
header_style: {
|
|
113
|
+
fill: {
|
|
114
|
+
color: string[];
|
|
115
|
+
type: string;
|
|
116
|
+
pattern: number;
|
|
117
|
+
};
|
|
118
|
+
font: {
|
|
119
|
+
family: string;
|
|
120
|
+
size: number;
|
|
121
|
+
bold: boolean;
|
|
122
|
+
};
|
|
123
|
+
border: [{
|
|
124
|
+
type: string;
|
|
125
|
+
color: string;
|
|
126
|
+
style: number;
|
|
127
|
+
}];
|
|
128
|
+
};
|
|
129
|
+
data_style: {
|
|
130
|
+
fill: {
|
|
131
|
+
color: string[];
|
|
132
|
+
type: string;
|
|
133
|
+
pattern: number;
|
|
134
|
+
};
|
|
135
|
+
font: {
|
|
136
|
+
family: string;
|
|
137
|
+
size: number;
|
|
138
|
+
bold: boolean;
|
|
139
|
+
};
|
|
140
|
+
border: [{
|
|
141
|
+
type: string;
|
|
142
|
+
color: string;
|
|
143
|
+
style: number;
|
|
144
|
+
}];
|
|
145
|
+
};
|
|
146
|
+
}>;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Descriptor enqueued by the grid when the excel-download icon is clicked.
|
|
150
|
+
* Consumers listen to EruGridStore.excelDownloadRequest() the same way they
|
|
151
|
+
* already listen to requestQueue()/dynamicDataRequest() — same
|
|
152
|
+
* enqueue/drain/remove pattern, not a one-off output event — and remove the
|
|
153
|
+
* request via EruGridStore.removeExcelDownloadRequest(id) once the file has
|
|
154
|
+
* been fetched and downloaded.
|
|
155
|
+
*/
|
|
156
|
+
interface ExcelDownloadRequest extends ExcelDownloadPayload {
|
|
157
|
+
id: number;
|
|
158
|
+
timestamp: number;
|
|
79
159
|
}
|
|
80
160
|
interface GridStyles {
|
|
81
161
|
subTotalStyle?: 'bold' | 'italic' | 'highlighted';
|
|
@@ -606,6 +686,7 @@ declare class EruGridStore {
|
|
|
606
686
|
private readonly _sortColumns;
|
|
607
687
|
private readonly _dataRequest;
|
|
608
688
|
private readonly _requestQueue;
|
|
689
|
+
private readonly _excelDownloadRequest;
|
|
609
690
|
private readonly _selectedDesignColumn;
|
|
610
691
|
readonly selectedDesignColumn: _angular_core.Signal<string | null>;
|
|
611
692
|
private readonly _columnDesignUpdate;
|
|
@@ -643,6 +724,7 @@ declare class EruGridStore {
|
|
|
643
724
|
readonly dataRequest: _angular_core.Signal<RowDataRequest | null>;
|
|
644
725
|
readonly dynamicDataRequest: _angular_core.Signal<DynamicDataRequest[] | null>;
|
|
645
726
|
readonly dynamicData: _angular_core.Signal<Map<string, any> | null>;
|
|
727
|
+
readonly excelDownloadRequest: _angular_core.Signal<ExcelDownloadRequest[]>;
|
|
646
728
|
readonly selectedRows: _angular_core.Signal<Row[]>;
|
|
647
729
|
readonly totalSelectedCount: _angular_core.Signal<number>;
|
|
648
730
|
readonly hasSelection: _angular_core.Signal<boolean>;
|
|
@@ -779,6 +861,16 @@ declare class EruGridStore {
|
|
|
779
861
|
* Clear all requests from queue
|
|
780
862
|
*/
|
|
781
863
|
clearRequestQueue(): void;
|
|
864
|
+
/**
|
|
865
|
+
* Enqueue an excel-download request (called by the grid component when the
|
|
866
|
+
* excel-download icon is clicked).
|
|
867
|
+
*/
|
|
868
|
+
addExcelDownloadRequest(request: ExcelDownloadRequest): void;
|
|
869
|
+
/**
|
|
870
|
+
* Remove an excel-download request from the queue (called by the consumer
|
|
871
|
+
* once it has fetched and downloaded the file for that request).
|
|
872
|
+
*/
|
|
873
|
+
removeExcelDownloadRequest(id: number): void;
|
|
782
874
|
/**
|
|
783
875
|
* Clear the data request signal (called by consumer after handling)
|
|
784
876
|
*/
|
|
@@ -1044,6 +1136,18 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1044
1136
|
group?: RowGroup;
|
|
1045
1137
|
}>;
|
|
1046
1138
|
emitRowSelect(row: Row, mode: 'table' | 'board', group?: RowGroup): void;
|
|
1139
|
+
/**
|
|
1140
|
+
* Fires when the user clicks the excel download icon (shown when
|
|
1141
|
+
* `config.excel_download` is enabled). Enqueues an ExcelDownloadRequest
|
|
1142
|
+
* onto gridStore.excelDownloadRequest() — the same enqueue/drain/remove
|
|
1143
|
+
* pattern already used for row-data pagination (requestQueue) and cell
|
|
1144
|
+
* option-lists (dynamicDataRequest) — rather than a one-off output event.
|
|
1145
|
+
* The consumer's effect drains the queue, performs its own entity/query
|
|
1146
|
+
* fetch (the library never makes HTTP calls itself), and removes the
|
|
1147
|
+
* request via gridStore.removeExcelDownloadRequest(id) once done.
|
|
1148
|
+
*/
|
|
1149
|
+
onExcelDownloadClick(event: Event): void;
|
|
1150
|
+
private buildExcelDownloadPayload;
|
|
1047
1151
|
/** Whether a board card is the active (last-clicked) one. Compared by row
|
|
1048
1152
|
* reference so it works for entity and query data alike. */
|
|
1049
1153
|
isBoardCardActive(row: Row): boolean;
|
|
@@ -1078,6 +1182,7 @@ declare class EruGridComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1078
1182
|
isSortable: _angular_core.Signal<boolean>;
|
|
1079
1183
|
showSortBar: _angular_core.Signal<boolean>;
|
|
1080
1184
|
showGroupBar: _angular_core.Signal<boolean>;
|
|
1185
|
+
showExcelDownload: _angular_core.Signal<boolean>;
|
|
1081
1186
|
wrapHeaders: _angular_core.Signal<boolean>;
|
|
1082
1187
|
headerRowHeight: _angular_core.Signal<number>;
|
|
1083
1188
|
dataRowHeight: _angular_core.Signal<number>;
|
|
@@ -2305,4 +2410,4 @@ declare class ThemeToggleComponent {
|
|
|
2305
2410
|
}
|
|
2306
2411
|
|
|
2307
2412
|
export { AttachmentComponent, CheckboxComponent, ColumnConstraintsService, CurrencyComponent, CustomVirtualScrollStrategy, DATA_TYPES, DateComponent, DatetimeComponent, DurationComponent, EmailComponent, EruGridComponent, EruGridService, EruGridStore, LocationComponent, MATERIAL_MODULES, MATERIAL_PROVIDERS, NumberComponent, PRESET_CONFIG_DEFAULTS, PRESET_MANAGED_FIELDS, PeopleComponent, PhoneComponent, PriorityComponent, ProgressComponent, RatingComponent, SelectComponent, StatusComponent, TagComponent, TextareaComponent, TextboxComponent, ThemeService, ThemeToggleComponent, WebsiteComponent };
|
|
2308
|
-
export type { ActionClick, AggregationFunction, AttachmentConfig, BoardCardContext, CellValueChange, ColumnReorder, ColumnResize, ColumnWidthConstraints, CurrencyValidationResult, DataTypes, Drilldown, DurationValue, DynamicDataRequest, EmailValidationResult, Field, GridConfiguration, GridFeatures, GridMode, GridPreset, GridStyles, GridTokens, GroupItem$1 as GroupItem, LocationConfig, LocationValidationResult, NumberValidationResult, PeopleOption, PivotColumnGroupState, PivotColumnHeader, PivotConfiguration, PivotHeaderStructure, PivotMetadata, PivotResult, PivotRow, RatingConfig, Row, RowDataRequest, RowDataResponse, RowGrandTotal, RowGroup, TextareaValidationResult, TextboxValidationResult, Theme, WebsiteValidationResult };
|
|
2413
|
+
export type { ActionClick, AggregationFunction, AttachmentConfig, BoardCardContext, CellValueChange, ColumnReorder, ColumnResize, ColumnWidthConstraints, CurrencyValidationResult, DataTypes, Drilldown, DurationValue, DynamicDataRequest, EmailValidationResult, ExcelDownloadPayload, ExcelDownloadRequest, Field, GridConfiguration, GridFeatures, GridMode, GridPreset, GridStyles, GridTokens, GroupItem$1 as GroupItem, LocationConfig, LocationValidationResult, NumberValidationResult, PeopleOption, PivotColumnGroupState, PivotColumnHeader, PivotConfiguration, PivotHeaderStructure, PivotMetadata, PivotResult, PivotRow, RatingConfig, Row, RowDataRequest, RowDataResponse, RowGrandTotal, RowGroup, TextareaValidationResult, TextboxValidationResult, Theme, WebsiteValidationResult };
|