@agnos-ui/angular-bootstrap 0.8.1 → 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 +156 -94
- 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 -207
- 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,308 +0,0 @@
|
|
|
1
|
-
import type { WidgetSlotContext, SlotContent, TransitionFn, Widget, WidgetFactory, Directive } from '@agnos-ui/angular-headless';
|
|
2
|
-
/**
|
|
3
|
-
* Retrieve a shallow copy of the default Toast config
|
|
4
|
-
* @returns the default Toast config
|
|
5
|
-
*/
|
|
6
|
-
declare const export_getToastDefaultConfig: () => ToastProps;
|
|
7
|
-
export { export_getToastDefaultConfig as getToastDefaultConfig };
|
|
8
|
-
/**
|
|
9
|
-
* Represents the context for a Toast widget.
|
|
10
|
-
* This interface is an alias for `WidgetSlotContext<ToastWidget>`.
|
|
11
|
-
*/
|
|
12
|
-
export interface ToastContext extends WidgetSlotContext<ToastWidget> {
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* Represents the state of a Toast component.
|
|
16
|
-
*/
|
|
17
|
-
export interface ToastState {
|
|
18
|
-
/**
|
|
19
|
-
* Is `true` when the alert is hidden. Compared to `visible`, this is updated after the transition is executed.
|
|
20
|
-
*/
|
|
21
|
-
hidden: boolean;
|
|
22
|
-
/**
|
|
23
|
-
* If `true`, alert can be dismissed by the user.
|
|
24
|
-
* The close button (×) will be displayed and you can be notified of the event with the (close) output.
|
|
25
|
-
*
|
|
26
|
-
* @defaultValue `true`
|
|
27
|
-
*/
|
|
28
|
-
dismissible: boolean;
|
|
29
|
-
/**
|
|
30
|
-
* If `true` the alert is visible to the user
|
|
31
|
-
*
|
|
32
|
-
* @defaultValue `true`
|
|
33
|
-
*/
|
|
34
|
-
visible: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Accessibility close button label
|
|
37
|
-
*
|
|
38
|
-
* @defaultValue `'Close'`
|
|
39
|
-
*/
|
|
40
|
-
ariaCloseButtonLabel: string;
|
|
41
|
-
/**
|
|
42
|
-
* CSS classes to be applied on the widget main container
|
|
43
|
-
*
|
|
44
|
-
* @defaultValue `''`
|
|
45
|
-
*/
|
|
46
|
-
className: string;
|
|
47
|
-
/**
|
|
48
|
-
* If `true` automatically hides the toast after the delay.
|
|
49
|
-
*
|
|
50
|
-
* @defaultValue `true`
|
|
51
|
-
*/
|
|
52
|
-
autoHide: boolean;
|
|
53
|
-
/**
|
|
54
|
-
* Delay in milliseconds before hiding the toast.
|
|
55
|
-
*
|
|
56
|
-
* @defaultValue `5000`
|
|
57
|
-
*/
|
|
58
|
-
delay: number;
|
|
59
|
-
/**
|
|
60
|
-
* Global template for the toast component
|
|
61
|
-
*/
|
|
62
|
-
structure: SlotContent<ToastContext>;
|
|
63
|
-
/**
|
|
64
|
-
* Template for the toast content
|
|
65
|
-
*/
|
|
66
|
-
children: SlotContent<ToastContext>;
|
|
67
|
-
/**
|
|
68
|
-
* Header template for the toast component
|
|
69
|
-
*/
|
|
70
|
-
header: SlotContent<ToastContext>;
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Interface representing the properties for the Toast component.
|
|
74
|
-
*/
|
|
75
|
-
export interface ToastProps {
|
|
76
|
-
/**
|
|
77
|
-
* The transition function will be executed when the alert is displayed or hidden.
|
|
78
|
-
*
|
|
79
|
-
* Depending on the value of `animatedOnInit`, the animation can be optionally skipped during the showing process.
|
|
80
|
-
*
|
|
81
|
-
* @defaultValue `fadeTransition`
|
|
82
|
-
*/
|
|
83
|
-
transition: TransitionFn;
|
|
84
|
-
/**
|
|
85
|
-
* Callback called when the alert visibility changed.
|
|
86
|
-
*
|
|
87
|
-
* @defaultValue
|
|
88
|
-
* ```ts
|
|
89
|
-
* () => {}
|
|
90
|
-
* ```
|
|
91
|
-
*/
|
|
92
|
-
onVisibleChange: (visible: boolean) => void;
|
|
93
|
-
/**
|
|
94
|
-
* Callback called when the alert is hidden.
|
|
95
|
-
*
|
|
96
|
-
* @defaultValue
|
|
97
|
-
* ```ts
|
|
98
|
-
* () => {}
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
onHidden: () => void;
|
|
102
|
-
/**
|
|
103
|
-
* Callback called when the alert is shown.
|
|
104
|
-
*
|
|
105
|
-
* @defaultValue
|
|
106
|
-
* ```ts
|
|
107
|
-
* () => {}
|
|
108
|
-
* ```
|
|
109
|
-
*/
|
|
110
|
-
onShown: () => void;
|
|
111
|
-
/**
|
|
112
|
-
* If `true`, alert opening will be animated.
|
|
113
|
-
*
|
|
114
|
-
* Animation is triggered when the `.open()` function is called
|
|
115
|
-
* or the visible prop is changed
|
|
116
|
-
*
|
|
117
|
-
* @defaultValue `false`
|
|
118
|
-
*/
|
|
119
|
-
animatedOnInit: boolean;
|
|
120
|
-
/**
|
|
121
|
-
* If `true`, alert closing will be animated.
|
|
122
|
-
*
|
|
123
|
-
* Animation is triggered when clicked on the close button (×),
|
|
124
|
-
* via the `.close()` function or the visible prop is changed
|
|
125
|
-
*
|
|
126
|
-
* @defaultValue `true`
|
|
127
|
-
*/
|
|
128
|
-
animated: boolean;
|
|
129
|
-
/**
|
|
130
|
-
* If `true`, alert can be dismissed by the user.
|
|
131
|
-
* The close button (×) will be displayed and you can be notified of the event with the (close) output.
|
|
132
|
-
*
|
|
133
|
-
* @defaultValue `true`
|
|
134
|
-
*/
|
|
135
|
-
dismissible: boolean;
|
|
136
|
-
/**
|
|
137
|
-
* If `true` the alert is visible to the user
|
|
138
|
-
*
|
|
139
|
-
* @defaultValue `true`
|
|
140
|
-
*/
|
|
141
|
-
visible: boolean;
|
|
142
|
-
/**
|
|
143
|
-
* Accessibility close button label
|
|
144
|
-
*
|
|
145
|
-
* @defaultValue `'Close'`
|
|
146
|
-
*/
|
|
147
|
-
ariaCloseButtonLabel: string;
|
|
148
|
-
/**
|
|
149
|
-
* CSS classes to be applied on the widget main container
|
|
150
|
-
*
|
|
151
|
-
* @defaultValue `''`
|
|
152
|
-
*/
|
|
153
|
-
className: string;
|
|
154
|
-
/**
|
|
155
|
-
* If `true` automatically hides the toast after the delay.
|
|
156
|
-
*
|
|
157
|
-
* @defaultValue `true`
|
|
158
|
-
*/
|
|
159
|
-
autoHide: boolean;
|
|
160
|
-
/**
|
|
161
|
-
* Delay in milliseconds before hiding the toast.
|
|
162
|
-
*
|
|
163
|
-
* @defaultValue `5000`
|
|
164
|
-
*/
|
|
165
|
-
delay: number;
|
|
166
|
-
/**
|
|
167
|
-
* Global template for the toast component
|
|
168
|
-
*/
|
|
169
|
-
structure: SlotContent<ToastContext>;
|
|
170
|
-
/**
|
|
171
|
-
* Template for the toast content
|
|
172
|
-
*/
|
|
173
|
-
children: SlotContent<ToastContext>;
|
|
174
|
-
/**
|
|
175
|
-
* Header template for the toast component
|
|
176
|
-
*/
|
|
177
|
-
header: SlotContent<ToastContext>;
|
|
178
|
-
}
|
|
179
|
-
/**
|
|
180
|
-
* Represents a Toast widget component.
|
|
181
|
-
*/
|
|
182
|
-
export type ToastWidget = Widget<ToastProps, ToastState, ToastApi, ToastDirectives>;
|
|
183
|
-
/**
|
|
184
|
-
* Create an ToastWidget with given config props
|
|
185
|
-
* @param config - an optional alert config
|
|
186
|
-
* @returns an ToastWidget
|
|
187
|
-
*/
|
|
188
|
-
declare const export_createToast: WidgetFactory<ToastWidget>;
|
|
189
|
-
export { export_createToast as createToast };
|
|
190
|
-
/**
|
|
191
|
-
* A mapping of toast position keys to their corresponding CSS class strings of bootstrap.
|
|
192
|
-
* These classes define the positioning of toast notifications on the screen.
|
|
193
|
-
*
|
|
194
|
-
* The keys represent various positions on the screen, such as top-left, top-center,
|
|
195
|
-
* middle-right, etc., and the values are the CSS classes of bootstrap that apply the respective
|
|
196
|
-
* positioning styles.
|
|
197
|
-
*
|
|
198
|
-
* Example usage:
|
|
199
|
-
* ```typescript
|
|
200
|
-
* const positionClass = toastPositions.topLeft; // "top-0 start-0"
|
|
201
|
-
* ```
|
|
202
|
-
*/
|
|
203
|
-
declare const export_toastPositions: Record<ToastPositions, string>;
|
|
204
|
-
export { export_toastPositions as toastPositions };
|
|
205
|
-
/**
|
|
206
|
-
* Represents the API for the toast component.
|
|
207
|
-
*/
|
|
208
|
-
export interface ToastApi {
|
|
209
|
-
/**
|
|
210
|
-
* Triggers alert closing programmatically (same as clicking on the close button (×)).
|
|
211
|
-
*/
|
|
212
|
-
close(): void;
|
|
213
|
-
/**
|
|
214
|
-
* Triggers the alert to be displayed for the user.
|
|
215
|
-
*/
|
|
216
|
-
open(): void;
|
|
217
|
-
}
|
|
218
|
-
/**
|
|
219
|
-
* Interface representing the directives for a toast component.
|
|
220
|
-
*/
|
|
221
|
-
export interface ToastDirectives {
|
|
222
|
-
/**
|
|
223
|
-
* the transition directive, piloting what is the visual effect of going from hidden to visible
|
|
224
|
-
*/
|
|
225
|
-
transitionDirective: Directive;
|
|
226
|
-
/**
|
|
227
|
-
* Directive that handles the autohide of the toast component
|
|
228
|
-
*/
|
|
229
|
-
autoHideDirective: Directive;
|
|
230
|
-
/**
|
|
231
|
-
* Directive that adds all the necessary attributes to the body
|
|
232
|
-
*/
|
|
233
|
-
bodyDirective: Directive;
|
|
234
|
-
/**
|
|
235
|
-
* Directive that adds all the necessary attributes to the close button depending on the presence of the header
|
|
236
|
-
*/
|
|
237
|
-
closeButtonDirective: Directive;
|
|
238
|
-
}
|
|
239
|
-
/**
|
|
240
|
-
* Represents the possible positions for displaying a toast notification.
|
|
241
|
-
*
|
|
242
|
-
* The positions are defined based on a grid layout with three horizontal
|
|
243
|
-
* alignments (left, center, right) and three vertical alignments (top, middle, bottom).
|
|
244
|
-
*
|
|
245
|
-
* Available positions:
|
|
246
|
-
* - `topLeft`: Top-left corner of the screen.
|
|
247
|
-
* - `topCenter`: Top-center of the screen.
|
|
248
|
-
* - `topRight`: Top-right corner of the screen.
|
|
249
|
-
* - `middleLeft`: Middle-left side of the screen.
|
|
250
|
-
* - `middleCenter`: Center of the screen.
|
|
251
|
-
* - `middleRight`: Middle-right side of the screen.
|
|
252
|
-
* - `bottomLeft`: Bottom-left corner of the screen.
|
|
253
|
-
* - `bottomCenter`: Bottom-center of the screen.
|
|
254
|
-
* - `bottomRight`: Bottom-right corner of the screen.
|
|
255
|
-
*/
|
|
256
|
-
export type ToastPositions = 'topLeft' | 'topCenter' | 'topRight' | 'middleLeft' | 'middleCenter' | 'middleRight' | 'bottomLeft' | 'bottomCenter' | 'bottomRight';
|
|
257
|
-
/**
|
|
258
|
-
* Props of the toaster
|
|
259
|
-
*/
|
|
260
|
-
export interface ToasterProps {
|
|
261
|
-
/** How much time (ms) a toast is displayed; 0 means it won't be removed until a manual action */
|
|
262
|
-
duration: number;
|
|
263
|
-
/** Where to position the toasts */
|
|
264
|
-
position: ToastPositions;
|
|
265
|
-
/** Maximum number of toasts displayed */
|
|
266
|
-
limit?: number;
|
|
267
|
-
/** Pause toast when hover */
|
|
268
|
-
pauseOnHover?: boolean;
|
|
269
|
-
/** Display a dismiss button on each toast. When duration = 0, this is enforced to true */
|
|
270
|
-
dismissible: boolean;
|
|
271
|
-
/** Add a button to close all the toasts at once */
|
|
272
|
-
closeAll?: boolean;
|
|
273
|
-
/** Close all label */
|
|
274
|
-
closeAllLabel?: string;
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Toast object
|
|
278
|
-
* @template Props Type of the toast properties.
|
|
279
|
-
*/
|
|
280
|
-
export interface ToasterToast<Props> {
|
|
281
|
-
/** Identifier of the toasts in the toaster */
|
|
282
|
-
id: number;
|
|
283
|
-
/** Properties of the toast */
|
|
284
|
-
props: Props;
|
|
285
|
-
}
|
|
286
|
-
/**
|
|
287
|
-
* Represents a timer used by the toaster service.
|
|
288
|
-
*/
|
|
289
|
-
export interface ToasterTimer {
|
|
290
|
-
/**
|
|
291
|
-
* The timeout identifier returned by `setTimeout`.
|
|
292
|
-
*/
|
|
293
|
-
timeout: ReturnType<typeof setTimeout> | null;
|
|
294
|
-
/**
|
|
295
|
-
* The timestamp when the timer was started.
|
|
296
|
-
*/
|
|
297
|
-
started: number;
|
|
298
|
-
/**
|
|
299
|
-
* The timestamp when the timer was paused (optional).
|
|
300
|
-
*/
|
|
301
|
-
paused?: number;
|
|
302
|
-
/**
|
|
303
|
-
* The duration for which the timer is set (optional). Used internally to compute the remaining time.
|
|
304
|
-
*/
|
|
305
|
-
duration: number;
|
|
306
|
-
}
|
|
307
|
-
declare const export_defaultToasterProps: ToasterProps;
|
|
308
|
-
export { export_defaultToasterProps as defaultToasterProps };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ToasterService } from './toaster.service';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class ToasterComponent {
|
|
4
|
-
readonly toasterService: ToasterService;
|
|
5
|
-
readonly auDismissible: import("@angular/core").InputSignal<boolean>;
|
|
6
|
-
readonly auDuration: import("@angular/core").InputSignal<number>;
|
|
7
|
-
readonly auPosition: import("@angular/core").InputSignal<import("@agnos-ui/angular-headless").ToastPositions>;
|
|
8
|
-
readonly auLimit: import("@angular/core").InputSignal<number | undefined>;
|
|
9
|
-
readonly auPauseOnHover: import("@angular/core").InputSignal<boolean | undefined>;
|
|
10
|
-
readonly auCloseAll: import("@angular/core").InputSignal<boolean | undefined>;
|
|
11
|
-
readonly auCloseAllLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
12
|
-
readonly positionClass: import("@angular/core").Signal<string>;
|
|
13
|
-
constructor();
|
|
14
|
-
handleHidden(toast: any): void;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ToasterComponent, never>;
|
|
16
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ToasterComponent, "[auToaster]", never, { "auDismissible": { "alias": "auDismissible"; "required": false; "isSignal": true; }; "auDuration": { "alias": "auDuration"; "required": false; "isSignal": true; }; "auPosition": { "alias": "auPosition"; "required": false; "isSignal": true; }; "auLimit": { "alias": "auLimit"; "required": false; "isSignal": true; }; "auPauseOnHover": { "alias": "auPauseOnHover"; "required": false; "isSignal": true; }; "auCloseAll": { "alias": "auCloseAll"; "required": false; "isSignal": true; }; "auCloseAllLabel": { "alias": "auCloseAllLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
17
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { ToastProps } from './toast.gen';
|
|
2
|
-
import { ToasterService as headlessToaster } from '@agnos-ui/angular-headless';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class ToasterService extends headlessToaster<Partial<ToastProps>> {
|
|
5
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ToasterService, never>;
|
|
6
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ToasterService>;
|
|
7
|
-
}
|
|
@@ -1,145 +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 { TreeContext, TreeItem, NormalizedTreeItem, TreeSlotItemContext, TreeWidget } from './tree.gen';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
/**
|
|
7
|
-
* Directive to provide a template reference for tree structure.
|
|
8
|
-
*
|
|
9
|
-
* This directive uses a template reference to render the {@link TreeContext}.
|
|
10
|
-
*/
|
|
11
|
-
export declare class TreeStructureDirective {
|
|
12
|
-
templateRef: TemplateRef<any>;
|
|
13
|
-
static ngTemplateContextGuard(_dir: TreeStructureDirective, context: unknown): context is TreeContext;
|
|
14
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TreeStructureDirective, never>;
|
|
15
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TreeStructureDirective, "ng-template[auTreeStructure]", never, {}, {}, never, never, true, never>;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* A constant representing the default slot for tree structure.
|
|
19
|
-
*/
|
|
20
|
-
export declare const treeDefaultSlotStructure: SlotContent<TreeContext>;
|
|
21
|
-
/**
|
|
22
|
-
* Directive to provide a template reference for tree item toggle.
|
|
23
|
-
*
|
|
24
|
-
* This directive uses a template reference to render the {@link TreeSlotItemContext}.
|
|
25
|
-
*/
|
|
26
|
-
export declare class TreeItemToggleDirective {
|
|
27
|
-
templateRef: TemplateRef<any>;
|
|
28
|
-
static ngTemplateContextGuard(_dir: TreeItemToggleDirective, context: unknown): context is TreeSlotItemContext;
|
|
29
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TreeItemToggleDirective, never>;
|
|
30
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TreeItemToggleDirective, "ng-template[auTreeItemToggle]", never, {}, {}, never, never, true, never>;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* A constant representing the default slot for tree item toggle.
|
|
34
|
-
*/
|
|
35
|
-
export declare const treeDefaultItemToggle: SlotContent<TreeSlotItemContext>;
|
|
36
|
-
/**
|
|
37
|
-
* Directive to provide a template reference for tree item content.
|
|
38
|
-
*
|
|
39
|
-
* This directive uses a template reference to render the {@link TreeSlotItemContext}.
|
|
40
|
-
*/
|
|
41
|
-
export declare class TreeItemContentDirective {
|
|
42
|
-
templateRef: TemplateRef<any>;
|
|
43
|
-
static ngTemplateContextGuard(_dir: TreeItemContentDirective, context: unknown): context is TreeSlotItemContext;
|
|
44
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TreeItemContentDirective, never>;
|
|
45
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TreeItemContentDirective, "ng-template[auTreeItemContent]", never, {}, {}, never, never, true, never>;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* A constant representing the default slot for tree item.
|
|
49
|
-
*/
|
|
50
|
-
export declare const treeDefaultSlotItemContent: SlotContent<TreeSlotItemContext>;
|
|
51
|
-
/**
|
|
52
|
-
* Directive to provide a template reference for tree item.
|
|
53
|
-
*
|
|
54
|
-
* This directive uses a template reference to render the {@link TreeSlotItemContext}.
|
|
55
|
-
*/
|
|
56
|
-
export declare class TreeItemDirective {
|
|
57
|
-
templateRef: TemplateRef<any>;
|
|
58
|
-
static ngTemplateContextGuard(_dir: TreeItemDirective, context: unknown): context is TreeSlotItemContext;
|
|
59
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TreeItemDirective, never>;
|
|
60
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TreeItemDirective, "ng-template[auTreeItem]", never, {}, {}, never, never, true, never>;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* A constant representing the default slot for tree item.
|
|
64
|
-
*/
|
|
65
|
-
export declare const treeDefaultSlotItem: SlotContent<TreeSlotItemContext>;
|
|
66
|
-
/**
|
|
67
|
-
* TreeComponent is an Angular component that extends the BaseWidgetDirective
|
|
68
|
-
* to provide a customizable tree widget. This component allows for various
|
|
69
|
-
* configurations and customizations through its inputs and outputs.
|
|
70
|
-
*/
|
|
71
|
-
export declare class TreeComponent extends BaseWidgetDirective<TreeWidget> {
|
|
72
|
-
constructor();
|
|
73
|
-
/**
|
|
74
|
-
* Optional accessibility label for the tree if there is no explicit label
|
|
75
|
-
*
|
|
76
|
-
* @defaultValue `''`
|
|
77
|
-
*/
|
|
78
|
-
readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
79
|
-
/**
|
|
80
|
-
* Array of the tree nodes to display
|
|
81
|
-
*
|
|
82
|
-
* @defaultValue `[]`
|
|
83
|
-
*/
|
|
84
|
-
readonly nodes: import("@angular/core").InputSignal<TreeItem[] | undefined>;
|
|
85
|
-
/**
|
|
86
|
-
* CSS classes to be applied on the widget main container
|
|
87
|
-
*
|
|
88
|
-
* @defaultValue `''`
|
|
89
|
-
*/
|
|
90
|
-
readonly className: import("@angular/core").InputSignal<string | undefined>;
|
|
91
|
-
/**
|
|
92
|
-
* Retrieves expand items of the TreeItem
|
|
93
|
-
*
|
|
94
|
-
* @param node - HTML element that is representing the expand item
|
|
95
|
-
*
|
|
96
|
-
* @defaultValue
|
|
97
|
-
* ```ts
|
|
98
|
-
* (node: HTMLElement) => node.querySelectorAll('button')
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
readonly navSelector: import("@angular/core").InputSignal<((node: HTMLElement) => NodeListOf<HTMLElement>) | undefined>;
|
|
102
|
-
/**
|
|
103
|
-
* Return the value for the 'aria-label' attribute of the toggle
|
|
104
|
-
* @param label - tree item label
|
|
105
|
-
*
|
|
106
|
-
* @defaultValue
|
|
107
|
-
* ```ts
|
|
108
|
-
* (label: string) => `Toggle ${label}`
|
|
109
|
-
* ```
|
|
110
|
-
*/
|
|
111
|
-
readonly ariaLabelToggleFn: import("@angular/core").InputSignal<((label: string) => string) | undefined>;
|
|
112
|
-
/**
|
|
113
|
-
* An event emitted when the user toggles the expand of the TreeItem.
|
|
114
|
-
*
|
|
115
|
-
* Event payload is equal to the TreeItem clicked.
|
|
116
|
-
*
|
|
117
|
-
* @defaultValue
|
|
118
|
-
* ```ts
|
|
119
|
-
* () => {}
|
|
120
|
-
* ```
|
|
121
|
-
*/
|
|
122
|
-
readonly expandToggle: import("@angular/core").OutputEmitterRef<NormalizedTreeItem>;
|
|
123
|
-
/**
|
|
124
|
-
* Slot to change the default tree item content
|
|
125
|
-
*/
|
|
126
|
-
readonly itemContent: import("@angular/core").InputSignal<SlotContent<TreeSlotItemContext>>;
|
|
127
|
-
readonly slotItemContentFromContent: import("@angular/core").Signal<TreeItemContentDirective | undefined>;
|
|
128
|
-
/**
|
|
129
|
-
* Slot to change the default display of the tree
|
|
130
|
-
*/
|
|
131
|
-
readonly structure: import("@angular/core").InputSignal<SlotContent<TreeContext>>;
|
|
132
|
-
readonly slotStructureFromContent: import("@angular/core").Signal<TreeStructureDirective | undefined>;
|
|
133
|
-
/**
|
|
134
|
-
* Slot to change the default tree item toggle
|
|
135
|
-
*/
|
|
136
|
-
readonly itemToggle: import("@angular/core").InputSignal<SlotContent<TreeSlotItemContext>>;
|
|
137
|
-
readonly slotItemToggleFromContent: import("@angular/core").Signal<TreeItemToggleDirective | undefined>;
|
|
138
|
-
/**
|
|
139
|
-
* Slot to change the default tree item
|
|
140
|
-
*/
|
|
141
|
-
readonly item: import("@angular/core").InputSignal<SlotContent<TreeSlotItemContext>>;
|
|
142
|
-
readonly slotItemFromContent: import("@angular/core").Signal<TreeItemDirective | undefined>;
|
|
143
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<TreeComponent, never>;
|
|
144
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TreeComponent, "[auTree]", never, { "ariaLabel": { "alias": "auAriaLabel"; "required": false; "isSignal": true; }; "nodes": { "alias": "auNodes"; "required": false; "isSignal": true; }; "className": { "alias": "auClassName"; "required": false; "isSignal": true; }; "navSelector": { "alias": "auNavSelector"; "required": false; "isSignal": true; }; "ariaLabelToggleFn": { "alias": "auAriaLabelToggleFn"; "required": false; "isSignal": true; }; "itemContent": { "alias": "auItemContent"; "required": false; "isSignal": true; }; "structure": { "alias": "auStructure"; "required": false; "isSignal": true; }; "itemToggle": { "alias": "auItemToggle"; "required": false; "isSignal": true; }; "item": { "alias": "auItem"; "required": false; "isSignal": true; }; }, { "expandToggle": "auExpandToggle"; }, never, never, true, never>;
|
|
145
|
-
}
|
|
@@ -1,216 +0,0 @@
|
|
|
1
|
-
import type { WidgetSlotContext, SlotContent, Widget, WidgetFactory, Directive } from '@agnos-ui/angular-headless';
|
|
2
|
-
/**
|
|
3
|
-
* Retrieve a shallow copy of the default Tree config
|
|
4
|
-
* @returns the default Tree config
|
|
5
|
-
*/
|
|
6
|
-
declare const export_getTreeDefaultConfig: () => TreeProps;
|
|
7
|
-
export { export_getTreeDefaultConfig as getTreeDefaultConfig };
|
|
8
|
-
/**
|
|
9
|
-
* Represents the context for a Tree widget.
|
|
10
|
-
* This interface is an alias for `WidgetSlotContext<TreeWidget>`.
|
|
11
|
-
*/
|
|
12
|
-
export type TreeContext = WidgetSlotContext<TreeWidget>;
|
|
13
|
-
/**
|
|
14
|
-
* Represents the context for a tree item, extending the base `TreeContext`
|
|
15
|
-
* with an additional `item` property.
|
|
16
|
-
*/
|
|
17
|
-
export type TreeSlotItemContext = TreeContext & {
|
|
18
|
-
item: NormalizedTreeItem;
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Represents the state of a Tree component.
|
|
22
|
-
*/
|
|
23
|
-
export interface TreeState {
|
|
24
|
-
/**
|
|
25
|
-
* Array of normalized tree nodes
|
|
26
|
-
*/
|
|
27
|
-
normalizedNodes: NormalizedTreeItem[];
|
|
28
|
-
/**
|
|
29
|
-
* Getter of expanded state for each tree node
|
|
30
|
-
*/
|
|
31
|
-
expandedMap: {
|
|
32
|
-
get(item: NormalizedTreeItem): boolean | undefined;
|
|
33
|
-
};
|
|
34
|
-
/**
|
|
35
|
-
* Optional accessibility label for the tree if there is no explicit label
|
|
36
|
-
*
|
|
37
|
-
* @defaultValue `''`
|
|
38
|
-
*/
|
|
39
|
-
ariaLabel?: string;
|
|
40
|
-
/**
|
|
41
|
-
* CSS classes to be applied on the widget main container
|
|
42
|
-
*
|
|
43
|
-
* @defaultValue `''`
|
|
44
|
-
*/
|
|
45
|
-
className: string;
|
|
46
|
-
/**
|
|
47
|
-
* Slot to change the default display of the tree
|
|
48
|
-
*/
|
|
49
|
-
structure: SlotContent<TreeContext>;
|
|
50
|
-
/**
|
|
51
|
-
* Slot to change the default tree item
|
|
52
|
-
*/
|
|
53
|
-
item: SlotContent<TreeSlotItemContext>;
|
|
54
|
-
/**
|
|
55
|
-
* Slot to change the default tree item content
|
|
56
|
-
*/
|
|
57
|
-
itemContent: SlotContent<TreeSlotItemContext>;
|
|
58
|
-
/**
|
|
59
|
-
* Slot to change the default tree item toggle
|
|
60
|
-
*/
|
|
61
|
-
itemToggle: SlotContent<TreeSlotItemContext>;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Represents the properties for the Tree component.
|
|
65
|
-
*/
|
|
66
|
-
export interface TreeProps {
|
|
67
|
-
/**
|
|
68
|
-
* Array of the tree nodes to display
|
|
69
|
-
*
|
|
70
|
-
* @defaultValue `[]`
|
|
71
|
-
*/
|
|
72
|
-
nodes: TreeItem[];
|
|
73
|
-
/**
|
|
74
|
-
* An event emitted when the user toggles the expand of the TreeItem.
|
|
75
|
-
*
|
|
76
|
-
* Event payload is equal to the TreeItem clicked.
|
|
77
|
-
*
|
|
78
|
-
* @defaultValue
|
|
79
|
-
* ```ts
|
|
80
|
-
* () => {}
|
|
81
|
-
* ```
|
|
82
|
-
*/
|
|
83
|
-
onExpandToggle: (node: NormalizedTreeItem) => void;
|
|
84
|
-
/**
|
|
85
|
-
* Retrieves expand items of the TreeItem
|
|
86
|
-
*
|
|
87
|
-
* @param node - HTML element that is representing the expand item
|
|
88
|
-
*
|
|
89
|
-
* @defaultValue
|
|
90
|
-
* ```ts
|
|
91
|
-
* (node: HTMLElement) => node.querySelectorAll('button')
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
navSelector(node: HTMLElement): NodeListOf<HTMLElement>;
|
|
95
|
-
/**
|
|
96
|
-
* Return the value for the 'aria-label' attribute of the toggle
|
|
97
|
-
* @param label - tree item label
|
|
98
|
-
*
|
|
99
|
-
* @defaultValue
|
|
100
|
-
* ```ts
|
|
101
|
-
* (label: string) => `Toggle ${label}`
|
|
102
|
-
* ```
|
|
103
|
-
*/
|
|
104
|
-
ariaLabelToggleFn: (label: string) => string;
|
|
105
|
-
/**
|
|
106
|
-
* Optional accessibility label for the tree if there is no explicit label
|
|
107
|
-
*
|
|
108
|
-
* @defaultValue `''`
|
|
109
|
-
*/
|
|
110
|
-
ariaLabel?: string;
|
|
111
|
-
/**
|
|
112
|
-
* CSS classes to be applied on the widget main container
|
|
113
|
-
*
|
|
114
|
-
* @defaultValue `''`
|
|
115
|
-
*/
|
|
116
|
-
className: string;
|
|
117
|
-
/**
|
|
118
|
-
* Slot to change the default display of the tree
|
|
119
|
-
*/
|
|
120
|
-
structure: SlotContent<TreeContext>;
|
|
121
|
-
/**
|
|
122
|
-
* Slot to change the default tree item
|
|
123
|
-
*/
|
|
124
|
-
item: SlotContent<TreeSlotItemContext>;
|
|
125
|
-
/**
|
|
126
|
-
* Slot to change the default tree item content
|
|
127
|
-
*/
|
|
128
|
-
itemContent: SlotContent<TreeSlotItemContext>;
|
|
129
|
-
/**
|
|
130
|
-
* Slot to change the default tree item toggle
|
|
131
|
-
*/
|
|
132
|
-
itemToggle: SlotContent<TreeSlotItemContext>;
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Represents a Tree widget component.
|
|
136
|
-
*/
|
|
137
|
-
export type TreeWidget = Widget<TreeProps, TreeState, TreeApi, TreeDirectives>;
|
|
138
|
-
/**
|
|
139
|
-
* Create a Tree with given config props
|
|
140
|
-
* @param config - an optional tree config
|
|
141
|
-
* @returns a TreeWidget
|
|
142
|
-
*/
|
|
143
|
-
declare const export_createTree: WidgetFactory<TreeWidget>;
|
|
144
|
-
export { export_createTree as createTree };
|
|
145
|
-
/**
|
|
146
|
-
* Represents a tree item component.
|
|
147
|
-
*/
|
|
148
|
-
export interface TreeItem {
|
|
149
|
-
/**
|
|
150
|
-
* Optional accessibility label for the node
|
|
151
|
-
*/
|
|
152
|
-
ariaLabel?: string;
|
|
153
|
-
/**
|
|
154
|
-
* Optional array of children nodes
|
|
155
|
-
*/
|
|
156
|
-
children?: TreeItem[];
|
|
157
|
-
/**
|
|
158
|
-
* If `true` the node is expanded
|
|
159
|
-
*/
|
|
160
|
-
isExpanded?: boolean;
|
|
161
|
-
/**
|
|
162
|
-
* String title of the node
|
|
163
|
-
*/
|
|
164
|
-
label: string;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* Normalized TreeItem object
|
|
168
|
-
*/
|
|
169
|
-
export interface NormalizedTreeItem {
|
|
170
|
-
/**
|
|
171
|
-
* Accessibility label for the node
|
|
172
|
-
*/
|
|
173
|
-
ariaLabel: string;
|
|
174
|
-
/**
|
|
175
|
-
* Level in the hierarchy, starts with 0 for a root node
|
|
176
|
-
*/
|
|
177
|
-
level: number;
|
|
178
|
-
/**
|
|
179
|
-
* An array of children nodes
|
|
180
|
-
*/
|
|
181
|
-
children: NormalizedTreeItem[];
|
|
182
|
-
/**
|
|
183
|
-
* If `true` the node is expanded
|
|
184
|
-
*/
|
|
185
|
-
isExpanded?: boolean;
|
|
186
|
-
/**
|
|
187
|
-
* String title of the node
|
|
188
|
-
*/
|
|
189
|
-
label: string;
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Interface representing the API for a Tree component.
|
|
193
|
-
*/
|
|
194
|
-
export interface TreeApi {
|
|
195
|
-
}
|
|
196
|
-
/**
|
|
197
|
-
* Interface representing various directives used in the Tree component.
|
|
198
|
-
*/
|
|
199
|
-
export interface TreeDirectives {
|
|
200
|
-
/**
|
|
201
|
-
* Directive to attach navManager for the tree
|
|
202
|
-
*/
|
|
203
|
-
navigationDirective: Directive;
|
|
204
|
-
/**
|
|
205
|
-
* Directive to handle toggle for the tree item
|
|
206
|
-
*/
|
|
207
|
-
itemToggleDirective: Directive<{
|
|
208
|
-
item: NormalizedTreeItem;
|
|
209
|
-
}>;
|
|
210
|
-
/**
|
|
211
|
-
* Directive to handle attributes for the tree item
|
|
212
|
-
*/
|
|
213
|
-
itemAttributesDirective: Directive<{
|
|
214
|
-
item: NormalizedTreeItem;
|
|
215
|
-
}>;
|
|
216
|
-
}
|