@ruc-lib/grid-list 3.2.0 → 4.0.0

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.
Files changed (31) hide show
  1. package/README.md +48 -22
  2. package/fesm2022/ruc-lib-grid-list.mjs +490 -0
  3. package/fesm2022/ruc-lib-grid-list.mjs.map +1 -0
  4. package/index.d.ts +190 -7
  5. package/package.json +7 -19
  6. package/esm2020/index.mjs +0 -8
  7. package/esm2020/interfaces/toolbar.config.mjs +0 -2
  8. package/esm2020/lib/grid-cards/grid-cards.component.mjs +0 -30
  9. package/esm2020/lib/grid-chart/grid-chart.component.mjs +0 -28
  10. package/esm2020/lib/grid-chart-dialog/grid-chart-dialog.component.mjs +0 -34
  11. package/esm2020/lib/grid-column/grid-column.component.mjs +0 -16
  12. package/esm2020/lib/ruclib-grid-list/ruclib-grid-list.component.mjs +0 -240
  13. package/esm2020/lib/ruclib-grid-list.module.mjs +0 -84
  14. package/esm2020/models/grid-default.config.mjs +0 -22
  15. package/esm2020/models/grid-list-default-data.mjs +0 -72
  16. package/esm2020/ruc-lib-grid-list.mjs +0 -5
  17. package/esm2020/service-ui/grid-list.service.mjs +0 -27
  18. package/fesm2015/ruc-lib-grid-list.mjs +0 -456
  19. package/fesm2015/ruc-lib-grid-list.mjs.map +0 -1
  20. package/fesm2020/ruc-lib-grid-list.mjs +0 -453
  21. package/fesm2020/ruc-lib-grid-list.mjs.map +0 -1
  22. package/interfaces/toolbar.config.d.ts +0 -4
  23. package/lib/grid-cards/grid-cards.component.d.ts +0 -14
  24. package/lib/grid-chart/grid-chart.component.d.ts +0 -13
  25. package/lib/grid-chart-dialog/grid-chart-dialog.component.d.ts +0 -16
  26. package/lib/grid-column/grid-column.component.d.ts +0 -8
  27. package/lib/ruclib-grid-list/ruclib-grid-list.component.d.ts +0 -96
  28. package/lib/ruclib-grid-list.module.d.ts +0 -24
  29. package/models/grid-default.config.d.ts +0 -40
  30. package/models/grid-list-default-data.d.ts +0 -19
  31. package/service-ui/grid-list.service.d.ts +0 -15
package/README.md CHANGED
@@ -14,48 +14,74 @@ npm install @uxpractice/ruc-lib
14
14
 
15
15
  ### Install Individual Component
16
16
 
17
- If you only need the Grid List component:
17
+ If you only need the GridList component:
18
18
 
19
+ **For Angular 15:**
19
20
  ```bash
20
- npm install @ruc-lib/grid-list
21
+ npm install @ruc-lib/grid-list@3.2.0 @angular/material@^15.0.0 @angular/cdk@^15.0.0
21
22
  ```
22
23
 
24
+ **For Angular 16:**
25
+ ```bash
26
+ npm install @ruc-lib/grid-list@3.2.0 @angular/material@^16.0.0 @angular/cdk@^16.0.0
27
+ ```
28
+
29
+ **For Angular 17:**
30
+ ```bash
31
+ npm install @ruc-lib/grid-list@4.0.0 @angular/material@^17.0.0 @angular/cdk@^17.0.0
32
+ ```
33
+
34
+ **For Angular 18:**
35
+ ```bash
36
+ npm install @ruc-lib/grid-list@4.0.0 @angular/material@^18.0.0 @angular/cdk@^18.0.0
37
+ ```
38
+
39
+ **For Angular 19:**
40
+ ```bash
41
+ npm install @ruc-lib/grid-list@4.0.0 @angular/material@^19.0.0 @angular/cdk@^19.0.0
42
+ ```
43
+
44
+ **For Angular 20:**
45
+ ```bash
46
+ npm install @ruc-lib/grid-list@4.0.0
47
+ ```
48
+
49
+ > **Note:** When installing in Angular 15-19 apps, you must specify the matching `@angular/material` and `@angular/cdk` versions to avoid peer dependency conflicts. Angular 20 will automatically use the correct versions.
23
50
 
24
- # Version Compatibility
51
+ ### 📦 Version Compatibility
25
52
 
26
- Please ensure you install the correct version of `@ruc-lib/grid-list` based on your Angular version.
27
-
28
53
  | Angular Version | Compatible `@ruc-lib/grid-list` Version |
29
54
  |--------------------|---------------------------------------------|
30
55
  | 15.x.x | `npm install @ruc-lib/grid-list@^3.2.0` |
31
56
  | 16.x.x | `npm install @ruc-lib/grid-list@^3.2.0` |
57
+ | 17.x.x | `npm install @ruc-lib/grid-list@^4.0.0` |
58
+ | 18.x.x | `npm install @ruc-lib/grid-list@^4.0.0` |
59
+ | 19.x.x | `npm install @ruc-lib/grid-list@^4.0.0` |
60
+ | 20.x.x | `npm install @ruc-lib/grid-list@^4.0.0` |
32
61
 
33
62
 
34
63
  ## Usage
35
64
 
36
- ### 1. Import the Module
37
-
38
- In your Angular module file (e.g., `app.module.ts`), import the `RuclibGridListModule`:
65
+ ### 1. Import the Component
66
+ In your Angular component file (e.g., `app.component.ts`), import the `RuclibGridListComponent`:
39
67
 
