@nettyapps/ntybase 21.1.12 → 21.1.14

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,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Injectable, inject, NgModule, input, computed, signal, output, effect, linkedSignal, ViewChild, model, Input, InjectionToken, Optional, Inject } from '@angular/core';
2
+ import { Component, Injectable, inject, NgModule, signal, input, computed, effect, output, linkedSignal, 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';
@@ -19,6 +19,7 @@ import * as i1$2 from '@angular/material/snack-bar';
19
19
  import { MatSnackBarModule } from '@angular/material/snack-bar';
20
20
  import * as i1$1 from '@ngx-translate/core';
21
21
  import { TranslateModule, TranslateService } from '@ngx-translate/core';
22
+ import { Title } from '@angular/platform-browser';
22
23
  import { Mutex } from 'async-mutex';
23
24
  import { themeQuartz, StatusBarModule, ClipboardModule, ExcelExportModule, ColumnMenuModule, ContextMenuModule, CellSelectionModule, RowSelectionModule } from 'ag-grid-enterprise';
24
25
  import { toSignal } from '@angular/core/rxjs-interop';
@@ -27,7 +28,6 @@ import * as i2$2 from '@angular/material/tooltip';
27
28
  import { MatTooltipModule } from '@angular/material/tooltip';
28
29
  import * as i2$3 from '@angular/material/menu';
29
30
  import { MatMenuModule } from '@angular/material/menu';
30
- import { Title } from '@angular/platform-browser';
31
31
  import * as XLSX from 'xlsx';
32
32
  import { I18nService } from '@nettyapps/ntyi18n';
33
33
  import * as i1$4 from '@angular/forms';
@@ -422,6 +422,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
422
422
  }]
423
423
  }], ctorParameters: () => [{ type: i1$2.MatSnackBar }, { type: i1.MatDialog }, { type: i1$1.TranslateService }] });
424
424
 
425
+ class PageTitle {
426
+ title = signal('', ...(ngDevMode ? [{ debugName: "title" }] : []));
427
+ setTitle(newTitle) {
428
+ this.title.set(newTitle);
429
+ }
430
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: PageTitle, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
431
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: PageTitle, providedIn: 'root' });
432
+ }
433
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: PageTitle, decorators: [{
434
+ type: Injectable,
435
+ args: [{
436
+ providedIn: 'root',
437
+ }]
438
+ }] });
439
+
425
440
  class NettyAppsBase {
426
441
  // ********************************************
427
442
  // *** INPUTS ***
@@ -429,10 +444,38 @@ class NettyAppsBase {
429
444
  embedded = input(false, ...(ngDevMode ? [{ debugName: "embedded" }] : [])); // Is the form embedded to an other component
430
445
  _isEmbedded = computed(() => this.embedded() ?? false, ...(ngDevMode ? [{ debugName: "_isEmbedded" }] : []));
431
446
  // ---------------------------------
447
+ // --- PAGE TITLE & STATE ---
448
+ // ---------------------------------
449
+ pageName = signal('', ...(ngDevMode ? [{ debugName: "pageName" }] : []));
450
+ currentPageTitle = computed(() => {
451
+ const name = this.pageName();
452
+ return name ? name.startsWith('@') ? name : `@${name}` : '@Page_Title';
453
+ }, ...(ngDevMode ? [{ debugName: "currentPageTitle" }] : []));
454
+ // ---------------------------------
432
455
  // --- SERVICES ---
433
456
  // ---------------------------------
434
457
  alertService = inject(AlertService);
435
458
  translateService = inject(TranslateService);
459
+ pageTitleService = inject(PageTitle);
460
+ titleService = inject(Title);
461
+ // ---------------------------------
462
+ // --- LIFECYLE ---
463
+ // ---------------------------------
464
+ constructor() {
465
+ effect(() => {
466
+ const name = this.pageName();
467
+ if (name) {
468
+ const translationKey = name.startsWith('@') ? name : `@${name}`;
469
+ this.translateService.stream(translationKey).subscribe((translated) => {
470
+ if (translated == translationKey) {
471
+ translated = name;
472
+ }
473
+ this.titleService.setTitle(`${translated}`);
474
+ this.pageTitleService.setTitle(translated);
475
+ });
476
+ }
477
+ });
478
+ }
436
479
  // ---------------------------------
437
480
  // --- DOWNLOAD METHODS ---
438
481
  // ---------------------------------
@@ -548,7 +591,7 @@ class NettyAppsBase {
548
591
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NettyAppsBase, decorators: [{
549
592
  type: Component,
550
593
  args: [{ selector: 'ntybase-netty-apps-base', imports: [], template: `` }]
551
- }], propDecorators: { embedded: [{ type: i0.Input, args: [{ isSignal: true, alias: "embedded", required: false }] }] } });
594
+ }], ctorParameters: () => [], propDecorators: { embedded: [{ type: i0.Input, args: [{ isSignal: true, alias: "embedded", required: false }] }] } });
552
595
 
