@nettyapps/ntybase 21.0.21 → 21.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nettyapps/ntybase",
3
- "version": "21.0.21",
3
+ "version": "21.0.23",
4
4
  "description": "This library provides foundational services and components for NettyApps Angular applications.",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -14,7 +14,7 @@
14
14
  "ag-grid-angular": ">= 35.0.0",
15
15
  "ag-grid-enterprise": ">= 35.0.0",
16
16
  "@nettyapps/ntycontract": ">= 21.0.3",
17
- "@nettyapps/ntyui": ">= 21.0.7"
17
+ "@nettyapps/ntyui": ">= 21.0.9"
18
18
  },
19
19
  "dependencies": {
20
20
  "tslib": "^2.3.0"
@@ -1,13 +1,13 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnInit, DoCheck, SimpleChanges, OnDestroy, InjectionToken } from '@angular/core';
2
+ import { OnDestroy, OnInit, DoCheck, SimpleChanges, InjectionToken } from '@angular/core';
3
3
  import { TranslateService } from '@ngx-translate/core';
4
4
  import { Observable, Subject } from 'rxjs';
5
5
  import { Theme, GridApi, GridOptions, StatusPanelDef, GridReadyEvent, IFilterParams, IDoesFilterPassParams } from 'ag-grid-community';
6
6
  import { MatDialog, MatDialogRef } from '@angular/material/dialog';
7
7
  import { Router, ActivatedRoute, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, CanDeactivate } from '@angular/router';
