ngx-bsl 0.0.10 → 0.0.13
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/fesm2022/ngx-bsl.mjs +181 -245
- package/fesm2022/ngx-bsl.mjs.map +1 -1
- package/package.json +1 -1
- package/styles/components/_list-box.scss +10 -0
- package/styles/index.scss +1 -0
- package/types/ngx-bsl.d.ts +61 -83
- /package/styles/components/{button.scss → _button.scss} +0 -0
- /package/styles/components/{input.scss → _input.scss} +0 -0
package/package.json
CHANGED
package/styles/index.scss
CHANGED
package/types/ngx-bsl.d.ts
CHANGED
|
@@ -1,45 +1,72 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ElementRef, OnInit, OnDestroy } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
+
import { Subject } from 'rxjs';
|
|
4
5
|
|
|
5
|
-
declare class
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
declare class ListBoxOptionComponent<TOption> {
|
|
7
|
+
value: _angular_core.InputSignal<TOption>;
|
|
8
|
+
id: _angular_core.InputSignal<string>;
|
|
9
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListBoxOptionComponent<any>, never>;
|
|
10
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListBoxOptionComponent<any>, "ngx-bsl-list-box-option", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "id": { "alias": "id"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
9
11
|
}
|
|
10
12
|
|
|
11
|
-
declare class
|
|
13
|
+
declare class ListBoxDirective<TOption> {
|
|
14
|
+
listBoxId: _angular_core.InputSignal<string | undefined>;
|
|
15
|
+
listBoxAriaLabel: _angular_core.InputSignal<string | undefined>;
|
|
16
|
+
listBoxAriaLabelledby: _angular_core.InputSignal<string | undefined>;
|
|
17
|
+
optionValueEquality: _angular_core.InputSignal<(value: any, optionValue: any) => boolean>;
|
|
18
|
+
listBoxOptions: _angular_core.Signal<readonly ListBoxOptionComponent<TOption>[]>;
|
|
19
|
+
listBoxOptionRefs: _angular_core.Signal<readonly ElementRef<HTMLElement>[]>;
|
|
20
|
+
ariaActiveDescendant: _angular_core.WritableSignal<string | null>;
|
|
21
|
+
selectOption: Subject<TOption | null>;
|
|
22
|
+
hasAriaSelected: boolean;
|
|
23
|
+
initSelectedOption(value: any): void;
|
|
24
|
+
onClick(event: MouseEvent): void;
|
|
25
|
+
onKeydown(event: KeyboardEvent): void;
|
|
26
|
+
private handleSelectionKeys;
|
|
27
|
+
private handleArrowKeys;
|
|
28
|
+
private getVisuallyFocusedOptionRefIndex;
|
|
29
|
+
setVisualFocus(optionIndex: number): void;
|
|
30
|
+
private removeVisualFocus;
|
|
31
|
+
clearVisualFocus(): void;
|
|
32
|
+
private setSelectedAttribute;
|
|
33
|
+
private removeSelectedAttribute;
|
|
34
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListBoxDirective<any>, never>;
|
|
35
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<ListBoxDirective<any>, "[ngxBslListBox]", never, { "listBoxId": { "alias": "listBoxId"; "required": false; "isSignal": true; }; "listBoxAriaLabel": { "alias": "listBoxAriaLabel"; "required": false; "isSignal": true; }; "listBoxAriaLabelledby": { "alias": "listBoxAriaLabelledby"; "required": false; "isSignal": true; }; "optionValueEquality": { "alias": "optionValueEquality"; "required": false; "isSignal": true; }; }, {}, ["listBoxOptions", "listBoxOptionRefs"], never, true, never>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare class ComboboxComponent<TOption> implements ControlValueAccessor, OnInit {
|
|
39
|
+
protected listBox: ListBoxDirective<TOption>;
|
|
40
|
+
private destroyRef;
|
|
12
41
|
id: _angular_core.InputSignal<string>;
|
|
13
|
-
options: _angular_core.InputSignal<string | TOption[]>;
|
|
14
|
-
bindLabel: _angular_core.InputSignal<string | undefined>;
|
|
15
|
-
groupBy: _angular_core.InputSignal<string | undefined>;
|
|
16
|
-
comparisonField: _angular_core.InputSignal<string | undefined>;
|
|
17
42
|
placeholder: _angular_core.InputSignal<string>;
|
|
18
43
|
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
19
44
|
ariaLabelledBy: _angular_core.InputSignal<string | undefined>;
|
|
45
|
+
optionValueParse: _angular_core.InputSignal<(option: TOption) => string>;
|
|
20
46
|
confirmSelection: _angular_core.OutputEmitterRef<void>;
|
|
21
|
-
private listBox;
|
|
22
47
|
onChange: (_value: string) => void;
|
|
23
48
|
onTouch: () => void;
|
|
24
|
-
|
|
49
|
+
value: _angular_core.ModelSignal<string>;
|
|
25
50
|
protected open: _angular_core.WritableSignal<boolean>;
|
|
26
51
|
protected ariaActiveDescendant: _angular_core.Signal<string | null>;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
private ignoreOptionsUpdate;
|
|
52
|
+
private optionSelecting;
|
|
53
|
+
private optionChangedBy;
|
|
30
54
|
constructor();
|
|
55
|
+
ngOnInit(): void;
|
|
56
|
+
private subscribeSelectOption;
|
|
31
57
|
protected showListBox(): void;
|
|
32
58
|
protected hideListBox(): void;
|
|
33
59
|
protected onClick(): void;
|
|
34
|
-
protected
|
|
60
|
+
protected onBlur(): void;
|
|
61
|
+
protected onListBoxPointerDown(event: PointerEvent): void;
|
|
62
|
+
protected onListBoxClick(event: MouseEvent): void;
|
|
35
63
|
protected onInputChange(event: InputEvent): void;
|
|
36
64
|
protected onKeydown(event: KeyboardEvent): void;
|
|
37
|
-
private groupDataBy;
|
|
38
65
|
registerOnChange(onChange: (value: string) => void): void;
|
|
39
66
|
registerOnTouched(onTouch: () => void): void;
|
|
40
67
|
writeValue(value: string): void;
|
|
41
68
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ComboboxComponent<any>, never>;
|
|
42
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ComboboxComponent<any>, "ngx-bsl-combobox", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "
|
|
69
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ComboboxComponent<any>, "ngx-bsl-combobox", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "optionValueParse": { "alias": "optionValueParse"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "confirmSelection": "confirmSelection"; "value": "valueChange"; }, never, ["*"], true, [{ directive: typeof ListBoxDirective; inputs: { "listBoxId": "listBoxId"; "listBoxAriaLabel": "listBoxAriaLabel"; "listBoxAriaLabelledby": "listBoxAriaLabelledby"; "optionValueEquality": "optionValueEquality"; }; outputs: {}; }]>;
|
|
43
70
|
}
|
|
44
71
|
|
|
45
72
|
declare class CheckboxComponent implements ControlValueAccessor {
|
|
@@ -70,63 +97,12 @@ declare class DrawerComponent {
|
|
|
70
97
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DrawerComponent, "ngx-bsl-drawer", never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; }, { "closed": "closed"; }, never, ["*"], true, never>;
|
|
71
98
|
}
|
|
72
99
|
|
|
73
|
-
declare class ListBoxOptionComponent<TOption> {
|
|
74
|
-
value: _angular_core.InputSignal<TOption>;
|
|
75
|
-
id: _angular_core.InputSignal<string>;
|
|
76
|
-
private optionIdGenerator;
|
|
77
|
-
protected listBoxOptionId: _angular_core.Signal<string>;
|
|
78
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListBoxOptionComponent<any>, never>;
|
|
79
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListBoxOptionComponent<any>, "ngx-bsl-list-box-option", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "id": { "alias": "id"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
declare class ListBoxComponent<TOption> implements OnInit, AfterContentInit, ControlValueAccessor {
|
|
83
|
-
id: _angular_core.InputSignal<string>;
|
|
84
|
-
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
85
|
-
ariaLabelledby: _angular_core.InputSignal<string | undefined>;
|
|
86
|
-
exposeAriaActiveDescendant: _angular_core.InputSignal<boolean>;
|
|
87
|
-
comparisonField: _angular_core.InputSignal<keyof TOption | undefined>;
|
|
88
|
-
initialValue: _angular_core.InputSignal<TOption | null | undefined>;
|
|
89
|
-
initialFocusedOptionIndex: _angular_core.InputSignal<number | null>;
|
|
90
|
-
selectOption: _angular_core.OutputEmitterRef<TOption>;
|
|
91
|
-
listBoxOptions: _angular_core.Signal<readonly ListBoxOptionComponent<TOption>[]>;
|
|
92
|
-
listBoxOptionRefs: _angular_core.Signal<readonly ElementRef<HTMLElement>[]>;
|
|
93
|
-
ariaActiveDescendant: _angular_core.WritableSignal<string | null>;
|
|
94
|
-
onChange: (_value: TOption) => void;
|
|
95
|
-
onTouch: () => void;
|
|
96
|
-
private value;
|
|
97
|
-
ngOnInit(): void;
|
|
98
|
-
ngAfterContentInit(): void;
|
|
99
|
-
onClick(event: MouseEvent): void;
|
|
100
|
-
onKeydown(event: KeyboardEvent): void;
|
|
101
|
-
private initSelectedOption;
|
|
102
|
-
private equalsToCurrentValue;
|
|
103
|
-
private handleSelectionKeys;
|
|
104
|
-
private handleArrowKeys;
|
|
105
|
-
private getVisuallyFocusedListBoxOptionRefIndex;
|
|
106
|
-
private setVisualFocus;
|
|
107
|
-
private removeVisualFocus;
|
|
108
|
-
protected clearVisualFocus(): void;
|
|
109
|
-
protected setSelectedAttribute(optionIndex: number): void;
|
|
110
|
-
protected removeSelectedAttribute(): void;
|
|
111
|
-
registerOnChange(onChange: (value: TOption) => void): void;
|
|
112
|
-
registerOnTouched(onTouch: () => void): void;
|
|
113
|
-
writeValue(value: TOption): void;
|
|
114
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListBoxComponent<any>, never>;
|
|
115
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListBoxComponent<any>, "ngx-bsl-list-box", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "ariaLabelledby"; "required": false; "isSignal": true; }; "exposeAriaActiveDescendant": { "alias": "exposeAriaActiveDescendant"; "required": false; "isSignal": true; }; "comparisonField": { "alias": "comparisonField"; "required": false; "isSignal": true; }; "initialValue": { "alias": "initialValue"; "required": false; "isSignal": true; }; "initialFocusedOptionIndex": { "alias": "initialFocusedOptionIndex"; "required": false; "isSignal": true; }; }, { "selectOption": "selectOption"; }, ["listBoxOptions", "listBoxOptionRefs"], ["*"], true, never>;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
100
|
declare class ListBoxGroupComponent {
|
|
119
101
|
title: _angular_core.InputSignal<string | undefined>;
|
|
120
102
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListBoxGroupComponent, never>;
|
|
121
103
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListBoxGroupComponent, "ngx-bsl-list-box-group", never, { "title": { "alias": "title"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
122
104
|
}
|
|
123
105
|
|
|
124
|
-
declare class ListBoxOptionValueConverterPipe implements PipeTransform {
|
|
125
|
-
transform(value: unknown, bindLabel?: string): string;
|
|
126
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListBoxOptionValueConverterPipe, never>;
|
|
127
|
-
static ɵpipe: _angular_core.ɵɵPipeDeclaration<ListBoxOptionValueConverterPipe, "listBoxOptionValueConverter", true>;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
106
|
declare class ListBoxSeparatorComponent {
|
|
131
107
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ListBoxSeparatorComponent, never>;
|
|
132
108
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ListBoxSeparatorComponent, "ngx-bsl-list-box-separator", never, {}, {}, never, never, true, never>;
|
|
@@ -261,34 +237,36 @@ declare class RangeComponent implements ControlValueAccessor, OnInit, OnDestroy
|
|
|
261
237
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RangeComponent, "ngx-bsl-range", never, { "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "showThumbLabels": { "alias": "showThumbLabels"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
262
238
|
}
|
|
263
239
|
|
|
264
|
-
declare class SelectComponent<TOption> implements ControlValueAccessor {
|
|
240
|
+
declare class SelectComponent<TOption, TValue> implements ControlValueAccessor, OnInit {
|
|
241
|
+
protected listBox: ListBoxDirective<TOption>;
|
|
242
|
+
private destroyRef;
|
|
265
243
|
id: _angular_core.InputSignal<string>;
|
|
266
|
-
options: _angular_core.InputSignal<TOption[]>;
|
|
267
|
-
bindLabel: _angular_core.InputSignal<string | undefined>;
|
|
268
244
|
placeholder: _angular_core.InputSignal<string>;
|
|
269
245
|
ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
270
246
|
ariaLabelledBy: _angular_core.InputSignal<string | undefined>;
|
|
271
|
-
comparisonField: _angular_core.InputSignal<keyof TOption | undefined>;
|
|
272
247
|
iconMode: _angular_core.InputSignal<boolean>;
|
|
273
248
|
customIcon: _angular_core.InputSignal<boolean>;
|
|
274
249
|
dropdownWidth: _angular_core.InputSignal<string | undefined>;
|
|
275
|
-
|
|
276
|
-
|
|
250
|
+
optionValueParse: _angular_core.InputSignal<(option: TOption) => TValue>;
|
|
251
|
+
displayLabel: _angular_core.InputSignal<string | undefined>;
|
|
252
|
+
onChange: (_value: TValue) => void;
|
|
277
253
|
onTouch: () => void;
|
|
278
|
-
value: _angular_core.ModelSignal<
|
|
254
|
+
value: _angular_core.ModelSignal<TValue | undefined>;
|
|
279
255
|
protected open: _angular_core.WritableSignal<boolean>;
|
|
280
256
|
protected ariaActiveDescendant: _angular_core.Signal<string | null>;
|
|
281
|
-
protected
|
|
257
|
+
protected displayValue: _angular_core.Signal<TValue | (TValue & object)[keyof TValue] | undefined>;
|
|
258
|
+
ngOnInit(): void;
|
|
259
|
+
private subscribeSelectOption;
|
|
282
260
|
protected showListBox(): void;
|
|
283
261
|
protected hideListBox(): void;
|
|
284
262
|
protected onClick(): void;
|
|
285
|
-
protected
|
|
263
|
+
protected onListBoxClick(event: MouseEvent): void;
|
|
286
264
|
protected onKeydown(event: KeyboardEvent): void;
|
|
287
|
-
registerOnChange(onChange: (value:
|
|
265
|
+
registerOnChange(onChange: (value: TValue) => void): void;
|
|
288
266
|
registerOnTouched(onTouch: () => void): void;
|
|
289
|
-
writeValue(value:
|
|
290
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectComponent<any>, never>;
|
|
291
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectComponent<any>, "ngx-bsl-select", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "
|
|
267
|
+
writeValue(value: TValue): void;
|
|
268
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectComponent<any, any>, never>;
|
|
269
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectComponent<any, any>, "ngx-bsl-select", never, { "id": { "alias": "id"; "required": true; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaLabelledBy": { "alias": "ariaLabelledBy"; "required": false; "isSignal": true; }; "iconMode": { "alias": "iconMode"; "required": false; "isSignal": true; }; "customIcon": { "alias": "customIcon"; "required": false; "isSignal": true; }; "dropdownWidth": { "alias": "dropdownWidth"; "required": false; "isSignal": true; }; "optionValueParse": { "alias": "optionValueParse"; "required": false; "isSignal": true; }; "displayLabel": { "alias": "displayLabel"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, ["[data-custom-icon]", "[data-custom-icon]", "*"], true, [{ directive: typeof ListBoxDirective; inputs: { "listBoxId": "listBoxId"; "listBoxAriaLabel": "listBoxAriaLabel"; "listBoxAriaLabelledby": "listBoxAriaLabelledby"; "optionValueEquality": "optionValueEquality"; }; outputs: {}; }]>;
|
|
292
270
|
}
|
|
293
271
|
|
|
294
272
|
declare enum TooltipPosition {
|
|
@@ -311,4 +289,4 @@ declare class TooltipDirective {
|
|
|
311
289
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<TooltipDirective, "[ngxBslTooltip]", never, { "message": { "alias": "ngxBslTooltip"; "required": true; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
312
290
|
}
|
|
313
291
|
|
|
314
|
-
export { CheckboxComponent, ComboboxComponent, DrawerComponent, IconCheckComponent, IconChevronDownComponent, IconCompanyComponent, IconLanguageComponent, IconLocationComponent, IconMoonComponent, IconSunComponent, IconXMarkComponent,
|
|
292
|
+
export { CheckboxComponent, ComboboxComponent, DrawerComponent, IconCheckComponent, IconChevronDownComponent, IconCompanyComponent, IconLanguageComponent, IconLocationComponent, IconMoonComponent, IconSunComponent, IconXMarkComponent, ListBoxDirective, ListBoxGroupComponent, ListBoxOptionComponent, ListBoxSeparatorComponent, PaginationComponent, RangeComponent, SelectComponent, TooltipDirective };
|
|
File without changes
|
|
File without changes
|