@coreui/angular-pro 4.2.31 → 4.2.33

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.
@@ -12,6 +12,7 @@ interface IPluralMap {
12
12
  }
13
13
  export declare const observeReferenceModifier: Modifier<string, any>;
14
14
  export declare class MultiSelectComponent implements IMultiSelect, ControlValueAccessor, AfterContentInit, AfterViewInit, OnChanges, OnDestroy, OnInit {
15
+ #private;
15
16
  private elementRef;
16
17
  private renderer;
17
18
  private ngZone;
@@ -24,7 +25,9 @@ export declare class MultiSelectComponent implements IMultiSelect, ControlValueA
24
25
  private readonly differ;
25
26
  static ngAcceptInputType_multiple: BooleanInput;
26
27
  static ngAcceptInputType_disabled: BooleanInput;
27
- onChange: any;
28
+ static ngAcceptInputType_virtualScroller: BooleanInput;
29
+ onChange: (value: any) => void;
30
+ onTouched: () => void;
28
31
  writeValue(value: (string | string[])): void;
29
32
  registerOnChange(fn: any): void;
30
33
  registerOnTouched(fn: any): void;
@@ -38,11 +41,16 @@ export declare class MultiSelectComponent implements IMultiSelect, ControlValueA
38
41
  private _multiple;
39
42
  nativeName: string;
40
43
  nativeId: string;
44
+ options: IOption[];
41
45
  optionsMaxHeight: string;
42
46
  optionsStyle: 'checkbox' | 'text';
43
47
  placeholder: string;
44
- search: boolean;
48
+ search: boolean | 'external';
45
49
  searchNoResultsLabel: string;
50
+ set searchValue(value: string);
51
+ get searchValue(): string;
52
+ private _searchValue;
53
+ readonly searchValueChange: EventEmitter<string>;
46
54
  selectAll: boolean;
47
55
  selectAllLabel: string;
48
56
  selectionType: 'counter' | 'tags' | 'text';
@@ -55,6 +63,7 @@ export declare class MultiSelectComponent implements IMultiSelect, ControlValueA
55
63
  size?: 'sm' | 'lg';
56
64
  /**
57
65
  * Initial value of multi-select
66
+ * @type string | string[]
58
67
  */
59
68
  set value(value: string | string[]);
60
69
  get value(): string | string[];
@@ -66,6 +75,23 @@ export declare class MultiSelectComponent implements IMultiSelect, ControlValueA
66
75
  * @default undefined
67
76
  */
68
77
  valid?: boolean;
78
+ /**
79
+ * Enable virtual scroller for the options list.
80
+ * @type boolean
81
+ * @default false
82
+ * todo: virtual scroller implementation
83
+ */
84
+ set virtualScroller(value: boolean);
85
+ get virtualScroller(): boolean;
86
+ private _virtualScroller;
87
+ /**
88
+ * Amount of visible options, if set - overwrites optionsMaxHeight
89
+ * @type number
90
+ * @default 10
91
+ */
92
+ set visibleItems(value: number);
93
+ get visibleItems(): number;
94
+ private _visibleItems;
69
95
  /**
70
96
  * Toggle the visibility of the dropdown select component.
71
97
  * @type boolean
@@ -89,7 +115,6 @@ export declare class MultiSelectComponent implements IMultiSelect, ControlValueA
89
115
  get counterTextType(): string;
90
116
  private multiselectStateSubscription;
91
117
  private multiselectVisibleSubscription;
92
- private multiSelectOptionsSubscription;
93
118
  private focusMonitorSubscription;
94
119
  multiSelectOptions: QueryList<MultiSelectOptionComponent>;
95
120
  private listKeyManager;
@@ -110,6 +135,7 @@ export declare class MultiSelectComponent implements IMultiSelect, ControlValueA
110
135
  'is-valid': boolean;
111
136
  'is-invalid': boolean;
112
137
  };
138
+ private get ariaMultiSelectable();
113
139
  private get tabIndex();
114
140
  private set tabIndex(value);
115
141
  private _tabIndex;
@@ -117,9 +143,6 @@ export declare class MultiSelectComponent implements IMultiSelect, ControlValueA
117
143
  onKeyDown($event: KeyboardEvent): void;
118
144
  onClick($event: MouseEvent): void;
119
145
  visibleOptions: number;
120
- set searchValue(value: string);
121
- get searchValue(): string;
122
- private _searchValue;
123
146
  get subtreeFocused(): boolean;
124
147
  set subtreeFocused(value: boolean);
125
148
  private _subtreeFocused;
@@ -145,6 +168,6 @@ export declare class MultiSelectComponent implements IMultiSelect, ControlValueA
145
168
  private selectedOptionsUpdate;
146
169
  private setFocusMonitor;
147
170
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectComponent, never>;
148
- static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent, "c-multi-select", ["cMultiSelect"], { "cleaner": "cleaner"; "disabled": "disabled"; "multiple": "multiple"; "nativeName": "nativeName"; "nativeId": "nativeId"; "optionsMaxHeight": "optionsMaxHeight"; "optionsStyle": "optionsStyle"; "placeholder": "placeholder"; "search": "search"; "searchNoResultsLabel": "searchNoResultsLabel"; "selectAll": "selectAll"; "selectAllLabel": "selectAllLabel"; "selectionType": "selectionType"; "selectionTypeCounterText": "selectionTypeCounterText"; "selectionTypeCounterTextPluralMap": "selectionTypeCounterTextPluralMap"; "size": "size"; "value": "value"; "valid": "valid"; "visible": "visible"; "popperjsOptions": "popperOptions"; }, { "valueChange": "valueChange"; "visibleChange": "visibleChange"; }, ["multiSelectOptions"], ["*"], false>;
171
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent, "c-multi-select", ["cMultiSelect"], { "cleaner": "cleaner"; "disabled": "disabled"; "multiple": "multiple"; "nativeName": "nativeName"; "nativeId": "nativeId"; "options": "options"; "optionsMaxHeight": "optionsMaxHeight"; "optionsStyle": "optionsStyle"; "placeholder": "placeholder"; "search": "search"; "searchNoResultsLabel": "searchNoResultsLabel"; "searchValue": "searchValue"; "selectAll": "selectAll"; "selectAllLabel": "selectAllLabel"; "selectionType": "selectionType"; "selectionTypeCounterText": "selectionTypeCounterText"; "selectionTypeCounterTextPluralMap": "selectionTypeCounterTextPluralMap"; "size": "size"; "value": "value"; "valid": "valid"; "virtualScroller": "virtualScroller"; "visibleItems": "visibleItems"; "visible": "visible"; "popperjsOptions": "popperOptions"; }, { "searchValueChange": "searchValueChange"; "valueChange": "valueChange"; "visibleChange": "visibleChange"; }, ["multiSelectOptions"], ["*"], false>;
149
172
  }
150
173
  export {};
@@ -1,6 +1,6 @@
1
1
  import { AfterContentInit, OnChanges, QueryList, SimpleChanges } from '@angular/core';
2
- import { MultiSelectOptionComponent } from '../multi-select-option/multi-select-option.component';
3
2
  import { BooleanInput } from '@angular/cdk/coercion';
3
+ import { MultiSelectOptionComponent } from '../multi-select-option/multi-select-option.component';
4
4
  import * as i0 from "@angular/core";
5
5
  export declare class MultiSelectOptgroupComponent implements AfterContentInit, OnChanges {
6
6
  static ngAcceptInputType_disabled: BooleanInput;
@@ -1,15 +1,15 @@
1
- import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit, Renderer2 } from '@angular/core';
1
+ import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy } from '@angular/core';
2
2
  import { BooleanInput } from '@angular/cdk/coercion';
3
3
  import { FocusableOption, FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';
4
4
  import { MultiSelectService } from '../multi-select.service';
5
5
  import * as i0 from "@angular/core";
6
- export declare class MultiSelectOptionComponent implements AfterContentInit, FocusableOption, OnInit, OnDestroy {
7
- private elementRef;
8
- private renderer;
9
- private changeDetectorRef;
10
- private focusMonitor;
11
- private multiSelectService;
12
- constructor(elementRef: ElementRef, renderer: Renderer2, changeDetectorRef: ChangeDetectorRef, focusMonitor: FocusMonitor, multiSelectService: MultiSelectService);
6
+ export declare class MultiSelectOptionComponent implements AfterViewInit, FocusableOption, OnDestroy {
7
+ #private;
8
+ private readonly elementRef;
9
+ private readonly changeDetectorRef;
10
+ private readonly focusMonitor;
11
+ private readonly multiSelectService;
12
+ constructor(elementRef: ElementRef, changeDetectorRef: ChangeDetectorRef, focusMonitor: FocusMonitor, multiSelectService: MultiSelectService);
13
13
  static ngAcceptInputType_disabled: BooleanInput;
14
14
  static ngAcceptInputType_selected: BooleanInput;
15
15
  optionsStyle: ('checkbox' | 'text');
@@ -17,10 +17,14 @@ export declare class MultiSelectOptionComponent implements AfterContentInit, Foc
17
17
  value?: string;
18
18
  visible: boolean;
19
19
  selectedChange: EventEmitter<boolean>;
20
- content?: ElementRef;
20
+ contentDiv?: ElementRef;
21
21
  hasContent: boolean;
22
- private multiselectVisibleSubscription;
23
22
  private dropdownVisible;
23
+ private _generatedId;
24
+ /** The id of the option element. */
25
+ get id(): string;
26
+ set id(value: string);
27
+ private _id;
24
28
  set disabled(value: boolean);
25
29
  get disabled(): boolean;
26
30
  private _disabled;
@@ -34,16 +38,19 @@ export declare class MultiSelectOptionComponent implements AfterContentInit, Foc
34
38
  disabled: boolean;
35
39
  'd-none': boolean;
36
40
  };
