@nettyapps/ntybase 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/nettyapps-ntybase.mjs +369 -207
- package/fesm2022/nettyapps-ntybase.mjs.map +1 -1
- package/index.d.ts +77 -25
- package/package.json +3 -3
- package/nettyapps-ntybase-0.0.1.tgz +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Injectable, inject, NgModule, Inject, signal, input, output, computed, effect, model,
|
|
2
|
+
import { Component, Injectable, inject, NgModule, Inject, signal, input, output, computed, effect, model, ViewChild, ViewContainerRef, Input, ViewEncapsulation, forwardRef, ChangeDetectionStrategy } from '@angular/core';
|
|
3
3
|
import * as i1$2 from '@angular/common/http';
|
|
4
4
|
import { HttpErrorResponse, HttpResponse, HTTP_INTERCEPTORS, HttpClient, HttpHeaders } from '@angular/common/http';
|
|
5
5
|
import { of, throwError, lastValueFrom, map, catchError as catchError$1, Subject, finalize, take as take$1, takeUntil } from 'rxjs';
|
|
@@ -29,6 +29,7 @@ import * as i3$2 from '@angular/material/tooltip';
|
|
|
29
29
|
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
30
30
|
import * as i3$3 from '@angular/material/menu';
|
|
31
31
|
import { MatMenuModule, MatMenuTrigger } from '@angular/material/menu';
|
|
32
|
+
import * as XLSX from 'xlsx';
|
|
32
33
|
import * as i1$3 from '@angular/forms';
|
|
33
34
|
import { FormBuilder, Validators, FormsModule, ReactiveFormsModule, FormControl, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
34
35
|
import * as i1$4 from '@angular/material/input';
|
|
@@ -458,8 +459,21 @@ class AlertService {
|
|
|
458
459
|
});
|
|
459
460
|
}
|
|
460
461
|
// For error notifications
|
|
461
|
-
showError(
|
|
462
|
-
|
|
462
|
+
showError(error, duration = 5000) {
|
|
463
|
+
let errorMessage;
|
|
464
|
+
if (typeof error === 'string') {
|
|
465
|
+
errorMessage = error;
|
|
466
|
+
}
|
|
467
|
+
else if (error.message) {
|
|
468
|
+
errorMessage = error.message;
|
|
469
|
+
}
|
|
470
|
+
else if (error.error && typeof error.error === 'string') {
|
|
471
|
+
errorMessage = error.error;
|
|
472
|
+
}
|
|
473
|
+
else {
|
|
474
|
+
errorMessage = JSON.stringify(error);
|
|
475
|
+
}
|
|
476
|
+
this.snackBar.open(this.translate.instant(errorMessage), this.translate.instant('@btnOK'), {
|
|
463
477
|
duration,
|
|
464
478
|
panelClass: ['error-snackbar'],
|
|
465
479
|
horizontalPosition: 'right',
|
|
@@ -477,14 +491,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
477
491
|
}], ctorParameters: () => [{ type: i1$1.MatSnackBar }, { type: i1.MatDialog }, { type: i3$1.TranslateService }] });
|
|
478
492
|
|
|
479
493
|
class CommonService {
|
|
494
|
+
// Services
|
|
480
495
|
router = inject(Router);
|
|
481
496
|
location = inject(Location);
|
|
482
497
|
datePipe = inject(DatePipe);
|
|
483
498
|
alertService = inject(AlertService);
|
|
499
|
+
dialog = inject(MatDialog);
|
|
500
|
+
// Right sidenav
|
|
484
501
|
rightSidenavOpen = signal(false, ...(ngDevMode ? [{ debugName: "rightSidenavOpen" }] : []));
|
|
485
502
|
toggleRightSidenav(open) {
|
|
486
503
|
this.rightSidenavOpen.set(open);
|
|
487
504
|
}
|
|
505
|
+
/**
|
|
506
|
+
* Normalizes Turkish text for search and comparison operations by converting
|
|
507
|
+
* Turkish special characters to their English equivalents and lowercasing.
|
|
508
|
+
*
|
|
509
|
+
*/
|
|
488
510
|
normalizeTurkish(text) {
|
|
489
511
|
return text
|
|
490
512
|
.toLocaleLowerCase('tr-TR')
|
|
@@ -500,9 +522,42 @@ class CommonService {
|
|
|
500
522
|
*/
|
|
501
523
|
getCleanUrlPath() {
|
|
502
524
|
const tree = this.router.parseUrl(this.router.url);
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
525
|
+
const segments = tree.root.children['primary']?.segments || [];
|
|
526
|
+
if (segments.length >= 2) {
|
|
527
|
+
return segments
|
|
528
|
+
.slice(0, 2)
|
|
529
|
+
.map((s) => s.path)
|
|
530
|
+
.join('/');
|
|
531
|
+
}
|
|
532
|
+
return '/';
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* Clears the right sidenav outlet and resets the UI state.
|
|
536
|
+
* Removes the right sidenav route while keeping the main content and query parameters.
|
|
537
|
+
* Also collapses the sidenav and closes any open dialogs.
|
|
538
|
+
*/
|
|
539
|
+
clearOutlet() {
|
|
540
|
+
const currentUrl = this.router.parseUrl(this.router.url);
|
|
541
|
+
const primaryOutlet = currentUrl.root.children['primary'];
|
|
542
|
+
const rightSidenavOutlet = currentUrl.root.children['rightSidenav'];
|
|
543
|
+
if (rightSidenavOutlet) {
|
|
544
|
+
this.router.navigate([
|
|
545
|
+
{
|
|
546
|
+
outlets: {
|
|
547
|
+
rightSidenav: null,
|
|
548
|
+
primary: primaryOutlet ? primaryOutlet.toString() : null,
|
|
549
|
+
},
|
|
550
|
+
},
|
|
551
|
+
], {
|
|
552
|
+
queryParamsHandling: 'preserve',
|
|
553
|
+
replaceUrl: true,
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
this.toggleRightSidenav(false);
|
|
557
|
+
this.dialog.closeAll();
|
|
558
|
+
}
|
|
559
|
+
ngOnDestroy() {
|
|
560
|
+
this.clearOutlet();
|
|
506
561
|
}
|
|
507
562
|
/** Merge columns with the given seperator
|
|
508
563
|
*
|
|
@@ -927,6 +982,152 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
927
982
|
}]
|
|
928
983
|
}], ctorParameters: () => [{ type: i1$2.HttpClient }, { type: i2$1.EnvironmentProxy }] });
|
|
929
984
|
|
|
985
|
+
class ButtonRenderer {
|
|
986
|
+
params = null;
|
|
987
|
+
label = '';
|
|
988
|
+
type = '';
|
|
989
|
+
toggleValue = null;
|
|
990
|
+
editValid = false;
|
|
991
|
+
historyValid = false;
|
|
992
|
+
lineValid = false;
|
|
993
|
+
popupSelectValid = false;
|
|
994
|
+
popupEditValid = false;
|
|
995
|
+
toggleValid = false;
|
|
996
|
+
toggle_icon = '';
|
|
997
|
+
none = false;
|
|
998
|
+
addValid = false;
|
|
999
|
+
deleteValid = false;
|
|
1000
|
+
agInit(params) {
|
|
1001
|
+
this.params = params;
|
|
1002
|
+
this.type = this.params.type || null;
|
|
1003
|
+
this.label = this.params.label || null;
|
|
1004
|
+
this.toggleValue = this.params.value || null;
|
|
1005
|
+
switch (this.toggleValue) {
|
|
1006
|
+
case true:
|
|
1007
|
+
this.toggle_icon = 'select_check_box';
|
|
1008
|
+
break;
|
|
1009
|
+
case false:
|
|
1010
|
+
this.toggle_icon = 'check_box_outline_blank';
|
|
1011
|
+
break;
|
|
1012
|
+
default:
|
|
1013
|
+
this.toggle_icon = '';
|
|
1014
|
+
break;
|
|
1015
|
+
}
|
|
1016
|
+
this.resetValids();
|
|
1017
|
+
switch (this.type.toLowerCase().trim()) {
|
|
1018
|
+
case 'edit':
|
|
1019
|
+
this.editValid = true;
|
|
1020
|
+
break;
|
|
1021
|
+
case 'log':
|
|
1022
|
+
this.historyValid = true;
|
|
1023
|
+
break;
|
|
1024
|
+
case 'line':
|
|
1025
|
+
this.lineValid = true;
|
|
1026
|
+
break;
|
|
1027
|
+
case 'popupselect':
|
|
1028
|
+
this.popupSelectValid = true;
|
|
1029
|
+
break;
|
|
1030
|
+
case 'toggle':
|
|
1031
|
+
this.toggleValid = true;
|
|
1032
|
+
break;
|
|
1033
|
+
case 'none':
|
|
1034
|
+
this.none = true;
|
|
1035
|
+
break;
|
|
1036
|
+
case 'add':
|
|
1037
|
+
this.addValid = true;
|
|
1038
|
+
break;
|
|
1039
|
+
case 'delete':
|
|
1040
|
+
this.deleteValid = true;
|
|
1041
|
+
break;
|
|
1042
|
+
default:
|
|
1043
|
+
this.popupEditValid = true;
|
|
1044
|
+
break;
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
/** Refresh the display
|
|
1048
|
+
*
|
|
1049
|
+
* @param params
|
|
1050
|
+
* @returns
|
|
1051
|
+
*/
|
|
1052
|
+
refresh(params) {
|
|
1053
|
+
return false;
|
|
1054
|
+
}
|
|
1055
|
+
resetValids() {
|
|
1056
|
+
this.editValid = false;
|
|
1057
|
+
this.historyValid = false;
|
|
1058
|
+
this.lineValid = false;
|
|
1059
|
+
this.popupSelectValid = false;
|
|
1060
|
+
this.popupEditValid = false;
|
|
1061
|
+
this.toggleValid = false;
|
|
1062
|
+
}
|
|
1063
|
+
onClick(event) {
|
|
1064
|
+
if (this.params.onClick instanceof Function) {
|
|
1065
|
+
// put anything into params u want pass into parents component
|
|
1066
|
+
const params = {
|
|
1067
|
+
event: event,
|
|
1068
|
+
rowData: this.params.node.data,
|
|
1069
|
+
type: this.type,
|
|
1070
|
+
// ...something
|
|
1071
|
+
};
|
|
1072
|
+
this.params.onClick(params);
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ButtonRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1076
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: ButtonRenderer, isStandalone: true, selector: "ntybase-button-renderer", ngImport: i0, template: "<mat-icon\n *ngIf=\"(editValid || popupEditValid)\"\n class=\"cursor center edit\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"4000\"\n >edit</mat-icon\n>\n\n<mat-icon\n *ngIf=\"historyValid\"\n class=\"cursor center-log\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >log</mat-icon\n>\n\n<mat-icon\n *ngIf=\"historyValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >history</mat-icon\n>\n<mat-icon\n *ngIf=\"lineValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n<mat-icon\n *ngIf=\"popupSelectValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >content_copy</mat-icon\n>\n<mat-icon\n *ngIf=\"toggleValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >{{toggleValue ? 'check_box' : 'check_box_outline_blank'}}</mat-icon\n>\n<mat-icon\n *ngIf=\"none\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n<mat-icon\n *ngIf=\"addValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >playlist_add</mat-icon\n>\n<mat-icon\n *ngIf=\"deleteValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >delete_outline</mat-icon\n>\n", styles: [".cursor{cursor:pointer}.center{display:flex;justify-content:center;align-items:center;width:100%}.center-log{display:flex;justify-content:center;align-items:center;margin-bottom:-12px}.edit{margin-top:8px}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatMenuModule }] });
|
|
1077
|
+
}
|
|
1078
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ButtonRenderer, decorators: [{
|
|
1079
|
+
type: Component,
|
|
1080
|
+
args: [{ selector: 'ntybase-button-renderer', imports: [MatIconModule, CommonModule, MatTooltipModule, MatMenuModule], template: "<mat-icon\n *ngIf=\"(editValid || popupEditValid)\"\n class=\"cursor center edit\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"4000\"\n >edit</mat-icon\n>\n\n<mat-icon\n *ngIf=\"historyValid\"\n class=\"cursor center-log\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >log</mat-icon\n>\n\n<mat-icon\n *ngIf=\"historyValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >history</mat-icon\n>\n<mat-icon\n *ngIf=\"lineValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n<mat-icon\n *ngIf=\"popupSelectValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >content_copy</mat-icon\n>\n<mat-icon\n *ngIf=\"toggleValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >{{toggleValue ? 'check_box' : 'check_box_outline_blank'}}</mat-icon\n>\n<mat-icon\n *ngIf=\"none\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n<mat-icon\n *ngIf=\"addValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >playlist_add</mat-icon\n>\n<mat-icon\n *ngIf=\"deleteValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >delete_outline</mat-icon\n>\n", styles: [".cursor{cursor:pointer}.center{display:flex;justify-content:center;align-items:center;width:100%}.center-log{display:flex;justify-content:center;align-items:center;margin-bottom:-12px}.edit{margin-top:8px}\n"] }]
|
|
1081
|
+
}] });
|
|
1082
|
+
|
|
1083
|
+
class CheckboxRenderer {
|
|
1084
|
+
params = null;
|
|
1085
|
+
label = '';
|
|
1086
|
+
type = '';
|
|
1087
|
+
supportClick = false;
|
|
1088
|
+
checked = null;
|
|
1089
|
+
agInit(params) {
|
|
1090
|
+
this.onProcess(params);
|
|
1091
|
+
}
|
|
1092
|
+
refresh(params) {
|
|
1093
|
+
if (params != null) {
|
|
1094
|
+
this.onProcess(params);
|
|
1095
|
+
}
|
|
1096
|
+
return true;
|
|
1097
|
+
}
|
|
1098
|
+
onProcess(params) {
|
|
1099
|
+
this.params = params;
|
|
1100
|
+
this.checked = this.params.value ?? false;
|
|
1101
|
+
this.type = this.params.type || null;
|
|
1102
|
+
this.label = this.params.label || null;
|
|
1103
|
+
if (this.type != null) {
|
|
1104
|
+
if (this.type.toLowerCase().trim() == 'click') {
|
|
1105
|
+
this.supportClick = true;
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
}
|
|
1109
|
+
onClick(event) {
|
|
1110
|
+
this.checked = !this.checked;
|
|
1111
|
+
if (this.params.onClick instanceof Function) {
|
|
1112
|
+
// put anything into params u want pass into parents component
|
|
1113
|
+
const params = {
|
|
1114
|
+
event: event,
|
|
1115
|
+
rowData: this.params.node.data,
|
|
1116
|
+
type: this.type,
|
|
1117
|
+
checked: this.checked,
|
|
1118
|
+
// ...something
|
|
1119
|
+
};
|
|
1120
|
+
this.params.onClick(params);
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CheckboxRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1124
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: CheckboxRenderer, isStandalone: true, selector: "ntybase-checkbox-renderer", ngImport: i0, template: "<input\n *ngIf=\"supportClick\"\n id=\"checkbox\"\n type=\"checkbox\"\n [checked]=\"checked\"\n (click)=\"onClick($event)\"\n/>\n<input\n *ngIf=\"!supportClick\"\n id=\"checkbox\"\n type=\"checkbox\"\n [checked]=\"params.value\"\n disabled\n/>\n<label for=\"checkbox\">{{label}}</label>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1125
|
+
}
|
|
1126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: CheckboxRenderer, decorators: [{
|
|
1127
|
+
type: Component,
|
|
1128
|
+
args: [{ selector: 'ntybase-checkbox-renderer', imports: [CommonModule], template: "<input\n *ngIf=\"supportClick\"\n id=\"checkbox\"\n type=\"checkbox\"\n [checked]=\"checked\"\n (click)=\"onClick($event)\"\n/>\n<input\n *ngIf=\"!supportClick\"\n id=\"checkbox\"\n type=\"checkbox\"\n [checked]=\"params.value\"\n disabled\n/>\n<label for=\"checkbox\">{{label}}</label>\n" }]
|
|
1129
|
+
}] });
|
|
1130
|
+
|
|
930
1131
|
ModuleRegistry.registerModules([
|
|
931
1132
|
AllCommunityModule,
|
|
932
1133
|
StatusBarModule,
|
|
@@ -950,6 +1151,7 @@ class AgGridBase {
|
|
|
950
1151
|
popupFilterValid = input(false, ...(ngDevMode ? [{ debugName: "popupFilterValid" }] : []));
|
|
951
1152
|
popupValid = input(false, ...(ngDevMode ? [{ debugName: "popupValid" }] : []));
|
|
952
1153
|
params = input('', ...(ngDevMode ? [{ debugName: "params" }] : []));
|
|
1154
|
+
parameters = input('', ...(ngDevMode ? [{ debugName: "parameters" }] : []));
|
|
953
1155
|
// Authentication
|
|
954
1156
|
authenticationList = [];
|
|
955
1157
|
// User access writes
|
|
@@ -1012,8 +1214,8 @@ class AgGridBase {
|
|
|
1012
1214
|
sortable: true,
|
|
1013
1215
|
resizable: true,
|
|
1014
1216
|
filter: true,
|
|
1015
|
-
minWidth:
|
|
1016
|
-
maxWidth:
|
|
1217
|
+
minWidth: 60,
|
|
1218
|
+
maxWidth: 60,
|
|
1017
1219
|
suppressSizeToFit: true,
|
|
1018
1220
|
colId: 'editColumn',
|
|
1019
1221
|
cellRenderer: 'buttonRenderer',
|
|
@@ -1231,6 +1433,37 @@ class AgGridBase {
|
|
|
1231
1433
|
{ statusPanel: 'agAggregationComponent' },
|
|
1232
1434
|
],
|
|
1233
1435
|
};
|
|
1436
|
+
/**
|
|
1437
|
+
* Component initialization lifecycle hook
|
|
1438
|
+
*/
|
|
1439
|
+
async ngOnInit() {
|
|
1440
|
+
await this.setAccessRights();
|
|
1441
|
+
const savedSearchValue = sessionStorage.getItem(this.searchValueName());
|
|
1442
|
+
if (savedSearchValue) {
|
|
1443
|
+
this.searchValue.set(savedSearchValue);
|
|
1444
|
+
this.loadData(savedSearchValue);
|
|
1445
|
+
}
|
|
1446
|
+
else {
|
|
1447
|
+
this.loadData();
|
|
1448
|
+
}
|
|
1449
|
+
// Load user grid preferences
|
|
1450
|
+
await this.nettyAgGridService.copyGridUserPereferenceToLocal(this.preferenceType());
|
|
1451
|
+
}
|
|
1452
|
+
/**
|
|
1453
|
+
* Handle input changes for route parameters
|
|
1454
|
+
*/
|
|
1455
|
+
ngOnChanges(changes) {
|
|
1456
|
+
if (changes['parameters']) {
|
|
1457
|
+
const parameters = changes['parameters'].currentValue;
|
|
1458
|
+
if (parameters) {
|
|
1459
|
+
this.params =
|
|
1460
|
+
typeof parameters === 'string' ? JSON.parse(parameters) : parameters;
|
|
1461
|
+
}
|
|
1462
|
+
else {
|
|
1463
|
+
this.commonService.clearOutlet();
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
}
|
|
1234
1467
|
// Common grid ready handler
|
|
1235
1468
|
onGridReady(params) {
|
|
1236
1469
|
this.gridApi = params.api;
|
|
@@ -1277,32 +1510,6 @@ class AgGridBase {
|
|
|
1277
1510
|
backClicked() {
|
|
1278
1511
|
this.commonService.goBack();
|
|
1279
1512
|
}
|
|
1280
|
-
async deleteSelected() {
|
|
1281
|
-
if (!this.gridApi)
|
|
1282
|
-
return;
|
|
1283
|
-
const selectedNodes = this.gridApi.getSelectedNodes();
|
|
1284
|
-
if (selectedNodes.length === 0) {
|
|
1285
|
-
await this.alertService.showAlert('@PleaseSelectRowToDelete');
|
|
1286
|
-
return;
|
|
1287
|
-
}
|
|
1288
|
-
const confirmed = await this.alertService.showConfirm('@ConfirmDeleteSelectedRecords');
|
|
1289
|
-
if (confirmed) {
|
|
1290
|
-
const selectedRows = selectedNodes.map((node) => node.data);
|
|
1291
|
-
this.deleteRows(selectedRows);
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
async refreshData() {
|
|
1295
|
-
try {
|
|
1296
|
-
const freshData = await this.loadFreshData();
|
|
1297
|
-
if (this.gridApi?.setGridOption) {
|
|
1298
|
-
this.gridApi.setGridOption('rowData', freshData);
|
|
1299
|
-
}
|
|
1300
|
-
await this.alertService.showAlert('@DataRefreshedSuccessfully');
|
|
1301
|
-
}
|
|
1302
|
-
catch (err) {
|
|
1303
|
-
this.alertService.showError(err);
|
|
1304
|
-
}
|
|
1305
|
-
}
|
|
1306
1513
|
gotoURL(routePrefix, rightSidenav = [], parameters, type, isNewTab = false, embedded = false, dialogComponent) {
|
|
1307
1514
|
const navigationExtras = {
|
|
1308
1515
|
queryParams: {
|
|
@@ -1333,7 +1540,7 @@ class AgGridBase {
|
|
|
1333
1540
|
.afterClosed()
|
|
1334
1541
|
.subscribe((result) => {
|
|
1335
1542
|
if (result === 'saved') {
|
|
1336
|
-
this.
|
|
1543
|
+
this.updateRowInGrid;
|
|
1337
1544
|
}
|
|
1338
1545
|
});
|
|
1339
1546
|
return;
|
|
@@ -1377,6 +1584,10 @@ class AgGridBase {
|
|
|
1377
1584
|
* - The update type doesn't match
|
|
1378
1585
|
*/
|
|
1379
1586
|
constructor() {
|
|
1587
|
+
this.frameworkComponents = {
|
|
1588
|
+
buttonRenderer: ButtonRenderer,
|
|
1589
|
+
checkboxRenderer: CheckboxRenderer,
|
|
1590
|
+
};
|
|
1380
1591
|
effect(() => {
|
|
1381
1592
|
const update = this.commonService.updates();
|
|
1382
1593
|
if (!update || !this.gridApi)
|
|
@@ -1387,9 +1598,6 @@ class AgGridBase {
|
|
|
1387
1598
|
case 'update':
|
|
1388
1599
|
this.updateRowInGrid(update.data);
|
|
1389
1600
|
break;
|
|
1390
|
-
case 'delete':
|
|
1391
|
-
this.deleteRowFromGrid(update.data);
|
|
1392
|
-
break;
|
|
1393
1601
|
}
|
|
1394
1602
|
}
|
|
1395
1603
|
});
|
|
@@ -1414,12 +1622,28 @@ class AgGridBase {
|
|
|
1414
1622
|
this.loadData(); // Reload all data if row not found
|
|
1415
1623
|
}
|
|
1416
1624
|
}
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1625
|
+
async deleteSelected() {
|
|
1626
|
+
if (!this.gridApi)
|
|
1627
|
+
return;
|
|
1628
|
+
const selectedNodes = this.gridApi.getSelectedNodes();
|
|
1629
|
+
if (selectedNodes.length === 0) {
|
|
1630
|
+
await this.alertService.showAlert('@PleaseSelectRowToDelete');
|
|
1631
|
+
return;
|
|
1632
|
+
}
|
|
1633
|
+
const confirmed = await this.alertService.showConfirm('@ConfirmDeleteSelectedRecords');
|
|
1634
|
+
if (confirmed) {
|
|
1635
|
+
const selectedRows = selectedNodes.map((node) => node.data);
|
|
1636
|
+
this.deleteRows?.(selectedRows);
|
|
1637
|
+
}
|
|
1638
|
+
}
|
|
1639
|
+
async refreshData() {
|
|
1640
|
+
try {
|
|
1641
|
+
this.loadData();
|
|
1642
|
+
await this.alertService.showAlert('@DataRefreshedSuccessfully');
|
|
1643
|
+
}
|
|
1644
|
+
catch (err) {
|
|
1645
|
+
this.alertService.showError(err);
|
|
1646
|
+
}
|
|
1423
1647
|
}
|
|
1424
1648
|
async setAccessRights() {
|
|
1425
1649
|
this.authenticationList = await lastValueFrom(this.sysFunctionProxy.getAuthentication(this.componentName())).catch((e) => {
|
|
@@ -1458,7 +1682,7 @@ class AgGridBase {
|
|
|
1458
1682
|
return true;
|
|
1459
1683
|
}
|
|
1460
1684
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AgGridBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1461
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.7", type: AgGridBase, isStandalone: true, selector: "ntybase-ag-grid-base", inputs: { readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, popupFilterValid: { classPropertyName: "popupFilterValid", publicName: "popupFilterValid", isSignal: true, isRequired: false, transformFunction: null }, popupValid: { classPropertyName: "popupValid", publicName: "popupValid", isSignal: true, isRequired: false, transformFunction: null }, params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: false, transformFunction: null }, filterField: { classPropertyName: "filterField", publicName: "filterField", isSignal: true, isRequired: false, transformFunction: null }, filterFieldValue: { classPropertyName: "filterFieldValue", publicName: "filterFieldValue", isSignal: true, isRequired: false, transformFunction: null }, filterFieldNumeric: { classPropertyName: "filterFieldNumeric", publicName: "filterFieldNumeric", isSignal: true, isRequired: false, transformFunction: null }, filterFieldEquality: { classPropertyName: "filterFieldEquality", publicName: "filterFieldEquality", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedElement: "selectedElement" }, ngImport: i0, template: "<p>ag-grid-base works!</p>\n", styles: [""] });
|
|
1685
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.7", type: AgGridBase, isStandalone: true, selector: "ntybase-ag-grid-base", inputs: { readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, popupFilterValid: { classPropertyName: "popupFilterValid", publicName: "popupFilterValid", isSignal: true, isRequired: false, transformFunction: null }, popupValid: { classPropertyName: "popupValid", publicName: "popupValid", isSignal: true, isRequired: false, transformFunction: null }, params: { classPropertyName: "params", publicName: "params", isSignal: true, isRequired: false, transformFunction: null }, parameters: { classPropertyName: "parameters", publicName: "parameters", isSignal: true, isRequired: false, transformFunction: null }, filterField: { classPropertyName: "filterField", publicName: "filterField", isSignal: true, isRequired: false, transformFunction: null }, filterFieldValue: { classPropertyName: "filterFieldValue", publicName: "filterFieldValue", isSignal: true, isRequired: false, transformFunction: null }, filterFieldNumeric: { classPropertyName: "filterFieldNumeric", publicName: "filterFieldNumeric", isSignal: true, isRequired: false, transformFunction: null }, filterFieldEquality: { classPropertyName: "filterFieldEquality", publicName: "filterFieldEquality", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectedElement: "selectedElement" }, usesOnChanges: true, ngImport: i0, template: "<p>ag-grid-base works!</p>\n", styles: [""] });
|
|
1462
1686
|
}
|
|
1463
1687
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AgGridBase, decorators: [{
|
|
1464
1688
|
type: Component,
|
|
@@ -1471,17 +1695,18 @@ class AgGridSaveBase {
|
|
|
1471
1695
|
route = inject(ActivatedRoute);
|
|
1472
1696
|
commonService = inject(CommonService);
|
|
1473
1697
|
alertService = inject(AlertService);
|
|
1698
|
+
viewMode = signal('sidenav', ...(ngDevMode ? [{ debugName: "viewMode" }] : []));
|
|
1699
|
+
// Input signals
|
|
1700
|
+
parameters = input('', ...(ngDevMode ? [{ debugName: "parameters" }] : []));
|
|
1701
|
+
embedded = input(false, ...(ngDevMode ? [{ debugName: "embedded" }] : []));
|
|
1474
1702
|
currentItem = signal({}, ...(ngDevMode ? [{ debugName: "currentItem" }] : []));
|
|
1475
1703
|
initialItem = {};
|
|
1476
1704
|
// Form tracking
|
|
1477
1705
|
formChanged = false;
|
|
1478
|
-
|
|
1479
|
-
viewMode = signal('sidenav', ...(ngDevMode ? [{ debugName: "viewMode" }] : []));
|
|
1706
|
+
saveForm;
|
|
1480
1707
|
// Dialog related properties
|
|
1481
1708
|
dialogRef = inject((MatDialogRef), { optional: true });
|
|
1482
1709
|
dialogData = inject(MAT_DIALOG_DATA, { optional: true });
|
|
1483
|
-
// Embedded mode
|
|
1484
|
-
embedded = input(false, ...(ngDevMode ? [{ debugName: "embedded" }] : []));
|
|
1485
1710
|
// Controls whether the panel should automatically close after saving user data
|
|
1486
1711
|
closeAfterSave = model(true, ...(ngDevMode ? [{ debugName: "closeAfterSave" }] : []));
|
|
1487
1712
|
setCloseAfterSave(value) {
|
|
@@ -1507,6 +1732,29 @@ class AgGridSaveBase {
|
|
|
1507
1732
|
this.viewMode.set('fullscreen');
|
|
1508
1733
|
}
|
|
1509
1734
|
}
|
|
1735
|
+
/**
|
|
1736
|
+
* Set data to the form while preserving any unsaved changes
|
|
1737
|
+
* @param item - Data object of type T to populate the form
|
|
1738
|
+
*/
|
|
1739
|
+
initializeFormData(item) {
|
|
1740
|
+
// Merge incoming data with current form state to preserve unsaved changes
|
|
1741
|
+
const currentItem = this.currentItem();
|
|
1742
|
+
const updatedItem = { ...currentItem, ...item };
|
|
1743
|
+
// Create a new instance using the factory method
|
|
1744
|
+
const newItem = this.createItemInstance(updatedItem);
|
|
1745
|
+
this.currentItem.set(newItem);
|
|
1746
|
+
// Update initial item reference for change detection
|
|
1747
|
+
this.initialItem = this.createItemInstance(updatedItem);
|
|
1748
|
+
// Reset form changed flag
|
|
1749
|
+
this.formChanged = false;
|
|
1750
|
+
}
|
|
1751
|
+
/**
|
|
1752
|
+
* @param data - Data to populate the new instance
|
|
1753
|
+
*/
|
|
1754
|
+
createItemInstance(data) {
|
|
1755
|
+
// Default implementation - child classes can override this
|
|
1756
|
+
return { ...data };
|
|
1757
|
+
}
|
|
1510
1758
|
/**
|
|
1511
1759
|
* Check for form changes
|
|
1512
1760
|
*/
|
|
@@ -1525,6 +1773,25 @@ class AgGridSaveBase {
|
|
|
1525
1773
|
}
|
|
1526
1774
|
return true;
|
|
1527
1775
|
}
|
|
1776
|
+
getGuidFromParameters() {
|
|
1777
|
+
if (this.viewMode() === 'dialog' && this.dialogData) {
|
|
1778
|
+
return this.dialogData.parameters || '';
|
|
1779
|
+
}
|
|
1780
|
+
if (this.parameters) {
|
|
1781
|
+
try {
|
|
1782
|
+
return JSON.parse(this.parameters());
|
|
1783
|
+
}
|
|
1784
|
+
catch (e) {
|
|
1785
|
+
return this.parameters();
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
return '';
|
|
1789
|
+
}
|
|
1790
|
+
ngOnChanges(changes) {
|
|
1791
|
+
if (changes['parameters']) {
|
|
1792
|
+
this.loadDetailData();
|
|
1793
|
+
}
|
|
1794
|
+
}
|
|
1528
1795
|
/**
|
|
1529
1796
|
* Close sidenav or navigate back
|
|
1530
1797
|
*/
|
|
@@ -1536,8 +1803,8 @@ class AgGridSaveBase {
|
|
|
1536
1803
|
this.router.navigate([{ outlets: { rightSidenav: null } }]);
|
|
1537
1804
|
}
|
|
1538
1805
|
else {
|
|
1539
|
-
this.
|
|
1540
|
-
this.
|
|
1806
|
+
const cleanPath = this.commonService.getCleanUrlPath();
|
|
1807
|
+
this.router.navigate([cleanPath]);
|
|
1541
1808
|
}
|
|
1542
1809
|
}
|
|
1543
1810
|
backClicked() {
|
|
@@ -1549,157 +1816,50 @@ class AgGridSaveBase {
|
|
|
1549
1816
|
}
|
|
1550
1817
|
}
|
|
1551
1818
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AgGridSaveBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1552
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.7", type: AgGridSaveBase, isStandalone: true, selector: "ntybase-ag-grid-save-base", inputs: { embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null }, closeAfterSave: { classPropertyName: "closeAfterSave", publicName: "closeAfterSave", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closeAfterSave: "closeAfterSaveChange" }, ngImport: i0, template: "<p>ag-grid-save-base works!</p>\n", styles: [""] });
|
|
1819
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.7", type: AgGridSaveBase, isStandalone: true, selector: "ntybase-ag-grid-save-base", inputs: { parameters: { classPropertyName: "parameters", publicName: "parameters", isSignal: true, isRequired: false, transformFunction: null }, embedded: { classPropertyName: "embedded", publicName: "embedded", isSignal: true, isRequired: false, transformFunction: null }, closeAfterSave: { classPropertyName: "closeAfterSave", publicName: "closeAfterSave", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closeAfterSave: "closeAfterSaveChange" }, viewQueries: [{ propertyName: "saveForm", first: true, predicate: ["saveForm"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<p>ag-grid-save-base works!</p>\n", styles: [""] });
|
|
1553
1820
|
}
|
|
1554
1821
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: AgGridSaveBase, decorators: [{
|
|
1555
1822
|
type: Component,
|
|
1556
1823
|
args: [{ selector: 'ntybase-ag-grid-save-base', imports: [], template: "<p>ag-grid-save-base works!</p>\n" }]
|
|
1557
|
-
}]
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
label = '';
|
|
1562
|
-
type = '';
|
|
1563
|
-
toggleValue = null;
|
|
1564
|
-
editValid = false;
|
|
1565
|
-
historyValid = false;
|
|
1566
|
-
lineValid = false;
|
|
1567
|
-
popupSelectValid = false;
|
|
1568
|
-
popupEditValid = false;
|
|
1569
|
-
toggleValid = false;
|
|
1570
|
-
toggle_icon = '';
|
|
1571
|
-
none = false;
|
|
1572
|
-
addValid = false;
|
|
1573
|
-
deleteValid = false;
|
|
1574
|
-
agInit(params) {
|
|
1575
|
-
this.params = params;
|
|
1576
|
-
this.type = this.params.type || null;
|
|
1577
|
-
this.label = this.params.label || null;
|
|
1578
|
-
this.toggleValue = this.params.value || null;
|
|
1579
|
-
switch (this.toggleValue) {
|
|
1580
|
-
case true:
|
|
1581
|
-
this.toggle_icon = 'select_check_box';
|
|
1582
|
-
break;
|
|
1583
|
-
case false:
|
|
1584
|
-
this.toggle_icon = 'check_box_outline_blank';
|
|
1585
|
-
break;
|
|
1586
|
-
default:
|
|
1587
|
-
this.toggle_icon = '';
|
|
1588
|
-
break;
|
|
1589
|
-
}
|
|
1590
|
-
this.resetValids();
|
|
1591
|
-
switch (this.type.toLowerCase().trim()) {
|
|
1592
|
-
case 'edit':
|
|
1593
|
-
this.editValid = true;
|
|
1594
|
-
break;
|
|
1595
|
-
case 'log':
|
|
1596
|
-
this.historyValid = true;
|
|
1597
|
-
break;
|
|
1598
|
-
case 'line':
|
|
1599
|
-
this.lineValid = true;
|
|
1600
|
-
break;
|
|
1601
|
-
case 'popupselect':
|
|
1602
|
-
this.popupSelectValid = true;
|
|
1603
|
-
break;
|
|
1604
|
-
case 'toggle':
|
|
1605
|
-
this.toggleValid = true;
|
|
1606
|
-
break;
|
|
1607
|
-
case 'none':
|
|
1608
|
-
this.none = true;
|
|
1609
|
-
break;
|
|
1610
|
-
case 'add':
|
|
1611
|
-
this.addValid = true;
|
|
1612
|
-
break;
|
|
1613
|
-
case 'delete':
|
|
1614
|
-
this.deleteValid = true;
|
|
1615
|
-
break;
|
|
1616
|
-
default:
|
|
1617
|
-
this.popupEditValid = true;
|
|
1618
|
-
break;
|
|
1619
|
-
}
|
|
1620
|
-
}
|
|
1621
|
-
/** Refresh the display
|
|
1622
|
-
*
|
|
1623
|
-
* @param params
|
|
1624
|
-
* @returns
|
|
1625
|
-
*/
|
|
1626
|
-
refresh(params) {
|
|
1627
|
-
return false;
|
|
1628
|
-
}
|
|
1629
|
-
resetValids() {
|
|
1630
|
-
this.editValid = false;
|
|
1631
|
-
this.historyValid = false;
|
|
1632
|
-
this.lineValid = false;
|
|
1633
|
-
this.popupSelectValid = false;
|
|
1634
|
-
this.popupEditValid = false;
|
|
1635
|
-
this.toggleValid = false;
|
|
1636
|
-
}
|
|
1637
|
-
onClick(event) {
|
|
1638
|
-
if (this.params.onClick instanceof Function) {
|
|
1639
|
-
// put anything into params u want pass into parents component
|
|
1640
|
-
const params = {
|
|
1641
|
-
event: event,
|
|
1642
|
-
rowData: this.params.node.data,
|
|
1643
|
-
type: this.type,
|
|
1644
|
-
// ...something
|
|
1645
|
-
};
|
|
1646
|
-
this.params.onClick(params);
|
|
1647
|
-
}
|
|
1648
|
-
}
|
|
1649
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ButtonRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1650
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: ButtonRenderer, isStandalone: true, selector: "ntybase-button-renderer", ngImport: i0, template: "<mat-icon\n *ngIf=\"(editValid || popupEditValid)\"\n class=\"cursor center edit\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"4000\"\n >edit</mat-icon\n>\n\n<mat-icon\n *ngIf=\"historyValid\"\n class=\"cursor center-log\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >log</mat-icon\n>\n\n<mat-icon\n *ngIf=\"historyValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >history</mat-icon\n>\n<mat-icon\n *ngIf=\"lineValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n<mat-icon\n *ngIf=\"popupSelectValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >content_copy</mat-icon\n>\n<mat-icon\n *ngIf=\"toggleValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >{{toggleValue ? 'check_box' : 'check_box_outline_blank'}}</mat-icon\n>\n<mat-icon\n *ngIf=\"none\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n<mat-icon\n *ngIf=\"addValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >playlist_add</mat-icon\n>\n<mat-icon\n *ngIf=\"deleteValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >delete_outline</mat-icon\n>\n", styles: [".cursor{cursor:pointer}.center{display:flex;justify-content:center;align-items:center;width:100%}.center-log{display:flex;justify-content:center;align-items:center;margin-bottom:-12px}.edit{margin-top:8px}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i3$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatMenuModule }] });
|
|
1651
|
-
}
|
|
1652
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ButtonRenderer, decorators: [{
|
|
1653
|
-
type: Component,
|
|
1654
|
-
args: [{ selector: 'ntybase-button-renderer', imports: [MatIconModule, CommonModule, MatTooltipModule, MatMenuModule], template: "<mat-icon\n *ngIf=\"(editValid || popupEditValid)\"\n class=\"cursor center edit\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"4000\"\n >edit</mat-icon\n>\n\n<mat-icon\n *ngIf=\"historyValid\"\n class=\"cursor center-log\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >log</mat-icon\n>\n\n<mat-icon\n *ngIf=\"historyValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >history</mat-icon\n>\n<mat-icon\n *ngIf=\"lineValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n<mat-icon\n *ngIf=\"popupSelectValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >content_copy</mat-icon\n>\n<mat-icon\n *ngIf=\"toggleValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >{{toggleValue ? 'check_box' : 'check_box_outline_blank'}}</mat-icon\n>\n<mat-icon\n *ngIf=\"none\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n<mat-icon\n *ngIf=\"addValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >playlist_add</mat-icon\n>\n<mat-icon\n *ngIf=\"deleteValid\"\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >delete_outline</mat-icon\n>\n", styles: [".cursor{cursor:pointer}.center{display:flex;justify-content:center;align-items:center;width:100%}.center-log{display:flex;justify-content:center;align-items:center;margin-bottom:-12px}.edit{margin-top:8px}\n"] }]
|
|
1655
|
-
}] });
|
|
1824
|
+
}], propDecorators: { saveForm: [{
|
|
1825
|
+
type: ViewChild,
|
|
1826
|
+
args: ['saveForm']
|
|
1827
|
+
}] } });
|
|
1656
1828
|
|
|
1657
|
-
class
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
}
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
this.checked = !this.checked;
|
|
1685
|
-
if (this.params.onClick instanceof Function) {
|
|
1686
|
-
// put anything into params u want pass into parents component
|
|
1687
|
-
const params = {
|
|
1688
|
-
event: event,
|
|
1689
|
-
rowData: this.params.node.data,
|
|
1690
|
-
type: this.type,
|
|
1691
|
-
checked: this.checked,
|
|
1692
|
-
// ...something
|
|
1693
|
-
};
|
|
1694
|
-
this.params.onClick(params);
|
|
1695
|
-
}
|
|
1829
|
+
class ExcelImportBase extends AgGridBase {
|
|
1830
|
+
dataList = [];
|
|
1831
|
+
wopts = { bookType: 'xlsx', type: 'array' };
|
|
1832
|
+
fileName = 'PayrollJournalTrans.xlsx';
|
|
1833
|
+
isDataValidated = false;
|
|
1834
|
+
/*******************************
|
|
1835
|
+
*** EXCEL UPLOAD FUNCTIONS ***
|
|
1836
|
+
*******************************/
|
|
1837
|
+
onFileChange(evt) {
|
|
1838
|
+
/* wire up file reader */
|
|
1839
|
+
const target = evt.target;
|
|
1840
|
+
if (target.files.length !== 1) {
|
|
1841
|
+
throw new Error('Cannot use multiple files');
|
|
1842
|
+
}
|
|
1843
|
+
const reader = new FileReader();
|
|
1844
|
+
reader.onload = (e) => {
|
|
1845
|
+
/* read workbook */
|
|
1846
|
+
const bstr = e.target.result;
|
|
1847
|
+
const wb = XLSX.read(bstr, { type: 'binary' });
|
|
1848
|
+
/* grab first sheet */
|
|
1849
|
+
const wsname = wb.SheetNames[0];
|
|
1850
|
+
const ws = wb.Sheets[wsname];
|
|
1851
|
+
/* save data */
|
|
1852
|
+
this.dataList = XLSX.utils.sheet_to_json(ws, { header: 1 });
|
|
1853
|
+
console.log('dataList:', this.dataList);
|
|
1854
|
+
};
|
|
1855
|
+
reader.readAsBinaryString(target.files[0]);
|
|
1696
1856
|
}
|
|
1697
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type:
|
|
1698
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type:
|
|
1857
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ExcelImportBase, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1858
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.7", type: ExcelImportBase, isStandalone: true, selector: "ntybase-excel-import-base", usesInheritance: true, ngImport: i0, template: "<p>excel-import-base works!</p>\n", styles: [""] });
|
|
1699
1859
|
}
|
|
1700
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type:
|
|
1860
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: ExcelImportBase, decorators: [{
|
|
1701
1861
|
type: Component,
|
|
1702
|
-
args: [{ selector: 'ntybase-
|
|
1862
|
+
args: [{ selector: 'ntybase-excel-import-base', imports: [], template: "<p>excel-import-base works!</p>\n" }]
|
|
1703
1863
|
}] });
|
|
1704
1864
|
|
|
1705
1865
|
class AuthenticationGuard {
|
|
@@ -2636,7 +2796,7 @@ class LeftSidenav {
|
|
|
2636
2796
|
this.searchTerm.set(term);
|
|
2637
2797
|
}
|
|
2638
2798
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: LeftSidenav, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2639
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.7", type: LeftSidenav, isStandalone: true, selector: "ntybase-left-sidenav", inputs: { isMinimized: { classPropertyName: "isMinimized", publicName: "isMinimized", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggleMinimize: "toggleMinimize" }, ngImport: i0, template: "<div class=\"sidenav-content-wrapper\">\n <!-- Minimize Icon -->\n <button mat-icon-button (click)=\"onToggleMinimize()\" class=\"minimize-button\">\n <mat-icon class=\"minimize-icon\">\n {{ isMinimized() ? \"chevron_right\" : \"chevron_left\" }}\n </mat-icon>\n </button>\n\n <!-- Profile -->\n <div class=\"profile-section\">\n <button mat-button [matMenuTriggerFor]=\"profileMenu\" class=\"profile-button\">\n <img\n src=\"https://images.unsplash.com/photo-1654110455429-cf322b40a906?q=80&w=2080&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\"\n alt=\"Profil Image\"\n class=\"profile-image\"\n />\n <div class=\"profile-info\" *ngIf=\"!isMinimized()\">\n <p class=\"profile-name\">Mustafa Samet \u00C7al\u0131\u015F\u0131r</p>\n </div>\n </button>\n\n <mat-menu #profileMenu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item>\n <mat-icon>account_circle</mat-icon>\n <span>{{ '@profile' | translate }}</span>\n </button>\n <button mat-menu-item mat-button (click)=\"logout()\">\n <mat-icon>logout</mat-icon>\n <span>{{ '@logout' | translate }}</span>\n </button>\n </mat-menu>\n </div>\n\n <!-- Search Input -->\n <ntyui-search-input\n [label]=\"'@search' | translate\"\n [placeholder]=\"'@placeholderSearch' | translate\"\n [appearance]=\"'outline'\"\n *ngIf=\"!isMinimized()\"\n (search)=\"onSearch($event)\"\n >\n </ntyui-search-input>\n\n <!-- Menu -->\n <mat-nav-list *ngIf=\"!isMinimized()\">\n <div class=\"sidebar\">\n <ul>\n <ng-container *ngFor=\"let item of filteredMenuItems()\">\n <li>\n <a\n *ngIf=\"!item.children || item.children.length === 0\"\n [routerLink]=\"item.link\"\n routerLinkActive=\"active\"\n >\n <mat-icon>{{ item.icon }}</mat-icon>\n <span>{{ item.name }}</span>\n </a>\n\n <a\n *ngIf=\"item.children && item.children.length > 0\"\n (click)=\"toggleSubMenu(item)\"\n [class.expanded]=\"item.expanded\"\n >\n <mat-icon>{{ item.icon }}</mat-icon>\n <span>{{ item.name }}</span>\n <mat-icon [class.rotated]=\"item.expanded\">\n {{ item.expanded ? 'expand_less' : 'expand_more' }}\n </mat-icon>\n </a>\n\n <ul\n *ngIf=\"item.children && item.children.length > 0 && item.expanded\"\n class=\"submenu\"\n >\n <li *ngFor=\"let child of item.children\">\n <a [routerLink]=\"child.link\" routerLinkActive=\"active\">\n <mat-icon>{{ child.icon }}</mat-icon>\n <span>{{ child.name }}</span>\n </a>\n </li>\n </ul>\n </li>\n </ng-container>\n </ul>\n </div>\n </mat-nav-list>\n\n <!-- Footer -->\n <div class=\"sidenav-footer\">\n <button mat-button [matMenuTriggerFor]=\"footerMenu\" class=\"footer-button\">\n <div class=\"footer-text\" *ngIf=\"!isMinimized()\">\n <div class=\"company-name\">\n <p>© 2025 AXIS</p>\n </div>\n </div>\n </button>\n <div class=\"version\">\n <span class=\"version\">v{{version}}</span>\n </div>\n </div>\n\n <mat-menu #footerMenu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item>\n <mat-icon>swap_horiz</mat-icon>\n {{ '@changeCompany' | translate }}\n </button>\n <button mat-menu-item mat-button (click)=\"logout()\">\n <mat-icon>logout</mat-icon>\n <span>{{ '@logout' | translate }}</span>\n </button>\n </mat-menu>\n</div>\n", styles: [".profile-section{text-align:center;border-bottom:1px solid #e0e0e0;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;flex-direction:column;position:relative}.profile-section:hover{transform:scale(.98)}.profile-section .profile-button{display:flex;flex-direction:column;align-items:center;background:none;border:none;padding:0;cursor:pointer;width:100%}.profile-image{width:80px;height:80px;border-radius:50%;object-fit:cover;margin:0 auto 8px;display:block;border:3px solid white;box-shadow:0 2px 4px #0000001a;transition:all .3s ease}.profile-name{font-weight:500;font-size:1rem;color:inherit;transition:opacity .3s ease;margin-top:8px}:host-context(.minimized) .profile-section{padding:10px 0}:host-context(.minimized) .profile-image{width:40px;height:40px;margin:0 auto}.sidenav-footer{position:static;bottom:0;left:0;right:0;padding:16px;color:inherit;font-size:12px;border-top:1px solid rgba(0,0,0,.1);transition:all .3s ease;display:flex;align-items:center;justify-content:space-between;margin-top:auto}.sidenav-footer .version{font-size:10px;margin-top:4px}.footer-button{border:none;background:none;cursor:pointer}:host-context(.minimized) .version{margin-right:7px}:host-context(.minimized) .sidenav-content-wrapper{overflow:hidden}.sidenav-content-wrapper{position:relative;height:100%;display:flex;flex-direction:column;overflow-x:hidden}.sidebar{flex:1;overflow:auto}.sidebar ul{list-style:none;padding:0;margin:0}.sidebar li{margin-bottom:4px;position:relative}.sidebar li a{display:flex;align-items:center;padding:12px 0 0;border-radius:6px;color:var(--mat-sys-primary);text-decoration:none;transition:all .2s ease;position:relative;overflow:hidden}.sidebar li a:hover{background-color:var(--mat-sys-user-info);color:var(--mat-sys-user-text)}.sidebar li a.active{background-color:var(--mat-sys-user-info);color:var(--mat-sys-user-text);font-weight:500}.sidebar li a.active:before{content:\"\";position:absolute;left:0;top:0;bottom:0;width:3px;background-color:var(--mat-sys-user-info);border-radius:3px 0 0 3px}.sidebar mat-icon{font-size:20px;width:20px;height:20px;color:inherit}.sidebar span{font-size:.875rem;white-space:nowrap}.submenu{padding-left:12px;margin-top:4px}.submenu li a{padding:10px 16px 0 20px}.submenu mat-icon{font-size:18px}.sidebar li a mat-icon:last-child{margin-left:auto;margin-right:0;font-size:18px;color:#5f6368}:host-context(.minimized) .sidebar li a{justify-content:center;padding:12px 0}:host-context(.minimized) .sidebar mat-icon{margin-right:0}:host-context(.minimized) .sidebar span,:host-context(.minimized) .sidebar li a mat-icon:last-child{display:none}:host-context(.minimized) .submenu{display:none}.sidenav-content-wrapper button[mat-icon-button]{position:absolute;right:-8px;top:10%;z-index:5}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i3$4.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i3$3.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3$3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i5.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: SearchInput, selector: "ntyui-search-input", outputs: ["search"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
|
|
2799
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.1.7", type: LeftSidenav, isStandalone: true, selector: "ntybase-left-sidenav", inputs: { isMinimized: { classPropertyName: "isMinimized", publicName: "isMinimized", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggleMinimize: "toggleMinimize" }, ngImport: i0, template: "<div class=\"sidenav-content-wrapper\">\n <!-- Minimize Icon -->\n <button mat-icon-button (click)=\"onToggleMinimize()\" class=\"minimize-button\">\n <mat-icon class=\"minimize-icon\">\n {{ isMinimized() ? \"chevron_right\" : \"chevron_left\" }}\n </mat-icon>\n </button>\n\n <!-- Profile -->\n <div class=\"profile-section\">\n <button mat-button [matMenuTriggerFor]=\"profileMenu\" class=\"profile-button\">\n <img\n src=\"https://images.unsplash.com/photo-1654110455429-cf322b40a906?q=80&w=2080&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\"\n alt=\"Profil Image\"\n class=\"profile-image\"\n />\n <div class=\"profile-info\" *ngIf=\"!isMinimized()\">\n <p class=\"profile-name\">Mustafa Samet \u00C7al\u0131\u015F\u0131r</p>\n </div>\n </button>\n\n <mat-menu #profileMenu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item disabled>\n <mat-icon>account_circle</mat-icon>\n <span>{{ '@profile' | translate }}</span>\n </button>\n <button mat-menu-item mat-button disabled>\n <mat-icon>swap_horiz</mat-icon>\n <span>{{ '@changeCompany' | translate }}</span>\n </button>\n <button mat-menu-item mat-button (click)=\"logout()\">\n <mat-icon>logout</mat-icon>\n <span>{{ '@logout' | translate }}</span>\n </button>\n </mat-menu>\n </div>\n\n <!-- Search Input -->\n <ntyui-search-input\n [label]=\"'@search' | translate\"\n [placeholder]=\"'@placeholderSearch' | translate\"\n [appearance]=\"'outline'\"\n *ngIf=\"!isMinimized()\"\n (search)=\"onSearch($event)\"\n >\n </ntyui-search-input>\n\n <!-- Menu -->\n <mat-nav-list *ngIf=\"!isMinimized()\">\n <div class=\"sidebar\">\n <ul>\n <ng-container *ngFor=\"let item of filteredMenuItems()\">\n <li>\n <a\n *ngIf=\"!item.children || item.children.length === 0\"\n [routerLink]=\"item.link\"\n routerLinkActive=\"active\"\n >\n <mat-icon>{{ item.icon }}</mat-icon>\n <span>{{ item.name }}</span>\n </a>\n\n <a\n *ngIf=\"item.children && item.children.length > 0\"\n (click)=\"toggleSubMenu(item)\"\n [class.expanded]=\"item.expanded\"\n >\n <mat-icon>{{ item.icon }}</mat-icon>\n <span>{{ item.name }}</span>\n <mat-icon [class.rotated]=\"item.expanded\">\n {{ item.expanded ? 'expand_less' : 'expand_more' }}\n </mat-icon>\n </a>\n\n <ul\n *ngIf=\"item.children && item.children.length > 0 && item.expanded\"\n class=\"submenu\"\n >\n <li *ngFor=\"let child of item.children\">\n <a [routerLink]=\"child.link\" routerLinkActive=\"active\">\n <mat-icon>{{ child.icon }}</mat-icon>\n <span>{{ child.name }}</span>\n </a>\n </li>\n </ul>\n </li>\n </ng-container>\n </ul>\n </div>\n </mat-nav-list>\n\n <!-- Footer -->\n <div class=\"sidenav-footer\">\n <button mat-button [matMenuTriggerFor]=\"footerMenu\" class=\"footer-button\">\n <div class=\"footer-text\" *ngIf=\"!isMinimized()\">\n <div class=\"company-name\">\n <p>© 2025 AXIS</p>\n </div>\n </div>\n </button>\n <div class=\"version\">\n <span class=\"version\">v{{version}}</span>\n </div>\n </div>\n\n <mat-menu #footerMenu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item disabled>\n <mat-icon>swap_horiz</mat-icon>\n {{ '@changeCompany' | translate }}\n </button>\n <button mat-menu-item mat-button (click)=\"logout()\">\n <mat-icon>logout</mat-icon>\n <span>{{ '@logout' | translate }}</span>\n </button>\n </mat-menu>\n</div>\n", styles: [".profile-section{text-align:center;border-bottom:1px solid #e0e0e0;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;flex-direction:column;position:relative}.profile-section:hover{transform:scale(.98)}.profile-section .profile-button{display:flex;flex-direction:column;align-items:center;background:none;border:none;padding:0;cursor:pointer;width:100%}.profile-image{width:80px;height:80px;border-radius:50%;object-fit:cover;margin:0 auto 8px;display:block;border:3px solid white;box-shadow:0 2px 4px #0000001a;transition:all .3s ease}.profile-name{font-weight:500;font-size:1rem;color:inherit;transition:opacity .3s ease;margin-top:8px}:host-context(.minimized) .profile-section{padding:10px 0}:host-context(.minimized) .profile-image{width:40px;height:40px;margin:0 auto}.sidenav-footer{position:static;bottom:0;left:0;right:0;padding:16px;color:inherit;font-size:12px;border-top:1px solid rgba(0,0,0,.1);transition:all .3s ease;display:flex;align-items:center;justify-content:space-between;margin-top:auto}.sidenav-footer .version{font-size:10px;margin-top:4px}.footer-button{border:none;background:none;cursor:pointer}:host-context(.minimized) .version{margin-right:7px}:host-context(.minimized) .sidenav-content-wrapper{overflow:hidden}.sidenav-content-wrapper{position:relative;height:100%;display:flex;flex-direction:column;overflow-x:hidden}.sidebar{flex:1;overflow:auto}.sidebar ul{list-style:none;padding:0;margin:0}.sidebar li{margin-bottom:4px;position:relative}.sidebar li a{display:flex;align-items:center;padding:12px 0 0;border-radius:6px;color:var(--mat-sys-primary);text-decoration:none;transition:all .2s ease;position:relative;overflow:hidden}.sidebar li a:hover{background-color:var(--mat-sys-user-info);color:var(--mat-sys-user-text)}.sidebar li a.active{background-color:var(--mat-sys-user-info);color:var(--mat-sys-user-text);font-weight:500}.sidebar li a.active:before{content:\"\";position:absolute;left:0;top:0;bottom:0;width:3px;background-color:var(--mat-sys-user-info);border-radius:3px 0 0 3px}.sidebar mat-icon{font-size:20px;width:20px;height:20px;color:inherit}.sidebar span{font-size:.875rem;white-space:nowrap}.submenu{padding-left:12px;margin-top:4px}.submenu li a{padding:10px 16px 0 20px}.submenu mat-icon{font-size:18px}.sidebar li a mat-icon:last-child{margin-left:auto;margin-right:0;font-size:18px;color:#5f6368}:host-context(.minimized) .sidebar li a{justify-content:center;padding:12px 0}:host-context(.minimized) .sidebar mat-icon{margin-right:0}:host-context(.minimized) .sidebar span,:host-context(.minimized) .sidebar li a mat-icon:last-child{display:none}:host-context(.minimized) .submenu{display:none}.sidenav-content-wrapper button[mat-icon-button]{position:absolute;right:-8px;top:10%;z-index:5}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatListModule }, { kind: "component", type: i3$4.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i3$3.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3$3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i5.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: SearchInput, selector: "ntyui-search-input", outputs: ["search"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] });
|
|
2640
2800
|
}
|
|
2641
2801
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: LeftSidenav, decorators: [{
|
|
2642
2802
|
type: Component,
|
|
@@ -2650,7 +2810,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
2650
2810
|
RouterModule,
|
|
2651
2811
|
SearchInput,
|
|
2652
2812
|
TranslateModule,
|
|
2653
|
-
], template: "<div class=\"sidenav-content-wrapper\">\n <!-- Minimize Icon -->\n <button mat-icon-button (click)=\"onToggleMinimize()\" class=\"minimize-button\">\n <mat-icon class=\"minimize-icon\">\n {{ isMinimized() ? \"chevron_right\" : \"chevron_left\" }}\n </mat-icon>\n </button>\n\n <!-- Profile -->\n <div class=\"profile-section\">\n <button mat-button [matMenuTriggerFor]=\"profileMenu\" class=\"profile-button\">\n <img\n src=\"https://images.unsplash.com/photo-1654110455429-cf322b40a906?q=80&w=2080&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\"\n alt=\"Profil Image\"\n class=\"profile-image\"\n />\n <div class=\"profile-info\" *ngIf=\"!isMinimized()\">\n <p class=\"profile-name\">Mustafa Samet \u00C7al\u0131\u015F\u0131r</p>\n </div>\n </button>\n\n <mat-menu #profileMenu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item>\n <mat-icon>account_circle</mat-icon>\n <span>{{ '@profile' | translate }}</span>\n </button>\n <button mat-menu-item mat-button (click)=\"logout()\">\n <mat-icon>logout</mat-icon>\n <span>{{ '@logout' | translate }}</span>\n </button>\n </mat-menu>\n </div>\n\n <!-- Search Input -->\n <ntyui-search-input\n [label]=\"'@search' | translate\"\n [placeholder]=\"'@placeholderSearch' | translate\"\n [appearance]=\"'outline'\"\n *ngIf=\"!isMinimized()\"\n (search)=\"onSearch($event)\"\n >\n </ntyui-search-input>\n\n <!-- Menu -->\n <mat-nav-list *ngIf=\"!isMinimized()\">\n <div class=\"sidebar\">\n <ul>\n <ng-container *ngFor=\"let item of filteredMenuItems()\">\n <li>\n <a\n *ngIf=\"!item.children || item.children.length === 0\"\n [routerLink]=\"item.link\"\n routerLinkActive=\"active\"\n >\n <mat-icon>{{ item.icon }}</mat-icon>\n <span>{{ item.name }}</span>\n </a>\n\n <a\n *ngIf=\"item.children && item.children.length > 0\"\n (click)=\"toggleSubMenu(item)\"\n [class.expanded]=\"item.expanded\"\n >\n <mat-icon>{{ item.icon }}</mat-icon>\n <span>{{ item.name }}</span>\n <mat-icon [class.rotated]=\"item.expanded\">\n {{ item.expanded ? 'expand_less' : 'expand_more' }}\n </mat-icon>\n </a>\n\n <ul\n *ngIf=\"item.children && item.children.length > 0 && item.expanded\"\n class=\"submenu\"\n >\n <li *ngFor=\"let child of item.children\">\n <a [routerLink]=\"child.link\" routerLinkActive=\"active\">\n <mat-icon>{{ child.icon }}</mat-icon>\n <span>{{ child.name }}</span>\n </a>\n </li>\n </ul>\n </li>\n </ng-container>\n </ul>\n </div>\n </mat-nav-list>\n\n <!-- Footer -->\n <div class=\"sidenav-footer\">\n <button mat-button [matMenuTriggerFor]=\"footerMenu\" class=\"footer-button\">\n <div class=\"footer-text\" *ngIf=\"!isMinimized()\">\n <div class=\"company-name\">\n <p>© 2025 AXIS</p>\n </div>\n </div>\n </button>\n <div class=\"version\">\n <span class=\"version\">v{{version}}</span>\n </div>\n </div>\n\n <mat-menu #footerMenu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item>\n <mat-icon>swap_horiz</mat-icon>\n {{ '@changeCompany' | translate }}\n </button>\n <button mat-menu-item mat-button (click)=\"logout()\">\n <mat-icon>logout</mat-icon>\n <span>{{ '@logout' | translate }}</span>\n </button>\n </mat-menu>\n</div>\n", styles: [".profile-section{text-align:center;border-bottom:1px solid #e0e0e0;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;flex-direction:column;position:relative}.profile-section:hover{transform:scale(.98)}.profile-section .profile-button{display:flex;flex-direction:column;align-items:center;background:none;border:none;padding:0;cursor:pointer;width:100%}.profile-image{width:80px;height:80px;border-radius:50%;object-fit:cover;margin:0 auto 8px;display:block;border:3px solid white;box-shadow:0 2px 4px #0000001a;transition:all .3s ease}.profile-name{font-weight:500;font-size:1rem;color:inherit;transition:opacity .3s ease;margin-top:8px}:host-context(.minimized) .profile-section{padding:10px 0}:host-context(.minimized) .profile-image{width:40px;height:40px;margin:0 auto}.sidenav-footer{position:static;bottom:0;left:0;right:0;padding:16px;color:inherit;font-size:12px;border-top:1px solid rgba(0,0,0,.1);transition:all .3s ease;display:flex;align-items:center;justify-content:space-between;margin-top:auto}.sidenav-footer .version{font-size:10px;margin-top:4px}.footer-button{border:none;background:none;cursor:pointer}:host-context(.minimized) .version{margin-right:7px}:host-context(.minimized) .sidenav-content-wrapper{overflow:hidden}.sidenav-content-wrapper{position:relative;height:100%;display:flex;flex-direction:column;overflow-x:hidden}.sidebar{flex:1;overflow:auto}.sidebar ul{list-style:none;padding:0;margin:0}.sidebar li{margin-bottom:4px;position:relative}.sidebar li a{display:flex;align-items:center;padding:12px 0 0;border-radius:6px;color:var(--mat-sys-primary);text-decoration:none;transition:all .2s ease;position:relative;overflow:hidden}.sidebar li a:hover{background-color:var(--mat-sys-user-info);color:var(--mat-sys-user-text)}.sidebar li a.active{background-color:var(--mat-sys-user-info);color:var(--mat-sys-user-text);font-weight:500}.sidebar li a.active:before{content:\"\";position:absolute;left:0;top:0;bottom:0;width:3px;background-color:var(--mat-sys-user-info);border-radius:3px 0 0 3px}.sidebar mat-icon{font-size:20px;width:20px;height:20px;color:inherit}.sidebar span{font-size:.875rem;white-space:nowrap}.submenu{padding-left:12px;margin-top:4px}.submenu li a{padding:10px 16px 0 20px}.submenu mat-icon{font-size:18px}.sidebar li a mat-icon:last-child{margin-left:auto;margin-right:0;font-size:18px;color:#5f6368}:host-context(.minimized) .sidebar li a{justify-content:center;padding:12px 0}:host-context(.minimized) .sidebar mat-icon{margin-right:0}:host-context(.minimized) .sidebar span,:host-context(.minimized) .sidebar li a mat-icon:last-child{display:none}:host-context(.minimized) .submenu{display:none}.sidenav-content-wrapper button[mat-icon-button]{position:absolute;right:-8px;top:10%;z-index:5}\n"] }]
|
|
2813
|
+
], template: "<div class=\"sidenav-content-wrapper\">\n <!-- Minimize Icon -->\n <button mat-icon-button (click)=\"onToggleMinimize()\" class=\"minimize-button\">\n <mat-icon class=\"minimize-icon\">\n {{ isMinimized() ? \"chevron_right\" : \"chevron_left\" }}\n </mat-icon>\n </button>\n\n <!-- Profile -->\n <div class=\"profile-section\">\n <button mat-button [matMenuTriggerFor]=\"profileMenu\" class=\"profile-button\">\n <img\n src=\"https://images.unsplash.com/photo-1654110455429-cf322b40a906?q=80&w=2080&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\"\n alt=\"Profil Image\"\n class=\"profile-image\"\n />\n <div class=\"profile-info\" *ngIf=\"!isMinimized()\">\n <p class=\"profile-name\">Mustafa Samet \u00C7al\u0131\u015F\u0131r</p>\n </div>\n </button>\n\n <mat-menu #profileMenu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item disabled>\n <mat-icon>account_circle</mat-icon>\n <span>{{ '@profile' | translate }}</span>\n </button>\n <button mat-menu-item mat-button disabled>\n <mat-icon>swap_horiz</mat-icon>\n <span>{{ '@changeCompany' | translate }}</span>\n </button>\n <button mat-menu-item mat-button (click)=\"logout()\">\n <mat-icon>logout</mat-icon>\n <span>{{ '@logout' | translate }}</span>\n </button>\n </mat-menu>\n </div>\n\n <!-- Search Input -->\n <ntyui-search-input\n [label]=\"'@search' | translate\"\n [placeholder]=\"'@placeholderSearch' | translate\"\n [appearance]=\"'outline'\"\n *ngIf=\"!isMinimized()\"\n (search)=\"onSearch($event)\"\n >\n </ntyui-search-input>\n\n <!-- Menu -->\n <mat-nav-list *ngIf=\"!isMinimized()\">\n <div class=\"sidebar\">\n <ul>\n <ng-container *ngFor=\"let item of filteredMenuItems()\">\n <li>\n <a\n *ngIf=\"!item.children || item.children.length === 0\"\n [routerLink]=\"item.link\"\n routerLinkActive=\"active\"\n >\n <mat-icon>{{ item.icon }}</mat-icon>\n <span>{{ item.name }}</span>\n </a>\n\n <a\n *ngIf=\"item.children && item.children.length > 0\"\n (click)=\"toggleSubMenu(item)\"\n [class.expanded]=\"item.expanded\"\n >\n <mat-icon>{{ item.icon }}</mat-icon>\n <span>{{ item.name }}</span>\n <mat-icon [class.rotated]=\"item.expanded\">\n {{ item.expanded ? 'expand_less' : 'expand_more' }}\n </mat-icon>\n </a>\n\n <ul\n *ngIf=\"item.children && item.children.length > 0 && item.expanded\"\n class=\"submenu\"\n >\n <li *ngFor=\"let child of item.children\">\n <a [routerLink]=\"child.link\" routerLinkActive=\"active\">\n <mat-icon>{{ child.icon }}</mat-icon>\n <span>{{ child.name }}</span>\n </a>\n </li>\n </ul>\n </li>\n </ng-container>\n </ul>\n </div>\n </mat-nav-list>\n\n <!-- Footer -->\n <div class=\"sidenav-footer\">\n <button mat-button [matMenuTriggerFor]=\"footerMenu\" class=\"footer-button\">\n <div class=\"footer-text\" *ngIf=\"!isMinimized()\">\n <div class=\"company-name\">\n <p>© 2025 AXIS</p>\n </div>\n </div>\n </button>\n <div class=\"version\">\n <span class=\"version\">v{{version}}</span>\n </div>\n </div>\n\n <mat-menu #footerMenu=\"matMenu\" xPosition=\"before\">\n <button mat-menu-item disabled>\n <mat-icon>swap_horiz</mat-icon>\n {{ '@changeCompany' | translate }}\n </button>\n <button mat-menu-item mat-button (click)=\"logout()\">\n <mat-icon>logout</mat-icon>\n <span>{{ '@logout' | translate }}</span>\n </button>\n </mat-menu>\n</div>\n", styles: [".profile-section{text-align:center;border-bottom:1px solid #e0e0e0;cursor:pointer;transition:all .3s ease;display:flex;align-items:center;flex-direction:column;position:relative}.profile-section:hover{transform:scale(.98)}.profile-section .profile-button{display:flex;flex-direction:column;align-items:center;background:none;border:none;padding:0;cursor:pointer;width:100%}.profile-image{width:80px;height:80px;border-radius:50%;object-fit:cover;margin:0 auto 8px;display:block;border:3px solid white;box-shadow:0 2px 4px #0000001a;transition:all .3s ease}.profile-name{font-weight:500;font-size:1rem;color:inherit;transition:opacity .3s ease;margin-top:8px}:host-context(.minimized) .profile-section{padding:10px 0}:host-context(.minimized) .profile-image{width:40px;height:40px;margin:0 auto}.sidenav-footer{position:static;bottom:0;left:0;right:0;padding:16px;color:inherit;font-size:12px;border-top:1px solid rgba(0,0,0,.1);transition:all .3s ease;display:flex;align-items:center;justify-content:space-between;margin-top:auto}.sidenav-footer .version{font-size:10px;margin-top:4px}.footer-button{border:none;background:none;cursor:pointer}:host-context(.minimized) .version{margin-right:7px}:host-context(.minimized) .sidenav-content-wrapper{overflow:hidden}.sidenav-content-wrapper{position:relative;height:100%;display:flex;flex-direction:column;overflow-x:hidden}.sidebar{flex:1;overflow:auto}.sidebar ul{list-style:none;padding:0;margin:0}.sidebar li{margin-bottom:4px;position:relative}.sidebar li a{display:flex;align-items:center;padding:12px 0 0;border-radius:6px;color:var(--mat-sys-primary);text-decoration:none;transition:all .2s ease;position:relative;overflow:hidden}.sidebar li a:hover{background-color:var(--mat-sys-user-info);color:var(--mat-sys-user-text)}.sidebar li a.active{background-color:var(--mat-sys-user-info);color:var(--mat-sys-user-text);font-weight:500}.sidebar li a.active:before{content:\"\";position:absolute;left:0;top:0;bottom:0;width:3px;background-color:var(--mat-sys-user-info);border-radius:3px 0 0 3px}.sidebar mat-icon{font-size:20px;width:20px;height:20px;color:inherit}.sidebar span{font-size:.875rem;white-space:nowrap}.submenu{padding-left:12px;margin-top:4px}.submenu li a{padding:10px 16px 0 20px}.submenu mat-icon{font-size:18px}.sidebar li a mat-icon:last-child{margin-left:auto;margin-right:0;font-size:18px;color:#5f6368}:host-context(.minimized) .sidebar li a{justify-content:center;padding:12px 0}:host-context(.minimized) .sidebar mat-icon{margin-right:0}:host-context(.minimized) .sidebar span,:host-context(.minimized) .sidebar li a mat-icon:last-child{display:none}:host-context(.minimized) .submenu{display:none}.sidenav-content-wrapper button[mat-icon-button]{position:absolute;right:-8px;top:10%;z-index:5}\n"] }]
|
|
2654
2814
|
}], ctorParameters: () => [] });
|
|
2655
2815
|
|
|
2656
2816
|
class Theme {
|
|
@@ -2658,7 +2818,6 @@ class Theme {
|
|
|
2658
2818
|
themes = [
|
|
2659
2819
|
{ name: 'light', icon: 'light_mode' },
|
|
2660
2820
|
{ name: 'dark', icon: 'dark_mode' },
|
|
2661
|
-
{ name: 'system', icon: 'desktop_windows' },
|
|
2662
2821
|
];
|
|
2663
2822
|
selectedTheme = computed(() => this.themes.find((theme) => theme.name === this.appTheme()), ...(ngDevMode ? [{ debugName: "selectedTheme" }] : []));
|
|
2664
2823
|
getThemes() {
|
|
@@ -2670,10 +2829,8 @@ class Theme {
|
|
|
2670
2829
|
constructor() {
|
|
2671
2830
|
effect(() => {
|
|
2672
2831
|
const appTheme = this.appTheme();
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
document.body.style.setProperty('color-scheme', colorScheme);
|
|
2676
|
-
document.body.setAttribute('data-ag-theme-mode', agGridThemeMode);
|
|
2832
|
+
document.body.style.setProperty('color-scheme', appTheme);
|
|
2833
|
+
document.body.setAttribute('data-ag-theme-mode', appTheme);
|
|
2677
2834
|
});
|
|
2678
2835
|
}
|
|
2679
2836
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: Theme, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
@@ -2762,7 +2919,7 @@ class Toolbar {
|
|
|
2762
2919
|
}
|
|
2763
2920
|
}
|
|
2764
2921
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: Toolbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2765
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: Toolbar, isStandalone: true, selector: "ntybase-toolbar", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggleSidenav: "toggleSidenav", icon: "iconChange" }, ngImport: i0, template: "<mat-toolbar class=\"sidenav-header\">\n <div class=\"left-section\">\n <button mat-icon-button (click)=\"onToggleSidenav()\" class=\"menu-button\">\n <mat-icon>menu</mat-icon>\n </button>\n <span>Netty Admin Core</span>\n\n
|
|
2922
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.7", type: Toolbar, isStandalone: true, selector: "ntybase-toolbar", inputs: { icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggleSidenav: "toggleSidenav", icon: "iconChange" }, ngImport: i0, template: "<mat-toolbar class=\"sidenav-header\">\n <div class=\"left-section\">\n <button mat-icon-button (click)=\"onToggleSidenav()\" class=\"menu-button\">\n <mat-icon>menu</mat-icon>\n </button>\n <span>Netty Admin Core</span>\n\n <!-- Language Selection -->\n <div class=\"language-toggle\">\n <button\n *ngIf=\"icon; else text\"\n mat-icon-button\n [matMenuTriggerFor]=\"languageMenu\"\n >\n <span class=\"{{ getCurrentLanguageIcon() }}\"></span>\n </button>\n <ng-template #text>\n <button\n mat-raised-button\n color=\"primary\"\n [matMenuTriggerFor]=\"languageMenu\"\n >\n {{ currentLanguage }}\n </button>\n </ng-template>\n </div>\n\n <!-- Language Menu -->\n <mat-menu #languageMenu=\"matMenu\">\n <button\n mat-menu-item\n *ngFor=\"let language of languages\"\n (click)=\"setLanguage(language)\"\n >\n <span class=\"{{ getLanguageIcon(language) }}\"></span>\n {{ language }}\n </button>\n </mat-menu>\n </div>\n\n <div class=\"spacer\"></div>\n\n <div class=\"flex-stretch\"></div>\n <button\n mat-icon-button\n [mat-menu-trigger-for]=\"themeMenu\"\n class=\"theme-button\"\n >\n <mat-icon>{{ themeService.selectedTheme()?.icon }}</mat-icon>\n </button>\n <mat-menu #themeMenu=\"matMenu\">\n @for (theme of themeService.getThemes(); track theme.name) {\n <button\n [class.selected-theme]=\"themeService.selectedTheme()?.name === theme.name\"\n mat-menu-item\n (click)=\"themeService.setTheme(theme.name)\"\n >\n <mat-icon>{{ theme.icon }}</mat-icon>\n <span>{{ theme.name | titlecase }}</span>\n </button>\n }\n </mat-menu>\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"customThemeMenu\"\n class=\"custom-theme-button\"\n >\n <mat-icon>format_color_fill</mat-icon>\n </button>\n <mat-menu #customThemeMenu=\"matMenu\">\n @for (customTheme of colorPaletteService.getThemes(); track customTheme.id)\n {\n <button\n mat-menu-item\n (click)=\"colorPaletteService.setTheme(customTheme.id)\"\n >\n <div class=\"theme-menu-item\">\n <div\n class=\"color-preview\"\n [style.background-color]=\"customTheme.primary\"\n ></div>\n <span>{{ customTheme.displayName }}</span>\n </div>\n </button>\n }\n </mat-menu>\n</mat-toolbar>\n", styles: ["mat-toolbar{position:fixed;top:0;left:0;right:0;z-index:3;box-shadow:0 1px 5px #0000001a;display:flex;align-items:center}.sidenav-header{display:flex;justify-content:space-between;align-items:center;padding:16px;margin:0;font-weight:500}.sidenav-header .left-section{display:flex;align-items:center;gap:16px}.sidenav-header .spacer{flex:1 1 auto}.flex-stretch{flex:1 0 auto}.theme-menu-item{display:flex;align-items:center;gap:12px}.color-preview{width:24px;height:24px;border-radius:50%}::ng-deep .theme-button{border:none;background:none;margin-right:15px;cursor:pointer}::ng-deep .custom-theme-button{border:none;background:none;cursor:pointer}::ng-deep .menu-button{border:none;background:none;cursor:pointer}.language-button{margin:0 auto}::ng-deep button{border:none;background:none;cursor:pointer}\n"], dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatMenuModule }, { kind: "component", type: i3$3.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i3$3.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i3$3.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "ngmodule", type: MatToolbarModule }, { kind: "component", type: i3$5.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2$2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2$2.TitleCasePipe, name: "titlecase" }] });
|
|
2766
2923
|
}
|
|
2767
2924
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImport: i0, type: Toolbar, decorators: [{
|
|
2768
2925
|
type: Component,
|
|
@@ -2772,7 +2929,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
2772
2929
|
MatToolbarModule,
|
|
2773
2930
|
CommonModule,
|
|
2774
2931
|
TitleCasePipe,
|
|
2775
|
-
], template: "<mat-toolbar class=\"sidenav-header\">\n <div class=\"left-section\">\n <button mat-icon-button (click)=\"onToggleSidenav()\" class=\"menu-button\">\n <mat-icon>menu</mat-icon>\n </button>\n <span>Netty Admin Core</span>\n\n
|
|
2932
|
+
], template: "<mat-toolbar class=\"sidenav-header\">\n <div class=\"left-section\">\n <button mat-icon-button (click)=\"onToggleSidenav()\" class=\"menu-button\">\n <mat-icon>menu</mat-icon>\n </button>\n <span>Netty Admin Core</span>\n\n <!-- Language Selection -->\n <div class=\"language-toggle\">\n <button\n *ngIf=\"icon; else text\"\n mat-icon-button\n [matMenuTriggerFor]=\"languageMenu\"\n >\n <span class=\"{{ getCurrentLanguageIcon() }}\"></span>\n </button>\n <ng-template #text>\n <button\n mat-raised-button\n color=\"primary\"\n [matMenuTriggerFor]=\"languageMenu\"\n >\n {{ currentLanguage }}\n </button>\n </ng-template>\n </div>\n\n <!-- Language Menu -->\n <mat-menu #languageMenu=\"matMenu\">\n <button\n mat-menu-item\n *ngFor=\"let language of languages\"\n (click)=\"setLanguage(language)\"\n >\n <span class=\"{{ getLanguageIcon(language) }}\"></span>\n {{ language }}\n </button>\n </mat-menu>\n </div>\n\n <div class=\"spacer\"></div>\n\n <div class=\"flex-stretch\"></div>\n <button\n mat-icon-button\n [mat-menu-trigger-for]=\"themeMenu\"\n class=\"theme-button\"\n >\n <mat-icon>{{ themeService.selectedTheme()?.icon }}</mat-icon>\n </button>\n <mat-menu #themeMenu=\"matMenu\">\n @for (theme of themeService.getThemes(); track theme.name) {\n <button\n [class.selected-theme]=\"themeService.selectedTheme()?.name === theme.name\"\n mat-menu-item\n (click)=\"themeService.setTheme(theme.name)\"\n >\n <mat-icon>{{ theme.icon }}</mat-icon>\n <span>{{ theme.name | titlecase }}</span>\n </button>\n }\n </mat-menu>\n <button\n mat-icon-button\n [matMenuTriggerFor]=\"customThemeMenu\"\n class=\"custom-theme-button\"\n >\n <mat-icon>format_color_fill</mat-icon>\n </button>\n <mat-menu #customThemeMenu=\"matMenu\">\n @for (customTheme of colorPaletteService.getThemes(); track customTheme.id)\n {\n <button\n mat-menu-item\n (click)=\"colorPaletteService.setTheme(customTheme.id)\"\n >\n <div class=\"theme-menu-item\">\n <div\n class=\"color-preview\"\n [style.background-color]=\"customTheme.primary\"\n ></div>\n <span>{{ customTheme.displayName }}</span>\n </div>\n </button>\n }\n </mat-menu>\n</mat-toolbar>\n", styles: ["mat-toolbar{position:fixed;top:0;left:0;right:0;z-index:3;box-shadow:0 1px 5px #0000001a;display:flex;align-items:center}.sidenav-header{display:flex;justify-content:space-between;align-items:center;padding:16px;margin:0;font-weight:500}.sidenav-header .left-section{display:flex;align-items:center;gap:16px}.sidenav-header .spacer{flex:1 1 auto}.flex-stretch{flex:1 0 auto}.theme-menu-item{display:flex;align-items:center;gap:12px}.color-preview{width:24px;height:24px;border-radius:50%}::ng-deep .theme-button{border:none;background:none;margin-right:15px;cursor:pointer}::ng-deep .custom-theme-button{border:none;background:none;cursor:pointer}::ng-deep .menu-button{border:none;background:none;cursor:pointer}.language-button{margin:0 auto}::ng-deep button{border:none;background:none;cursor:pointer}\n"] }]
|
|
2776
2933
|
}] });
|
|
2777
2934
|
|
|
2778
2935
|
class Guid {
|
|
@@ -2939,7 +3096,7 @@ class AutoCompletePopupMenu {
|
|
|
2939
3096
|
return;
|
|
2940
3097
|
// Split the component path into segments
|
|
2941
3098
|
const pathSegments = this.componentPath.split('/').filter((p) => p);
|
|
2942
|
-
this.
|
|
3099
|
+
this.gotoNewTab(pathSegments, '', 'new');
|
|
2943
3100
|
this.Result.emit('New');
|
|
2944
3101
|
}
|
|
2945
3102
|
gotoMain() {
|
|
@@ -2947,7 +3104,7 @@ class AutoCompletePopupMenu {
|
|
|
2947
3104
|
return;
|
|
2948
3105
|
// Split the component path into segments
|
|
2949
3106
|
const pathSegments = this.componentPath.split('/').filter((p) => p);
|
|
2950
|
-
this.
|
|
3107
|
+
this.gotoNewTab(pathSegments, this.recordGuid, 'edit');
|
|
2951
3108
|
this.Result.emit('Main');
|
|
2952
3109
|
}
|
|
2953
3110
|
gotoLookup() {
|
|
@@ -2955,7 +3112,7 @@ class AutoCompletePopupMenu {
|
|
|
2955
3112
|
this.Result.emit('Lookup');
|
|
2956
3113
|
}
|
|
2957
3114
|
}
|
|
2958
|
-
|
|
3115
|
+
gotoNewTab(target, params, type) {
|
|
2959
3116
|
if (!target || target.length === 0)
|
|
2960
3117
|
return;
|
|
2961
3118
|
// Construct the URL directly in the format you want
|
|
@@ -3283,6 +3440,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
3283
3440
|
args: ['autoCompleteInput']
|
|
3284
3441
|
}] } });
|
|
3285
3442
|
|
|
3443
|
+
class Filter {
|
|
3444
|
+
value;
|
|
3445
|
+
text;
|
|
3446
|
+
}
|
|
3447
|
+
|
|
3286
3448
|
/*
|
|
3287
3449
|
* Public API Surface of ntybase
|
|
3288
3450
|
*/
|
|
@@ -3291,5 +3453,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.7", ngImpor
|
|
|
3291
3453
|
* Generated bundle index. Do not edit.
|
|
3292
3454
|
*/
|
|
3293
3455
|
|
|
3294
|
-
export { AgGridBase, AgGridSaveBase, AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, AutoComplete, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, ColorPalette, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ForgotPassword, Guid, HttpError403, HttpError404, LeftSidenav, Login, LoginDto, MFACodeDto, MfaLogin, NettyAgGridService, NettyHelper, NettyMenuService, Ntybase, NtybaseModule, SelectionItem, Theme, Toolbar, UrlHelperService };
|
|
3456
|
+
export { AgGridBase, AgGridSaveBase, AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, AutoComplete, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, ColorPalette, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ExcelImportBase, Filter, ForgotPassword, Guid, HttpError403, HttpError404, LeftSidenav, Login, LoginDto, MFACodeDto, MfaLogin, NettyAgGridService, NettyHelper, NettyMenuService, Ntybase, NtybaseModule, SelectionItem, Theme, Toolbar, UrlHelperService };
|
|
3295
3457
|
//# sourceMappingURL=nettyapps-ntybase.mjs.map
|