@trudb/tru-common-lib 0.1.969 → 0.1.971
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.
|
@@ -3348,6 +3348,12 @@ const SELECT_ALL_ICON = `
|
|
|
3348
3348
|
<svg height="20px" fill="#000000" width="20px" x="0px" y="0px" viewBox="0 -10 100 125" enable-background="new 0 0 100 100" xml:space="preserve"><g><path d="M99,99H2.598L99,2.598V99z"/></g></svg>
|
|
3349
3349
|
`;
|
|
3350
3350
|
const DESC_SORT_ICON = `
|
|
3351
|
+
<svg height="20px" viewBox="0 -960 960 960" width="20px" fill="#e3e3e3"><path d="M480-96 216-360l51-51 177 177v-630h72v630l177-177 51 51L480-96Z"/></svg>
|
|
3352
|
+
`;
|
|
3353
|
+
const ASC_SORT_ICON = `
|
|
3354
|
+
<svg height="20px" viewBox="0 -960 960 960" width="20px" fill="#e3e3e3"><path d="M444-144v-534l-57 57-51-51 144-144 144 144-51 51-57-57v534h-72Z"/></svg>
|
|
3355
|
+
`;
|
|
3356
|
+
const DESC_SORT_MENU_ICON = `
|
|
3351
3357
|
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3352
3358
|
<!-- "Z" shape in gray -->
|
|
3353
3359
|
<text x="2" y="8" font-family="Segoe UI, Arial" font-size="7" fill="#444" font-weight="bold">Z</text>
|
|
@@ -3358,7 +3364,7 @@ const DESC_SORT_ICON = `
|
|
|
3358
3364
|
<path d="M10.5 12L12.5 14L14.5 12" stroke="#444" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
|
|
3359
3365
|
</svg>
|
|
3360
3366
|
`;
|
|
3361
|
-
const
|
|
3367
|
+
const ASC_SORT_MENU_ICON = `
|
|
3362
3368
|
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3363
3369
|
<!-- A -->
|
|
3364
3370
|
<text x="2" y="8" font-family="Segoe UI, Arial" font-size="7" fill="#1976D2" font-weight="bold">A</text>
|
|
@@ -3417,6 +3423,8 @@ class TruIconModule {
|
|
|
3417
3423
|
iconRegistry.addSvgIconLiteral("select-all-icon", sanitizer.bypassSecurityTrustHtml(SELECT_ALL_ICON));
|
|
3418
3424
|
iconRegistry.addSvgIconLiteral("asc-sort-icon", sanitizer.bypassSecurityTrustHtml(ASC_SORT_ICON));
|
|
3419
3425
|
iconRegistry.addSvgIconLiteral("desc-sort-icon", sanitizer.bypassSecurityTrustHtml(DESC_SORT_ICON));
|
|
3426
|
+
iconRegistry.addSvgIconLiteral("asc-sort-menu-icon", sanitizer.bypassSecurityTrustHtml(ASC_SORT_MENU_ICON));
|
|
3427
|
+
iconRegistry.addSvgIconLiteral("desc-sort-menu-icon", sanitizer.bypassSecurityTrustHtml(DESC_SORT_MENU_ICON));
|
|
3420
3428
|
iconRegistry.addSvgIconLiteral("no-sort-icon", sanitizer.bypassSecurityTrustHtml(NO_SORT_ICON));
|
|
3421
3429
|
iconRegistry.addSvgIconLiteral("filter-icon", sanitizer.bypassSecurityTrustHtml(FILTER_ICON));
|
|
3422
3430
|
iconRegistry.addSvgIconLiteral("change-password-icon", sanitizer.bypassSecurityTrustHtml(CHANGE_PASSWORD_ICON));
|
|
@@ -5900,18 +5908,15 @@ var TruDataGridTypes;
|
|
|
5900
5908
|
class TruDataGridHeader {
|
|
5901
5909
|
headerRef;
|
|
5902
5910
|
params;
|
|
5903
|
-
ascSort =
|
|
5904
|
-
descSort =
|
|
5905
|
-
noSort = 'inactive';
|
|
5911
|
+
ascSort = false;
|
|
5912
|
+
descSort = false;
|
|
5906
5913
|
isHovering = false;
|
|
5907
5914
|
columnMenuIsOpen = false;
|
|
5908
5915
|
showFilterMenu = false;
|
|
5909
5916
|
filterIsActive = false;
|
|
5910
5917
|
agInit(params) {
|
|
5911
5918
|
this.params = params;
|
|
5912
|
-
this.params.column.addEventListener('sortChanged', this.onSortChanged.bind(this));
|
|
5913
5919
|
this.params.api.addEventListener('cellFocused', this.onCellFocused.bind(this));
|
|
5914
|
-
this.onSortChanged();
|
|
5915
5920
|
}
|
|
5916
5921
|
getHeaderParams() {
|
|
5917
5922
|
return this.params;
|
|
@@ -5919,31 +5924,6 @@ class TruDataGridHeader {
|
|
|
5919
5924
|
refresh(params) {
|
|
5920
5925
|
return false;
|
|
5921
5926
|
}
|
|
5922
|
-
onSortChanged() {
|
|
5923
|
-
this.ascSort = this.descSort = this.noSort = 'inactive';
|
|
5924
|
-
if (this.params.column.isSortAscending()) {
|
|
5925
|
-
this.ascSort = 'active';
|
|
5926
|
-
}
|
|
5927
|
-
else if (this.params.column.isSortDescending()) {
|
|
5928
|
-
this.descSort = 'active';
|
|
5929
|
-
}
|
|
5930
|
-
else {
|
|
5931
|
-
this.noSort = 'active';
|
|
5932
|
-
}
|
|
5933
|
-
}
|
|
5934
|
-
onSortRequested(event) {
|
|
5935
|
-
var order = null;
|
|
5936
|
-
if (this.params.column.isSortAscending()) {
|
|
5937
|
-
order = 'desc';
|
|
5938
|
-
}
|
|
5939
|
-
else if (this.params.column.isSortDescending()) {
|
|
5940
|
-
order = null;
|
|
5941
|
-
}
|
|
5942
|
-
else {
|
|
5943
|
-
order = 'asc';
|
|
5944
|
-
}
|
|
5945
|
-
this.params.setSort(order, event.shiftKey);
|
|
5946
|
-
}
|
|
5947
5927
|
onSelectAllIconClicked() {
|
|
5948
5928
|
this.params.api.selectAll();
|
|
5949
5929
|
}
|
|
@@ -5968,6 +5948,8 @@ class TruDataGridHeader {
|
|
|
5968
5948
|
this.columnMenuIsOpen = false;
|
|
5969
5949
|
this.showFilterMenu = this.isHovering && this.params.api.getDisplayedRowCount() > 0 || this.columnMenuIsOpen || this.params.column.isFilterActive();
|
|
5970
5950
|
this.filterIsActive = this.params.column.isFilterActive();
|
|
5951
|
+
this.ascSort = this.params.column.isSortAscending();
|
|
5952
|
+
this.descSort = this.params.column.isSortDescending();
|
|
5971
5953
|
});
|
|
5972
5954
|
this.columnMenuIsOpen = true;
|
|
5973
5955
|
}
|
|
@@ -5987,7 +5969,6 @@ class TruDataGridHeader {
|
|
|
5987
5969
|
this.filterIsActive = this.params.column.isFilterActive();
|
|
5988
5970
|
}
|
|
5989
5971
|
ngOnDestroy() {
|
|
5990
|
-
this.params.column.removeEventListener('sortChanged', this.onSortChanged.bind(this));
|
|
5991
5972
|
this.params.api.removeEventListener('cellFocused', this.onCellFocused.bind(this));
|
|
5992
5973
|
}
|
|
5993
5974
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGridHeader, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -6000,13 +5981,15 @@ class TruDataGridHeader {
|
|
|
6000
5981
|
</div>
|
|
6001
5982
|
<div class="ag-header-control-filter-container" *ngIf="showFilterMenu">
|
|
6002
5983
|
<span ref="eFilterButton" class="ag-filter-icon" (click)="onFilterMenuButtonClicked($event)">
|
|
6003
|
-
<mat-icon class="ag-header-more" [svgIcon]="'more-icon'" *ngIf="!filterIsActive
|
|
6004
|
-
<mat-icon class="ag-header-
|
|
5984
|
+
<mat-icon class="ag-header-more" [svgIcon]="'more-icon'" *ngIf="!filterIsActive && !ascSort && !descSort"></mat-icon>
|
|
5985
|
+
<mat-icon class="ag-header-asc" [svgIcon]="'asc-sort-icon'" [ngClass]="{'filtering': filterIsActive}" *ngIf="ascSort"></mat-icon>
|
|
5986
|
+
<mat-icon class="ag-header-desc" [svgIcon]="'desc-sort-icon'" [ngClass]="{'filtering': filterIsActive}" *ngIf="descSort"></mat-icon>
|
|
5987
|
+
<mat-icon class="ag-header-filter" [svgIcon]="'filter-icon'" *ngIf="filterIsActive"></mat-icon>
|
|
6005
5988
|
</span>
|
|
6006
5989
|
</div>
|
|
6007
5990
|
</div>
|
|
6008
5991
|
</div>
|
|
6009
|
-
</div>`, isInline: true, styles: [".ag-header-control-container{display:flex}.ag-header-control-filter-container{position:absolute;top:1px;right:3px;width:20px;height:20px}.ag-header-cell-text{position:relative;pointer-events:none;vertical-align:middle;vertical-align:-webkit-baseline-middle}.ag-sort-icon{height:100%;width:100%;margin-left:0!important}.tru-data-grid-select-all-icon{width:16px;font-size:28px;color:#ddd;float:right;position:absolute;top:-1px;right:4px}.ag-sort-icon mat-icon{height:16px;width:16px;padding-top:4px}.ag-column-focus .ag-header-cell-text{color:#3f51b5;font-weight:700}.ag-column-focus{background-color:#ddd;border-bottom:1px solid #3f51b5}::ng-deep .tru-data-grid-select-all-icon path{fill:#d3d3d3;position:relative;z-index:100;pointer-events:all}::ng-deep .ag-header-control-filter-container mat-icon{height:20px!important;width:20px!important;padding-top:2px!important}::ng-deep .ag-filter-icon mat-icon{height:18px!important;width:18px!important;color:#ddd}::ng-deep .ag-filter-icon mat-icon svg{fill:#949494!important}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
5992
|
+
</div>`, isInline: true, styles: [".ag-header-control-container{display:flex}.ag-header-control-filter-container{position:absolute;top:1px;right:3px;width:20px;height:20px}.ag-header-cell-text{position:relative;pointer-events:none;vertical-align:middle;vertical-align:-webkit-baseline-middle}.ag-sort-icon{height:100%;width:100%;margin-left:0!important}.tru-data-grid-select-all-icon{width:16px;font-size:28px;color:#ddd;float:right;position:absolute;top:-1px;right:4px}.ag-sort-icon mat-icon{height:16px;width:16px;padding-top:4px}.ag-column-focus .ag-header-cell-text{color:#3f51b5;font-weight:700}.ag-column-focus{background-color:#ddd;border-bottom:1px solid #3f51b5}::ng-deep .tru-data-grid-select-all-icon path{fill:#d3d3d3;position:relative;z-index:100;pointer-events:all}::ng-deep .ag-header-control-filter-container mat-icon{height:20px!important;width:20px!important;padding-top:2px!important}::ng-deep .ag-filter-icon{display:table;position:relative}::ng-deep .ag-filter-icon .ag-header-asc.filtering{right:-5px}::ng-deep .ag-filter-icon .ag-header-desc.filtering{right:-5px}::ng-deep .ag-filter-icon mat-icon{height:18px!important;width:18px!important;color:#ddd}::ng-deep .ag-filter-icon mat-icon svg{fill:#949494!important}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
|
|
6010
5993
|
}
|
|
6011
5994
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImport: i0, type: TruDataGridHeader, decorators: [{
|
|
6012
5995
|
type: Component,
|
|
@@ -6019,13 +6002,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.3", ngImpor
|
|
|
6019
6002
|
</div>
|
|
6020
6003
|
<div class="ag-header-control-filter-container" *ngIf="showFilterMenu">
|
|
6021
6004
|
<span ref="eFilterButton" class="ag-filter-icon" (click)="onFilterMenuButtonClicked($event)">
|
|
6022
|
-
<mat-icon class="ag-header-more" [svgIcon]="'more-icon'" *ngIf="!filterIsActive
|
|
6023
|
-
<mat-icon class="ag-header-
|
|
6005
|
+
<mat-icon class="ag-header-more" [svgIcon]="'more-icon'" *ngIf="!filterIsActive && !ascSort && !descSort"></mat-icon>
|
|
6006
|
+
<mat-icon class="ag-header-asc" [svgIcon]="'asc-sort-icon'" [ngClass]="{'filtering': filterIsActive}" *ngIf="ascSort"></mat-icon>
|
|
6007
|
+
<mat-icon class="ag-header-desc" [svgIcon]="'desc-sort-icon'" [ngClass]="{'filtering': filterIsActive}" *ngIf="descSort"></mat-icon>
|
|
6008
|
+
<mat-icon class="ag-header-filter" [svgIcon]="'filter-icon'" *ngIf="filterIsActive"></mat-icon>
|
|
6024
6009
|
</span>
|
|
6025
6010
|
</div>
|
|
6026
6011
|
</div>
|
|
6027
6012
|
</div>
|
|
6028
|
-
</div>`, styles: [".ag-header-control-container{display:flex}.ag-header-control-filter-container{position:absolute;top:1px;right:3px;width:20px;height:20px}.ag-header-cell-text{position:relative;pointer-events:none;vertical-align:middle;vertical-align:-webkit-baseline-middle}.ag-sort-icon{height:100%;width:100%;margin-left:0!important}.tru-data-grid-select-all-icon{width:16px;font-size:28px;color:#ddd;float:right;position:absolute;top:-1px;right:4px}.ag-sort-icon mat-icon{height:16px;width:16px;padding-top:4px}.ag-column-focus .ag-header-cell-text{color:#3f51b5;font-weight:700}.ag-column-focus{background-color:#ddd;border-bottom:1px solid #3f51b5}::ng-deep .tru-data-grid-select-all-icon path{fill:#d3d3d3;position:relative;z-index:100;pointer-events:all}::ng-deep .ag-header-control-filter-container mat-icon{height:20px!important;width:20px!important;padding-top:2px!important}::ng-deep .ag-filter-icon mat-icon{height:18px!important;width:18px!important;color:#ddd}::ng-deep .ag-filter-icon mat-icon svg{fill:#949494!important}\n"] }]
|
|
6013
|
+
</div>`, styles: [".ag-header-control-container{display:flex}.ag-header-control-filter-container{position:absolute;top:1px;right:3px;width:20px;height:20px}.ag-header-cell-text{position:relative;pointer-events:none;vertical-align:middle;vertical-align:-webkit-baseline-middle}.ag-sort-icon{height:100%;width:100%;margin-left:0!important}.tru-data-grid-select-all-icon{width:16px;font-size:28px;color:#ddd;float:right;position:absolute;top:-1px;right:4px}.ag-sort-icon mat-icon{height:16px;width:16px;padding-top:4px}.ag-column-focus .ag-header-cell-text{color:#3f51b5;font-weight:700}.ag-column-focus{background-color:#ddd;border-bottom:1px solid #3f51b5}::ng-deep .tru-data-grid-select-all-icon path{fill:#d3d3d3;position:relative;z-index:100;pointer-events:all}::ng-deep .ag-header-control-filter-container mat-icon{height:20px!important;width:20px!important;padding-top:2px!important}::ng-deep .ag-filter-icon{display:table;position:relative}::ng-deep .ag-filter-icon .ag-header-asc.filtering{right:-5px}::ng-deep .ag-filter-icon .ag-header-desc.filtering{right:-5px}::ng-deep .ag-filter-icon mat-icon{height:18px!important;width:18px!important;color:#ddd}::ng-deep .ag-filter-icon mat-icon svg{fill:#949494!important}\n"] }]
|
|
6029
6014
|
}], propDecorators: { headerRef: [{
|
|
6030
6015
|
type: ViewChild,
|
|
6031
6016
|
args: ['header', { static: false }]
|
|
@@ -6047,14 +6032,14 @@ class TruDataGridHeaderFilter {
|
|
|
6047
6032
|
label: 'Sort A to Z',
|
|
6048
6033
|
selected: false,
|
|
6049
6034
|
display: () => { return !this.filterParams.column.isSortAscending(); },
|
|
6050
|
-
icon: 'asc-sort-icon'
|
|
6035
|
+
icon: 'asc-sort-menu-icon'
|
|
6051
6036
|
},
|
|
6052
6037
|
{
|
|
6053
6038
|
value: 'desc',
|
|
6054
6039
|
label: 'Sort Z to A',
|
|
6055
6040
|
selected: false,
|
|
6056
6041
|
display: () => { return !this.filterParams.column.isSortDescending(); },
|
|
6057
|
-
icon: 'desc-sort-
|
|
6042
|
+
icon: 'desc-sort-menu_icon'
|
|
6058
6043
|
},
|
|
6059
6044
|
{
|
|
6060
6045
|
value: null,
|