@nettyapps/ntybase 0.0.1

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 ADDED
@@ -0,0 +1,882 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { OnDestroy, OnInit, ElementRef } from '@angular/core';
3
+ import { TranslateService } from '@ngx-translate/core';
4
+ import { Observable, Subject } from 'rxjs';
5
+ import { Theme as Theme$1, GridApi, GridOptions, StatusPanelDef, GridReadyEvent } from 'ag-grid-community';
6
+ import { Router, ActivatedRoute, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, CanDeactivate } from '@angular/router';
7
+ import { MatSnackBar } from '@angular/material/snack-bar';
8
+ import { MatDialog, MatDialogRef } from '@angular/material/dialog';
9
+ import { HttpClient, HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
10
+ import { EnvironmentProxy } from '@nettyapps/ntycontract';
11
+ import { ICellRendererAngularComp } from 'ag-grid-angular';
12
+ import { FormGroup, FormControl } from '@angular/forms';
13
+ import { I18nService } from '@nettyapps/ntyi18n';
14
+ import { MatAutocompleteTrigger, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
15
+ import { ErrorStateMatcher } from '@angular/material/core';
16
+ import { UiBase } from '@nettyapps/ntyui';
17
+
18
+ declare class Ntybase {
19
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Ntybase, never>;
20
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Ntybase, "lib-ntybase", never, {}, {}, never, never, false, never>;
21
+ }
22
+
23
+ declare class NtybaseModule {
24
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NtybaseModule, never>;
25
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<NtybaseModule, [typeof Ntybase], never, [typeof Ntybase]>;
26
+ static ɵinj: _angular_core.ɵɵInjectorDeclaration<NtybaseModule>;
27
+ }
28
+
29
+ declare class CurrentUserPreference {
30
+ coid: any | null;
31
+ nettyUserPreferenceGUID: any | null;
32
+ nettyUserGUID: any | null;
33
+ nettyUserName: string | null;
34
+ nettyUserFullName: string | null;
35
+ nettyPreferenceType: string | null;
36
+ nettyPreferenceData: string | null;
37
+ init(): void;
38
+ initParameter(parameters: CurrentUserPreference): void;
39
+ compare(record: CurrentUserPreference): CurrentUserPreference;
40
+ }
41
+
42
+ declare class NettyAgGridService {
43
+ private userPreferenceLock;
44
+ private http;
45
+ private nettyAlertService;
46
+ private environmentProxy;
47
+ private commonService;
48
+ constructor();
49
+ /**
50
+ * Select user preference
51
+ * @param admuserpreference
52
+ * @returns
53
+ */
54
+ selectForUserAdmUserPreference(admuserpreference: CurrentUserPreference): Observable<any>;
55
+ /**
56
+ * Insert or update user preference
57
+ * @param admuserpreference
58
+ * @returns
59
+ */
60
+ insertOrUpdateAdmUserPreference(admuserpreference: CurrentUserPreference): Observable<any>;
61
+ /** Preference Save and Upload
62
+ *
63
+ * @param preferenceType component name or other uniqe identifier
64
+ * @param gridApi api for agGrid column management
65
+ * @returns nothing
66
+ */
67
+ saveGridUserPreference(preferenceType: string, gridApi: any, defaultColDef: string): Promise<void>;
68
+ /** Get the user preference and update grid columns
69
+ *
70
+ * @param preferenceType component name or other uniqe identifier
71
+ * @param gridApi
72
+ * @returns
73
+ */
74
+ loadGridUserPreference(preferenceType: string, gridApi: any): Promise<void>;
75
+ /** Download user preference and save to local
76
+ *
77
+ * @param preferenceType component name or other uniqe identifier
78
+ * @returns
79
+ */
80
+ copyGridUserPereferenceToLocal(preferenceType: string): Promise<void>;
81
+ /** Expand all Fit to screen all columns of the grid
82
+ *
83
+ * @param gridApi api of the aggrid to manage
84
+ * @param gridApi columns api of the grid to manage
85
+ * @param gridExpanded initial status of the grid
86
+ * @returns current status of the grid
87
+ */
88
+ expandCollapseGrid(gridApi: any, gridExpanded?: boolean): boolean;
89
+ /** Set the QuickFilter of the grid and save the entry in session storage
90
+ *
91
+ * @param searchValueName Component identifier
92
+ * @param searchValue Value to search
93
+ * @param gridApi api for the current aggrid
94
+ */
95
+ setGridQuickSearch(searchValueName: string, searchValue: string, gridApi: any): void;
96
+ /** Reapply the last search value from the session storage
97
+ *
98
+ * @param searchValueName Component identifier
99
+ * @param gridApi api for the current aggrid
100
+ * @returns
101
+ */
102
+ reapplyGridQuickSearch(searchValueName: string, gridApi: any): string;
103
+ /** Get Grid Column Default parameters for the given component
104
+ *
105
+ * @param componentName Name of the component we are initializing
106
+ * @returns
107
+ */
108
+ getGridColumnDefault(componentName?: string): any;
109
+ /** Return excel style for ag-grid
110
+ *
111
+ * @returns
112
+ */
113
+ getExcelStyles(): any;
114
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NettyAgGridService, never>;
115
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<NettyAgGridService>;
116
+ }
117
+
118
+ declare class CommonService {
119
+ private router;
120
+ private location;
121
+ private datePipe;
122
+ private alertService;
123
+ rightSidenavOpen: _angular_core.WritableSignal<boolean>;
124
+ toggleRightSidenav(open: boolean): void;
125
+ normalizeTurkish(text: string): string;
126
+ /**
127
+ * Gets the clean URL path without fragments or query params
128
+ */
129
+ getCleanUrlPath(): string;
130
+ /** Merge columns with the given seperator
131
+ *
132
+ * @param columns string array to merge
133
+ * @param seperator seperator for the array. space if null
134
+ * @returns merged string
135
+ */
136
+ mergeColumns(columns: string[], seperator?: string): string;
137
+ /** Go back to the last page or close the tab
138
+ *
139
+ */
140
+ goBack(): void;
141
+ /** Delay for the given duration
142
+ *
143
+ * @param ms wait duration in ms
144
+ * @returns promise that waits for the duration
145
+ */
146
+ delay(ms: number): Promise<unknown>;
147
+ /** Convert string to base64
148
+ *
149
+ * @param stringForConversion
150
+ * @returns
151
+ */
152
+ convertToBase64(stringForConversion: string): string;
153
+ /** Convert base64 string to normal string
154
+ *
155
+ * @param base64data
156
+ * @returns
157
+ */
158
+ convertFromBase64(base64data: string): string;
159
+ /** Compare dates. Designed for grid date filter
160
+ *
161
+ * @param filterValue user provided filtering date
162
+ * @param cellValue cell value to compare
163
+ * @returns -1 if cell date is smaller(earlier), 0 if dates are equal and 1 if cell date is bigger(later)
164
+ */
165
+ dateComparator(filterValue: Date, cellValue: Date): number;
166
+ /** Format date into 'dd-MM-yyyy' format for grids
167
+ *
168
+ * @param dateValue
169
+ * @returns
170
+ */
171
+ dateFormatter(dateValue: Date): string;
172
+ /** Reactive Signal state for tracking grid updates */
173
+ private _updates;
174
+ /** Read-only Signal for external components to observe updates */
175
+ updates: _angular_core.Signal<{
176
+ type: string;
177
+ action: "add" | "update" | "delete";
178
+ data: any;
179
+ } | null>;
180
+ /** Broadcasts grid data changes to subscribers */
181
+ notifyUpdate(type: string, action: 'add' | 'update' | 'delete', data: any): void;
182
+ /** User is not allowed to access the page
183
+ *
184
+ */
185
+ userNotAllowedToRead(title?: string, message?: string): Promise<void>;
186
+ userNotAllowedToAdd(title?: string, message?: string): Promise<void>;
187
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CommonService, never>;
188
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<CommonService>;
189
+ }
190
+
191
+ declare class AlertService {
192
+ private snackBar;
193
+ private dialog;
194
+ private translate;
195
+ constructor(snackBar: MatSnackBar, dialog: MatDialog, translate: TranslateService);
196
+ showAlert(message: string, action?: string, duration?: number): void;
197
+ showConfirm(message: string): Promise<boolean>;
198
+ showSuccess(message: string, duration?: number): void;
199
+ showError(message: string, duration?: number): void;
200
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AlertService, never>;
201
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AlertService>;
202
+ }
203
+
204
+ declare class NettySecurity {
205
+ coid: any;
206
+ userGUID: any;
207
+ application: string;
208
+ formCode: string;
209
+ action: string;
210
+ allow: boolean;
211
+ }
212
+
213
+ declare class SysfunctionProxy {
214
+ private http;
215
+ private environmentProxy;
216
+ constructor(http: HttpClient, environmentProxy: EnvironmentProxy);
217
+ /** Get the authentication list for the given form
218
+ *
219
+ * @param formCode
220
+ * @returns
221
+ */
222
+ getAuthentication(formCode: string): Observable<Array<NettySecurity>>;
223
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SysfunctionProxy, never>;
224
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<SysfunctionProxy>;
225
+ }
226
+
227
+ declare abstract class AgGridBase<T extends {
228
+ [key: string]: any;
229
+ }> {
230
+ readOnly: _angular_core.InputSignal<boolean>;
231
+ popupFilterValid: _angular_core.InputSignal<boolean>;
232
+ popupValid: _angular_core.InputSignal<boolean>;
233
+ params: _angular_core.InputSignal<any>;
234
+ protected authenticationList: Array<NettySecurity>;
235
+ protected accessRightsProcessed: _angular_core.WritableSignal<boolean>;
236
+ allowAdd: _angular_core.WritableSignal<boolean>;
237
+ allowEdit: _angular_core.WritableSignal<boolean>;
238
+ allowDelete: _angular_core.WritableSignal<boolean>;
239
+ allowLog: _angular_core.WritableSignal<boolean>;
240
+ allowRead: _angular_core.WritableSignal<boolean>;
241
+ menuValid: _angular_core.WritableSignal<boolean>;
242
+ deleteValid: _angular_core.WritableSignal<boolean>;
243
+ selectionValid: _angular_core.WritableSignal<boolean>;
244
+ refreshButtonValid: _angular_core.WritableSignal<boolean>;
245
+ selectedElement: _angular_core.OutputEmitterRef<any>;
246
+ filterField: _angular_core.InputSignal<string | null>;
247
+ filterFieldValue: _angular_core.InputSignal<any>;
248
+ filterFieldNumeric: _angular_core.InputSignal<boolean>;
249
+ filterFieldEquality: _angular_core.InputSignal<string>;
250
+ theme: Theme$1;
251
+ protected gridApi: GridApi;
252
+ protected userGridApi: GridApi;
253
+ excelStyles: any;
254
+ columnDefs: _angular_core.WritableSignal<any>;
255
+ userColumnDefs: _angular_core.WritableSignal<any>;
256
+ groupMembersColumnDefs: _angular_core.WritableSignal<any>;
257
+ frameworkComponents: any;
258
+ selectedRows: _angular_core.WritableSignal<T[]>;
259
+ isSingleRowSelected: _angular_core.Signal<boolean>;
260
+ isMultipleRowSelected: _angular_core.Signal<boolean>;
261
+ protected gridExpanded: _angular_core.WritableSignal<boolean>;
262
+ protected componentName: _angular_core.WritableSignal<string>;
263
+ protected searchValueName: _angular_core.WritableSignal<string>;
264
+ protected preferenceType: _angular_core.WritableSignal<string>;
265
+ searchValue: _angular_core.WritableSignal<string>;
266
+ protected nettyAgGridService: NettyAgGridService;
267
+ protected translateService: TranslateService;
268
+ protected commonService: CommonService;
269
+ protected router: Router;
270
+ protected routerActive: ActivatedRoute;
271
+ protected alertService: AlertService;
272
+ protected dialog: MatDialog;
273
+ protected sysFunctionProxy: SysfunctionProxy;
274
+ initAgGrid_extension(): void;
275
+ gridOptions: GridOptions<T>;
276
+ statusBar: {
277
+ statusPanels: StatusPanelDef[];
278
+ };
279
+ protected onGridReady(params: GridReadyEvent): void;
280
+ onFirstDataRendered(params: any): void;
281
+ saveGrid(params: any): void;
282
+ expandCollapse(): void;
283
+ quickSearch(searchStr?: string): void;
284
+ /**
285
+ * Handle back button click
286
+ */
287
+ backClicked(): void;
288
+ deleteSelected(): Promise<void>;
289
+ refreshData(): Promise<void>;
290
+ gotoURL(routePrefix: string[], rightSidenav: string[] | undefined, parameters: string, type?: string, isNewTab?: boolean, embedded?: boolean, dialogComponent?: any): void;
291
+ popupGotoURL(urlSegments: string[]): void;
292
+ /**
293
+ * Listens for update events from CommonService and refreshes the grid accordingly.
294
+ * - For 'add' or 'update' actions: Updates the relevant row
295
+ * - For 'delete' action: Removes the row
296
+ * - Performs no action if:
297
+ * - Grid API is not ready, or
298
+ * - The update type doesn't match
299
+ */
300
+ constructor();
301
+ /**
302
+ * Update a single row in the grid
303
+ * @param rowData The updated row data
304
+ * @param idField The field name that serves as unique identifier (default: 'id')
305
+ */
306
+ protected updateRowInGrid(rowData: T, idField?: string): void;
307
+ /**
308
+ * Delete a row from the grid
309
+ * @param rowData The row to delete
310
+ */
311
+ protected deleteRowFromGrid(rowData: T): void;
312
+ setAccessRights(): Promise<boolean>;
313
+ protected abstract loadData(): void;
314
+ protected onBtnClick?(e: T): void;
315
+ protected abstract loadFreshData(): Promise<T[]>;
316
+ protected abstract deleteRows(rows: T[]): void;
317
+ protected getEntityType?(): string;
318
+ 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>;
320
+ }
321
+
322
+ type UserViewMode = 'fullscreen' | 'sidenav' | 'dialog';
323
+ declare abstract class AgGridSaveBase<T> {
324
+ protected router: Router;
325
+ protected route: ActivatedRoute;
326
+ protected commonService: CommonService;
327
+ protected alertService: AlertService;
328
+ currentItem: _angular_core.WritableSignal<T>;
329
+ initialItem: T;
330
+ formChanged: boolean;
331
+ viewMode: _angular_core.WritableSignal<UserViewMode>;
332
+ protected dialogRef: MatDialogRef<any, any> | null;
333
+ protected dialogData: any;
334
+ embedded: _angular_core.InputSignal<boolean>;
335
+ closeAfterSave: _angular_core.ModelSignal<boolean>;
336
+ setCloseAfterSave(value: boolean): void;
337
+ updateValid: _angular_core.WritableSignal<boolean>;
338
+ setUpdateValid(value: boolean): void;
339
+ /**
340
+ * Determine view mode based on current route
341
+ */
342
+ protected determineViewMode(): void;
343
+ /**
344
+ * Check for form changes
345
+ */
346
+ ngDoCheck(): void;
347
+ protected isEqual(item1: T, item2: T): boolean;
348
+ /**
349
+ * Check if can deactivate component
350
+ */
351
+ canDeactivate(): Promise<boolean>;
352
+ /**
353
+ * Close sidenav or navigate back
354
+ */
355
+ closeSidenav(): void;
356
+ backClicked(): void;
357
+ 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>;
359
+ }
360
+
361
+ declare class ButtonRenderer implements ICellRendererAngularComp {
362
+ protected params: any;
363
+ protected label: string;
364
+ protected type: string;
365
+ protected toggleValue: boolean | null;
366
+ protected editValid: boolean;
367
+ protected historyValid: boolean;
368
+ protected lineValid: boolean;
369
+ protected popupSelectValid: boolean;
370
+ protected popupEditValid: boolean;
371
+ protected toggleValid: boolean;
372
+ protected toggle_icon: string;
373
+ protected none: boolean;
374
+ protected addValid: boolean;
375
+ protected deleteValid: boolean;
376
+ agInit(params: any): void;
377
+ /** Refresh the display
378
+ *
379
+ * @param params
380
+ * @returns
381
+ */
382
+ refresh(params: any): boolean;
383
+ resetValids(): void;
384
+ onClick(event: any): void;
385
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ButtonRenderer, never>;
386
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonRenderer, "ntybase-button-renderer", never, {}, {}, never, never, true, never>;
387
+ }
388
+
389
+ declare class CheckboxRenderer implements ICellRendererAngularComp {
390
+ protected params: any;
391
+ protected label: string;
392
+ protected type: string;
393
+ protected supportClick: boolean;
394
+ protected checked: any;
395
+ agInit(params: any): void;
396
+ refresh(params?: any): boolean;
397
+ onProcess(params: any): void;
398
+ onClick(event: any): void;
399
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CheckboxRenderer, never>;
400
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CheckboxRenderer, "ntybase-checkbox-renderer", never, {}, {}, never, never, true, never>;
401
+ }
402
+
403
+ declare class NettyHelper {
404
+ /**
405
+ * Returns null if fields are equal otherwise return second field
406
+ * @param firstField
407
+ * @param secondField
408
+ * @returns
409
+ */
410
+ static difference(firstField: any | null, secondField: any | null): any | null;
411
+ /**
412
+ * Returns null if fields are equal otherwise return second field
413
+ * @param firstField
414
+ * @param secondField
415
+ * @param format
416
+ * @returns
417
+ */
418
+ static dateDifference(firstField: Date | null, secondField: Date | null, format: string): Date | null;
419
+ }
420
+
421
+ declare class ConfirmDialog {
422
+ dialogRef: MatDialogRef<ConfirmDialog>;
423
+ data: any;
424
+ constructor(dialogRef: MatDialogRef<ConfirmDialog>, data: any);
425
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfirmDialog, never>;
426
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConfirmDialog, "ntybase-confirm-dialog", never, {}, {}, never, never, true, never>;
427
+ }
428
+
429
+ declare class AuthenticationGuard implements CanActivate {
430
+ private router;
431
+ private credentialsService;
432
+ canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean;
433
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthenticationGuard, never>;
434
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthenticationGuard>;
435
+ }
436
+
437
+ interface CanComponentDeactivate {
438
+ canDeactivate: () => boolean | Promise<boolean> | Observable<boolean>;
439
+ }
440
+ declare class CanDeactivateGuard implements CanDeactivate<CanComponentDeactivate> {
441
+ canDeactivate(component: CanComponentDeactivate): boolean | Promise<boolean> | Observable<boolean>;
442
+ }
443
+
444
+ declare class AuthenticationInterceptor implements HttpInterceptor {
445
+ private router;
446
+ private credentialsService;
447
+ private environmentProxy;
448
+ private urlHelperService;
449
+ intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
450
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthenticationInterceptor, never>;
451
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthenticationInterceptor>;
452
+ }
453
+
454
+ interface LoginContext {
455
+ username: string;
456
+ password: string;
457
+ remember?: boolean;
458
+ }
459
+
460
+ declare class LoginDto {
461
+ userName: string;
462
+ password: string;
463
+ application: string;
464
+ constructor(_userName?: string, _password?: string, _application?: string);
465
+ }
466
+
467
+ interface MFACodeContext {
468
+ mfaCode: string;
469
+ }
470
+
471
+ declare class MFACodeDto {
472
+ sid: any;
473
+ mfacode: string;
474
+ constructor(_sid: any, _mfacode: string);
475
+ }
476
+
477
+ interface Credentials {
478
+ username: string;
479
+ token: string;
480
+ role: string;
481
+ authenticationMethod: string;
482
+ sid: string;
483
+ }
484
+ declare class CredentialsService {
485
+ private _credentials;
486
+ constructor();
487
+ /**
488
+ * Checks is the user is authenticated.
489
+ * @return True if the user is authenticated.
490
+ */
491
+ isAuthenticated(): boolean;
492
+ /**
493
+ * Gets the user credentials.
494
+ * @return The user credentials or null if the user is not authenticated.
495
+ */
496
+ get credentials(): Credentials | null;
497
+ get token(): string | null;
498
+ /**
499
+ * Sets the user credentials.
500
+ * The credentials may be persisted across sessions by setting the `remember` parameter to true.
501
+ * Otherwise, the credentials are only persisted for the current session.
502
+ * @param credentials The user credentials.
503
+ * @param remember True to remember credentials across sessions.
504
+ */
505
+ setCredentials(credentials?: Credentials, remember?: boolean): void;
506
+ /** Get Credentials
507
+ *
508
+ * @returns
509
+ */
510
+ getCredentials(): Credentials;
511
+ /** Get the token if available otherwise return empty string
512
+ *
513
+ * @returns
514
+ */
515
+ getToken(): string;
516
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<CredentialsService, never>;
517
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<CredentialsService>;
518
+ }
519
+
520
+ declare class AuthenticationService {
521
+ private credentialsService;
522
+ private environmentProxy;
523
+ private http;
524
+ static counter: number;
525
+ /**
526
+ * Authenticates the user.
527
+ * @param context The login parameters.
528
+ * @return The user credentials.
529
+ */
530
+ login(context: LoginContext): Observable<Credentials>;
531
+ /** Parse the claim sections of the given JWT token
532
+ *
533
+ * @param token Token to parse
534
+ * @returns
535
+ */
536
+ decodeToken(token: string): any;
537
+ /** Get the claim data from the given token claim json
538
+ *
539
+ * @param decodedToken
540
+ * @param claimKey
541
+ * @returns
542
+ */
543
+ getClaim(decodedToken: any, claimKey: string): any;
544
+ mfaLogin(context: MFACodeContext): Observable<boolean>;
545
+ resendMFACode(context: MFACodeContext): Observable<string>;
546
+ /**
547
+ * Logs out the user and clear credentials.
548
+ * @return True if the user was logged out successfully.
549
+ */
550
+ logout(): Observable<boolean>;
551
+ /** Send a pasword reset e-mail
552
+ *
553
+ * @param context
554
+ * @returns
555
+ */
556
+ forgotPassword(context: LoginContext): Observable<string>;
557
+ getAdminLink(path?: string): string;
558
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthenticationService, never>;
559
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthenticationService>;
560
+ }
561
+
562
+ declare class UrlHelperService {
563
+ private router;
564
+ cleanUrl(url: string): string;
565
+ navigate(url: string): Promise<Boolean>;
566
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<UrlHelperService, never>;
567
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<UrlHelperService>;
568
+ }
569
+
570
+ declare abstract class AuthBase implements OnDestroy {
571
+ protected router: Router;
572
+ protected route: ActivatedRoute;
573
+ protected environmentProxy: EnvironmentProxy;
574
+ protected i18nService: I18nService;
575
+ protected alertService: AlertService;
576
+ protected urlHelperService: UrlHelperService;
577
+ protected onDestroy$: Subject<void>;
578
+ ngOnDestroy(): void;
579
+ icon: _angular_core.ModelSignal<boolean>;
580
+ get currentLanguage(): string;
581
+ get languages(): string[];
582
+ setLanguage(language: string): void;
583
+ getCurrentLanguageIcon(): string;
584
+ getLanguageIcon(language: string): string;
585
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthBase, never>;
586
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AuthBase, "ntybase-auth-base", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; }, { "icon": "iconChange"; }, never, never, true, never>;
587
+ }
588
+
589
+ declare class Login extends AuthBase {
590
+ private authService;
591
+ private formBuilder;
592
+ loginForm: FormGroup;
593
+ version: string | null;
594
+ isLoading: _angular_core.WritableSignal<boolean>;
595
+ error: _angular_core.WritableSignal<string | undefined>;
596
+ credentials: LoginContext;
597
+ ngOnInit(): void;
598
+ timeout(ms: number): Promise<unknown>;
599
+ login(): void;
600
+ onForgotPassword(): void;
601
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Login, never>;
602
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Login, "ntybase-login", never, {}, {}, never, never, true, never>;
603
+ }
604
+
605
+ declare class MfaLogin extends AuthBase {
606
+ private authService;
607
+ private formBuilder;
608
+ version: string | null;
609
+ isLoading: _angular_core.WritableSignal<boolean>;
610
+ error: _angular_core.WritableSignal<string | undefined>;
611
+ resendable: _angular_core.WritableSignal<boolean>;
612
+ startFrom: _angular_core.WritableSignal<number>;
613
+ remainingTime: _angular_core.WritableSignal<number>;
614
+ private countdownInterval;
615
+ loginForm: FormGroup;
616
+ ngOnInit(): void;
617
+ startCountdown(seconds: number): void;
618
+ getFormattedTime(): string;
619
+ login(): void;
620
+ onResendMFACode(): void;
621
+ ngOnDestroy(): void;
622
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<MfaLogin, never>;
623
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MfaLogin, "ntybase-mfa-login", never, {}, {}, never, never, true, never>;
624
+ }
625
+
626
+ declare class ForgotPasswordDto {
627
+ nettyPasswordChangeGUID: any | null;
628
+ nettyUserGUID: any | null;
629
+ nettyUserName: string | null;
630
+ nettyUserFullName: string | null;
631
+ nettyValidUntil: Date | null;
632
+ nettyEMailParametersGUID: any | null;
633
+ nettyIsUsed: boolean | null;
634
+ nettyUsedDate: Date | null;
635
+ init(): void;
636
+ }
637
+
638
+ declare class ForgotPassword extends AuthBase implements OnInit {
639
+ private formBuilder;
640
+ private passwordService;
641
+ version: string | null;
642
+ isLoading: _angular_core.WritableSignal<boolean>;
643
+ error: _angular_core.WritableSignal<string | undefined>;
644
+ updatePasswordForm: FormGroup;
645
+ protected urlOption: string | null;
646
+ protected forgotPasswordRecord: ForgotPasswordDto;
647
+ constructor();
648
+ ngOnInit(): void;
649
+ getData(): void;
650
+ updatePassword(): void;
651
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ForgotPassword, never>;
652
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ForgotPassword, "ntybase-forgot-password", never, {}, {}, never, never, true, never>;
653
+ }
654
+
655
+ declare class HttpError403 implements OnDestroy {
656
+ attemptedUrl: string;
657
+ private routeSubscription;
658
+ private router;
659
+ private route;
660
+ private location;
661
+ private commonService;
662
+ constructor();
663
+ ngOnInit(): void;
664
+ ngOnDestroy(): void;
665
+ /**
666
+ * URL'deki fragment ve outlet'leri temizler.
667
+ * Örnek: "/sys/NettyUserGroup(rightSidenav:...)" → "/sys/NettyUserGroup"
668
+ */
669
+ private cleanUrlFromFragments;
670
+ /**
671
+ * attemptedUrl'i güncel router URL'ine göre günceller
672
+ */
673
+ private updateAttemptedUrl;
674
+ /**
675
+ * Temizlenmiş URL yolunu döndürür (queryParams ve fragment olmadan).
676
+ */
677
+ private getCleanUrlPath;
678
+ goHome(): void;
679
+ goBack(): void;
680
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HttpError403, never>;
681
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<HttpError403, "ntybase-http-error403", never, {}, {}, never, never, true, never>;
682
+ }
683
+
684
+ declare class HttpError404 {
685
+ attemptedUrl: string;
686
+ private routeSubscription;
687
+ private router;
688
+ private route;
689
+ private location;
690
+ private commonService;
691
+ constructor();
692
+ ngOnInit(): void;
693
+ ngOnDestroy(): void;
694
+ /**
695
+ * URL'deki fragment ve outlet'leri temizler.
696
+ * Örnek: "/sys/NettyUserGroup(rightSidenav:...)" → "/sys/NettyUserGroup"
697
+ */
698
+ private cleanUrlFromFragments;
699
+ /**
700
+ * Temizlenmiş URL yolunu döndürür (queryParams ve fragment olmadan).
701
+ */
702
+ private getCleanUrlPath;
703
+ /**
704
+ * attemptedUrl'i güncel router URL'ine göre günceller
705
+ */
706
+ private updateAttemptedUrl;
707
+ goHome(): void;
708
+ goBack(): void;
709
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<HttpError404, never>;
710
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<HttpError404, "ntybase-http-error404", never, {}, {}, never, never, true, never>;
711
+ }
712
+
713
+ declare class LeftSidenav implements OnInit {
714
+ private authService;
715
+ private router;
716
+ private menuService;
717
+ private commonService;
718
+ private environmentProxy;
719
+ version: string | null;
720
+ isMinimized: _angular_core.InputSignal<boolean>;
721
+ toggleMinimize: _angular_core.OutputEmitterRef<void>;
722
+ onToggleMinimize(): void;
723
+ logout(): void;
724
+ menuItems: _angular_core.WritableSignal<any[]>;
725
+ searchTerm: _angular_core.WritableSignal<string>;
726
+ originalMenuItems: _angular_core.WritableSignal<any[]>;
727
+ constructor();
728
+ ngOnInit(): void;
729
+ processMenuItems(apiResponse: any): any[];
730
+ filteredMenuItems: _angular_core.Signal<any[]>;
731
+ private filterMenuItems;
732
+ toggleSubMenu(item: any): void;
733
+ onSearch(term: string): void;
734
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<LeftSidenav, never>;
735
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<LeftSidenav, "ntybase-left-sidenav", never, { "isMinimized": { "alias": "isMinimized"; "required": false; "isSignal": true; }; }, { "toggleMinimize": "toggleMinimize"; }, never, never, true, never>;
736
+ }
737
+
738
+ interface AppTheme {
739
+ name: 'light' | 'dark' | 'system';
740
+ icon: string;
741
+ }
742
+ declare class Theme {
743
+ private appTheme;
744
+ private themes;
745
+ selectedTheme: _angular_core.Signal<AppTheme | undefined>;
746
+ getThemes(): AppTheme[];
747
+ setTheme(theme: 'light' | 'dark' | 'system'): void;
748
+ constructor();
749
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Theme, never>;
750
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<Theme>;
751
+ }
752
+
753
+ interface ColorTheme {
754
+ id: string;
755
+ primary: string;
756
+ secondary?: string;
757
+ displayName: string;
758
+ }
759
+ declare class ColorPalette {
760
+ private themes;
761
+ currentTheme: _angular_core.WritableSignal<ColorTheme | null>;
762
+ setThemes(customThemes: ColorTheme[]): void;
763
+ getThemes(): ColorTheme[];
764
+ setTheme(themeId: string): void;
765
+ updateThemeClass: _angular_core.EffectRef;
766
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ColorPalette, never>;
767
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ColorPalette>;
768
+ }
769
+
770
+ declare class Toolbar {
771
+ protected themeService: Theme;
772
+ protected colorPaletteService: ColorPalette;
773
+ private i18nService;
774
+ toggleSidenav: _angular_core.OutputEmitterRef<void>;
775
+ onToggleSidenav(): void;
776
+ icon: _angular_core.ModelSignal<boolean>;
777
+ get currentLanguage(): string;
778
+ get languages(): string[];
779
+ setLanguage(language: string): void;
780
+ getCurrentLanguageIcon(): string;
781
+ getLanguageIcon(language: string): string;
782
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<Toolbar, never>;
783
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<Toolbar, "ntybase-toolbar", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; }, { "toggleSidenav": "toggleSidenav"; "icon": "iconChange"; }, never, never, true, never>;
784
+ }
785
+
786
+ declare class SelectionItem {
787
+ name: string | null;
788
+ value: any;
789
+ constructor(_value?: any, _name?: string | null);
790
+ }
791
+ declare class AutoComplete extends UiBase {
792
+ tableName: _angular_core.InputSignal<string>;
793
+ searchAfter: _angular_core.InputSignal<number>;
794
+ fieldCode: _angular_core.InputSignal<string | null>;
795
+ fieldName: _angular_core.InputSignal<string | null>;
796
+ lookupComponent: _angular_core.InputSignal<any>;
797
+ lookupComponentPath: _angular_core.InputSignal<any>;
798
+ filterField: _angular_core.InputSignal<string | null>;
799
+ filterFieldValue: _angular_core.InputSignal<any>;
800
+ filterFieldNumeric: _angular_core.InputSignal<boolean>;
801
+ filterFieldEquality: _angular_core.InputSignal<string>;
802
+ debounceTime: _angular_core.InputSignal<number>;
803
+ private alertService;
804
+ private autoCompleteService;
805
+ private dialog;
806
+ autoCompleteTrigger: MatAutocompleteTrigger;
807
+ inputField: ElementRef;
808
+ control: FormControl<any>;
809
+ matcher: ErrorStateMatcher;
810
+ searchText: _angular_core.WritableSignal<string>;
811
+ selectedOption: _angular_core.WritableSignal<SelectionItem | null>;
812
+ loadedOptions: _angular_core.WritableSignal<SelectionItem[]>;
813
+ private searchSignal;
814
+ private debounceTimeout;
815
+ constructor();
816
+ private shouldTriggerSearch;
817
+ filteredData: _angular_core.Signal<SelectionItem[]>;
818
+ onInputChanged(event: Event): void;
819
+ private loadAutoCompleteData;
820
+ clearInput(): void;
821
+ onPaste(event: ClipboardEvent): void;
822
+ displayFn(item: any): string;
823
+ optionSelected(event: MatAutocompleteSelectedEvent): void;
824
+ writeValue(value: any): void;
825
+ onLookup(): void;
826
+ /** Popup screen to goto main table
827
+ *
828
+ * @param event
829
+ * @returns
830
+ */
831
+ rightClick(event: any): boolean;
832
+ getErrorMessage(): string | undefined;
833
+ updateValidators(): void;
834
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<AutoComplete, never>;
835
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<AutoComplete, "ntybase-auto-complete", never, { "tableName": { "alias": "tableName"; "required": false; "isSignal": true; }; "searchAfter": { "alias": "searchAfter"; "required": false; "isSignal": true; }; "fieldCode": { "alias": "fieldCode"; "required": false; "isSignal": true; }; "fieldName": { "alias": "fieldName"; "required": false; "isSignal": true; }; "lookupComponent": { "alias": "lookupComponent"; "required": false; "isSignal": true; }; "lookupComponentPath": { "alias": "lookupComponentPath"; "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; }; "debounceTime": { "alias": "debounceTime"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
836
+ }
837
+
838
+ declare class Guid {
839
+ private value;
840
+ constructor(value?: string);
841
+ static newGuid(): Guid;
842
+ /**
843
+ * return all zeros '00000000-0000-0000-0000-000000000000'
844
+ */
845
+ static get empty(): string;
846
+ get empty(): string;
847
+ static isValid(str: string): boolean;
848
+ toString(): string;
849
+ toJSON(): string;
850
+ /**
851
+ * True is guid is empty or not valid
852
+ * @param str
853
+ * @returns
854
+ */
855
+ static isNullOrEmpty(str: string): boolean;
856
+ /**
857
+ * True if the guid is valid and not all zeros (empty)
858
+ * @param str
859
+ * @returns
860
+ */
861
+ static isValidAndNotEmpty(str: string): boolean;
862
+ /**
863
+ * Return empty guid if the given guid is not valid
864
+ * @param guid
865
+ * @returns
866
+ */
867
+ static emptyWhenNull(guid: any): any;
868
+ }
869
+
870
+ declare class NettyMenuService {
871
+ private http;
872
+ private environmentProxy;
873
+ readonly menuName: _angular_core.WritableSignal<string>;
874
+ readonly menu: _angular_core.WritableSignal<any>;
875
+ constructor();
876
+ setMenuName(name: string): void;
877
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<NettyMenuService, never>;
878
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<NettyMenuService>;
879
+ }
880
+
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 };
882
+ export type { AppTheme, CanComponentDeactivate, ColorTheme, Credentials, LoginContext, MFACodeContext, UserViewMode };