@coreui/angular-pro 5.0.0-alpha.2 → 5.0.0-alpha.4
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.
- package/esm2022/lib/multi-select/multi-select/multi-select.component.mjs +21 -24
- package/esm2022/lib/multi-select/multi-select-optgroup/multi-select-optgroup.component.mjs +3 -4
- package/esm2022/lib/multi-select/multi-select-option/multi-select-option.component.mjs +6 -7
- package/esm2022/lib/multi-select/multi-select-tag/multi-select-tag.component.mjs +12 -11
- package/esm2022/lib/multi-select/multi-select.type.mjs +1 -1
- package/fesm2022/coreui-angular-pro.mjs +36 -38
- package/fesm2022/coreui-angular-pro.mjs.map +1 -1
- package/lib/multi-select/multi-select/multi-select.component.d.ts +12 -12
- package/lib/multi-select/multi-select-option/multi-select-option.component.d.ts +4 -4
- package/lib/multi-select/multi-select-tag/multi-select-tag.component.d.ts +2 -4
- package/lib/multi-select/multi-select.type.d.ts +4 -4
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ interface IPluralMap {
|
|
|
13
13
|
[k: string]: string;
|
|
14
14
|
}
|
|
15
15
|
export declare const observeReferenceModifier: Modifier<string, any>;
|
|
16
|
-
export declare class MultiSelectComponent implements IMultiSelect
|
|
16
|
+
export declare class MultiSelectComponent<T extends string | number> implements IMultiSelect<T>, ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy, OnInit {
|
|
17
17
|
#private;
|
|
18
18
|
private elementRef;
|
|
19
19
|
private renderer;
|
|
@@ -29,10 +29,10 @@ export declare class MultiSelectComponent implements IMultiSelect, ControlValueA
|
|
|
29
29
|
readonly userOptionsArray$: BehaviorSubject<IOption[]>;
|
|
30
30
|
readonly optionsSelected$: BehaviorSubject<IOption[]>;
|
|
31
31
|
readonly optionsSelected: Map<any, IOption>;
|
|
32
|
-
readonly value$: BehaviorSubject<
|
|
32
|
+
readonly value$: BehaviorSubject<T[]>;
|
|
33
33
|
onChange: (value: any) => void;
|
|
34
34
|
onTouched: () => void;
|
|
35
|
-
writeValue(value:
|
|
35
|
+
writeValue(value: T | T[]): void;
|
|
36
36
|
registerOnChange(fn: any): void;
|
|
37
37
|
registerOnTouched(fn: any): void;
|
|
38
38
|
setDisabledState(isDisabled: boolean): void;
|
|
@@ -185,15 +185,15 @@ export declare class MultiSelectComponent implements IMultiSelect, ControlValueA
|
|
|
185
185
|
size?: 'sm' | 'lg';
|
|
186
186
|
/**
|
|
187
187
|
* Initial value of multi-select
|
|
188
|
-
* @type
|
|
188
|
+
* @type T | T[]
|
|
189
189
|
*/
|
|
190
|
-
set value(value:
|
|
191
|
-
get value():
|
|
190
|
+
set value(value: T | T[]);
|
|
191
|
+
get value(): T | T[];
|
|
192
192
|
/**
|
|
193
193
|
* Emits valueChange
|
|
194
|
-
* @type
|
|
194
|
+
* @type T | T[]
|
|
195
195
|
*/
|
|
196
|
-
readonly valueChange: EventEmitter<
|
|
196
|
+
readonly valueChange: EventEmitter<T | T[]>;
|
|
197
197
|
/**
|
|
198
198
|
* Toggle visual validation feedback.
|
|
199
199
|
* @type boolean | undefined
|
|
@@ -314,7 +314,7 @@ export declare class MultiSelectComponent implements IMultiSelect, ControlValueA
|
|
|
314
314
|
private setFocusMonitor;
|
|
315
315
|
activeOption: (FocusableOption & MultiSelectOptionComponent) | null;
|
|
316
316
|
handleScrolledIndexChange(scrolledIndex: number, scrollViewport: CdkVirtualScrollViewport): void;
|
|
317
|
-
trackByFn(index: number, option: IOption): string;
|
|
317
|
+
trackByFn(index: number, option: IOption): string | number;
|
|
318
318
|
handleSearchValueChange(searchValue: string): void;
|
|
319
319
|
private setVirtualScroller;
|
|
320
320
|
private setListKeyManager;
|
|
@@ -322,10 +322,10 @@ export declare class MultiSelectComponent implements IMultiSelect, ControlValueA
|
|
|
322
322
|
get firstFocusableItem(): MultiSelectOptionComponent | undefined;
|
|
323
323
|
private setFirstItemActive;
|
|
324
324
|
updateActiveItem(index: number): void;
|
|
325
|
-
updateActiveItem<
|
|
325
|
+
updateActiveItem<TItem extends (MultiSelectOptionComponent & FocusableOption)>(item: TItem): void;
|
|
326
326
|
handleIndicatorClick($event: MouseEvent): void;
|
|
327
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectComponent
|
|
328
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent
|
|
327
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectComponent<any>, never>;
|
|
328
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent<any>, "c-multi-select", ["cMultiSelect"], { "allowCreateOptions": { "alias": "allowCreateOptions"; "required": false; }; "cleaner": { "alias": "cleaner"; "required": false; }; "clearSearchOnSelect": { "alias": "clearSearchOnSelect"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "nativeFormId": { "alias": "nativeFormId"; "required": false; }; "nativeId": { "alias": "nativeId"; "required": false; }; "nativeName": { "alias": "nativeName"; "required": false; }; "options": { "alias": "options"; "required": false; }; "optionsMaxHeight": { "alias": "optionsMaxHeight"; "required": false; }; "optionsStyle": { "alias": "optionsStyle"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "search": { "alias": "search"; "required": false; }; "searchNoResultsLabel": { "alias": "searchNoResultsLabel"; "required": false; }; "searchValue": { "alias": "searchValue"; "required": false; }; "selectAll": { "alias": "selectAll"; "required": false; }; "selectAllLabel": { "alias": "selectAllLabel"; "required": false; }; "selectionType": { "alias": "selectionType"; "required": false; }; "selectionTypeCounterText": { "alias": "selectionTypeCounterText"; "required": false; }; "selectionTypeCounterTextPluralMap": { "alias": "selectionTypeCounterTextPluralMap"; "required": false; }; "size": { "alias": "size"; "required": false; }; "value": { "alias": "value"; "required": false; }; "valid": { "alias": "valid"; "required": false; }; "virtualScroller": { "alias": "virtualScroller"; "required": false; }; "visibleItems": { "alias": "visibleItems"; "required": false; }; "itemSize": { "alias": "itemSize"; "required": false; }; "itemMinWidth": { "alias": "itemMinWidth"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "popperjsOptions": { "alias": "popperOptions"; "required": false; }; }, { "searchValueChange": "searchValueChange"; "valueChange": "valueChange"; "visibleChange": "visibleChange"; }, ["multiSelectOptionsContent", "contentTemplates"], ["*"], true, never>;
|
|
329
329
|
static ngAcceptInputType_allowCreateOptions: unknown;
|
|
330
330
|
static ngAcceptInputType_clearSearchOnSelect: unknown;
|
|
331
331
|
static ngAcceptInputType_disabled: unknown;
|
|
@@ -54,11 +54,11 @@ export declare class MultiSelectOptionComponent implements AfterViewInit, Focusa
|
|
|
54
54
|
readonly selectedChange: EventEmitter<boolean>;
|
|
55
55
|
/**
|
|
56
56
|
* Option value.
|
|
57
|
-
* @type string
|
|
57
|
+
* @type string | number
|
|
58
58
|
* @default undefined
|
|
59
59
|
*/
|
|
60
|
-
set value(value: string);
|
|
61
|
-
get value(): string;
|
|
60
|
+
set value(value: string | number);
|
|
61
|
+
get value(): string | number;
|
|
62
62
|
private contentDiv?;
|
|
63
63
|
hasContent: WritableSignal<boolean>;
|
|
64
64
|
set active(value: (boolean));
|
|
@@ -87,7 +87,7 @@ export declare class MultiSelectOptionComponent implements AfterViewInit, Focusa
|
|
|
87
87
|
getLabel(): string;
|
|
88
88
|
focus(origin?: FocusOrigin): void;
|
|
89
89
|
private setSubscriptions;
|
|
90
|
-
isSelected(value?: string): boolean;
|
|
90
|
+
isSelected(value?: string | number): boolean;
|
|
91
91
|
static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectOptionComponent, never>;
|
|
92
92
|
static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectOptionComponent, "c-multi-select-option", ["cMultiSelectOption"], { "optionsStyle": { "alias": "optionsStyle"; "required": false; }; "label": { "alias": "label"; "required": false; }; "text": { "alias": "text"; "required": false; }; "visible": { "alias": "visible"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "value": { "alias": "value"; "required": false; }; "active": { "alias": "active"; "required": false; }; "role": { "alias": "role"; "required": false; }; }, { "selectedChange": "selectedChange"; "focusChange": "focusChange"; }, never, ["*"], true, never>;
|
|
93
93
|
static ngAcceptInputType_visible: unknown;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
|
-
import { MultiSelectService } from '../multi-select.service';
|
|
3
2
|
import { IOption } from '../multi-select.type';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export declare class MultiSelectTagComponent {
|
|
6
|
-
private
|
|
7
|
-
|
|
8
|
-
multiselectVisible$: import("rxjs").Observable<boolean>;
|
|
5
|
+
#private;
|
|
6
|
+
multiselectVisible: import("@angular/core").Signal<boolean | undefined>;
|
|
9
7
|
option?: IOption;
|
|
10
8
|
disabled: boolean;
|
|
11
9
|
label?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { EventEmitter } from '@angular/core';
|
|
2
2
|
export type SearchFn = ((option: IOption, searchValue: string) => boolean);
|
|
3
|
-
export interface IMultiSelect {
|
|
3
|
+
export interface IMultiSelect<T> {
|
|
4
4
|
cleaner?: boolean | 'active';
|
|
5
5
|
multiple?: boolean;
|
|
6
6
|
options?: IOption[];
|
|
@@ -15,8 +15,8 @@ export interface IMultiSelect {
|
|
|
15
15
|
selectAllLabel?: string;
|
|
16
16
|
selectionType?: ('counter' | 'tags' | 'text');
|
|
17
17
|
selectionTypeCounterText?: string;
|
|
18
|
-
value
|
|
19
|
-
valueChange
|
|
18
|
+
value: T | T[];
|
|
19
|
+
valueChange: EventEmitter<T | T[]>;
|
|
20
20
|
virtualScroller?: boolean;
|
|
21
21
|
visibleItems?: number;
|
|
22
22
|
visible?: boolean;
|
|
@@ -31,7 +31,7 @@ export interface IOption {
|
|
|
31
31
|
order?: number;
|
|
32
32
|
selected?: boolean;
|
|
33
33
|
text?: string;
|
|
34
|
-
value: string;
|
|
34
|
+
value: string | number;
|
|
35
35
|
visible?: boolean;
|
|
36
36
|
custom?: boolean;
|
|
37
37
|
}
|
package/package.json
CHANGED