@elderbyte/ngx-starter 13.9.1 → 13.9.2

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.
@@ -105,7 +105,7 @@ export declare class ElderSelectComponent<TEntity = any, TId = any, TValue = TEn
105
105
  onInputClicked(autoTrigger: MatAutocompleteTrigger): void;
106
106
  onOptionSelected(selectedValue: TEntity): void;
107
107
  openSelectionPopup(event: Event): void;
108
- clear(event: Event): void;
108
+ clear(event?: Event): void;
109
109
  forceReloadFirst(): void;
110
110
  updateValueByEntity(entity: TEntity): void;
111
111
  focus(options?: FocusOptions): void;
@@ -7,3 +7,10 @@ export declare class ElderSelectChipDirective {
7
7
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderSelectChipDirective, never>;
8
8
  static ɵdir: i0.ɵɵDirectiveDeclaration<ElderSelectChipDirective, "[elderElderSelectChip]", never, {}, {}, never>;
9
9
  }
10
+ export declare class ElderSelectChipAvatarDirective {
11
+ templateRef: TemplateRef<any>;
12
+ viewContainer: ViewContainerRef;
13
+ constructor(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef);
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<ElderSelectChipAvatarDirective, never>;
15
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ElderSelectChipAvatarDirective, "[elderElderSelectChipAvatar]", never, {}, {}, never>;
16
+ }
@@ -28,7 +28,7 @@ import * as i26 from "../input/autocomplete/elder-autocomplete.module";
28
28
  import * as i27 from "@angular/material/chips";
29
29
  import * as i28 from "../../pipes/elder-pipes.module";
30
30
  export { ElderSelectValueDirective } from './elder-select-value.directive';
31
- export { ElderSelectChipDirective } from './elder-select-chip.directive';
31
+ export { ElderSelectChipDirective, ElderSelectChipAvatarDirective } from './elder-select-chip.directive';
32
32
  export { ElderSelectOnTabDirective } from './elder-select-on-tab.directive';
33
33
  export { ElderSelectComponent } from './elder-select/elder-select.component';
34
34
  export { TemplatedSelectionDialogComponent, ISelectionModelDialogOptions } from './popup/templated-selection-dialog/templated-selection-dialog.component';
@@ -38,6 +38,6 @@ export { ElderMultiSelectChipsComponent } from './multi/elder-multi-select-chips
38
38
  export { ElderAutoSelectFirstDirective } from './auto/elder-auto-select-first.directive';
