@ethlete/cdk 3.19.2 → 3.20.1
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/CHANGELOG.md +12 -0
- package/esm2022/lib/components/forms/components/select/components/combobox/components/combobox/combobox.component.mjs +9 -3
- package/esm2022/lib/components/forms/components/select/components/combobox/directives/combobox/combobox.directive.mjs +66 -2
- package/esm2022/lib/components/forms/components/select/components/combobox/partials/combobox-body/combobox-body.component.mjs +8 -4
- package/esm2022/lib/components/forms/components/select/components/combobox/partials/combobox-option/combobox-option.component.mjs +13 -5
- package/esm2022/lib/components/forms/components/select/components/select/directives/select/select.directive.mjs +1 -1
- package/esm2022/lib/components/forms/components/select/components/select/directives/select-option/select-option.directive.mjs +6 -2
- package/fesm2022/ethlete-cdk.mjs +95 -9
- package/fesm2022/ethlete-cdk.mjs.map +1 -1
- package/lib/components/forms/components/select/components/combobox/components/combobox/combobox.component.d.ts +1 -1
- package/lib/components/forms/components/select/components/combobox/directives/combobox/combobox.directive.d.ts +31 -3
- package/lib/components/forms/components/select/components/combobox/partials/combobox-body/combobox-body.component.d.ts +3 -2
- package/lib/components/forms/components/select/components/combobox/partials/combobox-option/combobox-option.component.d.ts +4 -0
- package/lib/components/forms/components/select/components/select/directives/select/select.directive.d.ts +1 -1
- package/lib/components/forms/components/select/components/select/directives/select-option/select-option.directive.d.ts +1 -0
- package/package.json +2 -2
|
@@ -8,5 +8,5 @@ export declare class ComboboxComponent extends DecoratedInputBase {
|
|
|
8
8
|
protected readonly combobox: ComboboxDirective;
|
|
9
9
|
constructor();
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComboboxComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ComboboxComponent, "et-combobox", never, {}, {}, never, ["[etInputPrefix]", "[etInputSuffix]", "*"], true, [{ directive: typeof i1.AnimatedOverlayDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.InputDirective; inputs: { "placeholder": "placeholder"; }; outputs: {}; }, { directive: typeof i3.ComboboxDirective; inputs: { "options": "options"; "initialValue": "initialValue"; "filterInternal": "filterInternal"; "loading": "loading"; "error": "error"; "emptyText": "emptyText"; "placeholder": "placeholder"; "multiple": "multiple"; "bindLabel": "bindLabel"; "bindValue": "bindValue"; "allowCustomValues": "allowCustomValues"; "selectedOptionComponent": "selectedOptionComponent"; "optionComponent": "optionComponent"; "bodyErrorComponent": "bodyErrorComponent"; "bodyLoadingComponent": "bodyLoadingComponent"; "bodyEmptyComponent": "bodyEmptyComponent"; "bodyMoreItemsHintComponent": "bodyMoreItemsHintComponent"; "showBodyMoreItemsHint": "showBodyMoreItemsHint"; "bodyEmptyText": "bodyEmptyText"; "bodyMoreItemsHintText": "bodyMoreItemsHintText"; }; outputs: { "filterChange": "filterChange"; }; }]>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComboboxComponent, "et-combobox", never, {}, {}, never, ["[etInputPrefix]", "[etInputSuffix]", "*"], true, [{ directive: typeof i1.AnimatedOverlayDirective; inputs: {}; outputs: {}; }, { directive: typeof i2.InputDirective; inputs: { "placeholder": "placeholder"; }; outputs: {}; }, { directive: typeof i3.ComboboxDirective; inputs: { "options": "options"; "initialValue": "initialValue"; "filterInternal": "filterInternal"; "loading": "loading"; "error": "error"; "emptyText": "emptyText"; "placeholder": "placeholder"; "multiple": "multiple"; "bindLabel": "bindLabel"; "bindValue": "bindValue"; "allowCustomValues": "allowCustomValues"; "selectedOptionComponent": "selectedOptionComponent"; "optionComponent": "optionComponent"; "bodyErrorComponent": "bodyErrorComponent"; "bodyLoadingComponent": "bodyLoadingComponent"; "bodyEmptyComponent": "bodyEmptyComponent"; "bodyMoreItemsHintComponent": "bodyMoreItemsHintComponent"; "showBodyMoreItemsHint": "showBodyMoreItemsHint"; "bodyEmptyText": "bodyEmptyText"; "bodyMoreItemsHintText": "bodyMoreItemsHintText"; "optionComponentInputs": "optionComponentInputs"; "selectedOptionComponentInputs": "selectedOptionComponentInputs"; "bodyErrorComponentInputs": "bodyErrorComponentInputs"; "bodyLoadingComponentInputs": "bodyLoadingComponentInputs"; "bodyEmptyComponentInputs": "bodyEmptyComponentInputs"; "bodyMoreItemsHintComponentInputs": "bodyMoreItemsHintComponentInputs"; }; outputs: { "filterChange": "filterChange"; }; }]>;
|
|
12
12
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComponentType } from '@angular/cdk/overlay';
|
|
2
2
|
import { ElementRef, EventEmitter, InjectionToken, OnInit, TemplateRef, TrackByFunction } from '@angular/core';
|
|
3
|
-
import { AnimatedOverlayComponentBase, SelectionModel, SelectionModelBinding, TypedQueryList } from '@ethlete/core';
|
|
3
|
+
import { ActiveSelectionModel, AnimatedOverlayComponentBase, SelectionModel, SelectionModelBinding, TypedQueryList } from '@ethlete/core';
|
|
4
4
|
import { BehaviorSubject } from 'rxjs';
|
|
5
5
|
import { ComponentWithError, ComponentWithOption, TemplateRefWithError, TemplateRefWithOption } from '../../private';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
@@ -36,6 +36,7 @@ export declare class ComboboxDirective implements OnInit {
|
|
|
36
36
|
get error(): unknown;
|
|
37
37
|
set error(value: unknown);
|
|
38
38
|
private _error$;
|
|
39
|
+
readonly error$: import("rxjs").Observable<unknown>;
|
|
39
40
|
/**
|
|
40
41
|
* @deprecated Use `bodyEmptyText` instead. Will be removed in v4.
|
|
41
42
|
*/
|
|
@@ -62,21 +63,39 @@ export declare class ComboboxDirective implements OnInit {
|
|
|
62
63
|
get optionComponent(): ComponentWithOption | null;
|
|
63
64
|
set optionComponent(component: ComponentWithOption | null);
|
|
64
65
|
private readonly _optionComponent$;
|
|
66
|
+
get optionComponentInputs(): Record<string, unknown> | null | undefined;
|
|
67
|
+
set optionComponentInputs(value: Record<string, unknown> | null | undefined);
|
|
68
|
+
private _optionComponentInputs$;
|
|
65
69
|
get selectedOptionComponent(): ComponentWithOption | null;
|
|
66
70
|
set selectedOptionComponent(component: ComponentWithOption | null);
|
|
67
71
|
private readonly _selectedOptionComponent$;
|
|
72
|
+
get selectedOptionComponentInputs(): Record<string, unknown> | null | undefined;
|
|
73
|
+
set selectedOptionComponentInputs(value: Record<string, unknown> | null | undefined);
|
|
74
|
+
private _selectedOptionComponentInputs$;
|
|
68
75
|
get bodyErrorComponent(): ComponentWithError | null;
|
|
69
76
|
set bodyErrorComponent(value: ComponentWithError | null);
|
|
70
77
|
private _bodyErrorComponent$;
|
|
78
|
+
get bodyErrorComponentInputs(): Record<string, unknown> | null | undefined;
|
|
79
|
+
set bodyErrorComponentInputs(value: Record<string, unknown> | null | undefined);
|
|
80
|
+
private _bodyErrorComponentInputs$;
|
|
71
81
|
get bodyLoadingComponent(): ComponentType<unknown> | null;
|
|
72
82
|
set bodyLoadingComponent(value: ComponentType<unknown> | null);
|
|
73
83
|
private _bodyLoadingComponent$;
|
|
84
|
+
get bodyLoadingComponentInputs(): Record<string, unknown> | null | undefined;
|
|
85
|
+
set bodyLoadingComponentInputs(value: Record<string, unknown> | null | undefined);
|
|
86
|
+
private _bodyLoadingComponentInputs$;
|
|
74
87
|
get bodyEmptyComponent(): ComponentType<unknown> | null;
|
|
75
88
|
set bodyEmptyComponent(value: ComponentType<unknown> | null);
|
|
76
89
|
private _bodyEmptyComponent$;
|
|
90
|
+
get bodyEmptyComponentInputs(): Record<string, unknown> | null | undefined;
|
|
91
|
+
set bodyEmptyComponentInputs(value: Record<string, unknown> | null | undefined);
|
|
92
|
+
private _bodyEmptyComponentInputs$;
|
|
77
93
|
get bodyMoreItemsHintComponent(): ComponentType<unknown> | null;
|
|
78
94
|
set bodyMoreItemsHintComponent(value: ComponentType<unknown> | null);
|
|
79
95
|
private _bodyMoreItemsHintComponent$;
|
|
96
|
+
get bodyMoreItemsHintComponentInputs(): Record<string, unknown> | null | undefined;
|
|
97
|
+
set bodyMoreItemsHintComponentInputs(value: Record<string, unknown> | null | undefined);
|
|
98
|
+
private _bodyMoreItemsHintComponentInputs$;
|
|
80
99
|
protected readonly filterChange: EventEmitter<string>;
|
|
81
100
|
private _shouldIgnoreNextBlurEvent;
|
|
82
101
|
private _deletedSearchWithKeyPress;
|
|
@@ -88,7 +107,7 @@ export declare class ComboboxDirective implements OnInit {
|
|
|
88
107
|
readonly isOpen$: import("rxjs").Observable<boolean>;
|
|
89
108
|
readonly isOpen: import("@angular/core").Signal<boolean | undefined>;
|
|
90
109
|
readonly _selectionModel: SelectionModel<unknown>;
|
|
91
|
-
|
|
110
|
+
readonly _activeSelectionModel: ActiveSelectionModel<unknown>;
|
|
92
111
|
private readonly _backspaceKeyPressManager;
|
|
93
112
|
readonly selectedOptions$: import("rxjs").Observable<unknown[]>;
|
|
94
113
|
readonly multiple$: import("rxjs").Observable<boolean>;
|
|
@@ -128,11 +147,20 @@ export declare class ComboboxDirective implements OnInit {
|
|
|
128
147
|
readonly customBodyEmptyComponent$: import("rxjs").Observable<ComponentType<unknown> | null>;
|
|
129
148
|
readonly customBodyMoreItemsHintTpl$: import("rxjs").Observable<TemplateRef<unknown> | null>;
|
|
130
149
|
readonly customBodyMoreItemsHintComponent$: import("rxjs").Observable<ComponentType<unknown> | null>;
|
|
150
|
+
readonly customOptionComponentInputs$: import("rxjs").Observable<Record<string, unknown>>;
|
|
151
|
+
readonly customSelectedOptionComponentInputs$: import("rxjs").Observable<Record<string, unknown>>;
|
|
152
|
+
readonly customBodyLoadingComponentInputs$: import("rxjs").Observable<Record<string, unknown>>;
|
|
153
|
+
readonly customBodyErrorComponentInputs$: import("rxjs").Observable<Record<string, unknown>>;
|
|
154
|
+
readonly customBodyEmptyComponentInputs$: import("rxjs").Observable<Record<string, unknown>>;
|
|
155
|
+
readonly customBodyMoreItemsHintComponentInputs$: import("rxjs").Observable<Record<string, unknown>>;
|
|
131
156
|
constructor();
|
|
132
157
|
ngOnInit(): void;
|
|
133
158
|
setBodyComponent(component: ComponentType<AbstractComboboxBody>): void;
|
|
134
159
|
getOptionLabel(option: unknown): import("rxjs").Observable<unknown>;
|
|
135
160
|
getOptionValue(option: unknown): import("rxjs").Observable<unknown>;
|
|
161
|
+
combineSelectedOptionWithComponentInputs(option: unknown): import("rxjs").Observable<{
|
|
162
|
+
option: unknown;
|
|
163
|
+
}>;
|
|
136
164
|
removeSelectedOption(option: unknown): void;
|
|
137
165
|
open(): void;
|
|
138
166
|
close(): void;
|
|
@@ -154,6 +182,6 @@ export declare class ComboboxDirective implements OnInit {
|
|
|
154
182
|
private _debugValidateComboboxConfig;
|
|
155
183
|
private _debugValidateOptionAndInitialValueSchema;
|
|
156
184
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComboboxDirective, never>;
|
|
157
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ComboboxDirective, never, never, { "options": { "alias": "options"; "required": true; }; "initialValue": { "alias": "initialValue"; "required": false; }; "filterInternal": { "alias": "filterInternal"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "error": { "alias": "error"; "required": false; }; "emptyText": { "alias": "emptyText"; "required": false; }; "bodyEmptyText": { "alias": "bodyEmptyText"; "required": false; }; "bodyMoreItemsHintText": { "alias": "bodyMoreItemsHintText"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "bindLabel": { "alias": "bindLabel"; "required": false; }; "bindValue": { "alias": "bindValue"; "required": false; }; "bindKey": { "alias": "bindKey"; "required": false; }; "allowCustomValues": { "alias": "allowCustomValues"; "required": false; }; "showBodyMoreItemsHint": { "alias": "showBodyMoreItemsHint"; "required": false; }; "optionComponent": { "alias": "optionComponent"; "required": false; }; "selectedOptionComponent": { "alias": "selectedOptionComponent"; "required": false; }; "bodyErrorComponent": { "alias": "bodyErrorComponent"; "required": false; }; "bodyLoadingComponent": { "alias": "bodyLoadingComponent"; "required": false; }; "bodyEmptyComponent": { "alias": "bodyEmptyComponent"; "required": false; }; "bodyMoreItemsHintComponent": { "alias": "bodyMoreItemsHintComponent"; "required": false; }; }, { "filterChange": "filterChange"; }, ["optionTemplate", "selectedOptionTemplate", "bodyLoadingTemplate", "bodyErrorTemplate", "bodyEmptyTemplate", "bodyMoreItemsHintTemplate"], never, true, never>;
|
|
185
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComboboxDirective, never, never, { "options": { "alias": "options"; "required": true; }; "initialValue": { "alias": "initialValue"; "required": false; }; "filterInternal": { "alias": "filterInternal"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "error": { "alias": "error"; "required": false; }; "emptyText": { "alias": "emptyText"; "required": false; }; "bodyEmptyText": { "alias": "bodyEmptyText"; "required": false; }; "bodyMoreItemsHintText": { "alias": "bodyMoreItemsHintText"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "bindLabel": { "alias": "bindLabel"; "required": false; }; "bindValue": { "alias": "bindValue"; "required": false; }; "bindKey": { "alias": "bindKey"; "required": false; }; "allowCustomValues": { "alias": "allowCustomValues"; "required": false; }; "showBodyMoreItemsHint": { "alias": "showBodyMoreItemsHint"; "required": false; }; "optionComponent": { "alias": "optionComponent"; "required": false; }; "optionComponentInputs": { "alias": "optionComponentInputs"; "required": false; }; "selectedOptionComponent": { "alias": "selectedOptionComponent"; "required": false; }; "selectedOptionComponentInputs": { "alias": "selectedOptionComponentInputs"; "required": false; }; "bodyErrorComponent": { "alias": "bodyErrorComponent"; "required": false; }; "bodyErrorComponentInputs": { "alias": "bodyErrorComponentInputs"; "required": false; }; "bodyLoadingComponent": { "alias": "bodyLoadingComponent"; "required": false; }; "bodyLoadingComponentInputs": { "alias": "bodyLoadingComponentInputs"; "required": false; }; "bodyEmptyComponent": { "alias": "bodyEmptyComponent"; "required": false; }; "bodyEmptyComponentInputs": { "alias": "bodyEmptyComponentInputs"; "required": false; }; "bodyMoreItemsHintComponent": { "alias": "bodyMoreItemsHintComponent"; "required": false; }; "bodyMoreItemsHintComponentInputs": { "alias": "bodyMoreItemsHintComponentInputs"; "required": false; }; }, { "filterChange": "filterChange"; }, ["optionTemplate", "selectedOptionTemplate", "bodyLoadingTemplate", "bodyErrorTemplate", "bodyEmptyTemplate", "bodyMoreItemsHintTemplate"], never, true, never>;
|
|
158
186
|
static ngAcceptInputType_showBodyMoreItemsHint: unknown;
|
|
159
187
|
}
|
|
@@ -10,8 +10,6 @@ import * as i2 from "@ethlete/theming";
|
|
|
10
10
|
export declare const COMBOBOX_BODY_TOKEN: InjectionToken<ComboboxBodyComponent>;
|
|
11
11
|
export declare class ComboboxBodyComponent implements OnInit, AbstractComboboxBody {
|
|
12
12
|
readonly id: string;
|
|
13
|
-
_elementRef?: ElementRef<HTMLElement> | undefined;
|
|
14
|
-
_markForCheck?: (() => void) | undefined;
|
|
15
13
|
private readonly _destroy$;
|
|
16
14
|
private readonly _clickOutside;
|
|
17
15
|
private readonly _themeProvider;
|
|
@@ -28,6 +26,9 @@ export declare class ComboboxBodyComponent implements OnInit, AbstractComboboxBo
|
|
|
28
26
|
remove: (...tokens: string[]) => void;
|
|
29
27
|
has: (token: string) => boolean;
|
|
30
28
|
};
|
|
29
|
+
protected readonly customErrorComponentInputs$: import("rxjs").Observable<{
|
|
30
|
+
error: unknown;
|
|
31
|
+
}>;
|
|
31
32
|
_bodyTemplate: TemplateRef<unknown> | null;
|
|
32
33
|
ngOnInit(): void;
|
|
33
34
|
protected trackByFn: TrackByFunction<unknown>;
|
|
@@ -13,6 +13,9 @@ export declare class ComboboxOptionComponent implements AbstractComboboxOption {
|
|
|
13
13
|
protected readonly disabled$: import("rxjs").Observable<boolean>;
|
|
14
14
|
protected readonly selected$: import("rxjs").Observable<boolean>;
|
|
15
15
|
protected readonly active$: import("rxjs").Observable<boolean>;
|
|
16
|
+
protected readonly customOptionComponentInputs$: import("rxjs").Observable<{
|
|
17
|
+
option: unknown;
|
|
18
|
+
}>;
|
|
16
19
|
readonly hostClassBindings: {
|
|
17
20
|
remove: (...tokens: string[]) => void;
|
|
18
21
|
has: (token: string) => boolean;
|
|
@@ -23,6 +26,7 @@ export declare class ComboboxOptionComponent implements AbstractComboboxOption {
|
|
|
23
26
|
};
|
|
24
27
|
protected selectOption(): void;
|
|
25
28
|
protected ignoreBlur(): void;
|
|
29
|
+
protected setActiveByHover(): void;
|
|
26
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComboboxOptionComponent, never>;
|
|
27
31
|
static ɵcmp: i0.ɵɵComponentDeclaration<ComboboxOptionComponent, "et-combobox-option", never, { "option": { "alias": "option"; "required": true; }; }, {}, never, never, true, never>;
|
|
28
32
|
}
|
|
@@ -84,7 +84,7 @@ export declare class SelectDirective<T extends SelectDirectiveBodyComponentBase>
|
|
|
84
84
|
private _unmountSelectBodyOnDisable;
|
|
85
85
|
private _handleKeyDownInClosedState;
|
|
86
86
|
private _handleKeyDownInOpenState;
|
|
87
|
-
|
|
87
|
+
_setActiveOption(option: SelectOptionDirective | null): Promise<boolean>;
|
|
88
88
|
private _addActiveOptionToSelection;
|
|
89
89
|
private _removeActiveOptionFromSelection;
|
|
90
90
|
private _toggleSelectionOfAllOptions;
|
|
@@ -32,6 +32,7 @@ export declare class SelectOptionDirective implements AfterContentInit {
|
|
|
32
32
|
setSelectValue(): Promise<void>;
|
|
33
33
|
_updateViewValue(): void;
|
|
34
34
|
_setActive(isActive: boolean): void;
|
|
35
|
+
protected setActiveByHover(): void;
|
|
35
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectOptionDirective, never>;
|
|
36
37
|
static ɵdir: i0.ɵɵDirectiveDeclaration<SelectOptionDirective, never, never, { "value": { "alias": "value"; "required": true; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.ObserveContentDirective; inputs: {}; outputs: {}; }]>;
|
|
37
38
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethlete/cdk",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.20.1",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": {
|
|
6
6
|
"css": "./src/lib/styles/index.css",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"@angular/animations": "16.2.5",
|
|
23
23
|
"@angular/platform-browser": "16.2.5",
|
|
24
24
|
"@angular/cdk": "16.2.7",
|
|
25
|
-
"@ethlete/core": "3.11.
|
|
25
|
+
"@ethlete/core": "3.11.2",
|
|
26
26
|
"@ethlete/query": "4.16.3"
|
|
27
27
|
},
|
|
28
28
|
"module": "fesm2022/ethlete-cdk.mjs",
|