lib-portal-angular 0.0.36 → 0.0.38

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. package/esm2022/lib/components/button/button.component.mjs +31 -15
  2. package/esm2022/lib/components/components.module.mjs +8 -3
  3. package/esm2022/lib/components/confirmation/confirmation.component.mjs +7 -4
  4. package/esm2022/lib/components/confirmation/confirmation.service.mjs +16 -7
  5. package/esm2022/lib/components/custom-pagination/custom-pagination.component.mjs +7 -1
  6. package/esm2022/lib/components/imput/input.component.mjs +34 -29
  7. package/esm2022/lib/components/search-input/search-input.component.mjs +122 -0
  8. package/esm2022/lib/components/tables/data-paginate.service.mjs +37 -0
  9. package/esm2022/lib/components/tables/data-table.component.mjs +81 -45
  10. package/esm2022/lib/lib-portal-angular.module.mjs +6 -3
  11. package/esm2022/lib/service/auth-service.service.mjs +34 -0
  12. package/esm2022/public-api.mjs +3 -1
  13. package/fesm2022/lib-portal-angular.mjs +355 -97
  14. package/fesm2022/lib-portal-angular.mjs.map +1 -1
  15. package/lib/components/button/button.component.d.ts +9 -5
  16. package/lib/components/components.module.d.ts +5 -4
  17. package/lib/components/confirmation/confirmation.component.d.ts +3 -1
  18. package/lib/components/confirmation/confirmation.service.d.ts +4 -1
  19. package/lib/components/custom-pagination/custom-pagination.component.d.ts +4 -2
  20. package/lib/components/imput/input.component.d.ts +8 -7
  21. package/lib/components/search-input/search-input.component.d.ts +44 -0
  22. package/lib/components/tables/data-paginate.service.d.ts +21 -0
  23. package/lib/components/tables/data-table.component.d.ts +22 -14
  24. package/lib/service/auth-service.service.d.ts +9 -0
  25. package/package.json +1 -1
  26. package/public-api.d.ts +2 -0
@@ -1,7 +1,9 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
2
  import { ButtonClasses } from '../../enum/ButtonClassesEnum';
3
+ import { AuthService } from '../../service/auth-service.service';
3
4
  import * as i0 from "@angular/core";