39
39
  export declare class ElderSelectModule {
40
40
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderSelectModule, never>;
41
- static ɵmod: i0.ɵɵNgModuleDeclaration<ElderSelectModule, [typeof i1.ElderSelectComponent, typeof i2.ElderSelectValueDirective, typeof i3.TemplatedSelectionDialogComponent, typeof i4.SelectionModelPopupDirective, typeof i5.ElderSelectOnTabDirective, typeof i6.ElderMultiSelectChipsComponent, typeof i7.ElderSelectChipDirective, typeof i8.ElderAutoSelectFirstDirective], [typeof i9.CommonModule, typeof i10.FormsModule, typeof i10.ReactiveFormsModule, typeof i11.MatFormFieldModule, typeof i12.MatIconModule, typeof i13.MatSelectModule, typeof i14.MatDialogModule, typeof i15.MatButtonModule, typeof i16.MatInputModule, typeof i17.MatAutocompleteModule, typeof i18.MatToolbarModule, typeof i19.MatProgressBarModule, typeof i20.MatProgressSpinnerModule, typeof i21.FlexModule, typeof i22.TranslateModule, typeof i23.ElderFormsDirectivesModule, typeof i24.ElderTableModule, typeof i25.ElderInfiniteScrollModule, typeof i26.ElderAutocompleteModule, typeof i27.MatChipsModule, typeof i28.ElderPipesModule], [typeof i1.ElderSelectComponent, typeof i2.ElderSelectValueDirective, typeof i3.TemplatedSelectionDialogComponent, typeof i4.SelectionModelPopupDirective, typeof i6.ElderMultiSelectChipsComponent, typeof i7.ElderSelectChipDirective, typeof i8.ElderAutoSelectFirstDirective]>;
41
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ElderSelectModule, [typeof i1.ElderSelectComponent, typeof i2.ElderSelectValueDirective, typeof i3.TemplatedSelectionDialogComponent, typeof i4.SelectionModelPopupDirective, typeof i5.ElderSelectOnTabDirective, typeof i6.ElderMultiSelectChipsComponent, typeof i7.ElderSelectChipDirective, typeof i7.ElderSelectChipAvatarDirective, typeof i8.ElderAutoSelectFirstDirective], [typeof i9.CommonModule, typeof i10.FormsModule, typeof i10.ReactiveFormsModule, typeof i11.MatFormFieldModule, typeof i12.MatIconModule, typeof i13.MatSelectModule, typeof i14.MatDialogModule, typeof i15.MatButtonModule, typeof i16.MatInputModule, typeof i17.MatAutocompleteModule, typeof i18.MatToolbarModule, typeof i19.MatProgressBarModule, typeof i20.MatProgressSpinnerModule, typeof i21.FlexModule, typeof i22.TranslateModule, typeof i23.ElderFormsDirectivesModule, typeof i24.ElderTableModule, typeof i25.ElderInfiniteScrollModule, typeof i26.ElderAutocompleteModule, typeof i27.MatChipsModule, typeof i28.ElderPipesModule], [typeof i1.ElderSelectComponent, typeof i2.ElderSelectValueDirective, typeof i3.TemplatedSelectionDialogComponent, typeof i4.SelectionModelPopupDirective, typeof i6.ElderMultiSelectChipsComponent, typeof i7.ElderSelectChipDirective, typeof i7.ElderSelectChipAvatarDirective, typeof i8.ElderAutoSelectFirstDirective]>;
42
42
  static ɵinj: i0.ɵɵInjectorDeclaration<ElderSelectModule>;
43
43
  }
@@ -1,41 +1,38 @@
1
- import { OnInit, NgZone, TemplateRef } from '@angular/core';
1
+ import { NgZone, TemplateRef } from '@angular/core';
2
2
  import { ElderMultiSelectBase } from '../elder-multi-select-base';
3
3
  import { Observable } from 'rxjs';
4
4
  import { ThemePalette } from '@angular/material/core/common-behaviors/color';
5
5
  import * as i0 from "@angular/core";