553
596
  class NettyHelper {
554
597
  /**
@@ -1283,7 +1326,6 @@ class NettyAgGridBase extends NettyAppsBase {
1283
1326
  searchValueName = signal('Invalid_searchValue', ...(ngDevMode ? [{ debugName: "searchValueName" }] : []));
1284
1327
  preferenceType = signal('Invalid_columnState', ...(ngDevMode ? [{ debugName: "preferenceType" }] : []));
1285
1328
  searchValue = signal('', ...(ngDevMode ? [{ debugName: "searchValue" }] : []));
1286
- pageName = signal('', ...(ngDevMode ? [{ debugName: "pageName" }] : []));
1287
1329
  // Query Parameters can be provide as parameters
1288
1330
  parameterGUID = signal('', ...(ngDevMode ? [{ debugName: "parameterGUID" }] : []));
1289
1331
  parameterType = signal('', ...(ngDevMode ? [{ debugName: "parameterType" }] : []));
@@ -1292,6 +1334,7 @@ class NettyAgGridBase extends NettyAppsBase {
1292
1334
  commonService = inject(CommonService);
1293
1335
  sysFunctionProxy = inject(SysfunctionProxy);
1294
1336
  environment = inject(EnvironmentProxy);
1337
+ routerActive = inject(ActivatedRoute);
1295
1338
  // Button action management variables
1296
1339
  menuValid = signal(true, ...(ngDevMode ? [{ debugName: "menuValid" }] : [])); // true: Filter editbox is not visible so the menus are visible
1297
1340
  refreshButtonValid = signal(false, ...(ngDevMode ? [{ debugName: "refreshButtonValid" }] : [])); // true: Refresh button is enabled
@@ -1305,11 +1348,44 @@ class NettyAgGridBase extends NettyAppsBase {
1305
1348
  allowDelete = signal(false, ...(ngDevMode ? [{ debugName: "allowDelete" }] : []));
1306
1349
  allowLog = signal(false, ...(ngDevMode ? [{ debugName: "allowLog" }] : []));
1307
1350
  allowRead = signal(true, ...(ngDevMode ? [{ debugName: "allowRead" }] : []));
1351
+ // Parse query parameters
1352
+ // Parse query parameters
1353
+ queryParameterGUID = toSignal(this.routerActive.queryParamMap.pipe(map((params) => params.get('parameters')), map((value) => this.parseOrReturnValue(value))), {
1354
+ initialValue: null, // set initial value to null
1355
+ });
1356
+ queryParameterType = toSignal(this.routerActive.queryParamMap.pipe(map((params) => params.get('type')), map((value) => this.parseOrReturnValue(value))), {
1357
+ initialValue: null, // set initial value to null
1358
+ });
1308
1359
  // ---------------------------------------------------
1309
1360
  // --- RECORD LIST ---
1310
1361
  // ---------------------------------------------------
1311
1362
  recordList = signal([], ...(ngDevMode ? [{ debugName: "recordList" }] : []));
1312
1363
  record = null;
1364
+ constructor() {
1365
+ super();
1366
+ effect(() => {
1367
+ if (this.hasValidValue(this.componantParameterGUID())) {
1368
+ this.parameterGUID.set(this.componantParameterGUID());
1369
+ }
1370
+ else if (this.hasValidValue(this.queryParameterGUID())) {
1371
+ this.parameterGUID.set(this.queryParameterGUID());
1372
+ }
1373
+ if (this.hasValidValue(this.componantParameterType())) {
1374
+ this.parameterType.set(this.componantParameterType());
1375
+ }
1376
+ else if (this.hasValidValue(this.queryParameterType())) {
1377
+ this.parameterType.set(this.queryParameterType());
1378
+ }
1379
+ if (this.hasValidValue(this.parameterGUID())) {
1380
+ this.setFilter();
1381
+ this.loadData();
1382
+ }
1383
+ else if (!this._isPopupValid()) {
1384
+ // Clear right side nav if parameterGUID is not provided
1385
+ this.commonService.clearOutlet();
1386
+ }
1387
+ });
1388
+ }
1313
1389
  // ***************************************************************
1314
1390
  // *** METHODS For optional overide ***
1315
1391
  // ***************************************************************
@@ -1389,6 +1465,31 @@ class NettyAgGridBase extends NettyAppsBase {
1389
1465
  return true;
1390
1466
  }
1391
1467
  }
1468
+ /**
1469
+ * Validates if the given value is equal to null,undefined or ''
1470
+ * @param value
1471
+ * @returns true if has a valid value
1472
+ */
1473
+ hasValidValue(value) {
1474
+ if (value == null || value == undefined) {
1475
+ return false;
1476
+ }
1477
+ if (value == '') {
1478
+ return false;
1479
+ }
1480
+ return true;
1481
+ }
1482
+ parseOrReturnValue(value) {
1483
+ if (value) {
1484
+ try {
1485
+ return JSON.parse(value); // parse json
1486
+ }
1487
+ catch (e) {
1488
+ return value; // not a json retun value
1489
+ }
1490
+ }
1491
+ return null;
1492
+ }
1392
1493
  // *********************************************************
1393
1494
  // *** AG Grid Management ***
1394
1495
  // *********************************************************
@@ -1605,31 +1706,6 @@ class NettyAgGridBase extends NettyAppsBase {
1605
1706
  // ---------------------------------------------
1606
1707
  // --- Functions to Show / Hide Grid Columns ---
1607
1708
  // ---------------------------------------------
1608
- onShowHideColumns() {
1609
- this.gridColumnsVisible.update((a) => !a);
1610
- this.initAgGrid();
1611
- }
1612
- // showHideColumnsAsync() {
1613
- // setTimeout(() => this.showHideColumns(), 400);
1614
- // }
1615
- // showHideColumns() {
1616
- // var fields = this.columnDefs()
1617
- // .filter((columnDef: any) => columnDef.ntyHide === 'x')
1618
- // .map((columnDef: any) => columnDef.field);
1619
- // this.gridApi?.setColumnsVisible(fields, this.gridColumnsVisible());
1620
- // }
1621
- // showHideEmbeddedColumnsAsync() {
1622
- // setTimeout(() => this.showHideEmbeddedColumns(), 100);
1623
- // }
1624
- // showHideEmbeddedColumns() {
1625
- // if (this.columnDefs() == undefined || this.columnDefs() == null) {
1626
- // return;
1627
- // }
1628
- // var fields = this.columnDefs()
1629
- // .filter((columnDef: any) => columnDef.ntyEmbeddedHide == 'x')
1630
- // .map((columnDef: any) => columnDef.field);
1631
- // this.gridApi?.setColumnsVisible(fields, !this._isEmbedded());
1632
- // }
1633
1709
  isHidden(isEmbeddedHide, isVisibleHide) {
1634
1710
  const isEmbedded = this._isEmbedded();
1635
1711
  const isVisibleSwitchOn = this.gridColumnsVisible();
@@ -1674,13 +1750,13 @@ class NettyAgGridBase extends NettyAppsBase {
1674
1750
  };
1675
1751
  console.log(message, inputs);
1676
1752
  }
1677
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NettyAgGridBase, deps: null, target: i0.ɵɵFactoryTarget.Component });
1753
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NettyAgGridBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
1678
1754
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.2", 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 }, 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 });
1679
1755
  }
