@agnos-ui/angular-bootstrap 0.4.4 → 0.5.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.
Files changed (56) hide show
  1. package/README.md +2 -2
  2. package/agnos-ui-angular.module.d.ts +2 -1
  3. package/components/accordion/accordion.component.d.ts +40 -18
  4. package/components/accordion/accordion.gen.d.ts +37 -9
  5. package/components/alert/alert.component.d.ts +29 -17
  6. package/components/alert/alert.gen.d.ts +21 -2
  7. package/components/collapse/collapse.component.d.ts +79 -0
  8. package/components/collapse/collapse.gen.d.ts +146 -0
  9. package/components/collapse/index.d.ts +2 -0
  10. package/components/modal/modal.component.d.ts +13 -19
  11. package/components/modal/modal.gen.d.ts +35 -18
  12. package/components/modal/modal.service.d.ts +5 -1
  13. package/components/pagination/pagination.component.d.ts +20 -15
  14. package/components/pagination/pagination.gen.d.ts +49 -29
  15. package/components/progressbar/progressbar.component.d.ts +32 -16
  16. package/components/progressbar/progressbar.gen.d.ts +21 -4
  17. package/components/rating/rating.component.d.ts +11 -4
  18. package/components/rating/rating.gen.d.ts +25 -17
  19. package/components/select/select.component.d.ts +24 -4
  20. package/components/select/select.gen.d.ts +41 -25
  21. package/components/slider/slider.component.d.ts +32 -23
  22. package/components/slider/slider.gen.d.ts +54 -33
  23. package/components/toast/toast.component.d.ts +29 -17
  24. package/components/toast/toast.gen.d.ts +22 -2
  25. package/config.d.ts +16 -5
  26. package/config.gen.d.ts +5 -0
  27. package/esm2022/agnos-ui-angular.module.mjs +12 -5
  28. package/esm2022/components/accordion/accordion.component.mjs +165 -134
  29. package/esm2022/components/accordion/accordion.gen.mjs +1 -1
  30. package/esm2022/components/alert/alert.component.mjs +90 -65
  31. package/esm2022/components/alert/alert.gen.mjs +1 -1
  32. package/esm2022/components/collapse/collapse.component.mjs +89 -0
  33. package/esm2022/components/collapse/collapse.gen.mjs +15 -0
  34. package/esm2022/components/collapse/index.mjs +3 -0
  35. package/esm2022/components/modal/modal.component.mjs +111 -99
  36. package/esm2022/components/modal/modal.gen.mjs +1 -1
  37. package/esm2022/components/modal/modal.service.mjs +7 -5
  38. package/esm2022/components/pagination/pagination.component.mjs +138 -123
  39. package/esm2022/components/pagination/pagination.gen.mjs +1 -1
  40. package/esm2022/components/progressbar/progressbar.component.mjs +94 -55
  41. package/esm2022/components/progressbar/progressbar.gen.mjs +1 -1
  42. package/esm2022/components/rating/rating.component.mjs +41 -35
  43. package/esm2022/components/rating/rating.gen.mjs +1 -1
  44. package/esm2022/components/select/select.component.mjs +103 -118
  45. package/esm2022/components/select/select.gen.mjs +1 -1
  46. package/esm2022/components/slider/slider.component.mjs +126 -111
  47. package/esm2022/components/slider/slider.gen.mjs +1 -1
  48. package/esm2022/components/toast/toast.component.mjs +106 -81
  49. package/esm2022/components/toast/toast.gen.mjs +1 -1
  50. package/esm2022/config.gen.mjs +1 -1
  51. package/esm2022/config.mjs +17 -1
  52. package/esm2022/index.mjs +2 -1
  53. package/fesm2022/agnos-ui-angular-bootstrap.mjs +1085 -806
  54. package/fesm2022/agnos-ui-angular-bootstrap.mjs.map +1 -1
  55. package/index.d.ts +8 -7
  56. package/package.json +9 -8
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@agnos-ui/angular-bootstrap)](https://www.npmjs.com/package/@agnos-ui/angular-bootstrap)
4
4
 
5
- [Bootstrap](https://getbootstrap.com/)-based widget library for [Angular](https://angular.io/).
5
+ [Bootstrap](https://getbootstrap.com/)-based component library for [Angular](https://angular.io/).
6
6
 
7
7
  ## Installation
8
8
 
@@ -12,4 +12,4 @@ npm install @agnos-ui/angular-bootstrap
12
12
 
13
13
  ## Usage
14
14
 
15
- Please check [our demo site](https://amadeusitgroup.github.io/AgnosUI/latest/) to see all the available widgets and how to use them.
15
+ Please check [our demo site](https://www.agnosui.dev/latest/) to see all the available components and how to use them.
@@ -9,8 +9,9 @@ import * as i7 from "./components/accordion/accordion.component";
9
9
  import * as i8 from "./components/slider/slider.component";
10
10
  import * as i9 from "./components/progressbar/progressbar.component";
11
11
  import * as i10 from "./components/toast/toast.component";
12
+ import * as i11 from "./components/collapse/collapse.component";
12
13
  export declare class AgnosUIAngularModule {
13
14
  static ɵfac: i0.ɵɵFactoryDeclaration<AgnosUIAngularModule, never>;
14
- static ɵmod: i0.ɵɵNgModuleDeclaration<AgnosUIAngularModule, never, [typeof i1.SlotDirective, typeof i2.SelectComponent, typeof i2.SelectBadgeLabelDirective, typeof i2.SelectItemLabelDirective, typeof i1.UseDirective, typeof i1.UseMultiDirective, typeof i3.RatingComponent, typeof i3.RatingStarDirective, typeof i4.PaginationComponent, typeof i4.PaginationEllipsisDirective, typeof i4.PaginationFirstDirective, typeof i4.PaginationLastDirective, typeof i4.PaginationNextDirective, typeof i4.PaginationNumberDirective, typeof i4.PaginationPreviousDirective, typeof i4.PaginationPagesDirective, typeof i4.PaginationStructureDirective, typeof i5.ModalComponent, typeof i5.ModalStructureDirective, typeof i5.ModalHeaderDirective, typeof i5.ModalTitleDirective, typeof i5.ModalBodyDirective, typeof i5.ModalFooterDirective, typeof i6.AlertComponent, typeof i6.AlertStructureDirective, typeof i6.AlertBodyDirective, typeof i7.AccordionDirective, typeof i7.AccordionItemComponent, typeof i7.AccordionHeaderDirective, typeof i7.AccordionBodyDirective, typeof i7.AccordionItemStructureDirective, typeof i8.SliderComponent, typeof i8.SliderHandleDirective, typeof i8.SliderLabelDirective, typeof i8.SliderStructureDirective, typeof i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective], [typeof i1.SlotDirective, typeof i2.SelectComponent, typeof i2.SelectBadgeLabelDirective, typeof i2.SelectItemLabelDirective, typeof i1.UseDirective, typeof i1.UseMultiDirective, typeof i3.RatingComponent, typeof i3.RatingStarDirective, typeof i4.PaginationComponent, typeof i4.PaginationEllipsisDirective, typeof i4.PaginationFirstDirective, typeof i4.PaginationLastDirective, typeof i4.PaginationNextDirective, typeof i4.PaginationNumberDirective, typeof i4.PaginationPreviousDirective, typeof i4.PaginationPagesDirective, typeof i4.PaginationStructureDirective, typeof i5.ModalComponent, typeof i5.ModalStructureDirective, typeof i5.ModalHeaderDirective, typeof i5.ModalTitleDirective, typeof i5.ModalBodyDirective, typeof i5.ModalFooterDirective, typeof i6.AlertComponent, typeof i6.AlertStructureDirective, typeof i6.AlertBodyDirective, typeof i7.AccordionDirective, typeof i7.AccordionItemComponent, typeof i7.AccordionHeaderDirective, typeof i7.AccordionBodyDirective, typeof i7.AccordionItemStructureDirective, typeof i8.SliderComponent, typeof i8.SliderHandleDirective, typeof i8.SliderLabelDirective, typeof i8.SliderStructureDirective, typeof i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective]>;
15
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AgnosUIAngularModule, never, [typeof i1.SlotDirective, typeof i2.SelectComponent, typeof i2.SelectBadgeLabelDirective, typeof i2.SelectItemLabelDirective, typeof i1.UseDirective, typeof i1.UseMultiDirective, typeof i3.RatingComponent, typeof i3.RatingStarDirective, typeof i4.PaginationComponent, typeof i4.PaginationEllipsisDirective, typeof i4.PaginationFirstDirective, typeof i4.PaginationLastDirective, typeof i4.PaginationNextDirective, typeof i4.PaginationNumberDirective, typeof i4.PaginationPreviousDirective, typeof i4.PaginationPagesDirective, typeof i4.PaginationStructureDirective, typeof i5.ModalComponent, typeof i5.ModalStructureDirective, typeof i5.ModalHeaderDirective, typeof i5.ModalTitleDirective, typeof i5.ModalBodyDirective, typeof i5.ModalFooterDirective, typeof i6.AlertComponent, typeof i6.AlertStructureDirective, typeof i6.AlertBodyDirective, typeof i7.AccordionDirective, typeof i7.AccordionItemComponent, typeof i7.AccordionHeaderDirective, typeof i7.AccordionBodyDirective, typeof i7.AccordionItemStructureDirective, typeof i8.SliderComponent, typeof i8.SliderHandleDirective, typeof i8.SliderLabelDirective, typeof i8.SliderStructureDirective, typeof i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i9.ProgressbarBodyDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective, typeof i11.CollapseDirective], [typeof i1.SlotDirective, typeof i2.SelectComponent, typeof i2.SelectBadgeLabelDirective, typeof i2.SelectItemLabelDirective, typeof i1.UseDirective, typeof i1.UseMultiDirective, typeof i3.RatingComponent, typeof i3.RatingStarDirective, typeof i4.PaginationComponent, typeof i4.PaginationEllipsisDirective, typeof i4.PaginationFirstDirective, typeof i4.PaginationLastDirective, typeof i4.PaginationNextDirective, typeof i4.PaginationNumberDirective, typeof i4.PaginationPreviousDirective, typeof i4.PaginationPagesDirective, typeof i4.PaginationStructureDirective, typeof i5.ModalComponent, typeof i5.ModalStructureDirective, typeof i5.ModalHeaderDirective, typeof i5.ModalTitleDirective, typeof i5.ModalBodyDirective, typeof i5.ModalFooterDirective, typeof i6.AlertComponent, typeof i6.AlertStructureDirective, typeof i6.AlertBodyDirective, typeof i7.AccordionDirective, typeof i7.AccordionItemComponent, typeof i7.AccordionHeaderDirective, typeof i7.AccordionBodyDirective, typeof i7.AccordionItemStructureDirective, typeof i8.SliderComponent, typeof i8.SliderHandleDirective, typeof i8.SliderLabelDirective, typeof i8.SliderStructureDirective, typeof i9.ProgressbarComponent, typeof i9.ProgressbarStructureDirective, typeof i9.ProgressbarBodyDirective, typeof i10.ToastComponent, typeof i10.ToastStructureDirective, typeof i10.ToastBodyDirective, typeof i10.ToastHeaderDirective, typeof i11.CollapseDirective]>;
15
16
  static ɵinj: i0.ɵɵInjectorDeclaration<AgnosUIAngularModule>;
16
17
  }
@@ -1,34 +1,51 @@
1
1
  import type { SlotContent, TransitionFn } from '@agnos-ui/angular-headless';
2
- import { BaseWidgetDirective, ComponentTemplate } from '@agnos-ui/angular-headless';
3
- import type { AfterContentChecked, AfterViewInit } from '@angular/core';
2
+ import { BaseWidgetDirective } from '@agnos-ui/angular-headless';
3
+ import type { AfterViewInit } from '@angular/core';
4
4
  import { EventEmitter, TemplateRef } from '@angular/core';
5
- import type { AccordionItemContext, AccordionItemProps, AccordionItemWidget, AccordionWidget } from './accordion.gen';
5
+ import type { AccordionItemContext, AccordionItemWidget, AccordionWidget } from './accordion.gen';
6
6
  import * as i0 from "@angular/core";
7
+ /**
8
+ * Directive to represent the body of an accordion item.
9
+ *
10
+ * This directive provides a template reference for the {@link AccordionItemContext}.
11
+ */
7
12
  export declare class AccordionBodyDirective {
8
13
  templateRef: TemplateRef<any>;
9
- static ngTemplateContextGuard(dir: AccordionBodyDirective, context: unknown): context is AccordionItemContext;
14
+ static ngTemplateContextGuard(_dir: AccordionBodyDirective, context: unknown): context is AccordionItemContext;
10
15
  static ɵfac: i0.ɵɵFactoryDeclaration<AccordionBodyDirective, never>;
11
16
  static ɵdir: i0.ɵɵDirectiveDeclaration<AccordionBodyDirective, "ng-template[auAccordionItemBody]", never, {}, {}, never, never, true, never>;
12
17
  }
18
+ /**
19
+ * Directive to be used as an accordion header.
20
+ *
21
+ * This directive provides a template reference for the {@link AccordionItemContext}.
22
+ */
13
23
  export declare class AccordionHeaderDirective {
14
24
  templateRef: TemplateRef<any>;
15
- static ngTemplateContextGuard(dir: AccordionHeaderDirective, context: unknown): context is AccordionItemContext;
25
+ static ngTemplateContextGuard(_dir: AccordionHeaderDirective, context: unknown): context is AccordionItemContext;
16
26
  static ɵfac: i0.ɵɵFactoryDeclaration<AccordionHeaderDirective, never>;
17
27
  static ɵdir: i0.ɵɵDirectiveDeclaration<AccordionHeaderDirective, "ng-template[auAccordionItemHeader]", never, {}, {}, never, never, true, never>;
18
28
  }
29
+ /**
30
+ * Directive that represents the structure of an accordion item.
31
+ *
32
+ * This directive provides a template reference for the {@link AccordionItemContext}.
33
+ * It also includes a static method to guard the template context type.
34
+ */
19
35
  export declare class AccordionItemStructureDirective {
20
36
  templateRef: TemplateRef<any>;
21
- static ngTemplateContextGuard(dir: AccordionItemStructureDirective, context: unknown): context is AccordionItemContext;
37
+ static ngTemplateContextGuard(_dir: AccordionItemStructureDirective, context: unknown): context is AccordionItemContext;
22
38
  static ɵfac: i0.ɵɵFactoryDeclaration<AccordionItemStructureDirective, never>;
23
39
  static ɵdir: i0.ɵɵDirectiveDeclaration<AccordionItemStructureDirective, "ng-template[auAccordionItemStructure]", never, {}, {}, never, never, true, never>;
24
40
  }
25
- export declare class AccordionItemDefaultSlotsComponent {
26
- structure: TemplateRef<AccordionItemContext>;
27
- static ɵfac: i0.ɵɵFactoryDeclaration<AccordionItemDefaultSlotsComponent, never>;
28
- static ɵcmp: i0.ɵɵComponentDeclaration<AccordionItemDefaultSlotsComponent, "ng-component", never, {}, {}, never, never, true, never>;
29
- }
30
- export declare const accordionItemDefaultSlotItemStructure: ComponentTemplate<unknown, "structure", AccordionItemDefaultSlotsComponent>;
31
- export declare class AccordionItemComponent extends BaseWidgetDirective<AccordionItemWidget> implements AfterContentChecked, AfterViewInit {
41
+ /**
42
+ * Represents the default slot structure for an accordion item.
43
+ */
44
+ export declare const accordionItemDefaultSlotStructure: SlotContent<AccordionItemContext>;
45
+ /**
46
+ * AccordionItemComponent is a component that represents an item within an accordion.
47
+ */
48
+ export declare class AccordionItemComponent extends BaseWidgetDirective<AccordionItemWidget> implements AfterViewInit {
32
49
  /**
33
50
  * Content present in the accordion button inside the accordion header.
34
51
  *
@@ -119,10 +136,8 @@ export declare class AccordionItemComponent extends BaseWidgetDirective<Accordio
119
136
  * Event payload is the new value of visible.
120
137
  */
121
138
  visibleChange: EventEmitter<boolean>;
122
- readonly ad: AccordionDirective;
123
- readonly defaultSlots: import("@amadeus-it-group/tansu").WritableSignal<Partial<AccordionItemProps>, Partial<AccordionItemProps>>;
124
- readonly _widget: import("@agnos-ui/angular-headless").AngularWidget<AccordionItemWidget>;
125
- ngAfterContentChecked(): void;
139
+ slotChildren?: TemplateRef<void>;
140
+ constructor();
126
141
  ngAfterViewInit(): void;
127
142
  static ɵfac: i0.ɵɵFactoryDeclaration<AccordionItemComponent, never>;
128
143
  static ɵcmp: i0.ɵɵComponentDeclaration<AccordionItemComponent, "[auAccordionItem]", ["auAccordionItem"], { "header": { "alias": "auHeader"; "required": false; }; "children": { "alias": "auChildren"; "required": false; }; "structure": { "alias": "auStructure"; "required": false; }; "id": { "alias": "auId"; "required": false; }; "transition": { "alias": "auTransition"; "required": false; }; "className": { "alias": "auClassName"; "required": false; }; "destroyOnHide": { "alias": "auDestroyOnHide"; "required": false; }; "disabled": { "alias": "auDisabled"; "required": false; }; "visible": { "alias": "auVisible"; "required": false; }; "animated": { "alias": "auAnimated"; "required": false; }; "headerClassName": { "alias": "auHeaderClassName"; "required": false; }; "buttonClassName": { "alias": "auButtonClassName"; "required": false; }; "bodyContainerClassName": { "alias": "auBodyContainerClassName"; "required": false; }; "bodyClassName": { "alias": "auBodyClassName"; "required": false; }; "headingTag": { "alias": "auHeadingTag"; "required": false; }; }, { "shown": "auShown"; "hidden": "auHidden"; "visibleChange": "auVisibleChange"; }, ["slotHeaderFromContent", "slotBodyFromContent", "slotStructureFromContent"], ["*"], true, never>;
@@ -131,6 +146,13 @@ export declare class AccordionItemComponent extends BaseWidgetDirective<Accordio
131
146
  static ngAcceptInputType_visible: unknown;
132
147
  static ngAcceptInputType_animated: unknown;
133
148
  }
149
+ /**
150
+ * Directive for creating an accordion component.
151
+ *
152
+ * This directive extends the `BaseWidgetDirective` and provides various inputs and outputs
153
+ * to customize the behavior and appearance of the accordion and its items.
154
+ *
155
+ */
134
156
  export declare class AccordionDirective extends BaseWidgetDirective<AccordionWidget> {
135
157
  /**
136
158
  * If `true`, only one accordion-item at the time can stay open.
@@ -233,7 +255,7 @@ export declare class AccordionDirective extends BaseWidgetDirective<AccordionWid
233
255
  * @defaultValue `''`
234
256
  */
235
257
  itemHeadingTag: string | undefined;
236
- readonly _widget: import("@agnos-ui/angular-headless").AngularWidget<AccordionWidget>;
258
+ constructor();
237
259
  static ɵfac: i0.ɵɵFactoryDeclaration<AccordionDirective, never>;
238
260
  static ɵdir: i0.ɵɵDirectiveDeclaration<AccordionDirective, "[auAccordion]", ["auAccordion"], { "closeOthers": { "alias": "auCloseOthers"; "required": false; }; "className": { "alias": "auClassName"; "required": false; }; "itemDestroyOnHide": { "alias": "auItemDestroyOnHide"; "required": false; }; "itemAnimated": { "alias": "auItemAnimated"; "required": false; }; "itemTransition": { "alias": "auItemTransition"; "required": false; }; "itemStructure": { "alias": "auItemStructure"; "required": false; }; "itemClassName": { "alias": "auItemClassName"; "required": false; }; "itemHeaderClassName": { "alias": "auItemHeaderClassName"; "required": false; }; "itemButtonClassName": { "alias": "auItemButtonClassName"; "required": false; }; "itemBodyContainerClassName": { "alias": "auItemBodyContainerClassName"; "required": false; }; "itemBodyClassName": { "alias": "auItemBodyClassName"; "required": false; }; "itemHeadingTag": { "alias": "auItemHeadingTag"; "required": false; }; }, { "itemShown": "auItemShown"; "itemHidden": "auItemHidden"; }, never, never, true, never>;
239
261
  static ngAcceptInputType_closeOthers: unknown;
@@ -5,7 +5,14 @@ import type { WidgetSlotContext, SlotContent, TransitionFn, Widget, WidgetFactor
5
5
  */
6
6
  declare const export_getAccordionDefaultConfig: () => AccordionProps;
7
7
  export { export_getAccordionDefaultConfig as getAccordionDefaultConfig };
8
- export type AccordionItemContext = WidgetSlotContext<AccordionItemWidget>;
8
+ /**
9
+ * Represents the context for an accordion item within the accordion component.
10
+ */
11
+ export interface AccordionItemContext extends WidgetSlotContext<AccordionItemWidget> {
12
+ }
13
+ /**
14
+ * Represents the state of an Accordion component.
15
+ */
9
16
  export interface AccordionState {
10
17
  /**
11
18
  * Array containing all the accordion-items contained in the accordion.
@@ -27,6 +34,9 @@ export interface AccordionState {
27
34
  */
28
35
  itemStructure: SlotContent<AccordionItemContext>;
29
36
  }
37
+ /**
38
+ * Represents the state of an AccordionItem component.
39
+ */
30
40
  export interface AccordionProps {
31
41
  /**
32
42
  * The transition to use for the accordion-item body-container when the accordion-item is toggled.
@@ -130,7 +140,13 @@ export interface AccordionProps {
130
140
  */
131
141
  itemStructure: SlotContent<AccordionItemContext>;
132
142
  }
133
- export type AccordionWidget = Widget<AccordionProps, AccordionState, AccordionApi, object, AccordionDirectives>;
143
+ /**
144
+ * Represents an Accordion widget type.
145
+ */
146
+ export type AccordionWidget = Widget<AccordionProps, AccordionState, AccordionApi, AccordionDirectives>;
147
+ /**
148
+ * Represents the state of an accordion item, extending the core item state and additional properties specific to the accordion item.
149
+ */
134
150
  export interface AccordionItemState {
135
151
  /**
136
152
  * If `true` the content of the accordion-item collapse should be in DOM. Its value depends on the
@@ -199,6 +215,9 @@ export interface AccordionItemState {
199
215
  */
200
216
  header: SlotContent<AccordionItemContext>;
201
217
  }
218
+ /**
219
+ * Represents the properties for an Accordion item component.
220
+ */
202
221
  export interface AccordionItemProps {
203
222
  /**
204
223
  * If `true`, accordion-item will be animated.
@@ -288,7 +307,10 @@ export interface AccordionItemProps {
288
307
  */
289
308
  header: SlotContent<AccordionItemContext>;
290
309
  }
291
- export type AccordionItemWidget = Widget<AccordionItemProps, AccordionItemState, AccordionItemApi, AccordionItemActions, AccordionItemDirectives>;
310
+ /**
311
+ * Represents a widget for an accordion item.
312
+ */
313
+ export type AccordionItemWidget = Widget<AccordionItemProps, AccordionItemState, AccordionItemApi, AccordionItemDirectives>;
292
314
  /**
293
315
  * Create an AccordionItemWidget with given config props
294
316
  * @param config - an optional AccordionItem config
@@ -314,6 +336,9 @@ export { export_createAccordion as createAccordion };
314
336
  */
315
337
  declare const export_factoryCreateAccordion: (itemFactory?: WidgetFactory<AccordionItemWidget>, accordionItemProps?: string[], accordionConfig?: AccordionProps, accordionValidator?: ConfigValidator<AccordionProps>) => WidgetFactory<AccordionWidget>;
316
338
  export { export_factoryCreateAccordion as factoryCreateAccordion };
339
+ /**
340
+ * Interface representing the API for an accordion component.
341
+ */
317
342
  export interface AccordionApi {
318
343
  /**
319
344
  * Given the itemId, will expand the corresponding accordion-item.
@@ -348,18 +373,18 @@ export interface AccordionApi {
348
373
  */
349
374
  registerItem(itemConfig?: PropsConfig<AccordionItemProps>): AccordionItemWidget;
350
375
  }
376
+ /**
377
+ * Interface representing the directives used in the Accordion component.
378
+ */
351
379
  export interface AccordionDirectives {
352
380
  /**
353
381
  * Directive to put on the accordion DOM element
354
382
  */
355
383
  accordionDirective: Directive;
356
384
  }
357
- export interface AccordionItemActions {
358
- /**
359
- * Action to be called when the user clicks on the accordion-item button. If the accordion-item is disabled nothing will happen.
360
- */
361
- click(): void;
362
- }
385
+ /**
386
+ * Interface representing the API for an accordion item.
387
+ */
363
388
  export interface AccordionItemApi {
364
389
  /**
365
390
  * It will collapse the accordion-item.
@@ -378,6 +403,9 @@ export interface AccordionItemApi {
378
403
  */
379
404
  initDone(): void;
380
405
  }
406
+ /**
407
+ * Interface representing the directives used in an accordion item.
408
+ */
381
409
  export interface AccordionItemDirectives {
382
410
  /**
383
411
  * Directive to use in special cases, if the accordion header does not use a button element to control the collapsing.
@@ -1,31 +1,44 @@
1
1
  import type { SlotContent, TransitionFn } from '@agnos-ui/angular-headless';
2
- import { BaseWidgetDirective, ComponentTemplate } from '@agnos-ui/angular-headless';
3
- import type { AlertContext, AlertProps, AlertWidget } from './alert.gen';
4
- import { type WritableSignal } from '@amadeus-it-group/tansu';
5
- import type { AfterContentChecked } from '@angular/core';
2
+ import { BaseWidgetDirective } from '@agnos-ui/angular-headless';
3
+ import type { AlertContext, AlertWidget } from './alert.gen';
6
4
  import { EventEmitter, TemplateRef } from '@angular/core';
7
5
  import type { BSContextualClass } from '@agnos-ui/core-bootstrap/types';
8
6
  import * as i0 from "@angular/core";
7
+ /**
8
+ * Directive to be used as a structural directive for the body of an alert component.
9
+ *
10
+ * This directive allows the use of a template reference for the alert body content, with type {@link AlertContext}.
11
+ */
9
12
  export declare class AlertBodyDirective {
10
13
  templateRef: TemplateRef<any>;
11
- static ngTemplateContextGuard(dir: AlertBodyDirective, context: unknown): context is AlertContext;
14
+ static ngTemplateContextGuard(_dir: AlertBodyDirective, context: unknown): context is AlertContext;
12
15
  static ɵfac: i0.ɵɵFactoryDeclaration<AlertBodyDirective, never>;
13
16
  static ɵdir: i0.ɵɵDirectiveDeclaration<AlertBodyDirective, "ng-template[auAlertBody]", never, {}, {}, never, never, true, never>;
14
17
  }
18
+ /**
19
+ * Directive to define the structure of an alert component.
20
+ *
21
+ * This directive uses a `TemplateRef` to inject the template reference of the {@link AlertContext}.
22
+ */
15
23
  export declare class AlertStructureDirective {
16
24
  templateRef: TemplateRef<any>;
17
- static ngTemplateContextGuard(dir: AlertStructureDirective, context: unknown): context is AlertContext;
25
+ static ngTemplateContextGuard(_dir: AlertStructureDirective, context: unknown): context is AlertContext;
18
26
  static ɵfac: i0.ɵɵFactoryDeclaration<AlertStructureDirective, never>;
19
27
  static ɵdir: i0.ɵɵDirectiveDeclaration<AlertStructureDirective, "ng-template[auAlertStructure]", never, {}, {}, never, never, true, never>;
20
28
  }
21
- export declare class AlertDefaultSlotsComponent {
22
- structure: TemplateRef<AlertContext>;
23
- static ɵfac: i0.ɵɵFactoryDeclaration<AlertDefaultSlotsComponent, never>;
24
- static ɵcmp: i0.ɵɵComponentDeclaration<AlertDefaultSlotsComponent, "ng-component", never, {}, {}, never, never, true, never>;
25
- }
26
- export declare const alertDefaultSlotStructure: ComponentTemplate<unknown, "structure", AlertDefaultSlotsComponent>;
27
- export type PartialAlertProps = Partial<AlertProps>;
28
- export declare class AlertComponent extends BaseWidgetDirective<AlertWidget> implements AfterContentChecked {
29
+ /**
30
+ * Represents the default slot structure for the alert component.
31
+ */
32
+ export declare const alertDefaultSlotStructure: SlotContent<AlertContext>;
33
+ /**
34
+ * AlertComponent is a UI component that extends BaseWidgetDirective to provide
35
+ * an alert box with various customizable properties and behaviors.
36
+ *
37
+ * @remarks
38
+ * This component is designed to be used with Bootstrap styles and supports
39
+ * various Bootstrap contextual classes for different alert types.
40
+ */
41
+ export declare class AlertComponent extends BaseWidgetDirective<AlertWidget> {
29
42
  /**
30
43
  * Type of the alert, following bootstrap types.
31
44
  *
@@ -114,15 +127,14 @@ export declare class AlertComponent extends BaseWidgetDirective<AlertWidget> imp
114
127
  * ```
115
128
  */
116
129
  shown: EventEmitter<void>;
117
- readonly defaultSlots: WritableSignal<PartialAlertProps>;
118
130
  /**
119
131
  * CSS classes to be applied on the widget main container
120
132
  *
121
133
  * @defaultValue `''`
122
134
  */
123
135
  className: string | undefined;
124
- readonly _widget: import("@agnos-ui/angular-headless").AngularWidget<AlertWidget>;
125
- ngAfterContentChecked(): void;
136
+ slotChildren?: TemplateRef<void>;
137
+ constructor();
126
138
  static ɵfac: i0.ɵɵFactoryDeclaration<AlertComponent, never>;
127
139
  static ɵcmp: i0.ɵɵComponentDeclaration<AlertComponent, "[auAlert]", never, { "type": { "alias": "auType"; "required": false; }; "dismissible": { "alias": "auDismissible"; "required": false; }; "transition": { "alias": "auTransition"; "required": false; }; "visible": { "alias": "auVisible"; "required": false; }; "animatedOnInit": { "alias": "auAnimatedOnInit"; "required": false; }; "animated": { "alias": "auAnimated"; "required": false; }; "ariaCloseButtonLabel": { "alias": "auAriaCloseButtonLabel"; "required": false; }; "children": { "alias": "auChildren"; "required": false; }; "structure": { "alias": "auStructure"; "required": false; }; "className": { "alias": "auClassName"; "required": false; }; }, { "visibleChange": "auVisibleChange"; "hidden": "auHidden"; "shown": "auShown"; }, ["slotDefaultFromContent", "slotStructureFromContent"], ["*"], true, never>;
128
140
  static ngAcceptInputType_dismissible: unknown;
@@ -6,7 +6,14 @@ import type { BSContextualClass } from '@agnos-ui/core-bootstrap/types';
6
6
  */
7
7
  declare const export_getAlertDefaultConfig: () => AlertProps;
8
8
  export { export_getAlertDefaultConfig as getAlertDefaultConfig };
9
- export type AlertContext = WidgetSlotContext<AlertWidget>;
9
+ /**
10
+ * Represents the context for an Alert component.
11
+ */
12
+ export interface AlertContext extends WidgetSlotContext<AlertWidget> {
13
+ }
14
+ /**
15
+ * Represents the state of an alert component.
16
+ */
10
17
  export interface AlertState {
11
18
  /**
12
19
  * Is `true` when the alert is hidden. Compared to `visible`, this is updated after the transition is executed.
@@ -52,6 +59,9 @@ export interface AlertState {
52
59
  */
53
60
  type: BSContextualClass;
54
61
  }
62
+ /**
63
+ * Represents the properties for the Alert component.
64
+ */
55
65
  export interface AlertProps {
56
66
  /**
57
67
  * The transition function will be executed when the alert is displayed or hidden.
@@ -146,7 +156,10 @@ export interface AlertProps {
146
156
  */
147
157
  type: BSContextualClass;
148
158
  }
149
- export type AlertWidget = Widget<AlertProps, AlertState, AlertApi, object, AlertDirectives>;
159
+ /**
160
+ * Represents an alert widget component.
161
+ */
162
+ export type AlertWidget = Widget<AlertProps, AlertState, AlertApi, AlertDirectives>;
150
163
  /**
151
164
  * Create an AlertWidget with given config props
152
165
  * @param config - an optional alert config
@@ -154,6 +167,9 @@ export type AlertWidget = Widget<AlertProps, AlertState, AlertApi, object, Alert
154
167
  */
155
168
  declare const export_createAlert: WidgetFactory<AlertWidget>;
156
169
  export { export_createAlert as createAlert };
170
+ /**
171
+ * Represents the API for an alert component.
172
+ */
157
173
  export interface AlertApi {
158
174
  /**
159
175
  * Triggers alert closing programmatically (same as clicking on the close button (×)).
@@ -164,6 +180,9 @@ export interface AlertApi {
164
180
  */
165
181
  open(): void;
166
182
  }
183
+ /**
184
+ * Represents the directives for an alert component.
185
+ */
167
186
  export interface AlertDirectives {
168
187
  /**
169
188
  * the transition directive, piloting what is the visual effect of going from hidden to visible
@@ -0,0 +1,79 @@
1
+ import { BaseWidgetDirective } from '@agnos-ui/angular-headless';
2
+ import type { CollapseWidget } from '@agnos-ui/core-bootstrap/components/collapse';
3
+ import { EventEmitter } from '@angular/core';
4
+ import * as i0 from "@angular/core";
5
+ /**
6
+ * Directive to control the collapse behavior of an element.
7
+ */
8
+ export declare class CollapseDirective extends BaseWidgetDirective<CollapseWidget> {
9
+ /**
10
+ * If `true`, collapse opening will be animated at init time.
11
+ *
12
+ * @defaultValue `false`
13
+ */
14
+ animatedOnInit: boolean | undefined;
15
+ /**
16
+ * If `true`, collapse closing and opening will be animated.
17
+ *
18
+ * @defaultValue `true`
19
+ */
20
+ animated: boolean | undefined;
21
+ /**
22
+ * CSS classes to be applied on the widget main container
23
+ *
24
+ * @defaultValue `''`
25
+ */
26
+ className: string | undefined;
27
+ /**
28
+ * If `true`, collapse will be done horizontally.
29
+ *
30
+ * @defaultValue `false`
31
+ */
32
+ horizontal: boolean | undefined;
33
+ /**
34
+ * If `true` the collapse is visible to the user
35
+ *
36
+ * @defaultValue `true`
37
+ */
38
+ visible: boolean | undefined;
39
+ /**
40
+ * id of the collapse
41
+ *
42
+ * @defaultValue `''`
43
+ */
44
+ id: string | undefined;
45
+ /**
46
+ * Callback called when the collapse visibility changed.
47
+ *
48
+ * @defaultValue
49
+ * ```ts
50
+ * () => {}
51
+ * ```
52
+ */
53
+ visibleChange: EventEmitter<boolean>;
54
+ /**
55
+ * Callback called when the collapse is hidden.
56
+ *
57
+ * @defaultValue
58
+ * ```ts
59
+ * () => {}
60
+ * ```
61
+ */
62
+ hidden: EventEmitter<void>;
63
+ /**
64
+ * Callback called when the collapse is shown.
65
+ *
66
+ * @defaultValue
67
+ * ```ts
68
+ * () => {}
69
+ * ```
70
+ */
71
+ shown: EventEmitter<void>;
72
+ constructor();
73
+ static ɵfac: i0.ɵɵFactoryDeclaration<CollapseDirective, never>;
74
+ static ɵdir: i0.ɵɵDirectiveDeclaration<CollapseDirective, "[auCollapse]", ["auCollapse"], { "animatedOnInit": { "alias": "auAnimatedOnInit"; "required": false; }; "animated": { "alias": "auAnimated"; "required": false; }; "className": { "alias": "auClassName"; "required": false; }; "horizontal": { "alias": "auHorizontal"; "required": false; }; "visible": { "alias": "auVisible"; "required": false; }; "id": { "alias": "auId"; "required": false; }; }, { "visibleChange": "auVisibleChange"; "hidden": "auHidden"; "shown": "auShown"; }, never, never, true, never>;
75
+ static ngAcceptInputType_animatedOnInit: unknown;
76
+ static ngAcceptInputType_animated: unknown;
77
+ static ngAcceptInputType_horizontal: unknown;
78
+ static ngAcceptInputType_visible: unknown;
79
+ }
@@ -0,0 +1,146 @@
1
+ import type { PropsConfig, Directive, Widget } from '@agnos-ui/angular-headless';
2
+ /**
3
+ * Retrieve a shallow copy of the default collapse config
4
+ * @returns the default collapse config
5
+ */
6
+ declare const export_getCollapseDefaultConfig: () => CollapseProps;
7
+ export { export_getCollapseDefaultConfig as getCollapseDefaultConfig };
8
+ /**
9
+ * Create an CollapseWidget with given config props
10
+ * @param config - an optional collapse config
11
+ * @returns an CollapseWidget
12
+ */
13
+ declare const export_createCollapse: (config?: PropsConfig<CollapseProps>) => CollapseWidget;
14
+ export { export_createCollapse as createCollapse };
15
+ /**
16
+ * Represents the state of a collapse component.
17
+ * Extends the properties and state from `CollapseCommonPropsAndState`.
18
+ */
19
+ export interface CollapseState {
20
+ /**
21
+ * Is `true` when the collapse is hidden. Compared to `visible`, this is updated after the transition is executed.
22
+ */
23
+ hidden: boolean;
24
+ /**
25
+ * CSS classes to be applied on the widget main container
26
+ *
27
+ * @defaultValue `''`
28
+ */
29
+ className: string;
30
+ /**
31
+ * If `true`, collapse will be done horizontally.
32
+ *
33
+ * @defaultValue `false`
34
+ */
35
+ horizontal: boolean;
36
+ /**
37
+ * If `true` the collapse is visible to the user
38
+ *
39
+ * @defaultValue `true`
40
+ */
41
+ visible: boolean;
42
+ }
43
+ /**
44
+ * Properties for the Collapse component.
45
+ */
46
+ export interface CollapseProps {
47
+ /**
48
+ * Callback called when the collapse visibility changed.
49
+ *
50
+ * @defaultValue
51
+ * ```ts
52
+ * () => {}
53
+ * ```
54
+ * @param visible - The new visibility state of the collapse.
55
+ */
56
+ onVisibleChange: (visible: boolean) => void;
57
+ /**
58
+ * Callback called when the collapse is hidden.
59
+ *
60
+ * @defaultValue
61
+ * ```ts
62
+ * () => {}
63
+ * ```
64
+ */
65
+ onHidden: () => void;
66
+ /**
67
+ * Callback called when the collapse is shown.
68
+ *
69
+ * @defaultValue
70
+ * ```ts
71
+ * () => {}
72
+ * ```
73
+ */
74
+ onShown: () => void;
75
+ /**
76
+ * If `true`, collapse opening will be animated at init time.
77
+ *
78
+ * @defaultValue `false`
79
+ */
80
+ animatedOnInit: boolean;
81
+ /**
82
+ * If `true`, collapse closing and opening will be animated.
83
+ *
84
+ * @defaultValue `true`
85
+ */
86
+ animated: boolean;
87
+ /**
88
+ * id of the collapse
89
+ *
90
+ * @defaultValue `''`
91
+ */
92
+ id: string;
93
+ /**
94
+ * CSS classes to be applied on the widget main container
95
+ *
96
+ * @defaultValue `''`
97
+ */
98
+ className: string;
99
+ /**
100
+ * If `true`, collapse will be done horizontally.
101
+ *
102
+ * @defaultValue `false`
103
+ */
104
+ horizontal: boolean;
105
+ /**
106
+ * If `true` the collapse is visible to the user
107
+ *
108
+ * @defaultValue `true`
109
+ */
110
+ visible: boolean;
111
+ }
112
+ /**
113
+ * Interface representing the API for a collapsible component.
114
+ */
115
+ export interface CollapseApi {
116
+ /**
117
+ * Triggers collapse closing programmatically.
118
+ */
119
+ close(): void;
120
+ /**
121
+ * Triggers the collapse content to be displayed for the user.
122
+ */
123
+ open(): void;
124
+ /**
125
+ * Toggles the collapse content visibility.
126
+ */
127
+ toggle(): void;
128
+ }
129
+ /**
130
+ * Interface representing the directives used in a collapse component.
131
+ */
132
+ export interface CollapseDirectives {
133
+ /**
134
+ * Directive to apply the collapse.
135
+ */
136
+ collapseDirective: Directive;
137
+ }
138
+ /**
139
+ * Represents a widget for handling collapse functionality.
140
+ *
141
+ * This type defines the structure of a CollapseWidget, which includes properties, state, API, and directives
142
+ * necessary for managing the collapse behavior in the UI.
143
+ *
144
+ * @type {Widget<CollapseProps, CollapseState, CollapseApi, CollapseDirectives>}
145
+ */
146
+ export type CollapseWidget = Widget<CollapseProps, CollapseState, CollapseApi, CollapseDirectives>;
@@ -0,0 +1,2 @@
1
+ export * from './collapse.component';
2
+ export * from './collapse.gen';