@nettyapps/ntybase 21.0.27 → 21.0.28

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.
@@ -3,7 +3,7 @@ import { Component, Injectable, inject, NgModule, Inject, signal, input, output,
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, lastValueFrom, map, catchError as catchError$1, Subject, finalize, take as take$1, takeUntil } from 'rxjs';
6
- import { catchError, map as map$1, take, tap } from 'rxjs/operators';
6
+ import { catchError, map as map$1, take, finalize as finalize$1 } from 'rxjs/operators';
7
7
  import { Router, ActivatedRoute } from '@angular/router';
8
8
  import * as i2$1 from '@nettyapps/ntycontract';
9
9
  import { EnvironmentProxy } from '@nettyapps/ntycontract';
@@ -2001,19 +2001,19 @@ class NettyAgGridBase extends NettyAppsBase {
2001
2001
  var fields = this.columnDefs()
2002
2002
  .filter((columnDef) => columnDef.ntyHide === 'x')
2003
2003
  .map((columnDef) => columnDef.field);
2004
- this.gridApi.setColumnsVisible(fields, this.gridColumnsVisible());
2004
+ this.gridApi?.setColumnsVisible(fields, this.gridColumnsVisible());
2005
2005
  }
2006
2006
  showHideEmbeddedColumnsAsync() {
2007
2007
  setTimeout(() => this.showHideEmbeddedColumns(), 100);
2008
2008
  }
2009
2009
  showHideEmbeddedColumns() {
2010
- if (this.columnDefs == undefined || this.columnDefs == null) {
2010
+ if (this.columnDefs() == undefined || this.columnDefs() == null) {
2011
2011
  return;
2012
2012
  }
2013
2013
  var fields = this.columnDefs()
2014
2014
  .filter((columnDef) => columnDef.ntyEmbeddedHide == 'x')
2015
2015
  .map((columnDef) => columnDef.field);
2016
- this.gridApi.setColumnsVisible(fields, !this.isEmbedded);
2016
+ this.gridApi?.setColumnsVisible(fields, !this.isEmbedded);
2017
2017
  }
2018
2018
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NettyAgGridBase, deps: [], target: i0.ɵɵFactoryTarget.Component });
2019
2019
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.0.6", type: NettyAgGridBase, 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 }, 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 } }, outputs: { onElementSelect: "onElementSelect", selectedElement: "selectedElement" }, usesInheritance: true, ngImport: i0, template: "<p>ag-grid-base works!</p>\n", styles: [""] });
@@ -4159,16 +4159,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
4159
4159
 
4160
4160
  const NtyLoadingInterceptor = (req, next) => {
4161
4161
  const loadingService = inject(NtyLoadingService);
4162
- // Optional: Skip specific URLs if needed (e.g. background polling)
4163
- // if (req.url.includes('/silent-api')) return next(req);
4164
4162
  loadingService.show();
4165
- return next(req).pipe(tap(() => loadingService.hide()), // Handle success
4166
- catchError((error) => {
4167
- loadingService.hide(); // Handle error
4168
- return throwError(() => error);
4169
- }));
4163
+ return next(req).pipe(finalize$1(() => loadingService.hide()));
4170
4164
  };
4171
4165
 
4166
+ class NtyLoadingComponent {
4167
+ loadingService = inject(NtyLoadingService);
4168
+ isLoading = this.loadingService.isLoading;
4169
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NtyLoadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
4170
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.0.6", type: NtyLoadingComponent, isStandalone: true, selector: "app-nty-loading", ngImport: i0, template: "@if (isLoading()) {\n<div class=\"loading-overlay\" (click)=\"$event.stopPropagation(); $event.preventDefault()\">\n <div class=\"spinner\">\n <i class=\"fas fa-spinner\"></i>\n </div>\n <div style=\"margin-top: 10px;\">{{'@loading' | translate}}</div>\n</div>\n}", styles: [".loading-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;z-index:2147483647;display:flex;justify-content:center;align-items:center;color:#fff;flex-direction:column;pointer-events:all;cursor:wait;-webkit-user-select:none;user-select:none}.spinner{font-size:3rem}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fa-spinner{animation:spin 1s linear infinite}\n"], dependencies: [{ kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1$1.TranslatePipe, name: "translate" }] });
4171
+ }
4172
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImport: i0, type: NtyLoadingComponent, decorators: [{
4173
+ type: Component,
4174
+ args: [{ selector: 'app-nty-loading', imports: [TranslateModule], template: "@if (isLoading()) {\n<div class=\"loading-overlay\" (click)=\"$event.stopPropagation(); $event.preventDefault()\">\n <div class=\"spinner\">\n <i class=\"fas fa-spinner\"></i>\n </div>\n <div style=\"margin-top: 10px;\">{{'@loading' | translate}}</div>\n</div>\n}", styles: [".loading-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:#00000080;z-index:2147483647;display:flex;justify-content:center;align-items:center;color:#fff;flex-direction:column;pointer-events:all;cursor:wait;-webkit-user-select:none;user-select:none}.spinner{font-size:3rem}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.fa-spinner{animation:spin 1s linear infinite}\n"] }]
4175
+ }] });
4176
+
4172
4177
  class NettyMenuService {
4173
4178
  http = inject(HttpClient);
4174
4179
  environmentProxy = inject(EnvironmentProxy);
@@ -4218,5 +4223,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.6", ngImpor
4218
4223
  * Generated bundle index. Do not edit.
4219
4224
  */
4220
4225
 
4221
- export { AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ENVIRONMENT_CONFIG, EnvironmentInfo, EnvironmentInfoService, ExcelImportBase, ForgotPassword, Login, LoginDto, MFACodeDto, MfaLogin, NETTY_APP_ENVIRONMENT, NettyAgGridBase, NettyAgGridSaveBase, NettyAgGridService, NettyAppsBase, NettyBaseApp, NettyHelper, NettyImageService, NettyMenuService, NtyEnvironmentService, NtyLoadingInterceptor, Ntybase, NtybaseModule, RangeDateTimeFilter, RangeNumberFilter, RangeStringFilter, UrlHelperService, ntyAuthenticationInterceptor, ntyEnvironmentConfigFactory, ntyInitializeEnvironment, provideNtyEnvironment };
4226
+ export { AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ENVIRONMENT_CONFIG, EnvironmentInfo, EnvironmentInfoService, ExcelImportBase, ForgotPassword, Login, LoginDto, MFACodeDto, MfaLogin, NETTY_APP_ENVIRONMENT, NettyAgGridBase, NettyAgGridSaveBase, NettyAgGridService, NettyAppsBase, NettyBaseApp, NettyHelper, NettyImageService, NettyMenuService, NtyEnvironmentService, NtyLoadingComponent, NtyLoadingInterceptor, Ntybase, NtybaseModule, RangeDateTimeFilter, RangeNumberFilter, RangeStringFilter, UrlHelperService, ntyAuthenticationInterceptor, ntyEnvironmentConfigFactory, ntyInitializeEnvironment, provideNtyEnvironment };
4222
4227
  //# sourceMappingURL=nettyapps-ntybase.mjs.map