@nettyapps/ntybase 0.1.22 → 0.1.24

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
@@ -2,7 +2,7 @@ import * as _angular_core from '@angular/core';
2
2
  import { OnInit, DoCheck, SimpleChanges, OnDestroy, AfterViewInit, InjectionToken, ElementRef } from '@angular/core';
3
3
  import { TranslateService } from '@ngx-translate/core';
4
4
  import { Observable, Subject } from 'rxjs';
5
- import { Theme as Theme$1, GridApi, GridOptions, StatusPanelDef, GridReadyEvent } from 'ag-grid-community';
5
+ import { Theme as Theme$1, 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
8
  import { MatSnackBar } from '@angular/material/snack-bar';
@@ -10,7 +10,7 @@ import { HttpClient, HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from
10
10
  import { EnvironmentProxy } from '@nettyapps/ntycontract';
11
11
  import { NgForm, FormGroup, FormControl } from '@angular/forms';
12
12
  import * as XLSX from 'xlsx';
13
- import { ICellRendererAngularComp } from 'ag-grid-angular';
13
+ import { ICellRendererAngularComp, IFilterAngularComp } from 'ag-grid-angular';
14
14
  import { I18nService } from '@nettyapps/ntyi18n';
15
15
  import { MatAutocompleteTrigger, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
16
16
  import { ErrorStateMatcher } from '@angular/material/core';
@@ -273,6 +273,7 @@ declare abstract class NettyAgGridBase<T extends {
273
273
  isEmbedded: _angular_core.InputSignal<boolean>;
274
274
  componantParameterGUID: _angular_core.InputSignal<any>;
275
275
  componantParameterType: _angular_core.InputSignal<string>;
276
+ protected customFilters: _angular_core.WritableSignal<boolean>;
276
277
  protected authenticationList: Array<NettySecurity>;
277
278
  protected accessRightsProcessed: _angular_core.WritableSignal<boolean>;
278
279
  allowAdd: _angular_core.WritableSignal<boolean>;
@@ -319,6 +320,11 @@ declare abstract class NettyAgGridBase<T extends {
319
320
  statusBar: {
320
321
  statusPanels: StatusPanelDef[];
321
322
  };
323
+ /**
324
+ * Filter mode change
325
+ */
326
+ toggleFilterMode(): void;
327
+ private getStoredFilterMode;
322
328
  /**
323
329
  * Component initialization lifecycle hook
324
330
  */
@@ -422,8 +428,11 @@ declare abstract class NettyAgGridSaveBase<T> implements DoCheck {
422
428
  /**
423
429
  * Close sidenav or navigate back
424
430
  */
425
- closeSidenav(): void;
426
- backClicked(): void;
431
+ closeSidenav(): Promise<void>;
432
+ /**
433
+ * Back button clicked
434
+ */
435
+ backClicked(): Promise<void>;
427
436
  protected abstract loadDetailData(): void;
428
437
  protected validateSaveRecord(recordGUID: any): boolean;
429
438
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<NettyAgGridSaveBase<any>, never>;
@@ -504,6 +513,60 @@ declare class NettyHelper {
504
513
  static dateDifference(firstField: Date | null, secondField: Date | null, format: string): Date | null;
505
514
  }
506
515
 
516
+ declare class RangeDateTimeFilter implements IFilterAngularComp {
517
+ private params;
518
+ filterText: string;
519
+ private conditions;
520
+ private i18nService;
521
+ protected translateService: TranslateService;
522
+ private specialKeywords;
523
+ agInit(params: IFilterParams): void;
524
+ onFilterTextChanged(event: any): void;
525
+ private parseFilterText;
526
+ private parseDateForRange;
527
+ private isTurkish;
528
+ private parseDate;
529
+ private getSpecialDateRange;
530
+ doesFilterPass(params: IDoesFilterPassParams): boolean;
531
+ isFilterActive(): boolean;
532
+ getModel(): any;
533
+ setModel(model: any): void;
534
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RangeDateTimeFilter, never>;
535
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<RangeDateTimeFilter, "ntybase-range-date-time-filter", never, {}, {}, never, never, true, never>;
536
+ }
537
+
538
+ declare class RangeNumberFilter implements IFilterAngularComp {
539
+ private params;
540
+ filterText: string;
541
+ private conditions;
542
+ agInit(params: IFilterParams): void;
543
+ onFilterTextChanged(event: any): void;
544
+ private parseFilterText;
545
+ doesFilterPass(params: IDoesFilterPassParams): boolean;
546
+ isFilterActive(): boolean;
547
+ getModel(): any;
548
+ setModel(model: any): void;
549
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RangeNumberFilter, never>;
550
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<RangeNumberFilter, "ntybase-range-number-filter", never, {}, {}, never, never, true, never>;
551
+ }
552
+
553
+ declare class RangeStringFilter implements IFilterAngularComp {
554
+ private params;
555
+ filterText: string;
556
+ private conditions;
557
+ agInit(params: IFilterParams): void;
558
+ onFilterTextChanged(event: any): void;
559
+ private parseFilterText;
560
+ private parseSingleCondition;
561
+ doesFilterPass(params: IDoesFilterPassParams): boolean;
562
+ private checkSingleCondition;
563
+ isFilterActive(): boolean;
564
+ getModel(): any;
565
+ setModel(model: any): void;
566
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RangeStringFilter, never>;
567
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<RangeStringFilter, "ntybase-range-string-filter", never, {}, {}, never, never, true, never>;
568
+ }
569
+
507
570
  declare class ConfirmDialog {
508
571
  dialogRef: MatDialogRef<ConfirmDialog>;
509
572
  data: any;
@@ -524,7 +587,7 @@ interface CanComponentDeactivate {
524
587
  canDeactivate: () => boolean | Promise<boolean> | Observable<boolean>;
525
588
  }
526
589
  declare class CanDeactivateGuard implements CanDeactivate<CanComponentDeactivate> {
527
- canDeactivate(component: CanComponentDeactivate): boolean | Promise<boolean> | Observable<boolean>;
590
+ canDeactivate(component: CanComponentDeactivate): boolean | Observable<boolean> | Promise<boolean>;
528
591
  }
529
592
 
530
593
  declare class AuthenticationInterceptor implements HttpInterceptor {
@@ -682,6 +745,8 @@ declare class Login extends AuthBase {
682
745
  credentials: LoginContext;
683
746
  ngOnInit(): void;
684
747
  timeout(ms: number): Promise<unknown>;
748
+ private handleRememberMe;
749
+ private loadRememberedUsername;
685
750
  login(): void;
686
751
  onForgotPassword(): void;
687
752
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<Login, never>;
@@ -1040,5 +1105,5 @@ declare class NettyMenuService {
1040
1105
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<NettyMenuService>;
1041
1106
  }
1042
1107
 
1043
- export { AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, AutoComplete, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, ColorPalette, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ENVIRONMENT_CONFIG, EnvironmentInfo, EnvironmentInfoService, ExcelImportBase, ForgotPassword, Guid, HttpError403, HttpError404, LeftSidenav, Login, LoginDto, MFACodeDto, MfaLogin, NettyAgGridBase, NettyAgGridSaveBase, NettyAgGridService, NettyBaseApp, NettyFilter, NettyHelper, NettyMenuService, Ntybase, NtybaseModule, SelectionItem, Theme, Toolbar, UrlHelperService };
1108
+ export { AlertService, AuthenticationGuard, AuthenticationInterceptor, AuthenticationService, AutoComplete, ButtonRenderer, CanDeactivateGuard, CheckboxRenderer, ColorPalette, CommonService, ConfirmDialog, CredentialsService, CurrentUserPreference, ENVIRONMENT_CONFIG, EnvironmentInfo, EnvironmentInfoService, ExcelImportBase, ForgotPassword, Guid, HttpError403, HttpError404, LeftSidenav, Login, LoginDto, MFACodeDto, MfaLogin, NettyAgGridBase, NettyAgGridSaveBase, NettyAgGridService, NettyBaseApp, NettyFilter, NettyHelper, NettyMenuService, Ntybase, NtybaseModule, RangeDateTimeFilter, RangeNumberFilter, RangeStringFilter, SelectionItem, Theme, Toolbar, UrlHelperService };
1044
1109
  export type { AppTheme, CanComponentDeactivate, ColorTheme, Credentials, EnvironmentConfig, LoginContext, MFACodeContext, UserViewMode };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nettyapps/ntybase",
3
- "version": "0.1.22",
3
+ "version": "0.1.24",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -235,3 +235,104 @@ mat-toolbar {
235
235
  margin-bottom: 10px;
236
236
  }
237
237
  }
238
+
239
+ // AG Grid Custom Filter
240
+ .custom-filter {
241
+ padding: 10px;
242
+ width: 320px;
243
+ background: var(--mat-sys-surface);
244
+ border: 1px solid #e1e5e9;
245
+ border-radius: 8px;
246
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
247
+ }
248
+ .custom-filter__header {
249
+ margin-bottom: 16px;
250
+ }
251
+ .custom-filter__title {
252
+ font-weight: 600;
253
+ font-size: 14px;
254
+ color: var(--mat-sys-primary);
255
+ margin: 0 0 8px 0;
256
+ display: block;
257
+ }
258
+ .custom-filter__input {
259
+ width: 100%;
260
+ padding: 10px 12px;
261
+ border: 1px solid #d1d5db;
262
+ border-radius: 6px;
263
+ font-size: 14px;
264
+ color: #374151;
265
+ background-color: var(--mat-sys-surface);
266
+ box-sizing: border-box;
267
+ transition: all 0.2s ease;
268
+ margin: 4px 0;
269
+ }
270
+ .custom-filter__input:focus {
271
+ outline: none;
272
+ border-color: var(--mat-sys-primary);
273
+ box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
274
+ }
275
+ .custom-filter__input::placeholder {
276
+ color: var(--mat-sys-primary);
277
+ }
278
+ .custom-filter__help {
279
+ font-size: 12px;
280
+ color: var(--mat-sys-primary);
281
+ line-height: 1.5;
282
+ margin-top: 16px;
283
+ padding-top: 16px;
284
+ border-top: 2px solid var(--mat-sys-primary);
285
+ }
286
+ .custom-filter__help-title {
287
+ font-weight: 600;
288
+ color: var(--mat-sys-primary);
289
+ margin-bottom: 8px;
290
+ display: block;
291
+ }
292
+ .custom-filter__format {
293
+ margin-bottom: 6px;
294
+ display: flex;
295
+ align-items: flex-start;
296
+ }
297
+ .custom-filter__format::before {
298
+ content: "•";
299
+ color: var(--mat-sys-primary);
300
+ margin-right: 8px;
301
+ flex-shrink: 0;
302
+ }
303
+ .custom-filter__format code {
304
+ background-color: var(--mat-sys-primary);
305
+ padding: 2px 6px;
306
+ border-radius: 4px;
307
+ font-family: "Monaco", "Menlo", "Ubuntu Mono", monospace;
308
+ font-size: 11px;
309
+ color: var(--mat-sys-surface);
310
+ margin: 0 4px;
311
+ border: 1px solid #e5e7eb;
312
+ }
313
+ .custom-filter__example {
314
+ color: var(--mat-sys-primary);
315
+ font-style: italic;
316
+ margin-left: 4px;
317
+ }
318
+ .custom-filter__description {
319
+ color: var(--mat-sys-primary);
320
+ }
321
+
322
+ // Filter mode button
323
+ .default-filter-mode {
324
+ background-color: var(--mat-sys-secondary);
325
+ border-radius: 5px;
326
+ padding-bottom: 2px;
327
+ }
328
+ .default-filter-mode
329
+ mat-icon.notranslate.material-icons.mat-ligature-font.mat-icon-no-color {
330
+ color: var(--mat-sys-surface);
331
+ }
332
+ .custom-filter-mode {
333
+ padding-bottom: 2px;
334
+ }
335
+ .custom-filter-mode
336
+ mat-icon.notranslate.material-icons.mat-ligature-font.mat-icon-no-color {
337
+ color: var(--mat-sys-primary);
338
+ }
@@ -7,7 +7,7 @@
7
7
  "@changeCompany": "Change Company",
8
8
  "@choose_Color": "Choose Color",
9
9
  "@choose_Custom_Color": "Please choose custom color",
10
- "@close":"Close",
10
+ "@close": "Close",
11
11
  "@color_Palette": "Color Palette",
12
12
  "@confirmation": "Confirmation",
13
13
  "@confirmDeleteSelectedRecords": "Are you sure you want to delete the selected records?",
@@ -206,5 +206,28 @@
206
206
  "@specialKeywords": "Special Keywords",
207
207
  "@turkish": "Turkish",
208
208
  "@english": "English",
209
- "@filterExample": "Example: 'today..yesterday, this week' → today-yesterday range OR this week"
209
+ "@filterExample": "Example: 'today..yesterday, this week' → today-yesterday range OR this week",
210
+ "@numberFilter": "Number Filter",
211
+ "@numberFilterPlaceholder": "Ex: 0..5,10,20..,..25,!5,!10..20",
212
+ "@closedRange": "Closed Range",
213
+ "@equalOrGreater": "Equal/Greater",
214
+ "@equalOrLess": "Equal/Less",
215
+ "@singleValue": "Single value",
216
+ "@exclusion": "Exclusion",
217
+ "@rangeExclusion": "Range Exclusion",
218
+ "@stringFilter": "String Filter",
219
+ "@stringFilterPlaceholder": "Ex: ahmet, mehmet*, *can, ali..veli, ?em, ???in, !?hmet, $$regex.*pattern",
220
+ "@exactMatch": "Exact Match",
221
+ "@startsWith": "Starts With",
222
+ "@endsWith": "Ends With",
223
+ "@contains": "Contains",
224
+ "@singleCharacter": "Single Character",
225
+ "@multipleCharacters": "Multiple Characters",
226
+ "@not": "Not",
227
+ "@regex": "Regex",
228
+ "@toggleFilterMode": "Toggle Filter Mode",
229
+ "@customFilterActive": "Custom Filter Active - Switch to Default",
230
+ "@defaultFilterActive": "Default Filter Active - Switch to Custom",
231
+ "@customFilterModeEnabled": "Custom Filter Mode Enabled",
232
+ "@defaultFilterModeEnabled": "Default Filter Mode Enabled"
210
233
  }
@@ -7,7 +7,7 @@
7
7
  "@changeCompany": "Şirket Değiştir",
8
8
  "@choose_Color": "Renk Seçin",
9
9
  "@choose_Custom_Color": "Lütfen özel renk seçin",
10
- "@close":"Kapat",
10
+ "@close": "Kapat",
11
11
  "@color_Palette": "Renk Paleti",
12
12
  "@confirmation": "Onay",
13
13
  "@confirmDeleteSelectedRecords": "Seçili kayıtları silmek istediğinize emin misiniz?",
@@ -206,5 +206,28 @@
206
206
  "@specialKeywords": "Özel Kelimeler",
207
207
  "@turkish": "Türkçe",
208
208
  "@english": "İngilizce",
209
- "@filterExample": "Örnek: 'bugün..dün, bu hafta' → bugün-dün arası VEYA bu hafta"
209
+ "@filterExample": "Örnek: 'bugün..dün, bu hafta' → bugün-dün arası VEYA bu hafta",
210
+ "@numberFilter": "Sayısal Filtre",
211
+ "@numberFilterPlaceholder": "Örn: 0..5,10,20..,..25,!5,!10..20",
212
+ "@closedRange": "Kapalı Aralık",
213
+ "@equalOrGreater": "Eşit/Büyük",
214
+ "@equalOrLess": "Eşit/Küçük",
215
+ "@singleValue": "Tek değer",
216
+ "@exclusion": "Hariç Tutma",
217
+ "@rangeExclusion": "Aralık Hariç",
218
+ "@stringFilter": "Metin Filtresi",
219
+ "@stringFilterPlaceholder": "Örn: ahmet, mehmet*, *can, ali..veli, ?em, ???in, !?hmet, $$regex.*pattern",
220
+ "@exactMatch": "Tam Eşleşme",
221
+ "@startsWith": "Başlangıç",
222
+ "@endsWith": "Bitiş",
223
+ "@contains": "İçeren",
224
+ "@singleCharacter": "Tek Karakter",
225
+ "@multipleCharacters": "Çoklu Karakter",
226
+ "@not": "Değil",
227
+ "@regex": "Regex",
228
+ "@toggleFilterMode": "Filtre Modunu Değiştir",
229
+ "@customFilterActive": "Özel Filtre Aktif - Varsayılana Geç",
230
+ "@defaultFilterActive": "Varsayılan Filtre Aktif - Özele Geç",
231
+ "@customFilterModeEnabled": "Özel Filtre Modu Aktif",
232
+ "@defaultFilterModeEnabled": "Varsayılan Filtre Modu Aktif"
210
233
  }