40
68
  ```typescript
69
+ import { Component } from '@angular/core';
70
+
41
71
  // For Complete Library
42
- import { RuclibGridListModule } from '@uxpractice/ruc-lib/grid-list';
72
+ import { RuclibGridListComponent } from '@uxpractice/ruc-lib/grid-list';
43
73
 
44
74
  // For Individual Package
45
- import { RuclibGridListModule } from '@ruc-lib/grid-list';
46
-
47
- import { AppComponent } from './app.component';
48
- import { NgModule } from '@angular/core';
49
- import { BrowserModule } from '@angular/platform-browser';
50
- import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
51
-
52
- @NgModule({
53
- declarations: [AppComponent],
54
- imports: [BrowserModule, BrowserAnimationsModule, RuclibGridListModule],
55
- providers: [],
56
- bootstrap: [AppComponent],
75
+ import { RuclibGridListComponent } from '@ruc-lib/grid-list';
76
+
77
+ @Component({
78
+ selector: 'app-root',
79
+ imports: [RuclibGridListComponent],
80
+ templateUrl: './app.component.html',
57
81
  })
58
- export class AppModule {}
82
+ export class AppComponent {
83
+ // Component code here
84
+ }
59
85
  ```
60
86
 
61
87
  ### 2. Use the Component
