@cauca-911/datagrid 22.2.2 → 22.2.3
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/README.md +27 -5
- package/fesm2022/cauca-911-datagrid.mjs +54 -31
- package/fesm2022/cauca-911-datagrid.mjs.map +1 -1
- package/package.json +1 -1
- package/types/cauca-911-datagrid.d.ts +15 -11
package/package.json
CHANGED
|
@@ -52,6 +52,13 @@ declare abstract class BaseGridColumnComponent implements OnDestroy, OnInit {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
type GridExportFormat = 'excel' | 'pdf';
|
|
55
|
+
declare const ALL_EXPORT_FORMATS: readonly GridExportFormat[];
|
|
56
|
+
interface ExportMatrix {
|
|
57
|
+
headers: string[];
|
|
58
|
+
rows: ExportCell[][];
|
|
59
|
+
}
|
|
60
|
+
declare const GRID_OWNED_COLUMNS: readonly string[];
|
|
61
|
+
declare function buildExportMatrix(columnOrder: readonly string[], columns: readonly BaseGridColumnComponent[], rows: readonly Record<string, unknown>[]): ExportMatrix;
|
|
55
62
|
|
|
56
63
|
declare class DataGridHeaderComponent implements OnInit, OnDestroy {
|
|
57
64
|
filterControl: FormControl<string>;
|
|
@@ -62,6 +69,7 @@ declare class DataGridHeaderComponent implements OnInit, OnDestroy {
|
|
|
62
69
|
readonly showAddButton: _angular_core.InputSignal<boolean>;
|
|
63
70
|
readonly showRefreshButton: _angular_core.InputSignal<boolean>;
|
|
64
71
|
readonly showExportButton: _angular_core.InputSignal<boolean>;
|
|
72
|
+
readonly exportFormats: _angular_core.InputSignal<readonly GridExportFormat[]>;
|
|
65
73
|
readonly addButtonLabel: _angular_core.InputSignal<string>;
|
|
66
74
|
readonly searchPlaceholder: _angular_core.InputSignal<string>;
|
|
67
75
|
readonly disableAddButton: _angular_core.InputSignal<boolean>;
|
|
@@ -76,7 +84,7 @@ declare class DataGridHeaderComponent implements OnInit, OnDestroy {
|
|
|
76
84
|
clearSearchValue(): void;
|
|
77
85
|
onAddButtonClick(): void;
|
|
78
86
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DataGridHeaderComponent, never>;
|
|
79
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DataGridHeaderComponent, "cauca-data-grid-header", never, { "showAddButton": { "alias": "showAddButton"; "required": false; "isSignal": true; }; "showRefreshButton": { "alias": "showRefreshButton"; "required": false; "isSignal": true; }; "showExportButton": { "alias": "showExportButton"; "required": false; "isSignal": true; }; "addButtonLabel": { "alias": "addButtonLabel"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "disableAddButton": { "alias": "disableAddButton"; "required": false; "isSignal": true; }; }, { "filterChange": "filterChange"; "addButtonClick": "addButtonClick"; "refreshRequest": "refreshRequest"; "exportRequest": "exportRequest"; }, never, ["[filterRow]"], true, never>;
|
|
87
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DataGridHeaderComponent, "cauca-data-grid-header", never, { "showAddButton": { "alias": "showAddButton"; "required": false; "isSignal": true; }; "showRefreshButton": { "alias": "showRefreshButton"; "required": false; "isSignal": true; }; "showExportButton": { "alias": "showExportButton"; "required": false; "isSignal": true; }; "exportFormats": { "alias": "exportFormats"; "required": false; "isSignal": true; }; "addButtonLabel": { "alias": "addButtonLabel"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "disableAddButton": { "alias": "disableAddButton"; "required": false; "isSignal": true; }; }, { "filterChange": "filterChange"; "addButtonClick": "addButtonClick"; "refreshRequest": "refreshRequest"; "exportRequest": "exportRequest"; }, never, ["[filterRow]"], true, never>;
|
|
80
88
|
}
|
|
81
89
|
|
|
82
90
|
declare enum Density {
|
|
@@ -120,6 +128,8 @@ declare abstract class BaseDataGridComponent implements AfterContentInit {
|
|
|
120
128
|
readonly allowExport: _angular_core.InputSignal<boolean>;
|
|
121
129
|
readonly exportFileName: _angular_core.InputSignal<string>;
|
|
122
130
|
readonly exportRows: _angular_core.InputSignal<() => Promise<unknown[]>>;
|
|
131
|
+
readonly exportFormats: _angular_core.InputSignal<readonly GridExportFormat[]>;
|
|
132
|
+
readonly canExport: _angular_core.Signal<boolean>;
|
|
123
133
|
readonly addButtonClick: _angular_core.OutputEmitterRef<void>;
|
|
124
134
|
expandedElement: _angular_core.WritableSignal<any>;
|
|
125
135
|
header: DataGridHeaderComponent;
|
|
@@ -162,7 +172,7 @@ declare abstract class BaseDataGridComponent implements AfterContentInit {
|
|
|
162
172
|
protected applyColumns(): void;
|
|
163
173
|
private removeMandatoryColumns;
|
|
164
174
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseDataGridComponent, never>;
|
|
165
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BaseDataGridComponent, "ng-component", never, { "resourceName": { "alias": "resourceName"; "required": true; "isSignal": true; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; "isSignal": true; }; "showAddButton": { "alias": "showAddButton"; "required": false; "isSignal": true; }; "disableAddButton": { "alias": "disableAddButton"; "required": false; "isSignal": true; }; "addButtonLabel": { "alias": "addButtonLabel"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "searchableColumns": { "alias": "searchableColumns"; "required": false; "isSignal": true; }; "showTableOptions": { "alias": "showTableOptions"; "required": false; "isSignal": true; }; "showColumnViewer": { "alias": "showColumnViewer"; "required": false; "isSignal": true; }; "showPaginator": { "alias": "showPaginator"; "required": false; "isSignal": true; }; "hidePageSize": { "alias": "hidePageSize"; "required": false; "isSignal": true; }; "showExpandButton": { "alias": "showExpandButton"; "required": false; "isSignal": true; }; "allowExport": { "alias": "allowExport"; "required": false; "isSignal": true; }; "exportFileName": { "alias": "exportFileName"; "required": false; "isSignal": true; }; "exportRows": { "alias": "exportRows"; "required": false; "isSignal": true; }; }, { "addButtonClick": "addButtonClick"; }, ["headerRowDef", "footerRowDef", "noDataRow", "regularColumns", "columnDefs", "rowDefs"], never, true, never>;
|
|
175
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<BaseDataGridComponent, "ng-component", never, { "resourceName": { "alias": "resourceName"; "required": true; "isSignal": true; }; "displayedColumns": { "alias": "displayedColumns"; "required": false; "isSignal": true; }; "showAddButton": { "alias": "showAddButton"; "required": false; "isSignal": true; }; "disableAddButton": { "alias": "disableAddButton"; "required": false; "isSignal": true; }; "addButtonLabel": { "alias": "addButtonLabel"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "searchableColumns": { "alias": "searchableColumns"; "required": false; "isSignal": true; }; "showTableOptions": { "alias": "showTableOptions"; "required": false; "isSignal": true; }; "showColumnViewer": { "alias": "showColumnViewer"; "required": false; "isSignal": true; }; "showPaginator": { "alias": "showPaginator"; "required": false; "isSignal": true; }; "hidePageSize": { "alias": "hidePageSize"; "required": false; "isSignal": true; }; "showExpandButton": { "alias": "showExpandButton"; "required": false; "isSignal": true; }; "allowExport": { "alias": "allowExport"; "required": false; "isSignal": true; }; "exportFileName": { "alias": "exportFileName"; "required": false; "isSignal": true; }; "exportRows": { "alias": "exportRows"; "required": false; "isSignal": true; }; "exportFormats": { "alias": "exportFormats"; "required": false; "isSignal": true; }; }, { "addButtonClick": "addButtonClick"; }, ["headerRowDef", "footerRowDef", "noDataRow", "regularColumns", "columnDefs", "rowDefs"], never, true, never>;
|
|
166
176
|
}
|
|
167
177
|
|
|
168
178
|
declare class DataGridComponent extends BaseDataGridComponent implements AfterContentInit, AfterViewInit {
|
|
@@ -351,17 +361,11 @@ declare class GridStateRestorationService {
|
|
|
351
361
|
*/
|
|
352
362
|
declare function provideGridStateRestoration(): EnvironmentProviders;
|
|
353
363
|
|
|
354
|
-
interface ExportMatrix {
|
|
355
|
-
headers: string[];
|
|
356
|
-
rows: ExportCell[][];
|
|
357
|
-
}
|
|
358
|
-
declare const GRID_OWNED_COLUMNS: readonly string[];
|
|
359
|
-
declare function buildExportMatrix(columnOrder: readonly string[], columns: readonly BaseGridColumnComponent[], rows: readonly Record<string, unknown>[]): ExportMatrix;
|
|
360
|
-
|
|
361
364
|
declare class GridExportService {
|
|
362
365
|
private readonly locale;
|
|
363
366
|
toExcel(matrix: ExportMatrix, fileName: string): Promise<void>;
|
|
364
367
|
toPdf(matrix: ExportMatrix, fileName: string): Promise<void>;
|
|
368
|
+
private load;
|
|
365
369
|
private stringify;
|
|
366
370
|
private download;
|
|
367
371
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GridExportService, never>;
|
|
@@ -523,5 +527,5 @@ interface CaucaGridOptions {
|
|
|
523
527
|
declare const PREFERENCE_SERVICE_TOKEN: InjectionToken<BasePreferenceService>;
|
|
524
528
|
declare function provideCaucaGrid(options?: CaucaGridOptions): (Provider | EnvironmentProviders);
|
|
525
529
|
|
|
526
|
-
export { BaseGridColumnComponent, ColorDataGridColumnComponent, DataGridCheckColumnComponent, DataGridColumnComponent, DataGridCommandIconColumnComponent, DataGridCommandsColumnComponent, DataGridComponent, DataGridHeaderComponent, DataGridIconColumnComponent, DataGridMenuColumnComponent, DataGridRowDropEvent, DateGridColumnComponent, Density, GRID_OWNED_COLUMNS, GridConfiguration, GridExportService, GridStateRestorationService, OdataGridComponent, OdataListingService, PREFERENCE_SERVICE_TOKEN, Preference, SortableDataGridCheckColumnComponent, SortableDataGridColumnComponent, TimeSpanDataGridColumnComponent, TranslationGridColumnComponent, buildExportMatrix, emptyQueryParams, fromQueryParams, paramsEqual, provideCaucaGrid, provideGridStateRestoration, toQueryParams };
|
|
527
|
-
export type { BasePreferenceService, CaucaGridOptions, ExportCell, ExportMatrix, GridUrlState, Paginator, Sort };
|
|
530
|
+
export { ALL_EXPORT_FORMATS, BaseGridColumnComponent, ColorDataGridColumnComponent, DataGridCheckColumnComponent, DataGridColumnComponent, DataGridCommandIconColumnComponent, DataGridCommandsColumnComponent, DataGridComponent, DataGridHeaderComponent, DataGridIconColumnComponent, DataGridMenuColumnComponent, DataGridRowDropEvent, DateGridColumnComponent, Density, GRID_OWNED_COLUMNS, GridConfiguration, GridExportService, GridStateRestorationService, OdataGridComponent, OdataListingService, PREFERENCE_SERVICE_TOKEN, Preference, SortableDataGridCheckColumnComponent, SortableDataGridColumnComponent, TimeSpanDataGridColumnComponent, TranslationGridColumnComponent, buildExportMatrix, emptyQueryParams, fromQueryParams, paramsEqual, provideCaucaGrid, provideGridStateRestoration, toQueryParams };
|
|
531
|
+
export type { BasePreferenceService, CaucaGridOptions, ExportCell, ExportMatrix, GridExportFormat, GridUrlState, Paginator, Sort };
|