@nettyapps/ntybase 21.1.6 → 21.1.9

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.
@@ -644,13 +644,14 @@ class CommonService {
644
644
  */
645
645
  normalizeTurkish(text) {
646
646
  return text
647
- .toLocaleLowerCase('tr-TR')
647
+ .replace(/I/g, 'i')
648
648
  .replace(/[ıİ]/g, 'i')
649
649
  .replace(/[ğĞ]/g, 'g')
650
650
  .replace(/[üÜ]/g, 'u')
651
651
  .replace(/[şŞ]/g, 's')
652
652
  .replace(/[öÖ]/g, 'o')
653
- .replace(/[çÇ]/g, 'c');
653
+ .replace(/[çÇ]/g, 'c')
654
+ .toLocaleLowerCase('tr-TR');
654
655
  }
655
656
  /**
656
657
  * Gets the clean URL path without fragments or query params
@@ -704,7 +705,6 @@ class CommonService {
704
705
  * @returns merged string
705
706
  */
706
707
  mergeColumns(columns, seperator = ' ') {
707
- console.log('mergeColumns', columns);
708
708
  let result = '';
709
709
  columns.forEach((column) => {
710
710
  if (!(column == undefined || column == null)) {
@@ -1328,15 +1328,19 @@ class NettyAgGridBase extends NettyAppsBase {
1328
1328
  backClicked() {
1329
1329
  this.commonService.goBack();
1330
1330
  }
1331
- /** Set data into the grid */
1332
- setData(data, initialize = false) {
1331
+ /**
1332
+ * Set data into the grid
1333
+ * @param data Array of records to set
1334
+ * @param hideWarning hide the warning message if no records found
1335
+ */
1336
+ setData(data, hideWarning = false) {
1333
1337
  this.recordList.set(data);
1334
1338
  if (this.columnDefs() == null || this.columnDefs().length == 0) {
1335
1339
  this.initAgGrid();
1336
1340
  }
1337
1341
  if (this.searchValue() && this.gridApi) {
1338
1342
  this.gridApi.setGridOption('quickFilterText', this.searchValue());
1339
- if (!initialize) {
1343
+ if (!hideWarning) {
1340
1344
  if (this.recordList() == undefined || this.recordList().length == 0) {
1341
1345
  if (!this._isEmbedded()) {
1342
1346
  this.alertService.showWarning('@recordNotFoundSearch');
@@ -1582,7 +1586,7 @@ class NettyAgGridBase extends NettyAppsBase {
1582
1586
  });
1583
1587
  this.gridApi.setGridOption('rowSelection', { mode: 'singleRow', checkboxes: false });
1584
1588
  }
1585
- if (!this.readOnly()) {
1589
+ if (this.readOnly()) {
1586
1590
  this.columnDefs().unshift({
1587
1591
  headerName: this.translateService.instant('@select'), sortable: false, resizable: false,
1588
1592
  filter: false, minWidth: 80, maxWidth: 80, suppressSizeToFit: true,
@@ -2000,7 +2004,7 @@ class NettyAgGridListBase extends NettyAgGridBase {
2000
2004
  }
2001
2005
  //this.loadData();
2002
2006
  }
2003
- else {
2007
+ else if (!this._isPopupValid()) {
2004
2008
  // Clear right side nav if parameterGUID is not provided
2005
2009
  this.commonService.clearOutlet();
2006
2010
  }
@@ -4479,6 +4483,7 @@ class NettyAppsFilterBase extends NettyAppsBase {
4479
4483
  // *********************************************************
4480
4484
  isFilterExpanded = model(true, ...(ngDevMode ? [{ debugName: "isFilterExpanded" }] : []));
4481
4485
  filteredRecords = output();
4486
+ filterSelectionChanged = output();
4482
4487
  refresh = input(0, ...(ngDevMode ? [{ debugName: "refresh" }] : []));
4483
4488
  fileName = input('nettyapps_', ...(ngDevMode ? [{ debugName: "fileName" }] : []));
4484
4489
  // *********************************************************
@@ -4507,6 +4512,7 @@ class NettyAppsFilterBase extends NettyAppsBase {
4507
4512
  this.afterOnInit();
4508
4513
  }
4509
4514
  onApply() {
4515
+ this.filterSelectionChanged.emit(this.currentItem());
4510
4516
  this.filterProxy.selectFilter(this.currentItem()).subscribe({
4511
4517
  next: (result) => {
4512
4518
  this.filteredRecords.emit(result);
@@ -4519,11 +4525,13 @@ class NettyAppsFilterBase extends NettyAppsBase {
4519
4525
  this.filterProxy.initFilter().subscribe({
4520
4526
  next: (filter) => {
4521
4527
  this.currentItem.set(filter);
4528
+ this.filterSelectionChanged.emit(this.currentItem());
4522
4529
  },
4523
4530
  error: (err) => this.alertService.showError('@dataLoadFailed', err),
4524
4531
  });
4525
4532
  }
4526
4533
  onExport() {
4534
+ this.filterSelectionChanged.emit(this.currentItem());
4527
4535
  this.filterProxy.downloadXLS(this.currentItem()).subscribe({
4528
4536
  next: (response) => {
4529
4537
  this.downloadBlobFile(response, 'application/zip', this.translateService.instant('@00000072') + '.zip');
@@ -4547,12 +4555,12 @@ class NettyAppsFilterBase extends NettyAppsBase {
4547
4555
  console.log(message, inputs);
4548
4556
  }
4549
4557
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NettyAppsFilterBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
4550
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.2", 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 });
4558
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.1.2", 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", filterSelectionChanged: "filterSelectionChanged" }, usesInheritance: true, ngImport: i0, template: ``, isInline: true });
4551
4559
  }
4552
4560
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.2", ngImport: i0, type: NettyAppsFilterBase, decorators: [{
4553
4561
  type: Component,
4554
4562
  args: [{ selector: 'ntybase-netty-apps-base', imports: [], template: `` }]
4555
- }], 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 }] }] } });
4563
+ }], ctorParameters: () => [], propDecorators: { isFilterExpanded: [{ type: i0.Input, args: [{ isSignal: true, alias: "isFilterExpanded", required: false }] }, { type: i0.Output, args: ["isFilterExpandedChange"] }], filteredRecords: [{ type: i0.Output, args: ["filteredRecords"] }], filterSelectionChanged: [{ type: i0.Output, args: ["filterSelectionChanged"] }], refresh: [{ type: i0.Input, args: [{ isSignal: true, alias: "refresh", required: false }] }], fileName: [{ type: i0.Input, args: [{ isSignal: true, alias: "fileName", required: false }] }] } });
4556
4564
 
4557
4565
  /*
4558
4566
  * Public API Surface of ntybase