1680
1756
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NettyAgGridBase, decorators: [{
1681
1757
  type: Component,
1682
1758
  args: [{ selector: 'ntybase-ag-grid-base', imports: [], template: ``, host: { 'ntybase-id': 'NettyAgGridBase' } }]
1683
- }], propDecorators: { popupFilterValid: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupFilterValid", required: false }] }], popupValid: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupValid", 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 }] }] } });
1759
+ }], ctorParameters: () => [], propDecorators: { popupFilterValid: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupFilterValid", required: false }] }], popupValid: [{ type: i0.Input, args: [{ isSignal: true, alias: "popupValid", 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 }] }] } });
1684
1760
 
1685
1761
  class ButtonRenderer {
1686
1762
  params = null;
@@ -1828,21 +1904,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
1828
1904
  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" }]
1829
1905
  }] });
1830
1906
 
1831
- class PageTitle {
1832
- title = signal('', ...(ngDevMode ? [{ debugName: "title" }] : []));
1833
- setTitle(newTitle) {
1834
- this.title.set(newTitle);
1835
- }
1836
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: PageTitle, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1837
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: PageTitle, providedIn: 'root' });
1838
- }
1839
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: PageTitle, decorators: [{
1840
- type: Injectable,
1841
- args: [{
1842
- providedIn: 'root',
1843
- }]
1844
- }] });
1845
-
1846
1907
  ModuleRegistry.registerModules([AllCommunityModule, StatusBarModule, ClientSideRowModelModule, ClipboardModule, ExcelExportModule, ColumnMenuModule,
1847
1908
  ContextMenuModule, CellSelectionModule, HighlightChangesModule, RowSelectionModule,]);
