@nettyapps/ntybase 21.0.35-beta.1 → 21.0.35-beta.11
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.
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, Injectable, inject, NgModule, signal, input, computed,
|
|
2
|
+
import { Component, Injectable, inject, NgModule, signal, input, output, computed, linkedSignal, effect, ViewChild, model, Input, InjectionToken, Optional, Inject } from '@angular/core';
|
|
3
3
|
import * as i1$3 from '@angular/common/http';
|
|
4
4
|
import { HttpErrorResponse, HttpResponse, HTTP_INTERCEPTORS, HttpClient, HttpHeaders } from '@angular/common/http';
|
|
5
5
|
import { of, throwError, Subject, lastValueFrom, map, catchError as catchError$1, finalize, take as take$1, takeUntil } from 'rxjs';
|
|
6
6
|
import { catchError, map as map$1, take, finalize as finalize$1 } from 'rxjs/operators';
|
|
7
7
|
import { Router, ActivatedRoute } from '@angular/router';
|
|
8
|
-
import * as i2$
|
|
9
|
-
import { EnvironmentProxy, injectNettyStandardProxy, injectNettyStandardLogProxy } from '@nettyapps/ntycontract';
|
|
8
|
+
import * as i2$1 from '@nettyapps/ntycontract';
|
|
9
|
+
import { EnvironmentProxy, injectNettyStandardProxy, injectNettyStandardLogProxy, NettyStandardFilterProxy } from '@nettyapps/ntycontract';
|
|
10
10
|
import { DatePipe, CommonModule, Location, DecimalPipe } from '@angular/common';
|
|
11
|
-
import {
|
|
11
|
+
import { Buffer } from 'buffer';
|
|
12
12
|
import * as i1 from '@angular/material/dialog';
|
|
13
13
|
import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule, MatDialog } from '@angular/material/dialog';
|
|
14
|
-
import { ModuleRegistry, AllCommunityModule, ClientSideRowModelModule, HighlightChangesModule } from 'ag-grid-community';
|
|
15
|
-
import { themeQuartz, StatusBarModule, ClipboardModule, ExcelExportModule, ColumnMenuModule, ContextMenuModule, CellSelectionModule, RowSelectionModule } from 'ag-grid-enterprise';
|
|
16
|
-
import * as i2 from '@angular/material/icon';
|
|
17
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
18
|
-
import * as i2$1 from '@angular/material/tooltip';
|
|
19
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
20
|
-
import * as i2$3 from '@angular/material/menu';
|
|
21
|
-
import { MatMenuModule } from '@angular/material/menu';
|
|
22
|
-
import { Buffer } from 'buffer';
|
|
23
14
|
import * as i3 from '@angular/material/divider';
|
|
24
15
|
import { MatDividerModule } from '@angular/material/divider';
|
|
16
|
+
import * as i2 from '@angular/material/icon';
|
|
17
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
25
18
|
import * as i1$2 from '@angular/material/snack-bar';
|
|
26
19
|
import { MatSnackBarModule } from '@angular/material/snack-bar';
|
|
27
20
|
import * as i1$1 from '@ngx-translate/core';
|
|
28
21
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
29
22
|
import { Mutex } from 'async-mutex';
|
|
23
|
+
import { themeQuartz, StatusBarModule, ClipboardModule, ExcelExportModule, ColumnMenuModule, ContextMenuModule, CellSelectionModule, RowSelectionModule } from 'ag-grid-enterprise';
|
|
24
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
25
|
+
import { ModuleRegistry, AllCommunityModule, ClientSideRowModelModule, HighlightChangesModule } from 'ag-grid-community';
|
|
26
|
+
import * as i2$2 from '@angular/material/tooltip';
|
|
27
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
28
|
+
import * as i2$3 from '@angular/material/menu';
|
|
29
|
+
import { MatMenuModule } from '@angular/material/menu';
|
|
30
30
|
import * as XLSX from 'xlsx';
|
|
31
31
|
import { I18nService } from '@nettyapps/ntyi18n';
|
|
32
32
|
import * as i1$4 from '@angular/forms';
|
|
@@ -34,6 +34,7 @@ import { FormBuilder, Validators, FormsModule, ReactiveFormsModule } from '@angu
|
|
|
34
34
|
import * as i3$1 from '@angular/material/input';
|
|
35
35
|
import { MatInputModule } from '@angular/material/input';
|
|
36
36
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
37
|
+
import { NettyEnumStorageProxy } from '@nettyapps/ntyui';
|
|
37
38
|
|
|
38
39
|
class Ntybase {
|
|
39
40
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: Ntybase, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -310,152 +311,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
310
311
|
}]
|
|
311
312
|
}] });
|
|
312
313
|
|
|
313
|
-
class ButtonRenderer {
|
|
314
|
-
params = null;
|
|
315
|
-
label = '';
|
|
316
|
-
type = '';
|
|
317
|
-
toggleValue = null;
|
|
318
|
-
editValid = false;
|
|
319
|
-
historyValid = false;
|
|
320
|
-
lineValid = false;
|
|
321
|
-
popupSelectValid = false;
|
|
322
|
-
popupEditValid = false;
|
|
323
|
-
toggleValid = false;
|
|
324
|
-
toggle_icon = '';
|
|
325
|
-
none = false;
|
|
326
|
-
addValid = false;
|
|
327
|
-
deleteValid = false;
|
|
328
|
-
agInit(params) {
|
|
329
|
-
this.params = params;
|
|
330
|
-
this.type = this.params.type || null;
|
|
331
|
-
this.label = this.params.label || null;
|
|
332
|
-
this.toggleValue = this.params.value || null;
|
|
333
|
-
switch (this.toggleValue) {
|
|
334
|
-
case true:
|
|
335
|
-
this.toggle_icon = 'select_check_box';
|
|
336
|
-
break;
|
|
337
|
-
case false:
|
|
338
|
-
this.toggle_icon = 'check_box_outline_blank';
|
|
339
|
-
break;
|
|
340
|
-
default:
|
|
341
|
-
this.toggle_icon = '';
|
|
342
|
-
break;
|
|
343
|
-
}
|
|
344
|
-
this.resetValids();
|
|
345
|
-
switch (this.type.toLowerCase().trim()) {
|
|
346
|
-
case 'edit':
|
|
347
|
-
this.editValid = true;
|
|
348
|
-
break;
|
|
349
|
-
case 'log':
|
|
350
|
-
this.historyValid = true;
|
|
351
|
-
break;
|
|
352
|
-
case 'line':
|
|
353
|
-
this.lineValid = true;
|
|
354
|
-
break;
|
|
355
|
-
case 'popupselect':
|
|
356
|
-
this.popupSelectValid = true;
|
|
357
|
-
break;
|
|
358
|
-
case 'toggle':
|
|
359
|
-
this.toggleValid = true;
|
|
360
|
-
break;
|
|
361
|
-
case 'none':
|
|
362
|
-
this.none = true;
|
|
363
|
-
break;
|
|
364
|
-
case 'add':
|
|
365
|
-
this.addValid = true;
|
|
366
|
-
break;
|
|
367
|
-
case 'delete':
|
|
368
|
-
this.deleteValid = true;
|
|
369
|
-
break;
|
|
370
|
-
default:
|
|
371
|
-
this.popupEditValid = true;
|
|
372
|
-
break;
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
/** Refresh the display
|
|
376
|
-
*
|
|
377
|
-
* @param params
|
|
378
|
-
* @returns
|
|
379
|
-
*/
|
|
380
|
-
refresh(params) {
|
|
381
|
-
return false;
|
|
382
|
-
}
|
|
383
|
-
resetValids() {
|
|
384
|
-
this.editValid = false;
|
|
385
|
-
this.historyValid = false;
|
|
386
|
-
this.lineValid = false;
|
|
387
|
-
this.popupSelectValid = false;
|
|
388
|
-
this.popupEditValid = false;
|
|
389
|
-
this.toggleValid = false;
|
|
390
|
-
}
|
|
391
|
-
onClick(event) {
|
|
392
|
-
if (this.params.onClick instanceof Function) {
|
|
393
|
-
// put anything into params u want pass into parents component
|
|
394
|
-
const params = {
|
|
395
|
-
event: event,
|
|
396
|
-
rowData: this.params.node.data,
|
|
397
|
-
type: this.type,
|
|
398
|
-
// ...something
|
|
399
|
-
};
|
|
400
|
-
this.params.onClick(params);
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ButtonRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
404
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ButtonRenderer, isStandalone: true, selector: "ntybase-button-renderer", host: { attributes: { "ntybase-id": "ButtonRenderer" } }, ngImport: i0, template: "@if (editValid || popupEditValid) {\n<mat-icon\n class=\"cursor center edit\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"4000\"\n >edit</mat-icon\n>\n} @if (historyValid) {\n<mat-icon\n class=\"cursor center-log\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >log</mat-icon\n>\n} @if (historyValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >history</mat-icon\n>\n} @if (lineValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n} @if (popupSelectValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >content_copy</mat-icon\n>\n} @if (toggleValid) {\n<mat-icon\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} @if (none) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n} @if (addValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >playlist_add</mat-icon\n>\n} @if (deleteValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >delete_outline</mat-icon\n>\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: MatTooltipModule }, { kind: "directive", type: i2$1.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatMenuModule }] });
|
|
405
|
-
}
|
|
406
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ButtonRenderer, decorators: [{
|
|
407
|
-
type: Component,
|
|
408
|
-
args: [{ selector: 'ntybase-button-renderer', imports: [MatIconModule, MatTooltipModule, MatMenuModule], host: { 'ntybase-id': 'ButtonRenderer' }, template: "@if (editValid || popupEditValid) {\n<mat-icon\n class=\"cursor center edit\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"4000\"\n >edit</mat-icon\n>\n} @if (historyValid) {\n<mat-icon\n class=\"cursor center-log\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >log</mat-icon\n>\n} @if (historyValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >history</mat-icon\n>\n} @if (lineValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n} @if (popupSelectValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >content_copy</mat-icon\n>\n} @if (toggleValid) {\n<mat-icon\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} @if (none) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n} @if (addValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >playlist_add</mat-icon\n>\n} @if (deleteValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >delete_outline</mat-icon\n>\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"] }]
|
|
409
|
-
}] });
|
|
410
|
-
|
|
411
|
-
class CheckboxRenderer {
|
|
412
|
-
params = null;
|
|
413
|
-
label = '';
|
|
414
|
-
type = '';
|
|
415
|
-
supportClick = false;
|
|
416
|
-
checked = null;
|
|
417
|
-
agInit(params) {
|
|
418
|
-
this.onProcess(params);
|
|
419
|
-
}
|
|
420
|
-
refresh(params) {
|
|
421
|
-
if (params != null) {
|
|
422
|
-
this.onProcess(params);
|
|
423
|
-
}
|
|
424
|
-
return true;
|
|
425
|
-
}
|
|
426
|
-
onProcess(params) {
|
|
427
|
-
this.params = params;
|
|
428
|
-
this.checked = this.params.value ?? false;
|
|
429
|
-
this.type = this.params.type || null;
|
|
430
|
-
this.label = this.params.label || null;
|
|
431
|
-
if (this.type != null) {
|
|
432
|
-
if (this.type.toLowerCase().trim() == 'click') {
|
|
433
|
-
this.supportClick = true;
|
|
434
|
-
}
|
|
435
|
-
}
|
|
436
|
-
}
|
|
437
|
-
onClick(event) {
|
|
438
|
-
this.checked = !this.checked;
|
|
439
|
-
if (this.params.onClick instanceof Function) {
|
|
440
|
-
// put anything into params u want pass into parents component
|
|
441
|
-
const params = {
|
|
442
|
-
event: event,
|
|
443
|
-
rowData: this.params.node.data,
|
|
444
|
-
type: this.type,
|
|
445
|
-
checked: this.checked,
|
|
446
|
-
// ...something
|
|
447
|
-
};
|
|
448
|
-
this.params.onClick(params);
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CheckboxRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
452
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: CheckboxRenderer, isStandalone: true, selector: "ntybase-checkbox-renderer", host: { attributes: { "ntybase-id": "CheckboxRenderer" } }, ngImport: i0, template: "@if (supportClick) {\n<input\n id=\"checkbox\"\n type=\"checkbox\"\n [checked]=\"checked\"\n (click)=\"onClick($event)\"\n/>\n} @if (!supportClick) {\n<input id=\"checkbox\" type=\"checkbox\" [checked]=\"params.value\" disabled />\n}\n\n<label for=\"checkbox\">{{label}}</label>\n", styles: [""] });
|
|
453
|
-
}
|
|
454
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CheckboxRenderer, decorators: [{
|
|
455
|
-
type: Component,
|
|
456
|
-
args: [{ selector: 'ntybase-checkbox-renderer', imports: [], host: { 'ntybase-id': 'CheckboxRenderer' }, template: "@if (supportClick) {\n<input\n id=\"checkbox\"\n type=\"checkbox\"\n [checked]=\"checked\"\n (click)=\"onClick($event)\"\n/>\n} @if (!supportClick) {\n<input id=\"checkbox\" type=\"checkbox\" [checked]=\"params.value\" disabled />\n}\n\n<label for=\"checkbox\">{{label}}</label>\n" }]
|
|
457
|
-
}] });
|
|
458
|
-
|
|
459
314
|
class ConfirmDialog {
|
|
460
315
|
dialogRef = inject((MatDialogRef));
|
|
461
316
|
data = inject(MAT_DIALOG_DATA);
|
|
@@ -1379,7 +1234,7 @@ class SysfunctionProxy {
|
|
|
1379
1234
|
return throwError(() => new Error(errorMessage ?? ''));
|
|
1380
1235
|
}));
|
|
1381
1236
|
}
|
|
1382
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SysfunctionProxy, deps: [{ token: i1$3.HttpClient }, { token: i2$
|
|
1237
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SysfunctionProxy, deps: [{ token: i1$3.HttpClient }, { token: i2$1.EnvironmentProxy }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1383
1238
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SysfunctionProxy, providedIn: 'root' });
|
|
1384
1239
|
}
|
|
1385
1240
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: SysfunctionProxy, decorators: [{
|
|
@@ -1387,7 +1242,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
1387
1242
|
args: [{
|
|
1388
1243
|
providedIn: 'root',
|
|
1389
1244
|
}]
|
|
1390
|
-
}], ctorParameters: () => [{ type: i1$3.HttpClient }, { type: i2$
|
|
1245
|
+
}], ctorParameters: () => [{ type: i1$3.HttpClient }, { type: i2$1.EnvironmentProxy }] });
|
|
1391
1246
|
|
|
1392
1247
|
class NettyAgGridBase extends NettyAppsBase {
|
|
1393
1248
|
FILTER_MODE_KEY = 'nettyapps_filter_mode';
|
|
@@ -1403,6 +1258,18 @@ class NettyAgGridBase extends NettyAppsBase {
|
|
|
1403
1258
|
popupFilterValid = input(false, ...(ngDevMode ? [{ debugName: "popupFilterValid" }] : [])); // Is the popup filter valid
|
|
1404
1259
|
popupValid = input(false, ...(ngDevMode ? [{ debugName: "popupValid" }] : [])); // Is the form in popup mode
|
|
1405
1260
|
isEmbedded = input(false, ...(ngDevMode ? [{ debugName: "isEmbedded" }] : [])); // Is the form embedded to an other component
|
|
1261
|
+
// Parameters passed when the component is embeded into an other
|
|
1262
|
+
componantParameterGUID = input('', ...(ngDevMode ? [{ debugName: "componantParameterGUID" }] : [])); // GUID of the parameter
|
|
1263
|
+
componantParameterType = input('', ...(ngDevMode ? [{ debugName: "componantParameterType" }] : [])); // Type of the parameter (Field Name)
|
|
1264
|
+
// ********************************************
|
|
1265
|
+
// *** EVENTS ***
|
|
1266
|
+
// ********************************************
|
|
1267
|
+
/*
|
|
1268
|
+
Selected records event
|
|
1269
|
+
@param records: Array of selected records
|
|
1270
|
+
*/
|
|
1271
|
+
onElementSelect = output(); // Emit selected records when updated
|
|
1272
|
+
selectedElement = output(); // Selected element in popup mode
|
|
1406
1273
|
// Component identifiers
|
|
1407
1274
|
componentName = signal('Invalid', ...(ngDevMode ? [{ debugName: "componentName" }] : []));
|
|
1408
1275
|
searchValueName = signal('Invalid_searchValue', ...(ngDevMode ? [{ debugName: "searchValueName" }] : []));
|
|
@@ -1416,6 +1283,9 @@ class NettyAgGridBase extends NettyAppsBase {
|
|
|
1416
1283
|
commonService = inject(CommonService);
|
|
1417
1284
|
sysFunctionProxy = inject(SysfunctionProxy);
|
|
1418
1285
|
environment = inject(EnvironmentProxy);
|
|
1286
|
+
// Button action management variables
|
|
1287
|
+
menuValid = signal(true, ...(ngDevMode ? [{ debugName: "menuValid" }] : [])); // true: Filter editbox is not visible so the menus are visible
|
|
1288
|
+
refreshButtonValid = signal(false, ...(ngDevMode ? [{ debugName: "refreshButtonValid" }] : [])); // true: Refresh button is enabled
|
|
1419
1289
|
// Authentication
|
|
1420
1290
|
authenticationList = [];
|
|
1421
1291
|
// User access writes
|
|
@@ -1430,10 +1300,33 @@ class NettyAgGridBase extends NettyAppsBase {
|
|
|
1430
1300
|
// ---------------------------------------------------
|
|
1431
1301
|
recordList = signal([], ...(ngDevMode ? [{ debugName: "recordList" }] : []));
|
|
1432
1302
|
record = null;
|
|
1303
|
+
// ***************************************************************
|
|
1304
|
+
// *** METHODS For optional overide ***
|
|
1305
|
+
// ***************************************************************
|
|
1306
|
+
async AfterOnInit() { }
|
|
1307
|
+
setFilter() { } //override this to set a filter
|
|
1308
|
+
// ***************************************************************
|
|
1309
|
+
// *** METHODS ***
|
|
1310
|
+
// ***************************************************************
|
|
1311
|
+
popupClose() { this.selectedElement.emit(null); }
|
|
1312
|
+
onFilterTextBoxVisibilityChange(isOpen) {
|
|
1313
|
+
this.menuValid.set(!isOpen);
|
|
1314
|
+
}
|
|
1433
1315
|
/**
|
|
1434
|
-
*
|
|
1316
|
+
* Handle back button click
|
|
1435
1317
|
*/
|
|
1436
|
-
|
|
1318
|
+
backClicked() {
|
|
1319
|
+
this.commonService.goBack();
|
|
1320
|
+
}
|
|
1321
|
+
async refreshData() {
|
|
1322
|
+
try {
|
|
1323
|
+
this.loadData();
|
|
1324
|
+
await this.alertService.showAlert('@dataRefreshedSuccessfully');
|
|
1325
|
+
}
|
|
1326
|
+
catch (err) {
|
|
1327
|
+
this.alertService.showError(err);
|
|
1328
|
+
}
|
|
1329
|
+
}
|
|
1437
1330
|
/** Set data into the grid */
|
|
1438
1331
|
setData(data) {
|
|
1439
1332
|
this.recordList.set(data);
|
|
@@ -1707,12 +1600,158 @@ class NettyAgGridBase extends NettyAppsBase {
|
|
|
1707
1600
|
this.gridApi?.setColumnsVisible(fields, !this.isEmbedded());
|
|
1708
1601
|
}
|
|
1709
1602
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NettyAgGridBase, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1710
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: NettyAgGridBase, isStandalone: true, selector: "ntybase-ag-grid-base", inputs: { popupFilterValid: { classPropertyName: "popupFilterValid", publicName: "popupFilterValid", isSignal: true, isRequired: false, transformFunction: null }, popupValid: { classPropertyName: "popupValid", publicName: "popupValid", isSignal: true, isRequired: false, transformFunction: null }, isEmbedded: { classPropertyName: "isEmbedded", publicName: "isEmbedded", isSignal: true, isRequired: false, transformFunction: null }, agGridSelectionMode: { classPropertyName: "agGridSelectionMode", publicName: "agGridSelectionMode", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "ntybase-id": "NettyAgGridBase" } }, usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
1603
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: NettyAgGridBase, isStandalone: true, selector: "ntybase-ag-grid-base", inputs: { popupFilterValid: { classPropertyName: "popupFilterValid", publicName: "popupFilterValid", isSignal: true, isRequired: false, transformFunction: null }, popupValid: { classPropertyName: "popupValid", publicName: "popupValid", isSignal: true, isRequired: false, transformFunction: null }, isEmbedded: { classPropertyName: "isEmbedded", publicName: "isEmbedded", isSignal: true, isRequired: false, transformFunction: null }, componantParameterGUID: { classPropertyName: "componantParameterGUID", publicName: "componantParameterGUID", isSignal: true, isRequired: false, transformFunction: null }, componantParameterType: { classPropertyName: "componantParameterType", publicName: "componantParameterType", isSignal: true, isRequired: false, transformFunction: null }, agGridSelectionMode: { classPropertyName: "agGridSelectionMode", publicName: "agGridSelectionMode", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onElementSelect: "onElementSelect", selectedElement: "selectedElement" }, host: { attributes: { "ntybase-id": "NettyAgGridBase" } }, usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
1711
1604
|
}
|
|
1712
1605
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NettyAgGridBase, decorators: [{
|
|
1713
1606
|
type: Component,
|
|
1714
1607
|
args: [{ selector: 'ntybase-ag-grid-base', imports: [], template: ``, host: { 'ntybase-id': 'NettyAgGridBase' } }]
|
|
1715
|
-
}], propDecorators: { popupFilterValid: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupFilterValid", required: false }] }], popupValid: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupValid", required: false }] }], isEmbedded: [{ type: i0.Input, args: [{ isSignal: true, alias: "isEmbedded", required: false }] }], agGridSelectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "agGridSelectionMode", required: false }] }] } });
|
|
1608
|
+
}], propDecorators: { popupFilterValid: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupFilterValid", required: false }] }], popupValid: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupValid", required: false }] }], isEmbedded: [{ type: i0.Input, args: [{ isSignal: true, alias: "isEmbedded", required: false }] }], componantParameterGUID: [{ type: i0.Input, args: [{ isSignal: true, alias: "componantParameterGUID", required: false }] }], componantParameterType: [{ type: i0.Input, args: [{ isSignal: true, alias: "componantParameterType", required: false }] }], onElementSelect: [{ type: i0.Output, args: ["onElementSelect"] }], selectedElement: [{ type: i0.Output, args: ["selectedElement"] }], agGridSelectionMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "agGridSelectionMode", required: false }] }] } });
|
|
1609
|
+
|
|
1610
|
+
class ButtonRenderer {
|
|
1611
|
+
params = null;
|
|
1612
|
+
label = '';
|
|
1613
|
+
type = '';
|
|
1614
|
+
toggleValue = null;
|
|
1615
|
+
editValid = false;
|
|
1616
|
+
historyValid = false;
|
|
1617
|
+
lineValid = false;
|
|
1618
|
+
popupSelectValid = false;
|
|
1619
|
+
popupEditValid = false;
|
|
1620
|
+
toggleValid = false;
|
|
1621
|
+
toggle_icon = '';
|
|
1622
|
+
none = false;
|
|
1623
|
+
addValid = false;
|
|
1624
|
+
deleteValid = false;
|
|
1625
|
+
agInit(params) {
|
|
1626
|
+
this.params = params;
|
|
1627
|
+
this.type = this.params.type || null;
|
|
1628
|
+
this.label = this.params.label || null;
|
|
1629
|
+
this.toggleValue = this.params.value || null;
|
|
1630
|
+
switch (this.toggleValue) {
|
|
1631
|
+
case true:
|
|
1632
|
+
this.toggle_icon = 'select_check_box';
|
|
1633
|
+
break;
|
|
1634
|
+
case false:
|
|
1635
|
+
this.toggle_icon = 'check_box_outline_blank';
|
|
1636
|
+
break;
|
|
1637
|
+
default:
|
|
1638
|
+
this.toggle_icon = '';
|
|
1639
|
+
break;
|
|
1640
|
+
}
|
|
1641
|
+
this.resetValids();
|
|
1642
|
+
switch (this.type.toLowerCase().trim()) {
|
|
1643
|
+
case 'edit':
|
|
1644
|
+
this.editValid = true;
|
|
1645
|
+
break;
|
|
1646
|
+
case 'log':
|
|
1647
|
+
this.historyValid = true;
|
|
1648
|
+
break;
|
|
1649
|
+
case 'line':
|
|
1650
|
+
this.lineValid = true;
|
|
1651
|
+
break;
|
|
1652
|
+
case 'popupselect':
|
|
1653
|
+
this.popupSelectValid = true;
|
|
1654
|
+
break;
|
|
1655
|
+
case 'toggle':
|
|
1656
|
+
this.toggleValid = true;
|
|
1657
|
+
break;
|
|
1658
|
+
case 'none':
|
|
1659
|
+
this.none = true;
|
|
1660
|
+
break;
|
|
1661
|
+
case 'add':
|
|
1662
|
+
this.addValid = true;
|
|
1663
|
+
break;
|
|
1664
|
+
case 'delete':
|
|
1665
|
+
this.deleteValid = true;
|
|
1666
|
+
break;
|
|
1667
|
+
default:
|
|
1668
|
+
this.popupEditValid = true;
|
|
1669
|
+
break;
|
|
1670
|
+
}
|
|
1671
|
+
}
|
|
1672
|
+
/** Refresh the display
|
|
1673
|
+
*
|
|
1674
|
+
* @param params
|
|
1675
|
+
* @returns
|
|
1676
|
+
*/
|
|
1677
|
+
refresh(params) {
|
|
1678
|
+
return false;
|
|
1679
|
+
}
|
|
1680
|
+
resetValids() {
|
|
1681
|
+
this.editValid = false;
|
|
1682
|
+
this.historyValid = false;
|
|
1683
|
+
this.lineValid = false;
|
|
1684
|
+
this.popupSelectValid = false;
|
|
1685
|
+
this.popupEditValid = false;
|
|
1686
|
+
this.toggleValid = false;
|
|
1687
|
+
}
|
|
1688
|
+
onClick(event) {
|
|
1689
|
+
if (this.params.onClick instanceof Function) {
|
|
1690
|
+
// put anything into params u want pass into parents component
|
|
1691
|
+
const params = {
|
|
1692
|
+
event: event,
|
|
1693
|
+
rowData: this.params.node.data,
|
|
1694
|
+
type: this.type,
|
|
1695
|
+
// ...something
|
|
1696
|
+
};
|
|
1697
|
+
this.params.onClick(params);
|
|
1698
|
+
}
|
|
1699
|
+
}
|
|
1700
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ButtonRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1701
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: ButtonRenderer, isStandalone: true, selector: "ntybase-button-renderer", host: { attributes: { "ntybase-id": "ButtonRenderer" } }, ngImport: i0, template: "@if (editValid || popupEditValid) {\n<mat-icon\n class=\"cursor center edit\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"4000\"\n >edit</mat-icon\n>\n} @if (historyValid) {\n<mat-icon\n class=\"cursor center-log\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >log</mat-icon\n>\n} @if (historyValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >history</mat-icon\n>\n} @if (lineValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n} @if (popupSelectValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >content_copy</mat-icon\n>\n} @if (toggleValid) {\n<mat-icon\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} @if (none) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n} @if (addValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >playlist_add</mat-icon\n>\n} @if (deleteValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >delete_outline</mat-icon\n>\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: MatTooltipModule }, { kind: "directive", type: i2$2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "ngmodule", type: MatMenuModule }] });
|
|
1702
|
+
}
|
|
1703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: ButtonRenderer, decorators: [{
|
|
1704
|
+
type: Component,
|
|
1705
|
+
args: [{ selector: 'ntybase-button-renderer', imports: [MatIconModule, MatTooltipModule, MatMenuModule], host: { 'ntybase-id': 'ButtonRenderer' }, template: "@if (editValid || popupEditValid) {\n<mat-icon\n class=\"cursor center edit\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"4000\"\n >edit</mat-icon\n>\n} @if (historyValid) {\n<mat-icon\n class=\"cursor center-log\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >log</mat-icon\n>\n} @if (historyValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >history</mat-icon\n>\n} @if (lineValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n} @if (popupSelectValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >content_copy</mat-icon\n>\n} @if (toggleValid) {\n<mat-icon\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} @if (none) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n [matTooltipShowDelay]=\"3000\"\n >menu_open</mat-icon\n>\n} @if (addValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >playlist_add</mat-icon\n>\n} @if (deleteValid) {\n<mat-icon\n class=\"cursor center\"\n matTooltip=\"{{label}}\"\n (click)=\"onClick($event)\"\n [matTooltipShowDelay]=\"3000\"\n >delete_outline</mat-icon\n>\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"] }]
|
|
1706
|
+
}] });
|
|
1707
|
+
|
|
1708
|
+
class CheckboxRenderer {
|
|
1709
|
+
params = null;
|
|
1710
|
+
label = '';
|
|
1711
|
+
type = '';
|
|
1712
|
+
supportClick = false;
|
|
1713
|
+
checked = null;
|
|
1714
|
+
agInit(params) {
|
|
1715
|
+
this.onProcess(params);
|
|
1716
|
+
}
|
|
1717
|
+
refresh(params) {
|
|
1718
|
+
if (params != null) {
|
|
1719
|
+
this.onProcess(params);
|
|
1720
|
+
}
|
|
1721
|
+
return true;
|
|
1722
|
+
}
|
|
1723
|
+
onProcess(params) {
|
|
1724
|
+
this.params = params;
|
|
1725
|
+
this.checked = this.params.value ?? false;
|
|
1726
|
+
this.type = this.params.type || null;
|
|
1727
|
+
this.label = this.params.label || null;
|
|
1728
|
+
if (this.type != null) {
|
|
1729
|
+
if (this.type.toLowerCase().trim() == 'click') {
|
|
1730
|
+
this.supportClick = true;
|
|
1731
|
+
}
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
onClick(event) {
|
|
1735
|
+
this.checked = !this.checked;
|
|
1736
|
+
if (this.params.onClick instanceof Function) {
|
|
1737
|
+
// put anything into params u want pass into parents component
|
|
1738
|
+
const params = {
|
|
1739
|
+
event: event,
|
|
1740
|
+
rowData: this.params.node.data,
|
|
1741
|
+
type: this.type,
|
|
1742
|
+
checked: this.checked,
|
|
1743
|
+
// ...something
|
|
1744
|
+
};
|
|
1745
|
+
this.params.onClick(params);
|
|
1746
|
+
}
|
|
1747
|
+
}
|
|
1748
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CheckboxRenderer, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1749
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: CheckboxRenderer, isStandalone: true, selector: "ntybase-checkbox-renderer", host: { attributes: { "ntybase-id": "CheckboxRenderer" } }, ngImport: i0, template: "@if (supportClick) {\n<input\n id=\"checkbox\"\n type=\"checkbox\"\n [checked]=\"checked\"\n (click)=\"onClick($event)\"\n/>\n} @if (!supportClick) {\n<input id=\"checkbox\" type=\"checkbox\" [checked]=\"params.value\" disabled />\n}\n\n<label for=\"checkbox\">{{label}}</label>\n", styles: [""] });
|
|
1750
|
+
}
|
|
1751
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: CheckboxRenderer, decorators: [{
|
|
1752
|
+
type: Component,
|
|
1753
|
+
args: [{ selector: 'ntybase-checkbox-renderer', imports: [], host: { 'ntybase-id': 'CheckboxRenderer' }, template: "@if (supportClick) {\n<input\n id=\"checkbox\"\n type=\"checkbox\"\n [checked]=\"checked\"\n (click)=\"onClick($event)\"\n/>\n} @if (!supportClick) {\n<input id=\"checkbox\" type=\"checkbox\" [checked]=\"params.value\" disabled />\n}\n\n<label for=\"checkbox\">{{label}}</label>\n" }]
|
|
1754
|
+
}] });
|
|
1716
1755
|
|
|
1717
1756
|
ModuleRegistry.registerModules([AllCommunityModule, StatusBarModule, ClientSideRowModelModule, ClipboardModule, ExcelExportModule, ColumnMenuModule,
|
|
1718
1757
|
ContextMenuModule, CellSelectionModule, HighlightChangesModule, RowSelectionModule,]);
|
|
@@ -1721,35 +1760,31 @@ class NettyAgGridListBase extends NettyAgGridBase {
|
|
|
1721
1760
|
// ********************************************
|
|
1722
1761
|
// *** INPUTS ***
|
|
1723
1762
|
// ********************************************
|
|
1724
|
-
// Parameters passed when the component is embeded into an other
|
|
1725
|
-
componantParameterGUID = input('', ...(ngDevMode ? [{ debugName: "componantParameterGUID" }] : [])); // GUID of the parameter
|
|
1726
|
-
componantParameterType = input('', ...(ngDevMode ? [{ debugName: "componantParameterType" }] : [])); // Type of the parameter (Field Name)
|
|
1727
|
-
// ********************************************
|
|
1728
|
-
// *** EVENTS ***
|
|
1729
|
-
// ********************************************
|
|
1730
|
-
/*
|
|
1731
|
-
Selected records event
|
|
1732
|
-
@param records: Array of selected records
|
|
1733
|
-
*/
|
|
1734
|
-
onElementSelect = output(); // Emit selected records when updated
|
|
1735
|
-
// Parameters for embeded components
|
|
1736
|
-
selectedElement = output(); // Selected element in popup mode
|
|
1737
|
-
// ********************************************
|
|
1738
1763
|
// Filter section
|
|
1739
1764
|
hasFilter = input(false, ...(ngDevMode ? [{ debugName: "hasFilter" }] : [])); // Does the component have a filter
|
|
1740
1765
|
isFilterValid = signal(true, ...(ngDevMode ? [{ debugName: "isFilterValid" }] : [])); // Can the filter be used
|
|
1741
|
-
isFilterExpanded =
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1766
|
+
isFilterExpanded = linkedSignal({ ...(ngDevMode ? { debugName: "isFilterExpanded" } : {}), source: () => ({
|
|
1767
|
+
embedded: this.isEmbedded(),
|
|
1768
|
+
hasFilter: this.hasFilter(),
|
|
1769
|
+
valid: this.isFilterValid(),
|
|
1770
|
+
}),
|
|
1771
|
+
computation: (s) => {
|
|
1772
|
+
if (s.embedded || !s.hasFilter)
|
|
1773
|
+
return false;
|
|
1774
|
+
return s.valid;
|
|
1775
|
+
} });
|
|
1776
|
+
filterRefreshTrigger = signal(0, ...(ngDevMode ? [{ debugName: "filterRefreshTrigger" }] : []));
|
|
1777
|
+
/**
|
|
1778
|
+
* Triggers the filter component to refresh its data
|
|
1779
|
+
*/
|
|
1780
|
+
refreshFilterData() {
|
|
1781
|
+
let value = this.filterRefreshTrigger();
|
|
1782
|
+
if (value > 10000) {
|
|
1783
|
+
value = 0;
|
|
1747
1784
|
}
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
menuValid = signal(true, ...(ngDevMode ? [{ debugName: "menuValid" }] : [])); // true: Filter editbox is not visible so the menus are visible
|
|
1752
|
-
refreshButtonValid = signal(false, ...(ngDevMode ? [{ debugName: "refreshButtonValid" }] : [])); // true: Refresh button is enabled
|
|
1785
|
+
value++;
|
|
1786
|
+
this.filterRefreshTrigger.set(value);
|
|
1787
|
+
}
|
|
1753
1788
|
// Open component management
|
|
1754
1789
|
openEditComponentInPopup = signal(false, ...(ngDevMode ? [{ debugName: "openEditComponentInPopup" }] : []));
|
|
1755
1790
|
// Services
|
|
@@ -1763,6 +1798,7 @@ class NettyAgGridListBase extends NettyAgGridBase {
|
|
|
1763
1798
|
queryParameterType = toSignal(this.routerActive.queryParamMap.pipe(map((params) => params.get('type')), map((value) => this.parseOrReturnValue(value))), {
|
|
1764
1799
|
initialValue: null, // set initial value to null
|
|
1765
1800
|
});
|
|
1801
|
+
openInPopup = signal(false, ...(ngDevMode ? [{ debugName: "openInPopup" }] : [])); // true: Open add / edit component in popup
|
|
1766
1802
|
// ---------------------------------------------------
|
|
1767
1803
|
// --- RECORD LIST ---
|
|
1768
1804
|
// ---------------------------------------------------
|
|
@@ -1795,12 +1831,6 @@ class NettyAgGridListBase extends NettyAgGridBase {
|
|
|
1795
1831
|
}
|
|
1796
1832
|
return null;
|
|
1797
1833
|
}
|
|
1798
|
-
/**
|
|
1799
|
-
* Handle back button click
|
|
1800
|
-
*/
|
|
1801
|
-
backClicked() {
|
|
1802
|
-
this.commonService.goBack();
|
|
1803
|
-
}
|
|
1804
1834
|
gotoURL(routePrefix, rightSidenav = [], parameters, type, dialogComponent = null, isNewTab = false, isPopup = this.isEmbedded()) {
|
|
1805
1835
|
const baseHref = this.environment.getBaseHref().endsWith('/')
|
|
1806
1836
|
? this.environment.getBaseHref().slice(0, -1) // Sondaki / işaretini kaldır
|
|
@@ -1961,13 +1991,6 @@ class NettyAgGridListBase extends NettyAgGridBase {
|
|
|
1961
1991
|
}
|
|
1962
1992
|
return true;
|
|
1963
1993
|
}
|
|
1964
|
-
onFilterTextBoxVisibilityChange(isOpen) {
|
|
1965
|
-
this.menuValid.set(!isOpen);
|
|
1966
|
-
}
|
|
1967
|
-
setFilter() { } //override this to set a filter
|
|
1968
|
-
popupClose() {
|
|
1969
|
-
this.selectedElement.emit(null);
|
|
1970
|
-
}
|
|
1971
1994
|
// *********************************************************
|
|
1972
1995
|
// *** Data Management Functions ***
|
|
1973
1996
|
// *********************************************************
|
|
@@ -1997,15 +2020,6 @@ class NettyAgGridListBase extends NettyAgGridBase {
|
|
|
1997
2020
|
this.deleteRows(selectedRows);
|
|
1998
2021
|
}
|
|
1999
2022
|
}
|
|
2000
|
-
async refreshData() {
|
|
2001
|
-
try {
|
|
2002
|
-
this.loadData();
|
|
2003
|
-
await this.alertService.showAlert('@dataRefreshedSuccessfully');
|
|
2004
|
-
}
|
|
2005
|
-
catch (err) {
|
|
2006
|
-
this.alertService.showError(err);
|
|
2007
|
-
}
|
|
2008
|
-
}
|
|
2009
2023
|
deleteRows(rows) {
|
|
2010
2024
|
this.nettyAppsProxy.deleteList(rows).subscribe({
|
|
2011
2025
|
next: () => {
|
|
@@ -2016,12 +2030,12 @@ class NettyAgGridListBase extends NettyAgGridBase {
|
|
|
2016
2030
|
});
|
|
2017
2031
|
}
|
|
2018
2032
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NettyAgGridListBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2019
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: NettyAgGridListBase, isStandalone: true, selector: "ntybase-ag-grid-list-base", inputs: {
|
|
2033
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: NettyAgGridListBase, isStandalone: true, selector: "ntybase-ag-grid-list-base", inputs: { hasFilter: { classPropertyName: "hasFilter", publicName: "hasFilter", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "ntybase-id": "NettyAgGridListBase" } }, usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
2020
2034
|
}
|
|
2021
2035
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NettyAgGridListBase, decorators: [{
|
|
2022
2036
|
type: Component,
|
|
2023
2037
|
args: [{ selector: 'ntybase-ag-grid-list-base', imports: [], template: ``, host: { 'ntybase-id': 'NettyAgGridListBase' } }]
|
|
2024
|
-
}], ctorParameters: () => [], propDecorators: {
|
|
2038
|
+
}], ctorParameters: () => [], propDecorators: { hasFilter: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasFilter", required: false }] }] } });
|
|
2025
2039
|
|
|
2026
2040
|
class NettyAgGridLogBase extends NettyAgGridBase {
|
|
2027
2041
|
// ---------------------------------------------------
|
|
@@ -2091,6 +2105,9 @@ class NettyAgGridSaveBase extends NettyAppsBase {
|
|
|
2091
2105
|
this.loadDetailData();
|
|
2092
2106
|
});
|
|
2093
2107
|
}
|
|
2108
|
+
async ngOnInit() {
|
|
2109
|
+
this.loadDetailData();
|
|
2110
|
+
}
|
|
2094
2111
|
// Controls the visibility of additional editable fields (e.g., password, extra settings)
|
|
2095
2112
|
// When true, certain input fields become visible for editing
|
|
2096
2113
|
updateValid = signal(false, ...(ngDevMode ? [{ debugName: "updateValid" }] : []));
|
|
@@ -4256,6 +4273,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
4256
4273
|
}]
|
|
4257
4274
|
}], ctorParameters: () => [] });
|
|
4258
4275
|
|
|
4276
|
+
class NettyAppsFilterBase extends NettyAppsBase {
|
|
4277
|
+
// *********************************************************
|
|
4278
|
+
// *** Input / Output ***
|
|
4279
|
+
// *********************************************************
|
|
4280
|
+
isFilterExpanded = model(true, ...(ngDevMode ? [{ debugName: "isFilterExpanded" }] : []));
|
|
4281
|
+
filteredRecords = output();
|
|
4282
|
+
refresh = input(0, ...(ngDevMode ? [{ debugName: "refresh" }] : []));
|
|
4283
|
+
fileName = input('nettyapps_', ...(ngDevMode ? [{ debugName: "fileName" }] : []));
|
|
4284
|
+
// *********************************************************
|
|
4285
|
+
// *** Service ***
|
|
4286
|
+
// *********************************************************
|
|
4287
|
+
filterProxy = inject(NettyStandardFilterProxy);
|
|
4288
|
+
enumStorage = inject(NettyEnumStorageProxy);
|
|
4289
|
+
// *********************************************************
|
|
4290
|
+
// *** Signals ***
|
|
4291
|
+
// *********************************************************
|
|
4292
|
+
currentItem = signal(this.createNewFilter(), ...(ngDevMode ? [{ debugName: "currentItem" }] : []));
|
|
4293
|
+
allYesNoEnumList = signal([], ...(ngDevMode ? [{ debugName: "allYesNoEnumList" }] : []));
|
|
4294
|
+
// *********************************************************
|
|
4295
|
+
// *** Constructor ***
|
|
4296
|
+
// *********************************************************
|
|
4297
|
+
constructor() {
|
|
4298
|
+
super();
|
|
4299
|
+
effect(() => {
|
|
4300
|
+
if (this.refresh() > 0) {
|
|
4301
|
+
this.onApply();
|
|
4302
|
+
}
|
|
4303
|
+
});
|
|
4304
|
+
}
|
|
4305
|
+
// *********************************************************
|
|
4306
|
+
// *** Functions ***
|
|
4307
|
+
// *********************************************************
|
|
4308
|
+
async ngOnInit() {
|
|
4309
|
+
// Load enum data for dropdowns
|
|
4310
|
+
await this.enumStorage.loadEnumList();
|
|
4311
|
+
this.allYesNoEnumList.set(this.enumStorage.getEnum('AllYesNo'));
|
|
4312
|
+
}
|
|
4313
|
+
onApply() {
|
|
4314
|
+
this.filterProxy.selectFilter(this.currentItem()).subscribe({
|
|
4315
|
+
next: (result) => {
|
|
4316
|
+
this.filteredRecords.emit(result);
|
|
4317
|
+
this.isFilterExpanded.set(false);
|
|
4318
|
+
},
|
|
4319
|
+
error: (err) => this.alertService.showError('@dataLoadFailed', err),
|
|
4320
|
+
});
|
|
4321
|
+
}
|
|
4322
|
+
onReset() {
|
|
4323
|
+
this.filterProxy.initFilter().subscribe({
|
|
4324
|
+
next: (filter) => {
|
|
4325
|
+
this.currentItem.set(filter);
|
|
4326
|
+
},
|
|
4327
|
+
error: (err) => this.alertService.showError('@dataLoadFailed', err),
|
|
4328
|
+
});
|
|
4329
|
+
}
|
|
4330
|
+
onExport() {
|
|
4331
|
+
this.filterProxy.downloadXLS(this.currentItem()).subscribe({
|
|
4332
|
+
next: (response) => {
|
|
4333
|
+
this.downloadBlobFile(response, 'application/zip', this.translateService.instant('@00000072') + '.zip');
|
|
4334
|
+
},
|
|
4335
|
+
error: (err) => this.alertService.showError('@dataLoadFailed', err),
|
|
4336
|
+
});
|
|
4337
|
+
}
|
|
4338
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NettyAppsFilterBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
4339
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: NettyAppsFilterBase, isStandalone: true, selector: "ntybase-netty-apps-base", inputs: { isFilterExpanded: { classPropertyName: "isFilterExpanded", publicName: "isFilterExpanded", isSignal: true, isRequired: false, transformFunction: null }, refresh: { classPropertyName: "refresh", publicName: "refresh", isSignal: true, isRequired: false, transformFunction: null }, fileName: { classPropertyName: "fileName", publicName: "fileName", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isFilterExpanded: "isFilterExpandedChange", filteredRecords: "filteredRecords" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true });
|
|
4340
|
+
}
|
|
4341
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NettyAppsFilterBase, decorators: [{
|
|
4342
|
+
type: Component,
|
|
4343
|
+
args: [{ selector: 'ntybase-netty-apps-base', imports: [], template: `` }]
|
|
4344
|
+
}], ctorParameters: () => [], propDecorators: { isFilterExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "isFilterExpanded", required: false }] }, { type: i0.Output, args: ["isFilterExpandedChange"] }], filteredRecords: [{ type: i0.Output, args: ["filteredRecords"] }], refresh: [{ type: i0.Input, args: [{ isSignal: true, alias: "refresh", required: false }] }], fileName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileName", required: false }] }] } });
|
|
4345
|
+
|
|
4259
4346
|
/*
|
|
4260
4347
|
* Public API Surface of ntybase
|
|
4261
4348
|
*/
|
|
@@ -4264,5 +4351,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
|
|
|
4264
4351
|
* Generated bundle index. Do not edit.
|
|
4265
4352
|
*/
|
|
4266
4353
|
|
|
4267
|
-
export { AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ENVIRONMENT_CONFIG, EnvironmentInfo, EnvironmentInfoService, ExcelImportBase, ForgotPassword, Login, LoginDto, MFACodeDto, MfaLogin, NettyAgGridListBase, NettyAgGridLogBase, NettyAgGridSaveBase, NettyAgGridService, NettyAppsBase, NettyBaseApp, NettyHelper, NettyImageService, NettyMenuService, NtyLoadingComponent, NtyLoadingInterceptor, Ntybase, NtybaseModule, RangeDateTimeFilter, RangeNumberFilter, RangeStringFilter, UrlHelperService, ntyAuthenticationInterceptor };
|
|
4354
|
+
export { AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ENVIRONMENT_CONFIG, EnvironmentInfo, EnvironmentInfoService, ExcelImportBase, ForgotPassword, Login, LoginDto, MFACodeDto, MfaLogin, NettyAgGridBase, NettyAgGridListBase, NettyAgGridLogBase, NettyAgGridSaveBase, NettyAgGridService, NettyAppsBase, NettyAppsFilterBase, NettyBaseApp, NettyHelper, NettyImageService, NettyMenuService, NtyLoadingComponent, NtyLoadingInterceptor, Ntybase, NtybaseModule, RangeDateTimeFilter, RangeNumberFilter, RangeStringFilter, UrlHelperService, ntyAuthenticationInterceptor };
|
|
4268
4355
|
//# sourceMappingURL=nettyapps-ntybase.mjs.map
|