41
+ private get role();
37
42
  private get tabIndex();
38
43
  private get ariaDisabled();
39
44
  private get ariaSelected();
45
+ onKeyDown($event: KeyboardEvent): void;
40
46
  onKeyUp($event: KeyboardEvent): void;
41
47
  private onClick;
42
- ngAfterContentInit(): void;
48
+ ngAfterViewInit(): void;
49
+ /** Get the label for this element which is required by the FocusableOption interface. */
43
50
  getLabel(): string;
44
51
  focus(origin?: FocusOrigin): void;
45
52
  ngOnDestroy(): void;
46
- ngOnInit(): void;
53
+ private setSubscriptions;
47
54
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectOptionComponent, never>;
48
- static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectOptionComponent, "c-multi-select-option", never, { "optionsStyle": "optionsStyle"; "label": "label"; "value": "value"; "visible": "visible"; "disabled": "disabled"; "selected": "selected"; }, { "selectedChange": "selectedChange"; }, never, ["*"], false>;
55
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectOptionComponent, "c-multi-select-option", ["cMultiSelectOption"], { "optionsStyle": "optionsStyle"; "label": "label"; "value": "value"; "visible": "visible"; "id": "id"; "disabled": "disabled"; "selected": "selected"; "role": "role"; }, { "selectedChange": "selectedChange"; }, never, ["*"], false>;
49
56
  }