@@ -0,0 +1,490 @@
1
+ import { SelectionModel } from '@angular/cdk/collections';
2
+ import * as i0 from '@angular/core';
3
+ import { ContentChild, Input, Component, Inject, Injectable, EventEmitter, Output, ContentChildren, ViewChild } from '@angular/core';
4
+ import * as i6 from '@angular/material/table';
5
+ import { MatTableDataSource, MatTableModule } from '@angular/material/table';
6
+ import * as i7 from '@angular/material/paginator';
7
+ import { MatPaginatorModule, MatPaginator } from '@angular/material/paginator';
8
+ import * as i10 from '@angular/material/sort';
9
+ import { MatSortModule, MatSort } from '@angular/material/sort';
10
+ import * as i1 from '@angular/material/dialog';
11
+ import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
12
+ import { trigger, state, transition, style, animate } from '@angular/animations';
13
+ import { Chart } from 'chart.js';
14
+ import { Subject } from 'rxjs';
15
+ import * as i3 from '@angular/common';
16
+ import { CommonModule } from '@angular/common';
17
+ import * as i5 from '@angular/material/form-field';
18
+ import { MatFormFieldModule } from '@angular/material/form-field';
19
+ import * as i4 from '@angular/forms';
20
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
21
+ import * as i8 from '@angular/material/input';
22
+ import { MatInputModule } from '@angular/material/input';
23
+ import * as i2 from '@angular/material/icon';
24
+ import { MatIconModule } from '@angular/material/icon';
25
+ import * as i1$1 from '@angular/material/card';
26
+ import { MatCardModule } from '@angular/material/card';
27
+ import * as i11 from '@angular/material/button';
28
+ import { MatButtonModule } from '@angular/material/button';
29
+ import * as i12 from '@angular/material/checkbox';
30
+ import { MatCheckboxModule } from '@angular/material/checkbox';
31
+ import * as i13 from '@angular/material/tooltip';
32
+ import { MatTooltipModule } from '@angular/material/tooltip';
33
+
34
+ class GridColumnComponent {
35
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: GridColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
36
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: GridColumnComponent, isStandalone: true, selector: "uxp-grid-column", inputs: { name: "name" }, queries: [{ propertyName: "cellTemplate", first: true, predicate: ["cellTemplate"], descendants: true }], ngImport: i0, template: "", styles: [""] }); }
37
+ }
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: GridColumnComponent, decorators: [{
39
+ type: Component,
40
+ args: [{ selector: 'uxp-grid-column', standalone: true, template: "" }]
41
+ }], propDecorators: { name: [{
42
+ type: Input
43
+ }], cellTemplate: [{
44
+ type: ContentChild,
45
+ args: ['cellTemplate']
46
+ }] } });
47
+
48
+ class GridColumnConfig {
49
+ }
50
+ class GridCardConfig {
51
+ }
52
+ class GridCardStyle {
53
+ }
54
+ class GridListActions {
55
+ }
56
+ class GridConfig {
57
+ constructor() {
58
+ this.showFilter = true;
59
+ this.showGridView = true;
60
+ this.pagination = true;
61
+ this.isPaginatedApi = false;
62
+ this.isExpandable = false;
63
+ this.isSelectable = true;
64
+ this.stickyTableHeader = true;
65
+ this.cardStyle = {};
66
+ this.showListView = false;
67
+ }
68
+ }
69
+
70
+ class GridChartComponent {
71
+ constructor() {
72
+ this.index = 0;
73
+ }
74
+ ngAfterViewInit() {
75
+ if (this.chartConfig) {
76
+ this.chart = new Chart('canvas' + this.index, this.chartConfig);
77
+ }
78
+ }
79
+ ngOnDestroy() {
80
+ if (this.chart) {
81
+ this.chart.destroy();
82
+ }
83
+ this.chart = null;
84
+ this.chartConfig = null;
85
+ }
86
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: GridChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
87
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.9", type: GridChartComponent, isStandalone: true, selector: "uxp-grid-chart", inputs: { index: "index", chartConfig: "chartConfig" }, ngImport: i0, template: "<div style=\"position: relative; height:50vh; width:40vw\">\r\n <canvas id=\"canvas{{index}}\">{{chart}}</canvas>\r\n</div>\r\n\r\n", styles: [""] }); }
88
+ }
89
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: GridChartComponent, decorators: [{
90
+ type: Component,
91
+ args: [{ selector: 'uxp-grid-chart', standalone: true, template: "<div style=\"position: relative; height:50vh; width:40vw\">\r\n <canvas id=\"canvas{{index}}\">{{chart}}</canvas>\r\n</div>\r\n\r\n" }]
92
+ }], propDecorators: { index: [{
93
+ type: Input
94
+ }], chartConfig: [{
95
+ type: Input
96
+ }] } });
97
+
98
+ class RucGridChartDialogComponent {
99
+ constructor(dialogRef, data) {
100
+ this.dialogRef = dialogRef;
101
+ this.data = data;
102
+ }
103
+ ngAfterViewInit() {
104
+ this.data.chartConfig.forEach((chartData, index) => {
105
+ const ctx = document.getElementById(`chart${index}`);
106
+ new Chart(ctx, chartData);
107
+ });
108
+ }
109
+ onCancel() {
110
+ this.dialogRef.close(null);
111
+ }
112
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucGridChartDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
113
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: RucGridChartDialogComponent, isStandalone: true, selector: "uxp-grid-chart-dialog", ngImport: i0, template: "<div class=\"chart-container\">\r\n @for (chart of data.chartConfig; track chart; let i = $index) {\r\n <div style=\"position: relative; height:50vh; width:40vw\">\r\n <canvas id=\"chart{{i}}\"></canvas>\r\n </div>\r\n }\r\n</div>\r\n<button mat-button (click)=\"onCancel()\">Cancel</button>", styles: ["::ng-deep .ruc-grid-list-dialog .mat-dialog-container{padding:24px!important}.ruc-grid-list-dialog .mat-dialog-container{padding:24px!important}.chart-container{display:flex}\n"] }); }
114
+ }
115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RucGridChartDialogComponent, decorators: [{
116
+ type: Component,
117
+ args: [{ selector: 'uxp-grid-chart-dialog', standalone: true, template: "<div class=\"chart-container\">\r\n @for (chart of data.chartConfig; track chart; let i = $index) {\r\n <div style=\"position: relative; height:50vh; width:40vw\">\r\n <canvas id=\"chart{{i}}\"></canvas>\r\n </div>\r\n }\r\n</div>\r\n<button mat-button (click)=\"onCancel()\">Cancel</button>", styles: ["::ng-deep .ruc-grid-list-dialog .mat-dialog-container{padding:24px!important}.ruc-grid-list-dialog .mat-dialog-container{padding:24px!important}.chart-container{display:flex}\n"] }]
118
+ }], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
119
+ type: Inject,
120
+ args: [MAT_DIALOG_DATA]
121
+ }] }] });
122
+
123
+ /**
124
+ * This service will handle the tabData
125
+ */
126
+ class GridListService {
127
+ constructor() {
128
+ this.gridChartDetails = new Subject();
129
+ this.gridChartDetails$ = this.gridChartDetails.asObservable();
130
+ }
131
+ /**
132
+ * method for handling the tabData which will have tabData as argument
133
+ */
134
+ sendGridChartData(dataSource) {
135
+ this.gridChartDetails.next(dataSource);
136
+ }
137
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: GridListService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
138
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: GridListService, providedIn: 'root' }); }
139
+ }
140
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: GridListService, decorators: [{
141
+ type: Injectable,
142
+ args: [{
143
+ providedIn: 'root'
144
+ }]
145
+ }], ctorParameters: () => [] });
146
+
147
+ class GridCardsComponent {
148
+ constructor() {
149
+ this.data = [];
150
+ this.config = {};
151
+ }
152
+ ngOnInit() {
153
+ }
154
+ ngAfterViewInit() { }
155
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: GridCardsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
156
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: GridCardsComponent, isStandalone: true, selector: "ruc-grid-cards", inputs: { data: "data", gridItem: "gridItem", config: "config", header: "header" }, ngImport: i0, template: "<mat-card [style]=\"config.style?.card\">\r\n <mat-card-content>\r\n <div class=\"card-top\">\r\n <span>{{gridItem.title}}</span>\r\n <div>\r\n @for (icon of config.actions; track icon) {\r\n <mat-icon [style]=\"config.style?.icon\" (click)=\"icon?.handler($event, gridItem)\">{{icon.icon}}</mat-icon>\r\n }\r\n </div>\r\n\r\n </div>\r\n @for (value of header; track value) {\r\n <div>\r\n @if (value.showInCardView) {\r\n <p>\r\n {{value['header']}} : {{gridItem[value['name']]}}\r\n </p>\r\n }\r\n </div>\r\n }\r\n </mat-card-content>\r\n</mat-card>\r\n\r\n", styles: ["mat-card:hover .card-top div{visibility:visible}mat-card:hover{background-color:#0000000a}.card-top{display:flex;justify-content:space-between}.card-top div mat-icon{cursor:pointer;margin:0 5px;color:orange}.card-top div{visibility:hidden}\n"], dependencies: [{ kind: "ngmodule", type: MatCardModule }, { kind: "component", type: i1$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i1$1.MatCardContent, selector: "mat-card-content" }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
157
+ }
158
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: GridCardsComponent, decorators: [{
159
+ type: Component,
160
+ args: [{ selector: 'ruc-grid-cards', imports: [MatCardModule, MatIconModule], template: "<mat-card [style]=\"config.style?.card\">\r\n <mat-card-content>\r\n <div class=\"card-top\">\r\n <span>{{gridItem.title}}</span>\r\n <div>\r\n @for (icon of config.actions; track icon) {\r\n <mat-icon [style]=\"config.style?.icon\" (click)=\"icon?.handler($event, gridItem)\">{{icon.icon}}</mat-icon>\r\n }\r\n </div>\r\n\r\n </div>\r\n @for (value of header; track value) {\r\n <div>\r\n @if (value.showInCardView) {\r\n <p>\r\n {{value['header']}} : {{gridItem[value['name']]}}\r\n </p>\r\n }\r\n </div>\r\n }\r\n </mat-card-content>\r\n</mat-card>\r\n\r\n", styles: ["mat-card:hover .card-top div{visibility:visible}mat-card:hover{background-color:#0000000a}.card-top{display:flex;justify-content:space-between}.card-top div mat-icon{cursor:pointer;margin:0 5px;color:orange}.card-top div{visibility:hidden}\n"] }]
161
+ }], ctorParameters: () => [], propDecorators: { data: [{
162
+ type: Input
163
+ }], gridItem: [{
164
+ type: Input
165
+ }], config: [{
166
+ type: Input
167
+ }], header: [{
168
+ type: Input
169
+ }] } });
170
+
171
+ class RuclibGridListComponent {
172
+ constructor(dialog, gridListService) {
173
+ this.dialog = dialog;
174
+ this.gridListService = gridListService;
175
+ this.displayedColumns = [];
176
+ this.search = '';
177
+ this.selection = new SelectionModel(true, []);
178
+ this.gridViewData = [];
179
+ this.rowExpanded = new EventEmitter(false);
180
+ this.gridCardConfig = {};
181
+ this.gridConfig = new GridConfig();
182
+ this.customColumnMap = [];
183
+ this.listView = true;
184
+ this.expanded = false;
185
+ this.infoClicked = new EventEmitter();
186
+ this.rucEvent = new EventEmitter();
187
+ }
188
+ ngOnInit() {
189
+ if (this.rucInputData) {
190
+ this.columnConfig = this.rucInputData.columnConfig;
191
+ this.gridConfig = this.rucInputData.gridConfig;
192
+ this.listView = !this.gridConfig.showListView;
193
+ this.currentStateObj = {};
194
+ this.dataSource = new MatTableDataSource(this.inputData);
195
+ this.displayedColumns = this.columnConfig.map((column) => column.name);
196
+ if (this.gridConfig.isSelectable) {
197
+ this.displayedColumns = ['select', ...this.displayedColumns];
198
+ }
199
+ this.columnsToDisplayWithExpand = [...this.displayedColumns, 'expand'];
200
+ if (this.columnConfig) {
201
+ const cardActions = this.columnConfig.filter((x) => x.actionColumn)[0]['action'];
202
+ this.gridCardConfig.actions = cardActions;
203
+ this.gridCardConfig.title = 'transformation';
204
+ this.gridCardConfig.style = this.gridConfig.cardStyle;
205
+ this.gridListService.gridChartDetails$.subscribe((res) => {
206
+ this.dialog.open(RucGridChartDialogComponent, {
207
+ data: {
208
+ chartConfig: res,
209
+ },
210
+ });
211
+ });
212
+ }
213
+ }
214
+ }
215
+ ngAfterViewInit() {
216
+ if (this.dataSource) {
217
+ this.dataSource.paginator = this.paginator;
218
+ this.dataSource.sort = this.sort;
219
+ if (!this.listView) {
220
+ this.createGridViewData();
221
+ }
222
+ }
223
+ }
224
+ ngAfterContentInit() {
225
+ this.cellTemplate.forEach((oColumn) => {
226
+ this.customColumnMap[oColumn.name] = oColumn.cellTemplate;
227
+ });
228
+ }
229
+ /**
230
+ *
231
+ * @param event
232
+ */
233
+ onSortChange(event) {
234
+ this.currentStateObj.sortOrder = event.direction;
235
+ this.currentStateObj.sortBy = event.active;
236
+ this.rucEvent.emit({ eventName: 'sortByColumn', eventOutput: event });
237
+ this.rucEvent.emit({
238
+ eventName: 'currentStateObjChange',
239
+ eventOutput: this.currentStateObj,
240
+ });
241
+ }
242
+ /**
243
+ * Filter Table
244
+ * @param event
245
+ */
246
+ applyFilter(event) {
247
+ const filterValue = event.target.value;
248
+ this.currentStateObj.searchText = filterValue
249
+ ? filterValue.trim().toLowerCase()
250
+ : '';
251
+ this.dataSource.filter = filterValue.trim().toLowerCase();
252
+ this.rucEvent.emit({
253
+ eventName: 'currentStateObjChange',
254
+ eventOutput: this.currentStateObj,
255
+ });
256
+ this.createGridViewData(this.dataSource.filteredData);
257
+ if (this.dataSource.paginator) {
258
+ this.dataSource.paginator.firstPage();
259
+ }
260
+ }
261
+ /**
262
+ * pagination handler
263
+ * @param event
264
+ * @returns
265
+ */
266
+ pageChangeHandler(event) {
267
+ this.createGridViewData();
268
+ if (!this.gridConfig.isPaginatedApi)
269
+ return;
270
+ if (this.gridConfig.isPaginatedApi) {
271
+ this.rucEvent.emit({
272
+ eventName: 'paginatorChange',
273
+ eventOutput: { pageIndex: event },
274
+ });
275
+ }
276
+ this.inputData = this.gridConfig.data;
277
+ this.dataSource = new MatTableDataSource(this.inputData);
278
+ }
279
+ /**
280
+ * Create Grid view
281
+ * @param filteredData
282
+ */
283
+ createGridViewData(filteredData) {
284
+ filteredData = this.search
285
+ ? this.dataSource.filteredData
286
+ : this.dataSource.data;
287
+ const data = this.cloneDeep(filteredData);
288
+ const pageSize = this.dataSource.paginator?.pageSize;
289
+ const currentPageIndex = this.dataSource.paginator?.pageIndex;
290
+ if (pageSize !== undefined && currentPageIndex !== undefined) {
291
+ const start = pageSize * currentPageIndex;
292
+ const end = (currentPageIndex + 1) * pageSize;
293
+ this.gridViewData = data.slice(start, end);
294
+ }
295
+ }
296
+ /**
297
+ *
298
+ * @param data
299
+ * @returns
300
+ */
301
+ cloneDeep(data) {
302
+ return JSON.parse(JSON.stringify(data));
303
+ }
304
+ /**
305
+ *
306
+ * @returns
307
+ */
308
+ isAllSelected() {
309
+ const numSelected = this.selection.selected.length;
310
+ const numRows = this.dataSource.data.length;
311
+ return numSelected === numRows;
312
+ }
313
+ /**
314
+ *
315
+ * @returns
316
+ */
317
+ toggleAllRows() {
318
+ if (this.isAllSelected()) {
319
+ this.selection.clear();
320
+ return;
321
+ }
322
+ this.selection.select(...this.dataSource.data);
323
+ }
324
+ /** The label for the checkbox on the passed row */
325
+ checkboxLabel(row) {
326
+ if (!row) {
327
+ return `${this.isAllSelected() ? 'deselect' : 'select'} all`;
328
+ }
329
+ // return `${this.selection.isSelected(row) ? 'deselect' : 'select'} row ${row.position + 1}`;
330
+ return `${this.selection.isSelected(row) ? 'deselect' : 'select'} row`;
331
+ }
332
+ /**
333
+ *
334
+ * @param i
335
+ * @param expandedElement
336
+ * @param element
337
+ */
338
+ handleClick(i, expandedElement, element) {
339
+ if (expandedElement != element) {
340
+ //expand the row
341
+ this.expanded = false;
342
+ this.rowExpanded.emit({ ...element, isExpanded: false });
343
+ }
344
+ else {
345
+ this.expanded = true;
346
+ this.rowExpanded.emit({ ...element, isExpanded: true });
347
+ }
348
+ }
349
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RuclibGridListComponent, deps: [{ token: i1.MatDialog }, { token: GridListService }], target: i0.ɵɵFactoryTarget.Component }); }
350
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.9", type: RuclibGridListComponent, isStandalone: true, selector: "uxp-ruclib-grid-list", inputs: { columnConfig: "columnConfig", inputData: "inputData", gridConfig: "gridConfig", chartConfig: "chartConfig", customTheme: "customTheme", rucInputData: "rucInputData" }, outputs: { rowExpanded: "rowExpanded", infoClicked: "infoClicked", rucEvent: "rucEvent" }, queries: [{ propertyName: "cellTemplate", predicate: GridColumnComponent }], viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], ngImport: i0, template: "<div class=\"grid-list-container\" class={{customTheme}}>\r\n <div class=\"header-container\">\r\n @if (gridConfig.showFilter) {\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput [(ngModel)]=\"search\" (keyup)=\"applyFilter($event)\" placeholder=\"Search\">\r\n </mat-form-field>\r\n }\r\n\r\n @if (gridConfig.showGridView) {\r\n <div class=\"icon-container\">\r\n <div (click)=\"listView=true\"\r\n [style.background-color]=\"listView ? gridCardConfig.style?.icon.color : 'white'\"\r\n [class.active-icon]=\"listView\" class=\"icon list\">\r\n <mat-icon>view_list</mat-icon>\r\n </div>\r\n <div (click)=\"listView=false;createGridViewData()\"\r\n [style.background-color]=\"!listView ? gridCardConfig.style?.icon.color : 'white'\"\r\n [class.active-icon]=\"!listView\" class=\"icon grid\">\r\n <mat-icon>grid_on</mat-icon>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div [hidden]=\"!listView\" class=\"mat-elevation-z8\" class=\"overflow\">\r\n <table mat-table [dataSource]=\"dataSource\" multiTemplateDataRows matSort (matSortChange)=\"onSortChange($event)\">\r\n @if (gridConfig.isSelectable) {\r\n <ng-container matColumnDef=\"select\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <mat-checkbox color=\"primary\" (change)=\"$event ? toggleAllRows() : null\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\" [aria-label]=\"checkboxLabel()\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox color=\"primary\" (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\"\r\n [aria-label]=\"checkboxLabel(row)\">\r\n </mat-checkbox>\r\n </td>\r\n </ng-container>\r\n }\r\n @for (column of columnConfig; track column) {\r\n <ng-container [matColumnDef]=\"column.name\" [sticky]=\"\">\r\n <!--table headers start-->\r\n <th [ngStyle]=\"column?.headerStyle\" mat-header-cell *matHeaderCellDef mat-sort-header>\r\n {{column.header}} </th>\r\n <!--table headers end-->\r\n <!--table rows start-->\r\n @if (!column.isCustom) {\r\n @if (!column.actionColumn) {\r\n <td #tooltip=\"matTooltip\" matTooltip=\"{{row[column.name]!}}\" mat-cell *matCellDef=\"let row\">\r\n {{row[column.name]!}} </td>\r\n } @else {\r\n <td mat-cell *matCellDef=\"let row\">\r\n <div class=\"icons\">\r\n @for (action of column.action; track action) {\r\n <mat-icon [style]=\"gridCardConfig.style?.icon\"\r\n (click)=\"action?.handler($event, row)\">{{action.icon}}</mat-icon>\r\n }\r\n </div>\r\n </td>\r\n }\r\n <!--table action rows start-->\r\n <ng-template #actionColumn>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <div class=\"icons\">\r\n @for (action of column.action; track action) {\r\n <mat-icon [style]=\"gridCardConfig.style?.icon\"\r\n (click)=\"action?.handler($event, row)\">{{action.icon}}</mat-icon>\r\n }\r\n </div>\r\n </td>\r\n </ng-template>\r\n <!--table action rows end-->\r\n } @else {\r\n <td mat-cell *matCellDef=\"let element\">\r\n <ng-container [ngTemplateOutlet]=\"customColumnMap[column.name]\"\r\n [ngTemplateOutletContext]=\"{element: element}\"></ng-container>\r\n </td>\r\n }\r\n <!--table rows end-->\r\n <!--table custom column start-->\r\n <!--table custom column end-->\r\n </ng-container>\r\n }\r\n\r\n\r\n <ng-container matColumnDef=\"expand\">\r\n <th mat-header-cell *matHeaderCellDef aria-label=\"row actions\">&nbsp;</th>\r\n <td mat-cell *matCellDef=\"let element; let i = index\">\r\n <button mat-icon-button aria-label=\"expand row\"\r\n (click)=\"(expandedElement = expandedElement === element ? null : element); $event.stopPropagation();handleClick(i,expandedElement, element)\">\r\n @if (expandedElement !== element) {\r\n <mat-icon>keyboard_arrow_down</mat-icon>\r\n }\r\n @if (expandedElement === element) {\r\n <mat-icon>keyboard_arrow_up</mat-icon>\r\n }\r\n </button>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"expandedDetail\">\r\n <td mat-cell *matCellDef=\"let element; let i = index\"\r\n [attr.colspan]=\"columnsToDisplayWithExpand.length\">\r\n <div class=\"example-element-detail\"\r\n [@detailExpand]=\"element === expandedElement ? 'expanded' : 'collapsed'\">\r\n Expanded\r\n @if (element === expandedElement && (chartConfig && chartConfig.length)) {\r\n @for (config of chartConfig; track config; let i = $index) {\r\n <div>\r\n <uxp-grid-chart [index]=\"i\" [chartConfig]=\"config\"></uxp-grid-chart>\r\n </div>\r\n }\r\n } @else {\r\n No Chart Data exist for this element\r\n }\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"columnsToDisplayWithExpand\"></tr>\r\n <tr mat-row *matRowDef=\"let element; columns: columnsToDisplayWithExpand;\" class=\"example-element-row\"\r\n [class.example-expanded-row]=\"expandedElement === element\">\r\n </tr>\r\n <tr mat-row *matRowDef=\"let row; columns: ['expandedDetail']\" class=\"expanded-content\"></tr>\r\n\r\n </table>\r\n </div>\r\n\r\n <div [hidden]=\"listView\">\r\n <div #ref><ng-content select=\"[customCard]\"></ng-content></div>\r\n @if (!ref.children.length) {\r\n <div class=\"grid\">\r\n @for (data of gridViewData; track data) {\r\n <ruc-grid-cards class=\"grid-view-container\" [gridItem]=\"data\"\r\n [config]=\"gridCardConfig\" [header]=\"columnConfig\" [data]=\"gridViewData\">\r\n </ruc-grid-cards>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n @if (gridConfig.pagination) {\r\n <mat-paginator (page)=\"pageChangeHandler($event)\" [pageSizeOptions]=\"[5, 10, 25, 100]\"\r\n aria-label=\"Select page of users\"></mat-paginator>\r\n }\r\n</div>\r\n", styles: [".mat-table{width:100%}.header-container{display:flex;justify-content:end;gap:16px;margin-bottom:24px}.icon-container{border:1px solid gray;border-radius:16px;display:flex;justify-content:center;align-items:center;width:120px;height:56px}.icon-container :first-child{border-top-left-radius:16px;border-bottom-left-radius:16px}.icon-container :nth-child(2){border-top-right-radius:16px;border-bottom-right-radius:16px}.icon{display:flex;height:100%;align-items:center;width:100%;justify-content:center}.active-icon mat-icon{color:#fff}mat-icon{cursor:pointer}::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0!important}::ng-deep .mat-form-field-wrapper{padding-bottom:0}.grid-view-container{display:flex;gap:16px;flex-wrap:wrap}.grid-view-container .grid{cursor:pointer}.grid-view-container .grid :hover{background-color:#ffdfb4}.icons{width:fit-content;display:flex;gap:12px}.icons mat-icon{visibility:hidden}.mat-mdc-row:hover{background-color:#008fd51f;border:2px solid #008fd5!important;border-radius:4px}.mat-mdc-row:hover .icons mat-icon{visibility:visible}.mat-column-action{width:100px}.mat-cell{padding-right:20px}.overflow{overflow-x:auto}.grid{display:flex;flex-wrap:wrap;gap:15px}table{width:100%}.expanded-content{height:0!important}tr.example-element-row:not(.example-expanded-row):hover{background:#f5f5f5}tr.example-element-row:not(.example-expanded-row):active{background:#efefef}.example-element-row td{border-bottom-width:0}.example-element-detail{overflow:hidden;display:flex}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "ngmodule", type: MatTableModule }, { kind: "component", type: i6.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i6.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i6.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i6.MatColumnDef, selector: "[matColumnDef]", inputs: ["matColumnDef"] }, { kind: "directive", type: i6.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i6.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i6.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i6.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i6.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i6.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "ngmodule", type: MatPaginatorModule }, { kind: "component", type: i7.MatPaginator, selector: "mat-paginator", inputs: ["color", "pageIndex", "length", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "selectConfig", "disabled"], outputs: ["page"], exportAs: ["matPaginator"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i8.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatSortModule }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortDisabled"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["mat-sort-header", "arrowPosition", "start", "disabled", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "ngmodule", type: MatCardModule }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i11.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i12.MatCheckbox, selector: "mat-checkbox", inputs: ["aria-label", "aria-labelledby", "aria-describedby", "aria-expanded", "aria-controls", "aria-owns", "id", "required", "labelPosition", "name", "value", "disableRipple", "tabIndex", "color", "disabledInteractive", "checked", "disabled", "indeterminate"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i13.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "component", type: GridChartComponent, selector: "uxp-grid-chart", inputs: ["index", "chartConfig"] }, { kind: "component", type: GridCardsComponent, selector: "ruc-grid-cards", inputs: ["data", "gridItem", "config", "header"] }], animations: [
351
+ trigger('detailExpand', [
352
+ state('collapsed', style({ height: '0px', minHeight: '0' })),
353
+ state('expanded', style({ height: '*' })),
354
+ transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
355
+ ]),
356
+ ] }); }
357
+ }
358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: RuclibGridListComponent, decorators: [{
359
+ type: Component,
360
+ args: [{ selector: 'uxp-ruclib-grid-list', imports: [
361
+ CommonModule,
362
+ FormsModule,
363
+ MatFormFieldModule,
364
+ MatTableModule,
365
+ MatPaginatorModule,
366
+ MatInputModule,
367
+ MatIconModule,
368
+ MatSortModule,
369
+ MatCardModule,
370
+ MatButtonModule,
371
+ ReactiveFormsModule,
372
+ MatCheckboxModule,
373
+ MatTooltipModule,
374
+ MatDialogModule,
375
+ GridChartComponent,
376
+ GridCardsComponent,
377
+ ], animations: [
378
+ trigger('detailExpand', [
379
+ state('collapsed', style({ height: '0px', minHeight: '0' })),
380
+ state('expanded', style({ height: '*' })),
381
+ transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
382
+ ]),
383
+ ], template: "<div class=\"grid-list-container\" class={{customTheme}}>\r\n <div class=\"header-container\">\r\n @if (gridConfig.showFilter) {\r\n <mat-form-field appearance=\"outline\">\r\n <input matInput [(ngModel)]=\"search\" (keyup)=\"applyFilter($event)\" placeholder=\"Search\">\r\n </mat-form-field>\r\n }\r\n\r\n @if (gridConfig.showGridView) {\r\n <div class=\"icon-container\">\r\n <div (click)=\"listView=true\"\r\n [style.background-color]=\"listView ? gridCardConfig.style?.icon.color : 'white'\"\r\n [class.active-icon]=\"listView\" class=\"icon list\">\r\n <mat-icon>view_list</mat-icon>\r\n </div>\r\n <div (click)=\"listView=false;createGridViewData()\"\r\n [style.background-color]=\"!listView ? gridCardConfig.style?.icon.color : 'white'\"\r\n [class.active-icon]=\"!listView\" class=\"icon grid\">\r\n <mat-icon>grid_on</mat-icon>\r\n </div>\r\n </div>\r\n }\r\n </div>\r\n\r\n <div [hidden]=\"!listView\" class=\"mat-elevation-z8\" class=\"overflow\">\r\n <table mat-table [dataSource]=\"dataSource\" multiTemplateDataRows matSort (matSortChange)=\"onSortChange($event)\">\r\n @if (gridConfig.isSelectable) {\r\n <ng-container matColumnDef=\"select\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <mat-checkbox color=\"primary\" (change)=\"$event ? toggleAllRows() : null\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\" [aria-label]=\"checkboxLabel()\">\r\n </mat-checkbox>\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox color=\"primary\" (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? selection.toggle(row) : null\" [checked]=\"selection.isSelected(row)\"\r\n [aria-label]=\"checkboxLabel(row)\">\r\n </mat-checkbox>\r\n </td>\r\n </ng-container>\r\n }\r\n @for (column of columnConfig; track column) {\r\n <ng-container [matColumnDef]=\"column.name\" [sticky]=\"\">\r\n <!--table headers start-->\r\n <th [ngStyle]=\"column?.headerStyle\" mat-header-cell *matHeaderCellDef mat-sort-header>\r\n {{column.header}} </th>\r\n <!--table headers end-->\r\n <!--table rows start-->\r\n @if (!column.isCustom) {\r\n @if (!column.actionColumn) {\r\n <td #tooltip=\"matTooltip\" matTooltip=\"{{row[column.name]!}}\" mat-cell *matCellDef=\"let row\">\r\n {{row[column.name]!}} </td>\r\n } @else {\r\n <td mat-cell *matCellDef=\"let row\">\r\n <div class=\"icons\">\r\n @for (action of column.action; track action) {\r\n <mat-icon [style]=\"gridCardConfig.style?.icon\"\r\n (click)=\"action?.handler($event, row)\">{{action.icon}}</mat-icon>\r\n }\r\n </div>\r\n </td>\r\n }\r\n <!--table action rows start-->\r\n <ng-template #actionColumn>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <div class=\"icons\">\r\n @for (action of column.action; track action) {\r\n <mat-icon [style]=\"gridCardConfig.style?.icon\"\r\n (click)=\"action?.handler($event, row)\">{{action.icon}}</mat-icon>\r\n }\r\n </div>\r\n </td>\r\n </ng-template>\r\n <!--table action rows end-->\r\n } @else {\r\n <td mat-cell *matCellDef=\"let element\">\r\n <ng-container [ngTemplateOutlet]=\"customColumnMap[column.name]\"\r\n [ngTemplateOutletContext]=\"{element: element}\"></ng-container>\r\n </td>\r\n }\r\n <!--table rows end-->\r\n <!--table custom column start-->\r\n <!--table custom column end-->\r\n </ng-container>\r\n }\r\n\r\n\r\n <ng-container matColumnDef=\"expand\">\r\n <th mat-header-cell *matHeaderCellDef aria-label=\"row actions\">&nbsp;</th>\r\n <td mat-cell *matCellDef=\"let element; let i = index\">\r\n <button mat-icon-button aria-label=\"expand row\"\r\n (click)=\"(expandedElement = expandedElement === element ? null : element); $event.stopPropagation();handleClick(i,expandedElement, element)\">\r\n @if (expandedElement !== element) {\r\n <mat-icon>keyboard_arrow_down</mat-icon>\r\n }\r\n @if (expandedElement === element) {\r\n <mat-icon>keyboard_arrow_up</mat-icon>\r\n }\r\n </button>\r\n </td>\r\n </ng-container>\r\n\r\n <ng-container matColumnDef=\"expandedDetail\">\r\n <td mat-cell *matCellDef=\"let element; let i = index\"\r\n [attr.colspan]=\"columnsToDisplayWithExpand.length\">\r\n <div class=\"example-element-detail\"\r\n [@detailExpand]=\"element === expandedElement ? 'expanded' : 'collapsed'\">\r\n Expanded\r\n @if (element === expandedElement && (chartConfig && chartConfig.length)) {\r\n @for (config of chartConfig; track config; let i = $index) {\r\n <div>\r\n <uxp-grid-chart [index]=\"i\" [chartConfig]=\"config\"></uxp-grid-chart>\r\n </div>\r\n }\r\n } @else {\r\n No Chart Data exist for this element\r\n }\r\n </div>\r\n </td>\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"columnsToDisplayWithExpand\"></tr>\r\n <tr mat-row *matRowDef=\"let element; columns: columnsToDisplayWithExpand;\" class=\"example-element-row\"\r\n [class.example-expanded-row]=\"expandedElement === element\">\r\n </tr>\r\n <tr mat-row *matRowDef=\"let row; columns: ['expandedDetail']\" class=\"expanded-content\"></tr>\r\n\r\n </table>\r\n </div>\r\n\r\n <div [hidden]=\"listView\">\r\n <div #ref><ng-content select=\"[customCard]\"></ng-content></div>\r\n @if (!ref.children.length) {\r\n <div class=\"grid\">\r\n @for (data of gridViewData; track data) {\r\n <ruc-grid-cards class=\"grid-view-container\" [gridItem]=\"data\"\r\n [config]=\"gridCardConfig\" [header]=\"columnConfig\" [data]=\"gridViewData\">\r\n </ruc-grid-cards>\r\n }\r\n </div>\r\n }\r\n\r\n </div>\r\n\r\n @if (gridConfig.pagination) {\r\n <mat-paginator (page)=\"pageChangeHandler($event)\" [pageSizeOptions]=\"[5, 10, 25, 100]\"\r\n aria-label=\"Select page of users\"></mat-paginator>\r\n }\r\n</div>\r\n", styles: [".mat-table{width:100%}.header-container{display:flex;justify-content:end;gap:16px;margin-bottom:24px}.icon-container{border:1px solid gray;border-radius:16px;display:flex;justify-content:center;align-items:center;width:120px;height:56px}.icon-container :first-child{border-top-left-radius:16px;border-bottom-left-radius:16px}.icon-container :nth-child(2){border-top-right-radius:16px;border-bottom-right-radius:16px}.icon{display:flex;height:100%;align-items:center;width:100%;justify-content:center}.active-icon mat-icon{color:#fff}mat-icon{cursor:pointer}::ng-deep .mat-form-field-appearance-outline .mat-form-field-wrapper{margin:0!important}::ng-deep .mat-form-field-wrapper{padding-bottom:0}.grid-view-container{display:flex;gap:16px;flex-wrap:wrap}.grid-view-container .grid{cursor:pointer}.grid-view-container .grid :hover{background-color:#ffdfb4}.icons{width:fit-content;display:flex;gap:12px}.icons mat-icon{visibility:hidden}.mat-mdc-row:hover{background-color:#008fd51f;border:2px solid #008fd5!important;border-radius:4px}.mat-mdc-row:hover .icons mat-icon{visibility:visible}.mat-column-action{width:100px}.mat-cell{padding-right:20px}.overflow{overflow-x:auto}.grid{display:flex;flex-wrap:wrap;gap:15px}table{width:100%}.expanded-content{height:0!important}tr.example-element-row:not(.example-expanded-row):hover{background:#f5f5f5}tr.example-element-row:not(.example-expanded-row):active{background:#efefef}.example-element-row td{border-bottom-width:0}.example-element-detail{overflow:hidden;display:flex}\n"] }]
384
+ }], ctorParameters: () => [{ type: i1.MatDialog }, { type: GridListService }], propDecorators: { paginator: [{
385
+ type: ViewChild,
386
+ args: [MatPaginator]
387
+ }], sort: [{
388
+ type: ViewChild,
389
+ args: [MatSort]
390
+ }], cellTemplate: [{
391
+ type: ContentChildren,
392
+ args: [GridColumnComponent]
393
+ }], rowExpanded: [{
394
+ type: Output
395
+ }], columnConfig: [{
396
+ type: Input
397
+ }], inputData: [{
398
+ type: Input
399
+ }], gridConfig: [{
400
+ type: Input
401
+ }], chartConfig: [{
402
+ type: Input
403
+ }], customTheme: [{
404
+ type: Input
405
+ }], rucInputData: [{
406
+ type: Input
407
+ }], infoClicked: [{
408
+ type: Output
409
+ }], rucEvent: [{
410
+ type: Output
411
+ }] } });
412
+
413
+ const FRUITS = [
414
+ 'blueberry',
415
+ 'lychee',
416
+ 'kiwi',
417
+ 'mango',
418
+ 'peach',
419
+ 'lime',
420
+ 'pomegranate',
421
+ 'pineapple',
422
+ ];
423
+ const NAMES = [
424
+ 'Maia',
425
+ 'Asher',
426
+ 'Olivia',
427
+ 'Atticus',
428
+ 'Amelia',
429
+ 'Jack',
430
+ 'Charlotte',
431
+ 'Theodore',
432
+ 'Isla',
433
+ 'Oliver',
434
+ 'Isabella',
435
+ 'Jasper',
436
+ 'Cora',
437
+ 'Levi',
438
+ 'Violet',
439
+ 'Arthur',
440
+ 'Mia',
441
+ 'Thomas',
442
+ 'Elizabeth',
443
+ ];
444
+ const TRANSFORMATIONS = [
445
+ 'Transformation 1',
446
+ 'Transformation 2',
447
+ 'Transformation 3',
448
+ 'Transformation 4',
449
+ 'Transformation 5',
450
+ ];
451
+ const SOURCES = [
452
+ 'Impala 3.4.1',
453
+ 'Impala 3.4.2',
454
+ 'Impala 3.4.3',
455
+ 'Impala 3.4.4',
456
+ 'Impala 3.4.5'
457
+ ];
458
+ const CLASSES = [
459
+ '1st Sem',
460
+ '2nd Sem',
461
+ '3rd Sem',
462
+ '4th Sem',
463
+ '5th Sem'
464
+ ];
465
+ const RESULTS = [
466
+ 'Good',
467
+ 'Worst',
468
+ 'Best',
469
+ 'Better'
470
+ ];
471
+ const TARGETS = [
472
+ 'Redshift 3.0.51',
473
+ 'Redshift 3.0.52',
474
+ 'Redshift 3.0.53',
475
+ 'Redshift 3.0.54',
476
+ 'Redshift 3.0.55',
477
+ ];
478
+ const STATUSES = [
479
+ 'Analysis in progress',
480
+ 'Transformation in progress',
481
+ 'Analysis Completed',
482
+ 'Transformation Completed'
483
+ ];
484
+
485
+ /**
486
+ * Generated bundle index. Do not edit.
487
+ */
488
+
489
+ export { CLASSES, FRUITS, GridCardConfig, GridCardStyle, GridCardsComponent, GridColumnComponent, GridColumnConfig, GridConfig, GridListActions, GridListService, NAMES, RESULTS, RuclibGridListComponent, SOURCES, STATUSES, TARGETS, TRANSFORMATIONS };
490
+ //# sourceMappingURL=ruc-lib-grid-list.mjs.map