lib-portal-angular 0.0.52 → 0.0.54

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,12 +18,13 @@ import * as i16 from "./tree-node/tree-node.component";
18
18
  import * as i17 from "./search-input/search-input.component";
19
19
  import * as i18 from "./app-background/app-background.component";
20
20
  import * as i19 from "./basic-registration/basic-registration.component";
21
- import * as i20 from "@angular/common";
22
- import * as i21 from "@angular/forms";
23
- import * as i22 from "@ng-select/ng-select";
24
- import * as i23 from "../icons/lucide-icons.module";
21
+ import * as i20 from "./custom-switch/custom-switch.component";
22
+ import * as i21 from "@angular/common";
23
+ import * as i22 from "@angular/forms";
24
+ import * as i23 from "@ng-select/ng-select";
25
+ import * as i24 from "../icons/lucide-icons.module";
25
26
  export declare class ComponentsModule {
26
27
  static ɵfac: i0.ɵɵFactoryDeclaration<ComponentsModule, never>;
27
- static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsModule, [typeof i1.ButtonComponent, typeof i2.CardComponent, typeof i3.InputComponent, typeof i4.CheckboxComponent, typeof i5.TextareaComponent, typeof i6.SelectComponent, typeof i7.RadioComponent, typeof i8.MultiSelectComponent, typeof i9.DataTableComponent, typeof i10.CodeHighlightComponent, typeof i11.BadgeComponent, typeof i12.AlertComponent, typeof i13.ConfirmationComponent, typeof i14.AutofocusDirective, typeof i15.CustomPaginationComponent, typeof i16.TreeNodeComponent, typeof i17.SearchInputComponent, typeof i18.AppBackgroundComponent, typeof i19.BasicRegistrationComponent], [typeof i20.CommonModule, typeof i21.FormsModule, typeof i21.ReactiveFormsModule, typeof i22.NgSelectModule, typeof i23.LucideIconsModule], [typeof i1.ButtonComponent, typeof i2.CardComponent, typeof i3.InputComponent, typeof i4.CheckboxComponent, typeof i5.TextareaComponent, typeof i6.SelectComponent, typeof i7.RadioComponent, typeof i8.MultiSelectComponent, typeof i21.FormsModule, typeof i21.ReactiveFormsModule, typeof i22.NgSelectModule, typeof i9.DataTableComponent, typeof i10.CodeHighlightComponent, typeof i11.BadgeComponent, typeof i12.AlertComponent, typeof i13.ConfirmationComponent, typeof i15.CustomPaginationComponent, typeof i16.TreeNodeComponent, typeof i17.SearchInputComponent, typeof i23.LucideIconsModule, typeof i18.AppBackgroundComponent, typeof i19.BasicRegistrationComponent]>;
28
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ComponentsModule, [typeof i1.ButtonComponent, typeof i2.CardComponent, typeof i3.InputComponent, typeof i4.CheckboxComponent, typeof i5.TextareaComponent, typeof i6.SelectComponent, typeof i7.RadioComponent, typeof i8.MultiSelectComponent, typeof i9.DataTableComponent, typeof i10.CodeHighlightComponent, typeof i11.BadgeComponent, typeof i12.AlertComponent, typeof i13.ConfirmationComponent, typeof i14.AutofocusDirective, typeof i15.CustomPaginationComponent, typeof i16.TreeNodeComponent, typeof i17.SearchInputComponent, typeof i18.AppBackgroundComponent, typeof i19.BasicRegistrationComponent, typeof i20.CustomSwitchComponent], [typeof i21.CommonModule, typeof i22.FormsModule, typeof i22.ReactiveFormsModule, typeof i23.NgSelectModule, typeof i24.LucideIconsModule], [typeof i1.ButtonComponent, typeof i2.CardComponent, typeof i3.InputComponent, typeof i4.CheckboxComponent, typeof i5.TextareaComponent, typeof i6.SelectComponent, typeof i7.RadioComponent, typeof i8.MultiSelectComponent, typeof i22.FormsModule, typeof i22.ReactiveFormsModule, typeof i23.NgSelectModule, typeof i9.DataTableComponent, typeof i10.CodeHighlightComponent, typeof i11.BadgeComponent, typeof i12.AlertComponent, typeof i13.ConfirmationComponent, typeof i15.CustomPaginationComponent, typeof i16.TreeNodeComponent, typeof i17.SearchInputComponent, typeof i24.LucideIconsModule, typeof i18.AppBackgroundComponent, typeof i19.BasicRegistrationComponent, typeof i20.CustomSwitchComponent]>;
28
29
  static ɵinj: i0.ɵɵInjectorDeclaration<ComponentsModule>;
29
30
  }
@@ -0,0 +1,15 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { AuthService } from '../../service/auth-service.service';
3
+ import * as i0 from "@angular/core";
4
+ export declare class CustomSwitchComponent {
5
+ private authService;
6
+ checked: boolean;
7
+ label: string;
8
+ permissions: string[];
9
+ switchChange: EventEmitter<boolean>;
10
+ constructor(authService: AuthService);
11
+ toggleSwitch(): void;
12
+ hasPermission(): boolean;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomSwitchComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomSwitchComponent, "argenta-custom-switch", never, { "checked": { "alias": "checked"; "required": false; }; "label": { "alias": "label"; "required": false; }; "permissions": { "alias": "permissions"; "required": false; }; }, { "switchChange": "switchChange"; }, never, never, false, never>;
15
+ }
@@ -1,31 +1,48 @@
1
+ import { HttpClient } from '@angular/common/http';
1
2
  import { EventEmitter, OnInit } from '@angular/core';