6
- declare class SelectChip<T> {
6
+ declare class ChipModel<T> {
7
7
  readonly value: T;
8
8
  readonly displayText: string;
9
9
  readonly color: ThemePalette;
10
10
  readonly removeable: boolean;
11
11
  constructor(value: T, displayText: string, color: ThemePalette, removeable: boolean);
12
12
  }
13
- export declare class ElderMultiSelectChipsComponent<TId = any, TEntity = any, TValue = any> extends ElderMultiSelectBase<TId, TEntity, TValue> implements OnInit {
13
+ export declare class ElderMultiSelectChipsComponent<TId = any, TEntity = any, TValue = any> extends ElderMultiSelectBase<TId, TEntity, TValue> {
14
14
  /***************************************************************************
15
15
  * *
16
16
  * Fields *
17
17
  * *
18
18
  **************************************************************************/
19
19
  private readonly log;
20
- readonly selectChips$: Observable<SelectChip<TEntity>[]>;
20
+ readonly selectChips$: Observable<ChipModel<TEntity>[]>;
21
21
  private readonly chipColorResolver$;
22
22
  selectable: boolean;
23
23
  allowRemove: boolean;
24
+ chipColorEnabled: boolean;
24
25
  private inputControl;
25
26
  chipTemplateQuery: TemplateRef<any>;
26
27
  private _chipTemplate;
28
+ chipAvatarTemplateQuery: TemplateRef<any>;
29
+ private _chipAvatarTemplate;
27
30
  /***************************************************************************
28
31
  * *
29
32
  * Constructor *
30
33
  * *
31
34
  **************************************************************************/
32
35
  constructor(zone: NgZone);
33
- /***************************************************************************
34
- * *
35
- * Life Cycle *
36
- * *
37
- **************************************************************************/
38
- ngOnInit(): void;
39
36
  /***************************************************************************
40
37
  * *
41
38
  * Properties *
@@ -43,6 +40,8 @@ export declare class ElderMultiSelectChipsComponent<TId = any, TEntity = any, TV
43
40
  **************************************************************************/
44
41
  set chipTemplate(template: TemplateRef<any>);
45
42
  get chipTemplate(): TemplateRef<any>;
43
+ set chipAvatarTemplate(template: TemplateRef<any>);
44
+ get chipAvatarTemplate(): TemplateRef<any>;
46
45
  /**
47
46
  * A function which returns the color of a given label object.
48
47
  */
@@ -55,6 +54,8 @@ export declare class ElderMultiSelectChipsComponent<TId = any, TEntity = any, TV
55
54
  * *
56
55
  **************************************************************************/
57
56
  onOptionSelected(selectedValue: TEntity): void;
57
+ resolveChipValue(e1: TEntity): any;
58
+ get compareWithFn(): (e1: TEntity, e2: TEntity) => boolean;
58
59
  focus(options?: FocusOptions): void;
59
60
  blur(): void;
60
61
  /***************************************************************************
@@ -65,6 +66,6 @@ export declare class ElderMultiSelectChipsComponent<TId = any, TEntity = any, TV
65
66
  private isAlreadyPresent;
66
67
  private resetInput;
67
68
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderMultiSelectChipsComponent<any, any, any>, never>;
68
- static ɵcmp: i0.ɵɵComponentDeclaration<ElderMultiSelectChipsComponent<any, any, any>, "elder-multi-select-chips", never, { "allowRemove": "allowRemove"; "chipTemplate": "chipTemplate"; "chipColorResolver": "chipColorResolver"; }, {}, ["chipTemplateQuery"], never>;
69
+ static ɵcmp: i0.ɵɵComponentDeclaration<ElderMultiSelectChipsComponent<any, any, any>, "elder-multi-select-chips", never, { "allowRemove": "allowRemove"; "chipColorEnabled": "chipColorEnabled"; "chipTemplate": "chipTemplate"; "chipColorResolver": "chipColorResolver"; }, {}, ["chipTemplateQuery", "chipAvatarTemplateQuery"], never>;
69
70
  }
70
71
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elderbyte/ngx-starter",
3
- "version": "13.9.1",
3
+ "version": "13.9.2",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^13.0.0",
6
6
  "@angular/core": "^13.0.0",
@@ -28,6 +28,18 @@
28
28
  height: 16px;
29
29
  }
30
30
 
31
+ .suffix-icon {
32
+ font-size: 16px;
33
+ width: 16px;
34
+ height: 16px;
35
+ // padding-left: 4px;
36
+ .mat-icon {
37
+ font-size: 16px;
38
+ width: 16px;
39
+ height: 16px;
40
+ }
41
+ }
42
+
31
43
  .clickable-icon {
32
44
  cursor: pointer;
33
45
  }
@@ -9,6 +9,26 @@
9
9
  height: 16px;
10
10
  }
11
11
 
12
+ .elder-chip-input {
13
+ width: 120px!important;
14
+ max-width: 120px!important;
15
+ }
16
+
17
+ .small-icon-button {
18
+ width: 24px !important;
19
+ height: 24px !important;
20
+ line-height: 24px !important;
21
+
22
+ .mat-icon {
23
+ width: 16px !important;
24
+ height: 16px !important;
25
+ line-height: 16px !important;
26
+ }
27
+ .material-icons {
28
+ font-size: 16px !important;
29
+ }
30
+ }
31
+
12
32
  .clickable-chip {
13
33
  cursor: pointer;
14
34
  }