@elderbyte/ngx-starter 16.2.11 → 16.3.0
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/_index.scss +4 -2
- package/esm2022/lib/components/forms/directives/elder-initial-value.directive.mjs +56 -29
- package/esm2022/lib/components/forms/search/elder-search-context-url-binding.directive.mjs +3 -3
- package/esm2022/lib/components/forms/search/elder-search-context.directive.mjs +26 -60
- package/esm2022/lib/components/forms/search/elder-search-input.directive.mjs +2 -2
- package/esm2022/lib/components/forms/search/search-context-orchestrator.mjs +55 -0
- package/esm2022/lib/components/select/elder-select-base.mjs +4 -1
- package/esm2022/lib/components/select/elder-select.module.mjs +11 -5
- package/esm2022/lib/components/select/multi/elder-multi-select-base.mjs +38 -4
- package/esm2022/lib/components/select/multi/elder-multi-select-chip-options/elder-multi-select-chip-options.component.mjs +281 -0
- package/esm2022/lib/components/select/multi/elder-multi-select-chip-options/select-option-chip-spec.mjs +15 -0
- package/esm2022/lib/components/select/multi/elder-multi-select-chips/elder-multi-select-chips.component.mjs +5 -50
- package/esm2022/lib/components/select/multi/elder-multi-select-chips/select-chip-spec.mjs +15 -2
- package/esm2022/lib/components/select/multi/elder-multi-select-form-field.mjs +8 -13
- package/esm2022/lib/components/select/multi/public_api.mjs +2 -1
- package/fesm2022/elderbyte-ngx-starter.mjs +475 -156
- package/fesm2022/elderbyte-ngx-starter.mjs.map +1 -1
- package/lib/components/forms/directives/elder-initial-value.directive.d.ts +11 -6
- package/lib/components/forms/search/elder-search-context.directive.d.ts +7 -17
- package/lib/components/forms/search/search-context-orchestrator.d.ts +29 -0
- package/lib/components/select/elder-select-base.d.ts +1 -0
- package/lib/components/select/elder-select.module.d.ts +26 -24
- package/lib/components/select/multi/elder-multi-select-base.d.ts +10 -0
- package/lib/components/select/multi/elder-multi-select-chip-options/elder-multi-select-chip-options.component.d.ts +102 -0
- package/lib/components/select/multi/elder-multi-select-chip-options/select-option-chip-spec.d.ts +10 -0
- package/lib/components/select/multi/elder-multi-select-chips/elder-multi-select-chips.component.d.ts +0 -10
- package/lib/components/select/multi/elder-multi-select-chips/select-chip-spec.d.ts +3 -0
- package/lib/components/select/multi/public_api.d.ts +1 -0
- package/package.json +1 -1
- package/src/lib/components/chips/_elder-chip-theme.scss +5 -2
- package/src/lib/components/select/multi/elder-multi-select-chip-options/elder-multi-select-chip-options.component.scss +79 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { OnDestroy } from
|
|
2
|
-
import { NgModel } from
|
|
1
|
+
import { OnDestroy } from "@angular/core";
|
|
2
|
+
import { NgModel } from "@angular/forms";
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* Search name adapter for input controls.
|
|
@@ -12,9 +12,9 @@ export declare class ElderInitialValueDirective implements OnDestroy {
|
|
|
12
12
|
* *
|
|
13
13
|
**************************************************************************/
|
|
14
14
|
private readonly log;
|
|
15
|
-
private
|
|
16
|
-
private
|
|
17
|
-
private readonly
|
|
15
|
+
private initialValue$;
|
|
16
|
+
private ngModelValue$;
|
|
17
|
+
private readonly destroy$;
|
|
18
18
|
private readonly initialDone$;
|
|
19
19
|
private isInitial;
|
|
20
20
|
/***************************************************************************
|
|
@@ -23,13 +23,18 @@ export declare class ElderInitialValueDirective implements OnDestroy {
|
|
|
23
23
|
* *
|
|
24
24
|
**************************************************************************/
|
|
25
25
|
constructor(ngModel: NgModel);
|
|
26
|
+
/***************************************************************************
|
|
27
|
+
* *
|
|
28
|
+
* Life Cycle *
|
|
29
|
+
* *
|
|
30
|
+
**************************************************************************/
|
|
26
31
|
/***************************************************************************
|
|
27
32
|
* *
|
|
28
33
|
* Properties *
|
|
29
34
|
* *
|
|
30
35
|
**************************************************************************/
|
|
31
36
|
get valueChanges$(): import("rxjs").Observable<any>;
|
|
32
|
-
|
|
37
|
+
applyInitialValue(value: any): void;
|
|
33
38
|
ngOnDestroy(): void;
|
|
34
39
|
/***************************************************************************
|
|
35
40
|
* *
|
|
@@ -4,6 +4,7 @@ import { SearchInput } from './model/search-input';
|
|
|
4
4
|
import { Filter } from '../../../common/data/filters/filter';
|
|
5
5
|
import { FilterContext } from '../../../common/data/filters/filter-context';
|
|
6
6
|
import { SearchInputState } from './model/search-input-state';
|
|
7
|
+
import SearchContextOrchestrator from "./search-context-orchestrator";
|
|
7
8
|
import * as i0 from "@angular/core";
|
|
8
9
|
/**
|
|
9
10
|
* The search container manages a group of search-inputs
|
|
@@ -15,15 +16,12 @@ export declare class ElderSearchContextDirective implements AfterViewInit, OnDes
|
|
|
15
16
|
* Fields *
|
|
16
17
|
* *
|
|
17
18
|
**************************************************************************/
|
|
18
|
-
private
|
|
19
|
-
private startFilters$;
|
|
19
|
+
private _forcedFilters$;
|
|
20
20
|
private readonly log;
|
|
21
21
|
private readonly destroy$;
|
|
22
|
-
private readonly _searchInputs
|
|
23
|
-
private readonly _searchStates
|
|
24
|
-
private
|
|
25
|
-
private readonly _initialFilters$;
|
|
26
|
-
private _filterContext;
|
|
22
|
+
private readonly _searchInputs$;
|
|
23
|
+
private readonly _searchStates$;
|
|
24
|
+
private _searchContextOrchestrator;
|
|
27
25
|
/***************************************************************************
|
|
28
26
|
* *
|
|
29
27
|
* Life Cycle *
|
|
@@ -47,21 +45,15 @@ export declare class ElderSearchContextDirective implements AfterViewInit, OnDes
|
|
|
47
45
|
*/
|
|
48
46
|
set forcedFilters(filters: Filter[]);
|
|
49
47
|
get forcedFilters(): Filter[];
|
|
50
|
-
set startFilters(filters: Filter[]);
|
|
51
48
|
get attributes(): Observable<SearchInput[]>;
|
|
52
49
|
get attributesSnapshot(): SearchInput[];
|
|
53
50
|
get states$(): Observable<SearchInputState[]>;
|
|
54
51
|
get statesSnapshot(): SearchInputState[];
|
|
52
|
+
get searchContextOrchestrator(): SearchContextOrchestrator;
|
|
55
53
|
/**
|
|
56
54
|
* Returns the current user touched attributes. (ignoring fallbacks)
|
|
57
55
|
*/
|
|
58
56
|
get userDefinedAttributes$(): Observable<SearchInputState[]>;
|
|
59
|
-
/**
|
|
60
|
-
* Returns the current active filters
|
|
61
|
-
*/
|
|
62
|
-
get filters$(): Observable<Filter[]>;
|
|
63
|
-
get initialFilters$(): Observable<Filter[]>;
|
|
64
|
-
get filtersSnapshot(): Filter[];
|
|
65
57
|
/***************************************************************************
|
|
66
58
|
* *
|
|
67
59
|
* Public API *
|
|
@@ -72,7 +64,6 @@ export declare class ElderSearchContextDirective implements AfterViewInit, OnDes
|
|
|
72
64
|
*/
|
|
73
65
|
register(searchInput: SearchInput): void;
|
|
74
66
|
reset(): void;
|
|
75
|
-
registerInitialFilters(filters: Filter[]): void;
|
|
76
67
|
/***************************************************************************
|
|
77
68
|
* *
|
|
78
69
|
* Private *
|
|
@@ -81,7 +72,6 @@ export declare class ElderSearchContextDirective implements AfterViewInit, OnDes
|
|
|
81
72
|
private subscribeInitialFilters;
|
|
82
73
|
private findFilterForInput;
|
|
83
74
|
private convertToFilters;
|
|
84
|
-
private applyFilters;
|
|
85
75
|
static ɵfac: i0.ɵɵFactoryDeclaration<ElderSearchContextDirective, never>;
|
|
86
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ElderSearchContextDirective, "[elderSearchContext]", ["elderSearchContext"], { "filterContext": { "alias": "elderSearchContext"; "required": false; }; "forcedFilters": { "alias": "forcedFilters"; "required": false; };
|
|
76
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ElderSearchContextDirective, "[elderSearchContext]", ["elderSearchContext"], { "filterContext": { "alias": "elderSearchContext"; "required": false; }; "forcedFilters": { "alias": "forcedFilters"; "required": false; }; }, {}, never, never, false, never>;
|
|
87
77
|
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { Filter } from "../../../common/data/filters/filter";
|
|
3
|
+
import { FilterContext } from "../../../common/data/filters/filter-context";
|
|
4
|
+
export default class SearchContextOrchestrator {
|
|
5
|
+
readonly filterContext: FilterContext;
|
|
6
|
+
private forcedFilters?;
|
|
7
|
+
private readonly initialFilterContext;
|
|
8
|
+
private readonly log;
|
|
9
|
+
/***************************************************************************
|
|
10
|
+
* *
|
|
11
|
+
* Constructor *
|
|
12
|
+
* *
|
|
13
|
+
**************************************************************************/
|
|
14
|
+
constructor(filterContext: FilterContext, forcedFilters?: Filter[]);
|
|
15
|
+
/***************************************************************************
|
|
16
|
+
* *
|
|
17
|
+
* Properties *
|
|
18
|
+
* *
|
|
19
|
+
**************************************************************************/
|
|
20
|
+
get initialFilters$(): Observable<Filter[]>;
|
|
21
|
+
get filters(): Observable<Filter[]>;
|
|
22
|
+
/***************************************************************************
|
|
23
|
+
* *
|
|
24
|
+
* Public Api *
|
|
25
|
+
* *
|
|
26
|
+
**************************************************************************/
|
|
27
|
+
addInitialFilters(filters: Filter[]): void;
|
|
28
|
+
applyFilters(userFilters: Filter[]): void;
|
|
29
|
+
}
|
|
@@ -104,6 +104,7 @@ export declare abstract class ElderSelectBase<TId, TEntity, TValue> extends Elde
|
|
|
104
104
|
set filters(filters: Filter[]);
|
|
105
105
|
get filters(): Filter[];
|
|
106
106
|
set dataSource(source: IDataSource<TEntity>);
|
|
107
|
+
get dataSource(): IDataSource<TEntity>;
|
|
107
108
|
set data(data: Array<TEntity> | IDataContext<TEntity>);
|
|
108
109
|
set dataContext(data: IDataContext<TEntity>);
|
|
109
110
|
get dataContext(): IDataContext<TEntity>;
|
|
@@ -9,29 +9,30 @@ import * as i7 from "./multi/elder-multi-select-chips/elder-multi-select-chips.c
|
|
|
9
9
|
import * as i8 from "./elder-select-chip.directive";
|
|
10
10
|
import * as i9 from "./auto/elder-auto-select-first.directive";
|
|
11
11
|
import * as i10 from "./single/elder-clear-select.directive";
|
|
12
|
-
import * as i11 from "
|
|
13
|
-
import * as i12 from "@angular/
|
|
14
|
-
import * as i13 from "@angular/
|
|
15
|
-
import * as i14 from "@angular/material/
|
|
16
|
-
import * as i15 from "@angular/material/
|
|
17
|
-
import * as i16 from "@angular/material/
|
|
18
|
-
import * as i17 from "@angular/material/
|
|
19
|
-
import * as i18 from "@angular/material/
|
|
20
|
-
import * as i19 from "@angular/material/
|
|
21
|
-
import * as i20 from "@angular/material/
|
|
22
|
-
import * as i21 from "@angular/material/
|
|
23
|
-
import * as i22 from "@angular/material/progress-
|
|
24
|
-
import * as i23 from "@angular/material/
|
|
25
|
-
import * as i24 from "@angular/material/
|
|
26
|
-
import * as i25 from "@angular/
|
|
27
|
-
import * as i26 from "@
|
|
28
|
-
import * as i27 from "
|
|
29
|
-
import * as i28 from "../
|
|
30
|
-
import * as i29 from "../
|
|
31
|
-
import * as i30 from "../
|
|
32
|
-
import * as i31 from "
|
|
33
|
-
import * as i32 from "
|
|
34
|
-
import * as i33 from "../
|
|
12
|
+
import * as i11 from "./multi/elder-multi-select-chip-options/elder-multi-select-chip-options.component";
|
|
13
|
+
import * as i12 from "@angular/common";
|
|
14
|
+
import * as i13 from "@angular/forms";
|
|
15
|
+
import * as i14 from "@angular/material/form-field";
|
|
16
|
+
import * as i15 from "@angular/material/icon";
|
|
17
|
+
import * as i16 from "@angular/material/select";
|
|
18
|
+
import * as i17 from "@angular/material/dialog";
|
|
19
|
+
import * as i18 from "@angular/material/button";
|
|
20
|
+
import * as i19 from "@angular/material/input";
|
|
21
|
+
import * as i20 from "@angular/material/autocomplete";
|
|
22
|
+
import * as i21 from "@angular/material/toolbar";
|
|
23
|
+
import * as i22 from "@angular/material/progress-bar";
|
|
24
|
+
import * as i23 from "@angular/material/progress-spinner";
|
|
25
|
+
import * as i24 from "@angular/material/chips";
|
|
26
|
+
import * as i25 from "@angular/material/tooltip";
|
|
27
|
+
import * as i26 from "@angular/cdk/drag-drop";
|
|
28
|
+
import * as i27 from "@ngx-translate/core";
|
|
29
|
+
import * as i28 from "../forms/directives/elder-forms-directives.module";
|
|
30
|
+
import * as i29 from "../data-view/table/elder-table.module";
|
|
31
|
+
import * as i30 from "../infinitescroll/elder-infinite-scroll.module";
|
|
32
|
+
import * as i31 from "../input/autocomplete/elder-autocomplete.module";
|
|
33
|
+
import * as i32 from "../../pipes/elder-pipes.module";
|
|
34
|
+
import * as i33 from "../theme/elder-theme.module";
|
|
35
|
+
import * as i34 from "../chips/elder-chips.module";
|
|
35
36
|
export { ElderSelectValueDirective } from './elder-select-value.directive';
|
|
36
37
|
export * from './elder-select-chip.directive';
|
|
37
38
|
export { ElderSelectOnTabDirective } from './elder-select-on-tab.directive';
|
|
@@ -41,10 +42,11 @@ export { SelectionModelPopupDirective } from './popup/selection-model-popup.dire
|
|
|
41
42
|
export { ElderSelectionPopupTriggerAdapterDirective } from './popup/selection-model-popup-trigger-adapter.directive';
|
|
42
43
|
export { ElderMultiSelectBase } from './multi/elder-multi-select-base';
|
|
43
44
|
export { ElderMultiSelectChipsComponent } from './multi/elder-multi-select-chips/elder-multi-select-chips.component';
|
|
45
|
+
export { ElderMultiSelectChipOptionsComponent } from './multi/elder-multi-select-chip-options/elder-multi-select-chip-options.component';
|
|
44
46
|
export { ElderAutoSelectFirstDirective } from './auto/elder-auto-select-first.directive';
|
|
45
47
|
export { ElderClearSelectDirective } from './single/elder-clear-select.directive';
|
|
46
48
|
export declare class ElderSelectModule {
|
|
47
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<ElderSelectModule, never>;
|
|
48
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<ElderSelectModule, [typeof i1.ElderSelectComponent, typeof i2.ElderSelectValueDirective, typeof i3.TemplatedSelectionDialogComponent, typeof i4.SelectionModelPopupDirective, typeof i5.ElderSelectionPopupTriggerAdapterDirective, typeof i6.ElderSelectOnTabDirective, typeof i7.ElderMultiSelectChipsComponent, typeof i8.ElderSelectChipDirective, typeof i8.ElderSelectChipAvatarDirective, typeof i9.ElderAutoSelectFirstDirective, typeof i10.ElderClearSelectDirective, typeof i8.ElderSelectCustomInputDirective], [typeof
|
|
50
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<ElderSelectModule, [typeof i1.ElderSelectComponent, typeof i2.ElderSelectValueDirective, typeof i3.TemplatedSelectionDialogComponent, typeof i4.SelectionModelPopupDirective, typeof i5.ElderSelectionPopupTriggerAdapterDirective, typeof i6.ElderSelectOnTabDirective, typeof i7.ElderMultiSelectChipsComponent, typeof i8.ElderSelectChipDirective, typeof i8.ElderSelectChipAvatarDirective, typeof i9.ElderAutoSelectFirstDirective, typeof i10.ElderClearSelectDirective, typeof i8.ElderSelectCustomInputDirective, typeof i11.ElderMultiSelectChipOptionsComponent], [typeof i12.CommonModule, typeof i13.FormsModule, typeof i13.ReactiveFormsModule, typeof i14.MatFormFieldModule, typeof i15.MatIconModule, typeof i16.MatSelectModule, typeof i17.MatDialogModule, typeof i18.MatButtonModule, typeof i19.MatInputModule, typeof i20.MatAutocompleteModule, typeof i21.MatToolbarModule, typeof i22.MatProgressBarModule, typeof i23.MatProgressSpinnerModule, typeof i24.MatChipsModule, typeof i25.MatTooltipModule, typeof i26.CdkDropList, typeof i26.CdkDrag, typeof i27.TranslateModule, typeof i28.ElderFormsDirectivesModule, typeof i29.ElderTableModule, typeof i30.ElderInfiniteScrollModule, typeof i31.ElderAutocompleteModule, typeof i32.ElderPipesModule, typeof i33.ElderThemeModule, typeof i34.ElderChipsModule], [typeof i1.ElderSelectComponent, typeof i2.ElderSelectValueDirective, typeof i3.TemplatedSelectionDialogComponent, typeof i4.SelectionModelPopupDirective, typeof i5.ElderSelectionPopupTriggerAdapterDirective, typeof i7.ElderMultiSelectChipsComponent, typeof i8.ElderSelectChipDirective, typeof i8.ElderSelectChipAvatarDirective, typeof i9.ElderAutoSelectFirstDirective, typeof i10.ElderClearSelectDirective, typeof i8.ElderSelectCustomInputDirective, typeof i11.ElderMultiSelectChipOptionsComponent]>;
|
|
49
51
|
static ɵinj: i0.ɵɵInjectorDeclaration<ElderSelectModule>;
|
|
50
52
|
}
|
|
@@ -58,6 +58,16 @@ export declare abstract class ElderMultiSelectBase<TId, TEntity, TValue> extends
|
|
|
58
58
|
**************************************************************************/
|
|
59
59
|
protected constructor(zone: NgZone, hostRef: ElementRef, controlType: string, focusMonitor: FocusMonitor, translateService: TranslateService, dialogService: ElderDialogService, ngControl?: NgControl);
|
|
60
60
|
private awaitEntitiesWithId;
|
|
61
|
+
/***************************************************************************
|
|
62
|
+
* *
|
|
63
|
+
* Host Bindings *
|
|
64
|
+
* *
|
|
65
|
+
**************************************************************************/
|
|
66
|
+
get hostClass(): string;
|
|
67
|
+
get disabledClass(): boolean;
|
|
68
|
+
get errorStateClass(): boolean;
|
|
69
|
+
get requiredClass(): boolean;
|
|
70
|
+
get emptyClass(): boolean;
|
|
61
71
|
/***************************************************************************
|
|
62
72
|
* *
|
|
63
73
|
* Properties *
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { ElementRef, NgZone, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ElderMultiSelectBase } from '../elder-multi-select-base';
|
|
3
|
+
import { FocusMonitor } from '@angular/cdk/a11y';
|
|
4
|
+
import { TranslateService } from '@ngx-translate/core';
|
|
5
|
+
import { ElderDialogService } from '../../../dialogs/elder-dialog.service';
|
|
6
|
+
import { NgControl } from '@angular/forms';
|
|
7
|
+
import { Observable } from 'rxjs';
|
|
8
|
+
import { ChipAvatarSpec, ChipColorSpec, TrailingSpec } from '../elder-multi-select-chips/select-chip-spec';
|
|
9
|
+
import { IDataContext } from '../../../../common/data/data-context/data-context';
|
|
10
|
+
import { SelectOptionChipSpec } from './select-option-chip-spec';
|
|
11
|
+
import { MatChipListbox, MatChipSelectionChange } from '@angular/material/chips';
|
|
12
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
13
|
+
import * as i0 from "@angular/core";
|
|
14
|
+
declare class ChipOptionModel<T> {
|
|
15
|
+
readonly value: T;
|
|
16
|
+
readonly displayText: string;
|
|
17
|
+
readonly colorSpec: ChipColorSpec;
|
|
18
|
+
readonly locked: boolean;
|
|
19
|
+
readonly avatarSpec: ChipAvatarSpec;
|
|
20
|
+
readonly trailingSpec: TrailingSpec;
|
|
21
|
+
readonly selected: boolean;
|
|
22
|
+
constructor(value: T, displayText: string, colorSpec: ChipColorSpec, locked: boolean, avatarSpec: ChipAvatarSpec, trailingSpec: TrailingSpec, selected: boolean);
|
|
23
|
+
}
|
|
24
|
+
interface TemplateWrapper {
|
|
25
|
+
chip: TemplateRef<any>;
|
|
26
|
+
avatar: TemplateRef<any>;
|
|
27
|
+
}
|
|
28
|
+
export declare class ElderMultiSelectChipOptionsComponent<TId = any, TEntity = any, TValue = any> extends ElderMultiSelectBase<TId, TEntity, TValue> {
|
|
29
|
+
/***************************************************************************
|
|
30
|
+
* *
|
|
31
|
+
* Fields *
|
|
32
|
+
* *
|
|
33
|
+
**************************************************************************/
|
|
34
|
+
private readonly log;
|
|
35
|
+
readonly templates$: Observable<TemplateWrapper>;
|
|
36
|
+
private readonly chipTemplate$;
|
|
37
|
+
private readonly chipAvatarTemplate$;
|
|
38
|
+
readonly selectChips$: Observable<ChipOptionModel<TEntity>[]>;
|
|
39
|
+
defaultChipSpec: SelectOptionChipSpec;
|
|
40
|
+
/**
|
|
41
|
+
* Allows to customize each chip individually (Color, Removable, Avatar).
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
chipSpecFn: (e: TEntity) => SelectOptionChipSpec;
|
|
45
|
+
stacked: boolean;
|
|
46
|
+
private _multiple;
|
|
47
|
+
_listBox: MatChipListbox;
|
|
48
|
+
/***************************************************************************
|
|
49
|
+
* *
|
|
50
|
+
* Constructor *
|
|
51
|
+
* *
|
|
52
|
+
**************************************************************************/
|
|
53
|
+
constructor(hostRef: ElementRef, zone: NgZone, focusMonitor: FocusMonitor, translateService: TranslateService, dialogService: ElderDialogService, ngControl: NgControl);
|
|
54
|
+
/***************************************************************************
|
|
55
|
+
* *
|
|
56
|
+
* Properties *
|
|
57
|
+
* *
|
|
58
|
+
**************************************************************************/
|
|
59
|
+
set multiple(val: BooleanInput);
|
|
60
|
+
get multiple(): boolean;
|
|
61
|
+
set chipTemplateQuery(template: TemplateRef<any>);
|
|
62
|
+
set chipTemplate(template: TemplateRef<any>);
|
|
63
|
+
get chipTemplate(): TemplateRef<any>;
|
|
64
|
+
set chipAvatarTemplateQuery(template: TemplateRef<any>);
|
|
65
|
+
set chipAvatarTemplate(template: TemplateRef<any>);
|
|
66
|
+
get chipAvatarTemplate(): TemplateRef<any>;
|
|
67
|
+
get shouldLabelFloat(): boolean;
|
|
68
|
+
/***************************************************************************
|
|
69
|
+
* *
|
|
70
|
+
* Public API *
|
|
71
|
+
* *
|
|
72
|
+
**************************************************************************/
|
|
73
|
+
selectionChanged(changeEvent: MatChipSelectionChange, entity: TEntity): void;
|
|
74
|
+
resolveChipValue(e1: TEntity): any;
|
|
75
|
+
focus(options?: FocusOptions): void;
|
|
76
|
+
blur(): void;
|
|
77
|
+
/***************************************************************************
|
|
78
|
+
* *
|
|
79
|
+
* Protected API *
|
|
80
|
+
* *
|
|
81
|
+
**************************************************************************/
|
|
82
|
+
/**
|
|
83
|
+
* Automatically start DC if not yet started
|
|
84
|
+
* @param data
|
|
85
|
+
* @protected
|
|
86
|
+
*/
|
|
87
|
+
protected onDataContextChanged(data: IDataContext<TEntity>): void;
|
|
88
|
+
/***************************************************************************
|
|
89
|
+
* *
|
|
90
|
+
* Private methods *
|
|
91
|
+
* *
|
|
92
|
+
**************************************************************************/
|
|
93
|
+
private selectEntity;
|
|
94
|
+
private isEntityIdSelected;
|
|
95
|
+
private buildChipModelsOrFallback;
|
|
96
|
+
private buildChipFallbackModels;
|
|
97
|
+
private buildChipModels;
|
|
98
|
+
private buildChipBySpec;
|
|
99
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ElderMultiSelectChipOptionsComponent<any, any, any>, [null, null, null, null, null, { optional: true; self: true; }]>;
|
|
100
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ElderMultiSelectChipOptionsComponent<any, any, any>, "elder-multi-select-chip-options", never, { "defaultChipSpec": { "alias": "defaultChipSpec"; "required": false; }; "chipSpecFn": { "alias": "chipSpecFn"; "required": false; }; "stacked": { "alias": "stacked"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "chipTemplate": { "alias": "chipTemplate"; "required": false; }; "chipAvatarTemplate": { "alias": "chipAvatarTemplate"; "required": false; }; }, {}, ["chipTemplateQuery", "chipAvatarTemplateQuery"], never, false, never>;
|
|
101
|
+
}
|
|
102
|
+
export {};
|
package/lib/components/select/multi/elder-multi-select-chip-options/select-option-chip-spec.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChipAvatarSpec, ChipColorSpec, TrailingSpec } from '../elder-multi-select-chips/select-chip-spec';
|
|
2
|
+
export interface SelectOptionChipSpec {
|
|
3
|
+
colorSpec?: ChipColorSpec;
|
|
4
|
+
locked?: boolean;
|
|
5
|
+
avatarSpec?: ChipAvatarSpec;
|
|
6
|
+
trailingSpec?: TrailingSpec;
|
|
7
|
+
}
|
|
8
|
+
export declare class SelectOptionChipSpecUtil {
|
|
9
|
+
static readonly DefaultChipSpec: SelectOptionChipSpec;
|
|
10
|
+
}
|
package/lib/components/select/multi/elder-multi-select-chips/elder-multi-select-chips.component.d.ts
CHANGED
|
@@ -53,16 +53,6 @@ export declare class ElderMultiSelectChipsComponent<TId = any, TEntity = any, TV
|
|
|
53
53
|
* *
|
|
54
54
|
**************************************************************************/
|
|
55
55
|
constructor(hostRef: ElementRef, zone: NgZone, focusMonitor: FocusMonitor, translateService: TranslateService, dialogService: ElderDialogService, ngControl: NgControl);
|
|
56
|
-
/***************************************************************************
|
|
57
|
-
* *
|
|
58
|
-
* Host Bindings *
|
|
59
|
-
* *
|
|
60
|
-
**************************************************************************/
|
|
61
|
-
get hostClass(): string;
|
|
62
|
-
get disabledClass(): boolean;
|
|
63
|
-
get errorStateClass(): boolean;
|
|
64
|
-
get requiredClass(): boolean;
|
|
65
|
-
get emptyClass(): boolean;
|
|
66
56
|
/***************************************************************************
|
|
67
57
|
* *
|
|
68
58
|
* Properties *
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ThemePalette } from '@angular/material/core';
|
|
2
2
|
import { ElderLevelColor, ElderStateColor } from '../../../chips/elder-chip-label.directive';
|
|
3
|
+
export declare class SelectChipSpecUtil {
|
|
4
|
+
static readonly DefaultChipSpec: SelectChipSpec;
|
|
5
|
+
}
|
|
3
6
|
export interface SelectChipSpec {
|
|
4
7
|
colorSpec?: ChipColorSpec;
|
|
5
8
|
removable?: boolean;
|
package/package.json
CHANGED
|
@@ -26,11 +26,13 @@ $level-critical: rgb(255, 0, 0);
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
|
|
29
30
|
@mixin _theme_color_chip($colorPalette){
|
|
30
31
|
&.legacy {
|
|
31
32
|
background-color: mat.get-color-from-palette($colorPalette, default);
|
|
32
33
|
.mat-mdc-chip-action-label,
|
|
33
|
-
.mat-mdc-chip-avatar
|
|
34
|
+
.mat-mdc-chip-avatar,
|
|
35
|
+
.mdc-evolution-chip__checkmark {
|
|
34
36
|
color: mat.get-color-from-palette($colorPalette, default-contrast);
|
|
35
37
|
}
|
|
36
38
|
}
|
|
@@ -38,7 +40,8 @@ $level-critical: rgb(255, 0, 0);
|
|
|
38
40
|
background-color: mat.get-color-from-palette($colorPalette, default, 0.2);
|
|
39
41
|
border-color: mat.get-color-from-palette($colorPalette);
|
|
40
42
|
.mat-mdc-chip-action-label,
|
|
41
|
-
.mat-mdc-chip-avatar
|
|
43
|
+
.mat-mdc-chip-avatar,
|
|
44
|
+
.mdc-evolution-chip__checkmark {
|
|
42
45
|
color: mat.get-color-from-palette($colorPalette);
|
|
43
46
|
}
|
|
44
47
|
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@use 'sass:map';
|
|
2
|
+
@use '@angular/material' as mat;
|
|
3
|
+
@use '../../../../../../theming/elder-typography-utils' as elder-typography;
|
|
4
|
+
@use '../../elder-select-base' as elder-select-base;
|
|
5
|
+
|
|
6
|
+
@mixin typography($typography-config) {
|
|
7
|
+
$config: mat.private-typography-to-2014-config($typography-config);
|
|
8
|
+
// The unit-less line-height from the font config.
|
|
9
|
+
$line-height: mat.line-height($config, input);
|
|
10
|
+
$font-size: mat.font-size($config, input);
|
|
11
|
+
$line-height-em: elder-typography.coerce-unitless-to-em($line-height);
|
|
12
|
+
|
|
13
|
+
@include elder-select-base.typography($typography-config);
|
|
14
|
+
|
|
15
|
+
.elder-multi-select {
|
|
16
|
+
font-family: mat.font-family($config);
|
|
17
|
+
|
|
18
|
+
.elder-select-input {
|
|
19
|
+
height: $line-height-em
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.elder-prefix-icon {
|
|
23
|
+
margin-left: 3px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.elder-chip-input {
|
|
27
|
+
flex: 1 0 auto;
|
|
28
|
+
padding-left: 8px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.elder-chip-input-select {
|
|
32
|
+
flex: 1 0 140px;
|
|
33
|
+
max-width: 100%;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.elder-browse-icon {
|
|
37
|
+
margin-right: 4px;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@mixin theme($config-or-theme) {
|
|
43
|
+
$color: mat.get-color-config($config-or-theme);
|
|
44
|
+
$typography: mat.get-typography-config($config-or-theme);
|
|
45
|
+
|
|
46
|
+
// If no actual typography configuration has been specified, create a default one.
|
|
47
|
+
@if not $typography {
|
|
48
|
+
$typography: mat.define-typography-config();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
@if $color != null {
|
|
52
|
+
@include elder-select-base.color($color);
|
|
53
|
+
@include _chip_color($config-or-theme)
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@if $typography != null {
|
|
57
|
+
@include typography($typography);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@mixin _chip_color($theme){
|
|
62
|
+
$primary: map-get($theme, primary);
|
|
63
|
+
$accent: map-get($theme, accent);
|
|
64
|
+
$warn: map-get($theme, warn);
|
|
65
|
+
$background: map-get($theme, background);
|
|
66
|
+
$foreground: map-get($theme, foreground);
|
|
67
|
+
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.elder-chip-text {
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
text-overflow: ellipsis;
|
|
73
|
+
white-space: nowrap;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.elder-trailing-icon {
|
|
77
|
+
color: var(--mdc-chip-with-trailing-icon-trailing-icon-color);
|
|
78
|
+
opacity: 0.54;
|
|
79
|
+
}
|