1848
1909
  // AgGrid Dark Mode Row Style
@@ -1852,17 +1913,7 @@ class NettyAgGridListBase extends NettyAgGridBase {
1852
1913
  // ********************************************
1853
1914
  // Services
1854
1915
  router = inject(Router);
1855
- routerActive = inject(ActivatedRoute);
1856
1916
  dialog = inject(MatDialog);
1857
- titleService = inject(Title);
1858
- pageTitleService = inject(PageTitle);
1859
- // Parse query parameters
1860
- queryParameterGUID = toSignal(this.routerActive.queryParamMap.pipe(map((params) => params.get('parameters')), map((value) => this.parseOrReturnValue(value))), {
1861
- initialValue: null, // set initial value to null
1862
- });
1863
- queryParameterType = toSignal(this.routerActive.queryParamMap.pipe(map((params) => params.get('type')), map((value) => this.parseOrReturnValue(value))), {
1864
- initialValue: null, // set initial value to null
1865
- });
1866
1917
  openInPopup = signal(false, ...(ngDevMode ? [{ debugName: "openInPopup" }] : [])); // true: Open add / edit component in popup
1867
1918
  // ---------------------------------------------------
1868
1919
  // --- RECORD LIST ---
@@ -1883,17 +1934,6 @@ class NettyAgGridListBase extends NettyAgGridBase {
1883
1934
  await this.nettyAgGridService.copyGridUserPereferenceToLocal(this.preferenceType());
1884
1935
  await this.AfterOnInit();
1885
1936
  }
1886
- parseOrReturnValue(value) {
1887
- if (value) {
1888
- try {
1889
- return JSON.parse(value); // parse json
1890
- }
1891
- catch (e) {
1892
- return value; // not a json retun value
1893
- }
1894
- }
1895
- return null;
1896
- }
1897
1937
  gotoURL(routePrefix, rightSidenav = [], parameters, type, dialogComponent = null, isNewTab = false, isPopup = this._isEmbedded()) {
1898
1938
  const baseHref = this.environment.getBaseHref().endsWith('/')
1899
1939
  ? this.environment.getBaseHref().slice(0, -1) // Sondaki / işaretini kaldır
@@ -1993,29 +2033,6 @@ class NettyAgGridListBase extends NettyAgGridBase {
1993
2033
  this.translateService.onLangChange.subscribe(() => {
1994
2034
  this.setAgGridTranslations();
1995
2035
  });
1996
- effect(() => {
1997
- if (this.hasValidValue(this.componantParameterGUID())) {
1998
- this.parameterGUID.set(this.componantParameterGUID());
1999
- }
2000
- else if (this.hasValidValue(this.queryParameterGUID())) {
2001
- this.parameterGUID.set(this.queryParameterGUID());
2002
- }
2003
- if (this.hasValidValue(this.componantParameterType())) {
2004
- this.parameterType.set(this.componantParameterType());
2005
- }
2006
- else if (this.hasValidValue(this.queryParameterType())) {
2007
- this.parameterType.set(this.queryParameterType());
2008
- }
2009
- if (this.hasValidValue(this.parameterGUID())) {
2010
- this.setFilter();
2011
- this.loadData();
2012
- }
2013
- else if (!this._isPopupValid()) {
2014
- // Clear right side nav if parameterGUID is not provided
2015
- this.commonService.clearOutlet();
2016
- }
2017
- console.log("effect.", this.parameterGUID());
2018
- });
2019
2036
  effect(() => {
2020
2037
  const update = this.commonService.updates();
2021
2038
  if (!update || !this.gridApi)
@@ -2035,19 +2052,6 @@ class NettyAgGridListBase extends NettyAgGridBase {
2035
2052
  this._isEmbedded();
2036
2053
  this.initAgGrid();
2037
2054
  });
2038
- effect(() => {
2039
- const name = this.pageName();
2040
- if (name) {
2041
- const translationKey = name.startsWith('@') ? name : `@${name}`;
2042
- this.translateService.stream(translationKey).subscribe((translated) => {
2043
- if (translated == translationKey) {
2044
- translated = name;
2045
- }
2046
- this.titleService.setTitle(`${translated}`);
2047
- this.pageTitleService.setTitle(translated);
2048
- });
2049
- }
2050
- });
2051
2055
  effect(() => {
2052
2056
  const isEmbedded = this._isEmbedded();
2053
2057
  const currentPref = this.preferenceType();
@@ -2070,20 +2074,6 @@ class NettyAgGridListBase extends NettyAgGridBase {
2070
2074
  }
2071
2075
  });
2072
2076
  }
2073
- /**
2074
- * Validates if the given value is equal to null,undefined or ''
2075
- * @param value
2076
- * @returns true if has a valid value
2077
- */
2078
- hasValidValue(value) {
2079
- if (value == null || value == undefined) {
2080
- return false;
2081
- }
2082
- if (value == '') {
2083
- return false;
2084
- }
2085
- return true;
2086
- }
2087
2077
  // *********************************************************
2088
2078
  // *** Data Management Functions ***
2089
2079
  // *********************************************************
@@ -2126,10 +2116,6 @@ class NettyAgGridListBase extends NettyAgGridBase {
2126
2116
  error: (err) => this.alertService.showError(err),
2127
2117
  });
2128
2118
  }
2129
- currentPageTitle = computed(() => {
2130
- const name = this.pageName();
2131
- return name ? name.startsWith('@') ? name : `@${name}` : '@Page_Title';
2132
- }, ...(ngDevMode ? [{ debugName: "currentPageTitle" }] : []));
2133
2119
  // *****************************************
2134
2120
  // *** Logging Functions ***
2135
2121
  // *****************************************
@@ -2157,6 +2143,76 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
2157
2143
  args: [{ selector: 'ntybase-ag-grid-list-base', imports: [], template: ``, host: { 'ntybase-id': 'NettyAgGridListBase' } }]
2158
2144
  }], ctorParameters: () => [] });