2
3
  import { ControlValueAccessor } from '@angular/forms';
3
4
  import { Observable } from 'rxjs';
5
+ import { AuthService } from '../../service/auth-service.service';
4
6
  import * as i0 from "@angular/core";
5
7
  export declare class MultiSelectComponent implements ControlValueAccessor, OnInit {
8
+ private authService;
9
+ private http;
6
10
  label: string;
7
11
  data: any[];
8
12
  placeholder: string;
9
- selected: any[];
13
+ selected: any;
10
14
  id: string;
11
15
  bindLabel: string;
12
- marginTop: number;
13
- marginBottom: number;
14
- marginLeft: number;
15
- marginRight: number;
16
+ bindValue: string;
17
+ permissions: string[] | undefined;
18
+ closeOnSelect: boolean;
19
+ searchUrl: string;
20
+ multiple: boolean;
16
21
  keyupEvent: EventEmitter<any>;
22
+ private originalData;
23
+ private allItems;
17
24
  items: Observable<any[]>;
25
+ filteredItems: Observable<any[]>;
26
+ private searchTerms;
27
+ private backendItems;
28
+ constructor(authService: AuthService, http: HttpClient);
18
29
  ngOnInit(): void;
30
+ private fetchInitialData;
19
31
  private onChangeCallback;
20
32
  private onTouchedCallback;
21
33
  isCourseEntered: boolean;
22
34
  onFocus(): void;
23
35
  onBlur(): void;
24
36
  onKeyUp(event: KeyboardEvent): void;
37
+ onSelectedChange(event: any): void;
38
+ onInputChange(event: any): void;
39
+ search(term: string): Observable<any[]>;
25
40
  writeValue(value: any): void;
26
41
  registerOnChange(fn: any): void;
27
42
  registerOnTouched(fn: any): void;
28
43
  setDisabledState?(isDisabled: boolean): void;
44
+ compareFn: (item1: any, item2: any) => boolean;
45
+ hasPermission(): boolean;
29
46
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectComponent, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent, "sim-app-multi-select", never, { "label": { "alias": "label"; "required": false; }; "data": { "alias": "data"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "id": { "alias": "id"; "required": false; }; "bindLabel": { "alias": "bindLabel"; "required": false; }; "marginTop": { "alias": "marginTop"; "required": false; }; "marginBottom": { "alias": "marginBottom"; "required": false; }; "marginLeft": { "alias": "marginLeft"; "required": false; }; "marginRight": { "alias": "marginRight"; "required": false; }; }, { "keyupEvent": "keyupEvent"; }, never, never, false, never>;
47
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent, "argenta-custom-multi-select", never, { "label": { "alias": "label"; "required": false; }; "data": { "alias": "data"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "id": { "alias": "id"; "required": false; }; "bindLabel": { "alias": "bindLabel"; "required": false; }; "bindValue": { "alias": "bindValue"; "required": false; }; "permissions": { "alias": "permissions"; "required": false; }; "closeOnSelect": { "alias": "closeOnSelect"; "required": false; }; "searchUrl": { "alias": "searchUrl"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; }, { "keyupEvent": "keyupEvent"; }, never, never, false, never>;
31
48
  }
@@ -1,8 +1,8 @@
1
- import { EventEmitter, OnDestroy } from '@angular/core';
1
+ import { EventEmitter, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
3
  import { AuthService } from '../../service/auth-service.service';
4
4
  import * as i0 from "@angular/core";
5
- export declare class SelectComponent implements ControlValueAccessor, OnDestroy {
5
+ export declare class SelectComponent implements ControlValueAccessor, OnDestroy, OnChanges {
6
6
  private authService;
7
7
  label: string;
8
8
  id: string;
@@ -16,13 +16,18 @@ export declare class SelectComponent implements ControlValueAccessor, OnDestroy
16
16
  private onChangeCallback;
17
17
  private onTouchedCallback;
18
18
  value: any;
19
- private subscriptions;
19
+ private destroy$;
20
20
  constructor(authService: AuthService);
21
21
  onSelectChange(event: Event): void;
22
22
  writeValue(value: any): void;
23
23
  registerOnChange(fn: any): void;
24
24
  registerOnTouched(fn: any): void;
25
25
  setDisabledState?(isDisabled: boolean): void;
26
+ ngOnChanges(changes: SimpleChanges): void;
27
+ updateOptions(newOptions: {
28
+ value: any;
29
+ label: string;
30
+ }[]): void;
26
31
  hasPermission(): boolean;
27
32
  ngOnDestroy(): void;
28
33
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lib-portal-angular",
3
- "version": "0.0.52",
3
+ "version": "0.0.54",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^16.2.0",
6
6
  "@angular/core": "^16.2.0"
package/public-api.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './lib/components/custom-switch/custom-switch.component';
1
2
  export * from './lib/components/alert/alert.component';
2
3
  export * from './lib/components/app-background/app-background.component';
3
4
  export * from './lib/components/badge/badge.component';