ngx-techlify-core 16.0.4 → 16.1.0

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.
Files changed (32) hide show
  1. package/esm2022/lib/audit-log/audit-log-list/audit-log-list.component.mjs +112 -47
  2. package/esm2022/lib/audit-log/audit-log-list/audit-log-list.module.mjs +8 -4
  3. package/esm2022/lib/audit-log/audit-log-list-filter/audit-log-list-filter.component.mjs +32 -42
  4. package/esm2022/lib/audit-log/audit-log-list-filter/audit-log-list-filter.module.mjs +7 -3
  5. package/esm2022/lib/audit-log/audit-log.service.mjs +18 -0
  6. package/esm2022/lib/audit-log/audit-logs-view-model/audit-logs-view-model.component.mjs +3 -3
  7. package/esm2022/lib/base-model/techlify-listing-component.class.mjs +58 -3
  8. package/esm2022/lib/change-password/change-password.component.mjs +3 -3
  9. package/esm2022/lib/core/error-handler.interceptor.mjs +30 -17
  10. package/esm2022/lib/entity-files/entity-file-form/entity-file-form.component.mjs +2 -2
  11. package/esm2022/lib/entity-files/entity-file.service.mjs +3 -1
  12. package/esm2022/lib/entity-files/entity-files-view-all.component.mjs +3 -3
  13. package/esm2022/lib/export-excel/export-excel-button/export-excel-button.component.mjs +4 -4
  14. package/esm2022/lib/login/login.component.mjs +3 -3
  15. package/esm2022/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.component.mjs +22 -46
  16. package/esm2022/lib/user/current-user.service.mjs +2 -2
  17. package/esm2022/lib/user/user-enable-button-component/user-enable-button.component.mjs +8 -3
  18. package/esm2022/lib/user/user-view.component.mjs +1 -1
  19. package/esm2022/lib/user/users-view-all.component.mjs +47 -44
  20. package/fesm2022/ngx-techlify-core.mjs +377 -255
  21. package/fesm2022/ngx-techlify-core.mjs.map +1 -1
  22. package/lib/audit-log/audit-log-list/audit-log-list.component.d.ts +15 -12
  23. package/lib/audit-log/audit-log-list/audit-log-list.module.d.ts +2 -1
  24. package/lib/audit-log/audit-log-list-filter/audit-log-list-filter.component.d.ts +9 -9
  25. package/lib/audit-log/audit-log-list-filter/audit-log-list-filter.module.d.ts +2 -1
  26. package/lib/audit-log/audit-log.service.d.ts +8 -0
  27. package/lib/base-model/techlify-listing-component.class.d.ts +30 -2
  28. package/lib/core/error-handler.interceptor.d.ts +10 -1
  29. package/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.component.d.ts +1 -6
  30. package/lib/user/user-enable-button-component/user-enable-button.component.d.ts +2 -1
  31. package/lib/user/users-view-all.component.d.ts +6 -6
  32. package/package.json +1 -1
@@ -1,35 +1,38 @@
1
1
  import { OnInit, OnDestroy } from '@angular/core';
2
- import { Router } from '@angular/router';
2
+ import { ActivatedRoute, Router } from '@angular/router';
3
3
  import { MatSort } from '@angular/material/sort';
4
- import { PageEvent } from '../../data-table/data-table.model';
5
- import { DataManager } from '../../core/dataManager.service';
6
4
  import { DomSanitizer } from '@angular/platform-browser';
5
+ import { TechlifyListingControllerInterface } from '../../base-model';
6
+ import { FormBuilder } from '@angular/forms';
7
+ import { AuditLogService } from '../audit-log.service';
8
+ import { RequestHelperService } from '../../request-helper/request-helper.service';
7
9
  import * as i0 from "@angular/core";