2159
2145
 
2146
+ class Guid {
2147
+ value = this.empty;
2148
+ constructor(value) {
2149
+ if (value) {
2150
+ if (Guid.isValid(value)) {
2151
+ this.value = value;
2152
+ }
2153
+ }
2154
+ }
2155
+ static newGuid() {
2156
+ return new Guid('xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {
2157
+ const r = (Math.random() * 16) | 0;
2158
+ const v = c == 'x' ? r : (r & 0x3) | 0x8;
2159
+ return v.toString(16);
2160
+ }));
2161
+ }
2162
+ /**
2163
+ * return all zeros '00000000-0000-0000-0000-000000000000'
2164
+ */
2165
+ static get empty() {
2166
+ return '00000000-0000-0000-0000-000000000000';
2167
+ }
2168
+ get empty() {
2169
+ return Guid.empty;
2170
+ }
2171
+ static isValid(str) {
2172
+ const validRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;
2173
+ return validRegex.test(str);
2174
+ }
2175
+ toString() {
2176
+ return this.value;
2177
+ }
2178
+ toJSON() {
2179
+ return this.value;
2180
+ }
2181
+ /**
2182
+ * True is guid is empty or not valid
2183
+ * @param str
2184
+ * @returns
2185
+ */
2186
+ static isNullOrEmpty(str) {
2187
+ if (str == null || str == undefined || str.trim() == '' || str == Guid.empty) {
2188
+ return true;
2189
+ }
2190
+ if (!Guid.isValid(str)) {
2191
+ return true;
2192
+ }
2193
+ return false;
2194
+ }
2195
+ /**
2196
+ * True if the guid is valid and not all zeros (empty)
2197
+ * @param str
2198
+ * @returns
2199
+ */
2200
+ static isValidAndNotEmpty(str) {
2201
+ return !Guid.isNullOrEmpty(str);
2202
+ }
2203
+ /**
2204
+ * Return empty guid if the given guid is not valid
2205
+ * @param guid
2206
+ * @returns
2207
+ */
2208
+ static emptyWhenNull(guid) {
2209
+ if (Guid.isValidAndNotEmpty(guid)) {
2210
+ return guid;
2211
+ }
2212
+ return Guid.empty;
2213
+ }
2214
+ }
2215
+
2160
2216
  ModuleRegistry.registerModules([AllCommunityModule, StatusBarModule, ClientSideRowModelModule, ClipboardModule, ExcelExportModule, ColumnMenuModule,
2161
2217
  ContextMenuModule, CellSelectionModule, HighlightChangesModule, RowSelectionModule,]);
