@coreui/angular-pro 4.0.0-alpha.3 → 4.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.
Files changed (31) hide show
  1. package/esm2020/lib/breadcrumb/breadcrumb-router/breadcrumb-router.service.mjs +1 -1
  2. package/esm2020/lib/multi-select/index.mjs +2 -0
  3. package/esm2020/lib/multi-select/multi-select/multi-select.component.mjs +424 -0
  4. package/esm2020/lib/multi-select/multi-select-native-select/multi-select-native-select.component.mjs +28 -0
  5. package/esm2020/lib/multi-select/multi-select-optgroup/multi-select-optgroup-label.component.mjs +20 -0
  6. package/esm2020/lib/multi-select/multi-select-optgroup/multi-select-optgroup.component.mjs +25 -0
  7. package/esm2020/lib/multi-select/multi-select-option/multi-select-option.component.mjs +133 -0
  8. package/esm2020/lib/multi-select/multi-select-tag/multi-select-tag.component.mjs +56 -0
  9. package/esm2020/lib/multi-select/multi-select.module.mjs +50 -0
  10. package/esm2020/lib/multi-select/multi-select.service.mjs +23 -0
  11. package/esm2020/lib/multi-select/multi-select.type.mjs +2 -0
  12. package/esm2020/lib/multi-select/public_api.mjs +7 -0
  13. package/esm2020/lib/popover/popover.directive.mjs +1 -1
  14. package/esm2020/public-api.mjs +2 -1
  15. package/fesm2015/coreui-angular-pro.mjs +733 -16
  16. package/fesm2015/coreui-angular-pro.mjs.map +1 -1
  17. package/fesm2020/coreui-angular-pro.mjs +726 -16
  18. package/fesm2020/coreui-angular-pro.mjs.map +1 -1
  19. package/lib/multi-select/index.d.ts +1 -0
  20. package/lib/multi-select/multi-select/multi-select.component.d.ts +101 -0
  21. package/lib/multi-select/multi-select-native-select/multi-select-native-select.component.d.ts +13 -0
  22. package/lib/multi-select/multi-select-optgroup/multi-select-optgroup-label.component.d.ts +9 -0
  23. package/lib/multi-select/multi-select-optgroup/multi-select-optgroup.component.d.ts +10 -0
  24. package/lib/multi-select/multi-select-option/multi-select-option.component.d.ts +45 -0
  25. package/lib/multi-select/multi-select-tag/multi-select-tag.component.d.ts +21 -0
  26. package/lib/multi-select/multi-select.module.d.ts +16 -0
  27. package/lib/multi-select/multi-select.service.d.ts +12 -0
  28. package/lib/multi-select/multi-select.type.d.ts +34 -0
  29. package/lib/multi-select/public_api.d.ts +6 -0
  30. package/package.json +1 -1
  31. package/public-api.d.ts +1 -0