@@ -2,22 +2,29 @@ import { EventEmitter } from '@angular/core';
2
2
  export interface IMultiSelect {
3
3
  cleaner?: boolean;
4
4
  multiple?: boolean;
5
- options?: any[];
5
+ options?: IOption[];
6
6
  optionsMaxHeight?: (number | string | 'auto');
7
7
  optionsStyle?: (string | 'checkbox' | 'text');
8
8
  placeholder?: string;
9
- search?: boolean;
9
+ search?: boolean | 'external';
10
+ searchValue?: string;
11
+ searchValueChange?: EventEmitter<string>;
10
12
  searchNoResultsLabel?: string;
11
13
  selectAll?: boolean;
12
14
  selectAllLabel?: string;
13
15
  selectionType?: ('counter' | 'tags' | 'text');
14
16
  selectionTypeCounterText?: string;
17
+ value?: string | string[];
18
+ valueChange?: EventEmitter<string | string[]>;
19
+ virtualScroller?: boolean;
20
+ visibleItems?: number;
15
21
  visible?: boolean;
16
22
  visibleChange?: EventEmitter<boolean>;
17
23
  }
18
24
  export declare type TOptions = IOption[];
19
25
  export interface IOption {
20
26
  disabled?: boolean;
27
+ id?: string;
21
28
  label?: string;
22
29
  options?: TOptions;
23
30
  order?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coreui/angular-pro",
3
- "version": "4.2.31",
3
+ "version": "4.2.33",
4
4
  "description": "CoreUI Pro Components Library for Angular",
5
5
  "homepage": "https://coreui.io/angular",
6
6
  "author": {