4
- export declare class ButtonComponent {
5
+ export declare class ButtonComponent implements OnInit {
6
+ private authService;
5
7
  type: string;
6
8
  label: string;
7
9
  btnClass: ButtonClasses;
@@ -21,16 +23,17 @@ export declare class ButtonComponent {
21
23
  marginLeft: number;
22
24
  marginRight: number;
23
25
  permissions: string[];
24
- permissionChecker: ((permissions: string[]) => boolean) | null;
25
26
  clickEvent: EventEmitter<Event>;
26
27
  private isHovered;
27
28
  private isActive;
29
+ constructor(authService: AuthService);
30
+ ngOnInit(): void;
28
31
  onMouseEnter(): void;
29
32
  onMouseLeave(): void;
30
33
  onMouseDown(): void;
31
34
  onMouseUp(): void;
32
35
  onClick(event: Event): void;
33
- getDynamicStyles(): {
36
+ get dynamicStyles(): {
34
37
  'font-size': string;
35
38
  'margin-top': string;
36
39
  'margin-bottom': string;
@@ -42,7 +45,8 @@ export declare class ButtonComponent {
42
45
  transition: string;
43
46
  filter: string;
44
47
  };
48
+ private calculateDynamicStyles;
45
49
  hasPermission(): boolean;
46
50
  static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
47
- static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "sim-app-button", never, { "type": { "alias": "type"; "required": false; }; "label": { "alias": "label"; "required": false; }; "btnClass": { "alias": "btnClass"; "required": false; }; "fontSize": { "alias": "fontSize"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "form": { "alias": "form"; "required": false; }; "formaction": { "alias": "formaction"; "required": false; }; "formenctype": { "alias": "formenctype"; "required": false; }; "formmethod": { "alias": "formmethod"; "required": false; }; "formnovalidate": { "alias": "formnovalidate"; "required": false; }; "formtarget": { "alias": "formtarget"; "required": false; }; "name": { "alias": "name"; "required": false; }; "value": { "alias": "value"; "required": false; }; "marginTop": { "alias": "marginTop"; "required": false; }; "marginBottom": { "alias": "marginBottom"; "required": false; }; "marginLeft": { "alias": "marginLeft"; "required": false; }; "marginRight": { "alias": "marginRight"; "required": false; }; "permissions": { "alias": "permissions"; "required": false; }; "permissionChecker": { "alias": "permissionChecker"; "required": false; }; }, { "clickEvent": "clickEvent"; }, never, never, false, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "sim-app-button", never, { "type": { "alias": "type"; "required": false; }; "label": { "alias": "label"; "required": false; }; "btnClass": { "alias": "btnClass"; "required": false; }; "fontSize": { "alias": "fontSize"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "form": { "alias": "form"; "required": false; }; "formaction": { "alias": "formaction"; "required": false; }; "formenctype": { "alias": "formenctype"; "required": false; }; "formmethod": { "alias": "formmethod"; "required": false; }; "formnovalidate": { "alias": "formnovalidate"; "required": false; }; "formtarget": { "alias": "formtarget"; "required": false; }; "name": { "alias": "name"; "required": false; }; "value": { "alias": "value"; "required": false; }; "marginTop": { "alias": "marginTop"; "required": false; }; "marginBottom": { "alias": "marginBottom"; "required": false; }; "marginLeft": { "alias": "marginLeft"; "required": false; }; "marginRight": { "alias": "marginRight"; "required": false; }; "permissions": { "alias": "permissions"; "required": false; }; }, { "clickEvent": "clickEvent"; }, never, never, false, never>;
48
52
  }
@@ -16,11 +16,12 @@ import * as i14 from "./confirmation/confirmation.component";
16
16
  import * as i15 from "../directive/autofocus-directive/autofocus.directive";
17
17
  import * as i16 from "./custom-pagination/custom-pagination.component";
18
18
  import * as i17 from "./tree-node/tree-node.component";
19
- import * as i18 from "@angular/common";
20
- import * as i19 from "@angular/forms";
21
- import * as i20 from "@ng-select/ng-select";
19
+ import * as i18 from "./search-input/search-input.component";
20
+ import * as i19 from "@angular/common";
21
+ import * as i20 from "@angular/forms";
22
+ import * as i21 from "@ng-select/ng-select";
22
23
  export declare class ComponentsModule {
23
24
  static ɵfac: i0.ɵɵFactoryDeclaration<ComponentsModule, never>;
24
- static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsModule, [typeof i1.ButtonComponent, typeof i2.CardComponent, typeof i3.FormComponent, typeof i4.InputComponent, typeof i5.CheckboxComponent, typeof i6.TextareaComponent, typeof i7.SelectComponent, typeof i8.RadioComponent, typeof i9.MultiSelectComponent, typeof i10.DataTableComponent, typeof i11.CodeHighlightComponent, typeof i12.BadgeComponent, typeof i13.AlertComponent, typeof i14.ConfirmationComponent, typeof i15.AutofocusDirective, typeof i16.CustomPaginationComponent, typeof i17.TreeNodeComponent], [typeof i18.CommonModule, typeof i19.FormsModule, typeof i19.ReactiveFormsModule, typeof i20.NgSelectModule], [typeof i1.ButtonComponent, typeof i2.CardComponent, typeof i3.FormComponent, typeof i4.InputComponent, typeof i5.CheckboxComponent, typeof i6.TextareaComponent, typeof i7.SelectComponent, typeof i8.RadioComponent, typeof i9.MultiSelectComponent, typeof i19.FormsModule, typeof i19.ReactiveFormsModule, typeof i20.NgSelectModule, typeof i10.DataTableComponent, typeof i11.CodeHighlightComponent, typeof i12.BadgeComponent, typeof i13.AlertComponent, typeof i14.ConfirmationComponent, typeof i16.CustomPaginationComponent, typeof i17.TreeNodeComponent]>;
25
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsModule, [typeof i1.ButtonComponent, typeof i2.CardComponent, typeof i3.FormComponent, typeof i4.InputComponent, typeof i5.CheckboxComponent, typeof i6.TextareaComponent, typeof i7.SelectComponent, typeof i8.RadioComponent, typeof i9.MultiSelectComponent, typeof i10.DataTableComponent, typeof i11.CodeHighlightComponent, typeof i12.BadgeComponent, typeof i13.AlertComponent, typeof i14.ConfirmationComponent, typeof i15.AutofocusDirective, typeof i16.CustomPaginationComponent, typeof i17.TreeNodeComponent, typeof i18.SearchInputComponent], [typeof i19.CommonModule, typeof i20.FormsModule, typeof i20.ReactiveFormsModule, typeof i21.NgSelectModule], [typeof i1.ButtonComponent, typeof i2.CardComponent, typeof i3.FormComponent, typeof i4.InputComponent, typeof i5.CheckboxComponent, typeof i6.TextareaComponent, typeof i7.SelectComponent, typeof i8.RadioComponent, typeof i9.MultiSelectComponent, typeof i20.FormsModule, typeof i20.ReactiveFormsModule, typeof i21.NgSelectModule, typeof i10.DataTableComponent, typeof i11.CodeHighlightComponent, typeof i12.BadgeComponent, typeof i13.AlertComponent, typeof i14.ConfirmationComponent, typeof i16.CustomPaginationComponent, typeof i17.TreeNodeComponent, typeof i18.SearchInputComponent]>;
25
26
  static ɵinj: i0.ɵɵInjectorDeclaration<ComponentsModule>;
26
27
  }
@@ -1,6 +1,7 @@
1
+ import { OnDestroy } from '@angular/core';
1
2
  import { NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
2
3
  import * as i0 from "@angular/core";
3
- export declare class ConfirmationComponent {
4
+ export declare class ConfirmationComponent implements OnDestroy {
4
5
  activeModal: NgbActiveModal;
5
6
  title: string;
6
7
  message: string;
@@ -9,6 +10,7 @@ export declare class ConfirmationComponent {
9
10
  constructor(activeModal: NgbActiveModal);
10
11
  confirm(): void;
11
12
  cancel(): void;
13
+ ngOnDestroy(): void;
12
14
  static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationComponent, never>;
13
15
  static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmationComponent, "app-confirmation", never, { "title": { "alias": "title"; "required": false; }; "message": { "alias": "message"; "required": false; }; "confirmButtonText": { "alias": "confirmButtonText"; "required": false; }; "cancelButtonText": { "alias": "cancelButtonText"; "required": false; }; }, {}, never, never, false, never>;
14
16
  }
@@ -1,9 +1,12 @@
1
+ import { OnDestroy } from '@angular/core';
1
2
  import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
2
3
  import * as i0 from "@angular/core";
3
- export declare class ConfirmationService {
4
+ export declare class ConfirmationService implements OnDestroy {
4
5
  private modalService;
6
+ private modalRef;
5
7
  constructor(modalService: NgbModal);
6
8
  confirm(title: string, message: string, confirmButtonText?: string, cancelButtonText?: string): Promise<boolean>;
9
+ ngOnDestroy(): void;
7
10
  static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmationService, never>;
8
11
  static ɵprov: i0.ɵɵInjectableDeclaration<ConfirmationService>;
9
12
  }
@@ -1,6 +1,6 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, OnDestroy } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
- export declare class CustomPaginationComponent {
3
+ export declare class CustomPaginationComponent implements OnDestroy {
4
4
  totalItems: number;
5
5
  itemsPerPage: number;
6
6
  currentPage: number;
@@ -9,9 +9,11 @@ export declare class CustomPaginationComponent {
9
9
  ofText: string;
10
10
  showPageInfo: boolean;
11
11
  pageChange: EventEmitter<number>;
12
+ private destroy$;
12
13
  get totalPages(): number;
13
14
  changePage(page: number): void;
14
15
  get pages(): number[];
16
+ ngOnDestroy(): void;
15
17
  static ɵfac: i0.ɵɵFactoryDeclaration<CustomPaginationComponent, never>;
16
18
  static ɵcmp: i0.ɵɵComponentDeclaration<CustomPaginationComponent, "custom-pagination", never, { "totalItems": { "alias": "totalItems"; "required": false; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "maxSize": { "alias": "maxSize"; "required": false; }; "pageText": { "alias": "pageText"; "required": false; }; "ofText": { "alias": "ofText"; "required": false; }; "showPageInfo": { "alias": "showPageInfo"; "required": false; }; }, { "pageChange": "pageChange"; }, never, never, false, never>;
17
19
  }
@@ -1,7 +1,9 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, OnDestroy } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
+ import { AuthService } from '../../service/auth-service.service';
3
4
  import * as i0 from "@angular/core";
4
- export declare class InputComponent implements ControlValueAccessor {
5
+ export declare class InputComponent implements ControlValueAccessor, OnDestroy {
6
+ private authService;
5
7
  label: string;
6
8
  placeholder: string;
7
9
  id: string;
@@ -19,7 +21,6 @@ export declare class InputComponent implements ControlValueAccessor {
19
21
  marginRight: number;
20
22
  labelFontWeight: number;
21
23
  permissions: string[];
22
- permissionChecker: ((permissions: string[]) => boolean) | null;
23
24
  inputEvent: EventEmitter<Event>;
24
25
  changeEvent: EventEmitter<Event>;
25
26
  focusEvent: EventEmitter<FocusEvent>;
@@ -30,13 +31,12 @@ export declare class InputComponent implements ControlValueAccessor {
30
31
  private onChangeCallback;
31
32
  private onTouchedCallback;
32
33
  value: string;
34
+ private subscriptions;
35
+ constructor(authService: AuthService);
33
36
  onInput(event: Event): void;
34
37
  onChange(event: Event): void;
35
38
  onFocus(event: FocusEvent): void;
36
39
  onBlur(event: FocusEvent): void;
37
- onKeyup(event: KeyboardEvent): void;
38
- onKeydown(event: KeyboardEvent): void;
39
- onKeypress(event: KeyboardEvent): void;
40
40
  writeValue(value: any): void;
41
41
  registerOnChange(fn: any): void;
42
42
  registerOnTouched(fn: any): void;
@@ -55,6 +55,7 @@ export declare class InputComponent implements ControlValueAccessor {
55
55
  'line-height': string;
56
56
  'text-align': string;
57
57
  };
58
+ ngOnDestroy(): void;
58
59
  static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
59
- static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "sim-app-input", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "id": { "alias": "id"; "required": false; }; "type": { "alias": "type"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "minlength": { "alias": "minlength"; "required": false; }; "required": { "alias": "required"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "marginTop": { "alias": "marginTop"; "required": false; }; "marginBottom": { "alias": "marginBottom"; "required": false; }; "marginLeft": { "alias": "marginLeft"; "required": false; }; "marginRight": { "alias": "marginRight"; "required": false; }; "labelFontWeight": { "alias": "labelFontWeight"; "required": false; }; "permissions": { "alias": "permissions"; "required": false; }; "permissionChecker": { "alias": "permissionChecker"; "required": false; }; }, { "inputEvent": "inputEvent"; "changeEvent": "changeEvent"; "focusEvent": "focusEvent"; "blurEvent": "blurEvent"; "keyupEvent": "keyupEvent"; "keydownEvent": "keydownEvent"; "keypressEvent": "keypressEvent"; }, never, never, false, never>;
60
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "sim-app-input", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "id": { "alias": "id"; "required": false; }; "type": { "alias": "type"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "minlength": { "alias": "minlength"; "required": false; }; "required": { "alias": "required"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "marginTop": { "alias": "marginTop"; "required": false; }; "marginBottom": { "alias": "marginBottom"; "required": false; }; "marginLeft": { "alias": "marginLeft"; "required": false; }; "marginRight": { "alias": "marginRight"; "required": false; }; "labelFontWeight": { "alias": "labelFontWeight"; "required": false; }; "permissions": { "alias": "permissions"; "required": false; }; }, { "inputEvent": "inputEvent"; "changeEvent": "changeEvent"; "focusEvent": "focusEvent"; "blurEvent": "blurEvent"; "keyupEvent": "keyupEvent"; "keydownEvent": "keydownEvent"; "keypressEvent": "keypressEvent"; }, never, never, false, never>;
60
61
  }
@@ -0,0 +1,44 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class SearchInputComponent implements OnInit, OnDestroy {
4
+ id: string;
5
+ label: string;
6
+ type: string;
7
+ placeholder: string;
8
+ value: string;
9
+ disabled: boolean;
10
+ readonly: boolean;
11
+ autofocus: boolean;
12
+ maxlength: number | null;
13
+ minlength: number | null;
14
+ required: boolean;
15
+ pattern: string | null;
16
+ debounceTime: number;
17
+ search: EventEmitter<string>;
18
+ inputChange: EventEmitter<string>;
19
+ change: EventEmitter<Event>;
20
+ focus: EventEmitter<Event>;
21
+ blur: EventEmitter<Event>;
22
+ keyup: EventEmitter<KeyboardEvent>;
23
+ keydown: EventEmitter<KeyboardEvent>;
24
+ keypress: EventEmitter<KeyboardEvent>;
25
+ private searchSubject;
26
+ private searchSubscription;
27
+ constructor();
28
+ ngOnInit(): void;
29
+ onInput(event: Event): void;
30
+ onChange(event: Event): void;
31
+ onFocus(event: Event): void;
32
+ onBlur(event: Event): void;
33
+ onKeyup(event: KeyboardEvent): void;
34
+ onKeydown(event: KeyboardEvent): void;
35
+ onKeypress(event: KeyboardEvent): void;
36
+ ngOnDestroy(): void;
37
+ getLabelStyles(): {
38
+ fontFamily: string;
39
+ fontSize: string;
40
+ lineHeight: string;
41
+ };
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<SearchInputComponent, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<SearchInputComponent, "sim-search-input", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "type": { "alias": "type"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "autofocus": { "alias": "autofocus"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "minlength": { "alias": "minlength"; "required": false; }; "required": { "alias": "required"; "required": false; }; "pattern": { "alias": "pattern"; "required": false; }; "debounceTime": { "alias": "debounceTime"; "required": false; }; }, { "search": "search"; "inputChange": "inputChange"; "change": "change"; "focus": "focus"; "blur": "blur"; "keyup": "keyup"; "keydown": "keydown"; "keypress": "keypress"; }, never, never, false, never>;
44
+ }
@@ -0,0 +1,21 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export interface IDataIndexPaginate {
5
+ filterDescription?: string;
6
+ pageNumber: number;
7
+ pageSize: number;
8
+ sortColumn: string;
9
+ sortDirection: 'asc' | 'desc';
10
+ }
11
+ export interface IPaginateResult<T> {
12
+ items: T[];
13
+ totalItems: number;
14
+ }
15
+ export declare class DataPaginateService {
16
+ private http;
17
+ constructor(http: HttpClient);
18
+ fetchData<T>(url: string, params: IDataIndexPaginate): Observable<IPaginateResult<T>>;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<DataPaginateService, never>;
20
+ static ɵprov: i0.ɵɵInjectableDeclaration<DataPaginateService>;
21
+ }
@@ -1,9 +1,16 @@
1
- import { ChangeDetectorRef, EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
1
+ import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { AuthService } from '../../service/auth-service.service';
4
+ import { IDataIndexPaginate, IPaginateResult } from './data-paginate.service';
2
5
  import * as i0 from "@angular/core";
3
- export declare class DataTableComponent implements OnInit, OnChanges {
6
+ export declare class DataTableComponent implements OnInit, OnChanges, OnDestroy {
4
7
  private cdr;
5
- columns: any[];
6
- data: any[];
8
+ private authService;
9
+ columns: {
10
+ label: string;
11
+ prop: string;
12
+ }[];
13
+ hiddenColumns: string[];
7
14
  itemsPerPageOptions: number[];
8
15
  defaultItemsPerPage: number;
9
16
  itemsPerPageLabel: string;
@@ -16,17 +23,14 @@ export declare class DataTableComponent implements OnInit, OnChanges {
16
23
  totalItems: number;
17
24
  tableFontColor: string;
18
25
  tableFontSize: string;
19
- fetchDataFunction: (page: number, itemsPerPage: number) => Promise<{
20
- items: any[];
21
- totalItems: number;
22
- }>;
26
+ fetchDataFunction: (params: IDataIndexPaginate) => Observable<IPaginateResult<any>>;
23
27
  editPermissions: string[];
24
28
  deletePermissions: string[];
25
29
  viewPermissions: string[];
26
- userPermissions: string[];
27
30
  showPageInfo: boolean;
28
31
  pageText: string;
29
32
  ofText: string;
33
+ filterDescription: string;
30
34
  sortChange: EventEmitter<any>;
31
35
  pageChange: EventEmitter<number>;
32
36
  itemsPerPageChange: EventEmitter<number>;
@@ -34,23 +38,27 @@ export declare class DataTableComponent implements OnInit, OnChanges {
34
38
  onDeleteTable: EventEmitter<any>;
35
39
  onViewTable: EventEmitter<any>;
36
40
  currentPage: number;
41
+ sortColumn: string;
42
+ sortDirection: 'asc' | 'desc';
37
43
  pagedData: any[];
38
44
  isLoading: boolean;
45
+ private destroy$;
39
46
  labelStyle: {
40
47
  'font-family': string;
41
48
  'font-size': string;
42
49
  color: string;
43
50
  };
44
- constructor(cdr: ChangeDetectorRef);
51
+ constructor(cdr: ChangeDetectorRef, authService: AuthService);
45
52
  ngOnInit(): void;
46
53
  ngOnChanges(changes: SimpleChanges): void;
47
- setDefaultPermissions(): void;
48
- fetchData(): Promise<void>;
54
+ ngOnDestroy(): void;
55
+ fetchData(): void;
49
56
  onSort(column: string): void;
50
57
  onPageChange(page: number): void;
51
- onItemsPerPageChange(event: any): void;
58
+ onItemsPerPageChange(): void;
52
59
  handleAction(action: string, item: any, index: number): void;
53
60
  hasPermission(requiredPermissions: string[]): boolean;
61
+ isColumnHidden(columnProp: string): boolean;
54
62
  static ɵfac: i0.ɵɵFactoryDeclaration<DataTableComponent, never>;
55
- static ɵcmp: i0.ɵɵComponentDeclaration<DataTableComponent, "sim-data-table", never, { "columns": { "alias": "columns"; "required": false; }; "data": { "alias": "data"; "required": false; }; "itemsPerPageOptions": { "alias": "itemsPerPageOptions"; "required": false; }; "defaultItemsPerPage": { "alias": "defaultItemsPerPage"; "required": false; }; "itemsPerPageLabel": { "alias": "itemsPerPageLabel"; "required": false; }; "marginTop": { "alias": "marginTop"; "required": false; }; "marginBottom": { "alias": "marginBottom"; "required": false; }; "marginLeft": { "alias": "marginLeft"; "required": false; }; "marginRight": { "alias": "marginRight"; "required": false; }; "showActionColumn": { "alias": "showActionColumn"; "required": false; }; "actionColumnLabel": { "alias": "actionColumnLabel"; "required": false; }; "totalItems": { "alias": "totalItems"; "required": false; }; "tableFontColor": { "alias": "tableFontColor"; "required": false; }; "tableFontSize": { "alias": "tableFontSize"; "required": false; }; "fetchDataFunction": { "alias": "fetchDataFunction"; "required": false; }; "editPermissions": { "alias": "editPermissions"; "required": false; }; "deletePermissions": { "alias": "deletePermissions"; "required": false; }; "viewPermissions": { "alias": "viewPermissions"; "required": false; }; "userPermissions": { "alias": "userPermissions"; "required": false; }; "showPageInfo": { "alias": "showPageInfo"; "required": false; }; "pageText": { "alias": "pageText"; "required": false; }; "ofText": { "alias": "ofText"; "required": false; }; }, { "sortChange": "sortChange"; "pageChange": "pageChange"; "itemsPerPageChange": "itemsPerPageChange"; "onEditTable": "onEditTable"; "onDeleteTable": "onDeleteTable"; "onViewTable": "onViewTable"; }, never, never, false, never>;
63
+ static ɵcmp: i0.ɵɵComponentDeclaration<DataTableComponent, "sim-data-table", never, { "columns": { "alias": "columns"; "required": false; }; "hiddenColumns": { "alias": "hiddenColumns"; "required": false; }; "itemsPerPageOptions": { "alias": "itemsPerPageOptions"; "required": false; }; "defaultItemsPerPage": { "alias": "defaultItemsPerPage"; "required": false; }; "itemsPerPageLabel": { "alias": "itemsPerPageLabel"; "required": false; }; "marginTop": { "alias": "marginTop"; "required": false; }; "marginBottom": { "alias": "marginBottom"; "required": false; }; "marginLeft": { "alias": "marginLeft"; "required": false; }; "marginRight": { "alias": "marginRight"; "required": false; }; "showActionColumn": { "alias": "showActionColumn"; "required": false; }; "actionColumnLabel": { "alias": "actionColumnLabel"; "required": false; }; "totalItems": { "alias": "totalItems"; "required": false; }; "tableFontColor": { "alias": "tableFontColor"; "required": false; }; "tableFontSize": { "alias": "tableFontSize"; "required": false; }; "fetchDataFunction": { "alias": "fetchDataFunction"; "required": false; }; "editPermissions": { "alias": "editPermissions"; "required": false; }; "deletePermissions": { "alias": "deletePermissions"; "required": false; }; "viewPermissions": { "alias": "viewPermissions"; "required": false; }; "showPageInfo": { "alias": "showPageInfo"; "required": false; }; "pageText": { "alias": "pageText"; "required": false; }; "ofText": { "alias": "ofText"; "required": false; }; "filterDescription": { "alias": "filterDescription"; "required": false; }; }, { "sortChange": "sortChange"; "pageChange": "pageChange"; "itemsPerPageChange": "itemsPerPageChange"; "onEditTable": "onEditTable"; "onDeleteTable": "onDeleteTable"; "onViewTable": "onViewTable"; }, never, never, false, never>;
56
64
  }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class AuthService {
3
+ private userRoles;
4
+ constructor();
5
+ private loadUserRoles;
6
+ hasPermission(requiredPermissions: string[]): boolean;
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, never>;
8
+ static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
9
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lib-portal-angular",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.2.0",
6
6
  "@angular/core": "^16.2.0"
package/public-api.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from './lib/components/form/form.component';
10
10
  export * from './lib/components/imput/input.component';
11
11
  export * from './lib/components/multi-select/multi-select.component';
12
12
  export * from './lib/components/radio/radio.component';
13
+ export * from './lib/components/search-input/search-input.component';
13
14
  export * from './lib/components/select/select.component';
14
15
  export * from './lib/components/tables/data-table.component';
15
16
  export * from './lib/components/textarea/textarea.component';
@@ -19,3 +20,4 @@ export * from './lib/components/components.module';
19
20
  export * from './lib/lib-portal-angular.module';
20
21
  export * from './lib/components/alert/notification.service';
21
22
  export * from './lib/components/confirmation/confirmation.service';
23
+ export * from './lib/components/tables/data-paginate.service';