@@ -0,0 +1 @@
1
+ export * from './public_api';
@@ -0,0 +1,101 @@
1
+ import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, NgZone, OnDestroy, OnInit, QueryList, Renderer2, ViewContainerRef } from '@angular/core';
2
+ import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';
3
+ import { BooleanInput } from '@angular/cdk/coercion';
4
+ import { ControlValueAccessor } from '@angular/forms';
5
+ import { IMultiSelect, IOption } from '../multi-select.type';
6
+ import { MultiSelectService } from '../multi-select.service';
7
+ import { MultiSelectOptionComponent } from '../multi-select-option/multi-select-option.component';
8
+ import * as i0 from "@angular/core";
9
+ export declare class MultiSelectComponent implements IMultiSelect, ControlValueAccessor, AfterContentInit, AfterViewInit, OnDestroy, OnInit {
10
+ private elementRef;
11
+ private renderer;
12
+ private ngZone;
13
+ private changeDetectorRef;
14
+ private viewContainerRef;
15
+ private focusMonitor;
16
+ private multiSelectService;
17
+ constructor(elementRef: ElementRef, renderer: Renderer2, ngZone: NgZone, changeDetectorRef: ChangeDetectorRef, viewContainerRef: ViewContainerRef, focusMonitor: FocusMonitor, multiSelectService: MultiSelectService);
18
+ onChange: any;
19
+ writeValue(value: (string | string[])): void;
20
+ registerOnChange(fn: any): void;
21
+ registerOnTouched(fn: any): void;
22
+ setDisabledState(isDisabled: boolean): void;
23
+ static ngAcceptInputType_multiple: BooleanInput;
24
+ static ngAcceptInputType_disabled: BooleanInput;
25
+ cleaner: boolean;
26
+ set disabled(value: boolean);
27
+ get disabled(): boolean;
28
+ private _disabled;
29
+ set multiple(value: boolean);
30
+ get multiple(): boolean;
31
+ private _multiple;
32
+ nativeName: string;
33
+ nativeId: string;
34
+ options: never[];
35
+ optionsMaxHeight: string;
36
+ optionsStyle: 'checkbox' | 'text';
37
+ placeholder: string;
38
+ search: boolean;
39
+ searchNoResultsLabel: string;
40
+ selectAll: boolean;
41
+ selectAllLabel: string;
42
+ selectionType: 'counter' | 'tags' | 'text';
43
+ selectionTypeCounterText: string;
44
+ set value(value: string | string[]);
45
+ get value(): string | string[];
46
+ private _value;
47
+ readonly valueChange: EventEmitter<string | string[]>;
48
+ set visible(value: boolean);
49
+ get visible(): boolean;
50
+ private _visible;
51
+ readonly visibleChange: EventEmitter<boolean>;
52
+ isDropdownVisible: boolean;
53
+ get selectedOptions(): any[];
54
+ private _selectedOptions;
55
+ get selectedOptionsText(): string;
56
+ get counterText(): string;
57
+ private multiselectStateSubscription;
58
+ private multiselectVisibleSubscription;
59
+ private multiSelectOptionsSubscription;
60
+ private focusMonitorSubscription;
61
+ multiSelectOptions: QueryList<MultiSelectOptionComponent>;
62
+ private listKeyManager;
63
+ inputElement: ElementRef;
64
+ dropdownElement: ElementRef;
65
+ get hostClasses(): {
66
+ 'form-multi-select': boolean;
67
+ 'form-multi-select-selection-tags': boolean;
68
+ show: boolean;
69
+ };
70
+ private get tabIndex();
71
+ private set tabIndex(value);
72
+ private _tabIndex;
73
+ onKeyUp($event: KeyboardEvent): void;
74
+ manage($event: KeyboardEvent): void;
75
+ onClick($event: MouseEvent): void;
76
+ visibleOptions: number;
77
+ set inputValue(value: string);
78
+ get inputValue(): string;
79
+ private _inputValue;
80
+ get subtreeFocused(): boolean;
81
+ set subtreeFocused(value: boolean);
82
+ private _subtreeFocused;
83
+ private nativeSelectRef;
84
+ focusOrigin(origin: FocusOrigin): boolean;
85
+ ngOnInit(): void;
86
+ ngOnDestroy(): void;
87
+ ngAfterContentInit(): void;
88
+ ngAfterViewInit(): void;
89
+ handleInputClick($event: MouseEvent): void;
90
+ private multiselectSubscribe;
91
+ clearAllOptions($event: MouseEvent): void;
92
+ selectAllOptions(): void;
93
+ private clearListeners;
94
+ handleTagRemove($event: IOption): void;
95
+ setFocus(): void;
96
+ filterOptions(value: string): void;
97
+ createNativeSelect(): void;
98
+ updateNativeSelect(): void;
99
+ static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectComponent, never>;
100
+ 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"; "selectAll": "selectAll"; "selectAllLabel": "selectAllLabel"; "selectionType": "selectionType"; "selectionTypeCounterText": "selectionTypeCounterText"; "value": "value"; "visible": "visible"; }, { "valueChange": "valueChange"; "visibleChange": "visibleChange"; }, ["multiSelectOptions"], ["*"]>;
101
+ }
@@ -0,0 +1,13 @@
1
+ import { ChangeDetectorRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class MultiSelectNativeSelectComponent {
4
+ changeDetectorRef: ChangeDetectorRef;
5
+ form?: string;
6
+ id?: string;
7
+ multiple?: boolean;
8
+ name?: string;
9
+ options?: any;
10
+ constructor(changeDetectorRef: ChangeDetectorRef);
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectNativeSelectComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectNativeSelectComponent, "c-multi-select-native-select", never, { "form": "form"; "id": "id"; "multiple": "multiple"; "name": "name"; "options": "options"; }, {}, never, never>;
13
+ }
@@ -0,0 +1,9 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class MultiSelectOptgroupLabelComponent {
3
+ constructor();
4
+ get hostClasses(): {
5
+ 'form-multi-select-optgroup-label': boolean;
6
+ };
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectOptgroupLabelComponent, never>;
8
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectOptgroupLabelComponent, "c-multi-select-optgroup-label", never, {}, {}, never, ["*"]>;
9
+ }
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class MultiSelectOptgroupComponent {
3
+ label?: string;
4
+ disabled?: boolean;
5
+ get hostClasses(): {
6
+ 'form-multi-select-options': boolean;
7
+ };
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectOptgroupComponent, never>;
9
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectOptgroupComponent, "c-multi-select-optgroup", never, { "label": "label"; "disabled": "disabled"; }, {}, never, ["*"]>;
10
+ }
@@ -0,0 +1,45 @@
1
+ import { AfterContentInit, ElementRef, EventEmitter, Renderer2 } from '@angular/core';
2
+ import { BooleanInput } from '@angular/cdk/coercion';
3
+ import { FocusableOption, FocusMonitor, FocusOrigin, Highlightable } from '@angular/cdk/a11y';
4
+ import { MultiSelectService } from '../multi-select.service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class MultiSelectOptionComponent implements AfterContentInit, FocusableOption, Highlightable {
7
+ private elementRef;
8
+ private renderer;
9
+ private focusMonitor;
10
+ private multiSelectService;
11
+ constructor(elementRef: ElementRef, renderer: Renderer2, focusMonitor: FocusMonitor, multiSelectService: MultiSelectService);
12
+ static ngAcceptInputType_disabled: BooleanInput;
13
+ set disabled(value: boolean);
14
+ get disabled(): boolean;
15
+ private _disabled;
16
+ set selected(value: boolean);
17
+ get selected(): boolean;
18
+ private _selected;
19
+ optionsStyle: ('checkbox' | 'text');
20
+ label?: string;
21
+ value?: string;
22
+ visible: boolean;
23
+ selectedChange: EventEmitter<boolean>;
24
+ content?: ElementRef;
25
+ hasContent: boolean;
26
+ get hostClasses(): {
27
+ [x: string]: boolean;
28
+ 'form-multi-select-option': boolean;
29
+ 'form-multi-selected': boolean;
30
+ disabled: boolean;
31
+ 'd-none': boolean;
32
+ };
33
+ private get tabIndex();
34
+ private get ariaDisabled();
35
+ private get ariaSelected();
36
+ onKeyUp($event: KeyboardEvent): void;
37
+ onClick(): void;
38
+ ngAfterContentInit(): void;
39
+ setActiveStyles(): void;
40
+ setInactiveStyles(): void;
41
+ getLabel(): string;
42
+ focus(origin?: FocusOrigin): void;
43
+ static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectOptionComponent, never>;
44
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectOptionComponent, "c-multi-select-option", never, { "disabled": "disabled"; "selected": "selected"; "optionsStyle": "optionsStyle"; "label": "label"; "value": "value"; "visible": "visible"; }, { "selectedChange": "selectedChange"; }, never, ["*"]>;
45
+ }
@@ -0,0 +1,21 @@
1
+ import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
2
+ import { IOption } from '../multi-select.type';
3
+ import { MultiSelectService } from '../multi-select.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class MultiSelectTagComponent implements OnDestroy, OnInit {
6
+ private multiSelectService;
7
+ constructor(multiSelectService: MultiSelectService);
8
+ private multiselectVisibleSubscription;
9
+ multiselectVisible: boolean;
10
+ option?: IOption;
11
+ remove: EventEmitter<IOption>;
12
+ get hostClasses(): {
13
+ 'form-multi-select-tag': boolean;
14
+ };
15
+ ngOnInit(): void;
16
+ ngOnDestroy(): void;
17
+ handleRemove($event: any): void;
18
+ private multiselectSubscribe;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectTagComponent, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectTagComponent, "c-multi-select-tag", never, { "option": "option"; }, { "remove": "remove"; }, never, ["*"]>;
21
+ }
@@ -0,0 +1,16 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./multi-select/multi-select.component";
3
+ import * as i2 from "./multi-select-option/multi-select-option.component";
4
+ import * as i3 from "./multi-select-optgroup/multi-select-optgroup.component";
5
+ import * as i4 from "./multi-select-optgroup/multi-select-optgroup-label.component";
6
+ import * as i5 from "./multi-select-tag/multi-select-tag.component";
7
+ import * as i6 from "./multi-select-native-select/multi-select-native-select.component";
8
+ import * as i7 from "@angular/common";
9
+ import * as i8 from "@angular/cdk/a11y";
10
+ import * as i9 from "../button/button.module";
11
+ import * as i10 from "@angular/forms";
12
+ export declare class MultiSelectModule {
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectModule, never>;
14
+ static ɵmod: i0.ɵɵNgModuleDeclaration<MultiSelectModule, [typeof i1.MultiSelectComponent, typeof i2.MultiSelectOptionComponent, typeof i3.MultiSelectOptgroupComponent, typeof i4.MultiSelectOptgroupLabelComponent, typeof i5.MultiSelectTagComponent, typeof i6.MultiSelectNativeSelectComponent], [typeof i7.CommonModule, typeof i8.A11yModule, typeof i9.ButtonModule, typeof i10.FormsModule], [typeof i1.MultiSelectComponent, typeof i2.MultiSelectOptionComponent, typeof i3.MultiSelectOptgroupComponent, typeof i4.MultiSelectOptgroupLabelComponent, typeof i5.MultiSelectTagComponent]>;
15
+ static ɵinj: i0.ɵɵInjectorDeclaration<MultiSelectModule>;
16
+ }
@@ -0,0 +1,12 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class MultiSelectService {
3
+ constructor();
4
+ private multiSelectState;
5
+ multiSelectState$: import("rxjs").Observable<any>;
6
+ private multiSelectVisible;
7
+ multiSelectVisible$: import("rxjs").Observable<boolean>;
8
+ toggleOption(option: any): void;
9
+ toggleVisible(visible: boolean): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<MultiSelectService>;
12
+ }
@@ -0,0 +1,34 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ export interface IMultiSelect {
3
+ cleaner?: boolean;
4
+ multiple?: boolean;
5
+ options?: any[];
6
+ optionsMaxHeight?: (number | string | 'auto');
7
+ optionsStyle?: (string | 'checkbox' | 'text');
8
+ placeholder?: string;
9
+ search?: boolean;
10
+ searchNoResultsLabel?: string;
11
+ selectAll?: boolean;
12
+ selectAllLabel?: string;
13
+ selectionType?: ('counter' | 'tags' | 'text');
14
+ selectionTypeCounterText?: string;
15
+ visible?: boolean;
16
+ visibleChange?: EventEmitter<boolean>;
17
+ }
18
+ export declare type TOptions = IOption[];
19
+ export interface IOption {
20
+ disabled?: boolean;
21
+ label?: string;
22
+ options?: TOptions;
23
+ order?: number;
24
+ selected?: boolean;
25
+ text?: string;
26
+ value?: number | string;
27
+ }
28
+ export interface IMultiSelectOptions {
29
+ handleOptionClick?: (option: IOption) => void;
30
+ options?: IOption[];
31
+ optionsMaxHeight?: number | string;
32
+ optionsStyle?: 'checkbox' | 'text';
33
+ searchNoResultsLabel?: string;
34
+ }
@@ -0,0 +1,6 @@
1
+ export { MultiSelectOptgroupLabelComponent } from './multi-select-optgroup/multi-select-optgroup-label.component';
2
+ export { MultiSelectOptgroupComponent } from './multi-select-optgroup/multi-select-optgroup.component';
3
+ export { MultiSelectOptionComponent } from './multi-select-option/multi-select-option.component';
4
+ export { MultiSelectTagComponent } from './multi-select-tag/multi-select-tag.component';
5
+ export { MultiSelectComponent } from './multi-select/multi-select.component';
6
+ export { MultiSelectModule } from './multi-select.module';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coreui/angular-pro",
3
- "version": "4.0.0-alpha.3",
3
+ "version": "4.0.0-alpha.4",
4
4
  "description": "CoreUI Pro Components Library for Angular",
5
5
  "homepage": "https://coreui.io/pro/angular",
6
6
  "author": {
package/public-api.d.ts CHANGED
@@ -19,6 +19,7 @@ export * from './lib/header';
19
19
  export * from './lib/image';
20
20
  export * from './lib/list-group';
21
21
  export * from './lib/loading-button';
22
+ export * from './lib/multi-select';
22
23
  export * from './lib/nav';
23
24
  export * from './lib/navbar';
24
25
  export * from './lib/modal';