8
- import { MatSnackBar } from '@angular/material/snack-bar';
9
8
  import { HttpClient, HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
10
9
  import { EnvironmentProxy } from '@nettyapps/ntycontract';
10
+ import { MatSnackBar } from '@angular/material/snack-bar';
11
11
  import { NgForm, FormGroup } from '@angular/forms';
12
12
  import * as XLSX from 'xlsx';
13
13
  import { ICellRendererAngularComp, IFilterAngularComp } from 'ag-grid-angular';
@@ -224,20 +224,6 @@ declare class CommonService {
224
224
  static ɵprov: i0.ɵɵInjectableDeclaration<CommonService>;
225
225
  }
226
226
 
227
- declare class AlertService {
228
- private snackBar;
229
- private dialog;
230
- private translate;
231
- constructor(snackBar: MatSnackBar, dialog: MatDialog, translate: TranslateService);
232
- showAlert(message: string, action?: string, duration?: number): void;
233
- showWarning(message: string, action?: string, duration?: number): void;
234
- showConfirm(message: string): Promise<boolean>;
235
- showSuccess(message: string, duration?: number): void;
236
- showError(error: any, duration?: number): void;
237
- static ɵfac: i0.ɵɵFactoryDeclaration<AlertService, never>;
238
- static ɵprov: i0.ɵɵInjectableDeclaration<AlertService>;
239
- }
240
-
241
227
  declare class NettySecurity {
242
228
  coid: any;
243
229
  userGUID: any;
@@ -261,9 +247,56 @@ declare class SysfunctionProxy {
261
247
  static ɵprov: i0.ɵɵInjectableDeclaration<SysfunctionProxy>;
262
248
  }
263
249
 
250
+ declare class AlertService {
251
+ private snackBar;
252
+ private dialog;
253
+ private translate;
254
+ constructor(snackBar: MatSnackBar, dialog: MatDialog, translate: TranslateService);
255
+ showAlert(message: string, action?: string, duration?: number): void;
256
+ showWarning(message: string, action?: string, duration?: number): void;
257
+ showConfirm(message: string): Promise<boolean>;
258
+ showSuccess(message: string, duration?: number): void;
259
+ showError(error: any, duration?: number): void;
260
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertService, never>;
261
+ static ɵprov: i0.ɵɵInjectableDeclaration<AlertService>;
262
+ }
263
+
264
+ declare abstract class NettyAppsBase implements OnDestroy {
265
+ protected alertService: AlertService;
266
+ /**
267
+ * Download the given base64Encoded data as file
268
+ *
269
+ * @param base64Data: base64 encoded data
270
+ * @param fileName: filename to download
271
+ */
272
+ protected downloadFile(base64Data: string | null, fileName: string | null): void;
273
+ /** Download the given base64Endoced data as text file
274
+ *
275
+ * @param base64EncodedFileData
276
+ * @param fileName
277
+ */
278
+ protected downloadTextFile(base64EncodedFileData: string | null, fileName: string | null): void;
279
+ /** Save the given text as a text file
280
+ *
281
+ * @param fileData
282
+ * @param fileName
283
+ */
284
+ protected downloadTextFileNotEncoded(fileData: string | null, fileName: string | null): void;
285
+ /**
286
+ * Download file where the data is provided as blob
287
+ * @param data - Array Buffer data
288
+ * @param type - type of the document.
289
+ */
290
+ protected downloadBlobFile(data: any, type: string, fileName: string): void;
291
+ protected onDestroy$: Subject<void>;
292
+ ngOnDestroy(): void;
293
+ static ɵfac: i0.ɵɵFactoryDeclaration<NettyAppsBase, never>;
294
+ static ɵcmp: i0.ɵɵComponentDeclaration<NettyAppsBase, "ntybase-netty-apps-base", never, {}, {}, never, never, true, never>;
295
+ }
296
+
264
297
  declare abstract class NettyAgGridBase<T extends {
265
298
  [key: string]: any;
266
- }> implements OnInit {
299
+ }> extends NettyAppsBase implements OnInit {
267
300
  readOnly: i0.InputSignal<boolean>;
268
301
  popupFilterValid: i0.InputSignal<boolean>;
269
302
  popupValid: i0.InputSignal<boolean>;
@@ -308,7 +341,6 @@ declare abstract class NettyAgGridBase<T extends {
308
341
  protected commonService: CommonService;
309
342
  protected router: Router;
310
343
  protected routerActive: ActivatedRoute;
311
- protected alertService: AlertService;
312
344
  protected dialog: MatDialog;
313
345
  protected sysFunctionProxy: SysfunctionProxy;
314
346
  protected environment: EnvironmentProxy;
@@ -386,11 +418,10 @@ declare abstract class NettyAgGridBase<T extends {
386
418
  }
387
419
 
388
420
  type UserViewMode = 'fullscreen' | 'sidenav' | 'dialog';
389
- declare abstract class NettyAgGridSaveBase<T> implements DoCheck {
421
+ declare abstract class NettyAgGridSaveBase<T> extends NettyAppsBase implements DoCheck {
390
422
  protected router: Router;
391
423
  protected route: ActivatedRoute;
392
424
  protected commonService: CommonService;
393
- protected alertService: AlertService;
394
425
  protected environment: EnvironmentProxy;
395
426
  protected dialog: MatDialog;
396
427
  viewMode: i0.WritableSignal<UserViewMode>;
@@ -899,5 +930,5 @@ declare class NettyMenuService {
899
930
  static ɵprov: i0.ɵɵInjectableDeclaration<NettyMenuService>;
900
931
  }
901
932
 
902
- export { AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ENVIRONMENT_CONFIG, EnvironmentInfo, EnvironmentInfoService, ExcelImportBase, ForgotPassword, Login, LoginDto, MFACodeDto, MfaLogin, NettyAgGridBase, NettyAgGridSaveBase, NettyAgGridService, NettyBaseApp, NettyHelper, NettyImageService, NettyMenuService, Ntybase, NtybaseModule, RangeDateTimeFilter, RangeNumberFilter, RangeStringFilter, UrlHelperService };
933
+ export { AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ENVIRONMENT_CONFIG, EnvironmentInfo, EnvironmentInfoService, ExcelImportBase, ForgotPassword, Login, LoginDto, MFACodeDto, MfaLogin, NettyAgGridBase, NettyAgGridSaveBase, NettyAgGridService, NettyAppsBase, NettyBaseApp, NettyHelper, NettyImageService, NettyMenuService, Ntybase, NtybaseModule, RangeDateTimeFilter, RangeNumberFilter, RangeStringFilter, UrlHelperService };
903
934
  export type { CanComponentDeactivate, Credentials, EnvironmentConfig, LoginContext, MFACodeContext, UserViewMode };