8
- export declare class AuditLogListComponent implements OnInit, OnDestroy {
9
- private dataManager;
10
+ export declare class AuditLogListComponent extends TechlifyListingControllerInterface implements OnInit, OnDestroy {
10
11
  private router;
11
12
  sanitizer: DomSanitizer;
12
- auditLogList: any[];
13
+ private formBuilder;
14
+ private auditLogService;
15
+ private requestHelperService;
16
+ private activatedRoute;
13
17
  objectId: any;
14
18
  objectType: any;
15
19
  showFilter: boolean;
16
20
  showExportButtons: boolean;
17
21
  userId: any;
18
- pageEvent: PageEvent;
22
+ disableFilterPatchingFromUrl: boolean;
19
23
  filters: any;
20
24
  displayedColumns: any[];
21
25
  sort: MatSort;
22
- constructor(dataManager: DataManager, router: Router, sanitizer: DomSanitizer);
26
+ constructor(router: Router, sanitizer: DomSanitizer, formBuilder: FormBuilder, auditLogService: AuditLogService, requestHelperService: RequestHelperService, activatedRoute: ActivatedRoute);
23
27
  ngOnInit(): void;
24
28
  get excelData(): any[];
25
29
  changeSort(event: any): void;
26
30
  logClicked(log: any): void;
27
- initializeData(): Promise<void>;
31
+ initializeData(): void;
28
32
  filterChange(event: any): void;
29
- onScroll(): void;
30
- reload(): void;
31
33
  getTransformedChanges(log: any): string;
32
34
  ngOnDestroy(): void;
35
+ loadData(): void;
33
36
  static ɵfac: i0.ɵɵFactoryDeclaration<AuditLogListComponent, never>;
34
- static ɵcmp: i0.ɵɵComponentDeclaration<AuditLogListComponent, "app-audit-log-list", never, { "objectId": { "alias": "objectId"; "required": false; }; "objectType": { "alias": "objectType"; "required": false; }; "showFilter": { "alias": "showFilter"; "required": false; }; "showExportButtons": { "alias": "showExportButtons"; "required": false; }; "userId": { "alias": "userId"; "required": false; }; }, {}, never, never, false, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<AuditLogListComponent, "app-audit-log-list", never, { "objectId": { "alias": "objectId"; "required": false; }; "objectType": { "alias": "objectType"; "required": false; }; "showFilter": { "alias": "showFilter"; "required": false; }; "showExportButtons": { "alias": "showExportButtons"; "required": false; }; "userId": { "alias": "userId"; "required": false; }; "disableFilterPatchingFromUrl": { "alias": "disableFilterPatchingFromUrl"; "required": false; }; }, {}, never, never, false, never>;
35
38
  }
@@ -8,8 +8,9 @@ import * as i6 from "@angular/forms";
8
8
  import * as i7 from "../../material.module";
9
9
  import * as i8 from "ngx-infinite-scroll";
10
10
  import * as i9 from "../audit-log-list-filter/audit-log-list-filter.module";
11
+ import * as i10 from "@angular/material/progress-bar";
11
12
  export declare class AuditLogListModule {
12
13
  static ɵfac: i0.ɵɵFactoryDeclaration<AuditLogListModule, never>;
13
- static ɵmod: i0.ɵɵNgModuleDeclaration<AuditLogListModule, [typeof i1.AuditLogListComponent], [typeof i2.CommonModule, typeof i3.AuditLogListRoutingModule, typeof i4.ExportExcelModule, typeof i5.FlexLayoutModule, typeof i6.ReactiveFormsModule, typeof i7.MaterialModule, typeof i8.InfiniteScrollModule, typeof i9.AuditLogListFilterModule], [typeof i1.AuditLogListComponent]>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AuditLogListModule, [typeof i1.AuditLogListComponent], [typeof i2.CommonModule, typeof i3.AuditLogListRoutingModule, typeof i4.ExportExcelModule, typeof i5.FlexLayoutModule, typeof i6.ReactiveFormsModule, typeof i7.MaterialModule, typeof i8.InfiniteScrollModule, typeof i9.AuditLogListFilterModule, typeof i10.MatProgressBarModule], [typeof i1.AuditLogListComponent]>;
14
15
  static ɵinj: i0.ɵɵInjectorDeclaration<AuditLogListModule>;
15
16
  }
@@ -1,22 +1,22 @@
1
- import { OnInit, EventEmitter } from '@angular/core';
2
- import { UntypedFormGroup, UntypedFormBuilder } from '@angular/forms';
3
- import { FormValidatorService } from '../../core/form-validator.service';
1
+ import { OnInit, EventEmitter, OnDestroy } from '@angular/core';
2
+ import { UntypedFormGroup } from '@angular/forms';
3
+ import { FormValidatorService } from '../../core';
4
+ import { TimelineValue } from '../../timeline-filter';
4
5
  import * as i0 from "@angular/core";
5
- export declare class AuditLogListFilterComponent implements OnInit {
6
- private fb;
6
+ export declare class AuditLogListFilterComponent implements OnInit, OnDestroy {
7
7
  private formValidatorService;
8
- auditLogFilterForm: UntypedFormGroup;
8
+ filterForm: UntypedFormGroup;
9
9
  objectId: any;
10
10
  objectType: any;
11
11
  valueChange: EventEmitter<any>;
12
- constructor(fb: UntypedFormBuilder, formValidatorService: FormValidatorService);
12
+ constructor(formValidatorService: FormValidatorService);
13
13
  get showObjectFilter(): boolean;
14
- private createForm;
15
14
  ngOnInit(): void;
15
+ onDurationChange(timelineValue: TimelineValue): void;
16
16
  resetFieldValue(field: string): void;
17
17
  getFieldValue(field: string): any;
18
18
  isFieldValid(field: string): any;
19
19
  ngOnDestroy(): void;
20
20
  static ɵfac: i0.ɵɵFactoryDeclaration<AuditLogListFilterComponent, never>;
21
- static ɵcmp: i0.ɵɵComponentDeclaration<AuditLogListFilterComponent, "app-audit-log-list-filter", never, { "objectId": { "alias": "objectId"; "required": false; }; "objectType": { "alias": "objectType"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, false, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<AuditLogListFilterComponent, "app-audit-log-list-filter", never, { "filterForm": { "alias": "filterForm"; "required": false; }; "objectId": { "alias": "objectId"; "required": false; }; "objectType": { "alias": "objectType"; "required": false; }; }, { "valueChange": "valueChange"; }, never, never, false, never>;
22
22
  }
@@ -6,8 +6,9 @@ import * as i4 from "@angular/flex-layout";
6
6
  import * as i5 from "@angular/forms";
7
7
  import * as i6 from "../../material.module";
8
8
  import * as i7 from "../../searchable-selector/searchable-selector.module";
9
+ import * as i8 from "../../timeline-filter/timeline-filter.module";
9
10
  export declare class AuditLogListFilterModule {
10
11
  static ɵfac: i0.ɵɵFactoryDeclaration<AuditLogListFilterModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<AuditLogListFilterModule, [typeof i1.AuditLogListFilterComponent], [typeof i2.CommonModule, typeof i3.AuditLogListFilterRoutingModule, typeof i4.FlexLayoutModule, typeof i5.ReactiveFormsModule, typeof i6.MaterialModule, typeof i7.SearchableSelectorModule], [typeof i1.AuditLogListFilterComponent]>;
12
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AuditLogListFilterModule, [typeof i1.AuditLogListFilterComponent], [typeof i2.CommonModule, typeof i3.AuditLogListFilterRoutingModule, typeof i4.FlexLayoutModule, typeof i5.ReactiveFormsModule, typeof i6.MaterialModule, typeof i7.SearchableSelectorModule, typeof i8.TimelineFilterModule], [typeof i1.AuditLogListFilterComponent]>;
12
13
  static ɵinj: i0.ɵɵInjectorDeclaration<AuditLogListFilterModule>;
13
14
  }
@@ -0,0 +1,8 @@
1
+ import { TechlifyServiceBaseClass } from '../base-model';
2
+ import { HttpService } from '../core';
3
+ import * as i0 from "@angular/core";
4
+ export declare class AuditLogService extends TechlifyServiceBaseClass {
5
+ constructor(httpService: HttpService);
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuditLogService, never>;
7
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuditLogService>;
8
+ }
@@ -11,6 +11,8 @@
11
11
  */
12
12
  export declare abstract class TechlifyListingControllerInterface {
13
13
  models: any[];
14
+ selectedModelIds: any[];
15
+ isAllSelected: boolean;
14
16
  page: number;
15
17
  perPage: number;
16
18
  lastPage: number;
@@ -34,9 +36,35 @@ export declare abstract class TechlifyListingControllerInterface {
34
36
  */
35
37
  onScroll(): void;
36
38
  /**
37
- * Reset the filter.
39
+ * Reset the Filter.
38
40
  *
39
- * @param field
41
+ * @param field Field name.
40
42
  */
41
43
  resetFilter(field: string): void;
44
+ /**
45
+ * Updates a specific row in the table.
46
+ * @param model The model to be updated.
47
+ * @param index The index of the model in the list.
48
+ */
49
+ modelUpdated(model: any, index: number): void;
50
+ /**
51
+ * Adds a new model at the first position in the table.
52
+ * @param model The new model to be added.
53
+ */
54
+ modelCreated(model: any): void;
55
+ /**
56
+ * Remove a model from the list.
57
+ * @param index Index of the model in the list.
58
+ */
59
+ modelDeleted(index: number): void;
60
+ /**
61
+ * Used for multi select
62
+ * Trigerred when select all is toggled
63
+ */
64
+ selectAll(): void;
65
+ /**
66
+ * Used for multi select
67
+ * Trigerred if any entry section is modified
68
+ */
69
+ isSelectionModified(event: any, model: any): void;
42
70
  }
@@ -2,6 +2,7 @@ import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/c
2
2
  import { Observable } from 'rxjs';
3
3
  import { ConfigService } from './config.service';
4
4
  import { ErrorHandlerService } from './error-handler.service';
5
+ import { AlertService } from './alert.service';
5
6
  import * as i0 from "@angular/core";
6
7
  /**
7
8
  * Adds a default error handler to all requests.
@@ -9,9 +10,17 @@ import * as i0 from "@angular/core";
9
10
  export declare class ErrorHandlerInterceptor implements HttpInterceptor {
10
11
  private configService;
11
12
  private errorHandler;
12
- constructor(configService: ConfigService, errorHandler: ErrorHandlerService);
13
+ private alertService;
14
+ constructor(configService: ConfigService, errorHandler: ErrorHandlerService, alertService: AlertService);
13
15
  intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
14
16
  private handleError;
17
+ /**
18
+ * Helper function to check if an error is likely due to a network connection issue.
19
+ *
20
+ * @param error The error object to check.
21
+ * @returns `true` if it's likely a network error, `false` otherwise.
22
+ */
23
+ checkNoNetworkConnection(error: any): boolean;
15
24
  static ɵfac: i0.ɵɵFactoryDeclaration<ErrorHandlerInterceptor, never>;
16
25
  static ɵprov: i0.ɵɵInjectableDeclaration<ErrorHandlerInterceptor>;
17
26
  }
@@ -25,20 +25,15 @@ export declare class TechlifyTaggerTagFormFieldComponent implements OnInit, Cont
25
25
  tagInputCtrl: UntypedFormControl;
26
26
  filterString: any;
27
27
  tagInput: ElementRef<HTMLInputElement>;
28
- /**Pass the configuration for Techlify Tagger */
29
28
  config: TechlifyTaggerTagFormConfigModel;
30
- /**Pass the Model Type for Techlify Tagger, Required */
31
29
  modelType: string;
32
- /**Pass the Model ID for Techlify Tagger */
33
30
  modelId: string;
34
- /**Pass the default list of tags */
35
31
  private _allTags;
36
32
  get allTags(): any[];
37
33
  set allTags(value: any[]);
38
- /**Pass the Categories to filter for a model */
39
34
  categories: string[];
40
- /**Pass default category to be used for assigning the tags, when we filter by more than one category */
41
35
  defaultCreateCategory: string;
36
+ private subscriptions;
42
37
  get tags(): any[];
43
38
  get empty(): boolean;
44
39
  get shouldLabelFloat(): any;
@@ -9,6 +9,7 @@ export declare class UserEnableButtonComponent implements OnInit {
9
9
  private alertService;
10
10
  currentUserService: CurrentUserService;
11
11
  user: any;
12
+ isUseIcons: boolean;
12
13
  currentUser: User;
13
14
  onSave: EventEmitter<User>;
14
15
  constructor(service: UserService, alertService: AlertService, currentUserService: CurrentUserService);
@@ -16,5 +17,5 @@ export declare class UserEnableButtonComponent implements OnInit {
16
17
  enableUser(): void;
17
18
  disableUser(): void;
18
19
  static ɵfac: i0.ɵɵFactoryDeclaration<UserEnableButtonComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<UserEnableButtonComponent, "app-user-enable-button", never, { "user": { "alias": "user"; "required": false; }; }, { "onSave": "onSave"; }, never, never, false, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<UserEnableButtonComponent, "app-user-enable-button", never, { "user": { "alias": "user"; "required": false; }; "isUseIcons": { "alias": "isUseIcons"; "required": false; }; }, { "onSave": "onSave"; }, never, never, false, never>;
20
21
  }
@@ -4,13 +4,15 @@ import { CurrentUserService } from './current-user.service';
4
4
  import { MatDialog } from '@angular/material/dialog';
5
5
  import { UserService } from './user.service';
6
6
  import { MultiUserConfig, UserConfigService } from '../user-config';
7
- import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
7
+ import { UntypedFormBuilder } from '@angular/forms';
8
8
  import { Sort } from '@angular/material/sort';
9
9
  import { PageEvent } from '../data-table';
10
10
  import { AlertService, HttpService } from '../core';
11
11
  import { RequestHelperService } from '../request-helper/request-helper.service';
12
+ import { TechlifyListingControllerInterface } from '../base-model';
13
+ import { ActivatedRoute } from '@angular/router';
12
14
  import * as i0 from "@angular/core";
13
- export declare class UsersViewAllComponent implements OnInit {
15
+ export declare class UsersViewAllComponent extends TechlifyListingControllerInterface implements OnInit {
14
16
  private http;
15
17
  private alertService;
16
18
  currentUserService: CurrentUserService;
@@ -19,24 +21,22 @@ export declare class UsersViewAllComponent implements OnInit {
19
21
  private userService;
20
22
  private fb;
21
23
  private requestHelperService;
24
+ private activatedRoute;
22
25
  clientId: number;
23
26
  userTypeIds: number[];
24
27
  currentUser: User;
25
28
  isWorking: boolean;
26
- displayItemAddDialog: boolean;
27
29
  config: MultiUserConfig;
28
30
  user: User;
29
31
  title: string;
30
- userFilterForm: UntypedFormGroup;
31
32
  pageEvent: PageEvent;
32
33
  displayedColumns: string[];
33
34
  scrollContainer: string;
34
35
  models: any[];
35
- constructor(http: HttpService, alertService: AlertService, currentUserService: CurrentUserService, userConfigService: UserConfigService, dialog: MatDialog, userService: UserService, fb: UntypedFormBuilder, requestHelperService: RequestHelperService);
36
+ constructor(http: HttpService, alertService: AlertService, currentUserService: CurrentUserService, userConfigService: UserConfigService, dialog: MatDialog, userService: UserService, fb: UntypedFormBuilder, requestHelperService: RequestHelperService, activatedRoute: ActivatedRoute);
36
37
  ngOnInit(): void;
37
38
  private createForm;
38
39
  loadData(): void;
39
- resetPassword(event: any): Promise<void>;
40
40
  createOrEditUser(user?: any): void;
41
41
  deleteUser(user: any): void;
42
42
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-techlify-core",
3
- "version": "16.0.4",
3
+ "version": "16.1.0",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=16",
6
6
  "@angular/core": ">=16",