2162
2218
  // AgGrid Dark Mode Row Style
@@ -2197,7 +2253,7 @@ class NettyAgGridListFilterBase extends NettyAgGridListBase {
2197
2253
  // *** Data Management Functions ***
2198
2254
  // *********************************************************
2199
2255
  loadData() {
2200
- if (this._displayFilter()) {
2256
+ if (Guid.isNullOrEmpty(this.parameterGUID())) {
2201
2257
  this.setData([], true);
2202
2258
  return;
2203
2259
  }
@@ -4598,5 +4654,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImpor
4598
4654
  * Generated bundle index. Do not edit.
4599
4655
  */
4600
4656
 
4601
- export { AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ENVIRONMENT_CONFIG, EnvironmentInfo, EnvironmentInfoService, ExcelImportBase, ForgotPassword, Login, LoginDto, MFACodeDto, MfaLogin, NettyAgGridBase, NettyAgGridListBase, NettyAgGridListFilterBase, NettyAgGridLogBase, NettyAgGridSaveBase, NettyAgGridService, NettyAppsBase, NettyAppsFilterBase, NettyBaseApp, NettyHelper, NettyImageService, NettyMenuService, NtyLoadingComponent, NtyLoadingInterceptor, NtyLoadingService, Ntybase, NtybaseModule, PageTitle, RangeDateTimeFilter, RangeNumberFilter, RangeStringFilter, UrlHelperService, ntyAuthenticationInterceptor };
4657
+ export { AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ENVIRONMENT_CONFIG, EnvironmentInfo, EnvironmentInfoService, ExcelImportBase, ForgotPassword, Guid, Login, LoginDto, MFACodeDto, MfaLogin, NettyAgGridBase, NettyAgGridListBase, NettyAgGridListFilterBase, NettyAgGridLogBase, NettyAgGridSaveBase, NettyAgGridService, NettyAppsBase, NettyAppsFilterBase, NettyBaseApp, NettyHelper, NettyImageService, NettyMenuService, NtyLoadingComponent, NtyLoadingInterceptor, NtyLoadingService, Ntybase, NtybaseModule, PageTitle, RangeDateTimeFilter, RangeNumberFilter, RangeStringFilter, UrlHelperService, ntyAuthenticationInterceptor };
4602
4658
  //# sourceMappingURL=nettyapps-ntybase.mjs.map