@ethlete/cdk 3.7.0 → 3.8.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/CHANGELOG.md +12 -0
- package/esm2022/lib/components/forms/components/select/components/combobox/components/combobox/combobox.component.mjs +3 -3
- package/esm2022/lib/components/forms/components/select/components/combobox/constants/combobox.constants.mjs +6 -0
- package/esm2022/lib/components/forms/components/select/components/combobox/constants/index.mjs +2 -0
- package/esm2022/lib/components/forms/components/select/components/combobox/constants/public-api.mjs +2 -0
- package/esm2022/lib/components/forms/components/select/components/combobox/directives/combobox/combobox.directive.mjs +9 -7
- package/esm2022/lib/components/forms/components/select/components/combobox/public-api.mjs +3 -1
- package/esm2022/lib/components/forms/components/select/components/combobox/types/combobox.types.mjs +2 -0
- package/esm2022/lib/components/forms/components/select/components/combobox/types/index.mjs +2 -0
- package/esm2022/lib/components/forms/components/select/components/combobox/types/public-api.mjs +2 -0
- package/esm2022/lib/components/forms/components/select/components/combobox/utils/combobox-config.utils.mjs +13 -0
- package/esm2022/lib/components/forms/components/select/components/combobox/utils/public-api.mjs +2 -1
- package/esm2022/lib/components/forms/directives/expose-input-vars/expose-input-vars.directive.mjs +83 -0
- package/esm2022/lib/components/forms/directives/expose-input-vars/index.mjs +2 -0
- package/esm2022/lib/components/forms/directives/expose-input-vars/public-api.mjs +2 -0
- package/esm2022/lib/components/forms/directives/input/input.directive.mjs +10 -2
- package/esm2022/lib/components/forms/directives/public-api.mjs +2 -1
- package/esm2022/lib/components/forms/directives/writeable-input/writeable-input.directive.mjs +1 -1
- package/esm2022/lib/components/forms/services/input-state.service.mjs +1 -1
- package/esm2022/lib/components/forms/types/input.types.mjs +1 -1
- package/fesm2022/ethlete-cdk.mjs +114 -10
- package/fesm2022/ethlete-cdk.mjs.map +1 -1
- package/lib/components/forms/components/select/components/combobox/constants/combobox.constants.d.ts +6 -0
- package/lib/components/forms/components/select/components/combobox/constants/index.d.ts +1 -0
- package/lib/components/forms/components/select/components/combobox/constants/public-api.d.ts +1 -0
- package/lib/components/forms/components/select/components/combobox/directives/combobox/combobox.directive.d.ts +1 -0
- package/lib/components/forms/components/select/components/combobox/public-api.d.ts +2 -0
- package/lib/components/forms/components/select/components/combobox/types/combobox.types.d.ts +30 -0
- package/lib/components/forms/components/select/components/combobox/types/index.d.ts +1 -0
- package/lib/components/forms/components/select/components/combobox/types/public-api.d.ts +1 -0
- package/lib/components/forms/components/select/components/combobox/utils/combobox-config.utils.d.ts +6 -0
- package/lib/components/forms/components/select/components/combobox/utils/public-api.d.ts +1 -0
- package/lib/components/forms/directives/expose-input-vars/expose-input-vars.directive.d.ts +30 -0
- package/lib/components/forms/directives/expose-input-vars/index.d.ts +1 -0
- package/lib/components/forms/directives/expose-input-vars/public-api.d.ts +1 -0
- package/lib/components/forms/directives/input/input.directive.d.ts +5 -4
- package/lib/components/forms/directives/public-api.d.ts +1 -0
- package/lib/components/forms/directives/writeable-input/writeable-input.directive.d.ts +2 -1
- package/lib/components/forms/services/input-state.service.d.ts +1 -5
- package/lib/components/forms/types/input.types.d.ts +3 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './combobox.constants';
|
|
@@ -18,6 +18,7 @@ export declare class ComboboxDirective implements OnInit {
|
|
|
18
18
|
private readonly _input;
|
|
19
19
|
private readonly _selectField;
|
|
20
20
|
private readonly _animatedOverlay;
|
|
21
|
+
private readonly _comboboxConfig;
|
|
21
22
|
get options(): unknown[];
|
|
22
23
|
set options(value: unknown[]);
|
|
23
24
|
set initialValue(value: unknown);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ComponentType } from '@angular/cdk/portal';
|
|
2
|
+
import { ComponentWithError, ComponentWithOption } from '../private';
|
|
3
|
+
export interface ComboboxConfig {
|
|
4
|
+
/**
|
|
5
|
+
* A component used to display the selected options inside the input
|
|
6
|
+
*/
|
|
7
|
+
selectedOptionComponent?: ComponentWithOption;
|
|
8
|
+
/**
|
|
9
|
+
* A component used to display the options inside the body
|
|
10
|
+
*/
|
|
11
|
+
optionComponent?: ComponentWithOption;
|
|
12
|
+
/**
|
|
13
|
+
* A component used to display the error inside the body
|
|
14
|
+
*/
|
|
15
|
+
bodyErrorComponent?: ComponentWithError;
|
|
16
|
+
/**
|
|
17
|
+
* A component used to display the loading state inside the body
|
|
18
|
+
*/
|
|
19
|
+
bodyLoadingComponent?: ComponentType<unknown>;
|
|
20
|
+
/**
|
|
21
|
+
* A component used to display the empty state inside the body
|
|
22
|
+
*/
|
|
23
|
+
bodyEmptyComponent?: ComponentType<unknown>;
|
|
24
|
+
/**
|
|
25
|
+
* The text to display when the body is empty and no custom empty component is provided
|
|
26
|
+
*
|
|
27
|
+
* @default 'No results found'
|
|
28
|
+
*/
|
|
29
|
+
emptyText?: string;
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './combobox.types';
|
package/lib/components/forms/components/select/components/combobox/utils/combobox-config.utils.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ComboboxConfig } from '../types';
|
|
2
|
+
export declare const createComboboxConfig: (globalConfig?: Partial<ComboboxConfig> | null | undefined, localConfig?: Partial<ComboboxConfig> | null | undefined) => ComboboxConfig;
|
|
3
|
+
export declare const provideComboboxConfig: (config?: Partial<ComboboxConfig> | null | undefined) => {
|
|
4
|
+
provide: import("@angular/core").InjectionToken<ComboboxConfig>;
|
|
5
|
+
useValue: ComboboxConfig;
|
|
6
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
2
|
+
import { InjectionToken } from '@angular/core';
|
|
3
|
+
import { InputValueUpdateType } from '../../types';
|
|
4
|
+
import { InputDirective } from '../input/input.directive';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export interface ExposeInputVarsContext {
|
|
7
|
+
shouldDisplayError: boolean;
|
|
8
|
+
autofilled: boolean;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
isFocusedVia: FocusOrigin;
|
|
11
|
+
lastUpdateType: InputValueUpdateType | null;
|
|
12
|
+
value: unknown;
|
|
13
|
+
}
|
|
14
|
+
export declare const EXPOSE_INPUT_VARS_TOKEN: InjectionToken<ExposeInputVarsDirective>;
|
|
15
|
+
export declare class ExposeInputVarsDirective {
|
|
16
|
+
private readonly _cdr;
|
|
17
|
+
private readonly _destroy$;
|
|
18
|
+
private readonly _monitorStop$;
|
|
19
|
+
private readonly _templateRef;
|
|
20
|
+
private readonly _viewContainerRef;
|
|
21
|
+
private _viewContext;
|
|
22
|
+
set explicitInput(input: InputDirective | null | undefined);
|
|
23
|
+
constructor();
|
|
24
|
+
static ngTemplateContextGuard(dir: ExposeInputVarsDirective, ctx: unknown): ctx is ExposeInputVarsContext;
|
|
25
|
+
_monitorInput(input: InputDirective): void;
|
|
26
|
+
private _monitorObservable;
|
|
27
|
+
private _updateView;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ExposeInputVarsDirective, never>;
|
|
29
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ExposeInputVarsDirective, "[etExposeInputVars]", never, { "explicitInput": { "alias": "etExposeInputVars"; "required": false; }; }, {}, never, never, true, never>;
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './public-api';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './expose-input-vars.directive';
|
|
@@ -4,6 +4,7 @@ import { NativeInputRefDirective } from '../native-input-ref';
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare const INPUT_TOKEN: InjectionToken<InputDirective<unknown, HTMLInputElement>>;
|
|
6
6
|
export declare class InputDirective<T = unknown, J extends HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement = HTMLInputElement> implements OnInit, OnDestroy {
|
|
7
|
+
private readonly _injector;
|
|
7
8
|
private readonly _inputStateService;
|
|
8
9
|
private readonly _formFieldStateService;
|
|
9
10
|
private readonly _ngControl;
|
|
@@ -19,8 +20,8 @@ export declare class InputDirective<T = unknown, J extends HTMLInputElement | HT
|
|
|
19
20
|
get id(): string;
|
|
20
21
|
get value$(): import("rxjs").Observable<T | null>;
|
|
21
22
|
get value(): T | null;
|
|
22
|
-
get lastUpdateType$(): import("rxjs").Observable<("
|
|
23
|
-
get lastUpdateType(): ("
|
|
23
|
+
get lastUpdateType$(): import("rxjs").Observable<import("../../types").InputValueUpdateType | null>;
|
|
24
|
+
get lastUpdateType(): import("../../types").InputValueUpdateType | null;
|
|
24
25
|
get valueChange$(): import("rxjs").Observable<T>;
|
|
25
26
|
get disabled$(): import("rxjs").Observable<boolean>;
|
|
26
27
|
get disabled(): boolean;
|
|
@@ -47,8 +48,8 @@ export declare class InputDirective<T = unknown, J extends HTMLInputElement | HT
|
|
|
47
48
|
get errorId$(): import("rxjs").Observable<string | null>;
|
|
48
49
|
get errorId(): string | null;
|
|
49
50
|
readonly describedBy$: import("rxjs").Observable<string | null>;
|
|
50
|
-
readonly onInternalUpdate$: import("rxjs").Observable<("
|
|
51
|
-
readonly onExternalUpdate$: import("rxjs").Observable<("
|
|
51
|
+
readonly onInternalUpdate$: import("rxjs").Observable<import("../../types").InputValueUpdateType | null>;
|
|
52
|
+
readonly onExternalUpdate$: import("rxjs").Observable<import("../../types").InputValueUpdateType | null>;
|
|
52
53
|
constructor();
|
|
53
54
|
ngOnInit(): void;
|
|
54
55
|
ngOnDestroy(): void;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './dynamic-form-field/public-api';
|
|
2
2
|
export * from './dynamic-form-group/public-api';
|
|
3
|
+
export * from './expose-input-vars/public-api';
|
|
3
4
|
export * from './if-input-empty/public-api';
|
|
4
5
|
export * from './if-input-filled/public-api';
|
|
5
6
|
export * from './input-prefix/public-api';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
2
|
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
-
import { InputStateService
|
|
3
|
+
import { InputStateService } from '../../services';
|
|
4
|
+
import { InputTouchedFn, InputValueChangeFn } from '../../types';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
export declare const WRITEABLE_INPUT_TOKEN: InjectionToken<WriteableInputDirective>;
|
|
6
7
|
export declare const WRITEABLE_INPUT_VALUE_ACCESSOR: {
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import { FocusOrigin } from '@angular/cdk/a11y';
|
|
2
2
|
import { BehaviorSubject, Subject } from 'rxjs';
|
|
3
3
|
import { NativeInputRefDirective } from '../directives';
|
|
4
|
-
import { ValidatorErrors } from '../types';
|
|
4
|
+
import { InputTouchedFn, InputValueChangeFn, InputValueUpdateType, ValidatorErrors } from '../types';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export type InputValueChangeFn<T = unknown> = (value: T) => void;
|
|
7
|
-
export type InputTouchedFn = () => void;
|
|
8
|
-
type InputValueUpdateType = 'internal' | 'external';
|
|
9
6
|
export declare class InputStateService<T = unknown, J extends HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement | HTMLButtonElement = HTMLInputElement> {
|
|
10
7
|
readonly lastUpdateType$: BehaviorSubject<InputValueUpdateType | null>;
|
|
11
8
|
readonly lastUpdateType: import("@angular/core").Signal<InputValueUpdateType | null>;
|
|
@@ -43,4 +40,3 @@ export declare class InputStateService<T = unknown, J extends HTMLInputElement |
|
|
|
43
40
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputStateService<any, any>, never>;
|
|
44
41
|
static ɵprov: i0.ɵɵInjectableDeclaration<InputStateService<any, any>>;
|
|
45
42
|
}
|
|
46
|
-
export {};
|