@agnos-ui/angular-bootstrap 0.8.0 → 0.9.0-next.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/fesm2022/agnos-ui-angular-bootstrap.mjs +154 -92
- package/fesm2022/agnos-ui-angular-bootstrap.mjs.map +1 -1
- package/index.d.ts +6450 -40
- package/package.json +5 -5
- package/agnos-ui-angular.module.d.ts +0 -20
- package/components/accordion/accordion.component.d.ts +0 -257
- package/components/accordion/accordion.gen.d.ts +0 -442
- package/components/accordion/index.d.ts +0 -2
- package/components/alert/alert.component.d.ts +0 -140
- package/components/alert/alert.gen.d.ts +0 -191
- package/components/alert/index.d.ts +0 -2
- package/components/carousel/carousel.component.d.ts +0 -205
- package/components/carousel/carousel.gen.d.ts +0 -358
- package/components/carousel/index.d.ts +0 -2
- package/components/collapse/collapse.component.d.ts +0 -83
- package/components/collapse/collapse.gen.d.ts +0 -150
- package/components/collapse/index.d.ts +0 -2
- package/components/modal/index.d.ts +0 -3
- package/components/modal/modal.component.d.ts +0 -220
- package/components/modal/modal.gen.d.ts +0 -355
- package/components/modal/modal.service.d.ts +0 -21
- package/components/pagination/index.d.ts +0 -2
- package/components/pagination/pagination.component.d.ts +0 -379
- package/components/pagination/pagination.gen.d.ts +0 -584
- package/components/progressbar/index.d.ts +0 -2
- package/components/progressbar/progressbar.component.d.ts +0 -118
- package/components/progressbar/progressbar.gen.d.ts +0 -196
- package/components/rating/index.d.ts +0 -2
- package/components/rating/rating.component.d.ts +0 -144
- package/components/rating/rating.gen.d.ts +0 -270
- package/components/select/index.d.ts +0 -2
- package/components/select/select.component.d.ts +0 -198
- package/components/select/select.gen.d.ts +0 -433
- package/components/slider/index.d.ts +0 -2
- package/components/slider/slider.component.d.ts +0 -234
- package/components/slider/slider.gen.d.ts +0 -511
- package/components/toast/index.d.ts +0 -4
- package/components/toast/toast.component.d.ts +0 -155
- package/components/toast/toast.gen.d.ts +0 -308
- package/components/toast/toaster.component.d.ts +0 -17
- package/components/toast/toaster.service.d.ts +0 -7
- package/components/tree/index.d.ts +0 -2
- package/components/tree/tree.component.d.ts +0 -145
- package/components/tree/tree.gen.d.ts +0 -216
- package/config.d.ts +0 -27
- package/config.gen.d.ts +0 -62
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import type { SlotContent } from '@agnos-ui/angular-headless';
|
|
2
|
-
import { BaseWidgetDirective } from '@agnos-ui/angular-headless';
|
|
3
|
-
import { TemplateRef } from '@angular/core';
|
|
4
|
-
import type { Placement } from '@floating-ui/dom';
|
|
5
|
-
import type { ItemContext, SelectItemContext, SelectWidget } from './select.gen';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Directive to provide a custom template for the badge label in a select component.
|
|
9
|
-
*
|
|
10
|
-
* @template Item - The type of the item in the select component.
|
|
11
|
-
*
|
|
12
|
-
* This directive uses a template reference to render the {@link SelectItemContext<Item>}.
|
|
13
|
-
*/
|
|
14
|
-
export declare class SelectBadgeLabelDirective<Item> {
|
|
15
|
-
templateRef: TemplateRef<any>;
|
|
16
|
-
static ngTemplateContextGuard<Item>(_dir: SelectBadgeLabelDirective<Item>, context: unknown): context is SelectItemContext<Item>;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SelectBadgeLabelDirective<any>, never>;
|
|
18
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<SelectBadgeLabelDirective<any>, "ng-template[auSelectBadgeLabel]", never, {}, {}, never, never, true, never>;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Directive to provide a custom label template for select items.
|
|
22
|
-
*
|
|
23
|
-
* This directive allows you to define a custom template for the labels of items
|
|
24
|
-
* in a select component. The template can be specified using an Angular `TemplateRef`.
|
|
25
|
-
*
|
|
26
|
-
* @template Item - The type of the items in the select component.
|
|
27
|
-
*
|
|
28
|
-
* This directive uses a template reference to render the {@link SelectItemContext<Item>}.
|
|
29
|
-
*/
|
|
30
|
-
export declare class SelectItemLabelDirective<Item> {
|
|
31
|
-
templateRef: TemplateRef<any>;
|
|
32
|
-
static ngTemplateContextGuard<Item>(_dir: SelectItemLabelDirective<Item>, context: unknown): context is SelectItemContext<Item>;
|
|
33
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SelectItemLabelDirective<any>, never>;
|
|
34
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<SelectItemLabelDirective<any>, "ng-template[auSelectItemLabel]", never, {}, {}, never, never, true, never>;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* A component that represents a customizable select dropdown widget.
|
|
38
|
-
*
|
|
39
|
-
* @template Item - The type of items in the select dropdown.
|
|
40
|
-
*/
|
|
41
|
-
export declare class SelectComponent<Item> extends BaseWidgetDirective<SelectWidget<Item>> {
|
|
42
|
-
/**
|
|
43
|
-
* aria-label used for the input inside the select
|
|
44
|
-
*
|
|
45
|
-
* @defaultValue `'Select'`
|
|
46
|
-
*/
|
|
47
|
-
readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
48
|
-
/**
|
|
49
|
-
* id used for the input inside the select
|
|
50
|
-
*/
|
|
51
|
-
readonly id: import("@angular/core").InputSignal<string | undefined>;
|
|
52
|
-
/**
|
|
53
|
-
* List of available items for the dropdown
|
|
54
|
-
*
|
|
55
|
-
* @defaultValue `[]`
|
|
56
|
-
*/
|
|
57
|
-
readonly items: import("@angular/core").InputSignal<Item[] | undefined>;
|
|
58
|
-
/**
|
|
59
|
-
* List of allowed placements for the dropdown.
|
|
60
|
-
* This refers to the [allowedPlacements from floating UI](https://floating-ui.com/docs/autoPlacement#allowedplacements), given the different [Placement possibilities](https://floating-ui.com/docs/computePosition#placement).
|
|
61
|
-
*
|
|
62
|
-
* @defaultValue
|
|
63
|
-
* ```ts
|
|
64
|
-
* ['bottom-start', 'top-start', 'bottom-end', 'top-end']
|
|
65
|
-
* ```
|
|
66
|
-
*/
|
|
67
|
-
readonly allowedPlacements: import("@angular/core").InputSignal<Placement[] | undefined>;
|
|
68
|
-
/**
|
|
69
|
-
* true if the select is open
|
|
70
|
-
*
|
|
71
|
-
* @defaultValue `false`
|
|
72
|
-
*/
|
|
73
|
-
readonly open: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
74
|
-
/**
|
|
75
|
-
* Filtered text to be display in the filter input
|
|
76
|
-
*
|
|
77
|
-
* @defaultValue `''`
|
|
78
|
-
*/
|
|
79
|
-
readonly filterText: import("@angular/core").InputSignal<string | undefined>;
|
|
80
|
-
/**
|
|
81
|
-
* CSS classes to be applied on the widget main container
|
|
82
|
-
*
|
|
83
|
-
* @defaultValue `''`
|
|
84
|
-
*/
|
|
85
|
-
readonly className: import("@angular/core").InputSignal<string | undefined>;
|
|
86
|
-
/**
|
|
87
|
-
* true if the select is disabled
|
|
88
|
-
*
|
|
89
|
-
* @defaultValue `false`
|
|
90
|
-
*/
|
|
91
|
-
readonly disabled: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
92
|
-
/**
|
|
93
|
-
* List of selected item ids
|
|
94
|
-
*
|
|
95
|
-
* @defaultValue `[]`
|
|
96
|
-
*/
|
|
97
|
-
readonly selected: import("@angular/core").InputSignal<Item[] | undefined>;
|
|
98
|
-
/**
|
|
99
|
-
* true if a loading process is being done
|
|
100
|
-
*
|
|
101
|
-
* @defaultValue `false`
|
|
102
|
-
*/
|
|
103
|
-
readonly loading: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
104
|
-
/**
|
|
105
|
-
* Custom function to get the id of an item
|
|
106
|
-
* By default, the item is returned
|
|
107
|
-
*
|
|
108
|
-
* @defaultValue
|
|
109
|
-
* ```ts
|
|
110
|
-
* (item: any) => '' + item
|
|
111
|
-
* ```
|
|
112
|
-
*/
|
|
113
|
-
readonly itemIdFn: import("@angular/core").InputSignal<((item: Item) => string) | undefined>;
|
|
114
|
-
/**
|
|
115
|
-
* Class to be added on the dropdown menu container
|
|
116
|
-
*
|
|
117
|
-
* @defaultValue `''`
|
|
118
|
-
*/
|
|
119
|
-
readonly menuClassName: import("@angular/core").InputSignal<string | undefined>;
|
|
120
|
-
/**
|
|
121
|
-
* The template to override the way each badge on the left of the input is displayed.
|
|
122
|
-
* This define the content of the badge inside the badge container.
|
|
123
|
-
*
|
|
124
|
-
* @defaultValue
|
|
125
|
-
* ```ts
|
|
126
|
-
* ({itemContext}: SelectItemContext<any>) => itemContext.item
|
|
127
|
-
* ```
|
|
128
|
-
*/
|
|
129
|
-
readonly badgeLabel: import("@angular/core").InputSignal<SlotContent<SelectItemContext<Item>>>;
|
|
130
|
-
readonly slotSelectBadgeLabelFromContent: import("@angular/core").Signal<SelectBadgeLabelDirective<any> | undefined>;
|
|
131
|
-
/**
|
|
132
|
-
* The template to override the way each item is displayed in the list.
|
|
133
|
-
* This define the content of the badge inside the badge container.
|
|
134
|
-
*
|
|
135
|
-
* @defaultValue
|
|
136
|
-
* ```ts
|
|
137
|
-
* ({itemContext}: SelectItemContext<any>) => itemContext.item
|
|
138
|
-
* ```
|
|
139
|
-
*/
|
|
140
|
-
readonly itemLabel: import("@angular/core").InputSignal<SlotContent<SelectItemContext<Item>>>;
|
|
141
|
-
readonly slotSelectItemLabelFromContent: import("@angular/core").Signal<SelectItemLabelDirective<any> | undefined>;
|
|
142
|
-
/**
|
|
143
|
-
* Callback called when the text filter change
|
|
144
|
-
* @param text - Filtered text
|
|
145
|
-
*
|
|
146
|
-
* @defaultValue
|
|
147
|
-
* ```ts
|
|
148
|
-
* () => {}
|
|
149
|
-
* ```
|
|
150
|
-
*/
|
|
151
|
-
readonly filterTextChange: import("@angular/core").OutputEmitterRef<string>;
|
|
152
|
-
/**
|
|
153
|
-
* Callback called when the selection change
|
|
154
|
-
*
|
|
155
|
-
* @defaultValue
|
|
156
|
-
* ```ts
|
|
157
|
-
* () => {}
|
|
158
|
-
* ```
|
|
159
|
-
*/
|
|
160
|
-
readonly selectedChange: import("@angular/core").OutputEmitterRef<Item[]>;
|
|
161
|
-
/**
|
|
162
|
-
* Callback called dropdown open state change
|
|
163
|
-
* @param isOpen - updated open state
|
|
164
|
-
*
|
|
165
|
-
* @defaultValue
|
|
166
|
-
* ```ts
|
|
167
|
-
* () => {}
|
|
168
|
-
* ```
|
|
169
|
-
*/
|
|
170
|
-
readonly openChange: import("@angular/core").OutputEmitterRef<boolean>;
|
|
171
|
-
/**
|
|
172
|
-
* Class to be added on menu items
|
|
173
|
-
*
|
|
174
|
-
* @defaultValue `''`
|
|
175
|
-
*/
|
|
176
|
-
readonly menuItemClassName: import("@angular/core").InputSignal<string | undefined>;
|
|
177
|
-
/**
|
|
178
|
-
* Class to be added on selected items (displayed in the input zone)
|
|
179
|
-
*
|
|
180
|
-
* @defaultValue `''`
|
|
181
|
-
*/
|
|
182
|
-
readonly badgeClassName: import("@angular/core").InputSignal<string | undefined>;
|
|
183
|
-
/**
|
|
184
|
-
* Retrieves navigable elements within an HTML element containing badges and the input.
|
|
185
|
-
*
|
|
186
|
-
* @param node - HTMLElement that contains the badges and the input
|
|
187
|
-
*
|
|
188
|
-
* @defaultValue
|
|
189
|
-
* ```ts
|
|
190
|
-
* (node: HTMLElement) => node.querySelectorAll('.au-select-badge,input')
|
|
191
|
-
* ```
|
|
192
|
-
*/
|
|
193
|
-
readonly navSelector: import("@angular/core").InputSignal<((node: HTMLElement) => NodeListOf<HTMLSpanElement | HTMLInputElement>) | undefined>;
|
|
194
|
-
constructor();
|
|
195
|
-
itemCtxTrackBy(_: number, itemContext: ItemContext<Item>): string;
|
|
196
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent<any>, never>;
|
|
197
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent<any>, "[auSelect]", never, { "ariaLabel": { "alias": "auAriaLabel"; "required": false; "isSignal": true; }; "id": { "alias": "auId"; "required": false; "isSignal": true; }; "items": { "alias": "auItems"; "required": false; "isSignal": true; }; "allowedPlacements": { "alias": "auAllowedPlacements"; "required": false; "isSignal": true; }; "open": { "alias": "auOpen"; "required": false; "isSignal": true; }; "filterText": { "alias": "auFilterText"; "required": false; "isSignal": true; }; "className": { "alias": "auClassName"; "required": false; "isSignal": true; }; "disabled": { "alias": "auDisabled"; "required": false; "isSignal": true; }; "selected": { "alias": "auSelected"; "required": false; "isSignal": true; }; "loading": { "alias": "auLoading"; "required": false; "isSignal": true; }; "itemIdFn": { "alias": "auItemIdFn"; "required": false; "isSignal": true; }; "menuClassName": { "alias": "auMenuClassName"; "required": false; "isSignal": true; }; "badgeLabel": { "alias": "auBadgeLabel"; "required": false; "isSignal": true; }; "itemLabel": { "alias": "auItemLabel"; "required": false; "isSignal": true; }; "menuItemClassName": { "alias": "auMenuItemClassName"; "required": false; "isSignal": true; }; "badgeClassName": { "alias": "auBadgeClassName"; "required": false; "isSignal": true; }; "navSelector": { "alias": "auNavSelector"; "required": false; "isSignal": true; }; }, { "filterTextChange": "auFilterTextChange"; "selectedChange": "auSelectedChange"; "openChange": "auOpenChange"; }, ["slotSelectBadgeLabelFromContent", "slotSelectItemLabelFromContent"], never, true, never>;
|
|
198
|
-
}
|
|
@@ -1,433 +0,0 @@
|
|
|
1
|
-
import type { WidgetSlotContext, SlotContent, Widget, PropsConfig, HasFocus, FloatingUI, Directive } from '@agnos-ui/angular-headless';
|
|
2
|
-
import type { Placement } from '@floating-ui/dom';
|
|
3
|
-
/**
|
|
4
|
-
* Retrieve a shallow copy of the default Select config
|
|
5
|
-
* @returns the default Select config
|
|
6
|
-
*/
|
|
7
|
-
declare const export_getSelectDefaultConfig: () => SelectProps<any>;
|
|
8
|
-
export { export_getSelectDefaultConfig as getSelectDefaultConfig };
|
|
9
|
-
/**
|
|
10
|
-
* Interface for the slot context of the pagination widget
|
|
11
|
-
* @template Item - The type of the items in the Select component.
|
|
12
|
-
*/
|
|
13
|
-
export interface SelectContext<Item> extends WidgetSlotContext<SelectWidget<Item>> {
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Represents the context for a select item, extending the base `SelectContext` with additional
|
|
17
|
-
* contextual data specific to an item.
|
|
18
|
-
*
|
|
19
|
-
* @template Item - The type of the item within the select context.
|
|
20
|
-
*/
|
|
21
|
-
export interface SelectItemContext<Item> extends SelectContext<Item> {
|
|
22
|
-
/**
|
|
23
|
-
* Contextual data related to an item
|
|
24
|
-
*/
|
|
25
|
-
itemContext: ItemContext<Item>;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Represents the state of a Select component.
|
|
29
|
-
*
|
|
30
|
-
* @template Item - The type of the items in the select component.
|
|
31
|
-
*/
|
|
32
|
-
export interface SelectState<Item> {
|
|
33
|
-
/**
|
|
34
|
-
* List of item contexts, to be displayed in the menu
|
|
35
|
-
*/
|
|
36
|
-
visibleItems: ItemContext<Item>[];
|
|
37
|
-
/**
|
|
38
|
-
* List of selected items to be display
|
|
39
|
-
*/
|
|
40
|
-
selectedContexts: ItemContext<Item>[];
|
|
41
|
-
/**
|
|
42
|
-
* Highlighted item context.
|
|
43
|
-
* It is designed to define the highlighted item in the dropdown menu
|
|
44
|
-
*/
|
|
45
|
-
highlighted: ItemContext<Item> | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* Current placement of the dropdown
|
|
48
|
-
*/
|
|
49
|
-
placement: Placement | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* id used for the input inside the select
|
|
52
|
-
*/
|
|
53
|
-
id: string | undefined;
|
|
54
|
-
/**
|
|
55
|
-
* aria-label used for the input inside the select
|
|
56
|
-
*
|
|
57
|
-
* @defaultValue `'Select'`
|
|
58
|
-
*/
|
|
59
|
-
ariaLabel: string | undefined;
|
|
60
|
-
/**
|
|
61
|
-
* List of selected item ids
|
|
62
|
-
*
|
|
63
|
-
* @defaultValue `[]`
|
|
64
|
-
*/
|
|
65
|
-
selected: Item[];
|
|
66
|
-
/**
|
|
67
|
-
* Filtered text to be display in the filter input
|
|
68
|
-
*
|
|
69
|
-
* @defaultValue `''`
|
|
70
|
-
*/
|
|
71
|
-
filterText: string;
|
|
72
|
-
/**
|
|
73
|
-
* true if the select is disabled
|
|
74
|
-
*
|
|
75
|
-
* @defaultValue `false`
|
|
76
|
-
*/
|
|
77
|
-
disabled: boolean;
|
|
78
|
-
/**
|
|
79
|
-
* true if the select is open
|
|
80
|
-
*
|
|
81
|
-
* @defaultValue `false`
|
|
82
|
-
*/
|
|
83
|
-
open: boolean;
|
|
84
|
-
/**
|
|
85
|
-
* Class to be added on the dropdown menu container
|
|
86
|
-
*
|
|
87
|
-
* @defaultValue `''`
|
|
88
|
-
*/
|
|
89
|
-
menuClassName: string;
|
|
90
|
-
/**
|
|
91
|
-
* Class to be added on menu items
|
|
92
|
-
*
|
|
93
|
-
* @defaultValue `''`
|
|
94
|
-
*/
|
|
95
|
-
menuItemClassName: string;
|
|
96
|
-
/**
|
|
97
|
-
* Class to be added on selected items (displayed in the input zone)
|
|
98
|
-
*
|
|
99
|
-
* @defaultValue `''`
|
|
100
|
-
*/
|
|
101
|
-
badgeClassName: string;
|
|
102
|
-
/**
|
|
103
|
-
* true if a loading process is being done
|
|
104
|
-
*
|
|
105
|
-
* @defaultValue `false`
|
|
106
|
-
*/
|
|
107
|
-
loading: boolean;
|
|
108
|
-
/**
|
|
109
|
-
* CSS classes to be applied on the widget main container
|
|
110
|
-
*
|
|
111
|
-
* @defaultValue `''`
|
|
112
|
-
*/
|
|
113
|
-
className: string;
|
|
114
|
-
/**
|
|
115
|
-
* The template to override the way each badge on the left of the input is displayed.
|
|
116
|
-
* This define the content of the badge inside the badge container.
|
|
117
|
-
*
|
|
118
|
-
* @defaultValue
|
|
119
|
-
* ```ts
|
|
120
|
-
* ({itemContext}: SelectItemContext<any>) => itemContext.item
|
|
121
|
-
* ```
|
|
122
|
-
*/
|
|
123
|
-
badgeLabel: SlotContent<SelectItemContext<Item>>;
|
|
124
|
-
/**
|
|
125
|
-
* The template to override the way each item is displayed in the list.
|
|
126
|
-
* This define the content of the badge inside the badge container.
|
|
127
|
-
*
|
|
128
|
-
* @defaultValue
|
|
129
|
-
* ```ts
|
|
130
|
-
* ({itemContext}: SelectItemContext<any>) => itemContext.item
|
|
131
|
-
* ```
|
|
132
|
-
*/
|
|
133
|
-
itemLabel: SlotContent<SelectItemContext<Item>>;
|
|
134
|
-
}
|
|
135
|
-
/**
|
|
136
|
-
* Represents the properties for the Select component.
|
|
137
|
-
*
|
|
138
|
-
* @template Item - The type of the items in the select component.
|
|
139
|
-
*/
|
|
140
|
-
export interface SelectProps<Item> {
|
|
141
|
-
/**
|
|
142
|
-
* List of available items for the dropdown
|
|
143
|
-
*
|
|
144
|
-
* @defaultValue `[]`
|
|
145
|
-
*/
|
|
146
|
-
items: Item[];
|
|
147
|
-
/**
|
|
148
|
-
* List of allowed placements for the dropdown.
|
|
149
|
-
* This refers to the [allowedPlacements from floating UI](https://floating-ui.com/docs/autoPlacement#allowedplacements), given the different [Placement possibilities](https://floating-ui.com/docs/computePosition#placement).
|
|
150
|
-
*
|
|
151
|
-
* @defaultValue
|
|
152
|
-
* ```ts
|
|
153
|
-
* ['bottom-start', 'top-start', 'bottom-end', 'top-end']
|
|
154
|
-
* ```
|
|
155
|
-
*/
|
|
156
|
-
allowedPlacements: Placement[];
|
|
157
|
-
/**
|
|
158
|
-
* Custom function to get the id of an item
|
|
159
|
-
* By default, the item is returned
|
|
160
|
-
*
|
|
161
|
-
* @defaultValue
|
|
162
|
-
* ```ts
|
|
163
|
-
* (item: any) => '' + item
|
|
164
|
-
* ```
|
|
165
|
-
*/
|
|
166
|
-
itemIdFn(item: Item): string;
|
|
167
|
-
/**
|
|
168
|
-
* Retrieves navigable elements within an HTML element containing badges and the input.
|
|
169
|
-
*
|
|
170
|
-
* @param node - HTMLElement that contains the badges and the input
|
|
171
|
-
*
|
|
172
|
-
* @defaultValue
|
|
173
|
-
* ```ts
|
|
174
|
-
* (node: HTMLElement) => node.querySelectorAll('.au-select-badge,input')
|
|
175
|
-
* ```
|
|
176
|
-
*/
|
|
177
|
-
navSelector(node: HTMLElement): NodeListOf<HTMLSpanElement | HTMLInputElement>;
|
|
178
|
-
/**
|
|
179
|
-
* Callback called dropdown open state change
|
|
180
|
-
* @param isOpen - updated open state
|
|
181
|
-
*
|
|
182
|
-
* @defaultValue
|
|
183
|
-
* ```ts
|
|
184
|
-
* () => {}
|
|
185
|
-
* ```
|
|
186
|
-
*/
|
|
187
|
-
onOpenChange(isOpen: boolean): void;
|
|
188
|
-
/**
|
|
189
|
-
* Callback called when the text filter change
|
|
190
|
-
* @param text - Filtered text
|
|
191
|
-
*
|
|
192
|
-
* @defaultValue
|
|
193
|
-
* ```ts
|
|
194
|
-
* () => {}
|
|
195
|
-
* ```
|
|
196
|
-
*/
|
|
197
|
-
onFilterTextChange(text: string): void;
|
|
198
|
-
/**
|
|
199
|
-
* Callback called when the selection change
|
|
200
|
-
*
|
|
201
|
-
* @defaultValue
|
|
202
|
-
* ```ts
|
|
203
|
-
* () => {}
|
|
204
|
-
* ```
|
|
205
|
-
*/
|
|
206
|
-
onSelectedChange(selected: Item[]): void;
|
|
207
|
-
/**
|
|
208
|
-
* id used for the input inside the select
|
|
209
|
-
*/
|
|
210
|
-
id: string | undefined;
|
|
211
|
-
/**
|
|
212
|
-
* aria-label used for the input inside the select
|
|
213
|
-
*
|
|
214
|
-
* @defaultValue `'Select'`
|
|
215
|
-
*/
|
|
216
|
-
ariaLabel: string | undefined;
|
|
217
|
-
/**
|
|
218
|
-
* List of selected item ids
|
|
219
|
-
*
|
|
220
|
-
* @defaultValue `[]`
|
|
221
|
-
*/
|
|
222
|
-
selected: Item[];
|
|
223
|
-
/**
|
|
224
|
-
* Filtered text to be display in the filter input
|
|
225
|
-
*
|
|
226
|
-
* @defaultValue `''`
|
|
227
|
-
*/
|
|
228
|
-
filterText: string;
|
|
229
|
-
/**
|
|
230
|
-
* true if the select is disabled
|
|
231
|
-
*
|
|
232
|
-
* @defaultValue `false`
|
|
233
|
-
*/
|
|
234
|
-
disabled: boolean;
|
|
235
|
-
/**
|
|
236
|
-
* true if the select is open
|
|
237
|
-
*
|
|
238
|
-
* @defaultValue `false`
|
|
239
|
-
*/
|
|
240
|
-
open: boolean;
|
|
241
|
-
/**
|
|
242
|
-
* Class to be added on the dropdown menu container
|
|
243
|
-
*
|
|
244
|
-
* @defaultValue `''`
|
|
245
|
-
*/
|
|
246
|
-
menuClassName: string;
|
|
247
|
-
/**
|
|
248
|
-
* Class to be added on menu items
|
|
249
|
-
*
|
|
250
|
-
* @defaultValue `''`
|
|
251
|
-
*/
|
|
252
|
-
menuItemClassName: string;
|
|
253
|
-
/**
|
|
254
|
-
* Class to be added on selected items (displayed in the input zone)
|
|
255
|
-
*
|
|
256
|
-
* @defaultValue `''`
|
|
257
|
-
*/
|
|
258
|
-
badgeClassName: string;
|
|
259
|
-
/**
|
|
260
|
-
* true if a loading process is being done
|
|
261
|
-
*
|
|
262
|
-
* @defaultValue `false`
|
|
263
|
-
*/
|
|
264
|
-
loading: boolean;
|
|
265
|
-
/**
|
|
266
|
-
* CSS classes to be applied on the widget main container
|
|
267
|
-
*
|
|
268
|
-
* @defaultValue `''`
|
|
269
|
-
*/
|
|
270
|
-
className: string;
|
|
271
|
-
/**
|
|
272
|
-
* The template to override the way each badge on the left of the input is displayed.
|
|
273
|
-
* This define the content of the badge inside the badge container.
|
|
274
|
-
*
|
|
275
|
-
* @defaultValue
|
|
276
|
-
* ```ts
|
|
277
|
-
* ({itemContext}: SelectItemContext<any>) => itemContext.item
|
|
278
|
-
* ```
|
|
279
|
-
*/
|
|
280
|
-
badgeLabel: SlotContent<SelectItemContext<Item>>;
|
|
281
|
-
/**
|
|
282
|
-
* The template to override the way each item is displayed in the list.
|
|
283
|
-
* This define the content of the badge inside the badge container.
|
|
284
|
-
*
|
|
285
|
-
* @defaultValue
|
|
286
|
-
* ```ts
|
|
287
|
-
* ({itemContext}: SelectItemContext<any>) => itemContext.item
|
|
288
|
-
* ```
|
|
289
|
-
*/
|
|
290
|
-
itemLabel: SlotContent<SelectItemContext<Item>>;
|
|
291
|
-
}
|
|
292
|
-
/**
|
|
293
|
-
* Represents a Select widget component.
|
|
294
|
-
*
|
|
295
|
-
* @template Item - The type of the items that the select widget will handle.
|
|
296
|
-
*/
|
|
297
|
-
export type SelectWidget<Item> = Widget<SelectProps<Item>, SelectState<Item>, SelectApi<Item>, SelectDirectives<Item>>;
|
|
298
|
-
/**
|
|
299
|
-
* Creates a new select widget instance.
|
|
300
|
-
* @param config - config of the modal, either as a store or as an object containing values or stores.
|
|
301
|
-
* @returns a new select widget instance
|
|
302
|
-
*/
|
|
303
|
-
declare const export_createSelect: <Item>(config?: PropsConfig<SelectProps<Item>>) => SelectWidget<Item>;
|
|
304
|
-
export { export_createSelect as createSelect };
|
|
305
|
-
/**
|
|
306
|
-
* Item representation built from the items provided in parameters
|
|
307
|
-
*
|
|
308
|
-
* @template T - The type of the Select Items
|
|
309
|
-
*/
|
|
310
|
-
export interface ItemContext<T> {
|
|
311
|
-
/**
|
|
312
|
-
* Original item given in the parameters
|
|
313
|
-
*/
|
|
314
|
-
item: T;
|
|
315
|
-
/**
|
|
316
|
-
* Unique id to identify the item
|
|
317
|
-
*/
|
|
318
|
-
id: string;
|
|
319
|
-
/**
|
|
320
|
-
* Specify if the item is checked
|
|
321
|
-
*/
|
|
322
|
-
selected: boolean;
|
|
323
|
-
}
|
|
324
|
-
/**
|
|
325
|
-
* Interface representing the API for a Select component.
|
|
326
|
-
*
|
|
327
|
-
* @template Item - The type of the Select Items
|
|
328
|
-
*/
|
|
329
|
-
export interface SelectApi<Item> {
|
|
330
|
-
/**
|
|
331
|
-
* Clear all the selected items
|
|
332
|
-
*/
|
|
333
|
-
clear(): void;
|
|
334
|
-
/**
|
|
335
|
-
* Clear the filter text
|
|
336
|
-
*/
|
|
337
|
-
clearText(): void;
|
|
338
|
-
/**
|
|
339
|
-
* Highlight the given item, if there is a corresponding match among the visible list
|
|
340
|
-
*/
|
|
341
|
-
highlight(item: Item): void;
|
|
342
|
-
/**
|
|
343
|
-
* Highlight the first item among the visible list
|
|
344
|
-
*/
|
|
345
|
-
highlightFirst(): void;
|
|
346
|
-
/**
|
|
347
|
-
* Highlight the previous item among the visible list
|
|
348
|
-
* Loop to the last item if needed
|
|
349
|
-
*/
|
|
350
|
-
highlightPrevious(): void;
|
|
351
|
-
/**
|
|
352
|
-
* Highlight the next item among the visible list.
|
|
353
|
-
* Loop to the first item if needed
|
|
354
|
-
*/
|
|
355
|
-
highlightNext(): void;
|
|
356
|
-
/**
|
|
357
|
-
* Highlight the last item among the visible list
|
|
358
|
-
*/
|
|
359
|
-
highlightLast(): void;
|
|
360
|
-
/**
|
|
361
|
-
* Select the provided item.
|
|
362
|
-
* The selected list is used to
|
|
363
|
-
* @param item - the item to select
|
|
364
|
-
*/
|
|
365
|
-
select(item: Item): void;
|
|
366
|
-
/**
|
|
367
|
-
* Unselect the provided item.
|
|
368
|
-
* @param item - the item to unselect
|
|
369
|
-
*/
|
|
370
|
-
unselect(item: Item): void;
|
|
371
|
-
/**
|
|
372
|
-
* Toggle the selection of an item
|
|
373
|
-
* @param item - the item to toggle
|
|
374
|
-
* @param selected - an optional boolean to enforce the selected/unselected state instead of toggling
|
|
375
|
-
*/
|
|
376
|
-
toggleItem(item: Item, selected?: boolean): void;
|
|
377
|
-
/**
|
|
378
|
-
* open the select
|
|
379
|
-
*/
|
|
380
|
-
open(): void;
|
|
381
|
-
/**
|
|
382
|
-
* close the select
|
|
383
|
-
*/
|
|
384
|
-
close(): void;
|
|
385
|
-
/**
|
|
386
|
-
* Toggle the dropdown menu
|
|
387
|
-
* @param isOpen - If specified, set the menu in the defined state.
|
|
388
|
-
*/
|
|
389
|
-
toggle(isOpen?: boolean): void;
|
|
390
|
-
}
|
|
391
|
-
/**
|
|
392
|
-
* Interface representing the directives used in the Select component.
|
|
393
|
-
*
|
|
394
|
-
* @template Item - The type of the Select Items
|
|
395
|
-
*/
|
|
396
|
-
export interface SelectDirectives<Item> {
|
|
397
|
-
/**
|
|
398
|
-
* Directive to be used in the input group and the menu containers
|
|
399
|
-
*/
|
|
400
|
-
hasFocusDirective: HasFocus['directive'];
|
|
401
|
-
/**
|
|
402
|
-
* Directive that enables dynamic positioning of menu element
|
|
403
|
-
*/
|
|
404
|
-
floatingDirective: FloatingUI['directives']['floatingDirective'];
|
|
405
|
-
/**
|
|
406
|
-
* A directive to be applied to the input group element serves as the base for menu positioning
|
|
407
|
-
*/
|
|
408
|
-
referenceDirective: FloatingUI['directives']['referenceDirective'];
|
|
409
|
-
/**
|
|
410
|
-
* A directive to be applied to the element that contains the badges and the input
|
|
411
|
-
*/
|
|
412
|
-
inputContainerDirective: Directive;
|
|
413
|
-
/**
|
|
414
|
-
* A directive that applies all the necessary attributes to the container badges
|
|
415
|
-
*/
|
|
416
|
-
badgeAttributesDirective: Directive<ItemContext<Item>>;
|
|
417
|
-
/**
|
|
418
|
-
* A directive that applies all the necessary attributes to the dropdown menu
|
|
419
|
-
*/
|
|
420
|
-
menuAttributesDirective: Directive;
|
|
421
|
-
/**
|
|
422
|
-
* A directive that applies all the necessary attributes to the dropdown item
|
|
423
|
-
*/
|
|
424
|
-
itemAttributesDirective: Directive<ItemContext<Item>>;
|
|
425
|
-
/**
|
|
426
|
-
* A directive to be applied to the input
|
|
427
|
-
*/
|
|
428
|
-
inputDirective: Directive;
|
|
429
|
-
/**
|
|
430
|
-
* A directive to be applied to a button that closes a badge
|
|
431
|
-
*/
|
|
432
|
-
badgeCloseButtonDirective: Directive<ItemContext<Item>>;
|
|
433
|
-
}
|