@nettyapps/ntybase 0.0.1 → 0.0.2

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/index.d.ts CHANGED
@@ -3,13 +3,14 @@ import { OnDestroy, OnInit, ElementRef } from '@angular/core';
3
3
  import { TranslateService } from '@ngx-translate/core';
4
4
  import { Observable, Subject } from 'rxjs';
5
5
  import { Theme as Theme$1, GridApi, GridOptions, StatusPanelDef, GridReadyEvent } from 'ag-grid-community';
6
+ import { MatDialog, MatDialogRef } from '@angular/material/dialog';
6
7
  import { Router, ActivatedRoute, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, CanDeactivate } from '@angular/router';
7
8
  import { MatSnackBar } from '@angular/material/snack-bar';
8
- import { MatDialog, MatDialogRef } from '@angular/material/dialog';
9
9
  import { HttpClient, HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
10
10
  import { EnvironmentProxy } from '@nettyapps/ntycontract';
11
+ import { NgForm, FormGroup, FormControl } from '@angular/forms';
12
+ import * as XLSX from 'xlsx';
11
13
  import { ICellRendererAngularComp } from 'ag-grid-angular';
12
- import { FormGroup, FormControl } from '@angular/forms';
13
14
  import { I18nService } from '@nettyapps/ntyi18n';
14
15
  import { MatAutocompleteTrigger, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
15
16
  import { ErrorStateMatcher } from '@angular/material/core';
@@ -120,6 +121,7 @@ declare class CommonService {
120
121
  private location;
121
122
  private datePipe;
122
123
  private alertService;
124
+ protected dialog: MatDialog;
123
125
  rightSidenavOpen: _angular_core.WritableSignal<boolean>;
124
126
  toggleRightSidenav(open: boolean): void;
125
127
  normalizeTurkish(text: string): string;
@@ -127,6 +129,8 @@ declare class CommonService {
127
129
  * Gets the clean URL path without fragments or query params
128
130
  */
129
131
  getCleanUrlPath(): string;
132
+ clearOutlet(): void;
133
+ ngOnDestroy(): void;
130
134
  /** Merge columns with the given seperator
131
135
  *
132
136
  * @param columns string array to merge
@@ -231,6 +235,7 @@ declare abstract class AgGridBase<T extends {
231
235
  popupFilterValid: _angular_core.InputSignal<boolean>;
232
236
  popupValid: _angular_core.InputSignal<boolean>;
233
237
  params: _angular_core.InputSignal<any>;
238
+ parameters: _angular_core.InputSignal<string>;
234
239
  protected authenticationList: Array<NettySecurity>;
235
240
  protected accessRightsProcessed: _angular_core.WritableSignal<boolean>;
236
241
  allowAdd: _angular_core.WritableSignal<boolean>;
@@ -285,8 +290,6 @@ declare abstract class AgGridBase<T extends {
285
290
  * Handle back button click
286
291
  */
287
292
  backClicked(): void;
288
- deleteSelected(): Promise<void>;
289
- refreshData(): Promise<void>;
290
293
  gotoURL(routePrefix: string[], rightSidenav: string[] | undefined, parameters: string, type?: string, isNewTab?: boolean, embedded?: boolean, dialogComponent?: any): void;
291
294
  popupGotoURL(urlSegments: string[]): void;
292
295
  /**
@@ -304,19 +307,21 @@ declare abstract class AgGridBase<T extends {
304
307
  * @param idField The field name that serves as unique identifier (default: 'id')
305
308
  */
306
309
  protected updateRowInGrid(rowData: T, idField?: string): void;
310
+ deleteSelected(): Promise<void>;
307
311
  /**
308
312
  * Delete a row from the grid
309
313
  * @param rowData The row to delete
310
314
  */
311
315
  protected deleteRowFromGrid(rowData: T): void;
316
+ refreshData(): Promise<void>;
312
317
  setAccessRights(): Promise<boolean>;
313
318
  protected abstract loadData(): void;
314
319
  protected onBtnClick?(e: T): void;
315
- protected abstract loadFreshData(): Promise<T[]>;
316
- protected abstract deleteRows(rows: T[]): void;
320
+ protected loadFreshData?(): Promise<T[]>;
321
+ protected deleteRows?(rows: T[]): void;
317
322
  protected getEntityType?(): string;
318
323
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AgGridBase<any>, never>;
319
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AgGridBase<any>, "ntybase-ag-grid-base", never, { "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "popupFilterValid": { "alias": "popupFilterValid"; "required": false; "isSignal": true; }; "popupValid": { "alias": "popupValid"; "required": false; "isSignal": true; }; "params": { "alias": "params"; "required": false; "isSignal": true; }; "filterField": { "alias": "filterField"; "required": false; "isSignal": true; }; "filterFieldValue": { "alias": "filterFieldValue"; "required": false; "isSignal": true; }; "filterFieldNumeric": { "alias": "filterFieldNumeric"; "required": false; "isSignal": true; }; "filterFieldEquality": { "alias": "filterFieldEquality"; "required": false; "isSignal": true; }; }, { "selectedElement": "selectedElement"; }, never, never, true, never>;
324
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AgGridBase<any>, "ntybase-ag-grid-base", never, { "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "popupFilterValid": { "alias": "popupFilterValid"; "required": false; "isSignal": true; }; "popupValid": { "alias": "popupValid"; "required": false; "isSignal": true; }; "params": { "alias": "params"; "required": false; "isSignal": true; }; "parameters": { "alias": "parameters"; "required": false; "isSignal": true; }; "filterField": { "alias": "filterField"; "required": false; "isSignal": true; }; "filterFieldValue": { "alias": "filterFieldValue"; "required": false; "isSignal": true; }; "filterFieldNumeric": { "alias": "filterFieldNumeric"; "required": false; "isSignal": true; }; "filterFieldEquality": { "alias": "filterFieldEquality"; "required": false; "isSignal": true; }; }, { "selectedElement": "selectedElement"; }, never, never, true, never>;
320
325
  }
321
326
 
322
327
  type UserViewMode = 'fullscreen' | 'sidenav' | 'dialog';
@@ -325,9 +330,11 @@ declare abstract class AgGridSaveBase<T> {
325
330
  protected route: ActivatedRoute;
326
331
  protected commonService: CommonService;
327
332
  protected alertService: AlertService;
333
+ parameters: string;
328
334
  currentItem: _angular_core.WritableSignal<T>;
329
335
  initialItem: T;
330
336
  formChanged: boolean;
337
+ saveForm: NgForm;
331
338
  viewMode: _angular_core.WritableSignal<UserViewMode>;
332
339
  protected dialogRef: MatDialogRef<any, any> | null;
333
340
  protected dialogData: any;
@@ -355,7 +362,21 @@ declare abstract class AgGridSaveBase<T> {
355
362
  closeSidenav(): void;
356
363
  backClicked(): void;
357
364
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<AgGridSaveBase<any>, never>;
358
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<AgGridSaveBase<any>, "ntybase-ag-grid-save-base", never, { "embedded": { "alias": "embedded"; "required": false; "isSignal": true; }; "closeAfterSave": { "alias": "closeAfterSave"; "required": false; "isSignal": true; }; }, { "closeAfterSave": "closeAfterSaveChange"; }, never, never, true, never>;
365
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AgGridSaveBase<any>, "ntybase-ag-grid-save-base", never, { "parameters": { "alias": "parameters"; "required": false; }; "embedded": { "alias": "embedded"; "required": false; "isSignal": true; }; "closeAfterSave": { "alias": "closeAfterSave"; "required": false; "isSignal": true; }; }, { "closeAfterSave": "closeAfterSaveChange"; }, never, never, true, never>;
366
+ }
367
+
368
+ type AOA = string[][];
369
+ declare abstract class ExcelImportBase extends AgGridBase<any> {
370
+ protected dataList: AOA;
371
+ protected wopts: XLSX.WritingOptions;
372
+ protected fileName: string;
373
+ protected isDataValidated: boolean;
374
+ /*******************************
375
+ *** EXCEL UPLOAD FUNCTIONS ***
376
+ *******************************/
377
+ onFileChange(evt: any): void;
378
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ExcelImportBase, never>;
379
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ExcelImportBase, "ntybase-excel-import-base", never, {}, {}, never, never, true, never>;
359
380
  }
360
381
 
361
382
  declare class ButtonRenderer implements ICellRendererAngularComp {
@@ -867,6 +888,11 @@ declare class Guid {
867
888
  static emptyWhenNull(guid: any): any;
868
889
  }
869
890
 
891
+ declare class Filter {
892
+ value: any;
893
+ text: any;
894
+ }
895
+
870
896
  declare class NettyMenuService {
871
897
  private http;
872
898
  private environmentProxy;
@@ -878,5 +904,5 @@ declare class NettyMenuService {
878
904
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<NettyMenuService>;
879
905
  }
880
906
 
881
- export { AgGridBase, AgGridSaveBase, AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, AutoComplete, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, ColorPalette, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ForgotPassword, Guid, HttpError403, HttpError404, LeftSidenav, Login, LoginDto, MFACodeDto, MfaLogin, NettyAgGridService, NettyHelper, NettyMenuService, Ntybase, NtybaseModule, SelectionItem, Theme, Toolbar, UrlHelperService };
907
+ export { AgGridBase, AgGridSaveBase, AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, AutoComplete, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, ColorPalette, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ExcelImportBase, Filter, ForgotPassword, Guid, HttpError403, HttpError404, LeftSidenav, Login, LoginDto, MFACodeDto, MfaLogin, NettyAgGridService, NettyHelper, NettyMenuService, Ntybase, NtybaseModule, SelectionItem, Theme, Toolbar, UrlHelperService };
882
908
  export type { AppTheme, CanComponentDeactivate, ColorTheme, Credentials, LoginContext, MFACodeContext, UserViewMode };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nettyapps/ntybase",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^20.0.0",
6
6
  "@angular/core": "^20.0.0"
Binary file