@ruc-lib/grid-list 2.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.
- package/README.md +7 -0
- package/esm2020/index.mjs +8 -0
- package/esm2020/interfaces/toolbar.config.mjs +2 -0
- package/esm2020/lib/grid-cards/grid-cards.component.mjs +30 -0
- package/esm2020/lib/grid-chart/grid-chart.component.mjs +28 -0
- package/esm2020/lib/grid-chart-dialog/grid-chart-dialog.component.mjs +34 -0
- package/esm2020/lib/grid-column/grid-column.component.mjs +16 -0
- package/esm2020/lib/ruclib-grid-list/ruclib-grid-list.component.mjs +240 -0
- package/esm2020/lib/ruclib-grid-list.module.mjs +84 -0
- package/esm2020/models/grid-default.config.mjs +22 -0
- package/esm2020/models/grid-list-default-data.mjs +72 -0
- package/esm2020/ruc-lib-grid-list.mjs +5 -0
- package/esm2020/service-ui/grid-list.service.mjs +27 -0
- package/fesm2015/ruc-lib-grid-list.mjs +456 -0
- package/fesm2015/ruc-lib-grid-list.mjs.map +1 -0
- package/fesm2020/ruc-lib-grid-list.mjs +453 -0
- package/fesm2020/ruc-lib-grid-list.mjs.map +1 -0
- package/index.d.ts +7 -0
- package/interfaces/toolbar.config.d.ts +4 -0
- package/lib/grid-cards/grid-cards.component.d.ts +14 -0
- package/lib/grid-chart/grid-chart.component.d.ts +13 -0
- package/lib/grid-chart-dialog/grid-chart-dialog.component.d.ts +16 -0
- package/lib/grid-column/grid-column.component.d.ts +8 -0
- package/lib/ruclib-grid-list/ruclib-grid-list.component.d.ts +96 -0
- package/lib/ruclib-grid-list.module.d.ts +24 -0
- package/models/grid-default.config.d.ts +40 -0
- package/models/grid-list-default-data.d.ts +19 -0
- package/package.json +37 -0
- package/service-ui/grid-list.service.d.ts +15 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export class GridColumnConfig {
|
|
2
|
+
}
|
|
3
|
+
export class GridCardConfig {
|
|
4
|
+
}
|
|
5
|
+
export class GridCardStyle {
|
|
6
|
+
}
|
|
7
|
+
export class GridListActions {
|
|
8
|
+
}
|
|
9
|
+
export class GridConfig {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.showFilter = true;
|
|
12
|
+
this.showGridView = true;
|
|
13
|
+
this.pagination = true;
|
|
14
|
+
this.isPaginatedApi = false;
|
|
15
|
+
this.isExpandable = false;
|
|
16
|
+
this.isSelectable = true;
|
|
17
|
+
this.stickyTableHeader = true;
|
|
18
|
+
this.cardStyle = {};
|
|
19
|
+
this.showListView = false;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JpZC1kZWZhdWx0LmNvbmZpZy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9tb2RlbHMvZ3JpZC1kZWZhdWx0LmNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxNQUFNLE9BQU8sZ0JBQWdCO0NBVTVCO0FBRUQsTUFBTSxPQUFPLGNBQWM7Q0FJMUI7QUFFRCxNQUFNLE9BQU8sYUFBYTtDQUd6QjtBQUVELE1BQU0sT0FBTyxlQUFlO0NBSTNCO0FBR0QsTUFBTSxPQUFPLFVBQVU7SUFBdkI7UUFDSSxlQUFVLEdBQVksSUFBSSxDQUFDO1FBRTNCLGlCQUFZLEdBQVksSUFBSSxDQUFDO1FBRTdCLGVBQVUsR0FBWSxJQUFJLENBQUM7UUFFM0IsbUJBQWMsR0FBWSxLQUFLLENBQUM7UUFFaEMsaUJBQVksR0FBRyxLQUFLLENBQUM7UUFFckIsaUJBQVksR0FBRyxJQUFJLENBQUM7UUFFcEIsc0JBQWlCLEdBQUcsSUFBSSxDQUFDO1FBRXpCLGNBQVMsR0FBUSxFQUFFLENBQUM7UUFNcEIsaUJBQVksR0FBWSxLQUFLLENBQUM7SUFHbEMsQ0FBQztDQUFBIiwic291cmNlc0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aW5hdGlvbjogYm9vbGVhbiA9IHRydWU7XHJcblxyXG4gICAgaXNQYWdpbmF0ZWRBcGk6IGJvb2xlYW4gPSBmYWxzZTtcclxuXHJcbiAgICBpc0V4cGFuZGFibGUgPSBmYWxzZTtcclxuXHJcbiAgICBpc1NlbGVjdGFibGUgPSB0cnVlO1xyXG4gIFxyXG4gICAgc3RpY2t5VGFibGVIZWFkZXIgPSB0cnVlO1xyXG5cclxuICAgIGNhcmRTdHlsZTogYW55ID0ge307XHJcblxyXG4gICAgbG9hZERhdGEhOiAoZXZlbnQ/OiBQYWdlRXZlbnQpID0+IGFueTtcclxuXHJcbiAgICBkYXRhPzogYW55O1xyXG5cclxuICAgIHNob3dMaXN0VmlldzogYm9vbGVhbiA9IGZhbHNlO1xyXG5cclxuICAgIGxvYWRDaGFydERhdGEhOiAoKSA9PiBhbnk7XHJcbn1cclxuIl19
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export const FRUITS = [
|
|
2
|
+
'blueberry',
|
|
3
|
+
'lychee',
|
|
4
|
+
'kiwi',
|
|
5
|
+
'mango',
|
|
6
|
+
'peach',
|
|
7
|
+
'lime',
|
|
8
|
+
'pomegranate',
|
|
9
|
+
'pineapple',
|
|
10
|
+
];
|
|
11
|
+
export const NAMES = [
|
|
12
|
+
'Maia',
|
|
13
|
+
'Asher',
|
|
14
|
+
'Olivia',
|
|
15
|
+
'Atticus',
|
|
16
|
+
'Amelia',
|
|
17
|
+
'Jack',
|
|
18
|
+
'Charlotte',
|
|
19
|
+
'Theodore',
|
|
20
|
+
'Isla',
|
|
21
|
+
'Oliver',
|
|
22
|
+
'Isabella',
|
|
23
|
+
'Jasper',
|
|
24
|
+
'Cora',
|
|
25
|
+
'Levi',
|
|
26
|
+
'Violet',
|
|
27
|
+
'Arthur',
|
|
28
|
+
'Mia',
|
|
29
|
+
'Thomas',
|
|
30
|
+
'Elizabeth',
|
|
31
|
+
];
|
|
32
|
+
export const TRANSFORMATIONS = [
|
|
33
|
+
'Transformation 1',
|
|
34
|
+
'Transformation 2',
|
|
35
|
+
'Transformation 3',
|
|
36
|
+
'Transformation 4',
|
|
37
|
+
'Transformation 5',
|
|
38
|
+
];
|
|
39
|
+
export const SOURCES = [
|
|
40
|
+
'Impala 3.4.1',
|
|
41
|
+
'Impala 3.4.2',
|
|
42
|
+
'Impala 3.4.3',
|
|
43
|
+
'Impala 3.4.4',
|
|
44
|
+
'Impala 3.4.5'
|
|
45
|
+
];
|
|
46
|
+
export const CLASSES = [
|
|
47
|
+
'1st Sem',
|
|
48
|
+
'2nd Sem',
|
|
49
|
+
'3rd Sem',
|
|
50
|
+
'4th Sem',
|
|
51
|
+
'5th Sem'
|
|
52
|
+
];
|
|
53
|
+
export const RESULTS = [
|
|
54
|
+
'Good',
|
|
55
|
+
'Worst',
|
|
56
|
+
'Best',
|
|
57
|
+
'Better'
|
|
58
|
+
];
|
|
59
|
+
export const TARGETS = [
|
|
60
|
+
'Redshift 3.0.51',
|
|
61
|
+
'Redshift 3.0.52',
|
|
62
|
+
'Redshift 3.0.53',
|
|
63
|
+
'Redshift 3.0.54',
|
|
64
|
+
'Redshift 3.0.55',
|
|
65
|
+
];
|
|
66
|
+
export const STATUSES = [
|
|
67
|
+
'Analysis in progress',
|
|
68
|
+
'Transformation in progress',
|
|
69
|
+
'Analysis Completed',
|
|
70
|
+
'Transformation Completed'
|
|
71
|
+
];
|
|
72
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JpZC1saXN0LWRlZmF1bHQtZGF0YS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9tb2RlbHMvZ3JpZC1saXN0LWRlZmF1bHQtZGF0YS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFZQSxNQUFNLENBQUMsTUFBTSxNQUFNLEdBQWE7SUFDN0IsV0FBVztJQUNYLFFBQVE7SUFDUixNQUFNO0lBQ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GNvbnN0IFNUQVRVU0VTOiBzdHJpbmdbXSA9IFtcclxuICAgJ0FuYWx5c2lzIGluIHByb2dyZXNzJyxcclxuICAgJ1RyYW5zZm9ybWF0aW9uIGluIHByb2dyZXNzJyxcclxuICAgJ0FuYWx5c2lzIENvbXBsZXRlZCcsXHJcbiAgICdUcmFuc2Zvcm1hdGlvbiBDb21wbGV0ZWQnXHJcbl1cclxuIl19
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
export * from './index';
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVjLWxpYi1ncmlkLWxpc3QuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcnVjLWxpYi1ncmlkLWxpc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* This service will handle the tabData
|
|
6
|
+
*/
|
|
7
|
+
export class GridListService {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.gridChartDetails = new Subject();
|
|
10
|
+
this.gridChartDetails$ = this.gridChartDetails.asObservable();
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* method for handling the tabData which will have tabData as argument
|
|
14
|
+
*/
|
|
15
|
+
sendGridChartData(dataSource) {
|
|
16
|
+
this.gridChartDetails.next(dataSource);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
GridListService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GridListService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
20
|
+
GridListService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GridListService, providedIn: 'root' });
|
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GridListService, decorators: [{
|
|
22
|
+
type: Injectable,
|
|
23
|
+
args: [{
|
|
24
|
+
providedIn: 'root'
|
|
25
|
+
}]
|
|
26
|
+
}], ctorParameters: function () { return []; } });
|
|
27
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ3JpZC1saXN0LnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvc2VydmljZS11aS9ncmlkLWxpc3Quc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8sRUFBRSxPQUFPLEVBQUUsTUFBTSxNQUFNLENBQUM7O0FBRS9COztJQUVJO0FBSUosTUFBTSxPQUFPLGVBQWU7SUFLeEI7UUFIUSxxQkFBZ0IsR0FBRyxJQUFJLE9BQU8sRUFBRSxDQUFDO1FBQ3pDLHNCQUFpQixHQUFHLElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxZQUFZLEVBQUUsQ0FBQztJQUV6QyxDQUFDO0lBRWpCOztRQUVJO0lBQ0osaUJBQWlCLENBQUMsVUFBZ0I7UUFDOUIsSUFBSSxDQUFDLGdCQUFnQixDQUFDLElBQUksQ0FBQyxVQUFVLENBQUMsQ0FBQztJQUMzQyxDQUFDOzs2R0FaUSxlQUFlO2lIQUFmLGVBQWUsY0FGWixNQUFNOzRGQUVULGVBQWU7a0JBSDNCLFVBQVU7bUJBQUM7b0JBQ1IsVUFBVSxFQUFFLE1BQU07aUJBQ3JCIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5qZWN0YWJsZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xyXG5pbXBvcnQgeyBTdWJqZWN0IH0gZnJvbSAncnhqcyc7XHJcblxyXG4vKipcclxuICAqIFRoaXMgc2VydmljZSB3aWxsIGhhbmRsZSB0aGUgdGFiRGF0YVxyXG4gICovXHJcbkBJbmplY3RhYmxlKHtcclxuICAgIHByb3ZpZGVkSW46ICdyb290J1xyXG59KVxyXG5leHBvcnQgY2xhc3MgR3JpZExpc3RTZXJ2aWNlIHtcclxuXHJcbiAgICBwcml2YXRlIGdyaWRDaGFydERldGFpbHMgPSBuZXcgU3ViamVjdCgpO1xyXG4gICAgZ3JpZENoYXJ0RGV0YWlscyQgPSB0aGlzLmdyaWRDaGFydERldGFpbHMuYXNPYnNlcnZhYmxlKCk7XHJcblxyXG4gICAgY29uc3RydWN0b3IoKSB7IH1cclxuXHJcbiAgICAvKipcclxuICAgICAgKiBtZXRob2QgZm9yIGhhbmRsaW5nIHRoZSB0YWJEYXRhIHdoaWNoIHdpbGwgaGF2ZSB0YWJEYXRhIGFzIGFyZ3VtZW50IFxyXG4gICAgICAqL1xyXG4gICAgc2VuZEdyaWRDaGFydERhdGEoZGF0YVNvdXJjZT86IGFueSkge1xyXG4gICAgICAgIHRoaXMuZ3JpZENoYXJ0RGV0YWlscy5uZXh0KGRhdGFTb3VyY2UpO1xyXG4gICAgfVxyXG59Il19
|
|
@@ -0,0 +1,456 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, Input, ContentChild, Inject, Injectable, EventEmitter, ViewChild, ContentChildren, Output, NgModule } from '@angular/core';
|
|
3
|
+
import * as i3 from '@angular/common';
|
|
4
|
+
import { CommonModule } from '@angular/common';
|
|
5
|
+
import * as i5 from '@angular/material/form-field';
|
|
6
|
+
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
7
|
+
import * as i6 from '@angular/material/table';
|
|
8
|
+
import { MatTableDataSource, MatTableModule } from '@angular/material/table';
|
|
9
|
+
import * as i7 from '@angular/material/paginator';
|
|
10
|
+
import { MatPaginator, MatPaginatorModule } from '@angular/material/paginator';
|
|
11
|
+
import * as i4 from '@angular/forms';
|
|
12
|
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
13
|
+
import * as i8 from '@angular/material/input';
|
|
14
|
+
import { MatInputModule } from '@angular/material/input';
|
|
15
|
+
import * as i2 from '@angular/material/icon';
|
|
16
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
17
|
+
import * as i10 from '@angular/material/sort';
|
|
18
|
+
import { MatSort, MatSortModule } from '@angular/material/sort';
|
|
19
|
+
import * as i3$1 from '@angular/material/card';
|
|
20
|
+
import { MatCardModule } from '@angular/material/card';
|
|
21
|
+
import * as i3$2 from '@angular/material/button';
|
|
22
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
23
|
+
import * as i12 from '@angular/material/checkbox';
|
|
24
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
25
|
+
import * as i13 from '@angular/material/tooltip';
|
|
26
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
27
|
+
import { SelectionModel } from '@angular/cdk/collections';
|
|
28
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
29
|
+
import * as i1 from '@angular/material/dialog';
|
|
30
|
+
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
31
|
+
import { Chart } from 'chart.js';
|
|
32
|
+
import { Subject } from 'rxjs';
|
|
33
|
+
import Chart$1 from 'chart.js/auto';
|
|
34
|
+
|
|
35
|
+
class GridCardsComponent {
|
|
36
|
+
constructor() {
|
|
37
|
+
this.data = [];
|
|
38
|
+
this.config = {};
|
|
39
|
+
}
|
|
40
|
+
ngOnInit() {
|
|
41
|
+
}
|
|
42
|
+
ngAfterViewInit() { }
|
|
43
|
+
}
|
|
44
|
+
GridCardsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GridCardsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
45
|
+
GridCardsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: GridCardsComponent, 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 <mat-icon [style]=\"config.style?.icon\" *ngFor=\"let icon of config.actions\" (click)=\"icon?.handler($event, gridItem)\">{{icon.icon}}</mat-icon>\r\n </div>\r\n \r\n </div>\r\n <div *ngFor=\"let value of header\">\r\n <p *ngIf=\"value.showInCardView\">\r\n {{value['header']}} : {{gridItem[value['name']]}}\r\n </p>\r\n </div>\r\n </mat-card-content>\r\n </mat-card>\r\n\r\n", styles: ["mat-card:hover{background-color:#0000000a}mat-card:hover .card-top div{visibility:visible}.card-top{display:flex;justify-content:space-between}.card-top div{visibility:hidden}.card-top div mat-icon{cursor:pointer;margin:0 5px;color:orange}\n"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatCard, selector: "mat-card", inputs: ["appearance"], exportAs: ["matCard"] }, { kind: "directive", type: i3$1.MatCardContent, selector: "mat-card-content" }] });
|
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GridCardsComponent, decorators: [{
|
|
47
|
+
type: Component,
|
|
48
|
+
args: [{ selector: 'ruc-grid-cards', 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 <mat-icon [style]=\"config.style?.icon\" *ngFor=\"let icon of config.actions\" (click)=\"icon?.handler($event, gridItem)\">{{icon.icon}}</mat-icon>\r\n </div>\r\n \r\n </div>\r\n <div *ngFor=\"let value of header\">\r\n <p *ngIf=\"value.showInCardView\">\r\n {{value['header']}} : {{gridItem[value['name']]}}\r\n </p>\r\n </div>\r\n </mat-card-content>\r\n </mat-card>\r\n\r\n", styles: ["mat-card:hover{background-color:#0000000a}mat-card:hover .card-top div{visibility:visible}.card-top{display:flex;justify-content:space-between}.card-top div{visibility:hidden}.card-top div mat-icon{cursor:pointer;margin:0 5px;color:orange}\n"] }]
|
|
49
|
+
}], ctorParameters: function () { return []; }, propDecorators: { data: [{
|
|
50
|
+
type: Input
|
|
51
|
+
}], gridItem: [{
|
|
52
|
+
type: Input
|
|
53
|
+
}], config: [{
|
|
54
|
+
type: Input
|
|
55
|
+
}], header: [{
|
|
56
|
+
type: Input
|
|
57
|
+
}] } });
|
|
58
|
+
|
|
59
|
+
class GridColumnComponent {
|
|
60
|
+
}
|
|
61
|
+
GridColumnComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GridColumnComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
62
|
+
GridColumnComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: GridColumnComponent, selector: "ruc-grid-column", inputs: { name: "name" }, queries: [{ propertyName: "cellTemplate", first: true, predicate: ["cellTemplate"], descendants: true }], ngImport: i0, template: "", styles: [""] });
|
|
63
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GridColumnComponent, decorators: [{
|
|
64
|
+
type: Component,
|
|
65
|
+
args: [{ selector: 'ruc-grid-column', template: "" }]
|
|
66
|
+
}], propDecorators: { name: [{
|
|
67
|
+
type: Input
|
|
68
|
+
}], cellTemplate: [{
|
|
69
|
+
type: ContentChild,
|
|
70
|
+
args: ['cellTemplate']
|
|
71
|
+
}] } });
|
|
72
|
+
|
|
73
|
+
class GridColumnConfig {
|
|
74
|
+
}
|
|
75
|
+
class GridCardConfig {
|
|
76
|
+
}
|
|
77
|
+
class GridCardStyle {
|
|
78
|
+
}
|
|
79
|
+
class GridListActions {
|
|
80
|
+
}
|
|
81
|
+
class GridConfig {
|
|
82
|
+
constructor() {
|
|
83
|
+
this.showFilter = true;
|
|
84
|
+
this.showGridView = true;
|
|
85
|
+
this.pagination = true;
|
|
86
|
+
this.isPaginatedApi = false;
|
|
87
|
+
this.isExpandable = false;
|
|
88
|
+
this.isSelectable = true;
|
|
89
|
+
this.stickyTableHeader = true;
|
|
90
|
+
this.cardStyle = {};
|
|
91
|
+
this.showListView = false;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
class RucGridChartDialogComponent {
|
|
96
|
+
constructor(dialogRef, data) {
|
|
97
|
+
this.dialogRef = dialogRef;
|
|
98
|
+
this.data = data;
|
|
99
|
+
}
|
|
100
|
+
ngOnInit() {
|
|
101
|
+
}
|
|
102
|
+
ngAfterViewInit() {
|
|
103
|
+
this.data.chartConfig.forEach((chartData, index) => {
|
|
104
|
+
const ctx = document.getElementById(`chart${index}`);
|
|
105
|
+
new Chart(ctx, chartData);
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
onCancel() {
|
|
109
|
+
this.dialogRef.close(null);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
RucGridChartDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RucGridChartDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
113
|
+
RucGridChartDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RucGridChartDialogComponent, selector: "ruclib-grid-chart-dialog", ngImport: i0, template: "<div class=\"chart-container\">\r\n <div *ngFor=\"let chart of data.chartConfig; let i = index\" style=\"position: relative; height:50vh; width:40vw\">\r\n <canvas id=\"chart{{i}}\"></canvas>\r\n </div>\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"], dependencies: [{ kind: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i3$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }] });
|
|
114
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RucGridChartDialogComponent, decorators: [{
|
|
115
|
+
type: Component,
|
|
116
|
+
args: [{ selector: 'ruclib-grid-chart-dialog', template: "<div class=\"chart-container\">\r\n <div *ngFor=\"let chart of data.chartConfig; let i = index\" style=\"position: relative; height:50vh; width:40vw\">\r\n <canvas id=\"chart{{i}}\"></canvas>\r\n </div>\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"] }]
|
|
117
|
+
}], ctorParameters: function () {
|
|
118
|
+
return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
|
|
119
|
+
type: Inject,
|
|
120
|
+
args: [MAT_DIALOG_DATA]
|
|
121
|
+
}] }];
|
|
122
|
+
} });
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* This service will handle the tabData
|
|
126
|
+
*/
|
|
127
|
+
class GridListService {
|
|
128
|
+
constructor() {
|
|
129
|
+
this.gridChartDetails = new Subject();
|
|
130
|
+
this.gridChartDetails$ = this.gridChartDetails.asObservable();
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* method for handling the tabData which will have tabData as argument
|
|
134
|
+
*/
|
|
135
|
+
sendGridChartData(dataSource) {
|
|
136
|
+
this.gridChartDetails.next(dataSource);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
GridListService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GridListService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
140
|
+
GridListService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GridListService, providedIn: 'root' });
|
|
141
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GridListService, decorators: [{
|
|
142
|
+
type: Injectable,
|
|
143
|
+
args: [{
|
|
144
|
+
providedIn: 'root'
|
|
145
|
+
}]
|
|
146
|
+
}], ctorParameters: function () { return []; } });
|
|
147
|
+
|
|
148
|
+
class GridChartComponent {
|
|
149
|
+
constructor() {
|
|
150
|
+
this.index = 0;
|
|
151
|
+
}
|
|
152
|
+
ngOnInit() { }
|
|
153
|
+
ngAfterViewInit() {
|
|
154
|
+
this.chart = new Chart$1('canvas' + this.index, this.chartConfig);
|
|
155
|
+
}
|
|
156
|
+
ngOnDestroy() {
|
|
157
|
+
this.chart.destroy();
|
|
158
|
+
this.chart = null;
|
|
159
|
+
this.chartConfig = null;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
GridChartComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GridChartComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
163
|
+
GridChartComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: GridChartComponent, selector: "ruc-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: [""] });
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: GridChartComponent, decorators: [{
|
|
165
|
+
type: Component,
|
|
166
|
+
args: [{ selector: 'ruc-grid-chart', template: "<div style=\"position: relative; height:50vh; width:40vw\">\r\n <canvas id=\"canvas{{index}}\">{{chart}}</canvas>\r\n</div>\r\n\r\n" }]
|
|
167
|
+
}], ctorParameters: function () { return []; }, propDecorators: { index: [{
|
|
168
|
+
type: Input
|
|
169
|
+
}], chartConfig: [{
|
|
170
|
+
type: Input
|
|
171
|
+
}] } });
|
|
172
|
+
|
|
173
|
+
class RuclibGridListComponent {
|
|
174
|
+
constructor(dialog, gridListService) {
|
|
175
|
+
this.dialog = dialog;
|
|
176
|
+
this.gridListService = gridListService;
|
|
177
|
+
this.displayedColumns = [];
|
|
178
|
+
this.search = '';
|
|
179
|
+
this.selection = new SelectionModel(true, []);
|
|
180
|
+
this.gridViewData = [];
|
|
181
|
+
this.rowExpanded = new EventEmitter(false);
|
|
182
|
+
this.gridCardConfig = {};
|
|
183
|
+
this.gridConfig = new GridConfig();
|
|
184
|
+
this.customColumnMap = [];
|
|
185
|
+
this.listView = true;
|
|
186
|
+
this.expanded = false;
|
|
187
|
+
this.infoClicked = new EventEmitter();
|
|
188
|
+
this.rucEvent = new EventEmitter();
|
|
189
|
+
}
|
|
190
|
+
ngOnInit() {
|
|
191
|
+
this.columnConfig = this.rucInputData.columnConfig;
|
|
192
|
+
this.gridConfig = this.rucInputData.gridConfig;
|
|
193
|
+
this.listView = !this.gridConfig.showListView;
|
|
194
|
+
this.currentStateObj = {};
|
|
195
|
+
this.dataSource = new MatTableDataSource(this.inputData);
|
|
196
|
+
this.displayedColumns = this.columnConfig.map(column => column.name);
|
|
197
|
+
if (this.gridConfig.isSelectable) {
|
|
198
|
+
this.displayedColumns = ['select', ...this.displayedColumns];
|
|
199
|
+
}
|
|
200
|
+
this.columnsToDisplayWithExpand = [...this.displayedColumns, 'expand'];
|
|
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
|
+
ngAfterViewInit() {
|
|
214
|
+
this.dataSource.paginator = this.paginator;
|
|
215
|
+
this.dataSource.sort = this.sort;
|
|
216
|
+
if (!this.listView) {
|
|
217
|
+
this.createGridViewData();
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
ngAfterContentInit() {
|
|
221
|
+
this.cellTemplate.forEach(oColumn => {
|
|
222
|
+
this.customColumnMap[oColumn.name] = oColumn.cellTemplate;
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
*
|
|
227
|
+
* @param event
|
|
228
|
+
* @param rowData
|
|
229
|
+
*/
|
|
230
|
+
infoClickHandler(event, rowData) {
|
|
231
|
+
this.infoClicked.emit(rowData);
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
*
|
|
235
|
+
* @param event
|
|
236
|
+
*/
|
|
237
|
+
onSortChange(event) {
|
|
238
|
+
this.currentStateObj.sortOrder = event.direction;
|
|
239
|
+
this.currentStateObj.sortBy = event.active;
|
|
240
|
+
this.rucEvent.emit({ 'eventName': 'sortByColumn', 'eventOutput': event });
|
|
241
|
+
this.rucEvent.emit({ 'eventName': 'currentStateObjChange', 'eventOutput': this.currentStateObj });
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Filter Table
|
|
245
|
+
* @param event
|
|
246
|
+
*/
|
|
247
|
+
applyFilter(event) {
|
|
248
|
+
const filterValue = event.target.value;
|
|
249
|
+
this.currentStateObj.searchText = filterValue ? filterValue.trim().toLowerCase() : '';
|
|
250
|
+
this.dataSource.filter = filterValue.trim().toLowerCase();
|
|
251
|
+
this.rucEvent.emit({ 'eventName': 'currentStateObjChange', 'eventOutput': this.currentStateObj });
|
|
252
|
+
this.createGridViewData(this.dataSource.filteredData);
|
|
253
|
+
if (this.dataSource.paginator) {
|
|
254
|
+
this.dataSource.paginator.firstPage();
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* pagination handler
|
|
259
|
+
* @param event
|
|
260
|
+
* @returns
|
|
261
|
+
*/
|
|
262
|
+
pageChangeHandler(event) {
|
|
263
|
+
this.createGridViewData();
|
|
264
|
+
if (!this.gridConfig.isPaginatedApi)
|
|
265
|
+
return;
|
|
266
|
+
if (this.gridConfig.isPaginatedApi) {
|
|
267
|
+
this.rucEvent.emit({ 'eventName': 'paginatorChange', 'eventOutput': { pageIndex: event } });
|
|
268
|
+
}
|
|
269
|
+
this.inputData = this.gridConfig.data;
|
|
270
|
+
this.dataSource = new MatTableDataSource(this.inputData);
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Create Grid view
|
|
274
|
+
* @param filteredData
|
|
275
|
+
*/
|
|
276
|
+
createGridViewData(filteredData) {
|
|
277
|
+
var _a, _b;
|
|
278
|
+
filteredData = this.search ? this.dataSource.filteredData : this.dataSource.data;
|
|
279
|
+
const data = this.cloneDeep(filteredData);
|
|
280
|
+
const pageSize = (_a = this.dataSource.paginator) === null || _a === void 0 ? void 0 : _a.pageSize;
|
|
281
|
+
const currentPageIndex = (_b = this.dataSource.paginator) === null || _b === void 0 ? void 0 : _b.pageIndex;
|
|
282
|
+
if (pageSize !== undefined && currentPageIndex !== undefined) {
|
|
283
|
+
const start = pageSize * currentPageIndex;
|
|
284
|
+
const end = (currentPageIndex + 1) * pageSize;
|
|
285
|
+
this.gridViewData = data.slice(start, end);
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
*
|
|
290
|
+
* @param data
|
|
291
|
+
* @returns
|
|
292
|
+
*/
|
|
293
|
+
cloneDeep(data) {
|
|
294
|
+
return JSON.parse(JSON.stringify(data));
|
|
295
|
+
}
|
|
296
|
+
/**
|
|
297
|
+
*
|
|
298
|
+
* @returns
|
|
299
|
+
*/
|
|
300
|
+
isAllSelected() {
|
|
301
|
+
const numSelected = this.selection.selected.length;
|
|
302
|
+
const numRows = this.dataSource.data.length;
|
|
303
|
+
return numSelected === numRows;
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
*
|
|
307
|
+
* @returns
|
|
308
|
+
*/
|
|
309
|
+
toggleAllRows() {
|
|
310
|
+
if (this.isAllSelected()) {
|
|
311
|
+
this.selection.clear();
|
|
312
|
+
return;
|
|
313
|
+
}
|
|
314
|
+
this.selection.select(...this.dataSource.data);
|
|
315
|
+
}
|
|
316
|
+
/** The label for the checkbox on the passed row */
|
|
317
|
+
checkboxLabel(row) {
|
|
318
|
+
if (!row) {
|
|
319
|
+
return `${this.isAllSelected() ? 'deselect' : 'select'} all`;
|
|
320
|
+
}
|
|
321
|
+
// return `${this.selection.isSelected(row) ? 'deselect' : 'select'} row ${row.position + 1}`;
|
|
322
|
+
return `${this.selection.isSelected(row) ? 'deselect' : 'select'} row`;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
*
|
|
326
|
+
* @param i
|
|
327
|
+
* @param expandedElement
|
|
328
|
+
* @param element
|
|
329
|
+
*/
|
|
330
|
+
handleClick(i, expandedElement, element) {
|
|
331
|
+
if (expandedElement != element) { //expand the row
|
|
332
|
+
this.expanded = false;
|
|
333
|
+
this.rowExpanded.emit(Object.assign(Object.assign({}, element), { isExpanded: false }));
|
|
334
|
+
}
|
|
335
|
+
else {
|
|
336
|
+
this.expanded = true;
|
|
337
|
+
this.rowExpanded.emit(Object.assign(Object.assign({}, element), { isExpanded: true }));
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
RuclibGridListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibGridListComponent, deps: [{ token: i1.MatDialog }, { token: GridListService }], target: i0.ɵɵFactoryTarget.Component });
|
|
342
|
+
RuclibGridListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: RuclibGridListComponent, 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 <mat-form-field *ngIf=\"gridConfig.showFilter\" appearance=\"outline\">\r\n <input matInput [(ngModel)]=\"search\" (keyup)=\"applyFilter($event)\" placeholder=\"Search\">\r\n </mat-form-field>\r\n\r\n <div *ngIf=\"gridConfig.showGridView\" 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 </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 <ng-container matColumnDef=\"select\" *ngIf=\"gridConfig.isSelectable\">\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 <ng-container *ngFor=\"let column of columnConfig\">\r\n <ng-container [matColumnDef]=\"column.name\" [sticky]=\"\">\r\n\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\r\n\r\n <!--table rows start-->\r\n <ng-container *ngIf=\"!column.isCustom; else customColumn\">\r\n <ng-container *ngIf=\"!column.actionColumn; else actionColumn\">\r\n <td #tooltip=\"matTooltip\" matTooltip=\"{{row[column.name]!}}\" mat-cell *matCellDef=\"let row\">\r\n {{row[column.name]!}} </td>\r\n </ng-container>\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 <mat-icon [style]=\"gridCardConfig.style?.icon\" *ngFor=\"let action of column.action\"\r\n (click)=\"action?.handler($event, row)\">{{action.icon}}</mat-icon>\r\n </div>\r\n </td>\r\n </ng-template>\r\n <!--table action rows end-->\r\n\r\n </ng-container>\r\n <!--table rows end-->\r\n\r\n\r\n <!--table custom column start-->\r\n <ng-template #customColumn>\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 </ng-template>\r\n <!--table custom column end-->\r\n\r\n </ng-container>\r\n </ng-container>\r\n\r\n\r\n <ng-container matColumnDef=\"expand\">\r\n <th mat-header-cell *matHeaderCellDef aria-label=\"row actions\"> </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 <mat-icon *ngIf=\"expandedElement !== element\">keyboard_arrow_down</mat-icon>\r\n <mat-icon *ngIf=\"expandedElement === element\">keyboard_arrow_up</mat-icon>\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 <ng-container *ngIf=\"element === expandedElement && (chartConfig && chartConfig.length); else noChartData\">\r\n <div *ngFor=\"let config of chartConfig; let i=index\">\r\n <ruc-grid-chart [index]=\"i\" [chartConfig]=\"config\"></ruc-grid-chart>\r\n </div>\r\n </ng-container>\r\n <ng-template #noChartData>\r\n No Chart Data exist for this element\r\n </ng-template>\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 <div *ngIf=\"!ref.children.length\" class=\"grid\">\r\n <ruc-grid-cards *ngFor=\"let data of gridViewData\" class=\"grid-view-container\" [gridItem]=\"data\"\r\n [config]=\"gridCardConfig\" [header]=\"columnConfig\" [data]=\"gridViewData\">\r\n </ruc-grid-cards>\r\n </div>\r\n \r\n </div>\r\n\r\n <mat-paginator (page)=\"pageChangeHandler($event)\" *ngIf=\"gridConfig.pagination\" [pageSizeOptions]=\"[5, 10, 25, 100]\"\r\n aria-label=\"Select page of users\"></mat-paginator>\r\n</div>", 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:whitesmoke}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: "directive", type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i3.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i3.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { 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: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { 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: ["sticky", "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: "component", type: i7.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { 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"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i10.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i10.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i3$2.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i12.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i13.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "component", type: GridCardsComponent, selector: "ruc-grid-cards", inputs: ["data", "gridItem", "config", "header"] }, { kind: "component", type: GridChartComponent, selector: "ruc-grid-chart", inputs: ["index", "chartConfig"] }], animations: [
|
|
343
|
+
trigger('detailExpand', [
|
|
344
|
+
state('collapsed', style({ height: '0px', minHeight: '0' })),
|
|
345
|
+
state('expanded', style({ height: '*' })),
|
|
346
|
+
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
347
|
+
]),
|
|
348
|
+
] });
|
|
349
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibGridListComponent, decorators: [{
|
|
350
|
+
type: Component,
|
|
351
|
+
args: [{ selector: 'uxp-ruclib-grid-list', animations: [
|
|
352
|
+
trigger('detailExpand', [
|
|
353
|
+
state('collapsed', style({ height: '0px', minHeight: '0' })),
|
|
354
|
+
state('expanded', style({ height: '*' })),
|
|
355
|
+
transition('expanded <=> collapsed', animate('225ms cubic-bezier(0.4, 0.0, 0.2, 1)')),
|
|
356
|
+
]),
|
|
357
|
+
], template: "<div class=\"grid-list-container\" class={{customTheme}}>\r\n <div class=\"header-container\">\r\n <mat-form-field *ngIf=\"gridConfig.showFilter\" appearance=\"outline\">\r\n <input matInput [(ngModel)]=\"search\" (keyup)=\"applyFilter($event)\" placeholder=\"Search\">\r\n </mat-form-field>\r\n\r\n <div *ngIf=\"gridConfig.showGridView\" 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 </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 <ng-container matColumnDef=\"select\" *ngIf=\"gridConfig.isSelectable\">\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 <ng-container *ngFor=\"let column of columnConfig\">\r\n <ng-container [matColumnDef]=\"column.name\" [sticky]=\"\">\r\n\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\r\n\r\n <!--table rows start-->\r\n <ng-container *ngIf=\"!column.isCustom; else customColumn\">\r\n <ng-container *ngIf=\"!column.actionColumn; else actionColumn\">\r\n <td #tooltip=\"matTooltip\" matTooltip=\"{{row[column.name]!}}\" mat-cell *matCellDef=\"let row\">\r\n {{row[column.name]!}} </td>\r\n </ng-container>\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 <mat-icon [style]=\"gridCardConfig.style?.icon\" *ngFor=\"let action of column.action\"\r\n (click)=\"action?.handler($event, row)\">{{action.icon}}</mat-icon>\r\n </div>\r\n </td>\r\n </ng-template>\r\n <!--table action rows end-->\r\n\r\n </ng-container>\r\n <!--table rows end-->\r\n\r\n\r\n <!--table custom column start-->\r\n <ng-template #customColumn>\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 </ng-template>\r\n <!--table custom column end-->\r\n\r\n </ng-container>\r\n </ng-container>\r\n\r\n\r\n <ng-container matColumnDef=\"expand\">\r\n <th mat-header-cell *matHeaderCellDef aria-label=\"row actions\"> </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 <mat-icon *ngIf=\"expandedElement !== element\">keyboard_arrow_down</mat-icon>\r\n <mat-icon *ngIf=\"expandedElement === element\">keyboard_arrow_up</mat-icon>\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 <ng-container *ngIf=\"element === expandedElement && (chartConfig && chartConfig.length); else noChartData\">\r\n <div *ngFor=\"let config of chartConfig; let i=index\">\r\n <ruc-grid-chart [index]=\"i\" [chartConfig]=\"config\"></ruc-grid-chart>\r\n </div>\r\n </ng-container>\r\n <ng-template #noChartData>\r\n No Chart Data exist for this element\r\n </ng-template>\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 <div *ngIf=\"!ref.children.length\" class=\"grid\">\r\n <ruc-grid-cards *ngFor=\"let data of gridViewData\" class=\"grid-view-container\" [gridItem]=\"data\"\r\n [config]=\"gridCardConfig\" [header]=\"columnConfig\" [data]=\"gridViewData\">\r\n </ruc-grid-cards>\r\n </div>\r\n \r\n </div>\r\n\r\n <mat-paginator (page)=\"pageChangeHandler($event)\" *ngIf=\"gridConfig.pagination\" [pageSizeOptions]=\"[5, 10, 25, 100]\"\r\n aria-label=\"Select page of users\"></mat-paginator>\r\n</div>", 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:whitesmoke}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"] }]
|
|
358
|
+
}], ctorParameters: function () { return [{ type: i1.MatDialog }, { type: GridListService }]; }, propDecorators: { paginator: [{
|
|
359
|
+
type: ViewChild,
|
|
360
|
+
args: [MatPaginator]
|
|
361
|
+
}], sort: [{
|
|
362
|
+
type: ViewChild,
|
|
363
|
+
args: [MatSort]
|
|
364
|
+
}], cellTemplate: [{
|
|
365
|
+
type: ContentChildren,
|
|
366
|
+
args: [GridColumnComponent]
|
|
367
|
+
}], rowExpanded: [{
|
|
368
|
+
type: Output
|
|
369
|
+
}], columnConfig: [{
|
|
370
|
+
type: Input
|
|
371
|
+
}], inputData: [{
|
|
372
|
+
type: Input
|
|
373
|
+
}], gridConfig: [{
|
|
374
|
+
type: Input
|
|
375
|
+
}], chartConfig: [{
|
|
376
|
+
type: Input
|
|
377
|
+
}], customTheme: [{
|
|
378
|
+
type: Input
|
|
379
|
+
}], rucInputData: [{
|
|
380
|
+
type: Input
|
|
381
|
+
}], infoClicked: [{
|
|
382
|
+
type: Output
|
|
383
|
+
}], rucEvent: [{
|
|
384
|
+
type: Output
|
|
385
|
+
}] } });
|
|
386
|
+
|
|
387
|
+
class RuclibGridListModule {
|
|
388
|
+
}
|
|
389
|
+
RuclibGridListModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibGridListModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
390
|
+
RuclibGridListModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: RuclibGridListModule, declarations: [RuclibGridListComponent,
|
|
391
|
+
GridColumnComponent,
|
|
392
|
+
GridCardsComponent,
|
|
393
|
+
GridChartComponent,
|
|
394
|
+
RucGridChartDialogComponent], imports: [CommonModule,
|
|
395
|
+
FormsModule,
|
|
396
|
+
MatFormFieldModule,
|
|
397
|
+
MatTableModule,
|
|
398
|
+
MatPaginatorModule,
|
|
399
|
+
MatInputModule,
|
|
400
|
+
MatIconModule,
|
|
401
|
+
MatSortModule,
|
|
402
|
+
MatCardModule,
|
|
403
|
+
MatButtonModule,
|
|
404
|
+
ReactiveFormsModule,
|
|
405
|
+
MatCheckboxModule,
|
|
406
|
+
MatTooltipModule,
|
|
407
|
+
MatDialogModule], exports: [RuclibGridListComponent, GridColumnComponent] });
|
|
408
|
+
RuclibGridListModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibGridListModule, imports: [CommonModule,
|
|
409
|
+
FormsModule,
|
|
410
|
+
MatFormFieldModule,
|
|
411
|
+
MatTableModule,
|
|
412
|
+
MatPaginatorModule,
|
|
413
|
+
MatInputModule,
|
|
414
|
+
MatIconModule,
|
|
415
|
+
MatSortModule,
|
|
416
|
+
MatCardModule,
|
|
417
|
+
MatButtonModule,
|
|
418
|
+
ReactiveFormsModule,
|
|
419
|
+
MatCheckboxModule,
|
|
420
|
+
MatTooltipModule,
|
|
421
|
+
MatDialogModule] });
|
|
422
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: RuclibGridListModule, decorators: [{
|
|
423
|
+
type: NgModule,
|
|
424
|
+
args: [{
|
|
425
|
+
declarations: [
|
|
426
|
+
RuclibGridListComponent,
|
|
427
|
+
GridColumnComponent,
|
|
428
|
+
GridCardsComponent,
|
|
429
|
+
GridChartComponent,
|
|
430
|
+
RucGridChartDialogComponent
|
|
431
|
+
],
|
|
432
|
+
imports: [CommonModule,
|
|
433
|
+
FormsModule,
|
|
434
|
+
MatFormFieldModule,
|
|
435
|
+
MatTableModule,
|
|
436
|
+
MatPaginatorModule,
|
|
437
|
+
MatInputModule,
|
|
438
|
+
MatIconModule,
|
|
439
|
+
MatSortModule,
|
|
440
|
+
MatCardModule,
|
|
441
|
+
MatButtonModule,
|
|
442
|
+
ReactiveFormsModule,
|
|
443
|
+
MatCheckboxModule,
|
|
444
|
+
MatTooltipModule,
|
|
445
|
+
MatDialogModule,
|
|
446
|
+
],
|
|
447
|
+
exports: [RuclibGridListComponent, GridColumnComponent]
|
|
448
|
+
}]
|
|
449
|
+
}] });
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Generated bundle index. Do not edit.
|
|
453
|
+
*/
|
|
454
|
+
|
|
455
|
+
export { GridCardConfig, GridCardStyle, GridCardsComponent, GridColumnComponent, GridColumnConfig, GridConfig, GridListActions, GridListService, RuclibGridListComponent, RuclibGridListModule };
|
|
456
|
+
//# sourceMappingURL=ruc-lib-grid-list.mjs.map
|