@alauda/ui 7.2.1-beta.1 → 7.2.1-beta.11

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 (51) hide show
  1. package/drawer/component/drawer.component.d.ts +15 -47
  2. package/drawer/component/internal/internal.component.d.ts +33 -0
  3. package/drawer/drawer-ref.d.ts +13 -0
  4. package/drawer/drawer.module.d.ts +1 -1
  5. package/drawer/drawer.service.d.ts +13 -23
  6. package/drawer/index.d.ts +3 -2
  7. package/drawer/types.d.ts +23 -0
  8. package/esm2022/autocomplete/autocomplete.component.mjs +3 -3
  9. package/esm2022/autocomplete/suggestion/suggestion.component.mjs +8 -4
  10. package/esm2022/dialog/dialog.component.mjs +8 -1
  11. package/esm2022/drawer/component/drawer.component.mjs +33 -188
  12. package/esm2022/drawer/component/internal/internal.component.mjs +171 -0
  13. package/esm2022/drawer/drawer-ref.mjs +30 -0
  14. package/esm2022/drawer/drawer.module.mjs +3 -3
  15. package/esm2022/drawer/drawer.service.mjs +75 -22
  16. package/esm2022/drawer/{component/helper-directives.mjs → helper-directives.mjs} +1 -1
  17. package/esm2022/drawer/index.mjs +4 -3
  18. package/esm2022/drawer/types.mjs +7 -0
  19. package/esm2022/paginator/paginator.component.mjs +3 -3
  20. package/esm2022/paginator/paginator.module.mjs +2 -3
  21. package/esm2022/scrolling/virtual-for-of.directive.mjs +2 -14
  22. package/esm2022/select/base-select.mjs +152 -265
  23. package/esm2022/select/helper-directives.mjs +54 -9
  24. package/esm2022/select/index.mjs +2 -3
  25. package/esm2022/select/multi-select/multi-select.component.mjs +58 -38
  26. package/esm2022/select/option/option.component.mjs +120 -0
  27. package/esm2022/select/option-group/option-group.component.mjs +11 -16
  28. package/esm2022/select/select.component.mjs +13 -21
  29. package/esm2022/select/select.module.mjs +33 -16
  30. package/esm2022/select/select.types.mjs +1 -1
  31. package/esm2022/select/validators.mjs +9 -4
  32. package/esm2022/tree-select/tree-select.component.mjs +3 -3
  33. package/fesm2022/alauda-ui.mjs +2555 -2493
  34. package/fesm2022/alauda-ui.mjs.map +1 -1
  35. package/package.json +1 -1
  36. package/select/base-select.d.ts +36 -57
  37. package/select/helper-directives.d.ts +16 -3
  38. package/select/index.d.ts +1 -2
  39. package/select/multi-select/multi-select.component.d.ts +20 -16
  40. package/select/option/option.component.d.ts +46 -0
  41. package/select/option-group/option-group.component.d.ts +5 -4
  42. package/select/select.component.d.ts +3 -3
  43. package/select/select.module.d.ts +17 -12
  44. package/select/select.types.d.ts +2 -8
  45. package/drawer/component/drawer-ref.d.ts +0 -27
  46. package/esm2022/drawer/component/drawer-ref.mjs +0 -9
  47. package/esm2022/select/option-item/option-item.component.mjs +0 -63
  48. package/esm2022/select/option.component.mjs +0 -48
  49. package/select/option-item/option-item.component.d.ts +0 -23
  50. package/select/option.component.d.ts +0 -16
  51. /package/drawer/{component/helper-directives.d.ts → helper-directives.d.ts} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alauda/ui",
3
- "version": "7.2.1-beta.1",
3
+ "version": "7.2.1-beta.11",
4
4
  "description": "Angular UI components by Alauda Frontend Team.",
5
5
  "repository": "git+https://github.com/alauda/alauda-ui.git",
6
6
  "author": "Alauda Frontend",
@@ -1,100 +1,79 @@
1
- import { AfterContentInit, ElementRef, EventEmitter, QueryList, TemplateRef } from '@angular/core';
2
- import { BehaviorSubject, Observable } from 'rxjs';
1
+ import { AfterContentInit, AfterViewInit, ElementRef, EventEmitter, OnDestroy, QueryList } from '@angular/core';
2
+ import { BehaviorSubject, Observable, Subject } from 'rxjs';
3
3
  import { CommonFormControl } from '../form';
4
- import { VirtualScrollViewportComponent } from '../scrolling/virtual-scroll-viewport.component';
5
4
  import { TooltipDirective } from '../tooltip';
6
5
  import { ComponentSize } from '../types';
7
- import { OptionItemComponent } from './option-item/option-item.component';
8
- import { OptionComponent } from './option.component';
9
- import { CreateFn, DisplayOption, OptionFilterFn, SelectFilterOption, TrackFn } from './select.types';
6
+ import { OptionContentDirective } from './helper-directives';
7
+ import { OptionComponent } from './option/option.component';
8
+ import { OptionFilterFn, SelectFilterOption, TrackFn } from './select.types';
10
9
  import * as i0 from "@angular/core";
11
- export declare abstract class BaseSelect<T, V = T> extends CommonFormControl<V> implements AfterContentInit {
10
+ export declare abstract class BaseSelect<T, V = T> extends CommonFormControl<V> implements AfterContentInit, AfterViewInit, OnDestroy {
12
11
  get size(): ComponentSize;
13
12
  set size(val: ComponentSize);
14
- get options(): Array<SelectFilterOption<T>>;
15
- set options(val: Array<SelectFilterOption<T>>);
16
13
  filterable: boolean;
17
14
  clearable: boolean;
15
+ filterFn: OptionFilterFn<T>;
16
+ trackFn: TrackFn<T>;
17
+ labelFn?: (value: T) => string;
18
18
  allowCreate: boolean;
19
+ get allOptions(): OptionComponent<T>[];
20
+ get opened(): boolean;
21
+ get inputReadonly(): boolean;
22
+ get filterString(): string;
23
+ set filterString(val: string);
19
24
  loading: boolean;
20
25
  placeholder: string;
21
26
  defaultFirstOption: boolean;
22
- useVirtual: boolean;
23
- itemSize: number;
24
- maxItemLength: number;
25
- createFn: CreateFn<T>;
26
- filterFn: OptionFilterFn<T>;
27
- trackFn: TrackFn<T>;
28
- labelFn?: (value: T) => string;
27
+ lazy: boolean;
29
28
  filterChange: EventEmitter<string>;
30
29
  show: EventEmitter<void>;
31
30
  hide: EventEmitter<void>;
32
31
  protected selectRef: ElementRef<HTMLElement>;
33
32
  protected tooltipRef: TooltipDirective;
34
33
  protected optionListRef: ElementRef<HTMLDivElement>;
35
- virtualScrollViewport: VirtualScrollViewportComponent;
36
- inputItemTemplate: TemplateRef<any>;
37
- contentOptionItems: QueryList<ElementRef<HTMLElement>>;
38
- contentTplOptions: QueryList<OptionComponent<T>>;
39
- get opened(): boolean;
40
- get inputReadonly(): boolean;
41
- get _itemSize(): number;
42
- set filterString(val: string);
43
- get filterString(): string;
44
- isTemplateRef: (label: any) => label is TemplateRef<unknown>;
34
+ protected inputtingOption: OptionComponent<T>;
35
+ protected optionContent?: OptionContentDirective;
36
+ customOptions: QueryList<OptionComponent<T>>;
37
+ contentOptions: QueryList<OptionComponent<T>>;
38
+ isTemplateRef: (label: any) => label is import("@angular/core").TemplateRef<unknown>;
45
39
  isMulti: boolean;
46
- protected scrolledIndex: number;
40
+ abstract readonly values$: Observable<T[]>;
41
+ allOptions$: Observable<Array<OptionComponent<T>>>;
42
+ protected focusedOption: OptionComponent<T>;
47
43
  private _size;
48
- private _options;
49
44
  private _filterString;
50
- selectableOptions: Array<DisplayOption<T>>;
51
- abstract readonly values$: Observable<T[]>;
52
- protected options$$: BehaviorSubject<DisplayOption<T>[]>;
53
- protected contentOptions$: Observable<Array<DisplayOption<T>>>;
54
- protected customOptions$: Observable<Array<DisplayOption<T>>>;
55
- protected inputtingOption$: Observable<DisplayOption<T>>;
56
- allOptions$: BehaviorSubject<DisplayOption<T>[]>;
57
- filterOptions$: BehaviorSubject<DisplayOption<T>[]>;
58
- containerWidth: string;
45
+ protected destroy$$: Subject<void>;
59
46
  protected size$$: BehaviorSubject<ComponentSize>;
60
47
  private readonly filterString$$;
61
48
  size$: Observable<ComponentSize>;
62
- options$: Observable<DisplayOption<T>[]>;
63
49
  filterString$: Observable<string>;
64
- focused$: BehaviorSubject<DisplayOption<T>>;
65
- private readonly destroyRef;
50
+ optionVisibles$: Observable<boolean[]>;
51
+ hasVisibleOption$: Observable<boolean>;
52
+ hasMatchedOption$: Observable<boolean>;
53
+ customCreatedOptions$: Observable<Array<SelectFilterOption<T>>>;
54
+ containerWidth: string;
66
55
  ngAfterContentInit(): void;
67
- private tplOptions2Data;
68
- private transformOptions;
69
- trackByValue: (_: number, item: SelectFilterOption<T>) => unknown;
56
+ ngAfterViewInit(): void;
57
+ ngOnDestroy(): void;
70
58
  openOption(): void;
71
59
  closeOption(): void;
72
60
  onShowOptions(): void;
73
61
  onHideOptions(): void;
74
62
  onInput(event: Event): void;
75
- stopEvent(event: KeyboardEvent): void;
76
63
  onKeyDown(event: KeyboardEvent): void;
77
- onOptionClick(option: OptionItemComponent<T>): void;
78
- updateAllOptions(option: DisplayOption<T>): void;
64
+ onOptionClick(option: OptionComponent<T>): void;
79
65
  protected autoFocusFirstOption(): void;
80
66
  protected focusOptionDir(dir: 'down' | 'up'): void;
81
- isFocus: (value: DisplayOption<T>['value'], focusOption?: DisplayOption<T>) => boolean;
82
- protected resetFocusedOption(focusedOption?: DisplayOption<T>): void;
83
- onScrolledIndexChange(index: number): void;
84
- protected scrollToOption(option: DisplayOption<T>): void;
67
+ protected resetFocusedOption(focusedOption?: OptionComponent<T>): void;
68
+ protected scrollToOption(option: OptionComponent<T>): void;
85
69
  protected selectFocusedOption(): void;
86
- getSelected(value: DisplayOption<T>['value'], values: Array<DisplayOption<T>['value']>): boolean;
87
- focus(option: DisplayOption<T>): void;
88
- blur(): void;
89
- getLabelByValue(value: T): string;
90
70
  protected escSelect(): void;
91
71
  private _trackFn;
92
- private _createFn;
93
72
  private _filterFn;
94
- abstract selectOption(option: DisplayOption<T>): void;
73
+ abstract selectOption(option: OptionComponent<T>): void;
95
74
  abstract clearValue(event: Event): void;
96
75
  static ɵfac: i0.ɵɵFactoryDeclaration<BaseSelect<any, any>, never>;
97
- static ɵdir: i0.ɵɵDirectiveDeclaration<BaseSelect<any, any>, never, never, { "size": { "alias": "size"; "required": false; }; "options": { "alias": "options"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "allowCreate": { "alias": "allowCreate"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "defaultFirstOption": { "alias": "defaultFirstOption"; "required": false; }; "useVirtual": { "alias": "useVirtual"; "required": false; }; "itemSize": { "alias": "itemSize"; "required": false; }; "maxItemLength": { "alias": "maxItemLength"; "required": false; }; "createFn": { "alias": "createFn"; "required": false; }; "filterFn": { "alias": "filterFn"; "required": false; }; "trackFn": { "alias": "trackFn"; "required": false; }; "labelFn": { "alias": "labelFn"; "required": false; }; }, { "filterChange": "filterChange"; "show": "show"; "hide": "hide"; }, ["inputItemTemplate", "contentTplOptions"], never, true, never>;
76
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaseSelect<any, any>, never, never, { "size": { "alias": "size"; "required": false; }; "filterable": { "alias": "filterable"; "required": false; }; "clearable": { "alias": "clearable"; "required": false; }; "filterFn": { "alias": "filterFn"; "required": false; }; "trackFn": { "alias": "trackFn"; "required": false; }; "labelFn": { "alias": "labelFn"; "required": false; }; "allowCreate": { "alias": "allowCreate"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "defaultFirstOption": { "alias": "defaultFirstOption"; "required": false; }; "lazy": { "alias": "lazy"; "required": false; }; }, { "filterChange": "filterChange"; "show": "show"; "hide": "hide"; }, ["optionContent", "contentOptions"], never, true, never>;
98
77
  static ngAcceptInputType_filterable: unknown;
99
78
  static ngAcceptInputType_clearable: unknown;
100
79
  static ngAcceptInputType_allowCreate: unknown;
@@ -1,9 +1,22 @@
1
+ import { ApplicationRef, ComponentFactoryResolver, Injector, OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';
1
2
  import * as i0 from "@angular/core";
2
3
  export declare class OptionGroupTitleDirective {
3
4
  static ɵfac: i0.ɵɵFactoryDeclaration<OptionGroupTitleDirective, never>;
4
5
  static ɵdir: i0.ɵɵDirectiveDeclaration<OptionGroupTitleDirective, "[auiOptionGroupTitle]", ["auiOptionGroupTitle"], {}, {}, never, never, true, never>;
5
6
  }
6
- export declare class OptionItemCustomDirective {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<OptionItemCustomDirective, never>;
8
- static ɵdir: i0.ɵɵDirectiveDeclaration<OptionItemCustomDirective, "[auiOptionItemCustom]", ["auiOptionItemCustom"], {}, {}, never, never, true, never>;
7
+ export declare class OptionContentDirective implements OnDestroy {
8
+ private readonly templateRef;
9
+ private readonly appRef;
10
+ private readonly viewContainerRef;
11
+ private readonly componentFactoryResolver;
12
+ private readonly injector;
13
+ private portal;
14
+ private outlet;
15
+ private readonly doc;
16
+ constructor(templateRef: TemplateRef<unknown>, appRef: ApplicationRef, viewContainerRef: ViewContainerRef, componentFactoryResolver: ComponentFactoryResolver, injector: Injector, document: any);
17
+ attach(context?: any): void;
18
+ detach(): void;
19
+ ngOnDestroy(): void;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<OptionContentDirective, never>;
21
+ static ɵdir: i0.ɵɵDirectiveDeclaration<OptionContentDirective, "*[auiOptionContent]", ["auiOptionContent"], {}, {}, never, never, true, never>;
9
22
  }
package/select/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
1
  export * from './helper-directives';
2
2
  export * from './multi-select/multi-select.component';
3
- export * from './option.component';
3
+ export * from './option/option.component';
4
4
  export * from './option-group/option-group.component';
5
- export * from './option-item/option-item.component';
6
5
  export * from './option-placeholder.component';
7
6
  export * from './select.component';
8
7
  export * from './select.module';
@@ -1,11 +1,21 @@
1
- import { AfterContentInit, ChangeDetectorRef, ElementRef, Renderer2 } from '@angular/core';
1
+ import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, Renderer2 } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { Bem } from '../../utils';
4
4
  import { BaseSelect } from '../base-select';
5
- import { DisplayOption, SelectAllStatus, SelectFilterOption, TagClassFn } from '../select.types';
5
+ import { OptionComponent } from '../option/option.component';
6
+ import { SelectAllStatus, SelectFilterOption, TagClassFn } from '../select.types';
6
7
  import * as i0 from "@angular/core";
7
- export declare class MultiSelectComponent<T = unknown> extends BaseSelect<T, T[]> implements AfterContentInit {
8
+ export declare class MultiSelectComponent<T = unknown> extends BaseSelect<T, T[]> implements AfterContentInit, AfterViewInit {
8
9
  private readonly renderer;
10
+ bem: Bem;
11
+ bemSelectAll: Bem;
12
+ selectedOptions$: Observable<Array<SelectFilterOption<T>>>;
13
+ selectAllStatus$: Observable<SelectAllStatus>;
14
+ selectAllStatus: SelectAllStatus;
15
+ hasEnabledOptions$: Observable<boolean>;
16
+ isMulti: boolean;
17
+ model: T[];
18
+ values$: import("rxjs").ReplaySubject<T[]>;
9
19
  tagClassFn: TagClassFn<T>;
10
20
  maxRowCount: number;
11
21
  customRowHeight: number;
@@ -14,40 +24,34 @@ export declare class MultiSelectComponent<T = unknown> extends BaseSelect<T, T[]
14
24
  inputValueMirror: ElementRef<HTMLElement>;
15
25
  get hostPosition(): string;
16
26
  get hostDisplay(): string;
27
+ inputValue: string;
28
+ hasDisabledOption: boolean;
17
29
  get rootClass(): string;
18
30
  get tagSize(): "medium" | "mini";
19
31
  get inputClass(): string;
20
32
  get displayClearBtn(): number;
21
33
  get maxHeight(): string;
22
- bem: Bem;
23
- bemSelectAll: Bem;
24
- selectedOptions$: Observable<Array<SelectFilterOption<T>>>;
25
- selectAllStatus$: Observable<SelectAllStatus>;
26
- selectAllStatus: SelectAllStatus;
27
- hasEnabledOptions$: Observable<boolean>;
28
- isMulti: boolean;
29
- model: T[];
30
- values$: import("rxjs").ReplaySubject<T[]>;
31
- inputValue: string;
32
- hasDisabledOption: boolean;
33
34
  private readonly withMaxRowCount;
34
35
  focused: boolean;
36
+ trackByValue: (_: number, item: SelectFilterOption<T>) => unknown;
35
37
  constructor(cdr: ChangeDetectorRef, renderer: Renderer2);
36
38
  ngAfterContentInit(): void;
39
+ ngAfterViewInit(): void;
37
40
  onVisibleOptions(visible: boolean): void;
38
41
  onInput(event: Event): void;
39
42
  onInputFocus(): void;
40
43
  onInputBlur(): void;
41
44
  onKeyDown(event: KeyboardEvent): void;
42
- selectOption(option: DisplayOption<T>): void;
45
+ selectOption(option: OptionComponent<T>): void;
43
46
  addValue(value: T): void;
44
47
  removeValue(value: T): void;
45
48
  clearValue(event: Event): void;
46
49
  onSelectAllClick(): void;
50
+ private includes;
47
51
  protected valueIn(v: T[]): T[];
48
52
  private resetInput;
49
53
  private setInputWidth;
50
54
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectComponent<any>, never>;
51
- static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent<any>, "aui-multi-select", never, { "tagClassFn": { "alias": "tagClassFn"; "required": false; }; "maxRowCount": { "alias": "maxRowCount"; "required": false; }; "customRowHeight": { "alias": "customRowHeight"; "required": false; }; "allowSelectAll": { "alias": "allowSelectAll"; "required": false; }; }, {}, never, ["[prefix]", "[suffix]", "aui-option-placeholder"], true, never>;
55
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiSelectComponent<any>, "aui-multi-select", never, { "tagClassFn": { "alias": "tagClassFn"; "required": false; }; "maxRowCount": { "alias": "maxRowCount"; "required": false; }; "customRowHeight": { "alias": "customRowHeight"; "required": false; }; "allowSelectAll": { "alias": "allowSelectAll"; "required": false; }; }, {}, never, ["*", "aui-option-placeholder"], true, never>;
52
56
  static ngAcceptInputType_allowSelectAll: unknown;
53
57
  }
@@ -0,0 +1,46 @@
1
+ import { ChangeDetectorRef, ElementRef, TemplateRef } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { ComponentSize } from '../../types';
4
+ import { Bem } from '../../utils';
5
+ import { BaseSelect } from '../base-select';
6
+ import * as i0 from "@angular/core";
7
+ export declare class OptionComponent<T> {
8
+ private readonly cdr;
9
+ bem: Bem;
10
+ private _disabled;
11
+ private _label;
12
+ private _labelContext;
13
+ private _value;
14
+ private readonly label$$;
15
+ private readonly labelContext$$;
16
+ private readonly value$$;
17
+ private readonly disabled$$;
18
+ get label(): string | TemplateRef<unknown>;
19
+ set label(val: string | TemplateRef<unknown>);
20
+ get labelContext(): unknown;
21
+ set labelContext(val: unknown);
22
+ get value(): T;
23
+ set value(val: T);
24
+ get disabled(): boolean;
25
+ set disabled(val: boolean | '');
26
+ isMulti: boolean;
27
+ elRef: ElementRef<HTMLDivElement>;
28
+ private readonly select;
29
+ selected: boolean;
30
+ visible: boolean;
31
+ size: ComponentSize;
32
+ focused: boolean;
33
+ value$: Observable<T>;
34
+ label$: Observable<string | TemplateRef<unknown>>;
35
+ labelContext$: Observable<unknown>;
36
+ disabled$: Observable<boolean>;
37
+ selected$: Observable<boolean>;
38
+ size$: Observable<ComponentSize>;
39
+ visible$: Observable<boolean>;
40
+ constructor(cdr: ChangeDetectorRef, select: BaseSelect<T>);
41
+ onClick(): void;
42
+ focus(): void;
43
+ blur(): void;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<OptionComponent<any>, never>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<OptionComponent<any>, "aui-option", never, { "label": { "alias": "label"; "required": false; }; "labelContext": { "alias": "labelContext"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, ["*"], true, never>;
46
+ }
@@ -1,10 +1,11 @@
1
- import { AfterContentInit, QueryList, ElementRef } from '@angular/core';
2
- import { OptionComponent } from '../option.component';
1
+ import { AfterContentInit, QueryList } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { OptionComponent } from '../option/option.component';
3
4
  import * as i0 from "@angular/core";
4
5
  export declare class OptionGroupComponent<T> implements AfterContentInit {
5
6
  options: QueryList<OptionComponent<T>>;
6
- groupTitle: ElementRef;
7
+ hasVisibleOption$: Observable<boolean>;
7
8
  ngAfterContentInit(): void;
8
9
  static ɵfac: i0.ɵɵFactoryDeclaration<OptionGroupComponent<any>, never>;
9
- static ɵcmp: i0.ɵɵComponentDeclaration<OptionGroupComponent<any>, "aui-option-group", never, {}, {}, ["groupTitle", "options"], ["[auiOptionGroupTitle]", "*"], true, never>;
10
+ static ɵcmp: i0.ɵɵComponentDeclaration<OptionGroupComponent<any>, "aui-option-group", never, {}, {}, ["options"], ["[auiOptionGroupTitle]", "*"], true, never>;
10
11
  }
@@ -2,7 +2,7 @@ import { AfterContentInit } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { InputComponent } from '../input';
4
4
  import { BaseSelect } from './base-select';
5
- import { OptionItemComponent } from './option-item/option-item.component';
5
+ import { OptionComponent } from './option/option.component';
6
6
  import { SelectOption } from './select.types';
7
7
  import * as i0 from "@angular/core";
8
8
  export declare class SelectComponent<T = unknown> extends BaseSelect<T> implements AfterContentInit {
@@ -16,8 +16,8 @@ export declare class SelectComponent<T = unknown> extends BaseSelect<T> implemen
16
16
  ngAfterContentInit(): void;
17
17
  onVisibleOptions(visible: boolean): void;
18
18
  protected valueIn(v: T): T;
19
- selectOption(option: OptionItemComponent<T>): void;
19
+ selectOption(option: OptionComponent<T>): void;
20
20
  clearValue(event: Event): void;
21
21
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent<any>, never>;
22
- static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent<any>, "aui-select", never, {}, {}, never, ["[prefix]", "[suffix]", "aui-option-placeholder"], true, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent<any>, "aui-select", never, {}, {}, never, ["*", "aui-option-placeholder"], true, never>;
23
23
  }
@@ -1,22 +1,27 @@
1
- import { OptionGroupTitleDirective } from './helper-directives';
1
+ import { OptionContentDirective, OptionGroupTitleDirective } from './helper-directives';
2
2
  import { MultiSelectComponent } from './multi-select/multi-select.component';
3
+ import { OptionComponent } from './option/option.component';
3
4
  import { OptionGroupComponent } from './option-group/option-group.component';
4
5
  import { OptionPlaceholderComponent } from './option-placeholder.component';
5
- import { OptionComponent } from './option.component';
6
6
  import { SelectComponent } from './select.component';
7
7
  import { IncludesDirective } from './validators';
8
8
  import * as i0 from "@angular/core";
9
- import * as i1 from "./select.component";
10
- import * as i2 from "./option.component";
11
- import * as i3 from "./option-item/option-item.component";
12
- import * as i4 from "./option-group/option-group.component";
13
- import * as i5 from "./option-placeholder.component";
14
- import * as i6 from "./multi-select/multi-select.component";
15
- import * as i7 from "./validators";
16
- import * as i8 from "./helper-directives";
9
+ import * as i1 from "@angular/common";
10
+ import * as i2 from "../input/input.module";
11
+ import * as i3 from "../i18n/i18n.module";
12
+ import * as i4 from "../icon/icon.module";
13
+ import * as i5 from "../tooltip/tooltip.module";
14
+ import * as i6 from "../tag/tag.module";
15
+ import * as i7 from "./select.component";
16
+ import * as i8 from "./option/option.component";
17
+ import * as i9 from "./option-group/option-group.component";
18
+ import * as i10 from "./option-placeholder.component";
19
+ import * as i11 from "./multi-select/multi-select.component";
20
+ import * as i12 from "./validators";
21
+ import * as i13 from "./helper-directives";
17
22
  export declare class SelectModule {
18
23
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectModule, never>;
19
- static ɵmod: i0.ɵɵNgModuleDeclaration<SelectModule, never, [typeof i1.SelectComponent, typeof i2.OptionComponent, typeof i3.OptionItemComponent, typeof i4.OptionGroupComponent, typeof i5.OptionPlaceholderComponent, typeof i6.MultiSelectComponent, typeof i7.IncludesDirective, typeof i8.OptionGroupTitleDirective, typeof i8.OptionItemCustomDirective], [typeof i1.SelectComponent, typeof i2.OptionComponent, typeof i3.OptionItemComponent, typeof i4.OptionGroupComponent, typeof i5.OptionPlaceholderComponent, typeof i6.MultiSelectComponent, typeof i7.IncludesDirective, typeof i8.OptionGroupTitleDirective, typeof i8.OptionItemCustomDirective]>;
24
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SelectModule, never, [typeof i1.CommonModule, typeof i2.InputModule, typeof i3.I18nModule, typeof i4.IconModule, typeof i5.TooltipModule, typeof i6.TagModule, typeof i7.SelectComponent, typeof i8.OptionComponent, typeof i9.OptionGroupComponent, typeof i10.OptionPlaceholderComponent, typeof i11.MultiSelectComponent, typeof i12.IncludesDirective, typeof i13.OptionGroupTitleDirective, typeof i13.OptionContentDirective], [typeof i7.SelectComponent, typeof i8.OptionComponent, typeof i9.OptionGroupComponent, typeof i10.OptionPlaceholderComponent, typeof i11.MultiSelectComponent, typeof i12.IncludesDirective, typeof i13.OptionGroupTitleDirective, typeof i13.OptionContentDirective]>;
20
25
  static ɵinj: i0.ɵɵInjectorDeclaration<SelectModule>;
21
26
  }
22
- export declare const SELECT_MODULE: readonly [typeof SelectComponent, typeof OptionComponent, typeof OptionGroupComponent, typeof OptionPlaceholderComponent, typeof MultiSelectComponent, typeof IncludesDirective, typeof OptionGroupTitleDirective];
27
+ export declare const SELECT_MODULE: readonly [typeof SelectComponent, typeof OptionComponent, typeof OptionGroupComponent, typeof OptionPlaceholderComponent, typeof MultiSelectComponent, typeof IncludesDirective, typeof OptionGroupTitleDirective, typeof OptionContentDirective];
@@ -1,20 +1,14 @@
1
- import { ElementRef, TemplateRef } from '@angular/core';
1
+ import { TemplateRef } from '@angular/core';
2
2
  export interface SelectOption {
3
- label?: string | TemplateRef<unknown>;
3
+ label: string | TemplateRef<unknown>;
4
4
  labelContext?: unknown;
5
5
  }
6
6
  export interface SelectFilterOption<T> extends SelectOption {
7
7
  disabled?: boolean;
8
8
  value: T;
9
9
  }
10
- export interface DisplayOption<T> extends SelectFilterOption<T> {
11
- selected?: boolean;
12
- groupTitle?: ElementRef;
13
- contentTemplate?: TemplateRef<any>;
14
- }
15
10
  export type OptionFilterFn<T> = (filter: string, option: SelectFilterOption<T>) => boolean;
16
11
  export type TrackFn<T, R = unknown> = (value: T) => R;
17
- export type CreateFn<T> = (input: string) => DisplayOption<T>;
18
12
  export type TagClassFn<V, T extends string | TemplateRef<unknown> = string | TemplateRef<unknown>> = (label: T, value: V) => string | string[] | Set<string> | {
19
13
  [className: string]: unknown;
20
14
  };
@@ -1,27 +0,0 @@
1
- import { ComponentType } from '@angular/cdk/portal';
2
- import { TemplateRef } from '@angular/core';
3
- import { Observable } from 'rxjs';
4
- export declare enum DrawerSize {
5
- Small = "small",
6
- Medium = "medium",
7
- Big = "big"
8
- }
9
- export declare abstract class DrawerRef<T = ComponentType<any>, R = any> {
10
- abstract afterClosed: Observable<R>;
11
- abstract afterOpen: Observable<void>;
12
- abstract dispose(result?: R): void;
13
- abstract open(): void;
14
- abstract componentInstance: T | null;
15
- abstract title?: string | TemplateRef<unknown>;
16
- abstract footer?: string | TemplateRef<unknown>;
17
- abstract size?: DrawerSize;
18
- abstract offsetY?: string;
19
- abstract visible?: boolean;
20
- abstract hideOnClickOutside?: boolean;
21
- abstract showClose?: boolean;
22
- abstract drawerClass?: string;
23
- abstract mask?: boolean;
24
- abstract maskClosable?: boolean;
25
- abstract width?: number;
26
- abstract divider?: boolean;
27
- }
@@ -1,9 +0,0 @@
1
- export var DrawerSize;
2
- (function (DrawerSize) {
3
- DrawerSize["Small"] = "small";
4
- DrawerSize["Medium"] = "medium";
5
- DrawerSize["Big"] = "big";
6
- })(DrawerSize || (DrawerSize = {}));
7
- export class DrawerRef {
8
- }
9
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZHJhd2VyLXJlZi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9kcmF3ZXIvY29tcG9uZW50L2RyYXdlci1yZWYudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSUEsTUFBTSxDQUFOLElBQVksVUFJWDtBQUpELFdBQVksVUFBVTtJQUNwQiw2QkFBZSxDQUFBO0lBQ2YsK0JBQWlCLENBQUE7SUFDakIseUJBQVcsQ0FBQTtBQUNiLENBQUMsRUFKVyxVQUFVLEtBQVYsVUFBVSxRQUlyQjtBQUVELE1BQU0sT0FBZ0IsU0FBUztDQW1COUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21wb25lbnRUeXBlIH0gZnJvbSAnQGFuZ3VsYXIvY2RrL3BvcnRhbCc7XG5pbXBvcnQgeyBUZW1wbGF0ZVJlZiB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuaW1wb3J0IHsgT2JzZXJ2YWJsZSB9IGZyb20gJ3J4anMnO1xuXG5leHBvcnQgZW51bSBEcmF3ZXJTaXplIHtcbiAgU21hbGwgPSAnc21hbGwnLFxuICBNZWRpdW0gPSAnbWVkaXVtJyxcbiAgQmlnID0gJ2JpZycsXG59XG5cbmV4cG9ydCBhYnN0cmFjdCBjbGFzcyBEcmF3ZXJSZWY8VCA9IENvbXBvbmVudFR5cGU8YW55PiwgUiA9IGFueT4ge1xuICBhYnN0cmFjdCBhZnRlckNsb3NlZDogT2JzZXJ2YWJsZTxSPjtcbiAgYWJzdHJhY3QgYWZ0ZXJPcGVuOiBPYnNlcnZhYmxlPHZvaWQ+O1xuICBhYnN0cmFjdCBkaXNwb3NlKHJlc3VsdD86IFIpOiB2b2lkO1xuICBhYnN0cmFjdCBvcGVuKCk6IHZvaWQ7XG4gIGFic3RyYWN0IGNvbXBvbmVudEluc3RhbmNlOiBUIHwgbnVsbDtcblxuICBhYnN0cmFjdCB0aXRsZT86IHN0cmluZyB8IFRlbXBsYXRlUmVmPHVua25vd24+O1xuICBhYnN0cmFjdCBmb290ZXI/OiBzdHJpbmcgfCBUZW1wbGF0ZVJlZjx1bmtub3duPjtcbiAgYWJzdHJhY3Qgc2l6ZT86IERyYXdlclNpemU7XG4gIGFic3RyYWN0IG9mZnNldFk/OiBzdHJpbmc7XG4gIGFic3RyYWN0IHZpc2libGU/OiBib29sZWFuO1xuICBhYnN0cmFjdCBoaWRlT25DbGlja091dHNpZGU/OiBib29sZWFuO1xuICBhYnN0cmFjdCBzaG93Q2xvc2U/OiBib29sZWFuO1xuICBhYnN0cmFjdCBkcmF3ZXJDbGFzcz86IHN0cmluZztcbiAgYWJzdHJhY3QgbWFzaz86IGJvb2xlYW47XG4gIGFic3RyYWN0IG1hc2tDbG9zYWJsZT86IGJvb2xlYW47XG4gIGFic3RyYWN0IHdpZHRoPzogbnVtYmVyO1xuICBhYnN0cmFjdCBkaXZpZGVyPzogYm9vbGVhbjtcbn1cbiJdfQ==
@@ -1,63 +0,0 @@
1
- import { DomPortal, PortalModule } from '@angular/cdk/portal';
2
- import { CommonModule } from '@angular/common';
3
- import { ChangeDetectionStrategy, Component, Inject, Input, ViewEncapsulation, forwardRef, HostBinding, } from '@angular/core';
4
- import { IconComponent } from '../../icon/icon.component';
5
- import { buildBem } from '../../utils';
6
- import { BaseSelect } from '../base-select';
7
- import * as i0 from "@angular/core";
8
- import * as i1 from "@angular/common";
9
- import * as i2 from "@angular/cdk/portal";
10
- import * as i3 from "../base-select";
11
- export class OptionItemComponent {
12
- select;
13
- label;
14
- value = null;
15
- disabled = false;
16
- labelContext = {};
17
- focused;
18
- selected;
19
- groupTitle;
20
- contentTemplate;
21
- bem = buildBem('aui-option');
22
- get groupTitlePortal() {
23
- return new DomPortal(this.groupTitle || '');
24
- }
25
- constructor(select) {
26
- this.select = select;
27
- }
28
- onClick() {
29
- if (this.disabled) {
30
- return;
31
- }
32
- this.select.onOptionClick(this);
33
- }
34
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: OptionItemComponent, deps: [{ token: forwardRef(() => BaseSelect) }], target: i0.ɵɵFactoryTarget.Component });
35
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.3", type: OptionItemComponent, isStandalone: true, selector: "aui-option-item", inputs: { label: "label", value: "value", disabled: "disabled", labelContext: "labelContext", focused: "focused", selected: "selected", groupTitle: "groupTitle", contentTemplate: "contentTemplate" }, host: { properties: { "class.is-group": "this.groupTitle" } }, ngImport: i0, template: "<div\n *ngIf=\"!groupTitle; else group\"\n [class]=\"bem.block(select.size$ | async)\"\n [class.isDisabled]=\"disabled\"\n [class.isSelected]=\"selected\"\n [class.isMulti]=\"select.isMulti\"\n [class.isFocused]=\"focused\"\n (click)=\"onClick()\"\n>\n <i\n *ngIf=\"select.isMulti\"\n class=\"aui-option__pointer\"\n >\n <aui-icon\n [hidden]=\"!selected\"\n icon=\"check\"\n ></aui-icon>\n </i>\n <ng-content></ng-content>\n</div>\n\n<ng-template #group>\n <div class=\"aui-option__group-item\">\n <ng-container *cdkPortalOutlet=\"groupTitlePortal\"></ng-container>\n </div>\n</ng-template>\n", styles: [".aui-option{padding:0 var(--aui-inline-padding-xs);color:rgb(var(--aui-color-main-text));font-weight:var(--aui-font-weight-normal);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.aui-option--large{padding:calc((var(--aui-inline-height-l) - var(--aui-line-height-l)) / 2);line-height:var(--aui-line-height-l);font-size:var(--aui-font-size-l)}.aui-option--medium{padding:calc((var(--aui-inline-height-m) - var(--aui-line-height-m)) / 2);line-height:var(--aui-line-height-m);font-size:var(--aui-font-size-m)}.aui-option--small{padding:calc((var(--aui-inline-height-s) - var(--aui-line-height-m)) / 2);line-height:var(--aui-line-height-m);font-size:var(--aui-font-size-m)}.aui-option--mini{padding:calc((var(--aui-inline-height-xs) - var(--aui-line-height-s)) / 2);line-height:var(--aui-line-height-s);font-size:var(--aui-font-size-s)}.aui-option:not(.isMulti).isSelected{color:rgb(var(--aui-color-primary));background-color:rgb(var(--aui-color-p-6))}.aui-option:hover,.aui-option.isFocused{background-color:rgb(var(--aui-color-p-6))}.aui-option.isDisabled{color:rgb(var(--aui-color-n-6));cursor:not-allowed}.aui-option__pointer{display:inline-flex;justify-content:center;align-items:center;flex-shrink:0;width:var(--aui-icon-size-m);height:var(--aui-icon-size-m);margin-right:var(--aui-spacing-m);border-radius:var(--aui-border-radius-m);border:1px solid rgb(var(--aui-color-n-7));color:#fff;background-color:rgb(var(--aui-color-main-bg));position:relative;vertical-align:middle;transition:all .3s ease}.aui-option.cdk-keyboard-focused .aui-option__pointer{border-color:rgb(var(--aui-color-primary))}:root .aui-option.cdk-keyboard-focused .aui-option__pointer{box-shadow:0 0 0 2px rgba(var(--aui-color-primary),.16)}html[aui-theme-mode=light] .aui-option.cdk-keyboard-focused .aui-option__pointer{box-shadow:0 0 0 2px rgba(var(--aui-color-primary),.16)}@media (prefers-color-scheme: dark){html[aui-theme-mode=system] .aui-option.cdk-keyboard-focused .aui-option__pointer{box-shadow:0 0 0 2px rgba(var(--aui-color-primary),.3)}}html[aui-theme-mode=dark] .aui-option.cdk-keyboard-focused .aui-option__pointer{box-shadow:0 0 0 2px rgba(var(--aui-color-primary),.3)}.aui-option.isSelected .aui-option__pointer{border-color:rgb(var(--aui-color-primary));background-color:rgb(var(--aui-color-primary))}.aui-option.isIndeterminate .aui-option__pointer{border-color:rgb(var(--aui-color-primary));background-color:rgb(var(--aui-color-main-bg))}.aui-option.isIndeterminate .aui-option__pointer:before{content:\"\";display:block;width:8px;height:8px;border-radius:1px;background-color:rgb(var(--aui-color-primary))}.aui-option.isSelected.isDisabled .aui-option__pointer{border-color:rgb(var(--aui-color-p-4));background-color:rgb(var(--aui-color-p-4))}.aui-option.isDisabled .aui-option__label{cursor:not-allowed}.aui-option.isDisabled .aui-option__pointer{border-color:rgb(var(--aui-color-n-7));background-color:rgb(var(--aui-color-n-8))}.aui-option:not(.isDisabled):hover .aui-option__pointer,.aui-option:not(.isDisabled).isFocused .aui-option__pointer{border-color:rgb(var(--aui-color-primary))}.aui-option__divider{display:block;width:100%;height:1px;background-color:rgb(var(--aui-color-divider))}aui-option-item.is-group:not(:first-of-type) .aui-option__group-item{margin-top:8px;padding-top:8px;border-top:1px solid rgb(var(--aui-color-n-8))}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "aui-icon", inputs: ["icon", "light", "dark", "link", "margin", "size", "color", "background", "backgroundColor"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
36
- }
37
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: OptionItemComponent, decorators: [{
38
- type: Component,
39
- args: [{ selector: 'aui-option-item', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, preserveWhitespaces: false, imports: [IconComponent, CommonModule, PortalModule], standalone: true, template: "<div\n *ngIf=\"!groupTitle; else group\"\n [class]=\"bem.block(select.size$ | async)\"\n [class.isDisabled]=\"disabled\"\n [class.isSelected]=\"selected\"\n [class.isMulti]=\"select.isMulti\"\n [class.isFocused]=\"focused\"\n (click)=\"onClick()\"\n>\n <i\n *ngIf=\"select.isMulti\"\n class=\"aui-option__pointer\"\n >\n <aui-icon\n [hidden]=\"!selected\"\n icon=\"check\"\n ></aui-icon>\n </i>\n <ng-content></ng-content>\n</div>\n\n<ng-template #group>\n <div class=\"aui-option__group-item\">\n <ng-container *cdkPortalOutlet=\"groupTitlePortal\"></ng-container>\n </div>\n</ng-template>\n", styles: [".aui-option{padding:0 var(--aui-inline-padding-xs);color:rgb(var(--aui-color-main-text));font-weight:var(--aui-font-weight-normal);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}.aui-option--large{padding:calc((var(--aui-inline-height-l) - var(--aui-line-height-l)) / 2);line-height:var(--aui-line-height-l);font-size:var(--aui-font-size-l)}.aui-option--medium{padding:calc((var(--aui-inline-height-m) - var(--aui-line-height-m)) / 2);line-height:var(--aui-line-height-m);font-size:var(--aui-font-size-m)}.aui-option--small{padding:calc((var(--aui-inline-height-s) - var(--aui-line-height-m)) / 2);line-height:var(--aui-line-height-m);font-size:var(--aui-font-size-m)}.aui-option--mini{padding:calc((var(--aui-inline-height-xs) - var(--aui-line-height-s)) / 2);line-height:var(--aui-line-height-s);font-size:var(--aui-font-size-s)}.aui-option:not(.isMulti).isSelected{color:rgb(var(--aui-color-primary));background-color:rgb(var(--aui-color-p-6))}.aui-option:hover,.aui-option.isFocused{background-color:rgb(var(--aui-color-p-6))}.aui-option.isDisabled{color:rgb(var(--aui-color-n-6));cursor:not-allowed}.aui-option__pointer{display:inline-flex;justify-content:center;align-items:center;flex-shrink:0;width:var(--aui-icon-size-m);height:var(--aui-icon-size-m);margin-right:var(--aui-spacing-m);border-radius:var(--aui-border-radius-m);border:1px solid rgb(var(--aui-color-n-7));color:#fff;background-color:rgb(var(--aui-color-main-bg));position:relative;vertical-align:middle;transition:all .3s ease}.aui-option.cdk-keyboard-focused .aui-option__pointer{border-color:rgb(var(--aui-color-primary))}:root .aui-option.cdk-keyboard-focused .aui-option__pointer{box-shadow:0 0 0 2px rgba(var(--aui-color-primary),.16)}html[aui-theme-mode=light] .aui-option.cdk-keyboard-focused .aui-option__pointer{box-shadow:0 0 0 2px rgba(var(--aui-color-primary),.16)}@media (prefers-color-scheme: dark){html[aui-theme-mode=system] .aui-option.cdk-keyboard-focused .aui-option__pointer{box-shadow:0 0 0 2px rgba(var(--aui-color-primary),.3)}}html[aui-theme-mode=dark] .aui-option.cdk-keyboard-focused .aui-option__pointer{box-shadow:0 0 0 2px rgba(var(--aui-color-primary),.3)}.aui-option.isSelected .aui-option__pointer{border-color:rgb(var(--aui-color-primary));background-color:rgb(var(--aui-color-primary))}.aui-option.isIndeterminate .aui-option__pointer{border-color:rgb(var(--aui-color-primary));background-color:rgb(var(--aui-color-main-bg))}.aui-option.isIndeterminate .aui-option__pointer:before{content:\"\";display:block;width:8px;height:8px;border-radius:1px;background-color:rgb(var(--aui-color-primary))}.aui-option.isSelected.isDisabled .aui-option__pointer{border-color:rgb(var(--aui-color-p-4));background-color:rgb(var(--aui-color-p-4))}.aui-option.isDisabled .aui-option__label{cursor:not-allowed}.aui-option.isDisabled .aui-option__pointer{border-color:rgb(var(--aui-color-n-7));background-color:rgb(var(--aui-color-n-8))}.aui-option:not(.isDisabled):hover .aui-option__pointer,.aui-option:not(.isDisabled).isFocused .aui-option__pointer{border-color:rgb(var(--aui-color-primary))}.aui-option__divider{display:block;width:100%;height:1px;background-color:rgb(var(--aui-color-divider))}aui-option-item.is-group:not(:first-of-type) .aui-option__group-item{margin-top:8px;padding-top:8px;border-top:1px solid rgb(var(--aui-color-n-8))}\n"] }]
40
- }], ctorParameters: function () { return [{ type: i3.BaseSelect, decorators: [{
41
- type: Inject,
42
- args: [forwardRef(() => BaseSelect)]
43
- }] }]; }, propDecorators: { label: [{
44
- type: Input
45
- }], value: [{
46
- type: Input
47
- }], disabled: [{
48
- type: Input
49
- }], labelContext: [{
50
- type: Input
51
- }], focused: [{
52
- type: Input
53
- }], selected: [{
54
- type: Input
55
- }], groupTitle: [{
56
- type: HostBinding,
57
- args: ['class.is-group']
58
- }, {
59
- type: Input
60
- }], contentTemplate: [{
61
- type: Input
62
- }] } });
63
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uLWl0ZW0uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vc3JjL3NlbGVjdC9vcHRpb24taXRlbS9vcHRpb24taXRlbS5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi9zcmMvc2VsZWN0L29wdGlvbi1pdGVtL29wdGlvbi1pdGVtLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsWUFBWSxFQUFFLE1BQU0scUJBQXFCLENBQUM7QUFDOUQsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBQy9DLE9BQU8sRUFDTCx1QkFBdUIsRUFDdkIsU0FBUyxFQUVULE1BQU0sRUFDTixLQUFLLEVBRUwsaUJBQWlCLEVBQ2pCLFVBQVUsRUFDVixXQUFXLEdBQ1osTUFBTSxlQUFlLENBQUM7QUFFdkIsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBQzFELE9BQU8sRUFBTyxRQUFRLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFDNUMsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGdCQUFnQixDQUFDOzs7OztBQWE1QyxNQUFNLE9BQU8sbUJBQW1CO0lBa0NuQjtJQWhDWCxLQUFLLENBQXdCO0lBRz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import { ChangeDetectionStrategy, Component, Input, TemplateRef, ViewChild, ViewEncapsulation, } from '@angular/core';
2
- import { Subject } from 'rxjs';
3
- import * as i0 from "@angular/core";
4
- export class OptionComponent {
5
- label;
6
- value = null;
7
- disabled = false;
8
- labelContext = {};
9
- contentTemplate;
10
- changes$ = new Subject();
11
- groupTitle;
12
- ngOnChanges() {
13
- this.changes$.next(null);
14
- }
15
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: OptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
16
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.3", type: OptionComponent, isStandalone: true, selector: "aui-option", inputs: { label: "label", value: "value", disabled: "disabled", labelContext: "labelContext" }, viewQueries: [{ propertyName: "contentTemplate", first: true, predicate: TemplateRef, descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
17
- <ng-template>
18
- <ng-content></ng-content>
19
- </ng-template>
20
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
21
- }
22
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.3", ngImport: i0, type: OptionComponent, decorators: [{
23
- type: Component,
24
- args: [{
25
- selector: 'aui-option',
26
- encapsulation: ViewEncapsulation.None,
27
- changeDetection: ChangeDetectionStrategy.OnPush,
28
- template: `
29
- <ng-template>
30
- <ng-content></ng-content>
31
- </ng-template>
32
- `,
33
- preserveWhitespaces: false,
34
- standalone: true,
35
- }]
36
- }], propDecorators: { label: [{
37
- type: Input
38
- }], value: [{
39
- type: Input
40
- }], disabled: [{
41
- type: Input
42
- }], labelContext: [{
43
- type: Input
44
- }], contentTemplate: [{
45
- type: ViewChild,
46
- args: [TemplateRef, { static: true }]
47
- }] } });
48
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoib3B0aW9uLmNvbXBvbmVudC5q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QElucHV0KCkgZGlzYWJsZWQgPSBmYWxzZTtcbiAgQElucHV0KCkgbGFiZWxDb250ZXh0OiB1bmtub3duID0ge307XG5cbiAgQFZpZXdDaGlsZChUZW1wbGF0ZVJlZiwgeyBzdGF0aWM6IHRydWUgfSkgY29udGVudFRlbXBsYXRlITogVGVtcGxhdGVSZWY8YW55PjtcblxuICBjaGFuZ2VzJCA9IG5ldyBTdWJqZWN0KCk7XG4gIC8vIOWcqCBvcHRpb24tZ3JvdXAg5Lit6LWL5YC877yM5Li76KaB55So5p2l5ZyoIGJhc2Utc2VsZWN0IOeahOa4hea0l+aVsOaNruS4reeUqOadpeW9kue6s+e7hOaVsOaNrlxuICBncm91cFRpdGxlOiBFbGVtZW50UmVmO1xuXG4gIG5nT25DaGFuZ2VzKCk6IHZvaWQge1xuICAgIHRoaXMuY2hhbmdlcyQubmV4dChudWxsKTtcbiAgfVxufVxuIl19
@@ -1,23 +0,0 @@
1
- import { DomPortal } from '@angular/cdk/portal';
2
- import { ElementRef, TemplateRef } from '@angular/core';
3
- import { Bem } from '../../utils';
4
- import { BaseSelect } from '../base-select';
5
- import { SelectOption } from '../select.types';
6
- import * as i0 from "@angular/core";
7
- export declare class OptionItemComponent<T> {
8
- readonly select: BaseSelect<T>;
9
- label: SelectOption['label'];
10
- value: T;
11
- disabled: boolean;
12
- labelContext: unknown;
13
- focused: boolean;
14
- selected: boolean;
15
- groupTitle: ElementRef;
16
- contentTemplate: TemplateRef<any>;
17
- bem: Bem;
18
- get groupTitlePortal(): DomPortal<any>;
19
- constructor(select: BaseSelect<T>);
20
- onClick(): void;
21
- static ɵfac: i0.ɵɵFactoryDeclaration<OptionItemComponent<any>, never>;
22
- static ɵcmp: i0.ɵɵComponentDeclaration<OptionItemComponent<any>, "aui-option-item", never, { "label": { "alias": "label"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "labelContext": { "alias": "labelContext"; "required": false; }; "focused": { "alias": "focused"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "groupTitle": { "alias": "groupTitle"; "required": false; }; "contentTemplate": { "alias": "contentTemplate"; "required": false; }; }, {}, never, ["*"], true, never>;
23
- }